# Strange behavior with FreeRTOS-Plus-TCP on STM32H563ZI

**URL:** <https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746>\
**Category:** ST\
**Tags:** debug\
**Created:** [August 18, 2025, 5:44pm UTC](https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746 "2025-08-18T17:44:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![djacobow](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@djacobow](https://forums.freertos.org/u/djacobow)\
**Post date:** [August 18, 2025, 5:44pm UTC](https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746/1 "2025-08-18T17:44:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [August 19, 2025, 4:05am UTC](https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746/2 "2025-08-19T04:05:58Z")

</div>

Sharing the logs with `ipconfigHAS_DEBUG_PRINTF` and `ipconfigHAS_PRINTF` would be helpful to point out the issue. Have you checked if `vApplicationIPNetworkEventHook` is getting called `eNetworkUp` before the remote interaction with device is performed?

Also please share the priorities of the tasks running on your system.

---

<div class="post-metadata">

**Author:** ![djacobow](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@djacobow](https://forums.freertos.org/u/djacobow)\
**Post date:** [August 19, 2025, 6:24pm UTC](https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746/3 "2025-08-19T18:24:24Z")

</div>

Tony, thanks for getting back to me.

I was about to get you the logs you requested but when I tried, the system didn’t work at all anymore. I tried different things and eventually swapped out the USB-to-Ethernet dongle I was using on the host side. When I did, the app started working as expected!

I actually had bad hardware on the host side, and the DUT seems to be working. 🙂

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [August 20, 2025, 3:45am UTC](https://forums.freertos.org/t/strange-behavior-with-freertos-plus-tcp-on-stm32h563zi/23746/4 "2025-08-20T03:45:05Z")

</div>

Thanks for reporting back
