30 uint32_t u32Freq =0, u32PLLSrc;
31 uint32_t u32SRC_N,u32PLL_M,u32PllReg;
33 u32PllReg =
CLK->PLLCTL;
51 u32Freq = u32PLLSrc * u32PLL_M / (u32SRC_N+1);
65 uint32_t u32Freqout, u32AHBDivider, u32ClkSel;
95 return (u32Freqout/u32AHBDivider);
126 void AssertError(uint8_t * file, uint32_t line)
129 printf(
"[%s] line %d : wrong parameters.\r\n", file, line);
#define CLK_PLLCTL_PLL_SRC_N_Pos
#define CLK
Pointer to CLK register structure.
#define CLK_PLLCTL_PLL_MLP_Msk
uint32_t SysGet_PLLClockFreq(void)
Calculate current PLL clock frequency.
#define CLK_PWRCTL_HIRC_FSEL_Msk
void SystemCoreClockUpdate(void)
This function is used to update the variable SystemCoreClock and must be called whenever the core clo...
#define CLK_CLKSEL0_HCLK_S_PLL
Nano102/112 peripheral access layer header file. This file contains all the peripheral register's def...
#define CLK_CLKSEL0_HCLK_S_Msk
#define CLK_PLLCTL_PLL_MLP_Pos
#define CLK_CLKSEL0_HCLK_S_LIRC
uint32_t SysGet_HCLKFreq(void)
Get current HCLK clock frequency.
#define CLK_PLLCTL_PLL_SRC_HIRC
#define CLK_PLLCTL_PLL_SRC_N_Msk
#define CLK_CLKSEL0_HCLK_S_HXT
#define CLK_CLKSEL0_HCLK_S_LXT
#define CLK_CLKDIV0_HCLK_N_Msk