Power Manager Initialization#
Startup Sequence#
Power Manager must be initialized after clock initialization but before any power management operations:
Clock Manager Initialization: Must complete first to provide clock tree information
Sleep Timer Initialization: Must be initialized before Power Manager
Power Manager Initialization: Configures energy modes and captures initial clock state
Component Registration: Other SiSDK components can add requirements and register for events
Application Setup: Application can add requirements and register for events
Initialization API#
sl_status_t sl_power_manager_init(void);Description: Initializes the Power Manager service and captures initial system state
Return Values:
SL_STATUS_OK: Successful initializationSL_STATUS_FAIL: Initialization failed
Note: Typically, it is unnecessary to call
sl_power_manager_init()directly. The Power Manager is automatically initialized by the System Setup (sl_main) when using the standard SiSDK initialization sequence. Manual initialization is only required for custom initialization sequences or when not using the sl_main framework.
Example Usage (Custom Initialization Only):
// Only required for custom initialization and not typical usage
sl_status_t status = sl_power_manager_init();
if (status != SL_STATUS_OK) {
// Handle initialization failure
printf("Power Manager init failed: 0x%x\n", status);
}