2025-11-26 1:58 AM - last edited on 2025-11-26 2:00 AM by Andrew Neil
Hello,
I am using a NUCLEO-STM32H753ZI-$AT3 development board.
When I configure the MCU to use the internal clock (HSI), everything works correctly and my UART debug logs are printed normally.
However, when I switch to using the external 25 MHz clock (HSE), no UART logs are printed. The code runs,but the UART prints garbage characters, for example:
<0x1c><0xe0><0xfc><0x1c><0xe
25 MHz external clock is selected in CubeMX (HSE ON, Crystal/Ceramic Resonator).
PLL settings are unchanged except switching HSI → HSE.
UART baud rate is the same (115200).
If I go back to internal HSI, UART prints again.
External clock ioc and log
Iternal clock ioc and log
2025-11-26 2:07 AM
@sameer_2k3 wrote:The code runs,but the UART prints garbage characters, for example:
<0x1c><0xe0><0xfc><0x1c><0xe
So your baud rate is wrong.
Use an oscilloscope or logic analyser to see what rate you are actually getting.
@sameer_2k3 wrote:
25 MHz external clock is selected in CubeMX (HSE ON, Crystal/Ceramic Resonator).
You mean an external Crystal - not an external clock?
Have you checked that it is actually oscillating, and actually at 25MHz?
@sameer_2k3 wrote:
- PLL settings are unchanged except switching HSI → HSE.
But the HSI is 64MHz - changing to a 25MHz source means that you do need to change your clock settings...
2025-11-26 2:09 AM
Check input clock is 25 MHz with scope, usually derived from ST-LINK, check options/settings there.
Check HSE_VALUE define in stm32h7xx_hal_config.h matches reality.