cancel
Showing results for 
Search instead for 
Did you mean: 

How to completely disable RTC before entering STOP-Mode on STM32L0

Gera.V
Associate

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

2 REPLIES 2
Uwe Bonnes
Principal III

Did you try e.g. rm0376 7.1.3 RTC and backup registers reset?

Gera.V
Associate

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...