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  ******************************************************************************/
61 typedef enum
62 {
63 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
64  POWER_MANAGER_HSRUN,
65 #endif
68 #if FEATURE_SMC_HAS_WAIT_VLPW
69  POWER_MANAGER_WAIT,
70  POWER_MANAGER_VLPW,
71 #endif
72 #if FEATURE_SMC_HAS_PSTOPO
73  POWER_MANAGER_PSTOP1,
74  POWER_MANAGER_PSTOP2,
75 #endif
76 #if FEATURE_SMC_HAS_STOPO
79 #endif
83 
98 typedef struct
99 {
103 
108 typedef enum
109 {
110  STAT_RUN = 0x01,
111  STAT_STOP = 0x02,
112  STAT_VLPR = 0x04,
113  STAT_VLPW = 0x08,
114  STAT_VLPS = 0x10,
115  STAT_HSRUN = 0x80,
116  STAT_INVALID = 0xFF
118 
123 typedef enum
124 {
129 
134 typedef enum
135 {
140 
145 typedef enum
146 {
147  SMC_STOP = 0U,
149  SMC_VLPS = 2U
151 
156 typedef enum
157 {
159  SMC_STOP1 = 0x01,
160  SMC_STOP2 = 0x02
162 
167 typedef struct
168 {
169  bool vlpProt;
170 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
171  bool hsrunProt;
172 #endif
174 
179 typedef struct
180 {
182 #if FEATURE_SMC_HAS_STOPO
184 #endif
185 #if FEATURE_SMC_HAS_PSTOPO
186  bool pStopOption;
187  smc_stop_option_t pStopOptionValue;
188 #endif
190 
195 typedef struct
196 {
197  uint32_t majorNumber;
198  uint32_t minorNumber;
199  uint32_t featureNumber;
201 
206 typedef enum
207 {
211 
216 typedef enum
217 {
221 #if FEATURE_RCM_HAS_CMU_LOSS_OF_CLOCK
222  RCM_CMU_LOC = 4U,
223 #endif
227  RCM_SJTAG = 8U,
229  RCM_SOFTWARE = 10U,
230  RCM_SMDM_AP = 11U,
234 
239 typedef enum
240 {
246 
247 
252 typedef enum
253 {
259 
264 typedef struct
265 {
266  uint32_t majorNumber;
267  uint32_t minorNumber;
268  uint32_t featureNumber;
270 /*******************************************************************************
271  * API
272  ******************************************************************************/
273 
274 #if defined(__cplusplus)
275 extern "C" {
276 #endif
277 
288 
299 
311 
321 bool POWER_SYS_GetResetSrcStatusCmd(const RCM_Type * const baseAddr , const rcm_source_names_t srcName);
322 
323 #if defined(__cplusplus)
324 }
325 #endif
326 
329 #endif /* POWER_MANAGER_S32K1XX_H */
330 /*******************************************************************************
331  * EOF
332  ******************************************************************************/
smc_stop_option_t
STOP option.
power_mode_stat_t
Power Modes in PMSTAT.
rcm_reset_delay_time_t
Reset delay time.
bool POWER_SYS_GetResetSrcStatusCmd(const RCM_Type *const baseAddr, const rcm_source_names_t srcName)
Gets the reset source status.
RCM module version number.
Power mode protection configuration.
power_manager_modes_t powerModeName
pmc_int_select_t
Power management control interrupts.
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.
power_modes_protect_t
Power Modes Protection.
smc_run_mode_t
Run mode definition.
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.
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.
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.
smc_stop_option_t stopOptionValue