SystemCoreClock variable is updated in two ways only #96
Labels
bug
Something isn't working
hal
HAL-LL driver-related issue or pull-request.
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
rcc
Reset and Clock Controller
Dear Developer
in Drivers/CMSIS/Device/ST/Source/Templates/system_stm32l4xx.c
stands:
The SystemCoreClock variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetHCLKFreq()
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
But HAL_RCC_GetHCLKFreq() does not update SystemCoreClock
Either fix the doc or the code
BTW:
HAL_RCC_GetSysClockFreq() and SystemCoreClockUpdate() are very similar
Can they merged together?
In HAL_RCC_GetSysClockFreq() are RCC_xxx_Pos used. In SystemCoreClockUpdate() are numerical Values used.
Please use in both case RCC_xxx_Pos.
The text was updated successfully, but these errors were encountered: