2 ** ###################################################################
3 ** Compilers: Keil ARM C/C++ Compiler
4 ** Freescale C/C++ for Embedded ARM
6 ** IAR ANSI C/C++ Compiler for ARM
8 ** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
9 ** Version: rev. 2.5, 2014-05-06
13 ** Extension to the CMSIS register access layer header.
15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
16 ** All rights reserved.
18 ** Redistribution and use in source and binary forms, with or without modification,
19 ** are permitted provided that the following conditions are met:
21 ** o Redistributions of source code must retain the above copyright notice, this list
22 ** of conditions and the following disclaimer.
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.
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.
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.
43 ** http: www.freescale.com
44 ** mail: support@freescale.com
47 ** - rev. 1.0 (2013-07-23)
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.
69 ** ###################################################################
73 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
75 * This file was generated automatically and any changes may be lost.
77 #ifndef __HW_RCM_REGISTERS_H__
78 #define __HW_RCM_REGISTERS_H__
80 #include "MK22F51212.h"
81 #include "fsl_bitaccess.h"
86 * Reset Control Module
88 * Registers defined in this header file:
89 * - HW_RCM_SRS0 - System Reset Status Register 0
90 * - HW_RCM_SRS1 - System Reset Status Register 1
91 * - HW_RCM_RPFC - Reset Pin Filter Control register
92 * - HW_RCM_RPFW - Reset Pin Filter Width register
93 * - HW_RCM_MR - Mode Register
94 * - HW_RCM_SSRS0 - Sticky System Reset Status Register 0
95 * - HW_RCM_SSRS1 - Sticky System Reset Status Register 1
97 * - hw_rcm_t - Struct containing all module registers.
100 #define HW_RCM_INSTANCE_COUNT (1U) /*!< Number of instances of the RCM module. */
102 /*******************************************************************************
103 * HW_RCM_SRS0 - System Reset Status Register 0
104 ******************************************************************************/
107 * @brief HW_RCM_SRS0 - System Reset Status Register 0 (RO)
111 * This register includes read-only status flags to indicate the source of the
112 * most recent reset. The reset state of these bits depends on what caused the MCU
113 * to reset. The reset value of this register depends on the reset source: POR
114 * (including LVD) - 0x82 LVD (without POR) - 0x02 VLLS mode wakeup due to RESET
115 * pin assertion - 0x41 VLLS mode wakeup due to other wakeup sources - 0x01 Other
116 * reset - a bit is set if its corresponding reset source caused the reset
118 typedef union _hw_rcm_srs0
121 struct _hw_rcm_srs0_bitfields
123 uint8_t WAKEUP
: 1; /*!< [0] Low Leakage Wakeup Reset */
124 uint8_t LVD
: 1; /*!< [1] Low-Voltage Detect Reset */
125 uint8_t LOC
: 1; /*!< [2] Loss-of-Clock Reset */
126 uint8_t LOL
: 1; /*!< [3] Loss-of-Lock Reset */
127 uint8_t RESERVED0
: 1; /*!< [4] */
128 uint8_t WDOGb
: 1; /*!< [5] Watchdog */
129 uint8_t PIN
: 1; /*!< [6] External Reset Pin */
130 uint8_t POR
: 1; /*!< [7] Power-On Reset */
135 * @name Constants and macros for entire RCM_SRS0 register
138 #define HW_RCM_SRS0_ADDR(x) ((x) + 0x0U)
140 #define HW_RCM_SRS0(x) (*(__I hw_rcm_srs0_t *) HW_RCM_SRS0_ADDR(x))
141 #define HW_RCM_SRS0_RD(x) (HW_RCM_SRS0(x).U)
145 * Constants & macros for individual RCM_SRS0 bitfields
149 * @name Register RCM_SRS0, field WAKEUP[0] (RO)
151 * Indicates a reset has been caused by an enabled LLWU module wakeup source
152 * while the chip was in a low leakage mode. In LLS mode, the RESET pin is the only
153 * wakeup source that can cause this reset. Any enabled wakeup source in a VLLSx
154 * mode causes a reset. This bit is cleared by any reset except WAKEUP.
157 * - 0 - Reset not caused by LLWU module wakeup source
158 * - 1 - Reset caused by LLWU module wakeup source
161 #define BP_RCM_SRS0_WAKEUP (0U) /*!< Bit position for RCM_SRS0_WAKEUP. */
162 #define BM_RCM_SRS0_WAKEUP (0x01U) /*!< Bit mask for RCM_SRS0_WAKEUP. */
163 #define BS_RCM_SRS0_WAKEUP (1U) /*!< Bit field size in bits for RCM_SRS0_WAKEUP. */
165 /*! @brief Read current value of the RCM_SRS0_WAKEUP field. */
166 #define BR_RCM_SRS0_WAKEUP(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_WAKEUP))
170 * @name Register RCM_SRS0, field LVD[1] (RO)
172 * If PMC_LVDSC1[LVDRE] is set and the supply drops below the LVD trip voltage,
173 * an LVD reset occurs. This field is also set by POR.
176 * - 0 - Reset not caused by LVD trip or POR
177 * - 1 - Reset caused by LVD trip or POR
180 #define BP_RCM_SRS0_LVD (1U) /*!< Bit position for RCM_SRS0_LVD. */
181 #define BM_RCM_SRS0_LVD (0x02U) /*!< Bit mask for RCM_SRS0_LVD. */
182 #define BS_RCM_SRS0_LVD (1U) /*!< Bit field size in bits for RCM_SRS0_LVD. */
184 /*! @brief Read current value of the RCM_SRS0_LVD field. */
185 #define BR_RCM_SRS0_LVD(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_LVD))
189 * @name Register RCM_SRS0, field LOC[2] (RO)
191 * Indicates a reset has been caused by a loss of external clock. The MCG clock
192 * monitor must be enabled for a loss of clock to be detected. Refer to the
193 * detailed MCG description for information on enabling the clock monitor.
196 * - 0 - Reset not caused by a loss of external clock.
197 * - 1 - Reset caused by a loss of external clock.
200 #define BP_RCM_SRS0_LOC (2U) /*!< Bit position for RCM_SRS0_LOC. */
201 #define BM_RCM_SRS0_LOC (0x04U) /*!< Bit mask for RCM_SRS0_LOC. */
202 #define BS_RCM_SRS0_LOC (1U) /*!< Bit field size in bits for RCM_SRS0_LOC. */
204 /*! @brief Read current value of the RCM_SRS0_LOC field. */
205 #define BR_RCM_SRS0_LOC(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_LOC))
209 * @name Register RCM_SRS0, field LOL[3] (RO)
211 * Indicates a reset has been caused by a loss of lock in the MCG PLL. See the
212 * MCG description for information on the loss-of-clock event.
215 * - 0 - Reset not caused by a loss of lock in the PLL
216 * - 1 - Reset caused by a loss of lock in the PLL
219 #define BP_RCM_SRS0_LOL (3U) /*!< Bit position for RCM_SRS0_LOL. */
220 #define BM_RCM_SRS0_LOL (0x08U) /*!< Bit mask for RCM_SRS0_LOL. */
221 #define BS_RCM_SRS0_LOL (1U) /*!< Bit field size in bits for RCM_SRS0_LOL. */
223 /*! @brief Read current value of the RCM_SRS0_LOL field. */
224 #define BR_RCM_SRS0_LOL(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_LOL))
228 * @name Register RCM_SRS0, field WDOG[5] (RO)
230 * Indicates a reset has been caused by the watchdog timer timing out. This
231 * reset source can be blocked by disabling the watchdog.
234 * - 0 - Reset not caused by watchdog timeout
235 * - 1 - Reset caused by watchdog timeout
238 #define BP_RCM_SRS0_WDOG (5U) /*!< Bit position for RCM_SRS0_WDOG. */
239 #define BM_RCM_SRS0_WDOG (0x20U) /*!< Bit mask for RCM_SRS0_WDOG. */
240 #define BS_RCM_SRS0_WDOG (1U) /*!< Bit field size in bits for RCM_SRS0_WDOG. */
242 /*! @brief Read current value of the RCM_SRS0_WDOG field. */
243 #define BR_RCM_SRS0_WDOG(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_WDOG))
247 * @name Register RCM_SRS0, field PIN[6] (RO)
249 * Indicates a reset has been caused by an active-low level on the external
253 * - 0 - Reset not caused by external reset pin
254 * - 1 - Reset caused by external reset pin
257 #define BP_RCM_SRS0_PIN (6U) /*!< Bit position for RCM_SRS0_PIN. */
258 #define BM_RCM_SRS0_PIN (0x40U) /*!< Bit mask for RCM_SRS0_PIN. */
259 #define BS_RCM_SRS0_PIN (1U) /*!< Bit field size in bits for RCM_SRS0_PIN. */
261 /*! @brief Read current value of the RCM_SRS0_PIN field. */
262 #define BR_RCM_SRS0_PIN(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_PIN))
266 * @name Register RCM_SRS0, field POR[7] (RO)
268 * Indicates a reset has been caused by the power-on detection logic. Because
269 * the internal supply voltage was ramping up at the time, the low-voltage reset
270 * (LVD) status bit is also set to indicate that the reset occurred while the
271 * internal supply was below the LVD threshold.
274 * - 0 - Reset not caused by POR
275 * - 1 - Reset caused by POR
278 #define BP_RCM_SRS0_POR (7U) /*!< Bit position for RCM_SRS0_POR. */
279 #define BM_RCM_SRS0_POR (0x80U) /*!< Bit mask for RCM_SRS0_POR. */
280 #define BS_RCM_SRS0_POR (1U) /*!< Bit field size in bits for RCM_SRS0_POR. */
282 /*! @brief Read current value of the RCM_SRS0_POR field. */
283 #define BR_RCM_SRS0_POR(x) (BITBAND_ACCESS8(HW_RCM_SRS0_ADDR(x), BP_RCM_SRS0_POR))
286 /*******************************************************************************
287 * HW_RCM_SRS1 - System Reset Status Register 1
288 ******************************************************************************/
291 * @brief HW_RCM_SRS1 - System Reset Status Register 1 (RO)
295 * This register includes read-only status flags to indicate the source of the
296 * most recent reset. The reset state of these bits depends on what caused the MCU
297 * to reset. The reset value of this register depends on the reset source: POR
298 * (including LVD) - 0x00 LVD (without POR) - 0x00 VLLS mode wakeup - 0x00 Other
299 * reset - a bit is set if its corresponding reset source caused the reset
301 typedef union _hw_rcm_srs1
304 struct _hw_rcm_srs1_bitfields
306 uint8_t JTAG
: 1; /*!< [0] JTAG Generated Reset */
307 uint8_t LOCKUP
: 1; /*!< [1] Core Lockup */
308 uint8_t SW
: 1; /*!< [2] Software */
309 uint8_t MDM_AP
: 1; /*!< [3] MDM-AP System Reset Request */
310 uint8_t EZPT
: 1; /*!< [4] EzPort Reset */
311 uint8_t SACKERR
: 1; /*!< [5] Stop Mode Acknowledge Error Reset */
312 uint8_t RESERVED0
: 2; /*!< [7:6] */
317 * @name Constants and macros for entire RCM_SRS1 register
320 #define HW_RCM_SRS1_ADDR(x) ((x) + 0x1U)
322 #define HW_RCM_SRS1(x) (*(__I hw_rcm_srs1_t *) HW_RCM_SRS1_ADDR(x))
323 #define HW_RCM_SRS1_RD(x) (HW_RCM_SRS1(x).U)
327 * Constants & macros for individual RCM_SRS1 bitfields
331 * @name Register RCM_SRS1, field JTAG[0] (RO)
333 * Indicates a reset has been caused by JTAG selection of certain IR codes:
334 * EZPORT, EXTEST, HIGHZ, and CLAMP.
337 * - 0 - Reset not caused by JTAG
338 * - 1 - Reset caused by JTAG
341 #define BP_RCM_SRS1_JTAG (0U) /*!< Bit position for RCM_SRS1_JTAG. */
342 #define BM_RCM_SRS1_JTAG (0x01U) /*!< Bit mask for RCM_SRS1_JTAG. */
343 #define BS_RCM_SRS1_JTAG (1U) /*!< Bit field size in bits for RCM_SRS1_JTAG. */
345 /*! @brief Read current value of the RCM_SRS1_JTAG field. */
346 #define BR_RCM_SRS1_JTAG(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_JTAG))
350 * @name Register RCM_SRS1, field LOCKUP[1] (RO)
352 * Indicates a reset has been caused by the ARM core indication of a LOCKUP
356 * - 0 - Reset not caused by core LOCKUP event
357 * - 1 - Reset caused by core LOCKUP event
360 #define BP_RCM_SRS1_LOCKUP (1U) /*!< Bit position for RCM_SRS1_LOCKUP. */
361 #define BM_RCM_SRS1_LOCKUP (0x02U) /*!< Bit mask for RCM_SRS1_LOCKUP. */
362 #define BS_RCM_SRS1_LOCKUP (1U) /*!< Bit field size in bits for RCM_SRS1_LOCKUP. */
364 /*! @brief Read current value of the RCM_SRS1_LOCKUP field. */
365 #define BR_RCM_SRS1_LOCKUP(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_LOCKUP))
369 * @name Register RCM_SRS1, field SW[2] (RO)
371 * Indicates a reset has been caused by software setting of SYSRESETREQ bit in
372 * Application Interrupt and Reset Control Register in the ARM core.
375 * - 0 - Reset not caused by software setting of SYSRESETREQ bit
376 * - 1 - Reset caused by software setting of SYSRESETREQ bit
379 #define BP_RCM_SRS1_SW (2U) /*!< Bit position for RCM_SRS1_SW. */
380 #define BM_RCM_SRS1_SW (0x04U) /*!< Bit mask for RCM_SRS1_SW. */
381 #define BS_RCM_SRS1_SW (1U) /*!< Bit field size in bits for RCM_SRS1_SW. */
383 /*! @brief Read current value of the RCM_SRS1_SW field. */
384 #define BR_RCM_SRS1_SW(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_SW))
388 * @name Register RCM_SRS1, field MDM_AP[3] (RO)
390 * Indicates a reset has been caused by the host debugger system setting of the
391 * System Reset Request bit in the MDM-AP Control Register.
394 * - 0 - Reset not caused by host debugger system setting of the System Reset
396 * - 1 - Reset caused by host debugger system setting of the System Reset
400 #define BP_RCM_SRS1_MDM_AP (3U) /*!< Bit position for RCM_SRS1_MDM_AP. */
401 #define BM_RCM_SRS1_MDM_AP (0x08U) /*!< Bit mask for RCM_SRS1_MDM_AP. */
402 #define BS_RCM_SRS1_MDM_AP (1U) /*!< Bit field size in bits for RCM_SRS1_MDM_AP. */
404 /*! @brief Read current value of the RCM_SRS1_MDM_AP field. */
405 #define BR_RCM_SRS1_MDM_AP(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_MDM_AP))
409 * @name Register RCM_SRS1, field EZPT[4] (RO)
411 * Indicates a reset has been caused by EzPort receiving the RESET command while
412 * the device is in EzPort mode.
415 * - 0 - Reset not caused by EzPort receiving the RESET command while the device
417 * - 1 - Reset caused by EzPort receiving the RESET command while the device is
421 #define BP_RCM_SRS1_EZPT (4U) /*!< Bit position for RCM_SRS1_EZPT. */
422 #define BM_RCM_SRS1_EZPT (0x10U) /*!< Bit mask for RCM_SRS1_EZPT. */
423 #define BS_RCM_SRS1_EZPT (1U) /*!< Bit field size in bits for RCM_SRS1_EZPT. */
425 /*! @brief Read current value of the RCM_SRS1_EZPT field. */
426 #define BR_RCM_SRS1_EZPT(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_EZPT))
430 * @name Register RCM_SRS1, field SACKERR[5] (RO)
432 * Indicates that after an attempt to enter Stop mode, a reset has been caused
433 * by a failure of one or more peripherals to acknowledge within approximately one
434 * second to enter stop mode.
437 * - 0 - Reset not caused by peripheral failure to acknowledge attempt to enter
439 * - 1 - Reset caused by peripheral failure to acknowledge attempt to enter stop
443 #define BP_RCM_SRS1_SACKERR (5U) /*!< Bit position for RCM_SRS1_SACKERR. */
444 #define BM_RCM_SRS1_SACKERR (0x20U) /*!< Bit mask for RCM_SRS1_SACKERR. */
445 #define BS_RCM_SRS1_SACKERR (1U) /*!< Bit field size in bits for RCM_SRS1_SACKERR. */
447 /*! @brief Read current value of the RCM_SRS1_SACKERR field. */
448 #define BR_RCM_SRS1_SACKERR(x) (BITBAND_ACCESS8(HW_RCM_SRS1_ADDR(x), BP_RCM_SRS1_SACKERR))
451 /*******************************************************************************
452 * HW_RCM_RPFC - Reset Pin Filter Control register
453 ******************************************************************************/
456 * @brief HW_RCM_RPFC - Reset Pin Filter Control register (RW)
460 * The reset values of bits 2-0 are for Chip POR only. They are unaffected by
461 * other reset types. The bus clock filter is reset when disabled or when entering
462 * stop mode. The LPO filter is reset when disabled .
464 typedef union _hw_rcm_rpfc
467 struct _hw_rcm_rpfc_bitfields
469 uint8_t RSTFLTSRW
: 2; /*!< [1:0] Reset Pin Filter Select in Run and
471 uint8_t RSTFLTSS
: 1; /*!< [2] Reset Pin Filter Select in Stop Mode */
472 uint8_t RESERVED0
: 5; /*!< [7:3] */
477 * @name Constants and macros for entire RCM_RPFC register
480 #define HW_RCM_RPFC_ADDR(x) ((x) + 0x4U)
482 #define HW_RCM_RPFC(x) (*(__IO hw_rcm_rpfc_t *) HW_RCM_RPFC_ADDR(x))
483 #define HW_RCM_RPFC_RD(x) (HW_RCM_RPFC(x).U)
484 #define HW_RCM_RPFC_WR(x, v) (HW_RCM_RPFC(x).U = (v))
485 #define HW_RCM_RPFC_SET(x, v) (HW_RCM_RPFC_WR(x, HW_RCM_RPFC_RD(x) | (v)))
486 #define HW_RCM_RPFC_CLR(x, v) (HW_RCM_RPFC_WR(x, HW_RCM_RPFC_RD(x) & ~(v)))
487 #define HW_RCM_RPFC_TOG(x, v) (HW_RCM_RPFC_WR(x, HW_RCM_RPFC_RD(x) ^ (v)))
491 * Constants & macros for individual RCM_RPFC bitfields
495 * @name Register RCM_RPFC, field RSTFLTSRW[1:0] (RW)
497 * Selects how the reset pin filter is enabled in run and wait modes.
500 * - 00 - All filtering disabled
501 * - 01 - Bus clock filter enabled for normal operation
502 * - 10 - LPO clock filter enabled for normal operation
506 #define BP_RCM_RPFC_RSTFLTSRW (0U) /*!< Bit position for RCM_RPFC_RSTFLTSRW. */
507 #define BM_RCM_RPFC_RSTFLTSRW (0x03U) /*!< Bit mask for RCM_RPFC_RSTFLTSRW. */
508 #define BS_RCM_RPFC_RSTFLTSRW (2U) /*!< Bit field size in bits for RCM_RPFC_RSTFLTSRW. */
510 /*! @brief Read current value of the RCM_RPFC_RSTFLTSRW field. */
511 #define BR_RCM_RPFC_RSTFLTSRW(x) (HW_RCM_RPFC(x).B.RSTFLTSRW)
513 /*! @brief Format value for bitfield RCM_RPFC_RSTFLTSRW. */
514 #define BF_RCM_RPFC_RSTFLTSRW(v) ((uint8_t)((uint8_t)(v) << BP_RCM_RPFC_RSTFLTSRW) & BM_RCM_RPFC_RSTFLTSRW)
516 /*! @brief Set the RSTFLTSRW field to a new value. */
517 #define BW_RCM_RPFC_RSTFLTSRW(x, v) (HW_RCM_RPFC_WR(x, (HW_RCM_RPFC_RD(x) & ~BM_RCM_RPFC_RSTFLTSRW) | BF_RCM_RPFC_RSTFLTSRW(v)))
521 * @name Register RCM_RPFC, field RSTFLTSS[2] (RW)
523 * Selects how the reset pin filter is enabled in Stop and VLPS modes , and also
524 * during LLS and VLLS modes. On exit from VLLS mode, this bit should be
525 * reconfigured before clearing PMC_REGSC[ACKISO].
528 * - 0 - All filtering disabled
529 * - 1 - LPO clock filter enabled
532 #define BP_RCM_RPFC_RSTFLTSS (2U) /*!< Bit position for RCM_RPFC_RSTFLTSS. */
533 #define BM_RCM_RPFC_RSTFLTSS (0x04U) /*!< Bit mask for RCM_RPFC_RSTFLTSS. */
534 #define BS_RCM_RPFC_RSTFLTSS (1U) /*!< Bit field size in bits for RCM_RPFC_RSTFLTSS. */
536 /*! @brief Read current value of the RCM_RPFC_RSTFLTSS field. */
537 #define BR_RCM_RPFC_RSTFLTSS(x) (BITBAND_ACCESS8(HW_RCM_RPFC_ADDR(x), BP_RCM_RPFC_RSTFLTSS))
539 /*! @brief Format value for bitfield RCM_RPFC_RSTFLTSS. */
540 #define BF_RCM_RPFC_RSTFLTSS(v) ((uint8_t)((uint8_t)(v) << BP_RCM_RPFC_RSTFLTSS) & BM_RCM_RPFC_RSTFLTSS)
542 /*! @brief Set the RSTFLTSS field to a new value. */
543 #define BW_RCM_RPFC_RSTFLTSS(x, v) (BITBAND_ACCESS8(HW_RCM_RPFC_ADDR(x), BP_RCM_RPFC_RSTFLTSS) = (v))
546 /*******************************************************************************
547 * HW_RCM_RPFW - Reset Pin Filter Width register
548 ******************************************************************************/
551 * @brief HW_RCM_RPFW - Reset Pin Filter Width register (RW)
555 * The reset values of the bits in the RSTFLTSEL field are for Chip POR only.
556 * They are unaffected by other reset types.
558 typedef union _hw_rcm_rpfw
561 struct _hw_rcm_rpfw_bitfields
563 uint8_t RSTFLTSEL
: 5; /*!< [4:0] Reset Pin Filter Bus Clock Select */
564 uint8_t RESERVED0
: 3; /*!< [7:5] */
569 * @name Constants and macros for entire RCM_RPFW register
572 #define HW_RCM_RPFW_ADDR(x) ((x) + 0x5U)
574 #define HW_RCM_RPFW(x) (*(__IO hw_rcm_rpfw_t *) HW_RCM_RPFW_ADDR(x))
575 #define HW_RCM_RPFW_RD(x) (HW_RCM_RPFW(x).U)
576 #define HW_RCM_RPFW_WR(x, v) (HW_RCM_RPFW(x).U = (v))
577 #define HW_RCM_RPFW_SET(x, v) (HW_RCM_RPFW_WR(x, HW_RCM_RPFW_RD(x) | (v)))
578 #define HW_RCM_RPFW_CLR(x, v) (HW_RCM_RPFW_WR(x, HW_RCM_RPFW_RD(x) & ~(v)))
579 #define HW_RCM_RPFW_TOG(x, v) (HW_RCM_RPFW_WR(x, HW_RCM_RPFW_RD(x) ^ (v)))
583 * Constants & macros for individual RCM_RPFW bitfields
587 * @name Register RCM_RPFW, field RSTFLTSEL[4:0] (RW)
589 * Selects the reset pin bus clock filter width.
592 * - 00000 - Bus clock filter count is 1
593 * - 00001 - Bus clock filter count is 2
594 * - 00010 - Bus clock filter count is 3
595 * - 00011 - Bus clock filter count is 4
596 * - 00100 - Bus clock filter count is 5
597 * - 00101 - Bus clock filter count is 6
598 * - 00110 - Bus clock filter count is 7
599 * - 00111 - Bus clock filter count is 8
600 * - 01000 - Bus clock filter count is 9
601 * - 01001 - Bus clock filter count is 10
602 * - 01010 - Bus clock filter count is 11
603 * - 01011 - Bus clock filter count is 12
604 * - 01100 - Bus clock filter count is 13
605 * - 01101 - Bus clock filter count is 14
606 * - 01110 - Bus clock filter count is 15
607 * - 01111 - Bus clock filter count is 16
608 * - 10000 - Bus clock filter count is 17
609 * - 10001 - Bus clock filter count is 18
610 * - 10010 - Bus clock filter count is 19
611 * - 10011 - Bus clock filter count is 20
612 * - 10100 - Bus clock filter count is 21
613 * - 10101 - Bus clock filter count is 22
614 * - 10110 - Bus clock filter count is 23
615 * - 10111 - Bus clock filter count is 24
616 * - 11000 - Bus clock filter count is 25
617 * - 11001 - Bus clock filter count is 26
618 * - 11010 - Bus clock filter count is 27
619 * - 11011 - Bus clock filter count is 28
620 * - 11100 - Bus clock filter count is 29
621 * - 11101 - Bus clock filter count is 30
622 * - 11110 - Bus clock filter count is 31
623 * - 11111 - Bus clock filter count is 32
626 #define BP_RCM_RPFW_RSTFLTSEL (0U) /*!< Bit position for RCM_RPFW_RSTFLTSEL. */
627 #define BM_RCM_RPFW_RSTFLTSEL (0x1FU) /*!< Bit mask for RCM_RPFW_RSTFLTSEL. */
628 #define BS_RCM_RPFW_RSTFLTSEL (5U) /*!< Bit field size in bits for RCM_RPFW_RSTFLTSEL. */
630 /*! @brief Read current value of the RCM_RPFW_RSTFLTSEL field. */
631 #define BR_RCM_RPFW_RSTFLTSEL(x) (HW_RCM_RPFW(x).B.RSTFLTSEL)
633 /*! @brief Format value for bitfield RCM_RPFW_RSTFLTSEL. */
634 #define BF_RCM_RPFW_RSTFLTSEL(v) ((uint8_t)((uint8_t)(v) << BP_RCM_RPFW_RSTFLTSEL) & BM_RCM_RPFW_RSTFLTSEL)
636 /*! @brief Set the RSTFLTSEL field to a new value. */
637 #define BW_RCM_RPFW_RSTFLTSEL(x, v) (HW_RCM_RPFW_WR(x, (HW_RCM_RPFW_RD(x) & ~BM_RCM_RPFW_RSTFLTSEL) | BF_RCM_RPFW_RSTFLTSEL(v)))
640 /*******************************************************************************
641 * HW_RCM_MR - Mode Register
642 ******************************************************************************/
645 * @brief HW_RCM_MR - Mode Register (RO)
649 * This register includes read-only status flags to indicate the state of the
650 * mode pins during the last Chip Reset.
652 typedef union _hw_rcm_mr
655 struct _hw_rcm_mr_bitfields
657 uint8_t RESERVED0
: 1; /*!< [0] */
658 uint8_t EZP_MS
: 1; /*!< [1] EZP_MS_B pin state */
659 uint8_t RESERVED1
: 6; /*!< [7:2] */
664 * @name Constants and macros for entire RCM_MR register
667 #define HW_RCM_MR_ADDR(x) ((x) + 0x7U)
669 #define HW_RCM_MR(x) (*(__I hw_rcm_mr_t *) HW_RCM_MR_ADDR(x))
670 #define HW_RCM_MR_RD(x) (HW_RCM_MR(x).U)
674 * Constants & macros for individual RCM_MR bitfields
678 * @name Register RCM_MR, field EZP_MS[1] (RO)
680 * Reflects the state of the EZP_MS pin during the last Chip Reset
683 * - 0 - Pin deasserted (logic 1)
684 * - 1 - Pin asserted (logic 0)
687 #define BP_RCM_MR_EZP_MS (1U) /*!< Bit position for RCM_MR_EZP_MS. */
688 #define BM_RCM_MR_EZP_MS (0x02U) /*!< Bit mask for RCM_MR_EZP_MS. */
689 #define BS_RCM_MR_EZP_MS (1U) /*!< Bit field size in bits for RCM_MR_EZP_MS. */
691 /*! @brief Read current value of the RCM_MR_EZP_MS field. */
692 #define BR_RCM_MR_EZP_MS(x) (BITBAND_ACCESS8(HW_RCM_MR_ADDR(x), BP_RCM_MR_EZP_MS))
695 /*******************************************************************************
696 * HW_RCM_SSRS0 - Sticky System Reset Status Register 0
697 ******************************************************************************/
700 * @brief HW_RCM_SSRS0 - Sticky System Reset Status Register 0 (RW)
704 * This register includes status flags to indicate all reset sources since the
705 * last POR, LVD or VLLS Wakeup that have not been cleared by software. Software
706 * can clear the status flags by writing a logic one to a flag.
708 typedef union _hw_rcm_ssrs0
711 struct _hw_rcm_ssrs0_bitfields
713 uint8_t SWAKEUP
: 1; /*!< [0] Sticky Low Leakage Wakeup Reset */
714 uint8_t SLVD
: 1; /*!< [1] Sticky Low-Voltage Detect Reset */
715 uint8_t SLOC
: 1; /*!< [2] Sticky Loss-of-Clock Reset */
716 uint8_t SLOL
: 1; /*!< [3] Sticky Loss-of-Lock Reset */
717 uint8_t RESERVED0
: 1; /*!< [4] */
718 uint8_t SWDOG
: 1; /*!< [5] Sticky Watchdog */
719 uint8_t SPIN
: 1; /*!< [6] Sticky External Reset Pin */
720 uint8_t SPOR
: 1; /*!< [7] Sticky Power-On Reset */
725 * @name Constants and macros for entire RCM_SSRS0 register
728 #define HW_RCM_SSRS0_ADDR(x) ((x) + 0x8U)
730 #define HW_RCM_SSRS0(x) (*(__IO hw_rcm_ssrs0_t *) HW_RCM_SSRS0_ADDR(x))
731 #define HW_RCM_SSRS0_RD(x) (HW_RCM_SSRS0(x).U)
732 #define HW_RCM_SSRS0_WR(x, v) (HW_RCM_SSRS0(x).U = (v))
733 #define HW_RCM_SSRS0_SET(x, v) (HW_RCM_SSRS0_WR(x, HW_RCM_SSRS0_RD(x) | (v)))
734 #define HW_RCM_SSRS0_CLR(x, v) (HW_RCM_SSRS0_WR(x, HW_RCM_SSRS0_RD(x) & ~(v)))
735 #define HW_RCM_SSRS0_TOG(x, v) (HW_RCM_SSRS0_WR(x, HW_RCM_SSRS0_RD(x) ^ (v)))
739 * Constants & macros for individual RCM_SSRS0 bitfields
743 * @name Register RCM_SSRS0, field SWAKEUP[0] (W1C)
745 * Indicates a reset has been caused by an enabled LLWU modulewakeup source
746 * while the chip was in a low leakage mode. In LLS mode, the RESET pin is the only
747 * wakeup source that can cause this reset. Any enabled wakeup source in a VLLSx
748 * mode causes a reset.
751 * - 0 - Reset not caused by LLWU module wakeup source
752 * - 1 - Reset caused by LLWU module wakeup source
755 #define BP_RCM_SSRS0_SWAKEUP (0U) /*!< Bit position for RCM_SSRS0_SWAKEUP. */
756 #define BM_RCM_SSRS0_SWAKEUP (0x01U) /*!< Bit mask for RCM_SSRS0_SWAKEUP. */
757 #define BS_RCM_SSRS0_SWAKEUP (1U) /*!< Bit field size in bits for RCM_SSRS0_SWAKEUP. */
759 /*! @brief Read current value of the RCM_SSRS0_SWAKEUP field. */
760 #define BR_RCM_SSRS0_SWAKEUP(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SWAKEUP))
762 /*! @brief Format value for bitfield RCM_SSRS0_SWAKEUP. */
763 #define BF_RCM_SSRS0_SWAKEUP(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SWAKEUP) & BM_RCM_SSRS0_SWAKEUP)
765 /*! @brief Set the SWAKEUP field to a new value. */
766 #define BW_RCM_SSRS0_SWAKEUP(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SWAKEUP) = (v))
770 * @name Register RCM_SSRS0, field SLVD[1] (W1C)
772 * If PMC_LVDSC1[LVDRE] is set and the supply drops below the LVD trip voltage,
773 * an LVD reset occurs. This field is also set by POR.
776 * - 0 - Reset not caused by LVD trip or POR
777 * - 1 - Reset caused by LVD trip or POR
780 #define BP_RCM_SSRS0_SLVD (1U) /*!< Bit position for RCM_SSRS0_SLVD. */
781 #define BM_RCM_SSRS0_SLVD (0x02U) /*!< Bit mask for RCM_SSRS0_SLVD. */
782 #define BS_RCM_SSRS0_SLVD (1U) /*!< Bit field size in bits for RCM_SSRS0_SLVD. */
784 /*! @brief Read current value of the RCM_SSRS0_SLVD field. */
785 #define BR_RCM_SSRS0_SLVD(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLVD))
787 /*! @brief Format value for bitfield RCM_SSRS0_SLVD. */
788 #define BF_RCM_SSRS0_SLVD(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SLVD) & BM_RCM_SSRS0_SLVD)
790 /*! @brief Set the SLVD field to a new value. */
791 #define BW_RCM_SSRS0_SLVD(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLVD) = (v))
795 * @name Register RCM_SSRS0, field SLOC[2] (W1C)
797 * Indicates a reset has been caused by a loss of external clock. The MCG clock
798 * monitor must be enabled for a loss of clock to be detected. Refer to the
799 * detailed MCG description for information on enabling the clock monitor.
802 * - 0 - Reset not caused by a loss of external clock.
803 * - 1 - Reset caused by a loss of external clock.
806 #define BP_RCM_SSRS0_SLOC (2U) /*!< Bit position for RCM_SSRS0_SLOC. */
807 #define BM_RCM_SSRS0_SLOC (0x04U) /*!< Bit mask for RCM_SSRS0_SLOC. */
808 #define BS_RCM_SSRS0_SLOC (1U) /*!< Bit field size in bits for RCM_SSRS0_SLOC. */
810 /*! @brief Read current value of the RCM_SSRS0_SLOC field. */
811 #define BR_RCM_SSRS0_SLOC(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLOC))
813 /*! @brief Format value for bitfield RCM_SSRS0_SLOC. */
814 #define BF_RCM_SSRS0_SLOC(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SLOC) & BM_RCM_SSRS0_SLOC)
816 /*! @brief Set the SLOC field to a new value. */
817 #define BW_RCM_SSRS0_SLOC(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLOC) = (v))
821 * @name Register RCM_SSRS0, field SLOL[3] (W1C)
823 * Indicates a reset has been caused by a loss of lock in the MCG PLL. See the
824 * MCG description for information on the loss-of-clock event.
827 * - 0 - Reset not caused by a loss of lock in the PLL
828 * - 1 - Reset caused by a loss of lock in the PLL
831 #define BP_RCM_SSRS0_SLOL (3U) /*!< Bit position for RCM_SSRS0_SLOL. */
832 #define BM_RCM_SSRS0_SLOL (0x08U) /*!< Bit mask for RCM_SSRS0_SLOL. */
833 #define BS_RCM_SSRS0_SLOL (1U) /*!< Bit field size in bits for RCM_SSRS0_SLOL. */
835 /*! @brief Read current value of the RCM_SSRS0_SLOL field. */
836 #define BR_RCM_SSRS0_SLOL(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLOL))
838 /*! @brief Format value for bitfield RCM_SSRS0_SLOL. */
839 #define BF_RCM_SSRS0_SLOL(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SLOL) & BM_RCM_SSRS0_SLOL)
841 /*! @brief Set the SLOL field to a new value. */
842 #define BW_RCM_SSRS0_SLOL(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SLOL) = (v))
846 * @name Register RCM_SSRS0, field SWDOG[5] (W1C)
848 * Indicates a reset has been caused by the watchdog timer timing out. This
849 * reset source can be blocked by disabling the watchdog.
852 * - 0 - Reset not caused by watchdog timeout
853 * - 1 - Reset caused by watchdog timeout
856 #define BP_RCM_SSRS0_SWDOG (5U) /*!< Bit position for RCM_SSRS0_SWDOG. */
857 #define BM_RCM_SSRS0_SWDOG (0x20U) /*!< Bit mask for RCM_SSRS0_SWDOG. */
858 #define BS_RCM_SSRS0_SWDOG (1U) /*!< Bit field size in bits for RCM_SSRS0_SWDOG. */
860 /*! @brief Read current value of the RCM_SSRS0_SWDOG field. */
861 #define BR_RCM_SSRS0_SWDOG(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SWDOG))
863 /*! @brief Format value for bitfield RCM_SSRS0_SWDOG. */
864 #define BF_RCM_SSRS0_SWDOG(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SWDOG) & BM_RCM_SSRS0_SWDOG)
866 /*! @brief Set the SWDOG field to a new value. */
867 #define BW_RCM_SSRS0_SWDOG(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SWDOG) = (v))
871 * @name Register RCM_SSRS0, field SPIN[6] (W1C)
873 * Indicates a reset has been caused by an active-low level on the external
877 * - 0 - Reset not caused by external reset pin
878 * - 1 - Reset caused by external reset pin
881 #define BP_RCM_SSRS0_SPIN (6U) /*!< Bit position for RCM_SSRS0_SPIN. */
882 #define BM_RCM_SSRS0_SPIN (0x40U) /*!< Bit mask for RCM_SSRS0_SPIN. */
883 #define BS_RCM_SSRS0_SPIN (1U) /*!< Bit field size in bits for RCM_SSRS0_SPIN. */
885 /*! @brief Read current value of the RCM_SSRS0_SPIN field. */
886 #define BR_RCM_SSRS0_SPIN(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SPIN))
888 /*! @brief Format value for bitfield RCM_SSRS0_SPIN. */
889 #define BF_RCM_SSRS0_SPIN(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SPIN) & BM_RCM_SSRS0_SPIN)
891 /*! @brief Set the SPIN field to a new value. */
892 #define BW_RCM_SSRS0_SPIN(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SPIN) = (v))
896 * @name Register RCM_SSRS0, field SPOR[7] (W1C)
898 * Indicates a reset has been caused by the power-on detection logic. Because
899 * the internal supply voltage was ramping up at the time, the low-voltage reset
900 * (LVD) status bit is also set to indicate that the reset occurred while the
901 * internal supply was below the LVD threshold.
904 * - 0 - Reset not caused by POR
905 * - 1 - Reset caused by POR
908 #define BP_RCM_SSRS0_SPOR (7U) /*!< Bit position for RCM_SSRS0_SPOR. */
909 #define BM_RCM_SSRS0_SPOR (0x80U) /*!< Bit mask for RCM_SSRS0_SPOR. */
910 #define BS_RCM_SSRS0_SPOR (1U) /*!< Bit field size in bits for RCM_SSRS0_SPOR. */
912 /*! @brief Read current value of the RCM_SSRS0_SPOR field. */
913 #define BR_RCM_SSRS0_SPOR(x) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SPOR))
915 /*! @brief Format value for bitfield RCM_SSRS0_SPOR. */
916 #define BF_RCM_SSRS0_SPOR(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS0_SPOR) & BM_RCM_SSRS0_SPOR)
918 /*! @brief Set the SPOR field to a new value. */
919 #define BW_RCM_SSRS0_SPOR(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS0_ADDR(x), BP_RCM_SSRS0_SPOR) = (v))
922 /*******************************************************************************
923 * HW_RCM_SSRS1 - Sticky System Reset Status Register 1
924 ******************************************************************************/
927 * @brief HW_RCM_SSRS1 - Sticky System Reset Status Register 1 (RW)
931 * This register includes status flags to indicate all reset sources since the
932 * last POR, LVD or VLLS Wakeup that have not been cleared by software. Software
933 * can clear the status flags by writing a logic one to a flag.
935 typedef union _hw_rcm_ssrs1
938 struct _hw_rcm_ssrs1_bitfields
940 uint8_t SJTAG
: 1; /*!< [0] Sticky JTAG Generated Reset */
941 uint8_t SLOCKUP
: 1; /*!< [1] Sticky Core Lockup */
942 uint8_t SSW
: 1; /*!< [2] Sticky Software */
943 uint8_t SMDM_AP
: 1; /*!< [3] Sticky MDM-AP System Reset Request */
944 uint8_t SEZPT
: 1; /*!< [4] Sticky EzPort Reset */
945 uint8_t SSACKERR
: 1; /*!< [5] Sticky Stop Mode Acknowledge Error
947 uint8_t RESERVED0
: 2; /*!< [7:6] */
952 * @name Constants and macros for entire RCM_SSRS1 register
955 #define HW_RCM_SSRS1_ADDR(x) ((x) + 0x9U)
957 #define HW_RCM_SSRS1(x) (*(__IO hw_rcm_ssrs1_t *) HW_RCM_SSRS1_ADDR(x))
958 #define HW_RCM_SSRS1_RD(x) (HW_RCM_SSRS1(x).U)
959 #define HW_RCM_SSRS1_WR(x, v) (HW_RCM_SSRS1(x).U = (v))
960 #define HW_RCM_SSRS1_SET(x, v) (HW_RCM_SSRS1_WR(x, HW_RCM_SSRS1_RD(x) | (v)))
961 #define HW_RCM_SSRS1_CLR(x, v) (HW_RCM_SSRS1_WR(x, HW_RCM_SSRS1_RD(x) & ~(v)))
962 #define HW_RCM_SSRS1_TOG(x, v) (HW_RCM_SSRS1_WR(x, HW_RCM_SSRS1_RD(x) ^ (v)))
966 * Constants & macros for individual RCM_SSRS1 bitfields
970 * @name Register RCM_SSRS1, field SJTAG[0] (W1C)
972 * Indicates a reset has been caused by JTAG selection of certain IR codes:
973 * EZPORT, EXTEST, HIGHZ, and CLAMP.
976 * - 0 - Reset not caused by JTAG
977 * - 1 - Reset caused by JTAG
980 #define BP_RCM_SSRS1_SJTAG (0U) /*!< Bit position for RCM_SSRS1_SJTAG. */
981 #define BM_RCM_SSRS1_SJTAG (0x01U) /*!< Bit mask for RCM_SSRS1_SJTAG. */
982 #define BS_RCM_SSRS1_SJTAG (1U) /*!< Bit field size in bits for RCM_SSRS1_SJTAG. */
984 /*! @brief Read current value of the RCM_SSRS1_SJTAG field. */
985 #define BR_RCM_SSRS1_SJTAG(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SJTAG))
987 /*! @brief Format value for bitfield RCM_SSRS1_SJTAG. */
988 #define BF_RCM_SSRS1_SJTAG(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SJTAG) & BM_RCM_SSRS1_SJTAG)
990 /*! @brief Set the SJTAG field to a new value. */
991 #define BW_RCM_SSRS1_SJTAG(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SJTAG) = (v))
995 * @name Register RCM_SSRS1, field SLOCKUP[1] (W1C)
997 * Indicates a reset has been caused by the ARM core indication of a LOCKUP
1001 * - 0 - Reset not caused by core LOCKUP event
1002 * - 1 - Reset caused by core LOCKUP event
1005 #define BP_RCM_SSRS1_SLOCKUP (1U) /*!< Bit position for RCM_SSRS1_SLOCKUP. */
1006 #define BM_RCM_SSRS1_SLOCKUP (0x02U) /*!< Bit mask for RCM_SSRS1_SLOCKUP. */
1007 #define BS_RCM_SSRS1_SLOCKUP (1U) /*!< Bit field size in bits for RCM_SSRS1_SLOCKUP. */
1009 /*! @brief Read current value of the RCM_SSRS1_SLOCKUP field. */
1010 #define BR_RCM_SSRS1_SLOCKUP(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SLOCKUP))
1012 /*! @brief Format value for bitfield RCM_SSRS1_SLOCKUP. */
1013 #define BF_RCM_SSRS1_SLOCKUP(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SLOCKUP) & BM_RCM_SSRS1_SLOCKUP)
1015 /*! @brief Set the SLOCKUP field to a new value. */
1016 #define BW_RCM_SSRS1_SLOCKUP(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SLOCKUP) = (v))
1020 * @name Register RCM_SSRS1, field SSW[2] (W1C)
1022 * Indicates a reset has been caused by software setting of SYSRESETREQ bit in
1023 * Application Interrupt and Reset Control Register in the ARM core.
1026 * - 0 - Reset not caused by software setting of SYSRESETREQ bit
1027 * - 1 - Reset caused by software setting of SYSRESETREQ bit
1030 #define BP_RCM_SSRS1_SSW (2U) /*!< Bit position for RCM_SSRS1_SSW. */
1031 #define BM_RCM_SSRS1_SSW (0x04U) /*!< Bit mask for RCM_SSRS1_SSW. */
1032 #define BS_RCM_SSRS1_SSW (1U) /*!< Bit field size in bits for RCM_SSRS1_SSW. */
1034 /*! @brief Read current value of the RCM_SSRS1_SSW field. */
1035 #define BR_RCM_SSRS1_SSW(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SSW))
1037 /*! @brief Format value for bitfield RCM_SSRS1_SSW. */
1038 #define BF_RCM_SSRS1_SSW(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SSW) & BM_RCM_SSRS1_SSW)
1040 /*! @brief Set the SSW field to a new value. */
1041 #define BW_RCM_SSRS1_SSW(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SSW) = (v))
1045 * @name Register RCM_SSRS1, field SMDM_AP[3] (W1C)
1047 * Indicates a reset has been caused by the host debugger system setting of the
1048 * System Reset Request bit in the MDM-AP Control Register.
1051 * - 0 - Reset not caused by host debugger system setting of the System Reset
1053 * - 1 - Reset caused by host debugger system setting of the System Reset
1057 #define BP_RCM_SSRS1_SMDM_AP (3U) /*!< Bit position for RCM_SSRS1_SMDM_AP. */
1058 #define BM_RCM_SSRS1_SMDM_AP (0x08U) /*!< Bit mask for RCM_SSRS1_SMDM_AP. */
1059 #define BS_RCM_SSRS1_SMDM_AP (1U) /*!< Bit field size in bits for RCM_SSRS1_SMDM_AP. */
1061 /*! @brief Read current value of the RCM_SSRS1_SMDM_AP field. */
1062 #define BR_RCM_SSRS1_SMDM_AP(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SMDM_AP))
1064 /*! @brief Format value for bitfield RCM_SSRS1_SMDM_AP. */
1065 #define BF_RCM_SSRS1_SMDM_AP(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SMDM_AP) & BM_RCM_SSRS1_SMDM_AP)
1067 /*! @brief Set the SMDM_AP field to a new value. */
1068 #define BW_RCM_SSRS1_SMDM_AP(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SMDM_AP) = (v))
1072 * @name Register RCM_SSRS1, field SEZPT[4] (W1C)
1074 * Indicates a reset has been caused by EzPort receiving the RESET command while
1075 * the device is in EzPort mode.
1078 * - 0 - Reset not caused by EzPort receiving the RESET command while the device
1080 * - 1 - Reset caused by EzPort receiving the RESET command while the device is
1084 #define BP_RCM_SSRS1_SEZPT (4U) /*!< Bit position for RCM_SSRS1_SEZPT. */
1085 #define BM_RCM_SSRS1_SEZPT (0x10U) /*!< Bit mask for RCM_SSRS1_SEZPT. */
1086 #define BS_RCM_SSRS1_SEZPT (1U) /*!< Bit field size in bits for RCM_SSRS1_SEZPT. */
1088 /*! @brief Read current value of the RCM_SSRS1_SEZPT field. */
1089 #define BR_RCM_SSRS1_SEZPT(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SEZPT))
1091 /*! @brief Format value for bitfield RCM_SSRS1_SEZPT. */
1092 #define BF_RCM_SSRS1_SEZPT(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SEZPT) & BM_RCM_SSRS1_SEZPT)
1094 /*! @brief Set the SEZPT field to a new value. */
1095 #define BW_RCM_SSRS1_SEZPT(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SEZPT) = (v))
1099 * @name Register RCM_SSRS1, field SSACKERR[5] (W1C)
1101 * Indicates that after an attempt to enter Stop mode, a reset has been caused
1102 * by a failure of one or more peripherals to acknowledge within approximately one
1103 * second to enter stop mode.
1106 * - 0 - Reset not caused by peripheral failure to acknowledge attempt to enter
1108 * - 1 - Reset caused by peripheral failure to acknowledge attempt to enter stop
1112 #define BP_RCM_SSRS1_SSACKERR (5U) /*!< Bit position for RCM_SSRS1_SSACKERR. */
1113 #define BM_RCM_SSRS1_SSACKERR (0x20U) /*!< Bit mask for RCM_SSRS1_SSACKERR. */
1114 #define BS_RCM_SSRS1_SSACKERR (1U) /*!< Bit field size in bits for RCM_SSRS1_SSACKERR. */
1116 /*! @brief Read current value of the RCM_SSRS1_SSACKERR field. */
1117 #define BR_RCM_SSRS1_SSACKERR(x) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SSACKERR))
1119 /*! @brief Format value for bitfield RCM_SSRS1_SSACKERR. */
1120 #define BF_RCM_SSRS1_SSACKERR(v) ((uint8_t)((uint8_t)(v) << BP_RCM_SSRS1_SSACKERR) & BM_RCM_SSRS1_SSACKERR)
1122 /*! @brief Set the SSACKERR field to a new value. */
1123 #define BW_RCM_SSRS1_SSACKERR(x, v) (BITBAND_ACCESS8(HW_RCM_SSRS1_ADDR(x), BP_RCM_SSRS1_SSACKERR) = (v))
1126 /*******************************************************************************
1127 * hw_rcm_t - module struct
1128 ******************************************************************************/
1130 * @brief All RCM module registers.
1133 typedef struct _hw_rcm
1135 __I hw_rcm_srs0_t SRS0
; /*!< [0x0] System Reset Status Register 0 */
1136 __I hw_rcm_srs1_t SRS1
; /*!< [0x1] System Reset Status Register 1 */
1137 uint8_t _reserved0
[2];
1138 __IO hw_rcm_rpfc_t RPFC
; /*!< [0x4] Reset Pin Filter Control register */
1139 __IO hw_rcm_rpfw_t RPFW
; /*!< [0x5] Reset Pin Filter Width register */
1140 uint8_t _reserved1
[1];
1141 __I hw_rcm_mr_t MR
; /*!< [0x7] Mode Register */
1142 __IO hw_rcm_ssrs0_t SSRS0
; /*!< [0x8] Sticky System Reset Status Register 0 */
1143 __IO hw_rcm_ssrs1_t SSRS1
; /*!< [0x9] Sticky System Reset Status Register 1 */
1147 /*! @brief Macro to access all RCM registers. */
1148 /*! @param x RCM module instance base address. */
1149 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
1150 * use the '&' operator, like <code>&HW_RCM(RCM_BASE)</code>. */
1151 #define HW_RCM(x) (*(hw_rcm_t *)(x))
1153 #endif /* __HW_RCM_REGISTERS_H__ */