cancel
Showing results for 
Search instead for 
Did you mean: 

Clocksource selection

MalekKhadhraoui
Associate II

Hello!

I have a question regarding the system clock source selection. Specifically, I would like to understand how the High-Speed External (HSE) clock works. Does the board already include a crystal or ceramic resonator that serves as the source for the HSE, or is it necessary to connect an external one?

If the HSE is configurable in STM32CubeIDE as a clock source, why is that possible? I’m wondering how the system works in that context.

Thank you!

2 REPLIES 2
TDK
Guru

If you want to use HSE, you need to have an external crystal with appropriate load capacitors, or you can have an external clock such as an XO as an input (HSE Bypass). HSE is generally more accurate in general than the HSI the chip uses by default.

> If the HSE is configurable in STM32CubeIDE as a clock source, why is that possible?

Different crystals have different frequencies. The configuration in CubeMX needs to match that of the crystal.

If you feel a post has answered your question, please click "Accept as Solution".
STTwo-32
ST Employee

Aslema @MalekKhadhraoui 

For the MCU included on the board, it has only internal clock source such as HSI(High speed internal) frequency and LSI(Low speed internal) frequency. For external Clock sources HSE and LSE, you need to add them on your design if your are using one of them on your project as clock source for a peripheral, for system clock,… For our ST Nucleo, Disco is and Eval boards you should check the schematic of the board to see if the HSE or LSE Source clock are fitted on the board or not. HSI is the default system clock source. But you can change it to HSE, HSE PLL or another source (MSI if available). That depends on the requirements of your system about precision, … More details are on haw system clock works are available in this two parts article.

HSE Value depend on the source you fitted on your board that’s why you should set the value on CubeMX manually depending on your source.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.