2023-05-07 01:17 AM
2023-05-07 01:26 AM
STM32 have typically 2 clock sources, a Low Speed frequency and a High Speed frequency one (LS/HS).
For low cost focus, there are Internal generators (HSI/LSI, which have some tolerences (say 1 or 2%) across PVT (process, voltage, temperature).
When more precision is required, an External "crystal" can be used.
LSE = 32.768 kHz for Real Time Clock and calendar time/clock purpose
HSE = 8..50MHz external crystal
Precise HSE can help for USB Host (48MHz), Ethernet (25MHz), precise PWM/serial interface baudrate
When low power and low cost becomes both a priority, there are some STM32 with "MSI" which uses the precise LSE to cook a precise internal "HSE" without using the power of a PLL.
2023-05-07 03:34 AM
that's up on your application.
Many application, that's not need any external clock source which it's lowest cost on both, production and development.
But some application, that's need a precise clock or need a calendar so you need some external clock on LSE or HSE.
Ex. you need a calendar on your application. You have 2 solution that's one is use external calendar chip and another one is use RTC on your MCU which it's require LSE clock if you don't want to lose your calendar when the power is off.
first one is more cost on production.
second one is more cost on development.