G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Get system and peripherals clocks frequency functions

Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks and different peripheral clocks available on the device. More...

Functions

void DDL_RCM_GetSystemClocksFreq (DDL_RCM_ClocksTypeDef *RCM_Clocks)
 Return the frequencies of different on chip clocks; System, AHB, APB buses clocks.

Detailed Description

Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks and different peripheral clocks available on the device.

Note
If SYSCLK source is HSI, function returns values based on HSI_VALUE(**)
If SYSCLK source is HSE, function returns values based on HSE_VALUE(***)
If SYSCLK source is PLL, function returns values based on HSE_VALUE(***) or HSI_VALUE(**) multiplied/divided by the PLL factors.
(**) HSI_VALUE is a constant defined in this file (default value 16 MHz) but the real value may vary depending on the variations in voltage and temperature.
(***) HSE_VALUE is a constant defined in this file (default value 25 MHz), user has to ensure that HSE_VALUE is same as the real frequency of the crystal used. Otherwise, this function may have wrong result.
The result of this function could be incorrect when using fractional value for HSE crystal.
This function can be used by the user application to compute the baud-rate for the communication peripherals or configure other parameters.

Function Documentation

◆ DDL_RCM_GetSystemClocksFreq()

void DDL_RCM_GetSystemClocksFreq ( DDL_RCM_ClocksTypeDef * RCM_Clocks)

Return the frequencies of different on chip clocks; System, AHB, APB buses clocks.

Note
Each time SYSCLK, HCLK, PCLK clock changes, this function must be called to update structure fields. Otherwise, any configuration based on this function will be incorrect.
Parameters
RCM_Clockspointer to a DDL_RCM_ClocksTypeDef structure which will hold the clocks frequencies
Return values
None

Definition at line 224 of file g32r4xx_ddl_rcm.c.