Deep sleep with threading

Hi there,

I’m using an STM32L432KC and I’m trying to experiment with deep sleep for a low power project. Using tickless mode in the RTOS I have been able to send the MCU into a sleep state consuming only 700uA which is low enough for the project. However when I introduce threads into the program I am unable to go below 3mA which is too much. For reference the current consumption when in full run mode is roughly 6-8mA with regular sleep at roughly 5mA.

Any help regarding what could be causing the additional current draw would be greatly appreciated.

1 Like

Just a general comment:
Seems that 700uA is deepsleep, 5mA is sleep
https://os.mbed.com/docs/mbed-os/v6.15/apis/power-management-sleep.html

You have to know that deepsleep is sometimes disabled by the system: when debug build profile is selected, when sleep_manager_lock_deep_sleep() is called,…

https://os.mbed.com/docs/mbed-os/v6.15/apis/power-optimization.html

I’m using the Develop build profile in MBED Studio.

I’ve began testing the code again and now I’m observing correct deep sleep behaviour with a simple additional thread blinking an LED? Only difference I can think of is the sleep delay in the main thread is now 100 seconds. However my understanding is that the low power ticker worked in millisecond scale latency so I’m unsure how this would affect it.