SPI HCI increasing low power consumption

Hi Nordic,

In my project, I have a NRF9160 and a NRF52832 with a ble host/controller stack over SPI HCI on NCS v2.5.2

As soon as I activate the HCI SPI in my project, the sleep current comsumption increase from ~26µA to ~68µA (delta is 42µA).

Is it possible to use HCI SPI without increasing current comsumption that much?

Parents Reply Children
  • Hello, on both sides, the pins are configured with low-power activation on pinctrl-1, so master and slave should be in high z. And there is no physical pullup or pulldown on these signals.

    On NRF52 side : 

    	spi0_default: spi0_default {
    		group1 {
    			psels = <NRF_PSEL(SPIS_SCK, 0, 29)>,
    			        <NRF_PSEL(SPIS_MISO, 0, 27)>,
    			        <NRF_PSEL(SPIS_MOSI, 0, 28)>,
    			        <NRF_PSEL(SPIS_CSN, 0, 30)>;
    		};
    	};
    	spi0_sleep: spi0_sleep {
    		group1 {
    			psels = <NRF_PSEL(SPIS_SCK, 0, 29)>,
    			        <NRF_PSEL(SPIS_MISO, 0, 27)>,
    			        <NRF_PSEL(SPIS_MOSI, 0, 28)>,
    			        <NRF_PSEL(SPIS_CSN, 0, 30)>;
    			low-power-enable;
    		};
    	};

    &spi0 {
    	compatible = "nordic,nrf-spis";
    	status = "okay";
    	def-char = <0x00>;
    	pinctrl-0 = <&spi0_default>;
    	pinctrl-1 = <&spi0_sleep>;
    	pinctrl-names = "default", "sleep";
    	cs-gpios = <&gpio0 30 0>;
    	bt-hci@0 {
    		compatible = "zephyr,bt-hci-spi-slave";
    		reg = <0>;
    		irq-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH)>;
    	};
    };
    

    On NRF91 side:

    	spi0_default: spi0_default {
    		group1 {
    			psels = <NRF_PSEL(SPIM_SCK,  0,  2)>,
    			        <NRF_PSEL(SPIM_MISO, 0,  0)>,
    			        <NRF_PSEL(SPIM_MOSI, 0,  1)>;
    		};
    	};
    	spi0_sleep: spi0_sleep {
    		group1 {
    			psels = <NRF_PSEL(SPIM_SCK,  0,  2)>,
    			        <NRF_PSEL(SPIM_MISO, 0,  0)>,
    			        <NRF_PSEL(SPIM_MOSI, 0,  1)>;
    			low-power-enable;
    		};
    	};
    

    &spi0 {
    	compatible = "nordic,nrf-spim";
    	status = "okay";
    	pinctrl-0 = <&spi0_default>;
    	pinctrl-1 = <&spi0_sleep>;
    	pinctrl-names = "default", "sleep";
    	cs-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>,
    			   <&gpio0 3 GPIO_ACTIVE_LOW>,
    			   <&gpio0 31 GPIO_ACTIVE_LOW>;
    
    	accelero: spi0-accelero@0 {
    		reg = <0>;
    		status = "okay";
    		compatible = "st,lis2dh";
    		spi-max-frequency = <DT_FREQ_M(8)>;
    		irq-gpios = <&gpio0 7 0>, <&gpio0 5 0>;
    	};
    	baro: spi0-baro@1 {
    		compatible = "st,lps22hh";
    		status = "okay";
    		reg = <1>;
    		spi-max-frequency = <DT_FREQ_M(8)>;
    		odr = <1>; // LPS22HH_DT_ODR_1HZ
    	};
    	bt-hci@2 {
    		compatible = "zephyr,bt-hci-spi";
    		reg = <2>;
    		irq-gpios = <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
    		reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
    		spi-max-frequency = <DT_FREQ_M(1)>;
    	};
    };
    

    How can I check if there is an issue there ?

  • Hi,

    I do not think the sleep configuration for the SPI pins on the 91 side matter, as pm_device_action_run() is not used. So if you check the GPIO.PIN_CNF register for the MISO pin with a debugger I expect you will see that it is always configured as an input. It could also be interesting to test if this is the problem by putting a weak (high resistance value) pull-up resisotor on the MISO pin and see if that affects the sleep power consumption.

  • Hi,

    Indeed, the MISO pin remains configured as input.

    Putting a pull-up (~800k) on MISO does not affect idle power consumption.

    I wonder if this high current could come from the interrupt on the IRQ pin that remains configured?

    I see in the datasheet that it's supposed to consume 17.8µA at 3.7V. Does this current increase with a VDD_GPIO at 3V?

  • Hi,

    I am sorry for the late reply.

    The typical current consumption with wake onn GPIOTE is 17.8 µA as you fond. This is regardless of the VDD_GPIO voltage.

Related