NRF9160 Deep Sleep Power Consumption Help

Hello,

I am using mfw1.3.0 and NCS 1.7.0 developing an application on a custom board implementing the NRF9160 and NRF52820 (The 52820 is put into very low power using nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF);). 

There is a state in the application where we would like the device to go into a deep sleep mode where the device ideally consumes <200uA of current (Lower is even better). The device is awoken by a state change on a configured Sense pin. 

In the current stage of development, everything is working decently well with the modem powering off and then the device being set to deep sleep. The issue is that we are seeing around 900uA of average current draw (It seems to be fluctuating between about 500uA and 1200uA). I know some of this current is due to on-board peripheral parts drawing a bit of power but it really should only be accounting for around 150uA or so and is something we are working on separately.

I have read pretty much every post out there about low power mode on the NRF9160 and it seems that the first thing to check is if CONFIG_SERIAL is disabled in both the application config as well as the SPM config. Our application will be using serial but we want to shut it down before going into deepsleep with this function: 

pm_device_state_set(uart_0_dev, PM_DEVICE_STATE_OFF);
This behavior is found in the serial_lte_modem example. The problem is that using this line to disable uart seems to have no effect on current draw.
I also tried just not using serial at all in the application and ensuring that CONFIG_SERIAL is not set in either the application config or SPM config. This also did not have any affect which was surprising to me and leads me to believe that there is another peripheral that we have enabled which is causing the same current draw that having the serial peripheral does.
My questions that can't be answered by other tickets are:
1. What is the real reason that turning serial off saves power in deep sleep? From looking at other tickets I think that the root cause of the power draw is keeping the HF clock active in deep sleep which can draw a decent amount of current.
2. Are there other peripherals that could be causing the same issue for us still? We use I2C, SPI, UART, PWM, and GPIO in the application.
3. What is the best way to have serial enabled in the application but turn the peripheral off before sleeping in NCS1.7.0 and mfw1.3.0?
Also, we have tried with mfw1.3.1 which supposedly has a fix for a deep sleep power issue but that has no affect. 
Thanks!
Tyler
Parents
  • Hi Stian,

    Thank you for the thorough response. It is very helpful. A couple of questions / clarification regarding your response:

    1. You mention that in order to dynamically turn on and off UART we should be using the pm_device_state_set() function. I am still a bit confused about the exact states to use inside of the application. My understanding from your response is that we should first use pm_device_state_set(console, PM_DEVICE_STATE_OFF, NULL, NULL); to disable UART in the application until it is needed. Next to turn it back on we should change the state to: PM_DEVICE_STATE_ACTIVE. Lastly, in order to disable UART before sleeping we should change the state to: PM_DEVICE_STATE_SUSPENDED. Is this correct? I am a bit confused why we should use both the OFF state as well as the SUSPENDED state and why not just one or the other. 

    2. How much current consumption savings should we expect to see after disabling UART and therefore stopping use of the HF clock during deep sleep? Right now we are seeing a periodic current draw where there is about 500-600 uA of draw every 50ms or so. Trying to track that down and see if it is in fact the HF clock. 

    Thank you again for all of the help.

Reply
  • Hi Stian,

    Thank you for the thorough response. It is very helpful. A couple of questions / clarification regarding your response:

    1. You mention that in order to dynamically turn on and off UART we should be using the pm_device_state_set() function. I am still a bit confused about the exact states to use inside of the application. My understanding from your response is that we should first use pm_device_state_set(console, PM_DEVICE_STATE_OFF, NULL, NULL); to disable UART in the application until it is needed. Next to turn it back on we should change the state to: PM_DEVICE_STATE_ACTIVE. Lastly, in order to disable UART before sleeping we should change the state to: PM_DEVICE_STATE_SUSPENDED. Is this correct? I am a bit confused why we should use both the OFF state as well as the SUSPENDED state and why not just one or the other. 

    2. How much current consumption savings should we expect to see after disabling UART and therefore stopping use of the HF clock during deep sleep? Right now we are seeing a periodic current draw where there is about 500-600 uA of draw every 50ms or so. Trying to track that down and see if it is in fact the HF clock. 

    Thank you again for all of the help.

Children
  • Hello

    1. In the UART driver *_LOW_POWER, *_OFF and *_SUSPEND leads to the same code, which is disabling the UART:

    https://github.com/nrfconnect/sdk-zephyr/blob/18e072b03270436fcd58312217fa8f362abb5ccd/drivers/serial/uart_nrfx_uarte.c#L1871

    In the zephyr documentation they use the definitions "Device context is preserved/lost/may be lost, etc..". How this exactly translates in the peripheral hardware/low level driver depends on the type of hardware. In the case of the UART, it's either enabled or disabled. It would be nice to describe how this should be interpreted in the respective peripheral driver documentations. I will create a request for this.

    2. You should expect to see about 600 uA less current consumption. If there is a periodic current draw every 50 ms I don't think it's the HF clock. Are you able to post any plots? If the current is in the <10uA range between the spikes and the current goes up to 500-600 uA every 50 ms I'm thinking that this is the regulator in refresh mode (burst mode). The regulator will always draw current in bursts during idle, and the average current including the bursts is what is relevant.

Related