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