APB1PeriphClock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-15 9:38 AM
Is there a function or macro for determining the frequency of APB1PeriphClock and APB2PeriphClock?
Thanks,
jh
#apb1periphclockSolved! Go to Solution.
- Labels:
-
RCC
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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); // APB2Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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); // APB2Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-15 10:51 AM
Hi
Hite.John
,- In SPL you can use 'RCC_GetClocksFreq' which returns the frequencies of different on chip clocks: SYSCLK, HCLK, PCLK1 and PCLK2.
void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)
- In cube, there is:
uint32_t HAL_RCC_GetPCLK1Freq(void) : Returns the PCLK1 frequency
uint32_t HAL_RCC_GetPCLK2Freq(void) : Returns the PCLK2 frequencyKhouloud
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-15 10:59 AM
I thank you both.
John
