GPIO inputs pushed LOW upon HSE failure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 1:05 PM
I'm using an STM32H733 running from HSE clock with CSS disabled.
In a normal situation, the used GPIO inputs correctly read as HIGH as they are pulled HIGH by an external pull-up / LVTTL (push-pull) drive, verified with the oscilloscope.
After exposure to a brief (max. 1 second) EMI event, the HSE clock fails and those GPIO inputs are pushed LOW (as if they became GPIO outputs), verified with the oscilloscope. Furthermore, the UART communication is frozen (verified with oscilloscope, TX voltage is LOW), although a high-priority task is still able to toggle the SWO pin (verified with oscilloscope) albeit at a much lower frequency. Moreover, the MCU seems to have switched to run from the HSI clock, which would explain the lower frequency.
After that, when merely plugging in an STLink-v3 debugger (without even connecting to it), the MCU resumes normal operation: those GPIO pins resume working as intended and no longer push the voltage LOW, and UART communication resumes, at normal speed.
What could be the cause of the GPIO inputs being pushed LOW when the HSE clock fails?
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 2:07 PM - edited ‎2025-03-20 2:08 PM
Ground bounce or latch up issue? Lots of components here, board, debugger, oscilloscope, EMI source. How are grounds connected and how are ground loops avoided?
Plugging in the debugger likely resets whatever grounding issue is occurring.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-27 8:24 AM
Thanks for your post, TDK.
Before laying out the exact details of the board's ground connections, there's another bit of information that might be useful: when adding some extra capacitance to SWCLK (the one that could be used to connect a debugger to), the HSE failure and GPIOs being pushed LOW doesn't seem to occur! So it seems like EMI-introduced noise on SWCLK causes HSE clock failure.
Knowing this, could it be that STM32's SWCLK - when, e.g., glitched through the EMI event - causes those GPIO inputs being pushed LOW, and if yes, is there any command/sequence in this debugging interface that could cause such a thing, and how exactly (this might require internal ST knowledge)?
Or could the HSE clock failure be causing the GPIOs being pushed LOW, and if yes, how exactly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-28 7:33 AM
The issue is likely specific to your setup. How would a failing HSE control other non-connected GPIOs? Things on the chip are isolated and work independently. No reason to assume a bizarre internal connection. HSE stimulus is small.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-31 4:06 AM
Maybe it some kind of "default" reset behavior after a CSS event if it's not handled?
