WB32L003 Standard Peripherals Firmware Library
函数
WB32L003_System_Private_Functions

函数

void SystemInit (void)
 Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the SystemCoreClock variable. 更多...
 
void SystemCoreClockUpdate (void)
 Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable contains the core clock (HCLK), it can be used by the user application to setup the SysTick timer or configure other parameters. 更多...
 

详细描述

函数说明

◆ SystemCoreClockUpdate()

void SystemCoreClockUpdate ( void  )

Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable contains the core clock (HCLK), it can be used by the user application to setup the SysTick timer or configure other parameters.

Update SystemCoreClock variable.

注解
Each time the core clock (HCLK) changes, this function must be called to update SystemCoreClock variable value. Otherwise, any configuration based on this variable will be incorrect.
- The system frequency computed by this function is not the real frequency in the chip. It is calculated based on the predefined constant and the selected clock source:
  • If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE_xxM(*)
  • If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)

(*) HSI_VALUE_xxM is a constant defined in system_wb32l003.c file (default value 4 MHz) but the real value may vary depending on the variations in voltage and temperature.

(**) HSE_VALUE is a constant defined in system_wb32l003.c file (default value 8 MHz, depending on the product used), user has to ensure that HSE_VALUE is same as the real frequency of the crystal used. Otherwise, this function may have wrong result.

参数
None
返回值
None

◆ SystemInit()

void SystemInit ( void  )

Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the SystemCoreClock variable.

Setup the microcontroller system.

注解
This function should be used only after reset.
参数
None
返回值
None