Part Number: TMS570LC4357 Hi, I have an implementation using lwIP which exhibits a strange problem, and I'm hoping someone can provide some insight or tips :) 1. The first message received calls tcp_recv instantly and is processed. 2. The second message might take 5 - 10s until tcp_recv is called. 3. The third etc. can take a very long time (or forever) between sending the data to the TMS570 and the getting callback. My code is based on this echo-server: https://github.com/dreamcat4/lwip/blob/master/contrib/apps/tcpecho_raw/echo.c Note that in the initial implementation of the echo server this problem doesn't occur, however, my implementation separates reading and writing (e.g. it is not an echo server anymore). So on reading, the message is parsed/stored, then instead of sending it back the pbuf is freed and tcp_recved called. If I insert a tcp_write after I have stored the message and just send some random (constant) string back before I deallocate the pbuf - everyone works once more (there is no delay on receiving subsequent packets). I struggle to explain why this is the case. Does anyone see a problem with the echo server code that would make it stop working if it's not being asked to send data? It seems almost a little like this: https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/675413?RM46L852-Modbus-Over-TCP-IP-control-hand-in-TCP-Rx-interrupt Incidentally - is lwIP v2 recommended or available for use on this micro, or just 1.4.1? Thanks, Thomas
↧