Power Manager Initialization and Configuration#

This section describes how the system initializes power management and configures components before entering low-power modes. It explains the startup sequence, configuration through the Universal Configurator (UC), and the APIs available for manual initialization.

Startup Sequence#

When the system boots, the Power Manager service begins in PowerSave 3 (PS3) mode with a clock speed of 40 MHz. Applications then request additional states through Application Programming Interface (API) calls.

The following sequence diagram shows the transition from PS3 to PowerSave 2 (PS2):

Startup SequenceStartup Sequence

The Power Manager service initializes by default with the sl_si91x_power_manager_init() function, which sets the processor to PS3. The service also subscribes to all transition events by using the sl_si91x_power_manager_subscribe_ps_transition_event() function. This subscription includes a callback function.

To require PS2, use the sl_si91x_power_manager_add_ps_requirement() function. The sli_si91x_power_manager_update_ps_requirement() function then updates the requirement, the current state, and the requirement table. This update ensures that the requested transition is valid.

The sl_si91x_get_lowest_ps() function evaluates all requirements and returns the lowest valid power state. For example, if both PS4 and PS2 are required, the system stays in PS4 until that requirement is removed. With only PS2 required, the function allows the transition to PS2.

Finally, the sli_si91x_power_manager_change_power_state() function updates the system from PS3 to PS2. The ps3_to_ps2_state_change() function then executes the transition through internal APIs.

UC Configuration#

The Universal Configurator (UC) in Simplicity Studio enables you to configure Power Manager components. These components manage Random Access Memory (RAM) retention, control peripheral states, and configure wake-up sources before the M4 core enters sleep mode.

The available UC components include:

  • Power Manager

    • Power Manager Configuration

    • Wake-up Source Configuration

  • Ultra-Low-Power (ULP) Peripheral Component for PS2 peripherals

  • Ultra-Ultra-Low-Power (UULP) Peripheral Component for wake-up sources

  • Low Power

For installation instructions, see the Power Manager Integration Guide.

Power Manager Component#

The Power Manager Component initializes automatically when installed, so you don’t need to add initialization code.

Power Manager ComponentPower Manager Component

The following subcomponents are included by default.

Si91X Tickless Mode Component#

The Si91X Tickless Mode component reduces power consumption by enabling tickless idle mode. In this mode, the SiWG917 M4 core sleeps whenever no tasks are scheduled.

Power Manager Configuration Component#

The Power Manager Configuration Component provides two options:

  • Power Manager Configuration

  • Power Manager Advanced Configuration

Only one of these can be installed at a time.

Power Manager Configuration ComponentPower Manager Configuration Component

Basic Power Manager Configuration

This option lets you configure peripherals by domain:

  • High-power peripherals – available in PS4 and PS3 states

  • Low-power peripherals – available in PS2 state

  • Ultra-low-power peripherals – available in all states

Peripheral grouping details are available in AN1430: SiWG917 Low-Power Application Note.

RAM Configuration

You can configure RAM retention either by size or by bank number (choose one). If both are enabled, size-based configuration takes precedence.

RAM ConfigurationRAM Configuration

Advanced Power Manager Configuration

The advanced option powers off unused peripherals and RAM banks by default. You can adjust configurations by size or by bank number.

Note: Power consumption may vary depending on the peripherals and RAM banks you enable.

Wake-up Source Configuration Component#

The Wake-up Source Configuration Component sets up UULP wake-up sources for PS4, PS3, and PS2. Available wake-up sources include:

  • Calendar (alarm) wake-up

  • General-Purpose Input/Output (GPIO) wake-up

  • Deep Sleep Timer

  • Wireless wake-up

Wake-up SourceWake-up Source

Note: Always install the matching UULP Peripheral Components for your selected wake-up source.

Each wake-up source operates differently:

  • Calendar wake-up – Triggers an alarm after a configured time (default is 5 seconds). Use a millisecond timer when the M4 is active.

  • GPIO wake-up – Wakes the system based on activity from one of four available GPIO pins (0–3).

  • Deep Sleep Timer – Configures a sleep duration in microseconds (up to ~71 minutes). The timer starts only when the system enters sleep.

  • Wireless wake-up – Triggers when the Network Wireless Processor (NWP) receives a wireless message.

Low-Power Peripheral Component#

The Low-Power Peripheral Component supports UULP peripherals in PS2 mode. Since flash memory is disabled in PS2, the required drivers are copied into RAM.

Note: You must manually initialize and configure each peripheral in your application.

Configuration for PS2 and PS1 States#

To configure PS2 and PS1 states, follow this sequence:

  1. Install the PM PS2 Component: Copies required drivers to RAM. Requires at least one ULP peripheral.

  2. Install the ULP Peripheral Component: Includes drivers for peripherals such as UART, I²C, or Timer.

  3. Add preprocessor definitions: Add the following under Project Properties → C/C++ Build → Settings → Preprocessor:

    SL_SI91X_ULP_STATE_ENABLE = 1
    SLI_SI91X_MCU_ENABLE_RAM_BASED_EXECUTION = 1

PreprocessorPreprocessor

API to Initialize#

You can initialize Power Manager automatically through UC or manually through APIs.

Automatic Initialization#

If installed through UC, the Power Manager component initializes automatically. No manual configuration is required.

Manual Initialization#

To initialize manually, use the following API:

Primary API

sl_status_t sl_si91x_power_manager_init(void)

Initializes Power Manager and sets the system to PS3 Power Save mode (40 MHz).

Example Usage

#include "sl_si91x_power_manager.h"

void app_init(void)
{
  sl_status_t status = sl_si91x_power_manager_init();
  if (status == SL_STATUS_OK) {
    // Power Manager ready
    // System starts in PS3 Power Save mode (40 MHz)
  }
}

Note: Always check return values and call initialization early in the application startup sequence.