S32 SDK
Power_s32k1xx

Detailed Description

Data Structures

struct  power_manager_user_config_t
 Power mode user configuration structure. More...
 
struct  smc_power_mode_protection_config_t
 Power mode protection configuration Implements smc_power_mode_protection_config_t_Class. More...
 
struct  smc_power_mode_config_t
 Power mode control configuration used for calling the SMC_SYS_SetPowerMode API Implements smc_power_mode_config_t_Class. More...
 
struct  smc_version_info_t
 SMC module version number Implements smc_version_info_t_Class. More...
 
struct  rcm_version_info_t
 RCM module version number Implements rcm_version_info_t_Class. More...
 

Enumerations

enum  power_manager_modes_t {
  POWER_MANAGER_RUN, POWER_MANAGER_VLPR, POWER_MANAGER_STOP, POWER_MANAGER_VLPS,
  POWER_MANAGER_MAX
}
 Power modes enumeration. More...
 
enum  power_mode_stat_t {
  STAT_RUN = 0x01, STAT_STOP = 0x02, STAT_VLPR = 0x04, STAT_VLPW = 0x08,
  STAT_VLPS = 0x10, STAT_HSRUN = 0x80, STAT_INVALID = 0xFF
}
 Power Modes in PMSTAT Implements power_mode_stat_t_Class. More...
 
enum  power_modes_protect_t { ALLOW_HSRUN, ALLOW_VLP, ALLOW_MAX }
 Power Modes Protection Implements power_modes_protect_t_Class. More...
 
enum  smc_run_mode_t { SMC_RUN, SMC_RESERVED_RUN, SMC_VLPR, SMC_HSRUN }
 Run mode definition Implements smc_run_mode_t_Class. More...
 
enum  smc_stop_mode_t { SMC_STOP = 0U, SMC_RESERVED_STOP1 = 1U, SMC_VLPS = 2U }
 Stop mode definition Implements smc_stop_mode_t_Class. More...
 
enum  smc_stop_option_t { SMC_STOP_RESERVED = 0x00, SMC_STOP1 = 0x01, SMC_STOP2 = 0x02 }
 STOP option Implements smc_stop_option_t_Class. More...
 
enum  pmc_int_select_t { PMC_INT_LOW_VOLT_DETECT, PMC_INT_LOW_VOLT_WARN }
 Power management control interrupts Implements pmc_int_select_t_Class. More...
 
enum  rcm_source_names_t {
  RCM_WAKEUP, RCM_LOW_VOLT_DETECT, RCM_LOSS_OF_CLK, RCM_LOSS_OF_LOCK,
  RCM_WATCH_DOG, RCM_EXTERNAL_PIN, RCM_POWER_ON, RCM_SJTAG,
  RCM_CORE_LOCKUP, RCM_SOFTWARE, RCM_SMDM_AP, RCM_STOP_MODE_ACK_ERR,
  RCM_TAMPERR, RCM_CORE1, RCM_SRC_NAME_MAX
}
 System Reset Source Name definitions Implements rcm_source_names_t_Class. More...
 
enum  rcm_filter_run_wait_modes_t { RCM_FILTER_DISABLED, RCM_FILTER_BUS_CLK, RCM_FILTER_LPO_CLK, RCM_FILTER_RESERVED }
 Reset pin filter select in Run and Wait modes Implements rcm_filter_run_wait_modes_t_Class. More...
 
enum  rcm_reset_delay_time_t { RCM_10LPO_CYCLES_DELAY, RCM_34LPO_CYCLES_DELAY, RCM_130LPO_CYCLES_DELAY, RCM_514LPO_CYCLES_DELAY }
 Reset delay time Implements rcm_reset_delay_time_t_Class. More...
 

Functions

status_t POWER_SYS_DoInit (void)
 This function implementation-specific configuration of power modes. More...
 
status_t POWER_SYS_DoDeinit (void)
 This function implementation-specific de-initialization of power manager. More...
 
status_t POWER_SYS_DoSetMode (const power_manager_user_config_t *const configPtr)
 This function configures the power mode. More...
 

Enumeration Type Documentation

Power management control interrupts Implements pmc_int_select_t_Class.

Enumerator
PMC_INT_LOW_VOLT_DETECT 

Low Voltage Detect Interrupt

PMC_INT_LOW_VOLT_WARN 

Low Voltage Warning Interrupt

Definition at line 208 of file power_manager_S32K1xx.h.

Power modes enumeration.

Defines power modes. Used in the power mode configuration structure (power_manager_user_config_t). From ARM core perspective, Power modes can be generally divided into run modes (High speed run, Run and Very low power run), sleep (Wait and Very low power wait) and deep sleep modes (all Stop modes). List of power modes supported by specific chip along with requirements for entering and exiting of these modes can be found in chip documentation. List of all supported power modes:

  • POWER_MANAGER_HSRUN - High speed run mode.
  • POWER_MANAGER_RUN - Run mode.
  • POWER_MANAGER_VLPR - Very low power run mode.
  • POWER_MANAGER_WAIT - Wait mode.
  • POWER_MANAGER_VLPW - Very low power wait mode.
  • POWER_MANAGER_STOP - Stop mode.
  • POWER_MANAGER_VLPS - Very low power stop mode.
  • POWER_MANAGER_PSTOP1 - Partial stop 1 mode.
  • POWER_MANAGER_PSTOP2 - Partial stop 2 mode. Implements power_manager_modes_t_Class
