2020-08-04 12:56 AM
Hello
On an coin-cell application I use the STOP mode twice, once with WakeUp through external interrupts, once with WakeUp through RTC. Everything works fine.
When I enter the STOP mode with WkUp through external interrupts, I need to completely disable & stop the RTC, in order to save power (STOP-mode without RTC would be about 500nA less current).
I tried stopping the RTC, De-Init the RTC, etc., but without effort: RTC keeps sucking power.
Any idea on how to stop & disable in runtime the RTC, so it does not consume the additional RTC-power when MCU in STOP-mode?
Many thanks in advance!
Best Regards
Gerardo
2020-08-04 01:20 AM
Did you try e.g. rm0376 7.1.3 RTC and backup registers reset?
2020-08-04 01:27 AM
Yes, but didn't really help.
Till now, only helps disabling RTC & LSI:
RCC->CSR &= (~RCC_CSR_RTCEN); // disable the RTC clock
RCC->CSR &= (~RCC_CSR_LSION); // disable LSI
But just stopping a peripheral clock in this manner doesn't look to me as the elegant / correct way...