I'm working on a project where we're planning to use XIAO BLEs on an OpenThread network, for that we need very low power consumption. I've been trying samples to get low consumption to verify we can use the XIAO on our project, however I just cannot get to lower the consumption on it.
I've been doing multiple tests on different codes, I've tried stuff on the nrf52840DK that uses around 6uA with nrfOnly moded, which is great, but the same code (for example the blinky) on the XIAO consumes around 550uA. I've also used system_off with the same results, as well as some code some other fellows have posted on other threads.
When I tried sleeping the device using Arduino/bluefruit I was really happy yo see around 22uA consumption on the XIAO, however it just doesn't transfer when using Zephyr projects.
Here's my blinky (with the light off)
/* * Copyright (c) 2016 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/kernel.h> #include <zephyr/drivers/gpio.h> /* 1000 msec = 1 sec */ #define SLEEP_TIME_MS 1000 /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) /* * A build error on this line means your board is unsupported. * See the sample documentation for information on how to fix this. */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); void main(void) { // int ret; // if (!device_is_ready(led.port)) { // return; // } // ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); // if (ret < 0) { // return; // } while (1) { // ret = gpio_pin_toggle_dt(&led); // if (ret < 0) { // return; // } k_msleep(SLEEP_TIME_MS); } }
And my prj.conf
CONFIG_GPIO=n CONFIG_PM_DEVICE=y CONFIG_SERIAL=n # nRF board library CONFIG_DK_LIBRARY=n #FIX DEL DTS CONFIG_USB_DEVICE_STACK=n #LOW POWER CONFIGURATION RELATED # #Power management CONFIG_PM=y
Is there anything I'm missing? any XIAO or Zephyr specific configuration I might be missing?