STM32H563 gets stuck, and unstuck when connecting the debugger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-29 8:16 AM - last edited on 2025-05-29 8:32 AM by mƎALLEm
Hello everyone,
I’ve encountered some strange behaviour with my PCB using an STM32H563VGI MCU.
The setup includes an array of 10 LEDs, where one additional LED turns on every 2 minutes. Initially, the system worked fine, but after about 10 minutes, I noticed the LED sequence stopped progressing, it got stuck at LED 2.
To investigate, I connected a SEGGER J-Link debugger. Surprisingly, as soon as it was connected, the system resumed normal operation: the MCU printed all messages correctly, and the LED array advanced to LED 5, which was the expected state at that moment. It’s as if simply connecting the debugger “unstuck” the MCU.
I’m using ThreadX as the RTOS.
Has anyone experienced similar behavior? Any ideas what could be causing this?
Thanks in advance for your help!
- Labels:
-
STM32H5 Series
-
ThreadX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-30 1:48 AM
@massimoperdigo wrote:To investigate, I connected a SEGGER J-Link debugger. Surprisingly, as soon as it was connected, the system resumed normal operation
What, exactly, do you mean by, "connected" here?
- Just physically plugged-in?
- With an active debug session?
- other?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-30 2:59 AM
I connected the SEGGER J-Link and opened the J-Link RTT Viewer, which doesn’t start a full debug session, it’s only used to read non-blocking messages printed via SEGGER_RTT_printf.
As soon as I connected to the MCU using the RTT Viewer, the system seemed to unblock and resumed normal operation. The internal timer appeared to have been working correctly the entire time, as 5 LEDs turned on immediately, indicating that 10 minutes had passed, which aligns with the expected behaviour.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-30 3:13 AM
This is the 3v3 to gnd power supply that feeds the MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-30 3:15 AM
So just plugging-in the connector makes no difference - it's not until you actually connect RTT that your target "unblocks" ?
Have you asked Segger about this? They may have insight into what happens during/after an RTT connection which might cause this...
https://forum.segger.com/index.php/Board/3-J-Link-Flasher-related/?s=35d02df31511720cdf7a9f94838ca4a097a95584
@massimoperdigo wrote:opened the J-Link RTT Viewer, which doesn’t start a full debug session.
I'm not sure that it makes any difference as far as the core is concerned ?
As far as the Core is concerned, I think it's all just a DAP connection?
Again, Segger may be able to clarify that.
Does your code have anything which checks for a debugger connection; eg, to allow debug through sleep modes, prevent disabling debug pins, etc?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-05-30 3:16 AM
i will do that right now! thanks.
i will keep you updated.

- « Previous
-
- 1
- 2
- Next »