cancel
Showing results for 
Search instead for 
Did you mean: 

UART stops printing when using 25 MHz external clock on NUCLEO-H753ZI-$AT3

sameer_2k3
Visitor

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

What I have already checked:

  • 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

sameer_2k3_0-1764150481356.png

sameer_2k3_4-1764150853375.png

Iternal clock ioc and log

sameer_2k3_5-1764150881049.png

sameer_2k3_6-1764150964266.png

 

 

2 REPLIES 2
Andrew Neil
Super User

@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...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..