2020-07-02 12:11 PM
Hello!
I'm writing a small application based on Cube LwIP TCP echo server example little adapted to my custom board. The application is sending small periodic reports (50-150 bytes) to connected TCP client but on some iteration it stops transmitting messages. As I can see, tcp_write function is executed with no error returned but tcp_sent callback is never called. Total amount of successfully transmitted reports depends only on total size of this reports. Message reception from the client works normally.
Using non-modified echoserver source code file with the echotool test program leads to the same result. On some step there is no echo response from the server depending on the transmitted string size.
Is there a problem with memory allocation? Maybe i need change settings in lwipopts?
2020-07-07 10:32 AM
The only parameter in lwipopts.h that affects the total amount of transmitted responses is TCP_MSS.
The greater is MSS the lower is count of successful responds.
2020-07-07 10:45 AM
2020-08-12 04:56 AM
Thank you for your reply! Finally have an opportunity to return to this problem...
Now my application is consistently working if the compiler was set to low optimization. As far as I understand this is the missing barriers problem from the howto topic. I modifed HAL_ETH library source file by putting __DMB() instructions in it but still can't get working application on higher optimization settings of compiler. Maybe don't fully understand where to put this instructions.