Power Manager#
Modules#
sl_power_ram_retention_config_t
sl_power_manager_ps_transition_event_info_t
sl_power_manager_ps_transition_event_handle_t
Enumerations#
Enumeration for the power states.
Enumeration for clock scaling parameters.
Enumeration for the sleep modes.
Enumeration for low frequency clocks.
Typedefs#
Mask of all the event(s) to listen to.
Typedef for the user supplied callback function which is called when an power state transition occurs.
Variables#
M4SS RAM size that needs to be restored.
ULPSS RAM size that needs to be restored.
Set or Clear RAM retention.
Enable will set the RAM banks using size, disable will set RAM banks using bank number.
M4SS RAM bank number that needs to be restored.
ULPSS RAM bank number that needs to be restored.
RAM Retention modes based on the flags sl_power_ram_retention_mode_t.
Masked value of M4SS Peripherals sl_power_m4ss_peripheral_t.
Masked value of ULPSS Peripherals sl_power_ulpss_peripheral_t.
Masked value of NPSS Peripherals sl_power_npss_peripheral_t.
Mask of the transitions on which the callback should be called.
Function that must be called when the event occurs.
List node.
Handle event info.
Functions#
Initialize the power manager service.
Adds requirement on power states.
Removes requirement on power states.
Configures the clock scaling.
Adds the peripheral requirement.
Removes the peripheral requirement.
Registers a callback to be called on given Power state transition(s).
Unregisters an event callback handle on Power State transition.
Transit to sleep mode and waits for the peripheral set as wakeup source to trigger and wakeup the m4 soc.
Transit to standby state and waits for the interrupt.
Configures the wakeup sources.
Retains the RAM in low power state either by using size or RAM bank as input parameter.
Returns the current power state.
Updates the Power State as per the from and to parameters.
Configures the parameters for sleep and transit to sleep mode.
Updates the peripheral power state, i.e., enables and disables the peripheral as per requirements.
Validates the power state transitions.
Configures the wakeup sources.
Sets the RAM retention as well as configures the RAM banks which needs to be retained.
Configures the clock as per the input, i.e.
Sets the initial hardware configuration.
Macros#
Event transition for entering PS4 state.
Event transition for leaving PS4 state.
Event transition for entering PS3 state.
Event transition for leaving PS3 state.
Event transition for entering PS2 state.
Event transition for leaving PS2 state.
Event transition for leaving PS1 state.
Event transition for leaving sleep state.
Event transition for leaving standby state.
Deep Sleep Timer based wakeup source.
Host based wakeup source.
Wireless based wakeup source.
M4 Processor based wakeup source.
GPIO based wakeup source.
Comparator based wakeup source.
Sysrtc based wakeup source.
ULP peripheral based wakeup source.
SDC (Sensor data collector) based wakeup source.
Alarm based wakeup source.
Second based wakeup source.
Milli second based wakeup source.
Watchdog interrupt based wakeup source.
High Power ULP SRAM retention enable.
M4SS RAM retention enable.
M4 ULP RAM retention enable.
TA RAM retention enable.
ULPSS RAM retention enable.
M4 ULP 16K RAM retention enable.
M4SS EFUSE Power Gate.
M4SS RPDMA Power Gate.
M4SS SDIO SPI Power Gate.
M4SS QSPI and ICACHE Power Gate.
M4SS IID Power Gate.
M4SS M4 Debug Power Gate.
M4SS M4 Core Power Gate.
M4SS External ROM Power Gate.
ULP Miscellaneous Power Gate.
ULP Capacitive Touch Sensor Power Gate.
ULP UART Power Gate.
ULP SSI Power Gate.
ULP I2S Power Gate.
ULP I2C Power Gate.
ULP AUX Power Gate.
ULP IR Power Gate.
ULP UDMA Power Gate.
ULP FIM Power Gate.
NPSS MCU BFFS (Battery FF's) Power Gate.
NPSS MCU FSM Power Gate.
NPSS MCU RTC (Real Time Clock) Power Gate.
NPSS MCU WDT (Watchdog Timer) Power Gate.
NPSS MCU Process Sensor Power Gate.
NPSS MCU Temperature Sensor Power Gate.
NPSS MCU Storage 1 Power Gate.
NPSS MCU Storage 2 Power Gate.
NPSS MCU Storage 3 Power Gate.
NPSS Time Period Power Gate.
NPSS MCU APB Control Power Gate.
4 KB (Bank 1 of first 192k chunk)
4 KB (Bank 2 of first 192k chunk)
4 KB (Bank 3 of first 192k chunk)
4 KB (Bank 4 of first 192k chunk)
4 KB (Bank 5 of first 192k chunk)
32 KB (Bank 6-7 of first 192k chunk)
64 KB (Bank 9-11 of first 192k chunk)
64 KB (Bank 12-15 of first 192k chunk)
64 KB (Bank 1-4 of second 192k chunk)
64 KB (Bank 1-4 of third 192k chunk)
2 KB
2 KB
2 KB
2 KB
Enumeration Documentation#
sl_power_state_t#
sl_power_state_t
Enumeration for the power states.
Enumerator | |
---|---|
SL_SI91X_POWER_MANAGER_PS0 | PS0 Power State. |
SL_SI91X_POWER_MANAGER_PS1 | PS1 Power State. |
SL_SI91X_POWER_MANAGER_PS2 | PS2 Power State. |
SL_SI91X_POWER_MANAGER_PS3 | PS3 Power State. |
SL_SI91X_POWER_MANAGER_PS4 | PS4 Power State. |
SL_SI91X_POWER_MANAGER_SLEEP | Sleep. |
SL_SI91X_POWER_MANAGER_STANDBY | Standby. |
LAST_ENUM_POWER_STATE | Last enum for validation. |
SL_SH_PS4TOPS2 | |
SL_SH_PS2TOPS4 | |
SL_SH_SLEEP_WAKEUP | |
SL_SH_DUMMY |
sl_clock_scaling_t#
sl_clock_scaling_t
Enumeration for clock scaling parameters.
Enumerator | |
---|---|
SL_SI91X_POWER_MANAGER_POWERSAVE | Minimum supported frequency in a power state. |
SL_SI91X_POWER_MANAGER_PERFORMANCE | Maximum supported frequency in a power state. |
LAST_ENUM_CLOCK_SCALING | Last enum for validation. |
sli_power_sleep_mode_t#
sli_power_sleep_mode_t
Enumeration for the sleep modes.
Enumerator | |
---|---|
SLI_SI91X_POWER_MANAGER_WAKEUP_FROM_FLASH_MODE | |
SLI_SI91X_POWER_MANAGER_WAKEUP_WITHOUT_RETENTION | |
SLI_SI91X_POWER_MANAGER_WAKEUP_WITH_RETENTION | |
SLI_SI91X_POWER_MANAGER_WAKEUP_WITH_RETENTION_WITHOUT_ULPSS_RAM | |
SLI_SI91X_POWER_MANAGER_WAKEUP_WITHOUT_RETENTION_WITHOUT_ULPSS_RAM | |
LAST_ENUM_POWER_SLEEP_MODE |
sli_power_low_freq_clock_t#
sli_power_low_freq_clock_t
Enumeration for low frequency clocks.
Enumerator | |
---|---|
SLI_SI91X_POWER_MANAGER_DISABLE_LF_MODE | |
SLI_SI91X_POWER_MANAGER_LF_32_KHZ_RC | |
SLI_SI91X_POWER_MANAGER_LF_32_KHZ_XTAL | |
SLI_SI91X_POWER_MANAGER_EXTERNAL_CAP_MODE | |
LAST_ENUM_POWER_LOW_FREQ_CLOCK |
Typedef Documentation#
sl_power_manager_ps_transition_event_t#
typedef uint32_t sl_power_manager_ps_transition_event_t
Mask of all the event(s) to listen to.
sl_power_manager_ps_transition_on_event_t#
typedef void(* sl_power_manager_ps_transition_on_event_t) (sl_power_state_t from, sl_power_state_t to) )(sl_power_state_t from, sl_power_state_t to)
Typedef for the user supplied callback function which is called when an power state transition occurs.
Type | Direction | Argument Name | Description |
---|---|---|---|
N/A | from | Power state we are leaving. | |
N/A | to | Power state we are entering. |
Variable Documentation#
m4ss_ram_size_kb#
uint16_t sl_power_ram_retention_config_t::m4ss_ram_size_kb
M4SS RAM size that needs to be restored.
ulpss_ram_size_kb#
uint16_t sl_power_ram_retention_config_t::ulpss_ram_size_kb
ULPSS RAM size that needs to be restored.
configure_ram_retention#
boolean_t sl_power_ram_retention_config_t::configure_ram_retention
Set or Clear RAM retention.
configure_ram_banks#
boolean_t sl_power_ram_retention_config_t::configure_ram_banks
Enable will set the RAM banks using size, disable will set RAM banks using bank number.
m4ss_ram_banks#
uint32_t sl_power_ram_retention_config_t::m4ss_ram_banks
M4SS RAM bank number that needs to be restored.
ulpss_ram_banks#
uint32_t sl_power_ram_retention_config_t::ulpss_ram_banks
ULPSS RAM bank number that needs to be restored.
ram_retention_mode#
uint32_t sl_power_ram_retention_config_t::ram_retention_mode
RAM Retention modes based on the flags sl_power_ram_retention_mode_t.
m4ss_peripheral#
uint32_t sl_power_peripheral_t::m4ss_peripheral
Masked value of M4SS Peripherals sl_power_m4ss_peripheral_t.
ulpss_peripheral#
uint32_t sl_power_peripheral_t::ulpss_peripheral
Masked value of ULPSS Peripherals sl_power_ulpss_peripheral_t.
npss_peripheral#
uint32_t sl_power_peripheral_t::npss_peripheral
Masked value of NPSS Peripherals sl_power_npss_peripheral_t.
event_mask#
const sl_power_manager_ps_transition_event_t sl_power_manager_ps_transition_event_info_t::event_mask
Mask of the transitions on which the callback should be called.
on_event#
const sl_power_manager_ps_transition_on_event_t sl_power_manager_ps_transition_event_info_t::on_event
Function that must be called when the event occurs.
info#
sl_power_manager_ps_transition_event_info_t* sl_power_manager_ps_transition_event_handle_t::info
Handle event info.
Function Documentation#
sl_si91x_power_manager_init#
sl_status_t sl_si91x_power_manager_init (void )
Initialize the power manager service.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Configures PS4 state with 100 MHz system clock.
Pre-conditions:
none
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_ALREADY_INITIALIZED (0x0012) Power Manager is already initialized.
sl_si91x_power_manager_add_ps_requirement#
sl_status_t sl_si91x_power_manager_add_ps_requirement (sl_power_state_t state)
Adds requirement on power states.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | state | Power state to add requirement: sl_power_state_t
|
Default state for power manager is PS4. If any requirements are added then power manager switches to the state if it is a valid transition. Before transition from one state to another, make sure to remove requirements of previous states if any added. If any invalid state requirement is added then it returns SL_STATUS_INVALID_PARAMETER. If power manager service is not initialized then it returns SL_STATUS_NOT_INITIALIZED, to initialize call sl_si91x_power_manager_init. To get the requirements on all power states, call sl_si91x_power_manager_get_requirement_table. To know the current power state, use sl_si91x_power_manager_get_current_state.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
- SL_STATUS_OK (0x0000) Success. - SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized. - SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sl_si91x_power_manager_remove_ps_requirement#
sl_status_t sl_si91x_power_manager_remove_ps_requirement (sl_power_state_t state)
Removes requirement on power states.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | state | Power state to remove requirement: sl_power_state_t
|
Default state for power manager is PS4. Removing requirement will not impact on power state transitions. If the current state is PS4 and no other requirements are added, and PS4 requirement is removed then it returns SL_STATUS_INVALID_PARAMETER. If power manager service is not initialized then it returns SL_STATUS_NOT_INITIALIZED, to initialize call sl_si91x_power_manager_init. To get the requirements on all power states, call sl_si91x_power_manager_get_requirement_table. To know the current power state, use sl_si91x_power_manager_get_current_state.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sl_si91x_power_manager_set_clock_scaling#
sl_status_t sl_si91x_power_manager_set_clock_scaling (sl_clock_scaling_t mode)
Configures the clock scaling.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_clock_scaling_t | [in] | mode | (sl_clock_scaling_t type enum) the clock scaling mode sl_clock_scaling_t |
PS4 and PS3 states are supported only. Possible values for clock scaling are:
POWERSAVE and PERFORMANCE
PS4 Performance: 180 MHz clock
PS4 Power-save: 100 MHz clock
PS3 Performance: 80 MHz clock
PS3 Power-save: 32 MHz clock
For PS2 state, 20 MHz clock is default.
If power manager service is not initialized then it returns SL_STATUS_NOT_INITIALIZED, to initialize call sl_si91x_power_manager_init.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
- SL_STATUS_OK (0x0000) Success. - SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized. - SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed. - SL_STATUS_INVALID_CONFIGURATION (0x0023) Invalid configuration of mode.
sl_si91x_power_manager_add_peripheral_requirement#
sl_status_t sl_si91x_power_manager_add_peripheral_requirement (sl_power_peripheral_t * peripheral)
Adds the peripheral requirement.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_peripheral_t * | [in] | peripheral | structure for different peripherals sl_power_peripheral_t |
Power on the peripherals the valid peripherals passed in the structure. Structure member possible values: sl_power_peripheral_t
m4ss_peripheral -> Accepts masked value of m4ss peripherals.
ulpss_peripheral -> Accepts masked value of ulpss peripherals.
npss_peripheral -> Accepts masked value of npss peripherals. The values of enums can be combined by using 'OR' operator and then passed to the variable.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
- SL_STATUS_OK (0x0000) Success. - SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized. - SL_STATUS_INVALID_STATE (0x0002) Not a valid transition. - SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sl_si91x_power_manager_remove_peripheral_requirement#
sl_status_t sl_si91x_power_manager_remove_peripheral_requirement (sl_power_peripheral_t * peripheral)
Removes the peripheral requirement.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_peripheral_t * | [in] | peripheral | Structure for different peripherals sl_power_peripheral_t |
Power off the peripherals the valid peripherals passed in the structure. Structure member possible values: sl_power_peripheral_t
m4ss_peripheral -> Accepts masked value of m4ss peripherals.
ulpss_peripheral -> Accepts masked value of ulpss peripherals.
npss_peripheral -> Accepts masked value of npss peripherals. The values of enums can be combined by using 'OR' operator and then passed to the variable.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
- SL_STATUS_OK (0x0000) Success. - SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized. - SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sl_si91x_power_manager_subscribe_ps_transition_event#
sl_status_t sl_si91x_power_manager_subscribe_ps_transition_event (sl_power_manager_ps_transition_event_handle_t * event_handle, const sl_power_manager_ps_transition_event_info_t * event_info)
Registers a callback to be called on given Power state transition(s).
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_manager_ps_transition_event_handle_t * | [in] | event_handle | Event handle (no initialization needed). |
const sl_power_manager_ps_transition_event_info_t * | [in] | event_info | Event info structure that contains the event mask and the callback that must be called. |
If power manager service is not initialized then it returns SL_STATUS_NOT_INITIALIZED, to initialize call sl_si91x_power_manager_init.
Pre-conditions:
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_NULL_POINTER (0x0022) Null Pointer is passed.
Note
Adding and removing power state transition requirement(s) from a callback on a transition event is not supported.
The parameters passed must be persistent, meaning that they need to survive until the callback fires.
An ASSERT is thrown if the handle is not found.
Usage example:
#define PS_EVENT_MASK ( SL_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS4 \
| SL_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS4 \
| SL_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS3 \
| SL_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS3 \
| SL_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS2 \
| SL_POWER_MANAGER_EVENT_TRANSITION_LEAVING_PS2 \
| SL_POWER_MANAGER_EVENT_TRANSITION_ENTERING_PS0 \
| SL_POWER_MANAGER_EVENT_TRANSITION_LEAVING_SLEEP)
sl_power_manager_ps_transition_event_handle_t handle;
sl_power_manager_ps_transition_event_info_t info = { .event_mask = PS_EVENT_MASK,
.on_event = transition_callback };
void transition_callback(sl_power_state_t from, sl_power_state_t to)
{
[...]
}
void main(void)
{
sl_status_t status;
status = sl_si91x_power_manager_init();
// Validate the status
status = sl_si91x_power_manager_subscribe_ps_transition_event(&handle, &info);
// Validate the status
}
sl_si91x_power_manager_unsubscribe_ps_transition_event#
sl_status_t sl_si91x_power_manager_unsubscribe_ps_transition_event (sl_power_manager_ps_transition_event_handle_t * event_handle, const sl_power_manager_ps_transition_event_info_t * event_info)
Unregisters an event callback handle on Power State transition.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_manager_ps_transition_event_handle_t * | [in] | event_handle | Event handle which must be unregistered (must have been registered previously). |
const sl_power_manager_ps_transition_event_info_t * | [in] | event_info | Event info structure that contains the event mask and the callback that must be called. |
If power manager service is not initialized then it returns SL_STATUS_NOT_INITIALIZED, to initialize call sl_si91x_power_manager_init.
Pre-conditions:
sl_si91x_power_manager_subscribe_ps_transition
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_NULL_POINTER (0x0022) Null Pointer is passed.
Note
An ASSERT is thrown if the handle is not found.
sl_si91x_power_manager_sleep#
sl_status_t sl_si91x_power_manager_sleep (void )
Transit to sleep mode and waits for the peripheral set as wakeup source to trigger and wakeup the m4 soc.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
It supports PS4, PS3 and PS2 only, it cannot enter sleep mode from any other active states. If any error is there, it returns the error code and does not transit to sleep mode.
Pre-conditions:
sl_si91x_power_manager_subscribe_ps_transition
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
SL_STATUS_INVALID_STATE (0x0002) Not a valid transition.
sl_si91x_power_manager_standby#
void sl_si91x_power_manager_standby (void )
Transit to standby state and waits for the interrupt.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Standby transition is possible from PS4, PS3, PS2 state only. Transition from sleep, PS1 or PS0 is not supported.
Pre-conditions:
sl_si91x_power_manager_subscribe_ps_transition
Returns
The following values are returned:
none
sl_si91x_power_manager_set_wakeup_sources#
sl_status_t sl_si91x_power_manager_set_wakeup_sources (uint32_t source, boolean_t add)
Configures the wakeup sources.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | source | (sl_power_wakeup_sources_t type enum) Wakeup sources sl_power_wakeup_sources_t |
boolean_t | [in] | add | (boolean_t) true enables and false disables wakeup source |
One or many wakeup sources can be configured by using 'OR' operation. The initialization of the peripheral configured as wakeup source needs to be performed by user. Power Manager only sets it as a wakeup source.
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sl_si91x_power_manager_configure_ram_retention#
sl_status_t sl_si91x_power_manager_configure_ram_retention (sl_power_ram_retention_config_t * config)
Retains the RAM in low power state either by using size or RAM bank as input parameter.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_ram_retention_config_t * | [in] | config | Structure for the parameters of RAM retention sl_power_ram_retention_config_t. |
Structure member possible values: sl_power_ram_retention_config_t
configure_ram_retention -> Boolean to enable RAM retention. (Enable/Disable).
configure_ram_banks -> Boolean to switch between RAM Bank retentions. Either by size or by RAM bank number.
(Enable -> Use RAM Bank Number).
(Disable -> Use Size).
m4ss_ram_size_kb -> Retains m4ss RAM banks according to the size.
less than 320 KB (Enter 100 for 100 KB).
ulpss_ram_size_kb -> Retains ulpss RAM banks according to the size.
less than 8 KB (Enter 5 for 5 KB).
ram_bank_number -> Retains the m4ss and ulpss RAM Bank using bank number
ram_retention_mode -> Configures the RAM retention mode
Pre-conditions:
sl_si91x_power_manager_subscribe_ps_transition
Returns
The following values are returned:
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_NOT_INITIALIZED (0x0011) Power Manager is not initialized.
SL_STATUS_NULL_POINTER (0x0022) Null Pointer is passed.
sl_si91x_power_manager_get_current_state#
sl_power_state_t sl_si91x_power_manager_get_current_state (void )
Returns the current power state.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Possible return values:
2 : SL_POWER_MANAGER_PS2, ///< PS2 Power State
3 : SL_POWER_MANAGER_PS3, ///< PS3 Power State
4 : SL_POWER_MANAGER_PS4, ///< PS4 Power State
Returns
The following values are returned:
sl_power_state_t enum value indicating current power state
sli_si91x_power_manager_change_power_state#
sl_status_t sli_si91x_power_manager_change_power_state (sl_power_state_t from, sl_power_state_t to)
Updates the Power State as per the from and to parameters.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | from | ( sl_power_state_t type enum) Power State from which the transition takes place. |
sl_power_state_t | [in] | to | ( sl_power_state_t type enum) Power State to which the transition takes place. |
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code as follow:
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sli_si91x_power_manager_set_sleep_configuration#
sl_status_t sli_si91x_power_manager_set_sleep_configuration (sl_power_state_t state)
Configures the parameters for sleep and transit to sleep mode.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | state | ( sl_power_state_t type enum) Current Power state |
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sli_power_manager_update_peripheral#
sl_status_t sli_power_manager_update_peripheral (sl_power_peripheral_t * peripheral, boolean_t add)
Updates the peripheral power state, i.e., enables and disables the peripheral as per requirements.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_peripheral_t * | [in] | peripheral | ( sl_power_peripheral_t type structure) |
boolean_t | [in] | add | (boolean) true -> add peripheral, false -> remove peripheral. |
If flag is set, the peripherals which are passed in the sl_power_peripheral_t structures is be powered on. If flag is cleared, the peripherals which are passed in the sl_power_peripheral_t structures is be powered off.
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
SL_STATUS_NULL_POINTER (0x0022) Null Pointer is passed.
sli_si91x_power_manager_is_valid_transition#
boolean_t sli_si91x_power_manager_is_valid_transition (sl_power_state_t from, sl_power_state_t to)
Validates the power state transitions.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | from | ( sl_power_state_t type enum) Power State from which the transition takes place. |
sl_power_state_t | [in] | to | ( sl_power_state_t type enum) Power State to which the transition takes place. |
If invalid, returns false. Note
FOR INTERNAL USE ONLY.
Returns
boolean value true or false.
sli_si91x_power_configure_wakeup_resource#
sl_status_t sli_si91x_power_configure_wakeup_resource (uint32_t source, boolean_t add)
Configures the wakeup sources.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | source | (uint32_t) Ored value of wakeup sources. |
boolean_t | [in] | add | (boolean) true -> add peripheral, false -> remove peripheral. |
If add is set, the wakeup source which are passed in the source variable is set. If add is clear, the wakeup source which are passed in the source variable is clear.
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sli_si91x_power_manager_set_ram_retention_configuration#
sl_status_t sli_si91x_power_manager_set_ram_retention_configuration (sl_power_ram_retention_config_t * sram_bank)
Sets the RAM retention as well as configures the RAM banks which needs to be retained.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_ram_retention_config_t * | [in] | sram_bank | ( sl_power_ram_retention_config_t type struct) |
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
SL_STATUS_NULL_POINTER (0x0022) Null Pointer is passed.
sli_si91x_power_manager_configure_clock#
sl_status_t sli_si91x_power_manager_configure_clock (sl_power_state_t state, boolean_t mode)
Configures the clock as per the input, i.e.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_power_state_t | [in] | state | ( sl_power_state_t type enum) current power state. |
boolean_t | [in] | mode | (boolean) true -> performance mode, false -> powersave mode. |
powersave or performance.
Note
FOR INTERNAL USE ONLY.
Returns
status SL_STATUS_OK on success, else error code.
SL_STATUS_OK (0x0000) Success.
SL_STATUS_INVALID_PARAMETER (0x0021) Invalid Parameter is passed.
sli_si91x_power_manager_init_hardware#
void sli_si91x_power_manager_init_hardware (void )
Sets the initial hardware configuration.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Note
FOR INTERNAL USE ONLY.
Returns
none