lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] delay on other parts of the program caused by sending d


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.

And you should know how and where, so we can help you known why

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"
Would you please run a wireshark capture and check the error callback ?

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
If you post a bare minimal code with all callback handlers, I can try to take a look at it.

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

Attachment: EthernetInterface.zip
Description: Zip compressed data

Attachment: wireshark_capture.zip
Description: Zip compressed data


reply via email to

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