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.

  • Hello,

    I recently setup a development environment using the main branch instead of the released 2.4.0 version.

    By adding a disconnect before the sleep in the main loop of the "wifi/sta" example I was able to achieve ~275uA idle power draw.

    I was not able to achieve low idle current draw with the "peripheral_lbs" example code from the main branch. I disabled logging in the defconfig files and in the board dts files, exactly as I had done in version 2.4.0 and only managed to get the idle power consumption down to ~1.3mA.

    Do you have any documentation which lists all of the configuration/board files that need modified to ensure minimum power draw?

    Can you provide an estimate as to when nRF Connect SDK 2.5.0 will be released? 

  • Hi,

    We do not have documentation listing all configurations, but we have General power optimization recommendations and Developing with nRF70 Series - Operating in power save modes.

    bcornell said:
    Can you provide an estimate as to when nRF Connect SDK 2.5.0 will be released? 

    For questions about timeline and future releases, please contact our regional sales manager.

    Best regards,
    Marte

  • Hello,

    I did some further testing using the main branch instead of the released 2.4.0 version.

    I am powering the nrf5340 at 1.8v, separately from the nrf7002.

    I am using a modified copy of the "wifi/sta" sample which disconnects from WiFi and sleeps the main thread after successful connection. It also contains large sections of the "peripheral_lbs" code to enable BLE advertising. When I build and run this code, the nrf5340 consumes about ~160uA. This is substantially better than my original test with the released version of the SDK.

    On the same development board, if I build and run the "peripheral_lbs" code the nrf5340 only consumes about ~30uA.

    Both applications are set with a significantly longer advertising interval than default to reduce power consumption. I have also disabled all logging.

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

  • 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.

Reply
  • 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.

Children
  • 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.

  • Hi,

    I have forwarded this to the developers, and I am waiting on a response from them. I will update you as soon as I know  more.

    Best regards,
    Marte

  • Hi,

    The nRF7002 does not directly configure NRF_GPIOTE0_S, but it might be an indirect dependency.

    Can you try with this https://github.com/nrfconnect/sdk-nrf/pull/12744? This disconnects the Wi-Fi GPIOs when the Wi-Fi interface is shut down.

    Best regards,
    Marte

Related