2017-07-25 08:23 PM
Hi all,
I'm working on a STM32F7 discovery board. UDP sending data at high rates, as well as debug messages is working fine.
I'm trying to get the UDP echo example workig, and I notice there is a HUGE delay (order of 10s of seconds) for the echo to return. So far what I have:
Using ncat to send string to IP + port.
LED1 toggles when an Ethernet message arrives ('Enter' on ncat). That works fine, as soon as I send the message out the LED1 toggles.
LED2 toggles when the receive function (pointer to in udp_recv) sends out the echo message. Now, when I receive a message, the udp_recv function does not call immediately, and that is were the delay is (I think), between data arrival on the ethernet interface and passing it up to the application. If I wait (order ~ 10 seconds or more) the echo is returned. After 3 or 4 tries, the delay gets much longer.
However, the data is inside the micro, because if I send two consecutive packets from ncat, the first packet gets echoed back, I get stuck waiting on the second echo.
Any ideas? Any settings I might have overlooked? Anyone come across this before?
I'm using STMCubeMX 4.22.
Thanks,
Albert
Solved! Go to Solution.
2017-07-26 02:17 AM
I figured it out.
I had taken the MX_LWIP_Process() function out of the main loop and called it only when an Ethernet packet arrived. Apparently that was enough to throw the system off balance, since all packets were still in the input buffer.
Putting MX_LWIP_Process() into the main loop solved everything.
Cheers,
Albert
2017-07-26 02:17 AM
I figured it out.
I had taken the MX_LWIP_Process() function out of the main loop and called it only when an Ethernet packet arrived. Apparently that was enough to throw the system off balance, since all packets were still in the input buffer.
Putting MX_LWIP_Process() into the main loop solved everything.
Cheers,
Albert