2023-03-16 12:59 AM
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.
Solved! Go to Solution.
2023-03-22 12:12 AM
Hello @F.Belaid
I have talked to technical support about this and the recommended solution is in line with the artivle @Community member linked to. The specific solution is to manually reset the backup domain and ensure that the LSCOEN bit is cleared.
2023-03-16 01:11 AM
2023-03-16 01:51 AM
VBAT, VDD, VDDIO2, VDDUSB and VDDA are all connected to the same 3.3V., each with a 100 nF cap.
VRef+ is connected to a sperate voltage.
I read the article in the link, and I guess we cannot rule out that it is a brownout.
2023-03-21 11:42 PM
Hello @Søren Olander Ryeskov
The access to RTC and Backup registers are protected against parasitic write access through DBP. You can check when the backup domain is accessed. Also, you can make sure when LSCOSEL is set to be sure LSCO is generating LSE.
Could you check if LSE drive is being programmed before enabling the LSE?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-03-22 12:12 AM
Hello @F.Belaid
I have talked to technical support about this and the recommended solution is in line with the artivle @Community member linked to. The specific solution is to manually reset the backup domain and ensure that the LSCOEN bit is cleared.