nRF7002dk nrf5340 Power Consumption

We are currently testing the nRF7002dk with Zephyr 2.3.0. We have a application that sets up BLE and then sleeps forever in the main thread.

On our development board, we have shorted SB17 to allow us to measure the power consumed by the nrf5340 using P22.

 If I disable logging and other peripherals (SPI, I2C), I have found that if I compile and run the code with 

CONFIG_WIFI=n
CONFIG_WIFI_NRF700X=n
The idle power consumption between BLE advertisements is around 10uA. If I change the options in my prj.conf to
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y
The idle power consumption measured at P22 between BLE advertisements increases to 1.7mA. 
To reproduce the issue, build the peripheral_lbs sample for the nrf7002dk_nrf5340_cpuapp board. The idle power consumption will be ~10uA. Then add 
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y
CONFIG_NETWORKING=y
CONFIG_NEWLIB_LIBC=y
to prj.conf and the idle power consumption will be almost 2mA.
 
How do I achieve <1mA combined idle power consumption with the nRF7002dk?
Parents
  • Hi,

    You can enable low power mode for QSPI by setting CONFIG_NRF700X_QSPI_LOW_POWER=y. This should reduce the consumption significantly. 

    Best regards,
    Marte

  • Hello,

    I have added CONFIG_NRF700X_QSPI_LOW_POWER=y to prj.conf for the peripheral_lbs sample and did not see any reduction in power consumption.

  • Hi,

    You are comparing two different samples, so there might be other parts increasing the power consumption as well. What do you see if you compare the Peripheral LBS sample with Peripheral LBS sample where you have enabled Wi-Fi and nRF7002 and also shutdown Wi-Fi?

    bcornell said:
    Why does the nrf5340 consume so much power when the nrf7002 wifi support is compiled in and disconnected as compared to compiled out?

    How are you disconnecting the Wi-Fi?

    Best regards,
    Marte

  • What do you see if you compare the Peripheral LBS sample with Peripheral LBS sample where you have enabled Wi-Fi and nRF7002 and also shutdown Wi-Fi?

    I do not understand what you are asking. My understanding is that the "wifi/sta" sample is the most basic example that demonstrates working WiFi. In order to add working WiFi to the Peripheral LBS sample, wouldn't I just be copying all the WiFi code from the WIFi/STA sample to the Peripheral LBS sample? The resulting code would be exactly the same. 

    How are you disconnecting the Wi-Fi?

    I have copied the wifi_disconnect function from the sr_coex sample:

    static int wifi_disconnect(void)
    {
    	struct net_if *iface = net_if_get_default();
    	int status;
    
    	context.disconnect_requested = true;
    
    	status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, iface, NULL, 0);
    
    	if (status) {
    		context.disconnect_requested = false;
    
    		if (status == -EALREADY) {
    			LOG_INF("Already disconnected");
    		} else {
    			LOG_ERR("Disconnect request failed");
    			return -ENOEXEC;
    		}
    	} else {
    		LOG_INF("Disconnect requested");
    	}
    
    	return 0;
    }

    I call this function after successful connection, before sleeping the main thread.

  • Hi,

    bcornell said:
    I have copied the wifi_disconnect function from the sr_coex sample:

    With this you are disconnecting from the Wi-Fi network, but you are not actually shutting down the Wi-Fi interface. You can look at the code that runs when you shut down the interface with, for example, net iface down 1 in net_if_down() here: https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1/subsys/net/ip/net_if.c#L4229.

    Best regards,
    Marte

  • Hello,

    Today, I started from the wifi/sta sample in the latest main branch. I disabled the console and serial logging. In the code, immediately following a successful connection, I added a call to the wifi_disconnect function that I posted above as well as a call to the net_if_down function as you recommended. I did not enable any Bluetooth functions for this test.

    After connecting, disconnecting and shutting down the interface I see 165uA of current draw at 1.8v from the nrf5340.

    At this point the nrf5340 should be completely idle, the code "running" in the main loop is a k_sleep(K_FOREVER). 

    In non-WiFi tests of the nrf5340, the idle power consumption is significantly lower. Why is it so high when WiFi support is compiled in? Is there anything I can manually turn off to reduce power consumption which is turned on by the WiFi driver?

  • I was able to determine what causes the increased power consumption using Ozone and the lbs_peripheral sample with and without the WiFi constants included in the build.

    The nrf7002 driver configures the following registers:

    NRF_GPIOTE0_S->INTENSET
    NRF_GPIOTE0_S->INTENCLR
    NRF_GPIOTE0_S->CONFIG[7]

    If I read them without the WiFi driver compiled in, their values are:

    NRF_GPIOTE0_S->INTENSET = 0x80000000;
    NRF_GPIOTE0_S->INTENCLR = 0x80000080;
    NRF_GPIOTE0_S->CONFIG[7] = 0x00000000; 

    If I enable WiFi support, and do nothing else in the lbs_peripheral sample, the idle current draw is ~165uA. If I set the registers as specified above, the idle current draw is ~40mA, which is what I measure when not enabling WiFi support.

    Obviously these registers need set when using WiFi, but I suspect the nrf7002 driver should reset these registers when the interface is shut down.

Reply
  • I was able to determine what causes the increased power consumption using Ozone and the lbs_peripheral sample with and without the WiFi constants included in the build.

    The nrf7002 driver configures the following registers:

    NRF_GPIOTE0_S->INTENSET
    NRF_GPIOTE0_S->INTENCLR
    NRF_GPIOTE0_S->CONFIG[7]

    If I read them without the WiFi driver compiled in, their values are:

    NRF_GPIOTE0_S->INTENSET = 0x80000000;
    NRF_GPIOTE0_S->INTENCLR = 0x80000080;
    NRF_GPIOTE0_S->CONFIG[7] = 0x00000000; 

    If I enable WiFi support, and do nothing else in the lbs_peripheral sample, the idle current draw is ~165uA. If I set the registers as specified above, the idle current draw is ~40mA, which is what I measure when not enabling WiFi support.

    Obviously these registers need set when using WiFi, but I suspect the nrf7002 driver should reset these registers when the interface is shut down.

Children
Related