S32 SDK
power_manager_S32K1xx.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2016 Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
18 
19 #ifndef POWER_MANAGER_S32K1XX_H
20 #define POWER_MANAGER_S32K1XX_H
21 
26 #include "device_registers.h"
27 #include "status.h"
28 
35 /*******************************************************************************
36  * Definitions
37  ******************************************************************************/
60 typedef enum
61 {
62 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
63  POWER_MANAGER_HSRUN,
64 #endif
67 #if FEATURE_SMC_HAS_WAIT_VLPW
68  POWER_MANAGER_WAIT,
69  POWER_MANAGER_VLPW,
70 #endif
73 #if FEATURE_SMC_HAS_PSTOPO
74  POWER_MANAGER_PSTOP1,
75  POWER_MANAGER_PSTOP2,
76 #endif
77 #if FEATURE_SMC_HAS_STOPO
78  POWER_MANAGER_STOP1,
79  POWER_MANAGER_STOP2,
80 #endif
83 
98 typedef struct
99 {
104 
109 typedef enum
110 {
111  STAT_RUN = 0x01,
112  STAT_STOP = 0x02,
113  STAT_VLPR = 0x04,
114  STAT_VLPW = 0x08,
115  STAT_VLPS = 0x10,
116  STAT_HSRUN = 0x80,
117  STAT_INVALID = 0xFF
119 
124 typedef enum
125 {
130 
135 typedef enum
136 {
141 
146 typedef enum
147 {
148  SMC_STOP = 0U,
150  SMC_VLPS = 2U
152 
157 typedef enum
158 {
160  SMC_STOP1 = 0x01,
161  SMC_STOP2 = 0x02
163 
168 typedef struct
169 {
170  bool vlpProt;
171 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
172  bool hsrunProt;
173 #endif
175 
180 typedef struct
181 {
183 #if FEATURE_SMC_HAS_STOPO
184  bool stopOption;
185  smc_stop_option_t stopOptionValue;
186 #endif
187 #if FEATURE_SMC_HAS_PSTOPO
188  bool pStopOption;
189  smc_stop_option_t pStopOptionValue;
190 #endif
192 
197 typedef struct
198 {
199  uint32_t majorNumber;
200  uint32_t minorNumber;
201  uint32_t featureNumber;
203 
208 typedef enum
209 {
213 
218 typedef enum
219 {
236 
241 typedef enum
242 {
248 
249 
254 typedef enum
255 {
261 
266 typedef struct
267 {
268  uint32_t majorNumber;
269  uint32_t minorNumber;
270  uint32_t featureNumber;
272 /*******************************************************************************
273  * API
274  ******************************************************************************/
275 
276 #if defined(__cplusplus)
277 extern "C" {
278 #endif
279 
290 
301 
313 
314 #if defined(__cplusplus)
315 }
316 #endif
317 
320 #endif /* POWER_MANAGER_S32K1XX_H */
321 /*******************************************************************************
322  * EOF
323  ******************************************************************************/
smc_stop_option_t
STOP option Implements smc_stop_option_t_Class.
power_mode_stat_t
Power Modes in PMSTAT Implements power_mode_stat_t_Class.
rcm_reset_delay_time_t
Reset delay time Implements rcm_reset_delay_time_t_Class.
RCM module version number Implements rcm_version_info_t_Class.
Power mode protection configuration Implements smc_power_mode_protection_config_t_Class.
power_manager_modes_t powerModeName
pmc_int_select_t
Power management control interrupts Implements pmc_int_select_t_Class.
status_t POWER_SYS_DoDeinit(void)
This function implementation-specific de-initialization of power manager.
status_t POWER_SYS_DoInit(void)
This function implementation-specific configuration of power modes.
SMC module version number Implements smc_version_info_t_Class.
power_modes_protect_t
Power Modes Protection Implements power_modes_protect_t_Class.
smc_run_mode_t
Run mode definition Implements smc_run_mode_t_Class.
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
Definition: status.h:44
rcm_source_names_t
System Reset Source Name definitions Implements rcm_source_names_t_Class.
Power mode control configuration used for calling the SMC_SYS_SetPowerMode API Implements smc_power_m...
Power mode user configuration structure.
power_manager_modes_t
Power modes enumeration.
rcm_filter_run_wait_modes_t
Reset pin filter select in Run and Wait modes Implements rcm_filter_run_wait_modes_t_Class.
status_t POWER_SYS_DoSetMode(const power_manager_user_config_t *const configPtr)
This function configures the power mode.
smc_stop_mode_t
Stop mode definition Implements smc_stop_mode_t_Class.