nrf5340 spi power consumption

I am using the nrf5340 on a nrf7002fk dev kit. I am interested in low power operation so I am measuring the power consumed.

I am running a simple app:

int main(void)
{
while(1) { k_msleep(1000); }

return 0;
}

when I compile with this simple prj.conf file I measure 3uA current consumption

CONFIG_SERIAL=n
CONFIG_PM=y
CONFIG_PM_DEVICE=y

however when add "CONFIG_SPI=y" to the prj.conf file the current consumption jumps to 130 uA.

Is it possible to reduce this power consumption by suspending the SPI logic when it is not being used ?

Parents Reply
  • Thanks Abhijith that was a useful suggestion.

    configuring the gpio0 pin11 (chip select for mx25r64) as an input reduced the current down to 3 uA.

    this was achieved with this overlay:

    /{
    inputs {
    compatible = "gpio-keys";
    mx_cs: mx_cs {
    gpios = <&gpio0 11 (GPIO_ACTIVE_LOW)>;
    label = "mx cs";
    };

    };
    };

    and this code:

    static const struct gpio_dt_spec mx_cs = GPIO_DT_SPEC_GET(DT_NODELABEL(mx_cs), gpios);

    gpio_pin_configure_dt(&mx_cs, GPIO_INPUT);

    changing the sck, mosi or miso pins did not make any difference to the current

Children
  • The pin that is drawing the current is p0.0b which is the chip select line for the mx25r64 external flash on the nrf7002dk board. Configuring this pin as an input is useful for tracking down the problem. However it is problematic for a long term solution. Is there a way to configure zephyr to put this pin into low power mode using the existing drivers ?

Related