Hi folks,
I’m trying to bring up FreeRTOS and FreeRTO-Plus-TCP on a Nucleo Board with an STM32H563ZI on it and am experiencing a strange issue where the IP stack simply doesn’t seem to work at first until after you poke at it with some packets, afterwards it seems to work more or less normally.
What I mean is that if I build a program, say, that opens a server socket, and try to connect to it shortly after boot, it doesn’t work, but if I wait, say, 20 seconds, and try a few more times, it does work and then works thereafter. Also, flood pinging the board also seems to get it into the state where the listener socket works.
I’ve also observed a phenomenon where if I build the DHCP client, the board immediately sends out a request at boot and my DHCP server sees it and sends back an address, but the board never acks and accepts the assignment, eventually timing out.
I am not using the FreeRTOS from CubeMX, instead using the tips of FreeRTOS-kernel and FreeRTOS-Plus-TCP on github. (ccabdec2f8 and 68c777, respectively). I am using the new (not legacy) STM32 driver with STM32H5 set.
I have set(FREERTOS_PLUS_TCP_NETWORK_IF STM32) but I have not set set(FREERTOS_PLUS_TCP_STM32_IF_DRIVER H5), which seelects the eth_hal from the freertos’s copy, because I am building with the CubeMX hal which includes the same files.
I’ve suspected that the timers or tasks used by FreeRTOS-Plus-TCP or the STM32 driver are not running or are blocked, but near as I can tell (with printfs and/or counters added to their loops) that they are running. I also have seen that the top-half of the interrupt handler works fine.
I’ve spent hours debugging this and have played with interrupt and task priorities a lot and I think I’ve exhausted the obvious problems there.
Does anybody have any other ideas what might be happening?