]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device/MK22F51212/MK22F51212_llwu.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_K22F / device / MK22F51212 / MK22F51212_llwu.h
1 /*
2 ** ###################################################################
3 ** Compilers: Keil ARM C/C++ Compiler
4 ** Freescale C/C++ for Embedded ARM
5 ** GNU C Compiler
6 ** IAR ANSI C/C++ Compiler for ARM
7 **
8 ** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
9 ** Version: rev. 2.5, 2014-05-06
10 ** Build: b140604
11 **
12 ** Abstract:
13 ** Extension to the CMSIS register access layer header.
14 **
15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
16 ** All rights reserved.
17 **
18 ** Redistribution and use in source and binary forms, with or without modification,
19 ** are permitted provided that the following conditions are met:
20 **
21 ** o Redistributions of source code must retain the above copyright notice, this list
22 ** of conditions and the following disclaimer.
23 **
24 ** o Redistributions in binary form must reproduce the above copyright notice, this
25 ** list of conditions and the following disclaimer in the documentation and/or
26 ** other materials provided with the distribution.
27 **
28 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
29 ** contributors may be used to endorse or promote products derived from this
30 ** software without specific prior written permission.
31 **
32 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 **
43 ** http: www.freescale.com
44 ** mail: support@freescale.com
45 **
46 ** Revisions:
47 ** - rev. 1.0 (2013-07-23)
48 ** Initial version.
49 ** - rev. 1.1 (2013-09-17)
50 ** RM rev. 0.4 update.
51 ** - rev. 2.0 (2013-10-29)
52 ** Register accessor macros added to the memory map.
53 ** Symbols for Processor Expert memory map compatibility added to the memory map.
54 ** Startup file for gcc has been updated according to CMSIS 3.2.
55 ** System initialization updated.
56 ** - rev. 2.1 (2013-10-30)
57 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 ** - rev. 2.2 (2013-12-20)
59 ** Update according to reference manual rev. 0.6,
60 ** - rev. 2.3 (2014-01-13)
61 ** Update according to reference manual rev. 0.61,
62 ** - rev. 2.4 (2014-02-10)
63 ** The declaration of clock configurations has been moved to separate header file system_MK22F51212.h
64 ** - rev. 2.5 (2014-05-06)
65 ** Update according to reference manual rev. 1.0,
66 ** Update of system and startup files.
67 ** Module access macro module_BASES replaced by module_BASE_PTRS.
68 **
69 ** ###################################################################
70 */
71
72 /*
73 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
74 *
75 * This file was generated automatically and any changes may be lost.
76 */
77 #ifndef __HW_LLWU_REGISTERS_H__
78 #define __HW_LLWU_REGISTERS_H__
79
80 #include "MK22F51212.h"
81 #include "fsl_bitaccess.h"
82
83 /*
84 * MK22F51212 LLWU
85 *
86 * Low leakage wakeup unit
87 *
88 * Registers defined in this header file:
89 * - HW_LLWU_PE1 - LLWU Pin Enable 1 register
90 * - HW_LLWU_PE2 - LLWU Pin Enable 2 register
91 * - HW_LLWU_PE3 - LLWU Pin Enable 3 register
92 * - HW_LLWU_PE4 - LLWU Pin Enable 4 register
93 * - HW_LLWU_ME - LLWU Module Enable register
94 * - HW_LLWU_F1 - LLWU Flag 1 register
95 * - HW_LLWU_F2 - LLWU Flag 2 register
96 * - HW_LLWU_F3 - LLWU Flag 3 register
97 * - HW_LLWU_FILT1 - LLWU Pin Filter 1 register
98 * - HW_LLWU_FILT2 - LLWU Pin Filter 2 register
99 *
100 * - hw_llwu_t - Struct containing all module registers.
101 */
102
103 #define HW_LLWU_INSTANCE_COUNT (1U) /*!< Number of instances of the LLWU module. */
104
105 /*******************************************************************************
106 * HW_LLWU_PE1 - LLWU Pin Enable 1 register
107 ******************************************************************************/
108
109 /*!
110 * @brief HW_LLWU_PE1 - LLWU Pin Enable 1 register (RW)
111 *
112 * Reset value: 0x00U
113 *
114 * LLWU_PE1 contains the field to enable and select the edge detect type for the
115 * external wakeup input pins LLWU_P3-LLWU_P0. This register is reset on Chip
116 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
117 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
118 * IntroductionInformation found here describes the registers of the Reset Control Module
119 * (RCM). The RCM implements many of the reset functions for the chip. See the
120 * chip's reset chapter for more information. details for more information.
121 */
122 typedef union _hw_llwu_pe1
123 {
124 uint8_t U;
125 struct _hw_llwu_pe1_bitfields
126 {
127 uint8_t WUPE0 : 2; /*!< [1:0] Wakeup Pin Enable For LLWU_P0 */
128 uint8_t WUPE1 : 2; /*!< [3:2] Wakeup Pin Enable For LLWU_P1 */
129 uint8_t WUPE2 : 2; /*!< [5:4] Wakeup Pin Enable For LLWU_P2 */
130 uint8_t WUPE3 : 2; /*!< [7:6] Wakeup Pin Enable For LLWU_P3 */
131 } B;
132 } hw_llwu_pe1_t;
133
134 /*!
135 * @name Constants and macros for entire LLWU_PE1 register
136 */
137 /*@{*/
138 #define HW_LLWU_PE1_ADDR(x) ((x) + 0x0U)
139
140 #define HW_LLWU_PE1(x) (*(__IO hw_llwu_pe1_t *) HW_LLWU_PE1_ADDR(x))
141 #define HW_LLWU_PE1_RD(x) (HW_LLWU_PE1(x).U)
142 #define HW_LLWU_PE1_WR(x, v) (HW_LLWU_PE1(x).U = (v))
143 #define HW_LLWU_PE1_SET(x, v) (HW_LLWU_PE1_WR(x, HW_LLWU_PE1_RD(x) | (v)))
144 #define HW_LLWU_PE1_CLR(x, v) (HW_LLWU_PE1_WR(x, HW_LLWU_PE1_RD(x) & ~(v)))
145 #define HW_LLWU_PE1_TOG(x, v) (HW_LLWU_PE1_WR(x, HW_LLWU_PE1_RD(x) ^ (v)))
146 /*@}*/
147
148 /*
149 * Constants & macros for individual LLWU_PE1 bitfields
150 */
151
152 /*!
153 * @name Register LLWU_PE1, field WUPE0[1:0] (RW)
154 *
155 * Enables and configures the edge detection for the wakeup pin.
156 *
157 * Values:
158 * - 00 - External input pin disabled as wakeup input
159 * - 01 - External input pin enabled with rising edge detection
160 * - 10 - External input pin enabled with falling edge detection
161 * - 11 - External input pin enabled with any change detection
162 */
163 /*@{*/
164 #define BP_LLWU_PE1_WUPE0 (0U) /*!< Bit position for LLWU_PE1_WUPE0. */
165 #define BM_LLWU_PE1_WUPE0 (0x03U) /*!< Bit mask for LLWU_PE1_WUPE0. */
166 #define BS_LLWU_PE1_WUPE0 (2U) /*!< Bit field size in bits for LLWU_PE1_WUPE0. */
167
168 /*! @brief Read current value of the LLWU_PE1_WUPE0 field. */
169 #define BR_LLWU_PE1_WUPE0(x) (HW_LLWU_PE1(x).B.WUPE0)
170
171 /*! @brief Format value for bitfield LLWU_PE1_WUPE0. */
172 #define BF_LLWU_PE1_WUPE0(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE1_WUPE0) & BM_LLWU_PE1_WUPE0)
173
174 /*! @brief Set the WUPE0 field to a new value. */
175 #define BW_LLWU_PE1_WUPE0(x, v) (HW_LLWU_PE1_WR(x, (HW_LLWU_PE1_RD(x) & ~BM_LLWU_PE1_WUPE0) | BF_LLWU_PE1_WUPE0(v)))
176 /*@}*/
177
178 /*!
179 * @name Register LLWU_PE1, field WUPE1[3:2] (RW)
180 *
181 * Enables and configures the edge detection for the wakeup pin.
182 *
183 * Values:
184 * - 00 - External input pin disabled as wakeup input
185 * - 01 - External input pin enabled with rising edge detection
186 * - 10 - External input pin enabled with falling edge detection
187 * - 11 - External input pin enabled with any change detection
188 */
189 /*@{*/
190 #define BP_LLWU_PE1_WUPE1 (2U) /*!< Bit position for LLWU_PE1_WUPE1. */
191 #define BM_LLWU_PE1_WUPE1 (0x0CU) /*!< Bit mask for LLWU_PE1_WUPE1. */
192 #define BS_LLWU_PE1_WUPE1 (2U) /*!< Bit field size in bits for LLWU_PE1_WUPE1. */
193
194 /*! @brief Read current value of the LLWU_PE1_WUPE1 field. */
195 #define BR_LLWU_PE1_WUPE1(x) (HW_LLWU_PE1(x).B.WUPE1)
196
197 /*! @brief Format value for bitfield LLWU_PE1_WUPE1. */
198 #define BF_LLWU_PE1_WUPE1(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE1_WUPE1) & BM_LLWU_PE1_WUPE1)
199
200 /*! @brief Set the WUPE1 field to a new value. */
201 #define BW_LLWU_PE1_WUPE1(x, v) (HW_LLWU_PE1_WR(x, (HW_LLWU_PE1_RD(x) & ~BM_LLWU_PE1_WUPE1) | BF_LLWU_PE1_WUPE1(v)))
202 /*@}*/
203
204 /*!
205 * @name Register LLWU_PE1, field WUPE2[5:4] (RW)
206 *
207 * Enables and configures the edge detection for the wakeup pin.
208 *
209 * Values:
210 * - 00 - External input pin disabled as wakeup input
211 * - 01 - External input pin enabled with rising edge detection
212 * - 10 - External input pin enabled with falling edge detection
213 * - 11 - External input pin enabled with any change detection
214 */
215 /*@{*/
216 #define BP_LLWU_PE1_WUPE2 (4U) /*!< Bit position for LLWU_PE1_WUPE2. */
217 #define BM_LLWU_PE1_WUPE2 (0x30U) /*!< Bit mask for LLWU_PE1_WUPE2. */
218 #define BS_LLWU_PE1_WUPE2 (2U) /*!< Bit field size in bits for LLWU_PE1_WUPE2. */
219
220 /*! @brief Read current value of the LLWU_PE1_WUPE2 field. */
221 #define BR_LLWU_PE1_WUPE2(x) (HW_LLWU_PE1(x).B.WUPE2)
222
223 /*! @brief Format value for bitfield LLWU_PE1_WUPE2. */
224 #define BF_LLWU_PE1_WUPE2(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE1_WUPE2) & BM_LLWU_PE1_WUPE2)
225
226 /*! @brief Set the WUPE2 field to a new value. */
227 #define BW_LLWU_PE1_WUPE2(x, v) (HW_LLWU_PE1_WR(x, (HW_LLWU_PE1_RD(x) & ~BM_LLWU_PE1_WUPE2) | BF_LLWU_PE1_WUPE2(v)))
228 /*@}*/
229
230 /*!
231 * @name Register LLWU_PE1, field WUPE3[7:6] (RW)
232 *
233 * Enables and configures the edge detection for the wakeup pin.
234 *
235 * Values:
236 * - 00 - External input pin disabled as wakeup input
237 * - 01 - External input pin enabled with rising edge detection
238 * - 10 - External input pin enabled with falling edge detection
239 * - 11 - External input pin enabled with any change detection
240 */
241 /*@{*/
242 #define BP_LLWU_PE1_WUPE3 (6U) /*!< Bit position for LLWU_PE1_WUPE3. */
243 #define BM_LLWU_PE1_WUPE3 (0xC0U) /*!< Bit mask for LLWU_PE1_WUPE3. */
244 #define BS_LLWU_PE1_WUPE3 (2U) /*!< Bit field size in bits for LLWU_PE1_WUPE3. */
245
246 /*! @brief Read current value of the LLWU_PE1_WUPE3 field. */
247 #define BR_LLWU_PE1_WUPE3(x) (HW_LLWU_PE1(x).B.WUPE3)
248
249 /*! @brief Format value for bitfield LLWU_PE1_WUPE3. */
250 #define BF_LLWU_PE1_WUPE3(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE1_WUPE3) & BM_LLWU_PE1_WUPE3)
251
252 /*! @brief Set the WUPE3 field to a new value. */
253 #define BW_LLWU_PE1_WUPE3(x, v) (HW_LLWU_PE1_WR(x, (HW_LLWU_PE1_RD(x) & ~BM_LLWU_PE1_WUPE3) | BF_LLWU_PE1_WUPE3(v)))
254 /*@}*/
255
256 /*******************************************************************************
257 * HW_LLWU_PE2 - LLWU Pin Enable 2 register
258 ******************************************************************************/
259
260 /*!
261 * @brief HW_LLWU_PE2 - LLWU Pin Enable 2 register (RW)
262 *
263 * Reset value: 0x00U
264 *
265 * LLWU_PE2 contains the field to enable and select the edge detect type for the
266 * external wakeup input pins LLWU_P7-LLWU_P4. This register is reset on Chip
267 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
268 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
269 * IntroductionInformation found here describes the registers of the Reset Control Module
270 * (RCM). The RCM implements many of the reset functions for the chip. See the
271 * chip's reset chapter for more information. details for more information.
272 */
273 typedef union _hw_llwu_pe2
274 {
275 uint8_t U;
276 struct _hw_llwu_pe2_bitfields
277 {
278 uint8_t WUPE4 : 2; /*!< [1:0] Wakeup Pin Enable For LLWU_P4 */
279 uint8_t WUPE5 : 2; /*!< [3:2] Wakeup Pin Enable For LLWU_P5 */
280 uint8_t WUPE6 : 2; /*!< [5:4] Wakeup Pin Enable For LLWU_P6 */
281 uint8_t WUPE7 : 2; /*!< [7:6] Wakeup Pin Enable For LLWU_P7 */
282 } B;
283 } hw_llwu_pe2_t;
284
285 /*!
286 * @name Constants and macros for entire LLWU_PE2 register
287 */
288 /*@{*/
289 #define HW_LLWU_PE2_ADDR(x) ((x) + 0x1U)
290
291 #define HW_LLWU_PE2(x) (*(__IO hw_llwu_pe2_t *) HW_LLWU_PE2_ADDR(x))
292 #define HW_LLWU_PE2_RD(x) (HW_LLWU_PE2(x).U)
293 #define HW_LLWU_PE2_WR(x, v) (HW_LLWU_PE2(x).U = (v))
294 #define HW_LLWU_PE2_SET(x, v) (HW_LLWU_PE2_WR(x, HW_LLWU_PE2_RD(x) | (v)))
295 #define HW_LLWU_PE2_CLR(x, v) (HW_LLWU_PE2_WR(x, HW_LLWU_PE2_RD(x) & ~(v)))
296 #define HW_LLWU_PE2_TOG(x, v) (HW_LLWU_PE2_WR(x, HW_LLWU_PE2_RD(x) ^ (v)))
297 /*@}*/
298
299 /*
300 * Constants & macros for individual LLWU_PE2 bitfields
301 */
302
303 /*!
304 * @name Register LLWU_PE2, field WUPE4[1:0] (RW)
305 *
306 * Enables and configures the edge detection for the wakeup pin.
307 *
308 * Values:
309 * - 00 - External input pin disabled as wakeup input
310 * - 01 - External input pin enabled with rising edge detection
311 * - 10 - External input pin enabled with falling edge detection
312 * - 11 - External input pin enabled with any change detection
313 */
314 /*@{*/
315 #define BP_LLWU_PE2_WUPE4 (0U) /*!< Bit position for LLWU_PE2_WUPE4. */
316 #define BM_LLWU_PE2_WUPE4 (0x03U) /*!< Bit mask for LLWU_PE2_WUPE4. */
317 #define BS_LLWU_PE2_WUPE4 (2U) /*!< Bit field size in bits for LLWU_PE2_WUPE4. */
318
319 /*! @brief Read current value of the LLWU_PE2_WUPE4 field. */
320 #define BR_LLWU_PE2_WUPE4(x) (HW_LLWU_PE2(x).B.WUPE4)
321
322 /*! @brief Format value for bitfield LLWU_PE2_WUPE4. */
323 #define BF_LLWU_PE2_WUPE4(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE2_WUPE4) & BM_LLWU_PE2_WUPE4)
324
325 /*! @brief Set the WUPE4 field to a new value. */
326 #define BW_LLWU_PE2_WUPE4(x, v) (HW_LLWU_PE2_WR(x, (HW_LLWU_PE2_RD(x) & ~BM_LLWU_PE2_WUPE4) | BF_LLWU_PE2_WUPE4(v)))
327 /*@}*/
328
329 /*!
330 * @name Register LLWU_PE2, field WUPE5[3:2] (RW)
331 *
332 * Enables and configures the edge detection for the wakeup pin.
333 *
334 * Values:
335 * - 00 - External input pin disabled as wakeup input
336 * - 01 - External input pin enabled with rising edge detection
337 * - 10 - External input pin enabled with falling edge detection
338 * - 11 - External input pin enabled with any change detection
339 */
340 /*@{*/
341 #define BP_LLWU_PE2_WUPE5 (2U) /*!< Bit position for LLWU_PE2_WUPE5. */
342 #define BM_LLWU_PE2_WUPE5 (0x0CU) /*!< Bit mask for LLWU_PE2_WUPE5. */
343 #define BS_LLWU_PE2_WUPE5 (2U) /*!< Bit field size in bits for LLWU_PE2_WUPE5. */
344
345 /*! @brief Read current value of the LLWU_PE2_WUPE5 field. */
346 #define BR_LLWU_PE2_WUPE5(x) (HW_LLWU_PE2(x).B.WUPE5)
347
348 /*! @brief Format value for bitfield LLWU_PE2_WUPE5. */
349 #define BF_LLWU_PE2_WUPE5(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE2_WUPE5) & BM_LLWU_PE2_WUPE5)
350
351 /*! @brief Set the WUPE5 field to a new value. */
352 #define BW_LLWU_PE2_WUPE5(x, v) (HW_LLWU_PE2_WR(x, (HW_LLWU_PE2_RD(x) & ~BM_LLWU_PE2_WUPE5) | BF_LLWU_PE2_WUPE5(v)))
353 /*@}*/
354
355 /*!
356 * @name Register LLWU_PE2, field WUPE6[5:4] (RW)
357 *
358 * Enables and configures the edge detection for the wakeup pin.
359 *
360 * Values:
361 * - 00 - External input pin disabled as wakeup input
362 * - 01 - External input pin enabled with rising edge detection
363 * - 10 - External input pin enabled with falling edge detection
364 * - 11 - External input pin enabled with any change detection
365 */
366 /*@{*/
367 #define BP_LLWU_PE2_WUPE6 (4U) /*!< Bit position for LLWU_PE2_WUPE6. */
368 #define BM_LLWU_PE2_WUPE6 (0x30U) /*!< Bit mask for LLWU_PE2_WUPE6. */
369 #define BS_LLWU_PE2_WUPE6 (2U) /*!< Bit field size in bits for LLWU_PE2_WUPE6. */
370
371 /*! @brief Read current value of the LLWU_PE2_WUPE6 field. */
372 #define BR_LLWU_PE2_WUPE6(x) (HW_LLWU_PE2(x).B.WUPE6)
373
374 /*! @brief Format value for bitfield LLWU_PE2_WUPE6. */
375 #define BF_LLWU_PE2_WUPE6(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE2_WUPE6) & BM_LLWU_PE2_WUPE6)
376
377 /*! @brief Set the WUPE6 field to a new value. */
378 #define BW_LLWU_PE2_WUPE6(x, v) (HW_LLWU_PE2_WR(x, (HW_LLWU_PE2_RD(x) & ~BM_LLWU_PE2_WUPE6) | BF_LLWU_PE2_WUPE6(v)))
379 /*@}*/
380
381 /*!
382 * @name Register LLWU_PE2, field WUPE7[7:6] (RW)
383 *
384 * Enables and configures the edge detection for the wakeup pin.
385 *
386 * Values:
387 * - 00 - External input pin disabled as wakeup input
388 * - 01 - External input pin enabled with rising edge detection
389 * - 10 - External input pin enabled with falling edge detection
390 * - 11 - External input pin enabled with any change detection
391 */
392 /*@{*/
393 #define BP_LLWU_PE2_WUPE7 (6U) /*!< Bit position for LLWU_PE2_WUPE7. */
394 #define BM_LLWU_PE2_WUPE7 (0xC0U) /*!< Bit mask for LLWU_PE2_WUPE7. */
395 #define BS_LLWU_PE2_WUPE7 (2U) /*!< Bit field size in bits for LLWU_PE2_WUPE7. */
396
397 /*! @brief Read current value of the LLWU_PE2_WUPE7 field. */
398 #define BR_LLWU_PE2_WUPE7(x) (HW_LLWU_PE2(x).B.WUPE7)
399
400 /*! @brief Format value for bitfield LLWU_PE2_WUPE7. */
401 #define BF_LLWU_PE2_WUPE7(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE2_WUPE7) & BM_LLWU_PE2_WUPE7)
402
403 /*! @brief Set the WUPE7 field to a new value. */
404 #define BW_LLWU_PE2_WUPE7(x, v) (HW_LLWU_PE2_WR(x, (HW_LLWU_PE2_RD(x) & ~BM_LLWU_PE2_WUPE7) | BF_LLWU_PE2_WUPE7(v)))
405 /*@}*/
406
407 /*******************************************************************************
408 * HW_LLWU_PE3 - LLWU Pin Enable 3 register
409 ******************************************************************************/
410
411 /*!
412 * @brief HW_LLWU_PE3 - LLWU Pin Enable 3 register (RW)
413 *
414 * Reset value: 0x00U
415 *
416 * LLWU_PE3 contains the field to enable and select the edge detect type for the
417 * external wakeup input pins LLWU_P11-LLWU_P8. This register is reset on Chip
418 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
419 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
420 * IntroductionInformation found here describes the registers of the Reset Control Module
421 * (RCM). The RCM implements many of the reset functions for the chip. See the
422 * chip's reset chapter for more information. details for more information.
423 */
424 typedef union _hw_llwu_pe3
425 {
426 uint8_t U;
427 struct _hw_llwu_pe3_bitfields
428 {
429 uint8_t WUPE8 : 2; /*!< [1:0] Wakeup Pin Enable For LLWU_P8 */
430 uint8_t WUPE9 : 2; /*!< [3:2] Wakeup Pin Enable For LLWU_P9 */
431 uint8_t WUPE10 : 2; /*!< [5:4] Wakeup Pin Enable For LLWU_P10 */
432 uint8_t WUPE11 : 2; /*!< [7:6] Wakeup Pin Enable For LLWU_P11 */
433 } B;
434 } hw_llwu_pe3_t;
435
436 /*!
437 * @name Constants and macros for entire LLWU_PE3 register
438 */
439 /*@{*/
440 #define HW_LLWU_PE3_ADDR(x) ((x) + 0x2U)
441
442 #define HW_LLWU_PE3(x) (*(__IO hw_llwu_pe3_t *) HW_LLWU_PE3_ADDR(x))
443 #define HW_LLWU_PE3_RD(x) (HW_LLWU_PE3(x).U)
444 #define HW_LLWU_PE3_WR(x, v) (HW_LLWU_PE3(x).U = (v))
445 #define HW_LLWU_PE3_SET(x, v) (HW_LLWU_PE3_WR(x, HW_LLWU_PE3_RD(x) | (v)))
446 #define HW_LLWU_PE3_CLR(x, v) (HW_LLWU_PE3_WR(x, HW_LLWU_PE3_RD(x) & ~(v)))
447 #define HW_LLWU_PE3_TOG(x, v) (HW_LLWU_PE3_WR(x, HW_LLWU_PE3_RD(x) ^ (v)))
448 /*@}*/
449
450 /*
451 * Constants & macros for individual LLWU_PE3 bitfields
452 */
453
454 /*!
455 * @name Register LLWU_PE3, field WUPE8[1:0] (RW)
456 *
457 * Enables and configures the edge detection for the wakeup pin.
458 *
459 * Values:
460 * - 00 - External input pin disabled as wakeup input
461 * - 01 - External input pin enabled with rising edge detection
462 * - 10 - External input pin enabled with falling edge detection
463 * - 11 - External input pin enabled with any change detection
464 */
465 /*@{*/
466 #define BP_LLWU_PE3_WUPE8 (0U) /*!< Bit position for LLWU_PE3_WUPE8. */
467 #define BM_LLWU_PE3_WUPE8 (0x03U) /*!< Bit mask for LLWU_PE3_WUPE8. */
468 #define BS_LLWU_PE3_WUPE8 (2U) /*!< Bit field size in bits for LLWU_PE3_WUPE8. */
469
470 /*! @brief Read current value of the LLWU_PE3_WUPE8 field. */
471 #define BR_LLWU_PE3_WUPE8(x) (HW_LLWU_PE3(x).B.WUPE8)
472
473 /*! @brief Format value for bitfield LLWU_PE3_WUPE8. */
474 #define BF_LLWU_PE3_WUPE8(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE3_WUPE8) & BM_LLWU_PE3_WUPE8)
475
476 /*! @brief Set the WUPE8 field to a new value. */
477 #define BW_LLWU_PE3_WUPE8(x, v) (HW_LLWU_PE3_WR(x, (HW_LLWU_PE3_RD(x) & ~BM_LLWU_PE3_WUPE8) | BF_LLWU_PE3_WUPE8(v)))
478 /*@}*/
479
480 /*!
481 * @name Register LLWU_PE3, field WUPE9[3:2] (RW)
482 *
483 * Enables and configures the edge detection for the wakeup pin.
484 *
485 * Values:
486 * - 00 - External input pin disabled as wakeup input
487 * - 01 - External input pin enabled with rising edge detection
488 * - 10 - External input pin enabled with falling edge detection
489 * - 11 - External input pin enabled with any change detection
490 */
491 /*@{*/
492 #define BP_LLWU_PE3_WUPE9 (2U) /*!< Bit position for LLWU_PE3_WUPE9. */
493 #define BM_LLWU_PE3_WUPE9 (0x0CU) /*!< Bit mask for LLWU_PE3_WUPE9. */
494 #define BS_LLWU_PE3_WUPE9 (2U) /*!< Bit field size in bits for LLWU_PE3_WUPE9. */
495
496 /*! @brief Read current value of the LLWU_PE3_WUPE9 field. */
497 #define BR_LLWU_PE3_WUPE9(x) (HW_LLWU_PE3(x).B.WUPE9)
498
499 /*! @brief Format value for bitfield LLWU_PE3_WUPE9. */
500 #define BF_LLWU_PE3_WUPE9(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE3_WUPE9) & BM_LLWU_PE3_WUPE9)
501
502 /*! @brief Set the WUPE9 field to a new value. */
503 #define BW_LLWU_PE3_WUPE9(x, v) (HW_LLWU_PE3_WR(x, (HW_LLWU_PE3_RD(x) & ~BM_LLWU_PE3_WUPE9) | BF_LLWU_PE3_WUPE9(v)))
504 /*@}*/
505
506 /*!
507 * @name Register LLWU_PE3, field WUPE10[5:4] (RW)
508 *
509 * Enables and configures the edge detection for the wakeup pin.
510 *
511 * Values:
512 * - 00 - External input pin disabled as wakeup input
513 * - 01 - External input pin enabled with rising edge detection
514 * - 10 - External input pin enabled with falling edge detection
515 * - 11 - External input pin enabled with any change detection
516 */
517 /*@{*/
518 #define BP_LLWU_PE3_WUPE10 (4U) /*!< Bit position for LLWU_PE3_WUPE10. */
519 #define BM_LLWU_PE3_WUPE10 (0x30U) /*!< Bit mask for LLWU_PE3_WUPE10. */
520 #define BS_LLWU_PE3_WUPE10 (2U) /*!< Bit field size in bits for LLWU_PE3_WUPE10. */
521
522 /*! @brief Read current value of the LLWU_PE3_WUPE10 field. */
523 #define BR_LLWU_PE3_WUPE10(x) (HW_LLWU_PE3(x).B.WUPE10)
524
525 /*! @brief Format value for bitfield LLWU_PE3_WUPE10. */
526 #define BF_LLWU_PE3_WUPE10(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE3_WUPE10) & BM_LLWU_PE3_WUPE10)
527
528 /*! @brief Set the WUPE10 field to a new value. */
529 #define BW_LLWU_PE3_WUPE10(x, v) (HW_LLWU_PE3_WR(x, (HW_LLWU_PE3_RD(x) & ~BM_LLWU_PE3_WUPE10) | BF_LLWU_PE3_WUPE10(v)))
530 /*@}*/
531
532 /*!
533 * @name Register LLWU_PE3, field WUPE11[7:6] (RW)
534 *
535 * Enables and configures the edge detection for the wakeup pin.
536 *
537 * Values:
538 * - 00 - External input pin disabled as wakeup input
539 * - 01 - External input pin enabled with rising edge detection
540 * - 10 - External input pin enabled with falling edge detection
541 * - 11 - External input pin enabled with any change detection
542 */
543 /*@{*/
544 #define BP_LLWU_PE3_WUPE11 (6U) /*!< Bit position for LLWU_PE3_WUPE11. */
545 #define BM_LLWU_PE3_WUPE11 (0xC0U) /*!< Bit mask for LLWU_PE3_WUPE11. */
546 #define BS_LLWU_PE3_WUPE11 (2U) /*!< Bit field size in bits for LLWU_PE3_WUPE11. */
547
548 /*! @brief Read current value of the LLWU_PE3_WUPE11 field. */
549 #define BR_LLWU_PE3_WUPE11(x) (HW_LLWU_PE3(x).B.WUPE11)
550
551 /*! @brief Format value for bitfield LLWU_PE3_WUPE11. */
552 #define BF_LLWU_PE3_WUPE11(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE3_WUPE11) & BM_LLWU_PE3_WUPE11)
553
554 /*! @brief Set the WUPE11 field to a new value. */
555 #define BW_LLWU_PE3_WUPE11(x, v) (HW_LLWU_PE3_WR(x, (HW_LLWU_PE3_RD(x) & ~BM_LLWU_PE3_WUPE11) | BF_LLWU_PE3_WUPE11(v)))
556 /*@}*/
557
558 /*******************************************************************************
559 * HW_LLWU_PE4 - LLWU Pin Enable 4 register
560 ******************************************************************************/
561
562 /*!
563 * @brief HW_LLWU_PE4 - LLWU Pin Enable 4 register (RW)
564 *
565 * Reset value: 0x00U
566 *
567 * LLWU_PE4 contains the field to enable and select the edge detect type for the
568 * external wakeup input pins LLWU_P15-LLWU_P12. This register is reset on Chip
569 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
570 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
571 * IntroductionInformation found here describes the registers of the Reset Control
572 * Module (RCM). The RCM implements many of the reset functions for the chip. See the
573 * chip's reset chapter for more information. details for more information.
574 */
575 typedef union _hw_llwu_pe4
576 {
577 uint8_t U;
578 struct _hw_llwu_pe4_bitfields
579 {
580 uint8_t WUPE12 : 2; /*!< [1:0] Wakeup Pin Enable For LLWU_P12 */
581 uint8_t WUPE13 : 2; /*!< [3:2] Wakeup Pin Enable For LLWU_P13 */
582 uint8_t WUPE14 : 2; /*!< [5:4] Wakeup Pin Enable For LLWU_P14 */
583 uint8_t WUPE15 : 2; /*!< [7:6] Wakeup Pin Enable For LLWU_P15 */
584 } B;
585 } hw_llwu_pe4_t;
586
587 /*!
588 * @name Constants and macros for entire LLWU_PE4 register
589 */
590 /*@{*/
591 #define HW_LLWU_PE4_ADDR(x) ((x) + 0x3U)
592
593 #define HW_LLWU_PE4(x) (*(__IO hw_llwu_pe4_t *) HW_LLWU_PE4_ADDR(x))
594 #define HW_LLWU_PE4_RD(x) (HW_LLWU_PE4(x).U)
595 #define HW_LLWU_PE4_WR(x, v) (HW_LLWU_PE4(x).U = (v))
596 #define HW_LLWU_PE4_SET(x, v) (HW_LLWU_PE4_WR(x, HW_LLWU_PE4_RD(x) | (v)))
597 #define HW_LLWU_PE4_CLR(x, v) (HW_LLWU_PE4_WR(x, HW_LLWU_PE4_RD(x) & ~(v)))
598 #define HW_LLWU_PE4_TOG(x, v) (HW_LLWU_PE4_WR(x, HW_LLWU_PE4_RD(x) ^ (v)))
599 /*@}*/
600
601 /*
602 * Constants & macros for individual LLWU_PE4 bitfields
603 */
604
605 /*!
606 * @name Register LLWU_PE4, field WUPE12[1:0] (RW)
607 *
608 * Enables and configures the edge detection for the wakeup pin.
609 *
610 * Values:
611 * - 00 - External input pin disabled as wakeup input
612 * - 01 - External input pin enabled with rising edge detection
613 * - 10 - External input pin enabled with falling edge detection
614 * - 11 - External input pin enabled with any change detection
615 */
616 /*@{*/
617 #define BP_LLWU_PE4_WUPE12 (0U) /*!< Bit position for LLWU_PE4_WUPE12. */
618 #define BM_LLWU_PE4_WUPE12 (0x03U) /*!< Bit mask for LLWU_PE4_WUPE12. */
619 #define BS_LLWU_PE4_WUPE12 (2U) /*!< Bit field size in bits for LLWU_PE4_WUPE12. */
620
621 /*! @brief Read current value of the LLWU_PE4_WUPE12 field. */
622 #define BR_LLWU_PE4_WUPE12(x) (HW_LLWU_PE4(x).B.WUPE12)
623
624 /*! @brief Format value for bitfield LLWU_PE4_WUPE12. */
625 #define BF_LLWU_PE4_WUPE12(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE4_WUPE12) & BM_LLWU_PE4_WUPE12)
626
627 /*! @brief Set the WUPE12 field to a new value. */
628 #define BW_LLWU_PE4_WUPE12(x, v) (HW_LLWU_PE4_WR(x, (HW_LLWU_PE4_RD(x) & ~BM_LLWU_PE4_WUPE12) | BF_LLWU_PE4_WUPE12(v)))
629 /*@}*/
630
631 /*!
632 * @name Register LLWU_PE4, field WUPE13[3:2] (RW)
633 *
634 * Enables and configures the edge detection for the wakeup pin.
635 *
636 * Values:
637 * - 00 - External input pin disabled as wakeup input
638 * - 01 - External input pin enabled with rising edge detection
639 * - 10 - External input pin enabled with falling edge detection
640 * - 11 - External input pin enabled with any change detection
641 */
642 /*@{*/
643 #define BP_LLWU_PE4_WUPE13 (2U) /*!< Bit position for LLWU_PE4_WUPE13. */
644 #define BM_LLWU_PE4_WUPE13 (0x0CU) /*!< Bit mask for LLWU_PE4_WUPE13. */
645 #define BS_LLWU_PE4_WUPE13 (2U) /*!< Bit field size in bits for LLWU_PE4_WUPE13. */
646
647 /*! @brief Read current value of the LLWU_PE4_WUPE13 field. */
648 #define BR_LLWU_PE4_WUPE13(x) (HW_LLWU_PE4(x).B.WUPE13)
649
650 /*! @brief Format value for bitfield LLWU_PE4_WUPE13. */
651 #define BF_LLWU_PE4_WUPE13(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE4_WUPE13) & BM_LLWU_PE4_WUPE13)
652
653 /*! @brief Set the WUPE13 field to a new value. */
654 #define BW_LLWU_PE4_WUPE13(x, v) (HW_LLWU_PE4_WR(x, (HW_LLWU_PE4_RD(x) & ~BM_LLWU_PE4_WUPE13) | BF_LLWU_PE4_WUPE13(v)))
655 /*@}*/
656
657 /*!
658 * @name Register LLWU_PE4, field WUPE14[5:4] (RW)
659 *
660 * Enables and configures the edge detection for the wakeup pin.
661 *
662 * Values:
663 * - 00 - External input pin disabled as wakeup input
664 * - 01 - External input pin enabled with rising edge detection
665 * - 10 - External input pin enabled with falling edge detection
666 * - 11 - External input pin enabled with any change detection
667 */
668 /*@{*/
669 #define BP_LLWU_PE4_WUPE14 (4U) /*!< Bit position for LLWU_PE4_WUPE14. */
670 #define BM_LLWU_PE4_WUPE14 (0x30U) /*!< Bit mask for LLWU_PE4_WUPE14. */
671 #define BS_LLWU_PE4_WUPE14 (2U) /*!< Bit field size in bits for LLWU_PE4_WUPE14. */
672
673 /*! @brief Read current value of the LLWU_PE4_WUPE14 field. */
674 #define BR_LLWU_PE4_WUPE14(x) (HW_LLWU_PE4(x).B.WUPE14)
675
676 /*! @brief Format value for bitfield LLWU_PE4_WUPE14. */
677 #define BF_LLWU_PE4_WUPE14(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE4_WUPE14) & BM_LLWU_PE4_WUPE14)
678
679 /*! @brief Set the WUPE14 field to a new value. */
680 #define BW_LLWU_PE4_WUPE14(x, v) (HW_LLWU_PE4_WR(x, (HW_LLWU_PE4_RD(x) & ~BM_LLWU_PE4_WUPE14) | BF_LLWU_PE4_WUPE14(v)))
681 /*@}*/
682
683 /*!
684 * @name Register LLWU_PE4, field WUPE15[7:6] (RW)
685 *
686 * Enables and configures the edge detection for the wakeup pin.
687 *
688 * Values:
689 * - 00 - External input pin disabled as wakeup input
690 * - 01 - External input pin enabled with rising edge detection
691 * - 10 - External input pin enabled with falling edge detection
692 * - 11 - External input pin enabled with any change detection
693 */
694 /*@{*/
695 #define BP_LLWU_PE4_WUPE15 (6U) /*!< Bit position for LLWU_PE4_WUPE15. */
696 #define BM_LLWU_PE4_WUPE15 (0xC0U) /*!< Bit mask for LLWU_PE4_WUPE15. */
697 #define BS_LLWU_PE4_WUPE15 (2U) /*!< Bit field size in bits for LLWU_PE4_WUPE15. */
698
699 /*! @brief Read current value of the LLWU_PE4_WUPE15 field. */
700 #define BR_LLWU_PE4_WUPE15(x) (HW_LLWU_PE4(x).B.WUPE15)
701
702 /*! @brief Format value for bitfield LLWU_PE4_WUPE15. */
703 #define BF_LLWU_PE4_WUPE15(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_PE4_WUPE15) & BM_LLWU_PE4_WUPE15)
704
705 /*! @brief Set the WUPE15 field to a new value. */
706 #define BW_LLWU_PE4_WUPE15(x, v) (HW_LLWU_PE4_WR(x, (HW_LLWU_PE4_RD(x) & ~BM_LLWU_PE4_WUPE15) | BF_LLWU_PE4_WUPE15(v)))
707 /*@}*/
708
709 /*******************************************************************************
710 * HW_LLWU_ME - LLWU Module Enable register
711 ******************************************************************************/
712
713 /*!
714 * @brief HW_LLWU_ME - LLWU Module Enable register (RW)
715 *
716 * Reset value: 0x00U
717 *
718 * LLWU_ME contains the bits to enable the internal module flag as a wakeup
719 * input source for inputs MWUF7-MWUF0. This register is reset on Chip Reset not VLLS
720 * and by reset types that trigger Chip Reset not VLLS. It is unaffected by
721 * reset types that do not trigger Chip Reset not VLLS. See the
722 * IntroductionInformation found here describes the registers of the Reset Control Module (RCM). The
723 * RCM implements many of the reset functions for the chip. See the chip's reset
724 * chapter for more information. details for more information.
725 */
726 typedef union _hw_llwu_me
727 {
728 uint8_t U;
729 struct _hw_llwu_me_bitfields
730 {
731 uint8_t WUME0 : 1; /*!< [0] Wakeup Module Enable For Module 0 */
732 uint8_t WUME1 : 1; /*!< [1] Wakeup Module Enable for Module 1 */
733 uint8_t WUME2 : 1; /*!< [2] Wakeup Module Enable For Module 2 */
734 uint8_t WUME3 : 1; /*!< [3] Wakeup Module Enable For Module 3 */
735 uint8_t WUME4 : 1; /*!< [4] Wakeup Module Enable For Module 4 */
736 uint8_t WUME5 : 1; /*!< [5] Wakeup Module Enable For Module 5 */
737 uint8_t WUME6 : 1; /*!< [6] Wakeup Module Enable For Module 6 */
738 uint8_t WUME7 : 1; /*!< [7] Wakeup Module Enable For Module 7 */
739 } B;
740 } hw_llwu_me_t;
741
742 /*!
743 * @name Constants and macros for entire LLWU_ME register
744 */
745 /*@{*/
746 #define HW_LLWU_ME_ADDR(x) ((x) + 0x4U)
747
748 #define HW_LLWU_ME(x) (*(__IO hw_llwu_me_t *) HW_LLWU_ME_ADDR(x))
749 #define HW_LLWU_ME_RD(x) (HW_LLWU_ME(x).U)
750 #define HW_LLWU_ME_WR(x, v) (HW_LLWU_ME(x).U = (v))
751 #define HW_LLWU_ME_SET(x, v) (HW_LLWU_ME_WR(x, HW_LLWU_ME_RD(x) | (v)))
752 #define HW_LLWU_ME_CLR(x, v) (HW_LLWU_ME_WR(x, HW_LLWU_ME_RD(x) & ~(v)))
753 #define HW_LLWU_ME_TOG(x, v) (HW_LLWU_ME_WR(x, HW_LLWU_ME_RD(x) ^ (v)))
754 /*@}*/
755
756 /*
757 * Constants & macros for individual LLWU_ME bitfields
758 */
759
760 /*!
761 * @name Register LLWU_ME, field WUME0[0] (RW)
762 *
763 * Enables an internal module as a wakeup source input.
764 *
765 * Values:
766 * - 0 - Internal module flag not used as wakeup source
767 * - 1 - Internal module flag used as wakeup source
768 */
769 /*@{*/
770 #define BP_LLWU_ME_WUME0 (0U) /*!< Bit position for LLWU_ME_WUME0. */
771 #define BM_LLWU_ME_WUME0 (0x01U) /*!< Bit mask for LLWU_ME_WUME0. */
772 #define BS_LLWU_ME_WUME0 (1U) /*!< Bit field size in bits for LLWU_ME_WUME0. */
773
774 /*! @brief Read current value of the LLWU_ME_WUME0 field. */
775 #define BR_LLWU_ME_WUME0(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME0))
776
777 /*! @brief Format value for bitfield LLWU_ME_WUME0. */
778 #define BF_LLWU_ME_WUME0(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME0) & BM_LLWU_ME_WUME0)
779
780 /*! @brief Set the WUME0 field to a new value. */
781 #define BW_LLWU_ME_WUME0(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME0) = (v))
782 /*@}*/
783
784 /*!
785 * @name Register LLWU_ME, field WUME1[1] (RW)
786 *
787 * Enables an internal module as a wakeup source input.
788 *
789 * Values:
790 * - 0 - Internal module flag not used as wakeup source
791 * - 1 - Internal module flag used as wakeup source
792 */
793 /*@{*/
794 #define BP_LLWU_ME_WUME1 (1U) /*!< Bit position for LLWU_ME_WUME1. */
795 #define BM_LLWU_ME_WUME1 (0x02U) /*!< Bit mask for LLWU_ME_WUME1. */
796 #define BS_LLWU_ME_WUME1 (1U) /*!< Bit field size in bits for LLWU_ME_WUME1. */
797
798 /*! @brief Read current value of the LLWU_ME_WUME1 field. */
799 #define BR_LLWU_ME_WUME1(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME1))
800
801 /*! @brief Format value for bitfield LLWU_ME_WUME1. */
802 #define BF_LLWU_ME_WUME1(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME1) & BM_LLWU_ME_WUME1)
803
804 /*! @brief Set the WUME1 field to a new value. */
805 #define BW_LLWU_ME_WUME1(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME1) = (v))
806 /*@}*/
807
808 /*!
809 * @name Register LLWU_ME, field WUME2[2] (RW)
810 *
811 * Enables an internal module as a wakeup source input.
812 *
813 * Values:
814 * - 0 - Internal module flag not used as wakeup source
815 * - 1 - Internal module flag used as wakeup source
816 */
817 /*@{*/
818 #define BP_LLWU_ME_WUME2 (2U) /*!< Bit position for LLWU_ME_WUME2. */
819 #define BM_LLWU_ME_WUME2 (0x04U) /*!< Bit mask for LLWU_ME_WUME2. */
820 #define BS_LLWU_ME_WUME2 (1U) /*!< Bit field size in bits for LLWU_ME_WUME2. */
821
822 /*! @brief Read current value of the LLWU_ME_WUME2 field. */
823 #define BR_LLWU_ME_WUME2(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME2))
824
825 /*! @brief Format value for bitfield LLWU_ME_WUME2. */
826 #define BF_LLWU_ME_WUME2(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME2) & BM_LLWU_ME_WUME2)
827
828 /*! @brief Set the WUME2 field to a new value. */
829 #define BW_LLWU_ME_WUME2(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME2) = (v))
830 /*@}*/
831
832 /*!
833 * @name Register LLWU_ME, field WUME3[3] (RW)
834 *
835 * Enables an internal module as a wakeup source input.
836 *
837 * Values:
838 * - 0 - Internal module flag not used as wakeup source
839 * - 1 - Internal module flag used as wakeup source
840 */
841 /*@{*/
842 #define BP_LLWU_ME_WUME3 (3U) /*!< Bit position for LLWU_ME_WUME3. */
843 #define BM_LLWU_ME_WUME3 (0x08U) /*!< Bit mask for LLWU_ME_WUME3. */
844 #define BS_LLWU_ME_WUME3 (1U) /*!< Bit field size in bits for LLWU_ME_WUME3. */
845
846 /*! @brief Read current value of the LLWU_ME_WUME3 field. */
847 #define BR_LLWU_ME_WUME3(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME3))
848
849 /*! @brief Format value for bitfield LLWU_ME_WUME3. */
850 #define BF_LLWU_ME_WUME3(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME3) & BM_LLWU_ME_WUME3)
851
852 /*! @brief Set the WUME3 field to a new value. */
853 #define BW_LLWU_ME_WUME3(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME3) = (v))
854 /*@}*/
855
856 /*!
857 * @name Register LLWU_ME, field WUME4[4] (RW)
858 *
859 * Enables an internal module as a wakeup source input.
860 *
861 * Values:
862 * - 0 - Internal module flag not used as wakeup source
863 * - 1 - Internal module flag used as wakeup source
864 */
865 /*@{*/
866 #define BP_LLWU_ME_WUME4 (4U) /*!< Bit position for LLWU_ME_WUME4. */
867 #define BM_LLWU_ME_WUME4 (0x10U) /*!< Bit mask for LLWU_ME_WUME4. */
868 #define BS_LLWU_ME_WUME4 (1U) /*!< Bit field size in bits for LLWU_ME_WUME4. */
869
870 /*! @brief Read current value of the LLWU_ME_WUME4 field. */
871 #define BR_LLWU_ME_WUME4(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME4))
872
873 /*! @brief Format value for bitfield LLWU_ME_WUME4. */
874 #define BF_LLWU_ME_WUME4(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME4) & BM_LLWU_ME_WUME4)
875
876 /*! @brief Set the WUME4 field to a new value. */
877 #define BW_LLWU_ME_WUME4(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME4) = (v))
878 /*@}*/
879
880 /*!
881 * @name Register LLWU_ME, field WUME5[5] (RW)
882 *
883 * Enables an internal module as a wakeup source input.
884 *
885 * Values:
886 * - 0 - Internal module flag not used as wakeup source
887 * - 1 - Internal module flag used as wakeup source
888 */
889 /*@{*/
890 #define BP_LLWU_ME_WUME5 (5U) /*!< Bit position for LLWU_ME_WUME5. */
891 #define BM_LLWU_ME_WUME5 (0x20U) /*!< Bit mask for LLWU_ME_WUME5. */
892 #define BS_LLWU_ME_WUME5 (1U) /*!< Bit field size in bits for LLWU_ME_WUME5. */
893
894 /*! @brief Read current value of the LLWU_ME_WUME5 field. */
895 #define BR_LLWU_ME_WUME5(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME5))
896
897 /*! @brief Format value for bitfield LLWU_ME_WUME5. */
898 #define BF_LLWU_ME_WUME5(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME5) & BM_LLWU_ME_WUME5)
899
900 /*! @brief Set the WUME5 field to a new value. */
901 #define BW_LLWU_ME_WUME5(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME5) = (v))
902 /*@}*/
903
904 /*!
905 * @name Register LLWU_ME, field WUME6[6] (RW)
906 *
907 * Enables an internal module as a wakeup source input.
908 *
909 * Values:
910 * - 0 - Internal module flag not used as wakeup source
911 * - 1 - Internal module flag used as wakeup source
912 */
913 /*@{*/
914 #define BP_LLWU_ME_WUME6 (6U) /*!< Bit position for LLWU_ME_WUME6. */
915 #define BM_LLWU_ME_WUME6 (0x40U) /*!< Bit mask for LLWU_ME_WUME6. */
916 #define BS_LLWU_ME_WUME6 (1U) /*!< Bit field size in bits for LLWU_ME_WUME6. */
917
918 /*! @brief Read current value of the LLWU_ME_WUME6 field. */
919 #define BR_LLWU_ME_WUME6(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME6))
920
921 /*! @brief Format value for bitfield LLWU_ME_WUME6. */
922 #define BF_LLWU_ME_WUME6(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME6) & BM_LLWU_ME_WUME6)
923
924 /*! @brief Set the WUME6 field to a new value. */
925 #define BW_LLWU_ME_WUME6(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME6) = (v))
926 /*@}*/
927
928 /*!
929 * @name Register LLWU_ME, field WUME7[7] (RW)
930 *
931 * Enables an internal module as a wakeup source input.
932 *
933 * Values:
934 * - 0 - Internal module flag not used as wakeup source
935 * - 1 - Internal module flag used as wakeup source
936 */
937 /*@{*/
938 #define BP_LLWU_ME_WUME7 (7U) /*!< Bit position for LLWU_ME_WUME7. */
939 #define BM_LLWU_ME_WUME7 (0x80U) /*!< Bit mask for LLWU_ME_WUME7. */
940 #define BS_LLWU_ME_WUME7 (1U) /*!< Bit field size in bits for LLWU_ME_WUME7. */
941
942 /*! @brief Read current value of the LLWU_ME_WUME7 field. */
943 #define BR_LLWU_ME_WUME7(x) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME7))
944
945 /*! @brief Format value for bitfield LLWU_ME_WUME7. */
946 #define BF_LLWU_ME_WUME7(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_ME_WUME7) & BM_LLWU_ME_WUME7)
947
948 /*! @brief Set the WUME7 field to a new value. */
949 #define BW_LLWU_ME_WUME7(x, v) (BITBAND_ACCESS8(HW_LLWU_ME_ADDR(x), BP_LLWU_ME_WUME7) = (v))
950 /*@}*/
951
952 /*******************************************************************************
953 * HW_LLWU_F1 - LLWU Flag 1 register
954 ******************************************************************************/
955
956 /*!
957 * @brief HW_LLWU_F1 - LLWU Flag 1 register (W1C)
958 *
959 * Reset value: 0x00U
960 *
961 * LLWU_F1 contains the wakeup flags indicating which wakeup source caused the
962 * MCU to exit LLS or VLLS mode. For LLS, this is the source causing the CPU
963 * interrupt flow. For VLLS, this is the source causing the MCU reset flow. The
964 * external wakeup flags are read-only and clearing a flag is accomplished by a write
965 * of a 1 to the corresponding WUFx bit. The wakeup flag (WUFx), if set, will
966 * remain set if the associated WUPEx bit is cleared. This register is reset on Chip
967 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
968 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
969 * IntroductionInformation found here describes the registers of the Reset Control
970 * Module (RCM). The RCM implements many of the reset functions for the chip. See the
971 * chip's reset chapter for more information. details for more information.
972 */
973 typedef union _hw_llwu_f1
974 {
975 uint8_t U;
976 struct _hw_llwu_f1_bitfields
977 {
978 uint8_t WUF0 : 1; /*!< [0] Wakeup Flag For LLWU_P0 */
979 uint8_t WUF1 : 1; /*!< [1] Wakeup Flag For LLWU_P1 */
980 uint8_t WUF2 : 1; /*!< [2] Wakeup Flag For LLWU_P2 */
981 uint8_t WUF3 : 1; /*!< [3] Wakeup Flag For LLWU_P3 */
982 uint8_t WUF4 : 1; /*!< [4] Wakeup Flag For LLWU_P4 */
983 uint8_t WUF5 : 1; /*!< [5] Wakeup Flag For LLWU_P5 */
984 uint8_t WUF6 : 1; /*!< [6] Wakeup Flag For LLWU_P6 */
985 uint8_t WUF7 : 1; /*!< [7] Wakeup Flag For LLWU_P7 */
986 } B;
987 } hw_llwu_f1_t;
988
989 /*!
990 * @name Constants and macros for entire LLWU_F1 register
991 */
992 /*@{*/
993 #define HW_LLWU_F1_ADDR(x) ((x) + 0x5U)
994
995 #define HW_LLWU_F1(x) (*(__IO hw_llwu_f1_t *) HW_LLWU_F1_ADDR(x))
996 #define HW_LLWU_F1_RD(x) (HW_LLWU_F1(x).U)
997 #define HW_LLWU_F1_WR(x, v) (HW_LLWU_F1(x).U = (v))
998 #define HW_LLWU_F1_SET(x, v) (HW_LLWU_F1_WR(x, HW_LLWU_F1_RD(x) | (v)))
999 #define HW_LLWU_F1_CLR(x, v) (HW_LLWU_F1_WR(x, HW_LLWU_F1_RD(x) & ~(v)))
1000 #define HW_LLWU_F1_TOG(x, v) (HW_LLWU_F1_WR(x, HW_LLWU_F1_RD(x) ^ (v)))
1001 /*@}*/
1002
1003 /*
1004 * Constants & macros for individual LLWU_F1 bitfields
1005 */
1006
1007 /*!
1008 * @name Register LLWU_F1, field WUF0[0] (W1C)
1009 *
1010 * Indicates that an enabled external wake-up pin was a source of exiting a
1011 * low-leakage power mode. To clear the flag, write a 1 to WUF0.
1012 *
1013 * Values:
1014 * - 0 - LLWU_P0 input was not a wakeup source
1015 * - 1 - LLWU_P0 input was a wakeup source
1016 */
1017 /*@{*/
1018 #define BP_LLWU_F1_WUF0 (0U) /*!< Bit position for LLWU_F1_WUF0. */
1019 #define BM_LLWU_F1_WUF0 (0x01U) /*!< Bit mask for LLWU_F1_WUF0. */
1020 #define BS_LLWU_F1_WUF0 (1U) /*!< Bit field size in bits for LLWU_F1_WUF0. */
1021
1022 /*! @brief Read current value of the LLWU_F1_WUF0 field. */
1023 #define BR_LLWU_F1_WUF0(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF0))
1024
1025 /*! @brief Format value for bitfield LLWU_F1_WUF0. */
1026 #define BF_LLWU_F1_WUF0(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF0) & BM_LLWU_F1_WUF0)
1027
1028 /*! @brief Set the WUF0 field to a new value. */
1029 #define BW_LLWU_F1_WUF0(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF0) = (v))
1030 /*@}*/
1031
1032 /*!
1033 * @name Register LLWU_F1, field WUF1[1] (W1C)
1034 *
1035 * Indicates that an enabled external wakeup pin was a source of exiting a
1036 * low-leakage power mode. To clear the flag, write a 1 to WUF1.
1037 *
1038 * Values:
1039 * - 0 - LLWU_P1 input was not a wakeup source
1040 * - 1 - LLWU_P1 input was a wakeup source
1041 */
1042 /*@{*/
1043 #define BP_LLWU_F1_WUF1 (1U) /*!< Bit position for LLWU_F1_WUF1. */
1044 #define BM_LLWU_F1_WUF1 (0x02U) /*!< Bit mask for LLWU_F1_WUF1. */
1045 #define BS_LLWU_F1_WUF1 (1U) /*!< Bit field size in bits for LLWU_F1_WUF1. */
1046
1047 /*! @brief Read current value of the LLWU_F1_WUF1 field. */
1048 #define BR_LLWU_F1_WUF1(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF1))
1049
1050 /*! @brief Format value for bitfield LLWU_F1_WUF1. */
1051 #define BF_LLWU_F1_WUF1(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF1) & BM_LLWU_F1_WUF1)
1052
1053 /*! @brief Set the WUF1 field to a new value. */
1054 #define BW_LLWU_F1_WUF1(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF1) = (v))
1055 /*@}*/
1056
1057 /*!
1058 * @name Register LLWU_F1, field WUF2[2] (W1C)
1059 *
1060 * Indicates that an enabled external wakeup pin was a source of exiting a
1061 * low-leakage power mode. To clear the flag, write a 1 to WUF2.
1062 *
1063 * Values:
1064 * - 0 - LLWU_P2 input was not a wakeup source
1065 * - 1 - LLWU_P2 input was a wakeup source
1066 */
1067 /*@{*/
1068 #define BP_LLWU_F1_WUF2 (2U) /*!< Bit position for LLWU_F1_WUF2. */
1069 #define BM_LLWU_F1_WUF2 (0x04U) /*!< Bit mask for LLWU_F1_WUF2. */
1070 #define BS_LLWU_F1_WUF2 (1U) /*!< Bit field size in bits for LLWU_F1_WUF2. */
1071
1072 /*! @brief Read current value of the LLWU_F1_WUF2 field. */
1073 #define BR_LLWU_F1_WUF2(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF2))
1074
1075 /*! @brief Format value for bitfield LLWU_F1_WUF2. */
1076 #define BF_LLWU_F1_WUF2(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF2) & BM_LLWU_F1_WUF2)
1077
1078 /*! @brief Set the WUF2 field to a new value. */
1079 #define BW_LLWU_F1_WUF2(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF2) = (v))
1080 /*@}*/
1081
1082 /*!
1083 * @name Register LLWU_F1, field WUF3[3] (W1C)
1084 *
1085 * Indicates that an enabled external wakeup pin was a source of exiting a
1086 * low-leakage power mode. To clear the flag, write a 1 to WUF3.
1087 *
1088 * Values:
1089 * - 0 - LLWU_P3 input was not a wake-up source
1090 * - 1 - LLWU_P3 input was a wake-up source
1091 */
1092 /*@{*/
1093 #define BP_LLWU_F1_WUF3 (3U) /*!< Bit position for LLWU_F1_WUF3. */
1094 #define BM_LLWU_F1_WUF3 (0x08U) /*!< Bit mask for LLWU_F1_WUF3. */
1095 #define BS_LLWU_F1_WUF3 (1U) /*!< Bit field size in bits for LLWU_F1_WUF3. */
1096
1097 /*! @brief Read current value of the LLWU_F1_WUF3 field. */
1098 #define BR_LLWU_F1_WUF3(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF3))
1099
1100 /*! @brief Format value for bitfield LLWU_F1_WUF3. */
1101 #define BF_LLWU_F1_WUF3(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF3) & BM_LLWU_F1_WUF3)
1102
1103 /*! @brief Set the WUF3 field to a new value. */
1104 #define BW_LLWU_F1_WUF3(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF3) = (v))
1105 /*@}*/
1106
1107 /*!
1108 * @name Register LLWU_F1, field WUF4[4] (W1C)
1109 *
1110 * Indicates that an enabled external wake-up pin was a source of exiting a
1111 * low-leakage power mode. To clear the flag, write a 1 to WUF4.
1112 *
1113 * Values:
1114 * - 0 - LLWU_P4 input was not a wakeup source
1115 * - 1 - LLWU_P4 input was a wakeup source
1116 */
1117 /*@{*/
1118 #define BP_LLWU_F1_WUF4 (4U) /*!< Bit position for LLWU_F1_WUF4. */
1119 #define BM_LLWU_F1_WUF4 (0x10U) /*!< Bit mask for LLWU_F1_WUF4. */
1120 #define BS_LLWU_F1_WUF4 (1U) /*!< Bit field size in bits for LLWU_F1_WUF4. */
1121
1122 /*! @brief Read current value of the LLWU_F1_WUF4 field. */
1123 #define BR_LLWU_F1_WUF4(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF4))
1124
1125 /*! @brief Format value for bitfield LLWU_F1_WUF4. */
1126 #define BF_LLWU_F1_WUF4(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF4) & BM_LLWU_F1_WUF4)
1127
1128 /*! @brief Set the WUF4 field to a new value. */
1129 #define BW_LLWU_F1_WUF4(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF4) = (v))
1130 /*@}*/
1131
1132 /*!
1133 * @name Register LLWU_F1, field WUF5[5] (W1C)
1134 *
1135 * Indicates that an enabled external wakeup pin was a source of exiting a
1136 * low-leakage power mode. To clear the flag, write a 1 to WUF5.
1137 *
1138 * Values:
1139 * - 0 - LLWU_P5 input was not a wakeup source
1140 * - 1 - LLWU_P5 input was a wakeup source
1141 */
1142 /*@{*/
1143 #define BP_LLWU_F1_WUF5 (5U) /*!< Bit position for LLWU_F1_WUF5. */
1144 #define BM_LLWU_F1_WUF5 (0x20U) /*!< Bit mask for LLWU_F1_WUF5. */
1145 #define BS_LLWU_F1_WUF5 (1U) /*!< Bit field size in bits for LLWU_F1_WUF5. */
1146
1147 /*! @brief Read current value of the LLWU_F1_WUF5 field. */
1148 #define BR_LLWU_F1_WUF5(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF5))
1149
1150 /*! @brief Format value for bitfield LLWU_F1_WUF5. */
1151 #define BF_LLWU_F1_WUF5(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF5) & BM_LLWU_F1_WUF5)
1152
1153 /*! @brief Set the WUF5 field to a new value. */
1154 #define BW_LLWU_F1_WUF5(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF5) = (v))
1155 /*@}*/
1156
1157 /*!
1158 * @name Register LLWU_F1, field WUF6[6] (W1C)
1159 *
1160 * Indicates that an enabled external wakeup pin was a source of exiting a
1161 * low-leakage power mode. To clear the flag, write a 1 to WUF6.
1162 *
1163 * Values:
1164 * - 0 - LLWU_P6 input was not a wakeup source
1165 * - 1 - LLWU_P6 input was a wakeup source
1166 */
1167 /*@{*/
1168 #define BP_LLWU_F1_WUF6 (6U) /*!< Bit position for LLWU_F1_WUF6. */
1169 #define BM_LLWU_F1_WUF6 (0x40U) /*!< Bit mask for LLWU_F1_WUF6. */
1170 #define BS_LLWU_F1_WUF6 (1U) /*!< Bit field size in bits for LLWU_F1_WUF6. */
1171
1172 /*! @brief Read current value of the LLWU_F1_WUF6 field. */
1173 #define BR_LLWU_F1_WUF6(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF6))
1174
1175 /*! @brief Format value for bitfield LLWU_F1_WUF6. */
1176 #define BF_LLWU_F1_WUF6(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF6) & BM_LLWU_F1_WUF6)
1177
1178 /*! @brief Set the WUF6 field to a new value. */
1179 #define BW_LLWU_F1_WUF6(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF6) = (v))
1180 /*@}*/
1181
1182 /*!
1183 * @name Register LLWU_F1, field WUF7[7] (W1C)
1184 *
1185 * Indicates that an enabled external wakeup pin was a source of exiting a
1186 * low-leakage power mode. To clear the flag, write a 1 to WUF7.
1187 *
1188 * Values:
1189 * - 0 - LLWU_P7 input was not a wakeup source
1190 * - 1 - LLWU_P7 input was a wakeup source
1191 */
1192 /*@{*/
1193 #define BP_LLWU_F1_WUF7 (7U) /*!< Bit position for LLWU_F1_WUF7. */
1194 #define BM_LLWU_F1_WUF7 (0x80U) /*!< Bit mask for LLWU_F1_WUF7. */
1195 #define BS_LLWU_F1_WUF7 (1U) /*!< Bit field size in bits for LLWU_F1_WUF7. */
1196
1197 /*! @brief Read current value of the LLWU_F1_WUF7 field. */
1198 #define BR_LLWU_F1_WUF7(x) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF7))
1199
1200 /*! @brief Format value for bitfield LLWU_F1_WUF7. */
1201 #define BF_LLWU_F1_WUF7(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F1_WUF7) & BM_LLWU_F1_WUF7)
1202
1203 /*! @brief Set the WUF7 field to a new value. */
1204 #define BW_LLWU_F1_WUF7(x, v) (BITBAND_ACCESS8(HW_LLWU_F1_ADDR(x), BP_LLWU_F1_WUF7) = (v))
1205 /*@}*/
1206
1207 /*******************************************************************************
1208 * HW_LLWU_F2 - LLWU Flag 2 register
1209 ******************************************************************************/
1210
1211 /*!
1212 * @brief HW_LLWU_F2 - LLWU Flag 2 register (W1C)
1213 *
1214 * Reset value: 0x00U
1215 *
1216 * LLWU_F2 contains the wakeup flags indicating which wakeup source caused the
1217 * MCU to exit LLS or VLLS mode. For LLS, this is the source causing the CPU
1218 * interrupt flow. For VLLS, this is the source causing the MCU reset flow. The
1219 * external wakeup flags are read-only and clearing a flag is accomplished by a write
1220 * of a 1 to the corresponding WUFx bit. The wakeup flag (WUFx), if set, will
1221 * remain set if the associated WUPEx bit is cleared. This register is reset on Chip
1222 * Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
1223 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
1224 * IntroductionInformation found here describes the registers of the Reset Control
1225 * Module (RCM). The RCM implements many of the reset functions for the chip. See the
1226 * chip's reset chapter for more information. details for more information.
1227 */
1228 typedef union _hw_llwu_f2
1229 {
1230 uint8_t U;
1231 struct _hw_llwu_f2_bitfields
1232 {
1233 uint8_t WUF8 : 1; /*!< [0] Wakeup Flag For LLWU_P8 */
1234 uint8_t WUF9 : 1; /*!< [1] Wakeup Flag For LLWU_P9 */
1235 uint8_t WUF10 : 1; /*!< [2] Wakeup Flag For LLWU_P10 */
1236 uint8_t WUF11 : 1; /*!< [3] Wakeup Flag For LLWU_P11 */
1237 uint8_t WUF12 : 1; /*!< [4] Wakeup Flag For LLWU_P12 */
1238 uint8_t WUF13 : 1; /*!< [5] Wakeup Flag For LLWU_P13 */
1239 uint8_t WUF14 : 1; /*!< [6] Wakeup Flag For LLWU_P14 */
1240 uint8_t WUF15 : 1; /*!< [7] Wakeup Flag For LLWU_P15 */
1241 } B;
1242 } hw_llwu_f2_t;
1243
1244 /*!
1245 * @name Constants and macros for entire LLWU_F2 register
1246 */
1247 /*@{*/
1248 #define HW_LLWU_F2_ADDR(x) ((x) + 0x6U)
1249
1250 #define HW_LLWU_F2(x) (*(__IO hw_llwu_f2_t *) HW_LLWU_F2_ADDR(x))
1251 #define HW_LLWU_F2_RD(x) (HW_LLWU_F2(x).U)
1252 #define HW_LLWU_F2_WR(x, v) (HW_LLWU_F2(x).U = (v))
1253 #define HW_LLWU_F2_SET(x, v) (HW_LLWU_F2_WR(x, HW_LLWU_F2_RD(x) | (v)))
1254 #define HW_LLWU_F2_CLR(x, v) (HW_LLWU_F2_WR(x, HW_LLWU_F2_RD(x) & ~(v)))
1255 #define HW_LLWU_F2_TOG(x, v) (HW_LLWU_F2_WR(x, HW_LLWU_F2_RD(x) ^ (v)))
1256 /*@}*/
1257
1258 /*
1259 * Constants & macros for individual LLWU_F2 bitfields
1260 */
1261
1262 /*!
1263 * @name Register LLWU_F2, field WUF8[0] (W1C)
1264 *
1265 * Indicates that an enabled external wakeup pin was a source of exiting a
1266 * low-leakage power mode. To clear the flag, write a 1 to WUF8.
1267 *
1268 * Values:
1269 * - 0 - LLWU_P8 input was not a wakeup source
1270 * - 1 - LLWU_P8 input was a wakeup source
1271 */
1272 /*@{*/
1273 #define BP_LLWU_F2_WUF8 (0U) /*!< Bit position for LLWU_F2_WUF8. */
1274 #define BM_LLWU_F2_WUF8 (0x01U) /*!< Bit mask for LLWU_F2_WUF8. */
1275 #define BS_LLWU_F2_WUF8 (1U) /*!< Bit field size in bits for LLWU_F2_WUF8. */
1276
1277 /*! @brief Read current value of the LLWU_F2_WUF8 field. */
1278 #define BR_LLWU_F2_WUF8(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF8))
1279
1280 /*! @brief Format value for bitfield LLWU_F2_WUF8. */
1281 #define BF_LLWU_F2_WUF8(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF8) & BM_LLWU_F2_WUF8)
1282
1283 /*! @brief Set the WUF8 field to a new value. */
1284 #define BW_LLWU_F2_WUF8(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF8) = (v))
1285 /*@}*/
1286
1287 /*!
1288 * @name Register LLWU_F2, field WUF9[1] (W1C)
1289 *
1290 * Indicates that an enabled external wakeup pin was a source of exiting a
1291 * low-leakage power mode. To clear the flag, write a 1 to WUF9.
1292 *
1293 * Values:
1294 * - 0 - LLWU_P9 input was not a wakeup source
1295 * - 1 - LLWU_P9 input was a wakeup source
1296 */
1297 /*@{*/
1298 #define BP_LLWU_F2_WUF9 (1U) /*!< Bit position for LLWU_F2_WUF9. */
1299 #define BM_LLWU_F2_WUF9 (0x02U) /*!< Bit mask for LLWU_F2_WUF9. */
1300 #define BS_LLWU_F2_WUF9 (1U) /*!< Bit field size in bits for LLWU_F2_WUF9. */
1301
1302 /*! @brief Read current value of the LLWU_F2_WUF9 field. */
1303 #define BR_LLWU_F2_WUF9(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF9))
1304
1305 /*! @brief Format value for bitfield LLWU_F2_WUF9. */
1306 #define BF_LLWU_F2_WUF9(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF9) & BM_LLWU_F2_WUF9)
1307
1308 /*! @brief Set the WUF9 field to a new value. */
1309 #define BW_LLWU_F2_WUF9(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF9) = (v))
1310 /*@}*/
1311
1312 /*!
1313 * @name Register LLWU_F2, field WUF10[2] (W1C)
1314 *
1315 * Indicates that an enabled external wakeup pin was a source of exiting a
1316 * low-leakage power mode. To clear the flag, write a 1 to WUF10.
1317 *
1318 * Values:
1319 * - 0 - LLWU_P10 input was not a wakeup source
1320 * - 1 - LLWU_P10 input was a wakeup source
1321 */
1322 /*@{*/
1323 #define BP_LLWU_F2_WUF10 (2U) /*!< Bit position for LLWU_F2_WUF10. */
1324 #define BM_LLWU_F2_WUF10 (0x04U) /*!< Bit mask for LLWU_F2_WUF10. */
1325 #define BS_LLWU_F2_WUF10 (1U) /*!< Bit field size in bits for LLWU_F2_WUF10. */
1326
1327 /*! @brief Read current value of the LLWU_F2_WUF10 field. */
1328 #define BR_LLWU_F2_WUF10(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF10))
1329
1330 /*! @brief Format value for bitfield LLWU_F2_WUF10. */
1331 #define BF_LLWU_F2_WUF10(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF10) & BM_LLWU_F2_WUF10)
1332
1333 /*! @brief Set the WUF10 field to a new value. */
1334 #define BW_LLWU_F2_WUF10(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF10) = (v))
1335 /*@}*/
1336
1337 /*!
1338 * @name Register LLWU_F2, field WUF11[3] (W1C)
1339 *
1340 * Indicates that an enabled external wakeup pin was a source of exiting a
1341 * low-leakage power mode. To clear the flag, write a 1 to WUF11.
1342 *
1343 * Values:
1344 * - 0 - LLWU_P11 input was not a wakeup source
1345 * - 1 - LLWU_P11 input was a wakeup source
1346 */
1347 /*@{*/
1348 #define BP_LLWU_F2_WUF11 (3U) /*!< Bit position for LLWU_F2_WUF11. */
1349 #define BM_LLWU_F2_WUF11 (0x08U) /*!< Bit mask for LLWU_F2_WUF11. */
1350 #define BS_LLWU_F2_WUF11 (1U) /*!< Bit field size in bits for LLWU_F2_WUF11. */
1351
1352 /*! @brief Read current value of the LLWU_F2_WUF11 field. */
1353 #define BR_LLWU_F2_WUF11(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF11))
1354
1355 /*! @brief Format value for bitfield LLWU_F2_WUF11. */
1356 #define BF_LLWU_F2_WUF11(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF11) & BM_LLWU_F2_WUF11)
1357
1358 /*! @brief Set the WUF11 field to a new value. */
1359 #define BW_LLWU_F2_WUF11(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF11) = (v))
1360 /*@}*/
1361
1362 /*!
1363 * @name Register LLWU_F2, field WUF12[4] (W1C)
1364 *
1365 * Indicates that an enabled external wakeup pin was a source of exiting a
1366 * low-leakage power mode. To clear the flag, write a 1 to WUF12.
1367 *
1368 * Values:
1369 * - 0 - LLWU_P12 input was not a wakeup source
1370 * - 1 - LLWU_P12 input was a wakeup source
1371 */
1372 /*@{*/
1373 #define BP_LLWU_F2_WUF12 (4U) /*!< Bit position for LLWU_F2_WUF12. */
1374 #define BM_LLWU_F2_WUF12 (0x10U) /*!< Bit mask for LLWU_F2_WUF12. */
1375 #define BS_LLWU_F2_WUF12 (1U) /*!< Bit field size in bits for LLWU_F2_WUF12. */
1376
1377 /*! @brief Read current value of the LLWU_F2_WUF12 field. */
1378 #define BR_LLWU_F2_WUF12(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF12))
1379
1380 /*! @brief Format value for bitfield LLWU_F2_WUF12. */
1381 #define BF_LLWU_F2_WUF12(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF12) & BM_LLWU_F2_WUF12)
1382
1383 /*! @brief Set the WUF12 field to a new value. */
1384 #define BW_LLWU_F2_WUF12(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF12) = (v))
1385 /*@}*/
1386
1387 /*!
1388 * @name Register LLWU_F2, field WUF13[5] (W1C)
1389 *
1390 * Indicates that an enabled external wakeup pin was a source of exiting a
1391 * low-leakage power mode. To clear the flag, write a 1 to WUF13.
1392 *
1393 * Values:
1394 * - 0 - LLWU_P13 input was not a wakeup source
1395 * - 1 - LLWU_P13 input was a wakeup source
1396 */
1397 /*@{*/
1398 #define BP_LLWU_F2_WUF13 (5U) /*!< Bit position for LLWU_F2_WUF13. */
1399 #define BM_LLWU_F2_WUF13 (0x20U) /*!< Bit mask for LLWU_F2_WUF13. */
1400 #define BS_LLWU_F2_WUF13 (1U) /*!< Bit field size in bits for LLWU_F2_WUF13. */
1401
1402 /*! @brief Read current value of the LLWU_F2_WUF13 field. */
1403 #define BR_LLWU_F2_WUF13(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF13))
1404
1405 /*! @brief Format value for bitfield LLWU_F2_WUF13. */
1406 #define BF_LLWU_F2_WUF13(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF13) & BM_LLWU_F2_WUF13)
1407
1408 /*! @brief Set the WUF13 field to a new value. */
1409 #define BW_LLWU_F2_WUF13(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF13) = (v))
1410 /*@}*/
1411
1412 /*!
1413 * @name Register LLWU_F2, field WUF14[6] (W1C)
1414 *
1415 * Indicates that an enabled external wakeup pin was a source of exiting a
1416 * low-leakage power mode. To clear the flag, write a 1 to WUF14.
1417 *
1418 * Values:
1419 * - 0 - LLWU_P14 input was not a wakeup source
1420 * - 1 - LLWU_P14 input was a wakeup source
1421 */
1422 /*@{*/
1423 #define BP_LLWU_F2_WUF14 (6U) /*!< Bit position for LLWU_F2_WUF14. */
1424 #define BM_LLWU_F2_WUF14 (0x40U) /*!< Bit mask for LLWU_F2_WUF14. */
1425 #define BS_LLWU_F2_WUF14 (1U) /*!< Bit field size in bits for LLWU_F2_WUF14. */
1426
1427 /*! @brief Read current value of the LLWU_F2_WUF14 field. */
1428 #define BR_LLWU_F2_WUF14(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF14))
1429
1430 /*! @brief Format value for bitfield LLWU_F2_WUF14. */
1431 #define BF_LLWU_F2_WUF14(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF14) & BM_LLWU_F2_WUF14)
1432
1433 /*! @brief Set the WUF14 field to a new value. */
1434 #define BW_LLWU_F2_WUF14(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF14) = (v))
1435 /*@}*/
1436
1437 /*!
1438 * @name Register LLWU_F2, field WUF15[7] (W1C)
1439 *
1440 * Indicates that an enabled external wakeup pin was a source of exiting a
1441 * low-leakage power mode. To clear the flag, write a 1 to WUF15.
1442 *
1443 * Values:
1444 * - 0 - LLWU_P15 input was not a wakeup source
1445 * - 1 - LLWU_P15 input was a wakeup source
1446 */
1447 /*@{*/
1448 #define BP_LLWU_F2_WUF15 (7U) /*!< Bit position for LLWU_F2_WUF15. */
1449 #define BM_LLWU_F2_WUF15 (0x80U) /*!< Bit mask for LLWU_F2_WUF15. */
1450 #define BS_LLWU_F2_WUF15 (1U) /*!< Bit field size in bits for LLWU_F2_WUF15. */
1451
1452 /*! @brief Read current value of the LLWU_F2_WUF15 field. */
1453 #define BR_LLWU_F2_WUF15(x) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF15))
1454
1455 /*! @brief Format value for bitfield LLWU_F2_WUF15. */
1456 #define BF_LLWU_F2_WUF15(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_F2_WUF15) & BM_LLWU_F2_WUF15)
1457
1458 /*! @brief Set the WUF15 field to a new value. */
1459 #define BW_LLWU_F2_WUF15(x, v) (BITBAND_ACCESS8(HW_LLWU_F2_ADDR(x), BP_LLWU_F2_WUF15) = (v))
1460 /*@}*/
1461
1462 /*******************************************************************************
1463 * HW_LLWU_F3 - LLWU Flag 3 register
1464 ******************************************************************************/
1465
1466 /*!
1467 * @brief HW_LLWU_F3 - LLWU Flag 3 register (RO)
1468 *
1469 * Reset value: 0x00U
1470 *
1471 * LLWU_F3 contains the wakeup flags indicating which internal wakeup source
1472 * caused the MCU to exit LLS or VLLS mode. For LLS, this is the source causing the
1473 * CPU interrupt flow. For VLLS, this is the source causing the MCU reset flow.
1474 * For internal peripherals that are capable of running in a low-leakage power
1475 * mode, such as a real time clock module or CMP module, the flag from the
1476 * associated peripheral is accessible as the MWUFx bit. The flag will need to be cleared
1477 * in the peripheral instead of writing a 1 to the MWUFx bit. This register is
1478 * reset on Chip Reset not VLLS and by reset types that trigger Chip Reset not
1479 * VLLS. It is unaffected by reset types that do not trigger Chip Reset not VLLS. See
1480 * the IntroductionInformation found here describes the registers of the Reset
1481 * Control Module (RCM). The RCM implements many of the reset functions for the
1482 * chip. See the chip's reset chapter for more information. details for more
1483 * information.
1484 */
1485 typedef union _hw_llwu_f3
1486 {
1487 uint8_t U;
1488 struct _hw_llwu_f3_bitfields
1489 {
1490 uint8_t MWUF0 : 1; /*!< [0] Wakeup flag For module 0 */
1491 uint8_t MWUF1 : 1; /*!< [1] Wakeup flag For module 1 */
1492 uint8_t MWUF2 : 1; /*!< [2] Wakeup flag For module 2 */
1493 uint8_t MWUF3 : 1; /*!< [3] Wakeup flag For module 3 */
1494 uint8_t MWUF4 : 1; /*!< [4] Wakeup flag For module 4 */
1495 uint8_t MWUF5 : 1; /*!< [5] Wakeup flag For module 5 */
1496 uint8_t MWUF6 : 1; /*!< [6] Wakeup flag For module 6 */
1497 uint8_t MWUF7 : 1; /*!< [7] Wakeup flag For module 7 */
1498 } B;
1499 } hw_llwu_f3_t;
1500
1501 /*!
1502 * @name Constants and macros for entire LLWU_F3 register
1503 */
1504 /*@{*/
1505 #define HW_LLWU_F3_ADDR(x) ((x) + 0x7U)
1506
1507 #define HW_LLWU_F3(x) (*(__I hw_llwu_f3_t *) HW_LLWU_F3_ADDR(x))
1508 #define HW_LLWU_F3_RD(x) (HW_LLWU_F3(x).U)
1509 /*@}*/
1510
1511 /*
1512 * Constants & macros for individual LLWU_F3 bitfields
1513 */
1514
1515 /*!
1516 * @name Register LLWU_F3, field MWUF0[0] (RO)
1517 *
1518 * Indicates that an enabled internal peripheral was a source of exiting a
1519 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1520 * clearing mechanism.
1521 *
1522 * Values:
1523 * - 0 - Module 0 input was not a wakeup source
1524 * - 1 - Module 0 input was a wakeup source
1525 */
1526 /*@{*/
1527 #define BP_LLWU_F3_MWUF0 (0U) /*!< Bit position for LLWU_F3_MWUF0. */
1528 #define BM_LLWU_F3_MWUF0 (0x01U) /*!< Bit mask for LLWU_F3_MWUF0. */
1529 #define BS_LLWU_F3_MWUF0 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF0. */
1530
1531 /*! @brief Read current value of the LLWU_F3_MWUF0 field. */
1532 #define BR_LLWU_F3_MWUF0(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF0))
1533 /*@}*/
1534
1535 /*!
1536 * @name Register LLWU_F3, field MWUF1[1] (RO)
1537 *
1538 * Indicates that an enabled internal peripheral was a source of exiting a
1539 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1540 * clearing mechanism.
1541 *
1542 * Values:
1543 * - 0 - Module 1 input was not a wakeup source
1544 * - 1 - Module 1 input was a wakeup source
1545 */
1546 /*@{*/
1547 #define BP_LLWU_F3_MWUF1 (1U) /*!< Bit position for LLWU_F3_MWUF1. */
1548 #define BM_LLWU_F3_MWUF1 (0x02U) /*!< Bit mask for LLWU_F3_MWUF1. */
1549 #define BS_LLWU_F3_MWUF1 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF1. */
1550
1551 /*! @brief Read current value of the LLWU_F3_MWUF1 field. */
1552 #define BR_LLWU_F3_MWUF1(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF1))
1553 /*@}*/
1554
1555 /*!
1556 * @name Register LLWU_F3, field MWUF2[2] (RO)
1557 *
1558 * Indicates that an enabled internal peripheral was a source of exiting a
1559 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1560 * clearing mechanism.
1561 *
1562 * Values:
1563 * - 0 - Module 2 input was not a wakeup source
1564 * - 1 - Module 2 input was a wakeup source
1565 */
1566 /*@{*/
1567 #define BP_LLWU_F3_MWUF2 (2U) /*!< Bit position for LLWU_F3_MWUF2. */
1568 #define BM_LLWU_F3_MWUF2 (0x04U) /*!< Bit mask for LLWU_F3_MWUF2. */
1569 #define BS_LLWU_F3_MWUF2 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF2. */
1570
1571 /*! @brief Read current value of the LLWU_F3_MWUF2 field. */
1572 #define BR_LLWU_F3_MWUF2(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF2))
1573 /*@}*/
1574
1575 /*!
1576 * @name Register LLWU_F3, field MWUF3[3] (RO)
1577 *
1578 * Indicates that an enabled internal peripheral was a source of exiting a
1579 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1580 * clearing mechanism.
1581 *
1582 * Values:
1583 * - 0 - Module 3 input was not a wakeup source
1584 * - 1 - Module 3 input was a wakeup source
1585 */
1586 /*@{*/
1587 #define BP_LLWU_F3_MWUF3 (3U) /*!< Bit position for LLWU_F3_MWUF3. */
1588 #define BM_LLWU_F3_MWUF3 (0x08U) /*!< Bit mask for LLWU_F3_MWUF3. */
1589 #define BS_LLWU_F3_MWUF3 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF3. */
1590
1591 /*! @brief Read current value of the LLWU_F3_MWUF3 field. */
1592 #define BR_LLWU_F3_MWUF3(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF3))
1593 /*@}*/
1594
1595 /*!
1596 * @name Register LLWU_F3, field MWUF4[4] (RO)
1597 *
1598 * Indicates that an enabled internal peripheral was a source of exiting a
1599 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1600 * clearing mechanism.
1601 *
1602 * Values:
1603 * - 0 - Module 4 input was not a wakeup source
1604 * - 1 - Module 4 input was a wakeup source
1605 */
1606 /*@{*/
1607 #define BP_LLWU_F3_MWUF4 (4U) /*!< Bit position for LLWU_F3_MWUF4. */
1608 #define BM_LLWU_F3_MWUF4 (0x10U) /*!< Bit mask for LLWU_F3_MWUF4. */
1609 #define BS_LLWU_F3_MWUF4 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF4. */
1610
1611 /*! @brief Read current value of the LLWU_F3_MWUF4 field. */
1612 #define BR_LLWU_F3_MWUF4(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF4))
1613 /*@}*/
1614
1615 /*!
1616 * @name Register LLWU_F3, field MWUF5[5] (RO)
1617 *
1618 * Indicates that an enabled internal peripheral was a source of exiting a
1619 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1620 * clearing mechanism.
1621 *
1622 * Values:
1623 * - 0 - Module 5 input was not a wakeup source
1624 * - 1 - Module 5 input was a wakeup source
1625 */
1626 /*@{*/
1627 #define BP_LLWU_F3_MWUF5 (5U) /*!< Bit position for LLWU_F3_MWUF5. */
1628 #define BM_LLWU_F3_MWUF5 (0x20U) /*!< Bit mask for LLWU_F3_MWUF5. */
1629 #define BS_LLWU_F3_MWUF5 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF5. */
1630
1631 /*! @brief Read current value of the LLWU_F3_MWUF5 field. */
1632 #define BR_LLWU_F3_MWUF5(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF5))
1633 /*@}*/
1634
1635 /*!
1636 * @name Register LLWU_F3, field MWUF6[6] (RO)
1637 *
1638 * Indicates that an enabled internal peripheral was a source of exiting a
1639 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1640 * clearing mechanism.
1641 *
1642 * Values:
1643 * - 0 - Module 6 input was not a wakeup source
1644 * - 1 - Module 6 input was a wakeup source
1645 */
1646 /*@{*/
1647 #define BP_LLWU_F3_MWUF6 (6U) /*!< Bit position for LLWU_F3_MWUF6. */
1648 #define BM_LLWU_F3_MWUF6 (0x40U) /*!< Bit mask for LLWU_F3_MWUF6. */
1649 #define BS_LLWU_F3_MWUF6 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF6. */
1650
1651 /*! @brief Read current value of the LLWU_F3_MWUF6 field. */
1652 #define BR_LLWU_F3_MWUF6(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF6))
1653 /*@}*/
1654
1655 /*!
1656 * @name Register LLWU_F3, field MWUF7[7] (RO)
1657 *
1658 * Indicates that an enabled internal peripheral was a source of exiting a
1659 * low-leakage power mode. To clear the flag, follow the internal peripheral flag
1660 * clearing mechanism.
1661 *
1662 * Values:
1663 * - 0 - Module 7 input was not a wakeup source
1664 * - 1 - Module 7 input was a wakeup source
1665 */
1666 /*@{*/
1667 #define BP_LLWU_F3_MWUF7 (7U) /*!< Bit position for LLWU_F3_MWUF7. */
1668 #define BM_LLWU_F3_MWUF7 (0x80U) /*!< Bit mask for LLWU_F3_MWUF7. */
1669 #define BS_LLWU_F3_MWUF7 (1U) /*!< Bit field size in bits for LLWU_F3_MWUF7. */
1670
1671 /*! @brief Read current value of the LLWU_F3_MWUF7 field. */
1672 #define BR_LLWU_F3_MWUF7(x) (BITBAND_ACCESS8(HW_LLWU_F3_ADDR(x), BP_LLWU_F3_MWUF7))
1673 /*@}*/
1674
1675 /*******************************************************************************
1676 * HW_LLWU_FILT1 - LLWU Pin Filter 1 register
1677 ******************************************************************************/
1678
1679 /*!
1680 * @brief HW_LLWU_FILT1 - LLWU Pin Filter 1 register (RW)
1681 *
1682 * Reset value: 0x00U
1683 *
1684 * LLWU_FILT1 is a control and status register that is used to enable/disable
1685 * the digital filter 1 features for an external pin. This register is reset on
1686 * Chip Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
1687 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
1688 * IntroductionInformation found here describes the registers of the Reset Control
1689 * Module (RCM). The RCM implements many of the reset functions for the chip. See
1690 * the chip's reset chapter for more information. details for more information.
1691 */
1692 typedef union _hw_llwu_filt1
1693 {
1694 uint8_t U;
1695 struct _hw_llwu_filt1_bitfields
1696 {
1697 uint8_t FILTSEL : 4; /*!< [3:0] Filter Pin Select */
1698 uint8_t RESERVED0 : 1; /*!< [4] */
1699 uint8_t FILTE : 2; /*!< [6:5] Digital Filter On External Pin */
1700 uint8_t FILTF : 1; /*!< [7] Filter Detect Flag */
1701 } B;
1702 } hw_llwu_filt1_t;
1703
1704 /*!
1705 * @name Constants and macros for entire LLWU_FILT1 register
1706 */
1707 /*@{*/
1708 #define HW_LLWU_FILT1_ADDR(x) ((x) + 0x8U)
1709
1710 #define HW_LLWU_FILT1(x) (*(__IO hw_llwu_filt1_t *) HW_LLWU_FILT1_ADDR(x))
1711 #define HW_LLWU_FILT1_RD(x) (HW_LLWU_FILT1(x).U)
1712 #define HW_LLWU_FILT1_WR(x, v) (HW_LLWU_FILT1(x).U = (v))
1713 #define HW_LLWU_FILT1_SET(x, v) (HW_LLWU_FILT1_WR(x, HW_LLWU_FILT1_RD(x) | (v)))
1714 #define HW_LLWU_FILT1_CLR(x, v) (HW_LLWU_FILT1_WR(x, HW_LLWU_FILT1_RD(x) & ~(v)))
1715 #define HW_LLWU_FILT1_TOG(x, v) (HW_LLWU_FILT1_WR(x, HW_LLWU_FILT1_RD(x) ^ (v)))
1716 /*@}*/
1717
1718 /*
1719 * Constants & macros for individual LLWU_FILT1 bitfields
1720 */
1721
1722 /*!
1723 * @name Register LLWU_FILT1, field FILTSEL[3:0] (RW)
1724 *
1725 * Selects 1 out of the 16 wakeup pins to be muxed into the filter.
1726 *
1727 * Values:
1728 * - 0000 - Select LLWU_P0 for filter
1729 * - 1111 - Select LLWU_P15 for filter
1730 */
1731 /*@{*/
1732 #define BP_LLWU_FILT1_FILTSEL (0U) /*!< Bit position for LLWU_FILT1_FILTSEL. */
1733 #define BM_LLWU_FILT1_FILTSEL (0x0FU) /*!< Bit mask for LLWU_FILT1_FILTSEL. */
1734 #define BS_LLWU_FILT1_FILTSEL (4U) /*!< Bit field size in bits for LLWU_FILT1_FILTSEL. */
1735
1736 /*! @brief Read current value of the LLWU_FILT1_FILTSEL field. */
1737 #define BR_LLWU_FILT1_FILTSEL(x) (HW_LLWU_FILT1(x).B.FILTSEL)
1738
1739 /*! @brief Format value for bitfield LLWU_FILT1_FILTSEL. */
1740 #define BF_LLWU_FILT1_FILTSEL(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT1_FILTSEL) & BM_LLWU_FILT1_FILTSEL)
1741
1742 /*! @brief Set the FILTSEL field to a new value. */
1743 #define BW_LLWU_FILT1_FILTSEL(x, v) (HW_LLWU_FILT1_WR(x, (HW_LLWU_FILT1_RD(x) & ~BM_LLWU_FILT1_FILTSEL) | BF_LLWU_FILT1_FILTSEL(v)))
1744 /*@}*/
1745
1746 /*!
1747 * @name Register LLWU_FILT1, field FILTE[6:5] (RW)
1748 *
1749 * Controls the digital filter options for the external pin detect.
1750 *
1751 * Values:
1752 * - 00 - Filter disabled
1753 * - 01 - Filter posedge detect enabled
1754 * - 10 - Filter negedge detect enabled
1755 * - 11 - Filter any edge detect enabled
1756 */
1757 /*@{*/
1758 #define BP_LLWU_FILT1_FILTE (5U) /*!< Bit position for LLWU_FILT1_FILTE. */
1759 #define BM_LLWU_FILT1_FILTE (0x60U) /*!< Bit mask for LLWU_FILT1_FILTE. */
1760 #define BS_LLWU_FILT1_FILTE (2U) /*!< Bit field size in bits for LLWU_FILT1_FILTE. */
1761
1762 /*! @brief Read current value of the LLWU_FILT1_FILTE field. */
1763 #define BR_LLWU_FILT1_FILTE(x) (HW_LLWU_FILT1(x).B.FILTE)
1764
1765 /*! @brief Format value for bitfield LLWU_FILT1_FILTE. */
1766 #define BF_LLWU_FILT1_FILTE(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT1_FILTE) & BM_LLWU_FILT1_FILTE)
1767
1768 /*! @brief Set the FILTE field to a new value. */
1769 #define BW_LLWU_FILT1_FILTE(x, v) (HW_LLWU_FILT1_WR(x, (HW_LLWU_FILT1_RD(x) & ~BM_LLWU_FILT1_FILTE) | BF_LLWU_FILT1_FILTE(v)))
1770 /*@}*/
1771
1772 /*!
1773 * @name Register LLWU_FILT1, field FILTF[7] (W1C)
1774 *
1775 * Indicates that the filtered external wakeup pin, selected by FILTSEL, was a
1776 * source of exiting a low-leakage power mode. To clear the flag write a one to
1777 * FILTF.
1778 *
1779 * Values:
1780 * - 0 - Pin Filter 1 was not a wakeup source
1781 * - 1 - Pin Filter 1 was a wakeup source
1782 */
1783 /*@{*/
1784 #define BP_LLWU_FILT1_FILTF (7U) /*!< Bit position for LLWU_FILT1_FILTF. */
1785 #define BM_LLWU_FILT1_FILTF (0x80U) /*!< Bit mask for LLWU_FILT1_FILTF. */
1786 #define BS_LLWU_FILT1_FILTF (1U) /*!< Bit field size in bits for LLWU_FILT1_FILTF. */
1787
1788 /*! @brief Read current value of the LLWU_FILT1_FILTF field. */
1789 #define BR_LLWU_FILT1_FILTF(x) (BITBAND_ACCESS8(HW_LLWU_FILT1_ADDR(x), BP_LLWU_FILT1_FILTF))
1790
1791 /*! @brief Format value for bitfield LLWU_FILT1_FILTF. */
1792 #define BF_LLWU_FILT1_FILTF(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT1_FILTF) & BM_LLWU_FILT1_FILTF)
1793
1794 /*! @brief Set the FILTF field to a new value. */
1795 #define BW_LLWU_FILT1_FILTF(x, v) (BITBAND_ACCESS8(HW_LLWU_FILT1_ADDR(x), BP_LLWU_FILT1_FILTF) = (v))
1796 /*@}*/
1797
1798 /*******************************************************************************
1799 * HW_LLWU_FILT2 - LLWU Pin Filter 2 register
1800 ******************************************************************************/
1801
1802 /*!
1803 * @brief HW_LLWU_FILT2 - LLWU Pin Filter 2 register (RW)
1804 *
1805 * Reset value: 0x00U
1806 *
1807 * LLWU_FILT2 is a control and status register that is used to enable/disable
1808 * the digital filter 2 features for an external pin. This register is reset on
1809 * Chip Reset not VLLS and by reset types that trigger Chip Reset not VLLS. It is
1810 * unaffected by reset types that do not trigger Chip Reset not VLLS. See the
1811 * IntroductionInformation found here describes the registers of the Reset Control
1812 * Module (RCM). The RCM implements many of the reset functions for the chip. See
1813 * the chip's reset chapter for more information. details for more information.
1814 */
1815 typedef union _hw_llwu_filt2
1816 {
1817 uint8_t U;
1818 struct _hw_llwu_filt2_bitfields
1819 {
1820 uint8_t FILTSEL : 4; /*!< [3:0] Filter Pin Select */
1821 uint8_t RESERVED0 : 1; /*!< [4] */
1822 uint8_t FILTE : 2; /*!< [6:5] Digital Filter On External Pin */
1823 uint8_t FILTF : 1; /*!< [7] Filter Detect Flag */
1824 } B;
1825 } hw_llwu_filt2_t;
1826
1827 /*!
1828 * @name Constants and macros for entire LLWU_FILT2 register
1829 */
1830 /*@{*/
1831 #define HW_LLWU_FILT2_ADDR(x) ((x) + 0x9U)
1832
1833 #define HW_LLWU_FILT2(x) (*(__IO hw_llwu_filt2_t *) HW_LLWU_FILT2_ADDR(x))
1834 #define HW_LLWU_FILT2_RD(x) (HW_LLWU_FILT2(x).U)
1835 #define HW_LLWU_FILT2_WR(x, v) (HW_LLWU_FILT2(x).U = (v))
1836 #define HW_LLWU_FILT2_SET(x, v) (HW_LLWU_FILT2_WR(x, HW_LLWU_FILT2_RD(x) | (v)))
1837 #define HW_LLWU_FILT2_CLR(x, v) (HW_LLWU_FILT2_WR(x, HW_LLWU_FILT2_RD(x) & ~(v)))
1838 #define HW_LLWU_FILT2_TOG(x, v) (HW_LLWU_FILT2_WR(x, HW_LLWU_FILT2_RD(x) ^ (v)))
1839 /*@}*/
1840
1841 /*
1842 * Constants & macros for individual LLWU_FILT2 bitfields
1843 */
1844
1845 /*!
1846 * @name Register LLWU_FILT2, field FILTSEL[3:0] (RW)
1847 *
1848 * Selects 1 out of the 16 wakeup pins to be muxed into the filter.
1849 *
1850 * Values:
1851 * - 0000 - Select LLWU_P0 for filter
1852 * - 1111 - Select LLWU_P15 for filter
1853 */
1854 /*@{*/
1855 #define BP_LLWU_FILT2_FILTSEL (0U) /*!< Bit position for LLWU_FILT2_FILTSEL. */
1856 #define BM_LLWU_FILT2_FILTSEL (0x0FU) /*!< Bit mask for LLWU_FILT2_FILTSEL. */
1857 #define BS_LLWU_FILT2_FILTSEL (4U) /*!< Bit field size in bits for LLWU_FILT2_FILTSEL. */
1858
1859 /*! @brief Read current value of the LLWU_FILT2_FILTSEL field. */
1860 #define BR_LLWU_FILT2_FILTSEL(x) (HW_LLWU_FILT2(x).B.FILTSEL)
1861
1862 /*! @brief Format value for bitfield LLWU_FILT2_FILTSEL. */
1863 #define BF_LLWU_FILT2_FILTSEL(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT2_FILTSEL) & BM_LLWU_FILT2_FILTSEL)
1864
1865 /*! @brief Set the FILTSEL field to a new value. */
1866 #define BW_LLWU_FILT2_FILTSEL(x, v) (HW_LLWU_FILT2_WR(x, (HW_LLWU_FILT2_RD(x) & ~BM_LLWU_FILT2_FILTSEL) | BF_LLWU_FILT2_FILTSEL(v)))
1867 /*@}*/
1868
1869 /*!
1870 * @name Register LLWU_FILT2, field FILTE[6:5] (RW)
1871 *
1872 * Controls the digital filter options for the external pin detect.
1873 *
1874 * Values:
1875 * - 00 - Filter disabled
1876 * - 01 - Filter posedge detect enabled
1877 * - 10 - Filter negedge detect enabled
1878 * - 11 - Filter any edge detect enabled
1879 */
1880 /*@{*/
1881 #define BP_LLWU_FILT2_FILTE (5U) /*!< Bit position for LLWU_FILT2_FILTE. */
1882 #define BM_LLWU_FILT2_FILTE (0x60U) /*!< Bit mask for LLWU_FILT2_FILTE. */
1883 #define BS_LLWU_FILT2_FILTE (2U) /*!< Bit field size in bits for LLWU_FILT2_FILTE. */
1884
1885 /*! @brief Read current value of the LLWU_FILT2_FILTE field. */
1886 #define BR_LLWU_FILT2_FILTE(x) (HW_LLWU_FILT2(x).B.FILTE)
1887
1888 /*! @brief Format value for bitfield LLWU_FILT2_FILTE. */
1889 #define BF_LLWU_FILT2_FILTE(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT2_FILTE) & BM_LLWU_FILT2_FILTE)
1890
1891 /*! @brief Set the FILTE field to a new value. */
1892 #define BW_LLWU_FILT2_FILTE(x, v) (HW_LLWU_FILT2_WR(x, (HW_LLWU_FILT2_RD(x) & ~BM_LLWU_FILT2_FILTE) | BF_LLWU_FILT2_FILTE(v)))
1893 /*@}*/
1894
1895 /*!
1896 * @name Register LLWU_FILT2, field FILTF[7] (W1C)
1897 *
1898 * Indicates that the filtered external wakeup pin, selected by FILTSEL, was a
1899 * source of exiting a low-leakage power mode. To clear the flag write a one to
1900 * FILTF.
1901 *
1902 * Values:
1903 * - 0 - Pin Filter 2 was not a wakeup source
1904 * - 1 - Pin Filter 2 was a wakeup source
1905 */
1906 /*@{*/
1907 #define BP_LLWU_FILT2_FILTF (7U) /*!< Bit position for LLWU_FILT2_FILTF. */
1908 #define BM_LLWU_FILT2_FILTF (0x80U) /*!< Bit mask for LLWU_FILT2_FILTF. */
1909 #define BS_LLWU_FILT2_FILTF (1U) /*!< Bit field size in bits for LLWU_FILT2_FILTF. */
1910
1911 /*! @brief Read current value of the LLWU_FILT2_FILTF field. */
1912 #define BR_LLWU_FILT2_FILTF(x) (BITBAND_ACCESS8(HW_LLWU_FILT2_ADDR(x), BP_LLWU_FILT2_FILTF))
1913
1914 /*! @brief Format value for bitfield LLWU_FILT2_FILTF. */
1915 #define BF_LLWU_FILT2_FILTF(v) ((uint8_t)((uint8_t)(v) << BP_LLWU_FILT2_FILTF) & BM_LLWU_FILT2_FILTF)
1916
1917 /*! @brief Set the FILTF field to a new value. */
1918 #define BW_LLWU_FILT2_FILTF(x, v) (BITBAND_ACCESS8(HW_LLWU_FILT2_ADDR(x), BP_LLWU_FILT2_FILTF) = (v))
1919 /*@}*/
1920
1921 /*******************************************************************************
1922 * hw_llwu_t - module struct
1923 ******************************************************************************/
1924 /*!
1925 * @brief All LLWU module registers.
1926 */
1927 #pragma pack(1)
1928 typedef struct _hw_llwu
1929 {
1930 __IO hw_llwu_pe1_t PE1; /*!< [0x0] LLWU Pin Enable 1 register */
1931 __IO hw_llwu_pe2_t PE2; /*!< [0x1] LLWU Pin Enable 2 register */
1932 __IO hw_llwu_pe3_t PE3; /*!< [0x2] LLWU Pin Enable 3 register */
1933 __IO hw_llwu_pe4_t PE4; /*!< [0x3] LLWU Pin Enable 4 register */
1934 __IO hw_llwu_me_t ME; /*!< [0x4] LLWU Module Enable register */
1935 __IO hw_llwu_f1_t F1; /*!< [0x5] LLWU Flag 1 register */
1936 __IO hw_llwu_f2_t F2; /*!< [0x6] LLWU Flag 2 register */
1937 __I hw_llwu_f3_t F3; /*!< [0x7] LLWU Flag 3 register */
1938 __IO hw_llwu_filt1_t FILT1; /*!< [0x8] LLWU Pin Filter 1 register */
1939 __IO hw_llwu_filt2_t FILT2; /*!< [0x9] LLWU Pin Filter 2 register */
1940 } hw_llwu_t;
1941 #pragma pack()
1942
1943 /*! @brief Macro to access all LLWU registers. */
1944 /*! @param x LLWU module instance base address. */
1945 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
1946 * use the '&' operator, like <code>&HW_LLWU(LLWU_BASE)</code>. */
1947 #define HW_LLWU(x) (*(hw_llwu_t *)(x))
1948
1949 #endif /* __HW_LLWU_REGISTERS_H__ */
1950 /* EOF */
Imprint / Impressum