Power Optimization

Hello,

I have investigated Zephyr's power managemen API and have the a few questions regarding the nRF52840-DK.
The nRF52840-DK was powered externally by the N6705B DC power analyzer (supply voltage of 3V) and the nRF_ONLY switch was enabled.

  1. If the UART-0 peripheral is enabled using the configuration option and the devicetree (CONFIG_SERIAL=y; status = "okay") then I have called the
    pm_device_action_run(uart_dev, PM_DEVICE_ACTION_SUSPEND);

    function before the SoC transitions to the idle state to reduce the average sleep current consumption from approx. 500µA to 8µA.
    If this function is called should the application first perform prior checks (on-going transmission/reception, power state, etc.)?
  2. Can you confirm that there is no way to switch off the UART receiver to soley use the transmitter for logging purpose to reduce power consumption?
  3. I have read this blog from Nordic regarding the power optimization for the nRF52840 and I would like to know if 8µA (accounting for SoC variations) is reasonable in your opinion using only Zephyr functions and no vendor SoC specific functions (RAM retention, etc). Do you think 8µA offers still room for improvement?

  4. As far a I am aware, Zephyr uses the low frequency clock automatically when it is in a low power mode. Can you confirm this?
  5. May you explain why the I2C-Twim driver uses PM_DEVICE_RUNTIME feature and the UART does not (PM_DEVICE)? 
    When implementing a driver when should someone use the runtime version of the power mangement feauture? Does it depend on device usage or any hardware restriction?
  6. Can you share a sample or a scenario (block diagram) where an application should make use of the power domain feature of Zephyr? Since the Thingy:53 offers additional peripheral circuits may you share how to make use of this feature with that hardware and why.

If you could share your knowledge regarding this topic I am grateful.

Best regards,

ATla5

Parents Reply Children
  • I see that you edited the ticket after my reply, but I don't have access to a changelog. I'll await your reply before looking into this.

    BR,

    Edvin

  • Hello Edvin,

    I have performed the following measurements again

    1. Measurement #01

    • nRF52840-DK
      • SW6: DEFAULT
      • J2 USB power supply
    • PPK2
      • Ampere meter mode
    • SW
      • suspends SPI and UART-0 (other peripherals disabled) and calls k_sleep(K_FOREVER)
    • Results:
      • average current consumption is 3.52µA

    2. Measurement #02

    • nRF52840-DK
      • SW6: nRF_ONLY
      • J2 USB power supply
    • PPK2
      • Ampere meter mode
    • SW
      • suspends SPI and UART-0 (other peripherals disabled) and calls k_sleep(K_FOREVER)
    • Results:
      • average current consumption is 3.54 µA

    What do you think causes the approximately 4µA difference  between measuring with the

    • PPK2 (measured at P22)
    • N6705B (measured at P21)  

    Also, do  you have an answer for points 4 to 6 of the original question?


    Best regards,

    ATla5

  • Hello ATla5,

    ATla5 said:

    What do you think causes the approximately 4µA difference  between measuring with the

    Without being able to say exactly where, I believe what you are seeing is that some parts of the DK (such as the debugger) is being backpowered from the nRF when the DK is not powered separately. It will not be operational, but you will see some leak current, possibly through the UART pins. 

    • As far a I am aware, Zephyr uses the low frequency clock automatically when it is in a low power mode. Can you confirm this?

    Yes. It uses the LFCLK for timekeeping when it is sleeping.

    • May you explain why the I2C-Twim driver uses PM_DEVICE_RUNTIME feature and the UART does not (PM_DEVICE)? 
      When implementing a driver when should someone use the runtime version of the power mangement feauture? Does it depend on device usage or any hardware restriction?

    I don't know this. Perhaps because UART is the default backend for all printk() and logging (log module, such as LOG_INF()), which is why it is set up differently. 

    Can you share a sample or a scenario (block diagram) where an application should make use of the power domain feature of Zephyr? Since the Thingy:53 offers additional peripheral circuits may you share how to make use of this feature with that hardware and why.

    I am not sure I understand this question. Are you asking when you should power down peripherals? It depends. Some peripherals draw more current than others. The UART is an example of a peripheral that draws more power, because it will keep the HFCLK running (because you don't know when the other device will transmit something, so it needs to be ready (it's asynchronous). This is not the case with most other serial protocols, such as SPI. In this case, the slave can wake on the CS pin, and the master will be in control of the events, so it doesn't need to keep the HFCLK when not in use. 

    Best regards,

    Edvin

Related