nrf91 SystemOff switch off periphicals of SoC

Hi,

i'm puzzled with all these power and powermanagement options discribed in nrf91 detailed pdf on one hand side and on the other side the lack of description how to use that with nrf connect sdk 2.5.x (and Zehpyr OS). Is there any discription on how to combine both appart from asking question in devzone?
So which method (Which header file?) do i have to call to manipulate certain address, regster and flags to access all of that options, which are not yet covered by nrf sdk ecxamples or zephy examples or basic driver implementations?

I'm not looking for different power savings for LTE modem here, that would be a huge topic on its own. Modem is unused here.

Task #1: let nrf91 save most possible power while be able to wake up/reset on gpio source, f.e. a button press.
Task #2: same as Task #1 this time with portions of data retention.
Task #3: Add more wake up src, f.e watchdog or rtc

In order to start with task #1 I've found plenty questions/examples, but all of them are only slightly related. F.e. (https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/boards/nrf/system_off/README.rst) Obvoiusly the data retention part needs to be modified for nrf91, so i start without retention.

In contrast to use thread sleep and interrupts there is a big measureable effect of using systemOff and wake up for a switch/button to be closed. The numbers are way higher then the promised  ~1 µA possible according to documentation.

That above example doesn't know about modem. So i tried to initilise the modem and to power off modem by

include <modem/nrf_modem_lib.h>
....
	int nrflib = nrf_modem_lib_init();

	int err = nrf_modem_lib_shutdown();

which reduces the current further, but still this seems not to be enough..

Conclusion to me is, a non-initilised modem will drain power. This is not mentioned in documentation, but not uncommon.

The above example shows how to power off zephyr_console. So i guess i have to deactivate things which are implictly activated by zephyr or by board definition.

What else do i have to power down before executing sys_poweroff?

sys_poweroff();

Since there is power retention to GPIO according to documentation (f.e. a LED set to on would stay on), I can imagine to set unsued GPIO pins to a certain state, what would be the best? Loop through all pins 0..31 and set it to direction input and state 0?

What about IC2, will it be part of that system_off procedure?

Best regards

Stefan

Parents Reply Children
  • Hi,
    thanks for pointing that getting started blog post. I read it, and it has few more basic information about current measurements and it is indicating to switch off modem (even if you not used it at all). Since i already looked into https://docs.nordicsemi.com/bundle/ug_nrf91_dk/page/UG/nrf91_DK/hw_measure_current.html . It would be great to see a link to addtional guides over here: https://docs.nordicsemi.com/category/nrf-91-series# Guidelines

    Thanks for
    NRF_POWER->TASKS_LOWPWR = 1
    i placed it as first line in main method. Seem to have an effect.

    Following the path to sources of "NRF_POWER" in vsCode, I see that there are more things i can enable/disable by one of the other structure there.

    Question: Since it is not mention directly in most sample 'main.c' files, the header file describing NRF_POWER is included by means of chosing the board, f.e.  "nrf9160dk_nrf9160_ns"?

    I see that my task #3 is not feasable using only internal RTC or watchdog of 9160 sip. It would need external IC for that.

    Question: What would be the memory layout if i want to use data-retention in my task #2?

  • Hello,

    '' Since it is not mention directly in most sample 'main.c' files, the header file describing NRF_POWER is included by means of chosing the board, f.e.  "nrf9160dk_nrf9160_ns"?''

    NRF_POWER->TASKS_LOWPWR is the default option (ie: reset value), which means that the 16M clock will be stopped when not needed. This will cause your wakeup time to be higher, compared to when using CONSTLAT. CONSTLAT will keep the 16M running while in sleep, which gives you a consistent wakeup time, but higher current consumption.

    You can build for both secure and non-secured board. This #include <hal/nrf_power.h> header file will work for this option.

    ''I see that my task #3 is not feasable using only internal RTC or watchdog of 9160 sip. It would need external IC for that.''

    It depends on your application. Can you show your application? For low power mode, you can start with UDP sample.

Related