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

PSM on nRF9160 custom board

Hi,

I'm using latest master branch of nRF Connect SDK and pre-released modem FW 1.1.2 which is including ANT->AUX switching. I'm developing a firmware for a custom board that has nRF9160 SiP. I'm from Finland and currently using LTE-M SIM cards provided by DNA.

EDIT: The firmware is based on Asset Tracker application and here is some other stuff I have implemented:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/asset_tracker/README.html
- the debug console is modified version of the Serial LTE Modem sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/serial_lte_modem/README.html
- FOTA is from HTTP application update sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/http_application_update/README.html
- NVS (non-volatile storage) is from Zephyr's NVS sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/nvs/README.html
- ADC is from Rallare's ADC sample
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/adc
- data sending to the server is from HTTPS Client sample with help of Rallare's HTTP and HTTPS simple samples
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/http
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/https_simple

So, for now, I'm trying to get PSM (Power Saving Mode) to use but I'm actually not sure how it should really work. We have a combined antenna for LTE and GPS so we can't use them at the same time. It's been planned that our device would be 1 week in PSM but it could be sending data to our server if the device has not moved lately enough (triggered by accelerometer).

Currently I'm using lte_lc_psm_req(true) after lte_lc_connect() has been done successfully.

  1. First of all, do I even need the PSM because "is for receive "polling" only, you can send data at any time."? We are not receiving any other stuff than responses when data has been sent to the server. I think the only benefit would be that it would be already registered to network when the device is waking up and sending data again.
  2. Should I power off (or send to offline) the modem after entering PSM? Or should I let the modem be on, is the modem automatically "sleeping" when PSM is enabled?
  3. Do I have to request PSM every time I connect to LTE or just in LTE LC initialization or in first connection?
  4. Does the PSM timer start again if I send data to our server?
  5. If I set the CONFIG_LTE_PSM_REQ_RPTAU to "00010100" which is 200min/12000s (EDIT: seems to be that this values is the lowest possible) why does it set PTAU to 12000-15600? Does it depend on operator or is there some bug on your LTE LC driver? The get function (lte_lc_psm_get(&tau, &active_time);) gives this kind of log (and yes, I have set the active time to 0):
    [00:01:26.414,611] [1B][0m<dbg> lte_lc.lte_lc_psm_get: TAU: 14400 sec, active time: 0 sec
  6. How to get a certain information that the device is in PSM? Is there any other ways than just measuring the current or in software using lte_lc_psm_get()? How should the device be tested while in PSM?
  7. Should I need a some kind of timer to put the device sleeping while in PSM like Rallare has done in his udp_with_psm sample?
    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c

I have gathered some information mainly from DevZone and collected them in one document. Please correct if there are some wrong information.
PSM.docx

This is a pretty complicated thing for me so I hope I will get some help from here. My post could be a little unclear but please ask me if you don't understand something. I would really appreciate any help!

Regards,
Tero

  • It seems that AT+CPSMS holds the values when modem is offline. But lte_lc_psm_get() gives -1 for both PTAU and Active Time so I guess it means that PSM is disabled. What do you think? Or is it even possible to track programmatically or with AT commands?
    Its a difference between your local settings, and the PSM settings applied to your link. You cannot check the state of something that is already shut down. 

    So, how could I check if I'm still in PSM? Should the device stay in PSM if the modem is powered off or in the offline mode (func mode 4 or 44)?

    An initial ATTACH to the network costs both current and time, and if you do this once every hour, it'll cost more than PSM does.

    It seems that it will register to the network again if the modem has been sent to the offline mode (using lte_lc_offline() function). So would the device stay in PSM or should I always leave the modem on? Isn't it consuming some power when it's on?

    SystemOFF mode doesn't allow any clocks running, and wake up from this mode causes a reset. Since you require timers, this is not the mode I would recommend for your application

    So it leaves me these 3 options or is there some others too?

    1. Modem in offline mode
    2. MCU on IDLE, modem off, RTC on
    3. Modem on

    I'm also following this ticket to know how to use System ON IDLE:
    https://devzone.nordicsemi.com/f/nordic-q-a/59812/m33-core-in-nrf9160-low-power-mode---constant-latency-mode/

    Regards,
    Tero

  • Hi,

     

    anicare-tero said:
    So, how could I check if I'm still in PSM? Should the device stay in PSM if the modem is powered off or in the offline mode (func mode 4 or 44)?
    anicare-tero said:
    It seems that it will register to the network again if the modem has been sent to the offline mode (using lte_lc_offline() function). So would the device stay in PSM or should I always leave the modem on? Isn't it consuming some power when it's on?

    You are not in PSM if you turn off the modem (CFUN != 1). The modem must be active, and you have to have a connection in order to be in PSM.

    The floor current for PSM is 4 uA.

     

    anicare-tero said:
    So it leaves me these 3 options or is there some others too?

    It essentially leaves you with one mode: SystemOn (MCU on idle, WFE/WFI, it has several names, but it's all the same). This is a dynamic mode, where you put the cpu core to sleep, and external peripherals run, which can be anything from RTC, GPIO interrupts, SPI, TWI, UART, etc. Some of these peripherals require the peripheral clock tree to be able to run, so SystemON idle is dynamic; and thus the current consumption in sleep will also be that. Be sure to turn off peripherals that require the peripheral clock tree when in sleep.

     

    The three options you list is SystemOn Idle with different combinations. The one used for PSM is 3, Modem on, given that PSM enabled and successfully entered.

     

    Kind regards,

    Håkon

  • The floor current for PSM is 4 uA.

    Our plan is to send data to the server once a week. Before sending data we have to do these:

      • Check if there is a network available (any suggestions how to do this?)
      • Send the modem to offline
      • Switch to GPS and start to get a fix
      • Send the modem to offline
      • Switch to LTE and send data

      Modem going to offline before switching between LTE and GPS is because we have that combined antenna so they can't work at the same time.

      So, our data sending interval is quite a long (one week). I think we will use Date-Time library to set the device send data at the specific day and at the specific time. But I will develop that feature later, now I'm just doing the interval with k_delayed_work_submit_to_queue() functions.

      With the one week interval, do you recommend to stay in PSM or power the modem off or send the modem to offline mode? What are the current consumptions for these:

      1. Power modem ON
      2. Register to the network (if the modem has been OFF one week)
      3. Modem offline (a week in offline mode)

      And if we do the data sending like in my quote, we still have to register again to the network after a GPS fix because we have to switch the system mode.

      I'm using latest master branch of nRF Connect SDK and pre-released modem FW 1.1.2 which is including ANT->AUX switching.

      As I said earlier (in my quote at the beginning of this message) we are using the combined antenna for LTE and GPS. After all, is it still possible to use LTE and GPS together while in PSM even though we have a combined antenna? If it is possible, I guess we would do this before sending data:

      • Use network mode LTE-M&GPS / NB-IoT&GPS (define in prj.conf)
      • Check if there is a network available (any suggestions how to do this?)
      • Start GPS to get a fix
      • Stop GPS and send data

      EDIT: The combined antenna has been designed like this:
      https://infocenter.nordicsemi.com/topic/nwp_033/WP/nwp_033/nwp_033_gps_lte_ex.html

      EDIT: Are you able to tell when will the next modem FW be released?

    1. Hi,

       

      anicare-tero said:
      With the one week interval, do you recommend to stay in PSM or power the modem off or send the modem to offline mode? What are the current consumptions for these:

       It is up to you what you choose. Test and make a choice that is best for your application.

      If you have other sensors in your application that requires the CPU to be in idle mode (not system off mode), then PSM might be a natural choice if current consumption is a high priority.

       

      anicare-tero said:
      As I said earlier (in my quote at the beginning of this message) we are using the combined antenna for LTE and GPS. After all, is it still possible to use LTE and GPS together while in PSM even though we have a combined antenna? If it is possible, I guess we would do this before sending data:

      There shouldn't be restrictions based on the antenna used, given that it is tuned for the bands you're using. 

      GPS is time multiplexed with the LTE traffic, but can only be concurrent with LTE in modes which allows for longer idle periods on the network (eDRX and PSM), regardless on how your physical configuration is.

       

      anicare-tero said:
      Are you able to tell when will the next modem FW be released?

       I am sorry, but personnel in technical support will never comment on upcoming features or roadmap related items.

      We focus on supporting what is currently available, and do not have detailed information on upcoming features/releases.

      Please contact your local regional sales manager (RSM) for such details. If you do not have the contact details of your local RSM, please send me a direct message with your location and I'll share this info with you.

       

      Kind regards,

      Håkon

    2. Hi Håkon,

      Thanks a lot for your help! It has been clarified a lot of things for me. I think that I'm fine with this case for now but I will ask later if I still have some problems.

      Best regards,
      Tero

    Related