-
Hi all, I have recently switched from the official Mbed OS (where deep sleep measured as low as ~6 µA) to the community fork (mbed‑os‑CE) on a NUCLEO_L476RG board. However, when I run the same code on CE, deep sleep current only drops to about 6 mA—rather than the expected microamp-level. I’ve confirmed the original Mbed OS achieves ≈6 µA deep sleep. Here’s a minimal repro:
And my mbed_app.json: I’ve applied sleep_manager_can_deep_sleep() before wait, use LowPowerTicker, and disabled console UART. I’ve also tried enabling sleep tracing (MBED_SLEEP_TRACING_ENABLED) but haven’t identified any active deep-sleep locks yet. Could someone help me identify:
Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hello @xillion and thank you for your message.
We need to compare an apple with apple so be sure you compile with GCC (ideally with same version) and also with same build profile on both platforms (ARM Mbed / MbedCE). Or am I wrong? @multiplemonomials BTW this macro is default for whole STM32L4 family.
BR, Jan |
Beta Was this translation helpful? Give feedback.
-
Hello @xillion, I tested your code with exactly the same configuration on my NUCLEO-L476RG board and measured the power consumption using a multimeter(a new one arrived today). l476.mp4 |
Beta Was this translation helpful? Give feedback.
-
I apologize for misleading all of you. It took me a few days to figure out why. What I did wrong: |
Beta Was this translation helpful? Give feedback.
I apologize for misleading all of you. It took me a few days to figure out why.
What I did wrong:
I connected both boards to a PC (Ubuntu 22.04) one I flashed through mbed studio and the other stm32cubeprogrammer (for mbed-ce).
I measured the consumption on the LDD pins. After each flashing I pressed the reset button. The project in both cases was built in “release” mode.
But on the board that was flashed through mbed studio the consumption in deep sleep mode did not exceed 3µA, and the other one was about 6mA. As it turned out later, the connected st-link debugger was to blame. It somehow sucked energy from the board.
When I tested on my custom boards(flashing over DFU) in both cases eve…