HAL RCC Overview ¶
Introducing RCC ¶
- group RCC_Introduction
-
The RCC (Reset and Clock Control) Hardware Abstraction Layer (HAL) provides a comprehensive set of APIs to interface with the STM32H7Pxx RCC peripheral.
It simplifies the configuration, initialization, and management of system and peripheral clocks, reset control.
The driver supports multiple oscillators (HSI, HSI48, HSE, LSE, LSI, CSI) and three PLLs with advanced fractional dividers and spread-spectrum clock generation (SSCG) for EMI reduction.
Key features include configuration of all bus prescalers, flexible peripheral kernel clock control, clock security system management (CSS), low-power clock gating and system reset to default states.
Peripheral clock management APIs allow enabling, disabling, and resetting clocks on various buses (AXI, AHB, APB) with fine-grained control.
The HAL RCC driver ensures some degree of portability and consistent behavior across STM32H7Pxx microcontroller series for common features, facilitating robust, secure, and power-efficient clock and reset management in diverse embedded applications.
Module and files ¶
The following diagram illustrates the RCC module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the RCC module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL RCC module, specifying their locations, default values, and descriptions:
- group RCC_Configuration_Table
-
¶
Configuration inside the RCC driver ¶
Config defines
Description
Default value
Note
PRODUCT
from IDE
Defined
The selected product (ex STM32H7P5IIxx)
PERIPHERAL
from CMSIS
Defined
Periph. available on the selected product
USE_ASSERT_DBG_PARAM
from IDE
None
When defined, enable the params assert
USE_HAL_CHECK_PARAM
from hal_conf.h
0
When set, parameters are checked in runtime
USE_HAL_RCC_MODULE
from hal_conf.h
1
When set, HAL RCC module is enabled
USE_HAL_RCC_RESET_PERIPH_CLOCK_MANAGEMENT
from hal_conf.h
0
When set, RCC peripherals configuration are reset
USE_HAL_RCC_RESET_RTC_DOMAIN
from hal_conf.h
0
When set, Resources under backup domain are reset
USE_EXTERNAL_ENV
from IDE
Defined
When set, ext. oscillators values are defined
LSE_VALUE
From stm32_external_env.h
32.768 kHz
Frequency of LSE oscillator (USE_EXTERNAL_ENV)
HSE_VALUE
From stm32_external_env.h
16 MHz
Frequency of HSE oscillator (USE_EXTERNAL_ENV)
AUDIO_CLOCK_VALUE
From stm32_external_env.h
4.8 kHz
Frequency of AUDIO clock (USE_EXTERNAL_ENV)
HSI_VALUE
From stm32h7pxxxx.h
64 MHz
Frequency of HSI oscillator
CSI_VALUE
From stm32h7pxxxx.h
4 MHz
Frequency of CSI oscillator
HSI48_VALUE
From stm32h7pxxxx.h
48 MHz
Frequency of HSI48 oscillator
LSI_VALUE
From stm32h7pxxxx.h
32 kHz
Frequency of LSI oscillator