2016-08-01 05:02 AM
Hi, I'm working on a project running on STM23H427, using LwIP and FreeRTOS, with original basic code generated by STM32Cube.
My application needs to send small UDP packets at 4mS intervals. My problem is, that after a random interval of time - sometimes a couple of hours, sometimes immediately - the application stops. The function ''low_level_output()'' in ''ethernetif.c'' returns with the error ''ERR_USE''. 1/ the error code returned is confusing as it implies a different error higher up the stack. A better return would be ''ERR_IF'' (which implies fatal!) or ''ERR_BUF''. It took several days of digging down through the layers to discover this! 2/ Why is this happening? The application currently sends packets of about 400 bytes, every 10mS. The transmission time is about 300uS (10MHz link) and the processing time before transmission maybe 100uS - so there is plenty of time to be sure the previous packet is sent before the next is loaded into the DMA buffer for transmission. There is very little other traffic on the network to cause collisions or other delays. 3/ Why is the DMA buffer not drained by the time the next attempt to send happens? Surely the only consequence should be one lost (un-sent) packet, then continue as normal? This fault seems to block all Ethernet function completely. Any ideas? Any previous experience of similar faults? Any help would be much appreciated! Many thanks, Mike.