Adafruit Feather nrf52840 Express Power Usage

When using the adafruit feather nrf52840, the lowest I can seem to get power usage is around 400uA (including with the boards/nordic/poweroff sample).

This is my device overlay file:

&radio {
        zephyr,pm-device-runtime-auto;
};

&gpio0 {
        status = "okay";
        label = "GPIO_0";
        sense-edge-mask = <0xffffffff>;
};
&gpio1 {
        status = "okay";
        label = "GPIO_1";
        sense-edge-mask = <0xffffffff>;
};

/{
        zephyr,user {
                latch-en-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
                wp-gpios = < &gpio0 8 GPIO_ACTIVE_LOW>;
                hold-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
        };
        leds {
                compatible = "gpio-leds";
                blue_led: led_0 {
                        gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
                        label = "Blue LED (D7)";
                };
        };

};

&i2c1 {
        lis2dh@18 {
                compatible = "st,lis2dh";
                reg = <0x18>;
                label = "LIS2DH";
                irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
                disconnect-sdo-sa0-pull-up;
        };
};

&ieee802154 {
        status = "disabled";
};

&pinctrl {
    spi2_default: spi2_default {
                group1 {
                        psels = <NRF_PSEL(SPIM_SCK, 0, 21)>,
                                <NRF_PSEL(SPIM_MOSI, 0, 20)>,
                                <NRF_PSEL(SPIM_MISO, 0, 24)>;
                };
        };

        spi2_sleep: spi2_sleep {
                group1 {
                        psels = <NRF_PSEL(SPIM_SCK, 0, 21)>,
                                <NRF_PSEL(SPIM_MOSI, 0, 20)>,
                                <NRF_PSEL(SPIM_MISO, 0, 24)>;
                        low-power-enable;
                };
        };
};

&spi0 {
        status = "disabled";
};

&spi1 {
        status = "disabled";
};

&spi3 {
        status = "disabled";
};

&qspi {
        status = "disabled";
};

&rng {
        status = "disabled";
};
&temp {
        status = "disabled";
};
&usbd {
        status = "disabled";
};
&i2c0 {
        status = "disabled";
};
&uart0 {
        status = "disabled";
};
&wdt {
        status = "disabled";
};

And my prj.conf:

# General
CONFIG_HEAP_MEM_POOL_SIZE=65536

# power management & savings
#CONFIG_PM=y # should not work on nrf52840
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
CONFIG_PM_DEVICE_SYSTEM_MANAGED=y # only in zephyr 3.7.0

CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n

# some more low power
CONFIG_FLASH=n
CONFIG_SPI=y
CONFIG_I2C=y
CONFIG_USB_DEVICE_STACK=n
CONFIG_BOOT_BANNER=n
CONFIG_CONSOLE=n
CONFIG_DEBUG=n

# enable low freq clocks
#CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
#CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y #this will not be valid for all devices
# lower tick rate
#CONFIG_SYS_CLOCK_TICKS_PER_SEC=100

# Logging
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n


# Bluetooth 
CONFIG_BT=y

## Sensing
CONFIG_BT_OBSERVER=y
CONFIG_BT_SCAN=y
CONFIG_GPIO=y
CONFIG_ADC=y
CONFIG_ADC_NRFX_SAADC=y

## Broadcasting

CONFIG_BT_DEVICE_NAME="s_beacon"
CONFIG_BT_BROADCASTER=y
CONFIG_BT_PERIPHERAL=y

400uA still seems quite high to me. Is there anything I haven't thought of?

Parents
  • Hello,

    Any particular reason why you enabled SPI and I2C? Does the current go down if you disable them in your prj.conf?  Did you add them to your application, and used them before going to system off?

    And for debugging purposes, if you open an RTT Terminal, the power consumption will go up, but does the log say anything about any errors, or does it run as expected?

    Best regards,

    Edvin

Reply
  • Hello,

    Any particular reason why you enabled SPI and I2C? Does the current go down if you disable them in your prj.conf?  Did you add them to your application, and used them before going to system off?

    And for debugging purposes, if you open an RTT Terminal, the power consumption will go up, but does the log say anything about any errors, or does it run as expected?

    Best regards,

    Edvin

Children
  • Thanks for your response, Edvin!

    I enabled SPI and I2C because in some places I read that disabling drivers could potentially prevent peripherals from being put into a low-power state. With them enabled/disabled I minimal to no difference in power consumption so that's why they're still on. I currently do not use either of them.

    I have indeed noted that with the RTT terminal open it does increase power consumption, my ~400uA measurement is with the debugger disconnected & after a power cycle.

    The application runs as expected without any errors in the log.

  • Seppe Soete said:
    I enabled SPI and I2C because in some places I read that disabling drivers could potentially prevent peripherals from being put into a low-power state.

    The only way I can think of is on a DK, if you have an external flash chip that you don't tell to go to low power mode, but that should be handled automatically by the board files and NCS. Besides, it doesn't look like this board has an external flash chip. 

    Are you building for the adafruit board file, or are you using the nrf52840dk_nrf52840 board files?

    Best regards,

    Edvin

  • I'm building with -b adafruit_feather_nrf52840/nrf52840, so that should be for the adafruit board file and not the dk AFAIK

  • Can you zip and send me the application folder that you are currently testing on?

    And how do you measure the current? 

    Best regards,

    Edvin

  • I am measuring the current by putting a multimeter in series with the board (which is being powered via the BAT pin)

    I don't think I can send you the full application, but I get the same results with the sample in samples/boards/nordic/poweroff with my overlay and prj.conf (with CONFIG_POWEROFF=y added, CONFIG_SERIAL set to y and uart0 in my overlay re-enabled for compatibility, as the sample manually disables the serial port). So if possible I would like to use that sample as a basis for this.

Related