zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.48k stars 6.41k forks source link

nordic nrf52/nrf53 and missing cpu-power-states (dts) for automatic device PM control #41382

Closed invoxiaamo closed 2 years ago

invoxiaamo commented 2 years ago

Hi all.

I'm playing with nrf52 and nrf53 DK board in order to evaluate the power consumption.

Well... first, I would expect a complete ble example that achieve THIS low consumption (few uA) without hacking the prj.conf (to disable UART mainly) or hacking main.c (to do the same manually UART disabling), so we can all start from a good example.

But, more important, I don't understand why automatic device suspend is not supported at first.

I did some test:

With those changes, zephyr properly request devices PM suspend before going in idle and consume as few as expected (few uA with a 1s advertising). And serial log , printk & co are still working as expected once we exit idle.

Is there something I miss in nrf52 support that prevent this automatic device PM ? or is it just that nordic didn't finalize the support yet ?

Regards, Arnaud

github-actions[bot] commented 2 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

dakejahl commented 2 years ago

I've been struggling with this on the nrf52840dk for months. I have not been able to get current consumption below 270uA. I've tried everything with no luck. Can you share with me your code you used to successfully achieve the few uA? I added your above snippets but I am still seeing 270uA. If I got into System OFF mode I do indeed see a very low current oonsumption, so I know at least that works, but I'd like to stay in System ON with all of the peripherals disabled.