2024-04-09 06:24 AM
I am using an stm32h563 nucleo 144 board, and I am frequently running into the issue that after a power cycle the LSE does not start.
This is the relevant part of my SystemClock_Config:
2024-04-09 06:53 AM
Hi @PieterG,
this is not normal behavior. Low drive should be fine with Nucleo.
Please also try the Example/RTC/RTC_ActiveTamper example from the cube package. It uses similar configuration of the LSE and should work every time on non-faulty Nucleo.
Generally, if there's a HW problem preventing the LSE from working in low drive, try adding more driving power. In some cases, having more driving power for startup and then lowering it once oscillations are established works well.
For additional robustness consider Clock security systerm (CSS).
BR,
J
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.
2024-04-09 06:56 AM
PS I noticed you mentioned power cycle. If loss of power is really short, the backup domain may not be reset and could be blocking. Try going for backup domain reset if it solves the issue.
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.
2024-04-09 11:04 AM
Thank you Bubbles for your replies.
I have done some more testing about how this issue can be reproduced, and I found that it is always the first power cycle after I either plug or unplug my JLink from the SWD interface, that causes this LSE failure to occur.
On your suggestion I checked the Example/RTC/RTC_ActiveTamper example, and I see that it always resets the backup domain before starting the LSE.
Because I want to use the backup registers to pass status between bootloader and application, or keep status between soft resets, I decided to only do a backup domain reset after power cycle related resets (low power of brownout),
This is what I'm currently using:
2024-04-09 11:47 AM
Hi, try setting the LSE drive medium or hi (i use always hi - most reliable .)
And if any doubt - see H563 errata :
2024-04-09 11:56 AM
Thanks for bringing this to my attention, I was not aware of that.
I did some quick tests with drive setting HIGH, but I could still reproduce the issue of LSE not starting, after connecting/disconnecting SWD.
So I'll keep the backup domain reset as a workaround, but I will also be using HIGH drive mode to be sure.