2022-09-16 03:10 AM
LSE clock is set in the Cube and initialised
After intitialisation the following registers are not set correctly and the LSE clock isn't called
RCC->BDCR->LSEDRIVE not set to hight event though macro called
RCC->BDCR->LSCOSEL set to LSI
RCC->BDCR->LSCOEN not set
This looks to be a bug in the HAL library
Solved! Go to Solution.
2022-09-16 07:18 AM
2022-09-16 03:34 AM
Hello,
If you can, please share the.ioc file as you are using CubeMX or IDE, or share some code, so that the community can check/reproduce/help.
Does this happen on a nucleo board ?
>> This looks to be a bug in the HAL library
That can happen, but we need more inputs.
Thank you.
2022-09-16 03:51 AM
2022-09-16 05:21 AM
2022-09-16 07:18 AM
2022-09-19 06:11 AM
> I was calling __HAL_RCC_PWR_CLK_ENABLE();
> Before SystemClock_Config which was why the
> __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_HIGH)
> Didn’t work.
I fail to see the causality here.
JW
2022-09-23 01:25 AM
2022-09-26 04:07 PM
Enabling the clock for PWR peripheral has nothing to do with RCC_BDCR register, in which the LSE is configured.