|
From: | Julio Cesar Aguilar Zerpa |
Subject: | Re: [lwip-users] delay on other parts of the program caused by sending data over TCP / LwIP is maybe blocking other interrupts? |
Date: | Mon, 28 Nov 2016 13:57:39 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 |
Hi Sergio, thanks for the help and sorry that it took me so long to reply. > However, the program still crashes when connected to the tcp client. I send a few debug msgs over the serial interface. The last msg I get comes from the 'sent' callback. The value of the argument 'len' of the callback is correct (1056) but it thinks it still needs to send 65535 bytes! Which is a very suspicious number! The MCU then hangs at asembly code: prefetchEntry b prefetchEntry NOTE: it always crahses and it takes from a few minutes to maybe 2 hours to crash. So far the pbuf->len in the sent_callback has always been 65535 and only once 49151. I always check that pbuf != NULL. (you can see it in the code attached) 11 -> error.h -> ERR_CONN -> "Not connected" I haven't got this specific error in the last few days. I will still send you the wireshark capture when the program crashes (the error callback is not being called) But I think this is another problem. http://lwip.wikia.com/wiki/Raw/TCP Attached you will also find the code (please read the README.txt file) I used the example from this web page and the tcpecho_raw example (from the contrib repo) as a basis for my code. From the web page I got the initialization of LwIP (ports files and etc.) The tcpecho_raw example was pretty usefull to understand the basics of how the raw api callbacks work. My code still uses the same structure as the tcpecho_raw example without the 'echo feature' and with a new callback that is triggered every 60 ms using 'sys_check_timeouts()' Thanks and Best Regards, Julio |
EthernetInterface.zip
Description: Zip compressed data
wireshark_capture.zip
Description: Zip compressed data
[Prev in Thread] | Current Thread | [Next in Thread] |