Enumerator
POWER_MANAGER_RUN 

Run mode.

POWER_MANAGER_VLPR 

Very low power run mode.

POWER_MANAGER_STOP 

Stop mode.

POWER_MANAGER_VLPS 

Very low power stop mode.

POWER_MANAGER_MAX 

Definition at line 60 of file power_manager_S32K1xx.h.

Power Modes in PMSTAT Implements power_mode_stat_t_Class.

Enumerator
STAT_RUN 

0000_0001 - Current power mode is RUN

STAT_STOP 

0000_0010 - Current power mode is STOP

STAT_VLPR 

0000_0100 - Current power mode is VLPR

STAT_VLPW 

0000_1000 - Current power mode is VLPW

STAT_VLPS 

0001_0000 - Current power mode is VLPS

STAT_HSRUN 

1000_0000 - Current power mode is HSRUN

STAT_INVALID 

1111_1111 - Non-existing power mode

Definition at line 109 of file power_manager_S32K1xx.h.

Power Modes Protection Implements power_modes_protect_t_Class.

Enumerator
ALLOW_HSRUN 

Allow High Speed Run mode

ALLOW_VLP 

Allow Very-Low-Power Modes

ALLOW_MAX 

Definition at line 124 of file power_manager_S32K1xx.h.

Reset pin filter select in Run and Wait modes Implements rcm_filter_run_wait_modes_t_Class.

Enumerator
RCM_FILTER_DISABLED 

All filtering disabled

RCM_FILTER_BUS_CLK 

Bus clock filter enabled

RCM_FILTER_LPO_CLK 

LPO clock filter enabled

RCM_FILTER_RESERVED 

Reserved setting

Definition at line 241 of file power_manager_S32K1xx.h.

Reset delay time Implements rcm_reset_delay_time_t_Class.

Enumerator
RCM_10LPO_CYCLES_DELAY 

reset delay time 10 LPO cycles

RCM_34LPO_CYCLES_DELAY 

reset delay time 34 LPO cycles

RCM_130LPO_CYCLES_DELAY 

reset delay time 130 LPO cycles

RCM_514LPO_CYCLES_DELAY 

reset delay time 514 LPO cycles

Definition at line 254 of file power_manager_S32K1xx.h.

System Reset Source Name definitions Implements rcm_source_names_t_Class.

Enumerator
RCM_WAKEUP 

Wakeup

RCM_LOW_VOLT_DETECT 

Low voltage detect reset

RCM_LOSS_OF_CLK 

Loss of clock reset

RCM_LOSS_OF_LOCK 

Loss of lock reset

RCM_WATCH_DOG 

Watch dog reset

RCM_EXTERNAL_PIN 

External pin reset

RCM_POWER_ON 

Power on reset

RCM_SJTAG 

JTAG generated reset

RCM_CORE_LOCKUP 

core lockup reset

RCM_SOFTWARE 

Software reset

RCM_SMDM_AP 

MDM-AP system reset

RCM_STOP_MODE_ACK_ERR 

Stop mode ack error reset

RCM_TAMPERR 

Tamperr

RCM_CORE1 

Core1

RCM_SRC_NAME_MAX 

Definition at line 218 of file power_manager_S32K1xx.h.

Run mode definition Implements smc_run_mode_t_Class.

Enumerator
SMC_RUN 

normal RUN mode

SMC_RESERVED_RUN 
SMC_VLPR 

Very-Low-Power RUN mode

SMC_HSRUN 

High Speed Run mode (HSRUN)

Definition at line 135 of file power_manager_S32K1xx.h.

Stop mode definition Implements smc_stop_mode_t_Class.

Enumerator
SMC_STOP 

Normal STOP mode

SMC_RESERVED_STOP1 

Reserved

SMC_VLPS 

Very-Low-Power STOP mode

Definition at line 146 of file power_manager_S32K1xx.h.

STOP option Implements smc_stop_option_t_Class.

Enumerator
SMC_STOP_RESERVED 

Reserved stop mode

SMC_STOP1 

Stop with both system and bus clocks disabled

SMC_STOP2 

Stop with system clock disabled and bus clock enabled

Definition at line 157 of file power_manager_S32K1xx.h.

Function Documentation

status_t POWER_SYS_DoDeinit ( void  )

This function implementation-specific de-initialization of power manager.

This function performs the actual implementation-specific de-initialization.

Returns
Operation status
  • STATUS_SUCCESS: Operation was successful.
  • STATUS_ERROR: Operation failed.

Definition at line 162 of file power_manager_S32K1xx.c.

status_t POWER_SYS_DoInit ( void  )

This function implementation-specific configuration of power modes.

This function performs the actual implementation-specific initialization based on the provided power mode configurations.

Returns
Operation status
  • STATUS_SUCCESS: Operation was successful.
  • STATUS_ERROR: Operation failed.

Definition at line 141 of file power_manager_S32K1xx.c.

status_t POWER_SYS_DoSetMode ( const power_manager_user_config_t *const  configPtr)

This function configures the power mode.

This function performs the actual implementation-specific logic to switch to one of the defined power modes.

Parameters
configPtrPointer to user configuration structure
Returns
Operation status
  • STATUS_SUCCESS: Operation was successful.
  • STATUS_ERROR: Operation failed.

Definition at line 175 of file power_manager_S32K1xx.c.