Ultra Low Power Mode

API Reference

This API is used to set the boot sources and switch the device to ultra-low power state. Ultra- low power mode is achieved by shutting down major components (e.g. app processor, modem, etc.) while keeping an ultra-low power component alive. This ultra-low power component is used to monitor boot sources that are set before switching to ultra-low power mode.

Typical Usage

Typically, this API is used like this:

  • Boot sources are set by calling le_ulpm_BootOnGpio()/le_ulpm_BootOnTimer(). If multiple boot sources are configured, the module will boot if any of the boot sources are triggered.
  • After configuring boot source, le_ulpm_ShutDown() can be called to initiate shutdown (i.e. shutt down all major components like the app processor, modem, etc.).

Sample Code

This C code sample calls low power manager API to switch low power mode:

void SwitchToLowPowerMode
char version[LE_ULPM_MAX_VERS_LEN+1];
// Get ultra low power manager firmware version
LE_FATAL_IF(le_ulpm_GetFirmwareVersion(version, sizeof(version)) != LE_OK,
"Failed to get ultra low power firmware version");
LE_INFO("Ultra Low Power Manager Firmware version: %s", version);
// Boot after 1000 second of shutdown.
LE_ERROR_IF(le_ulpm_BootOnTimer(1000) != LE_OK, "Can't set timer as boot source");
// Boot if GPIO36 voltage level is high.
LE_ERROR_IF(le_ulpm_BootOnGpio(36, LE_ULPM_GPIO_HIGH) != LE_OK, "Can't set gpio36 as boot source");
// Boot if GPIO38 voltage level is low.
LE_ERROR_IF(le_ulpm_BootOnGpio(38, LE_ULPM_GPIO_LOW) != LE_OK, "Can't set gpio38 as boot source");
// Initiate shutdown.
LE_ERROR_IF(le_ulpm_ShutDown() != LE_OK, "Can't initiate shutdown");