Ultra Low power Sleepy End Device with nRF52840 and Zephyr

1,169 views
Skip to first unread message

wass

unread,
Jun 5, 2021, 8:09:53 AM6/5/21
to openthread-users
The question
is it possible to run openthread sleepy end device on nRF52840 with ultra low power ~ 3 to 10 uA ?
The detailed explanation :
I'm working on a coin cell battery Thread Sensor Tag where I would like to achieve low power sleep between sensors broadacst
This is the project page
https://www.homesmartmesh.com/docs/microcontrollers/nrf52/thread_sensortag/

More specifically, this is the openthread UDP broadcast application
https://www.homesmartmesh.com/docs/microcontrollers/nrf52/thread_sensortag/#tag_sensors_broadcast

This is the github link of the sample where I isolate the openthread udp broadcast
https://github.com/HomeSmartMesh/sdk-hsm-sensortag/tree/main/samples/tag_openthread_udp

In zephyr, when I call `k_sleep(K_MSEC(3000));` the nRF52 goes in ~ 3 uA low power sleep unless a peripheral is enabled.
Now when using openthread, the radio peripheral stays on, I tried 'otThreadSetEnabled(openthread,false);' and 'net_if_down(net);' as you can see here https://github.com/HomeSmartMesh/sdk-hsm-sensortag/blob/ec3d0518d4963f368c3dcbf1f4804e4b18fd1f42/samples/tag_openthread_udp/src/main.c#L79
but they did not switch off the radio peripheral, to force switching it off, I tried using `nrf_radio_power_set(NRF_RADIO,false);` I succeeded, but then the issue is that the openthread does not recover on next cycle not even with 

            nrf_radio_power_set(NRF_RADIO,true);
            net_if_up(net);
            otThreadSetEnabled(openthread,true);
as in here https://github.com/HomeSmartMesh/sdk-hsm-sensortag/blob/ec3d0518d4963f368c3dcbf1f4804e4b18fd1f42/samples/tag_openthread_udp/src/main.c#L71

This is my investigation on possible API but they're either not exposed to the app

otSysDeinit -> nrf5RadioDeinit -> nrf_802154_deinit -> nrf_802154_core_deinit -> nrf_802154_trx_disable -> nrf_radio_power_set -> 
* otSysDeinit : only in platoform includes
* nrf5RadioDeinit : not compiled for nRF52840
* nrf_802154_deinit : calls nrf_802154_core_deinit
* nrf_802154_core_deinit : conditional call for nrf_802154_trx_disable();
* nrf_802154_init : does not call nrf_802154_trx_enable
* nrf_802154_trx_disable : on nrf_802154_trx.h which is not exposed

Back to the question, is it possible to run openthread sleepy end device on nRF52840 with ultra low power ~ 3 to 10 uA ? If so, is it configurable or how can I achieve that.

wass

unread,
Jun 5, 2021, 8:14:27 AM6/5/21
to openthread-users
In this shared drive, I have wireshark pcap SEGGER SystemView and Nordik PPK-II power profile
https://drive.google.com/drive/folders/1_IyY6Q2DPyu3kH7gYeUbmENTTHXUy1Oi

Jonathan Hui

unread,
Jun 5, 2021, 11:30:26 AM6/5/21
to wass, Duda, Lukasz, Montoya, Eduardo, openthread-users
Yes, OpenThread on nRF52840 should support ultra low power operation. Eve products leverage the nRF52840 and the Eve Weather operates on a CR2450 battery.

+Duda, Lukasz +Montoya, Eduardo may be able to provide some guidance on achieving low power with Zephyr and OpenThread on nRF52840.

--
Jonathan Hui


On Sat, Jun 5, 2021 at 5:14 AM wass <wassim...@gmail.com> wrote:
In this shared drive, I have wireshark pcap SEGGER SystemView and Nordik PPK-II power profile
https://drive.google.com/drive/folders/1_IyY6Q2DPyu3kH7gYeUbmENTTHXUy1Oi

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/b32f0441-a023-4ba9-a533-2e56780f8f28n%40googlegroups.com.

wass

unread,
Jun 6, 2021, 6:32:31 AM6/6/21
to openthread-users
Thanks for the confirmation that it works and someone already using it.
I'm progressing on this, I connected the DUT to a cli and the child table shows RxOnWhenIdle 1, FullThreadDevice 1, FullNetworkData 1.
Now I'll be searching what caused that and how to disable them, but this already makes the problem much simpler and manageable on the user side.

I would have expected the config MTD to disable them automatically, but it didn't, I checked that MTD and MTD_SED are well set in the build/zephyr/.config

2021-06-06_12h25_10.png
Message has been deleted

wass

unread,
Jun 6, 2021, 1:14:32 PM6/6/21
to openthread-users
I managed !!!! It works ! 3.2 uA
The fix ? nrfjprog --eraseall 
I tried everything, but the config was being overwritten with the stored settings, when I set the config forcefully with API call, it got working, and then also without the API call which would be the same as after an eraseall.

Jonathan Hui

unread,
Jun 7, 2021, 1:18:55 AM6/7/21
to wass, openthread-users
Great to hear that you have low power operation working. Thanks for the update.

--
Jonathan Hui



Reply all
Reply to author
Forward
0 new messages