Low power with Xiao nrf52840 on Zephyr RTOS

After a break, I’m back playing with the xiao nrf52840. I updated the power_test code to get my project working again and to help on a new project. The zipped code is attached. Thanks @fons for the updates! There have been a couple more updates as well.
zephyr_power_test.zip (6.6 KB)

It looks like the xiao_ble board file was updated.

Here are the updated key lines to suspend the flash:

   const struct device * qspi_dev = DEVICE_DT_GET(DT_INST(0, nordic_qspi_nor));

   int err = pm_device_action_run(qspi_dev, PM_DEVICE_ACTION_SUSPEND);

I had to include CONFIG_FLASH=y in the prj.conf to get the device tree to compile without error on the p25q16h.

The mechanism to go into system off sleep has also changed. It is now a simple call.

    	sys_poweroff();

with CONFIG_POWEROFF=y set in the prj.conf

CONFIG_PM is no longer used with the nrf52840. It will be disabled, even if set in the prj.conf. That threw me for a loop for awhile.

  • nrf connect v3.0.2, zephyr version 4.0.99
  • PPK2 connected to 3.3v pin and set at 3.3V
  • System On Sleep: 3.39 uA (this is when it is blocking on da_command_sem.
  • System Off Sleep: 1.24 uA

I lesson I relearned was to remember to disconnect the debugger when making the power measurements. I also ran across a bad seeed board that was stuck at 30mA or something like that.

1 Like