lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ERR_MEM after write [LwIP 1.4]


From: Sergio R. Caprile
Subject: Re: [lwip-users] ERR_MEM after write [LwIP 1.4]
Date: Fri, 2 Jun 2017 10:11:47 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

> Does anyone have any ideas?

Yes!

You said '1.4', is there another number after that ? You should move to at least 1.4.1 if somehow you can't go 2.0 (unless you are on a ESP8266...)

Don't attach screen captures, do attach capture files. For instance, I can't see the frame numbers in your snapshot, nor if there is an invalid checksum.

As you know, TCP needs the other end to ACK before it can send more. Those unsent frames are there in your memory waiting to be ACKed. You shouldn't be sending at will but after you know for sure what you've sent has been ACKed. You do this by registering a tcp_sent() callback. 50ms seems a long time, but it depends on what your port does. What do you have below lwIP ? Is it an OS ? Is it bare metal ?
Are you calling sys_check_timeouts() ?
You must call lwIP low-level functions from within the same context, all from ints or all from main, no mix. Are you ?

Your driver needs to behave in order for the pbufs to be properly freed. Does it ?

Have you tried running a working example to see if your port + driver works OK ?

Have you tried enabling statistics ?




reply via email to

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