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.
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.