Sporadic issue with the LSCOEN bit being set in the RCC->BDCR register
We are working with an STM32L476JGY6TR with a project generated through cube, and we have sometimes seen a sporadic issue with the LSCOEN bit being set in the RCC->BDCR register. This causes the LSE clock to be output on PA2 where we are using the UART.
We have mitigated the problem by explicitly setting the BDCR register to all zero before calling SystemClock_Config() and disabling access to the backup domain. However, we do not know exactly why this happened and whether it may happen during runtime. So far we've seen the problem at boot-up (reports from different developers are not clear on if it is only at boot-up or if it also occurred runtime).
We never set the LSCOEN bit on purpose at any point in our program. We want to be sure that it doesn't happen again during runtime.
Any help and/or tips is greatly appreciated.
