How to deep sleep?

Hi everyone,
I would like to summarize deep-sleep, standby, shutdown mode base on above discussion.

Condition:

COMPILER: on-line compiler (windows10 Google Chrome)
Mbed-os: os5.15.1 and os6.6.0
CPU board: Nucleo-L152RE, -L476RG,-F411RE, -F446RE, DISCO-L475VG-IOT01A
Measurement Date: Jan. 16th, 17th, 2021
Equipment: DMM6500(KEITHLEY)

Programs:

/users/kenjiArai/code/Check_DeepSleep_os5/
/users/kenjiArai/code/Check_DeepSleep_os6/
/users/kenjiArai/code/Check_StandBy_os5/
/users/kenjiArai/code/Check_StandBy_os6/

Tips:

DEEPSLEEP

On Mbed-os5.15.1, you can use below one of the following three.

            ThisThread::sleep_for(10000);
            thread_sleep_for(10000);
            wait_ms(10000);

Case for Nucleo-L152RE, IDD(measure at JP6 → This is only CPU power line) is 4.23uA(microampere).
This value was achieved with the all peripheral ports set to analog input in advance(call LowPowerConfiguration() → Thanks Paul) .
Restart is starting from RESET condition(call sys_reset()) due to complexity of back to main program.
During deep-sleep condition, you can push “USER_BUTTON” to restart the program.
For os6.6.0, control program is not so easy!
You need additional command before call above “sleep_for” function.

            // 1) removes the receive interrupt handler(UART)
            pc.enable_input(false);
            // 2) and releases the deep sleep lock
            sleep_manager_can_deep_sleep();
            // 3) then enter Deep Sleep mode
            ThisThread::sleep_for(10s);

More detail, you can reach this explanation.
https://os.mbed.com/docs/mbed-os/v6.6/apis/power-management-sleep.html

STANDBY(SHUTDOWN)

For Nucleo-F411RE and -F446RE, DeepSleep is not enough performance for a power consumption.
Nucleo-F411RE case is 1.91mA(NOT microampere but milliampere!) and F446 is 1.76mA.
Erick made a good program in the past.
https://os.mbed.com/users/Sissors/code/WakeUp/
I modified it only for STM CPU’s.
The program can go to “StandBy Mode” which is more low power consumption compare with “DeepSleep Mode”.
Nucleo-F411RE reached 3.40uA duaring “StandBy Mode”.
I could NOT control Nucleo-L476RG board due to different control architecture for the PWR control module in the CPU.
Today, I can reach one solution.
This is not “StandBy Mode” but “ShutDown Mode”.
Nucleo-L476RG reached 620nA(nanoampere) during “ShutDown Mode”.

Attention:

As you know well, most of Mbed boards are equipped two CPU, Main CPU and Interface CPU.
This explanation, I just measured Main CPU VDD line current.
Total system power consumption, you need to concern how to reduce peripheral IC’s, such as I2C device, external EEPROM and so on, even +3.3V regulator.
If you use an evaluation board(like Nucleo series), you need to power off Interface CPU.
Otherwise, total power (came from USB line) is not reached enough level!

Enjoy low power consumption!

2 Likes