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 6:24 AM - edited 2025-11-26 6:24 AM
@sameer_2k3 wrote:
on NUCLEO-H753ZI board (MB1364), the STLINK has a crystal oscillator having a value of 25 MHz.
How to use STLINK-V3 MCO output on Nucleo boards as a precise clock source for STM32 they already mention
It is used by the MCU that manages the STLINK (STM32F723). Not the target MCU, in your case STM32H753ZI:
STLINK is clocked by a 25MHz crystal oscillator and it generates another clock to the target MCU that should be configured in Bypass mode unless you added a 25MHz on OSC_IN/OSC_OUT.
PS: the STLINK clock output is configurable based on the article link provided above. So need to check what clock frequency is generating.
2025-11-26 8:19 PM
yess i have change PLL setting
2025-11-26 8:20 PM
after selecting 'Bypass' mode still the log is garbage
2025-11-26 8:27 PM
Did you change the HSE frequency in the clock tree to 8 MHz?
2025-11-26 9:23 PM - edited 2025-11-26 9:28 PM
I configured the PLL to 400 MHz, and when I select HSI as the clock source for UART, the UART logs print correctly. However, when I switch the UART clock source to the PLL in CubeMX, the UART output becomes corrupted and prints garbage characters.
Why does this happen, and how can I fix it?
What changes do I need to make to use the PLL clock for UART logging without getting garbage output?
2025-11-27 12:47 AM
You still have the input frequency set at 25MHz :
You can use the MCO output to check actual clock frequency (the output pin will need to be configured for High speed)
2025-11-27 12:48 AM - edited 2025-11-27 1:11 AM
@sameer_2k3 I see many unnecessary ping pongs in this post and that's not efficient.
So please:
1- Confirm: did you solder an external 25MHz crystal on OSC_IN/OSC_OUT?
2- Please share your ioc file.
2025-11-27 7:37 AM - edited 2025-11-27 7:38 AM
@sameer_2k3 Are you actually reading the replies you're getting? Or just ignoring them after reading?
Multiple people have told you the problem in multiple different ways.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.