5.1.5.1.1. Informational requirements
General information: The clock initialization function is responsible for configuring the system clock to ensure the microcontroller operates at the desired frequency. This process is crucial for synchronizing the core, peripherals, and external interfaces. |
High-Speed Internal (HSI) Oscillator: A built-in clock for low-power applications. |
High-Speed External (HSE) Oscillator: An external crystal for precise timing. |
Phase-Locked Loop (PLL): A frequency multiplier to achieve higher system clock speeds. |
|
Target Configuration: The system clock can be configured using the following formula:
\[PLLCLK = \frac{f_{\text{INPUT}}}{\text{PLLM}} \times \text{PLLN} / \text{PLLP}\]
Where:
|
Intermediate Frequency (IF): The intermediate frequency is calculated as:
\[f_{\text{IF}} = \frac{f_{\text{INPUT}}}{\text{PLLM}} \times \text{PLLN}\]
This intermediate frequency is used internally by the PLL before the final output frequency is generated by dividing with PLLP. |
The system architecture consists of three main buses:
|
The AHB (Advanced High-performance Bus) must operate within the following frequency range to ensure optimal performance for high-speed data transfers:
|
The APB1 (Advanced Peripheral Bus 1) operates at a lower frequency than AHB:
|
The APB2 (Advanced Peripheral Bus 2) must operate within the following frequency range for correct functionality of peripherals such as SPI, GPIO, and other high-speed devices:
|