Reducing current draw XIAO BLE

Trying to reduce idle power consumption of a project that uses Seeed studio XIAO BLE nrf52840 module. 

When idle, the seeduino draws  around 1.5mA. Power is supplied through the 3.3V pin

The same code running on the nrf52840 DK shows average current draw on the order of 10s of uA on my ammeter when measured through the current measurement header on the DK

To try and optimise the power draw, I created a simple blinky project. When running this, the idle draw is around 600uA for the seeeduino and 3-4 uA for the DK

Powering off the xiao ble using sys_poweroff() lowers the current to 2-3uA, So it seems like there is not leakage etc... 

In the case of the blinky program, my guess for the lower power consumption compared to case 1 is because flash is disabled. 

prj.conf for blinky:

Fullscreen
1
2
3
4
5
6
7
8
9
10
CONFIG_GPIO=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_BOARD_ENABLE_DCDC=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
CONFIG_SERIAL=n
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

im using mcuboot, child_image/mcuboot.conf is : 

Fullscreen
1
2
3
4
5
6
7
CONFIG_MULTITHREADING=y
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_LOG=n
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_SERIAL=n
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

.config for xiao ble

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# CONFIG_INPUT is not set
# CONFIG_WIFI is not set
# CONFIG_MIPI_DSI is not set
# CONFIG_MODEM is not set
# CONFIG_SPI is not set
CONFIG_BOARD="xiao_ble"
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y
CONFIG_NUM_IRQS=48
CONFIG_SOC_SERIES="nrf52"
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
CONFIG_SOC="nRF52840_QIAA"
CONFIG_CLOCK_CONTROL_INIT_PRIORITY=30
CONFIG_FLASH_SIZE=1024
CONFIG_FLASH_BASE_ADDRESS=0x0
CONFIG_ICACHE_LINE_SIZE=32
CONFIG_DCACHE_LINE_SIZE=32
CONFIG_CLOCK_CONTROL=y
# CONFIG_PINCTRL is not set
# CONFIG_WATCHDOG is not set
CONFIG_HEAP_MEM_POOL_SIZE=0
CONFIG_ROM_START_OFFSET=0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX