LOW POWER SYSTEM ON SLEEP XIAO BLE NRF52840 Blinky

Hi! Firstly I am somewhat new to developing on nordic chips so I'd like to apologise in advance or any silly mistakes or oversights I may have made. 

I am currently working with a XIAO NRF5280 BLE board and trying to program it using Zephyr & NRF Connect SDK on vscode. I am able to get basic examples running - like the blinky for example and writing to the board is generally fine.

The problem I am having is that I am unable to get the board to enter into a light system on sleep mode. I am attempting to enter into system on sleep using the k_sleep() / k_msleep for n number of seconds and from my understanding, this should automatically suspend the current thread and enter into the idle thread- thereby triggering system on sleep. However with blinky, when I attempt to toggle the boards sleep mode with led on vs led off, I measure a current draw of aroun 0.8 mA with the LED on and approx 0.18 mA when the LED is off. 

This in theory should be lower according to documentation, effectiely I am targeting a number sub 100 micro - ideally lower when the LED is off. I have read a number of other questions and answers posted and while I have managed to get the board operating at generally low power (0.8 mA when active) I cannot get below 0.18 mA. UART, console, logging is disabled already. 

In my proj.conf file one interesting thing that I noticed is that despite setting CONFIG_PM=y it remains set to n in the build. According to vscode a few dependecies are missing but I am unsure how I should correct this. Any advice or guidance would be greatly appreciated.

  • Hi

    Which NCS version you are using?

    The first thing would be to check that the modules you are not using should be off, like uart and logging etc.

    But looks like you have already done that. You may confirm it from ./build/zephyr/.config file.

    You may also like to disable peripherals that you are not using, e.g adc, or spi, or other hardware peripherals that you can configure using overlay files.

    The power optimization guide might also be helpful.

  • Hi Naeem!

    Thanks for that, I am using SDK version 2.7.0. 

    More or less everything that is not in use is turned off which I can confirm - including additional peripherals. The guide if definitely helpful but unfortunately hasn’t helped at solving this particular issue. 

  • Hi,

    I see that CONFIG_PM is only supported by some board, details of which you can see on KCONFIG reference.

    And the guide that I have link suggests to use the CONFIG_PM_DEVICE that is available for your board.

    Other than that, and following the guide, I don't have any other suggestion.

  • Just an update on this - I switched out to a custom board I had made (uses a nina b306) and for the most part I was able to get the current draw down to approximately 10uA with the same code. I'm not entirely sure why this is but, I assume there are some hardware features on the XIAO that I have either overlooked or neglected to toggle. Despite searching for a specific cause I have found nothing worthy of note. Regardless, a large bulk of the issue seems to have been resolved using the custom board. 

    A second issue of further power optimization to get around 2-5uA still needs to be done but I'm fairly confident this can be achieved by using some tips in the power optimization guide; placing external flash into sleep mode is something I feel would do the trick but I am yet to test this.
Related