This document provides practical examples of how to program the STM8A microcontroller clocks, including four clock sources and how to configure the STM8A CLK registers.
The document provides a guide on configuring the flexible clock controller (CLK) of the STM8A microcontroller. It details four available clock sources: the high-speed external crystal (HSE), high-speed user-external clock, high-speed internal RC oscillator (HSI), and low-speed internal RC (LSI). The note includes source code examples from the STM8 firmware library to demonstrate programming these registers.
The four clock sources are: 1-24 MHz high speed external crystal (HSE), up to 24 MHz high speed user-external clock, 16 MHz high speed internal RC oscillator (HSI), and 128 kHz low speed internal RC (LSI).
The clocks can be reconfigured at any time to suit different requirements or functional modes in the application.
The source code of the examples is included in the STM8 firmware library.