Q: How to configure STM32 clock system (HSE vs HSI) for optimal power efficiency?
Answer
The STM32 clock system routes oscillators through PLLs to generate high-frequency SYSCLK. HSI (8 MHz internal RC) starts automatically on reset but has +-1% accuracy at 25C and varies with temperature. HSE (external crystal typically 8-25 MHz) provides +-50 ppm stability required for USB Ethernet and precise timing. For low-power designs switch to HSI when USB is not active and disable HSE. Use the Clock Configuration tab in STM32CubeMX to visualize the clock tree. Always verify the PLL divisors stay within STM32 specifications (SYSCLK <= 180 MHz on most F4/L4 series). Power scaling (STM32L4 run modes) can reduce current from ~100 mA to ~100 uA.
Filed under: FAQ
