2023-03-12 08:39 PM
I am using STM32C0316-DK and testing RTC.
LSE is used for RTC Clock.
I removed the code setting rtc time/date in MX_RTC_Init().
After change the time/date, reboot board but rtc time/date are cleared.
When I checked RTC_CR register, it was also cleared.
In the manual, RTC_CR is not affected by system reset.
Is there anyone who has same issue?
2023-03-14 02:12 AM
How exactly do you "reboot"?
Note, that the 'C0 does not have VBAT connection and the low-power domain is powered directly from VDD, so if you remove VDD it will inevitably reset.
JW
2023-03-14 05:19 PM
It just happend after soft reset or reset from reset pin.
I didn't turn off the power.
Thanks.
2023-03-15 12:26 AM
Interesting.
Unfortunately, I don't have a 'C0 at hand to try this. You may want to contact ST, best through the web support form.
@S.Ma , you appear to have 'C0 expertise quite unique here, can you please have a look?
Thanks,
JW
2023-03-17 06:07 AM
Forwarded to STALAS who can check/try to duplicate the RTC reinit at hot power reset.
Note: On the board there is a 32.768 kHz clock generator which can be activated by the slide switch (only 1 IO used). When the chip is reset, need to make sure the startup code or HAL_Init() doesn't rewrite the HW registers.