2017-03-15 09:38 AM
Is there a function or macro for determining the frequency of APB1PeriphClock and APB2PeriphClock?
Thanks,
jh
#apb1periphclockSolved! Go to Solution.
2017-03-15 10:07 AM
RCC_ClocksTypeDef RCC_Clocks;
/* SysTick end of count event each 1ms */
RCC_GetClocksFreq(&RCC_Clocks);printf('SYS:%d H:%d, P1:%d, P2:%d\r\n',
RCC_Clocks.SYSCLK_Frequency, RCC_Clocks.HCLK_Frequency, // AHB RCC_Clocks.PCLK1_Frequency, // APB1 RCC_Clocks.PCLK2_Frequency); // APB22017-03-15 10:07 AM
RCC_ClocksTypeDef RCC_Clocks;
/* SysTick end of count event each 1ms */
RCC_GetClocksFreq(&RCC_Clocks);printf('SYS:%d H:%d, P1:%d, P2:%d\r\n',
RCC_Clocks.SYSCLK_Frequency, RCC_Clocks.HCLK_Frequency, // AHB RCC_Clocks.PCLK1_Frequency, // APB1 RCC_Clocks.PCLK2_Frequency); // APB22017-03-15 10:51 AM
Hi
Hite.John
,void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)
uint32_t HAL_RCC_GetPCLK1Freq(void) : Returns the PCLK1 frequency
uint32_t HAL_RCC_GetPCLK2Freq(void) : Returns the PCLK2 frequencyKhouloud
2017-03-15 10:59 AM
I thank you both.
John