Clock Sources and Types in STM32
Acknowledgements
I was googling, I came across this lecture slide: [
Clock Sources and Types in Diagram
In STM32F4, there are two categories:
- High Speed vs. Low Speed
- External vs. Internal
High Speed External (HSE)
- It has the advantage of producing a very accurate rate on the main clock.
- HSE can be generated from two possible clock: 1) crystal/ceramic resonator 2) user clock
High Speed Internal (HSI)
- This internal 16MHz RC oscillator clock can be used directly as a system clock (usually it’s STM32F4’s system clock by default).1
- It provides a clock source at low cost because it requires no external components. It also has a faster startup time than the HSE crystal oscillator.
- However, the frequency is less accurate than an HSE.
Low Speed External (LSE)
- It is generated from the same source as HSE, an external crystal or a ceramic resonator.
- But the clock frequency (32.768 kHz) is significantly slow.2
- Then why is this needed? It is low-powered, but provided highly accurate clock source to the real-time clock peripheral (RTC) for clock/calendar or other timing functions.
Low Speed Internal (LSI)
- It acts as a low-power clock source that can be kept running in Stop and Standby mode for the independent *watchdog (IWDG) and Auto-wakeup unit (AWU).
- *Watchdog: If a software fails, or hangs (not refreshed) within the certain amount of time, then this hardware timer “watchdog” will trigger a system reset to restart the application. Independent Watchdog (IWDG) has its own clock source whereas Window Watchdog (WWDG) is clocked from the main system clock.2