AnsweredAssumed Answered

LL_code does not use SystemCoreClockUpdate?

Question asked by Wilko Lunenburg on Apr 3, 2018

Using:

Truestudio for STM32 v9.0.0.0

STM32CubeMX v4.25.0

STM32F100C8

LL_drivers only

 

In stm32f1xx_ll_utils.c the SystemCoreClock variable is set directly:

 

void LL_SetSystemCoreClock(uint32_t HCLKFrequency) {
    SystemCoreClock = HCLKFrequency;
}

 

Instead of using SystemCoreClockUpdate(), why?

STM32CubeMX does not set the symbol HSE_VALUE and this causes SystemCoreClockUpdate() to fall back to a default of 8000000 for HSE_VALUE which may be correct... (it wasn't for me)

 

Regards,

Wilko

Outcomes