feat: deep sleep improvement for devkit2#3157
Conversation
3434b9d to
0be9893
Compare
0be9893 to
b3e6fff
Compare
|
Hi @beastoin, Could you help me take a look at this PR ? I’m really excited about this project! I recently ordered a DevKit2 to explore it further and noticed that the device runs out of battery after several days when using the latest firmware version. After some investigation, I identified a few improvements that allow the device to enter deep sleep mode more effectively. Please correct me if I’m mistaken anywhere — I’m still new to this project and eager to learn and contribute more! |
|
that looks solid. will take a look then let you know. btw, in the meantime, can you:
also, feel free to ping me @thinh http://discord.omi.me |
|
Nice! @TuEmb, it would also be cool to try reducing the power consumption of the device when it's actually being used. ofc only after youre done with this PR haha |
1dd9548 to
ae026bd
Compare
|
Hi @beastoin , @aaravgarg ,
--> yes, you are right. The zephyr supports the high level APIs to config the power management for
But, it seems the
From the schematic, the power for SD card is handled by P0.19 pin ( |
Conclusion:To prevent adding a lot of code or touching directly to nrf pins, I tried to use the API from zephyr as much as possible:
Result: The total current consumption was reduced from 1.2 mA to 17 µA in deep sleep mode, ensuring the device can operate for over one year in this state. |
|
nice, lgtm @TuEmb 1 more thing, please create a new ticket that can help us save 10 uA more, but let it remain there. |
* power off and disconnect all pins of SD card in deepsleep * push qspi flash into deepsleep at beginning * use the zephyr config instead of creating the APIs * can't set qspi flash to deepsleep mode by zephyr API * minimize the changes for the PR



This pull request aims to reduce deep sleep power consumption for the
DevKit2platform (and potentially for theOMIdevice as well). With these improvements, the power consumption decreases from approximately 1.2 mA to 7.8 µA.As a result, with a 250 mAh battery, the device can operate in deep sleep mode for over three years.
QSPI Flash Deep Sleep
By default, the QSPI flash remains powered on without entering sleep mode.
Since the hardware is directly connected to the 3.3 V power source, we now initialize the flash and explicitly place it into deep sleep mode to minimize power consumption.
SD Card Power Management
Enhanced SD card power efficiency by suspending the SPI peripheral and disconnecting related GPIOs when the SD card is powered off, then restoring them upon reactivation.
Simply setting SD_EN = 0 does not completely power down the SD card — there is still potential current leakage through other connected pins. Therefore, all relevant GPIOs should also be disconnected to achieve true low-power operation.
MEASUREMENT RESULT
Before improvement:

After improvement:
