Dear all
I work with TM4C129 launchpad on an application that include a tcp/ip communication and I implemented it using lwip 1.4.1.
On the network there is only one partner but it doesn't implement any flow control...Its task is only "send a 28 bytes each 5 ms about".
My trouble is: When communication starts, around ten packets are received and lwip receive callback is correctly invoked, but, after that, no callback are fired for some seconds. After that, for next three callbacks execution the datagram passed from lwip to my callback include between 1300 and 1460 bytes (many "packets" from the partner in one). This behaviour is repeated cyclically.
Someone can help me for fix this behaviour?
What I have understand about this trouble:
1) It doesn't happen if the network part implements a right flow control but in this case I can't modify the partner program
2) It's significatly reduced when I reduce computation time of callback function (remove debug cout calls) and SysTick timer function (where lwipTimer call is present). I can clearly disable debug cout calls but I can't remove systick function that manage other time-sensitive PID tasks.
More implemetations details:
1) SysTick interrupt is called each 1 ms
2) Inside SysTick tick there are functions called at for example 5/10/15 ms. lwIPTimer is one of that and it's called each 5 ms
3) SysTick priority is 0x80 and Ethernet Tick 0xC0. In my consideration PID tasks are more time-sensitive than eth com ones.
Thanks you so much for your attention, if you have some suggest please answer to me.
Best regards
Stefano Pessina