Page 2 of 2

Re: STM32L476 in STOP2 mode

Posted: Fri May 08, 2020 8:07 am
by Stephane
Giovanni wrote:
geoffrey.brown wrote:Don't forget to turn off the debugger hardware:

DBGMCU->CR = 0;

This is a considerable current draw.


Does this also stop the DWT counter? this would disable the RTC unit in the RTOS so no polled delays and no time measurement services.

Giovanni


I don't think so.
I use the RTC (on LSE) to be able restart experiment at defined times after sleep.
And it works, the RTC time is not affected by the "debug disable" instruction.
In this state, the debugger can also step through the sleep function (__WFI) like a normal instruction.

Stephane