AnsweredAssumed Answered

LSE Oscillator on STM32F769

Question asked by Mike Forster on Apr 4, 2017
Latest reply on Feb 1, 2018 by Mike Forster

I have a custom board with a STM32F769 and I am having problems getting the low speed LSE oscillator running. I am using CubeMX 4.19 to generate the low level code. In order to get the oscillator to run I need to set the drive strength to high with the LSEDRV bits in the RCC_BDCR.

 

However the code produced by CubeMX calls HAL_RCC_OscConfig() before setting the drive strength. The call to HAL_RCC_OscConfig() fails with a timeout because the LSERDY bit never gets set, because the oscillator isn't running.

 

I can add

__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_HIGH);

to stm32f7xx_hal_rcc.c but this will get over written next time I generate code from CubeMX.

 

As a side issue the reference manual suggests at 5.3.20 that the LSEDRV bits are not part of the backup domain but I don't seem to be able to write to them until the backup domain write accesses have been enabled.

 

Any ideas what to do next? I know I could change the 32.768kHz to a low capacitance device that works with low drive strength but I am looking for a software solution.

 

Thanks,

 

Mike

Outcomes