Using PSM (Power Saving Mode) with Legato

Hi,

I am working on a WP7702 module, using Legato Application Framework. The module being 3GPP LTE Release 13 compliant and my aim is to use the Power Saving Mode 3GPP’s feature (a non-generic power mode, since network dependent).

While Power Saving Mode and Ultra Low Power Mode (PSM & ULPM) are both configurable through AT commands on the WP7702, only ULPM-related commands can be used from Legato.

I was wondering if PSM was still intended to be implemented in Legato API, as suggested in a previous WP7702 Product Technical Specification (revision 2):

Table 3-7: PSM-Related Commands

Type Command Description
AT +CPSMS Configure PSM Settings
Use this command to:
- Enable/disable LTE PSM.
- Configure Period TAU timer (T3412) with the maximum duration of the dormant period.
- Configure Active timer (T3324) with the ‘idle mode time’ (the duration the module remains idle before going dormant)
Note: These settings take effect immediately, and then persist across power cycles (e.g. after a power cycle, the settings will be used starting during network attach).
AT Further commands pending future firmware release.
API Not currently supported, pending future firmware release.

while it is not explicitly written as is in the latest revision (here from latest WP7702 Product Technical Specification revision, r5):

Table 3-7: ULPS-Related Application User Interfaces

Type Description Interface
AT +CPSMS 3GPP-defined command (3GPP TS27.007 Release 12) that allows direct control of all LTE PSM parameters, and is useful for advanced users wanting to test/experiment with different options. This command is limited to networks that support PSM. It is not expected that every user must be fully versed in the details of PSM to take advantage of its capabilities.
[…]
AT !POWERMODE Custom Sierra Wireless command that allows application developers to simplify the harmonization of PSM and ULPM without needing to consider whether PSM is supported on the network to which the WP module is currently attached.
The command can be used to select the power mode (ULPM, PSM, PSM with ULPM fallback).
Note: The Legato ulpm API provides equivalent functionality.
AT !POWERWAKE Custom Sierra Wireless command used to configure the wakeup sources for both PSM and ULPM, such as GPIOs, ADCs, and ULPS timer.
Note: The Legato ulpm API provides equivalent functionality.
Important: Sierra Wireless recommends not combining use of +CPSMS and !POWERWAKE. These commands have some functional overlap, which may result in unexpected effects.
API Legato Power Services: Power Manager - Ultra Low Power Mode - Boot Reason Query Legato APIs and Linux sysfs nodes are available to configure and enable the feature.

So AT+CPSMS is only accessible from AT commands, and if AT!POWERMODE can be used from le_ulpm API, as written above, I have not seen in le_ulpm Legato documentation how to chose the low power mode (between PSM with ULPM fallback, PSM only, ULPM only, as configurable with AT!POWERMODE).

Questions:

So, my first question was : are PSM-related commands still intended to be implemented in Legato API? and if not, what is the best way to use this feature (I have seen that Legato provides an AT Service, but I have not tried it yet).

Also, while using AT commands to configure & go to PSM, I was not sure about how Legato services handle this Power Saving Mode: its aim is to keep network registration, and I am wondering how the Data Connection (le_data), Modem Data Control (le_mdc) and/or Modem Radio Control (le_mrc) Services manage this at reboot.

I would welcome any comment or feedback regarding those questions! :slight_smile:

hi @noeltaillardat,

For configuring ULPM, these APIs can be used:

le_ulpm_BootOnTimer
le_ulpm_BootOnGpio
le_ulpm_ShutDown

For configuring PSM, there’s no Legato APIs available that currently

The only way to configure PSM on the Linux side is to directly write to the kernel swimcu sysfs nodes.

For more information, the kernel driver documentation has more details on how to configure PSM:

kernel/Documentation/power/swimcu-pm.txt

Example: Enable PSM:

# T3324 value in seconds $ echo 15 > /sys/module/swimcu_pm/psm/active_time
# T3412 value in seconds $ echo 360 > /sys/module/swimcu_pm/psm/psm_time
# Enable PSM $ echo 5 > /sys/module/swimcu_pm/psm/enable

Enable PSM with ULPM fallback:

# T3324 value in seconds $ echo 15 > /sys/module/swimcu_pm/psm/active_time
# T3412 value in seconds $ echo 360 > /sys/module/swimcu_pm/psm/psm_time
# Rising edge GPIO36 $ echo rising > /sys/module/swimcu_pm/boot_source/gpio36/edge
# Pull down resistor $ echo down > /sys/module/swimcu_pm/boot_source/gpio36/pull
# Enable PSM with ULPM fallback $ echo 1 > /sys/module/swimcu_pm/psm/enable

AT+CPSMS command is the AT command to configure and enable the PSM, you can try to use it with the AT command service in Legato .

BR

Hi @plu,

I eventually managed to use PSM using AT commands from inside Legato applications, using the AT Service to enable and configure it.

I saw that using AT+CPSMS was indeed modifying the kernel swimcu sysfs nodes you discussed, however I have not seen the documentation you mentioned, and still, I cannot find it. Where exactly should I look for “kernel/Documentation/power/swimcu-pm.txt”? I would realy like to go through it, so thank you for highlighting it!

Best regards

hi @noeltaillardat,
the file can be retrieved from the linux distribution which can be downloaded from the source website:
https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-latest-release-components/#sthash.N8Z22vnK.dpbs
BR

Thanks, I will take a look at this !

Best regards