This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 Sleep Mode

Hi,

I'm wondering if there are any samples that show how to use sleep mode on the nRF9160. Not quite sure where to start to look for resources on this. Any documentation you can point me to?

- Jack

  • Hi Jack,

    Sorry for the delayed response. There is some documentation here which explains this. Also, this devzone case could be helpful. Basically, you will need to go to the ncs_0_3_0\nrf\samples\nrf9160\asset_tracker path, open the prj.conf file & change CONFIG_POWER_OPTIMIZATION_ENABLE to CONFIG_POWER_OPTIMIZATION_ENABLE=y. Remember to save this file too.Then, recompile the asset_tracker example & flash to the kit via Segger Embedded Studio. You may need to recompile & flash the secure_boot example FW too. You should then be able to connect to the nRF cloud, make sure Switch 2 is in the On position & then press one of the buttons. This will then call the button_handler, which should then set eDRX mode on.

    I have added some logging to the asset tracker example below, which should be able to help you see if eDRX mode is on or not. If default mode is set, you will receive data on the nRF cloud. However if eDRX mode is set, the GPS messages will be sent every 2 minutes instead. Logging is done via UART. You can use Tera Term for example. Make sure to open up a terminal for each of the three COM ports, change the baud rate to 115200 & then press the reset button on the nRF91 DK.

    To make it easier for yourself to test, I have uploaded these two examples below using the Nordic Connect SDK v0.3.0 tag (the same SDK as the one you download from the nRF Getting Started Guide).

    secure_boot.hex

    asset_tracker_power_optimization.hex

    You can program via this command: nrfjprog --program secure_boot.hex --verify --family nrf91

    The same command can be used for the other hex, just replace secure_boot.hex with asset_tracker_power_optimization.hex.

    Kind Regards,

    Bjørn Kvaale

  • Thanks for the response!

    I'm actually not so concerned with things like eDRX. Our application sends large amounts of data in a few short bursts. We might only make a total of 10 requests to the cloud per day. The rest of the time the nRF9160 is not in use so we disconnect from LTE. I'm more looking for how to put the microcontroller itself into sleep/low power mode.

    Our device has another processor on it that serves as the main microcontroller which controls the nRF9160. So we do have a gpio pin connected between the two where the main micro could send a hardware interrupt to wake up the nRF9160.

    - Jack

  • Sorry for the delayed response. I have been on a business trip. If you want to be in the lowest power mode, you can take a look at the system off mode (see objective product specification). You can then wake up the device via a detect signal on the GPIO peripheral on the nRF91. This will then reset the nRF91 application FW. Before you set the nRF91 into system off mode, you will need to make sure that the modem is turned off (AT+CFUN=0 command). You can take a look at the at_commands pdf for more info. Hope that helps!

  • Is idle thread being triggered when going into edrx or psm mode. Is there a very big difference in power consumption between PSM and system off mode (waiting for interrupt)?

  • Yes, both the edrx & psm mode will make you go into system on low power (aka system on idle) when they are in sleep. You can find the modem current consumption in the Objective Product Specification here:

    The system off current can also be found in the same document:

    However, beware that going into system off mode requires you to turn the modem off. When turning the modem back on & reconnecting to the base station, you will need to register as a new device. This process can take quite a bit of time & consume a lot of current too, which may make it a better idea to stay in PSM or eDRX mode instead.

Related