Niels Hendriks wrote:
... To test the receiving of data via TCP I've programmed the code at
the end of this e-mail. For some reason, when I'm using a interrupt to
call tcp_tmr() every 250 ms, the proc. stops at (what appears to be) a
random time and reboots.
When I disable the interrupt/timer 1, and just put the tcp_tmr call in
main everything just works fine.
Using the same method when sending data works fine though.... I think
its memory releated.
Does anybody know what I'm doing wrong, and is it possible to use
interrupts as described?
Without reading your code, what you're doing wrong is calling tcp_tmr
(or any of the lwIP functions that are not specifically marked as safe)
from interrupt level! LwIP is not designed to be safe here: you have to
increase a counter in the ISR and check it in the main thread that
already handles the lwIP core. Reading the files in the doc directory
(recently updated in CVS HEAD!) as well as the wiki should give you
examples about how to proceed.
Simon
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users