Hi @PaoloZigoni
I don’t believe the battery ADC sample is power optimized. You may want to take a look at the active_sleep
sample for some insights. Also, the console UART receiver uses a significant amount of current. Turning off the console or disabling RX in your overlay would help.
Here is a .overlay
snippet of disabling rx:
/* Disabling uart rx pin to get low power */
&uart0 {
compatible = "nordic,nrf-uart";
disable-rx;
};
Here’s the code for turning off the console:
int setup_uart()
{
static const struct device *const console_dev =
DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
/* Disable console UART */
int err = pm_device_action_run(console_dev, PM_DEVICE_ACTION_SUSPEND);
if (err < 0)
{
printk("Unable to suspend console UART. (err: %d)\n", err);
return err;
}
/* Turn off to save power */
NRF_CLOCK->TASKS_HFCLKSTOP = 1;
return 0;
}
Also making sure you have GPIOs set to sense
mode and the LIS2DH pull-up is disabled will also help:
&gpio0 {
sense-edge-mask = <0xffff>;
};
&i2c1 {
lis2dh@18 {
compatible = "st,lis2dh";
reg = <0x18>;
disconnect-sdo-sa0-pull-up;
};
};