STM32F439 delay required before sending packets in LWIP
I am using the ethernet and lwip drivers provided by the STM32CubeMX software on a nucleo-144. I have a program, which upon start, sends out a UDP packet. I set the program to soft reset after a few seconds to characterize this issue. Using a GPIO line, I set a point in the code to toggle after successful initialization (i.e. all initialization functions return a non error status). I found that the board would continuously reach the toggle command periodically, though the UDP packet which I am sending was not periodic, often missing 1/3 of the time. As a guess based on some debugging patterns I noticed, I decided to add in a 1 second delay before sending the first UDP packet. After doing this, I see a huge improvement, with almost all the first packets being sent out correctly. Why would this be? Is there someone else I should be watching for to reach a certain state before I send the first packet? Somewhere in the STM32 driver, or the PHY (LAN8742A)?