AnsweredAssumed Answered

32KHz External Oscillator on STM32F779

Question asked by deabill.roy on Oct 19, 2016
Latest reply on Oct 19, 2016 by Amel N
Hi,

I have recently been having problems with the 32KHz external oscillator on a number of boards failing to start or running slowly when it does start. After trawling the reference manual I found the LSEDRV bits in the RCC_BDCR register. Setting these bits to a High drive level appears to solve the problem. I was wondering if there is any advice on the appropriate settings for these bits of if it just trial and error.

I am currently using CubeMX and the HAL system to provide initialization and peripheral access to the chip. This brings me to the second problem in that there is no way in CubeMX to set up parameters to define these bits, and there does not apper to be any way that they can be set with the HAL: interface apart from using direct SET_BIT and CLER_BIT macros on the relevant registers. As the bits cannot be set up in CubeMX,and the initialization is done by the HAL startup code in SystemClock_Config(), it seems that I wil hjave to use CubeMX to disable the oscillator and then set it up myself with an extra routine after the system starts. This is far from ideal and I would appreciate any advice on how to do this in an elegant manner.

Outcomes