1 /*
2  * Copyright 1997-2016 Freescale Semiconductor, Inc.
3  * Copyright 2016-2022 NXP
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 /*!
9  * @file S32K144W_SIM.h
10  * @version 1.4
11  * @date 2022-02-09
12  * @brief Peripheral Access Layer for S32K144W_SIM
13  *
14  * This file contains register definitions and macros for easy access to their
15  * bit fields.
16  *
17  * This file assumes LITTLE endian system.
18  */
19 
20 /**
21 * @page misra_violations MISRA-C:2012 violations
22 *
23 * @section [global]
24 * Violates MISRA 2012 Advisory Rule 2.3, local typedef not referenced
25 * The SoC header defines typedef for all modules.
26 *
27 * @section [global]
28 * Violates MISRA 2012 Advisory Rule 2.5, local macro not referenced
29 * The SoC header defines macros for all modules and registers.
30 *
31 * @section [global]
32 * Violates MISRA 2012 Advisory Directive 4.9, Function-like macro
33 * These are generated macros used for accessing the bit-fields from registers.
34 *
35 * @section [global]
36 * Violates MISRA 2012 Required Rule 5.1, identifier clash
37 * The supported compilers use more than 31 significant characters for identifiers.
38 *
39 * @section [global]
40 * Violates MISRA 2012 Required Rule 5.2, identifier clash
41 * The supported compilers use more than 31 significant characters for identifiers.
42 *
43 * @section [global]
44 * Violates MISRA 2012 Required Rule 5.4, identifier clash
45 * The supported compilers use more than 31 significant characters for identifiers.
46 *
47 * @section [global]
48 * Violates MISRA 2012 Required Rule 5.5, identifier clash
49 * The supported compilers use more than 31 significant characters for identifiers.
50 *
51 * @section [global]
52 * Violates MISRA 2012 Required Rule 21.1, defined macro '__I' is reserved to the compiler
53 * This type qualifier is needed to ensure correct I/O access and addressing.
54 */
55 
56 /* Prevention from multiple including the same memory map */
57 #if !defined(S32K144W_SIM_H_)  /* Check if memory map has not been already included */
58 #define S32K144W_SIM_H_
59 
60 #include "S32K144W_COMMON.h"
61 
62 /* ----------------------------------------------------------------------------
63    -- SIM Peripheral Access Layer
64    ---------------------------------------------------------------------------- */
65 
66 /*!
67  * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer
68  * @{
69  */
70 
71 /** SIM - Register Layout Typedef */
72 typedef struct {
73   uint8_t RESERVED_0[4];
74   __IO uint32_t CHIPCTL;                           /**< Chip Control register, offset: 0x4 */
75   uint8_t RESERVED_1[4];
76   __IO uint32_t FTMOPT0;                           /**< FTM Option Register 0, offset: 0xC */
77   __IO uint32_t LPOCLKS;                           /**< LPO Clock Select Register, offset: 0x10 */
78   uint8_t RESERVED_2[4];
79   __IO uint32_t ADCOPT;                            /**< ADC Options Register, offset: 0x18 */
80   __IO uint32_t FTMOPT1;                           /**< FTM Option Register 1, offset: 0x1C */
81   __IO uint32_t MISCTRL0;                          /**< Miscellaneous control register 0, offset: 0x20 */
82   __I  uint32_t SDID;                              /**< System Device Identification Register, offset: 0x24 */
83   uint8_t RESERVED_3[24];
84   __IO uint32_t PLATCGC;                           /**< Platform Clock Gating Control Register, offset: 0x40 */
85   uint8_t RESERVED_4[8];
86   __I  uint32_t FCFG1;                             /**< Flash Configuration Register 1, offset: 0x4C */
87   uint8_t RESERVED_5[4];
88   __I  uint32_t UIDH;                              /**< Unique Identification Register High, offset: 0x54 */
89   __I  uint32_t UIDMH;                             /**< Unique Identification Register Mid-High, offset: 0x58 */
90   __I  uint32_t UIDML;                             /**< Unique Identification Register Mid Low, offset: 0x5C */
91   __I  uint32_t UIDL;                              /**< Unique Identification Register Low, offset: 0x60 */
92   uint8_t RESERVED_6[4];
93   __IO uint32_t CLKDIV4;                           /**< System Clock Divider Register 4, offset: 0x68 */
94   __IO uint32_t MISCTRL1;                          /**< Miscellaneous Control register 1, offset: 0x6C */
95 } SIM_Type, *SIM_MemMapPtr;
96 
97 /** Number of instances of the SIM module. */
98 #define SIM_INSTANCE_COUNT                       (1u)
99 
100 /* SIM - Peripheral instance base addresses */
101 /** Peripheral SIM base address */
102 #define IP_SIM_BASE                              (0x40048000u)
103 /** Peripheral SIM base pointer */
104 #define IP_SIM                                   ((SIM_Type *)IP_SIM_BASE)
105 /** Array initializer of SIM peripheral base addresses */
106 #define IP_SIM_BASE_ADDRS                        { IP_SIM_BASE }
107 /** Array initializer of SIM peripheral base pointers */
108 #define IP_SIM_BASE_PTRS                         { IP_SIM }
109 
110 /* ----------------------------------------------------------------------------
111    -- SIM Register Masks
112    ---------------------------------------------------------------------------- */
113 
114 /*!
115  * @addtogroup SIM_Register_Masks SIM Register Masks
116  * @{
117  */
118 
119 /*! @name CHIPCTL - Chip Control register */
120 /*! @{ */
121 
122 #define SIM_CHIPCTL_ADC_INTERLEAVE_EN_MASK       (0xFU)
123 #define SIM_CHIPCTL_ADC_INTERLEAVE_EN_SHIFT      (0U)
124 #define SIM_CHIPCTL_ADC_INTERLEAVE_EN_WIDTH      (4U)
125 #define SIM_CHIPCTL_ADC_INTERLEAVE_EN(x)         (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_ADC_INTERLEAVE_EN_SHIFT)) & SIM_CHIPCTL_ADC_INTERLEAVE_EN_MASK)
126 
127 #define SIM_CHIPCTL_CLKOUTSEL_MASK               (0xF0U)
128 #define SIM_CHIPCTL_CLKOUTSEL_SHIFT              (4U)
129 #define SIM_CHIPCTL_CLKOUTSEL_WIDTH              (4U)
130 #define SIM_CHIPCTL_CLKOUTSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_CLKOUTSEL_SHIFT)) & SIM_CHIPCTL_CLKOUTSEL_MASK)
131 
132 #define SIM_CHIPCTL_CLKOUTDIV_MASK               (0x700U)
133 #define SIM_CHIPCTL_CLKOUTDIV_SHIFT              (8U)
134 #define SIM_CHIPCTL_CLKOUTDIV_WIDTH              (3U)
135 #define SIM_CHIPCTL_CLKOUTDIV(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_CLKOUTDIV_SHIFT)) & SIM_CHIPCTL_CLKOUTDIV_MASK)
136 
137 #define SIM_CHIPCTL_CLKOUTEN_MASK                (0x800U)
138 #define SIM_CHIPCTL_CLKOUTEN_SHIFT               (11U)
139 #define SIM_CHIPCTL_CLKOUTEN_WIDTH               (1U)
140 #define SIM_CHIPCTL_CLKOUTEN(x)                  (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_CLKOUTEN_SHIFT)) & SIM_CHIPCTL_CLKOUTEN_MASK)
141 
142 #define SIM_CHIPCTL_TRACECLK_SEL_MASK            (0x1000U)
143 #define SIM_CHIPCTL_TRACECLK_SEL_SHIFT           (12U)
144 #define SIM_CHIPCTL_TRACECLK_SEL_WIDTH           (1U)
145 #define SIM_CHIPCTL_TRACECLK_SEL(x)              (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_TRACECLK_SEL_SHIFT)) & SIM_CHIPCTL_TRACECLK_SEL_MASK)
146 
147 #define SIM_CHIPCTL_PDB_BB_SEL_MASK              (0x2000U)
148 #define SIM_CHIPCTL_PDB_BB_SEL_SHIFT             (13U)
149 #define SIM_CHIPCTL_PDB_BB_SEL_WIDTH             (1U)
150 #define SIM_CHIPCTL_PDB_BB_SEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_PDB_BB_SEL_SHIFT)) & SIM_CHIPCTL_PDB_BB_SEL_MASK)
151 
152 #define SIM_CHIPCTL_ADC_SUPPLY_MASK              (0x70000U)
153 #define SIM_CHIPCTL_ADC_SUPPLY_SHIFT             (16U)
154 #define SIM_CHIPCTL_ADC_SUPPLY_WIDTH             (3U)
155 #define SIM_CHIPCTL_ADC_SUPPLY(x)                (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_ADC_SUPPLY_SHIFT)) & SIM_CHIPCTL_ADC_SUPPLY_MASK)
156 
157 #define SIM_CHIPCTL_ADC_SUPPLYEN_MASK            (0x80000U)
158 #define SIM_CHIPCTL_ADC_SUPPLYEN_SHIFT           (19U)
159 #define SIM_CHIPCTL_ADC_SUPPLYEN_WIDTH           (1U)
160 #define SIM_CHIPCTL_ADC_SUPPLYEN(x)              (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_ADC_SUPPLYEN_SHIFT)) & SIM_CHIPCTL_ADC_SUPPLYEN_MASK)
161 
162 #define SIM_CHIPCTL_SRAMU_RETEN_MASK             (0x100000U)
163 #define SIM_CHIPCTL_SRAMU_RETEN_SHIFT            (20U)
164 #define SIM_CHIPCTL_SRAMU_RETEN_WIDTH            (1U)
165 #define SIM_CHIPCTL_SRAMU_RETEN(x)               (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_SRAMU_RETEN_SHIFT)) & SIM_CHIPCTL_SRAMU_RETEN_MASK)
166 
167 #define SIM_CHIPCTL_SRAML_RETEN_MASK             (0x200000U)
168 #define SIM_CHIPCTL_SRAML_RETEN_SHIFT            (21U)
169 #define SIM_CHIPCTL_SRAML_RETEN_WIDTH            (1U)
170 #define SIM_CHIPCTL_SRAML_RETEN(x)               (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_SRAML_RETEN_SHIFT)) & SIM_CHIPCTL_SRAML_RETEN_MASK)
171 
172 #define SIM_CHIPCTL_PDB_BB_SEL_1_MASK            (0x400000U)
173 #define SIM_CHIPCTL_PDB_BB_SEL_1_SHIFT           (22U)
174 #define SIM_CHIPCTL_PDB_BB_SEL_1_WIDTH           (1U)
175 #define SIM_CHIPCTL_PDB_BB_SEL_1(x)              (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_PDB_BB_SEL_1_SHIFT)) & SIM_CHIPCTL_PDB_BB_SEL_1_MASK)
176 
177 #define SIM_CHIPCTL_PDB_BB_SEL_2_MASK            (0x800000U)
178 #define SIM_CHIPCTL_PDB_BB_SEL_2_SHIFT           (23U)
179 #define SIM_CHIPCTL_PDB_BB_SEL_2_WIDTH           (1U)
180 #define SIM_CHIPCTL_PDB_BB_SEL_2(x)              (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTL_PDB_BB_SEL_2_SHIFT)) & SIM_CHIPCTL_PDB_BB_SEL_2_MASK)
181 /*! @} */
182 
183 /*! @name FTMOPT0 - FTM Option Register 0 */
184 /*! @{ */
185 
186 #define SIM_FTMOPT0_FTM0FLTxSEL_MASK             (0x7U)
187 #define SIM_FTMOPT0_FTM0FLTxSEL_SHIFT            (0U)
188 #define SIM_FTMOPT0_FTM0FLTxSEL_WIDTH            (3U)
189 #define SIM_FTMOPT0_FTM0FLTxSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM0FLTxSEL_SHIFT)) & SIM_FTMOPT0_FTM0FLTxSEL_MASK)
190 
191 #define SIM_FTMOPT0_FTM1FLTxSEL_MASK             (0x70U)
192 #define SIM_FTMOPT0_FTM1FLTxSEL_SHIFT            (4U)
193 #define SIM_FTMOPT0_FTM1FLTxSEL_WIDTH            (3U)
194 #define SIM_FTMOPT0_FTM1FLTxSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM1FLTxSEL_SHIFT)) & SIM_FTMOPT0_FTM1FLTxSEL_MASK)
195 
196 #define SIM_FTMOPT0_FTM2FLTxSEL_MASK             (0x700U)
197 #define SIM_FTMOPT0_FTM2FLTxSEL_SHIFT            (8U)
198 #define SIM_FTMOPT0_FTM2FLTxSEL_WIDTH            (3U)
199 #define SIM_FTMOPT0_FTM2FLTxSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM2FLTxSEL_SHIFT)) & SIM_FTMOPT0_FTM2FLTxSEL_MASK)
200 
201 #define SIM_FTMOPT0_FTM3FLTxSEL_MASK             (0x7000U)
202 #define SIM_FTMOPT0_FTM3FLTxSEL_SHIFT            (12U)
203 #define SIM_FTMOPT0_FTM3FLTxSEL_WIDTH            (3U)
204 #define SIM_FTMOPT0_FTM3FLTxSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM3FLTxSEL_SHIFT)) & SIM_FTMOPT0_FTM3FLTxSEL_MASK)
205 
206 #define SIM_FTMOPT0_FTM0CLKSEL_MASK              (0x3000000U)
207 #define SIM_FTMOPT0_FTM0CLKSEL_SHIFT             (24U)
208 #define SIM_FTMOPT0_FTM0CLKSEL_WIDTH             (2U)
209 #define SIM_FTMOPT0_FTM0CLKSEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM0CLKSEL_SHIFT)) & SIM_FTMOPT0_FTM0CLKSEL_MASK)
210 
211 #define SIM_FTMOPT0_FTM1CLKSEL_MASK              (0xC000000U)
212 #define SIM_FTMOPT0_FTM1CLKSEL_SHIFT             (26U)
213 #define SIM_FTMOPT0_FTM1CLKSEL_WIDTH             (2U)
214 #define SIM_FTMOPT0_FTM1CLKSEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM1CLKSEL_SHIFT)) & SIM_FTMOPT0_FTM1CLKSEL_MASK)
215 
216 #define SIM_FTMOPT0_FTM2CLKSEL_MASK              (0x30000000U)
217 #define SIM_FTMOPT0_FTM2CLKSEL_SHIFT             (28U)
218 #define SIM_FTMOPT0_FTM2CLKSEL_WIDTH             (2U)
219 #define SIM_FTMOPT0_FTM2CLKSEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM2CLKSEL_SHIFT)) & SIM_FTMOPT0_FTM2CLKSEL_MASK)
220 
221 #define SIM_FTMOPT0_FTM3CLKSEL_MASK              (0xC0000000U)
222 #define SIM_FTMOPT0_FTM3CLKSEL_SHIFT             (30U)
223 #define SIM_FTMOPT0_FTM3CLKSEL_WIDTH             (2U)
224 #define SIM_FTMOPT0_FTM3CLKSEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT0_FTM3CLKSEL_SHIFT)) & SIM_FTMOPT0_FTM3CLKSEL_MASK)
225 /*! @} */
226 
227 /*! @name LPOCLKS - LPO Clock Select Register */
228 /*! @{ */
229 
230 #define SIM_LPOCLKS_LPO1KCLKEN_MASK              (0x1U)
231 #define SIM_LPOCLKS_LPO1KCLKEN_SHIFT             (0U)
232 #define SIM_LPOCLKS_LPO1KCLKEN_WIDTH             (1U)
233 #define SIM_LPOCLKS_LPO1KCLKEN(x)                (((uint32_t)(((uint32_t)(x)) << SIM_LPOCLKS_LPO1KCLKEN_SHIFT)) & SIM_LPOCLKS_LPO1KCLKEN_MASK)
234 
235 #define SIM_LPOCLKS_LPO32KCLKEN_MASK             (0x2U)
236 #define SIM_LPOCLKS_LPO32KCLKEN_SHIFT            (1U)
237 #define SIM_LPOCLKS_LPO32KCLKEN_WIDTH            (1U)
238 #define SIM_LPOCLKS_LPO32KCLKEN(x)               (((uint32_t)(((uint32_t)(x)) << SIM_LPOCLKS_LPO32KCLKEN_SHIFT)) & SIM_LPOCLKS_LPO32KCLKEN_MASK)
239 
240 #define SIM_LPOCLKS_LPOCLKSEL_MASK               (0xCU)
241 #define SIM_LPOCLKS_LPOCLKSEL_SHIFT              (2U)
242 #define SIM_LPOCLKS_LPOCLKSEL_WIDTH              (2U)
243 #define SIM_LPOCLKS_LPOCLKSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_LPOCLKS_LPOCLKSEL_SHIFT)) & SIM_LPOCLKS_LPOCLKSEL_MASK)
244 
245 #define SIM_LPOCLKS_RTCCLKSEL_MASK               (0x30U)
246 #define SIM_LPOCLKS_RTCCLKSEL_SHIFT              (4U)
247 #define SIM_LPOCLKS_RTCCLKSEL_WIDTH              (2U)
248 #define SIM_LPOCLKS_RTCCLKSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_LPOCLKS_RTCCLKSEL_SHIFT)) & SIM_LPOCLKS_RTCCLKSEL_MASK)
249 /*! @} */
250 
251 /*! @name ADCOPT - ADC Options Register */
252 /*! @{ */
253 
254 #define SIM_ADCOPT_ADC0TRGSEL_MASK               (0x1U)
255 #define SIM_ADCOPT_ADC0TRGSEL_SHIFT              (0U)
256 #define SIM_ADCOPT_ADC0TRGSEL_WIDTH              (1U)
257 #define SIM_ADCOPT_ADC0TRGSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0TRGSEL_SHIFT)) & SIM_ADCOPT_ADC0TRGSEL_MASK)
258 
259 #define SIM_ADCOPT_ADC0SWPRETRG_MASK             (0xEU)
260 #define SIM_ADCOPT_ADC0SWPRETRG_SHIFT            (1U)
261 #define SIM_ADCOPT_ADC0SWPRETRG_WIDTH            (3U)
262 #define SIM_ADCOPT_ADC0SWPRETRG(x)               (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0SWPRETRG_SHIFT)) & SIM_ADCOPT_ADC0SWPRETRG_MASK)
263 
264 #define SIM_ADCOPT_ADC0PRETRGSEL_MASK            (0x30U)
265 #define SIM_ADCOPT_ADC0PRETRGSEL_SHIFT           (4U)
266 #define SIM_ADCOPT_ADC0PRETRGSEL_WIDTH           (2U)
267 #define SIM_ADCOPT_ADC0PRETRGSEL(x)              (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0PRETRGSEL_SHIFT)) & SIM_ADCOPT_ADC0PRETRGSEL_MASK)
268 
269 #define SIM_ADCOPT_ADC1TRGSEL_MASK               (0x100U)
270 #define SIM_ADCOPT_ADC1TRGSEL_SHIFT              (8U)
271 #define SIM_ADCOPT_ADC1TRGSEL_WIDTH              (1U)
272 #define SIM_ADCOPT_ADC1TRGSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC1TRGSEL_SHIFT)) & SIM_ADCOPT_ADC1TRGSEL_MASK)
273 
274 #define SIM_ADCOPT_ADC1SWPRETRG_MASK             (0xE00U)
275 #define SIM_ADCOPT_ADC1SWPRETRG_SHIFT            (9U)
276 #define SIM_ADCOPT_ADC1SWPRETRG_WIDTH            (3U)
277 #define SIM_ADCOPT_ADC1SWPRETRG(x)               (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC1SWPRETRG_SHIFT)) & SIM_ADCOPT_ADC1SWPRETRG_MASK)
278 
279 #define SIM_ADCOPT_ADC1PRETRGSEL_MASK            (0x3000U)
280 #define SIM_ADCOPT_ADC1PRETRGSEL_SHIFT           (12U)
281 #define SIM_ADCOPT_ADC1PRETRGSEL_WIDTH           (2U)
282 #define SIM_ADCOPT_ADC1PRETRGSEL(x)              (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC1PRETRGSEL_SHIFT)) & SIM_ADCOPT_ADC1PRETRGSEL_MASK)
283 /*! @} */
284 
285 /*! @name FTMOPT1 - FTM Option Register 1 */
286 /*! @{ */
287 
288 #define SIM_FTMOPT1_FTM0SYNCBIT_MASK             (0x1U)
289 #define SIM_FTMOPT1_FTM0SYNCBIT_SHIFT            (0U)
290 #define SIM_FTMOPT1_FTM0SYNCBIT_WIDTH            (1U)
291 #define SIM_FTMOPT1_FTM0SYNCBIT(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM0SYNCBIT_SHIFT)) & SIM_FTMOPT1_FTM0SYNCBIT_MASK)
292 
293 #define SIM_FTMOPT1_FTM1SYNCBIT_MASK             (0x2U)
294 #define SIM_FTMOPT1_FTM1SYNCBIT_SHIFT            (1U)
295 #define SIM_FTMOPT1_FTM1SYNCBIT_WIDTH            (1U)
296 #define SIM_FTMOPT1_FTM1SYNCBIT(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM1SYNCBIT_SHIFT)) & SIM_FTMOPT1_FTM1SYNCBIT_MASK)
297 
298 #define SIM_FTMOPT1_FTM2SYNCBIT_MASK             (0x4U)
299 #define SIM_FTMOPT1_FTM2SYNCBIT_SHIFT            (2U)
300 #define SIM_FTMOPT1_FTM2SYNCBIT_WIDTH            (1U)
301 #define SIM_FTMOPT1_FTM2SYNCBIT(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM2SYNCBIT_SHIFT)) & SIM_FTMOPT1_FTM2SYNCBIT_MASK)
302 
303 #define SIM_FTMOPT1_FTM3SYNCBIT_MASK             (0x8U)
304 #define SIM_FTMOPT1_FTM3SYNCBIT_SHIFT            (3U)
305 #define SIM_FTMOPT1_FTM3SYNCBIT_WIDTH            (1U)
306 #define SIM_FTMOPT1_FTM3SYNCBIT(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM3SYNCBIT_SHIFT)) & SIM_FTMOPT1_FTM3SYNCBIT_MASK)
307 
308 #define SIM_FTMOPT1_FTM1CH0SEL_MASK              (0x30U)
309 #define SIM_FTMOPT1_FTM1CH0SEL_SHIFT             (4U)
310 #define SIM_FTMOPT1_FTM1CH0SEL_WIDTH             (2U)
311 #define SIM_FTMOPT1_FTM1CH0SEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM1CH0SEL_SHIFT)) & SIM_FTMOPT1_FTM1CH0SEL_MASK)
312 
313 #define SIM_FTMOPT1_FTM2CH0SEL_MASK              (0xC0U)
314 #define SIM_FTMOPT1_FTM2CH0SEL_SHIFT             (6U)
315 #define SIM_FTMOPT1_FTM2CH0SEL_WIDTH             (2U)
316 #define SIM_FTMOPT1_FTM2CH0SEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM2CH0SEL_SHIFT)) & SIM_FTMOPT1_FTM2CH0SEL_MASK)
317 
318 #define SIM_FTMOPT1_FTM2CH1SEL_MASK              (0x100U)
319 #define SIM_FTMOPT1_FTM2CH1SEL_SHIFT             (8U)
320 #define SIM_FTMOPT1_FTM2CH1SEL_WIDTH             (1U)
321 #define SIM_FTMOPT1_FTM2CH1SEL(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM2CH1SEL_SHIFT)) & SIM_FTMOPT1_FTM2CH1SEL_MASK)
322 
323 #define SIM_FTMOPT1_FTMGLDOK_MASK                (0x8000U)
324 #define SIM_FTMOPT1_FTMGLDOK_SHIFT               (15U)
325 #define SIM_FTMOPT1_FTMGLDOK_WIDTH               (1U)
326 #define SIM_FTMOPT1_FTMGLDOK(x)                  (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTMGLDOK_SHIFT)) & SIM_FTMOPT1_FTMGLDOK_MASK)
327 
328 #define SIM_FTMOPT1_FTM0_OUTSEL_MASK             (0xFF0000U)
329 #define SIM_FTMOPT1_FTM0_OUTSEL_SHIFT            (16U)
330 #define SIM_FTMOPT1_FTM0_OUTSEL_WIDTH            (8U)
331 #define SIM_FTMOPT1_FTM0_OUTSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM0_OUTSEL_SHIFT)) & SIM_FTMOPT1_FTM0_OUTSEL_MASK)
332 
333 #define SIM_FTMOPT1_FTM3_OUTSEL_MASK             (0xFF000000U)
334 #define SIM_FTMOPT1_FTM3_OUTSEL_SHIFT            (24U)
335 #define SIM_FTMOPT1_FTM3_OUTSEL_WIDTH            (8U)
336 #define SIM_FTMOPT1_FTM3_OUTSEL(x)               (((uint32_t)(((uint32_t)(x)) << SIM_FTMOPT1_FTM3_OUTSEL_SHIFT)) & SIM_FTMOPT1_FTM3_OUTSEL_MASK)
337 /*! @} */
338 
339 /*! @name MISCTRL0 - Miscellaneous control register 0 */
340 /*! @{ */
341 
342 #define SIM_MISCTRL0_STOP1_MONITOR_MASK          (0x200U)
343 #define SIM_MISCTRL0_STOP1_MONITOR_SHIFT         (9U)
344 #define SIM_MISCTRL0_STOP1_MONITOR_WIDTH         (1U)
345 #define SIM_MISCTRL0_STOP1_MONITOR(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_STOP1_MONITOR_SHIFT)) & SIM_MISCTRL0_STOP1_MONITOR_MASK)
346 
347 #define SIM_MISCTRL0_STOP2_MONITOR_MASK          (0x400U)
348 #define SIM_MISCTRL0_STOP2_MONITOR_SHIFT         (10U)
349 #define SIM_MISCTRL0_STOP2_MONITOR_WIDTH         (1U)
350 #define SIM_MISCTRL0_STOP2_MONITOR(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_STOP2_MONITOR_SHIFT)) & SIM_MISCTRL0_STOP2_MONITOR_MASK)
351 
352 #define SIM_MISCTRL0_ECC_EEERAM_STAT_MASK        (0x800U)
353 #define SIM_MISCTRL0_ECC_EEERAM_STAT_SHIFT       (11U)
354 #define SIM_MISCTRL0_ECC_EEERAM_STAT_WIDTH       (1U)
355 #define SIM_MISCTRL0_ECC_EEERAM_STAT(x)          (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_ECC_EEERAM_STAT_SHIFT)) & SIM_MISCTRL0_ECC_EEERAM_STAT_MASK)
356 
357 #define SIM_MISCTRL0_ECC_MGRAM_STAT_MASK         (0x1000U)
358 #define SIM_MISCTRL0_ECC_MGRAM_STAT_SHIFT        (12U)
359 #define SIM_MISCTRL0_ECC_MGRAM_STAT_WIDTH        (1U)
360 #define SIM_MISCTRL0_ECC_MGRAM_STAT(x)           (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_ECC_MGRAM_STAT_SHIFT)) & SIM_MISCTRL0_ECC_MGRAM_STAT_MASK)
361 
362 #define SIM_MISCTRL0_FTM0_OBE_CTRL_MASK          (0x10000U)
363 #define SIM_MISCTRL0_FTM0_OBE_CTRL_SHIFT         (16U)
364 #define SIM_MISCTRL0_FTM0_OBE_CTRL_WIDTH         (1U)
365 #define SIM_MISCTRL0_FTM0_OBE_CTRL(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_FTM0_OBE_CTRL_SHIFT)) & SIM_MISCTRL0_FTM0_OBE_CTRL_MASK)
366 
367 #define SIM_MISCTRL0_FTM1_OBE_CTRL_MASK          (0x20000U)
368 #define SIM_MISCTRL0_FTM1_OBE_CTRL_SHIFT         (17U)
369 #define SIM_MISCTRL0_FTM1_OBE_CTRL_WIDTH         (1U)
370 #define SIM_MISCTRL0_FTM1_OBE_CTRL(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_FTM1_OBE_CTRL_SHIFT)) & SIM_MISCTRL0_FTM1_OBE_CTRL_MASK)
371 
372 #define SIM_MISCTRL0_FTM2_OBE_CTRL_MASK          (0x40000U)
373 #define SIM_MISCTRL0_FTM2_OBE_CTRL_SHIFT         (18U)
374 #define SIM_MISCTRL0_FTM2_OBE_CTRL_WIDTH         (1U)
375 #define SIM_MISCTRL0_FTM2_OBE_CTRL(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_FTM2_OBE_CTRL_SHIFT)) & SIM_MISCTRL0_FTM2_OBE_CTRL_MASK)
376 
377 #define SIM_MISCTRL0_FTM3_OBE_CTRL_MASK          (0x80000U)
378 #define SIM_MISCTRL0_FTM3_OBE_CTRL_SHIFT         (19U)
379 #define SIM_MISCTRL0_FTM3_OBE_CTRL_WIDTH         (1U)
380 #define SIM_MISCTRL0_FTM3_OBE_CTRL(x)            (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_FTM3_OBE_CTRL_SHIFT)) & SIM_MISCTRL0_FTM3_OBE_CTRL_MASK)
381 /*! @} */
382 
383 /*! @name SDID - System Device Identification Register */
384 /*! @{ */
385 
386 #define SIM_SDID_FEATURES_MASK                   (0xFFU)
387 #define SIM_SDID_FEATURES_SHIFT                  (0U)
388 #define SIM_SDID_FEATURES_WIDTH                  (8U)
389 #define SIM_SDID_FEATURES(x)                     (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FEATURES_SHIFT)) & SIM_SDID_FEATURES_MASK)
390 
391 #define SIM_SDID_PACKAGE_MASK                    (0xF00U)
392 #define SIM_SDID_PACKAGE_SHIFT                   (8U)
393 #define SIM_SDID_PACKAGE_WIDTH                   (4U)
394 #define SIM_SDID_PACKAGE(x)                      (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PACKAGE_SHIFT)) & SIM_SDID_PACKAGE_MASK)
395 
396 #define SIM_SDID_REVID_MASK                      (0xF000U)
397 #define SIM_SDID_REVID_SHIFT                     (12U)
398 #define SIM_SDID_REVID_WIDTH                     (4U)
399 #define SIM_SDID_REVID(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK)
400 
401 #define SIM_SDID_RAMSIZE_MASK                    (0xF0000U)
402 #define SIM_SDID_RAMSIZE_SHIFT                   (16U)
403 #define SIM_SDID_RAMSIZE_WIDTH                   (4U)
404 #define SIM_SDID_RAMSIZE(x)                      (((uint32_t)(((uint32_t)(x)) << SIM_SDID_RAMSIZE_SHIFT)) & SIM_SDID_RAMSIZE_MASK)
405 
406 #define SIM_SDID_DERIVATE_MASK                   (0xF00000U)
407 #define SIM_SDID_DERIVATE_SHIFT                  (20U)
408 #define SIM_SDID_DERIVATE_WIDTH                  (4U)
409 #define SIM_SDID_DERIVATE(x)                     (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DERIVATE_SHIFT)) & SIM_SDID_DERIVATE_MASK)
410 
411 #define SIM_SDID_SUBSERIES_MASK                  (0xF000000U)
412 #define SIM_SDID_SUBSERIES_SHIFT                 (24U)
413 #define SIM_SDID_SUBSERIES_WIDTH                 (4U)
414 #define SIM_SDID_SUBSERIES(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBSERIES_SHIFT)) & SIM_SDID_SUBSERIES_MASK)
415 
416 #define SIM_SDID_GENERATION_MASK                 (0xF0000000U)
417 #define SIM_SDID_GENERATION_SHIFT                (28U)
418 #define SIM_SDID_GENERATION_WIDTH                (4U)
419 #define SIM_SDID_GENERATION(x)                   (((uint32_t)(((uint32_t)(x)) << SIM_SDID_GENERATION_SHIFT)) & SIM_SDID_GENERATION_MASK)
420 /*! @} */
421 
422 /*! @name PLATCGC - Platform Clock Gating Control Register */
423 /*! @{ */
424 
425 #define SIM_PLATCGC_CGCMSCM_MASK                 (0x1U)
426 #define SIM_PLATCGC_CGCMSCM_SHIFT                (0U)
427 #define SIM_PLATCGC_CGCMSCM_WIDTH                (1U)
428 #define SIM_PLATCGC_CGCMSCM(x)                   (((uint32_t)(((uint32_t)(x)) << SIM_PLATCGC_CGCMSCM_SHIFT)) & SIM_PLATCGC_CGCMSCM_MASK)
429 
430 #define SIM_PLATCGC_CGCMPU_MASK                  (0x2U)
431 #define SIM_PLATCGC_CGCMPU_SHIFT                 (1U)
432 #define SIM_PLATCGC_CGCMPU_WIDTH                 (1U)
433 #define SIM_PLATCGC_CGCMPU(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_PLATCGC_CGCMPU_SHIFT)) & SIM_PLATCGC_CGCMPU_MASK)
434 
435 #define SIM_PLATCGC_CGCDMA_MASK                  (0x4U)
436 #define SIM_PLATCGC_CGCDMA_SHIFT                 (2U)
437 #define SIM_PLATCGC_CGCDMA_WIDTH                 (1U)
438 #define SIM_PLATCGC_CGCDMA(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_PLATCGC_CGCDMA_SHIFT)) & SIM_PLATCGC_CGCDMA_MASK)
439 
440 #define SIM_PLATCGC_CGCERM_MASK                  (0x8U)
441 #define SIM_PLATCGC_CGCERM_SHIFT                 (3U)
442 #define SIM_PLATCGC_CGCERM_WIDTH                 (1U)
443 #define SIM_PLATCGC_CGCERM(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_PLATCGC_CGCERM_SHIFT)) & SIM_PLATCGC_CGCERM_MASK)
444 
445 #define SIM_PLATCGC_CGCEIM_MASK                  (0x10U)
446 #define SIM_PLATCGC_CGCEIM_SHIFT                 (4U)
447 #define SIM_PLATCGC_CGCEIM_WIDTH                 (1U)
448 #define SIM_PLATCGC_CGCEIM(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_PLATCGC_CGCEIM_SHIFT)) & SIM_PLATCGC_CGCEIM_MASK)
449 /*! @} */
450 
451 /*! @name FCFG1 - Flash Configuration Register 1 */
452 /*! @{ */
453 
454 #define SIM_FCFG1_DEPART_MASK                    (0xF000U)
455 #define SIM_FCFG1_DEPART_SHIFT                   (12U)
456 #define SIM_FCFG1_DEPART_WIDTH                   (4U)
457 #define SIM_FCFG1_DEPART(x)                      (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_DEPART_SHIFT)) & SIM_FCFG1_DEPART_MASK)
458 
459 #define SIM_FCFG1_EEERAMSIZE_MASK                (0xF0000U)
460 #define SIM_FCFG1_EEERAMSIZE_SHIFT               (16U)
461 #define SIM_FCFG1_EEERAMSIZE_WIDTH               (4U)
462 #define SIM_FCFG1_EEERAMSIZE(x)                  (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_EEERAMSIZE_SHIFT)) & SIM_FCFG1_EEERAMSIZE_MASK)
463 /*! @} */
464 
465 /*! @name UIDH - Unique Identification Register High */
466 /*! @{ */
467 
468 #define SIM_UIDH_UID127_96_MASK                  (0xFFFFFFFFU)
469 #define SIM_UIDH_UID127_96_SHIFT                 (0U)
470 #define SIM_UIDH_UID127_96_WIDTH                 (32U)
471 #define SIM_UIDH_UID127_96(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID127_96_SHIFT)) & SIM_UIDH_UID127_96_MASK)
472 /*! @} */
473 
474 /*! @name UIDMH - Unique Identification Register Mid-High */
475 /*! @{ */
476 
477 #define SIM_UIDMH_UID95_64_MASK                  (0xFFFFFFFFU)
478 #define SIM_UIDMH_UID95_64_SHIFT                 (0U)
479 #define SIM_UIDMH_UID95_64_WIDTH                 (32U)
480 #define SIM_UIDMH_UID95_64(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_UIDMH_UID95_64_SHIFT)) & SIM_UIDMH_UID95_64_MASK)
481 /*! @} */
482 
483 /*! @name UIDML - Unique Identification Register Mid Low */
484 /*! @{ */
485 
486 #define SIM_UIDML_UID63_32_MASK                  (0xFFFFFFFFU)
487 #define SIM_UIDML_UID63_32_SHIFT                 (0U)
488 #define SIM_UIDML_UID63_32_WIDTH                 (32U)
489 #define SIM_UIDML_UID63_32(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_UIDML_UID63_32_SHIFT)) & SIM_UIDML_UID63_32_MASK)
490 /*! @} */
491 
492 /*! @name UIDL - Unique Identification Register Low */
493 /*! @{ */
494 
495 #define SIM_UIDL_UID31_0_MASK                    (0xFFFFFFFFU)
496 #define SIM_UIDL_UID31_0_SHIFT                   (0U)
497 #define SIM_UIDL_UID31_0_WIDTH                   (32U)
498 #define SIM_UIDL_UID31_0(x)                      (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID31_0_SHIFT)) & SIM_UIDL_UID31_0_MASK)
499 /*! @} */
500 
501 /*! @name CLKDIV4 - System Clock Divider Register 4 */
502 /*! @{ */
503 
504 #define SIM_CLKDIV4_TRACEFRAC_MASK               (0x1U)
505 #define SIM_CLKDIV4_TRACEFRAC_SHIFT              (0U)
506 #define SIM_CLKDIV4_TRACEFRAC_WIDTH              (1U)
507 #define SIM_CLKDIV4_TRACEFRAC(x)                 (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEFRAC_SHIFT)) & SIM_CLKDIV4_TRACEFRAC_MASK)
508 
509 #define SIM_CLKDIV4_TRACEDIV_MASK                (0xEU)
510 #define SIM_CLKDIV4_TRACEDIV_SHIFT               (1U)
511 #define SIM_CLKDIV4_TRACEDIV_WIDTH               (3U)
512 #define SIM_CLKDIV4_TRACEDIV(x)                  (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEDIV_SHIFT)) & SIM_CLKDIV4_TRACEDIV_MASK)
513 
514 #define SIM_CLKDIV4_TRACEDIVEN_MASK              (0x10000000U)
515 #define SIM_CLKDIV4_TRACEDIVEN_SHIFT             (28U)
516 #define SIM_CLKDIV4_TRACEDIVEN_WIDTH             (1U)
517 #define SIM_CLKDIV4_TRACEDIVEN(x)                (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEDIVEN_SHIFT)) & SIM_CLKDIV4_TRACEDIVEN_MASK)
518 /*! @} */
519 
520 /*! @name MISCTRL1 - Miscellaneous Control register 1 */
521 /*! @{ */
522 
523 #define SIM_MISCTRL1_SW_TRG_MASK                 (0x1U)
524 #define SIM_MISCTRL1_SW_TRG_SHIFT                (0U)
525 #define SIM_MISCTRL1_SW_TRG_WIDTH                (1U)
526 #define SIM_MISCTRL1_SW_TRG(x)                   (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SW_TRG_SHIFT)) & SIM_MISCTRL1_SW_TRG_MASK)
527 /*! @} */
528 
529 /*!
530  * @}
531  */ /* end of group SIM_Register_Masks */
532 
533 /*!
534  * @}
535  */ /* end of group SIM_Peripheral_Access_Layer */
536 
537 #endif  /* #if !defined(S32K144W_SIM_H_) */
538