lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LwIP - Receiving data via TCP connection


From: address@hidden
Subject: Re: [lwip-users] LwIP - Receiving data via TCP connection
Date: Sat, 23 May 2009 09:38:44 +0200
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]