Re: What causes the stm32 RTC to reset?
Posted: Wed May 20, 2020 11:21 am
Bug report created here: https://github.com/stm32duino/STM32LowPower/issues/22
Everything relating to using STM32 boards with the Arduino IDE and alternatives
https://www.stm32duino.com/
This is not a bug.Bambo wrote: Wed May 20, 2020 11:21 am Bug report created here: https://github.com/stm32duino/STM32LowPower/issues/22
"rtc.setClockSource(STM32RTC::LSE_CLOCK); " needs to be called before rtc.begin();Bambo wrote: Wed May 20, 2020 10:47 am Ok so i've added the setClockSource() to the RTC code but now it doesn't restart at all once shutdown is called?
I am entering the same problem more complicated.fpiSTM wrote: Wed May 20, 2020 2:02 pm This is not a bug.
Simply wrong usage of the API. See my comment here:
https://github.com/stm32duino/STM32LowP ... -631491658
Code: Select all
#include <STM32RTC.h>
/* Get the rtc object */
STM32RTC& rtc = STM32RTC::getInstance();
void setup() {
Serial.begin(115200);
print_version();
rtc.setClockSource(STM32RTC::LSE_CLOCK);
rtc.begin(); // initialize RTC 24H format
}
O.K. Thanks for the quick answer.fpiSTM wrote: Wed Sep 29, 2021 1:33 pm STM32F1 has no date retention a PR has been submitted for this but I have to find time to review it...
This is linked to the STM32 feature. The STM32F1 RTC IP does not do date retention. That's all. That's why a software solution is to use the backup register as it was done in the PR opened.blue-man wrote: Wed Sep 29, 2021 2:21 pm
I have upgraded to core 2.0.0 and the problem still exists.
Additional i tested with a different third Blue-Pill.
Here i could find a similar post regarding this issue: https://community.st.com/s/question/0D5 ... osing-date
This links to https://community.st.com/s/question/0D5 ... p-register and https://community.st.com/s/feed/0D50X00009XkW1nSAF
Hopefully this helps?
O.K. This is clear now.fpiSTM wrote: Wed Sep 29, 2021 2:57 pm This is linked to the STM32 feature. The STM32F1 RTC IP does not do date retention. That's all. That's why a software solution is to use the backup register as it was done in the PR opened.