1 /*
2 ** ###################################################################
3 **     Processor:           K32L3A60VPJ1A_cm0plus
4 **     Compilers:           GNU C Compiler
5 **                          IAR ANSI C/C++ Compiler for ARM
6 **                          Keil ARM C/C++ Compiler
7 **                          MCUXpresso Compiler
8 **
9 **     Reference manual:    K32L3ARM, Rev. 0 , 05/2019
10 **     Version:             rev. 1.0, 2019-04-22
11 **     Build:               b240301
12 **
13 **     Abstract:
14 **         CMSIS Peripheral Access Layer for K32L3A60_cm0plus
15 **
16 **     Copyright 1997-2016 Freescale Semiconductor, Inc.
17 **     Copyright 2016-2024 NXP
18 **     SPDX-License-Identifier: BSD-3-Clause
19 **
20 **     http:                 www.nxp.com
21 **     mail:                 support@nxp.com
22 **
23 **     Revisions:
24 **     - rev. 1.0 (2019-04-22)
25 **         Initial version.
26 **
27 ** ###################################################################
28 */
29 
30 /*!
31  * @file K32L3A60_cm0plus.h
32  * @version 1.0
33  * @date 2019-04-22
34  * @brief CMSIS Peripheral Access Layer for K32L3A60_cm0plus
35  *
36  * CMSIS Peripheral Access Layer for K32L3A60_cm0plus
37  */
38 
39 #if !defined(K32L3A60_CM0PLUS_H_)
40 #define K32L3A60_CM0PLUS_H_                      /**< Symbol preventing repeated inclusion */
41 
42 /** Memory map major version (memory maps with equal major version number are
43  * compatible) */
44 #define MCU_MEM_MAP_VERSION 0x0100U
45 /** Memory map minor version */
46 #define MCU_MEM_MAP_VERSION_MINOR 0x0000U
47 
48 
49 /* ----------------------------------------------------------------------------
50    -- Interrupt vector numbers
51    ---------------------------------------------------------------------------- */
52 
53 /*!
54  * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
55  * @{
56  */
57 
58 /** Interrupt Number Definitions */
59 #define NUMBER_OF_INT_VECTORS 80                 /**< Number of interrupts in the Vector table */
60 
61 typedef enum IRQn {
62   /* Auxiliary constants */
63   NotAvail_IRQn                = -128,             /**< Not available device specific interrupt */
64 
65   /* Core interrupts */
66   NonMaskableInt_IRQn          = -14,              /**< Non Maskable Interrupt */
67   HardFault_IRQn               = -13,              /**< Cortex-M0 SV Hard Fault Interrupt */
68   SVCall_IRQn                  = -5,               /**< Cortex-M0 SV Call Interrupt */
69   PendSV_IRQn                  = -2,               /**< Cortex-M0 Pend SV Interrupt */
70   SysTick_IRQn                 = -1,               /**< Cortex-M0 System Tick Interrupt */
71 
72   /* Device specific interrupts */
73   CTI1_IRQn                    = 0,                /**< Cross Trigger Interface 1 */
74   DMA1_04_IRQn                 = 1,                /**< DMA1 channel 0/4 transfer complete */
75   DMA1_15_IRQn                 = 2,                /**< DMA1 channel 1/5 transfer complete */
76   DMA1_26_IRQn                 = 3,                /**< DMA1 channel 2/6 transfer complete */
77   DMA1_37_IRQn                 = 4,                /**< DMA1 channel 3/7 transfer complete */
78   DMA1_Error_IRQn              = 5,                /**< DMA1 channel 0-7 error interrupt */
79   MSMC_IRQn                    = 6,                /**< MSMC (SMC1) interrupt */
80   LLWU1_IRQn                   = 7,                /**< Low leakage wakeup 1 */
81   MUB_IRQn                     = 8,                /**< MU Side B interrupt */
82   WDOG1_IRQn                   = 9,                /**< WDOG1 interrupt */
83   CAU3_Task_Complete_IRQn      = 10,               /**< Cryptographic Acceleration Unit version 3 Task Complete */
84   CAU3_Security_Violation_IRQn = 11,               /**< Cryptographic Acceleration Unit version 3 Security Violation */
85   TRNG_IRQn                    = 12,               /**< TRNG interrupt */
86   LPIT1_IRQn                   = 13,               /**< LPIT1 interrupt */
87   LPTMR2_IRQn                  = 14,               /**< LPTMR2 interrupt */
88   TPM3_IRQn                    = 15,               /**< TPM3 single interrupt vector for all sources */
89   LPI2C3_IRQn                  = 16,               /**< LPI2C3 interrupt */
90   Reserved33_IRQn              = 17,               /**< Reserved interrupt */
91   Reserved34_IRQn              = 18,               /**< Reserved interrupt */
92   LPSPI3_IRQn                  = 19,               /**< LPSPI3 single interrupt vector for all sources */
93   LPUART3_IRQn                 = 20,               /**< LPUART3 status and error */
94   PORTE_IRQn                   = 21,               /**< PORTE Pin detect */
95   LPCMP1_IRQn                  = 22,               /**< LPCMP1 interrupt */
96   RTC_IRQn                     = 23,               /**< RTC */
97   INTMUX1_0_IRQn               = 24,               /**< INTMUX1 channel0 interrupt */
98   INTMUX1_1_IRQn               = 25,               /**< INTMUX1 channel1 interrupt */
99   INTMUX1_2_IRQn               = 26,               /**< INTMUX1 channel2 interrupt */
100   INTMUX1_3_IRQn               = 27,               /**< INTMUX1 channel3 interrupt */
101   INTMUX1_4_IRQn               = 28,               /**< INTMUX1 channel4 interrupt */
102   INTMUX1_5_IRQn               = 29,               /**< INTMUX1 channel5 interrupt */
103   INTMUX1_6_IRQn               = 30,               /**< INTMUX1 channel6 interrupt */
104   INTMUX1_7_IRQn               = 31,               /**< INTMUX1 channel7 interrupt */
105   EWM_IRQn                     = 32,               /**< EWM interrupt  (INTMUX1 source IRQ0) */
106   FTFE_Command_Complete_IRQn   = 33,               /**< FTFE interrupt  (INTMUX1 source IRQ1) */
107   FTFE_Read_Collision_IRQn     = 34,               /**< FTFE interrupt  (INTMUX1 source IRQ2) */
108   SPM_IRQn                     = 35,               /**< SPM (INTMUX1 source IRQ3) */
109   SCG_IRQn                     = 36,               /**< SCG interrupt (INTMUX1 source IRQ4) */
110   LPIT0_IRQn                   = 37,               /**< LPIT0 interrupt (INTMUX1 source IRQ5) */
111   LPTMR0_IRQn                  = 38,               /**< LPTMR0 interrupt (INTMUX1 source IRQ6) */
112   LPTMR1_IRQn                  = 39,               /**< LPTMR1 interrupt (INTMUX1 source IRQ7) */
113   TPM0_IRQn                    = 40,               /**< TPM0 single interrupt vector for all sources (INTMUX1 source IRQ8) */
114   TPM1_IRQn                    = 41,               /**< TPM1 single interrupt vector for all sources (INTMUX1 source IRQ9) */
115   TPM2_IRQn                    = 42,               /**< TPM2 single interrupt vector for all sources (INTMUX1 source IRQ10) */
116   EMVSIM0_IRQn                 = 43,               /**< EMVSIM0 interrupt (INTMUX1 source IRQ11) */
117   FLEXIO0_IRQn                 = 44,               /**< FLEXIO0 (INTMUX1 source IRQ12) */
118   LPI2C0_IRQn                  = 45,               /**< LPI2C0 interrupt (INTMUX1 source IRQ13) */
119   LPI2C1_IRQn                  = 46,               /**< LPI2C1 interrupt (INTMUX1 source IRQ14) */
120   LPI2C2_IRQn                  = 47,               /**< LPI2C2 interrupt (INTMUX1 source IRQ15) */
121   I2S0_IRQn                    = 48,               /**< I2S0 interrupt (INTMUX1 source IRQ16) */
122   USDHC0_IRQn                  = 49,               /**< SDHC0 interrupt (INTMUX1 source IRQ17) */
123   LPSPI0_IRQn                  = 50,               /**< LPSPI0 single interrupt vector for all sources (INTMUX1 source IRQ18) */
124   LPSPI1_IRQn                  = 51,               /**< LPSPI1 single interrupt vector for all sources (INTMUX1 source IRQ19) */
125   LPSPI2_IRQn                  = 52,               /**< LPSPI2 single interrupt vector for all sources (INTMUX1 source IRQ20) */
126   LPUART0_IRQn                 = 53,               /**< LPUART0 status and error (INTMUX1 source IRQ21) */
127   LPUART1_IRQn                 = 54,               /**< LPUART1 status and error (INTMUX1 source IRQ22) */
128   LPUART2_IRQn                 = 55,               /**< LPUART2 status and error (INTMUX1 source IRQ23) */
129   USB0_IRQn                    = 56,               /**< USB0 interrupt (INTMUX1 source IRQ24) */
130   PORTA_IRQn                   = 57,               /**< PORTA Pin detect (INTMUX1 source IRQ25) */
131   PORTB_IRQn                   = 58,               /**< PORTB Pin detect (INTMUX1 source IRQ26) */
132   PORTC_IRQn                   = 59,               /**< PORTC Pin detect (INTMUX1 source IRQ27) */
133   PORTD_IRQn                   = 60,               /**< PORTD Pin detect (INTMUX1 source IRQ28) */
134   LPADC0_IRQn                  = 61,               /**< LPADC0 interrupt (INTMUX1 source IRQ29) */
135   LPCMP0_IRQn                  = 62,               /**< LPCMP0 interrupt (INTMUX1 source IRQ30) */
136   LPDAC0_IRQn                  = 63                /**< LPDAC0 interrupt (INTMUX1 source IRQ31) */
137 } IRQn_Type;
138 
139 /*!
140  * @}
141  */ /* end of group Interrupt_vector_numbers */
142 
143 
144 /* ----------------------------------------------------------------------------
145    -- Cortex M0 Core Configuration
146    ---------------------------------------------------------------------------- */
147 
148 /*!
149  * @addtogroup Cortex_Core_Configuration Cortex M0 Core Configuration
150  * @{
151  */
152 
153 #define __CM0PLUS_REV                  0x0000    /**< Core revision r0p0 */
154 #define __MPU_PRESENT                  1         /**< Defines if an MPU is present or not */
155 #define __VTOR_PRESENT                 1         /**< Defines if VTOR is present or not */
156 #define __NVIC_PRIO_BITS               2         /**< Number of priority bits implemented in the NVIC */
157 #define __Vendor_SysTickConfig         0         /**< Vendor specific implementation of SysTickConfig is defined */
158 
159 #include "core_cm0plus.h"              /* Core Peripheral Access Layer */
160 #include "system_K32L3A60_cm0plus.h"   /* Device specific configuration file */
161 
162 /*!
163  * @}
164  */ /* end of group Cortex_Core_Configuration */
165 
166 
167 /* ----------------------------------------------------------------------------
168    -- Mapping Information
169    ---------------------------------------------------------------------------- */
170 
171 /*!
172  * @addtogroup Mapping_Information Mapping Information
173  * @{
174  */
175 
176 /** Mapping Information */
177 /*!
178  * @addtogroup edma_request
179  * @{ */
180 
181 /*******************************************************************************
182  * Definitions
183 *******************************************************************************/
184 
185 /*!
186  * @brief Enumeration for the DMA hardware request
187  *
188  * Defines the enumeration for the DMA hardware request collections.
189  */
190 typedef enum _dma_request_source
191 {
192     kDmaRequestMux1LLWU1            = 0|0x200U,    /**< LLWU1 Wakeup */
193     kDmaRequestMux1CAU3             = 1|0x200U,    /**< CAU3 Data Request */
194     kDmaRequestMux1LPTMR2           = 2|0x200U,    /**< LPTMR2 Trigger */
195     kDmaRequestMux1TPM3Channel0     = 3|0x200U,    /**< TPM3 Channel 0 */
196     kDmaRequestMux1TPM3Channel1     = 4|0x200U,    /**< TPM3 Channel 1 */
197     kDmaRequestMux1TPM3Overflow     = 5|0x200U,    /**< TPM3 Overflow */
198     kDmaRequestMux1LPI2C3Rx         = 6|0x200U,    /**< LPI2C3 Receive */
199     kDmaRequestMux1LPI2C3Tx         = 7|0x200U,    /**< LPI2C3 Transmit */
200     kDmaRequestMux1RF0Rx            = 8|0x200U,    /**< 2.4GHz Radio 0 Receive */
201     kDmaRequestMux1LPSPI3Rx         = 9|0x200U,    /**< LPSPI3 Receive */
202     kDmaRequestMux1LPSPI3Tx         = 10|0x200U,   /**< LPSPI3 Transmit */
203     kDmaRequestMux1LPUART3Rx        = 11|0x200U,   /**< LPUART3 Receive */
204     kDmaRequestMux1LPUART3Tx        = 12|0x200U,   /**< LPUART3 Transmit */
205     kDmaRequestMux1PORTE            = 13|0x200U,   /**< PORTE Pin Request */
206     kDmaRequestMux1LPCMP1           = 14|0x200U,   /**< LPCMP1 Comparator Trigger */
207     kDmaRequestMux1LPTMR1           = 15|0x200U,   /**< LPTMR1 Trigger */
208     kDmaRequestMux1FLEXIO0Channel0  = 16|0x200U,   /**< FLEXIO0 Channel 0 */
209     kDmaRequestMux1FLEXIO0Channel1  = 17|0x200U,   /**< FLEXIO0 Channel 1 */
210     kDmaRequestMux1FLEXIO0Channel2  = 18|0x200U,   /**< FLEXIO0 Channel 2 */
211     kDmaRequestMux1FLEXIO0Channel3  = 19|0x200U,   /**< FLEXIO0 Channel 3 */
212     kDmaRequestMux1FLEXIO0Channel4  = 20|0x200U,   /**< FLEXIO0 Channel 4 */
213     kDmaRequestMux1FLEXIO0Channel5  = 21|0x200U,   /**< FLEXIO0 Channel 5 */
214     kDmaRequestMux1FLEXIO0Channel6  = 22|0x200U,   /**< FLEXIO0 Channel 6 */
215     kDmaRequestMux1FLEXIO0Channel7  = 23|0x200U,   /**< FLEXIO0 Channel 7 */
216     kDmaRequestMux1I2S0Rx           = 24|0x200U,   /**< I2S0 Receive */
217     kDmaRequestMux1I2S0Tx           = 25|0x200U,   /**< I2S0 Transmit */
218     kDmaRequestMux1PORTA            = 26|0x200U,   /**< PORTA Pin Request */
219     kDmaRequestMux1PORTB            = 27|0x200U,   /**< PORTB Pin Request */
220     kDmaRequestMux1PORTC            = 28|0x200U,   /**< PORTC Pin Request */
221     kDmaRequestMux1PORTD            = 29|0x200U,   /**< PORTD Pin Request */
222     kDmaRequestMux1LPADC0           = 30|0x200U,   /**< LPADC0 Conversion Complete */
223     kDmaRequestMux1DAC0             = 31|0x200U,   /**< DAC0 Conversion Complete */
224 } dma_request_source_t;
225 
226 /* @} */
227 
228 /*!
229  * @addtogroup trgmux_source
230  * @{ */
231 
232 /*******************************************************************************
233  * Definitions
234 *******************************************************************************/
235 
236 /*!
237  * @brief Enumeration for the TRGMUX source
238  *
239  * Defines the enumeration for the TRGMUX source collections.
240  */
241 typedef enum _trgmux_source
242 {
243     kTRGMUX_Source0Disabled         = 0U,          /**< Trigger function is disabled */
244     kTRGMUX_Source1Disabled         = 0U,          /**< Trigger function is disabled */
245     kTRGMUX_Source0Llwu0            = 1U,          /**< LLWU0 trigger is selected */
246     kTRGMUX_Source1Llwu1            = 1U,          /**< LLWU1 trigger is selected */
247     kTRGMUX_Source0Lpit0Channel0    = 2U,          /**< LPIT0 Channel 0 is selected */
248     kTRGMUX_Source1Lpit1Channel0    = 2U,          /**< LPIT1 Channel 0 is selected */
249     kTRGMUX_Source0Lpit0Channel1    = 3U,          /**< LPIT0 Channel 1 is selected */
250     kTRGMUX_Source1Lpit1Channel1    = 3U,          /**< LPIT1 Channel 1 is selected */
251     kTRGMUX_Source0Lpit0Channel2    = 4U,          /**< LPIT0 Channel 2 is selected */
252     kTRGMUX_Source1Lpit1Channel2    = 4U,          /**< LPIT1 Channel 2 is selected */
253     kTRGMUX_Source0Lpit0Channel3    = 5U,          /**< LPIT0 Channel 3 is selected */
254     kTRGMUX_Source1Lpit1Channel3    = 5U,          /**< LPIT1 Channel 3 is selected */
255     kTRGMUX_Source0RtcAlarm         = 6U,          /**< RTC Alarm is selected */
256     kTRGMUX_Source1Lptmr2Trigger    = 6U,          /**< LPTMR2 Trigger is selected */
257     kTRGMUX_Source0RtcSeconds       = 7U,          /**< RTC Seconds is selected */
258     kTRGMUX_Source1Tpm3ChannelEven  = 7U,          /**< TPM3 Channel Even is selected */
259     kTRGMUX_Source0Lptmr0Trigger    = 8U,          /**< LPTMR0 Trigger is selected */
260     kTRGMUX_Source1Tpm3ChannelOdd   = 8U,          /**< TPM3 Channel Odd is selected */
261     kTRGMUX_Source0Lptmr1Trigger    = 9U,          /**< LPTMR1 Trigger is selected */
262     kTRGMUX_Source1Tpm3Overflow     = 9U,          /**< TPM3 Overflow is selected */
263     kTRGMUX_Source0Tpm0ChannelEven  = 10U,         /**< TPM0 Channel Even is selected */
264     kTRGMUX_Source1Lpi2c3MasterStop = 10U,         /**< LPI2C3 Master Stop is selected */
265     kTRGMUX_Source0Tpm0ChannelOdd   = 11U,         /**< TPM0 Channel Odd is selected */
266     kTRGMUX_Source1Lpi2c3SlaveStop  = 11U,         /**< LPI2C3 Slave Stop is selected */
267     kTRGMUX_Source0Tpm0Overflow     = 12U,         /**< TPM0 Overflow is selected */
268     kTRGMUX_Source1Lpspi3Frame      = 12U,         /**< LPSPI3 Frame is selected */
269     kTRGMUX_Source0Tpm1ChannelEven  = 13U,         /**< TPM1 Channel Even is selected */
270     kTRGMUX_Source1Lpspi3RX         = 13U,         /**< LPSPI3 Rx is selected */
271     kTRGMUX_Source0Tpm1ChannelOdd   = 14U,         /**< TPM1 Channel Odd is selected */
272     kTRGMUX_Source1Lpuart3RxData    = 14U,         /**< LPUART3 Rx Data is selected */
273     kTRGMUX_Source0Tpm1Overflow     = 15U,         /**< TPM1 Overflow is selected */
274     kTRGMUX_Source1Lpuart3RxIdle    = 15U,         /**< LPUART3 Rx Idle is selected */
275     kTRGMUX_Source0Tpm2ChannelEven  = 16U,         /**< TPM2 Channel Even is selected */
276     kTRGMUX_Source1Lpuart3TxData    = 16U,         /**< LPUART3 Tx Data is selected */
277     kTRGMUX_Source0Tpm2ChannelOdd   = 17U,         /**< TPM2 Channel Odd is selected */
278     kTRGMUX_Source1PortEPinTrigger  = 17U,         /**< PORTE Pin Trigger is selected */
279     kTRGMUX_Source0Tpm2Overflow     = 18U,         /**< TPM2 Overflow is selected */
280     kTRGMUX_Source1Lpcmp1Output     = 18U,         /**< LPCMP1 Output is selected */
281     kTRGMUX_Source0FlexIO0Timer0    = 19U,         /**< FlexIO0 Timer 0 is selected */
282     kTRGMUX_Source1RtcAlarm         = 19U,         /**< RTC Alarm is selected */
283     kTRGMUX_Source0FlexIO0Timer1    = 20U,         /**< FlexIO0 Timer 1 is selected */
284     kTRGMUX_Source1RtcSeconds       = 20U,         /**< RTC Seconds is selected */
285     kTRGMUX_Source0FlexIO0Timer2    = 21U,         /**< FlexIO0 Timer 2 is selected */
286     kTRGMUX_Source1Lptmr0Trigger    = 21U,         /**< LPTMR0 Trigger is selected */
287     kTRGMUX_Source0FlexIO0Timer3    = 22U,         /**< FlexIO0 Timer 3 is selected */
288     kTRGMUX_Source1Lptmr1Trigger    = 22U,         /**< LPTMR1 Trigger is selected */
289     kTRGMUX_Source0FlexIO0Timer4    = 23U,         /**< FLexIO0 Timer 4 is selected */
290     kTRGMUX_Source1Tpm1ChannelEven  = 23U,         /**< TPM1 Channel Even is selected */
291     kTRGMUX_Source0FlexIO0Timer5    = 24U,         /**< FlexIO0 Timer 5 is selected */
292     kTRGMUX_Source1Tpm1ChannelOdd   = 24U,         /**< TPM1 Channel Odd is selected */
293     kTRGMUX_Source0FlexIO0Timer6    = 25U,         /**< FlexIO0 Timer 6 is selected */
294     kTRGMUX_Source1Tpm1Overflow     = 25U,         /**< TPM1 Overflow is selected */
295     kTRGMUX_Source0FlexIO0Timer7    = 26U,         /**< FlexIO0 Timer 7 is selected */
296     kTRGMUX_Source1Tpm2ChannelEven  = 26U,         /**< TPM2 Channel Even is selected */
297     kTRGMUX_Source0Lpi2c0MasterStop = 27U,         /**< LPI2C0 Master Stop is selected */
298     kTRGMUX_Source1Tpm2ChannelOdd   = 27U,         /**< TPM2 Channel Odd is selected */
299     kTRGMUX_Source0Lpi2c0SlaveStop  = 28U,         /**< LPI2C0 Slave Stop is selected */
300     kTRGMUX_Source1Tpm2Overflow     = 28U,         /**< TPM2 Overflow is selected */
301     kTRGMUX_Source0Lpi2c1MasterStop = 29U,         /**< LPI2C1 Master Stop is selected */
302     kTRGMUX_Source1FlexIO0Timer0    = 29U,         /**< FlexIO0 Timer 0 is selected */
303     kTRGMUX_Source0Lpi2c1SlaveStop  = 30U,         /**< LPI2C1 Slave Stop is selected */
304     kTRGMUX_Source1FlexIO0Timer1    = 30U,         /**< FlexIO0 Timer 1 is selected */
305     kTRGMUX_Source0Lpi2c2MasterStop = 31U,         /**< LPI2C2 Master Stop is selected */
306     kTRGMUX_Source1FlexIO0Timer2    = 31U,         /**< FlexIO0 Timer 2 is selected */
307     kTRGMUX_Source0Lpi2c2SlaveStop  = 32U,         /**< LPI2C2 Slave Stop is selected */
308     kTRGMUX_Source1FlexIO0Timer3    = 32U,         /**< FlexIO0 Timer 3 is selected */
309     kTRGMUX_Source0Sai0Rx           = 33U,         /**< SAI0 Rx Frame Sync is selected */
310     kTRGMUX_Source1FlexIO0Timer4    = 33U,         /**< FLexIO0 Timer 4 is selected */
311     kTRGMUX_Source0Sai0Tx           = 34U,         /**< SAI0 Tx Frame Sync is selected */
312     kTRGMUX_Source1FlexIO0Timer5    = 34U,         /**< FlexIO0 Timer 5 is selected */
313     kTRGMUX_Source0Lpspi0Frame      = 35U,         /**< LPSPI0 Frame is selected */
314     kTRGMUX_Source1FlexIO0Timer6    = 35U,         /**< FlexIO0 Timer 6 is selected */
315     kTRGMUX_Source0Lpspi0Rx         = 36U,         /**< LPSPI0 Rx is selected */
316     kTRGMUX_Source1FlexIO0Timer7    = 36U,         /**< FlexIO0 Timer 7 is selected */
317     kTRGMUX_Source0Lpspi1Frame      = 37U,         /**< LPSPI1 Frame is selected */
318     kTRGMUX_Source1Lpi2c0MasterStop = 37U,         /**< LPI2C0 Master Stop is selected */
319     kTRGMUX_Source0Lpspi1Rx         = 38U,         /**< LPSPI1 Rx is selected */
320     kTRGMUX_Source1Lpi2c0SlaveStop  = 38U,         /**< LPI2C0 Slave Stop is selected */
321     kTRGMUX_Source0Lpspi2Frame      = 39U,         /**< LPSPI2 Frame is selected */
322     kTRGMUX_Source1Lpi2c1MasterStop = 39U,         /**< LPI2C1 Master Stop is selected */
323     kTRGMUX_Source0Lpspi2RX         = 40U,         /**< LPSPI2 Rx is selected */
324     kTRGMUX_Source1Lpi2c1SlaveStop  = 40U,         /**< LPI2C1 Slave Stop is selected */
325     kTRGMUX_Source0Lpuart0RxData    = 41U,         /**< LPUART0 Rx Data is selected */
326     kTRGMUX_Source1Lpi2c2MasterStop = 41U,         /**< LPI2C2 Master Stop is selected */
327     kTRGMUX_Source0Lpuart0RxIdle    = 42U,         /**< LPUART0 Rx Idle is selected */
328     kTRGMUX_Source1Lpi2c2SlaveStop  = 42U,         /**< LPI2C2 Slave Stop is selected */
329     kTRGMUX_Source0Lpuart0TxData    = 43U,         /**< LPUART0 Tx Data is selected */
330     kTRGMUX_Source1Sai0Rx           = 43U,         /**< SAI0 Rx Frame Sync is selected */
331     kTRGMUX_Source0Lpuart1RxData    = 44U,         /**< LPUART1 Rx Data is selected */
332     kTRGMUX_Source1Sai0Tx           = 44U,         /**< SAI0 Tx Frame Sync is selected */
333     kTRGMUX_Source0Lpuart1RxIdle    = 45U,         /**< LPUART1 Rx Idle is selected */
334     kTRGMUX_Source1Lpspi0Frame      = 45U,         /**< LPSPI0 Frame is selected */
335     kTRGMUX_Source0Lpuart1TxData    = 46U,         /**< LPUART1 TX Data is selected */
336     kTRGMUX_Source1Lpspi0Rx         = 46U,         /**< LPSPI0 Rx is selected */
337     kTRGMUX_Source0Lpuart2RxData    = 47U,         /**< LPUART2 RX Data is selected */
338     kTRGMUX_Source1Lpspi1Frame      = 47U,         /**< LPSPI1 Frame is selected */
339     kTRGMUX_Source0Lpuart2RxIdle    = 48U,         /**< LPUART2 RX Idle is selected */
340     kTRGMUX_Source1Lpspi1Rx         = 48U,         /**< LPSPI1 Rx is selected */
341     kTRGMUX_Source0Lpuart2TxData    = 49U,         /**< LPUART2 TX Data is selected */
342     kTRGMUX_Source1Lpspi2Frame      = 49U,         /**< LPSPI2 Frame is selected */
343     kTRGMUX_Source0Usb0Frame        = 50U,         /**< USB0 Start of Frame is selected */
344     kTRGMUX_Source1Lpspi2RX         = 50U,         /**< LPSPI2 Rx is selected */
345     kTRGMUX_Source0PortAPinTrigger  = 51U,         /**< PORTA Pin Trigger is selected */
346     kTRGMUX_Source1Lpuart0RxData    = 51U,         /**< LPUART0 Rx Data is selected */
347     kTRGMUX_Source0PortBPinTrigger  = 52U,         /**< PORTB Pin Trigger is selected */
348     kTRGMUX_Source1Lpuart0RxIdle    = 52U,         /**< LPUART0 Rx Idle is selected */
349     kTRGMUX_Source0PortCPinTrigger  = 53U,         /**< PORTC Pin Trigger is selected */
350     kTRGMUX_Source1Lpuart0TxData    = 53U,         /**< LPUART0 Tx Data is selected */
351     kTRGMUX_Source0PortDPinTrigger  = 54U,         /**< PORTD Pin Trigger is selected */
352     kTRGMUX_Source1Lpuart1RxData    = 54U,         /**< LPUART1 Rx Data is selected */
353     kTRGMUX_Source0Lpcmp0Output     = 55U,         /**< LPCMP0 Output is selected */
354     kTRGMUX_Source1Lpuart1RxIdle    = 55U,         /**< LPUART1 Rx Idle is selected */
355     kTRGMUX_Source0Lpi2c3MasterStop = 56U,         /**< LPI2C3 Master Stop is selected */
356     kTRGMUX_Source1Lpuart1TxData    = 56U,         /**< LPUART1 TX Data is selected */
357     kTRGMUX_Source0Lpi2c3SlaveStop  = 57U,         /**< LPI2C3 Slave Stop is selected */
358     kTRGMUX_Source1Lpuart2RxData    = 57U,         /**< LPUART2 RX Data is selected */
359     kTRGMUX_Source0Lpspi3Frame      = 58U,         /**< LPSPI3 Frame is selected */
360     kTRGMUX_Source1Lpuart2RxIdle    = 58U,         /**< LPUART2 RX Idle is selected */
361     kTRGMUX_Source0Lpspi3Rx         = 59U,         /**< LPSPI3 Rx Data is selected */
362     kTRGMUX_Source1Lpuart2TxData    = 59U,         /**< LPUART2 TX Data is selected */
363     kTRGMUX_Source0Lpuart3RxData    = 60U,         /**< LPUART3 Rx Data is selected */
364     kTRGMUX_Source1PortAPinTrigger  = 60U,         /**< PORTA Pin Trigger is selected */
365     kTRGMUX_Source0Lpuart3RxIdle    = 61U,         /**< LPUART3 Rx Idle is selected */
366     kTRGMUX_Source1PortBPinTrigger  = 61U,         /**< PORTB Pin Trigger is selected */
367     kTRGMUX_Source0Lpuart3TxData    = 62U,         /**< LPUART3 Tx Data is selected */
368     kTRGMUX_Source1PortCPinTrigger  = 62U,         /**< PORTC Pin Trigger is selected */
369     kTRGMUX_Source0PortEPinTrigger  = 63U,         /**< PORTE Pin Trigger is selected */
370     kTRGMUX_Source1PortDPinTrigger  = 63U,         /**< PORTD Pin Trigger is selected */
371 } trgmux_source_t;
372 
373 /* @} */
374 
375 /*!
376  * @brief Enumeration for the TRGMUX device
377  *
378  * Defines the enumeration for the TRGMUX device collections.
379  */
380 typedef enum _trgmux_device
381 {
382     kTRGMUX_Trgmux0Dmamux0          = 0U,          /**< DMAMUX0 device trigger input */
383     kTRGMUX_Trgmux1Dmamux1          = 0U,          /**< DMAMUX1 device trigger input */
384     kTRGMUX_Trgmux0Lpit0            = 1U,          /**< LPIT0 device trigger input */
385     kTRGMUX_Trgmux1Lpit1            = 1U,          /**< LPIT1 device trigger input */
386     kTRGMUX_Trgmux0Tpm0             = 2U,          /**< TPM0 device trigger input */
387     kTRGMUX_Trgmux1Tpm3             = 2U,          /**< TPM3 device trigger input */
388     kTRGMUX_Trgmux0Tpm1             = 3U,          /**< TPM1 device trigger input */
389     kTRGMUX_Trgmux1Lpi2c3           = 3U,          /**< LPI2C3 device trigger input */
390     kTRGMUX_Trgmux0Tpm2             = 4U,          /**< TPM2 device trigger input */
391     kTRGMUX_Trgmux1Lpspi3           = 4U,          /**< LPSPI3 device trigger input */
392     kTRGMUX_Trgmux0Flexio0          = 5U,          /**< FLEXIO0 device trigger input */
393     kTRGMUX_Trgmux1Lpuart3          = 5U,          /**< LPUART3 device trigger input */
394     kTRGMUX_Trgmux0Lpi2c0           = 6U,          /**< LPI2C0 device trigger input */
395     kTRGMUX_Trgmux1Lpcmp1           = 6U,          /**< LPCMP1 device trigger input */
396     kTRGMUX_Trgmux0Lpi2c1           = 7U,          /**< LPI2C1 device trigger input */
397     kTRGMUX_Trgmux1Dmamux0          = 7U,          /**< DMAMUX0 device trigger input */
398     kTRGMUX_Trgmux0Lpi2c2           = 8U,          /**< LPI2C2 device trigger input */
399     kTRGMUX_Trgmux1Lpit0            = 8U,          /**< LPIT0 device trigger input */
400     kTRGMUX_Trgmux0Lpspi0           = 9U,          /**< LPSPI0 device trigger input */
401     kTRGMUX_Trgmux1Tpm0             = 9U,          /**< TPM0 device trigger input */
402     kTRGMUX_Trgmux0Lpspi1           = 10U,         /**< LPSPI1 device trigger input */
403     kTRGMUX_Trgmux1Tpm1             = 10U,         /**< TPM1 device trigger input */
404     kTRGMUX_Trgmux0Lpspi2           = 11U,         /**< LPSPI2 device trigger input */
405     kTRGMUX_Trgmux1Tpm2             = 11U,         /**< TPM2 device trigger input */
406     kTRGMUX_Trgmux0Lpuart0          = 12U,         /**< LPUART0 device trigger input */
407     kTRGMUX_Trgmux1Flexio0          = 12U,         /**< FLEXIO0 device trigger input */
408     kTRGMUX_Trgmux0Lpuart1          = 13U,         /**< LPUART1 device trigger input */
409     kTRGMUX_Trgmux1Lpi2c0           = 13U,         /**< LPI2C0 device trigger input */
410     kTRGMUX_Trgmux0Lpuart2          = 14U,         /**< LPUART2 device trigger input */
411     kTRGMUX_Trgmux1Lpi2c1           = 14U,         /**< LPI2C1 device trigger input */
412     kTRGMUX_Trgmux0Lpadc0           = 15U,         /**< LPADC0 device trigger input */
413     kTRGMUX_Trgmux1Lpi2c2           = 15U,         /**< LPI2C2 device trigger input */
414     kTRGMUX_Trgmux0Lpcmp0           = 16U,         /**< LPCMP0 device trigger input */
415     kTRGMUX_Trgmux1Lpspi0           = 16U,         /**< LPSPI0 device trigger input */
416     kTRGMUX_Trgmux0Lpdac0           = 17U,         /**< LPDAC0 device trigger input */
417     kTRGMUX_Trgmux1Lpspi1           = 17U,         /**< LPSPI1 device trigger input */
418     kTRGMUX_Trgmux0Dmamux1          = 18U,         /**< DMAMUX1 device trigger input */
419     kTRGMUX_Trgmux1Lpspi2           = 18U,         /**< LPSPI2 device trigger input */
420     kTRGMUX_Trgmux0Lpit1            = 19U,         /**< LPIT1 device trigger input */
421     kTRGMUX_Trgmux1Lpuart0          = 19U,         /**< LPUART0 device trigger input */
422     kTRGMUX_Trgmux0Tpm3             = 20U,         /**< TPM3 device trigger input */
423     kTRGMUX_Trgmux1Lpuart1          = 20U,         /**< LPUART1 device trigger input */
424     kTRGMUX_Trgmux0Lpi2c3           = 21U,         /**< LPI2C3 device trigger input */
425     kTRGMUX_Trgmux1Lpuart2          = 21U,         /**< LPUART2 device trigger input */
426     kTRGMUX_Trgmux0Lpspi3           = 22U,         /**< LPSPI3 device trigger input */
427     kTRGMUX_Trgmux1Lpadc0           = 22U,         /**< LPADC0 device trigger input */
428     kTRGMUX_Trgmux0Lpuart3          = 23U,         /**< LPUART3 device trigger input */
429     kTRGMUX_Trgmux1Lpcmp0           = 23U,         /**< LPCMP0 device trigger input */
430     kTRGMUX_Trgmux0Lpcmp1           = 24U,         /**< LPCMP1 device trigger input */
431     kTRGMUX_Trgmux1Lpdac0           = 24U,         /**< LPDAC0 device trigger input */
432 } trgmux_device_t;
433 
434 /* @} */
435 
436 /*!
437  * @addtogroup xrdc_mapping
438  * @{
439  */
440 
441 /*******************************************************************************
442  * Definitions
443  ******************************************************************************/
444 
445 /*!
446  * @brief Structure for the XRDC mapping
447  *
448  * Defines the structure for the XRDC resource collections.
449  */
450 
451 typedef enum _xrdc_master
452 {
453     kXRDC_MasterCM4CodeBus          = 0U,          /**< CM4 C-BUS */
454     kXRDC_MasterCM4SystemBus        = 1U,          /**< CM4 S-BUS */
455     kXRDC_MasterEdma0               = 2U,          /**< EDMA0 */
456     kXRDC_MasterUsdhc               = 3U,          /**< USDHC */
457     kXRDC_MasterUsb                 = 4U,          /**< USB */
458     kXRDC_MasterCM0P                = 32U,         /**< CM0P */
459     kXRDC_MasterEdma1               = 33U,         /**< EDMA1 */
460     kXRDC_MasterCau3                = 34U,         /**< CAU3 */
461 } xrdc_master_t;
462 
463 /* @} */
464 
465 typedef enum _xrdc_mem
466 {
467     kXRDC_MemMrc0_0                 = 0U,          /**< MRC0 Memory 0 */
468     kXRDC_MemMrc0_1                 = 1U,          /**< MRC0 Memory 1 */
469     kXRDC_MemMrc0_2                 = 2U,          /**< MRC0 Memory 2 */
470     kXRDC_MemMrc0_3                 = 3U,          /**< MRC0 Memory 3 */
471     kXRDC_MemMrc0_4                 = 4U,          /**< MRC0 Memory 4 */
472     kXRDC_MemMrc0_5                 = 5U,          /**< MRC0 Memory 5 */
473     kXRDC_MemMrc0_6                 = 6U,          /**< MRC0 Memory 6 */
474     kXRDC_MemMrc0_7                 = 7U,          /**< MRC0 Memory 7 */
475     kXRDC_MemMrc1_0                 = 16U,         /**< MRC1 Memory 0 */
476     kXRDC_MemMrc1_1                 = 17U,         /**< MRC1 Memory 1 */
477     kXRDC_MemMrc1_2                 = 18U,         /**< MRC1 Memory 2 */
478     kXRDC_MemMrc1_3                 = 19U,         /**< MRC1 Memory 3 */
479     kXRDC_MemMrc1_4                 = 20U,         /**< MRC1 Memory 4 */
480     kXRDC_MemMrc1_5                 = 21U,         /**< MRC1 Memory 5 */
481     kXRDC_MemMrc1_6                 = 22U,         /**< MRC1 Memory 6 */
482     kXRDC_MemMrc1_7                 = 23U,         /**< MRC1 Memory 7 */
483 } xrdc_mem_t;
484 
485 typedef enum _xrdc_periph
486 {
487     kXRDC_PeriphMscm                = 1U,          /**< Miscellaneous System Control Module (MSCM) */
488     kXRDC_PeriphMaxcore             = 4U,          /**< MAX CORE */
489     kXRDC_PeriphDma0                = 8U,          /**< Direct Memory Access 0 (DMA0) controller */
490     kXRDC_PeriphDma0Tcd             = 9U,          /**< Direct Memory Access 0 (DMA0) controller transfer control descriptors */
491     kXRDC_PeriphFlexBus             = 12U,         /**< External Bus Interface(FlexBus) */
492     kXRDC_PeriphXrdcMgr             = 20U,         /**< Extended Resource Domain Controller (XRDC) MGR */
493     kXRDC_PeriphXrdcMdac            = 21U,         /**< Extended Resource Domain Controller (XRDC) MDAC */
494     kXRDC_PeriphXrdcPac             = 22U,         /**< Extended Resource Domain Controller (XRDC) PAC */
495     kXRDC_PeriphXrdcMrc             = 23U,         /**< Extended Resource Domain Controller (XRDC) MRC */
496     kXRDC_PeriphSema420             = 27U,         /**< Semaphore Unit 0 (SEMA420) */
497     kXRDC_PeriphSmc0                = 32U,         /**< System Mode Controller 0 (SMC0) */
498     kXRDC_PeriphDmamux0             = 33U,         /**< Direct Memory Access Multiplexer 0 (DMAMUX0) */
499     kXRDC_PeriphEwm                 = 34U,         /**< External Watchdog Monitor (EWM) */
500     kXRDC_PeriphFtfe                = 35U,         /**< Flash Memory Module (FTFE) */
501     kXRDC_PeriphLlwu0               = 36U,         /**< Low Leakage Wake-up Unit 0 (LLWU0) */
502     kXRDC_PeriphMua                 = 37U,         /**< Message Unit Side A (MU-A) */
503     kXRDC_PeriphSim                 = 38U,         /**< System Integration Module (SIM) */
504     kXRDC_PeriphUsbVreg             = 39U,         /**< USB Voltage Regulator (USBVREG) */
505     kXRDC_PeriphSpm                 = 40U,         /**< System Power Management (SPM) */
506     kXRDC_PeriphTrgmux0             = 41U,         /**< Tirgger Multiplexer 0 (TRGMUX0) */
507     kXRDC_PeriphWdog0               = 42U,         /**< Watchdog 0 (WDOG0) */
508     kXRDC_PeriphPcc0                = 43U,         /**< Peripheral Clock Controller 0 (PCC0) */
509     kXRDC_PeriphScg                 = 44U,         /**< System Clock Generator (SCG) */
510     kXRDC_PeriphSrf                 = 45U,         /**< System Register File */
511     kXRDC_PeriphVbat                = 46U,         /**< VBAT Register File */
512     kXRDC_PeriphCrc0                = 47U,         /**< Cyclic Redundancy Check 0 (CRC0) */
513     kXRDC_PeriphLpit0               = 48U,         /**< Low-Power Periodic Interrupt Timer 0 (LPIT0) */
514     kXRDC_PeriphRtc                 = 49U,         /**< Real Time Clock (RTC) */
515     kXRDC_PeriphLptmr0              = 50U,         /**< Low-Power Timer 0 (LPTMR0) */
516     kXRDC_PeriphLptmr1              = 51U,         /**< Low-Power Timer 1 (LPTMR1) */
517     kXRDC_PeriphTstmra              = 52U,         /**< Time Stamp Timer A (TSTMRA) */
518     kXRDC_PeriphTpm0                = 53U,         /**< Timer / Pulse Width Modulator Module 0 (TPM0) - 6 channel */
519     kXRDC_PeriphTpm1                = 54U,         /**< Timer / Pulse Width Modulator Module 1 (TPM1) - 2 channel */
520     kXRDC_PeriphTpm2                = 55U,         /**< Timer / Pulse Width Modulator Module 2 (TPM2) - 6 channel */
521     kXRDC_PeriphEmvsim0             = 56U,         /**< Euro Mastercard Visa Secure Identity Module 0 (EMVSIM0) */
522     kXRDC_PeriphFlexio0             = 57U,         /**< Flexible Input / Output 0 (FlexIO0) */
523     kXRDC_PeriphLpi2c0              = 58U,         /**< Low-Power Inter-Integrated Circuit 0 (LPI2C0) */
524     kXRDC_PeriphLpi2c1              = 59U,         /**< Low-Power Inter-Integrated Circuit 1 (LPI2C1) */
525     kXRDC_PeriphLpi2c2              = 60U,         /**< Low-Power Inter-Integrated Circuit 2 (LPI2C2) */
526     kXRDC_PeriphI2s0                = 61U,         /**< Serial Audio Interface 0 (I2S0) */
527     kXRDC_PeriphSdhc0               = 62U,         /**< Secure Digital Host Controller 0 (SDHC0) */
528     kXRDC_PeriphLpspi0              = 63U,         /**< Low-Power Serial Peripheral Interface 0 (LPSPI0) */
529     kXRDC_PeriphLpspi1              = 64U,         /**< Low-Power Serial Peripheral Interface 1 (LPSPI1) */
530     kXRDC_PeriphLpspi2              = 65U,         /**< Low-Power Serial Peripheral Interface 2 (LPSPI2) */
531     kXRDC_PeriphLpuart0             = 66U,         /**< Low-Power Universal Asynchronous Receive / Transmit 0 (LPUART0) */
532     kXRDC_PeriphLpuart1             = 67U,         /**< Low-Power Universal Asynchronous Receive / Transmit 1 (LPUART1) */
533     kXRDC_PeriphLpuart2             = 68U,         /**< Low-Power Universal Asynchronous Receive / Transmit 2 (LPUART2) */
534     kXRDC_PeriphUsb0                = 69U,         /**< Universal Serial Bus 0 (USB0) - Full Speed, Device Only */
535     kXRDC_PeriphPortA               = 70U,         /**< PORTA Multiplex Control */
536     kXRDC_PeriphPortB               = 71U,         /**< PORTB Multiplex Control */
537     kXRDC_PeriphPortC               = 72U,         /**< PORTC Multiplex Control */
538     kXRDC_PeriphPortD               = 73U,         /**< PORTD Multiplex Control */
539     kXRDC_PeriphLpadc0              = 74U,         /**< Low-Power Analog-to-Digital Converter 0 (LPADC0) */
540     kXRDC_PeriphLpcmp0              = 75U,         /**< Low-Power Comparator 0 (LPCMP0) */
541     kXRDC_PeriphLpdac0              = 76U,         /**< Low-Power Digital-to-Analog Converter 0 (LPDAC0) */
542     kXRDC_PeriphVref                = 77U,         /**< Voltage Reference (VREF) */
543     kXRDC_PeriphDma1                = 136U,        /**< Direct Memory Access 1 (DMA1) controller */
544     kXRDC_PeriphDma1Tcd             = 137U,        /**< Direct Memory Access 1 (DMA1) controller trasfer control descriptors */
545     kXRDC_PeriphFgpio1              = 143U,        /**< IO Port Alias */
546     kXRDC_PeriphSema421             = 155U,        /**< Semaphore Unit 1 (SEMA421) */
547     kXRDC_PeriphSmc1                = 160U,        /**< System Mode Controller 1(SMC1) */
548     kXRDC_PeriphDmamux1             = 161U,        /**< Direct Memory Access Mutiplexer 1 (DMAMUX1) */
549     kXRDC_PeriphIntmux0             = 162U,        /**< Interrupt Multiplexer 0 (INTMUX0) */
550     kXRDC_Periphllwu1               = 163U,        /**< Low Leakage Wake-up Unit 1 (LLWU1) */
551     kXRDC_PeriphMub                 = 164U,        /**< Messaging Unit - Side B (MU-B) */
552     kXRDC_PeriphTrgmux1             = 165U,        /**< Trigger Multiplexer 1 (TRGMUX1) */
553     kXRDC_PeriphWdog1               = 166U,        /**< Watchdog 1 (WDOG1) */
554     kXRDC_PeriphPcc1                = 167U,        /**< Peripheral Clock Controller 1 (PCC1) */
555     kXRDC_PeriphCau3                = 168U,        /**< Cryptographic Acceleration Unit (CAU3) */
556     kXRDC_PeriphTrng                = 169U,        /**< True Random Number Generator (TRNG) */
557     kXRDC_PeriphLpit1               = 170U,        /**< Low-Power Periodic Interrupt Timer 1 (LPIT1) */
558     kXRDC_PeriphLptmr2              = 171U,        /**< Low-Power Timer 2 (LPTMR2) */
559     kXRDC_PeriphTstmrb              = 172U,        /**< Time Stamp Timer B (TSTMRB) */
560     kXRDC_PeriphTpm3                = 173U,        /**< Timer / Pulse Width Modulation Module 3 (TPM3) - 2 channel */
561     kXRDC_PeriphLpi2c3              = 174U,        /**< Low-Power Inter-Integrated Circuit 3 (LPI2C3) */
562     kXRDC_PeriphLpspi3              = 181U,        /**< Low-Power Serial Peripheral Interface 3 (LPSPI3) */
563     kXRDC_PeriphLpuart3             = 182U,        /**< Low-Power Universal Asynchronous Receive / Transmit 3 (LPUART3) */
564     kXRDC_PeriphPortE               = 183U,        /**< PORTE Multiplex Control */
565     kXRDC_PeriphLpcmp1              = 184U,        /**< Low-Power Comparator 1 (LPCMP1) */
566     kXRDC_PeriphUsbRam              = 272U,        /**< USB SRAM */
567     kXRDC_PeriphRgpio               = 288U,        /**< Rapid GPIO */
568 } xrdc_periph_t;
569 
570 
571 /*!
572  * @}
573  */ /* end of group Mapping_Information */
574 
575 
576 /* ----------------------------------------------------------------------------
577    -- Device Peripheral Access Layer
578    ---------------------------------------------------------------------------- */
579 
580 /*!
581  * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
582  * @{
583  */
584 
585 
586 /*
587 ** Start of section using anonymous unions
588 */
589 
590 #if defined(__ARMCC_VERSION)
591   #if (__ARMCC_VERSION >= 6010050)
592     #pragma clang diagnostic push
593   #else
594     #pragma push
595     #pragma anon_unions
596   #endif
597 #elif defined(__GNUC__)
598   /* anonymous unions are enabled by default */
599 #elif defined(__IAR_SYSTEMS_ICC__)
600   #pragma language=extended
601 #else
602   #error Not supported compiler type
603 #endif
604 
605 /* ----------------------------------------------------------------------------
606    -- ADC Peripheral Access Layer
607    ---------------------------------------------------------------------------- */
608 
609 /*!
610  * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
611  * @{
612  */
613 
614 /** ADC - Register Layout Typedef */
615 typedef struct {
616   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
617   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
618        uint8_t RESERVED_0[8];
619   __IO uint32_t CTRL;                              /**< LPADC Control Register, offset: 0x10 */
620   __IO uint32_t STAT;                              /**< LPADC Status Register, offset: 0x14 */
621   __IO uint32_t IE;                                /**< Interrupt Enable Register, offset: 0x18 */
622   __IO uint32_t DE;                                /**< DMA Enable Register, offset: 0x1C */
623   __IO uint32_t CFG;                               /**< LPADC Configuration Register, offset: 0x20 */
624   __IO uint32_t PAUSE;                             /**< LPADC Pause Register, offset: 0x24 */
625        uint8_t RESERVED_1[8];
626   __IO uint32_t FCTRL;                             /**< LPADC FIFO Control Register, offset: 0x30 */
627   __O  uint32_t SWTRIG;                            /**< Software Trigger Register, offset: 0x34 */
628        uint8_t RESERVED_2[8];
629   __IO uint32_t OFSTRIM;                           /**< LPADC Offset Trim Register, offset: 0x40 */
630        uint8_t RESERVED_3[124];
631   __IO uint32_t TCTRL[4];                          /**< Trigger Control Register, array offset: 0xC0, array step: 0x4 */
632        uint8_t RESERVED_4[48];
633   struct {                                         /* offset: 0x100, array step: 0x8 */
634     __IO uint32_t CMDL;                              /**< LPADC Command Low Buffer Register, array offset: 0x100, array step: 0x8 */
635     __IO uint32_t CMDH;                              /**< LPADC Command High Buffer Register, array offset: 0x104, array step: 0x8 */
636   } CMD[15];
637        uint8_t RESERVED_5[136];
638   __IO uint32_t CV[4];                             /**< Compare Value Register, array offset: 0x200, array step: 0x4 */
639        uint8_t RESERVED_6[240];
640   __I  uint32_t RESFIFO;                           /**< LPADC Data Result FIFO Register, offset: 0x300 */
641 } ADC_Type;
642 
643 /* ----------------------------------------------------------------------------
644    -- ADC Register Masks
645    ---------------------------------------------------------------------------- */
646 
647 /*!
648  * @addtogroup ADC_Register_Masks ADC Register Masks
649  * @{
650  */
651 
652 /*! @name VERID - Version ID Register */
653 /*! @{ */
654 
655 #define ADC_VERID_RES_MASK                       (0x1U)
656 #define ADC_VERID_RES_SHIFT                      (0U)
657 /*! RES - Resolution
658  *  0b0..Up to 13-bit differential/12-bit single ended resolution supported.
659  *  0b1..Up to 16-bit differential/15-bit single ended resolution supported.
660  */
661 #define ADC_VERID_RES(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_VERID_RES_SHIFT)) & ADC_VERID_RES_MASK)
662 
663 #define ADC_VERID_DIFFEN_MASK                    (0x2U)
664 #define ADC_VERID_DIFFEN_SHIFT                   (1U)
665 /*! DIFFEN - Differential Supported
666  *  0b0..Differential operation not supported.
667  *  0b1..Differential operation supported. CMDLa[DIFF] and CMDLa[ABSEL] control fields implemented.
668  */
669 #define ADC_VERID_DIFFEN(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_VERID_DIFFEN_SHIFT)) & ADC_VERID_DIFFEN_MASK)
670 
671 #define ADC_VERID_MVI_MASK                       (0x8U)
672 #define ADC_VERID_MVI_SHIFT                      (3U)
673 /*! MVI - Multi Vref Implemented
674  *  0b0..Single voltage reference high (VREFH) input supported.
675  *  0b1..Multiple voltage reference high (VREFH) inputs supported.
676  */
677 #define ADC_VERID_MVI(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MVI_SHIFT)) & ADC_VERID_MVI_MASK)
678 
679 #define ADC_VERID_CSW_MASK                       (0x70U)
680 #define ADC_VERID_CSW_SHIFT                      (4U)
681 /*! CSW - Channel Scale Width
682  *  0b000..Channel scaling not supported.
683  *  0b001..Channel scaling supported. 1-bit CSCALE control field.
684  *  0b110..Channel scaling supported. 6-bit CSCALE control field.
685  */
686 #define ADC_VERID_CSW(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CSW_SHIFT)) & ADC_VERID_CSW_MASK)
687 
688 #define ADC_VERID_VR1RNGI_MASK                   (0x100U)
689 #define ADC_VERID_VR1RNGI_SHIFT                  (8U)
690 /*! VR1RNGI - Voltage Reference 1 Range Control Bit Implemented
691  *  0b0..Range control not required. CFG[VREF1RNG] is not implemented.
692  *  0b1..Range control required. CFG[VREF1RNG] is implemented.
693  */
694 #define ADC_VERID_VR1RNGI(x)                     (((uint32_t)(((uint32_t)(x)) << ADC_VERID_VR1RNGI_SHIFT)) & ADC_VERID_VR1RNGI_MASK)
695 
696 #define ADC_VERID_IADCKI_MASK                    (0x200U)
697 #define ADC_VERID_IADCKI_SHIFT                   (9U)
698 /*! IADCKI - Internal LPADC Clock implemented
699  *  0b0..Internal clock source not implemented.
700  *  0b1..Internal clock source (and CFG[ADCKEN]) implemented.
701  */
702 #define ADC_VERID_IADCKI(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_VERID_IADCKI_SHIFT)) & ADC_VERID_IADCKI_MASK)
703 
704 #define ADC_VERID_CALOFSI_MASK                   (0x400U)
705 #define ADC_VERID_CALOFSI_SHIFT                  (10U)
706 /*! CALOFSI - Calibration Offset Function Implemented
707  *  0b0..Offset calibration and offset trimming not implemented.
708  *  0b1..Offset calibration and offset trimming implemented.
709  */
710 #define ADC_VERID_CALOFSI(x)                     (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CALOFSI_SHIFT)) & ADC_VERID_CALOFSI_MASK)
711 
712 #define ADC_VERID_MINOR_MASK                     (0xFF0000U)
713 #define ADC_VERID_MINOR_SHIFT                    (16U)
714 /*! MINOR - Minor Version Number */
715 #define ADC_VERID_MINOR(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MINOR_SHIFT)) & ADC_VERID_MINOR_MASK)
716 
717 #define ADC_VERID_MAJOR_MASK                     (0xFF000000U)
718 #define ADC_VERID_MAJOR_SHIFT                    (24U)
719 /*! MAJOR - Major Version Number */
720 #define ADC_VERID_MAJOR(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MAJOR_SHIFT)) & ADC_VERID_MAJOR_MASK)
721 /*! @} */
722 
723 /*! @name PARAM - Parameter Register */
724 /*! @{ */
725 
726 #define ADC_PARAM_TRIG_NUM_MASK                  (0xFFU)
727 #define ADC_PARAM_TRIG_NUM_SHIFT                 (0U)
728 /*! TRIG_NUM - Trigger Number */
729 #define ADC_PARAM_TRIG_NUM(x)                    (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_TRIG_NUM_SHIFT)) & ADC_PARAM_TRIG_NUM_MASK)
730 
731 #define ADC_PARAM_FIFOSIZE_MASK                  (0xFF00U)
732 #define ADC_PARAM_FIFOSIZE_SHIFT                 (8U)
733 /*! FIFOSIZE - Result FIFO Depth
734  *  0b00000001..Result FIFO depth = 1 dataword.
735  *  0b00000100..Result FIFO depth = 4 datawords.
736  *  0b00001000..Result FIFO depth = 8 datawords.
737  *  0b00010000..Result FIFO depth = 16 datawords.
738  *  0b00100000..Result FIFO depth = 32 datawords.
739  *  0b01000000..Result FIFO depth = 64 datawords.
740  */
741 #define ADC_PARAM_FIFOSIZE(x)                    (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_FIFOSIZE_SHIFT)) & ADC_PARAM_FIFOSIZE_MASK)
742 
743 #define ADC_PARAM_CV_NUM_MASK                    (0xFF0000U)
744 #define ADC_PARAM_CV_NUM_SHIFT                   (16U)
745 /*! CV_NUM - Compare Value Number */
746 #define ADC_PARAM_CV_NUM(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CV_NUM_SHIFT)) & ADC_PARAM_CV_NUM_MASK)
747 
748 #define ADC_PARAM_CMD_NUM_MASK                   (0xFF000000U)
749 #define ADC_PARAM_CMD_NUM_SHIFT                  (24U)
750 /*! CMD_NUM - Command Buffer Number */
751 #define ADC_PARAM_CMD_NUM(x)                     (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CMD_NUM_SHIFT)) & ADC_PARAM_CMD_NUM_MASK)
752 /*! @} */
753 
754 /*! @name CTRL - LPADC Control Register */
755 /*! @{ */
756 
757 #define ADC_CTRL_ADCEN_MASK                      (0x1U)
758 #define ADC_CTRL_ADCEN_SHIFT                     (0U)
759 /*! ADCEN - LPADC Enable
760  *  0b0..LPADC is disabled.
761  *  0b1..LPADC is enabled.
762  */
763 #define ADC_CTRL_ADCEN(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_ADCEN_SHIFT)) & ADC_CTRL_ADCEN_MASK)
764 
765 #define ADC_CTRL_RST_MASK                        (0x2U)
766 #define ADC_CTRL_RST_SHIFT                       (1U)
767 /*! RST - Software Reset
768  *  0b0..LPADC logic is not reset.
769  *  0b1..LPADC logic is reset.
770  */
771 #define ADC_CTRL_RST(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RST_SHIFT)) & ADC_CTRL_RST_MASK)
772 
773 #define ADC_CTRL_DOZEN_MASK                      (0x4U)
774 #define ADC_CTRL_DOZEN_SHIFT                     (2U)
775 /*! DOZEN - Doze Enable
776  *  0b0..LPADC is enabled in Doze mode.
777  *  0b1..LPADC is disabled in Doze mode.
778  */
779 #define ADC_CTRL_DOZEN(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_DOZEN_SHIFT)) & ADC_CTRL_DOZEN_MASK)
780 
781 #define ADC_CTRL_RSTFIFO_MASK                    (0x100U)
782 #define ADC_CTRL_RSTFIFO_SHIFT                   (8U)
783 /*! RSTFIFO - Reset FIFO
784  *  0b0..No effect.
785  *  0b1..FIFO is reset.
786  */
787 #define ADC_CTRL_RSTFIFO(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO_SHIFT)) & ADC_CTRL_RSTFIFO_MASK)
788 /*! @} */
789 
790 /*! @name STAT - LPADC Status Register */
791 /*! @{ */
792 
793 #define ADC_STAT_RDY_MASK                        (0x1U)
794 #define ADC_STAT_RDY_SHIFT                       (0U)
795 /*! RDY - Result FIFO Ready Flag
796  *  0b0..Result FIFO data level not above watermark level.
797  *  0b1..Result FIFO holding data above watermark level.
798  */
799 #define ADC_STAT_RDY(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY_SHIFT)) & ADC_STAT_RDY_MASK)
800 
801 #define ADC_STAT_FOF_MASK                        (0x2U)
802 #define ADC_STAT_FOF_SHIFT                       (1U)
803 /*! FOF - Result FIFO Overflow Flag
804  *  0b0..No result FIFO overflow has occurred since the last time the flag was cleared.
805  *  0b1..At least one result FIFO overflow has occurred since the last time the flag was cleared.
806  */
807 #define ADC_STAT_FOF(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF_SHIFT)) & ADC_STAT_FOF_MASK)
808 
809 #define ADC_STAT_TRGACT_MASK                     (0x30000U)
810 #define ADC_STAT_TRGACT_SHIFT                    (16U)
811 /*! TRGACT - Trigger Active
812  *  0b00..Command (sequence) associated with Trigger 0 currently being executed.
813  *  0b01..Command (sequence) associated with Trigger 1 currently being executed.
814  *  0b10..Command (sequence) associated with Trigger 2 currently being executed.
815  *  0b11..Command (sequence) associated with Trigger 3 currently being executed.
816  */
817 #define ADC_STAT_TRGACT(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TRGACT_SHIFT)) & ADC_STAT_TRGACT_MASK)
818 
819 #define ADC_STAT_CMDACT_MASK                     (0xF000000U)
820 #define ADC_STAT_CMDACT_SHIFT                    (24U)
821 /*! CMDACT - Command Active
822  *  0b0000..No command is currently in progress.
823  *  0b0001..Command 1 currently being executed.
824  *  0b0010..Command 2 currently being executed.
825  *  0b0011-0b1111..Associated command number is currently being executed.
826  */
827 #define ADC_STAT_CMDACT(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CMDACT_SHIFT)) & ADC_STAT_CMDACT_MASK)
828 /*! @} */
829 
830 /*! @name IE - Interrupt Enable Register */
831 /*! @{ */
832 
833 #define ADC_IE_FWMIE_MASK                        (0x1U)
834 #define ADC_IE_FWMIE_SHIFT                       (0U)
835 /*! FWMIE - FIFO Watermark Interrupt Enable
836  *  0b0..FIFO watermark interrupts are not enabled.
837  *  0b1..FIFO watermark interrupts are enabled.
838  */
839 #define ADC_IE_FWMIE(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE_SHIFT)) & ADC_IE_FWMIE_MASK)
840 
841 #define ADC_IE_FOFIE_MASK                        (0x2U)
842 #define ADC_IE_FOFIE_SHIFT                       (1U)
843 /*! FOFIE - Result FIFO Overflow Interrupt Enable
844  *  0b0..FIFO overflow interrupts are not enabled.
845  *  0b1..FIFO overflow interrupts are enabled.
846  */
847 #define ADC_IE_FOFIE(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE_SHIFT)) & ADC_IE_FOFIE_MASK)
848 /*! @} */
849 
850 /*! @name DE - DMA Enable Register */
851 /*! @{ */
852 
853 #define ADC_DE_FWMDE_MASK                        (0x1U)
854 #define ADC_DE_FWMDE_SHIFT                       (0U)
855 /*! FWMDE - FIFO Watermark DMA Enable
856  *  0b0..DMA request disabled.
857  *  0b1..DMA request enabled.
858  */
859 #define ADC_DE_FWMDE(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE_SHIFT)) & ADC_DE_FWMDE_MASK)
860 /*! @} */
861 
862 /*! @name CFG - LPADC Configuration Register */
863 /*! @{ */
864 
865 #define ADC_CFG_TPRICTRL_MASK                    (0x1U)
866 #define ADC_CFG_TPRICTRL_SHIFT                   (0U)
867 /*! TPRICTRL - LPADC trigger priority control
868  *  0b0..If a higher priority trigger is detected during command processing, the current conversion is aborted and
869  *       the new command specified by the trigger is started.
870  *  0b1..If a higher priority trigger is received during command processing, the current conversion is completed
871  *       (including averaging iterations if enabled) and stored to the RESFIFO before the higher priority
872  *       trigger/command is initiated. Note that compare until true commands can be interrupted prior to resulting in a true
873  *       conversion.
874  */
875 #define ADC_CFG_TPRICTRL(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TPRICTRL_SHIFT)) & ADC_CFG_TPRICTRL_MASK)
876 
877 #define ADC_CFG_PWRSEL_MASK                      (0x30U)
878 #define ADC_CFG_PWRSEL_SHIFT                     (4U)
879 /*! PWRSEL - Power Configuration Select
880  *  0b00..Level 1 (Lowest power setting)
881  *  0b01..Level 2
882  *  0b10..Level 3
883  *  0b11..Level 4 (Highest power setting)
884  */
885 #define ADC_CFG_PWRSEL(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWRSEL_SHIFT)) & ADC_CFG_PWRSEL_MASK)
886 
887 #define ADC_CFG_REFSEL_MASK                      (0xC0U)
888 #define ADC_CFG_REFSEL_SHIFT                     (6U)
889 /*! REFSEL - Voltage Reference Selection
890  *  0b00..(Default) Option 1 setting.
891  *  0b01..Option 2 setting.
892  *  0b10..Option 3 setting.
893  *  0b11..Reserved
894  */
895 #define ADC_CFG_REFSEL(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CFG_REFSEL_SHIFT)) & ADC_CFG_REFSEL_MASK)
896 
897 #define ADC_CFG_CALOFS_MASK                      (0x8000U)
898 #define ADC_CFG_CALOFS_SHIFT                     (15U)
899 /*! CALOFS - Configure for offset calibration function
900  *  0b0..Calibration function disabled
901  *  0b1..Configure for offset calibration function
902  */
903 #define ADC_CFG_CALOFS(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CFG_CALOFS_SHIFT)) & ADC_CFG_CALOFS_MASK)
904 
905 #define ADC_CFG_PUDLY_MASK                       (0xFF0000U)
906 #define ADC_CFG_PUDLY_SHIFT                      (16U)
907 /*! PUDLY - Power Up Delay */
908 #define ADC_CFG_PUDLY(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PUDLY_SHIFT)) & ADC_CFG_PUDLY_MASK)
909 
910 #define ADC_CFG_PWREN_MASK                       (0x10000000U)
911 #define ADC_CFG_PWREN_SHIFT                      (28U)
912 /*! PWREN - LPADC Analog Pre-Enable
913  *  0b0..LPADC analog circuits are only enabled while conversions are active. Performance is affected due to analog startup delays.
914  *  0b1..LPADC analog circuits are pre-enabled and ready to execute conversions without startup delays (at the
915  *       cost of higher DC current consumption). When PWREN is set, the power up delay is enforced such that any
916  *       detected trigger does not begin ADC operation until the power up delay time has passed.
917  */
918 #define ADC_CFG_PWREN(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWREN_SHIFT)) & ADC_CFG_PWREN_MASK)
919 
920 #define ADC_CFG_VREF1RNG_MASK                    (0x20000000U)
921 #define ADC_CFG_VREF1RNG_SHIFT                   (29U)
922 /*! VREF1RNG - Enable support for low voltage reference on Option 1 Reference
923  *  0b0..Configuration required when Voltage Reference Option 1 input is in high voltage range
924  *  0b1..Configuration required when Voltage Reference Option 1 input is in low voltage range
925  */
926 #define ADC_CFG_VREF1RNG(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_CFG_VREF1RNG_SHIFT)) & ADC_CFG_VREF1RNG_MASK)
927 
928 #define ADC_CFG_ADCKEN_MASK                      (0x80000000U)
929 #define ADC_CFG_ADCKEN_SHIFT                     (31U)
930 /*! ADCKEN - LPADC asynchronous clock enable
931  *  0b0..LPADC internal clock is disabled
932  *  0b1..LPADC internal clock is enabled
933  */
934 #define ADC_CFG_ADCKEN(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CFG_ADCKEN_SHIFT)) & ADC_CFG_ADCKEN_MASK)
935 /*! @} */
936 
937 /*! @name PAUSE - LPADC Pause Register */
938 /*! @{ */
939 
940 #define ADC_PAUSE_PAUSEDLY_MASK                  (0x1FFU)
941 #define ADC_PAUSE_PAUSEDLY_SHIFT                 (0U)
942 /*! PAUSEDLY - Pause Delay */
943 #define ADC_PAUSE_PAUSEDLY(x)                    (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEDLY_SHIFT)) & ADC_PAUSE_PAUSEDLY_MASK)
944 
945 #define ADC_PAUSE_PAUSEEN_MASK                   (0x80000000U)
946 #define ADC_PAUSE_PAUSEEN_SHIFT                  (31U)
947 /*! PAUSEEN - PAUSE Option Enable
948  *  0b0..Pause operation disabled
949  *  0b1..Pause operation enabled
950  */
951 #define ADC_PAUSE_PAUSEEN(x)                     (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEEN_SHIFT)) & ADC_PAUSE_PAUSEEN_MASK)
952 /*! @} */
953 
954 /*! @name FCTRL - LPADC FIFO Control Register */
955 /*! @{ */
956 
957 #define ADC_FCTRL_FCOUNT_MASK                    (0x1FU)
958 #define ADC_FCTRL_FCOUNT_SHIFT                   (0U)
959 /*! FCOUNT - Result FIFO counter */
960 #define ADC_FCTRL_FCOUNT(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FCOUNT_SHIFT)) & ADC_FCTRL_FCOUNT_MASK)
961 
962 #define ADC_FCTRL_FWMARK_MASK                    (0xF0000U)
963 #define ADC_FCTRL_FWMARK_SHIFT                   (16U)
964 /*! FWMARK - Watermark level selection */
965 #define ADC_FCTRL_FWMARK(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FWMARK_SHIFT)) & ADC_FCTRL_FWMARK_MASK)
966 /*! @} */
967 
968 /*! @name SWTRIG - Software Trigger Register */
969 /*! @{ */
970 
971 #define ADC_SWTRIG_SWT0_MASK                     (0x1U)
972 #define ADC_SWTRIG_SWT0_SHIFT                    (0U)
973 /*! SWT0 - Software trigger 0 event
974  *  0b0..No trigger 0 event generated.
975  *  0b1..Trigger 0 event generated.
976  */
977 #define ADC_SWTRIG_SWT0(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT0_SHIFT)) & ADC_SWTRIG_SWT0_MASK)
978 
979 #define ADC_SWTRIG_SWT1_MASK                     (0x2U)
980 #define ADC_SWTRIG_SWT1_SHIFT                    (1U)
981 /*! SWT1 - Software trigger 1 event
982  *  0b0..No trigger 1 event generated.
983  *  0b1..Trigger 1 event generated.
984  */
985 #define ADC_SWTRIG_SWT1(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT1_SHIFT)) & ADC_SWTRIG_SWT1_MASK)
986 
987 #define ADC_SWTRIG_SWT2_MASK                     (0x4U)
988 #define ADC_SWTRIG_SWT2_SHIFT                    (2U)
989 /*! SWT2 - Software trigger 2 event
990  *  0b0..No trigger 2 event generated.
991  *  0b1..Trigger 2 event generated.
992  */
993 #define ADC_SWTRIG_SWT2(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT2_SHIFT)) & ADC_SWTRIG_SWT2_MASK)
994 
995 #define ADC_SWTRIG_SWT3_MASK                     (0x8U)
996 #define ADC_SWTRIG_SWT3_SHIFT                    (3U)
997 /*! SWT3 - Software trigger 3 event
998  *  0b0..No trigger 3 event generated.
999  *  0b1..Trigger 3 event generated.
1000  */
1001 #define ADC_SWTRIG_SWT3(x)                       (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT3_SHIFT)) & ADC_SWTRIG_SWT3_MASK)
1002 /*! @} */
1003 
1004 /*! @name OFSTRIM - LPADC Offset Trim Register */
1005 /*! @{ */
1006 
1007 #define ADC_OFSTRIM_OFSTRIM_MASK                 (0x3FU)
1008 #define ADC_OFSTRIM_OFSTRIM_SHIFT                (0U)
1009 /*! OFSTRIM - Trim for offset */
1010 #define ADC_OFSTRIM_OFSTRIM(x)                   (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_SHIFT)) & ADC_OFSTRIM_OFSTRIM_MASK)
1011 /*! @} */
1012 
1013 /*! @name TCTRL - Trigger Control Register */
1014 /*! @{ */
1015 
1016 #define ADC_TCTRL_HTEN_MASK                      (0x1U)
1017 #define ADC_TCTRL_HTEN_SHIFT                     (0U)
1018 /*! HTEN - Trigger enable
1019  *  0b0..Hardware trigger source disabled
1020  *  0b1..Hardware trigger source enabled
1021  */
1022 #define ADC_TCTRL_HTEN(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_HTEN_SHIFT)) & ADC_TCTRL_HTEN_MASK)
1023 
1024 #define ADC_TCTRL_TPRI_MASK                      (0x300U)
1025 #define ADC_TCTRL_TPRI_SHIFT                     (8U)
1026 /*! TPRI - Trigger priority setting
1027  *  0b00..Set to highest priority, Level 1
1028  *  0b01-0b10..Set to corresponding priority level
1029  *  0b11..Set to lowest priority, Level 4
1030  */
1031 #define ADC_TCTRL_TPRI(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TPRI_SHIFT)) & ADC_TCTRL_TPRI_MASK)
1032 
1033 #define ADC_TCTRL_TDLY_MASK                      (0xF0000U)
1034 #define ADC_TCTRL_TDLY_SHIFT                     (16U)
1035 /*! TDLY - Trigger delay select */
1036 #define ADC_TCTRL_TDLY(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TDLY_SHIFT)) & ADC_TCTRL_TDLY_MASK)
1037 
1038 #define ADC_TCTRL_TCMD_MASK                      (0xF000000U)
1039 #define ADC_TCTRL_TCMD_SHIFT                     (24U)
1040 /*! TCMD - Trigger command select
1041  *  0b0000..Not a valid selection from the command buffer. Trigger event is ignored.
1042  *  0b0001..CMD1 is executed
1043  *  0b0010-0b1110..Corresponding CMD is executed
1044  *  0b1111..CMD15 is executed
1045  */
1046 #define ADC_TCTRL_TCMD(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TCMD_SHIFT)) & ADC_TCTRL_TCMD_MASK)
1047 /*! @} */
1048 
1049 /* The count of ADC_TCTRL */
1050 #define ADC_TCTRL_COUNT                          (4U)
1051 
1052 /*! @name CMDL - LPADC Command Low Buffer Register */
1053 /*! @{ */
1054 
1055 #define ADC_CMDL_ADCH_MASK                       (0x1FU)
1056 #define ADC_CMDL_ADCH_SHIFT                      (0U)
1057 /*! ADCH - Input channel select
1058  *  0b00000..Select CH0A or CH0B
1059  *  0b00001..Select CH1A or CH1B
1060  *  0b00010..Select CH2A or CH2B
1061  *  0b00011..Select CH3A or CH3B
1062  *  0b00100-0b11101..Select corresponding channel CHnA or CHnB
1063  *  0b11110..Select CH30A or CH30B
1064  *  0b11111..Select CH31A or CH31B
1065  */
1066 #define ADC_CMDL_ADCH(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ADCH_SHIFT)) & ADC_CMDL_ADCH_MASK)
1067 
1068 #define ADC_CMDL_ABSEL_MASK                      (0x20U)
1069 #define ADC_CMDL_ABSEL_SHIFT                     (5U)
1070 /*! ABSEL - A-side vs. B-side Select
1071  *  0b0..The associated A-side channel is converted.
1072  *  0b1..The associated B-side channel is converted.
1073  */
1074 #define ADC_CMDL_ABSEL(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ABSEL_SHIFT)) & ADC_CMDL_ABSEL_MASK)
1075 /*! @} */
1076 
1077 /* The count of ADC_CMDL */
1078 #define ADC_CMDL_COUNT                           (15U)
1079 
1080 /*! @name CMDH - LPADC Command High Buffer Register */
1081 /*! @{ */
1082 
1083 #define ADC_CMDH_CMPEN_MASK                      (0x3U)
1084 #define ADC_CMDH_CMPEN_SHIFT                     (0U)
1085 /*! CMPEN - Compare Function Enable
1086  *  0b00..Compare disabled.
1087  *  0b01..Reserved
1088  *  0b10..Compare enabled. Store on true.
1089  *  0b11..Compare enabled. Repeat channel acquisition (sample/convert/compare) until true.
1090  */
1091 #define ADC_CMDH_CMPEN(x)                        (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_CMPEN_SHIFT)) & ADC_CMDH_CMPEN_MASK)
1092 
1093 #define ADC_CMDH_LWI_MASK                        (0x80U)
1094 #define ADC_CMDH_LWI_SHIFT                       (7U)
1095 /*! LWI - Loop with Increment
1096  *  0b0..Auto channel increment disabled
1097  *  0b1..Auto channel increment enabled
1098  */
1099 #define ADC_CMDH_LWI(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LWI_SHIFT)) & ADC_CMDH_LWI_MASK)
1100 
1101 #define ADC_CMDH_STS_MASK                        (0x700U)
1102 #define ADC_CMDH_STS_SHIFT                       (8U)
1103 /*! STS - Sample Time Select
1104  *  0b000..Minimum sample time of 3 ADCK cycles.
1105  *  0b001..3 + 21 ADCK cycles; 5 ADCK cycles total sample time.
1106  *  0b010..3 + 22 ADCK cycles; 7 ADCK cycles total sample time.
1107  *  0b011..3 + 23 ADCK cycles; 11 ADCK cycles total sample time.
1108  *  0b100..3 + 24 ADCK cycles; 19 ADCK cycles total sample time.
1109  *  0b101..3 + 25 ADCK cycles; 35 ADCK cycles total sample time.
1110  *  0b110..3 + 26 ADCK cycles; 67 ADCK cycles total sample time.
1111  *  0b111..3 + 27 ADCK cycles; 131 ADCK cycles total sample time.
1112  */
1113 #define ADC_CMDH_STS(x)                          (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_STS_SHIFT)) & ADC_CMDH_STS_MASK)
1114 
1115 #define ADC_CMDH_AVGS_MASK                       (0x7000U)
1116 #define ADC_CMDH_AVGS_SHIFT                      (12U)
1117 /*! AVGS - Hardware Average Select
1118  *  0b000..Single conversion.
1119  *  0b001..2 conversions averaged.
1120  *  0b010..4 conversions averaged.
1121  *  0b011..8 conversions averaged.
1122  *  0b100..16 conversions averaged.
1123  *  0b101..32 conversions averaged.
1124  *  0b110..64 conversions averaged.
1125  *  0b111..128 conversions averaged.
1126  */
1127 #define ADC_CMDH_AVGS(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_AVGS_SHIFT)) & ADC_CMDH_AVGS_MASK)
1128 
1129 #define ADC_CMDH_LOOP_MASK                       (0xF0000U)
1130 #define ADC_CMDH_LOOP_SHIFT                      (16U)
1131 /*! LOOP - Loop Count Select
1132  *  0b0000..Looping not enabled. Command executes 1 time.
1133  *  0b0001..Loop 1 time. Command executes 2 times.
1134  *  0b0010..Loop 2 times. Command executes 3 times.
1135  *  0b0011-0b1110..Loop corresponding number of times. Command executes LOOP+1 times.
1136  *  0b1111..Loop 15 times. Command executes 16 times.
1137  */
1138 #define ADC_CMDH_LOOP(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LOOP_SHIFT)) & ADC_CMDH_LOOP_MASK)
1139 
1140 #define ADC_CMDH_NEXT_MASK                       (0xF000000U)
1141 #define ADC_CMDH_NEXT_SHIFT                      (24U)
1142 /*! NEXT - Next Command Select
1143  *  0b0000..No next command defined. Terminate conversions at completion of current command. If lower priority
1144  *          trigger pending, begin command associated with lower priority trigger.
1145  *  0b0001..Select CMD1 command buffer register as next command.
1146  *  0b0010-0b1110..Select corresponding CMD command buffer register as next command
1147  *  0b1111..Select CMD15 command buffer register as next command.
1148  */
1149 #define ADC_CMDH_NEXT(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_NEXT_SHIFT)) & ADC_CMDH_NEXT_MASK)
1150 /*! @} */
1151 
1152 /* The count of ADC_CMDH */
1153 #define ADC_CMDH_COUNT                           (15U)
1154 
1155 /*! @name CV - Compare Value Register */
1156 /*! @{ */
1157 
1158 #define ADC_CV_CVL_MASK                          (0xFFFFU)
1159 #define ADC_CV_CVL_SHIFT                         (0U)
1160 /*! CVL - Compare Value Low. */
1161 #define ADC_CV_CVL(x)                            (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVL_SHIFT)) & ADC_CV_CVL_MASK)
1162 
1163 #define ADC_CV_CVH_MASK                          (0xFFFF0000U)
1164 #define ADC_CV_CVH_SHIFT                         (16U)
1165 /*! CVH - Compare Value High. */
1166 #define ADC_CV_CVH(x)                            (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVH_SHIFT)) & ADC_CV_CVH_MASK)
1167 /*! @} */
1168 
1169 /* The count of ADC_CV */
1170 #define ADC_CV_COUNT                             (4U)
1171 
1172 /*! @name RESFIFO - LPADC Data Result FIFO Register */
1173 /*! @{ */
1174 
1175 #define ADC_RESFIFO_D_MASK                       (0xFFFFU)
1176 #define ADC_RESFIFO_D_SHIFT                      (0U)
1177 /*! D - Data result */
1178 #define ADC_RESFIFO_D(x)                         (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_D_SHIFT)) & ADC_RESFIFO_D_MASK)
1179 
1180 #define ADC_RESFIFO_TSRC_MASK                    (0x30000U)
1181 #define ADC_RESFIFO_TSRC_SHIFT                   (16U)
1182 /*! TSRC - Trigger Source
1183  *  0b00..Trigger source 0 initiated this conversion.
1184  *  0b01..Trigger source 1 initiated this conversion.
1185  *  0b10..Trigger source 2 initiated this conversion.
1186  *  0b11..Trigger source 3 initiated this conversion.
1187  */
1188 #define ADC_RESFIFO_TSRC(x)                      (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_TSRC_SHIFT)) & ADC_RESFIFO_TSRC_MASK)
1189 
1190 #define ADC_RESFIFO_LOOPCNT_MASK                 (0xF00000U)
1191 #define ADC_RESFIFO_LOOPCNT_SHIFT                (20U)
1192 /*! LOOPCNT - Loop count value
1193  *  0b0000..Result is from initial conversion in command.
1194  *  0b0001..Result is from second conversion in command.
1195  *  0b0010-0b1110..Result is from LOOPCNT+1 conversion in command.
1196  *  0b1111..Result is from 16th conversion in command.
1197  */
1198 #define ADC_RESFIFO_LOOPCNT(x)                   (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_LOOPCNT_SHIFT)) & ADC_RESFIFO_LOOPCNT_MASK)
1199 
1200 #define ADC_RESFIFO_CMDSRC_MASK                  (0xF000000U)
1201 #define ADC_RESFIFO_CMDSRC_SHIFT                 (24U)
1202 /*! CMDSRC - Command Buffer Source
1203  *  0b0000..Not a valid value CMDSRC value for a dataword in RESFIFO. 0x0 is only found in initial FIFO state
1204  *          prior to an ADC conversion result dataword being stored to a RESFIFO buffer.
1205  *  0b0001..CMD1 buffer used as control settings for this conversion.
1206  *  0b0010-0b1110..Corresponding command buffer used as control settings for this conversion.
1207  *  0b1111..CMD15 buffer used as control settings for this conversion.
1208  */
1209 #define ADC_RESFIFO_CMDSRC(x)                    (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_CMDSRC_SHIFT)) & ADC_RESFIFO_CMDSRC_MASK)
1210 
1211 #define ADC_RESFIFO_VALID_MASK                   (0x80000000U)
1212 #define ADC_RESFIFO_VALID_SHIFT                  (31U)
1213 /*! VALID - FIFO entry is valid
1214  *  0b0..FIFO is empty. Discard any read from RESFIFO.
1215  *  0b1..FIFO record read from RESFIFO is valid.
1216  */
1217 #define ADC_RESFIFO_VALID(x)                     (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_VALID_SHIFT)) & ADC_RESFIFO_VALID_MASK)
1218 /*! @} */
1219 
1220 
1221 /*!
1222  * @}
1223  */ /* end of group ADC_Register_Masks */
1224 
1225 
1226 /* ADC - Peripheral instance base addresses */
1227 /** Peripheral LPADC0 base address */
1228 #define LPADC0_BASE                              (0x4004A000u)
1229 /** Peripheral LPADC0 base pointer */
1230 #define LPADC0                                   ((ADC_Type *)LPADC0_BASE)
1231 /** Array initializer of ADC peripheral base addresses */
1232 #define ADC_BASE_ADDRS                           { LPADC0_BASE }
1233 /** Array initializer of ADC peripheral base pointers */
1234 #define ADC_BASE_PTRS                            { LPADC0 }
1235 /** Interrupt vectors for the ADC peripheral type */
1236 #define ADC_IRQS                                 { LPADC0_IRQn }
1237 
1238 /*!
1239  * @}
1240  */ /* end of group ADC_Peripheral_Access_Layer */
1241 
1242 
1243 /* ----------------------------------------------------------------------------
1244    -- CAU3 Peripheral Access Layer
1245    ---------------------------------------------------------------------------- */
1246 
1247 /*!
1248  * @addtogroup CAU3_Peripheral_Access_Layer CAU3 Peripheral Access Layer
1249  * @{
1250  */
1251 
1252 /** CAU3 - Register Layout Typedef */
1253 typedef struct {
1254   __I  uint32_t PCT;                               /**< Processor Core Type, offset: 0x0 */
1255   __I  uint32_t MCFG;                              /**< Memory Configuration, offset: 0x4 */
1256        uint8_t RESERVED_0[8];
1257   __IO uint32_t CR;                                /**< Control Register, offset: 0x10 */
1258   __IO uint32_t SR;                                /**< Status Register, offset: 0x14 */
1259        uint8_t RESERVED_1[8];
1260   __IO uint32_t DBGCSR;                            /**< Debug Control/Status Register, offset: 0x20 */
1261   __IO uint32_t DBGPBR;                            /**< Debug PC Breakpoint Register, offset: 0x24 */
1262        uint8_t RESERVED_2[8];
1263   __IO uint32_t DBGMCMD;                           /**< Debug Memory Command Register, offset: 0x30 */
1264   __IO uint32_t DBGMADR;                           /**< Debug Memory Address Register, offset: 0x34 */
1265   __IO uint32_t DBGMDR;                            /**< Debug Memory Data Register, offset: 0x38 */
1266        uint8_t RESERVED_3[180];
1267   __IO uint32_t SEMA4;                             /**< Semaphore Register, offset: 0xF0 */
1268   __I  uint32_t SMOWNR;                            /**< Semaphore Ownership Register, offset: 0xF4 */
1269        uint8_t RESERVED_4[4];
1270   __IO uint32_t ARR;                               /**< Address Remap Register, offset: 0xFC */
1271        uint8_t RESERVED_5[128];
1272   __IO uint32_t CC_R[30];                          /**< CryptoCore General Purpose Registers, array offset: 0x180, array step: 0x4 */
1273   __IO uint32_t CC_R30;                            /**< General Purpose R30, offset: 0x1F8 */
1274   __IO uint32_t CC_R31;                            /**< General Purpose R31, offset: 0x1FC */
1275   __IO uint32_t CC_PC;                             /**< Program Counter, offset: 0x200 */
1276   __O  uint32_t CC_CMD;                            /**< Start Command Register, offset: 0x204 */
1277   __I  uint32_t CC_CF;                             /**< Condition Flag, offset: 0x208 */
1278        uint8_t RESERVED_6[500];
1279   __IO uint32_t MDPK;                              /**< Mode Register (PublicKey), offset: 0x400 */
1280        uint8_t RESERVED_7[44];
1281   __O  uint32_t COM;                               /**< Command Register, offset: 0x430 */
1282   __IO uint32_t CTL;                               /**< Control Register, offset: 0x434 */
1283        uint8_t RESERVED_8[8];
1284   __O  uint32_t CW;                                /**< Clear Written Register, offset: 0x440 */
1285        uint8_t RESERVED_9[4];
1286   __IO uint32_t STA;                               /**< Status Register, offset: 0x448 */
1287   __I  uint32_t ESTA;                              /**< Error Status Register, offset: 0x44C */
1288        uint8_t RESERVED_10[48];
1289   __IO uint32_t PKASZ;                             /**< PKHA A Size Register, offset: 0x480 */
1290        uint8_t RESERVED_11[4];
1291   __IO uint32_t PKBSZ;                             /**< PKHA B Size Register, offset: 0x488 */
1292        uint8_t RESERVED_12[4];
1293   __IO uint32_t PKNSZ;                             /**< PKHA N Size Register, offset: 0x490 */
1294        uint8_t RESERVED_13[4];
1295   __IO uint32_t PKESZ;                             /**< PKHA E Size Register, offset: 0x498 */
1296        uint8_t RESERVED_14[84];
1297   __I  uint32_t PKHA_VID1;                         /**< PKHA Revision ID 1, offset: 0x4F0 */
1298   __I  uint32_t PKHA_VID2;                         /**< PKHA Revision ID 2, offset: 0x4F4 */
1299   __I  uint32_t CHA_VID;                           /**< CHA Revision ID, offset: 0x4F8 */
1300        uint8_t RESERVED_15[260];
1301   __IO uint32_t PKHA_CCR;                          /**< PKHA Clock Control Register, offset: 0x600 */
1302   __I  uint32_t GSR;                               /**< Global Status Register, offset: 0x604 */
1303   __IO uint32_t CKLFSR;                            /**< Clock Linear Feedback Shift Register, offset: 0x608 */
1304        uint8_t RESERVED_16[500];
1305   __IO uint32_t PKA0[32];                          /**< PKHA A0 Register, array offset: 0x800, array step: 0x4 */
1306   __IO uint32_t PKA1[32];                          /**< PKHA A1 Register, array offset: 0x880, array step: 0x4 */
1307   __IO uint32_t PKA2[32];                          /**< PKHA A2 Register, array offset: 0x900, array step: 0x4 */
1308   __IO uint32_t PKA3[32];                          /**< PKHA A3 Register, array offset: 0x980, array step: 0x4 */
1309   __IO uint32_t PKB0[32];                          /**< PKHA B0 Register, array offset: 0xA00, array step: 0x4 */
1310   __IO uint32_t PKB1[32];                          /**< PKHA B1 Register, array offset: 0xA80, array step: 0x4 */
1311   __IO uint32_t PKB2[32];                          /**< PKHA B2 Register, array offset: 0xB00, array step: 0x4 */
1312   __IO uint32_t PKB3[32];                          /**< PKHA B3 Register, array offset: 0xB80, array step: 0x4 */
1313   __IO uint32_t PKN0[32];                          /**< PKHA N0 Register, array offset: 0xC00, array step: 0x4 */
1314   __IO uint32_t PKN1[32];                          /**< PKHA N1 Register, array offset: 0xC80, array step: 0x4 */
1315   __IO uint32_t PKN2[32];                          /**< PKHA N2 Register, array offset: 0xD00, array step: 0x4 */
1316   __IO uint32_t PKN3[32];                          /**< PKHA N3 Register, array offset: 0xD80, array step: 0x4 */
1317   __O  uint32_t PKE[128];                          /**< PKHA E Register, array offset: 0xE00, array step: 0x4 */
1318 } CAU3_Type;
1319 
1320 /* ----------------------------------------------------------------------------
1321    -- CAU3 Register Masks
1322    ---------------------------------------------------------------------------- */
1323 
1324 /*!
1325  * @addtogroup CAU3_Register_Masks CAU3 Register Masks
1326  * @{
1327  */
1328 
1329 /*! @name PCT - Processor Core Type */
1330 /*! @{ */
1331 
1332 #define CAU3_PCT_Y_MASK                          (0xFU)
1333 #define CAU3_PCT_Y_SHIFT                         (0U)
1334 /*! Y - Minor version number
1335  *  0b0000..Minor version number
1336  */
1337 #define CAU3_PCT_Y(x)                            (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_Y_SHIFT)) & CAU3_PCT_Y_MASK)
1338 
1339 #define CAU3_PCT_X_MASK                          (0xF0U)
1340 #define CAU3_PCT_X_SHIFT                         (4U)
1341 /*! X - Major version number
1342  *  0b0000..Major version number
1343  */
1344 #define CAU3_PCT_X(x)                            (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_X_SHIFT)) & CAU3_PCT_X_MASK)
1345 
1346 #define CAU3_PCT_ID_MASK                         (0xFFFFFF00U)
1347 #define CAU3_PCT_ID_SHIFT                        (8U)
1348 /*! ID - Module ID number
1349  *  0b010010110100000101100000..ID number for basic configuration
1350  *  0b010010110100000101100001..ID number for PKHA configuration
1351  */
1352 #define CAU3_PCT_ID(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_ID_SHIFT)) & CAU3_PCT_ID_MASK)
1353 /*! @} */
1354 
1355 /*! @name MCFG - Memory Configuration */
1356 /*! @{ */
1357 
1358 #define CAU3_MCFG_DRAM_SZ_MASK                   (0xF00U)
1359 #define CAU3_MCFG_DRAM_SZ_SHIFT                  (8U)
1360 /*! DRAM_SZ - Data RAM Size
1361  *  0b0000..No memory module
1362  *  0b0100..2K bytes
1363  *  0b0101..3K bytes
1364  *  0b0110..4K bytes
1365  *  0b0111..6K bytes
1366  *  0b1000..8K bytes
1367  *  0b1001..12K bytes
1368  *  0b1010..16K bytes
1369  *  0b1011..24K bytes
1370  *  0b1100..32K bytes
1371  *  0b1101..48K bytes
1372  *  0b1110..64K bytes
1373  *  0b1111..96K bytes
1374  */
1375 #define CAU3_MCFG_DRAM_SZ(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_DRAM_SZ_SHIFT)) & CAU3_MCFG_DRAM_SZ_MASK)
1376 
1377 #define CAU3_MCFG_IROM_SZ_MASK                   (0xF0000U)
1378 #define CAU3_MCFG_IROM_SZ_SHIFT                  (16U)
1379 /*! IROM_SZ - Instruction ROM Size
1380  *  0b0000..No memory module
1381  *  0b0100..2K bytes
1382  *  0b0101..3K bytes
1383  *  0b0110..4K bytes
1384  *  0b0111..6K bytes
1385  *  0b1000..8K bytes
1386  *  0b1001..12K bytes
1387  *  0b1010..16K bytes
1388  *  0b1011..24K bytes
1389  *  0b1100..32K bytes
1390  *  0b1101..48K bytes
1391  *  0b1110..64K bytes
1392  *  0b1111..96K bytes
1393  */
1394 #define CAU3_MCFG_IROM_SZ(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_IROM_SZ_SHIFT)) & CAU3_MCFG_IROM_SZ_MASK)
1395 
1396 #define CAU3_MCFG_IRAM_SZ_MASK                   (0xF000000U)
1397 #define CAU3_MCFG_IRAM_SZ_SHIFT                  (24U)
1398 /*! IRAM_SZ - Instruction RAM Size
1399  *  0b0000..No memory module
1400  *  0b0100..2K bytes
1401  *  0b0101..3K bytes
1402  *  0b0110..4K bytes
1403  *  0b0111..6K bytes
1404  *  0b1000..8K bytes
1405  *  0b1001..12K bytes
1406  *  0b1010..16K bytes
1407  *  0b1011..24K bytes
1408  *  0b1100..32K bytes
1409  *  0b1101..48K bytes
1410  *  0b1110..64K bytes
1411  *  0b1111..96K bytes
1412  */
1413 #define CAU3_MCFG_IRAM_SZ(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_IRAM_SZ_SHIFT)) & CAU3_MCFG_IRAM_SZ_MASK)
1414 /*! @} */
1415 
1416 /*! @name CR - Control Register */
1417 /*! @{ */
1418 
1419 #define CAU3_CR_TCSEIE_MASK                      (0x1U)
1420 #define CAU3_CR_TCSEIE_SHIFT                     (0U)
1421 /*! TCSEIE - Task completion with software error interrupt enable
1422  *  0b0..Disables task completion with software error to generate an interrupt request
1423  *  0b1..Enables task completion with software error to generate an interrupt request
1424  */
1425 #define CAU3_CR_TCSEIE(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_TCSEIE_SHIFT)) & CAU3_CR_TCSEIE_MASK)
1426 
1427 #define CAU3_CR_ILLIE_MASK                       (0x2U)
1428 #define CAU3_CR_ILLIE_SHIFT                      (1U)
1429 /*! ILLIE - Illegal Instruction Interrupt Enable
1430  *  0b0..Illegal instruction interrupt requests are disabled
1431  *  0b1..illegal Instruction interrupt requests are enabled
1432  */
1433 #define CAU3_CR_ILLIE(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_CR_ILLIE_SHIFT)) & CAU3_CR_ILLIE_MASK)
1434 
1435 #define CAU3_CR_ASREIE_MASK                      (0x8U)
1436 #define CAU3_CR_ASREIE_SHIFT                     (3U)
1437 /*! ASREIE - AHB Slave Response Error Interrupt Enable
1438  *  0b0..AHB slave response error interruption is not enabled
1439  *  0b1..AHB slave response error interruption is enabled
1440  */
1441 #define CAU3_CR_ASREIE(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_ASREIE_SHIFT)) & CAU3_CR_ASREIE_MASK)
1442 
1443 #define CAU3_CR_IIADIE_MASK                      (0x10U)
1444 #define CAU3_CR_IIADIE_SHIFT                     (4U)
1445 /*! IIADIE - IMEM Illegal Address Interrupt Enable
1446  *  0b0..IMEM illegal address interruption is not enabled
1447  *  0b1..IMEM illegal address interruption is enabled
1448  */
1449 #define CAU3_CR_IIADIE(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_IIADIE_SHIFT)) & CAU3_CR_IIADIE_MASK)
1450 
1451 #define CAU3_CR_DIADIE_MASK                      (0x20U)
1452 #define CAU3_CR_DIADIE_SHIFT                     (5U)
1453 /*! DIADIE - DMEM Illegal Address Interrupt Enable
1454  *  0b0..DMEM illegal address interruption is not enabled
1455  *  0b1..DMEM illegal address interruption is enabled
1456  */
1457 #define CAU3_CR_DIADIE(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DIADIE_SHIFT)) & CAU3_CR_DIADIE_MASK)
1458 
1459 #define CAU3_CR_SVIE_MASK                        (0x40U)
1460 #define CAU3_CR_SVIE_SHIFT                       (6U)
1461 /*! SVIE - Security Violation Interrupt Enable
1462  *  0b0..Security violation interruption is not enabled
1463  *  0b1..Security violation interruption is enabled
1464  */
1465 #define CAU3_CR_SVIE(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CR_SVIE_SHIFT)) & CAU3_CR_SVIE_MASK)
1466 
1467 #define CAU3_CR_TCIE_MASK                        (0x80U)
1468 #define CAU3_CR_TCIE_SHIFT                       (7U)
1469 /*! TCIE - Task completion with no error interrupt enable
1470  *  0b0..Disables task completion with no error to generate an interrupt request
1471  *  0b1..Enables task completion with no error to generate an interrupt request
1472  */
1473 #define CAU3_CR_TCIE(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CR_TCIE_SHIFT)) & CAU3_CR_TCIE_MASK)
1474 
1475 #define CAU3_CR_RSTSM4_MASK                      (0x3000U)
1476 #define CAU3_CR_RSTSM4_SHIFT                     (12U)
1477 /*! RSTSM4 - Reset Semaphore
1478  *  0b00..Idle state
1479  *  0b01..Wait for second write
1480  *  0b10..Clears semaphore if previous state was "01"
1481  *  0b11..Reserved
1482  */
1483 #define CAU3_CR_RSTSM4(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_RSTSM4_SHIFT)) & CAU3_CR_RSTSM4_MASK)
1484 
1485 #define CAU3_CR_MRST_MASK                        (0x8000U)
1486 #define CAU3_CR_MRST_SHIFT                       (15U)
1487 /*! MRST - Module Reset
1488  *  0b0..no action
1489  *  0b1..reset
1490  */
1491 #define CAU3_CR_MRST(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CR_MRST_SHIFT)) & CAU3_CR_MRST_MASK)
1492 
1493 #define CAU3_CR_FSV_MASK                         (0x10000U)
1494 #define CAU3_CR_FSV_SHIFT                        (16U)
1495 /*! FSV - Force Security Violation Test
1496  *  0b0..no violation is forced
1497  *  0b1..force security violation
1498  */
1499 #define CAU3_CR_FSV(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_CR_FSV_SHIFT)) & CAU3_CR_FSV_MASK)
1500 
1501 #define CAU3_CR_DTCCFG_MASK                      (0x7000000U)
1502 #define CAU3_CR_DTCCFG_SHIFT                     (24U)
1503 /*! DTCCFG - Default Task Completion Configuration
1504  *  0b100..Issue a DMA request
1505  *  0b010..Assert Event Completion Signal
1506  *  0b001..Issue an Interrupt Request
1507  *  0b000..no explicit action
1508  */
1509 #define CAU3_CR_DTCCFG(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DTCCFG_SHIFT)) & CAU3_CR_DTCCFG_MASK)
1510 
1511 #define CAU3_CR_DSHFI_MASK                       (0x10000000U)
1512 #define CAU3_CR_DSHFI_SHIFT                      (28U)
1513 /*! DSHFI - Disable Secure Hash Function Instructions
1514  *  0b0..Secure Hash Functions are enabled
1515  *  0b1..Secure Hash Functions are disabled
1516  */
1517 #define CAU3_CR_DSHFI(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DSHFI_SHIFT)) & CAU3_CR_DSHFI_MASK)
1518 
1519 #define CAU3_CR_DDESI_MASK                       (0x20000000U)
1520 #define CAU3_CR_DDESI_SHIFT                      (29U)
1521 /*! DDESI - Disable DES Instructions
1522  *  0b0..DES instructions are enabled
1523  *  0b1..DES instructions are disabled
1524  */
1525 #define CAU3_CR_DDESI(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DDESI_SHIFT)) & CAU3_CR_DDESI_MASK)
1526 
1527 #define CAU3_CR_DAESI_MASK                       (0x40000000U)
1528 #define CAU3_CR_DAESI_SHIFT                      (30U)
1529 /*! DAESI - Disable AES Instructions
1530  *  0b0..AES instructions are enabled
1531  *  0b1..AES instructions are disabled
1532  */
1533 #define CAU3_CR_DAESI(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DAESI_SHIFT)) & CAU3_CR_DAESI_MASK)
1534 
1535 #define CAU3_CR_MDIS_MASK                        (0x80000000U)
1536 #define CAU3_CR_MDIS_SHIFT                       (31U)
1537 /*! MDIS - Module Disable
1538  *  0b0..CAU3 exits from low power mode
1539  *  0b1..CAU3 enters low power mode
1540  */
1541 #define CAU3_CR_MDIS(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CR_MDIS_SHIFT)) & CAU3_CR_MDIS_MASK)
1542 /*! @} */
1543 
1544 /*! @name SR - Status Register */
1545 /*! @{ */
1546 
1547 #define CAU3_SR_TCSEIRQ_MASK                     (0x1U)
1548 #define CAU3_SR_TCSEIRQ_SHIFT                    (0U)
1549 /*! TCSEIRQ - Task completion with software error interrupt request
1550  *  0b0..Task not finished or finished with no software error
1551  *  0b1..Task execution finished with software error
1552  */
1553 #define CAU3_SR_TCSEIRQ(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCSEIRQ_SHIFT)) & CAU3_SR_TCSEIRQ_MASK)
1554 
1555 #define CAU3_SR_ILLIRQ_MASK                      (0x2U)
1556 #define CAU3_SR_ILLIRQ_SHIFT                     (1U)
1557 /*! ILLIRQ - Illegal instruction interrupt request
1558  *  0b0..no error
1559  *  0b1..illegal instruction detected
1560  */
1561 #define CAU3_SR_ILLIRQ(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_SR_ILLIRQ_SHIFT)) & CAU3_SR_ILLIRQ_MASK)
1562 
1563 #define CAU3_SR_ASREIRQ_MASK                     (0x8U)
1564 #define CAU3_SR_ASREIRQ_SHIFT                    (3U)
1565 /*! ASREIRQ - AHB slave response error interrupt Request
1566  *  0b0..no error
1567  *  0b1..AHB slave response error detected
1568  */
1569 #define CAU3_SR_ASREIRQ(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_SR_ASREIRQ_SHIFT)) & CAU3_SR_ASREIRQ_MASK)
1570 
1571 #define CAU3_SR_IIADIRQ_MASK                     (0x10U)
1572 #define CAU3_SR_IIADIRQ_SHIFT                    (4U)
1573 /*! IIADIRQ - IMEM Illegal address interrupt request
1574  *  0b0..no error
1575  *  0b1..illegal IMEM address detected
1576  */
1577 #define CAU3_SR_IIADIRQ(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_SR_IIADIRQ_SHIFT)) & CAU3_SR_IIADIRQ_MASK)
1578 
1579 #define CAU3_SR_DIADIRQ_MASK                     (0x20U)
1580 #define CAU3_SR_DIADIRQ_SHIFT                    (5U)
1581 /*! DIADIRQ - DMEM illegal access interrupt request
1582  *  0b0..no illegal address
1583  *  0b1..illegal address
1584  */
1585 #define CAU3_SR_DIADIRQ(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_SR_DIADIRQ_SHIFT)) & CAU3_SR_DIADIRQ_MASK)
1586 
1587 #define CAU3_SR_SVIRQ_MASK                       (0x40U)
1588 #define CAU3_SR_SVIRQ_SHIFT                      (6U)
1589 /*! SVIRQ - Security violation interrupt request
1590  *  0b0..No security violation
1591  *  0b1..Security violation
1592  */
1593 #define CAU3_SR_SVIRQ(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SR_SVIRQ_SHIFT)) & CAU3_SR_SVIRQ_MASK)
1594 
1595 #define CAU3_SR_TCIRQ_MASK                       (0x80U)
1596 #define CAU3_SR_TCIRQ_SHIFT                      (7U)
1597 /*! TCIRQ - Task completion with no error interrupt request
1598  *  0b0..Task not finished or finished with error
1599  *  0b1..Task execution finished with no error
1600  */
1601 #define CAU3_SR_TCIRQ(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCIRQ_SHIFT)) & CAU3_SR_TCIRQ_MASK)
1602 
1603 #define CAU3_SR_TKCS_MASK                        (0xF00U)
1604 #define CAU3_SR_TKCS_SHIFT                       (8U)
1605 /*! TKCS - Task completion status
1606  *  0b0000..Initialization RUN
1607  *  0b0001..Running
1608  *  0b0010..Debug Halted
1609  *  0b1001..Stop - Error Free
1610  *  0b1010..Stop - Error
1611  *  0b1110..Stop - Security Violation, assert security violation output signal and set SVIRQ
1612  *  0b1111..Stop - Security Violation and set SVIRQ
1613  */
1614 #define CAU3_SR_TKCS(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TKCS_SHIFT)) & CAU3_SR_TKCS_MASK)
1615 
1616 #define CAU3_SR_SVF_MASK                         (0x10000U)
1617 #define CAU3_SR_SVF_SHIFT                        (16U)
1618 /*! SVF - Security violation flag
1619  *  0b0..SoC security violation is not asserted
1620  *  0b1..SoC security violation was asserted
1621  */
1622 #define CAU3_SR_SVF(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_SR_SVF_SHIFT)) & CAU3_SR_SVF_MASK)
1623 
1624 #define CAU3_SR_DBG_MASK                         (0x20000U)
1625 #define CAU3_SR_DBG_SHIFT                        (17U)
1626 /*! DBG - Debug mode
1627  *  0b0..CAU3 is not in debug mode
1628  *  0b1..CAU3 is in debug mode
1629  */
1630 #define CAU3_SR_DBG(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_SR_DBG_SHIFT)) & CAU3_SR_DBG_MASK)
1631 
1632 #define CAU3_SR_TCCFG_MASK                       (0x7000000U)
1633 #define CAU3_SR_TCCFG_SHIFT                      (24U)
1634 /*! TCCFG - Task completion configuration
1635  *  0b100..Issue a DMA request
1636  *  0b010..Assert the Event Completion Signal
1637  *  0b001..Assert an interrupt request
1638  *  0b000..No action
1639  */
1640 #define CAU3_SR_TCCFG(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCCFG_SHIFT)) & CAU3_SR_TCCFG_MASK)
1641 
1642 #define CAU3_SR_MDISF_MASK                       (0x80000000U)
1643 #define CAU3_SR_MDISF_SHIFT                      (31U)
1644 /*! MDISF - Module disable flag
1645  *  0b0..CCore is not in low power mode
1646  *  0b1..CCore is in low power mode
1647  */
1648 #define CAU3_SR_MDISF(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SR_MDISF_SHIFT)) & CAU3_SR_MDISF_MASK)
1649 /*! @} */
1650 
1651 /*! @name DBGCSR - Debug Control/Status Register */
1652 /*! @{ */
1653 
1654 #define CAU3_DBGCSR_DDBG_MASK                    (0x1U)
1655 #define CAU3_DBGCSR_DDBG_SHIFT                   (0U)
1656 /*! DDBG - Debug Disable
1657  *  0b0..debug is enabled
1658  *  0b1..debug is disabled
1659  */
1660 #define CAU3_DBGCSR_DDBG(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DDBG_SHIFT)) & CAU3_DBGCSR_DDBG_MASK)
1661 
1662 #define CAU3_DBGCSR_DDBGMC_MASK                  (0x2U)
1663 #define CAU3_DBGCSR_DDBGMC_SHIFT                 (1U)
1664 /*! DDBGMC - Disable Debug Memory Commands
1665  *  0b0..IPS access to IMEM and DMEM are enabled
1666  *  0b1..IPS access to IMEM and DMEM are disabled
1667  */
1668 #define CAU3_DBGCSR_DDBGMC(x)                    (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DDBGMC_SHIFT)) & CAU3_DBGCSR_DDBGMC_MASK)
1669 
1670 #define CAU3_DBGCSR_PBREN_MASK                   (0x10U)
1671 #define CAU3_DBGCSR_PBREN_SHIFT                  (4U)
1672 /*! PBREN - PC Breakpoint Register Enable
1673  *  0b0..PC breakpoint register (DBGPBR) is disabled
1674  *  0b1..PC breakpoint register (DBGPBR) is enabled
1675  */
1676 #define CAU3_DBGCSR_PBREN(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_PBREN_SHIFT)) & CAU3_DBGCSR_PBREN_MASK)
1677 
1678 #define CAU3_DBGCSR_SIM_MASK                     (0x20U)
1679 #define CAU3_DBGCSR_SIM_SHIFT                    (5U)
1680 /*! SIM - Single Instruction Mode
1681  *  0b0..Single instruction mode is disabled
1682  *  0b1..Single instruction mode is enabled
1683  */
1684 #define CAU3_DBGCSR_SIM(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_SIM_SHIFT)) & CAU3_DBGCSR_SIM_MASK)
1685 
1686 #define CAU3_DBGCSR_FRCH_MASK                    (0x100U)
1687 #define CAU3_DBGCSR_FRCH_SHIFT                   (8U)
1688 /*! FRCH - Force Debug Halt
1689  *  0b0..Halt state not forced
1690  *  0b1..Force halt state
1691  */
1692 #define CAU3_DBGCSR_FRCH(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_FRCH_SHIFT)) & CAU3_DBGCSR_FRCH_MASK)
1693 
1694 #define CAU3_DBGCSR_DBGGO_MASK                   (0x1000U)
1695 #define CAU3_DBGCSR_DBGGO_SHIFT                  (12U)
1696 /*! DBGGO - Debug Go
1697  *  0b0..No action
1698  *  0b1..Resume program execution
1699  */
1700 #define CAU3_DBGCSR_DBGGO(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DBGGO_SHIFT)) & CAU3_DBGCSR_DBGGO_MASK)
1701 
1702 #define CAU3_DBGCSR_PCBHF_MASK                   (0x10000U)
1703 #define CAU3_DBGCSR_PCBHF_SHIFT                  (16U)
1704 /*! PCBHF - CryptoCore is Halted due to Hardware Breakpoint
1705  *  0b0..CryptoCore is not halted due to a hardware breakpoint
1706  *  0b1..CryptoCore is halted due to a hardware breakpoint
1707  */
1708 #define CAU3_DBGCSR_PCBHF(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_PCBHF_SHIFT)) & CAU3_DBGCSR_PCBHF_MASK)
1709 
1710 #define CAU3_DBGCSR_SIMHF_MASK                   (0x20000U)
1711 #define CAU3_DBGCSR_SIMHF_SHIFT                  (17U)
1712 /*! SIMHF - CryptoCore is Halted due to Single Instruction Step
1713  *  0b0..CryptoCore is not in a single step halt
1714  *  0b1..CryptoCore is in a single step halt
1715  */
1716 #define CAU3_DBGCSR_SIMHF(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_SIMHF_SHIFT)) & CAU3_DBGCSR_SIMHF_MASK)
1717 
1718 #define CAU3_DBGCSR_HLTIF_MASK                   (0x40000U)
1719 #define CAU3_DBGCSR_HLTIF_SHIFT                  (18U)
1720 /*! HLTIF - CryptoCore is Halted due to HALT Instruction
1721  *  0b0..CryptoCore is not in software breakpoint
1722  *  0b1..CryptoCore is in software breakpoint
1723  */
1724 #define CAU3_DBGCSR_HLTIF(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_HLTIF_SHIFT)) & CAU3_DBGCSR_HLTIF_MASK)
1725 
1726 #define CAU3_DBGCSR_CSTPF_MASK                   (0x40000000U)
1727 #define CAU3_DBGCSR_CSTPF_SHIFT                  (30U)
1728 /*! CSTPF - CryptoCore is Stopped Status Flag
1729  *  0b0..CryptoCore is not stopped
1730  *  0b1..CryptoCore is stopped
1731  */
1732 #define CAU3_DBGCSR_CSTPF(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_CSTPF_SHIFT)) & CAU3_DBGCSR_CSTPF_MASK)
1733 
1734 #define CAU3_DBGCSR_CHLTF_MASK                   (0x80000000U)
1735 #define CAU3_DBGCSR_CHLTF_SHIFT                  (31U)
1736 /*! CHLTF - CryptoCore is Halted Status Flag
1737  *  0b0..CryptoCore is not halted
1738  *  0b1..CryptoCore is halted
1739  */
1740 #define CAU3_DBGCSR_CHLTF(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_CHLTF_SHIFT)) & CAU3_DBGCSR_CHLTF_MASK)
1741 /*! @} */
1742 
1743 /*! @name DBGPBR - Debug PC Breakpoint Register */
1744 /*! @{ */
1745 
1746 #define CAU3_DBGPBR_PCBKPT_MASK                  (0xFFFFCU)
1747 #define CAU3_DBGPBR_PCBKPT_SHIFT                 (2U)
1748 /*! PCBKPT - PC Breakpoint */
1749 #define CAU3_DBGPBR_PCBKPT(x)                    (((uint32_t)(((uint32_t)(x)) << CAU3_DBGPBR_PCBKPT_SHIFT)) & CAU3_DBGPBR_PCBKPT_MASK)
1750 /*! @} */
1751 
1752 /*! @name DBGMCMD - Debug Memory Command Register */
1753 /*! @{ */
1754 
1755 #define CAU3_DBGMCMD_DM_MASK                     (0x1000000U)
1756 #define CAU3_DBGMCMD_DM_SHIFT                    (24U)
1757 /*! DM - Instruction/Data Memory Selection
1758  *  0b0..IMEM is selected
1759  *  0b1..DMEM is selected
1760  */
1761 #define CAU3_DBGMCMD_DM(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_DM_SHIFT)) & CAU3_DBGMCMD_DM_MASK)
1762 
1763 #define CAU3_DBGMCMD_IA_MASK                     (0x4000000U)
1764 #define CAU3_DBGMCMD_IA_SHIFT                    (26U)
1765 /*! IA - Increment Address
1766  *  0b0..Address is not incremented
1767  *  0b1..Address is incremented after the access
1768  */
1769 #define CAU3_DBGMCMD_IA(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_IA_SHIFT)) & CAU3_DBGMCMD_IA_MASK)
1770 
1771 #define CAU3_DBGMCMD_Rb_1_MASK                   (0x8000000U)
1772 #define CAU3_DBGMCMD_Rb_1_SHIFT                  (27U)
1773 #define CAU3_DBGMCMD_Rb_1(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_Rb_1_SHIFT)) & CAU3_DBGMCMD_Rb_1_MASK)
1774 
1775 #define CAU3_DBGMCMD_BV_MASK                     (0x10000000U)
1776 #define CAU3_DBGMCMD_BV_SHIFT                    (28U)
1777 /*! BV - Byte Reversal Control
1778  *  0b0..DMEM bytes are not reversed
1779  *  0b1..DMEM bytes are reversed
1780  */
1781 #define CAU3_DBGMCMD_BV(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_BV_SHIFT)) & CAU3_DBGMCMD_BV_MASK)
1782 
1783 #define CAU3_DBGMCMD_R_0_MASK                    (0x40000000U)
1784 #define CAU3_DBGMCMD_R_0_SHIFT                   (30U)
1785 #define CAU3_DBGMCMD_R_0(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_R_0_SHIFT)) & CAU3_DBGMCMD_R_0_MASK)
1786 
1787 #define CAU3_DBGMCMD_R_1_MASK                    (0x80000000U)
1788 #define CAU3_DBGMCMD_R_1_SHIFT                   (31U)
1789 #define CAU3_DBGMCMD_R_1(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_R_1_SHIFT)) & CAU3_DBGMCMD_R_1_MASK)
1790 /*! @} */
1791 
1792 /*! @name DBGMADR - Debug Memory Address Register */
1793 /*! @{ */
1794 
1795 #define CAU3_DBGMADR_DMADDR_MASK                 (0xFFFFFFFCU)
1796 #define CAU3_DBGMADR_DMADDR_SHIFT                (2U)
1797 /*! DMADDR - Debug Memory Address */
1798 #define CAU3_DBGMADR_DMADDR(x)                   (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMADR_DMADDR_SHIFT)) & CAU3_DBGMADR_DMADDR_MASK)
1799 /*! @} */
1800 
1801 /*! @name DBGMDR - Debug Memory Data Register */
1802 /*! @{ */
1803 
1804 #define CAU3_DBGMDR_DMDATA_MASK                  (0xFFFFFFFFU)
1805 #define CAU3_DBGMDR_DMDATA_SHIFT                 (0U)
1806 /*! DMDATA - Debug Memory Data */
1807 #define CAU3_DBGMDR_DMDATA(x)                    (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMDR_DMDATA_SHIFT)) & CAU3_DBGMDR_DMDATA_MASK)
1808 /*! @} */
1809 
1810 /*! @name SEMA4 - Semaphore Register */
1811 /*! @{ */
1812 
1813 #define CAU3_SEMA4_DID_MASK                      (0xFU)
1814 #define CAU3_SEMA4_DID_SHIFT                     (0U)
1815 /*! DID - Domain ID of Locked Semaphore Owner */
1816 #define CAU3_SEMA4_DID(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_DID_SHIFT)) & CAU3_SEMA4_DID_MASK)
1817 
1818 #define CAU3_SEMA4_PR_MASK                       (0x40U)
1819 #define CAU3_SEMA4_PR_SHIFT                      (6U)
1820 /*! PR - Privilege Attribute of Locked Semaphore Owner
1821  *  0b0..If semaphore is locked, then owner is operating in user mode
1822  *  0b1..If semaphore is locked, then owner is operating in privileged mode
1823  */
1824 #define CAU3_SEMA4_PR(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_PR_SHIFT)) & CAU3_SEMA4_PR_MASK)
1825 
1826 #define CAU3_SEMA4_NS_MASK                       (0x80U)
1827 #define CAU3_SEMA4_NS_SHIFT                      (7U)
1828 /*! NS - Non Secure Attribute of the Locked Semaphore Owner
1829  *  0b0..If semaphore is locked, owner is operating in secure mode
1830  *  0b1..If semaphore is locked, owner is operating in nonsecure mode
1831  */
1832 #define CAU3_SEMA4_NS(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_NS_SHIFT)) & CAU3_SEMA4_NS_MASK)
1833 
1834 #define CAU3_SEMA4_MSTRN_MASK                    (0x3F00U)
1835 #define CAU3_SEMA4_MSTRN_SHIFT                   (8U)
1836 /*! MSTRN - Master Number of Locked Semaphore Owner */
1837 #define CAU3_SEMA4_MSTRN(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_MSTRN_SHIFT)) & CAU3_SEMA4_MSTRN_MASK)
1838 
1839 #define CAU3_SEMA4_LK_MASK                       (0x80000000U)
1840 #define CAU3_SEMA4_LK_SHIFT                      (31U)
1841 /*! LK - Semaphore Lock and Release Control
1842  *  0b0..Semaphore release
1843  *  0b1..Semaphore lock
1844  */
1845 #define CAU3_SEMA4_LK(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_LK_SHIFT)) & CAU3_SEMA4_LK_MASK)
1846 /*! @} */
1847 
1848 /*! @name SMOWNR - Semaphore Ownership Register */
1849 /*! @{ */
1850 
1851 #define CAU3_SMOWNR_LOCK_MASK                    (0x1U)
1852 #define CAU3_SMOWNR_LOCK_SHIFT                   (0U)
1853 /*! LOCK - Semaphore Locked
1854  *  0b0..Semaphore not locked
1855  *  0b1..Semaphore locked
1856  */
1857 #define CAU3_SMOWNR_LOCK(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_SMOWNR_LOCK_SHIFT)) & CAU3_SMOWNR_LOCK_MASK)
1858 
1859 #define CAU3_SMOWNR_NOWNER_MASK                  (0x80000000U)
1860 #define CAU3_SMOWNR_NOWNER_SHIFT                 (31U)
1861 /*! NOWNER - Semaphore Ownership
1862  *  0b0..The host making the current read access is the semaphore owner
1863  *  0b1..The host making the current read access is NOT the semaphore owner
1864  */
1865 #define CAU3_SMOWNR_NOWNER(x)                    (((uint32_t)(((uint32_t)(x)) << CAU3_SMOWNR_NOWNER_SHIFT)) & CAU3_SMOWNR_NOWNER_MASK)
1866 /*! @} */
1867 
1868 /*! @name ARR - Address Remap Register */
1869 /*! @{ */
1870 
1871 #define CAU3_ARR_ARRL_MASK                       (0xFFFFFFFFU)
1872 #define CAU3_ARR_ARRL_SHIFT                      (0U)
1873 /*! ARRL - Address Remap Register List */
1874 #define CAU3_ARR_ARRL(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_ARR_ARRL_SHIFT)) & CAU3_ARR_ARRL_MASK)
1875 /*! @} */
1876 
1877 /*! @name CC_R - CryptoCore General Purpose Registers */
1878 /*! @{ */
1879 
1880 #define CAU3_CC_R_R_MASK                         (0xFFFFFFFFU)
1881 #define CAU3_CC_R_R_SHIFT                        (0U)
1882 /*! R - CryptoCore general purpose register R */
1883 #define CAU3_CC_R_R(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R_R_SHIFT)) & CAU3_CC_R_R_MASK)
1884 /*! @} */
1885 
1886 /* The count of CAU3_CC_R */
1887 #define CAU3_CC_R_COUNT                          (30U)
1888 
1889 /*! @name CC_R30 - General Purpose R30 */
1890 /*! @{ */
1891 
1892 #define CAU3_CC_R30_SP_MASK                      (0xFFFFFFFFU)
1893 #define CAU3_CC_R30_SP_SHIFT                     (0U)
1894 /*! SP - Stack Pointer */
1895 #define CAU3_CC_R30_SP(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R30_SP_SHIFT)) & CAU3_CC_R30_SP_MASK)
1896 /*! @} */
1897 
1898 /*! @name CC_R31 - General Purpose R31 */
1899 /*! @{ */
1900 
1901 #define CAU3_CC_R31_LR_MASK                      (0xFFFFFFFFU)
1902 #define CAU3_CC_R31_LR_SHIFT                     (0U)
1903 /*! LR - Link */
1904 #define CAU3_CC_R31_LR(x)                        (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R31_LR_SHIFT)) & CAU3_CC_R31_LR_MASK)
1905 /*! @} */
1906 
1907 /*! @name CC_PC - Program Counter */
1908 /*! @{ */
1909 
1910 #define CAU3_CC_PC_PC_MASK                       (0xFFFFFU)
1911 #define CAU3_CC_PC_PC_SHIFT                      (0U)
1912 /*! PC - Program Counter */
1913 #define CAU3_CC_PC_PC(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_CC_PC_PC_SHIFT)) & CAU3_CC_PC_PC_MASK)
1914 /*! @} */
1915 
1916 /*! @name CC_CMD - Start Command Register */
1917 /*! @{ */
1918 
1919 #define CAU3_CC_CMD_CMD_MASK                     (0x70000U)
1920 #define CAU3_CC_CMD_CMD_SHIFT                    (16U)
1921 /*! CMD - Command
1922  *  0b000..Use CR[DTCCFG] for task completion configuration
1923  *  0b100..Issue a DMA request
1924  *  0b010..Assert Event Completion Signal
1925  *  0b001..Issue an interrupt request
1926  */
1927 #define CAU3_CC_CMD_CMD(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CMD_CMD_SHIFT)) & CAU3_CC_CMD_CMD_MASK)
1928 /*! @} */
1929 
1930 /*! @name CC_CF - Condition Flag */
1931 /*! @{ */
1932 
1933 #define CAU3_CC_CF_C_MASK                        (0x1U)
1934 #define CAU3_CC_CF_C_SHIFT                       (0U)
1935 /*! C - Carry flag */
1936 #define CAU3_CC_CF_C(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_C_SHIFT)) & CAU3_CC_CF_C_MASK)
1937 
1938 #define CAU3_CC_CF_V_MASK                        (0x2U)
1939 #define CAU3_CC_CF_V_SHIFT                       (1U)
1940 /*! V - Overflow flag */
1941 #define CAU3_CC_CF_V(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_V_SHIFT)) & CAU3_CC_CF_V_MASK)
1942 
1943 #define CAU3_CC_CF_Z_MASK                        (0x4U)
1944 #define CAU3_CC_CF_Z_SHIFT                       (2U)
1945 /*! Z - Zero flag */
1946 #define CAU3_CC_CF_Z(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_Z_SHIFT)) & CAU3_CC_CF_Z_MASK)
1947 
1948 #define CAU3_CC_CF_N_MASK                        (0x8U)
1949 #define CAU3_CC_CF_N_SHIFT                       (3U)
1950 /*! N - Negative flag */
1951 #define CAU3_CC_CF_N(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_N_SHIFT)) & CAU3_CC_CF_N_MASK)
1952 /*! @} */
1953 
1954 /*! @name MDPK - Mode Register (PublicKey) */
1955 /*! @{ */
1956 
1957 #define CAU3_MDPK_PKHA_MODE_LS_MASK              (0xFFFU)
1958 #define CAU3_MDPK_PKHA_MODE_LS_SHIFT             (0U)
1959 /*! PKHA_MODE_LS - PKHA_MODE least significant 12 bits */
1960 #define CAU3_MDPK_PKHA_MODE_LS(x)                (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_PKHA_MODE_LS_SHIFT)) & CAU3_MDPK_PKHA_MODE_LS_MASK)
1961 
1962 #define CAU3_MDPK_PKHA_MODE_MS_MASK              (0xF0000U)
1963 #define CAU3_MDPK_PKHA_MODE_MS_SHIFT             (16U)
1964 /*! PKHA_MODE_MS - PKHA_MODE most-significant 4 bits */
1965 #define CAU3_MDPK_PKHA_MODE_MS(x)                (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_PKHA_MODE_MS_SHIFT)) & CAU3_MDPK_PKHA_MODE_MS_MASK)
1966 
1967 #define CAU3_MDPK_ALG_MASK                       (0xF00000U)
1968 #define CAU3_MDPK_ALG_SHIFT                      (20U)
1969 /*! ALG - Algorithm
1970  *  0b1000..PKHA
1971  */
1972 #define CAU3_MDPK_ALG(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_ALG_SHIFT)) & CAU3_MDPK_ALG_MASK)
1973 /*! @} */
1974 
1975 /*! @name COM - Command Register */
1976 /*! @{ */
1977 
1978 #define CAU3_COM_ALL_MASK                        (0x1U)
1979 #define CAU3_COM_ALL_SHIFT                       (0U)
1980 /*! ALL - Reset All Internal Logic
1981  *  0b0..Do Not Reset
1982  *  0b1..Reset PKHA engine and registers
1983  */
1984 #define CAU3_COM_ALL(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_COM_ALL_SHIFT)) & CAU3_COM_ALL_MASK)
1985 
1986 #define CAU3_COM_PK_MASK                         (0x40U)
1987 #define CAU3_COM_PK_SHIFT                        (6U)
1988 /*! PK - Reset PKHA
1989  *  0b0..Do Not Reset
1990  *  0b1..Reset Public Key Hardware Accelerator
1991  */
1992 #define CAU3_COM_PK(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_COM_PK_SHIFT)) & CAU3_COM_PK_MASK)
1993 /*! @} */
1994 
1995 /*! @name CTL - Control Register */
1996 /*! @{ */
1997 
1998 #define CAU3_CTL_IM_MASK                         (0x1U)
1999 #define CAU3_CTL_IM_SHIFT                        (0U)
2000 /*! IM - Interrupt Mask
2001  *  0b0..Interrupt not masked.
2002  *  0b1..Interrupt masked
2003  */
2004 #define CAU3_CTL_IM(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_CTL_IM_SHIFT)) & CAU3_CTL_IM_MASK)
2005 
2006 #define CAU3_CTL_PDE_MASK                        (0x10U)
2007 #define CAU3_CTL_PDE_SHIFT                       (4U)
2008 /*! PDE - PKHA Register DMA Enable
2009  *  0b0..DMA Request and Done signals disabled for the PKHA Registers.
2010  *  0b1..DMA Request and Done signals enabled for the PKHA Registers.
2011  */
2012 #define CAU3_CTL_PDE(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CTL_PDE_SHIFT)) & CAU3_CTL_PDE_MASK)
2013 /*! @} */
2014 
2015 /*! @name CW - Clear Written Register */
2016 /*! @{ */
2017 
2018 #define CAU3_CW_CM_MASK                          (0x1U)
2019 #define CAU3_CW_CM_SHIFT                         (0U)
2020 /*! CM - Clear the Mode Register */
2021 #define CAU3_CW_CM(x)                            (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CM_SHIFT)) & CAU3_CW_CM_MASK)
2022 
2023 #define CAU3_CW_CPKA_MASK                        (0x1000U)
2024 #define CAU3_CW_CPKA_SHIFT                       (12U)
2025 /*! CPKA - Clear the PKHA A Size Register */
2026 #define CAU3_CW_CPKA(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKA_SHIFT)) & CAU3_CW_CPKA_MASK)
2027 
2028 #define CAU3_CW_CPKB_MASK                        (0x2000U)
2029 #define CAU3_CW_CPKB_SHIFT                       (13U)
2030 /*! CPKB - Clear the PKHA B Size Register */
2031 #define CAU3_CW_CPKB(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKB_SHIFT)) & CAU3_CW_CPKB_MASK)
2032 
2033 #define CAU3_CW_CPKN_MASK                        (0x4000U)
2034 #define CAU3_CW_CPKN_SHIFT                       (14U)
2035 /*! CPKN - Clear the PKHA N Size Register */
2036 #define CAU3_CW_CPKN(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKN_SHIFT)) & CAU3_CW_CPKN_MASK)
2037 
2038 #define CAU3_CW_CPKE_MASK                        (0x8000U)
2039 #define CAU3_CW_CPKE_SHIFT                       (15U)
2040 /*! CPKE - Clear the PKHA E Size Register */
2041 #define CAU3_CW_CPKE(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKE_SHIFT)) & CAU3_CW_CPKE_MASK)
2042 /*! @} */
2043 
2044 /*! @name STA - Status Register */
2045 /*! @{ */
2046 
2047 #define CAU3_STA_PB_MASK                         (0x40U)
2048 #define CAU3_STA_PB_SHIFT                        (6U)
2049 /*! PB - PKHA Busy
2050  *  0b0..PKHA Idle
2051  *  0b1..PKHA Busy.
2052  */
2053 #define CAU3_STA_PB(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PB_SHIFT)) & CAU3_STA_PB_MASK)
2054 
2055 #define CAU3_STA_DI_MASK                         (0x10000U)
2056 #define CAU3_STA_DI_SHIFT                        (16U)
2057 /*! DI - Done Interrupt */
2058 #define CAU3_STA_DI(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_STA_DI_SHIFT)) & CAU3_STA_DI_MASK)
2059 
2060 #define CAU3_STA_EI_MASK                         (0x100000U)
2061 #define CAU3_STA_EI_SHIFT                        (20U)
2062 /*! EI - Error Interrupt
2063  *  0b0..Not Error.
2064  *  0b1..Error Interrupt.
2065  */
2066 #define CAU3_STA_EI(x)                           (((uint32_t)(((uint32_t)(x)) << CAU3_STA_EI_SHIFT)) & CAU3_STA_EI_MASK)
2067 
2068 #define CAU3_STA_PKP_MASK                        (0x10000000U)
2069 #define CAU3_STA_PKP_SHIFT                       (28U)
2070 /*! PKP - Public Key is Prime */
2071 #define CAU3_STA_PKP(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKP_SHIFT)) & CAU3_STA_PKP_MASK)
2072 
2073 #define CAU3_STA_PKO_MASK                        (0x20000000U)
2074 #define CAU3_STA_PKO_SHIFT                       (29U)
2075 /*! PKO - Public Key Operation is One */
2076 #define CAU3_STA_PKO(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKO_SHIFT)) & CAU3_STA_PKO_MASK)
2077 
2078 #define CAU3_STA_PKZ_MASK                        (0x40000000U)
2079 #define CAU3_STA_PKZ_SHIFT                       (30U)
2080 /*! PKZ - Public Key Operation is Zero */
2081 #define CAU3_STA_PKZ(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKZ_SHIFT)) & CAU3_STA_PKZ_MASK)
2082 /*! @} */
2083 
2084 /*! @name ESTA - Error Status Register */
2085 /*! @{ */
2086 
2087 #define CAU3_ESTA_ERRID1_MASK                    (0xFU)
2088 #define CAU3_ESTA_ERRID1_SHIFT                   (0U)
2089 /*! ERRID1 - Error ID 1
2090  *  0b0001..Mode Error
2091  *  0b0010..PKHA N Register Size Error
2092  *  0b0011..PKHA E Register Size Error
2093  *  0b0100..PKHA A Register Size Error
2094  *  0b0101..PKHA B Register Size Error
2095  *  0b0110..PKHA C input (as contained in the PKHA B0 quadrant) is Zero
2096  *  0b0111..PKHA Divide by Zero Error
2097  *  0b1000..PKHA Modulus Even Error
2098  *  0b1111..Invalid Crypto Engine Selected
2099  */
2100 #define CAU3_ESTA_ERRID1(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_ESTA_ERRID1_SHIFT)) & CAU3_ESTA_ERRID1_MASK)
2101 
2102 #define CAU3_ESTA_CL1_MASK                       (0xF00U)
2103 #define CAU3_ESTA_CL1_SHIFT                      (8U)
2104 /*! CL1 - algorithms
2105  *  0b0000..General Error
2106  *  0b1000..Public Key
2107  */
2108 #define CAU3_ESTA_CL1(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_ESTA_CL1_SHIFT)) & CAU3_ESTA_CL1_MASK)
2109 /*! @} */
2110 
2111 /*! @name PKASZ - PKHA A Size Register */
2112 /*! @{ */
2113 
2114 #define CAU3_PKASZ_PKASZ_MASK                    (0x1FFU)
2115 #define CAU3_PKASZ_PKASZ_SHIFT                   (0U)
2116 /*! PKASZ - PKHA A Size */
2117 #define CAU3_PKASZ_PKASZ(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_PKASZ_PKASZ_SHIFT)) & CAU3_PKASZ_PKASZ_MASK)
2118 /*! @} */
2119 
2120 /*! @name PKBSZ - PKHA B Size Register */
2121 /*! @{ */
2122 
2123 #define CAU3_PKBSZ_PKBSZ_MASK                    (0x1FFU)
2124 #define CAU3_PKBSZ_PKBSZ_SHIFT                   (0U)
2125 /*! PKBSZ - PKHA B Size */
2126 #define CAU3_PKBSZ_PKBSZ(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_PKBSZ_PKBSZ_SHIFT)) & CAU3_PKBSZ_PKBSZ_MASK)
2127 /*! @} */
2128 
2129 /*! @name PKNSZ - PKHA N Size Register */
2130 /*! @{ */
2131 
2132 #define CAU3_PKNSZ_PKNSZ_MASK                    (0x1FFU)
2133 #define CAU3_PKNSZ_PKNSZ_SHIFT                   (0U)
2134 /*! PKNSZ - PKHA N Size */
2135 #define CAU3_PKNSZ_PKNSZ(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_PKNSZ_PKNSZ_SHIFT)) & CAU3_PKNSZ_PKNSZ_MASK)
2136 /*! @} */
2137 
2138 /*! @name PKESZ - PKHA E Size Register */
2139 /*! @{ */
2140 
2141 #define CAU3_PKESZ_PKESZ_MASK                    (0x1FFU)
2142 #define CAU3_PKESZ_PKESZ_SHIFT                   (0U)
2143 /*! PKESZ - PKHA E Size */
2144 #define CAU3_PKESZ_PKESZ(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_PKESZ_PKESZ_SHIFT)) & CAU3_PKESZ_PKESZ_MASK)
2145 /*! @} */
2146 
2147 /*! @name PKHA_VID1 - PKHA Revision ID 1 */
2148 /*! @{ */
2149 
2150 #define CAU3_PKHA_VID1_MIN_REV_MASK              (0xFFU)
2151 #define CAU3_PKHA_VID1_MIN_REV_SHIFT             (0U)
2152 /*! MIN_REV - Minor Revision Number */
2153 #define CAU3_PKHA_VID1_MIN_REV(x)                (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_MIN_REV_SHIFT)) & CAU3_PKHA_VID1_MIN_REV_MASK)
2154 
2155 #define CAU3_PKHA_VID1_MAJ_REV_MASK              (0xFF00U)
2156 #define CAU3_PKHA_VID1_MAJ_REV_SHIFT             (8U)
2157 /*! MAJ_REV - Major Revision Number */
2158 #define CAU3_PKHA_VID1_MAJ_REV(x)                (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_MAJ_REV_SHIFT)) & CAU3_PKHA_VID1_MAJ_REV_MASK)
2159 
2160 #define CAU3_PKHA_VID1_IP_ID_MASK                (0xFFFF0000U)
2161 #define CAU3_PKHA_VID1_IP_ID_SHIFT               (16U)
2162 /*! IP_ID - Hardware Revision ID */
2163 #define CAU3_PKHA_VID1_IP_ID(x)                  (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_IP_ID_SHIFT)) & CAU3_PKHA_VID1_IP_ID_MASK)
2164 /*! @} */
2165 
2166 /*! @name PKHA_VID2 - PKHA Revision ID 2 */
2167 /*! @{ */
2168 
2169 #define CAU3_PKHA_VID2_ECO_REV_MASK              (0xFFU)
2170 #define CAU3_PKHA_VID2_ECO_REV_SHIFT             (0U)
2171 /*! ECO_REV - ECO Revision Number */
2172 #define CAU3_PKHA_VID2_ECO_REV(x)                (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID2_ECO_REV_SHIFT)) & CAU3_PKHA_VID2_ECO_REV_MASK)
2173 
2174 #define CAU3_PKHA_VID2_ARCH_ERA_MASK             (0xFF00U)
2175 #define CAU3_PKHA_VID2_ARCH_ERA_SHIFT            (8U)
2176 /*! ARCH_ERA - Architecture ERA */
2177 #define CAU3_PKHA_VID2_ARCH_ERA(x)               (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID2_ARCH_ERA_SHIFT)) & CAU3_PKHA_VID2_ARCH_ERA_MASK)
2178 /*! @} */
2179 
2180 /*! @name CHA_VID - CHA Revision ID */
2181 /*! @{ */
2182 
2183 #define CAU3_CHA_VID_PKHAREV_MASK                (0xF0000U)
2184 #define CAU3_CHA_VID_PKHAREV_SHIFT               (16U)
2185 /*! PKHAREV - PK Revision NUmber */
2186 #define CAU3_CHA_VID_PKHAREV(x)                  (((uint32_t)(((uint32_t)(x)) << CAU3_CHA_VID_PKHAREV_SHIFT)) & CAU3_CHA_VID_PKHAREV_MASK)
2187 
2188 #define CAU3_CHA_VID_PKHAVID_MASK                (0xF00000U)
2189 #define CAU3_CHA_VID_PKHAVID_SHIFT               (20U)
2190 /*! PKHAVID - PK Version ID */
2191 #define CAU3_CHA_VID_PKHAVID(x)                  (((uint32_t)(((uint32_t)(x)) << CAU3_CHA_VID_PKHAVID_SHIFT)) & CAU3_CHA_VID_PKHAVID_MASK)
2192 /*! @} */
2193 
2194 /*! @name PKHA_CCR - PKHA Clock Control Register */
2195 /*! @{ */
2196 
2197 #define CAU3_PKHA_CCR_CKTHRT_MASK                (0x7U)
2198 #define CAU3_PKHA_CCR_CKTHRT_SHIFT               (0U)
2199 /*! CKTHRT - Clock Throttle selection
2200  *  0b000..PKHA clock division rate is 8/8 - full speed
2201  *  0b001..PKHA clock division rate is 1/8
2202  *  0b010..PKHA clock division rate is 2/8
2203  *  0b011..PKHA clock division rate is 3/8
2204  *  0b100..PKHA clock division rate is 4/8
2205  *  0b101..PKHA clock division rate is 5/8
2206  *  0b110..PKHA clock division rate is 6/8
2207  *  0b111..PKHA clock division rate is 7/8
2208  */
2209 #define CAU3_PKHA_CCR_CKTHRT(x)                  (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_CKTHRT_SHIFT)) & CAU3_PKHA_CCR_CKTHRT_MASK)
2210 
2211 #define CAU3_PKHA_CCR_LK_MASK                    (0x1000000U)
2212 #define CAU3_PKHA_CCR_LK_SHIFT                   (24U)
2213 /*! LK - Register Lock
2214  *  0b0..Register is unlocked
2215  *  0b1..Register is locked
2216  */
2217 #define CAU3_PKHA_CCR_LK(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_LK_SHIFT)) & CAU3_PKHA_CCR_LK_MASK)
2218 
2219 #define CAU3_PKHA_CCR_ELFR_MASK                  (0x20000000U)
2220 #define CAU3_PKHA_CCR_ELFR_SHIFT                 (29U)
2221 /*! ELFR - Enable Linear Feedback Shift Register
2222  *  0b0..LFSR is only enabled if ECT = 1 and ECJ = 1
2223  *  0b1..LFSR is enabled independently of ECT and ECJ
2224  */
2225 #define CAU3_PKHA_CCR_ELFR(x)                    (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ELFR_SHIFT)) & CAU3_PKHA_CCR_ELFR_MASK)
2226 
2227 #define CAU3_PKHA_CCR_ECJ_MASK                   (0x40000000U)
2228 #define CAU3_PKHA_CCR_ECJ_SHIFT                  (30U)
2229 /*! ECJ - Enable Clock Jitter
2230  *  0b0..Clock Jitter is disabled
2231  *  0b1..Clock jitter is enabled
2232  */
2233 #define CAU3_PKHA_CCR_ECJ(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ECJ_SHIFT)) & CAU3_PKHA_CCR_ECJ_MASK)
2234 
2235 #define CAU3_PKHA_CCR_ECT_MASK                   (0x80000000U)
2236 #define CAU3_PKHA_CCR_ECT_SHIFT                  (31U)
2237 /*! ECT - Enable Clock Throttle
2238  *  0b0..PKHA clock throttle disabled meaning that PKHA is operatiing at full speed
2239  *  0b1..PKHA clock throttle enabled
2240  */
2241 #define CAU3_PKHA_CCR_ECT(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ECT_SHIFT)) & CAU3_PKHA_CCR_ECT_MASK)
2242 /*! @} */
2243 
2244 /*! @name GSR - Global Status Register */
2245 /*! @{ */
2246 
2247 #define CAU3_GSR_CDI_MASK                        (0x400U)
2248 #define CAU3_GSR_CDI_SHIFT                       (10U)
2249 /*! CDI - CAU3 Done Interrupt occurred
2250  *  0b0..CAU3 Done Interrupt did not occur
2251  *  0b1..CAU3 Done Interrupt occurred
2252  */
2253 #define CAU3_GSR_CDI(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_CDI_SHIFT)) & CAU3_GSR_CDI_MASK)
2254 
2255 #define CAU3_GSR_CEI_MASK                        (0x4000U)
2256 #define CAU3_GSR_CEI_SHIFT                       (14U)
2257 /*! CEI - CAU3 Error Interrupt
2258  *  0b0..CAU3 Error Interrupt did not occur
2259  *  0b1..CAU3 Error Interrupt occurred
2260  */
2261 #define CAU3_GSR_CEI(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_CEI_SHIFT)) & CAU3_GSR_CEI_MASK)
2262 
2263 #define CAU3_GSR_PEI_MASK                        (0x8000U)
2264 #define CAU3_GSR_PEI_SHIFT                       (15U)
2265 /*! PEI - PKHA Done or Error Interrupt
2266  *  0b0..PKHA interrupt did not occur
2267  *  0b1..PKHA interrupt had occurred
2268  */
2269 #define CAU3_GSR_PEI(x)                          (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_PEI_SHIFT)) & CAU3_GSR_PEI_MASK)
2270 
2271 #define CAU3_GSR_PBSY_MASK                       (0x80000000U)
2272 #define CAU3_GSR_PBSY_SHIFT                      (31U)
2273 /*! PBSY - PKHA Busy
2274  *  0b0..PKHA not busy
2275  *  0b1..PKHA busy
2276  */
2277 #define CAU3_GSR_PBSY(x)                         (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_PBSY_SHIFT)) & CAU3_GSR_PBSY_MASK)
2278 /*! @} */
2279 
2280 /*! @name CKLFSR - Clock Linear Feedback Shift Register */
2281 /*! @{ */
2282 
2283 #define CAU3_CKLFSR_LFSR_MASK                    (0xFFFFFFFFU)
2284 #define CAU3_CKLFSR_LFSR_SHIFT                   (0U)
2285 /*! LFSR - Linear Feedback Shift Register */
2286 #define CAU3_CKLFSR_LFSR(x)                      (((uint32_t)(((uint32_t)(x)) << CAU3_CKLFSR_LFSR_SHIFT)) & CAU3_CKLFSR_LFSR_MASK)
2287 /*! @} */
2288 
2289 /*! @name PKA0 - PKHA A0 Register */
2290 /*! @{ */
2291 
2292 #define CAU3_PKA0_PKHA_A0_MASK                   (0xFFFFFFFFU)
2293 #define CAU3_PKA0_PKHA_A0_SHIFT                  (0U)
2294 /*! PKHA_A0 - A0 VALUE */
2295 #define CAU3_PKA0_PKHA_A0(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKA0_PKHA_A0_SHIFT)) & CAU3_PKA0_PKHA_A0_MASK)
2296 /*! @} */
2297 
2298 /* The count of CAU3_PKA0 */
2299 #define CAU3_PKA0_COUNT                          (32U)
2300 
2301 /*! @name PKA1 - PKHA A1 Register */
2302 /*! @{ */
2303 
2304 #define CAU3_PKA1_PKHA_A1_MASK                   (0xFFFFFFFFU)
2305 #define CAU3_PKA1_PKHA_A1_SHIFT                  (0U)
2306 /*! PKHA_A1 - A1 VALUE */
2307 #define CAU3_PKA1_PKHA_A1(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKA1_PKHA_A1_SHIFT)) & CAU3_PKA1_PKHA_A1_MASK)
2308 /*! @} */
2309 
2310 /* The count of CAU3_PKA1 */
2311 #define CAU3_PKA1_COUNT                          (32U)
2312 
2313 /*! @name PKA2 - PKHA A2 Register */
2314 /*! @{ */
2315 
2316 #define CAU3_PKA2_PKHA_A2_MASK                   (0xFFFFFFFFU)
2317 #define CAU3_PKA2_PKHA_A2_SHIFT                  (0U)
2318 /*! PKHA_A2 - A2 VALUE */
2319 #define CAU3_PKA2_PKHA_A2(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKA2_PKHA_A2_SHIFT)) & CAU3_PKA2_PKHA_A2_MASK)
2320 /*! @} */
2321 
2322 /* The count of CAU3_PKA2 */
2323 #define CAU3_PKA2_COUNT                          (32U)
2324 
2325 /*! @name PKA3 - PKHA A3 Register */
2326 /*! @{ */
2327 
2328 #define CAU3_PKA3_PKHA_A3_MASK                   (0xFFFFFFFFU)
2329 #define CAU3_PKA3_PKHA_A3_SHIFT                  (0U)
2330 /*! PKHA_A3 - A3 VALUE */
2331 #define CAU3_PKA3_PKHA_A3(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKA3_PKHA_A3_SHIFT)) & CAU3_PKA3_PKHA_A3_MASK)
2332 /*! @} */
2333 
2334 /* The count of CAU3_PKA3 */
2335 #define CAU3_PKA3_COUNT                          (32U)
2336 
2337 /*! @name PKB0 - PKHA B0 Register */
2338 /*! @{ */
2339 
2340 #define CAU3_PKB0_PKHA_B0_MASK                   (0xFFFFFFFFU)
2341 #define CAU3_PKB0_PKHA_B0_SHIFT                  (0U)
2342 /*! PKHA_B0 - B0 VALUE */
2343 #define CAU3_PKB0_PKHA_B0(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKB0_PKHA_B0_SHIFT)) & CAU3_PKB0_PKHA_B0_MASK)
2344 /*! @} */
2345 
2346 /* The count of CAU3_PKB0 */
2347 #define CAU3_PKB0_COUNT                          (32U)
2348 
2349 /*! @name PKB1 - PKHA B1 Register */
2350 /*! @{ */
2351 
2352 #define CAU3_PKB1_PKHA_B1_MASK                   (0xFFFFFFFFU)
2353 #define CAU3_PKB1_PKHA_B1_SHIFT                  (0U)
2354 /*! PKHA_B1 - B1 VALUE */
2355 #define CAU3_PKB1_PKHA_B1(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKB1_PKHA_B1_SHIFT)) & CAU3_PKB1_PKHA_B1_MASK)
2356 /*! @} */
2357 
2358 /* The count of CAU3_PKB1 */
2359 #define CAU3_PKB1_COUNT                          (32U)
2360 
2361 /*! @name PKB2 - PKHA B2 Register */
2362 /*! @{ */
2363 
2364 #define CAU3_PKB2_PKHA_B2_MASK                   (0xFFFFFFFFU)
2365 #define CAU3_PKB2_PKHA_B2_SHIFT                  (0U)
2366 /*! PKHA_B2 - B2 VALUE */
2367 #define CAU3_PKB2_PKHA_B2(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKB2_PKHA_B2_SHIFT)) & CAU3_PKB2_PKHA_B2_MASK)
2368 /*! @} */
2369 
2370 /* The count of CAU3_PKB2 */
2371 #define CAU3_PKB2_COUNT                          (32U)
2372 
2373 /*! @name PKB3 - PKHA B3 Register */
2374 /*! @{ */
2375 
2376 #define CAU3_PKB3_PKHA_B3_MASK                   (0xFFFFFFFFU)
2377 #define CAU3_PKB3_PKHA_B3_SHIFT                  (0U)
2378 /*! PKHA_B3 - B3 VALUE */
2379 #define CAU3_PKB3_PKHA_B3(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKB3_PKHA_B3_SHIFT)) & CAU3_PKB3_PKHA_B3_MASK)
2380 /*! @} */
2381 
2382 /* The count of CAU3_PKB3 */
2383 #define CAU3_PKB3_COUNT                          (32U)
2384 
2385 /*! @name PKN0 - PKHA N0 Register */
2386 /*! @{ */
2387 
2388 #define CAU3_PKN0_PKHA_N0_MASK                   (0xFFFFFFFFU)
2389 #define CAU3_PKN0_PKHA_N0_SHIFT                  (0U)
2390 /*! PKHA_N0 - N0 VALUE */
2391 #define CAU3_PKN0_PKHA_N0(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKN0_PKHA_N0_SHIFT)) & CAU3_PKN0_PKHA_N0_MASK)
2392 /*! @} */
2393 
2394 /* The count of CAU3_PKN0 */
2395 #define CAU3_PKN0_COUNT                          (32U)
2396 
2397 /*! @name PKN1 - PKHA N1 Register */
2398 /*! @{ */
2399 
2400 #define CAU3_PKN1_PKHA_N1_MASK                   (0xFFFFFFFFU)
2401 #define CAU3_PKN1_PKHA_N1_SHIFT                  (0U)
2402 /*! PKHA_N1 - N1 VALUE */
2403 #define CAU3_PKN1_PKHA_N1(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKN1_PKHA_N1_SHIFT)) & CAU3_PKN1_PKHA_N1_MASK)
2404 /*! @} */
2405 
2406 /* The count of CAU3_PKN1 */
2407 #define CAU3_PKN1_COUNT                          (32U)
2408 
2409 /*! @name PKN2 - PKHA N2 Register */
2410 /*! @{ */
2411 
2412 #define CAU3_PKN2_PKHA_N2_MASK                   (0xFFFFFFFFU)
2413 #define CAU3_PKN2_PKHA_N2_SHIFT                  (0U)
2414 /*! PKHA_N2 - N2 VALUE */
2415 #define CAU3_PKN2_PKHA_N2(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKN2_PKHA_N2_SHIFT)) & CAU3_PKN2_PKHA_N2_MASK)
2416 /*! @} */
2417 
2418 /* The count of CAU3_PKN2 */
2419 #define CAU3_PKN2_COUNT                          (32U)
2420 
2421 /*! @name PKN3 - PKHA N3 Register */
2422 /*! @{ */
2423 
2424 #define CAU3_PKN3_PKHA_N3_MASK                   (0xFFFFFFFFU)
2425 #define CAU3_PKN3_PKHA_N3_SHIFT                  (0U)
2426 /*! PKHA_N3 - N3 VALUE */
2427 #define CAU3_PKN3_PKHA_N3(x)                     (((uint32_t)(((uint32_t)(x)) << CAU3_PKN3_PKHA_N3_SHIFT)) & CAU3_PKN3_PKHA_N3_MASK)
2428 /*! @} */
2429 
2430 /* The count of CAU3_PKN3 */
2431 #define CAU3_PKN3_COUNT                          (32U)
2432 
2433 /*! @name PKE - PKHA E Register */
2434 /*! @{ */
2435 
2436 #define CAU3_PKE_PKHA_E_MASK                     (0xFFFFFFFFU)
2437 #define CAU3_PKE_PKHA_E_SHIFT                    (0U)
2438 /*! PKHA_E - E VALUE */
2439 #define CAU3_PKE_PKHA_E(x)                       (((uint32_t)(((uint32_t)(x)) << CAU3_PKE_PKHA_E_SHIFT)) & CAU3_PKE_PKHA_E_MASK)
2440 /*! @} */
2441 
2442 /* The count of CAU3_PKE */
2443 #define CAU3_PKE_COUNT                           (128U)
2444 
2445 
2446 /*!
2447  * @}
2448  */ /* end of group CAU3_Register_Masks */
2449 
2450 
2451 /* CAU3 - Peripheral instance base addresses */
2452 /** Peripheral CAU3 base address */
2453 #define CAU3_BASE                                (0x41028000u)
2454 /** Peripheral CAU3 base pointer */
2455 #define CAU3                                     ((CAU3_Type *)CAU3_BASE)
2456 /** Array initializer of CAU3 peripheral base addresses */
2457 #define CAU3_BASE_ADDRS                          { CAU3_BASE }
2458 /** Array initializer of CAU3 peripheral base pointers */
2459 #define CAU3_BASE_PTRS                           { CAU3 }
2460 /** Interrupt vectors for the CAU3 peripheral type */
2461 #define CAU3_TASK_COMPLETE_IRQS                  { CAU3_Task_Complete_IRQn }
2462 #define CAU3_SECURITY_VIOLATION_IRQS             { CAU3_Security_Violation_IRQn }
2463 
2464 /*!
2465  * @}
2466  */ /* end of group CAU3_Peripheral_Access_Layer */
2467 
2468 
2469 /* ----------------------------------------------------------------------------
2470    -- CRC Peripheral Access Layer
2471    ---------------------------------------------------------------------------- */
2472 
2473 /*!
2474  * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
2475  * @{
2476  */
2477 
2478 /** CRC - Register Layout Typedef */
2479 typedef struct {
2480   union {                                          /* offset: 0x0 */
2481     struct {                                         /* offset: 0x0 */
2482       __IO uint8_t DATALL;                             /**< CRC_DATALL register, offset: 0x0 */
2483       __IO uint8_t DATALU;                             /**< CRC_DATALU register, offset: 0x1 */
2484       __IO uint8_t DATAHL;                             /**< CRC_DATAHL register, offset: 0x2 */
2485       __IO uint8_t DATAHU;                             /**< CRC_DATAHU register, offset: 0x3 */
2486     } ACCESS8BIT;
2487     struct {                                         /* offset: 0x0 */
2488       __IO uint16_t DATAL;                             /**< CRC_DATAL register, offset: 0x0 */
2489       __IO uint16_t DATAH;                             /**< CRC_DATAH register, offset: 0x2 */
2490     } ACCESS16BIT;
2491     __IO uint32_t DATA;                              /**< CRC Data register, offset: 0x0 */
2492   };
2493   union {                                          /* offset: 0x4 */
2494     struct {                                         /* offset: 0x4 */
2495       __IO uint8_t GPOLYLL;                            /**< CRC_GPOLYLL register, offset: 0x4 */
2496       __IO uint8_t GPOLYLU;                            /**< CRC_GPOLYLU register, offset: 0x5 */
2497       __IO uint8_t GPOLYHL;                            /**< CRC_GPOLYHL register, offset: 0x6 */
2498       __IO uint8_t GPOLYHU;                            /**< CRC_GPOLYHU register, offset: 0x7 */
2499     } GPOLY_ACCESS8BIT;
2500     struct {                                         /* offset: 0x4 */
2501       __IO uint16_t GPOLYL;                            /**< CRC_GPOLYL register, offset: 0x4 */
2502       __IO uint16_t GPOLYH;                            /**< CRC_GPOLYH register, offset: 0x6 */
2503     } GPOLY_ACCESS16BIT;
2504     __IO uint32_t GPOLY;                             /**< CRC Polynomial register, offset: 0x4 */
2505   };
2506   union {                                          /* offset: 0x8 */
2507     struct {                                         /* offset: 0x8 */
2508            uint8_t RESERVED_0[3];
2509       __IO uint8_t CTRLHU;                             /**< CRC_CTRLHU register, offset: 0xB */
2510     } CTRL_ACCESS8BIT;
2511     __IO uint32_t CTRL;                              /**< CRC Control register, offset: 0x8 */
2512   };
2513 } CRC_Type;
2514 
2515 /* ----------------------------------------------------------------------------
2516    -- CRC Register Masks
2517    ---------------------------------------------------------------------------- */
2518 
2519 /*!
2520  * @addtogroup CRC_Register_Masks CRC Register Masks
2521  * @{
2522  */
2523 
2524 /*! @name DATALL - CRC_DATALL register */
2525 /*! @{ */
2526 
2527 #define CRC_DATALL_DATALL_MASK                   (0xFFU)
2528 #define CRC_DATALL_DATALL_SHIFT                  (0U)
2529 #define CRC_DATALL_DATALL(x)                     (((uint8_t)(((uint8_t)(x)) << CRC_DATALL_DATALL_SHIFT)) & CRC_DATALL_DATALL_MASK)
2530 /*! @} */
2531 
2532 /*! @name DATALU - CRC_DATALU register */
2533 /*! @{ */
2534 
2535 #define CRC_DATALU_DATALU_MASK                   (0xFFU)
2536 #define CRC_DATALU_DATALU_SHIFT                  (0U)
2537 #define CRC_DATALU_DATALU(x)                     (((uint8_t)(((uint8_t)(x)) << CRC_DATALU_DATALU_SHIFT)) & CRC_DATALU_DATALU_MASK)
2538 /*! @} */
2539 
2540 /*! @name DATAHL - CRC_DATAHL register */
2541 /*! @{ */
2542 
2543 #define CRC_DATAHL_DATAHL_MASK                   (0xFFU)
2544 #define CRC_DATAHL_DATAHL_SHIFT                  (0U)
2545 #define CRC_DATAHL_DATAHL(x)                     (((uint8_t)(((uint8_t)(x)) << CRC_DATAHL_DATAHL_SHIFT)) & CRC_DATAHL_DATAHL_MASK)
2546 /*! @} */
2547 
2548 /*! @name DATAHU - CRC_DATAHU register */
2549 /*! @{ */
2550 
2551 #define CRC_DATAHU_DATAHU_MASK                   (0xFFU)
2552 #define CRC_DATAHU_DATAHU_SHIFT                  (0U)
2553 #define CRC_DATAHU_DATAHU(x)                     (((uint8_t)(((uint8_t)(x)) << CRC_DATAHU_DATAHU_SHIFT)) & CRC_DATAHU_DATAHU_MASK)
2554 /*! @} */
2555 
2556 /*! @name DATAL - CRC_DATAL register */
2557 /*! @{ */
2558 
2559 #define CRC_DATAL_DATAL_MASK                     (0xFFFFU)
2560 #define CRC_DATAL_DATAL_SHIFT                    (0U)
2561 #define CRC_DATAL_DATAL(x)                       (((uint16_t)(((uint16_t)(x)) << CRC_DATAL_DATAL_SHIFT)) & CRC_DATAL_DATAL_MASK)
2562 /*! @} */
2563 
2564 /*! @name DATAH - CRC_DATAH register */
2565 /*! @{ */
2566 
2567 #define CRC_DATAH_DATAH_MASK                     (0xFFFFU)
2568 #define CRC_DATAH_DATAH_SHIFT                    (0U)
2569 #define CRC_DATAH_DATAH(x)                       (((uint16_t)(((uint16_t)(x)) << CRC_DATAH_DATAH_SHIFT)) & CRC_DATAH_DATAH_MASK)
2570 /*! @} */
2571 
2572 /*! @name DATA - CRC Data register */
2573 /*! @{ */
2574 
2575 #define CRC_DATA_LL_MASK                         (0xFFU)
2576 #define CRC_DATA_LL_SHIFT                        (0U)
2577 /*! LL - CRC Low Lower Byte */
2578 #define CRC_DATA_LL(x)                           (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LL_SHIFT)) & CRC_DATA_LL_MASK)
2579 
2580 #define CRC_DATA_LU_MASK                         (0xFF00U)
2581 #define CRC_DATA_LU_SHIFT                        (8U)
2582 /*! LU - CRC Low Upper Byte */
2583 #define CRC_DATA_LU(x)                           (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LU_SHIFT)) & CRC_DATA_LU_MASK)
2584 
2585 #define CRC_DATA_HL_MASK                         (0xFF0000U)
2586 #define CRC_DATA_HL_SHIFT                        (16U)
2587 /*! HL - CRC High Lower Byte */
2588 #define CRC_DATA_HL(x)                           (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HL_SHIFT)) & CRC_DATA_HL_MASK)
2589 
2590 #define CRC_DATA_HU_MASK                         (0xFF000000U)
2591 #define CRC_DATA_HU_SHIFT                        (24U)
2592 /*! HU - CRC High Upper Byte */
2593 #define CRC_DATA_HU(x)                           (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HU_SHIFT)) & CRC_DATA_HU_MASK)
2594 /*! @} */
2595 
2596 /*! @name GPOLYLL - CRC_GPOLYLL register */
2597 /*! @{ */
2598 
2599 #define CRC_GPOLYLL_GPOLYLL_MASK                 (0xFFU)
2600 #define CRC_GPOLYLL_GPOLYLL_SHIFT                (0U)
2601 #define CRC_GPOLYLL_GPOLYLL(x)                   (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLL_GPOLYLL_SHIFT)) & CRC_GPOLYLL_GPOLYLL_MASK)
2602 /*! @} */
2603 
2604 /*! @name GPOLYLU - CRC_GPOLYLU register */
2605 /*! @{ */
2606 
2607 #define CRC_GPOLYLU_GPOLYLU_MASK                 (0xFFU)
2608 #define CRC_GPOLYLU_GPOLYLU_SHIFT                (0U)
2609 #define CRC_GPOLYLU_GPOLYLU(x)                   (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLU_GPOLYLU_SHIFT)) & CRC_GPOLYLU_GPOLYLU_MASK)
2610 /*! @} */
2611 
2612 /*! @name GPOLYHL - CRC_GPOLYHL register */
2613 /*! @{ */
2614 
2615 #define CRC_GPOLYHL_GPOLYHL_MASK                 (0xFFU)
2616 #define CRC_GPOLYHL_GPOLYHL_SHIFT                (0U)
2617 #define CRC_GPOLYHL_GPOLYHL(x)                   (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHL_GPOLYHL_SHIFT)) & CRC_GPOLYHL_GPOLYHL_MASK)
2618 /*! @} */
2619 
2620 /*! @name GPOLYHU - CRC_GPOLYHU register */
2621 /*! @{ */
2622 
2623 #define CRC_GPOLYHU_GPOLYHU_MASK                 (0xFFU)
2624 #define CRC_GPOLYHU_GPOLYHU_SHIFT                (0U)
2625 #define CRC_GPOLYHU_GPOLYHU(x)                   (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHU_GPOLYHU_SHIFT)) & CRC_GPOLYHU_GPOLYHU_MASK)
2626 /*! @} */
2627 
2628 /*! @name GPOLYL - CRC_GPOLYL register */
2629 /*! @{ */
2630 
2631 #define CRC_GPOLYL_GPOLYL_MASK                   (0xFFFFU)
2632 #define CRC_GPOLYL_GPOLYL_SHIFT                  (0U)
2633 #define CRC_GPOLYL_GPOLYL(x)                     (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYL_GPOLYL_SHIFT)) & CRC_GPOLYL_GPOLYL_MASK)
2634 /*! @} */
2635 
2636 /*! @name GPOLYH - CRC_GPOLYH register */
2637 /*! @{ */
2638 
2639 #define CRC_GPOLYH_GPOLYH_MASK                   (0xFFFFU)
2640 #define CRC_GPOLYH_GPOLYH_SHIFT                  (0U)
2641 #define CRC_GPOLYH_GPOLYH(x)                     (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYH_GPOLYH_SHIFT)) & CRC_GPOLYH_GPOLYH_MASK)
2642 /*! @} */
2643 
2644 /*! @name GPOLY - CRC Polynomial register */
2645 /*! @{ */
2646 
2647 #define CRC_GPOLY_LOW_MASK                       (0xFFFFU)
2648 #define CRC_GPOLY_LOW_SHIFT                      (0U)
2649 /*! LOW - Low Polynominal Half-word */
2650 #define CRC_GPOLY_LOW(x)                         (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_LOW_SHIFT)) & CRC_GPOLY_LOW_MASK)
2651 
2652 #define CRC_GPOLY_HIGH_MASK                      (0xFFFF0000U)
2653 #define CRC_GPOLY_HIGH_SHIFT                     (16U)
2654 /*! HIGH - High Polynominal Half-word */
2655 #define CRC_GPOLY_HIGH(x)                        (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_HIGH_SHIFT)) & CRC_GPOLY_HIGH_MASK)
2656 /*! @} */
2657 
2658 /*! @name CTRLHU - CRC_CTRLHU register */
2659 /*! @{ */
2660 
2661 #define CRC_CTRLHU_TCRC_MASK                     (0x1U)
2662 #define CRC_CTRLHU_TCRC_SHIFT                    (0U)
2663 /*! TCRC - TCRC
2664  *  0b0..16-bit CRC protocol.
2665  *  0b1..32-bit CRC protocol.
2666  */
2667 #define CRC_CTRLHU_TCRC(x)                       (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TCRC_SHIFT)) & CRC_CTRLHU_TCRC_MASK)
2668 
2669 #define CRC_CTRLHU_WAS_MASK                      (0x2U)
2670 #define CRC_CTRLHU_WAS_SHIFT                     (1U)
2671 /*! WAS - Write CRC Data Register As Seed
2672  *  0b0..Writes to the CRC data register are data values.
2673  *  0b1..Writes to the CRC data register are seed values.
2674  */
2675 #define CRC_CTRLHU_WAS(x)                        (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_WAS_SHIFT)) & CRC_CTRLHU_WAS_MASK)
2676 
2677 #define CRC_CTRLHU_FXOR_MASK                     (0x4U)
2678 #define CRC_CTRLHU_FXOR_SHIFT                    (2U)
2679 /*! FXOR - Complement Read Of CRC Data Register
2680  *  0b0..No XOR on reading.
2681  *  0b1..Invert or complement the read value of the CRC Data register.
2682  */
2683 #define CRC_CTRLHU_FXOR(x)                       (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_FXOR_SHIFT)) & CRC_CTRLHU_FXOR_MASK)
2684 
2685 #define CRC_CTRLHU_TOTR_MASK                     (0x30U)
2686 #define CRC_CTRLHU_TOTR_SHIFT                    (4U)
2687 /*! TOTR - Type Of Transpose For Read
2688  *  0b00..No transposition.
2689  *  0b01..Bits in bytes are transposed; bytes are not transposed.
2690  *  0b10..Both bits in bytes and bytes are transposed.
2691  *  0b11..Only bytes are transposed; no bits in a byte are transposed.
2692  */
2693 #define CRC_CTRLHU_TOTR(x)                       (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOTR_SHIFT)) & CRC_CTRLHU_TOTR_MASK)
2694 
2695 #define CRC_CTRLHU_TOT_MASK                      (0xC0U)
2696 #define CRC_CTRLHU_TOT_SHIFT                     (6U)
2697 /*! TOT - Type Of Transpose For Writes
2698  *  0b00..No transposition.
2699  *  0b01..Bits in bytes are transposed; bytes are not transposed.
2700  *  0b10..Both bits in bytes and bytes are transposed.
2701  *  0b11..Only bytes are transposed; no bits in a byte are transposed.
2702  */
2703 #define CRC_CTRLHU_TOT(x)                        (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOT_SHIFT)) & CRC_CTRLHU_TOT_MASK)
2704 /*! @} */
2705 
2706 /*! @name CTRL - CRC Control register */
2707 /*! @{ */
2708 
2709 #define CRC_CTRL_TCRC_MASK                       (0x1000000U)
2710 #define CRC_CTRL_TCRC_SHIFT                      (24U)
2711 /*! TCRC - TCRC
2712  *  0b0..16-bit CRC protocol.
2713  *  0b1..32-bit CRC protocol.
2714  */
2715 #define CRC_CTRL_TCRC(x)                         (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TCRC_SHIFT)) & CRC_CTRL_TCRC_MASK)
2716 
2717 #define CRC_CTRL_WAS_MASK                        (0x2000000U)
2718 #define CRC_CTRL_WAS_SHIFT                       (25U)
2719 /*! WAS - Write CRC Data Register As Seed
2720  *  0b0..Writes to the CRC data register are data values.
2721  *  0b1..Writes to the CRC data register are seed values.
2722  */
2723 #define CRC_CTRL_WAS(x)                          (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_WAS_SHIFT)) & CRC_CTRL_WAS_MASK)
2724 
2725 #define CRC_CTRL_FXOR_MASK                       (0x4000000U)
2726 #define CRC_CTRL_FXOR_SHIFT                      (26U)
2727 /*! FXOR - Complement Read Of CRC Data Register
2728  *  0b0..No XOR on reading.
2729  *  0b1..Invert or complement the read value of the CRC Data register.
2730  */
2731 #define CRC_CTRL_FXOR(x)                         (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_FXOR_SHIFT)) & CRC_CTRL_FXOR_MASK)
2732 
2733 #define CRC_CTRL_TOTR_MASK                       (0x30000000U)
2734 #define CRC_CTRL_TOTR_SHIFT                      (28U)
2735 /*! TOTR - Type Of Transpose For Read
2736  *  0b00..No transposition.
2737  *  0b01..Bits in bytes are transposed; bytes are not transposed.
2738  *  0b10..Both bits in bytes and bytes are transposed.
2739  *  0b11..Only bytes are transposed; no bits in a byte are transposed.
2740  */
2741 #define CRC_CTRL_TOTR(x)                         (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOTR_SHIFT)) & CRC_CTRL_TOTR_MASK)
2742 
2743 #define CRC_CTRL_TOT_MASK                        (0xC0000000U)
2744 #define CRC_CTRL_TOT_SHIFT                       (30U)
2745 /*! TOT - Type Of Transpose For Writes
2746  *  0b00..No transposition.
2747  *  0b01..Bits in bytes are transposed; bytes are not transposed.
2748  *  0b10..Both bits in bytes and bytes are transposed.
2749  *  0b11..Only bytes are transposed; no bits in a byte are transposed.
2750  */
2751 #define CRC_CTRL_TOT(x)                          (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOT_SHIFT)) & CRC_CTRL_TOT_MASK)
2752 /*! @} */
2753 
2754 
2755 /*!
2756  * @}
2757  */ /* end of group CRC_Register_Masks */
2758 
2759 
2760 /* CRC - Peripheral instance base addresses */
2761 /** Peripheral CRC base address */
2762 #define CRC_BASE                                 (0x4002F000u)
2763 /** Peripheral CRC base pointer */
2764 #define CRC0                                     ((CRC_Type *)CRC_BASE)
2765 /** Array initializer of CRC peripheral base addresses */
2766 #define CRC_BASE_ADDRS                           { CRC_BASE }
2767 /** Array initializer of CRC peripheral base pointers */
2768 #define CRC_BASE_PTRS                            { CRC0 }
2769 
2770 /*!
2771  * @}
2772  */ /* end of group CRC_Peripheral_Access_Layer */
2773 
2774 
2775 /* ----------------------------------------------------------------------------
2776    -- DMA Peripheral Access Layer
2777    ---------------------------------------------------------------------------- */
2778 
2779 /*!
2780  * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
2781  * @{
2782  */
2783 
2784 /** DMA - Register Layout Typedef */
2785 typedef struct {
2786   __IO uint32_t CR;                                /**< Control Register, offset: 0x0 */
2787   __I  uint32_t ES;                                /**< Error Status Register, offset: 0x4 */
2788        uint8_t RESERVED_0[4];
2789   __IO uint32_t ERQ;                               /**< Enable Request Register, offset: 0xC */
2790        uint8_t RESERVED_1[4];
2791   __IO uint32_t EEI;                               /**< Enable Error Interrupt Register, offset: 0x14 */
2792   __O  uint8_t CEEI;                               /**< Clear Enable Error Interrupt Register, offset: 0x18 */
2793   __O  uint8_t SEEI;                               /**< Set Enable Error Interrupt Register, offset: 0x19 */
2794   __O  uint8_t CERQ;                               /**< Clear Enable Request Register, offset: 0x1A */
2795   __O  uint8_t SERQ;                               /**< Set Enable Request Register, offset: 0x1B */
2796   __O  uint8_t CDNE;                               /**< Clear DONE Status Bit Register, offset: 0x1C */
2797   __O  uint8_t SSRT;                               /**< Set START Bit Register, offset: 0x1D */
2798   __O  uint8_t CERR;                               /**< Clear Error Register, offset: 0x1E */
2799   __O  uint8_t CINT;                               /**< Clear Interrupt Request Register, offset: 0x1F */
2800        uint8_t RESERVED_2[4];
2801   __IO uint32_t INT;                               /**< Interrupt Request Register, offset: 0x24 */
2802        uint8_t RESERVED_3[4];
2803   __IO uint32_t ERR;                               /**< Error Register, offset: 0x2C */
2804        uint8_t RESERVED_4[4];
2805   __I  uint32_t HRS;                               /**< Hardware Request Status Register, offset: 0x34 */
2806        uint8_t RESERVED_5[12];
2807   __IO uint32_t EARS;                              /**< Enable Asynchronous Request in Stop Register, offset: 0x44 */
2808        uint8_t RESERVED_6[184];
2809   __IO uint8_t DCHPRI3;                            /**< Channel Priority Register, offset: 0x100 */
2810   __IO uint8_t DCHPRI2;                            /**< Channel Priority Register, offset: 0x101 */
2811   __IO uint8_t DCHPRI1;                            /**< Channel Priority Register, offset: 0x102 */
2812   __IO uint8_t DCHPRI0;                            /**< Channel Priority Register, offset: 0x103 */
2813   __IO uint8_t DCHPRI7;                            /**< Channel Priority Register, offset: 0x104 */
2814   __IO uint8_t DCHPRI6;                            /**< Channel Priority Register, offset: 0x105 */
2815   __IO uint8_t DCHPRI5;                            /**< Channel Priority Register, offset: 0x106 */
2816   __IO uint8_t DCHPRI4;                            /**< Channel Priority Register, offset: 0x107 */
2817        uint8_t RESERVED_7[3832];
2818   struct {                                         /* offset: 0x1000, array step: 0x20 */
2819     __IO uint32_t SADDR;                             /**< TCD Source Address, array offset: 0x1000, array step: 0x20 */
2820     __IO uint16_t SOFF;                              /**< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20 */
2821     __IO uint16_t ATTR;                              /**< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20 */
2822     union {                                          /* offset: 0x1008, array step: 0x20 */
2823       __IO uint32_t NBYTES_MLNO;                       /**< TCD Minor Byte Count (Minor Loop Mapping Disabled), array offset: 0x1008, array step: 0x20 */
2824       __IO uint32_t NBYTES_MLOFFNO;                    /**< TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled), array offset: 0x1008, array step: 0x20 */
2825       __IO uint32_t NBYTES_MLOFFYES;                   /**< TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled), array offset: 0x1008, array step: 0x20 */
2826     };
2827     __IO int32_t SLAST;                              /**< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20 */
2828     __IO uint32_t DADDR;                             /**< TCD Destination Address, array offset: 0x1010, array step: 0x20 */
2829     __IO uint16_t DOFF;                              /**< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20 */
2830     union {                                          /* offset: 0x1016, array step: 0x20 */
2831       __IO uint16_t CITER_ELINKNO;                     /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20 */
2832       __IO uint16_t CITER_ELINKYES;                    /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x1016, array step: 0x20 */
2833     };
2834     __IO int32_t DLAST_SGA;                          /**< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20 */
2835     __IO uint16_t CSR;                               /**< TCD Control and Status, array offset: 0x101C, array step: 0x20 */
2836     union {                                          /* offset: 0x101E, array step: 0x20 */
2837       __IO uint16_t BITER_ELINKNO;                     /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20 */
2838       __IO uint16_t BITER_ELINKYES;                    /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x101E, array step: 0x20 */
2839     };
2840   } TCD[8];
2841 } DMA_Type;
2842 
2843 /* ----------------------------------------------------------------------------
2844    -- DMA Register Masks
2845    ---------------------------------------------------------------------------- */
2846 
2847 /*!
2848  * @addtogroup DMA_Register_Masks DMA Register Masks
2849  * @{
2850  */
2851 
2852 /*! @name CR - Control Register */
2853 /*! @{ */
2854 
2855 #define DMA_CR_EDBG_MASK                         (0x2U)
2856 #define DMA_CR_EDBG_SHIFT                        (1U)
2857 /*! EDBG - Enable Debug
2858  *  0b0..When in debug mode, the DMA continues to operate.
2859  *  0b1..When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to
2860  *       complete. Channel execution resumes when the system exits debug mode or the EDBG bit is cleared.
2861  */
2862 #define DMA_CR_EDBG(x)                           (((uint32_t)(((uint32_t)(x)) << DMA_CR_EDBG_SHIFT)) & DMA_CR_EDBG_MASK)
2863 
2864 #define DMA_CR_ERCA_MASK                         (0x4U)
2865 #define DMA_CR_ERCA_SHIFT                        (2U)
2866 /*! ERCA - Enable Round Robin Channel Arbitration
2867  *  0b0..Fixed priority arbitration is used for channel selection .
2868  *  0b1..Round robin arbitration is used for channel selection .
2869  */
2870 #define DMA_CR_ERCA(x)                           (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERCA_SHIFT)) & DMA_CR_ERCA_MASK)
2871 
2872 #define DMA_CR_HOE_MASK                          (0x10U)
2873 #define DMA_CR_HOE_SHIFT                         (4U)
2874 /*! HOE - Halt On Error
2875  *  0b0..Normal operation
2876  *  0b1..Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared.
2877  */
2878 #define DMA_CR_HOE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_CR_HOE_SHIFT)) & DMA_CR_HOE_MASK)
2879 
2880 #define DMA_CR_HALT_MASK                         (0x20U)
2881 #define DMA_CR_HALT_SHIFT                        (5U)
2882 /*! HALT - Halt DMA Operations
2883  *  0b0..Normal operation
2884  *  0b1..Stall the start of any new channels. Executing channels are allowed to complete. Channel execution resumes when this bit is cleared.
2885  */
2886 #define DMA_CR_HALT(x)                           (((uint32_t)(((uint32_t)(x)) << DMA_CR_HALT_SHIFT)) & DMA_CR_HALT_MASK)
2887 
2888 #define DMA_CR_CLM_MASK                          (0x40U)
2889 #define DMA_CR_CLM_SHIFT                         (6U)
2890 /*! CLM - Continuous Link Mode
2891  *  0b0..A minor loop channel link made to itself goes through channel arbitration before being activated again.
2892  *  0b1..A minor loop channel link made to itself does not go through channel arbitration before being activated
2893  *       again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel
2894  *       link enabled and the link channel is itself. This effectively applies the minor loop offsets and restarts the
2895  *       next minor loop.
2896  */
2897 #define DMA_CR_CLM(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_CR_CLM_SHIFT)) & DMA_CR_CLM_MASK)
2898 
2899 #define DMA_CR_EMLM_MASK                         (0x80U)
2900 #define DMA_CR_EMLM_SHIFT                        (7U)
2901 /*! EMLM - Enable Minor Loop Mapping
2902  *  0b0..Disabled. TCDn.word2 is defined as a 32-bit NBYTES field.
2903  *  0b1..Enabled. TCDn.word2 is redefined to include individual enable fields, an offset field, and the NBYTES
2904  *       field. The individual enable fields allow the minor loop offset to be applied to the source address, the
2905  *       destination address, or both. The NBYTES field is reduced when either offset is enabled.
2906  */
2907 #define DMA_CR_EMLM(x)                           (((uint32_t)(((uint32_t)(x)) << DMA_CR_EMLM_SHIFT)) & DMA_CR_EMLM_MASK)
2908 
2909 #define DMA_CR_ECX_MASK                          (0x10000U)
2910 #define DMA_CR_ECX_SHIFT                         (16U)
2911 /*! ECX - Error Cancel Transfer
2912  *  0b0..Normal operation
2913  *  0b1..Cancel the remaining data transfer in the same fashion as the CX bit. Stop the executing channel and
2914  *       force the minor loop to finish. The cancel takes effect after the last write of the current read/write
2915  *       sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX
2916  *       treats the cancel as an error condition, thus updating the Error Status register (DMAx_ES) and generating an
2917  *       optional error interrupt.
2918  */
2919 #define DMA_CR_ECX(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_CR_ECX_SHIFT)) & DMA_CR_ECX_MASK)
2920 
2921 #define DMA_CR_CX_MASK                           (0x20000U)
2922 #define DMA_CR_CX_SHIFT                          (17U)
2923 /*! CX - Cancel Transfer
2924  *  0b0..Normal operation
2925  *  0b1..Cancel the remaining data transfer. Stop the executing channel and force the minor loop to finish. The
2926  *       cancel takes effect after the last write of the current read/write sequence. The CX bit clears itself after
2927  *       the cancel has been honored. This cancel retires the channel normally as if the minor loop was completed.
2928  */
2929 #define DMA_CR_CX(x)                             (((uint32_t)(((uint32_t)(x)) << DMA_CR_CX_SHIFT)) & DMA_CR_CX_MASK)
2930 
2931 #define DMA_CR_ACTIVE_MASK                       (0x80000000U)
2932 #define DMA_CR_ACTIVE_SHIFT                      (31U)
2933 /*! ACTIVE - DMA Active Status
2934  *  0b0..eDMA is idle.
2935  *  0b1..eDMA is executing a channel.
2936  */
2937 #define DMA_CR_ACTIVE(x)                         (((uint32_t)(((uint32_t)(x)) << DMA_CR_ACTIVE_SHIFT)) & DMA_CR_ACTIVE_MASK)
2938 /*! @} */
2939 
2940 /*! @name ES - Error Status Register */
2941 /*! @{ */
2942 
2943 #define DMA_ES_DBE_MASK                          (0x1U)
2944 #define DMA_ES_DBE_SHIFT                         (0U)
2945 /*! DBE - Destination Bus Error
2946  *  0b0..No destination bus error
2947  *  0b1..The last recorded error was a bus error on a destination write
2948  */
2949 #define DMA_ES_DBE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_DBE_SHIFT)) & DMA_ES_DBE_MASK)
2950 
2951 #define DMA_ES_SBE_MASK                          (0x2U)
2952 #define DMA_ES_SBE_SHIFT                         (1U)
2953 /*! SBE - Source Bus Error
2954  *  0b0..No source bus error
2955  *  0b1..The last recorded error was a bus error on a source read
2956  */
2957 #define DMA_ES_SBE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_SBE_SHIFT)) & DMA_ES_SBE_MASK)
2958 
2959 #define DMA_ES_SGE_MASK                          (0x4U)
2960 #define DMA_ES_SGE_SHIFT                         (2U)
2961 /*! SGE - Scatter/Gather Configuration Error
2962  *  0b0..No scatter/gather configuration error
2963  *  0b1..The last recorded error was a configuration error detected in the TCDn_DLASTSGA field. This field is
2964  *       checked at the beginning of a scatter/gather operation after major loop completion if TCDn_CSR[ESG] is
2965  *       enabled. TCDn_DLASTSGA is not on a 32 byte boundary.
2966  */
2967 #define DMA_ES_SGE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_SGE_SHIFT)) & DMA_ES_SGE_MASK)
2968 
2969 #define DMA_ES_NCE_MASK                          (0x8U)
2970 #define DMA_ES_NCE_SHIFT                         (3U)
2971 /*! NCE - NBYTES/CITER Configuration Error
2972  *  0b0..No NBYTES/CITER configuration error
2973  *  0b1..The last recorded error was a configuration error detected in the TCDn_NBYTES or TCDn_CITER fields.
2974  *       TCDn_NBYTES is not a multiple of TCDn_ATTR[SSIZE] and TCDn_ATTR[DSIZE], or TCDn_CITER[CITER] is equal to zero,
2975  *       or TCDn_CITER[ELINK] is not equal to TCDn_BITER[ELINK]
2976  */
2977 #define DMA_ES_NCE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_NCE_SHIFT)) & DMA_ES_NCE_MASK)
2978 
2979 #define DMA_ES_DOE_MASK                          (0x10U)
2980 #define DMA_ES_DOE_SHIFT                         (4U)
2981 /*! DOE - Destination Offset Error
2982  *  0b0..No destination offset configuration error
2983  *  0b1..The last recorded error was a configuration error detected in the TCDn_DOFF field. TCDn_DOFF is inconsistent with TCDn_ATTR[DSIZE].
2984  */
2985 #define DMA_ES_DOE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_DOE_SHIFT)) & DMA_ES_DOE_MASK)
2986 
2987 #define DMA_ES_DAE_MASK                          (0x20U)
2988 #define DMA_ES_DAE_SHIFT                         (5U)
2989 /*! DAE - Destination Address Error
2990  *  0b0..No destination address configuration error
2991  *  0b1..The last recorded error was a configuration error detected in the TCDn_DADDR field. TCDn_DADDR is inconsistent with TCDn_ATTR[DSIZE].
2992  */
2993 #define DMA_ES_DAE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_DAE_SHIFT)) & DMA_ES_DAE_MASK)
2994 
2995 #define DMA_ES_SOE_MASK                          (0x40U)
2996 #define DMA_ES_SOE_SHIFT                         (6U)
2997 /*! SOE - Source Offset Error
2998  *  0b0..No source offset configuration error
2999  *  0b1..The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR[SSIZE].
3000  */
3001 #define DMA_ES_SOE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_SOE_SHIFT)) & DMA_ES_SOE_MASK)
3002 
3003 #define DMA_ES_SAE_MASK                          (0x80U)
3004 #define DMA_ES_SAE_SHIFT                         (7U)
3005 /*! SAE - Source Address Error
3006  *  0b0..No source address configuration error.
3007  *  0b1..The last recorded error was a configuration error detected in the TCDn_SADDR field. TCDn_SADDR is inconsistent with TCDn_ATTR[SSIZE].
3008  */
3009 #define DMA_ES_SAE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_SAE_SHIFT)) & DMA_ES_SAE_MASK)
3010 
3011 #define DMA_ES_ERRCHN_MASK                       (0x700U)
3012 #define DMA_ES_ERRCHN_SHIFT                      (8U)
3013 /*! ERRCHN - Error Channel Number or Canceled Channel Number */
3014 #define DMA_ES_ERRCHN(x)                         (((uint32_t)(((uint32_t)(x)) << DMA_ES_ERRCHN_SHIFT)) & DMA_ES_ERRCHN_MASK)
3015 
3016 #define DMA_ES_CPE_MASK                          (0x4000U)
3017 #define DMA_ES_CPE_SHIFT                         (14U)
3018 /*! CPE - Channel Priority Error
3019  *  0b0..No channel priority error
3020  *  0b1..The last recorded error was a configuration error in the channel priorities . Channel priorities are not unique.
3021  */
3022 #define DMA_ES_CPE(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_CPE_SHIFT)) & DMA_ES_CPE_MASK)
3023 
3024 #define DMA_ES_ECX_MASK                          (0x10000U)
3025 #define DMA_ES_ECX_SHIFT                         (16U)
3026 /*! ECX - Transfer Canceled
3027  *  0b0..No canceled transfers
3028  *  0b1..The last recorded entry was a canceled transfer by the error cancel transfer input
3029  */
3030 #define DMA_ES_ECX(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_ECX_SHIFT)) & DMA_ES_ECX_MASK)
3031 
3032 #define DMA_ES_VLD_MASK                          (0x80000000U)
3033 #define DMA_ES_VLD_SHIFT                         (31U)
3034 /*! VLD - VLD
3035  *  0b0..No ERR bits are set.
3036  *  0b1..At least one ERR bit is set indicating a valid error exists that has not been cleared.
3037  */
3038 #define DMA_ES_VLD(x)                            (((uint32_t)(((uint32_t)(x)) << DMA_ES_VLD_SHIFT)) & DMA_ES_VLD_MASK)
3039 /*! @} */
3040 
3041 /*! @name ERQ - Enable Request Register */
3042 /*! @{ */
3043 
3044 #define DMA_ERQ_ERQ0_MASK                        (0x1U)
3045 #define DMA_ERQ_ERQ0_SHIFT                       (0U)
3046 /*! ERQ0 - Enable DMA Request 0
3047  *  0b0..The DMA request signal for the corresponding channel is disabled
3048  *  0b1..The DMA request signal for the corresponding channel is enabled
3049  */
3050 #define DMA_ERQ_ERQ0(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ0_SHIFT)) & DMA_ERQ_ERQ0_MASK)
3051 
3052 #define DMA_ERQ_ERQ1_MASK                        (0x2U)
3053 #define DMA_ERQ_ERQ1_SHIFT                       (1U)
3054 /*! ERQ1 - Enable DMA Request 1
3055  *  0b0..The DMA request signal for the corresponding channel is disabled
3056  *  0b1..The DMA request signal for the corresponding channel is enabled
3057  */
3058 #define DMA_ERQ_ERQ1(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ1_SHIFT)) & DMA_ERQ_ERQ1_MASK)
3059 
3060 #define DMA_ERQ_ERQ2_MASK                        (0x4U)
3061 #define DMA_ERQ_ERQ2_SHIFT                       (2U)
3062 /*! ERQ2 - Enable DMA Request 2
3063  *  0b0..The DMA request signal for the corresponding channel is disabled
3064  *  0b1..The DMA request signal for the corresponding channel is enabled
3065  */
3066 #define DMA_ERQ_ERQ2(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ2_SHIFT)) & DMA_ERQ_ERQ2_MASK)
3067 
3068 #define DMA_ERQ_ERQ3_MASK                        (0x8U)
3069 #define DMA_ERQ_ERQ3_SHIFT                       (3U)
3070 /*! ERQ3 - Enable DMA Request 3
3071  *  0b0..The DMA request signal for the corresponding channel is disabled
3072  *  0b1..The DMA request signal for the corresponding channel is enabled
3073  */
3074 #define DMA_ERQ_ERQ3(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ3_SHIFT)) & DMA_ERQ_ERQ3_MASK)
3075 
3076 #define DMA_ERQ_ERQ4_MASK                        (0x10U)
3077 #define DMA_ERQ_ERQ4_SHIFT                       (4U)
3078 /*! ERQ4 - Enable DMA Request 4
3079  *  0b0..The DMA request signal for the corresponding channel is disabled
3080  *  0b1..The DMA request signal for the corresponding channel is enabled
3081  */
3082 #define DMA_ERQ_ERQ4(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ4_SHIFT)) & DMA_ERQ_ERQ4_MASK)
3083 
3084 #define DMA_ERQ_ERQ5_MASK                        (0x20U)
3085 #define DMA_ERQ_ERQ5_SHIFT                       (5U)
3086 /*! ERQ5 - Enable DMA Request 5
3087  *  0b0..The DMA request signal for the corresponding channel is disabled
3088  *  0b1..The DMA request signal for the corresponding channel is enabled
3089  */
3090 #define DMA_ERQ_ERQ5(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ5_SHIFT)) & DMA_ERQ_ERQ5_MASK)
3091 
3092 #define DMA_ERQ_ERQ6_MASK                        (0x40U)
3093 #define DMA_ERQ_ERQ6_SHIFT                       (6U)
3094 /*! ERQ6 - Enable DMA Request 6
3095  *  0b0..The DMA request signal for the corresponding channel is disabled
3096  *  0b1..The DMA request signal for the corresponding channel is enabled
3097  */
3098 #define DMA_ERQ_ERQ6(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ6_SHIFT)) & DMA_ERQ_ERQ6_MASK)
3099 
3100 #define DMA_ERQ_ERQ7_MASK                        (0x80U)
3101 #define DMA_ERQ_ERQ7_SHIFT                       (7U)
3102 /*! ERQ7 - Enable DMA Request 7
3103  *  0b0..The DMA request signal for the corresponding channel is disabled
3104  *  0b1..The DMA request signal for the corresponding channel is enabled
3105  */
3106 #define DMA_ERQ_ERQ7(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ7_SHIFT)) & DMA_ERQ_ERQ7_MASK)
3107 /*! @} */
3108 
3109 /*! @name EEI - Enable Error Interrupt Register */
3110 /*! @{ */
3111 
3112 #define DMA_EEI_EEI0_MASK                        (0x1U)
3113 #define DMA_EEI_EEI0_SHIFT                       (0U)
3114 /*! EEI0 - Enable Error Interrupt 0
3115  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3116  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3117  */
3118 #define DMA_EEI_EEI0(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI0_SHIFT)) & DMA_EEI_EEI0_MASK)
3119 
3120 #define DMA_EEI_EEI1_MASK                        (0x2U)
3121 #define DMA_EEI_EEI1_SHIFT                       (1U)
3122 /*! EEI1 - Enable Error Interrupt 1
3123  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3124  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3125  */
3126 #define DMA_EEI_EEI1(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI1_SHIFT)) & DMA_EEI_EEI1_MASK)
3127 
3128 #define DMA_EEI_EEI2_MASK                        (0x4U)
3129 #define DMA_EEI_EEI2_SHIFT                       (2U)
3130 /*! EEI2 - Enable Error Interrupt 2
3131  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3132  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3133  */
3134 #define DMA_EEI_EEI2(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI2_SHIFT)) & DMA_EEI_EEI2_MASK)
3135 
3136 #define DMA_EEI_EEI3_MASK                        (0x8U)
3137 #define DMA_EEI_EEI3_SHIFT                       (3U)
3138 /*! EEI3 - Enable Error Interrupt 3
3139  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3140  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3141  */
3142 #define DMA_EEI_EEI3(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI3_SHIFT)) & DMA_EEI_EEI3_MASK)
3143 
3144 #define DMA_EEI_EEI4_MASK                        (0x10U)
3145 #define DMA_EEI_EEI4_SHIFT                       (4U)
3146 /*! EEI4 - Enable Error Interrupt 4
3147  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3148  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3149  */
3150 #define DMA_EEI_EEI4(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI4_SHIFT)) & DMA_EEI_EEI4_MASK)
3151 
3152 #define DMA_EEI_EEI5_MASK                        (0x20U)
3153 #define DMA_EEI_EEI5_SHIFT                       (5U)
3154 /*! EEI5 - Enable Error Interrupt 5
3155  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3156  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3157  */
3158 #define DMA_EEI_EEI5(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI5_SHIFT)) & DMA_EEI_EEI5_MASK)
3159 
3160 #define DMA_EEI_EEI6_MASK                        (0x40U)
3161 #define DMA_EEI_EEI6_SHIFT                       (6U)
3162 /*! EEI6 - Enable Error Interrupt 6
3163  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3164  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3165  */
3166 #define DMA_EEI_EEI6(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI6_SHIFT)) & DMA_EEI_EEI6_MASK)
3167 
3168 #define DMA_EEI_EEI7_MASK                        (0x80U)
3169 #define DMA_EEI_EEI7_SHIFT                       (7U)
3170 /*! EEI7 - Enable Error Interrupt 7
3171  *  0b0..The error signal for corresponding channel does not generate an error interrupt
3172  *  0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
3173  */
3174 #define DMA_EEI_EEI7(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI7_SHIFT)) & DMA_EEI_EEI7_MASK)
3175 /*! @} */
3176 
3177 /*! @name CEEI - Clear Enable Error Interrupt Register */
3178 /*! @{ */
3179 
3180 #define DMA_CEEI_CEEI_MASK                       (0x7U)
3181 #define DMA_CEEI_CEEI_SHIFT                      (0U)
3182 /*! CEEI - Clear Enable Error Interrupt */
3183 #define DMA_CEEI_CEEI(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CEEI_SHIFT)) & DMA_CEEI_CEEI_MASK)
3184 
3185 #define DMA_CEEI_CAEE_MASK                       (0x40U)
3186 #define DMA_CEEI_CAEE_SHIFT                      (6U)
3187 /*! CAEE - Clear All Enable Error Interrupts
3188  *  0b0..Clear only the EEI bit specified in the CEEI field
3189  *  0b1..Clear all bits in EEI
3190  */
3191 #define DMA_CEEI_CAEE(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CAEE_SHIFT)) & DMA_CEEI_CAEE_MASK)
3192 
3193 #define DMA_CEEI_NOP_MASK                        (0x80U)
3194 #define DMA_CEEI_NOP_SHIFT                       (7U)
3195 /*! NOP - No Op enable
3196  *  0b0..Normal operation
3197  *  0b1..No operation, ignore the other bits in this register
3198  */
3199 #define DMA_CEEI_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_NOP_SHIFT)) & DMA_CEEI_NOP_MASK)
3200 /*! @} */
3201 
3202 /*! @name SEEI - Set Enable Error Interrupt Register */
3203 /*! @{ */
3204 
3205 #define DMA_SEEI_SEEI_MASK                       (0x7U)
3206 #define DMA_SEEI_SEEI_SHIFT                      (0U)
3207 /*! SEEI - Set Enable Error Interrupt */
3208 #define DMA_SEEI_SEEI(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SEEI_SHIFT)) & DMA_SEEI_SEEI_MASK)
3209 
3210 #define DMA_SEEI_SAEE_MASK                       (0x40U)
3211 #define DMA_SEEI_SAEE_SHIFT                      (6U)
3212 /*! SAEE - Sets All Enable Error Interrupts
3213  *  0b0..Set only the EEI bit specified in the SEEI field.
3214  *  0b1..Sets all bits in EEI
3215  */
3216 #define DMA_SEEI_SAEE(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SAEE_SHIFT)) & DMA_SEEI_SAEE_MASK)
3217 
3218 #define DMA_SEEI_NOP_MASK                        (0x80U)
3219 #define DMA_SEEI_NOP_SHIFT                       (7U)
3220 /*! NOP - No Op enable
3221  *  0b0..Normal operation
3222  *  0b1..No operation, ignore the other bits in this register
3223  */
3224 #define DMA_SEEI_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_NOP_SHIFT)) & DMA_SEEI_NOP_MASK)
3225 /*! @} */
3226 
3227 /*! @name CERQ - Clear Enable Request Register */
3228 /*! @{ */
3229 
3230 #define DMA_CERQ_CERQ_MASK                       (0x7U)
3231 #define DMA_CERQ_CERQ_SHIFT                      (0U)
3232 /*! CERQ - Clear Enable Request */
3233 #define DMA_CERQ_CERQ(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CERQ_SHIFT)) & DMA_CERQ_CERQ_MASK)
3234 
3235 #define DMA_CERQ_CAER_MASK                       (0x40U)
3236 #define DMA_CERQ_CAER_SHIFT                      (6U)
3237 /*! CAER - Clear All Enable Requests
3238  *  0b0..Clear only the ERQ bit specified in the CERQ field
3239  *  0b1..Clear all bits in ERQ
3240  */
3241 #define DMA_CERQ_CAER(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CAER_SHIFT)) & DMA_CERQ_CAER_MASK)
3242 
3243 #define DMA_CERQ_NOP_MASK                        (0x80U)
3244 #define DMA_CERQ_NOP_SHIFT                       (7U)
3245 /*! NOP - No Op enable
3246  *  0b0..Normal operation
3247  *  0b1..No operation, ignore the other bits in this register
3248  */
3249 #define DMA_CERQ_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_NOP_SHIFT)) & DMA_CERQ_NOP_MASK)
3250 /*! @} */
3251 
3252 /*! @name SERQ - Set Enable Request Register */
3253 /*! @{ */
3254 
3255 #define DMA_SERQ_SERQ_MASK                       (0x7U)
3256 #define DMA_SERQ_SERQ_SHIFT                      (0U)
3257 /*! SERQ - Set Enable Request */
3258 #define DMA_SERQ_SERQ(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SERQ_SHIFT)) & DMA_SERQ_SERQ_MASK)
3259 
3260 #define DMA_SERQ_SAER_MASK                       (0x40U)
3261 #define DMA_SERQ_SAER_SHIFT                      (6U)
3262 /*! SAER - Set All Enable Requests
3263  *  0b0..Set only the ERQ bit specified in the SERQ field
3264  *  0b1..Set all bits in ERQ
3265  */
3266 #define DMA_SERQ_SAER(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SAER_SHIFT)) & DMA_SERQ_SAER_MASK)
3267 
3268 #define DMA_SERQ_NOP_MASK                        (0x80U)
3269 #define DMA_SERQ_NOP_SHIFT                       (7U)
3270 /*! NOP - No Op enable
3271  *  0b0..Normal operation
3272  *  0b1..No operation, ignore the other bits in this register
3273  */
3274 #define DMA_SERQ_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_NOP_SHIFT)) & DMA_SERQ_NOP_MASK)
3275 /*! @} */
3276 
3277 /*! @name CDNE - Clear DONE Status Bit Register */
3278 /*! @{ */
3279 
3280 #define DMA_CDNE_CDNE_MASK                       (0x7U)
3281 #define DMA_CDNE_CDNE_SHIFT                      (0U)
3282 /*! CDNE - Clear DONE Bit */
3283 #define DMA_CDNE_CDNE(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CDNE_SHIFT)) & DMA_CDNE_CDNE_MASK)
3284 
3285 #define DMA_CDNE_CADN_MASK                       (0x40U)
3286 #define DMA_CDNE_CADN_SHIFT                      (6U)
3287 /*! CADN - Clears All DONE Bits
3288  *  0b0..Clears only the TCDn_CSR[DONE] bit specified in the CDNE field
3289  *  0b1..Clears all bits in TCDn_CSR[DONE]
3290  */
3291 #define DMA_CDNE_CADN(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CADN_SHIFT)) & DMA_CDNE_CADN_MASK)
3292 
3293 #define DMA_CDNE_NOP_MASK                        (0x80U)
3294 #define DMA_CDNE_NOP_SHIFT                       (7U)
3295 /*! NOP - No Op enable
3296  *  0b0..Normal operation
3297  *  0b1..No operation, ignore the other bits in this register
3298  */
3299 #define DMA_CDNE_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_NOP_SHIFT)) & DMA_CDNE_NOP_MASK)
3300 /*! @} */
3301 
3302 /*! @name SSRT - Set START Bit Register */
3303 /*! @{ */
3304 
3305 #define DMA_SSRT_SSRT_MASK                       (0x7U)
3306 #define DMA_SSRT_SSRT_SHIFT                      (0U)
3307 /*! SSRT - Set START Bit */
3308 #define DMA_SSRT_SSRT(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SSRT_SHIFT)) & DMA_SSRT_SSRT_MASK)
3309 
3310 #define DMA_SSRT_SAST_MASK                       (0x40U)
3311 #define DMA_SSRT_SAST_SHIFT                      (6U)
3312 /*! SAST - Set All START Bits (activates all channels)
3313  *  0b0..Set only the TCDn_CSR[START] bit specified in the SSRT field
3314  *  0b1..Set all bits in TCDn_CSR[START]
3315  */
3316 #define DMA_SSRT_SAST(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SAST_SHIFT)) & DMA_SSRT_SAST_MASK)
3317 
3318 #define DMA_SSRT_NOP_MASK                        (0x80U)
3319 #define DMA_SSRT_NOP_SHIFT                       (7U)
3320 /*! NOP - No Op enable
3321  *  0b0..Normal operation
3322  *  0b1..No operation, ignore the other bits in this register
3323  */
3324 #define DMA_SSRT_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_NOP_SHIFT)) & DMA_SSRT_NOP_MASK)
3325 /*! @} */
3326 
3327 /*! @name CERR - Clear Error Register */
3328 /*! @{ */
3329 
3330 #define DMA_CERR_CERR_MASK                       (0x7U)
3331 #define DMA_CERR_CERR_SHIFT                      (0U)
3332 /*! CERR - Clear Error Indicator */
3333 #define DMA_CERR_CERR(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CERR_SHIFT)) & DMA_CERR_CERR_MASK)
3334 
3335 #define DMA_CERR_CAEI_MASK                       (0x40U)
3336 #define DMA_CERR_CAEI_SHIFT                      (6U)
3337 /*! CAEI - Clear All Error Indicators
3338  *  0b0..Clear only the ERR bit specified in the CERR field
3339  *  0b1..Clear all bits in ERR
3340  */
3341 #define DMA_CERR_CAEI(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CAEI_SHIFT)) & DMA_CERR_CAEI_MASK)
3342 
3343 #define DMA_CERR_NOP_MASK                        (0x80U)
3344 #define DMA_CERR_NOP_SHIFT                       (7U)
3345 /*! NOP - No Op enable
3346  *  0b0..Normal operation
3347  *  0b1..No operation, ignore the other bits in this register
3348  */
3349 #define DMA_CERR_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_CERR_NOP_SHIFT)) & DMA_CERR_NOP_MASK)
3350 /*! @} */
3351 
3352 /*! @name CINT - Clear Interrupt Request Register */
3353 /*! @{ */
3354 
3355 #define DMA_CINT_CINT_MASK                       (0x7U)
3356 #define DMA_CINT_CINT_SHIFT                      (0U)
3357 /*! CINT - Clear Interrupt Request */
3358 #define DMA_CINT_CINT(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CINT_SHIFT)) & DMA_CINT_CINT_MASK)
3359 
3360 #define DMA_CINT_CAIR_MASK                       (0x40U)
3361 #define DMA_CINT_CAIR_SHIFT                      (6U)
3362 /*! CAIR - Clear All Interrupt Requests
3363  *  0b0..Clear only the INT bit specified in the CINT field
3364  *  0b1..Clear all bits in INT
3365  */
3366 #define DMA_CINT_CAIR(x)                         (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CAIR_SHIFT)) & DMA_CINT_CAIR_MASK)
3367 
3368 #define DMA_CINT_NOP_MASK                        (0x80U)
3369 #define DMA_CINT_NOP_SHIFT                       (7U)
3370 /*! NOP - No Op enable
3371  *  0b0..Normal operation
3372  *  0b1..No operation, ignore the other bits in this register
3373  */
3374 #define DMA_CINT_NOP(x)                          (((uint8_t)(((uint8_t)(x)) << DMA_CINT_NOP_SHIFT)) & DMA_CINT_NOP_MASK)
3375 /*! @} */
3376 
3377 /*! @name INT - Interrupt Request Register */
3378 /*! @{ */
3379 
3380 #define DMA_INT_INT0_MASK                        (0x1U)
3381 #define DMA_INT_INT0_SHIFT                       (0U)
3382 /*! INT0 - Interrupt Request 0
3383  *  0b0..The interrupt request for corresponding channel is cleared
3384  *  0b1..The interrupt request for corresponding channel is active
3385  */
3386 #define DMA_INT_INT0(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT0_SHIFT)) & DMA_INT_INT0_MASK)
3387 
3388 #define DMA_INT_INT1_MASK                        (0x2U)
3389 #define DMA_INT_INT1_SHIFT                       (1U)
3390 /*! INT1 - Interrupt Request 1
3391  *  0b0..The interrupt request for corresponding channel is cleared
3392  *  0b1..The interrupt request for corresponding channel is active
3393  */
3394 #define DMA_INT_INT1(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT1_SHIFT)) & DMA_INT_INT1_MASK)
3395 
3396 #define DMA_INT_INT2_MASK                        (0x4U)
3397 #define DMA_INT_INT2_SHIFT                       (2U)
3398 /*! INT2 - Interrupt Request 2
3399  *  0b0..The interrupt request for corresponding channel is cleared
3400  *  0b1..The interrupt request for corresponding channel is active
3401  */
3402 #define DMA_INT_INT2(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT2_SHIFT)) & DMA_INT_INT2_MASK)
3403 
3404 #define DMA_INT_INT3_MASK                        (0x8U)
3405 #define DMA_INT_INT3_SHIFT                       (3U)
3406 /*! INT3 - Interrupt Request 3
3407  *  0b0..The interrupt request for corresponding channel is cleared
3408  *  0b1..The interrupt request for corresponding channel is active
3409  */
3410 #define DMA_INT_INT3(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT3_SHIFT)) & DMA_INT_INT3_MASK)
3411 
3412 #define DMA_INT_INT4_MASK                        (0x10U)
3413 #define DMA_INT_INT4_SHIFT                       (4U)
3414 /*! INT4 - Interrupt Request 4
3415  *  0b0..The interrupt request for corresponding channel is cleared
3416  *  0b1..The interrupt request for corresponding channel is active
3417  */
3418 #define DMA_INT_INT4(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT4_SHIFT)) & DMA_INT_INT4_MASK)
3419 
3420 #define DMA_INT_INT5_MASK                        (0x20U)
3421 #define DMA_INT_INT5_SHIFT                       (5U)
3422 /*! INT5 - Interrupt Request 5
3423  *  0b0..The interrupt request for corresponding channel is cleared
3424  *  0b1..The interrupt request for corresponding channel is active
3425  */
3426 #define DMA_INT_INT5(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT5_SHIFT)) & DMA_INT_INT5_MASK)
3427 
3428 #define DMA_INT_INT6_MASK                        (0x40U)
3429 #define DMA_INT_INT6_SHIFT                       (6U)
3430 /*! INT6 - Interrupt Request 6
3431  *  0b0..The interrupt request for corresponding channel is cleared
3432  *  0b1..The interrupt request for corresponding channel is active
3433  */
3434 #define DMA_INT_INT6(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT6_SHIFT)) & DMA_INT_INT6_MASK)
3435 
3436 #define DMA_INT_INT7_MASK                        (0x80U)
3437 #define DMA_INT_INT7_SHIFT                       (7U)
3438 /*! INT7 - Interrupt Request 7
3439  *  0b0..The interrupt request for corresponding channel is cleared
3440  *  0b1..The interrupt request for corresponding channel is active
3441  */
3442 #define DMA_INT_INT7(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT7_SHIFT)) & DMA_INT_INT7_MASK)
3443 /*! @} */
3444 
3445 /*! @name ERR - Error Register */
3446 /*! @{ */
3447 
3448 #define DMA_ERR_ERR0_MASK                        (0x1U)
3449 #define DMA_ERR_ERR0_SHIFT                       (0U)
3450 /*! ERR0 - Error In Channel 0
3451  *  0b0..An error in this channel has not occurred
3452  *  0b1..An error in this channel has occurred
3453  */
3454 #define DMA_ERR_ERR0(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR0_SHIFT)) & DMA_ERR_ERR0_MASK)
3455 
3456 #define DMA_ERR_ERR1_MASK                        (0x2U)
3457 #define DMA_ERR_ERR1_SHIFT                       (1U)
3458 /*! ERR1 - Error In Channel 1
3459  *  0b0..An error in this channel has not occurred
3460  *  0b1..An error in this channel has occurred
3461  */
3462 #define DMA_ERR_ERR1(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR1_SHIFT)) & DMA_ERR_ERR1_MASK)
3463 
3464 #define DMA_ERR_ERR2_MASK                        (0x4U)
3465 #define DMA_ERR_ERR2_SHIFT                       (2U)
3466 /*! ERR2 - Error In Channel 2
3467  *  0b0..An error in this channel has not occurred
3468  *  0b1..An error in this channel has occurred
3469  */
3470 #define DMA_ERR_ERR2(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR2_SHIFT)) & DMA_ERR_ERR2_MASK)
3471 
3472 #define DMA_ERR_ERR3_MASK                        (0x8U)
3473 #define DMA_ERR_ERR3_SHIFT                       (3U)
3474 /*! ERR3 - Error In Channel 3
3475  *  0b0..An error in this channel has not occurred
3476  *  0b1..An error in this channel has occurred
3477  */
3478 #define DMA_ERR_ERR3(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR3_SHIFT)) & DMA_ERR_ERR3_MASK)
3479 
3480 #define DMA_ERR_ERR4_MASK                        (0x10U)
3481 #define DMA_ERR_ERR4_SHIFT                       (4U)
3482 /*! ERR4 - Error In Channel 4
3483  *  0b0..An error in this channel has not occurred
3484  *  0b1..An error in this channel has occurred
3485  */
3486 #define DMA_ERR_ERR4(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR4_SHIFT)) & DMA_ERR_ERR4_MASK)
3487 
3488 #define DMA_ERR_ERR5_MASK                        (0x20U)
3489 #define DMA_ERR_ERR5_SHIFT                       (5U)
3490 /*! ERR5 - Error In Channel 5
3491  *  0b0..An error in this channel has not occurred
3492  *  0b1..An error in this channel has occurred
3493  */
3494 #define DMA_ERR_ERR5(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR5_SHIFT)) & DMA_ERR_ERR5_MASK)
3495 
3496 #define DMA_ERR_ERR6_MASK                        (0x40U)
3497 #define DMA_ERR_ERR6_SHIFT                       (6U)
3498 /*! ERR6 - Error In Channel 6
3499  *  0b0..An error in this channel has not occurred
3500  *  0b1..An error in this channel has occurred
3501  */
3502 #define DMA_ERR_ERR6(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR6_SHIFT)) & DMA_ERR_ERR6_MASK)
3503 
3504 #define DMA_ERR_ERR7_MASK                        (0x80U)
3505 #define DMA_ERR_ERR7_SHIFT                       (7U)
3506 /*! ERR7 - Error In Channel 7
3507  *  0b0..An error in this channel has not occurred
3508  *  0b1..An error in this channel has occurred
3509  */
3510 #define DMA_ERR_ERR7(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR7_SHIFT)) & DMA_ERR_ERR7_MASK)
3511 /*! @} */
3512 
3513 /*! @name HRS - Hardware Request Status Register */
3514 /*! @{ */
3515 
3516 #define DMA_HRS_HRS0_MASK                        (0x1U)
3517 #define DMA_HRS_HRS0_SHIFT                       (0U)
3518 /*! HRS0 - Hardware Request Status Channel 0
3519  *  0b0..A hardware service request for channel 0 is not present
3520  *  0b1..A hardware service request for channel 0 is present
3521  */
3522 #define DMA_HRS_HRS0(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS0_SHIFT)) & DMA_HRS_HRS0_MASK)
3523 
3524 #define DMA_HRS_HRS1_MASK                        (0x2U)
3525 #define DMA_HRS_HRS1_SHIFT                       (1U)
3526 /*! HRS1 - Hardware Request Status Channel 1
3527  *  0b0..A hardware service request for channel 1 is not present
3528  *  0b1..A hardware service request for channel 1 is present
3529  */
3530 #define DMA_HRS_HRS1(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS1_SHIFT)) & DMA_HRS_HRS1_MASK)
3531 
3532 #define DMA_HRS_HRS2_MASK                        (0x4U)
3533 #define DMA_HRS_HRS2_SHIFT                       (2U)
3534 /*! HRS2 - Hardware Request Status Channel 2
3535  *  0b0..A hardware service request for channel 2 is not present
3536  *  0b1..A hardware service request for channel 2 is present
3537  */
3538 #define DMA_HRS_HRS2(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS2_SHIFT)) & DMA_HRS_HRS2_MASK)
3539 
3540 #define DMA_HRS_HRS3_MASK                        (0x8U)
3541 #define DMA_HRS_HRS3_SHIFT                       (3U)
3542 /*! HRS3 - Hardware Request Status Channel 3
3543  *  0b0..A hardware service request for channel 3 is not present
3544  *  0b1..A hardware service request for channel 3 is present
3545  */
3546 #define DMA_HRS_HRS3(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS3_SHIFT)) & DMA_HRS_HRS3_MASK)
3547 
3548 #define DMA_HRS_HRS4_MASK                        (0x10U)
3549 #define DMA_HRS_HRS4_SHIFT                       (4U)
3550 /*! HRS4 - Hardware Request Status Channel 4
3551  *  0b0..A hardware service request for channel 4 is not present
3552  *  0b1..A hardware service request for channel 4 is present
3553  */
3554 #define DMA_HRS_HRS4(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS4_SHIFT)) & DMA_HRS_HRS4_MASK)
3555 
3556 #define DMA_HRS_HRS5_MASK                        (0x20U)
3557 #define DMA_HRS_HRS5_SHIFT                       (5U)
3558 /*! HRS5 - Hardware Request Status Channel 5
3559  *  0b0..A hardware service request for channel 5 is not present
3560  *  0b1..A hardware service request for channel 5 is present
3561  */
3562 #define DMA_HRS_HRS5(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS5_SHIFT)) & DMA_HRS_HRS5_MASK)
3563 
3564 #define DMA_HRS_HRS6_MASK                        (0x40U)
3565 #define DMA_HRS_HRS6_SHIFT                       (6U)
3566 /*! HRS6 - Hardware Request Status Channel 6
3567  *  0b0..A hardware service request for channel 6 is not present
3568  *  0b1..A hardware service request for channel 6 is present
3569  */
3570 #define DMA_HRS_HRS6(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS6_SHIFT)) & DMA_HRS_HRS6_MASK)
3571 
3572 #define DMA_HRS_HRS7_MASK                        (0x80U)
3573 #define DMA_HRS_HRS7_SHIFT                       (7U)
3574 /*! HRS7 - Hardware Request Status Channel 7
3575  *  0b0..A hardware service request for channel 7 is not present
3576  *  0b1..A hardware service request for channel 7 is present
3577  */
3578 #define DMA_HRS_HRS7(x)                          (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS7_SHIFT)) & DMA_HRS_HRS7_MASK)
3579 /*! @} */
3580 
3581 /*! @name EARS - Enable Asynchronous Request in Stop Register */
3582 /*! @{ */
3583 
3584 #define DMA_EARS_EDREQ_0_MASK                    (0x1U)
3585 #define DMA_EARS_EDREQ_0_SHIFT                   (0U)
3586 /*! EDREQ_0 - Enable asynchronous DMA request in stop mode for channel 0.
3587  *  0b0..Disable asynchronous DMA request for channel 0.
3588  *  0b1..Enable asynchronous DMA request for channel 0.
3589  */
3590 #define DMA_EARS_EDREQ_0(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_0_SHIFT)) & DMA_EARS_EDREQ_0_MASK)
3591 
3592 #define DMA_EARS_EDREQ_1_MASK                    (0x2U)
3593 #define DMA_EARS_EDREQ_1_SHIFT                   (1U)
3594 /*! EDREQ_1 - Enable asynchronous DMA request in stop mode for channel 1.
3595  *  0b0..Disable asynchronous DMA request for channel 1
3596  *  0b1..Enable asynchronous DMA request for channel 1.
3597  */
3598 #define DMA_EARS_EDREQ_1(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_1_SHIFT)) & DMA_EARS_EDREQ_1_MASK)
3599 
3600 #define DMA_EARS_EDREQ_2_MASK                    (0x4U)
3601 #define DMA_EARS_EDREQ_2_SHIFT                   (2U)
3602 /*! EDREQ_2 - Enable asynchronous DMA request in stop mode for channel 2.
3603  *  0b0..Disable asynchronous DMA request for channel 2.
3604  *  0b1..Enable asynchronous DMA request for channel 2.
3605  */
3606 #define DMA_EARS_EDREQ_2(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_2_SHIFT)) & DMA_EARS_EDREQ_2_MASK)
3607 
3608 #define DMA_EARS_EDREQ_3_MASK                    (0x8U)
3609 #define DMA_EARS_EDREQ_3_SHIFT                   (3U)
3610 /*! EDREQ_3 - Enable asynchronous DMA request in stop mode for channel 3.
3611  *  0b0..Disable asynchronous DMA request for channel 3.
3612  *  0b1..Enable asynchronous DMA request for channel 3.
3613  */
3614 #define DMA_EARS_EDREQ_3(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_3_SHIFT)) & DMA_EARS_EDREQ_3_MASK)
3615 
3616 #define DMA_EARS_EDREQ_4_MASK                    (0x10U)
3617 #define DMA_EARS_EDREQ_4_SHIFT                   (4U)
3618 /*! EDREQ_4 - Enable asynchronous DMA request in stop mode for channel 4
3619  *  0b0..Disable asynchronous DMA request for channel 4.
3620  *  0b1..Enable asynchronous DMA request for channel 4.
3621  */
3622 #define DMA_EARS_EDREQ_4(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_4_SHIFT)) & DMA_EARS_EDREQ_4_MASK)
3623 
3624 #define DMA_EARS_EDREQ_5_MASK                    (0x20U)
3625 #define DMA_EARS_EDREQ_5_SHIFT                   (5U)
3626 /*! EDREQ_5 - Enable asynchronous DMA request in stop mode for channel 5
3627  *  0b0..Disable asynchronous DMA request for channel 5.
3628  *  0b1..Enable asynchronous DMA request for channel 5.
3629  */
3630 #define DMA_EARS_EDREQ_5(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_5_SHIFT)) & DMA_EARS_EDREQ_5_MASK)
3631 
3632 #define DMA_EARS_EDREQ_6_MASK                    (0x40U)
3633 #define DMA_EARS_EDREQ_6_SHIFT                   (6U)
3634 /*! EDREQ_6 - Enable asynchronous DMA request in stop mode for channel 6
3635  *  0b0..Disable asynchronous DMA request for channel 6.
3636  *  0b1..Enable asynchronous DMA request for channel 6.
3637  */
3638 #define DMA_EARS_EDREQ_6(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_6_SHIFT)) & DMA_EARS_EDREQ_6_MASK)
3639 
3640 #define DMA_EARS_EDREQ_7_MASK                    (0x80U)
3641 #define DMA_EARS_EDREQ_7_SHIFT                   (7U)
3642 /*! EDREQ_7 - Enable asynchronous DMA request in stop mode for channel 7
3643  *  0b0..Disable asynchronous DMA request for channel 7.
3644  *  0b1..Enable asynchronous DMA request for channel 7.
3645  */
3646 #define DMA_EARS_EDREQ_7(x)                      (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_7_SHIFT)) & DMA_EARS_EDREQ_7_MASK)
3647 /*! @} */
3648 
3649 /*! @name DCHPRI3 - Channel Priority Register */
3650 /*! @{ */
3651 
3652 #define DMA_DCHPRI3_CHPRI_MASK                   (0x7U)
3653 #define DMA_DCHPRI3_CHPRI_SHIFT                  (0U)
3654 /*! CHPRI - Channel n Arbitration Priority */
3655 #define DMA_DCHPRI3_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_CHPRI_SHIFT)) & DMA_DCHPRI3_CHPRI_MASK)
3656 
3657 #define DMA_DCHPRI3_DPA_MASK                     (0x40U)
3658 #define DMA_DCHPRI3_DPA_SHIFT                    (6U)
3659 /*! DPA - Disable Preempt Ability. This field resets to 0.
3660  *  0b0..Channel n can suspend a lower priority channel.
3661  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3662  */
3663 #define DMA_DCHPRI3_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_DPA_SHIFT)) & DMA_DCHPRI3_DPA_MASK)
3664 
3665 #define DMA_DCHPRI3_ECP_MASK                     (0x80U)
3666 #define DMA_DCHPRI3_ECP_SHIFT                    (7U)
3667 /*! ECP - Enable Channel Preemption. This field resets to 0.
3668  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3669  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3670  */
3671 #define DMA_DCHPRI3_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_ECP_SHIFT)) & DMA_DCHPRI3_ECP_MASK)
3672 /*! @} */
3673 
3674 /*! @name DCHPRI2 - Channel Priority Register */
3675 /*! @{ */
3676 
3677 #define DMA_DCHPRI2_CHPRI_MASK                   (0x7U)
3678 #define DMA_DCHPRI2_CHPRI_SHIFT                  (0U)
3679 /*! CHPRI - Channel n Arbitration Priority */
3680 #define DMA_DCHPRI2_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_CHPRI_SHIFT)) & DMA_DCHPRI2_CHPRI_MASK)
3681 
3682 #define DMA_DCHPRI2_DPA_MASK                     (0x40U)
3683 #define DMA_DCHPRI2_DPA_SHIFT                    (6U)
3684 /*! DPA - Disable Preempt Ability. This field resets to 0.
3685  *  0b0..Channel n can suspend a lower priority channel.
3686  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3687  */
3688 #define DMA_DCHPRI2_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_DPA_SHIFT)) & DMA_DCHPRI2_DPA_MASK)
3689 
3690 #define DMA_DCHPRI2_ECP_MASK                     (0x80U)
3691 #define DMA_DCHPRI2_ECP_SHIFT                    (7U)
3692 /*! ECP - Enable Channel Preemption. This field resets to 0.
3693  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3694  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3695  */
3696 #define DMA_DCHPRI2_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_ECP_SHIFT)) & DMA_DCHPRI2_ECP_MASK)
3697 /*! @} */
3698 
3699 /*! @name DCHPRI1 - Channel Priority Register */
3700 /*! @{ */
3701 
3702 #define DMA_DCHPRI1_CHPRI_MASK                   (0x7U)
3703 #define DMA_DCHPRI1_CHPRI_SHIFT                  (0U)
3704 /*! CHPRI - Channel n Arbitration Priority */
3705 #define DMA_DCHPRI1_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_CHPRI_SHIFT)) & DMA_DCHPRI1_CHPRI_MASK)
3706 
3707 #define DMA_DCHPRI1_DPA_MASK                     (0x40U)
3708 #define DMA_DCHPRI1_DPA_SHIFT                    (6U)
3709 /*! DPA - Disable Preempt Ability. This field resets to 0.
3710  *  0b0..Channel n can suspend a lower priority channel.
3711  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3712  */
3713 #define DMA_DCHPRI1_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_DPA_SHIFT)) & DMA_DCHPRI1_DPA_MASK)
3714 
3715 #define DMA_DCHPRI1_ECP_MASK                     (0x80U)
3716 #define DMA_DCHPRI1_ECP_SHIFT                    (7U)
3717 /*! ECP - Enable Channel Preemption. This field resets to 0.
3718  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3719  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3720  */
3721 #define DMA_DCHPRI1_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_ECP_SHIFT)) & DMA_DCHPRI1_ECP_MASK)
3722 /*! @} */
3723 
3724 /*! @name DCHPRI0 - Channel Priority Register */
3725 /*! @{ */
3726 
3727 #define DMA_DCHPRI0_CHPRI_MASK                   (0x7U)
3728 #define DMA_DCHPRI0_CHPRI_SHIFT                  (0U)
3729 /*! CHPRI - Channel n Arbitration Priority */
3730 #define DMA_DCHPRI0_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_CHPRI_SHIFT)) & DMA_DCHPRI0_CHPRI_MASK)
3731 
3732 #define DMA_DCHPRI0_DPA_MASK                     (0x40U)
3733 #define DMA_DCHPRI0_DPA_SHIFT                    (6U)
3734 /*! DPA - Disable Preempt Ability. This field resets to 0.
3735  *  0b0..Channel n can suspend a lower priority channel.
3736  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3737  */
3738 #define DMA_DCHPRI0_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_DPA_SHIFT)) & DMA_DCHPRI0_DPA_MASK)
3739 
3740 #define DMA_DCHPRI0_ECP_MASK                     (0x80U)
3741 #define DMA_DCHPRI0_ECP_SHIFT                    (7U)
3742 /*! ECP - Enable Channel Preemption. This field resets to 0.
3743  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3744  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3745  */
3746 #define DMA_DCHPRI0_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_ECP_SHIFT)) & DMA_DCHPRI0_ECP_MASK)
3747 /*! @} */
3748 
3749 /*! @name DCHPRI7 - Channel Priority Register */
3750 /*! @{ */
3751 
3752 #define DMA_DCHPRI7_CHPRI_MASK                   (0x7U)
3753 #define DMA_DCHPRI7_CHPRI_SHIFT                  (0U)
3754 /*! CHPRI - Channel n Arbitration Priority */
3755 #define DMA_DCHPRI7_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_CHPRI_SHIFT)) & DMA_DCHPRI7_CHPRI_MASK)
3756 
3757 #define DMA_DCHPRI7_DPA_MASK                     (0x40U)
3758 #define DMA_DCHPRI7_DPA_SHIFT                    (6U)
3759 /*! DPA - Disable Preempt Ability. This field resets to 0.
3760  *  0b0..Channel n can suspend a lower priority channel.
3761  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3762  */
3763 #define DMA_DCHPRI7_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_DPA_SHIFT)) & DMA_DCHPRI7_DPA_MASK)
3764 
3765 #define DMA_DCHPRI7_ECP_MASK                     (0x80U)
3766 #define DMA_DCHPRI7_ECP_SHIFT                    (7U)
3767 /*! ECP - Enable Channel Preemption. This field resets to 0.
3768  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3769  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3770  */
3771 #define DMA_DCHPRI7_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_ECP_SHIFT)) & DMA_DCHPRI7_ECP_MASK)
3772 /*! @} */
3773 
3774 /*! @name DCHPRI6 - Channel Priority Register */
3775 /*! @{ */
3776 
3777 #define DMA_DCHPRI6_CHPRI_MASK                   (0x7U)
3778 #define DMA_DCHPRI6_CHPRI_SHIFT                  (0U)
3779 /*! CHPRI - Channel n Arbitration Priority */
3780 #define DMA_DCHPRI6_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_CHPRI_SHIFT)) & DMA_DCHPRI6_CHPRI_MASK)
3781 
3782 #define DMA_DCHPRI6_DPA_MASK                     (0x40U)
3783 #define DMA_DCHPRI6_DPA_SHIFT                    (6U)
3784 /*! DPA - Disable Preempt Ability. This field resets to 0.
3785  *  0b0..Channel n can suspend a lower priority channel.
3786  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3787  */
3788 #define DMA_DCHPRI6_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_DPA_SHIFT)) & DMA_DCHPRI6_DPA_MASK)
3789 
3790 #define DMA_DCHPRI6_ECP_MASK                     (0x80U)
3791 #define DMA_DCHPRI6_ECP_SHIFT                    (7U)
3792 /*! ECP - Enable Channel Preemption. This field resets to 0.
3793  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3794  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3795  */
3796 #define DMA_DCHPRI6_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_ECP_SHIFT)) & DMA_DCHPRI6_ECP_MASK)
3797 /*! @} */
3798 
3799 /*! @name DCHPRI5 - Channel Priority Register */
3800 /*! @{ */
3801 
3802 #define DMA_DCHPRI5_CHPRI_MASK                   (0x7U)
3803 #define DMA_DCHPRI5_CHPRI_SHIFT                  (0U)
3804 /*! CHPRI - Channel n Arbitration Priority */
3805 #define DMA_DCHPRI5_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_CHPRI_SHIFT)) & DMA_DCHPRI5_CHPRI_MASK)
3806 
3807 #define DMA_DCHPRI5_DPA_MASK                     (0x40U)
3808 #define DMA_DCHPRI5_DPA_SHIFT                    (6U)
3809 /*! DPA - Disable Preempt Ability. This field resets to 0.
3810  *  0b0..Channel n can suspend a lower priority channel.
3811  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3812  */
3813 #define DMA_DCHPRI5_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_DPA_SHIFT)) & DMA_DCHPRI5_DPA_MASK)
3814 
3815 #define DMA_DCHPRI5_ECP_MASK                     (0x80U)
3816 #define DMA_DCHPRI5_ECP_SHIFT                    (7U)
3817 /*! ECP - Enable Channel Preemption. This field resets to 0.
3818  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3819  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3820  */
3821 #define DMA_DCHPRI5_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_ECP_SHIFT)) & DMA_DCHPRI5_ECP_MASK)
3822 /*! @} */
3823 
3824 /*! @name DCHPRI4 - Channel Priority Register */
3825 /*! @{ */
3826 
3827 #define DMA_DCHPRI4_CHPRI_MASK                   (0x7U)
3828 #define DMA_DCHPRI4_CHPRI_SHIFT                  (0U)
3829 /*! CHPRI - Channel n Arbitration Priority */
3830 #define DMA_DCHPRI4_CHPRI(x)                     (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_CHPRI_SHIFT)) & DMA_DCHPRI4_CHPRI_MASK)
3831 
3832 #define DMA_DCHPRI4_DPA_MASK                     (0x40U)
3833 #define DMA_DCHPRI4_DPA_SHIFT                    (6U)
3834 /*! DPA - Disable Preempt Ability. This field resets to 0.
3835  *  0b0..Channel n can suspend a lower priority channel.
3836  *  0b1..Channel n cannot suspend any channel, regardless of channel priority.
3837  */
3838 #define DMA_DCHPRI4_DPA(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_DPA_SHIFT)) & DMA_DCHPRI4_DPA_MASK)
3839 
3840 #define DMA_DCHPRI4_ECP_MASK                     (0x80U)
3841 #define DMA_DCHPRI4_ECP_SHIFT                    (7U)
3842 /*! ECP - Enable Channel Preemption. This field resets to 0.
3843  *  0b0..Channel n cannot be suspended by a higher priority channel's service request.
3844  *  0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
3845  */
3846 #define DMA_DCHPRI4_ECP(x)                       (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_ECP_SHIFT)) & DMA_DCHPRI4_ECP_MASK)
3847 /*! @} */
3848 
3849 /*! @name SADDR - TCD Source Address */
3850 /*! @{ */
3851 
3852 #define DMA_SADDR_SADDR_MASK                     (0xFFFFFFFFU)
3853 #define DMA_SADDR_SADDR_SHIFT                    (0U)
3854 /*! SADDR - Source Address */
3855 #define DMA_SADDR_SADDR(x)                       (((uint32_t)(((uint32_t)(x)) << DMA_SADDR_SADDR_SHIFT)) & DMA_SADDR_SADDR_MASK)
3856 /*! @} */
3857 
3858 /* The count of DMA_SADDR */
3859 #define DMA_SADDR_COUNT                          (8U)
3860 
3861 /*! @name SOFF - TCD Signed Source Address Offset */
3862 /*! @{ */
3863 
3864 #define DMA_SOFF_SOFF_MASK                       (0xFFFFU)
3865 #define DMA_SOFF_SOFF_SHIFT                      (0U)
3866 /*! SOFF - Source address signed offset */
3867 #define DMA_SOFF_SOFF(x)                         (((uint16_t)(((uint16_t)(x)) << DMA_SOFF_SOFF_SHIFT)) & DMA_SOFF_SOFF_MASK)
3868 /*! @} */
3869 
3870 /* The count of DMA_SOFF */
3871 #define DMA_SOFF_COUNT                           (8U)
3872 
3873 /*! @name ATTR - TCD Transfer Attributes */
3874 /*! @{ */
3875 
3876 #define DMA_ATTR_DSIZE_MASK                      (0x7U)
3877 #define DMA_ATTR_DSIZE_SHIFT                     (0U)
3878 /*! DSIZE - Destination data transfer size */
3879 #define DMA_ATTR_DSIZE(x)                        (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DSIZE_SHIFT)) & DMA_ATTR_DSIZE_MASK)
3880 
3881 #define DMA_ATTR_DMOD_MASK                       (0xF8U)
3882 #define DMA_ATTR_DMOD_SHIFT                      (3U)
3883 /*! DMOD - Destination Address Modulo */
3884 #define DMA_ATTR_DMOD(x)                         (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DMOD_SHIFT)) & DMA_ATTR_DMOD_MASK)
3885 
3886 #define DMA_ATTR_SSIZE_MASK                      (0x700U)
3887 #define DMA_ATTR_SSIZE_SHIFT                     (8U)
3888 /*! SSIZE - Source data transfer size
3889  *  0b000..8-bit
3890  *  0b001..16-bit
3891  *  0b010..32-bit
3892  *  0b011..Reserved
3893  *  0b100..16-byte
3894  *  0b101..32-byte
3895  *  0b110..Reserved
3896  *  0b111..Reserved
3897  */
3898 #define DMA_ATTR_SSIZE(x)                        (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SSIZE_SHIFT)) & DMA_ATTR_SSIZE_MASK)
3899 
3900 #define DMA_ATTR_SMOD_MASK                       (0xF800U)
3901 #define DMA_ATTR_SMOD_SHIFT                      (11U)
3902 /*! SMOD - Source Address Modulo
3903  *  0b00000..Source address modulo feature is disabled
3904  *  0b00001-0b11111..This value defines a specific address range specified to be the value after SADDR + SOFF
3905  *                   calculation is performed on the original register value. Setting this field provides the ability
3906  *                   to implement a circular data queue easily. For data queues requiring power-of-2 size bytes, the
3907  *                   queue should start at a 0-modulo-size address and the SMOD field should be set to the
3908  *                   appropriate value for the queue, freezing the desired number of upper address bits. The value
3909  *                   programmed into this field specifies the number of lower address bits allowed to change. For a
3910  *                   circular queue application, the SOFF is typically set to the transfer size to implement
3911  *                   post-increment addressing with the SMOD function constraining the addresses to a 0-modulo-size range.
3912  */
3913 #define DMA_ATTR_SMOD(x)                         (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SMOD_SHIFT)) & DMA_ATTR_SMOD_MASK)
3914 /*! @} */
3915 
3916 /* The count of DMA_ATTR */
3917 #define DMA_ATTR_COUNT                           (8U)
3918 
3919 /*! @name NBYTES_MLNO - TCD Minor Byte Count (Minor Loop Mapping Disabled) */
3920 /*! @{ */
3921 
3922 #define DMA_NBYTES_MLNO_NBYTES_MASK              (0xFFFFFFFFU)
3923 #define DMA_NBYTES_MLNO_NBYTES_SHIFT             (0U)
3924 /*! NBYTES - Minor Byte Transfer Count */
3925 #define DMA_NBYTES_MLNO_NBYTES(x)                (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLNO_NBYTES_SHIFT)) & DMA_NBYTES_MLNO_NBYTES_MASK)
3926 /*! @} */
3927 
3928 /* The count of DMA_NBYTES_MLNO */
3929 #define DMA_NBYTES_MLNO_COUNT                    (8U)
3930 
3931 /*! @name NBYTES_MLOFFNO - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled) */
3932 /*! @{ */
3933 
3934 #define DMA_NBYTES_MLOFFNO_NBYTES_MASK           (0x3FFFFFFFU)
3935 #define DMA_NBYTES_MLOFFNO_NBYTES_SHIFT          (0U)
3936 /*! NBYTES - Minor Byte Transfer Count */
3937 #define DMA_NBYTES_MLOFFNO_NBYTES(x)             (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFNO_NBYTES_MASK)
3938 
3939 #define DMA_NBYTES_MLOFFNO_DMLOE_MASK            (0x40000000U)
3940 #define DMA_NBYTES_MLOFFNO_DMLOE_SHIFT           (30U)
3941 /*! DMLOE - Destination Minor Loop Offset enable
3942  *  0b0..The minor loop offset is not applied to the DADDR
3943  *  0b1..The minor loop offset is applied to the DADDR
3944  */
3945 #define DMA_NBYTES_MLOFFNO_DMLOE(x)              (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_DMLOE_MASK)
3946 
3947 #define DMA_NBYTES_MLOFFNO_SMLOE_MASK            (0x80000000U)
3948 #define DMA_NBYTES_MLOFFNO_SMLOE_SHIFT           (31U)
3949 /*! SMLOE - Source Minor Loop Offset Enable
3950  *  0b0..The minor loop offset is not applied to the SADDR
3951  *  0b1..The minor loop offset is applied to the SADDR
3952  */
3953 #define DMA_NBYTES_MLOFFNO_SMLOE(x)              (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_SMLOE_MASK)
3954 /*! @} */
3955 
3956 /* The count of DMA_NBYTES_MLOFFNO */
3957 #define DMA_NBYTES_MLOFFNO_COUNT                 (8U)
3958 
3959 /*! @name NBYTES_MLOFFYES - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled) */
3960 /*! @{ */
3961 
3962 #define DMA_NBYTES_MLOFFYES_NBYTES_MASK          (0x3FFU)
3963 #define DMA_NBYTES_MLOFFYES_NBYTES_SHIFT         (0U)
3964 /*! NBYTES - Minor Byte Transfer Count */
3965 #define DMA_NBYTES_MLOFFYES_NBYTES(x)            (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFYES_NBYTES_MASK)
3966 
3967 #define DMA_NBYTES_MLOFFYES_MLOFF_MASK           (0x3FFFFC00U)
3968 #define DMA_NBYTES_MLOFFYES_MLOFF_SHIFT          (10U)
3969 /*! MLOFF - If SMLOE or DMLOE is set, this field represents a sign-extended offset applied to the
3970  *    source or destination address to form the next-state value after the minor loop completes.
3971  */
3972 #define DMA_NBYTES_MLOFFYES_MLOFF(x)             (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_MLOFF_SHIFT)) & DMA_NBYTES_MLOFFYES_MLOFF_MASK)
3973 
3974 #define DMA_NBYTES_MLOFFYES_DMLOE_MASK           (0x40000000U)
3975 #define DMA_NBYTES_MLOFFYES_DMLOE_SHIFT          (30U)
3976 /*! DMLOE - Destination Minor Loop Offset enable
3977  *  0b0..The minor loop offset is not applied to the DADDR
3978  *  0b1..The minor loop offset is applied to the DADDR
3979  */
3980 #define DMA_NBYTES_MLOFFYES_DMLOE(x)             (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_DMLOE_MASK)
3981 
3982 #define DMA_NBYTES_MLOFFYES_SMLOE_MASK           (0x80000000U)
3983 #define DMA_NBYTES_MLOFFYES_SMLOE_SHIFT          (31U)
3984 /*! SMLOE - Source Minor Loop Offset Enable
3985  *  0b0..The minor loop offset is not applied to the SADDR
3986  *  0b1..The minor loop offset is applied to the SADDR
3987  */
3988 #define DMA_NBYTES_MLOFFYES_SMLOE(x)             (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_SMLOE_MASK)
3989 /*! @} */
3990 
3991 /* The count of DMA_NBYTES_MLOFFYES */
3992 #define DMA_NBYTES_MLOFFYES_COUNT                (8U)
3993 
3994 /*! @name SLAST - TCD Last Source Address Adjustment */
3995 /*! @{ */
3996 
3997 #define DMA_SLAST_SLAST_MASK                     (0xFFFFFFFFU)
3998 #define DMA_SLAST_SLAST_SHIFT                    (0U)
3999 /*! SLAST - Last Source Address Adjustment */
4000 #define DMA_SLAST_SLAST(x)                       (((uint32_t)(((uint32_t)(x)) << DMA_SLAST_SLAST_SHIFT)) & DMA_SLAST_SLAST_MASK)
4001 /*! @} */
4002 
4003 /* The count of DMA_SLAST */
4004 #define DMA_SLAST_COUNT                          (8U)
4005 
4006 /*! @name DADDR - TCD Destination Address */
4007 /*! @{ */
4008 
4009 #define DMA_DADDR_DADDR_MASK                     (0xFFFFFFFFU)
4010 #define DMA_DADDR_DADDR_SHIFT                    (0U)
4011 /*! DADDR - Destination Address */
4012 #define DMA_DADDR_DADDR(x)                       (((uint32_t)(((uint32_t)(x)) << DMA_DADDR_DADDR_SHIFT)) & DMA_DADDR_DADDR_MASK)
4013 /*! @} */
4014 
4015 /* The count of DMA_DADDR */
4016 #define DMA_DADDR_COUNT                          (8U)
4017 
4018 /*! @name DOFF - TCD Signed Destination Address Offset */
4019 /*! @{ */
4020 
4021 #define DMA_DOFF_DOFF_MASK                       (0xFFFFU)
4022 #define DMA_DOFF_DOFF_SHIFT                      (0U)
4023 /*! DOFF - Destination Address Signed Offset */
4024 #define DMA_DOFF_DOFF(x)                         (((uint16_t)(((uint16_t)(x)) << DMA_DOFF_DOFF_SHIFT)) & DMA_DOFF_DOFF_MASK)
4025 /*! @} */
4026 
4027 /* The count of DMA_DOFF */
4028 #define DMA_DOFF_COUNT                           (8U)
4029 
4030 /*! @name CITER_ELINKNO - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
4031 /*! @{ */
4032 
4033 #define DMA_CITER_ELINKNO_CITER_MASK             (0x7FFFU)
4034 #define DMA_CITER_ELINKNO_CITER_SHIFT            (0U)
4035 /*! CITER - Current Major Iteration Count */
4036 #define DMA_CITER_ELINKNO_CITER(x)               (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_CITER_SHIFT)) & DMA_CITER_ELINKNO_CITER_MASK)
4037 
4038 #define DMA_CITER_ELINKNO_ELINK_MASK             (0x8000U)
4039 #define DMA_CITER_ELINKNO_ELINK_SHIFT            (15U)
4040 /*! ELINK - Enable channel-to-channel linking on minor-loop complete
4041  *  0b0..The channel-to-channel linking is disabled
4042  *  0b1..The channel-to-channel linking is enabled
4043  */
4044 #define DMA_CITER_ELINKNO_ELINK(x)               (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_ELINK_SHIFT)) & DMA_CITER_ELINKNO_ELINK_MASK)
4045 /*! @} */
4046 
4047 /* The count of DMA_CITER_ELINKNO */
4048 #define DMA_CITER_ELINKNO_COUNT                  (8U)
4049 
4050 /*! @name CITER_ELINKYES - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
4051 /*! @{ */
4052 
4053 #define DMA_CITER_ELINKYES_CITER_MASK            (0x1FFU)
4054 #define DMA_CITER_ELINKYES_CITER_SHIFT           (0U)
4055 /*! CITER - Current Major Iteration Count */
4056 #define DMA_CITER_ELINKYES_CITER(x)              (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_CITER_SHIFT)) & DMA_CITER_ELINKYES_CITER_MASK)
4057 
4058 #define DMA_CITER_ELINKYES_LINKCH_MASK           (0xE00U)
4059 #define DMA_CITER_ELINKYES_LINKCH_SHIFT          (9U)
4060 /*! LINKCH - Minor Loop Link Channel Number */
4061 #define DMA_CITER_ELINKYES_LINKCH(x)             (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_LINKCH_SHIFT)) & DMA_CITER_ELINKYES_LINKCH_MASK)
4062 
4063 #define DMA_CITER_ELINKYES_ELINK_MASK            (0x8000U)
4064 #define DMA_CITER_ELINKYES_ELINK_SHIFT           (15U)
4065 /*! ELINK - Enable channel-to-channel linking on minor-loop complete
4066  *  0b0..The channel-to-channel linking is disabled
4067  *  0b1..The channel-to-channel linking is enabled
4068  */
4069 #define DMA_CITER_ELINKYES_ELINK(x)              (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_ELINK_SHIFT)) & DMA_CITER_ELINKYES_ELINK_MASK)
4070 /*! @} */
4071 
4072 /* The count of DMA_CITER_ELINKYES */
4073 #define DMA_CITER_ELINKYES_COUNT                 (8U)
4074 
4075 /*! @name DLAST_SGA - TCD Last Destination Address Adjustment/Scatter Gather Address */
4076 /*! @{ */
4077 
4078 #define DMA_DLAST_SGA_DLASTSGA_MASK              (0xFFFFFFFFU)
4079 #define DMA_DLAST_SGA_DLASTSGA_SHIFT             (0U)
4080 /*! DLASTSGA - DLASTSGA */
4081 #define DMA_DLAST_SGA_DLASTSGA(x)                (((uint32_t)(((uint32_t)(x)) << DMA_DLAST_SGA_DLASTSGA_SHIFT)) & DMA_DLAST_SGA_DLASTSGA_MASK)
4082 /*! @} */
4083 
4084 /* The count of DMA_DLAST_SGA */
4085 #define DMA_DLAST_SGA_COUNT                      (8U)
4086 
4087 /*! @name CSR - TCD Control and Status */
4088 /*! @{ */
4089 
4090 #define DMA_CSR_START_MASK                       (0x1U)
4091 #define DMA_CSR_START_SHIFT                      (0U)
4092 /*! START - Channel Start
4093  *  0b0..The channel is not explicitly started.
4094  *  0b1..The channel is explicitly started via a software initiated service request.
4095  */
4096 #define DMA_CSR_START(x)                         (((uint16_t)(((uint16_t)(x)) << DMA_CSR_START_SHIFT)) & DMA_CSR_START_MASK)
4097 
4098 #define DMA_CSR_INTMAJOR_MASK                    (0x2U)
4099 #define DMA_CSR_INTMAJOR_SHIFT                   (1U)
4100 /*! INTMAJOR - Enable an interrupt when major iteration count completes.
4101  *  0b0..The end-of-major loop interrupt is disabled.
4102  *  0b1..The end-of-major loop interrupt is enabled.
4103  */
4104 #define DMA_CSR_INTMAJOR(x)                      (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTMAJOR_SHIFT)) & DMA_CSR_INTMAJOR_MASK)
4105 
4106 #define DMA_CSR_INTHALF_MASK                     (0x4U)
4107 #define DMA_CSR_INTHALF_SHIFT                    (2U)
4108 /*! INTHALF - Enable an interrupt when major counter is half complete.
4109  *  0b0..The half-point interrupt is disabled.
4110  *  0b1..The half-point interrupt is enabled.
4111  */
4112 #define DMA_CSR_INTHALF(x)                       (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTHALF_SHIFT)) & DMA_CSR_INTHALF_MASK)
4113 
4114 #define DMA_CSR_DREQ_MASK                        (0x8U)
4115 #define DMA_CSR_DREQ_SHIFT                       (3U)
4116 /*! DREQ - Disable Request
4117  *  0b0..The channel's ERQ bit is not affected.
4118  *  0b1..The channel's ERQ bit is cleared when the major loop is complete.
4119  */
4120 #define DMA_CSR_DREQ(x)                          (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DREQ_SHIFT)) & DMA_CSR_DREQ_MASK)
4121 
4122 #define DMA_CSR_ESG_MASK                         (0x10U)
4123 #define DMA_CSR_ESG_SHIFT                        (4U)
4124 /*! ESG - Enable Scatter/Gather Processing
4125  *  0b0..The current channel's TCD is normal format.
4126  *  0b1..The current channel's TCD specifies a scatter gather format. The DLASTSGA field provides a memory pointer
4127  *       to the next TCD to be loaded into this channel after the major loop completes its execution.
4128  */
4129 #define DMA_CSR_ESG(x)                           (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ESG_SHIFT)) & DMA_CSR_ESG_MASK)
4130 
4131 #define DMA_CSR_MAJORELINK_MASK                  (0x20U)
4132 #define DMA_CSR_MAJORELINK_SHIFT                 (5U)
4133 /*! MAJORELINK - Enable channel-to-channel linking on major loop complete
4134  *  0b0..The channel-to-channel linking is disabled.
4135  *  0b1..The channel-to-channel linking is enabled.
4136  */
4137 #define DMA_CSR_MAJORELINK(x)                    (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORELINK_SHIFT)) & DMA_CSR_MAJORELINK_MASK)
4138 
4139 #define DMA_CSR_ACTIVE_MASK                      (0x40U)
4140 #define DMA_CSR_ACTIVE_SHIFT                     (6U)
4141 /*! ACTIVE - Channel Active */
4142 #define DMA_CSR_ACTIVE(x)                        (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ACTIVE_SHIFT)) & DMA_CSR_ACTIVE_MASK)
4143 
4144 #define DMA_CSR_DONE_MASK                        (0x80U)
4145 #define DMA_CSR_DONE_SHIFT                       (7U)
4146 /*! DONE - Channel Done */
4147 #define DMA_CSR_DONE(x)                          (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DONE_SHIFT)) & DMA_CSR_DONE_MASK)
4148 
4149 #define DMA_CSR_MAJORLINKCH_MASK                 (0x700U)
4150 #define DMA_CSR_MAJORLINKCH_SHIFT                (8U)
4151 /*! MAJORLINKCH - Major Loop Link Channel Number */
4152 #define DMA_CSR_MAJORLINKCH(x)                   (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORLINKCH_SHIFT)) & DMA_CSR_MAJORLINKCH_MASK)
4153 
4154 #define DMA_CSR_BWC_MASK                         (0xC000U)
4155 #define DMA_CSR_BWC_SHIFT                        (14U)
4156 /*! BWC - Bandwidth Control
4157  *  0b00..No eDMA engine stalls.
4158  *  0b01..Reserved
4159  *  0b10..eDMA engine stalls for 4 cycles after each R/W.
4160  *  0b11..eDMA engine stalls for 8 cycles after each R/W.
4161  */
4162 #define DMA_CSR_BWC(x)                           (((uint16_t)(((uint16_t)(x)) << DMA_CSR_BWC_SHIFT)) & DMA_CSR_BWC_MASK)
4163 /*! @} */
4164 
4165 /* The count of DMA_CSR */
4166 #define DMA_CSR_COUNT                            (8U)
4167 
4168 /*! @name BITER_ELINKNO - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
4169 /*! @{ */
4170 
4171 #define DMA_BITER_ELINKNO_BITER_MASK             (0x7FFFU)
4172 #define DMA_BITER_ELINKNO_BITER_SHIFT            (0U)
4173 /*! BITER - Starting Major Iteration Count */
4174 #define DMA_BITER_ELINKNO_BITER(x)               (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_BITER_SHIFT)) & DMA_BITER_ELINKNO_BITER_MASK)
4175 
4176 #define DMA_BITER_ELINKNO_ELINK_MASK             (0x8000U)
4177 #define DMA_BITER_ELINKNO_ELINK_SHIFT            (15U)
4178 /*! ELINK - Enables channel-to-channel linking on minor loop complete
4179  *  0b0..The channel-to-channel linking is disabled
4180  *  0b1..The channel-to-channel linking is enabled
4181  */
4182 #define DMA_BITER_ELINKNO_ELINK(x)               (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_ELINK_SHIFT)) & DMA_BITER_ELINKNO_ELINK_MASK)
4183 /*! @} */
4184 
4185 /* The count of DMA_BITER_ELINKNO */
4186 #define DMA_BITER_ELINKNO_COUNT                  (8U)
4187 
4188 /*! @name BITER_ELINKYES - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
4189 /*! @{ */
4190 
4191 #define DMA_BITER_ELINKYES_BITER_MASK            (0x1FFU)
4192 #define DMA_BITER_ELINKYES_BITER_SHIFT           (0U)
4193 /*! BITER - Starting major iteration count */
4194 #define DMA_BITER_ELINKYES_BITER(x)              (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_BITER_SHIFT)) & DMA_BITER_ELINKYES_BITER_MASK)
4195 
4196 #define DMA_BITER_ELINKYES_LINKCH_MASK           (0xE00U)
4197 #define DMA_BITER_ELINKYES_LINKCH_SHIFT          (9U)
4198 /*! LINKCH - Link Channel Number */
4199 #define DMA_BITER_ELINKYES_LINKCH(x)             (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_LINKCH_SHIFT)) & DMA_BITER_ELINKYES_LINKCH_MASK)
4200 
4201 #define DMA_BITER_ELINKYES_ELINK_MASK            (0x8000U)
4202 #define DMA_BITER_ELINKYES_ELINK_SHIFT           (15U)
4203 /*! ELINK - Enables channel-to-channel linking on minor loop complete
4204  *  0b0..The channel-to-channel linking is disabled
4205  *  0b1..The channel-to-channel linking is enabled
4206  */
4207 #define DMA_BITER_ELINKYES_ELINK(x)              (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_ELINK_SHIFT)) & DMA_BITER_ELINKYES_ELINK_MASK)
4208 /*! @} */
4209 
4210 /* The count of DMA_BITER_ELINKYES */
4211 #define DMA_BITER_ELINKYES_COUNT                 (8U)
4212 
4213 
4214 /*!
4215  * @}
4216  */ /* end of group DMA_Register_Masks */
4217 
4218 
4219 /* DMA - Peripheral instance base addresses */
4220 /** Peripheral DMA1 base address */
4221 #define DMA1_BASE                                (0x41008000u)
4222 /** Peripheral DMA1 base pointer */
4223 #define DMA1                                     ((DMA_Type *)DMA1_BASE)
4224 /** Array initializer of DMA peripheral base addresses */
4225 #define DMA_BASE_ADDRS                           { 0u, DMA1_BASE }
4226 /** Array initializer of DMA peripheral base pointers */
4227 #define DMA_BASE_PTRS                            { (DMA_Type *)0u, DMA1 }
4228 /** Interrupt vectors for the DMA peripheral type */
4229 #define DMA_CHN_IRQS                             { { NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn }, { DMA1_04_IRQn, DMA1_15_IRQn, DMA1_26_IRQn, DMA1_37_IRQn, DMA1_04_IRQn, DMA1_15_IRQn, DMA1_26_IRQn, DMA1_37_IRQn } }
4230 #define DMA_ERROR_IRQS                           { NotAvail_IRQn, DMA1_Error_IRQn }
4231 
4232 /*!
4233  * @}
4234  */ /* end of group DMA_Peripheral_Access_Layer */
4235 
4236 
4237 /* ----------------------------------------------------------------------------
4238    -- DMAMUX Peripheral Access Layer
4239    ---------------------------------------------------------------------------- */
4240 
4241 /*!
4242  * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer
4243  * @{
4244  */
4245 
4246 /** DMAMUX - Register Layout Typedef */
4247 typedef struct {
4248   __IO uint32_t CHCFG[8];                          /**< Channel 0 Configuration Register..Channel 7 Configuration Register, array offset: 0x0, array step: 0x4 */
4249 } DMAMUX_Type;
4250 
4251 /* ----------------------------------------------------------------------------
4252    -- DMAMUX Register Masks
4253    ---------------------------------------------------------------------------- */
4254 
4255 /*!
4256  * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks
4257  * @{
4258  */
4259 
4260 /*! @name CHCFG - Channel 0 Configuration Register..Channel 7 Configuration Register */
4261 /*! @{ */
4262 
4263 #define DMAMUX_CHCFG_SOURCE_MASK                 (0x1FU)
4264 #define DMAMUX_CHCFG_SOURCE_SHIFT                (0U)
4265 /*! SOURCE - DMA Channel Source (Slot Number) */
4266 #define DMAMUX_CHCFG_SOURCE(x)                   (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK)
4267 
4268 #define DMAMUX_CHCFG_A_ON_MASK                   (0x20000000U)
4269 #define DMAMUX_CHCFG_A_ON_SHIFT                  (29U)
4270 /*! A_ON - DMA Channel Always Enable
4271  *  0b0..DMA Channel Always ON function is disabled
4272  *  0b1..DMA Channel Always ON function is enabled
4273  */
4274 #define DMAMUX_CHCFG_A_ON(x)                     (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_A_ON_SHIFT)) & DMAMUX_CHCFG_A_ON_MASK)
4275 
4276 #define DMAMUX_CHCFG_TRIG_MASK                   (0x40000000U)
4277 #define DMAMUX_CHCFG_TRIG_SHIFT                  (30U)
4278 /*! TRIG - DMA Channel Trigger Enable
4279  *  0b0..Triggering is disabled. If triggering is disabled and ENBL is set, the DMA Channel will simply route the
4280  *       specified source to the DMA channel. (Normal mode)
4281  *  0b1..Triggering is enabled. If triggering is enabled and ENBL is set, the DMA_CH_MUX is in Periodic Trigger mode.
4282  */
4283 #define DMAMUX_CHCFG_TRIG(x)                     (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK)
4284 
4285 #define DMAMUX_CHCFG_ENBL_MASK                   (0x80000000U)
4286 #define DMAMUX_CHCFG_ENBL_SHIFT                  (31U)
4287 /*! ENBL - DMA Mux Channel Enable
4288  *  0b0..DMA Mux channel is disabled
4289  *  0b1..DMA Mux channel is enabled
4290  */
4291 #define DMAMUX_CHCFG_ENBL(x)                     (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK)
4292 /*! @} */
4293 
4294 /* The count of DMAMUX_CHCFG */
4295 #define DMAMUX_CHCFG_COUNT                       (8U)
4296 
4297 
4298 /*!
4299  * @}
4300  */ /* end of group DMAMUX_Register_Masks */
4301 
4302 
4303 /* DMAMUX - Peripheral instance base addresses */
4304 /** Peripheral DMAMUX1 base address */
4305 #define DMAMUX1_BASE                             (0x41021000u)
4306 /** Peripheral DMAMUX1 base pointer */
4307 #define DMAMUX1                                  ((DMAMUX_Type *)DMAMUX1_BASE)
4308 /** Array initializer of DMAMUX peripheral base addresses */
4309 #define DMAMUX_BASE_ADDRS                        { 0u, DMAMUX1_BASE }
4310 /** Array initializer of DMAMUX peripheral base pointers */
4311 #define DMAMUX_BASE_PTRS                         { (DMAMUX_Type *)0u, DMAMUX1 }
4312 
4313 /*!
4314  * @}
4315  */ /* end of group DMAMUX_Peripheral_Access_Layer */
4316 
4317 
4318 /* ----------------------------------------------------------------------------
4319    -- EMVSIM Peripheral Access Layer
4320    ---------------------------------------------------------------------------- */
4321 
4322 /*!
4323  * @addtogroup EMVSIM_Peripheral_Access_Layer EMVSIM Peripheral Access Layer
4324  * @{
4325  */
4326 
4327 /** EMVSIM - Register Layout Typedef */
4328 typedef struct {
4329   __I  uint32_t VER_ID;                            /**< Version ID Register, offset: 0x0 */
4330   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
4331   __IO uint32_t CLKCFG;                            /**< Clock Configuration Register, offset: 0x8 */
4332   __IO uint32_t DIVISOR;                           /**< Baud Rate Divisor Register, offset: 0xC */
4333   __IO uint32_t CTRL;                              /**< Control Register, offset: 0x10 */
4334   __IO uint32_t INT_MASK;                          /**< Interrupt Mask Register, offset: 0x14 */
4335   __IO uint32_t RX_THD;                            /**< Receiver Threshold Register, offset: 0x18 */
4336   __IO uint32_t TX_THD;                            /**< Transmitter Threshold Register, offset: 0x1C */
4337   __IO uint32_t RX_STATUS;                         /**< Receive Status Register, offset: 0x20 */
4338   __IO uint32_t TX_STATUS;                         /**< Transmitter Status Register, offset: 0x24 */
4339   __IO uint32_t PCSR;                              /**< Port Control and Status Register, offset: 0x28 */
4340   __I  uint32_t RX_BUF;                            /**< Receive Data Read Buffer, offset: 0x2C */
4341   __O  uint32_t TX_BUF;                            /**< Transmit Data Buffer, offset: 0x30 */
4342   __IO uint32_t TX_GETU;                           /**< Transmitter Guard ETU Value Register, offset: 0x34 */
4343   __IO uint32_t CWT_VAL;                           /**< Character Wait Time Value Register, offset: 0x38 */
4344   __IO uint32_t BWT_VAL;                           /**< Block Wait Time Value Register, offset: 0x3C */
4345   __IO uint32_t BGT_VAL;                           /**< Block Guard Time Value Register, offset: 0x40 */
4346   __IO uint32_t GPCNT0_VAL;                        /**< General Purpose Counter 0 Timeout Value Register, offset: 0x44 */
4347   __IO uint32_t GPCNT1_VAL;                        /**< General Purpose Counter 1 Timeout Value, offset: 0x48 */
4348 } EMVSIM_Type;
4349 
4350 /* ----------------------------------------------------------------------------
4351    -- EMVSIM Register Masks
4352    ---------------------------------------------------------------------------- */
4353 
4354 /*!
4355  * @addtogroup EMVSIM_Register_Masks EMVSIM Register Masks
4356  * @{
4357  */
4358 
4359 /*! @name VER_ID - Version ID Register */
4360 /*! @{ */
4361 
4362 #define EMVSIM_VER_ID_VER_MASK                   (0xFFFFFFFFU)
4363 #define EMVSIM_VER_ID_VER_SHIFT                  (0U)
4364 /*! VER - Version ID of the module */
4365 #define EMVSIM_VER_ID_VER(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_VER_ID_VER_SHIFT)) & EMVSIM_VER_ID_VER_MASK)
4366 /*! @} */
4367 
4368 /*! @name PARAM - Parameter Register */
4369 /*! @{ */
4370 
4371 #define EMVSIM_PARAM_RX_FIFO_DEPTH_MASK          (0xFFU)
4372 #define EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT         (0U)
4373 /*! RX_FIFO_DEPTH - Receive FIFO Depth */
4374 #define EMVSIM_PARAM_RX_FIFO_DEPTH(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_RX_FIFO_DEPTH_MASK)
4375 
4376 #define EMVSIM_PARAM_TX_FIFO_DEPTH_MASK          (0xFF00U)
4377 #define EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT         (8U)
4378 /*! TX_FIFO_DEPTH - Transmit FIFO Depth */
4379 #define EMVSIM_PARAM_TX_FIFO_DEPTH(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_TX_FIFO_DEPTH_MASK)
4380 /*! @} */
4381 
4382 /*! @name CLKCFG - Clock Configuration Register */
4383 /*! @{ */
4384 
4385 #define EMVSIM_CLKCFG_CLK_PRSC_MASK              (0xFFU)
4386 #define EMVSIM_CLKCFG_CLK_PRSC_SHIFT             (0U)
4387 /*! CLK_PRSC - Clock Prescaler Value
4388  *  0b00000010..Divide by 2
4389  */
4390 #define EMVSIM_CLKCFG_CLK_PRSC(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_CLK_PRSC_SHIFT)) & EMVSIM_CLKCFG_CLK_PRSC_MASK)
4391 
4392 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK        (0x300U)
4393 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT       (8U)
4394 /*! GPCNT1_CLK_SEL - General Purpose Counter 1 Clock Select
4395  *  0b00..Disabled / Reset (default)
4396  *  0b01..Card Clock
4397  *  0b10..Receive Clock
4398  *  0b11..ETU Clock (transmit clock)
4399  */
4400 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL(x)          (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK)
4401 
4402 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK        (0xC00U)
4403 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT       (10U)
4404 /*! GPCNT0_CLK_SEL - General Purpose Counter 0 Clock Select
4405  *  0b00..Disabled / Reset (default)
4406  *  0b01..Card Clock
4407  *  0b10..Receive Clock
4408  *  0b11..ETU Clock (transmit clock)
4409  */
4410 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL(x)          (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK)
4411 /*! @} */
4412 
4413 /*! @name DIVISOR - Baud Rate Divisor Register */
4414 /*! @{ */
4415 
4416 #define EMVSIM_DIVISOR_DIVISOR_VALUE_MASK        (0x1FFU)
4417 #define EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT       (0U)
4418 /*! DIVISOR_VALUE - Divisor (F/D) Value
4419  *  0b000000000-0b000000100..Invalid. As per ISO 7816 specification, minimum value of F/D is 5
4420  *  0b101110100..Divisor value for F = 372 and D = 1 (default)
4421  */
4422 #define EMVSIM_DIVISOR_DIVISOR_VALUE(x)          (((uint32_t)(((uint32_t)(x)) << EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT)) & EMVSIM_DIVISOR_DIVISOR_VALUE_MASK)
4423 /*! @} */
4424 
4425 /*! @name CTRL - Control Register */
4426 /*! @{ */
4427 
4428 #define EMVSIM_CTRL_IC_MASK                      (0x1U)
4429 #define EMVSIM_CTRL_IC_SHIFT                     (0U)
4430 /*! IC - Inverse Convention
4431  *  0b0..Direction convention transfers enabled (default)
4432  *  0b1..Inverse convention transfers enabled
4433  */
4434 #define EMVSIM_CTRL_IC(x)                        (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_IC_SHIFT)) & EMVSIM_CTRL_IC_MASK)
4435 
4436 #define EMVSIM_CTRL_ICM_MASK                     (0x2U)
4437 #define EMVSIM_CTRL_ICM_SHIFT                    (1U)
4438 /*! ICM - Initial Character Mode
4439  *  0b0..Initial Character Mode disabled
4440  *  0b1..Initial Character Mode enabled (default)
4441  */
4442 #define EMVSIM_CTRL_ICM(x)                       (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ICM_SHIFT)) & EMVSIM_CTRL_ICM_MASK)
4443 
4444 #define EMVSIM_CTRL_ANACK_MASK                   (0x4U)
4445 #define EMVSIM_CTRL_ANACK_SHIFT                  (2U)
4446 /*! ANACK - Auto NACK Enable
4447  *  0b0..NACK generation on errors disabled
4448  *  0b1..NACK generation on errors enabled (default)
4449  */
4450 #define EMVSIM_CTRL_ANACK(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ANACK_SHIFT)) & EMVSIM_CTRL_ANACK_MASK)
4451 
4452 #define EMVSIM_CTRL_ONACK_MASK                   (0x8U)
4453 #define EMVSIM_CTRL_ONACK_SHIFT                  (3U)
4454 /*! ONACK - Overrun NACK Enable
4455  *  0b0..NACK generation on overrun is disabled (default)
4456  *  0b1..NACK generation on overrun is enabled
4457  */
4458 #define EMVSIM_CTRL_ONACK(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ONACK_SHIFT)) & EMVSIM_CTRL_ONACK_MASK)
4459 
4460 #define EMVSIM_CTRL_FLSH_RX_MASK                 (0x100U)
4461 #define EMVSIM_CTRL_FLSH_RX_SHIFT                (8U)
4462 /*! FLSH_RX - Flush Receiver Bit
4463  *  0b0..EMV SIM Receiver normal operation (default)
4464  *  0b1..EMV SIM Receiver held in Reset
4465  */
4466 #define EMVSIM_CTRL_FLSH_RX(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_RX_SHIFT)) & EMVSIM_CTRL_FLSH_RX_MASK)
4467 
4468 #define EMVSIM_CTRL_FLSH_TX_MASK                 (0x200U)
4469 #define EMVSIM_CTRL_FLSH_TX_SHIFT                (9U)
4470 /*! FLSH_TX - Flush Transmitter Bit
4471  *  0b0..EMV SIM Transmitter normal operation (default)
4472  *  0b1..EMV SIM Transmitter held in Reset
4473  */
4474 #define EMVSIM_CTRL_FLSH_TX(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_TX_SHIFT)) & EMVSIM_CTRL_FLSH_TX_MASK)
4475 
4476 #define EMVSIM_CTRL_SW_RST_MASK                  (0x400U)
4477 #define EMVSIM_CTRL_SW_RST_SHIFT                 (10U)
4478 /*! SW_RST - Software Reset Bit
4479  *  0b0..EMV SIM Normal operation (default)
4480  *  0b1..EMV SIM held in Reset
4481  */
4482 #define EMVSIM_CTRL_SW_RST(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_SW_RST_SHIFT)) & EMVSIM_CTRL_SW_RST_MASK)
4483 
4484 #define EMVSIM_CTRL_KILL_CLOCKS_MASK             (0x800U)
4485 #define EMVSIM_CTRL_KILL_CLOCKS_SHIFT            (11U)
4486 /*! KILL_CLOCKS - Kill all internal clocks
4487  *  0b0..EMV SIM input clock enabled (default)
4488  *  0b1..EMV SIM input clock is disabled
4489  */
4490 #define EMVSIM_CTRL_KILL_CLOCKS(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_KILL_CLOCKS_SHIFT)) & EMVSIM_CTRL_KILL_CLOCKS_MASK)
4491 
4492 #define EMVSIM_CTRL_DOZE_EN_MASK                 (0x1000U)
4493 #define EMVSIM_CTRL_DOZE_EN_SHIFT                (12U)
4494 /*! DOZE_EN - Doze Enable
4495  *  0b0..DOZE instruction will gate all internal EMV SIM clocks as well as the Smart Card clock when the transmit FIFO is empty (default)
4496  *  0b1..DOZE instruction has no effect on EMV SIM module
4497  */
4498 #define EMVSIM_CTRL_DOZE_EN(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_DOZE_EN_SHIFT)) & EMVSIM_CTRL_DOZE_EN_MASK)
4499 
4500 #define EMVSIM_CTRL_STOP_EN_MASK                 (0x2000U)
4501 #define EMVSIM_CTRL_STOP_EN_SHIFT                (13U)
4502 /*! STOP_EN - STOP Enable
4503  *  0b0..STOP instruction shuts down all EMV SIM clocks (default)
4504  *  0b1..STOP instruction shuts down all clocks except for the Smart Card Clock (SCK) (clock provided to Smart Card)
4505  */
4506 #define EMVSIM_CTRL_STOP_EN(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_STOP_EN_SHIFT)) & EMVSIM_CTRL_STOP_EN_MASK)
4507 
4508 #define EMVSIM_CTRL_RCV_EN_MASK                  (0x10000U)
4509 #define EMVSIM_CTRL_RCV_EN_SHIFT                 (16U)
4510 /*! RCV_EN - Receiver Enable
4511  *  0b0..EMV SIM Receiver disabled (default)
4512  *  0b1..EMV SIM Receiver enabled
4513  */
4514 #define EMVSIM_CTRL_RCV_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCV_EN_SHIFT)) & EMVSIM_CTRL_RCV_EN_MASK)
4515 
4516 #define EMVSIM_CTRL_XMT_EN_MASK                  (0x20000U)
4517 #define EMVSIM_CTRL_XMT_EN_SHIFT                 (17U)
4518 /*! XMT_EN - Transmitter Enable
4519  *  0b0..EMV SIM Transmitter disabled (default)
4520  *  0b1..EMV SIM Transmitter enabled
4521  */
4522 #define EMVSIM_CTRL_XMT_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_EN_SHIFT)) & EMVSIM_CTRL_XMT_EN_MASK)
4523 
4524 #define EMVSIM_CTRL_RCVR_11_MASK                 (0x40000U)
4525 #define EMVSIM_CTRL_RCVR_11_SHIFT                (18U)
4526 /*! RCVR_11 - Receiver 11 ETU Mode Enable
4527  *  0b0..Receiver configured for 12 ETU operation mode (default)
4528  *  0b1..Receiver configured for 11 ETU operation mode
4529  */
4530 #define EMVSIM_CTRL_RCVR_11(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCVR_11_SHIFT)) & EMVSIM_CTRL_RCVR_11_MASK)
4531 
4532 #define EMVSIM_CTRL_RX_DMA_EN_MASK               (0x80000U)
4533 #define EMVSIM_CTRL_RX_DMA_EN_SHIFT              (19U)
4534 /*! RX_DMA_EN - Receive DMA Enable
4535  *  0b0..No DMA Read Request asserted for Receiver (default)
4536  *  0b1..DMA Read Request asserted for Receiver
4537  */
4538 #define EMVSIM_CTRL_RX_DMA_EN(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RX_DMA_EN_SHIFT)) & EMVSIM_CTRL_RX_DMA_EN_MASK)
4539 
4540 #define EMVSIM_CTRL_TX_DMA_EN_MASK               (0x100000U)
4541 #define EMVSIM_CTRL_TX_DMA_EN_SHIFT              (20U)
4542 /*! TX_DMA_EN - Transmit DMA Enable
4543  *  0b0..No DMA Write Request asserted for Transmitter (default)
4544  *  0b1..DMA Write Request asserted for Transmitter
4545  */
4546 #define EMVSIM_CTRL_TX_DMA_EN(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_TX_DMA_EN_SHIFT)) & EMVSIM_CTRL_TX_DMA_EN_MASK)
4547 
4548 #define EMVSIM_CTRL_INV_CRC_VAL_MASK             (0x1000000U)
4549 #define EMVSIM_CTRL_INV_CRC_VAL_SHIFT            (24U)
4550 /*! INV_CRC_VAL - Invert bits in the CRC Output Value
4551  *  0b0..Bits in CRC Output value will not be inverted.
4552  *  0b1..Bits in CRC Output value will be inverted. (default)
4553  */
4554 #define EMVSIM_CTRL_INV_CRC_VAL(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_INV_CRC_VAL_SHIFT)) & EMVSIM_CTRL_INV_CRC_VAL_MASK)
4555 
4556 #define EMVSIM_CTRL_CRC_OUT_FLIP_MASK            (0x2000000U)
4557 #define EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT           (25U)
4558 /*! CRC_OUT_FLIP - CRC Output Value Bit Reversal or Flip
4559  *  0b0..Bits within the CRC output bytes will not be reversed i.e. 15:0 will remain 15:0 (default)
4560  *  0b1..Bits within the CRC output bytes will be reversed i.e. 15:0 will become {8:15,0:7}
4561  */
4562 #define EMVSIM_CTRL_CRC_OUT_FLIP(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_OUT_FLIP_MASK)
4563 
4564 #define EMVSIM_CTRL_CRC_IN_FLIP_MASK             (0x4000000U)
4565 #define EMVSIM_CTRL_CRC_IN_FLIP_SHIFT            (26U)
4566 /*! CRC_IN_FLIP - CRC Input Byte's Bit Reversal or Flip Control
4567  *  0b0..Bits in the input byte will not be reversed (i.e. 7:0 will remain 7:0) before the CRC calculation (default)
4568  *  0b1..Bits in the input byte will be reversed (i.e. 7:0 will become 0:7) before CRC calculation
4569  */
4570 #define EMVSIM_CTRL_CRC_IN_FLIP(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_IN_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_IN_FLIP_MASK)
4571 
4572 #define EMVSIM_CTRL_CWT_EN_MASK                  (0x8000000U)
4573 #define EMVSIM_CTRL_CWT_EN_SHIFT                 (27U)
4574 /*! CWT_EN - Character Wait Time Counter Enable
4575  *  0b0..Character Wait time Counter is disabled (default)
4576  *  0b1..Character Wait time counter is enabled
4577  */
4578 #define EMVSIM_CTRL_CWT_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CWT_EN_SHIFT)) & EMVSIM_CTRL_CWT_EN_MASK)
4579 
4580 #define EMVSIM_CTRL_LRC_EN_MASK                  (0x10000000U)
4581 #define EMVSIM_CTRL_LRC_EN_SHIFT                 (28U)
4582 /*! LRC_EN - LRC Enable
4583  *  0b0..8-bit Linear Redundancy Checking disabled (default)
4584  *  0b1..8-bit Linear Redundancy Checking enabled
4585  */
4586 #define EMVSIM_CTRL_LRC_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_LRC_EN_SHIFT)) & EMVSIM_CTRL_LRC_EN_MASK)
4587 
4588 #define EMVSIM_CTRL_CRC_EN_MASK                  (0x20000000U)
4589 #define EMVSIM_CTRL_CRC_EN_SHIFT                 (29U)
4590 /*! CRC_EN - CRC Enable
4591  *  0b0..16-bit Cyclic Redundancy Checking disabled (default)
4592  *  0b1..16-bit Cyclic Redundancy Checking enabled
4593  */
4594 #define EMVSIM_CTRL_CRC_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_EN_SHIFT)) & EMVSIM_CTRL_CRC_EN_MASK)
4595 
4596 #define EMVSIM_CTRL_XMT_CRC_LRC_MASK             (0x40000000U)
4597 #define EMVSIM_CTRL_XMT_CRC_LRC_SHIFT            (30U)
4598 /*! XMT_CRC_LRC - Transmit CRC or LRC Enable
4599  *  0b0..No CRC or LRC value is transmitted (default)
4600  *  0b1..Transmit LRC or CRC info when FIFO empties (whichever is enabled)
4601  */
4602 #define EMVSIM_CTRL_XMT_CRC_LRC(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_CRC_LRC_SHIFT)) & EMVSIM_CTRL_XMT_CRC_LRC_MASK)
4603 
4604 #define EMVSIM_CTRL_BWT_EN_MASK                  (0x80000000U)
4605 #define EMVSIM_CTRL_BWT_EN_SHIFT                 (31U)
4606 /*! BWT_EN - Block Wait Time Counter Enable
4607  *  0b0..Disable BWT, BGT Counters (default)
4608  *  0b1..Enable BWT, BGT Counters
4609  */
4610 #define EMVSIM_CTRL_BWT_EN(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_BWT_EN_SHIFT)) & EMVSIM_CTRL_BWT_EN_MASK)
4611 /*! @} */
4612 
4613 /*! @name INT_MASK - Interrupt Mask Register */
4614 /*! @{ */
4615 
4616 #define EMVSIM_INT_MASK_RDT_IM_MASK              (0x1U)
4617 #define EMVSIM_INT_MASK_RDT_IM_SHIFT             (0U)
4618 /*! RDT_IM - Receive Data Threshold Interrupt Mask
4619  *  0b0..RDTF interrupt enabled
4620  *  0b1..RDTF interrupt masked (default)
4621  */
4622 #define EMVSIM_INT_MASK_RDT_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RDT_IM_SHIFT)) & EMVSIM_INT_MASK_RDT_IM_MASK)
4623 
4624 #define EMVSIM_INT_MASK_TC_IM_MASK               (0x2U)
4625 #define EMVSIM_INT_MASK_TC_IM_SHIFT              (1U)
4626 /*! TC_IM - Transmit Complete Interrupt Mask
4627  *  0b0..TCF interrupt enabled
4628  *  0b1..TCF interrupt masked (default)
4629  */
4630 #define EMVSIM_INT_MASK_TC_IM(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TC_IM_SHIFT)) & EMVSIM_INT_MASK_TC_IM_MASK)
4631 
4632 #define EMVSIM_INT_MASK_RFO_IM_MASK              (0x4U)
4633 #define EMVSIM_INT_MASK_RFO_IM_SHIFT             (2U)
4634 /*! RFO_IM - Receive FIFO Overflow Interrupt Mask
4635  *  0b0..RFO interrupt enabled
4636  *  0b1..RFO interrupt masked (default)
4637  */
4638 #define EMVSIM_INT_MASK_RFO_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RFO_IM_SHIFT)) & EMVSIM_INT_MASK_RFO_IM_MASK)
4639 
4640 #define EMVSIM_INT_MASK_ETC_IM_MASK              (0x8U)
4641 #define EMVSIM_INT_MASK_ETC_IM_SHIFT             (3U)
4642 /*! ETC_IM - Early Transmit Complete Interrupt Mask
4643  *  0b0..ETC interrupt enabled
4644  *  0b1..ETC interrupt masked (default)
4645  */
4646 #define EMVSIM_INT_MASK_ETC_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_ETC_IM_SHIFT)) & EMVSIM_INT_MASK_ETC_IM_MASK)
4647 
4648 #define EMVSIM_INT_MASK_TFE_IM_MASK              (0x10U)
4649 #define EMVSIM_INT_MASK_TFE_IM_SHIFT             (4U)
4650 /*! TFE_IM - Transmit FIFO Empty Interrupt Mask
4651  *  0b0..TFE interrupt enabled
4652  *  0b1..TFE interrupt masked (default)
4653  */
4654 #define EMVSIM_INT_MASK_TFE_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFE_IM_SHIFT)) & EMVSIM_INT_MASK_TFE_IM_MASK)
4655 
4656 #define EMVSIM_INT_MASK_TNACK_IM_MASK            (0x20U)
4657 #define EMVSIM_INT_MASK_TNACK_IM_SHIFT           (5U)
4658 /*! TNACK_IM - Transmit NACK Threshold Interrupt Mask
4659  *  0b0..TNTE interrupt enabled
4660  *  0b1..TNTE interrupt masked (default)
4661  */
4662 #define EMVSIM_INT_MASK_TNACK_IM(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TNACK_IM_SHIFT)) & EMVSIM_INT_MASK_TNACK_IM_MASK)
4663 
4664 #define EMVSIM_INT_MASK_TFF_IM_MASK              (0x40U)
4665 #define EMVSIM_INT_MASK_TFF_IM_SHIFT             (6U)
4666 /*! TFF_IM - Transmit FIFO Full Interrupt Mask
4667  *  0b0..TFF interrupt enabled
4668  *  0b1..TFF interrupt masked (default)
4669  */
4670 #define EMVSIM_INT_MASK_TFF_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFF_IM_SHIFT)) & EMVSIM_INT_MASK_TFF_IM_MASK)
4671 
4672 #define EMVSIM_INT_MASK_TDT_IM_MASK              (0x80U)
4673 #define EMVSIM_INT_MASK_TDT_IM_SHIFT             (7U)
4674 /*! TDT_IM - Transmit Data Threshold Interrupt Mask
4675  *  0b0..TDTF interrupt enabled
4676  *  0b1..TDTF interrupt masked (default)
4677  */
4678 #define EMVSIM_INT_MASK_TDT_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TDT_IM_SHIFT)) & EMVSIM_INT_MASK_TDT_IM_MASK)
4679 
4680 #define EMVSIM_INT_MASK_GPCNT0_IM_MASK           (0x100U)
4681 #define EMVSIM_INT_MASK_GPCNT0_IM_SHIFT          (8U)
4682 /*! GPCNT0_IM - General Purpose Timer 0 Timeout Interrupt Mask
4683  *  0b0..GPCNT0_TO interrupt enabled
4684  *  0b1..GPCNT0_TO interrupt masked (default)
4685  */
4686 #define EMVSIM_INT_MASK_GPCNT0_IM(x)             (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT0_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT0_IM_MASK)
4687 
4688 #define EMVSIM_INT_MASK_CWT_ERR_IM_MASK          (0x200U)
4689 #define EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT         (9U)
4690 /*! CWT_ERR_IM - Character Wait Time Error Interrupt Mask
4691  *  0b0..CWT_ERR interrupt enabled
4692  *  0b1..CWT_ERR interrupt masked (default)
4693  */
4694 #define EMVSIM_INT_MASK_CWT_ERR_IM(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_CWT_ERR_IM_MASK)
4695 
4696 #define EMVSIM_INT_MASK_RNACK_IM_MASK            (0x400U)
4697 #define EMVSIM_INT_MASK_RNACK_IM_SHIFT           (10U)
4698 /*! RNACK_IM - Receiver NACK Threshold Interrupt Mask
4699  *  0b0..RTE interrupt enabled
4700  *  0b1..RTE interrupt masked (default)
4701  */
4702 #define EMVSIM_INT_MASK_RNACK_IM(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RNACK_IM_SHIFT)) & EMVSIM_INT_MASK_RNACK_IM_MASK)
4703 
4704 #define EMVSIM_INT_MASK_BWT_ERR_IM_MASK          (0x800U)
4705 #define EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT         (11U)
4706 /*! BWT_ERR_IM - Block Wait Time Error Interrupt Mask
4707  *  0b0..BWT_ERR interrupt enabled
4708  *  0b1..BWT_ERR interrupt masked (default)
4709  */
4710 #define EMVSIM_INT_MASK_BWT_ERR_IM(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BWT_ERR_IM_MASK)
4711 
4712 #define EMVSIM_INT_MASK_BGT_ERR_IM_MASK          (0x1000U)
4713 #define EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT         (12U)
4714 /*! BGT_ERR_IM - Block Guard Time Error Interrupt
4715  *  0b0..BGT_ERR interrupt enabled
4716  *  0b1..BGT_ERR interrupt masked (default)
4717  */
4718 #define EMVSIM_INT_MASK_BGT_ERR_IM(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BGT_ERR_IM_MASK)
4719 
4720 #define EMVSIM_INT_MASK_GPCNT1_IM_MASK           (0x2000U)
4721 #define EMVSIM_INT_MASK_GPCNT1_IM_SHIFT          (13U)
4722 /*! GPCNT1_IM - General Purpose Counter 1 Timeout Interrupt Mask
4723  *  0b0..GPCNT1_TO interrupt enabled
4724  *  0b1..GPCNT1_TO interrupt masked (default)
4725  */
4726 #define EMVSIM_INT_MASK_GPCNT1_IM(x)             (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT1_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT1_IM_MASK)
4727 
4728 #define EMVSIM_INT_MASK_RX_DATA_IM_MASK          (0x4000U)
4729 #define EMVSIM_INT_MASK_RX_DATA_IM_SHIFT         (14U)
4730 /*! RX_DATA_IM - Receive Data Interrupt Mask
4731  *  0b0..RX_DATA interrupt enabled
4732  *  0b1..RX_DATA interrupt masked (default)
4733  */
4734 #define EMVSIM_INT_MASK_RX_DATA_IM(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RX_DATA_IM_SHIFT)) & EMVSIM_INT_MASK_RX_DATA_IM_MASK)
4735 
4736 #define EMVSIM_INT_MASK_PEF_IM_MASK              (0x8000U)
4737 #define EMVSIM_INT_MASK_PEF_IM_SHIFT             (15U)
4738 /*! PEF_IM - Parity Error Interrupt Mask
4739  *  0b0..PEF interrupt enabled
4740  *  0b1..PEF interrupt masked (default)
4741  */
4742 #define EMVSIM_INT_MASK_PEF_IM(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_PEF_IM_SHIFT)) & EMVSIM_INT_MASK_PEF_IM_MASK)
4743 /*! @} */
4744 
4745 /*! @name RX_THD - Receiver Threshold Register */
4746 /*! @{ */
4747 
4748 #define EMVSIM_RX_THD_RDT_MASK                   (0xFU)
4749 #define EMVSIM_RX_THD_RDT_SHIFT                  (0U)
4750 /*! RDT - Receiver Data Threshold Value */
4751 #define EMVSIM_RX_THD_RDT(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RDT_SHIFT)) & EMVSIM_RX_THD_RDT_MASK)
4752 
4753 #define EMVSIM_RX_THD_RNCK_THD_MASK              (0xF00U)
4754 #define EMVSIM_RX_THD_RNCK_THD_SHIFT             (8U)
4755 /*! RNCK_THD - Receiver NACK Threshold Value
4756  *  0b0000..Zero Threshold. RTE will not be set
4757  */
4758 #define EMVSIM_RX_THD_RNCK_THD(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RNCK_THD_SHIFT)) & EMVSIM_RX_THD_RNCK_THD_MASK)
4759 /*! @} */
4760 
4761 /*! @name TX_THD - Transmitter Threshold Register */
4762 /*! @{ */
4763 
4764 #define EMVSIM_TX_THD_TDT_MASK                   (0xFU)
4765 #define EMVSIM_TX_THD_TDT_SHIFT                  (0U)
4766 /*! TDT - Transmitter Data Threshold Value */
4767 #define EMVSIM_TX_THD_TDT(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TDT_SHIFT)) & EMVSIM_TX_THD_TDT_MASK)
4768 
4769 #define EMVSIM_TX_THD_TNCK_THD_MASK              (0xF00U)
4770 #define EMVSIM_TX_THD_TNCK_THD_SHIFT             (8U)
4771 /*! TNCK_THD - Transmitter NACK Threshold Value
4772  *  0b0000..TNTE will never be set; retransmission after NACK reception is disabled.
4773  *  0b0001..TNTE will be set after 1 nack is received; 0 retransmissions occurs.
4774  *  0b0010..TNTE will be set after 2 nacks are received; at most 1 retransmission occurs.
4775  *  0b0011..TNTE will be set after 3 nacks are received; at most 2 retransmissions occurs.
4776  *  0b1111..TNTE will be set after 15 nacks are received; at most 14 retransmissions occurs.
4777  */
4778 #define EMVSIM_TX_THD_TNCK_THD(x)                (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TNCK_THD_SHIFT)) & EMVSIM_TX_THD_TNCK_THD_MASK)
4779 /*! @} */
4780 
4781 /*! @name RX_STATUS - Receive Status Register */
4782 /*! @{ */
4783 
4784 #define EMVSIM_RX_STATUS_RFO_MASK                (0x1U)
4785 #define EMVSIM_RX_STATUS_RFO_SHIFT               (0U)
4786 /*! RFO - Receive FIFO Overflow Flag
4787  *  0b0..No overrun error has occurred (default)
4788  *  0b1..A byte was received when the received FIFO was already full
4789  */
4790 #define EMVSIM_RX_STATUS_RFO(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RFO_SHIFT)) & EMVSIM_RX_STATUS_RFO_MASK)
4791 
4792 #define EMVSIM_RX_STATUS_RX_DATA_MASK            (0x10U)
4793 #define EMVSIM_RX_STATUS_RX_DATA_SHIFT           (4U)
4794 /*! RX_DATA - Receive Data Interrupt Flag
4795  *  0b0..No new byte is received
4796  *  0b1..New byte is received ans stored in Receive FIFO
4797  */
4798 #define EMVSIM_RX_STATUS_RX_DATA(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_DATA_SHIFT)) & EMVSIM_RX_STATUS_RX_DATA_MASK)
4799 
4800 #define EMVSIM_RX_STATUS_RDTF_MASK               (0x20U)
4801 #define EMVSIM_RX_STATUS_RDTF_SHIFT              (5U)
4802 /*! RDTF - Receive Data Threshold Interrupt Flag
4803  *  0b0..Number of unread bytes in receive FIFO less than the value set by RDT[3:0] (default).
4804  *  0b1..Number of unread bytes in receive FIFO greater or than equal to value set by RDT[3:0].
4805  */
4806 #define EMVSIM_RX_STATUS_RDTF(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RDTF_SHIFT)) & EMVSIM_RX_STATUS_RDTF_MASK)
4807 
4808 #define EMVSIM_RX_STATUS_LRC_OK_MASK             (0x40U)
4809 #define EMVSIM_RX_STATUS_LRC_OK_SHIFT            (6U)
4810 /*! LRC_OK - LRC Check OK Flag
4811  *  0b0..Current LRC value does not match remainder.
4812  *  0b1..Current calculated LRC value matches the expected result (i.e. zero).
4813  */
4814 #define EMVSIM_RX_STATUS_LRC_OK(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_LRC_OK_SHIFT)) & EMVSIM_RX_STATUS_LRC_OK_MASK)
4815 
4816 #define EMVSIM_RX_STATUS_CRC_OK_MASK             (0x80U)
4817 #define EMVSIM_RX_STATUS_CRC_OK_SHIFT            (7U)
4818 /*! CRC_OK - CRC Check OK Flag
4819  *  0b0..Current CRC value does not match remainder.
4820  *  0b1..Current calculated CRC value matches the expected result.
4821  */
4822 #define EMVSIM_RX_STATUS_CRC_OK(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CRC_OK_SHIFT)) & EMVSIM_RX_STATUS_CRC_OK_MASK)
4823 
4824 #define EMVSIM_RX_STATUS_CWT_ERR_MASK            (0x100U)
4825 #define EMVSIM_RX_STATUS_CWT_ERR_SHIFT           (8U)
4826 /*! CWT_ERR - Character Wait Time Error Flag
4827  *  0b0..No CWT violation has occurred (default).
4828  *  0b1..Time between two consecutive characters has exceeded the value in CHAR_WAIT.
4829  */
4830 #define EMVSIM_RX_STATUS_CWT_ERR(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_CWT_ERR_MASK)
4831 
4832 #define EMVSIM_RX_STATUS_RTE_MASK                (0x200U)
4833 #define EMVSIM_RX_STATUS_RTE_SHIFT               (9U)
4834 /*! RTE - Received NACK Threshold Error Flag
4835  *  0b0..Number of NACKs generated by the receiver is less than the value programmed in RTH[3:0]
4836  *  0b1..Number of NACKs generated by the receiver is equal to the value programmed in RTH[3:0]
4837  */
4838 #define EMVSIM_RX_STATUS_RTE(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RTE_SHIFT)) & EMVSIM_RX_STATUS_RTE_MASK)
4839 
4840 #define EMVSIM_RX_STATUS_BWT_ERR_MASK            (0x400U)
4841 #define EMVSIM_RX_STATUS_BWT_ERR_SHIFT           (10U)
4842 /*! BWT_ERR - Block Wait Time Error Flag
4843  *  0b0..Block wait time not exceeded
4844  *  0b1..Block wait time was exceeded
4845  */
4846 #define EMVSIM_RX_STATUS_BWT_ERR(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BWT_ERR_MASK)
4847 
4848 #define EMVSIM_RX_STATUS_BGT_ERR_MASK            (0x800U)
4849 #define EMVSIM_RX_STATUS_BGT_ERR_SHIFT           (11U)
4850 /*! BGT_ERR - Block Guard Time Error Flag
4851  *  0b0..Block guard time was sufficient
4852  *  0b1..Block guard time was too small
4853  */
4854 #define EMVSIM_RX_STATUS_BGT_ERR(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BGT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BGT_ERR_MASK)
4855 
4856 #define EMVSIM_RX_STATUS_PEF_MASK                (0x1000U)
4857 #define EMVSIM_RX_STATUS_PEF_SHIFT               (12U)
4858 /*! PEF - Parity Error Flag
4859  *  0b0..No parity error detected
4860  *  0b1..Parity error detected
4861  */
4862 #define EMVSIM_RX_STATUS_PEF(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_PEF_SHIFT)) & EMVSIM_RX_STATUS_PEF_MASK)
4863 
4864 #define EMVSIM_RX_STATUS_FEF_MASK                (0x2000U)
4865 #define EMVSIM_RX_STATUS_FEF_SHIFT               (13U)
4866 /*! FEF - Frame Error Flag
4867  *  0b0..No frame error detected
4868  *  0b1..Frame error detected
4869  */
4870 #define EMVSIM_RX_STATUS_FEF(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_FEF_SHIFT)) & EMVSIM_RX_STATUS_FEF_MASK)
4871 
4872 #define EMVSIM_RX_STATUS_RX_WPTR_MASK            (0xF0000U)
4873 #define EMVSIM_RX_STATUS_RX_WPTR_SHIFT           (16U)
4874 /*! RX_WPTR - Receive FIFO Write Pointer Value */
4875 #define EMVSIM_RX_STATUS_RX_WPTR(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_WPTR_SHIFT)) & EMVSIM_RX_STATUS_RX_WPTR_MASK)
4876 
4877 #define EMVSIM_RX_STATUS_RX_CNT_MASK             (0xF000000U)
4878 #define EMVSIM_RX_STATUS_RX_CNT_SHIFT            (24U)
4879 /*! RX_CNT - Receive FIFO Byte Count
4880  *  0b0000..FIFO is emtpy
4881  */
4882 #define EMVSIM_RX_STATUS_RX_CNT(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_CNT_SHIFT)) & EMVSIM_RX_STATUS_RX_CNT_MASK)
4883 /*! @} */
4884 
4885 /*! @name TX_STATUS - Transmitter Status Register */
4886 /*! @{ */
4887 
4888 #define EMVSIM_TX_STATUS_TNTE_MASK               (0x1U)
4889 #define EMVSIM_TX_STATUS_TNTE_SHIFT              (0U)
4890 /*! TNTE - Transmit NACK Threshold Error Flag
4891  *  0b0..Transmit NACK threshold has not been reached (default)
4892  *  0b1..Transmit NACK threshold reached; transmitter frozen
4893  */
4894 #define EMVSIM_TX_STATUS_TNTE(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TNTE_SHIFT)) & EMVSIM_TX_STATUS_TNTE_MASK)
4895 
4896 #define EMVSIM_TX_STATUS_TFE_MASK                (0x8U)
4897 #define EMVSIM_TX_STATUS_TFE_SHIFT               (3U)
4898 /*! TFE - Transmit FIFO Empty Flag
4899  *  0b0..Transmit FIFO is not empty
4900  *  0b1..Transmit FIFO is empty (default)
4901  */
4902 #define EMVSIM_TX_STATUS_TFE(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFE_SHIFT)) & EMVSIM_TX_STATUS_TFE_MASK)
4903 
4904 #define EMVSIM_TX_STATUS_ETCF_MASK               (0x10U)
4905 #define EMVSIM_TX_STATUS_ETCF_SHIFT              (4U)
4906 /*! ETCF - Early Transmit Complete Flag
4907  *  0b0..Transmit pending or in progress
4908  *  0b1..Transmit complete (default)
4909  */
4910 #define EMVSIM_TX_STATUS_ETCF(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_ETCF_SHIFT)) & EMVSIM_TX_STATUS_ETCF_MASK)
4911 
4912 #define EMVSIM_TX_STATUS_TCF_MASK                (0x20U)
4913 #define EMVSIM_TX_STATUS_TCF_SHIFT               (5U)
4914 /*! TCF - Transmit Complete Flag
4915  *  0b0..Transmit pending or in progress
4916  *  0b1..Transmit complete (default)
4917  */
4918 #define EMVSIM_TX_STATUS_TCF(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TCF_SHIFT)) & EMVSIM_TX_STATUS_TCF_MASK)
4919 
4920 #define EMVSIM_TX_STATUS_TFF_MASK                (0x40U)
4921 #define EMVSIM_TX_STATUS_TFF_SHIFT               (6U)
4922 /*! TFF - Transmit FIFO Full Flag
4923  *  0b0..Transmit FIFO Full condition has not occurred (default)
4924  *  0b1..A Transmit FIFO Full condition has occurred
4925  */
4926 #define EMVSIM_TX_STATUS_TFF(x)                  (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFF_SHIFT)) & EMVSIM_TX_STATUS_TFF_MASK)
4927 
4928 #define EMVSIM_TX_STATUS_TDTF_MASK               (0x80U)
4929 #define EMVSIM_TX_STATUS_TDTF_SHIFT              (7U)
4930 /*! TDTF - Transmit Data Threshold Flag
4931  *  0b0..Number of bytes in FIFO is greater than TDT[3:0], or bit has been cleared
4932  *  0b1..Number of bytes in FIFO is less than or equal to TDT[3:0] (default)
4933  */
4934 #define EMVSIM_TX_STATUS_TDTF(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TDTF_SHIFT)) & EMVSIM_TX_STATUS_TDTF_MASK)
4935 
4936 #define EMVSIM_TX_STATUS_GPCNT0_TO_MASK          (0x100U)
4937 #define EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT         (8U)
4938 /*! GPCNT0_TO - General Purpose Counter 0 Timeout Flag
4939  *  0b0..GPCNT0_VAL time not reached, or bit has been cleared. (default)
4940  *  0b1..General Purpose counter has reached the GPCNT0_VAL value
4941  */
4942 #define EMVSIM_TX_STATUS_GPCNT0_TO(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT0_TO_MASK)
4943 
4944 #define EMVSIM_TX_STATUS_GPCNT1_TO_MASK          (0x200U)
4945 #define EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT         (9U)
4946 /*! GPCNT1_TO - General Purpose Counter 1 Timeout Flag
4947  *  0b0..GPCNT1_VAL time not reached, or bit has been cleared. (default)
4948  *  0b1..General Purpose counter has reached the GPCNT1_VAL value
4949  */
4950 #define EMVSIM_TX_STATUS_GPCNT1_TO(x)            (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT1_TO_MASK)
4951 
4952 #define EMVSIM_TX_STATUS_TX_RPTR_MASK            (0xF0000U)
4953 #define EMVSIM_TX_STATUS_TX_RPTR_SHIFT           (16U)
4954 /*! TX_RPTR - Transmit FIFO Read Pointer */
4955 #define EMVSIM_TX_STATUS_TX_RPTR(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_RPTR_SHIFT)) & EMVSIM_TX_STATUS_TX_RPTR_MASK)
4956 
4957 #define EMVSIM_TX_STATUS_TX_CNT_MASK             (0xF000000U)
4958 #define EMVSIM_TX_STATUS_TX_CNT_SHIFT            (24U)
4959 /*! TX_CNT - Transmit FIFO Byte Count
4960  *  0b0000..FIFO is emtpy
4961  */
4962 #define EMVSIM_TX_STATUS_TX_CNT(x)               (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_CNT_SHIFT)) & EMVSIM_TX_STATUS_TX_CNT_MASK)
4963 /*! @} */
4964 
4965 /*! @name PCSR - Port Control and Status Register */
4966 /*! @{ */
4967 
4968 #define EMVSIM_PCSR_SAPD_MASK                    (0x1U)
4969 #define EMVSIM_PCSR_SAPD_SHIFT                   (0U)
4970 /*! SAPD - Auto Power Down Enable
4971  *  0b0..Auto power down disabled (default)
4972  *  0b1..Auto power down enabled
4973  */
4974 #define EMVSIM_PCSR_SAPD(x)                      (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SAPD_SHIFT)) & EMVSIM_PCSR_SAPD_MASK)
4975 
4976 #define EMVSIM_PCSR_SVCC_EN_MASK                 (0x2U)
4977 #define EMVSIM_PCSR_SVCC_EN_SHIFT                (1U)
4978 /*! SVCC_EN - Vcc Enable for Smart Card
4979  *  0b0..Smart Card Voltage disabled (default)
4980  *  0b1..Smart Card Voltage enabled
4981  */
4982 #define EMVSIM_PCSR_SVCC_EN(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SVCC_EN_SHIFT)) & EMVSIM_PCSR_SVCC_EN_MASK)
4983 
4984 #define EMVSIM_PCSR_VCCENP_MASK                  (0x4U)
4985 #define EMVSIM_PCSR_VCCENP_SHIFT                 (2U)
4986 /*! VCCENP - VCC Enable Polarity Control
4987  *  0b0..VCC_EN is active high. Polarity of SVCC_EN is unchanged.
4988  *  0b1..VCC_EN is active low. Polarity of SVCC_EN is inverted.
4989  */
4990 #define EMVSIM_PCSR_VCCENP(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_VCCENP_SHIFT)) & EMVSIM_PCSR_VCCENP_MASK)
4991 
4992 #define EMVSIM_PCSR_SRST_MASK                    (0x8U)
4993 #define EMVSIM_PCSR_SRST_SHIFT                   (3U)
4994 /*! SRST - Reset to Smart Card
4995  *  0b0..Smart Card Reset is asserted (default)
4996  *  0b1..Smart Card Reset is de-asserted
4997  */
4998 #define EMVSIM_PCSR_SRST(x)                      (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SRST_SHIFT)) & EMVSIM_PCSR_SRST_MASK)
4999 
5000 #define EMVSIM_PCSR_SCEN_MASK                    (0x10U)
5001 #define EMVSIM_PCSR_SCEN_SHIFT                   (4U)
5002 /*! SCEN - Clock Enable for Smart Card
5003  *  0b0..Smart Card Clock Disabled
5004  *  0b1..Smart Card Clock Enabled
5005  */
5006 #define EMVSIM_PCSR_SCEN(x)                      (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCEN_SHIFT)) & EMVSIM_PCSR_SCEN_MASK)
5007 
5008 #define EMVSIM_PCSR_SCSP_MASK                    (0x20U)
5009 #define EMVSIM_PCSR_SCSP_SHIFT                   (5U)
5010 /*! SCSP - Smart Card Clock Stop Polarity
5011  *  0b0..Clock is logic 0 when stopped by SCEN
5012  *  0b1..Clock is logic 1 when stopped by SCEN
5013  */
5014 #define EMVSIM_PCSR_SCSP(x)                      (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCSP_SHIFT)) & EMVSIM_PCSR_SCSP_MASK)
5015 
5016 #define EMVSIM_PCSR_SPD_MASK                     (0x80U)
5017 #define EMVSIM_PCSR_SPD_SHIFT                    (7U)
5018 /*! SPD - Auto Power Down Control
5019  *  0b0..No effect (default)
5020  *  0b1..Start Auto Powerdown or Power Down is in progress
5021  */
5022 #define EMVSIM_PCSR_SPD(x)                       (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPD_SHIFT)) & EMVSIM_PCSR_SPD_MASK)
5023 
5024 #define EMVSIM_PCSR_SPDIM_MASK                   (0x1000000U)
5025 #define EMVSIM_PCSR_SPDIM_SHIFT                  (24U)
5026 /*! SPDIM - Smart Card Presence Detect Interrupt Mask
5027  *  0b0..SIM presence detect interrupt is enabled
5028  *  0b1..SIM presence detect interrupt is masked (default)
5029  */
5030 #define EMVSIM_PCSR_SPDIM(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIM_SHIFT)) & EMVSIM_PCSR_SPDIM_MASK)
5031 
5032 #define EMVSIM_PCSR_SPDIF_MASK                   (0x2000000U)
5033 #define EMVSIM_PCSR_SPDIF_SHIFT                  (25U)
5034 /*! SPDIF - Smart Card Presence Detect Interrupt Flag
5035  *  0b0..No insertion or removal of Smart Card detected on Port (default)
5036  *  0b1..Insertion or removal of Smart Card detected on Port
5037  */
5038 #define EMVSIM_PCSR_SPDIF(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIF_SHIFT)) & EMVSIM_PCSR_SPDIF_MASK)
5039 
5040 #define EMVSIM_PCSR_SPDP_MASK                    (0x4000000U)
5041 #define EMVSIM_PCSR_SPDP_SHIFT                   (26U)
5042 /*! SPDP - Smart Card Presence Detect Pin Status
5043  *  0b0..SIM Presence Detect pin is logic low
5044  *  0b1..SIM Presence Detectpin is logic high
5045  */
5046 #define EMVSIM_PCSR_SPDP(x)                      (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDP_SHIFT)) & EMVSIM_PCSR_SPDP_MASK)
5047 
5048 #define EMVSIM_PCSR_SPDES_MASK                   (0x8000000U)
5049 #define EMVSIM_PCSR_SPDES_SHIFT                  (27U)
5050 /*! SPDES - SIM Presence Detect Edge Select
5051  *  0b0..Falling edge on the pin (default)
5052  *  0b1..Rising edge on the pin
5053  */
5054 #define EMVSIM_PCSR_SPDES(x)                     (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDES_SHIFT)) & EMVSIM_PCSR_SPDES_MASK)
5055 /*! @} */
5056 
5057 /*! @name RX_BUF - Receive Data Read Buffer */
5058 /*! @{ */
5059 
5060 #define EMVSIM_RX_BUF_RX_BYTE_MASK               (0xFFU)
5061 #define EMVSIM_RX_BUF_RX_BYTE_SHIFT              (0U)
5062 /*! RX_BYTE - Receive Data Byte Read */
5063 #define EMVSIM_RX_BUF_RX_BYTE(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_BUF_RX_BYTE_SHIFT)) & EMVSIM_RX_BUF_RX_BYTE_MASK)
5064 /*! @} */
5065 
5066 /*! @name TX_BUF - Transmit Data Buffer */
5067 /*! @{ */
5068 
5069 #define EMVSIM_TX_BUF_TX_BYTE_MASK               (0xFFU)
5070 #define EMVSIM_TX_BUF_TX_BYTE_SHIFT              (0U)
5071 /*! TX_BYTE - Transmit Data Byte */
5072 #define EMVSIM_TX_BUF_TX_BYTE(x)                 (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_BUF_TX_BYTE_SHIFT)) & EMVSIM_TX_BUF_TX_BYTE_MASK)
5073 /*! @} */
5074 
5075 /*! @name TX_GETU - Transmitter Guard ETU Value Register */
5076 /*! @{ */
5077 
5078 #define EMVSIM_TX_GETU_GETU_MASK                 (0xFFU)
5079 #define EMVSIM_TX_GETU_GETU_SHIFT                (0U)
5080 /*! GETU - Transmitter Guard Time Value in ETU
5081  *  0b00000000..no additional ETUs inserted (default)
5082  *  0b00000001..1 additional ETU inserted
5083  *  0b11111110..254 additional ETUs inserted
5084  *  0b11111111..Subtracts one ETU by reducing the number of STOP bits from two to one
5085  */
5086 #define EMVSIM_TX_GETU_GETU(x)                   (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_GETU_GETU_SHIFT)) & EMVSIM_TX_GETU_GETU_MASK)
5087 /*! @} */
5088 
5089 /*! @name CWT_VAL - Character Wait Time Value Register */
5090 /*! @{ */
5091 
5092 #define EMVSIM_CWT_VAL_CWT_MASK                  (0xFFFFU)
5093 #define EMVSIM_CWT_VAL_CWT_SHIFT                 (0U)
5094 /*! CWT - Character Wait Time Value */
5095 #define EMVSIM_CWT_VAL_CWT(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_CWT_VAL_CWT_SHIFT)) & EMVSIM_CWT_VAL_CWT_MASK)
5096 /*! @} */
5097 
5098 /*! @name BWT_VAL - Block Wait Time Value Register */
5099 /*! @{ */
5100 
5101 #define EMVSIM_BWT_VAL_BWT_MASK                  (0xFFFFFFFFU)
5102 #define EMVSIM_BWT_VAL_BWT_SHIFT                 (0U)
5103 /*! BWT - Block Wait Time Value */
5104 #define EMVSIM_BWT_VAL_BWT(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_BWT_VAL_BWT_SHIFT)) & EMVSIM_BWT_VAL_BWT_MASK)
5105 /*! @} */
5106 
5107 /*! @name BGT_VAL - Block Guard Time Value Register */
5108 /*! @{ */
5109 
5110 #define EMVSIM_BGT_VAL_BGT_MASK                  (0xFFFFU)
5111 #define EMVSIM_BGT_VAL_BGT_SHIFT                 (0U)
5112 /*! BGT - Block Guard Time Value */
5113 #define EMVSIM_BGT_VAL_BGT(x)                    (((uint32_t)(((uint32_t)(x)) << EMVSIM_BGT_VAL_BGT_SHIFT)) & EMVSIM_BGT_VAL_BGT_MASK)
5114 /*! @} */
5115 
5116 /*! @name GPCNT0_VAL - General Purpose Counter 0 Timeout Value Register */
5117 /*! @{ */
5118 
5119 #define EMVSIM_GPCNT0_VAL_GPCNT0_MASK            (0xFFFFU)
5120 #define EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT           (0U)
5121 /*! GPCNT0 - General Purpose Counter 0 Timeout Value */
5122 #define EMVSIM_GPCNT0_VAL_GPCNT0(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT)) & EMVSIM_GPCNT0_VAL_GPCNT0_MASK)
5123 /*! @} */
5124 
5125 /*! @name GPCNT1_VAL - General Purpose Counter 1 Timeout Value */
5126 /*! @{ */
5127 
5128 #define EMVSIM_GPCNT1_VAL_GPCNT1_MASK            (0xFFFFU)
5129 #define EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT           (0U)
5130 /*! GPCNT1 - General Purpose Counter 1 Timeout Value */
5131 #define EMVSIM_GPCNT1_VAL_GPCNT1(x)              (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT)) & EMVSIM_GPCNT1_VAL_GPCNT1_MASK)
5132 /*! @} */
5133 
5134 
5135 /*!
5136  * @}
5137  */ /* end of group EMVSIM_Register_Masks */
5138 
5139 
5140 /* EMVSIM - Peripheral instance base addresses */
5141 /** Peripheral EMVSIM0 base address */
5142 #define EMVSIM0_BASE                             (0x40038000u)
5143 /** Peripheral EMVSIM0 base pointer */
5144 #define EMVSIM0                                  ((EMVSIM_Type *)EMVSIM0_BASE)
5145 /** Array initializer of EMVSIM peripheral base addresses */
5146 #define EMVSIM_BASE_ADDRS                        { EMVSIM0_BASE }
5147 /** Array initializer of EMVSIM peripheral base pointers */
5148 #define EMVSIM_BASE_PTRS                         { EMVSIM0 }
5149 /** Interrupt vectors for the EMVSIM peripheral type */
5150 #define EMVSIM_IRQS                              { EMVSIM0_IRQn }
5151 
5152 /*!
5153  * @}
5154  */ /* end of group EMVSIM_Peripheral_Access_Layer */
5155 
5156 
5157 /* ----------------------------------------------------------------------------
5158    -- EWM Peripheral Access Layer
5159    ---------------------------------------------------------------------------- */
5160 
5161 /*!
5162  * @addtogroup EWM_Peripheral_Access_Layer EWM Peripheral Access Layer
5163  * @{
5164  */
5165 
5166 /** EWM - Register Layout Typedef */
5167 typedef struct {
5168   __IO uint8_t CTRL;                               /**< Control Register, offset: 0x0 */
5169   __O  uint8_t SERV;                               /**< Service Register, offset: 0x1 */
5170   __IO uint8_t CMPL;                               /**< Compare Low Register, offset: 0x2 */
5171   __IO uint8_t CMPH;                               /**< Compare High Register, offset: 0x3 */
5172        uint8_t RESERVED_0[1];
5173   __IO uint8_t CLKPRESCALER;                       /**< Clock Prescaler Register, offset: 0x5 */
5174 } EWM_Type;
5175 
5176 /* ----------------------------------------------------------------------------
5177    -- EWM Register Masks
5178    ---------------------------------------------------------------------------- */
5179 
5180 /*!
5181  * @addtogroup EWM_Register_Masks EWM Register Masks
5182  * @{
5183  */
5184 
5185 /*! @name CTRL - Control Register */
5186 /*! @{ */
5187 
5188 #define EWM_CTRL_EWMEN_MASK                      (0x1U)
5189 #define EWM_CTRL_EWMEN_SHIFT                     (0U)
5190 /*! EWMEN - EWM enable. */
5191 #define EWM_CTRL_EWMEN(x)                        (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_EWMEN_SHIFT)) & EWM_CTRL_EWMEN_MASK)
5192 
5193 #define EWM_CTRL_ASSIN_MASK                      (0x2U)
5194 #define EWM_CTRL_ASSIN_SHIFT                     (1U)
5195 /*! ASSIN - EWM_in's Assertion State Select. */
5196 #define EWM_CTRL_ASSIN(x)                        (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_ASSIN_SHIFT)) & EWM_CTRL_ASSIN_MASK)
5197 
5198 #define EWM_CTRL_INEN_MASK                       (0x4U)
5199 #define EWM_CTRL_INEN_SHIFT                      (2U)
5200 /*! INEN - Input Enable. */
5201 #define EWM_CTRL_INEN(x)                         (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INEN_SHIFT)) & EWM_CTRL_INEN_MASK)
5202 
5203 #define EWM_CTRL_INTEN_MASK                      (0x8U)
5204 #define EWM_CTRL_INTEN_SHIFT                     (3U)
5205 /*! INTEN - Interrupt Enable. */
5206 #define EWM_CTRL_INTEN(x)                        (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INTEN_SHIFT)) & EWM_CTRL_INTEN_MASK)
5207 /*! @} */
5208 
5209 /*! @name SERV - Service Register */
5210 /*! @{ */
5211 
5212 #define EWM_SERV_SERVICE_MASK                    (0xFFU)
5213 #define EWM_SERV_SERVICE_SHIFT                   (0U)
5214 /*! SERVICE - SERVICE */
5215 #define EWM_SERV_SERVICE(x)                      (((uint8_t)(((uint8_t)(x)) << EWM_SERV_SERVICE_SHIFT)) & EWM_SERV_SERVICE_MASK)
5216 /*! @} */
5217 
5218 /*! @name CMPL - Compare Low Register */
5219 /*! @{ */
5220 
5221 #define EWM_CMPL_COMPAREL_MASK                   (0xFFU)
5222 #define EWM_CMPL_COMPAREL_SHIFT                  (0U)
5223 /*! COMPAREL - COMPAREL */
5224 #define EWM_CMPL_COMPAREL(x)                     (((uint8_t)(((uint8_t)(x)) << EWM_CMPL_COMPAREL_SHIFT)) & EWM_CMPL_COMPAREL_MASK)
5225 /*! @} */
5226 
5227 /*! @name CMPH - Compare High Register */
5228 /*! @{ */
5229 
5230 #define EWM_CMPH_COMPAREH_MASK                   (0xFFU)
5231 #define EWM_CMPH_COMPAREH_SHIFT                  (0U)
5232 /*! COMPAREH - COMPAREH */
5233 #define EWM_CMPH_COMPAREH(x)                     (((uint8_t)(((uint8_t)(x)) << EWM_CMPH_COMPAREH_SHIFT)) & EWM_CMPH_COMPAREH_MASK)
5234 /*! @} */
5235 
5236 /*! @name CLKPRESCALER - Clock Prescaler Register */
5237 /*! @{ */
5238 
5239 #define EWM_CLKPRESCALER_CLK_DIV_MASK            (0xFFU)
5240 #define EWM_CLKPRESCALER_CLK_DIV_SHIFT           (0U)
5241 /*! CLK_DIV - CLK_DIV */
5242 #define EWM_CLKPRESCALER_CLK_DIV(x)              (((uint8_t)(((uint8_t)(x)) << EWM_CLKPRESCALER_CLK_DIV_SHIFT)) & EWM_CLKPRESCALER_CLK_DIV_MASK)
5243 /*! @} */
5244 
5245 
5246 /*!
5247  * @}
5248  */ /* end of group EWM_Register_Masks */
5249 
5250 
5251 /* EWM - Peripheral instance base addresses */
5252 /** Peripheral EWM base address */
5253 #define EWM_BASE                                 (0x40022000u)
5254 /** Peripheral EWM base pointer */
5255 #define EWM                                      ((EWM_Type *)EWM_BASE)
5256 /** Array initializer of EWM peripheral base addresses */
5257 #define EWM_BASE_ADDRS                           { EWM_BASE }
5258 /** Array initializer of EWM peripheral base pointers */
5259 #define EWM_BASE_PTRS                            { EWM }
5260 /** Interrupt vectors for the EWM peripheral type */
5261 #define EWM_IRQS                                 { EWM_IRQn }
5262 
5263 /*!
5264  * @}
5265  */ /* end of group EWM_Peripheral_Access_Layer */
5266 
5267 
5268 /* ----------------------------------------------------------------------------
5269    -- FB Peripheral Access Layer
5270    ---------------------------------------------------------------------------- */
5271 
5272 /*!
5273  * @addtogroup FB_Peripheral_Access_Layer FB Peripheral Access Layer
5274  * @{
5275  */
5276 
5277 /** FB - Register Layout Typedef */
5278 typedef struct {
5279   struct {                                         /* offset: 0x0, array step: 0xC */
5280     __IO uint32_t CSAR;                              /**< Chip Select Address Register, array offset: 0x0, array step: 0xC */
5281     __IO uint32_t CSMR;                              /**< Chip Select Mask Register, array offset: 0x4, array step: 0xC */
5282     __IO uint32_t CSCR;                              /**< Chip Select Control Register, array offset: 0x8, array step: 0xC */
5283   } CS[6];
5284        uint8_t RESERVED_0[24];
5285   __IO uint32_t CSPMCR;                            /**< Chip Select Port Multiplexing Control Register, offset: 0x60 */
5286 } FB_Type;
5287 
5288 /* ----------------------------------------------------------------------------
5289    -- FB Register Masks
5290    ---------------------------------------------------------------------------- */
5291 
5292 /*!
5293  * @addtogroup FB_Register_Masks FB Register Masks
5294  * @{
5295  */
5296 
5297 /*! @name CSAR - Chip Select Address Register */
5298 /*! @{ */
5299 
5300 #define FB_CSAR_BA_MASK                          (0xFFFF0000U)
5301 #define FB_CSAR_BA_SHIFT                         (16U)
5302 /*! BA - Base Address */
5303 #define FB_CSAR_BA(x)                            (((uint32_t)(((uint32_t)(x)) << FB_CSAR_BA_SHIFT)) & FB_CSAR_BA_MASK)
5304 /*! @} */
5305 
5306 /* The count of FB_CSAR */
5307 #define FB_CSAR_COUNT                            (6U)
5308 
5309 /*! @name CSMR - Chip Select Mask Register */
5310 /*! @{ */
5311 
5312 #define FB_CSMR_V_MASK                           (0x1U)
5313 #define FB_CSMR_V_SHIFT                          (0U)
5314 /*! V - Valid
5315  *  0b0..Chip-select is invalid.
5316  *  0b1..Chip-select is valid.
5317  */
5318 #define FB_CSMR_V(x)                             (((uint32_t)(((uint32_t)(x)) << FB_CSMR_V_SHIFT)) & FB_CSMR_V_MASK)
5319 
5320 #define FB_CSMR_WP_MASK                          (0x100U)
5321 #define FB_CSMR_WP_SHIFT                         (8U)
5322 /*! WP - Write Protect
5323  *  0b0..Write accesses are allowed.
5324  *  0b1..Write accesses are not allowed. Attempting to write to the range of addresses for which the WP bit is set
5325  *       results in a bus error termination of the internal cycle and no external cycle.
5326  */
5327 #define FB_CSMR_WP(x)                            (((uint32_t)(((uint32_t)(x)) << FB_CSMR_WP_SHIFT)) & FB_CSMR_WP_MASK)
5328 
5329 #define FB_CSMR_BAM_MASK                         (0xFFFF0000U)
5330 #define FB_CSMR_BAM_SHIFT                        (16U)
5331 /*! BAM - Base Address Mask
5332  *  0b0000000000000000..The corresponding address bit in CSAR is used in the chip-select decode.
5333  *  0b0000000000000001..The corresponding address bit in CSAR is a don't care in the chip-select decode.
5334  */
5335 #define FB_CSMR_BAM(x)                           (((uint32_t)(((uint32_t)(x)) << FB_CSMR_BAM_SHIFT)) & FB_CSMR_BAM_MASK)
5336 /*! @} */
5337 
5338 /* The count of FB_CSMR */
5339 #define FB_CSMR_COUNT                            (6U)
5340 
5341 /*! @name CSCR - Chip Select Control Register */
5342 /*! @{ */
5343 
5344 #define FB_CSCR_BSTW_MASK                        (0x8U)
5345 #define FB_CSCR_BSTW_SHIFT                       (3U)
5346 /*! BSTW - Burst-Write Enable
5347  *  0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst writes.
5348  *       For example, a 32-bit write to an 8-bit port takes four byte writes.
5349  *  0b1..Enabled. Enables burst write of data larger than the specified port size, including 32-bit writes to 8-
5350  *       and 16-bit ports, 16-bit writes to 8-bit ports, and line writes to 8-, 16-, and 32-bit ports.
5351  */
5352 #define FB_CSCR_BSTW(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTW_SHIFT)) & FB_CSCR_BSTW_MASK)
5353 
5354 #define FB_CSCR_BSTR_MASK                        (0x10U)
5355 #define FB_CSCR_BSTR_SHIFT                       (4U)
5356 /*! BSTR - Burst-Read Enable
5357  *  0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst reads.
5358  *       For example, a 32-bit read from an 8-bit port is broken into four 8-bit reads.
5359  *  0b1..Enabled. Enables data burst reads larger than the specified port size, including 32-bit reads from 8- and
5360  *       16-bit ports, 16-bit reads from 8-bit ports, and line reads from 8-, 16-, and 32-bit ports.
5361  */
5362 #define FB_CSCR_BSTR(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTR_SHIFT)) & FB_CSCR_BSTR_MASK)
5363 
5364 #define FB_CSCR_BEM_MASK                         (0x20U)
5365 #define FB_CSCR_BEM_SHIFT                        (5U)
5366 /*! BEM - Byte-Enable Mode
5367  *  0b0..FB_BE_B is asserted for data write only.
5368  *  0b1..FB_BE_B is asserted for data read and write accesses.
5369  */
5370 #define FB_CSCR_BEM(x)                           (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BEM_SHIFT)) & FB_CSCR_BEM_MASK)
5371 
5372 #define FB_CSCR_PS_MASK                          (0xC0U)
5373 #define FB_CSCR_PS_SHIFT                         (6U)
5374 /*! PS - Port Size
5375  *  0b00..32-bit port size. Valid data is sampled and driven on FB_D[31:0].
5376  *  0b01..8-bit port size. Valid data is sampled and driven on FB_D[31:24] when BLS is 0b, or FB_D[7:0] when BLS is 1b.
5377  *  0b1x..16-bit port size. Valid data is sampled and driven on FB_D[31:16] when BLS is 0b, or FB_D[15:0] when BLS is 1b.
5378  */
5379 #define FB_CSCR_PS(x)                            (((uint32_t)(((uint32_t)(x)) << FB_CSCR_PS_SHIFT)) & FB_CSCR_PS_MASK)
5380 
5381 #define FB_CSCR_AA_MASK                          (0x100U)
5382 #define FB_CSCR_AA_SHIFT                         (8U)
5383 /*! AA - Auto-Acknowledge Enable
5384  *  0b0..Disabled. No internal transfer acknowledge is asserted and the cycle is terminated externally.
5385  *  0b1..Enabled. Internal transfer acknowledge is asserted as specified by WS.
5386  */
5387 #define FB_CSCR_AA(x)                            (((uint32_t)(((uint32_t)(x)) << FB_CSCR_AA_SHIFT)) & FB_CSCR_AA_MASK)
5388 
5389 #define FB_CSCR_BLS_MASK                         (0x200U)
5390 #define FB_CSCR_BLS_SHIFT                        (9U)
5391 /*! BLS - Byte-Lane Shift
5392  *  0b0..Not shifted. Data is left-aligned on FB_AD.
5393  *  0b1..Shifted. Data is right-aligned on FB_AD.
5394  */
5395 #define FB_CSCR_BLS(x)                           (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BLS_SHIFT)) & FB_CSCR_BLS_MASK)
5396 
5397 #define FB_CSCR_WS_MASK                          (0xFC00U)
5398 #define FB_CSCR_WS_SHIFT                         (10U)
5399 /*! WS - Wait States */
5400 #define FB_CSCR_WS(x)                            (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WS_SHIFT)) & FB_CSCR_WS_MASK)
5401 
5402 #define FB_CSCR_WRAH_MASK                        (0x30000U)
5403 #define FB_CSCR_WRAH_SHIFT                       (16U)
5404 /*! WRAH - Write Address Hold or Deselect
5405  *  0b00..1 cycle (default for all but FB_CS0_B)
5406  *  0b01..2 cycles
5407  *  0b10..3 cycles
5408  *  0b11..4 cycles (default for FB_CS0_B)
5409  */
5410 #define FB_CSCR_WRAH(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WRAH_SHIFT)) & FB_CSCR_WRAH_MASK)
5411 
5412 #define FB_CSCR_RDAH_MASK                        (0xC0000U)
5413 #define FB_CSCR_RDAH_SHIFT                       (18U)
5414 /*! RDAH - Read Address Hold or Deselect
5415  *  0b00..When AA is 1b, 1 cycle. When AA is 0b, 0 cycles.
5416  *  0b01..When AA is 1b, 2 cycles. When AA is 0b, 1 cycle.
5417  *  0b10..When AA is 1b, 3 cycles. When AA is 0b, 2 cycles.
5418  *  0b11..When AA is 1b, 4 cycles. When AA is 0b, 3 cycles.
5419  */
5420 #define FB_CSCR_RDAH(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_RDAH_SHIFT)) & FB_CSCR_RDAH_MASK)
5421 
5422 #define FB_CSCR_ASET_MASK                        (0x300000U)
5423 #define FB_CSCR_ASET_SHIFT                       (20U)
5424 /*! ASET - Address Setup
5425  *  0b00..Assert FB_CSn_B on the first rising clock edge after the address is asserted (default for all but FB_CS0_B).
5426  *  0b01..Assert FB_CSn_B on the second rising clock edge after the address is asserted.
5427  *  0b10..Assert FB_CSn_B on the third rising clock edge after the address is asserted.
5428  *  0b11..Assert FB_CSn_B on the fourth rising clock edge after the address is asserted (default for FB_CS0_B ).
5429  */
5430 #define FB_CSCR_ASET(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_ASET_SHIFT)) & FB_CSCR_ASET_MASK)
5431 
5432 #define FB_CSCR_EXTS_MASK                        (0x400000U)
5433 #define FB_CSCR_EXTS_SHIFT                       (22U)
5434 /*! EXTS - EXTS
5435  *  0b0..Disabled. FB_TS_B/FB_ALE asserts for one bus clock cycle.
5436  *  0b1..Enabled. FB_TS_B/FB_ALE remains asserted until the first positive clock edge after FB_CSn_B asserts.
5437  */
5438 #define FB_CSCR_EXTS(x)                          (((uint32_t)(((uint32_t)(x)) << FB_CSCR_EXTS_SHIFT)) & FB_CSCR_EXTS_MASK)
5439 
5440 #define FB_CSCR_SWSEN_MASK                       (0x800000U)
5441 #define FB_CSCR_SWSEN_SHIFT                      (23U)
5442 /*! SWSEN - Secondary Wait State Enable
5443  *  0b0..Disabled. A number of wait states (specified by WS) are inserted before an internal transfer acknowledge is generated for all transfers.
5444  *  0b1..Enabled. A number of wait states (specified by SWS) are inserted before an internal transfer acknowledge
5445  *       is generated for burst transfer secondary terminations.
5446  */
5447 #define FB_CSCR_SWSEN(x)                         (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWSEN_SHIFT)) & FB_CSCR_SWSEN_MASK)
5448 
5449 #define FB_CSCR_SWS_MASK                         (0xFC000000U)
5450 #define FB_CSCR_SWS_SHIFT                        (26U)
5451 /*! SWS - Secondary Wait States */
5452 #define FB_CSCR_SWS(x)                           (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWS_SHIFT)) & FB_CSCR_SWS_MASK)
5453 /*! @} */
5454 
5455 /* The count of FB_CSCR */
5456 #define FB_CSCR_COUNT                            (6U)
5457 
5458 /*! @name CSPMCR - Chip Select Port Multiplexing Control Register */
5459 /*! @{ */
5460 
5461 #define FB_CSPMCR_GROUP5_MASK                    (0xF000U)
5462 #define FB_CSPMCR_GROUP5_SHIFT                   (12U)
5463 /*! GROUP5 - FlexBus Signal Group 5 Multiplex control
5464  *  0b0000..FB_TA_B
5465  *  0b0001..FB_CS3_B. You must also write 1b to CSCR[AA].
5466  *  0b0010..FB_BE_7_0_B. You must also write 1b to CSCR[AA].
5467  */
5468 #define FB_CSPMCR_GROUP5(x)                      (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP5_SHIFT)) & FB_CSPMCR_GROUP5_MASK)
5469 
5470 #define FB_CSPMCR_GROUP4_MASK                    (0xF0000U)
5471 #define FB_CSPMCR_GROUP4_SHIFT                   (16U)
5472 /*! GROUP4 - FlexBus Signal Group 4 Multiplex control
5473  *  0b0000..FB_TBST_B
5474  *  0b0001..FB_CS2_B
5475  *  0b0010..FB_BE_15_8_B
5476  */
5477 #define FB_CSPMCR_GROUP4(x)                      (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP4_SHIFT)) & FB_CSPMCR_GROUP4_MASK)
5478 
5479 #define FB_CSPMCR_GROUP3_MASK                    (0xF00000U)
5480 #define FB_CSPMCR_GROUP3_SHIFT                   (20U)
5481 /*! GROUP3 - FlexBus Signal Group 3 Multiplex control
5482  *  0b0000..FB_CS5_B
5483  *  0b0001..FB_TSIZ1
5484  *  0b0010..FB_BE_23_16_B
5485  */
5486 #define FB_CSPMCR_GROUP3(x)                      (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP3_SHIFT)) & FB_CSPMCR_GROUP3_MASK)
5487 
5488 #define FB_CSPMCR_GROUP2_MASK                    (0xF000000U)
5489 #define FB_CSPMCR_GROUP2_SHIFT                   (24U)
5490 /*! GROUP2 - FlexBus Signal Group 2 Multiplex control
5491  *  0b0000..FB_CS4_B
5492  *  0b0001..FB_TSIZ0
5493  *  0b0010..FB_BE_31_24_B
5494  */
5495 #define FB_CSPMCR_GROUP2(x)                      (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP2_SHIFT)) & FB_CSPMCR_GROUP2_MASK)
5496 
5497 #define FB_CSPMCR_GROUP1_MASK                    (0xF0000000U)
5498 #define FB_CSPMCR_GROUP1_SHIFT                   (28U)
5499 /*! GROUP1 - FlexBus Signal Group 1 Multiplex control
5500  *  0b0000..FB_ALE
5501  *  0b0001..FB_CS1_B
5502  *  0b0010..FB_TS_B
5503  */
5504 #define FB_CSPMCR_GROUP1(x)                      (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP1_SHIFT)) & FB_CSPMCR_GROUP1_MASK)
5505 /*! @} */
5506 
5507 
5508 /*!
5509  * @}
5510  */ /* end of group FB_Register_Masks */
5511 
5512 
5513 /* FB - Peripheral instance base addresses */
5514 /** Peripheral FB base address */
5515 #define FB_BASE                                  (0x4000C000u)
5516 /** Peripheral FB base pointer */
5517 #define FB                                       ((FB_Type *)FB_BASE)
5518 /** Array initializer of FB peripheral base addresses */
5519 #define FB_BASE_ADDRS                            { FB_BASE }
5520 /** Array initializer of FB peripheral base pointers */
5521 #define FB_BASE_PTRS                             { FB }
5522 
5523 /*!
5524  * @}
5525  */ /* end of group FB_Peripheral_Access_Layer */
5526 
5527 
5528 /* ----------------------------------------------------------------------------
5529    -- FGPIO Peripheral Access Layer
5530    ---------------------------------------------------------------------------- */
5531 
5532 /*!
5533  * @addtogroup FGPIO_Peripheral_Access_Layer FGPIO Peripheral Access Layer
5534  * @{
5535  */
5536 
5537 /** FGPIO - Register Layout Typedef */
5538 typedef struct {
5539   __IO uint32_t PDOR;                              /**< Port Data Output Register, offset: 0x0 */
5540   __O  uint32_t PSOR;                              /**< Port Set Output Register, offset: 0x4 */
5541   __O  uint32_t PCOR;                              /**< Port Clear Output Register, offset: 0x8 */
5542   __O  uint32_t PTOR;                              /**< Port Toggle Output Register, offset: 0xC */
5543   __I  uint32_t PDIR;                              /**< Port Data Input Register, offset: 0x10 */
5544   __IO uint32_t PDDR;                              /**< Port Data Direction Register, offset: 0x14 */
5545 } FGPIO_Type;
5546 
5547 /* ----------------------------------------------------------------------------
5548    -- FGPIO Register Masks
5549    ---------------------------------------------------------------------------- */
5550 
5551 /*!
5552  * @addtogroup FGPIO_Register_Masks FGPIO Register Masks
5553  * @{
5554  */
5555 
5556 /*! @name PDOR - Port Data Output Register */
5557 /*! @{ */
5558 
5559 #define FGPIO_PDOR_PDO_MASK                      (0xFFFFFFFFU)
5560 #define FGPIO_PDOR_PDO_SHIFT                     (0U)
5561 /*! PDO - Port Data Output */
5562 #define FGPIO_PDOR_PDO(x)                        (((uint32_t)(((uint32_t)(x)) << FGPIO_PDOR_PDO_SHIFT)) & FGPIO_PDOR_PDO_MASK)
5563 /*! @} */
5564 
5565 /*! @name PSOR - Port Set Output Register */
5566 /*! @{ */
5567 
5568 #define FGPIO_PSOR_PTSO_MASK                     (0xFFFFFFFFU)
5569 #define FGPIO_PSOR_PTSO_SHIFT                    (0U)
5570 /*! PTSO - Port Set Output */
5571 #define FGPIO_PSOR_PTSO(x)                       (((uint32_t)(((uint32_t)(x)) << FGPIO_PSOR_PTSO_SHIFT)) & FGPIO_PSOR_PTSO_MASK)
5572 /*! @} */
5573 
5574 /*! @name PCOR - Port Clear Output Register */
5575 /*! @{ */
5576 
5577 #define FGPIO_PCOR_PTCO_MASK                     (0xFFFFFFFFU)
5578 #define FGPIO_PCOR_PTCO_SHIFT                    (0U)
5579 /*! PTCO - Port Clear Output */
5580 #define FGPIO_PCOR_PTCO(x)                       (((uint32_t)(((uint32_t)(x)) << FGPIO_PCOR_PTCO_SHIFT)) & FGPIO_PCOR_PTCO_MASK)
5581 /*! @} */
5582 
5583 /*! @name PTOR - Port Toggle Output Register */
5584 /*! @{ */
5585 
5586 #define FGPIO_PTOR_PTTO_MASK                     (0xFFFFFFFFU)
5587 #define FGPIO_PTOR_PTTO_SHIFT                    (0U)
5588 /*! PTTO - Port Toggle Output */
5589 #define FGPIO_PTOR_PTTO(x)                       (((uint32_t)(((uint32_t)(x)) << FGPIO_PTOR_PTTO_SHIFT)) & FGPIO_PTOR_PTTO_MASK)
5590 /*! @} */
5591 
5592 /*! @name PDIR - Port Data Input Register */
5593 /*! @{ */
5594 
5595 #define FGPIO_PDIR_PDI_MASK                      (0xFFFFFFFFU)
5596 #define FGPIO_PDIR_PDI_SHIFT                     (0U)
5597 /*! PDI - Port Data Input */
5598 #define FGPIO_PDIR_PDI(x)                        (((uint32_t)(((uint32_t)(x)) << FGPIO_PDIR_PDI_SHIFT)) & FGPIO_PDIR_PDI_MASK)
5599 /*! @} */
5600 
5601 /*! @name PDDR - Port Data Direction Register */
5602 /*! @{ */
5603 
5604 #define FGPIO_PDDR_PDD_MASK                      (0xFFFFFFFFU)
5605 #define FGPIO_PDDR_PDD_SHIFT                     (0U)
5606 /*! PDD - Port Data Direction */
5607 #define FGPIO_PDDR_PDD(x)                        (((uint32_t)(((uint32_t)(x)) << FGPIO_PDDR_PDD_SHIFT)) & FGPIO_PDDR_PDD_MASK)
5608 /*! @} */
5609 
5610 
5611 /*!
5612  * @}
5613  */ /* end of group FGPIO_Register_Masks */
5614 
5615 
5616 /* FGPIO - Peripheral instance base addresses */
5617 /** Peripheral FGPIOE base address */
5618 #define FGPIOE_BASE                              (0xF8000000u)
5619 /** Peripheral FGPIOE base pointer */
5620 #define FGPIOE                                   ((FGPIO_Type *)FGPIOE_BASE)
5621 /** Array initializer of FGPIO peripheral base addresses */
5622 #define FGPIO_BASE_ADDRS                         { 0u, 0u, 0u, 0u, FGPIOE_BASE }
5623 /** Array initializer of FGPIO peripheral base pointers */
5624 #define FGPIO_BASE_PTRS                          { (FGPIO_Type *)0u, (FGPIO_Type *)0u, (FGPIO_Type *)0u, (FGPIO_Type *)0u, FGPIOE }
5625 
5626 /*!
5627  * @}
5628  */ /* end of group FGPIO_Peripheral_Access_Layer */
5629 
5630 
5631 /* ----------------------------------------------------------------------------
5632    -- FLEXIO Peripheral Access Layer
5633    ---------------------------------------------------------------------------- */
5634 
5635 /*!
5636  * @addtogroup FLEXIO_Peripheral_Access_Layer FLEXIO Peripheral Access Layer
5637  * @{
5638  */
5639 
5640 /** FLEXIO - Register Layout Typedef */
5641 typedef struct {
5642   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
5643   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
5644   __IO uint32_t CTRL;                              /**< FlexIO Control Register, offset: 0x8 */
5645   __I  uint32_t PIN;                               /**< Pin State Register, offset: 0xC */
5646   __IO uint32_t SHIFTSTAT;                         /**< Shifter Status Register, offset: 0x10 */
5647   __IO uint32_t SHIFTERR;                          /**< Shifter Error Register, offset: 0x14 */
5648   __IO uint32_t TIMSTAT;                           /**< Timer Status Register, offset: 0x18 */
5649        uint8_t RESERVED_0[4];
5650   __IO uint32_t SHIFTSIEN;                         /**< Shifter Status Interrupt Enable, offset: 0x20 */
5651   __IO uint32_t SHIFTEIEN;                         /**< Shifter Error Interrupt Enable, offset: 0x24 */
5652   __IO uint32_t TIMIEN;                            /**< Timer Interrupt Enable Register, offset: 0x28 */
5653        uint8_t RESERVED_1[4];
5654   __IO uint32_t SHIFTSDEN;                         /**< Shifter Status DMA Enable, offset: 0x30 */
5655        uint8_t RESERVED_2[12];
5656   __IO uint32_t SHIFTSTATE;                        /**< Shifter State Register, offset: 0x40 */
5657        uint8_t RESERVED_3[60];
5658   __IO uint32_t SHIFTCTL[8];                       /**< Shifter Control N Register, array offset: 0x80, array step: 0x4 */
5659        uint8_t RESERVED_4[96];
5660   __IO uint32_t SHIFTCFG[8];                       /**< Shifter Configuration N Register, array offset: 0x100, array step: 0x4 */
5661        uint8_t RESERVED_5[224];
5662   __IO uint32_t SHIFTBUF[8];                       /**< Shifter Buffer N Register, array offset: 0x200, array step: 0x4 */
5663        uint8_t RESERVED_6[96];
5664   __IO uint32_t SHIFTBUFBIS[8];                    /**< Shifter Buffer N Bit Swapped Register, array offset: 0x280, array step: 0x4 */
5665        uint8_t RESERVED_7[96];
5666   __IO uint32_t SHIFTBUFBYS[8];                    /**< Shifter Buffer N Byte Swapped Register, array offset: 0x300, array step: 0x4 */
5667        uint8_t RESERVED_8[96];
5668   __IO uint32_t SHIFTBUFBBS[8];                    /**< Shifter Buffer N Bit Byte Swapped Register, array offset: 0x380, array step: 0x4 */
5669        uint8_t RESERVED_9[96];
5670   __IO uint32_t TIMCTL[8];                         /**< Timer Control N Register, array offset: 0x400, array step: 0x4 */
5671        uint8_t RESERVED_10[96];
5672   __IO uint32_t TIMCFG[8];                         /**< Timer Configuration N Register, array offset: 0x480, array step: 0x4 */
5673        uint8_t RESERVED_11[96];
5674   __IO uint32_t TIMCMP[8];                         /**< Timer Compare N Register, array offset: 0x500, array step: 0x4 */
5675        uint8_t RESERVED_12[352];
5676   __IO uint32_t SHIFTBUFNBS[8];                    /**< Shifter Buffer N Nibble Byte Swapped Register, array offset: 0x680, array step: 0x4 */
5677        uint8_t RESERVED_13[96];
5678   __IO uint32_t SHIFTBUFHWS[8];                    /**< Shifter Buffer N Half Word Swapped Register, array offset: 0x700, array step: 0x4 */
5679        uint8_t RESERVED_14[96];
5680   __IO uint32_t SHIFTBUFNIS[8];                    /**< Shifter Buffer N Nibble Swapped Register, array offset: 0x780, array step: 0x4 */
5681 } FLEXIO_Type;
5682 
5683 /* ----------------------------------------------------------------------------
5684    -- FLEXIO Register Masks
5685    ---------------------------------------------------------------------------- */
5686 
5687 /*!
5688  * @addtogroup FLEXIO_Register_Masks FLEXIO Register Masks
5689  * @{
5690  */
5691 
5692 /*! @name VERID - Version ID Register */
5693 /*! @{ */
5694 
5695 #define FLEXIO_VERID_FEATURE_MASK                (0xFFFFU)
5696 #define FLEXIO_VERID_FEATURE_SHIFT               (0U)
5697 /*! FEATURE - Feature Specification Number
5698  *  0b0000000000000000..Standard features implemented.
5699  *  0b0000000000000001..Supports state, logic and parallel modes.
5700  */
5701 #define FLEXIO_VERID_FEATURE(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_FEATURE_SHIFT)) & FLEXIO_VERID_FEATURE_MASK)
5702 
5703 #define FLEXIO_VERID_MINOR_MASK                  (0xFF0000U)
5704 #define FLEXIO_VERID_MINOR_SHIFT                 (16U)
5705 /*! MINOR - Minor Version Number */
5706 #define FLEXIO_VERID_MINOR(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MINOR_SHIFT)) & FLEXIO_VERID_MINOR_MASK)
5707 
5708 #define FLEXIO_VERID_MAJOR_MASK                  (0xFF000000U)
5709 #define FLEXIO_VERID_MAJOR_SHIFT                 (24U)
5710 /*! MAJOR - Major Version Number */
5711 #define FLEXIO_VERID_MAJOR(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MAJOR_SHIFT)) & FLEXIO_VERID_MAJOR_MASK)
5712 /*! @} */
5713 
5714 /*! @name PARAM - Parameter Register */
5715 /*! @{ */
5716 
5717 #define FLEXIO_PARAM_SHIFTER_MASK                (0xFFU)
5718 #define FLEXIO_PARAM_SHIFTER_SHIFT               (0U)
5719 /*! SHIFTER - Shifter Number */
5720 #define FLEXIO_PARAM_SHIFTER(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_SHIFTER_SHIFT)) & FLEXIO_PARAM_SHIFTER_MASK)
5721 
5722 #define FLEXIO_PARAM_TIMER_MASK                  (0xFF00U)
5723 #define FLEXIO_PARAM_TIMER_SHIFT                 (8U)
5724 /*! TIMER - Timer Number */
5725 #define FLEXIO_PARAM_TIMER(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TIMER_SHIFT)) & FLEXIO_PARAM_TIMER_MASK)
5726 
5727 #define FLEXIO_PARAM_PIN_MASK                    (0xFF0000U)
5728 #define FLEXIO_PARAM_PIN_SHIFT                   (16U)
5729 /*! PIN - Pin Number */
5730 #define FLEXIO_PARAM_PIN(x)                      (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_PIN_SHIFT)) & FLEXIO_PARAM_PIN_MASK)
5731 
5732 #define FLEXIO_PARAM_TRIGGER_MASK                (0xFF000000U)
5733 #define FLEXIO_PARAM_TRIGGER_SHIFT               (24U)
5734 /*! TRIGGER - Trigger Number */
5735 #define FLEXIO_PARAM_TRIGGER(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TRIGGER_SHIFT)) & FLEXIO_PARAM_TRIGGER_MASK)
5736 /*! @} */
5737 
5738 /*! @name CTRL - FlexIO Control Register */
5739 /*! @{ */
5740 
5741 #define FLEXIO_CTRL_FLEXEN_MASK                  (0x1U)
5742 #define FLEXIO_CTRL_FLEXEN_SHIFT                 (0U)
5743 /*! FLEXEN - FlexIO Enable
5744  *  0b0..FlexIO module is disabled.
5745  *  0b1..FlexIO module is enabled.
5746  */
5747 #define FLEXIO_CTRL_FLEXEN(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FLEXEN_SHIFT)) & FLEXIO_CTRL_FLEXEN_MASK)
5748 
5749 #define FLEXIO_CTRL_SWRST_MASK                   (0x2U)
5750 #define FLEXIO_CTRL_SWRST_SHIFT                  (1U)
5751 /*! SWRST - Software Reset
5752  *  0b0..Software reset is disabled
5753  *  0b1..Software reset is enabled, all FlexIO registers except the Control Register are reset.
5754  */
5755 #define FLEXIO_CTRL_SWRST(x)                     (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_SWRST_SHIFT)) & FLEXIO_CTRL_SWRST_MASK)
5756 
5757 #define FLEXIO_CTRL_FASTACC_MASK                 (0x4U)
5758 #define FLEXIO_CTRL_FASTACC_SHIFT                (2U)
5759 /*! FASTACC - Fast Access
5760  *  0b0..Configures for normal register accesses to FlexIO
5761  *  0b1..Configures for fast register accesses to FlexIO
5762  */
5763 #define FLEXIO_CTRL_FASTACC(x)                   (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FASTACC_SHIFT)) & FLEXIO_CTRL_FASTACC_MASK)
5764 
5765 #define FLEXIO_CTRL_DBGE_MASK                    (0x40000000U)
5766 #define FLEXIO_CTRL_DBGE_SHIFT                   (30U)
5767 /*! DBGE - Debug Enable
5768  *  0b0..FlexIO is disabled in debug modes.
5769  *  0b1..FlexIO is enabled in debug modes
5770  */
5771 #define FLEXIO_CTRL_DBGE(x)                      (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DBGE_SHIFT)) & FLEXIO_CTRL_DBGE_MASK)
5772 
5773 #define FLEXIO_CTRL_DOZEN_MASK                   (0x80000000U)
5774 #define FLEXIO_CTRL_DOZEN_SHIFT                  (31U)
5775 /*! DOZEN - Doze Enable
5776  *  0b0..FlexIO enabled in Doze modes.
5777  *  0b1..FlexIO disabled in Doze modes.
5778  */
5779 #define FLEXIO_CTRL_DOZEN(x)                     (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DOZEN_SHIFT)) & FLEXIO_CTRL_DOZEN_MASK)
5780 /*! @} */
5781 
5782 /*! @name PIN - Pin State Register */
5783 /*! @{ */
5784 
5785 #define FLEXIO_PIN_PDI_MASK                      (0xFFFFFFFFU)
5786 #define FLEXIO_PIN_PDI_SHIFT                     (0U)
5787 /*! PDI - Pin Data Input */
5788 #define FLEXIO_PIN_PDI(x)                        (((uint32_t)(((uint32_t)(x)) << FLEXIO_PIN_PDI_SHIFT)) & FLEXIO_PIN_PDI_MASK)
5789 /*! @} */
5790 
5791 /*! @name SHIFTSTAT - Shifter Status Register */
5792 /*! @{ */
5793 
5794 #define FLEXIO_SHIFTSTAT_SSF_MASK                (0xFFU)
5795 #define FLEXIO_SHIFTSTAT_SSF_SHIFT               (0U)
5796 /*! SSF - Shifter Status Flag */
5797 #define FLEXIO_SHIFTSTAT_SSF(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTAT_SSF_SHIFT)) & FLEXIO_SHIFTSTAT_SSF_MASK)
5798 /*! @} */
5799 
5800 /*! @name SHIFTERR - Shifter Error Register */
5801 /*! @{ */
5802 
5803 #define FLEXIO_SHIFTERR_SEF_MASK                 (0xFFU)
5804 #define FLEXIO_SHIFTERR_SEF_SHIFT                (0U)
5805 /*! SEF - Shifter Error Flags */
5806 #define FLEXIO_SHIFTERR_SEF(x)                   (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTERR_SEF_SHIFT)) & FLEXIO_SHIFTERR_SEF_MASK)
5807 /*! @} */
5808 
5809 /*! @name TIMSTAT - Timer Status Register */
5810 /*! @{ */
5811 
5812 #define FLEXIO_TIMSTAT_TSF_MASK                  (0xFFU)
5813 #define FLEXIO_TIMSTAT_TSF_SHIFT                 (0U)
5814 /*! TSF - Timer Status Flags */
5815 #define FLEXIO_TIMSTAT_TSF(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMSTAT_TSF_SHIFT)) & FLEXIO_TIMSTAT_TSF_MASK)
5816 /*! @} */
5817 
5818 /*! @name SHIFTSIEN - Shifter Status Interrupt Enable */
5819 /*! @{ */
5820 
5821 #define FLEXIO_SHIFTSIEN_SSIE_MASK               (0xFFU)
5822 #define FLEXIO_SHIFTSIEN_SSIE_SHIFT              (0U)
5823 /*! SSIE - Shifter Status Interrupt Enable */
5824 #define FLEXIO_SHIFTSIEN_SSIE(x)                 (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSIEN_SSIE_SHIFT)) & FLEXIO_SHIFTSIEN_SSIE_MASK)
5825 /*! @} */
5826 
5827 /*! @name SHIFTEIEN - Shifter Error Interrupt Enable */
5828 /*! @{ */
5829 
5830 #define FLEXIO_SHIFTEIEN_SEIE_MASK               (0xFFU)
5831 #define FLEXIO_SHIFTEIEN_SEIE_SHIFT              (0U)
5832 /*! SEIE - Shifter Error Interrupt Enable */
5833 #define FLEXIO_SHIFTEIEN_SEIE(x)                 (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTEIEN_SEIE_SHIFT)) & FLEXIO_SHIFTEIEN_SEIE_MASK)
5834 /*! @} */
5835 
5836 /*! @name TIMIEN - Timer Interrupt Enable Register */
5837 /*! @{ */
5838 
5839 #define FLEXIO_TIMIEN_TEIE_MASK                  (0xFFU)
5840 #define FLEXIO_TIMIEN_TEIE_SHIFT                 (0U)
5841 /*! TEIE - Timer Status Interrupt Enable */
5842 #define FLEXIO_TIMIEN_TEIE(x)                    (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMIEN_TEIE_SHIFT)) & FLEXIO_TIMIEN_TEIE_MASK)
5843 /*! @} */
5844 
5845 /*! @name SHIFTSDEN - Shifter Status DMA Enable */
5846 /*! @{ */
5847 
5848 #define FLEXIO_SHIFTSDEN_SSDE_MASK               (0xFFU)
5849 #define FLEXIO_SHIFTSDEN_SSDE_SHIFT              (0U)
5850 /*! SSDE - Shifter Status DMA Enable */
5851 #define FLEXIO_SHIFTSDEN_SSDE(x)                 (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSDEN_SSDE_SHIFT)) & FLEXIO_SHIFTSDEN_SSDE_MASK)
5852 /*! @} */
5853 
5854 /*! @name SHIFTSTATE - Shifter State Register */
5855 /*! @{ */
5856 
5857 #define FLEXIO_SHIFTSTATE_STATE_MASK             (0x7U)
5858 #define FLEXIO_SHIFTSTATE_STATE_SHIFT            (0U)
5859 /*! STATE - Current State Pointer */
5860 #define FLEXIO_SHIFTSTATE_STATE(x)               (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTATE_STATE_SHIFT)) & FLEXIO_SHIFTSTATE_STATE_MASK)
5861 /*! @} */
5862 
5863 /*! @name SHIFTCTL - Shifter Control N Register */
5864 /*! @{ */
5865 
5866 #define FLEXIO_SHIFTCTL_SMOD_MASK                (0x7U)
5867 #define FLEXIO_SHIFTCTL_SMOD_SHIFT               (0U)
5868 /*! SMOD - Shifter Mode
5869  *  0b000..Disabled.
5870  *  0b001..Receive mode. Captures the current Shifter content into the SHIFTBUF on expiration of the Timer.
5871  *  0b010..Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer.
5872  *  0b011..Reserved.
5873  *  0b100..Match Store mode. Shifter data is compared to SHIFTBUF content on expiration of the Timer.
5874  *  0b101..Match Continuous mode. Shifter data is continuously compared to SHIFTBUF contents.
5875  *  0b110..State mode. SHIFTBUF contents are used for storing programmable state attributes.
5876  *  0b111..Logic mode. SHIFTBUF contents are used for implementing programmable logic look up table.
5877  */
5878 #define FLEXIO_SHIFTCTL_SMOD(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_SMOD_SHIFT)) & FLEXIO_SHIFTCTL_SMOD_MASK)
5879 
5880 #define FLEXIO_SHIFTCTL_PINPOL_MASK              (0x80U)
5881 #define FLEXIO_SHIFTCTL_PINPOL_SHIFT             (7U)
5882 /*! PINPOL - Shifter Pin Polarity
5883  *  0b0..Pin is active high
5884  *  0b1..Pin is active low
5885  */
5886 #define FLEXIO_SHIFTCTL_PINPOL(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINPOL_SHIFT)) & FLEXIO_SHIFTCTL_PINPOL_MASK)
5887 
5888 #define FLEXIO_SHIFTCTL_PINSEL_MASK              (0x1F00U)
5889 #define FLEXIO_SHIFTCTL_PINSEL_SHIFT             (8U)
5890 /*! PINSEL - Shifter Pin Select */
5891 #define FLEXIO_SHIFTCTL_PINSEL(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINSEL_SHIFT)) & FLEXIO_SHIFTCTL_PINSEL_MASK)
5892 
5893 #define FLEXIO_SHIFTCTL_PINCFG_MASK              (0x30000U)
5894 #define FLEXIO_SHIFTCTL_PINCFG_SHIFT             (16U)
5895 /*! PINCFG - Shifter Pin Configuration
5896  *  0b00..Shifter pin output disabled
5897  *  0b01..Shifter pin open drain or bidirectional output enable
5898  *  0b10..Shifter pin bidirectional output data
5899  *  0b11..Shifter pin output
5900  */
5901 #define FLEXIO_SHIFTCTL_PINCFG(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINCFG_SHIFT)) & FLEXIO_SHIFTCTL_PINCFG_MASK)
5902 
5903 #define FLEXIO_SHIFTCTL_TIMPOL_MASK              (0x800000U)
5904 #define FLEXIO_SHIFTCTL_TIMPOL_SHIFT             (23U)
5905 /*! TIMPOL - Timer Polarity
5906  *  0b0..Shift on posedge of Shift clock
5907  *  0b1..Shift on negedge of Shift clock
5908  */
5909 #define FLEXIO_SHIFTCTL_TIMPOL(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMPOL_SHIFT)) & FLEXIO_SHIFTCTL_TIMPOL_MASK)
5910 
5911 #define FLEXIO_SHIFTCTL_TIMSEL_MASK              (0x7000000U)
5912 #define FLEXIO_SHIFTCTL_TIMSEL_SHIFT             (24U)
5913 /*! TIMSEL - Timer Select */
5914 #define FLEXIO_SHIFTCTL_TIMSEL(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMSEL_SHIFT)) & FLEXIO_SHIFTCTL_TIMSEL_MASK)
5915 /*! @} */
5916 
5917 /* The count of FLEXIO_SHIFTCTL */
5918 #define FLEXIO_SHIFTCTL_COUNT                    (8U)
5919 
5920 /*! @name SHIFTCFG - Shifter Configuration N Register */
5921 /*! @{ */
5922 
5923 #define FLEXIO_SHIFTCFG_SSTART_MASK              (0x3U)
5924 #define FLEXIO_SHIFTCFG_SSTART_SHIFT             (0U)
5925 /*! SSTART - Shifter Start bit
5926  *  0b00..Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable
5927  *  0b01..Start bit disabled for transmitter/receiver/match store, transmitter loads data on first shift
5928  *  0b10..Transmitter outputs start bit value 0 before loading data on first shift, receiver/match store sets error flag if start bit is not 0
5929  *  0b11..Transmitter outputs start bit value 1 before loading data on first shift, receiver/match store sets error flag if start bit is not 1
5930  */
5931 #define FLEXIO_SHIFTCFG_SSTART(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTART_SHIFT)) & FLEXIO_SHIFTCFG_SSTART_MASK)
5932 
5933 #define FLEXIO_SHIFTCFG_SSTOP_MASK               (0x30U)
5934 #define FLEXIO_SHIFTCFG_SSTOP_SHIFT              (4U)
5935 /*! SSTOP - Shifter Stop bit
5936  *  0b00..Stop bit disabled for transmitter/receiver/match store
5937  *  0b01..Reserved for transmitter/receiver/match store
5938  *  0b10..Transmitter outputs stop bit value 0 on store, receiver/match store sets error flag if stop bit is not 0
5939  *  0b11..Transmitter outputs stop bit value 1 on store, receiver/match store sets error flag if stop bit is not 1
5940  */
5941 #define FLEXIO_SHIFTCFG_SSTOP(x)                 (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTOP_SHIFT)) & FLEXIO_SHIFTCFG_SSTOP_MASK)
5942 
5943 #define FLEXIO_SHIFTCFG_INSRC_MASK               (0x100U)
5944 #define FLEXIO_SHIFTCFG_INSRC_SHIFT              (8U)
5945 /*! INSRC - Input Source
5946  *  0b0..Pin
5947  *  0b1..Shifter N+1 Output
5948  */
5949 #define FLEXIO_SHIFTCFG_INSRC(x)                 (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_INSRC_SHIFT)) & FLEXIO_SHIFTCFG_INSRC_MASK)
5950 
5951 #define FLEXIO_SHIFTCFG_PWIDTH_MASK              (0x1F0000U)
5952 #define FLEXIO_SHIFTCFG_PWIDTH_SHIFT             (16U)
5953 /*! PWIDTH - Parallel Width */
5954 #define FLEXIO_SHIFTCFG_PWIDTH(x)                (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_PWIDTH_SHIFT)) & FLEXIO_SHIFTCFG_PWIDTH_MASK)
5955 /*! @} */
5956 
5957 /* The count of FLEXIO_SHIFTCFG */
5958 #define FLEXIO_SHIFTCFG_COUNT                    (8U)
5959 
5960 /*! @name SHIFTBUF - Shifter Buffer N Register */
5961 /*! @{ */
5962 
5963 #define FLEXIO_SHIFTBUF_SHIFTBUF_MASK            (0xFFFFFFFFU)
5964 #define FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT           (0U)
5965 /*! SHIFTBUF - Shift Buffer */
5966 #define FLEXIO_SHIFTBUF_SHIFTBUF(x)              (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT)) & FLEXIO_SHIFTBUF_SHIFTBUF_MASK)
5967 /*! @} */
5968 
5969 /* The count of FLEXIO_SHIFTBUF */
5970 #define FLEXIO_SHIFTBUF_COUNT                    (8U)
5971 
5972 /*! @name SHIFTBUFBIS - Shifter Buffer N Bit Swapped Register */
5973 /*! @{ */
5974 
5975 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK      (0xFFFFFFFFU)
5976 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT     (0U)
5977 /*! SHIFTBUFBIS - Shift Buffer */
5978 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT)) & FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK)
5979 /*! @} */
5980 
5981 /* The count of FLEXIO_SHIFTBUFBIS */
5982 #define FLEXIO_SHIFTBUFBIS_COUNT                 (8U)
5983 
5984 /*! @name SHIFTBUFBYS - Shifter Buffer N Byte Swapped Register */
5985 /*! @{ */
5986 
5987 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK      (0xFFFFFFFFU)
5988 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT     (0U)
5989 /*! SHIFTBUFBYS - Shift Buffer */
5990 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT)) & FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK)
5991 /*! @} */
5992 
5993 /* The count of FLEXIO_SHIFTBUFBYS */
5994 #define FLEXIO_SHIFTBUFBYS_COUNT                 (8U)
5995 
5996 /*! @name SHIFTBUFBBS - Shifter Buffer N Bit Byte Swapped Register */
5997 /*! @{ */
5998 
5999 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK      (0xFFFFFFFFU)
6000 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT     (0U)
6001 /*! SHIFTBUFBBS - Shift Buffer */
6002 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT)) & FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK)
6003 /*! @} */
6004 
6005 /* The count of FLEXIO_SHIFTBUFBBS */
6006 #define FLEXIO_SHIFTBUFBBS_COUNT                 (8U)
6007 
6008 /*! @name TIMCTL - Timer Control N Register */
6009 /*! @{ */
6010 
6011 #define FLEXIO_TIMCTL_TIMOD_MASK                 (0x3U)
6012 #define FLEXIO_TIMCTL_TIMOD_SHIFT                (0U)
6013 /*! TIMOD - Timer Mode
6014  *  0b00..Timer Disabled.
6015  *  0b01..Dual 8-bit counters baud mode.
6016  *  0b10..Dual 8-bit counters PWM high mode.
6017  *  0b11..Single 16-bit counter mode.
6018  */
6019 #define FLEXIO_TIMCTL_TIMOD(x)                   (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TIMOD_SHIFT)) & FLEXIO_TIMCTL_TIMOD_MASK)
6020 
6021 #define FLEXIO_TIMCTL_PINPOL_MASK                (0x80U)
6022 #define FLEXIO_TIMCTL_PINPOL_SHIFT               (7U)
6023 /*! PINPOL - Timer Pin Polarity
6024  *  0b0..Pin is active high
6025  *  0b1..Pin is active low
6026  */
6027 #define FLEXIO_TIMCTL_PINPOL(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINPOL_SHIFT)) & FLEXIO_TIMCTL_PINPOL_MASK)
6028 
6029 #define FLEXIO_TIMCTL_PINSEL_MASK                (0x1F00U)
6030 #define FLEXIO_TIMCTL_PINSEL_SHIFT               (8U)
6031 /*! PINSEL - Timer Pin Select */
6032 #define FLEXIO_TIMCTL_PINSEL(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINSEL_SHIFT)) & FLEXIO_TIMCTL_PINSEL_MASK)
6033 
6034 #define FLEXIO_TIMCTL_PINCFG_MASK                (0x30000U)
6035 #define FLEXIO_TIMCTL_PINCFG_SHIFT               (16U)
6036 /*! PINCFG - Timer Pin Configuration
6037  *  0b00..Timer pin output disabled
6038  *  0b01..Timer pin open drain or bidirectional output enable
6039  *  0b10..Timer pin bidirectional output data
6040  *  0b11..Timer pin output
6041  */
6042 #define FLEXIO_TIMCTL_PINCFG(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINCFG_SHIFT)) & FLEXIO_TIMCTL_PINCFG_MASK)
6043 
6044 #define FLEXIO_TIMCTL_TRGSRC_MASK                (0x400000U)
6045 #define FLEXIO_TIMCTL_TRGSRC_SHIFT               (22U)
6046 /*! TRGSRC - Trigger Source
6047  *  0b0..External trigger selected
6048  *  0b1..Internal trigger selected
6049  */
6050 #define FLEXIO_TIMCTL_TRGSRC(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSRC_SHIFT)) & FLEXIO_TIMCTL_TRGSRC_MASK)
6051 
6052 #define FLEXIO_TIMCTL_TRGPOL_MASK                (0x800000U)
6053 #define FLEXIO_TIMCTL_TRGPOL_SHIFT               (23U)
6054 /*! TRGPOL - Trigger Polarity
6055  *  0b0..Trigger active high
6056  *  0b1..Trigger active low
6057  */
6058 #define FLEXIO_TIMCTL_TRGPOL(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGPOL_SHIFT)) & FLEXIO_TIMCTL_TRGPOL_MASK)
6059 
6060 #define FLEXIO_TIMCTL_TRGSEL_MASK                (0x3F000000U)
6061 #define FLEXIO_TIMCTL_TRGSEL_SHIFT               (24U)
6062 /*! TRGSEL - Trigger Select */
6063 #define FLEXIO_TIMCTL_TRGSEL(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSEL_SHIFT)) & FLEXIO_TIMCTL_TRGSEL_MASK)
6064 /*! @} */
6065 
6066 /* The count of FLEXIO_TIMCTL */
6067 #define FLEXIO_TIMCTL_COUNT                      (8U)
6068 
6069 /*! @name TIMCFG - Timer Configuration N Register */
6070 /*! @{ */
6071 
6072 #define FLEXIO_TIMCFG_TSTART_MASK                (0x2U)
6073 #define FLEXIO_TIMCFG_TSTART_SHIFT               (1U)
6074 /*! TSTART - Timer Start Bit
6075  *  0b0..Start bit disabled
6076  *  0b1..Start bit enabled
6077  */
6078 #define FLEXIO_TIMCFG_TSTART(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTART_SHIFT)) & FLEXIO_TIMCFG_TSTART_MASK)
6079 
6080 #define FLEXIO_TIMCFG_TSTOP_MASK                 (0x30U)
6081 #define FLEXIO_TIMCFG_TSTOP_SHIFT                (4U)
6082 /*! TSTOP - Timer Stop Bit
6083  *  0b00..Stop bit disabled
6084  *  0b01..Stop bit is enabled on timer compare
6085  *  0b10..Stop bit is enabled on timer disable
6086  *  0b11..Stop bit is enabled on timer compare and timer disable
6087  */
6088 #define FLEXIO_TIMCFG_TSTOP(x)                   (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTOP_SHIFT)) & FLEXIO_TIMCFG_TSTOP_MASK)
6089 
6090 #define FLEXIO_TIMCFG_TIMENA_MASK                (0x700U)
6091 #define FLEXIO_TIMCFG_TIMENA_SHIFT               (8U)
6092 /*! TIMENA - Timer Enable
6093  *  0b000..Timer always enabled
6094  *  0b001..Timer enabled on Timer N-1 enable
6095  *  0b010..Timer enabled on Trigger high
6096  *  0b011..Timer enabled on Trigger high and Pin high
6097  *  0b100..Timer enabled on Pin rising edge
6098  *  0b101..Timer enabled on Pin rising edge and Trigger high
6099  *  0b110..Timer enabled on Trigger rising edge
6100  *  0b111..Timer enabled on Trigger rising or falling edge
6101  */
6102 #define FLEXIO_TIMCFG_TIMENA(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMENA_SHIFT)) & FLEXIO_TIMCFG_TIMENA_MASK)
6103 
6104 #define FLEXIO_TIMCFG_TIMDIS_MASK                (0x7000U)
6105 #define FLEXIO_TIMCFG_TIMDIS_SHIFT               (12U)
6106 /*! TIMDIS - Timer Disable
6107  *  0b000..Timer never disabled
6108  *  0b001..Timer disabled on Timer N-1 disable
6109  *  0b010..Timer disabled on Timer compare (upper 8-bits match and decrement)
6110  *  0b011..Timer disabled on Timer compare (upper 8-bits match and decrement) and Trigger Low
6111  *  0b100..Timer disabled on Pin rising or falling edge
6112  *  0b101..Timer disabled on Pin rising or falling edge provided Trigger is high
6113  *  0b110..Timer disabled on Trigger falling edge
6114  *  0b111..Reserved
6115  */
6116 #define FLEXIO_TIMCFG_TIMDIS(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDIS_SHIFT)) & FLEXIO_TIMCFG_TIMDIS_MASK)
6117 
6118 #define FLEXIO_TIMCFG_TIMRST_MASK                (0x70000U)
6119 #define FLEXIO_TIMCFG_TIMRST_SHIFT               (16U)
6120 /*! TIMRST - Timer Reset
6121  *  0b000..Timer never reset
6122  *  0b001..Reserved
6123  *  0b010..Timer reset on Timer Pin equal to Timer Output
6124  *  0b011..Timer reset on Timer Trigger equal to Timer Output
6125  *  0b100..Timer reset on Timer Pin rising edge
6126  *  0b101..Reserved
6127  *  0b110..Timer reset on Trigger rising edge
6128  *  0b111..Timer reset on Trigger rising or falling edge
6129  */
6130 #define FLEXIO_TIMCFG_TIMRST(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMRST_SHIFT)) & FLEXIO_TIMCFG_TIMRST_MASK)
6131 
6132 #define FLEXIO_TIMCFG_TIMDEC_MASK                (0x300000U)
6133 #define FLEXIO_TIMCFG_TIMDEC_SHIFT               (20U)
6134 /*! TIMDEC - Timer Decrement
6135  *  0b00..Decrement counter on FlexIO clock, Shift clock equals Timer output.
6136  *  0b01..Decrement counter on Trigger input (both edges), Shift clock equals Timer output.
6137  *  0b10..Decrement counter on Pin input (both edges), Shift clock equals Pin input.
6138  *  0b11..Decrement counter on Trigger input (both edges), Shift clock equals Trigger input.
6139  */
6140 #define FLEXIO_TIMCFG_TIMDEC(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDEC_SHIFT)) & FLEXIO_TIMCFG_TIMDEC_MASK)
6141 
6142 #define FLEXIO_TIMCFG_TIMOUT_MASK                (0x3000000U)
6143 #define FLEXIO_TIMCFG_TIMOUT_SHIFT               (24U)
6144 /*! TIMOUT - Timer Output
6145  *  0b00..Timer output is logic one when enabled and is not affected by timer reset
6146  *  0b01..Timer output is logic zero when enabled and is not affected by timer reset
6147  *  0b10..Timer output is logic one when enabled and on timer reset
6148  *  0b11..Timer output is logic zero when enabled and on timer reset
6149  */
6150 #define FLEXIO_TIMCFG_TIMOUT(x)                  (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMOUT_SHIFT)) & FLEXIO_TIMCFG_TIMOUT_MASK)
6151 /*! @} */
6152 
6153 /* The count of FLEXIO_TIMCFG */
6154 #define FLEXIO_TIMCFG_COUNT                      (8U)
6155 
6156 /*! @name TIMCMP - Timer Compare N Register */
6157 /*! @{ */
6158 
6159 #define FLEXIO_TIMCMP_CMP_MASK                   (0xFFFFU)
6160 #define FLEXIO_TIMCMP_CMP_SHIFT                  (0U)
6161 /*! CMP - Timer Compare Value */
6162 #define FLEXIO_TIMCMP_CMP(x)                     (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCMP_CMP_SHIFT)) & FLEXIO_TIMCMP_CMP_MASK)
6163 /*! @} */
6164 
6165 /* The count of FLEXIO_TIMCMP */
6166 #define FLEXIO_TIMCMP_COUNT                      (8U)
6167 
6168 /*! @name SHIFTBUFNBS - Shifter Buffer N Nibble Byte Swapped Register */
6169 /*! @{ */
6170 
6171 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK      (0xFFFFFFFFU)
6172 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT     (0U)
6173 /*! SHIFTBUFNBS - Shift Buffer */
6174 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT)) & FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK)
6175 /*! @} */
6176 
6177 /* The count of FLEXIO_SHIFTBUFNBS */
6178 #define FLEXIO_SHIFTBUFNBS_COUNT                 (8U)
6179 
6180 /*! @name SHIFTBUFHWS - Shifter Buffer N Half Word Swapped Register */
6181 /*! @{ */
6182 
6183 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK      (0xFFFFFFFFU)
6184 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT     (0U)
6185 /*! SHIFTBUFHWS - Shift Buffer */
6186 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT)) & FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK)
6187 /*! @} */
6188 
6189 /* The count of FLEXIO_SHIFTBUFHWS */
6190 #define FLEXIO_SHIFTBUFHWS_COUNT                 (8U)
6191 
6192 /*! @name SHIFTBUFNIS - Shifter Buffer N Nibble Swapped Register */
6193 /*! @{ */
6194 
6195 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK      (0xFFFFFFFFU)
6196 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT     (0U)
6197 /*! SHIFTBUFNIS - Shift Buffer */
6198 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS(x)        (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT)) & FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK)
6199 /*! @} */
6200 
6201 /* The count of FLEXIO_SHIFTBUFNIS */
6202 #define FLEXIO_SHIFTBUFNIS_COUNT                 (8U)
6203 
6204 
6205 /*!
6206  * @}
6207  */ /* end of group FLEXIO_Register_Masks */
6208 
6209 
6210 /* FLEXIO - Peripheral instance base addresses */
6211 /** Peripheral FLEXIO0 base address */
6212 #define FLEXIO0_BASE                             (0x40039000u)
6213 /** Peripheral FLEXIO0 base pointer */
6214 #define FLEXIO0                                  ((FLEXIO_Type *)FLEXIO0_BASE)
6215 /** Array initializer of FLEXIO peripheral base addresses */
6216 #define FLEXIO_BASE_ADDRS                        { FLEXIO0_BASE }
6217 /** Array initializer of FLEXIO peripheral base pointers */
6218 #define FLEXIO_BASE_PTRS                         { FLEXIO0 }
6219 /** Interrupt vectors for the FLEXIO peripheral type */
6220 #define FLEXIO_IRQS                              { FLEXIO0_IRQn }
6221 
6222 /*!
6223  * @}
6224  */ /* end of group FLEXIO_Peripheral_Access_Layer */
6225 
6226 
6227 /* ----------------------------------------------------------------------------
6228    -- FTFE Peripheral Access Layer
6229    ---------------------------------------------------------------------------- */
6230 
6231 /*!
6232  * @addtogroup FTFE_Peripheral_Access_Layer FTFE Peripheral Access Layer
6233  * @{
6234  */
6235 
6236 /** FTFE - Register Layout Typedef */
6237 typedef struct {
6238   __IO uint8_t FSTAT;                              /**< Flash Status Register, offset: 0x0 */
6239   __IO uint8_t FCNFG;                              /**< Flash Configuration Register, offset: 0x1 */
6240   __I  uint8_t FSEC;                               /**< Flash Security Register, offset: 0x2 */
6241        uint8_t RESERVED_0[1];
6242   __IO uint8_t FCCOB3;                             /**< Flash Common Command Object Registers, offset: 0x4 */
6243   __IO uint8_t FCCOB2;                             /**< Flash Common Command Object Registers, offset: 0x5 */
6244   __IO uint8_t FCCOB1;                             /**< Flash Common Command Object Registers, offset: 0x6 */
6245   __IO uint8_t FCCOB0;                             /**< Flash Common Command Object Registers, offset: 0x7 */
6246   __IO uint8_t FCCOB7;                             /**< Flash Common Command Object Registers, offset: 0x8 */
6247   __IO uint8_t FCCOB6;                             /**< Flash Common Command Object Registers, offset: 0x9 */
6248   __IO uint8_t FCCOB5;                             /**< Flash Common Command Object Registers, offset: 0xA */
6249   __IO uint8_t FCCOB4;                             /**< Flash Common Command Object Registers, offset: 0xB */
6250   __IO uint8_t FCCOBB;                             /**< Flash Common Command Object Registers, offset: 0xC */
6251   __IO uint8_t FCCOBA;                             /**< Flash Common Command Object Registers, offset: 0xD */
6252   __IO uint8_t FCCOB9;                             /**< Flash Common Command Object Registers, offset: 0xE */
6253   __IO uint8_t FCCOB8;                             /**< Flash Common Command Object Registers, offset: 0xF */
6254   __I  uint8_t FOPT3;                              /**< Flash Option Registers, offset: 0x10 */
6255   __I  uint8_t FOPT2;                              /**< Flash Option Registers, offset: 0x11 */
6256   __I  uint8_t FOPT1;                              /**< Flash Option Registers, offset: 0x12 */
6257   __I  uint8_t FOPT0;                              /**< Flash Option Registers, offset: 0x13 */
6258        uint8_t RESERVED_1[4];
6259   __IO uint8_t FPROTH3;                            /**< Primary Program Flash Protection Registers, offset: 0x18 */
6260   __IO uint8_t FPROTH2;                            /**< Primary Program Flash Protection Registers, offset: 0x19 */
6261   __IO uint8_t FPROTH1;                            /**< Primary Program Flash Protection Registers, offset: 0x1A */
6262   __IO uint8_t FPROTH0;                            /**< Primary Program Flash Protection Registers, offset: 0x1B */
6263   __IO uint8_t FPROTL3;                            /**< Primary Program Flash Protection Registers, offset: 0x1C */
6264   __IO uint8_t FPROTL2;                            /**< Primary Program Flash Protection Registers, offset: 0x1D */
6265   __IO uint8_t FPROTL1;                            /**< Primary Program Flash Protection Registers, offset: 0x1E */
6266   __IO uint8_t FPROTL0;                            /**< Primary Program Flash Protection Registers, offset: 0x1F */
6267        uint8_t RESERVED_2[4];
6268   __IO uint8_t FPROTSL;                            /**< Secondary Program Flash Protection Registers, offset: 0x24 */
6269   __IO uint8_t FPROTSH;                            /**< Secondary Program Flash Protection Registers, offset: 0x25 */
6270        uint8_t RESERVED_3[6];
6271   __I  uint8_t FACSS;                              /**< Primary Flash Access Segment Size Register, offset: 0x2C */
6272   __I  uint8_t FACSN;                              /**< Primary Flash Access Segment Number Register, offset: 0x2D */
6273   __I  uint8_t FACSSS;                             /**< Secondary Flash Access Segment Size Register, offset: 0x2E */
6274   __I  uint8_t FACSNS;                             /**< Secondary Flash Access Segment Number Register, offset: 0x2F */
6275   __I  uint8_t XACCH3;                             /**< Primary Execute-only Access Registers, offset: 0x30 */
6276   __I  uint8_t XACCH2;                             /**< Primary Execute-only Access Registers, offset: 0x31 */
6277   __I  uint8_t XACCH1;                             /**< Primary Execute-only Access Registers, offset: 0x32 */
6278   __I  uint8_t XACCH0;                             /**< Primary Execute-only Access Registers, offset: 0x33 */
6279   __I  uint8_t XACCL3;                             /**< Primary Execute-only Access Registers, offset: 0x34 */
6280   __I  uint8_t XACCL2;                             /**< Primary Execute-only Access Registers, offset: 0x35 */
6281   __I  uint8_t XACCL1;                             /**< Primary Execute-only Access Registers, offset: 0x36 */
6282   __I  uint8_t XACCL0;                             /**< Primary Execute-only Access Registers, offset: 0x37 */
6283   __I  uint8_t SACCH3;                             /**< Primary Supervisor-only Access Registers, offset: 0x38 */
6284   __I  uint8_t SACCH2;                             /**< Primary Supervisor-only Access Registers, offset: 0x39 */
6285   __I  uint8_t SACCH1;                             /**< Primary Supervisor-only Access Registers, offset: 0x3A */
6286   __I  uint8_t SACCH0;                             /**< Primary Supervisor-only Access Registers, offset: 0x3B */
6287   __I  uint8_t SACCL3;                             /**< Primary Supervisor-only Access Registers, offset: 0x3C */
6288   __I  uint8_t SACCL2;                             /**< Primary Supervisor-only Access Registers, offset: 0x3D */
6289   __I  uint8_t SACCL1;                             /**< Primary Supervisor-only Access Registers, offset: 0x3E */
6290   __I  uint8_t SACCL0;                             /**< Primary Supervisor-only Access Registers, offset: 0x3F */
6291        uint8_t RESERVED_4[4];
6292   __I  uint8_t XACCSL;                             /**< Secondary Execute-only Access Registers, offset: 0x44 */
6293   __I  uint8_t XACCSH;                             /**< Secondary Execute-only Access Registers, offset: 0x45 */
6294        uint8_t RESERVED_5[6];
6295   __I  uint8_t SACCSL;                             /**< Secondary Supervisor-only Access Registers, offset: 0x4C */
6296   __I  uint8_t SACCSH;                             /**< Secondary Supervisor-only Access Registers, offset: 0x4D */
6297        uint8_t RESERVED_6[4];
6298   __I  uint8_t FSTDBYCTL;                          /**< Flash Standby Control Register, offset: 0x52 */
6299   __IO uint8_t FSTDBY;                             /**< Flash Standby Register, offset: 0x53 */
6300 } FTFE_Type;
6301 
6302 /* ----------------------------------------------------------------------------
6303    -- FTFE Register Masks
6304    ---------------------------------------------------------------------------- */
6305 
6306 /*!
6307  * @addtogroup FTFE_Register_Masks FTFE Register Masks
6308  * @{
6309  */
6310 
6311 /*! @name FSTAT - Flash Status Register */
6312 /*! @{ */
6313 
6314 #define FTFE_FSTAT_MGSTAT0_MASK                  (0x1U)
6315 #define FTFE_FSTAT_MGSTAT0_SHIFT                 (0U)
6316 /*! MGSTAT0 - Memory Controller Command Completion Status Flag */
6317 #define FTFE_FSTAT_MGSTAT0(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_MGSTAT0_SHIFT)) & FTFE_FSTAT_MGSTAT0_MASK)
6318 
6319 #define FTFE_FSTAT_FPVIOL_MASK                   (0x10U)
6320 #define FTFE_FSTAT_FPVIOL_SHIFT                  (4U)
6321 /*! FPVIOL - Flash Protection Violation Flag
6322  *  0b0..No protection violation detected
6323  *  0b1..Protection violation detected
6324  */
6325 #define FTFE_FSTAT_FPVIOL(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_FPVIOL_SHIFT)) & FTFE_FSTAT_FPVIOL_MASK)
6326 
6327 #define FTFE_FSTAT_ACCERR_MASK                   (0x20U)
6328 #define FTFE_FSTAT_ACCERR_SHIFT                  (5U)
6329 /*! ACCERR - Flash Access Error Flag
6330  *  0b0..No access error detected
6331  *  0b1..Access error detected
6332  */
6333 #define FTFE_FSTAT_ACCERR(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_ACCERR_SHIFT)) & FTFE_FSTAT_ACCERR_MASK)
6334 
6335 #define FTFE_FSTAT_RDCOLERR_MASK                 (0x40U)
6336 #define FTFE_FSTAT_RDCOLERR_SHIFT                (6U)
6337 /*! RDCOLERR - Flash Read Collision Error Flag
6338  *  0b0..No collision error detected
6339  *  0b1..Collision error detected
6340  */
6341 #define FTFE_FSTAT_RDCOLERR(x)                   (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_RDCOLERR_SHIFT)) & FTFE_FSTAT_RDCOLERR_MASK)
6342 
6343 #define FTFE_FSTAT_CCIF_MASK                     (0x80U)
6344 #define FTFE_FSTAT_CCIF_SHIFT                    (7U)
6345 /*! CCIF - Command Complete Interrupt Flag
6346  *  0b0..Flash command in progress
6347  *  0b1..Flash command has completed
6348  */
6349 #define FTFE_FSTAT_CCIF(x)                       (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_CCIF_SHIFT)) & FTFE_FSTAT_CCIF_MASK)
6350 /*! @} */
6351 
6352 /*! @name FCNFG - Flash Configuration Register */
6353 /*! @{ */
6354 
6355 #define FTFE_FCNFG_RAMRDY_MASK                   (0x2U)
6356 #define FTFE_FCNFG_RAMRDY_SHIFT                  (1U)
6357 /*! RAMRDY - RAM Ready
6358  *  0b0..Programming acceleration RAM is not available
6359  *  0b1..Programming acceleration RAM is available
6360  */
6361 #define FTFE_FCNFG_RAMRDY(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RAMRDY_SHIFT)) & FTFE_FCNFG_RAMRDY_MASK)
6362 
6363 #define FTFE_FCNFG_CRCRDY_MASK                   (0x4U)
6364 #define FTFE_FCNFG_CRCRDY_SHIFT                  (2U)
6365 /*! CRCRDY - CRC Ready
6366  *  0b0..Programming acceleration RAM is not available for CRC operations
6367  *  0b1..Programming acceleration RAM is available for CRC operations
6368  */
6369 #define FTFE_FCNFG_CRCRDY(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CRCRDY_SHIFT)) & FTFE_FCNFG_CRCRDY_MASK)
6370 
6371 #define FTFE_FCNFG_SWAP_MASK                     (0x8U)
6372 #define FTFE_FCNFG_SWAP_SHIFT                    (3U)
6373 /*! SWAP - Swap
6374  *  0b0..Program flash 0 block is located at relative address 0x0000
6375  *  0b1..Program flash 1 block is located at relative address 0x0000
6376  */
6377 #define FTFE_FCNFG_SWAP(x)                       (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_SWAP_SHIFT)) & FTFE_FCNFG_SWAP_MASK)
6378 
6379 #define FTFE_FCNFG_ERSSUSP_MASK                  (0x10U)
6380 #define FTFE_FCNFG_ERSSUSP_SHIFT                 (4U)
6381 /*! ERSSUSP - Erase Suspend
6382  *  0b0..No suspend requested
6383  *  0b1..Suspend the current Erase Flash Sector command execution
6384  */
6385 #define FTFE_FCNFG_ERSSUSP(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSSUSP_SHIFT)) & FTFE_FCNFG_ERSSUSP_MASK)
6386 
6387 #define FTFE_FCNFG_ERSAREQ_MASK                  (0x20U)
6388 #define FTFE_FCNFG_ERSAREQ_SHIFT                 (5U)
6389 /*! ERSAREQ - Erase All Request
6390  *  0b0..No request or request complete
6391  *  0b1..Request to: (1) run the Erase All Blocks command, (2) verify the erased state, (3) program the security
6392  *       byte in the Flash Configuration Field to the unsecure state, and (4) release MCU security by setting the
6393  *       FSEC[SEC] field to the unsecure state.
6394  */
6395 #define FTFE_FCNFG_ERSAREQ(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSAREQ_SHIFT)) & FTFE_FCNFG_ERSAREQ_MASK)
6396 
6397 #define FTFE_FCNFG_RDCOLLIE_MASK                 (0x40U)
6398 #define FTFE_FCNFG_RDCOLLIE_SHIFT                (6U)
6399 /*! RDCOLLIE - Read Collision Error Interrupt Enable
6400  *  0b0..Read collision error interrupt disabled
6401  *  0b1..Read collision error interrupt enabled. An interrupt request is generated whenever a flash read collision
6402  *       error is detected (see the description of FSTAT[RDCOLERR]).
6403  */
6404 #define FTFE_FCNFG_RDCOLLIE(x)                   (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RDCOLLIE_SHIFT)) & FTFE_FCNFG_RDCOLLIE_MASK)
6405 
6406 #define FTFE_FCNFG_CCIE_MASK                     (0x80U)
6407 #define FTFE_FCNFG_CCIE_SHIFT                    (7U)
6408 /*! CCIE - Command Complete Interrupt Enable
6409  *  0b0..Command complete interrupt disabled
6410  *  0b1..Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT[CCIF] flag is set.
6411  */
6412 #define FTFE_FCNFG_CCIE(x)                       (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CCIE_SHIFT)) & FTFE_FCNFG_CCIE_MASK)
6413 /*! @} */
6414 
6415 /*! @name FSEC - Flash Security Register */
6416 /*! @{ */
6417 
6418 #define FTFE_FSEC_SEC_MASK                       (0x3U)
6419 #define FTFE_FSEC_SEC_SHIFT                      (0U)
6420 /*! SEC - Flash Security
6421  *  0b00..MCU security status is secure
6422  *  0b01..MCU security status is secure
6423  *  0b10..MCU security status is unsecure (The standard shipping condition of the flash module is unsecure.)
6424  *  0b11..MCU security status is secure
6425  */
6426 #define FTFE_FSEC_SEC(x)                         (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_SEC_SHIFT)) & FTFE_FSEC_SEC_MASK)
6427 
6428 #define FTFE_FSEC_FSLACC_MASK                    (0xCU)
6429 #define FTFE_FSEC_FSLACC_SHIFT                   (2U)
6430 /*! FSLACC - Factory Security Level Access Code
6431  *  0b00..Factory access granted
6432  *  0b01..Factory access denied
6433  *  0b10..Factory access denied
6434  *  0b11..Factory access granted
6435  */
6436 #define FTFE_FSEC_FSLACC(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_FSLACC_SHIFT)) & FTFE_FSEC_FSLACC_MASK)
6437 
6438 #define FTFE_FSEC_MEEN_MASK                      (0x30U)
6439 #define FTFE_FSEC_MEEN_SHIFT                     (4U)
6440 /*! MEEN - Mass Erase Enable Bits
6441  *  0b00..Mass erase is enabled
6442  *  0b01..Mass erase is enabled
6443  *  0b10..Mass erase is disabled
6444  *  0b11..Mass erase is enabled
6445  */
6446 #define FTFE_FSEC_MEEN(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_MEEN_SHIFT)) & FTFE_FSEC_MEEN_MASK)
6447 
6448 #define FTFE_FSEC_KEYEN_MASK                     (0xC0U)
6449 #define FTFE_FSEC_KEYEN_SHIFT                    (6U)
6450 /*! KEYEN - Backdoor Key Security Enable
6451  *  0b00..Backdoor key access disabled
6452  *  0b01..Backdoor key access disabled (preferred KEYEN state to disable backdoor key access)
6453  *  0b10..Backdoor key access enabled
6454  *  0b11..Backdoor key access disabled
6455  */
6456 #define FTFE_FSEC_KEYEN(x)                       (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_KEYEN_SHIFT)) & FTFE_FSEC_KEYEN_MASK)
6457 /*! @} */
6458 
6459 /*! @name FCCOB3 - Flash Common Command Object Registers */
6460 /*! @{ */
6461 
6462 #define FTFE_FCCOB3_CCOBn_MASK                   (0xFFU)
6463 #define FTFE_FCCOB3_CCOBn_SHIFT                  (0U)
6464 /*! CCOBn - CCOBn */
6465 #define FTFE_FCCOB3_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB3_CCOBn_SHIFT)) & FTFE_FCCOB3_CCOBn_MASK)
6466 /*! @} */
6467 
6468 /*! @name FCCOB2 - Flash Common Command Object Registers */
6469 /*! @{ */
6470 
6471 #define FTFE_FCCOB2_CCOBn_MASK                   (0xFFU)
6472 #define FTFE_FCCOB2_CCOBn_SHIFT                  (0U)
6473 /*! CCOBn - CCOBn */
6474 #define FTFE_FCCOB2_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB2_CCOBn_SHIFT)) & FTFE_FCCOB2_CCOBn_MASK)
6475 /*! @} */
6476 
6477 /*! @name FCCOB1 - Flash Common Command Object Registers */
6478 /*! @{ */
6479 
6480 #define FTFE_FCCOB1_CCOBn_MASK                   (0xFFU)
6481 #define FTFE_FCCOB1_CCOBn_SHIFT                  (0U)
6482 /*! CCOBn - CCOBn */
6483 #define FTFE_FCCOB1_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB1_CCOBn_SHIFT)) & FTFE_FCCOB1_CCOBn_MASK)
6484 /*! @} */
6485 
6486 /*! @name FCCOB0 - Flash Common Command Object Registers */
6487 /*! @{ */
6488 
6489 #define FTFE_FCCOB0_CCOBn_MASK                   (0xFFU)
6490 #define FTFE_FCCOB0_CCOBn_SHIFT                  (0U)
6491 /*! CCOBn - CCOBn */
6492 #define FTFE_FCCOB0_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB0_CCOBn_SHIFT)) & FTFE_FCCOB0_CCOBn_MASK)
6493 /*! @} */
6494 
6495 /*! @name FCCOB7 - Flash Common Command Object Registers */
6496 /*! @{ */
6497 
6498 #define FTFE_FCCOB7_CCOBn_MASK                   (0xFFU)
6499 #define FTFE_FCCOB7_CCOBn_SHIFT                  (0U)
6500 /*! CCOBn - CCOBn */
6501 #define FTFE_FCCOB7_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB7_CCOBn_SHIFT)) & FTFE_FCCOB7_CCOBn_MASK)
6502 /*! @} */
6503 
6504 /*! @name FCCOB6 - Flash Common Command Object Registers */
6505 /*! @{ */
6506 
6507 #define FTFE_FCCOB6_CCOBn_MASK                   (0xFFU)
6508 #define FTFE_FCCOB6_CCOBn_SHIFT                  (0U)
6509 /*! CCOBn - CCOBn */
6510 #define FTFE_FCCOB6_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB6_CCOBn_SHIFT)) & FTFE_FCCOB6_CCOBn_MASK)
6511 /*! @} */
6512 
6513 /*! @name FCCOB5 - Flash Common Command Object Registers */
6514 /*! @{ */
6515 
6516 #define FTFE_FCCOB5_CCOBn_MASK                   (0xFFU)
6517 #define FTFE_FCCOB5_CCOBn_SHIFT                  (0U)
6518 /*! CCOBn - CCOBn */
6519 #define FTFE_FCCOB5_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB5_CCOBn_SHIFT)) & FTFE_FCCOB5_CCOBn_MASK)
6520 /*! @} */
6521 
6522 /*! @name FCCOB4 - Flash Common Command Object Registers */
6523 /*! @{ */
6524 
6525 #define FTFE_FCCOB4_CCOBn_MASK                   (0xFFU)
6526 #define FTFE_FCCOB4_CCOBn_SHIFT                  (0U)
6527 /*! CCOBn - CCOBn */
6528 #define FTFE_FCCOB4_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB4_CCOBn_SHIFT)) & FTFE_FCCOB4_CCOBn_MASK)
6529 /*! @} */
6530 
6531 /*! @name FCCOBB - Flash Common Command Object Registers */
6532 /*! @{ */
6533 
6534 #define FTFE_FCCOBB_CCOBn_MASK                   (0xFFU)
6535 #define FTFE_FCCOBB_CCOBn_SHIFT                  (0U)
6536 /*! CCOBn - CCOBn */
6537 #define FTFE_FCCOBB_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBB_CCOBn_SHIFT)) & FTFE_FCCOBB_CCOBn_MASK)
6538 /*! @} */
6539 
6540 /*! @name FCCOBA - Flash Common Command Object Registers */
6541 /*! @{ */
6542 
6543 #define FTFE_FCCOBA_CCOBn_MASK                   (0xFFU)
6544 #define FTFE_FCCOBA_CCOBn_SHIFT                  (0U)
6545 /*! CCOBn - CCOBn */
6546 #define FTFE_FCCOBA_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBA_CCOBn_SHIFT)) & FTFE_FCCOBA_CCOBn_MASK)
6547 /*! @} */
6548 
6549 /*! @name FCCOB9 - Flash Common Command Object Registers */
6550 /*! @{ */
6551 
6552 #define FTFE_FCCOB9_CCOBn_MASK                   (0xFFU)
6553 #define FTFE_FCCOB9_CCOBn_SHIFT                  (0U)
6554 /*! CCOBn - CCOBn */
6555 #define FTFE_FCCOB9_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB9_CCOBn_SHIFT)) & FTFE_FCCOB9_CCOBn_MASK)
6556 /*! @} */
6557 
6558 /*! @name FCCOB8 - Flash Common Command Object Registers */
6559 /*! @{ */
6560 
6561 #define FTFE_FCCOB8_CCOBn_MASK                   (0xFFU)
6562 #define FTFE_FCCOB8_CCOBn_SHIFT                  (0U)
6563 /*! CCOBn - CCOBn */
6564 #define FTFE_FCCOB8_CCOBn(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB8_CCOBn_SHIFT)) & FTFE_FCCOB8_CCOBn_MASK)
6565 /*! @} */
6566 
6567 /*! @name FOPT3 - Flash Option Registers */
6568 /*! @{ */
6569 
6570 #define FTFE_FOPT3_OPT_MASK                      (0xFFU)
6571 #define FTFE_FOPT3_OPT_SHIFT                     (0U)
6572 /*! OPT - Nonvolatile Option */
6573 #define FTFE_FOPT3_OPT(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT3_OPT_SHIFT)) & FTFE_FOPT3_OPT_MASK)
6574 /*! @} */
6575 
6576 /*! @name FOPT2 - Flash Option Registers */
6577 /*! @{ */
6578 
6579 #define FTFE_FOPT2_OPT_MASK                      (0xFFU)
6580 #define FTFE_FOPT2_OPT_SHIFT                     (0U)
6581 /*! OPT - Nonvolatile Option */
6582 #define FTFE_FOPT2_OPT(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT2_OPT_SHIFT)) & FTFE_FOPT2_OPT_MASK)
6583 /*! @} */
6584 
6585 /*! @name FOPT1 - Flash Option Registers */
6586 /*! @{ */
6587 
6588 #define FTFE_FOPT1_OPT_MASK                      (0xFFU)
6589 #define FTFE_FOPT1_OPT_SHIFT                     (0U)
6590 /*! OPT - Nonvolatile Option */
6591 #define FTFE_FOPT1_OPT(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT1_OPT_SHIFT)) & FTFE_FOPT1_OPT_MASK)
6592 /*! @} */
6593 
6594 /*! @name FOPT0 - Flash Option Registers */
6595 /*! @{ */
6596 
6597 #define FTFE_FOPT0_OPT_MASK                      (0xFFU)
6598 #define FTFE_FOPT0_OPT_SHIFT                     (0U)
6599 /*! OPT - Nonvolatile Option */
6600 #define FTFE_FOPT0_OPT(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT0_OPT_SHIFT)) & FTFE_FOPT0_OPT_MASK)
6601 /*! @} */
6602 
6603 /*! @name FPROTH3 - Primary Program Flash Protection Registers */
6604 /*! @{ */
6605 
6606 #define FTFE_FPROTH3_PROT_MASK                   (0xFFU)
6607 #define FTFE_FPROTH3_PROT_SHIFT                  (0U)
6608 /*! PROT - Primary Program Flash Region Protect */
6609 #define FTFE_FPROTH3_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH3_PROT_SHIFT)) & FTFE_FPROTH3_PROT_MASK)
6610 /*! @} */
6611 
6612 /*! @name FPROTH2 - Primary Program Flash Protection Registers */
6613 /*! @{ */
6614 
6615 #define FTFE_FPROTH2_PROT_MASK                   (0xFFU)
6616 #define FTFE_FPROTH2_PROT_SHIFT                  (0U)
6617 /*! PROT - Primary Program Flash Region Protect */
6618 #define FTFE_FPROTH2_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH2_PROT_SHIFT)) & FTFE_FPROTH2_PROT_MASK)
6619 /*! @} */
6620 
6621 /*! @name FPROTH1 - Primary Program Flash Protection Registers */
6622 /*! @{ */
6623 
6624 #define FTFE_FPROTH1_PROT_MASK                   (0xFFU)
6625 #define FTFE_FPROTH1_PROT_SHIFT                  (0U)
6626 /*! PROT - Primary Program Flash Region Protect */
6627 #define FTFE_FPROTH1_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH1_PROT_SHIFT)) & FTFE_FPROTH1_PROT_MASK)
6628 /*! @} */
6629 
6630 /*! @name FPROTH0 - Primary Program Flash Protection Registers */
6631 /*! @{ */
6632 
6633 #define FTFE_FPROTH0_PROT_MASK                   (0xFFU)
6634 #define FTFE_FPROTH0_PROT_SHIFT                  (0U)
6635 /*! PROT - Primary Program Flash Region Protect */
6636 #define FTFE_FPROTH0_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH0_PROT_SHIFT)) & FTFE_FPROTH0_PROT_MASK)
6637 /*! @} */
6638 
6639 /*! @name FPROTL3 - Primary Program Flash Protection Registers */
6640 /*! @{ */
6641 
6642 #define FTFE_FPROTL3_PROT_MASK                   (0xFFU)
6643 #define FTFE_FPROTL3_PROT_SHIFT                  (0U)
6644 /*! PROT - Primary Program Flash Region Protect */
6645 #define FTFE_FPROTL3_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL3_PROT_SHIFT)) & FTFE_FPROTL3_PROT_MASK)
6646 /*! @} */
6647 
6648 /*! @name FPROTL2 - Primary Program Flash Protection Registers */
6649 /*! @{ */
6650 
6651 #define FTFE_FPROTL2_PROT_MASK                   (0xFFU)
6652 #define FTFE_FPROTL2_PROT_SHIFT                  (0U)
6653 /*! PROT - Primary Program Flash Region Protect */
6654 #define FTFE_FPROTL2_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL2_PROT_SHIFT)) & FTFE_FPROTL2_PROT_MASK)
6655 /*! @} */
6656 
6657 /*! @name FPROTL1 - Primary Program Flash Protection Registers */
6658 /*! @{ */
6659 
6660 #define FTFE_FPROTL1_PROT_MASK                   (0xFFU)
6661 #define FTFE_FPROTL1_PROT_SHIFT                  (0U)
6662 /*! PROT - Primary Program Flash Region Protect */
6663 #define FTFE_FPROTL1_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL1_PROT_SHIFT)) & FTFE_FPROTL1_PROT_MASK)
6664 /*! @} */
6665 
6666 /*! @name FPROTL0 - Primary Program Flash Protection Registers */
6667 /*! @{ */
6668 
6669 #define FTFE_FPROTL0_PROT_MASK                   (0xFFU)
6670 #define FTFE_FPROTL0_PROT_SHIFT                  (0U)
6671 /*! PROT - Primary Program Flash Region Protect */
6672 #define FTFE_FPROTL0_PROT(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL0_PROT_SHIFT)) & FTFE_FPROTL0_PROT_MASK)
6673 /*! @} */
6674 
6675 /*! @name FPROTSL - Secondary Program Flash Protection Registers */
6676 /*! @{ */
6677 
6678 #define FTFE_FPROTSL_PROTS_MASK                  (0xFFU)
6679 #define FTFE_FPROTSL_PROTS_SHIFT                 (0U)
6680 /*! PROTS - Secondary Program Flash Region Protect */
6681 #define FTFE_FPROTSL_PROTS(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTSL_PROTS_SHIFT)) & FTFE_FPROTSL_PROTS_MASK)
6682 /*! @} */
6683 
6684 /*! @name FPROTSH - Secondary Program Flash Protection Registers */
6685 /*! @{ */
6686 
6687 #define FTFE_FPROTSH_PROTS_MASK                  (0xFFU)
6688 #define FTFE_FPROTSH_PROTS_SHIFT                 (0U)
6689 /*! PROTS - Secondary Program Flash Region Protect */
6690 #define FTFE_FPROTSH_PROTS(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTSH_PROTS_SHIFT)) & FTFE_FPROTSH_PROTS_MASK)
6691 /*! @} */
6692 
6693 /*! @name FACSS - Primary Flash Access Segment Size Register */
6694 /*! @{ */
6695 
6696 #define FTFE_FACSS_SGSIZE_MASK                   (0xFFU)
6697 #define FTFE_FACSS_SGSIZE_SHIFT                  (0U)
6698 /*! SGSIZE - Segment Size */
6699 #define FTFE_FACSS_SGSIZE(x)                     (((uint8_t)(((uint8_t)(x)) << FTFE_FACSS_SGSIZE_SHIFT)) & FTFE_FACSS_SGSIZE_MASK)
6700 /*! @} */
6701 
6702 /*! @name FACSN - Primary Flash Access Segment Number Register */
6703 /*! @{ */
6704 
6705 #define FTFE_FACSN_NUMSG_MASK                    (0xFFU)
6706 #define FTFE_FACSN_NUMSG_SHIFT                   (0U)
6707 /*! NUMSG - Number of Segments Indicator
6708  *  0b00110000..Primary Program flash memory is divided into 48 segments (768 Kbytes, 1.5 Mbytes)
6709  *  0b01000000..Primary Program flash memory is divided into 64 segments (512 Kbytes, 1 Mbyte, 2 Mbytes)
6710  */
6711 #define FTFE_FACSN_NUMSG(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_FACSN_NUMSG_SHIFT)) & FTFE_FACSN_NUMSG_MASK)
6712 /*! @} */
6713 
6714 /*! @name FACSSS - Secondary Flash Access Segment Size Register */
6715 /*! @{ */
6716 
6717 #define FTFE_FACSSS_SGSIZE_S_MASK                (0xFFU)
6718 #define FTFE_FACSSS_SGSIZE_S_SHIFT               (0U)
6719 /*! SGSIZE_S - Segment Size */
6720 #define FTFE_FACSSS_SGSIZE_S(x)                  (((uint8_t)(((uint8_t)(x)) << FTFE_FACSSS_SGSIZE_S_SHIFT)) & FTFE_FACSSS_SGSIZE_S_MASK)
6721 /*! @} */
6722 
6723 /*! @name FACSNS - Secondary Flash Access Segment Number Register */
6724 /*! @{ */
6725 
6726 #define FTFE_FACSNS_NUMSG_S_MASK                 (0xFFU)
6727 #define FTFE_FACSNS_NUMSG_S_SHIFT                (0U)
6728 /*! NUMSG_S - Number of Segments Indicator
6729  *  0b00010000..Secondary Program flash memory is divided into 16 segments
6730  */
6731 #define FTFE_FACSNS_NUMSG_S(x)                   (((uint8_t)(((uint8_t)(x)) << FTFE_FACSNS_NUMSG_S_SHIFT)) & FTFE_FACSNS_NUMSG_S_MASK)
6732 /*! @} */
6733 
6734 /*! @name XACCH3 - Primary Execute-only Access Registers */
6735 /*! @{ */
6736 
6737 #define FTFE_XACCH3_XA_MASK                      (0xFFU)
6738 #define FTFE_XACCH3_XA_SHIFT                     (0U)
6739 /*! XA - Execute-only access control */
6740 #define FTFE_XACCH3_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH3_XA_SHIFT)) & FTFE_XACCH3_XA_MASK)
6741 /*! @} */
6742 
6743 /*! @name XACCH2 - Primary Execute-only Access Registers */
6744 /*! @{ */
6745 
6746 #define FTFE_XACCH2_XA_MASK                      (0xFFU)
6747 #define FTFE_XACCH2_XA_SHIFT                     (0U)
6748 /*! XA - Execute-only access control */
6749 #define FTFE_XACCH2_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH2_XA_SHIFT)) & FTFE_XACCH2_XA_MASK)
6750 /*! @} */
6751 
6752 /*! @name XACCH1 - Primary Execute-only Access Registers */
6753 /*! @{ */
6754 
6755 #define FTFE_XACCH1_XA_MASK                      (0xFFU)
6756 #define FTFE_XACCH1_XA_SHIFT                     (0U)
6757 /*! XA - Execute-only access control */
6758 #define FTFE_XACCH1_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH1_XA_SHIFT)) & FTFE_XACCH1_XA_MASK)
6759 /*! @} */
6760 
6761 /*! @name XACCH0 - Primary Execute-only Access Registers */
6762 /*! @{ */
6763 
6764 #define FTFE_XACCH0_XA_MASK                      (0xFFU)
6765 #define FTFE_XACCH0_XA_SHIFT                     (0U)
6766 /*! XA - Execute-only access control */
6767 #define FTFE_XACCH0_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH0_XA_SHIFT)) & FTFE_XACCH0_XA_MASK)
6768 /*! @} */
6769 
6770 /*! @name XACCL3 - Primary Execute-only Access Registers */
6771 /*! @{ */
6772 
6773 #define FTFE_XACCL3_XA_MASK                      (0xFFU)
6774 #define FTFE_XACCL3_XA_SHIFT                     (0U)
6775 /*! XA - Execute-only access control */
6776 #define FTFE_XACCL3_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL3_XA_SHIFT)) & FTFE_XACCL3_XA_MASK)
6777 /*! @} */
6778 
6779 /*! @name XACCL2 - Primary Execute-only Access Registers */
6780 /*! @{ */
6781 
6782 #define FTFE_XACCL2_XA_MASK                      (0xFFU)
6783 #define FTFE_XACCL2_XA_SHIFT                     (0U)
6784 /*! XA - Execute-only access control */
6785 #define FTFE_XACCL2_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL2_XA_SHIFT)) & FTFE_XACCL2_XA_MASK)
6786 /*! @} */
6787 
6788 /*! @name XACCL1 - Primary Execute-only Access Registers */
6789 /*! @{ */
6790 
6791 #define FTFE_XACCL1_XA_MASK                      (0xFFU)
6792 #define FTFE_XACCL1_XA_SHIFT                     (0U)
6793 /*! XA - Execute-only access control */
6794 #define FTFE_XACCL1_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL1_XA_SHIFT)) & FTFE_XACCL1_XA_MASK)
6795 /*! @} */
6796 
6797 /*! @name XACCL0 - Primary Execute-only Access Registers */
6798 /*! @{ */
6799 
6800 #define FTFE_XACCL0_XA_MASK                      (0xFFU)
6801 #define FTFE_XACCL0_XA_SHIFT                     (0U)
6802 /*! XA - Execute-only access control */
6803 #define FTFE_XACCL0_XA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL0_XA_SHIFT)) & FTFE_XACCL0_XA_MASK)
6804 /*! @} */
6805 
6806 /*! @name SACCH3 - Primary Supervisor-only Access Registers */
6807 /*! @{ */
6808 
6809 #define FTFE_SACCH3_SA_MASK                      (0xFFU)
6810 #define FTFE_SACCH3_SA_SHIFT                     (0U)
6811 /*! SA - Primary Supervisor-only access control */
6812 #define FTFE_SACCH3_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH3_SA_SHIFT)) & FTFE_SACCH3_SA_MASK)
6813 /*! @} */
6814 
6815 /*! @name SACCH2 - Primary Supervisor-only Access Registers */
6816 /*! @{ */
6817 
6818 #define FTFE_SACCH2_SA_MASK                      (0xFFU)
6819 #define FTFE_SACCH2_SA_SHIFT                     (0U)
6820 /*! SA - Primary Supervisor-only access control */
6821 #define FTFE_SACCH2_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH2_SA_SHIFT)) & FTFE_SACCH2_SA_MASK)
6822 /*! @} */
6823 
6824 /*! @name SACCH1 - Primary Supervisor-only Access Registers */
6825 /*! @{ */
6826 
6827 #define FTFE_SACCH1_SA_MASK                      (0xFFU)
6828 #define FTFE_SACCH1_SA_SHIFT                     (0U)
6829 /*! SA - Primary Supervisor-only access control */
6830 #define FTFE_SACCH1_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH1_SA_SHIFT)) & FTFE_SACCH1_SA_MASK)
6831 /*! @} */
6832 
6833 /*! @name SACCH0 - Primary Supervisor-only Access Registers */
6834 /*! @{ */
6835 
6836 #define FTFE_SACCH0_SA_MASK                      (0xFFU)
6837 #define FTFE_SACCH0_SA_SHIFT                     (0U)
6838 /*! SA - Primary Supervisor-only access control */
6839 #define FTFE_SACCH0_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH0_SA_SHIFT)) & FTFE_SACCH0_SA_MASK)
6840 /*! @} */
6841 
6842 /*! @name SACCL3 - Primary Supervisor-only Access Registers */
6843 /*! @{ */
6844 
6845 #define FTFE_SACCL3_SA_MASK                      (0xFFU)
6846 #define FTFE_SACCL3_SA_SHIFT                     (0U)
6847 /*! SA - Primary Supervisor-only access control */
6848 #define FTFE_SACCL3_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL3_SA_SHIFT)) & FTFE_SACCL3_SA_MASK)
6849 /*! @} */
6850 
6851 /*! @name SACCL2 - Primary Supervisor-only Access Registers */
6852 /*! @{ */
6853 
6854 #define FTFE_SACCL2_SA_MASK                      (0xFFU)
6855 #define FTFE_SACCL2_SA_SHIFT                     (0U)
6856 /*! SA - Primary Supervisor-only access control */
6857 #define FTFE_SACCL2_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL2_SA_SHIFT)) & FTFE_SACCL2_SA_MASK)
6858 /*! @} */
6859 
6860 /*! @name SACCL1 - Primary Supervisor-only Access Registers */
6861 /*! @{ */
6862 
6863 #define FTFE_SACCL1_SA_MASK                      (0xFFU)
6864 #define FTFE_SACCL1_SA_SHIFT                     (0U)
6865 /*! SA - Primary Supervisor-only access control */
6866 #define FTFE_SACCL1_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL1_SA_SHIFT)) & FTFE_SACCL1_SA_MASK)
6867 /*! @} */
6868 
6869 /*! @name SACCL0 - Primary Supervisor-only Access Registers */
6870 /*! @{ */
6871 
6872 #define FTFE_SACCL0_SA_MASK                      (0xFFU)
6873 #define FTFE_SACCL0_SA_SHIFT                     (0U)
6874 /*! SA - Primary Supervisor-only access control */
6875 #define FTFE_SACCL0_SA(x)                        (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL0_SA_SHIFT)) & FTFE_SACCL0_SA_MASK)
6876 /*! @} */
6877 
6878 /*! @name XACCSL - Secondary Execute-only Access Registers */
6879 /*! @{ */
6880 
6881 #define FTFE_XACCSL_XA_S_MASK                    (0xFFU)
6882 #define FTFE_XACCSL_XA_S_SHIFT                   (0U)
6883 /*! XA_S - Execute-only access control */
6884 #define FTFE_XACCSL_XA_S(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_XACCSL_XA_S_SHIFT)) & FTFE_XACCSL_XA_S_MASK)
6885 /*! @} */
6886 
6887 /*! @name XACCSH - Secondary Execute-only Access Registers */
6888 /*! @{ */
6889 
6890 #define FTFE_XACCSH_XA_S_MASK                    (0xFFU)
6891 #define FTFE_XACCSH_XA_S_SHIFT                   (0U)
6892 /*! XA_S - Execute-only access control */
6893 #define FTFE_XACCSH_XA_S(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_XACCSH_XA_S_SHIFT)) & FTFE_XACCSH_XA_S_MASK)
6894 /*! @} */
6895 
6896 /*! @name SACCSL - Secondary Supervisor-only Access Registers */
6897 /*! @{ */
6898 
6899 #define FTFE_SACCSL_SA_S_MASK                    (0xFFU)
6900 #define FTFE_SACCSL_SA_S_SHIFT                   (0U)
6901 /*! SA_S - Secondary Supervisor-only access control */
6902 #define FTFE_SACCSL_SA_S(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_SACCSL_SA_S_SHIFT)) & FTFE_SACCSL_SA_S_MASK)
6903 /*! @} */
6904 
6905 /*! @name SACCSH - Secondary Supervisor-only Access Registers */
6906 /*! @{ */
6907 
6908 #define FTFE_SACCSH_SA_S_MASK                    (0xFFU)
6909 #define FTFE_SACCSH_SA_S_SHIFT                   (0U)
6910 /*! SA_S - Secondary Supervisor-only access control */
6911 #define FTFE_SACCSH_SA_S(x)                      (((uint8_t)(((uint8_t)(x)) << FTFE_SACCSH_SA_S_SHIFT)) & FTFE_SACCSH_SA_S_MASK)
6912 /*! @} */
6913 
6914 /*! @name FSTDBYCTL - Flash Standby Control Register */
6915 /*! @{ */
6916 
6917 #define FTFE_FSTDBYCTL_STDBYDIS_MASK             (0x1U)
6918 #define FTFE_FSTDBYCTL_STDBYDIS_SHIFT            (0U)
6919 /*! STDBYDIS - Standy Mode Disable
6920  *  0b0..Standby mode enabled for flash blocks selected by STDBYx
6921  *  0b1..Standby mode disabled (STDBYx ignored)
6922  */
6923 #define FTFE_FSTDBYCTL_STDBYDIS(x)               (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBYCTL_STDBYDIS_SHIFT)) & FTFE_FSTDBYCTL_STDBYDIS_MASK)
6924 /*! @} */
6925 
6926 /*! @name FSTDBY - Flash Standby Register */
6927 /*! @{ */
6928 
6929 #define FTFE_FSTDBY_STDBY0_MASK                  (0x1U)
6930 #define FTFE_FSTDBY_STDBY0_SHIFT                 (0U)
6931 /*! STDBY0 - Standy Mode for Flash Block 0
6932  *  0b0..Standby mode not enabled for flash block 0
6933  *  0b1..If STDBYDIS is clear, standby mode is enabled for flash block 0 (when SWAP=0/1, flash block 1/0 is the inactive block)
6934  */
6935 #define FTFE_FSTDBY_STDBY0(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY0_SHIFT)) & FTFE_FSTDBY_STDBY0_MASK)
6936 
6937 #define FTFE_FSTDBY_STDBY1_MASK                  (0x2U)
6938 #define FTFE_FSTDBY_STDBY1_SHIFT                 (1U)
6939 /*! STDBY1 - Standy Mode for Flash Block 1
6940  *  0b0..Standby mode not enabled for flash block 1
6941  *  0b1..If STDBYDIS is clear, standby mode is enabled for flash block 1 (when SWAP=0/1, flash block 1/0 is the inactive block)
6942  */
6943 #define FTFE_FSTDBY_STDBY1(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY1_SHIFT)) & FTFE_FSTDBY_STDBY1_MASK)
6944 
6945 #define FTFE_FSTDBY_STDBY2_MASK                  (0x4U)
6946 #define FTFE_FSTDBY_STDBY2_SHIFT                 (2U)
6947 /*! STDBY2 - Standy Mode for Flash Block 2
6948  *  0b0..Standby mode not enabled for flash block 2
6949  *  0b1..If STDBYDIS is clear, standby mode is enabled for flash block 2
6950  */
6951 #define FTFE_FSTDBY_STDBY2(x)                    (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY2_SHIFT)) & FTFE_FSTDBY_STDBY2_MASK)
6952 /*! @} */
6953 
6954 
6955 /*!
6956  * @}
6957  */ /* end of group FTFE_Register_Masks */
6958 
6959 
6960 /* FTFE - Peripheral instance base addresses */
6961 /** Peripheral FTFE base address */
6962 #define FTFE_BASE                                (0x40023000u)
6963 /** Peripheral FTFE base pointer */
6964 #define FTFE                                     ((FTFE_Type *)FTFE_BASE)
6965 /** Array initializer of FTFE peripheral base addresses */
6966 #define FTFE_BASE_ADDRS                          { FTFE_BASE }
6967 /** Array initializer of FTFE peripheral base pointers */
6968 #define FTFE_BASE_PTRS                           { FTFE }
6969 /** Interrupt vectors for the FTFE peripheral type */
6970 #define FTFE_COMMAND_COMPLETE_IRQS               { FTFE_Command_Complete_IRQn }
6971 #define FTFE_READ_COLLISION_IRQS                 { FTFE_Read_Collision_IRQn }
6972 
6973 /*!
6974  * @}
6975  */ /* end of group FTFE_Peripheral_Access_Layer */
6976 
6977 
6978 /* ----------------------------------------------------------------------------
6979    -- GPIO Peripheral Access Layer
6980    ---------------------------------------------------------------------------- */
6981 
6982 /*!
6983  * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
6984  * @{
6985  */
6986 
6987 /** GPIO - Register Layout Typedef */
6988 typedef struct {
6989   __IO uint32_t PDOR;                              /**< Port Data Output Register, offset: 0x0 */
6990   __O  uint32_t PSOR;                              /**< Port Set Output Register, offset: 0x4 */
6991   __O  uint32_t PCOR;                              /**< Port Clear Output Register, offset: 0x8 */
6992   __O  uint32_t PTOR;                              /**< Port Toggle Output Register, offset: 0xC */
6993   __I  uint32_t PDIR;                              /**< Port Data Input Register, offset: 0x10 */
6994   __IO uint32_t PDDR;                              /**< Port Data Direction Register, offset: 0x14 */
6995 } GPIO_Type;
6996 
6997 /* ----------------------------------------------------------------------------
6998    -- GPIO Register Masks
6999    ---------------------------------------------------------------------------- */
7000 
7001 /*!
7002  * @addtogroup GPIO_Register_Masks GPIO Register Masks
7003  * @{
7004  */
7005 
7006 /*! @name PDOR - Port Data Output Register */
7007 /*! @{ */
7008 
7009 #define GPIO_PDOR_PDO_MASK                       (0xFFFFFFFFU)
7010 #define GPIO_PDOR_PDO_SHIFT                      (0U)
7011 /*! PDO - Port Data Output */
7012 #define GPIO_PDOR_PDO(x)                         (((uint32_t)(((uint32_t)(x)) << GPIO_PDOR_PDO_SHIFT)) & GPIO_PDOR_PDO_MASK)
7013 /*! @} */
7014 
7015 /*! @name PSOR - Port Set Output Register */
7016 /*! @{ */
7017 
7018 #define GPIO_PSOR_PTSO_MASK                      (0xFFFFFFFFU)
7019 #define GPIO_PSOR_PTSO_SHIFT                     (0U)
7020 /*! PTSO - Port Set Output */
7021 #define GPIO_PSOR_PTSO(x)                        (((uint32_t)(((uint32_t)(x)) << GPIO_PSOR_PTSO_SHIFT)) & GPIO_PSOR_PTSO_MASK)
7022 /*! @} */
7023 
7024 /*! @name PCOR - Port Clear Output Register */
7025 /*! @{ */
7026 
7027 #define GPIO_PCOR_PTCO_MASK                      (0xFFFFFFFFU)
7028 #define GPIO_PCOR_PTCO_SHIFT                     (0U)
7029 /*! PTCO - Port Clear Output */
7030 #define GPIO_PCOR_PTCO(x)                        (((uint32_t)(((uint32_t)(x)) << GPIO_PCOR_PTCO_SHIFT)) & GPIO_PCOR_PTCO_MASK)
7031 /*! @} */
7032 
7033 /*! @name PTOR - Port Toggle Output Register */
7034 /*! @{ */
7035 
7036 #define GPIO_PTOR_PTTO_MASK                      (0xFFFFFFFFU)
7037 #define GPIO_PTOR_PTTO_SHIFT                     (0U)
7038 /*! PTTO - Port Toggle Output */
7039 #define GPIO_PTOR_PTTO(x)                        (((uint32_t)(((uint32_t)(x)) << GPIO_PTOR_PTTO_SHIFT)) & GPIO_PTOR_PTTO_MASK)
7040 /*! @} */
7041 
7042 /*! @name PDIR - Port Data Input Register */
7043 /*! @{ */
7044 
7045 #define GPIO_PDIR_PDI_MASK                       (0xFFFFFFFFU)
7046 #define GPIO_PDIR_PDI_SHIFT                      (0U)
7047 /*! PDI - Port Data Input */
7048 #define GPIO_PDIR_PDI(x)                         (((uint32_t)(((uint32_t)(x)) << GPIO_PDIR_PDI_SHIFT)) & GPIO_PDIR_PDI_MASK)
7049 /*! @} */
7050 
7051 /*! @name PDDR - Port Data Direction Register */
7052 /*! @{ */
7053 
7054 #define GPIO_PDDR_PDD_MASK                       (0xFFFFFFFFU)
7055 #define GPIO_PDDR_PDD_SHIFT                      (0U)
7056 /*! PDD - Port Data Direction */
7057 #define GPIO_PDDR_PDD(x)                         (((uint32_t)(((uint32_t)(x)) << GPIO_PDDR_PDD_SHIFT)) & GPIO_PDDR_PDD_MASK)
7058 /*! @} */
7059 
7060 
7061 /*!
7062  * @}
7063  */ /* end of group GPIO_Register_Masks */
7064 
7065 
7066 /* GPIO - Peripheral instance base addresses */
7067 /** Peripheral GPIOA base address */
7068 #define GPIOA_BASE                               (0x48020000u)
7069 /** Peripheral GPIOA base pointer */
7070 #define GPIOA                                    ((GPIO_Type *)GPIOA_BASE)
7071 /** Peripheral GPIOB base address */
7072 #define GPIOB_BASE                               (0x48020040u)
7073 /** Peripheral GPIOB base pointer */
7074 #define GPIOB                                    ((GPIO_Type *)GPIOB_BASE)
7075 /** Peripheral GPIOC base address */
7076 #define GPIOC_BASE                               (0x48020080u)
7077 /** Peripheral GPIOC base pointer */
7078 #define GPIOC                                    ((GPIO_Type *)GPIOC_BASE)
7079 /** Peripheral GPIOD base address */
7080 #define GPIOD_BASE                               (0x480200C0u)
7081 /** Peripheral GPIOD base pointer */
7082 #define GPIOD                                    ((GPIO_Type *)GPIOD_BASE)
7083 /** Peripheral GPIOE base address */
7084 #define GPIOE_BASE                               (0x4100F000u)
7085 /** Peripheral GPIOE base pointer */
7086 #define GPIOE                                    ((GPIO_Type *)GPIOE_BASE)
7087 /** Array initializer of GPIO peripheral base addresses */
7088 #define GPIO_BASE_ADDRS                          { GPIOA_BASE, GPIOB_BASE, GPIOC_BASE, GPIOD_BASE, GPIOE_BASE }
7089 /** Array initializer of GPIO peripheral base pointers */
7090 #define GPIO_BASE_PTRS                           { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE }
7091 
7092 /*!
7093  * @}
7094  */ /* end of group GPIO_Peripheral_Access_Layer */
7095 
7096 
7097 /* ----------------------------------------------------------------------------
7098    -- I2S Peripheral Access Layer
7099    ---------------------------------------------------------------------------- */
7100 
7101 /*!
7102  * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer
7103  * @{
7104  */
7105 
7106 /** I2S - Register Layout Typedef */
7107 typedef struct {
7108   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
7109   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
7110   __IO uint32_t TCSR;                              /**< SAI Transmit Control Register, offset: 0x8 */
7111   __IO uint32_t TCR1;                              /**< SAI Transmit Configuration 1 Register, offset: 0xC */
7112   __IO uint32_t TCR2;                              /**< SAI Transmit Configuration 2 Register, offset: 0x10 */
7113   __IO uint32_t TCR3;                              /**< SAI Transmit Configuration 3 Register, offset: 0x14 */
7114   __IO uint32_t TCR4;                              /**< SAI Transmit Configuration 4 Register, offset: 0x18 */
7115   __IO uint32_t TCR5;                              /**< SAI Transmit Configuration 5 Register, offset: 0x1C */
7116   __O  uint32_t TDR[2];                            /**< SAI Transmit Data Register, array offset: 0x20, array step: 0x4 */
7117        uint8_t RESERVED_0[24];
7118   __I  uint32_t TFR[2];                            /**< SAI Transmit FIFO Register, array offset: 0x40, array step: 0x4 */
7119        uint8_t RESERVED_1[24];
7120   __IO uint32_t TMR;                               /**< SAI Transmit Mask Register, offset: 0x60 */
7121        uint8_t RESERVED_2[36];
7122   __IO uint32_t RCSR;                              /**< SAI Receive Control Register, offset: 0x88 */
7123   __IO uint32_t RCR1;                              /**< SAI Receive Configuration 1 Register, offset: 0x8C */
7124   __IO uint32_t RCR2;                              /**< SAI Receive Configuration 2 Register, offset: 0x90 */
7125   __IO uint32_t RCR3;                              /**< SAI Receive Configuration 3 Register, offset: 0x94 */
7126   __IO uint32_t RCR4;                              /**< SAI Receive Configuration 4 Register, offset: 0x98 */
7127   __IO uint32_t RCR5;                              /**< SAI Receive Configuration 5 Register, offset: 0x9C */
7128   __I  uint32_t RDR[2];                            /**< SAI Receive Data Register, array offset: 0xA0, array step: 0x4 */
7129        uint8_t RESERVED_3[24];
7130   __I  uint32_t RFR[2];                            /**< SAI Receive FIFO Register, array offset: 0xC0, array step: 0x4 */
7131        uint8_t RESERVED_4[24];
7132   __IO uint32_t RMR;                               /**< SAI Receive Mask Register, offset: 0xE0 */
7133 } I2S_Type;
7134 
7135 /* ----------------------------------------------------------------------------
7136    -- I2S Register Masks
7137    ---------------------------------------------------------------------------- */
7138 
7139 /*!
7140  * @addtogroup I2S_Register_Masks I2S Register Masks
7141  * @{
7142  */
7143 
7144 /*! @name VERID - Version ID Register */
7145 /*! @{ */
7146 
7147 #define I2S_VERID_FEATURE_MASK                   (0xFFFFU)
7148 #define I2S_VERID_FEATURE_SHIFT                  (0U)
7149 /*! FEATURE - Feature Specification Number
7150  *  0b0000000000000000..Standard feature set.
7151  */
7152 #define I2S_VERID_FEATURE(x)                     (((uint32_t)(((uint32_t)(x)) << I2S_VERID_FEATURE_SHIFT)) & I2S_VERID_FEATURE_MASK)
7153 
7154 #define I2S_VERID_MINOR_MASK                     (0xFF0000U)
7155 #define I2S_VERID_MINOR_SHIFT                    (16U)
7156 /*! MINOR - Minor Version Number */
7157 #define I2S_VERID_MINOR(x)                       (((uint32_t)(((uint32_t)(x)) << I2S_VERID_MINOR_SHIFT)) & I2S_VERID_MINOR_MASK)
7158 
7159 #define I2S_VERID_MAJOR_MASK                     (0xFF000000U)
7160 #define I2S_VERID_MAJOR_SHIFT                    (24U)
7161 /*! MAJOR - Major Version Number */
7162 #define I2S_VERID_MAJOR(x)                       (((uint32_t)(((uint32_t)(x)) << I2S_VERID_MAJOR_SHIFT)) & I2S_VERID_MAJOR_MASK)
7163 /*! @} */
7164 
7165 /*! @name PARAM - Parameter Register */
7166 /*! @{ */
7167 
7168 #define I2S_PARAM_DATALINE_MASK                  (0xFU)
7169 #define I2S_PARAM_DATALINE_SHIFT                 (0U)
7170 /*! DATALINE - Number of Datalines */
7171 #define I2S_PARAM_DATALINE(x)                    (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_DATALINE_SHIFT)) & I2S_PARAM_DATALINE_MASK)
7172 
7173 #define I2S_PARAM_FIFO_MASK                      (0xF00U)
7174 #define I2S_PARAM_FIFO_SHIFT                     (8U)
7175 /*! FIFO - FIFO Size */
7176 #define I2S_PARAM_FIFO(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_FIFO_SHIFT)) & I2S_PARAM_FIFO_MASK)
7177 
7178 #define I2S_PARAM_FRAME_MASK                     (0xF0000U)
7179 #define I2S_PARAM_FRAME_SHIFT                    (16U)
7180 /*! FRAME - Frame Size */
7181 #define I2S_PARAM_FRAME(x)                       (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_FRAME_SHIFT)) & I2S_PARAM_FRAME_MASK)
7182 /*! @} */
7183 
7184 /*! @name TCSR - SAI Transmit Control Register */
7185 /*! @{ */
7186 
7187 #define I2S_TCSR_FRDE_MASK                       (0x1U)
7188 #define I2S_TCSR_FRDE_SHIFT                      (0U)
7189 /*! FRDE - FIFO Request DMA Enable
7190  *  0b0..Disables the DMA request.
7191  *  0b1..Enables the DMA request.
7192  */
7193 #define I2S_TCSR_FRDE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRDE_SHIFT)) & I2S_TCSR_FRDE_MASK)
7194 
7195 #define I2S_TCSR_FWDE_MASK                       (0x2U)
7196 #define I2S_TCSR_FWDE_SHIFT                      (1U)
7197 /*! FWDE - FIFO Warning DMA Enable
7198  *  0b0..Disables the DMA request.
7199  *  0b1..Enables the DMA request.
7200  */
7201 #define I2S_TCSR_FWDE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWDE_SHIFT)) & I2S_TCSR_FWDE_MASK)
7202 
7203 #define I2S_TCSR_FRIE_MASK                       (0x100U)
7204 #define I2S_TCSR_FRIE_SHIFT                      (8U)
7205 /*! FRIE - FIFO Request Interrupt Enable
7206  *  0b0..Disables the interrupt.
7207  *  0b1..Enables the interrupt.
7208  */
7209 #define I2S_TCSR_FRIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRIE_SHIFT)) & I2S_TCSR_FRIE_MASK)
7210 
7211 #define I2S_TCSR_FWIE_MASK                       (0x200U)
7212 #define I2S_TCSR_FWIE_SHIFT                      (9U)
7213 /*! FWIE - FIFO Warning Interrupt Enable
7214  *  0b0..Disables the interrupt.
7215  *  0b1..Enables the interrupt.
7216  */
7217 #define I2S_TCSR_FWIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWIE_SHIFT)) & I2S_TCSR_FWIE_MASK)
7218 
7219 #define I2S_TCSR_FEIE_MASK                       (0x400U)
7220 #define I2S_TCSR_FEIE_SHIFT                      (10U)
7221 /*! FEIE - FIFO Error Interrupt Enable
7222  *  0b0..Disables the interrupt.
7223  *  0b1..Enables the interrupt.
7224  */
7225 #define I2S_TCSR_FEIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEIE_SHIFT)) & I2S_TCSR_FEIE_MASK)
7226 
7227 #define I2S_TCSR_SEIE_MASK                       (0x800U)
7228 #define I2S_TCSR_SEIE_SHIFT                      (11U)
7229 /*! SEIE - Sync Error Interrupt Enable
7230  *  0b0..Disables interrupt.
7231  *  0b1..Enables interrupt.
7232  */
7233 #define I2S_TCSR_SEIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEIE_SHIFT)) & I2S_TCSR_SEIE_MASK)
7234 
7235 #define I2S_TCSR_WSIE_MASK                       (0x1000U)
7236 #define I2S_TCSR_WSIE_SHIFT                      (12U)
7237 /*! WSIE - Word Start Interrupt Enable
7238  *  0b0..Disables interrupt.
7239  *  0b1..Enables interrupt.
7240  */
7241 #define I2S_TCSR_WSIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSIE_SHIFT)) & I2S_TCSR_WSIE_MASK)
7242 
7243 #define I2S_TCSR_FRF_MASK                        (0x10000U)
7244 #define I2S_TCSR_FRF_SHIFT                       (16U)
7245 /*! FRF - FIFO Request Flag
7246  *  0b0..Transmit FIFO watermark has not been reached.
7247  *  0b1..Transmit FIFO watermark has been reached.
7248  */
7249 #define I2S_TCSR_FRF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRF_SHIFT)) & I2S_TCSR_FRF_MASK)
7250 
7251 #define I2S_TCSR_FWF_MASK                        (0x20000U)
7252 #define I2S_TCSR_FWF_SHIFT                       (17U)
7253 /*! FWF - FIFO Warning Flag
7254  *  0b0..No enabled transmit FIFO is empty.
7255  *  0b1..Enabled transmit FIFO is empty.
7256  */
7257 #define I2S_TCSR_FWF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWF_SHIFT)) & I2S_TCSR_FWF_MASK)
7258 
7259 #define I2S_TCSR_FEF_MASK                        (0x40000U)
7260 #define I2S_TCSR_FEF_SHIFT                       (18U)
7261 /*! FEF - FIFO Error Flag
7262  *  0b0..Transmit underrun not detected.
7263  *  0b1..Transmit underrun detected.
7264  */
7265 #define I2S_TCSR_FEF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEF_SHIFT)) & I2S_TCSR_FEF_MASK)
7266 
7267 #define I2S_TCSR_SEF_MASK                        (0x80000U)
7268 #define I2S_TCSR_SEF_SHIFT                       (19U)
7269 /*! SEF - Sync Error Flag
7270  *  0b0..Sync error not detected.
7271  *  0b1..Frame sync error detected.
7272  */
7273 #define I2S_TCSR_SEF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEF_SHIFT)) & I2S_TCSR_SEF_MASK)
7274 
7275 #define I2S_TCSR_WSF_MASK                        (0x100000U)
7276 #define I2S_TCSR_WSF_SHIFT                       (20U)
7277 /*! WSF - Word Start Flag
7278  *  0b0..Start of word not detected.
7279  *  0b1..Start of word detected.
7280  */
7281 #define I2S_TCSR_WSF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSF_SHIFT)) & I2S_TCSR_WSF_MASK)
7282 
7283 #define I2S_TCSR_SR_MASK                         (0x1000000U)
7284 #define I2S_TCSR_SR_SHIFT                        (24U)
7285 /*! SR - Software Reset
7286  *  0b0..No effect.
7287  *  0b1..Software reset.
7288  */
7289 #define I2S_TCSR_SR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SR_SHIFT)) & I2S_TCSR_SR_MASK)
7290 
7291 #define I2S_TCSR_FR_MASK                         (0x2000000U)
7292 #define I2S_TCSR_FR_SHIFT                        (25U)
7293 /*! FR - FIFO Reset
7294  *  0b0..No effect.
7295  *  0b1..FIFO reset.
7296  */
7297 #define I2S_TCSR_FR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FR_SHIFT)) & I2S_TCSR_FR_MASK)
7298 
7299 #define I2S_TCSR_BCE_MASK                        (0x10000000U)
7300 #define I2S_TCSR_BCE_SHIFT                       (28U)
7301 /*! BCE - Bit Clock Enable
7302  *  0b0..Transmit bit clock is disabled.
7303  *  0b1..Transmit bit clock is enabled.
7304  */
7305 #define I2S_TCSR_BCE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_BCE_SHIFT)) & I2S_TCSR_BCE_MASK)
7306 
7307 #define I2S_TCSR_DBGE_MASK                       (0x20000000U)
7308 #define I2S_TCSR_DBGE_SHIFT                      (29U)
7309 /*! DBGE - Debug Enable
7310  *  0b0..Transmitter is disabled in Debug mode, after completing the current frame.
7311  *  0b1..Transmitter is enabled in Debug mode.
7312  */
7313 #define I2S_TCSR_DBGE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_DBGE_SHIFT)) & I2S_TCSR_DBGE_MASK)
7314 
7315 #define I2S_TCSR_STOPE_MASK                      (0x40000000U)
7316 #define I2S_TCSR_STOPE_SHIFT                     (30U)
7317 /*! STOPE - Stop Enable
7318  *  0b0..Transmitter disabled in Stop mode.
7319  *  0b1..Transmitter enabled in Stop mode.
7320  */
7321 #define I2S_TCSR_STOPE(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_STOPE_SHIFT)) & I2S_TCSR_STOPE_MASK)
7322 
7323 #define I2S_TCSR_TE_MASK                         (0x80000000U)
7324 #define I2S_TCSR_TE_SHIFT                        (31U)
7325 /*! TE - Transmitter Enable
7326  *  0b0..Transmitter is disabled.
7327  *  0b1..Transmitter is enabled, or transmitter has been disabled and has not yet reached end of frame.
7328  */
7329 #define I2S_TCSR_TE(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_TE_SHIFT)) & I2S_TCSR_TE_MASK)
7330 /*! @} */
7331 
7332 /*! @name TCR1 - SAI Transmit Configuration 1 Register */
7333 /*! @{ */
7334 
7335 #define I2S_TCR1_TFW_MASK                        (0x7U)
7336 #define I2S_TCR1_TFW_SHIFT                       (0U)
7337 /*! TFW - Transmit FIFO Watermark */
7338 #define I2S_TCR1_TFW(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR1_TFW_SHIFT)) & I2S_TCR1_TFW_MASK)
7339 /*! @} */
7340 
7341 /*! @name TCR2 - SAI Transmit Configuration 2 Register */
7342 /*! @{ */
7343 
7344 #define I2S_TCR2_DIV_MASK                        (0xFFU)
7345 #define I2S_TCR2_DIV_SHIFT                       (0U)
7346 /*! DIV - Bit Clock Divide */
7347 #define I2S_TCR2_DIV(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_DIV_SHIFT)) & I2S_TCR2_DIV_MASK)
7348 
7349 #define I2S_TCR2_BCD_MASK                        (0x1000000U)
7350 #define I2S_TCR2_BCD_SHIFT                       (24U)
7351 /*! BCD - Bit Clock Direction
7352  *  0b0..Bit clock is generated externally in Slave mode.
7353  *  0b1..Bit clock is generated internally in Master mode.
7354  */
7355 #define I2S_TCR2_BCD(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCD_SHIFT)) & I2S_TCR2_BCD_MASK)
7356 
7357 #define I2S_TCR2_BCP_MASK                        (0x2000000U)
7358 #define I2S_TCR2_BCP_SHIFT                       (25U)
7359 /*! BCP - Bit Clock Polarity
7360  *  0b0..Bit clock is active high with drive outputs on rising edge and sample inputs on falling edge.
7361  *  0b1..Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge.
7362  */
7363 #define I2S_TCR2_BCP(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCP_SHIFT)) & I2S_TCR2_BCP_MASK)
7364 
7365 #define I2S_TCR2_MSEL_MASK                       (0xC000000U)
7366 #define I2S_TCR2_MSEL_SHIFT                      (26U)
7367 /*! MSEL - MCLK Select
7368  *  0b00..Bus Clock selected.
7369  *  0b01..Master Clock (MCLK) 1 option selected.
7370  *  0b10..Master Clock (MCLK) 2 option selected.
7371  *  0b11..Master Clock (MCLK) 3 option selected.
7372  */
7373 #define I2S_TCR2_MSEL(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_MSEL_SHIFT)) & I2S_TCR2_MSEL_MASK)
7374 
7375 #define I2S_TCR2_BCI_MASK                        (0x10000000U)
7376 #define I2S_TCR2_BCI_SHIFT                       (28U)
7377 /*! BCI - Bit Clock Input
7378  *  0b0..No effect.
7379  *  0b1..Internal logic is clocked as if bit clock was externally generated.
7380  */
7381 #define I2S_TCR2_BCI(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCI_SHIFT)) & I2S_TCR2_BCI_MASK)
7382 
7383 #define I2S_TCR2_BCS_MASK                        (0x20000000U)
7384 #define I2S_TCR2_BCS_SHIFT                       (29U)
7385 /*! BCS - Bit Clock Swap
7386  *  0b0..Use the normal bit clock source.
7387  *  0b1..Swap the bit clock source.
7388  */
7389 #define I2S_TCR2_BCS(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCS_SHIFT)) & I2S_TCR2_BCS_MASK)
7390 
7391 #define I2S_TCR2_SYNC_MASK                       (0xC0000000U)
7392 #define I2S_TCR2_SYNC_SHIFT                      (30U)
7393 /*! SYNC - Synchronous Mode
7394  *  0b00..Asynchronous mode.
7395  *  0b01..Synchronous with receiver.
7396  *  0b10..Synchronous with another SAI transmitter.
7397  *  0b11..Synchronous with another SAI receiver.
7398  */
7399 #define I2S_TCR2_SYNC(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_SYNC_SHIFT)) & I2S_TCR2_SYNC_MASK)
7400 /*! @} */
7401 
7402 /*! @name TCR3 - SAI Transmit Configuration 3 Register */
7403 /*! @{ */
7404 
7405 #define I2S_TCR3_WDFL_MASK                       (0x1FU)
7406 #define I2S_TCR3_WDFL_SHIFT                      (0U)
7407 /*! WDFL - Word Flag Configuration */
7408 #define I2S_TCR3_WDFL(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_WDFL_SHIFT)) & I2S_TCR3_WDFL_MASK)
7409 
7410 #define I2S_TCR3_TCE_MASK                        (0x30000U)
7411 #define I2S_TCR3_TCE_SHIFT                       (16U)
7412 /*! TCE - Transmit Channel Enable */
7413 #define I2S_TCR3_TCE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_TCE_SHIFT)) & I2S_TCR3_TCE_MASK)
7414 
7415 #define I2S_TCR3_CFR_MASK                        (0x3000000U)
7416 #define I2S_TCR3_CFR_SHIFT                       (24U)
7417 /*! CFR - Channel FIFO Reset */
7418 #define I2S_TCR3_CFR(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_CFR_SHIFT)) & I2S_TCR3_CFR_MASK)
7419 /*! @} */
7420 
7421 /*! @name TCR4 - SAI Transmit Configuration 4 Register */
7422 /*! @{ */
7423 
7424 #define I2S_TCR4_FSD_MASK                        (0x1U)
7425 #define I2S_TCR4_FSD_SHIFT                       (0U)
7426 /*! FSD - Frame Sync Direction
7427  *  0b0..Frame sync is generated externally in Slave mode.
7428  *  0b1..Frame sync is generated internally in Master mode.
7429  */
7430 #define I2S_TCR4_FSD(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSD_SHIFT)) & I2S_TCR4_FSD_MASK)
7431 
7432 #define I2S_TCR4_FSP_MASK                        (0x2U)
7433 #define I2S_TCR4_FSP_SHIFT                       (1U)
7434 /*! FSP - Frame Sync Polarity
7435  *  0b0..Frame sync is active high.
7436  *  0b1..Frame sync is active low.
7437  */
7438 #define I2S_TCR4_FSP(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSP_SHIFT)) & I2S_TCR4_FSP_MASK)
7439 
7440 #define I2S_TCR4_ONDEM_MASK                      (0x4U)
7441 #define I2S_TCR4_ONDEM_SHIFT                     (2U)
7442 /*! ONDEM - On Demand Mode
7443  *  0b0..Internal frame sync is generated continuously.
7444  *  0b1..Internal frame sync is generated when the FIFO warning flag is clear.
7445  */
7446 #define I2S_TCR4_ONDEM(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_ONDEM_SHIFT)) & I2S_TCR4_ONDEM_MASK)
7447 
7448 #define I2S_TCR4_FSE_MASK                        (0x8U)
7449 #define I2S_TCR4_FSE_SHIFT                       (3U)
7450 /*! FSE - Frame Sync Early
7451  *  0b0..Frame sync asserts with the first bit of the frame.
7452  *  0b1..Frame sync asserts one bit before the first bit of the frame.
7453  */
7454 #define I2S_TCR4_FSE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSE_SHIFT)) & I2S_TCR4_FSE_MASK)
7455 
7456 #define I2S_TCR4_MF_MASK                         (0x10U)
7457 #define I2S_TCR4_MF_SHIFT                        (4U)
7458 /*! MF - MSB First
7459  *  0b0..LSB is transmitted first.
7460  *  0b1..MSB is transmitted first.
7461  */
7462 #define I2S_TCR4_MF(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_MF_SHIFT)) & I2S_TCR4_MF_MASK)
7463 
7464 #define I2S_TCR4_CHMOD_MASK                      (0x20U)
7465 #define I2S_TCR4_CHMOD_SHIFT                     (5U)
7466 /*! CHMOD - Channel Mode
7467  *  0b0..TDM mode, transmit data pins are tri-stated when slots are masked or channels are disabled.
7468  *  0b1..Output mode, transmit data pins are never tri-stated and will output zero when slots are masked or channels are disabled.
7469  */
7470 #define I2S_TCR4_CHMOD(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_CHMOD_SHIFT)) & I2S_TCR4_CHMOD_MASK)
7471 
7472 #define I2S_TCR4_SYWD_MASK                       (0x1F00U)
7473 #define I2S_TCR4_SYWD_SHIFT                      (8U)
7474 /*! SYWD - Sync Width */
7475 #define I2S_TCR4_SYWD(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_SYWD_SHIFT)) & I2S_TCR4_SYWD_MASK)
7476 
7477 #define I2S_TCR4_FRSZ_MASK                       (0x1F0000U)
7478 #define I2S_TCR4_FRSZ_SHIFT                      (16U)
7479 /*! FRSZ - Frame size */
7480 #define I2S_TCR4_FRSZ(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FRSZ_SHIFT)) & I2S_TCR4_FRSZ_MASK)
7481 
7482 #define I2S_TCR4_FPACK_MASK                      (0x3000000U)
7483 #define I2S_TCR4_FPACK_SHIFT                     (24U)
7484 /*! FPACK - FIFO Packing Mode
7485  *  0b00..FIFO packing is disabled
7486  *  0b01..Reserved
7487  *  0b10..8-bit FIFO packing is enabled
7488  *  0b11..16-bit FIFO packing is enabled
7489  */
7490 #define I2S_TCR4_FPACK(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FPACK_SHIFT)) & I2S_TCR4_FPACK_MASK)
7491 
7492 #define I2S_TCR4_FCOMB_MASK                      (0xC000000U)
7493 #define I2S_TCR4_FCOMB_SHIFT                     (26U)
7494 /*! FCOMB - FIFO Combine Mode
7495  *  0b00..FIFO combine mode disabled.
7496  *  0b01..FIFO combine mode enabled on FIFO reads (from transmit shift registers).
7497  *  0b10..FIFO combine mode enabled on FIFO writes (by software).
7498  *  0b11..FIFO combine mode enabled on FIFO reads (from transmit shift registers) and writes (by software).
7499  */
7500 #define I2S_TCR4_FCOMB(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCOMB_SHIFT)) & I2S_TCR4_FCOMB_MASK)
7501 
7502 #define I2S_TCR4_FCONT_MASK                      (0x10000000U)
7503 #define I2S_TCR4_FCONT_SHIFT                     (28U)
7504 /*! FCONT - FIFO Continue on Error
7505  *  0b0..On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared.
7506  *  0b1..On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared.
7507  */
7508 #define I2S_TCR4_FCONT(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCONT_SHIFT)) & I2S_TCR4_FCONT_MASK)
7509 /*! @} */
7510 
7511 /*! @name TCR5 - SAI Transmit Configuration 5 Register */
7512 /*! @{ */
7513 
7514 #define I2S_TCR5_FBT_MASK                        (0x1F00U)
7515 #define I2S_TCR5_FBT_SHIFT                       (8U)
7516 /*! FBT - First Bit Shifted */
7517 #define I2S_TCR5_FBT(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_FBT_SHIFT)) & I2S_TCR5_FBT_MASK)
7518 
7519 #define I2S_TCR5_W0W_MASK                        (0x1F0000U)
7520 #define I2S_TCR5_W0W_SHIFT                       (16U)
7521 /*! W0W - Word 0 Width */
7522 #define I2S_TCR5_W0W(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_W0W_SHIFT)) & I2S_TCR5_W0W_MASK)
7523 
7524 #define I2S_TCR5_WNW_MASK                        (0x1F000000U)
7525 #define I2S_TCR5_WNW_SHIFT                       (24U)
7526 /*! WNW - Word N Width */
7527 #define I2S_TCR5_WNW(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_WNW_SHIFT)) & I2S_TCR5_WNW_MASK)
7528 /*! @} */
7529 
7530 /*! @name TDR - SAI Transmit Data Register */
7531 /*! @{ */
7532 
7533 #define I2S_TDR_TDR_MASK                         (0xFFFFFFFFU)
7534 #define I2S_TDR_TDR_SHIFT                        (0U)
7535 /*! TDR - Transmit Data Register */
7536 #define I2S_TDR_TDR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TDR_TDR_SHIFT)) & I2S_TDR_TDR_MASK)
7537 /*! @} */
7538 
7539 /* The count of I2S_TDR */
7540 #define I2S_TDR_COUNT                            (2U)
7541 
7542 /*! @name TFR - SAI Transmit FIFO Register */
7543 /*! @{ */
7544 
7545 #define I2S_TFR_RFP_MASK                         (0xFU)
7546 #define I2S_TFR_RFP_SHIFT                        (0U)
7547 /*! RFP - Read FIFO Pointer */
7548 #define I2S_TFR_RFP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TFR_RFP_SHIFT)) & I2S_TFR_RFP_MASK)
7549 
7550 #define I2S_TFR_WFP_MASK                         (0xF0000U)
7551 #define I2S_TFR_WFP_SHIFT                        (16U)
7552 /*! WFP - Write FIFO Pointer */
7553 #define I2S_TFR_WFP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WFP_SHIFT)) & I2S_TFR_WFP_MASK)
7554 
7555 #define I2S_TFR_WCP_MASK                         (0x80000000U)
7556 #define I2S_TFR_WCP_SHIFT                        (31U)
7557 /*! WCP - Write Channel Pointer
7558  *  0b0..No effect.
7559  *  0b1..FIFO combine is enabled for FIFO writes and this FIFO will be written on the next FIFO write.
7560  */
7561 #define I2S_TFR_WCP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WCP_SHIFT)) & I2S_TFR_WCP_MASK)
7562 /*! @} */
7563 
7564 /* The count of I2S_TFR */
7565 #define I2S_TFR_COUNT                            (2U)
7566 
7567 /*! @name TMR - SAI Transmit Mask Register */
7568 /*! @{ */
7569 
7570 #define I2S_TMR_TWM_MASK                         (0xFFFFFFFFU)
7571 #define I2S_TMR_TWM_SHIFT                        (0U)
7572 /*! TWM - Transmit Word Mask
7573  *  0b00000000000000000000000000000000..Word N is enabled.
7574  *  0b00000000000000000000000000000001..Word N is masked. The transmit data pins are tri-stated or drive zero when masked.
7575  */
7576 #define I2S_TMR_TWM(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_TMR_TWM_SHIFT)) & I2S_TMR_TWM_MASK)
7577 /*! @} */
7578 
7579 /*! @name RCSR - SAI Receive Control Register */
7580 /*! @{ */
7581 
7582 #define I2S_RCSR_FRDE_MASK                       (0x1U)
7583 #define I2S_RCSR_FRDE_SHIFT                      (0U)
7584 /*! FRDE - FIFO Request DMA Enable
7585  *  0b0..Disables the DMA request.
7586  *  0b1..Enables the DMA request.
7587  */
7588 #define I2S_RCSR_FRDE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRDE_SHIFT)) & I2S_RCSR_FRDE_MASK)
7589 
7590 #define I2S_RCSR_FWDE_MASK                       (0x2U)
7591 #define I2S_RCSR_FWDE_SHIFT                      (1U)
7592 /*! FWDE - FIFO Warning DMA Enable
7593  *  0b0..Disables the DMA request.
7594  *  0b1..Enables the DMA request.
7595  */
7596 #define I2S_RCSR_FWDE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWDE_SHIFT)) & I2S_RCSR_FWDE_MASK)
7597 
7598 #define I2S_RCSR_FRIE_MASK                       (0x100U)
7599 #define I2S_RCSR_FRIE_SHIFT                      (8U)
7600 /*! FRIE - FIFO Request Interrupt Enable
7601  *  0b0..Disables the interrupt.
7602  *  0b1..Enables the interrupt.
7603  */
7604 #define I2S_RCSR_FRIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRIE_SHIFT)) & I2S_RCSR_FRIE_MASK)
7605 
7606 #define I2S_RCSR_FWIE_MASK                       (0x200U)
7607 #define I2S_RCSR_FWIE_SHIFT                      (9U)
7608 /*! FWIE - FIFO Warning Interrupt Enable
7609  *  0b0..Disables the interrupt.
7610  *  0b1..Enables the interrupt.
7611  */
7612 #define I2S_RCSR_FWIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWIE_SHIFT)) & I2S_RCSR_FWIE_MASK)
7613 
7614 #define I2S_RCSR_FEIE_MASK                       (0x400U)
7615 #define I2S_RCSR_FEIE_SHIFT                      (10U)
7616 /*! FEIE - FIFO Error Interrupt Enable
7617  *  0b0..Disables the interrupt.
7618  *  0b1..Enables the interrupt.
7619  */
7620 #define I2S_RCSR_FEIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEIE_SHIFT)) & I2S_RCSR_FEIE_MASK)
7621 
7622 #define I2S_RCSR_SEIE_MASK                       (0x800U)
7623 #define I2S_RCSR_SEIE_SHIFT                      (11U)
7624 /*! SEIE - Sync Error Interrupt Enable
7625  *  0b0..Disables interrupt.
7626  *  0b1..Enables interrupt.
7627  */
7628 #define I2S_RCSR_SEIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEIE_SHIFT)) & I2S_RCSR_SEIE_MASK)
7629 
7630 #define I2S_RCSR_WSIE_MASK                       (0x1000U)
7631 #define I2S_RCSR_WSIE_SHIFT                      (12U)
7632 /*! WSIE - Word Start Interrupt Enable
7633  *  0b0..Disables interrupt.
7634  *  0b1..Enables interrupt.
7635  */
7636 #define I2S_RCSR_WSIE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSIE_SHIFT)) & I2S_RCSR_WSIE_MASK)
7637 
7638 #define I2S_RCSR_FRF_MASK                        (0x10000U)
7639 #define I2S_RCSR_FRF_SHIFT                       (16U)
7640 /*! FRF - FIFO Request Flag
7641  *  0b0..Receive FIFO watermark not reached.
7642  *  0b1..Receive FIFO watermark has been reached.
7643  */
7644 #define I2S_RCSR_FRF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRF_SHIFT)) & I2S_RCSR_FRF_MASK)
7645 
7646 #define I2S_RCSR_FWF_MASK                        (0x20000U)
7647 #define I2S_RCSR_FWF_SHIFT                       (17U)
7648 /*! FWF - FIFO Warning Flag
7649  *  0b0..No enabled receive FIFO is full.
7650  *  0b1..Enabled receive FIFO is full.
7651  */
7652 #define I2S_RCSR_FWF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWF_SHIFT)) & I2S_RCSR_FWF_MASK)
7653 
7654 #define I2S_RCSR_FEF_MASK                        (0x40000U)
7655 #define I2S_RCSR_FEF_SHIFT                       (18U)
7656 /*! FEF - FIFO Error Flag
7657  *  0b0..Receive overflow not detected.
7658  *  0b1..Receive overflow detected.
7659  */
7660 #define I2S_RCSR_FEF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEF_SHIFT)) & I2S_RCSR_FEF_MASK)
7661 
7662 #define I2S_RCSR_SEF_MASK                        (0x80000U)
7663 #define I2S_RCSR_SEF_SHIFT                       (19U)
7664 /*! SEF - Sync Error Flag
7665  *  0b0..Sync error not detected.
7666  *  0b1..Frame sync error detected.
7667  */
7668 #define I2S_RCSR_SEF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEF_SHIFT)) & I2S_RCSR_SEF_MASK)
7669 
7670 #define I2S_RCSR_WSF_MASK                        (0x100000U)
7671 #define I2S_RCSR_WSF_SHIFT                       (20U)
7672 /*! WSF - Word Start Flag
7673  *  0b0..Start of word not detected.
7674  *  0b1..Start of word detected.
7675  */
7676 #define I2S_RCSR_WSF(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSF_SHIFT)) & I2S_RCSR_WSF_MASK)
7677 
7678 #define I2S_RCSR_SR_MASK                         (0x1000000U)
7679 #define I2S_RCSR_SR_SHIFT                        (24U)
7680 /*! SR - Software Reset
7681  *  0b0..No effect.
7682  *  0b1..Software reset.
7683  */
7684 #define I2S_RCSR_SR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SR_SHIFT)) & I2S_RCSR_SR_MASK)
7685 
7686 #define I2S_RCSR_FR_MASK                         (0x2000000U)
7687 #define I2S_RCSR_FR_SHIFT                        (25U)
7688 /*! FR - FIFO Reset
7689  *  0b0..No effect.
7690  *  0b1..FIFO reset.
7691  */
7692 #define I2S_RCSR_FR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FR_SHIFT)) & I2S_RCSR_FR_MASK)
7693 
7694 #define I2S_RCSR_BCE_MASK                        (0x10000000U)
7695 #define I2S_RCSR_BCE_SHIFT                       (28U)
7696 /*! BCE - Bit Clock Enable
7697  *  0b0..Receive bit clock is disabled.
7698  *  0b1..Receive bit clock is enabled.
7699  */
7700 #define I2S_RCSR_BCE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_BCE_SHIFT)) & I2S_RCSR_BCE_MASK)
7701 
7702 #define I2S_RCSR_DBGE_MASK                       (0x20000000U)
7703 #define I2S_RCSR_DBGE_SHIFT                      (29U)
7704 /*! DBGE - Debug Enable
7705  *  0b0..Receiver is disabled in Debug mode, after completing the current frame.
7706  *  0b1..Receiver is enabled in Debug mode.
7707  */
7708 #define I2S_RCSR_DBGE(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_DBGE_SHIFT)) & I2S_RCSR_DBGE_MASK)
7709 
7710 #define I2S_RCSR_STOPE_MASK                      (0x40000000U)
7711 #define I2S_RCSR_STOPE_SHIFT                     (30U)
7712 /*! STOPE - Stop Enable
7713  *  0b0..Receiver disabled in Stop mode.
7714  *  0b1..Receiver enabled in Stop mode.
7715  */
7716 #define I2S_RCSR_STOPE(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_STOPE_SHIFT)) & I2S_RCSR_STOPE_MASK)
7717 
7718 #define I2S_RCSR_RE_MASK                         (0x80000000U)
7719 #define I2S_RCSR_RE_SHIFT                        (31U)
7720 /*! RE - Receiver Enable
7721  *  0b0..Receiver is disabled.
7722  *  0b1..Receiver is enabled, or receiver has been disabled and has not yet reached end of frame.
7723  */
7724 #define I2S_RCSR_RE(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_RE_SHIFT)) & I2S_RCSR_RE_MASK)
7725 /*! @} */
7726 
7727 /*! @name RCR1 - SAI Receive Configuration 1 Register */
7728 /*! @{ */
7729 
7730 #define I2S_RCR1_RFW_MASK                        (0x7U)
7731 #define I2S_RCR1_RFW_SHIFT                       (0U)
7732 /*! RFW - Receive FIFO Watermark */
7733 #define I2S_RCR1_RFW(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR1_RFW_SHIFT)) & I2S_RCR1_RFW_MASK)
7734 /*! @} */
7735 
7736 /*! @name RCR2 - SAI Receive Configuration 2 Register */
7737 /*! @{ */
7738 
7739 #define I2S_RCR2_DIV_MASK                        (0xFFU)
7740 #define I2S_RCR2_DIV_SHIFT                       (0U)
7741 /*! DIV - Bit Clock Divide */
7742 #define I2S_RCR2_DIV(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_DIV_SHIFT)) & I2S_RCR2_DIV_MASK)
7743 
7744 #define I2S_RCR2_BCD_MASK                        (0x1000000U)
7745 #define I2S_RCR2_BCD_SHIFT                       (24U)
7746 /*! BCD - Bit Clock Direction
7747  *  0b0..Bit clock is generated externally in Slave mode.
7748  *  0b1..Bit clock is generated internally in Master mode.
7749  */
7750 #define I2S_RCR2_BCD(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCD_SHIFT)) & I2S_RCR2_BCD_MASK)
7751 
7752 #define I2S_RCR2_BCP_MASK                        (0x2000000U)
7753 #define I2S_RCR2_BCP_SHIFT                       (25U)
7754 /*! BCP - Bit Clock Polarity
7755  *  0b0..Bit Clock is active high with drive outputs on rising edge and sample inputs on falling edge.
7756  *  0b1..Bit Clock is active low with drive outputs on falling edge and sample inputs on rising edge.
7757  */
7758 #define I2S_RCR2_BCP(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCP_SHIFT)) & I2S_RCR2_BCP_MASK)
7759 
7760 #define I2S_RCR2_MSEL_MASK                       (0xC000000U)
7761 #define I2S_RCR2_MSEL_SHIFT                      (26U)
7762 /*! MSEL - MCLK Select
7763  *  0b00..Bus Clock selected.
7764  *  0b01..Master Clock (MCLK) 1 option selected.
7765  *  0b10..Master Clock (MCLK) 2 option selected.
7766  *  0b11..Master Clock (MCLK) 3 option selected.
7767  */
7768 #define I2S_RCR2_MSEL(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_MSEL_SHIFT)) & I2S_RCR2_MSEL_MASK)
7769 
7770 #define I2S_RCR2_BCI_MASK                        (0x10000000U)
7771 #define I2S_RCR2_BCI_SHIFT                       (28U)
7772 /*! BCI - Bit Clock Input
7773  *  0b0..No effect.
7774  *  0b1..Internal logic is clocked as if bit clock was externally generated.
7775  */
7776 #define I2S_RCR2_BCI(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCI_SHIFT)) & I2S_RCR2_BCI_MASK)
7777 
7778 #define I2S_RCR2_BCS_MASK                        (0x20000000U)
7779 #define I2S_RCR2_BCS_SHIFT                       (29U)
7780 /*! BCS - Bit Clock Swap
7781  *  0b0..Use the normal bit clock source.
7782  *  0b1..Swap the bit clock source.
7783  */
7784 #define I2S_RCR2_BCS(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCS_SHIFT)) & I2S_RCR2_BCS_MASK)
7785 
7786 #define I2S_RCR2_SYNC_MASK                       (0xC0000000U)
7787 #define I2S_RCR2_SYNC_SHIFT                      (30U)
7788 /*! SYNC - Synchronous Mode
7789  *  0b00..Asynchronous mode.
7790  *  0b01..Synchronous with transmitter.
7791  *  0b10..Synchronous with another SAI receiver.
7792  *  0b11..Synchronous with another SAI transmitter.
7793  */
7794 #define I2S_RCR2_SYNC(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_SYNC_SHIFT)) & I2S_RCR2_SYNC_MASK)
7795 /*! @} */
7796 
7797 /*! @name RCR3 - SAI Receive Configuration 3 Register */
7798 /*! @{ */
7799 
7800 #define I2S_RCR3_WDFL_MASK                       (0x1FU)
7801 #define I2S_RCR3_WDFL_SHIFT                      (0U)
7802 /*! WDFL - Word Flag Configuration */
7803 #define I2S_RCR3_WDFL(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_WDFL_SHIFT)) & I2S_RCR3_WDFL_MASK)
7804 
7805 #define I2S_RCR3_RCE_MASK                        (0x30000U)
7806 #define I2S_RCR3_RCE_SHIFT                       (16U)
7807 /*! RCE - Receive Channel Enable */
7808 #define I2S_RCR3_RCE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_RCE_SHIFT)) & I2S_RCR3_RCE_MASK)
7809 
7810 #define I2S_RCR3_CFR_MASK                        (0x3000000U)
7811 #define I2S_RCR3_CFR_SHIFT                       (24U)
7812 /*! CFR - Channel FIFO Reset */
7813 #define I2S_RCR3_CFR(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_CFR_SHIFT)) & I2S_RCR3_CFR_MASK)
7814 /*! @} */
7815 
7816 /*! @name RCR4 - SAI Receive Configuration 4 Register */
7817 /*! @{ */
7818 
7819 #define I2S_RCR4_FSD_MASK                        (0x1U)
7820 #define I2S_RCR4_FSD_SHIFT                       (0U)
7821 /*! FSD - Frame Sync Direction
7822  *  0b0..Frame Sync is generated externally in Slave mode.
7823  *  0b1..Frame Sync is generated internally in Master mode.
7824  */
7825 #define I2S_RCR4_FSD(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSD_SHIFT)) & I2S_RCR4_FSD_MASK)
7826 
7827 #define I2S_RCR4_FSP_MASK                        (0x2U)
7828 #define I2S_RCR4_FSP_SHIFT                       (1U)
7829 /*! FSP - Frame Sync Polarity
7830  *  0b0..Frame sync is active high.
7831  *  0b1..Frame sync is active low.
7832  */
7833 #define I2S_RCR4_FSP(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSP_SHIFT)) & I2S_RCR4_FSP_MASK)
7834 
7835 #define I2S_RCR4_ONDEM_MASK                      (0x4U)
7836 #define I2S_RCR4_ONDEM_SHIFT                     (2U)
7837 /*! ONDEM - On Demand Mode
7838  *  0b0..Internal frame sync is generated continuously.
7839  *  0b1..Internal frame sync is generated when the FIFO warning flag is clear.
7840  */
7841 #define I2S_RCR4_ONDEM(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_ONDEM_SHIFT)) & I2S_RCR4_ONDEM_MASK)
7842 
7843 #define I2S_RCR4_FSE_MASK                        (0x8U)
7844 #define I2S_RCR4_FSE_SHIFT                       (3U)
7845 /*! FSE - Frame Sync Early
7846  *  0b0..Frame sync asserts with the first bit of the frame.
7847  *  0b1..Frame sync asserts one bit before the first bit of the frame.
7848  */
7849 #define I2S_RCR4_FSE(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSE_SHIFT)) & I2S_RCR4_FSE_MASK)
7850 
7851 #define I2S_RCR4_MF_MASK                         (0x10U)
7852 #define I2S_RCR4_MF_SHIFT                        (4U)
7853 /*! MF - MSB First
7854  *  0b0..LSB is received first.
7855  *  0b1..MSB is received first.
7856  */
7857 #define I2S_RCR4_MF(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_MF_SHIFT)) & I2S_RCR4_MF_MASK)
7858 
7859 #define I2S_RCR4_SYWD_MASK                       (0x1F00U)
7860 #define I2S_RCR4_SYWD_SHIFT                      (8U)
7861 /*! SYWD - Sync Width */
7862 #define I2S_RCR4_SYWD(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_SYWD_SHIFT)) & I2S_RCR4_SYWD_MASK)
7863 
7864 #define I2S_RCR4_FRSZ_MASK                       (0x1F0000U)
7865 #define I2S_RCR4_FRSZ_SHIFT                      (16U)
7866 /*! FRSZ - Frame Size */
7867 #define I2S_RCR4_FRSZ(x)                         (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FRSZ_SHIFT)) & I2S_RCR4_FRSZ_MASK)
7868 
7869 #define I2S_RCR4_FPACK_MASK                      (0x3000000U)
7870 #define I2S_RCR4_FPACK_SHIFT                     (24U)
7871 /*! FPACK - FIFO Packing Mode
7872  *  0b00..FIFO packing is disabled
7873  *  0b01..Reserved.
7874  *  0b10..8-bit FIFO packing is enabled
7875  *  0b11..16-bit FIFO packing is enabled
7876  */
7877 #define I2S_RCR4_FPACK(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FPACK_SHIFT)) & I2S_RCR4_FPACK_MASK)
7878 
7879 #define I2S_RCR4_FCOMB_MASK                      (0xC000000U)
7880 #define I2S_RCR4_FCOMB_SHIFT                     (26U)
7881 /*! FCOMB - FIFO Combine Mode
7882  *  0b00..FIFO combine mode disabled.
7883  *  0b01..FIFO combine mode enabled on FIFO writes (from receive shift registers).
7884  *  0b10..FIFO combine mode enabled on FIFO reads (by software).
7885  *  0b11..FIFO combine mode enabled on FIFO writes (from receive shift registers) and reads (by software).
7886  */
7887 #define I2S_RCR4_FCOMB(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCOMB_SHIFT)) & I2S_RCR4_FCOMB_MASK)
7888 
7889 #define I2S_RCR4_FCONT_MASK                      (0x10000000U)
7890 #define I2S_RCR4_FCONT_SHIFT                     (28U)
7891 /*! FCONT - FIFO Continue on Error
7892  *  0b0..On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared.
7893  *  0b1..On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared.
7894  */
7895 #define I2S_RCR4_FCONT(x)                        (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCONT_SHIFT)) & I2S_RCR4_FCONT_MASK)
7896 /*! @} */
7897 
7898 /*! @name RCR5 - SAI Receive Configuration 5 Register */
7899 /*! @{ */
7900 
7901 #define I2S_RCR5_FBT_MASK                        (0x1F00U)
7902 #define I2S_RCR5_FBT_SHIFT                       (8U)
7903 /*! FBT - First Bit Shifted */
7904 #define I2S_RCR5_FBT(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_FBT_SHIFT)) & I2S_RCR5_FBT_MASK)
7905 
7906 #define I2S_RCR5_W0W_MASK                        (0x1F0000U)
7907 #define I2S_RCR5_W0W_SHIFT                       (16U)
7908 /*! W0W - Word 0 Width */
7909 #define I2S_RCR5_W0W(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_W0W_SHIFT)) & I2S_RCR5_W0W_MASK)
7910 
7911 #define I2S_RCR5_WNW_MASK                        (0x1F000000U)
7912 #define I2S_RCR5_WNW_SHIFT                       (24U)
7913 /*! WNW - Word N Width */
7914 #define I2S_RCR5_WNW(x)                          (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_WNW_SHIFT)) & I2S_RCR5_WNW_MASK)
7915 /*! @} */
7916 
7917 /*! @name RDR - SAI Receive Data Register */
7918 /*! @{ */
7919 
7920 #define I2S_RDR_RDR_MASK                         (0xFFFFFFFFU)
7921 #define I2S_RDR_RDR_SHIFT                        (0U)
7922 /*! RDR - Receive Data Register */
7923 #define I2S_RDR_RDR(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RDR_RDR_SHIFT)) & I2S_RDR_RDR_MASK)
7924 /*! @} */
7925 
7926 /* The count of I2S_RDR */
7927 #define I2S_RDR_COUNT                            (2U)
7928 
7929 /*! @name RFR - SAI Receive FIFO Register */
7930 /*! @{ */
7931 
7932 #define I2S_RFR_RFP_MASK                         (0xFU)
7933 #define I2S_RFR_RFP_SHIFT                        (0U)
7934 /*! RFP - Read FIFO Pointer */
7935 #define I2S_RFR_RFP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RFP_SHIFT)) & I2S_RFR_RFP_MASK)
7936 
7937 #define I2S_RFR_RCP_MASK                         (0x8000U)
7938 #define I2S_RFR_RCP_SHIFT                        (15U)
7939 /*! RCP - Receive Channel Pointer
7940  *  0b0..No effect.
7941  *  0b1..FIFO combine is enabled for FIFO reads and this FIFO will be read on the next FIFO read.
7942  */
7943 #define I2S_RFR_RCP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RCP_SHIFT)) & I2S_RFR_RCP_MASK)
7944 
7945 #define I2S_RFR_WFP_MASK                         (0xF0000U)
7946 #define I2S_RFR_WFP_SHIFT                        (16U)
7947 /*! WFP - Write FIFO Pointer */
7948 #define I2S_RFR_WFP(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RFR_WFP_SHIFT)) & I2S_RFR_WFP_MASK)
7949 /*! @} */
7950 
7951 /* The count of I2S_RFR */
7952 #define I2S_RFR_COUNT                            (2U)
7953 
7954 /*! @name RMR - SAI Receive Mask Register */
7955 /*! @{ */
7956 
7957 #define I2S_RMR_RWM_MASK                         (0xFFFFFFFFU)
7958 #define I2S_RMR_RWM_SHIFT                        (0U)
7959 /*! RWM - Receive Word Mask
7960  *  0b00000000000000000000000000000000..Word N is enabled.
7961  *  0b00000000000000000000000000000001..Word N is masked.
7962  */
7963 #define I2S_RMR_RWM(x)                           (((uint32_t)(((uint32_t)(x)) << I2S_RMR_RWM_SHIFT)) & I2S_RMR_RWM_MASK)
7964 /*! @} */
7965 
7966 
7967 /*!
7968  * @}
7969  */ /* end of group I2S_Register_Masks */
7970 
7971 
7972 /* I2S - Peripheral instance base addresses */
7973 /** Peripheral I2S0 base address */
7974 #define I2S0_BASE                                (0x4003D000u)
7975 /** Peripheral I2S0 base pointer */
7976 #define I2S0                                     ((I2S_Type *)I2S0_BASE)
7977 /** Array initializer of I2S peripheral base addresses */
7978 #define I2S_BASE_ADDRS                           { I2S0_BASE }
7979 /** Array initializer of I2S peripheral base pointers */
7980 #define I2S_BASE_PTRS                            { I2S0 }
7981 /** Interrupt vectors for the I2S peripheral type */
7982 #define I2S_RX_IRQS                              { I2S0_IRQn }
7983 #define I2S_TX_IRQS                              { I2S0_IRQn }
7984 
7985 /*!
7986  * @}
7987  */ /* end of group I2S_Peripheral_Access_Layer */
7988 
7989 
7990 /* ----------------------------------------------------------------------------
7991    -- INTMUX Peripheral Access Layer
7992    ---------------------------------------------------------------------------- */
7993 
7994 /*!
7995  * @addtogroup INTMUX_Peripheral_Access_Layer INTMUX Peripheral Access Layer
7996  * @{
7997  */
7998 
7999 /** INTMUX - Register Layout Typedef */
8000 typedef struct {
8001   struct {                                         /* offset: 0x0, array step: 0x40 */
8002     __IO uint32_t CHn_CSR;                           /**< Channel n Control Status Register, array offset: 0x0, array step: 0x40 */
8003     __I  uint32_t CHn_VEC;                           /**< Channel n Vector Number Register, array offset: 0x4, array step: 0x40 */
8004          uint8_t RESERVED_0[8];
8005     __IO uint32_t CHn_IER_31_0;                      /**< Channel n Interrupt Enable Register, array offset: 0x10, array step: 0x40 */
8006          uint8_t RESERVED_1[12];
8007     __I  uint32_t CHn_IPR_31_0;                      /**< Channel n Interrupt Pending Register, array offset: 0x20, array step: 0x40 */
8008          uint8_t RESERVED_2[28];
8009   } CHANNEL[8];
8010 } INTMUX_Type;
8011 
8012 /* ----------------------------------------------------------------------------
8013    -- INTMUX Register Masks
8014    ---------------------------------------------------------------------------- */
8015 
8016 /*!
8017  * @addtogroup INTMUX_Register_Masks INTMUX Register Masks
8018  * @{
8019  */
8020 
8021 /*! @name CHn_CSR - Channel n Control Status Register */
8022 /*! @{ */
8023 
8024 #define INTMUX_CHn_CSR_RST_MASK                  (0x1U)
8025 #define INTMUX_CHn_CSR_RST_SHIFT                 (0U)
8026 /*! RST - Software Reset
8027  *  0b0..No operation.
8028  *  0b1..Perform a software reset on this channel.
8029  */
8030 #define INTMUX_CHn_CSR_RST(x)                    (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_RST_SHIFT)) & INTMUX_CHn_CSR_RST_MASK)
8031 
8032 #define INTMUX_CHn_CSR_AND_MASK                  (0x2U)
8033 #define INTMUX_CHn_CSR_AND_SHIFT                 (1U)
8034 /*! AND - Logic AND
8035  *  0b0..Logic OR all enabled interrupt inputs.
8036  *  0b1..Logic AND all enabled interrupt inputs.
8037  */
8038 #define INTMUX_CHn_CSR_AND(x)                    (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_AND_SHIFT)) & INTMUX_CHn_CSR_AND_MASK)
8039 
8040 #define INTMUX_CHn_CSR_IRQN_MASK                 (0x30U)
8041 #define INTMUX_CHn_CSR_IRQN_SHIFT                (4U)
8042 /*! IRQN - Channel Input Number
8043  *  0b00..32 interrupt inputs
8044  *  0b01..Reserved
8045  *  0b10..Reserved
8046  *  0b11..Reserved
8047  */
8048 #define INTMUX_CHn_CSR_IRQN(x)                   (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_IRQN_SHIFT)) & INTMUX_CHn_CSR_IRQN_MASK)
8049 
8050 #define INTMUX_CHn_CSR_CHIN_MASK                 (0xF00U)
8051 #define INTMUX_CHn_CSR_CHIN_SHIFT                (8U)
8052 /*! CHIN - Channel Instance Number */
8053 #define INTMUX_CHn_CSR_CHIN(x)                   (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_CHIN_SHIFT)) & INTMUX_CHn_CSR_CHIN_MASK)
8054 
8055 #define INTMUX_CHn_CSR_IRQP_MASK                 (0x80000000U)
8056 #define INTMUX_CHn_CSR_IRQP_SHIFT                (31U)
8057 /*! IRQP - Channel Interrupt Request Pending
8058  *  0b0..No interrupt is pending.
8059  *  0b1..The interrupt output of this channel is pending.
8060  */
8061 #define INTMUX_CHn_CSR_IRQP(x)                   (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_IRQP_SHIFT)) & INTMUX_CHn_CSR_IRQP_MASK)
8062 /*! @} */
8063 
8064 /* The count of INTMUX_CHn_CSR */
8065 #define INTMUX_CHn_CSR_COUNT                     (8U)
8066 
8067 /*! @name CHn_VEC - Channel n Vector Number Register */
8068 /*! @{ */
8069 
8070 #define INTMUX_CHn_VEC_VECN_MASK                 (0x3FFCU)
8071 #define INTMUX_CHn_VEC_VECN_SHIFT                (2U)
8072 /*! VECN - Vector Number */
8073 #define INTMUX_CHn_VEC_VECN(x)                   (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_VEC_VECN_SHIFT)) & INTMUX_CHn_VEC_VECN_MASK)
8074 /*! @} */
8075 
8076 /* The count of INTMUX_CHn_VEC */
8077 #define INTMUX_CHn_VEC_COUNT                     (8U)
8078 
8079 /*! @name CHn_IER_31_0 - Channel n Interrupt Enable Register */
8080 /*! @{ */
8081 
8082 #define INTMUX_CHn_IER_31_0_INTE_MASK            (0xFFFFFFFFU)
8083 #define INTMUX_CHn_IER_31_0_INTE_SHIFT           (0U)
8084 /*! INTE - Interrupt Enable */
8085 #define INTMUX_CHn_IER_31_0_INTE(x)              (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_IER_31_0_INTE_SHIFT)) & INTMUX_CHn_IER_31_0_INTE_MASK)
8086 /*! @} */
8087 
8088 /* The count of INTMUX_CHn_IER_31_0 */
8089 #define INTMUX_CHn_IER_31_0_COUNT                (8U)
8090 
8091 /*! @name CHn_IPR_31_0 - Channel n Interrupt Pending Register */
8092 /*! @{ */
8093 
8094 #define INTMUX_CHn_IPR_31_0_INTP_MASK            (0xFFFFFFFFU)
8095 #define INTMUX_CHn_IPR_31_0_INTP_SHIFT           (0U)
8096 /*! INTP - Interrupt Pending */
8097 #define INTMUX_CHn_IPR_31_0_INTP(x)              (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_IPR_31_0_INTP_SHIFT)) & INTMUX_CHn_IPR_31_0_INTP_MASK)
8098 /*! @} */
8099 
8100 /* The count of INTMUX_CHn_IPR_31_0 */
8101 #define INTMUX_CHn_IPR_31_0_COUNT                (8U)
8102 
8103 
8104 /*!
8105  * @}
8106  */ /* end of group INTMUX_Register_Masks */
8107 
8108 
8109 /* INTMUX - Peripheral instance base addresses */
8110 /** Peripheral INTMUX1 base address */
8111 #define INTMUX1_BASE                             (0x41022000u)
8112 /** Peripheral INTMUX1 base pointer */
8113 #define INTMUX1                                  ((INTMUX_Type *)INTMUX1_BASE)
8114 /** Array initializer of INTMUX peripheral base addresses */
8115 #define INTMUX_BASE_ADDRS                        { 0u, INTMUX1_BASE }
8116 /** Array initializer of INTMUX peripheral base pointers */
8117 #define INTMUX_BASE_PTRS                         { (INTMUX_Type *)0u, INTMUX1 }
8118 /** Interrupt vectors for the INTMUX peripheral type */
8119 #define INTMUX_IRQS                              { { NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn }, { INTMUX1_0_IRQn, INTMUX1_1_IRQn, INTMUX1_2_IRQn, INTMUX1_3_IRQn, INTMUX1_4_IRQn, INTMUX1_5_IRQn, INTMUX1_6_IRQn, INTMUX1_7_IRQn } }
8120 
8121 /*!
8122  * @}
8123  */ /* end of group INTMUX_Peripheral_Access_Layer */
8124 
8125 
8126 /* ----------------------------------------------------------------------------
8127    -- LLWU Peripheral Access Layer
8128    ---------------------------------------------------------------------------- */
8129 
8130 /*!
8131  * @addtogroup LLWU_Peripheral_Access_Layer LLWU Peripheral Access Layer
8132  * @{
8133  */
8134 
8135 /** LLWU - Register Layout Typedef */
8136 typedef struct {
8137   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
8138   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
8139   __IO uint32_t PE1;                               /**< Pin Enable 1 register, offset: 0x8 */
8140   __IO uint32_t PE2;                               /**< Pin Enable 2 register, offset: 0xC */
8141        uint8_t RESERVED_0[8];
8142   __IO uint32_t ME;                                /**< Module Interrupt Enable register, offset: 0x18 */
8143   __IO uint32_t DE;                                /**< Module DMA/Trigger Enable register, offset: 0x1C */
8144   __IO uint32_t PF;                                /**< Pin Flag register, offset: 0x20 */
8145        uint8_t RESERVED_1[12];
8146   __IO uint32_t FILT;                              /**< Pin Filter register, offset: 0x30 */
8147        uint8_t RESERVED_2[4];
8148   __IO uint32_t PDC1;                              /**< Pin DMA/Trigger Configuration 1 register, offset: 0x38 */
8149   __IO uint32_t PDC2;                              /**< Pin DMA/Trigger Configuration 2 register, offset: 0x3C */
8150        uint8_t RESERVED_3[8];
8151   __IO uint32_t FDC;                               /**< Pin Filter DMA/Trigger Configuration register, offset: 0x48 */
8152        uint8_t RESERVED_4[4];
8153   __IO uint32_t PMC;                               /**< Pin Mode Configuration register, offset: 0x50 */
8154        uint8_t RESERVED_5[4];
8155   __IO uint32_t FMC;                               /**< Pin Filter Mode Configuration register, offset: 0x58 */
8156 } LLWU_Type;
8157 
8158 /* ----------------------------------------------------------------------------
8159    -- LLWU Register Masks
8160    ---------------------------------------------------------------------------- */
8161 
8162 /*!
8163  * @addtogroup LLWU_Register_Masks LLWU Register Masks
8164  * @{
8165  */
8166 
8167 /*! @name VERID - Version ID Register */
8168 /*! @{ */
8169 
8170 #define LLWU_VERID_FEATURE_MASK                  (0xFFFFU)
8171 #define LLWU_VERID_FEATURE_SHIFT                 (0U)
8172 /*! FEATURE - Feature Specification Number
8173  *  0b0000000000000000..Standard features implemented
8174  *  0b0000000000000001..Support for DMA/Trigger generation from wakeup pins and filters enabled. Support for
8175  *                      external pin/filter detection during all power modes enabled.
8176  */
8177 #define LLWU_VERID_FEATURE(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_FEATURE_SHIFT)) & LLWU_VERID_FEATURE_MASK)
8178 
8179 #define LLWU_VERID_MINOR_MASK                    (0xFF0000U)
8180 #define LLWU_VERID_MINOR_SHIFT                   (16U)
8181 /*! MINOR - Minor Version Number */
8182 #define LLWU_VERID_MINOR(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_MINOR_SHIFT)) & LLWU_VERID_MINOR_MASK)
8183 
8184 #define LLWU_VERID_MAJOR_MASK                    (0xFF000000U)
8185 #define LLWU_VERID_MAJOR_SHIFT                   (24U)
8186 /*! MAJOR - Major Version Number */
8187 #define LLWU_VERID_MAJOR(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_MAJOR_SHIFT)) & LLWU_VERID_MAJOR_MASK)
8188 /*! @} */
8189 
8190 /*! @name PARAM - Parameter Register */
8191 /*! @{ */
8192 
8193 #define LLWU_PARAM_FILTERS_MASK                  (0xFFU)
8194 #define LLWU_PARAM_FILTERS_SHIFT                 (0U)
8195 /*! FILTERS - Filter Number */
8196 #define LLWU_PARAM_FILTERS(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_FILTERS_SHIFT)) & LLWU_PARAM_FILTERS_MASK)
8197 
8198 #define LLWU_PARAM_DMAS_MASK                     (0xFF00U)
8199 #define LLWU_PARAM_DMAS_SHIFT                    (8U)
8200 /*! DMAS - DMA Number */
8201 #define LLWU_PARAM_DMAS(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_DMAS_SHIFT)) & LLWU_PARAM_DMAS_MASK)
8202 
8203 #define LLWU_PARAM_MODULES_MASK                  (0xFF0000U)
8204 #define LLWU_PARAM_MODULES_SHIFT                 (16U)
8205 /*! MODULES - Module Number */
8206 #define LLWU_PARAM_MODULES(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_MODULES_SHIFT)) & LLWU_PARAM_MODULES_MASK)
8207 
8208 #define LLWU_PARAM_PINS_MASK                     (0xFF000000U)
8209 #define LLWU_PARAM_PINS_SHIFT                    (24U)
8210 /*! PINS - Pin Number */
8211 #define LLWU_PARAM_PINS(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_PINS_SHIFT)) & LLWU_PARAM_PINS_MASK)
8212 /*! @} */
8213 
8214 /*! @name PE1 - Pin Enable 1 register */
8215 /*! @{ */
8216 
8217 #define LLWU_PE1_WUPE0_MASK                      (0x3U)
8218 #define LLWU_PE1_WUPE0_SHIFT                     (0U)
8219 /*! WUPE0 - Wakeup pin enable for LLWU_Pn
8220  *  0b00..External input pin disabled as wakeup input
8221  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8222  *        level detection when configured as trigger request
8223  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8224  *        level detection when configured as trigger request
8225  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8226  */
8227 #define LLWU_PE1_WUPE0(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE0_SHIFT)) & LLWU_PE1_WUPE0_MASK)
8228 
8229 #define LLWU_PE1_WUPE1_MASK                      (0xCU)
8230 #define LLWU_PE1_WUPE1_SHIFT                     (2U)
8231 /*! WUPE1 - Wakeup pin enable for LLWU_Pn
8232  *  0b00..External input pin disabled as wakeup input
8233  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8234  *        level detection when configured as trigger request
8235  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8236  *        level detection when configured as trigger request
8237  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8238  */
8239 #define LLWU_PE1_WUPE1(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE1_SHIFT)) & LLWU_PE1_WUPE1_MASK)
8240 
8241 #define LLWU_PE1_WUPE2_MASK                      (0x30U)
8242 #define LLWU_PE1_WUPE2_SHIFT                     (4U)
8243 /*! WUPE2 - Wakeup pin enable for LLWU_Pn
8244  *  0b00..External input pin disabled as wakeup input
8245  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8246  *        level detection when configured as trigger request
8247  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8248  *        level detection when configured as trigger request
8249  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8250  */
8251 #define LLWU_PE1_WUPE2(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE2_SHIFT)) & LLWU_PE1_WUPE2_MASK)
8252 
8253 #define LLWU_PE1_WUPE3_MASK                      (0xC0U)
8254 #define LLWU_PE1_WUPE3_SHIFT                     (6U)
8255 /*! WUPE3 - Wakeup pin enable for LLWU_Pn
8256  *  0b00..External input pin disabled as wakeup input
8257  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8258  *        level detection when configured as trigger request
8259  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8260  *        level detection when configured as trigger request
8261  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8262  */
8263 #define LLWU_PE1_WUPE3(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE3_SHIFT)) & LLWU_PE1_WUPE3_MASK)
8264 
8265 #define LLWU_PE1_WUPE4_MASK                      (0x300U)
8266 #define LLWU_PE1_WUPE4_SHIFT                     (8U)
8267 /*! WUPE4 - Wakeup pin enable for LLWU_Pn
8268  *  0b00..External input pin disabled as wakeup input
8269  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8270  *        level detection when configured as trigger request
8271  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8272  *        level detection when configured as trigger request
8273  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8274  */
8275 #define LLWU_PE1_WUPE4(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE4_SHIFT)) & LLWU_PE1_WUPE4_MASK)
8276 
8277 #define LLWU_PE1_WUPE5_MASK                      (0xC00U)
8278 #define LLWU_PE1_WUPE5_SHIFT                     (10U)
8279 /*! WUPE5 - Wakeup pin enable for LLWU_Pn
8280  *  0b00..External input pin disabled as wakeup input
8281  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8282  *        level detection when configured as trigger request
8283  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8284  *        level detection when configured as trigger request
8285  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8286  */
8287 #define LLWU_PE1_WUPE5(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE5_SHIFT)) & LLWU_PE1_WUPE5_MASK)
8288 
8289 #define LLWU_PE1_WUPE6_MASK                      (0x3000U)
8290 #define LLWU_PE1_WUPE6_SHIFT                     (12U)
8291 /*! WUPE6 - Wakeup pin enable for LLWU_Pn
8292  *  0b00..External input pin disabled as wakeup input
8293  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8294  *        level detection when configured as trigger request
8295  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8296  *        level detection when configured as trigger request
8297  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8298  */
8299 #define LLWU_PE1_WUPE6(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE6_SHIFT)) & LLWU_PE1_WUPE6_MASK)
8300 
8301 #define LLWU_PE1_WUPE7_MASK                      (0xC000U)
8302 #define LLWU_PE1_WUPE7_SHIFT                     (14U)
8303 /*! WUPE7 - Wakeup pin enable for LLWU_Pn
8304  *  0b00..External input pin disabled as wakeup input
8305  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8306  *        level detection when configured as trigger request
8307  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8308  *        level detection when configured as trigger request
8309  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8310  */
8311 #define LLWU_PE1_WUPE7(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE7_SHIFT)) & LLWU_PE1_WUPE7_MASK)
8312 
8313 #define LLWU_PE1_WUPE8_MASK                      (0x30000U)
8314 #define LLWU_PE1_WUPE8_SHIFT                     (16U)
8315 /*! WUPE8 - Wakeup pin enable for LLWU_Pn
8316  *  0b00..External input pin disabled as wakeup input
8317  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8318  *        level detection when configured as trigger request
8319  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8320  *        level detection when configured as trigger request
8321  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8322  */
8323 #define LLWU_PE1_WUPE8(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE8_SHIFT)) & LLWU_PE1_WUPE8_MASK)
8324 
8325 #define LLWU_PE1_WUPE9_MASK                      (0xC0000U)
8326 #define LLWU_PE1_WUPE9_SHIFT                     (18U)
8327 /*! WUPE9 - Wakeup pin enable for LLWU_Pn
8328  *  0b00..External input pin disabled as wakeup input
8329  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8330  *        level detection when configured as trigger request
8331  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8332  *        level detection when configured as trigger request
8333  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8334  */
8335 #define LLWU_PE1_WUPE9(x)                        (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE9_SHIFT)) & LLWU_PE1_WUPE9_MASK)
8336 
8337 #define LLWU_PE1_WUPE10_MASK                     (0x300000U)
8338 #define LLWU_PE1_WUPE10_SHIFT                    (20U)
8339 /*! WUPE10 - Wakeup pin enable for LLWU_Pn
8340  *  0b00..External input pin disabled as wakeup input
8341  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8342  *        level detection when configured as trigger request
8343  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8344  *        level detection when configured as trigger request
8345  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8346  */
8347 #define LLWU_PE1_WUPE10(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE10_SHIFT)) & LLWU_PE1_WUPE10_MASK)
8348 
8349 #define LLWU_PE1_WUPE11_MASK                     (0xC00000U)
8350 #define LLWU_PE1_WUPE11_SHIFT                    (22U)
8351 /*! WUPE11 - Wakeup pin enable for LLWU_Pn
8352  *  0b00..External input pin disabled as wakeup input
8353  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8354  *        level detection when configured as trigger request
8355  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8356  *        level detection when configured as trigger request
8357  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8358  */
8359 #define LLWU_PE1_WUPE11(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE11_SHIFT)) & LLWU_PE1_WUPE11_MASK)
8360 
8361 #define LLWU_PE1_WUPE12_MASK                     (0x3000000U)
8362 #define LLWU_PE1_WUPE12_SHIFT                    (24U)
8363 /*! WUPE12 - Wakeup pin enable for LLWU_Pn
8364  *  0b00..External input pin disabled as wakeup input
8365  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8366  *        level detection when configured as trigger request
8367  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8368  *        level detection when configured as trigger request
8369  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8370  */
8371 #define LLWU_PE1_WUPE12(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE12_SHIFT)) & LLWU_PE1_WUPE12_MASK)
8372 
8373 #define LLWU_PE1_WUPE13_MASK                     (0xC000000U)
8374 #define LLWU_PE1_WUPE13_SHIFT                    (26U)
8375 /*! WUPE13 - Wakeup pin enable for LLWU_Pn
8376  *  0b00..External input pin disabled as wakeup input
8377  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8378  *        level detection when configured as trigger request
8379  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8380  *        level detection when configured as trigger request
8381  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8382  */
8383 #define LLWU_PE1_WUPE13(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE13_SHIFT)) & LLWU_PE1_WUPE13_MASK)
8384 
8385 #define LLWU_PE1_WUPE14_MASK                     (0x30000000U)
8386 #define LLWU_PE1_WUPE14_SHIFT                    (28U)
8387 /*! WUPE14 - Wakeup pin enable for LLWU_Pn
8388  *  0b00..External input pin disabled as wakeup input
8389  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8390  *        level detection when configured as trigger request
8391  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8392  *        level detection when configured as trigger request
8393  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8394  */
8395 #define LLWU_PE1_WUPE14(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE14_SHIFT)) & LLWU_PE1_WUPE14_MASK)
8396 
8397 #define LLWU_PE1_WUPE15_MASK                     (0xC0000000U)
8398 #define LLWU_PE1_WUPE15_SHIFT                    (30U)
8399 /*! WUPE15 - Wakeup pin enable for LLWU_Pn
8400  *  0b00..External input pin disabled as wakeup input
8401  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8402  *        level detection when configured as trigger request
8403  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8404  *        level detection when configured as trigger request
8405  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8406  */
8407 #define LLWU_PE1_WUPE15(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE15_SHIFT)) & LLWU_PE1_WUPE15_MASK)
8408 /*! @} */
8409 
8410 /*! @name PE2 - Pin Enable 2 register */
8411 /*! @{ */
8412 
8413 #define LLWU_PE2_WUPE16_MASK                     (0x3U)
8414 #define LLWU_PE2_WUPE16_SHIFT                    (0U)
8415 /*! WUPE16 - Wakeup pin enable for LLWU_Pn
8416  *  0b00..External input pin disabled as wakeup input
8417  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8418  *        level detection when configured as trigger request
8419  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8420  *        level detection when configured as trigger request
8421  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8422  */
8423 #define LLWU_PE2_WUPE16(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE16_SHIFT)) & LLWU_PE2_WUPE16_MASK)
8424 
8425 #define LLWU_PE2_WUPE17_MASK                     (0xCU)
8426 #define LLWU_PE2_WUPE17_SHIFT                    (2U)
8427 /*! WUPE17 - Wakeup pin enable for LLWU_Pn
8428  *  0b00..External input pin disabled as wakeup input
8429  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8430  *        level detection when configured as trigger request
8431  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8432  *        level detection when configured as trigger request
8433  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8434  */
8435 #define LLWU_PE2_WUPE17(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE17_SHIFT)) & LLWU_PE2_WUPE17_MASK)
8436 
8437 #define LLWU_PE2_WUPE18_MASK                     (0x30U)
8438 #define LLWU_PE2_WUPE18_SHIFT                    (4U)
8439 /*! WUPE18 - Wakeup pin enable for LLWU_Pn
8440  *  0b00..External input pin disabled as wakeup input
8441  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8442  *        level detection when configured as trigger request
8443  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8444  *        level detection when configured as trigger request
8445  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8446  */
8447 #define LLWU_PE2_WUPE18(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE18_SHIFT)) & LLWU_PE2_WUPE18_MASK)
8448 
8449 #define LLWU_PE2_WUPE19_MASK                     (0xC0U)
8450 #define LLWU_PE2_WUPE19_SHIFT                    (6U)
8451 /*! WUPE19 - Wakeup pin enable for LLWU_Pn
8452  *  0b00..External input pin disabled as wakeup input
8453  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8454  *        level detection when configured as trigger request
8455  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8456  *        level detection when configured as trigger request
8457  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8458  */
8459 #define LLWU_PE2_WUPE19(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE19_SHIFT)) & LLWU_PE2_WUPE19_MASK)
8460 
8461 #define LLWU_PE2_WUPE20_MASK                     (0x300U)
8462 #define LLWU_PE2_WUPE20_SHIFT                    (8U)
8463 /*! WUPE20 - Wakeup pin enable for LLWU_Pn
8464  *  0b00..External input pin disabled as wakeup input
8465  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8466  *        level detection when configured as trigger request
8467  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8468  *        level detection when configured as trigger request
8469  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8470  */
8471 #define LLWU_PE2_WUPE20(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE20_SHIFT)) & LLWU_PE2_WUPE20_MASK)
8472 
8473 #define LLWU_PE2_WUPE21_MASK                     (0xC00U)
8474 #define LLWU_PE2_WUPE21_SHIFT                    (10U)
8475 /*! WUPE21 - Wakeup pin enable for LLWU_Pn
8476  *  0b00..External input pin disabled as wakeup input
8477  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8478  *        level detection when configured as trigger request
8479  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8480  *        level detection when configured as trigger request
8481  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8482  */
8483 #define LLWU_PE2_WUPE21(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE21_SHIFT)) & LLWU_PE2_WUPE21_MASK)
8484 
8485 #define LLWU_PE2_WUPE22_MASK                     (0x3000U)
8486 #define LLWU_PE2_WUPE22_SHIFT                    (12U)
8487 /*! WUPE22 - Wakeup pin enable for LLWU_Pn
8488  *  0b00..External input pin disabled as wakeup input
8489  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8490  *        level detection when configured as trigger request
8491  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8492  *        level detection when configured as trigger request
8493  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8494  */
8495 #define LLWU_PE2_WUPE22(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE22_SHIFT)) & LLWU_PE2_WUPE22_MASK)
8496 
8497 #define LLWU_PE2_WUPE23_MASK                     (0xC000U)
8498 #define LLWU_PE2_WUPE23_SHIFT                    (14U)
8499 /*! WUPE23 - Wakeup pin enable for LLWU_Pn
8500  *  0b00..External input pin disabled as wakeup input
8501  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8502  *        level detection when configured as trigger request
8503  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8504  *        level detection when configured as trigger request
8505  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8506  */
8507 #define LLWU_PE2_WUPE23(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE23_SHIFT)) & LLWU_PE2_WUPE23_MASK)
8508 
8509 #define LLWU_PE2_WUPE24_MASK                     (0x30000U)
8510 #define LLWU_PE2_WUPE24_SHIFT                    (16U)
8511 /*! WUPE24 - Wakeup pin enable for LLWU_Pn
8512  *  0b00..External input pin disabled as wakeup input
8513  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8514  *        level detection when configured as trigger request
8515  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8516  *        level detection when configured as trigger request
8517  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8518  */
8519 #define LLWU_PE2_WUPE24(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE24_SHIFT)) & LLWU_PE2_WUPE24_MASK)
8520 
8521 #define LLWU_PE2_WUPE25_MASK                     (0xC0000U)
8522 #define LLWU_PE2_WUPE25_SHIFT                    (18U)
8523 /*! WUPE25 - Wakeup pin enable for LLWU_Pn
8524  *  0b00..External input pin disabled as wakeup input
8525  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8526  *        level detection when configured as trigger request
8527  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8528  *        level detection when configured as trigger request
8529  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8530  */
8531 #define LLWU_PE2_WUPE25(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE25_SHIFT)) & LLWU_PE2_WUPE25_MASK)
8532 
8533 #define LLWU_PE2_WUPE26_MASK                     (0x300000U)
8534 #define LLWU_PE2_WUPE26_SHIFT                    (20U)
8535 /*! WUPE26 - Wakeup pin enable for LLWU_Pn
8536  *  0b00..External input pin disabled as wakeup input
8537  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8538  *        level detection when configured as trigger request
8539  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8540  *        level detection when configured as trigger request
8541  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8542  */
8543 #define LLWU_PE2_WUPE26(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE26_SHIFT)) & LLWU_PE2_WUPE26_MASK)
8544 
8545 #define LLWU_PE2_Reserved27_MASK                 (0xC00000U)
8546 #define LLWU_PE2_Reserved27_SHIFT                (22U)
8547 /*! Reserved27 - Wakeup pin enable for LLWU_Pn
8548  *  0b00..External input pin disabled as wakeup input
8549  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8550  *        level detection when configured as trigger request
8551  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8552  *        level detection when configured as trigger request
8553  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8554  */
8555 #define LLWU_PE2_Reserved27(x)                   (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_Reserved27_SHIFT)) & LLWU_PE2_Reserved27_MASK)
8556 
8557 #define LLWU_PE2_Reserved28_MASK                 (0x3000000U)
8558 #define LLWU_PE2_Reserved28_SHIFT                (24U)
8559 /*! Reserved28 - Wakeup pin enable for LLWU_Pn
8560  *  0b00..External input pin disabled as wakeup input
8561  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8562  *        level detection when configured as trigger request
8563  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8564  *        level detection when configured as trigger request
8565  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8566  */
8567 #define LLWU_PE2_Reserved28(x)                   (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_Reserved28_SHIFT)) & LLWU_PE2_Reserved28_MASK)
8568 
8569 #define LLWU_PE2_WUPE29_MASK                     (0xC000000U)
8570 #define LLWU_PE2_WUPE29_SHIFT                    (26U)
8571 /*! WUPE29 - Wakeup pin enable for LLWU_Pn
8572  *  0b00..External input pin disabled as wakeup input
8573  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8574  *        level detection when configured as trigger request
8575  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8576  *        level detection when configured as trigger request
8577  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8578  */
8579 #define LLWU_PE2_WUPE29(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE29_SHIFT)) & LLWU_PE2_WUPE29_MASK)
8580 
8581 #define LLWU_PE2_WUPE30_MASK                     (0x30000000U)
8582 #define LLWU_PE2_WUPE30_SHIFT                    (28U)
8583 /*! WUPE30 - Wakeup pin enable for LLWU_Pn
8584  *  0b00..External input pin disabled as wakeup input
8585  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8586  *        level detection when configured as trigger request
8587  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8588  *        level detection when configured as trigger request
8589  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8590  */
8591 #define LLWU_PE2_WUPE30(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE30_SHIFT)) & LLWU_PE2_WUPE30_MASK)
8592 
8593 #define LLWU_PE2_WUPE31_MASK                     (0xC0000000U)
8594 #define LLWU_PE2_WUPE31_SHIFT                    (30U)
8595 /*! WUPE31 - Wakeup pin enable for LLWU_Pn
8596  *  0b00..External input pin disabled as wakeup input
8597  *  0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high
8598  *        level detection when configured as trigger request
8599  *  0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low
8600  *        level detection when configured as trigger request
8601  *  0b11..External input pin enabled with any change detection when configured as interrupt/DMA request
8602  */
8603 #define LLWU_PE2_WUPE31(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE31_SHIFT)) & LLWU_PE2_WUPE31_MASK)
8604 /*! @} */
8605 
8606 /*! @name ME - Module Interrupt Enable register */
8607 /*! @{ */
8608 
8609 #define LLWU_ME_WUME0_MASK                       (0x1U)
8610 #define LLWU_ME_WUME0_SHIFT                      (0U)
8611 /*! WUME0 - Wakeup module enable for module n
8612  *  0b0..Internal module flag not used as wakeup source
8613  *  0b1..Internal module flag used as wakeup source
8614  */
8615 #define LLWU_ME_WUME0(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME0_SHIFT)) & LLWU_ME_WUME0_MASK)
8616 
8617 #define LLWU_ME_WUME1_MASK                       (0x2U)
8618 #define LLWU_ME_WUME1_SHIFT                      (1U)
8619 /*! WUME1 - Wakeup module enable for module n
8620  *  0b0..Internal module flag not used as wakeup source
8621  *  0b1..Internal module flag used as wakeup source
8622  */
8623 #define LLWU_ME_WUME1(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME1_SHIFT)) & LLWU_ME_WUME1_MASK)
8624 
8625 #define LLWU_ME_WUME2_MASK                       (0x4U)
8626 #define LLWU_ME_WUME2_SHIFT                      (2U)
8627 /*! WUME2 - Wakeup module enable for module n
8628  *  0b0..Internal module flag not used as wakeup source
8629  *  0b1..Internal module flag used as wakeup source
8630  */
8631 #define LLWU_ME_WUME2(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME2_SHIFT)) & LLWU_ME_WUME2_MASK)
8632 
8633 #define LLWU_ME_Reserved3_MASK                   (0x8U)
8634 #define LLWU_ME_Reserved3_SHIFT                  (3U)
8635 /*! Reserved3 - Wakeup module enable for module n
8636  *  0b0..Internal module flag not used as wakeup source
8637  *  0b1..Internal module flag used as wakeup source
8638  */
8639 #define LLWU_ME_Reserved3(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_ME_Reserved3_SHIFT)) & LLWU_ME_Reserved3_MASK)
8640 
8641 #define LLWU_ME_WUME3_MASK                       (0x8U)
8642 #define LLWU_ME_WUME3_SHIFT                      (3U)
8643 /*! WUME3 - Wakeup module enable for module n
8644  *  0b0..Internal module flag not used as wakeup source
8645  *  0b1..Internal module flag used as wakeup source
8646  */
8647 #define LLWU_ME_WUME3(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME3_SHIFT)) & LLWU_ME_WUME3_MASK)
8648 
8649 #define LLWU_ME_Reserved4_MASK                   (0x10U)
8650 #define LLWU_ME_Reserved4_SHIFT                  (4U)
8651 /*! Reserved4 - Wakeup module enable for module n
8652  *  0b0..Internal module flag not used as wakeup source
8653  *  0b1..Internal module flag used as wakeup source
8654  */
8655 #define LLWU_ME_Reserved4(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_ME_Reserved4_SHIFT)) & LLWU_ME_Reserved4_MASK)
8656 
8657 #define LLWU_ME_WUME5_MASK                       (0x20U)
8658 #define LLWU_ME_WUME5_SHIFT                      (5U)
8659 /*! WUME5 - Wakeup module enable for module n
8660  *  0b0..Internal module flag not used as wakeup source
8661  *  0b1..Internal module flag used as wakeup source
8662  */
8663 #define LLWU_ME_WUME5(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME5_SHIFT)) & LLWU_ME_WUME5_MASK)
8664 
8665 #define LLWU_ME_WUME6_MASK                       (0x40U)
8666 #define LLWU_ME_WUME6_SHIFT                      (6U)
8667 /*! WUME6 - Wakeup module enable for module n
8668  *  0b0..Internal module flag not used as wakeup source
8669  *  0b1..Internal module flag used as wakeup source
8670  */
8671 #define LLWU_ME_WUME6(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME6_SHIFT)) & LLWU_ME_WUME6_MASK)
8672 
8673 #define LLWU_ME_WUME7_MASK                       (0x80U)
8674 #define LLWU_ME_WUME7_SHIFT                      (7U)
8675 /*! WUME7 - Wakeup module enable for module n
8676  *  0b0..Internal module flag not used as wakeup source
8677  *  0b1..Internal module flag used as wakeup source
8678  */
8679 #define LLWU_ME_WUME7(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME7_SHIFT)) & LLWU_ME_WUME7_MASK)
8680 /*! @} */
8681 
8682 /*! @name DE - Module DMA/Trigger Enable register */
8683 /*! @{ */
8684 
8685 #define LLWU_DE_WUDE0_MASK                       (0x1U)
8686 #define LLWU_DE_WUDE0_SHIFT                      (0U)
8687 /*! WUDE0 - DMA/Trigger wakeup enable for module n
8688  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8689  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8690  */
8691 #define LLWU_DE_WUDE0(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE0_SHIFT)) & LLWU_DE_WUDE0_MASK)
8692 
8693 #define LLWU_DE_WUDE1_MASK                       (0x2U)
8694 #define LLWU_DE_WUDE1_SHIFT                      (1U)
8695 /*! WUDE1 - DMA/Trigger wakeup enable for module n
8696  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8697  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8698  */
8699 #define LLWU_DE_WUDE1(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE1_SHIFT)) & LLWU_DE_WUDE1_MASK)
8700 
8701 #define LLWU_DE_WUDE2_MASK                       (0x4U)
8702 #define LLWU_DE_WUDE2_SHIFT                      (2U)
8703 /*! WUDE2 - DMA/Trigger wakeup enable for module n
8704  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8705  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8706  */
8707 #define LLWU_DE_WUDE2(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE2_SHIFT)) & LLWU_DE_WUDE2_MASK)
8708 
8709 #define LLWU_DE_Reserved3_MASK                   (0x8U)
8710 #define LLWU_DE_Reserved3_SHIFT                  (3U)
8711 /*! Reserved3 - DMA/Trigger wakeup enable for module n
8712  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8713  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8714  */
8715 #define LLWU_DE_Reserved3(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_DE_Reserved3_SHIFT)) & LLWU_DE_Reserved3_MASK)
8716 
8717 #define LLWU_DE_WUDE4_MASK                       (0x10U)
8718 #define LLWU_DE_WUDE4_SHIFT                      (4U)
8719 /*! WUDE4 - DMA/Trigger wakeup enable for module n
8720  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8721  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8722  */
8723 #define LLWU_DE_WUDE4(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE4_SHIFT)) & LLWU_DE_WUDE4_MASK)
8724 
8725 #define LLWU_DE_WUDE5_MASK                       (0x20U)
8726 #define LLWU_DE_WUDE5_SHIFT                      (5U)
8727 /*! WUDE5 - DMA/Trigger wakeup enable for module n
8728  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8729  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8730  */
8731 #define LLWU_DE_WUDE5(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE5_SHIFT)) & LLWU_DE_WUDE5_MASK)
8732 
8733 #define LLWU_DE_WUDE6_MASK                       (0x40U)
8734 #define LLWU_DE_WUDE6_SHIFT                      (6U)
8735 /*! WUDE6 - DMA/Trigger wakeup enable for module n
8736  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8737  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8738  */
8739 #define LLWU_DE_WUDE6(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE6_SHIFT)) & LLWU_DE_WUDE6_MASK)
8740 
8741 #define LLWU_DE_Reserved7_MASK                   (0x80U)
8742 #define LLWU_DE_Reserved7_SHIFT                  (7U)
8743 /*! Reserved7 - DMA/Trigger wakeup enable for module n
8744  *  0b0..Internal module request not enabled as a DMA/Trigger wakeup source
8745  *  0b1..Internal module request enabled as a DMA/Trigger wakeup source
8746  */
8747 #define LLWU_DE_Reserved7(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_DE_Reserved7_SHIFT)) & LLWU_DE_Reserved7_MASK)
8748 /*! @} */
8749 
8750 /*! @name PF - Pin Flag register */
8751 /*! @{ */
8752 
8753 #define LLWU_PF_WUF0_MASK                        (0x1U)
8754 #define LLWU_PF_WUF0_SHIFT                       (0U)
8755 /*! WUF0 - Wakeup flag for LLWU_Pn
8756  *  0b0..LLWU_Pn input was not a wakeup source
8757  *  0b1..LLWU_Pn input was a wakeup source
8758  */
8759 #define LLWU_PF_WUF0(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF0_SHIFT)) & LLWU_PF_WUF0_MASK)
8760 
8761 #define LLWU_PF_WUF1_MASK                        (0x2U)
8762 #define LLWU_PF_WUF1_SHIFT                       (1U)
8763 /*! WUF1 - Wakeup flag for LLWU_Pn
8764  *  0b0..LLWU_Pn input was not a wakeup source
8765  *  0b1..LLWU_Pn input was a wakeup source
8766  */
8767 #define LLWU_PF_WUF1(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF1_SHIFT)) & LLWU_PF_WUF1_MASK)
8768 
8769 #define LLWU_PF_WUF2_MASK                        (0x4U)
8770 #define LLWU_PF_WUF2_SHIFT                       (2U)
8771 /*! WUF2 - Wakeup flag for LLWU_Pn
8772  *  0b0..LLWU_Pn input was not a wakeup source
8773  *  0b1..LLWU_Pn input was a wakeup source
8774  */
8775 #define LLWU_PF_WUF2(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF2_SHIFT)) & LLWU_PF_WUF2_MASK)
8776 
8777 #define LLWU_PF_WUF3_MASK                        (0x8U)
8778 #define LLWU_PF_WUF3_SHIFT                       (3U)
8779 /*! WUF3 - Wakeup flag for LLWU_Pn
8780  *  0b0..LLWU_Pn input was not a wakeup source
8781  *  0b1..LLWU_Pn input was a wakeup source
8782  */
8783 #define LLWU_PF_WUF3(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF3_SHIFT)) & LLWU_PF_WUF3_MASK)
8784 
8785 #define LLWU_PF_WUF4_MASK                        (0x10U)
8786 #define LLWU_PF_WUF4_SHIFT                       (4U)
8787 /*! WUF4 - Wakeup flag for LLWU_Pn
8788  *  0b0..LLWU_Pn input was not a wakeup source
8789  *  0b1..LLWU_Pn input was a wakeup source
8790  */
8791 #define LLWU_PF_WUF4(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF4_SHIFT)) & LLWU_PF_WUF4_MASK)
8792 
8793 #define LLWU_PF_WUF5_MASK                        (0x20U)
8794 #define LLWU_PF_WUF5_SHIFT                       (5U)
8795 /*! WUF5 - Wakeup flag for LLWU_Pn
8796  *  0b0..LLWU_Pn input was not a wakeup source
8797  *  0b1..LLWU_Pn input was a wakeup source
8798  */
8799 #define LLWU_PF_WUF5(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF5_SHIFT)) & LLWU_PF_WUF5_MASK)
8800 
8801 #define LLWU_PF_WUF6_MASK                        (0x40U)
8802 #define LLWU_PF_WUF6_SHIFT                       (6U)
8803 /*! WUF6 - Wakeup flag for LLWU_Pn
8804  *  0b0..LLWU_Pn input was not a wakeup source
8805  *  0b1..LLWU_Pn input was a wakeup source
8806  */
8807 #define LLWU_PF_WUF6(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF6_SHIFT)) & LLWU_PF_WUF6_MASK)
8808 
8809 #define LLWU_PF_WUF7_MASK                        (0x80U)
8810 #define LLWU_PF_WUF7_SHIFT                       (7U)
8811 /*! WUF7 - Wakeup flag for LLWU_Pn
8812  *  0b0..LLWU_Pn input was not a wakeup source
8813  *  0b1..LLWU_Pn input was a wakeup source
8814  */
8815 #define LLWU_PF_WUF7(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF7_SHIFT)) & LLWU_PF_WUF7_MASK)
8816 
8817 #define LLWU_PF_WUF8_MASK                        (0x100U)
8818 #define LLWU_PF_WUF8_SHIFT                       (8U)
8819 /*! WUF8 - Wakeup flag for LLWU_Pn
8820  *  0b0..LLWU_Pn input was not a wakeup source
8821  *  0b1..LLWU_Pn input was a wakeup source
8822  */
8823 #define LLWU_PF_WUF8(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF8_SHIFT)) & LLWU_PF_WUF8_MASK)
8824 
8825 #define LLWU_PF_WUF9_MASK                        (0x200U)
8826 #define LLWU_PF_WUF9_SHIFT                       (9U)
8827 /*! WUF9 - Wakeup flag for LLWU_Pn
8828  *  0b0..LLWU_Pn input was not a wakeup source
8829  *  0b1..LLWU_Pn input was a wakeup source
8830  */
8831 #define LLWU_PF_WUF9(x)                          (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF9_SHIFT)) & LLWU_PF_WUF9_MASK)
8832 
8833 #define LLWU_PF_WUF10_MASK                       (0x400U)
8834 #define LLWU_PF_WUF10_SHIFT                      (10U)
8835 /*! WUF10 - Wakeup flag for LLWU_Pn
8836  *  0b0..LLWU_Pn input was not a wakeup source
8837  *  0b1..LLWU_Pn input was a wakeup source
8838  */
8839 #define LLWU_PF_WUF10(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF10_SHIFT)) & LLWU_PF_WUF10_MASK)
8840 
8841 #define LLWU_PF_WUF11_MASK                       (0x800U)
8842 #define LLWU_PF_WUF11_SHIFT                      (11U)
8843 /*! WUF11 - Wakeup flag for LLWU_Pn
8844  *  0b0..LLWU_Pn input was not a wakeup source
8845  *  0b1..LLWU_Pn input was a wakeup source
8846  */
8847 #define LLWU_PF_WUF11(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF11_SHIFT)) & LLWU_PF_WUF11_MASK)
8848 
8849 #define LLWU_PF_WUF12_MASK                       (0x1000U)
8850 #define LLWU_PF_WUF12_SHIFT                      (12U)
8851 /*! WUF12 - Wakeup flag for LLWU_Pn
8852  *  0b0..LLWU_Pn input was not a wakeup source
8853  *  0b1..LLWU_Pn input was a wakeup source
8854  */
8855 #define LLWU_PF_WUF12(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF12_SHIFT)) & LLWU_PF_WUF12_MASK)
8856 
8857 #define LLWU_PF_WUF13_MASK                       (0x2000U)
8858 #define LLWU_PF_WUF13_SHIFT                      (13U)
8859 /*! WUF13 - Wakeup flag for LLWU_Pn
8860  *  0b0..LLWU_Pn input was not a wakeup source
8861  *  0b1..LLWU_Pn input was a wakeup source
8862  */
8863 #define LLWU_PF_WUF13(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF13_SHIFT)) & LLWU_PF_WUF13_MASK)
8864 
8865 #define LLWU_PF_WUF14_MASK                       (0x4000U)
8866 #define LLWU_PF_WUF14_SHIFT                      (14U)
8867 /*! WUF14 - Wakeup flag for LLWU_Pn
8868  *  0b0..LLWU_Pn input was not a wakeup source
8869  *  0b1..LLWU_Pn input was a wakeup source
8870  */
8871 #define LLWU_PF_WUF14(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF14_SHIFT)) & LLWU_PF_WUF14_MASK)
8872 
8873 #define LLWU_PF_WUF15_MASK                       (0x8000U)
8874 #define LLWU_PF_WUF15_SHIFT                      (15U)
8875 /*! WUF15 - Wakeup flag for LLWU_Pn
8876  *  0b0..LLWU_Pn input was not a wakeup source
8877  *  0b1..LLWU_Pn input was a wakeup source
8878  */
8879 #define LLWU_PF_WUF15(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF15_SHIFT)) & LLWU_PF_WUF15_MASK)
8880 
8881 #define LLWU_PF_WUF16_MASK                       (0x10000U)
8882 #define LLWU_PF_WUF16_SHIFT                      (16U)
8883 /*! WUF16 - Wakeup flag for LLWU_Pn
8884  *  0b0..LLWU_Pn input was not a wakeup source
8885  *  0b1..LLWU_Pn input was a wakeup source
8886  */
8887 #define LLWU_PF_WUF16(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF16_SHIFT)) & LLWU_PF_WUF16_MASK)
8888 
8889 #define LLWU_PF_WUF17_MASK                       (0x20000U)
8890 #define LLWU_PF_WUF17_SHIFT                      (17U)
8891 /*! WUF17 - Wakeup flag for LLWU_Pn
8892  *  0b0..LLWU_Pn input was not a wakeup source
8893  *  0b1..LLWU_Pn input was a wakeup source
8894  */
8895 #define LLWU_PF_WUF17(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF17_SHIFT)) & LLWU_PF_WUF17_MASK)
8896 
8897 #define LLWU_PF_WUF18_MASK                       (0x40000U)
8898 #define LLWU_PF_WUF18_SHIFT                      (18U)
8899 /*! WUF18 - Wakeup flag for LLWU_Pn
8900  *  0b0..LLWU_Pn input was not a wakeup source
8901  *  0b1..LLWU_Pn input was a wakeup source
8902  */
8903 #define LLWU_PF_WUF18(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF18_SHIFT)) & LLWU_PF_WUF18_MASK)
8904 
8905 #define LLWU_PF_WUF19_MASK                       (0x80000U)
8906 #define LLWU_PF_WUF19_SHIFT                      (19U)
8907 /*! WUF19 - Wakeup flag for LLWU_Pn
8908  *  0b0..LLWU_Pn input was not a wakeup source
8909  *  0b1..LLWU_Pn input was a wakeup source
8910  */
8911 #define LLWU_PF_WUF19(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF19_SHIFT)) & LLWU_PF_WUF19_MASK)
8912 
8913 #define LLWU_PF_WUF20_MASK                       (0x100000U)
8914 #define LLWU_PF_WUF20_SHIFT                      (20U)
8915 /*! WUF20 - Wakeup flag for LLWU_Pn
8916  *  0b0..LLWU_Pn input was not a wakeup source
8917  *  0b1..LLWU_Pn input was a wakeup source
8918  */
8919 #define LLWU_PF_WUF20(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF20_SHIFT)) & LLWU_PF_WUF20_MASK)
8920 
8921 #define LLWU_PF_WUF21_MASK                       (0x200000U)
8922 #define LLWU_PF_WUF21_SHIFT                      (21U)
8923 /*! WUF21 - Wakeup flag for LLWU_Pn
8924  *  0b0..LLWU_Pn input was not a wakeup source
8925  *  0b1..LLWU_Pn input was a wakeup source
8926  */
8927 #define LLWU_PF_WUF21(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF21_SHIFT)) & LLWU_PF_WUF21_MASK)
8928 
8929 #define LLWU_PF_WUF22_MASK                       (0x400000U)
8930 #define LLWU_PF_WUF22_SHIFT                      (22U)
8931 /*! WUF22 - Wakeup flag for LLWU_Pn
8932  *  0b0..LLWU_Pn input was not a wakeup source
8933  *  0b1..LLWU_Pn input was a wakeup source
8934  */
8935 #define LLWU_PF_WUF22(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF22_SHIFT)) & LLWU_PF_WUF22_MASK)
8936 
8937 #define LLWU_PF_WUF23_MASK                       (0x800000U)
8938 #define LLWU_PF_WUF23_SHIFT                      (23U)
8939 /*! WUF23 - Wakeup flag for LLWU_Pn
8940  *  0b0..LLWU_Pn input was not a wakeup source
8941  *  0b1..LLWU_Pn input was a wakeup source
8942  */
8943 #define LLWU_PF_WUF23(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF23_SHIFT)) & LLWU_PF_WUF23_MASK)
8944 
8945 #define LLWU_PF_WUF24_MASK                       (0x1000000U)
8946 #define LLWU_PF_WUF24_SHIFT                      (24U)
8947 /*! WUF24 - Wakeup flag for LLWU_Pn
8948  *  0b0..LLWU_Pn input was not a wakeup source
8949  *  0b1..LLWU_Pn input was a wakeup source
8950  */
8951 #define LLWU_PF_WUF24(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF24_SHIFT)) & LLWU_PF_WUF24_MASK)
8952 
8953 #define LLWU_PF_WUF25_MASK                       (0x2000000U)
8954 #define LLWU_PF_WUF25_SHIFT                      (25U)
8955 /*! WUF25 - Wakeup flag for LLWU_Pn
8956  *  0b0..LLWU_Pn input was not a wakeup source
8957  *  0b1..LLWU_Pn input was a wakeup source
8958  */
8959 #define LLWU_PF_WUF25(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF25_SHIFT)) & LLWU_PF_WUF25_MASK)
8960 
8961 #define LLWU_PF_WUF26_MASK                       (0x4000000U)
8962 #define LLWU_PF_WUF26_SHIFT                      (26U)
8963 /*! WUF26 - Wakeup flag for LLWU_Pn
8964  *  0b0..LLWU_Pn input was not a wakeup source
8965  *  0b1..LLWU_Pn input was a wakeup source
8966  */
8967 #define LLWU_PF_WUF26(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF26_SHIFT)) & LLWU_PF_WUF26_MASK)
8968 
8969 #define LLWU_PF_Reserved27_MASK                  (0x8000000U)
8970 #define LLWU_PF_Reserved27_SHIFT                 (27U)
8971 /*! Reserved27 - Wakeup flag for LLWU_Pn
8972  *  0b0..LLWU_Pn input was not a wakeup source
8973  *  0b1..LLWU_Pn input was a wakeup source
8974  */
8975 #define LLWU_PF_Reserved27(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_PF_Reserved27_SHIFT)) & LLWU_PF_Reserved27_MASK)
8976 
8977 #define LLWU_PF_Reserved28_MASK                  (0x10000000U)
8978 #define LLWU_PF_Reserved28_SHIFT                 (28U)
8979 /*! Reserved28 - Wakeup flag for LLWU_Pn
8980  *  0b0..LLWU_Pn input was not a wakeup source
8981  *  0b1..LLWU_Pn input was a wakeup source
8982  */
8983 #define LLWU_PF_Reserved28(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_PF_Reserved28_SHIFT)) & LLWU_PF_Reserved28_MASK)
8984 
8985 #define LLWU_PF_WUF29_MASK                       (0x20000000U)
8986 #define LLWU_PF_WUF29_SHIFT                      (29U)
8987 /*! WUF29 - Wakeup flag for LLWU_Pn
8988  *  0b0..LLWU_Pn input was not a wakeup source
8989  *  0b1..LLWU_Pn input was a wakeup source
8990  */
8991 #define LLWU_PF_WUF29(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF29_SHIFT)) & LLWU_PF_WUF29_MASK)
8992 
8993 #define LLWU_PF_WUF30_MASK                       (0x40000000U)
8994 #define LLWU_PF_WUF30_SHIFT                      (30U)
8995 /*! WUF30 - Wakeup flag for LLWU_Pn
8996  *  0b0..LLWU_Pn input was not a wakeup source
8997  *  0b1..LLWU_Pn input was a wakeup source
8998  */
8999 #define LLWU_PF_WUF30(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF30_SHIFT)) & LLWU_PF_WUF30_MASK)
9000 
9001 #define LLWU_PF_WUF31_MASK                       (0x80000000U)
9002 #define LLWU_PF_WUF31_SHIFT                      (31U)
9003 /*! WUF31 - Wakeup flag for LLWU_Pn
9004  *  0b0..LLWU_Pn input was not a wakeup source
9005  *  0b1..LLWU_Pn input was a wakeup source
9006  */
9007 #define LLWU_PF_WUF31(x)                         (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF31_SHIFT)) & LLWU_PF_WUF31_MASK)
9008 /*! @} */
9009 
9010 /*! @name FILT - Pin Filter register */
9011 /*! @{ */
9012 
9013 #define LLWU_FILT_FILTSEL1_MASK                  (0x1FU)
9014 #define LLWU_FILT_FILTSEL1_SHIFT                 (0U)
9015 /*! FILTSEL1 - Filter 1 Pin Select
9016  *  0b00000..Select LLWU_P0 for filter
9017  *  0b11111..Select LLWU_P31 for filter
9018  */
9019 #define LLWU_FILT_FILTSEL1(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTSEL1_SHIFT)) & LLWU_FILT_FILTSEL1_MASK)
9020 
9021 #define LLWU_FILT_FILTE1_MASK                    (0x60U)
9022 #define LLWU_FILT_FILTE1_SHIFT                   (5U)
9023 /*! FILTE1 - Filter 1 Enable
9024  *  0b00..Filter disabled
9025  *  0b01..Filter posedge detect enabled when configured as interrupt/DMA request or high level detection when configured as trigger request
9026  *  0b10..Filter negedge detect enabled when configured as interrupt/DMA request or low level detection when configured as trigger request
9027  *  0b11..Filter any edge detect enabled when configured as interrupt/DMA request
9028  */
9029 #define LLWU_FILT_FILTE1(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTE1_SHIFT)) & LLWU_FILT_FILTE1_MASK)
9030 
9031 #define LLWU_FILT_FILTF1_MASK                    (0x80U)
9032 #define LLWU_FILT_FILTF1_SHIFT                   (7U)
9033 /*! FILTF1 - Filter 1 Flag
9034  *  0b0..Pin Filter 1 was not a wakeup source
9035  *  0b1..Pin Filter 1 was a wakeup source
9036  */
9037 #define LLWU_FILT_FILTF1(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTF1_SHIFT)) & LLWU_FILT_FILTF1_MASK)
9038 
9039 #define LLWU_FILT_FILTSEL2_MASK                  (0x1F00U)
9040 #define LLWU_FILT_FILTSEL2_SHIFT                 (8U)
9041 /*! FILTSEL2 - Filter 2 Pin Select
9042  *  0b00000..Select LLWU_P0 for filter
9043  *  0b11111..Select LLWU_P31 for filter
9044  */
9045 #define LLWU_FILT_FILTSEL2(x)                    (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTSEL2_SHIFT)) & LLWU_FILT_FILTSEL2_MASK)
9046 
9047 #define LLWU_FILT_FILTE2_MASK                    (0x6000U)
9048 #define LLWU_FILT_FILTE2_SHIFT                   (13U)
9049 /*! FILTE2 - Filter 2 Enable
9050  *  0b00..Filter disabled
9051  *  0b01..Filter posedge detect enabled when configured as interrupt/DMA request or high level detection when configured as trigger request
9052  *  0b10..Filter negedge detect enabled when configured as interrupt/DMA request or low level detection when configured as trigger request
9053  *  0b11..Filter any edge detect enabled when configured as interrupt/DMA request
9054  */
9055 #define LLWU_FILT_FILTE2(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTE2_SHIFT)) & LLWU_FILT_FILTE2_MASK)
9056 
9057 #define LLWU_FILT_FILTF2_MASK                    (0x8000U)
9058 #define LLWU_FILT_FILTF2_SHIFT                   (15U)
9059 /*! FILTF2 - Filter 2 Flag
9060  *  0b0..Pin Filter 2 was not a wakeup source
9061  *  0b1..Pin Filter 2 was a wakeup source
9062  */
9063 #define LLWU_FILT_FILTF2(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTF2_SHIFT)) & LLWU_FILT_FILTF2_MASK)
9064 /*! @} */
9065 
9066 /*! @name PDC1 - Pin DMA/Trigger Configuration 1 register */
9067 /*! @{ */
9068 
9069 #define LLWU_PDC1_WUPDC0_MASK                    (0x3U)
9070 #define LLWU_PDC1_WUPDC0_SHIFT                   (0U)
9071 /*! WUPDC0 - Wakeup pin configuration for LLWU_Pn
9072  *  0b00..External input pin configured as interrupt
9073  *  0b01..External input pin configured as DMA request
9074  *  0b10..External input pin configured as trigger event
9075  *  0b11..Reserved
9076  */
9077 #define LLWU_PDC1_WUPDC0(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC0_SHIFT)) & LLWU_PDC1_WUPDC0_MASK)
9078 
9079 #define LLWU_PDC1_WUPDC1_MASK                    (0xCU)
9080 #define LLWU_PDC1_WUPDC1_SHIFT                   (2U)
9081 /*! WUPDC1 - Wakeup pin configuration for LLWU_Pn
9082  *  0b00..External input pin configured as interrupt
9083  *  0b01..External input pin configured as DMA request
9084  *  0b10..External input pin configured as trigger event
9085  *  0b11..Reserved
9086  */
9087 #define LLWU_PDC1_WUPDC1(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC1_SHIFT)) & LLWU_PDC1_WUPDC1_MASK)
9088 
9089 #define LLWU_PDC1_WUPDC2_MASK                    (0x30U)
9090 #define LLWU_PDC1_WUPDC2_SHIFT                   (4U)
9091 /*! WUPDC2 - Wakeup pin configuration for LLWU_Pn
9092  *  0b00..External input pin configured as interrupt
9093  *  0b01..External input pin configured as DMA request
9094  *  0b10..External input pin configured as trigger event
9095  *  0b11..Reserved
9096  */
9097 #define LLWU_PDC1_WUPDC2(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC2_SHIFT)) & LLWU_PDC1_WUPDC2_MASK)
9098 
9099 #define LLWU_PDC1_WUPDC3_MASK                    (0xC0U)
9100 #define LLWU_PDC1_WUPDC3_SHIFT                   (6U)
9101 /*! WUPDC3 - Wakeup pin configuration for LLWU_Pn
9102  *  0b00..External input pin configured as interrupt
9103  *  0b01..External input pin configured as DMA request
9104  *  0b10..External input pin configured as trigger event
9105  *  0b11..Reserved
9106  */
9107 #define LLWU_PDC1_WUPDC3(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC3_SHIFT)) & LLWU_PDC1_WUPDC3_MASK)
9108 
9109 #define LLWU_PDC1_WUPDC4_MASK                    (0x300U)
9110 #define LLWU_PDC1_WUPDC4_SHIFT                   (8U)
9111 /*! WUPDC4 - Wakeup pin configuration for LLWU_Pn
9112  *  0b00..External input pin configured as interrupt
9113  *  0b01..External input pin configured as DMA request
9114  *  0b10..External input pin configured as trigger event
9115  *  0b11..Reserved
9116  */
9117 #define LLWU_PDC1_WUPDC4(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC4_SHIFT)) & LLWU_PDC1_WUPDC4_MASK)
9118 
9119 #define LLWU_PDC1_WUPDC5_MASK                    (0xC00U)
9120 #define LLWU_PDC1_WUPDC5_SHIFT                   (10U)
9121 /*! WUPDC5 - Wakeup pin configuration for LLWU_Pn
9122  *  0b00..External input pin configured as interrupt
9123  *  0b01..External input pin configured as DMA request
9124  *  0b10..External input pin configured as trigger event
9125  *  0b11..Reserved
9126  */
9127 #define LLWU_PDC1_WUPDC5(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC5_SHIFT)) & LLWU_PDC1_WUPDC5_MASK)
9128 
9129 #define LLWU_PDC1_WUPDC6_MASK                    (0x3000U)
9130 #define LLWU_PDC1_WUPDC6_SHIFT                   (12U)
9131 /*! WUPDC6 - Wakeup pin configuration for LLWU_Pn
9132  *  0b00..External input pin configured as interrupt
9133  *  0b01..External input pin configured as DMA request
9134  *  0b10..External input pin configured as trigger event
9135  *  0b11..Reserved
9136  */
9137 #define LLWU_PDC1_WUPDC6(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC6_SHIFT)) & LLWU_PDC1_WUPDC6_MASK)
9138 
9139 #define LLWU_PDC1_WUPDC7_MASK                    (0xC000U)
9140 #define LLWU_PDC1_WUPDC7_SHIFT                   (14U)
9141 /*! WUPDC7 - Wakeup pin configuration for LLWU_Pn
9142  *  0b00..External input pin configured as interrupt
9143  *  0b01..External input pin configured as DMA request
9144  *  0b10..External input pin configured as trigger event
9145  *  0b11..Reserved
9146  */
9147 #define LLWU_PDC1_WUPDC7(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC7_SHIFT)) & LLWU_PDC1_WUPDC7_MASK)
9148 
9149 #define LLWU_PDC1_WUPDC8_MASK                    (0x30000U)
9150 #define LLWU_PDC1_WUPDC8_SHIFT                   (16U)
9151 /*! WUPDC8 - Wakeup pin configuration for LLWU_Pn
9152  *  0b00..External input pin configured as interrupt
9153  *  0b01..External input pin configured as DMA request
9154  *  0b10..External input pin configured as trigger event
9155  *  0b11..Reserved
9156  */
9157 #define LLWU_PDC1_WUPDC8(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC8_SHIFT)) & LLWU_PDC1_WUPDC8_MASK)
9158 
9159 #define LLWU_PDC1_WUPDC9_MASK                    (0xC0000U)
9160 #define LLWU_PDC1_WUPDC9_SHIFT                   (18U)
9161 /*! WUPDC9 - Wakeup pin configuration for LLWU_Pn
9162  *  0b00..External input pin configured as interrupt
9163  *  0b01..External input pin configured as DMA request
9164  *  0b10..External input pin configured as trigger event
9165  *  0b11..Reserved
9166  */
9167 #define LLWU_PDC1_WUPDC9(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC9_SHIFT)) & LLWU_PDC1_WUPDC9_MASK)
9168 
9169 #define LLWU_PDC1_WUPDC10_MASK                   (0x300000U)
9170 #define LLWU_PDC1_WUPDC10_SHIFT                  (20U)
9171 /*! WUPDC10 - Wakeup pin configuration for LLWU_Pn
9172  *  0b00..External input pin configured as interrupt
9173  *  0b01..External input pin configured as DMA request
9174  *  0b10..External input pin configured as trigger event
9175  *  0b11..Reserved
9176  */
9177 #define LLWU_PDC1_WUPDC10(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC10_SHIFT)) & LLWU_PDC1_WUPDC10_MASK)
9178 
9179 #define LLWU_PDC1_WUPDC11_MASK                   (0xC00000U)
9180 #define LLWU_PDC1_WUPDC11_SHIFT                  (22U)
9181 /*! WUPDC11 - Wakeup pin configuration for LLWU_Pn
9182  *  0b00..External input pin configured as interrupt
9183  *  0b01..External input pin configured as DMA request
9184  *  0b10..External input pin configured as trigger event
9185  *  0b11..Reserved
9186  */
9187 #define LLWU_PDC1_WUPDC11(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC11_SHIFT)) & LLWU_PDC1_WUPDC11_MASK)
9188 
9189 #define LLWU_PDC1_WUPDC12_MASK                   (0x3000000U)
9190 #define LLWU_PDC1_WUPDC12_SHIFT                  (24U)
9191 /*! WUPDC12 - Wakeup pin configuration for LLWU_Pn
9192  *  0b00..External input pin configured as interrupt
9193  *  0b01..External input pin configured as DMA request
9194  *  0b10..External input pin configured as trigger event
9195  *  0b11..Reserved
9196  */
9197 #define LLWU_PDC1_WUPDC12(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC12_SHIFT)) & LLWU_PDC1_WUPDC12_MASK)
9198 
9199 #define LLWU_PDC1_WUPDC13_MASK                   (0xC000000U)
9200 #define LLWU_PDC1_WUPDC13_SHIFT                  (26U)
9201 /*! WUPDC13 - Wakeup pin configuration for LLWU_Pn
9202  *  0b00..External input pin configured as interrupt
9203  *  0b01..External input pin configured as DMA request
9204  *  0b10..External input pin configured as trigger event
9205  *  0b11..Reserved
9206  */
9207 #define LLWU_PDC1_WUPDC13(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC13_SHIFT)) & LLWU_PDC1_WUPDC13_MASK)
9208 
9209 #define LLWU_PDC1_WUPDC14_MASK                   (0x30000000U)
9210 #define LLWU_PDC1_WUPDC14_SHIFT                  (28U)
9211 /*! WUPDC14 - Wakeup pin configuration for LLWU_Pn
9212  *  0b00..External input pin configured as interrupt
9213  *  0b01..External input pin configured as DMA request
9214  *  0b10..External input pin configured as trigger event
9215  *  0b11..Reserved
9216  */
9217 #define LLWU_PDC1_WUPDC14(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC14_SHIFT)) & LLWU_PDC1_WUPDC14_MASK)
9218 
9219 #define LLWU_PDC1_WUPDC15_MASK                   (0xC0000000U)
9220 #define LLWU_PDC1_WUPDC15_SHIFT                  (30U)
9221 /*! WUPDC15 - Wakeup pin configuration for LLWU_Pn
9222  *  0b00..External input pin configured as interrupt
9223  *  0b01..External input pin configured as DMA request
9224  *  0b10..External input pin configured as trigger event
9225  *  0b11..Reserved
9226  */
9227 #define LLWU_PDC1_WUPDC15(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC15_SHIFT)) & LLWU_PDC1_WUPDC15_MASK)
9228 /*! @} */
9229 
9230 /*! @name PDC2 - Pin DMA/Trigger Configuration 2 register */
9231 /*! @{ */
9232 
9233 #define LLWU_PDC2_WUPDC16_MASK                   (0x3U)
9234 #define LLWU_PDC2_WUPDC16_SHIFT                  (0U)
9235 /*! WUPDC16 - Wakeup pin configuration for LLWU_Pn
9236  *  0b00..External input pin configured as interrupt
9237  *  0b01..External input pin configured as DMA request
9238  *  0b10..External input pin configured as trigger event
9239  *  0b11..Reserved
9240  */
9241 #define LLWU_PDC2_WUPDC16(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC16_SHIFT)) & LLWU_PDC2_WUPDC16_MASK)
9242 
9243 #define LLWU_PDC2_WUPDC17_MASK                   (0xCU)
9244 #define LLWU_PDC2_WUPDC17_SHIFT                  (2U)
9245 /*! WUPDC17 - Wakeup pin configuration for LLWU_Pn
9246  *  0b00..External input pin configured as interrupt
9247  *  0b01..External input pin configured as DMA request
9248  *  0b10..External input pin configured as trigger event
9249  *  0b11..Reserved
9250  */
9251 #define LLWU_PDC2_WUPDC17(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC17_SHIFT)) & LLWU_PDC2_WUPDC17_MASK)
9252 
9253 #define LLWU_PDC2_WUPDC18_MASK                   (0x30U)
9254 #define LLWU_PDC2_WUPDC18_SHIFT                  (4U)
9255 /*! WUPDC18 - Wakeup pin configuration for LLWU_Pn
9256  *  0b00..External input pin configured as interrupt
9257  *  0b01..External input pin configured as DMA request
9258  *  0b10..External input pin configured as trigger event
9259  *  0b11..Reserved
9260  */
9261 #define LLWU_PDC2_WUPDC18(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC18_SHIFT)) & LLWU_PDC2_WUPDC18_MASK)
9262 
9263 #define LLWU_PDC2_WUPDC19_MASK                   (0xC0U)
9264 #define LLWU_PDC2_WUPDC19_SHIFT                  (6U)
9265 /*! WUPDC19 - Wakeup pin configuration for LLWU_Pn
9266  *  0b00..External input pin configured as interrupt
9267  *  0b01..External input pin configured as DMA request
9268  *  0b10..External input pin configured as trigger event
9269  *  0b11..Reserved
9270  */
9271 #define LLWU_PDC2_WUPDC19(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC19_SHIFT)) & LLWU_PDC2_WUPDC19_MASK)
9272 
9273 #define LLWU_PDC2_WUPDC20_MASK                   (0x300U)
9274 #define LLWU_PDC2_WUPDC20_SHIFT                  (8U)
9275 /*! WUPDC20 - Wakeup pin configuration for LLWU_Pn
9276  *  0b00..External input pin configured as interrupt
9277  *  0b01..External input pin configured as DMA request
9278  *  0b10..External input pin configured as trigger event
9279  *  0b11..Reserved
9280  */
9281 #define LLWU_PDC2_WUPDC20(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC20_SHIFT)) & LLWU_PDC2_WUPDC20_MASK)
9282 
9283 #define LLWU_PDC2_WUPDC21_MASK                   (0xC00U)
9284 #define LLWU_PDC2_WUPDC21_SHIFT                  (10U)
9285 /*! WUPDC21 - Wakeup pin configuration for LLWU_Pn
9286  *  0b00..External input pin configured as interrupt
9287  *  0b01..External input pin configured as DMA request
9288  *  0b10..External input pin configured as trigger event
9289  *  0b11..Reserved
9290  */
9291 #define LLWU_PDC2_WUPDC21(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC21_SHIFT)) & LLWU_PDC2_WUPDC21_MASK)
9292 
9293 #define LLWU_PDC2_WUPDC22_MASK                   (0x3000U)
9294 #define LLWU_PDC2_WUPDC22_SHIFT                  (12U)
9295 /*! WUPDC22 - Wakeup pin configuration for LLWU_Pn
9296  *  0b00..External input pin configured as interrupt
9297  *  0b01..External input pin configured as DMA request
9298  *  0b10..External input pin configured as trigger event
9299  *  0b11..Reserved
9300  */
9301 #define LLWU_PDC2_WUPDC22(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC22_SHIFT)) & LLWU_PDC2_WUPDC22_MASK)
9302 
9303 #define LLWU_PDC2_WUPDC23_MASK                   (0xC000U)
9304 #define LLWU_PDC2_WUPDC23_SHIFT                  (14U)
9305 /*! WUPDC23 - Wakeup pin configuration for LLWU_Pn
9306  *  0b00..External input pin configured as interrupt
9307  *  0b01..External input pin configured as DMA request
9308  *  0b10..External input pin configured as trigger event
9309  *  0b11..Reserved
9310  */
9311 #define LLWU_PDC2_WUPDC23(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC23_SHIFT)) & LLWU_PDC2_WUPDC23_MASK)
9312 
9313 #define LLWU_PDC2_WUPDC24_MASK                   (0x30000U)
9314 #define LLWU_PDC2_WUPDC24_SHIFT                  (16U)
9315 /*! WUPDC24 - Wakeup pin configuration for LLWU_Pn
9316  *  0b00..External input pin configured as interrupt
9317  *  0b01..External input pin configured as DMA request
9318  *  0b10..External input pin configured as trigger event
9319  *  0b11..Reserved
9320  */
9321 #define LLWU_PDC2_WUPDC24(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC24_SHIFT)) & LLWU_PDC2_WUPDC24_MASK)
9322 
9323 #define LLWU_PDC2_WUPDC25_MASK                   (0xC0000U)
9324 #define LLWU_PDC2_WUPDC25_SHIFT                  (18U)
9325 /*! WUPDC25 - Wakeup pin configuration for LLWU_Pn
9326  *  0b00..External input pin configured as interrupt
9327  *  0b01..External input pin configured as DMA request
9328  *  0b10..External input pin configured as trigger event
9329  *  0b11..Reserved
9330  */
9331 #define LLWU_PDC2_WUPDC25(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC25_SHIFT)) & LLWU_PDC2_WUPDC25_MASK)
9332 
9333 #define LLWU_PDC2_WUPDC26_MASK                   (0x300000U)
9334 #define LLWU_PDC2_WUPDC26_SHIFT                  (20U)
9335 /*! WUPDC26 - Wakeup pin configuration for LLWU_Pn
9336  *  0b00..External input pin configured as interrupt
9337  *  0b01..External input pin configured as DMA request
9338  *  0b10..External input pin configured as trigger event
9339  *  0b11..Reserved
9340  */
9341 #define LLWU_PDC2_WUPDC26(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC26_SHIFT)) & LLWU_PDC2_WUPDC26_MASK)
9342 
9343 #define LLWU_PDC2_Reserved27_MASK                (0xC00000U)
9344 #define LLWU_PDC2_Reserved27_SHIFT               (22U)
9345 /*! Reserved27 - Wakeup pin configuration for LLWU_Pn
9346  *  0b00..External input pin configured as interrupt
9347  *  0b01..External input pin configured as DMA request
9348  *  0b10..External input pin configured as trigger event
9349  *  0b11..Reserved
9350  */
9351 #define LLWU_PDC2_Reserved27(x)                  (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_Reserved27_SHIFT)) & LLWU_PDC2_Reserved27_MASK)
9352 
9353 #define LLWU_PDC2_Reserved28_MASK                (0x3000000U)
9354 #define LLWU_PDC2_Reserved28_SHIFT               (24U)
9355 /*! Reserved28 - Wakeup pin configuration for LLWU_Pn
9356  *  0b00..External input pin configured as interrupt
9357  *  0b01..External input pin configured as DMA request
9358  *  0b10..External input pin configured as trigger event
9359  *  0b11..Reserved
9360  */
9361 #define LLWU_PDC2_Reserved28(x)                  (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_Reserved28_SHIFT)) & LLWU_PDC2_Reserved28_MASK)
9362 
9363 #define LLWU_PDC2_WUPDC29_MASK                   (0xC000000U)
9364 #define LLWU_PDC2_WUPDC29_SHIFT                  (26U)
9365 /*! WUPDC29 - Wakeup pin configuration for LLWU_Pn
9366  *  0b00..External input pin configured as interrupt
9367  *  0b01..External input pin configured as DMA request
9368  *  0b10..External input pin configured as trigger event
9369  *  0b11..Reserved
9370  */
9371 #define LLWU_PDC2_WUPDC29(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC29_SHIFT)) & LLWU_PDC2_WUPDC29_MASK)
9372 
9373 #define LLWU_PDC2_WUPDC30_MASK                   (0x30000000U)
9374 #define LLWU_PDC2_WUPDC30_SHIFT                  (28U)
9375 /*! WUPDC30 - Wakeup pin configuration for LLWU_Pn
9376  *  0b00..External input pin configured as interrupt
9377  *  0b01..External input pin configured as DMA request
9378  *  0b10..External input pin configured as trigger event
9379  *  0b11..Reserved
9380  */
9381 #define LLWU_PDC2_WUPDC30(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC30_SHIFT)) & LLWU_PDC2_WUPDC30_MASK)
9382 
9383 #define LLWU_PDC2_WUPDC31_MASK                   (0xC0000000U)
9384 #define LLWU_PDC2_WUPDC31_SHIFT                  (30U)
9385 /*! WUPDC31 - Wakeup pin configuration for LLWU_Pn
9386  *  0b00..External input pin configured as interrupt
9387  *  0b01..External input pin configured as DMA request
9388  *  0b10..External input pin configured as trigger event
9389  *  0b11..Reserved
9390  */
9391 #define LLWU_PDC2_WUPDC31(x)                     (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC31_SHIFT)) & LLWU_PDC2_WUPDC31_MASK)
9392 /*! @} */
9393 
9394 /*! @name FDC - Pin Filter DMA/Trigger Configuration register */
9395 /*! @{ */
9396 
9397 #define LLWU_FDC_FILTC1_MASK                     (0x3U)
9398 #define LLWU_FDC_FILTC1_SHIFT                    (0U)
9399 /*! FILTC1 - Filter configuration for FILT1
9400  *  0b00..Filter output configured as interrupt
9401  *  0b01..Filter output configured as DMA request
9402  *  0b10..Filter output configured as trigger event
9403  *  0b11..Reserved
9404  */
9405 #define LLWU_FDC_FILTC1(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_FDC_FILTC1_SHIFT)) & LLWU_FDC_FILTC1_MASK)
9406 
9407 #define LLWU_FDC_FILTC2_MASK                     (0xCU)
9408 #define LLWU_FDC_FILTC2_SHIFT                    (2U)
9409 /*! FILTC2 - Filter configuration for FILT2
9410  *  0b00..Filter output configured as interrupt
9411  *  0b01..Filter output configured as DMA request
9412  *  0b10..Filter output configured as trigger event
9413  *  0b11..Reserved
9414  */
9415 #define LLWU_FDC_FILTC2(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_FDC_FILTC2_SHIFT)) & LLWU_FDC_FILTC2_MASK)
9416 /*! @} */
9417 
9418 /*! @name PMC - Pin Mode Configuration register */
9419 /*! @{ */
9420 
9421 #define LLWU_PMC_WUPMC0_MASK                     (0x1U)
9422 #define LLWU_PMC_WUPMC0_SHIFT                    (0U)
9423 /*! WUPMC0 - Wakeup pin mode for LLWU_Pn
9424  *  0b0..External input pin detection active only during LLS/VLLS mode
9425  *  0b1..External input pin detection active during all power modes
9426  */
9427 #define LLWU_PMC_WUPMC0(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC0_SHIFT)) & LLWU_PMC_WUPMC0_MASK)
9428 
9429 #define LLWU_PMC_WUPMC1_MASK                     (0x2U)
9430 #define LLWU_PMC_WUPMC1_SHIFT                    (1U)
9431 /*! WUPMC1 - Wakeup pin mode for LLWU_Pn
9432  *  0b0..External input pin detection active only during LLS/VLLS mode
9433  *  0b1..External input pin detection active during all power modes
9434  */
9435 #define LLWU_PMC_WUPMC1(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC1_SHIFT)) & LLWU_PMC_WUPMC1_MASK)
9436 
9437 #define LLWU_PMC_WUPMC2_MASK                     (0x4U)
9438 #define LLWU_PMC_WUPMC2_SHIFT                    (2U)
9439 /*! WUPMC2 - Wakeup pin mode for LLWU_Pn
9440  *  0b0..External input pin detection active only during LLS/VLLS mode
9441  *  0b1..External input pin detection active during all power modes
9442  */
9443 #define LLWU_PMC_WUPMC2(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC2_SHIFT)) & LLWU_PMC_WUPMC2_MASK)
9444 
9445 #define LLWU_PMC_WUPMC3_MASK                     (0x8U)
9446 #define LLWU_PMC_WUPMC3_SHIFT                    (3U)
9447 /*! WUPMC3 - Wakeup pin mode for LLWU_Pn
9448  *  0b0..External input pin detection active only during LLS/VLLS mode
9449  *  0b1..External input pin detection active during all power modes
9450  */
9451 #define LLWU_PMC_WUPMC3(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC3_SHIFT)) & LLWU_PMC_WUPMC3_MASK)
9452 
9453 #define LLWU_PMC_WUPMC4_MASK                     (0x10U)
9454 #define LLWU_PMC_WUPMC4_SHIFT                    (4U)
9455 /*! WUPMC4 - Wakeup pin mode for LLWU_Pn
9456  *  0b0..External input pin detection active only during LLS/VLLS mode
9457  *  0b1..External input pin detection active during all power modes
9458  */
9459 #define LLWU_PMC_WUPMC4(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC4_SHIFT)) & LLWU_PMC_WUPMC4_MASK)
9460 
9461 #define LLWU_PMC_WUPMC5_MASK                     (0x20U)
9462 #define LLWU_PMC_WUPMC5_SHIFT                    (5U)
9463 /*! WUPMC5 - Wakeup pin mode for LLWU_Pn
9464  *  0b0..External input pin detection active only during LLS/VLLS mode
9465  *  0b1..External input pin detection active during all power modes
9466  */
9467 #define LLWU_PMC_WUPMC5(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC5_SHIFT)) & LLWU_PMC_WUPMC5_MASK)
9468 
9469 #define LLWU_PMC_WUPMC6_MASK                     (0x40U)
9470 #define LLWU_PMC_WUPMC6_SHIFT                    (6U)
9471 /*! WUPMC6 - Wakeup pin mode for LLWU_Pn
9472  *  0b0..External input pin detection active only during LLS/VLLS mode
9473  *  0b1..External input pin detection active during all power modes
9474  */
9475 #define LLWU_PMC_WUPMC6(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC6_SHIFT)) & LLWU_PMC_WUPMC6_MASK)
9476 
9477 #define LLWU_PMC_WUPMC7_MASK                     (0x80U)
9478 #define LLWU_PMC_WUPMC7_SHIFT                    (7U)
9479 /*! WUPMC7 - Wakeup pin mode for LLWU_Pn
9480  *  0b0..External input pin detection active only during LLS/VLLS mode
9481  *  0b1..External input pin detection active during all power modes
9482  */
9483 #define LLWU_PMC_WUPMC7(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC7_SHIFT)) & LLWU_PMC_WUPMC7_MASK)
9484 
9485 #define LLWU_PMC_WUPMC8_MASK                     (0x100U)
9486 #define LLWU_PMC_WUPMC8_SHIFT                    (8U)
9487 /*! WUPMC8 - Wakeup pin mode for LLWU_Pn
9488  *  0b0..External input pin detection active only during LLS/VLLS mode
9489  *  0b1..External input pin detection active during all power modes
9490  */
9491 #define LLWU_PMC_WUPMC8(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC8_SHIFT)) & LLWU_PMC_WUPMC8_MASK)
9492 
9493 #define LLWU_PMC_WUPMC9_MASK                     (0x200U)
9494 #define LLWU_PMC_WUPMC9_SHIFT                    (9U)
9495 /*! WUPMC9 - Wakeup pin mode for LLWU_Pn
9496  *  0b0..External input pin detection active only during LLS/VLLS mode
9497  *  0b1..External input pin detection active during all power modes
9498  */
9499 #define LLWU_PMC_WUPMC9(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC9_SHIFT)) & LLWU_PMC_WUPMC9_MASK)
9500 
9501 #define LLWU_PMC_WUPMC10_MASK                    (0x400U)
9502 #define LLWU_PMC_WUPMC10_SHIFT                   (10U)
9503 /*! WUPMC10 - Wakeup pin mode for LLWU_Pn
9504  *  0b0..External input pin detection active only during LLS/VLLS mode
9505  *  0b1..External input pin detection active during all power modes
9506  */
9507 #define LLWU_PMC_WUPMC10(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC10_SHIFT)) & LLWU_PMC_WUPMC10_MASK)
9508 
9509 #define LLWU_PMC_WUPMC11_MASK                    (0x800U)
9510 #define LLWU_PMC_WUPMC11_SHIFT                   (11U)
9511 /*! WUPMC11 - Wakeup pin mode for LLWU_Pn
9512  *  0b0..External input pin detection active only during LLS/VLLS mode
9513  *  0b1..External input pin detection active during all power modes
9514  */
9515 #define LLWU_PMC_WUPMC11(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC11_SHIFT)) & LLWU_PMC_WUPMC11_MASK)
9516 
9517 #define LLWU_PMC_WUPMC12_MASK                    (0x1000U)
9518 #define LLWU_PMC_WUPMC12_SHIFT                   (12U)
9519 /*! WUPMC12 - Wakeup pin mode for LLWU_Pn
9520  *  0b0..External input pin detection active only during LLS/VLLS mode
9521  *  0b1..External input pin detection active during all power modes
9522  */
9523 #define LLWU_PMC_WUPMC12(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC12_SHIFT)) & LLWU_PMC_WUPMC12_MASK)
9524 
9525 #define LLWU_PMC_WUPMC13_MASK                    (0x2000U)
9526 #define LLWU_PMC_WUPMC13_SHIFT                   (13U)
9527 /*! WUPMC13 - Wakeup pin mode for LLWU_Pn
9528  *  0b0..External input pin detection active only during LLS/VLLS mode
9529  *  0b1..External input pin detection active during all power modes
9530  */
9531 #define LLWU_PMC_WUPMC13(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC13_SHIFT)) & LLWU_PMC_WUPMC13_MASK)
9532 
9533 #define LLWU_PMC_WUPMC14_MASK                    (0x4000U)
9534 #define LLWU_PMC_WUPMC14_SHIFT                   (14U)
9535 /*! WUPMC14 - Wakeup pin mode for LLWU_Pn
9536  *  0b0..External input pin detection active only during LLS/VLLS mode
9537  *  0b1..External input pin detection active during all power modes
9538  */
9539 #define LLWU_PMC_WUPMC14(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC14_SHIFT)) & LLWU_PMC_WUPMC14_MASK)
9540 
9541 #define LLWU_PMC_WUPMC15_MASK                    (0x8000U)
9542 #define LLWU_PMC_WUPMC15_SHIFT                   (15U)
9543 /*! WUPMC15 - Wakeup pin mode for LLWU_Pn
9544  *  0b0..External input pin detection active only during LLS/VLLS mode
9545  *  0b1..External input pin detection active during all power modes
9546  */
9547 #define LLWU_PMC_WUPMC15(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC15_SHIFT)) & LLWU_PMC_WUPMC15_MASK)
9548 
9549 #define LLWU_PMC_WUPMC16_MASK                    (0x10000U)
9550 #define LLWU_PMC_WUPMC16_SHIFT                   (16U)
9551 /*! WUPMC16 - Wakeup pin mode for LLWU_Pn
9552  *  0b0..External input pin detection active only during LLS/VLLS mode
9553  *  0b1..External input pin detection active during all power modes
9554  */
9555 #define LLWU_PMC_WUPMC16(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC16_SHIFT)) & LLWU_PMC_WUPMC16_MASK)
9556 
9557 #define LLWU_PMC_WUPMC17_MASK                    (0x20000U)
9558 #define LLWU_PMC_WUPMC17_SHIFT                   (17U)
9559 /*! WUPMC17 - Wakeup pin mode for LLWU_Pn
9560  *  0b0..External input pin detection active only during LLS/VLLS mode
9561  *  0b1..External input pin detection active during all power modes
9562  */
9563 #define LLWU_PMC_WUPMC17(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC17_SHIFT)) & LLWU_PMC_WUPMC17_MASK)
9564 
9565 #define LLWU_PMC_WUPMC18_MASK                    (0x40000U)
9566 #define LLWU_PMC_WUPMC18_SHIFT                   (18U)
9567 /*! WUPMC18 - Wakeup pin mode for LLWU_Pn
9568  *  0b0..External input pin detection active only during LLS/VLLS mode
9569  *  0b1..External input pin detection active during all power modes
9570  */
9571 #define LLWU_PMC_WUPMC18(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC18_SHIFT)) & LLWU_PMC_WUPMC18_MASK)
9572 
9573 #define LLWU_PMC_WUPMC19_MASK                    (0x80000U)
9574 #define LLWU_PMC_WUPMC19_SHIFT                   (19U)
9575 /*! WUPMC19 - Wakeup pin mode for LLWU_Pn
9576  *  0b0..External input pin detection active only during LLS/VLLS mode
9577  *  0b1..External input pin detection active during all power modes
9578  */
9579 #define LLWU_PMC_WUPMC19(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC19_SHIFT)) & LLWU_PMC_WUPMC19_MASK)
9580 
9581 #define LLWU_PMC_WUPMC20_MASK                    (0x100000U)
9582 #define LLWU_PMC_WUPMC20_SHIFT                   (20U)
9583 /*! WUPMC20 - Wakeup pin mode for LLWU_Pn
9584  *  0b0..External input pin detection active only during LLS/VLLS mode
9585  *  0b1..External input pin detection active during all power modes
9586  */
9587 #define LLWU_PMC_WUPMC20(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC20_SHIFT)) & LLWU_PMC_WUPMC20_MASK)
9588 
9589 #define LLWU_PMC_WUPMC21_MASK                    (0x200000U)
9590 #define LLWU_PMC_WUPMC21_SHIFT                   (21U)
9591 /*! WUPMC21 - Wakeup pin mode for LLWU_Pn
9592  *  0b0..External input pin detection active only during LLS/VLLS mode
9593  *  0b1..External input pin detection active during all power modes
9594  */
9595 #define LLWU_PMC_WUPMC21(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC21_SHIFT)) & LLWU_PMC_WUPMC21_MASK)
9596 
9597 #define LLWU_PMC_WUPMC22_MASK                    (0x400000U)
9598 #define LLWU_PMC_WUPMC22_SHIFT                   (22U)
9599 /*! WUPMC22 - Wakeup pin mode for LLWU_Pn
9600  *  0b0..External input pin detection active only during LLS/VLLS mode
9601  *  0b1..External input pin detection active during all power modes
9602  */
9603 #define LLWU_PMC_WUPMC22(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC22_SHIFT)) & LLWU_PMC_WUPMC22_MASK)
9604 
9605 #define LLWU_PMC_WUPMC23_MASK                    (0x800000U)
9606 #define LLWU_PMC_WUPMC23_SHIFT                   (23U)
9607 /*! WUPMC23 - Wakeup pin mode for LLWU_Pn
9608  *  0b0..External input pin detection active only during LLS/VLLS mode
9609  *  0b1..External input pin detection active during all power modes
9610  */
9611 #define LLWU_PMC_WUPMC23(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC23_SHIFT)) & LLWU_PMC_WUPMC23_MASK)
9612 
9613 #define LLWU_PMC_WUPMC24_MASK                    (0x1000000U)
9614 #define LLWU_PMC_WUPMC24_SHIFT                   (24U)
9615 /*! WUPMC24 - Wakeup pin mode for LLWU_Pn
9616  *  0b0..External input pin detection active only during LLS/VLLS mode
9617  *  0b1..External input pin detection active during all power modes
9618  */
9619 #define LLWU_PMC_WUPMC24(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC24_SHIFT)) & LLWU_PMC_WUPMC24_MASK)
9620 
9621 #define LLWU_PMC_WUPMC25_MASK                    (0x2000000U)
9622 #define LLWU_PMC_WUPMC25_SHIFT                   (25U)
9623 /*! WUPMC25 - Wakeup pin mode for LLWU_Pn
9624  *  0b0..External input pin detection active only during LLS/VLLS mode
9625  *  0b1..External input pin detection active during all power modes
9626  */
9627 #define LLWU_PMC_WUPMC25(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC25_SHIFT)) & LLWU_PMC_WUPMC25_MASK)
9628 
9629 #define LLWU_PMC_WUPMC26_MASK                    (0x4000000U)
9630 #define LLWU_PMC_WUPMC26_SHIFT                   (26U)
9631 /*! WUPMC26 - Wakeup pin mode for LLWU_Pn
9632  *  0b0..External input pin detection active only during LLS/VLLS mode
9633  *  0b1..External input pin detection active during all power modes
9634  */
9635 #define LLWU_PMC_WUPMC26(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC26_SHIFT)) & LLWU_PMC_WUPMC26_MASK)
9636 
9637 #define LLWU_PMC_Reserved27_MASK                 (0x8000000U)
9638 #define LLWU_PMC_Reserved27_SHIFT                (27U)
9639 /*! Reserved27 - Wakeup pin mode for LLWU_Pn
9640  *  0b0..External input pin detection active only during LLS/VLLS mode
9641  *  0b1..External input pin detection active during all power modes
9642  */
9643 #define LLWU_PMC_Reserved27(x)                   (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_Reserved27_SHIFT)) & LLWU_PMC_Reserved27_MASK)
9644 
9645 #define LLWU_PMC_Reserved28_MASK                 (0x10000000U)
9646 #define LLWU_PMC_Reserved28_SHIFT                (28U)
9647 /*! Reserved28 - Wakeup pin mode for LLWU_Pn
9648  *  0b0..External input pin detection active only during LLS/VLLS mode
9649  *  0b1..External input pin detection active during all power modes
9650  */
9651 #define LLWU_PMC_Reserved28(x)                   (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_Reserved28_SHIFT)) & LLWU_PMC_Reserved28_MASK)
9652 
9653 #define LLWU_PMC_WUPMC29_MASK                    (0x20000000U)
9654 #define LLWU_PMC_WUPMC29_SHIFT                   (29U)
9655 /*! WUPMC29 - Wakeup pin mode for LLWU_Pn
9656  *  0b0..External input pin detection active only during LLS/VLLS mode
9657  *  0b1..External input pin detection active during all power modes
9658  */
9659 #define LLWU_PMC_WUPMC29(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC29_SHIFT)) & LLWU_PMC_WUPMC29_MASK)
9660 
9661 #define LLWU_PMC_WUPMC30_MASK                    (0x40000000U)
9662 #define LLWU_PMC_WUPMC30_SHIFT                   (30U)
9663 /*! WUPMC30 - Wakeup pin mode for LLWU_Pn
9664  *  0b0..External input pin detection active only during LLS/VLLS mode
9665  *  0b1..External input pin detection active during all power modes
9666  */
9667 #define LLWU_PMC_WUPMC30(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC30_SHIFT)) & LLWU_PMC_WUPMC30_MASK)
9668 
9669 #define LLWU_PMC_WUPMC31_MASK                    (0x80000000U)
9670 #define LLWU_PMC_WUPMC31_SHIFT                   (31U)
9671 /*! WUPMC31 - Wakeup pin mode for LLWU_Pn
9672  *  0b0..External input pin detection active only during LLS/VLLS mode
9673  *  0b1..External input pin detection active during all power modes
9674  */
9675 #define LLWU_PMC_WUPMC31(x)                      (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC31_SHIFT)) & LLWU_PMC_WUPMC31_MASK)
9676 /*! @} */
9677 
9678 /*! @name FMC - Pin Filter Mode Configuration register */
9679 /*! @{ */
9680 
9681 #define LLWU_FMC_FILTM1_MASK                     (0x1U)
9682 #define LLWU_FMC_FILTM1_SHIFT                    (0U)
9683 /*! FILTM1 - Filter Mode for FILT1
9684  *  0b0..External input pin filter detection active only during LLS/VLLS mode
9685  *  0b1..External input pin filter detection active during all power modes
9686  */
9687 #define LLWU_FMC_FILTM1(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_FMC_FILTM1_SHIFT)) & LLWU_FMC_FILTM1_MASK)
9688 
9689 #define LLWU_FMC_FILTM2_MASK                     (0x2U)
9690 #define LLWU_FMC_FILTM2_SHIFT                    (1U)
9691 /*! FILTM2 - Filter Mode for FILT2
9692  *  0b0..External input pin filter detection active only during LLS/VLLS mode
9693  *  0b1..External input pin filter detection active during all power modes
9694  */
9695 #define LLWU_FMC_FILTM2(x)                       (((uint32_t)(((uint32_t)(x)) << LLWU_FMC_FILTM2_SHIFT)) & LLWU_FMC_FILTM2_MASK)
9696 /*! @} */
9697 
9698 
9699 /*!
9700  * @}
9701  */ /* end of group LLWU_Register_Masks */
9702 
9703 
9704 /* LLWU - Peripheral instance base addresses */
9705 /** Peripheral LLWU0 base address */
9706 #define LLWU0_BASE                               (0x40024000u)
9707 /** Peripheral LLWU0 base pointer */
9708 #define LLWU0                                    ((LLWU_Type *)LLWU0_BASE)
9709 /** Peripheral LLWU1 base address */
9710 #define LLWU1_BASE                               (0x41023000u)
9711 /** Peripheral LLWU1 base pointer */
9712 #define LLWU1                                    ((LLWU_Type *)LLWU1_BASE)
9713 /** Array initializer of LLWU peripheral base addresses */
9714 #define LLWU_BASE_ADDRS                          { LLWU0_BASE, LLWU1_BASE }
9715 /** Array initializer of LLWU peripheral base pointers */
9716 #define LLWU_BASE_PTRS                           { LLWU0, LLWU1 }
9717 /** Interrupt vectors for the LLWU peripheral type */
9718 #define LLWU_IRQS                                { NotAvail_IRQn, LLWU1_IRQn }
9719 
9720 /*!
9721  * @}
9722  */ /* end of group LLWU_Peripheral_Access_Layer */
9723 
9724 
9725 /* ----------------------------------------------------------------------------
9726    -- LPCMP Peripheral Access Layer
9727    ---------------------------------------------------------------------------- */
9728 
9729 /*!
9730  * @addtogroup LPCMP_Peripheral_Access_Layer LPCMP Peripheral Access Layer
9731  * @{
9732  */
9733 
9734 /** LPCMP - Register Layout Typedef */
9735 typedef struct {
9736   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
9737   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
9738   __IO uint32_t CCR0;                              /**< Comparator Control Register 0, offset: 0x8 */
9739   __IO uint32_t CCR1;                              /**< Comparator Control Register 1, offset: 0xC */
9740   __IO uint32_t CCR2;                              /**< Comparator Control Register 2, offset: 0x10 */
9741        uint8_t RESERVED_0[4];
9742   __IO uint32_t DCR;                               /**< DAC Control Register, offset: 0x18 */
9743   __IO uint32_t IER;                               /**< Interrupt Enable Register, offset: 0x1C */
9744   __IO uint32_t CSR;                               /**< Comparator Status Register, offset: 0x20 */
9745 } LPCMP_Type;
9746 
9747 /* ----------------------------------------------------------------------------
9748    -- LPCMP Register Masks
9749    ---------------------------------------------------------------------------- */
9750 
9751 /*!
9752  * @addtogroup LPCMP_Register_Masks LPCMP Register Masks
9753  * @{
9754  */
9755 
9756 /*! @name VERID - Version ID Register */
9757 /*! @{ */
9758 
9759 #define LPCMP_VERID_FEATURE_MASK                 (0xFFFFU)
9760 #define LPCMP_VERID_FEATURE_SHIFT                (0U)
9761 /*! FEATURE - Feature Specification Number
9762  *  0b0000000000000001..Round robin feature
9763  */
9764 #define LPCMP_VERID_FEATURE(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_FEATURE_SHIFT)) & LPCMP_VERID_FEATURE_MASK)
9765 
9766 #define LPCMP_VERID_MINOR_MASK                   (0xFF0000U)
9767 #define LPCMP_VERID_MINOR_SHIFT                  (16U)
9768 /*! MINOR - Minor Version Number. This read only field returns the minor version number for the module specification. */
9769 #define LPCMP_VERID_MINOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_MINOR_SHIFT)) & LPCMP_VERID_MINOR_MASK)
9770 
9771 #define LPCMP_VERID_MAJOR_MASK                   (0xFF000000U)
9772 #define LPCMP_VERID_MAJOR_SHIFT                  (24U)
9773 /*! MAJOR - Major Version Number. This read only field returns the major version number for the module specification. */
9774 #define LPCMP_VERID_MAJOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_MAJOR_SHIFT)) & LPCMP_VERID_MAJOR_MASK)
9775 /*! @} */
9776 
9777 /*! @name PARAM - Parameter Register */
9778 /*! @{ */
9779 
9780 #define LPCMP_PARAM_DAC_RES_MASK                 (0xFU)
9781 #define LPCMP_PARAM_DAC_RES_SHIFT                (0U)
9782 /*! DAC_RES - DAC resolution
9783  *  0b0000..4 bit DAC
9784  *  0b0001..6 bit DAC
9785  *  0b0010..8 bit DAC
9786  *  0b0011..10 bit DAC
9787  *  0b0100..12 bit DAC
9788  *  0b0101..14 bit DAC
9789  *  0b0110..16 bit DAC
9790  */
9791 #define LPCMP_PARAM_DAC_RES(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_PARAM_DAC_RES_SHIFT)) & LPCMP_PARAM_DAC_RES_MASK)
9792 /*! @} */
9793 
9794 /*! @name CCR0 - Comparator Control Register 0 */
9795 /*! @{ */
9796 
9797 #define LPCMP_CCR0_CMP_EN_MASK                   (0x1U)
9798 #define LPCMP_CCR0_CMP_EN_SHIFT                  (0U)
9799 /*! CMP_EN - Comparator Module Enable
9800  *  0b0..Analog Comparator is disabled.
9801  *  0b1..Analog Comparator is enabled.
9802  */
9803 #define LPCMP_CCR0_CMP_EN(x)                     (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR0_CMP_EN_SHIFT)) & LPCMP_CCR0_CMP_EN_MASK)
9804 
9805 #define LPCMP_CCR0_CMP_STOP_EN_MASK              (0x2U)
9806 #define LPCMP_CCR0_CMP_STOP_EN_SHIFT             (1U)
9807 /*! CMP_STOP_EN - Comparator Module STOP Mode Enable
9808  *  0b0..Comparator is disabled in STOP modes regardless of CMP_EN.
9809  *  0b1..Comparator is enabled in STOP mode if CMP_EN is active
9810  */
9811 #define LPCMP_CCR0_CMP_STOP_EN(x)                (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR0_CMP_STOP_EN_SHIFT)) & LPCMP_CCR0_CMP_STOP_EN_MASK)
9812 /*! @} */
9813 
9814 /*! @name CCR1 - Comparator Control Register 1 */
9815 /*! @{ */
9816 
9817 #define LPCMP_CCR1_WINDOW_EN_MASK                (0x1U)
9818 #define LPCMP_CCR1_WINDOW_EN_SHIFT               (0U)
9819 /*! WINDOW_EN - Windowing Enable
9820  *  0b0..Windowing mode is not selected.
9821  *  0b1..Windowing mode is selected.
9822  */
9823 #define LPCMP_CCR1_WINDOW_EN(x)                  (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_WINDOW_EN_SHIFT)) & LPCMP_CCR1_WINDOW_EN_MASK)
9824 
9825 #define LPCMP_CCR1_SAMPLE_EN_MASK                (0x2U)
9826 #define LPCMP_CCR1_SAMPLE_EN_SHIFT               (1U)
9827 /*! SAMPLE_EN - Sample Enable
9828  *  0b0..Sampling mode is not selected.
9829  *  0b1..Sampling mode is selected.
9830  */
9831 #define LPCMP_CCR1_SAMPLE_EN(x)                  (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_SAMPLE_EN_SHIFT)) & LPCMP_CCR1_SAMPLE_EN_MASK)
9832 
9833 #define LPCMP_CCR1_DMA_EN_MASK                   (0x4U)
9834 #define LPCMP_CCR1_DMA_EN_SHIFT                  (2U)
9835 /*! DMA_EN - DMA Enable
9836  *  0b0..DMA is disabled.
9837  *  0b1..DMA is enabled.
9838  */
9839 #define LPCMP_CCR1_DMA_EN(x)                     (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_DMA_EN_SHIFT)) & LPCMP_CCR1_DMA_EN_MASK)
9840 
9841 #define LPCMP_CCR1_COUT_INV_MASK                 (0x8U)
9842 #define LPCMP_CCR1_COUT_INV_SHIFT                (3U)
9843 /*! COUT_INV - Comparator invert
9844  *  0b0..Does not invert the comparator output.
9845  *  0b1..Inverts the comparator output.
9846  */
9847 #define LPCMP_CCR1_COUT_INV(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_INV_SHIFT)) & LPCMP_CCR1_COUT_INV_MASK)
9848 
9849 #define LPCMP_CCR1_COUT_SEL_MASK                 (0x10U)
9850 #define LPCMP_CCR1_COUT_SEL_SHIFT                (4U)
9851 /*! COUT_SEL - Comparator Output Select
9852  *  0b0..Set CMPO to equal COUT (filtered comparator output).
9853  *  0b1..Set CMPO to equal COUTA (unfiltered comparator output).
9854  */
9855 #define LPCMP_CCR1_COUT_SEL(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_SEL_SHIFT)) & LPCMP_CCR1_COUT_SEL_MASK)
9856 
9857 #define LPCMP_CCR1_COUT_PEN_MASK                 (0x20U)
9858 #define LPCMP_CCR1_COUT_PEN_SHIFT                (5U)
9859 /*! COUT_PEN - Comparator Output Pin Enable
9860  *  0b0..When COUT_PEN is 0, the comparator output (after window/filter settings dependent on software
9861  *       configuration) is not available to a packaged pin.
9862  *  0b1..When COUT_PEN is 1, and if the software has configured the comparator to own a packaged pin, the
9863  *       comparator output is available in a packaged pin.
9864  */
9865 #define LPCMP_CCR1_COUT_PEN(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_PEN_SHIFT)) & LPCMP_CCR1_COUT_PEN_MASK)
9866 
9867 #define LPCMP_CCR1_FILT_CNT_MASK                 (0x70000U)
9868 #define LPCMP_CCR1_FILT_CNT_SHIFT                (16U)
9869 /*! FILT_CNT - Filter Sample Count
9870  *  0b000..Filter is disabled. If SAMPLE_EN = 1, then COUT is a logic zero (this is not a legal state in , and is
9871  *         not recommended). If SAMPLE_EN = 0, COUT = COUTA.
9872  *  0b001..1 consecutive sample must agree (comparator output is simply sampled).
9873  *  0b010..2 consecutive samples must agree.
9874  *  0b011..3 consecutive samples must agree.
9875  *  0b100..4 consecutive samples must agree.
9876  *  0b101..5 consecutive samples must agree.
9877  *  0b110..6 consecutive samples must agree.
9878  *  0b111..7 consecutive samples must agree.
9879  */
9880 #define LPCMP_CCR1_FILT_CNT(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_FILT_CNT_SHIFT)) & LPCMP_CCR1_FILT_CNT_MASK)
9881 
9882 #define LPCMP_CCR1_FILT_PER_MASK                 (0xFF000000U)
9883 #define LPCMP_CCR1_FILT_PER_SHIFT                (24U)
9884 /*! FILT_PER - Filter Sample Period */
9885 #define LPCMP_CCR1_FILT_PER(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_FILT_PER_SHIFT)) & LPCMP_CCR1_FILT_PER_MASK)
9886 /*! @} */
9887 
9888 /*! @name CCR2 - Comparator Control Register 2 */
9889 /*! @{ */
9890 
9891 #define LPCMP_CCR2_CMP_HPMD_MASK                 (0x1U)
9892 #define LPCMP_CCR2_CMP_HPMD_SHIFT                (0U)
9893 /*! CMP_HPMD - CMP High Power Mode Select
9894  *  0b0..Low speed comparison mode is selected.(when CMP_NPMD is 0)
9895  *  0b1..High speed comparison mode is selected.(when CMP_NPMD is 0)
9896  */
9897 #define LPCMP_CCR2_CMP_HPMD(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_CMP_HPMD_SHIFT)) & LPCMP_CCR2_CMP_HPMD_MASK)
9898 
9899 #define LPCMP_CCR2_CMP_NPMD_MASK                 (0x2U)
9900 #define LPCMP_CCR2_CMP_NPMD_SHIFT                (1U)
9901 /*! CMP_NPMD - CMP Nano Power Mode Select
9902  *  0b0..Nano Power Comparator is not enabled (mode is determined by CMP_HPMD)
9903  *  0b1..Nano Power Comparator is enabled
9904  */
9905 #define LPCMP_CCR2_CMP_NPMD(x)                   (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_CMP_NPMD_SHIFT)) & LPCMP_CCR2_CMP_NPMD_MASK)
9906 
9907 #define LPCMP_CCR2_HYSTCTR_MASK                  (0x30U)
9908 #define LPCMP_CCR2_HYSTCTR_SHIFT                 (4U)
9909 /*! HYSTCTR - Comparator hard block hysteresis control. See chip data sheet to get the actual hystersis value with each level
9910  *  0b00..The hard block output has level 0 hysteresis internally.
9911  *  0b01..The hard block output has level 1 hysteresis internally.
9912  *  0b10..The hard block output has level 2 hysteresis internally.
9913  *  0b11..The hard block output has level 3 hysteresis internally.
9914  */
9915 #define LPCMP_CCR2_HYSTCTR(x)                    (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_HYSTCTR_SHIFT)) & LPCMP_CCR2_HYSTCTR_MASK)
9916 
9917 #define LPCMP_CCR2_PSEL_MASK                     (0x70000U)
9918 #define LPCMP_CCR2_PSEL_SHIFT                    (16U)
9919 /*! PSEL - Plus Input MUX Control
9920  *  0b000..Input 0
9921  *  0b001..Input 1
9922  *  0b010..Input 2
9923  *  0b011..Input 3
9924  *  0b100..Input 4
9925  *  0b101..Input 5
9926  *  0b110..Input 6
9927  *  0b111..Internal DAC output
9928  */
9929 #define LPCMP_CCR2_PSEL(x)                       (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_PSEL_SHIFT)) & LPCMP_CCR2_PSEL_MASK)
9930 
9931 #define LPCMP_CCR2_MSEL_MASK                     (0x700000U)
9932 #define LPCMP_CCR2_MSEL_SHIFT                    (20U)
9933 /*! MSEL - Minus Input MUX Control
9934  *  0b000..Input 0
9935  *  0b001..Input 1
9936  *  0b010..Input 2
9937  *  0b011..Input 3
9938  *  0b100..Input 4
9939  *  0b101..Input 5
9940  *  0b110..Input 6
9941  *  0b111..Internal DAC output
9942  */
9943 #define LPCMP_CCR2_MSEL(x)                       (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_MSEL_SHIFT)) & LPCMP_CCR2_MSEL_MASK)
9944 /*! @} */
9945 
9946 /*! @name DCR - DAC Control Register */
9947 /*! @{ */
9948 
9949 #define LPCMP_DCR_DAC_EN_MASK                    (0x1U)
9950 #define LPCMP_DCR_DAC_EN_SHIFT                   (0U)
9951 /*! DAC_EN - DAC Enable
9952  *  0b0..DAC is disabled.
9953  *  0b1..DAC is enabled.
9954  */
9955 #define LPCMP_DCR_DAC_EN(x)                      (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_EN_SHIFT)) & LPCMP_DCR_DAC_EN_MASK)
9956 
9957 #define LPCMP_DCR_DAC_HPMD_MASK                  (0x2U)
9958 #define LPCMP_DCR_DAC_HPMD_SHIFT                 (1U)
9959 /*! DAC_HPMD - DAC High Power Mode Select
9960  *  0b0..DAC high power mode is not enabled.
9961  *  0b1..DAC high power mode is enabled.
9962  */
9963 #define LPCMP_DCR_DAC_HPMD(x)                    (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_HPMD_SHIFT)) & LPCMP_DCR_DAC_HPMD_MASK)
9964 
9965 #define LPCMP_DCR_VRSEL_MASK                     (0x100U)
9966 #define LPCMP_DCR_VRSEL_SHIFT                    (8U)
9967 /*! VRSEL - Supply Voltage Reference Source Select
9968  *  0b0..vrefh_int is selected as resistor ladder network supply reference Vin.
9969  *  0b1..vrefh_ext is selected as resistor ladder network supply reference Vin.
9970  */
9971 #define LPCMP_DCR_VRSEL(x)                       (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_VRSEL_SHIFT)) & LPCMP_DCR_VRSEL_MASK)
9972 
9973 #define LPCMP_DCR_DAC_DATA_MASK                  (0x3F0000U)
9974 #define LPCMP_DCR_DAC_DATA_SHIFT                 (16U)
9975 /*! DAC_DATA - DAC Output Voltage Select */
9976 #define LPCMP_DCR_DAC_DATA(x)                    (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_DATA_SHIFT)) & LPCMP_DCR_DAC_DATA_MASK)
9977 /*! @} */
9978 
9979 /*! @name IER - Interrupt Enable Register */
9980 /*! @{ */
9981 
9982 #define LPCMP_IER_CFR_IE_MASK                    (0x1U)
9983 #define LPCMP_IER_CFR_IE_SHIFT                   (0U)
9984 /*! CFR_IE - Comparator Flag Rising Interrupt Enable
9985  *  0b0..CFR interrupt is disabled.
9986  *  0b1..CFR interrupt is enabled.
9987  */
9988 #define LPCMP_IER_CFR_IE(x)                      (((uint32_t)(((uint32_t)(x)) << LPCMP_IER_CFR_IE_SHIFT)) & LPCMP_IER_CFR_IE_MASK)
9989 
9990 #define LPCMP_IER_CFF_IE_MASK                    (0x2U)
9991 #define LPCMP_IER_CFF_IE_SHIFT                   (1U)
9992 /*! CFF_IE - Comparator Flag Falling Interrupt Enable
9993  *  0b0..CFF interrupt is disabled.
9994  *  0b1..CFF interrupt is enabled.
9995  */
9996 #define LPCMP_IER_CFF_IE(x)                      (((uint32_t)(((uint32_t)(x)) << LPCMP_IER_CFF_IE_SHIFT)) & LPCMP_IER_CFF_IE_MASK)
9997 /*! @} */
9998 
9999 /*! @name CSR - Comparator Status Register */
10000 /*! @{ */
10001 
10002 #define LPCMP_CSR_CFR_MASK                       (0x1U)
10003 #define LPCMP_CSR_CFR_SHIFT                      (0U)
10004 /*! CFR - Analog Comparator Flag Rising
10005  *  0b0..A rising edge has not been detected on COUT.
10006  *  0b1..A rising edge on COUT has occurred.
10007  */
10008 #define LPCMP_CSR_CFR(x)                         (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_CFR_SHIFT)) & LPCMP_CSR_CFR_MASK)
10009 
10010 #define LPCMP_CSR_CFF_MASK                       (0x2U)
10011 #define LPCMP_CSR_CFF_SHIFT                      (1U)
10012 /*! CFF - Analog Comparator Flag Falling
10013  *  0b0..A falling edge has not been detected on COUT.
10014  *  0b1..A falling edge on COUT has occurred.
10015  */
10016 #define LPCMP_CSR_CFF(x)                         (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_CFF_SHIFT)) & LPCMP_CSR_CFF_MASK)
10017 
10018 #define LPCMP_CSR_COUT_MASK                      (0x100U)
10019 #define LPCMP_CSR_COUT_SHIFT                     (8U)
10020 /*! COUT - Analog Comparator Output */
10021 #define LPCMP_CSR_COUT(x)                        (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_COUT_SHIFT)) & LPCMP_CSR_COUT_MASK)
10022 /*! @} */
10023 
10024 
10025 /*!
10026  * @}
10027  */ /* end of group LPCMP_Register_Masks */
10028 
10029 
10030 /* LPCMP - Peripheral instance base addresses */
10031 /** Peripheral LPCMP0 base address */
10032 #define LPCMP0_BASE                              (0x4004B000u)
10033 /** Peripheral LPCMP0 base pointer */
10034 #define LPCMP0                                   ((LPCMP_Type *)LPCMP0_BASE)
10035 /** Peripheral LPCMP1 base address */
10036 #define LPCMP1_BASE                              (0x41038000u)
10037 /** Peripheral LPCMP1 base pointer */
10038 #define LPCMP1                                   ((LPCMP_Type *)LPCMP1_BASE)
10039 /** Array initializer of LPCMP peripheral base addresses */
10040 #define LPCMP_BASE_ADDRS                         { LPCMP0_BASE, LPCMP1_BASE }
10041 /** Array initializer of LPCMP peripheral base pointers */
10042 #define LPCMP_BASE_PTRS                          { LPCMP0, LPCMP1 }
10043 /** Interrupt vectors for the LPCMP peripheral type */
10044 #define LPCMP_IRQS                               { LPCMP0_IRQn, LPCMP1_IRQn }
10045 
10046 /*!
10047  * @}
10048  */ /* end of group LPCMP_Peripheral_Access_Layer */
10049 
10050 
10051 /* ----------------------------------------------------------------------------
10052    -- LPDAC Peripheral Access Layer
10053    ---------------------------------------------------------------------------- */
10054 
10055 /*!
10056  * @addtogroup LPDAC_Peripheral_Access_Layer LPDAC Peripheral Access Layer
10057  * @{
10058  */
10059 
10060 /** LPDAC - Register Layout Typedef */
10061 typedef struct {
10062   __I  uint32_t VERID;                             /**< Version Identifier Register, offset: 0x0 */
10063   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
10064   __O  uint32_t DATA;                              /**< DAC Data Register, offset: 0x8 */
10065   __IO uint32_t GCR;                               /**< DAC Global Control Register, offset: 0xC */
10066   __IO uint32_t FCR;                               /**< DAC FIFO Control Register, offset: 0x10 */
10067   __I  uint32_t FPR;                               /**< DAC FIFO Pointer Register, offset: 0x14 */
10068   __IO uint32_t FSR;                               /**< FIFO Status Register, offset: 0x18 */
10069   __IO uint32_t IER;                               /**< DAC Interrupt Enable Register, offset: 0x1C */
10070   __IO uint32_t DER;                               /**< DAC DMA Enable Register, offset: 0x20 */
10071   __IO uint32_t RCR;                               /**< DAC Reset Control Register, offset: 0x24 */
10072   __O  uint32_t TCR;                               /**< DAC Trigger Control Register, offset: 0x28 */
10073 } LPDAC_Type;
10074 
10075 /* ----------------------------------------------------------------------------
10076    -- LPDAC Register Masks
10077    ---------------------------------------------------------------------------- */
10078 
10079 /*!
10080  * @addtogroup LPDAC_Register_Masks LPDAC Register Masks
10081  * @{
10082  */
10083 
10084 /*! @name VERID - Version Identifier Register */
10085 /*! @{ */
10086 
10087 #define LPDAC_VERID_FEATURE_MASK                 (0xFFFFU)
10088 #define LPDAC_VERID_FEATURE_SHIFT                (0U)
10089 /*! FEATURE - Feature Identification Number */
10090 #define LPDAC_VERID_FEATURE(x)                   (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_FEATURE_SHIFT)) & LPDAC_VERID_FEATURE_MASK)
10091 
10092 #define LPDAC_VERID_MINOR_MASK                   (0xFF0000U)
10093 #define LPDAC_VERID_MINOR_SHIFT                  (16U)
10094 /*! MINOR - Minor version number */
10095 #define LPDAC_VERID_MINOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_MINOR_SHIFT)) & LPDAC_VERID_MINOR_MASK)
10096 
10097 #define LPDAC_VERID_MAJOR_MASK                   (0xFF000000U)
10098 #define LPDAC_VERID_MAJOR_SHIFT                  (24U)
10099 /*! MAJOR - Major version number */
10100 #define LPDAC_VERID_MAJOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_MAJOR_SHIFT)) & LPDAC_VERID_MAJOR_MASK)
10101 /*! @} */
10102 
10103 /*! @name PARAM - Parameter Register */
10104 /*! @{ */
10105 
10106 #define LPDAC_PARAM_FIFOSZ_MASK                  (0x7U)
10107 #define LPDAC_PARAM_FIFOSZ_SHIFT                 (0U)
10108 /*! FIFOSZ - FIFO size
10109  *  0b000..Reserved
10110  *  0b001..FIFO depth is 4
10111  *  0b010..FIFO depth is 8
10112  *  0b011..FIFO depth is 16
10113  *  0b100..FIFO depth is 32
10114  *  0b101..FIFO depth is 64
10115  *  0b110..FIFO depth is 128
10116  *  0b111..FIFO depth is 256
10117  */
10118 #define LPDAC_PARAM_FIFOSZ(x)                    (((uint32_t)(((uint32_t)(x)) << LPDAC_PARAM_FIFOSZ_SHIFT)) & LPDAC_PARAM_FIFOSZ_MASK)
10119 /*! @} */
10120 
10121 /*! @name DATA - DAC Data Register */
10122 /*! @{ */
10123 
10124 #define LPDAC_DATA_DATA_MASK                     (0xFFFU)
10125 #define LPDAC_DATA_DATA_SHIFT                    (0U)
10126 /*! DATA - In FIFO mode or swing back mode, this is the FIFO data entry. In buffer mode, write to
10127  *    this field will push the data to analog without trigger support. This field is write only and
10128  *    always read zero.
10129  */
10130 #define LPDAC_DATA_DATA(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_DATA_DATA_SHIFT)) & LPDAC_DATA_DATA_MASK)
10131 /*! @} */
10132 
10133 /*! @name GCR - DAC Global Control Register */
10134 /*! @{ */
10135 
10136 #define LPDAC_GCR_DACEN_MASK                     (0x1U)
10137 #define LPDAC_GCR_DACEN_SHIFT                    (0U)
10138 /*! DACEN - DAC Enable
10139  *  0b0..The DAC system is disabled.
10140  *  0b1..The DAC system is enabled.
10141  */
10142 #define LPDAC_GCR_DACEN(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_DACEN_SHIFT)) & LPDAC_GCR_DACEN_MASK)
10143 
10144 #define LPDAC_GCR_DACRFS_MASK                    (0x2U)
10145 #define LPDAC_GCR_DACRFS_SHIFT                   (1U)
10146 /*! DACRFS - DAC Reference Select
10147  *  0b0..The DAC selects VREFH_INT as the reference voltage.
10148  *  0b1..The DAC selects VREFH_EXT as the reference voltage.
10149  */
10150 #define LPDAC_GCR_DACRFS(x)                      (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_DACRFS_SHIFT)) & LPDAC_GCR_DACRFS_MASK)
10151 
10152 #define LPDAC_GCR_LPEN_MASK                      (0x4U)
10153 #define LPDAC_GCR_LPEN_SHIFT                     (2U)
10154 /*! LPEN - Low Power Enable
10155  *  0b0..High-Power mode
10156  *  0b1..Low-Power mode
10157  */
10158 #define LPDAC_GCR_LPEN(x)                        (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_LPEN_SHIFT)) & LPDAC_GCR_LPEN_MASK)
10159 
10160 #define LPDAC_GCR_FIFOEN_MASK                    (0x8U)
10161 #define LPDAC_GCR_FIFOEN_SHIFT                   (3U)
10162 /*! FIFOEN - FIFO Enable
10163  *  0b0..FIFO mode is disabled and buffer mode is enabled. Any data written to DATA[DATA] goes to buffer then goes to conversion.
10164  *  0b1..FIFO mode is enabled. Data will be first read from FIFO to buffer then goes to conversion
10165  */
10166 #define LPDAC_GCR_FIFOEN(x)                      (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_FIFOEN_SHIFT)) & LPDAC_GCR_FIFOEN_MASK)
10167 
10168 #define LPDAC_GCR_SWMD_MASK                      (0x10U)
10169 #define LPDAC_GCR_SWMD_SHIFT                     (4U)
10170 /*! SWMD - Swing Back Mode
10171  *  0b0..Swing back mode disable
10172  *  0b1..Swing back mode enable
10173  */
10174 #define LPDAC_GCR_SWMD(x)                        (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_SWMD_SHIFT)) & LPDAC_GCR_SWMD_MASK)
10175 
10176 #define LPDAC_GCR_TRGSEL_MASK                    (0x20U)
10177 #define LPDAC_GCR_TRGSEL_SHIFT                   (5U)
10178 /*! TRGSEL - DAC Trigger Select
10179  *  0b0..The DAC hardware trigger is selected.
10180  *  0b1..The DAC software trigger is selected.
10181  */
10182 #define LPDAC_GCR_TRGSEL(x)                      (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_TRGSEL_SHIFT)) & LPDAC_GCR_TRGSEL_MASK)
10183 /*! @} */
10184 
10185 /*! @name FCR - DAC FIFO Control Register */
10186 /*! @{ */
10187 
10188 #define LPDAC_FCR_WML_MASK                       (0xFU)
10189 #define LPDAC_FCR_WML_SHIFT                      (0U)
10190 /*! WML - Watermark Level */
10191 #define LPDAC_FCR_WML(x)                         (((uint32_t)(((uint32_t)(x)) << LPDAC_FCR_WML_SHIFT)) & LPDAC_FCR_WML_MASK)
10192 /*! @} */
10193 
10194 /*! @name FPR - DAC FIFO Pointer Register */
10195 /*! @{ */
10196 
10197 #define LPDAC_FPR_FIFO_RPT_MASK                  (0xFU)
10198 #define LPDAC_FPR_FIFO_RPT_SHIFT                 (0U)
10199 /*! FIFO_RPT - FIFO Read Pointer */
10200 #define LPDAC_FPR_FIFO_RPT(x)                    (((uint32_t)(((uint32_t)(x)) << LPDAC_FPR_FIFO_RPT_SHIFT)) & LPDAC_FPR_FIFO_RPT_MASK)
10201 
10202 #define LPDAC_FPR_FIFO_WPT_MASK                  (0xF0000U)
10203 #define LPDAC_FPR_FIFO_WPT_SHIFT                 (16U)
10204 /*! FIFO_WPT - FIFO Write Pointer */
10205 #define LPDAC_FPR_FIFO_WPT(x)                    (((uint32_t)(((uint32_t)(x)) << LPDAC_FPR_FIFO_WPT_SHIFT)) & LPDAC_FPR_FIFO_WPT_MASK)
10206 /*! @} */
10207 
10208 /*! @name FSR - FIFO Status Register */
10209 /*! @{ */
10210 
10211 #define LPDAC_FSR_FULL_MASK                      (0x1U)
10212 #define LPDAC_FSR_FULL_SHIFT                     (0U)
10213 /*! FULL - FIFO Full Flag
10214  *  0b0..FIFO is not full
10215  *  0b1..FIFO is full
10216  */
10217 #define LPDAC_FSR_FULL(x)                        (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_FULL_SHIFT)) & LPDAC_FSR_FULL_MASK)
10218 
10219 #define LPDAC_FSR_EMPTY_MASK                     (0x2U)
10220 #define LPDAC_FSR_EMPTY_SHIFT                    (1U)
10221 /*! EMPTY - FIFO Empty Flag
10222  *  0b0..FIFO is not empty
10223  *  0b1..FIFO is empty
10224  */
10225 #define LPDAC_FSR_EMPTY(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_EMPTY_SHIFT)) & LPDAC_FSR_EMPTY_MASK)
10226 
10227 #define LPDAC_FSR_WM_MASK                        (0x4U)
10228 #define LPDAC_FSR_WM_SHIFT                       (2U)
10229 /*! WM - FIFO Watermark Status Flag
10230  *  0b0..Data in FIFO is more than watermark level
10231  *  0b1..Data in FIFO is less than or equal to watermark level
10232  */
10233 #define LPDAC_FSR_WM(x)                          (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_WM_SHIFT)) & LPDAC_FSR_WM_MASK)
10234 
10235 #define LPDAC_FSR_SWBK_MASK                      (0x8U)
10236 #define LPDAC_FSR_SWBK_SHIFT                     (3U)
10237 /*! SWBK - Swing Back One Cycle Complete Flag
10238  *  0b0..No swing back cycle has completed since the last time the flag was cleared.
10239  *  0b1..At least one swing back cycle has occurred since the last time the flag was cleared.
10240  */
10241 #define LPDAC_FSR_SWBK(x)                        (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_SWBK_SHIFT)) & LPDAC_FSR_SWBK_MASK)
10242 
10243 #define LPDAC_FSR_OF_MASK                        (0x40U)
10244 #define LPDAC_FSR_OF_SHIFT                       (6U)
10245 /*! OF - FIFO Overflow Flag
10246  *  0b0..No overflow has occurred since the last time the flag was cleared.
10247  *  0b1..At least one FIFO overflow has occurred since the last time the flag was cleared.
10248  */
10249 #define LPDAC_FSR_OF(x)                          (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_OF_SHIFT)) & LPDAC_FSR_OF_MASK)
10250 
10251 #define LPDAC_FSR_UF_MASK                        (0x80U)
10252 #define LPDAC_FSR_UF_SHIFT                       (7U)
10253 /*! UF - FIFO Underflow Flag
10254  *  0b0..No underflow has occurred since the last time the flag was cleared.
10255  *  0b1..At least one trigger underflow has occurred since the last time the flag was cleared.
10256  */
10257 #define LPDAC_FSR_UF(x)                          (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_UF_SHIFT)) & LPDAC_FSR_UF_MASK)
10258 /*! @} */
10259 
10260 /*! @name IER - DAC Interrupt Enable Register */
10261 /*! @{ */
10262 
10263 #define LPDAC_IER_FULL_IE_MASK                   (0x1U)
10264 #define LPDAC_IER_FULL_IE_SHIFT                  (0U)
10265 /*! FULL_IE - FIFO Full Interrupt Enable
10266  *  0b0..FIFO Full interrupt is disabled.
10267  *  0b1..FIFO Full interrupt is enabled.
10268  */
10269 #define LPDAC_IER_FULL_IE(x)                     (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_FULL_IE_SHIFT)) & LPDAC_IER_FULL_IE_MASK)
10270 
10271 #define LPDAC_IER_EMPTY_IE_MASK                  (0x2U)
10272 #define LPDAC_IER_EMPTY_IE_SHIFT                 (1U)
10273 /*! EMPTY_IE - FIFO Empty Interrupt Enable
10274  *  0b0..FIFO Empty interrupt is disabled.
10275  *  0b1..FIFO Empty interrupt is enabled.
10276  */
10277 #define LPDAC_IER_EMPTY_IE(x)                    (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_EMPTY_IE_SHIFT)) & LPDAC_IER_EMPTY_IE_MASK)
10278 
10279 #define LPDAC_IER_WM_IE_MASK                     (0x4U)
10280 #define LPDAC_IER_WM_IE_SHIFT                    (2U)
10281 /*! WM_IE - FIFO Watermark Interrupt Enable
10282  *  0b0..Watermark interrupt is disabled.
10283  *  0b1..Watermark interrupt is enabled.
10284  */
10285 #define LPDAC_IER_WM_IE(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_WM_IE_SHIFT)) & LPDAC_IER_WM_IE_MASK)
10286 
10287 #define LPDAC_IER_SWBK_IE_MASK                   (0x8U)
10288 #define LPDAC_IER_SWBK_IE_SHIFT                  (3U)
10289 /*! SWBK_IE - Swing back One Cycle Complete Interrupt Enable
10290  *  0b0..Swing back one time complete interrupt is disabled.
10291  *  0b1..Swing back one time complete interrupt is enabled.
10292  */
10293 #define LPDAC_IER_SWBK_IE(x)                     (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_SWBK_IE_SHIFT)) & LPDAC_IER_SWBK_IE_MASK)
10294 
10295 #define LPDAC_IER_OF_IE_MASK                     (0x40U)
10296 #define LPDAC_IER_OF_IE_SHIFT                    (6U)
10297 /*! OF_IE - FIFO Overflow Interrupt Enable
10298  *  0b0..Overflow interrupt is disabled
10299  *  0b1..Overflow interrupt is enabled.
10300  */
10301 #define LPDAC_IER_OF_IE(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_OF_IE_SHIFT)) & LPDAC_IER_OF_IE_MASK)
10302 
10303 #define LPDAC_IER_UF_IE_MASK                     (0x80U)
10304 #define LPDAC_IER_UF_IE_SHIFT                    (7U)
10305 /*! UF_IE - FIFO Underflow Interrupt Enable
10306  *  0b0..Underflow interrupt is disabled.
10307  *  0b1..Underflow interrupt is enabled.
10308  */
10309 #define LPDAC_IER_UF_IE(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_UF_IE_SHIFT)) & LPDAC_IER_UF_IE_MASK)
10310 /*! @} */
10311 
10312 /*! @name DER - DAC DMA Enable Register */
10313 /*! @{ */
10314 
10315 #define LPDAC_DER_EMPTY_DMAEN_MASK               (0x2U)
10316 #define LPDAC_DER_EMPTY_DMAEN_SHIFT              (1U)
10317 /*! EMPTY_DMAEN - FIFO Empty DMA Enable
10318  *  0b0..FIFO Empty DMA request is disabled.
10319  *  0b1..FIFO Empty DMA request is enabled.
10320  */
10321 #define LPDAC_DER_EMPTY_DMAEN(x)                 (((uint32_t)(((uint32_t)(x)) << LPDAC_DER_EMPTY_DMAEN_SHIFT)) & LPDAC_DER_EMPTY_DMAEN_MASK)
10322 
10323 #define LPDAC_DER_WM_DMAEN_MASK                  (0x4U)
10324 #define LPDAC_DER_WM_DMAEN_SHIFT                 (2U)
10325 /*! WM_DMAEN - FIFO Watermark DMA Enable
10326  *  0b0..Watermark DMA request is disabled.
10327  *  0b1..Watermark DMA request is enabled.
10328  */
10329 #define LPDAC_DER_WM_DMAEN(x)                    (((uint32_t)(((uint32_t)(x)) << LPDAC_DER_WM_DMAEN_SHIFT)) & LPDAC_DER_WM_DMAEN_MASK)
10330 /*! @} */
10331 
10332 /*! @name RCR - DAC Reset Control Register */
10333 /*! @{ */
10334 
10335 #define LPDAC_RCR_SWRST_MASK                     (0x1U)
10336 #define LPDAC_RCR_SWRST_SHIFT                    (0U)
10337 /*! SWRST - Software Reset
10338  *  0b0..No effect
10339  *  0b1..Software reset
10340  */
10341 #define LPDAC_RCR_SWRST(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_RCR_SWRST_SHIFT)) & LPDAC_RCR_SWRST_MASK)
10342 
10343 #define LPDAC_RCR_FIFORST_MASK                   (0x2U)
10344 #define LPDAC_RCR_FIFORST_SHIFT                  (1U)
10345 /*! FIFORST - FIFO Reset
10346  *  0b0..No effect
10347  *  0b1..FIFO reset
10348  */
10349 #define LPDAC_RCR_FIFORST(x)                     (((uint32_t)(((uint32_t)(x)) << LPDAC_RCR_FIFORST_SHIFT)) & LPDAC_RCR_FIFORST_MASK)
10350 /*! @} */
10351 
10352 /*! @name TCR - DAC Trigger Control Register */
10353 /*! @{ */
10354 
10355 #define LPDAC_TCR_SWTRG_MASK                     (0x1U)
10356 #define LPDAC_TCR_SWTRG_SHIFT                    (0U)
10357 /*! SWTRG - Software Trigger
10358  *  0b0..The DAC soft trigger is not valid.
10359  *  0b1..The DAC soft trigger is valid.
10360  */
10361 #define LPDAC_TCR_SWTRG(x)                       (((uint32_t)(((uint32_t)(x)) << LPDAC_TCR_SWTRG_SHIFT)) & LPDAC_TCR_SWTRG_MASK)
10362 /*! @} */
10363 
10364 
10365 /*!
10366  * @}
10367  */ /* end of group LPDAC_Register_Masks */
10368 
10369 
10370 /* LPDAC - Peripheral instance base addresses */
10371 /** Peripheral LPDAC0 base address */
10372 #define LPDAC0_BASE                              (0x4004C000u)
10373 /** Peripheral LPDAC0 base pointer */
10374 #define LPDAC0                                   ((LPDAC_Type *)LPDAC0_BASE)
10375 /** Array initializer of LPDAC peripheral base addresses */
10376 #define LPDAC_BASE_ADDRS                         { LPDAC0_BASE }
10377 /** Array initializer of LPDAC peripheral base pointers */
10378 #define LPDAC_BASE_PTRS                          { LPDAC0 }
10379 /** Interrupt vectors for the LPDAC peripheral type */
10380 #define LPDAC_IRQS                               { LPDAC0_IRQn }
10381 
10382 /*!
10383  * @}
10384  */ /* end of group LPDAC_Peripheral_Access_Layer */
10385 
10386 
10387 /* ----------------------------------------------------------------------------
10388    -- LPI2C Peripheral Access Layer
10389    ---------------------------------------------------------------------------- */
10390 
10391 /*!
10392  * @addtogroup LPI2C_Peripheral_Access_Layer LPI2C Peripheral Access Layer
10393  * @{
10394  */
10395 
10396 /** LPI2C - Register Layout Typedef */
10397 typedef struct {
10398   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
10399   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
10400        uint8_t RESERVED_0[8];
10401   __IO uint32_t MCR;                               /**< Master Control Register, offset: 0x10 */
10402   __IO uint32_t MSR;                               /**< Master Status Register, offset: 0x14 */
10403   __IO uint32_t MIER;                              /**< Master Interrupt Enable Register, offset: 0x18 */
10404   __IO uint32_t MDER;                              /**< Master DMA Enable Register, offset: 0x1C */
10405   __IO uint32_t MCFGR0;                            /**< Master Configuration Register 0, offset: 0x20 */
10406   __IO uint32_t MCFGR1;                            /**< Master Configuration Register 1, offset: 0x24 */
10407   __IO uint32_t MCFGR2;                            /**< Master Configuration Register 2, offset: 0x28 */
10408   __IO uint32_t MCFGR3;                            /**< Master Configuration Register 3, offset: 0x2C */
10409        uint8_t RESERVED_1[16];
10410   __IO uint32_t MDMR;                              /**< Master Data Match Register, offset: 0x40 */
10411        uint8_t RESERVED_2[4];
10412   __IO uint32_t MCCR0;                             /**< Master Clock Configuration Register 0, offset: 0x48 */
10413        uint8_t RESERVED_3[4];
10414   __IO uint32_t MCCR1;                             /**< Master Clock Configuration Register 1, offset: 0x50 */
10415        uint8_t RESERVED_4[4];
10416   __IO uint32_t MFCR;                              /**< Master FIFO Control Register, offset: 0x58 */
10417   __I  uint32_t MFSR;                              /**< Master FIFO Status Register, offset: 0x5C */
10418   __O  uint32_t MTDR;                              /**< Master Transmit Data Register, offset: 0x60 */
10419        uint8_t RESERVED_5[12];
10420   __I  uint32_t MRDR;                              /**< Master Receive Data Register, offset: 0x70 */
10421        uint8_t RESERVED_6[156];
10422   __IO uint32_t SCR;                               /**< Slave Control Register, offset: 0x110 */
10423   __IO uint32_t SSR;                               /**< Slave Status Register, offset: 0x114 */
10424   __IO uint32_t SIER;                              /**< Slave Interrupt Enable Register, offset: 0x118 */
10425   __IO uint32_t SDER;                              /**< Slave DMA Enable Register, offset: 0x11C */
10426        uint8_t RESERVED_7[4];
10427   __IO uint32_t SCFGR1;                            /**< Slave Configuration Register 1, offset: 0x124 */
10428   __IO uint32_t SCFGR2;                            /**< Slave Configuration Register 2, offset: 0x128 */
10429        uint8_t RESERVED_8[20];
10430   __IO uint32_t SAMR;                              /**< Slave Address Match Register, offset: 0x140 */
10431        uint8_t RESERVED_9[12];
10432   __I  uint32_t SASR;                              /**< Slave Address Status Register, offset: 0x150 */
10433   __IO uint32_t STAR;                              /**< Slave Transmit ACK Register, offset: 0x154 */
10434        uint8_t RESERVED_10[8];
10435   __O  uint32_t STDR;                              /**< Slave Transmit Data Register, offset: 0x160 */
10436        uint8_t RESERVED_11[12];
10437   __I  uint32_t SRDR;                              /**< Slave Receive Data Register, offset: 0x170 */
10438 } LPI2C_Type;
10439 
10440 /* ----------------------------------------------------------------------------
10441    -- LPI2C Register Masks
10442    ---------------------------------------------------------------------------- */
10443 
10444 /*!
10445  * @addtogroup LPI2C_Register_Masks LPI2C Register Masks
10446  * @{
10447  */
10448 
10449 /*! @name VERID - Version ID Register */
10450 /*! @{ */
10451 
10452 #define LPI2C_VERID_FEATURE_MASK                 (0xFFFFU)
10453 #define LPI2C_VERID_FEATURE_SHIFT                (0U)
10454 /*! FEATURE - Feature Specification Number
10455  *  0b0000000000000010..Master only, with standard feature set
10456  *  0b0000000000000011..Master and slave, with standard feature set
10457  */
10458 #define LPI2C_VERID_FEATURE(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_FEATURE_SHIFT)) & LPI2C_VERID_FEATURE_MASK)
10459 
10460 #define LPI2C_VERID_MINOR_MASK                   (0xFF0000U)
10461 #define LPI2C_VERID_MINOR_SHIFT                  (16U)
10462 /*! MINOR - Minor Version Number */
10463 #define LPI2C_VERID_MINOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_MINOR_SHIFT)) & LPI2C_VERID_MINOR_MASK)
10464 
10465 #define LPI2C_VERID_MAJOR_MASK                   (0xFF000000U)
10466 #define LPI2C_VERID_MAJOR_SHIFT                  (24U)
10467 /*! MAJOR - Major Version Number */
10468 #define LPI2C_VERID_MAJOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_MAJOR_SHIFT)) & LPI2C_VERID_MAJOR_MASK)
10469 /*! @} */
10470 
10471 /*! @name PARAM - Parameter Register */
10472 /*! @{ */
10473 
10474 #define LPI2C_PARAM_MTXFIFO_MASK                 (0xFU)
10475 #define LPI2C_PARAM_MTXFIFO_SHIFT                (0U)
10476 /*! MTXFIFO - Master Transmit FIFO Size */
10477 #define LPI2C_PARAM_MTXFIFO(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_PARAM_MTXFIFO_SHIFT)) & LPI2C_PARAM_MTXFIFO_MASK)
10478 
10479 #define LPI2C_PARAM_MRXFIFO_MASK                 (0xF00U)
10480 #define LPI2C_PARAM_MRXFIFO_SHIFT                (8U)
10481 /*! MRXFIFO - Master Receive FIFO Size */
10482 #define LPI2C_PARAM_MRXFIFO(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_PARAM_MRXFIFO_SHIFT)) & LPI2C_PARAM_MRXFIFO_MASK)
10483 /*! @} */
10484 
10485 /*! @name MCR - Master Control Register */
10486 /*! @{ */
10487 
10488 #define LPI2C_MCR_MEN_MASK                       (0x1U)
10489 #define LPI2C_MCR_MEN_SHIFT                      (0U)
10490 /*! MEN - Master Enable
10491  *  0b0..Master logic is disabled
10492  *  0b1..Master logic is enabled
10493  */
10494 #define LPI2C_MCR_MEN(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_MEN_SHIFT)) & LPI2C_MCR_MEN_MASK)
10495 
10496 #define LPI2C_MCR_RST_MASK                       (0x2U)
10497 #define LPI2C_MCR_RST_SHIFT                      (1U)
10498 /*! RST - Software Reset
10499  *  0b0..Master logic is not reset
10500  *  0b1..Master logic is reset
10501  */
10502 #define LPI2C_MCR_RST(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RST_SHIFT)) & LPI2C_MCR_RST_MASK)
10503 
10504 #define LPI2C_MCR_DOZEN_MASK                     (0x4U)
10505 #define LPI2C_MCR_DOZEN_SHIFT                    (2U)
10506 /*! DOZEN - Doze mode enable
10507  *  0b0..Master is enabled in Doze mode
10508  *  0b1..Master is disabled in Doze mode
10509  */
10510 #define LPI2C_MCR_DOZEN(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_DOZEN_SHIFT)) & LPI2C_MCR_DOZEN_MASK)
10511 
10512 #define LPI2C_MCR_DBGEN_MASK                     (0x8U)
10513 #define LPI2C_MCR_DBGEN_SHIFT                    (3U)
10514 /*! DBGEN - Debug Enable
10515  *  0b0..Master is disabled in debug mode
10516  *  0b1..Master is enabled in debug mode
10517  */
10518 #define LPI2C_MCR_DBGEN(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_DBGEN_SHIFT)) & LPI2C_MCR_DBGEN_MASK)
10519 
10520 #define LPI2C_MCR_RTF_MASK                       (0x100U)
10521 #define LPI2C_MCR_RTF_SHIFT                      (8U)
10522 /*! RTF - Reset Transmit FIFO
10523  *  0b0..No effect
10524  *  0b1..Transmit FIFO is reset
10525  */
10526 #define LPI2C_MCR_RTF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RTF_SHIFT)) & LPI2C_MCR_RTF_MASK)
10527 
10528 #define LPI2C_MCR_RRF_MASK                       (0x200U)
10529 #define LPI2C_MCR_RRF_SHIFT                      (9U)
10530 /*! RRF - Reset Receive FIFO
10531  *  0b0..No effect
10532  *  0b1..Receive FIFO is reset
10533  */
10534 #define LPI2C_MCR_RRF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RRF_SHIFT)) & LPI2C_MCR_RRF_MASK)
10535 /*! @} */
10536 
10537 /*! @name MSR - Master Status Register */
10538 /*! @{ */
10539 
10540 #define LPI2C_MSR_TDF_MASK                       (0x1U)
10541 #define LPI2C_MSR_TDF_SHIFT                      (0U)
10542 /*! TDF - Transmit Data Flag
10543  *  0b0..Transmit data is not requested
10544  *  0b1..Transmit data is requested
10545  */
10546 #define LPI2C_MSR_TDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_TDF_SHIFT)) & LPI2C_MSR_TDF_MASK)
10547 
10548 #define LPI2C_MSR_RDF_MASK                       (0x2U)
10549 #define LPI2C_MSR_RDF_SHIFT                      (1U)
10550 /*! RDF - Receive Data Flag
10551  *  0b0..Receive Data is not ready
10552  *  0b1..Receive data is ready
10553  */
10554 #define LPI2C_MSR_RDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_RDF_SHIFT)) & LPI2C_MSR_RDF_MASK)
10555 
10556 #define LPI2C_MSR_EPF_MASK                       (0x100U)
10557 #define LPI2C_MSR_EPF_SHIFT                      (8U)
10558 /*! EPF - End Packet Flag
10559  *  0b0..Master has not generated a STOP or Repeated START condition
10560  *  0b1..Master has generated a STOP or Repeated START condition
10561  */
10562 #define LPI2C_MSR_EPF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_EPF_SHIFT)) & LPI2C_MSR_EPF_MASK)
10563 
10564 #define LPI2C_MSR_SDF_MASK                       (0x200U)
10565 #define LPI2C_MSR_SDF_SHIFT                      (9U)
10566 /*! SDF - STOP Detect Flag
10567  *  0b0..Master has not generated a STOP condition
10568  *  0b1..Master has generated a STOP condition
10569  */
10570 #define LPI2C_MSR_SDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_SDF_SHIFT)) & LPI2C_MSR_SDF_MASK)
10571 
10572 #define LPI2C_MSR_NDF_MASK                       (0x400U)
10573 #define LPI2C_MSR_NDF_SHIFT                      (10U)
10574 /*! NDF - NACK Detect Flag
10575  *  0b0..Unexpected NACK was not detected
10576  *  0b1..Unexpected NACK was detected
10577  */
10578 #define LPI2C_MSR_NDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_NDF_SHIFT)) & LPI2C_MSR_NDF_MASK)
10579 
10580 #define LPI2C_MSR_ALF_MASK                       (0x800U)
10581 #define LPI2C_MSR_ALF_SHIFT                      (11U)
10582 /*! ALF - Arbitration Lost Flag
10583  *  0b0..Master has not lost arbitration
10584  *  0b1..Master has lost arbitration
10585  */
10586 #define LPI2C_MSR_ALF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_ALF_SHIFT)) & LPI2C_MSR_ALF_MASK)
10587 
10588 #define LPI2C_MSR_FEF_MASK                       (0x1000U)
10589 #define LPI2C_MSR_FEF_SHIFT                      (12U)
10590 /*! FEF - FIFO Error Flag
10591  *  0b0..No error
10592  *  0b1..Master sending or receiving data without a START condition
10593  */
10594 #define LPI2C_MSR_FEF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_FEF_SHIFT)) & LPI2C_MSR_FEF_MASK)
10595 
10596 #define LPI2C_MSR_PLTF_MASK                      (0x2000U)
10597 #define LPI2C_MSR_PLTF_SHIFT                     (13U)
10598 /*! PLTF - Pin Low Timeout Flag
10599  *  0b0..Pin low timeout has not occurred or is disabled
10600  *  0b1..Pin low timeout has occurred
10601  */
10602 #define LPI2C_MSR_PLTF(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_PLTF_SHIFT)) & LPI2C_MSR_PLTF_MASK)
10603 
10604 #define LPI2C_MSR_DMF_MASK                       (0x4000U)
10605 #define LPI2C_MSR_DMF_SHIFT                      (14U)
10606 /*! DMF - Data Match Flag
10607  *  0b0..Have not received matching data
10608  *  0b1..Have received matching data
10609  */
10610 #define LPI2C_MSR_DMF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_DMF_SHIFT)) & LPI2C_MSR_DMF_MASK)
10611 
10612 #define LPI2C_MSR_MBF_MASK                       (0x1000000U)
10613 #define LPI2C_MSR_MBF_SHIFT                      (24U)
10614 /*! MBF - Master Busy Flag
10615  *  0b0..I2C Master is idle
10616  *  0b1..I2C Master is busy
10617  */
10618 #define LPI2C_MSR_MBF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_MBF_SHIFT)) & LPI2C_MSR_MBF_MASK)
10619 
10620 #define LPI2C_MSR_BBF_MASK                       (0x2000000U)
10621 #define LPI2C_MSR_BBF_SHIFT                      (25U)
10622 /*! BBF - Bus Busy Flag
10623  *  0b0..I2C Bus is idle
10624  *  0b1..I2C Bus is busy
10625  */
10626 #define LPI2C_MSR_BBF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_BBF_SHIFT)) & LPI2C_MSR_BBF_MASK)
10627 /*! @} */
10628 
10629 /*! @name MIER - Master Interrupt Enable Register */
10630 /*! @{ */
10631 
10632 #define LPI2C_MIER_TDIE_MASK                     (0x1U)
10633 #define LPI2C_MIER_TDIE_SHIFT                    (0U)
10634 /*! TDIE - Transmit Data Interrupt Enable
10635  *  0b0..Disabled
10636  *  0b1..Enabled
10637  */
10638 #define LPI2C_MIER_TDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_TDIE_SHIFT)) & LPI2C_MIER_TDIE_MASK)
10639 
10640 #define LPI2C_MIER_RDIE_MASK                     (0x2U)
10641 #define LPI2C_MIER_RDIE_SHIFT                    (1U)
10642 /*! RDIE - Receive Data Interrupt Enable
10643  *  0b0..Disabled
10644  *  0b1..Enabled
10645  */
10646 #define LPI2C_MIER_RDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_RDIE_SHIFT)) & LPI2C_MIER_RDIE_MASK)
10647 
10648 #define LPI2C_MIER_EPIE_MASK                     (0x100U)
10649 #define LPI2C_MIER_EPIE_SHIFT                    (8U)
10650 /*! EPIE - End Packet Interrupt Enable
10651  *  0b0..Disabled
10652  *  0b1..Enabled
10653  */
10654 #define LPI2C_MIER_EPIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_EPIE_SHIFT)) & LPI2C_MIER_EPIE_MASK)
10655 
10656 #define LPI2C_MIER_SDIE_MASK                     (0x200U)
10657 #define LPI2C_MIER_SDIE_SHIFT                    (9U)
10658 /*! SDIE - STOP Detect Interrupt Enable
10659  *  0b0..Disabled
10660  *  0b1..Enabled
10661  */
10662 #define LPI2C_MIER_SDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_SDIE_SHIFT)) & LPI2C_MIER_SDIE_MASK)
10663 
10664 #define LPI2C_MIER_NDIE_MASK                     (0x400U)
10665 #define LPI2C_MIER_NDIE_SHIFT                    (10U)
10666 /*! NDIE - NACK Detect Interrupt Enable
10667  *  0b0..Disabled
10668  *  0b1..Enabled
10669  */
10670 #define LPI2C_MIER_NDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_NDIE_SHIFT)) & LPI2C_MIER_NDIE_MASK)
10671 
10672 #define LPI2C_MIER_ALIE_MASK                     (0x800U)
10673 #define LPI2C_MIER_ALIE_SHIFT                    (11U)
10674 /*! ALIE - Arbitration Lost Interrupt Enable
10675  *  0b0..Disabled
10676  *  0b1..Enabled
10677  */
10678 #define LPI2C_MIER_ALIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_ALIE_SHIFT)) & LPI2C_MIER_ALIE_MASK)
10679 
10680 #define LPI2C_MIER_FEIE_MASK                     (0x1000U)
10681 #define LPI2C_MIER_FEIE_SHIFT                    (12U)
10682 /*! FEIE - FIFO Error Interrupt Enable
10683  *  0b0..Enabled
10684  *  0b1..Disabled
10685  */
10686 #define LPI2C_MIER_FEIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_FEIE_SHIFT)) & LPI2C_MIER_FEIE_MASK)
10687 
10688 #define LPI2C_MIER_PLTIE_MASK                    (0x2000U)
10689 #define LPI2C_MIER_PLTIE_SHIFT                   (13U)
10690 /*! PLTIE - Pin Low Timeout Interrupt Enable
10691  *  0b0..Disabled
10692  *  0b1..Enabled
10693  */
10694 #define LPI2C_MIER_PLTIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_PLTIE_SHIFT)) & LPI2C_MIER_PLTIE_MASK)
10695 
10696 #define LPI2C_MIER_DMIE_MASK                     (0x4000U)
10697 #define LPI2C_MIER_DMIE_SHIFT                    (14U)
10698 /*! DMIE - Data Match Interrupt Enable
10699  *  0b0..Disabled
10700  *  0b1..Enabled
10701  */
10702 #define LPI2C_MIER_DMIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_DMIE_SHIFT)) & LPI2C_MIER_DMIE_MASK)
10703 /*! @} */
10704 
10705 /*! @name MDER - Master DMA Enable Register */
10706 /*! @{ */
10707 
10708 #define LPI2C_MDER_TDDE_MASK                     (0x1U)
10709 #define LPI2C_MDER_TDDE_SHIFT                    (0U)
10710 /*! TDDE - Transmit Data DMA Enable
10711  *  0b0..DMA request is disabled
10712  *  0b1..DMA request is enabled
10713  */
10714 #define LPI2C_MDER_TDDE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MDER_TDDE_SHIFT)) & LPI2C_MDER_TDDE_MASK)
10715 
10716 #define LPI2C_MDER_RDDE_MASK                     (0x2U)
10717 #define LPI2C_MDER_RDDE_SHIFT                    (1U)
10718 /*! RDDE - Receive Data DMA Enable
10719  *  0b0..DMA request is disabled
10720  *  0b1..DMA request is enabled
10721  */
10722 #define LPI2C_MDER_RDDE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MDER_RDDE_SHIFT)) & LPI2C_MDER_RDDE_MASK)
10723 /*! @} */
10724 
10725 /*! @name MCFGR0 - Master Configuration Register 0 */
10726 /*! @{ */
10727 
10728 #define LPI2C_MCFGR0_HREN_MASK                   (0x1U)
10729 #define LPI2C_MCFGR0_HREN_SHIFT                  (0U)
10730 /*! HREN - Host Request Enable
10731  *  0b0..Host request input is disabled
10732  *  0b1..Host request input is enabled
10733  */
10734 #define LPI2C_MCFGR0_HREN(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HREN_SHIFT)) & LPI2C_MCFGR0_HREN_MASK)
10735 
10736 #define LPI2C_MCFGR0_HRPOL_MASK                  (0x2U)
10737 #define LPI2C_MCFGR0_HRPOL_SHIFT                 (1U)
10738 /*! HRPOL - Host Request Polarity
10739  *  0b0..Active low
10740  *  0b1..Active high
10741  */
10742 #define LPI2C_MCFGR0_HRPOL(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HRPOL_SHIFT)) & LPI2C_MCFGR0_HRPOL_MASK)
10743 
10744 #define LPI2C_MCFGR0_HRSEL_MASK                  (0x4U)
10745 #define LPI2C_MCFGR0_HRSEL_SHIFT                 (2U)
10746 /*! HRSEL - Host Request Select
10747  *  0b0..Host request input is pin HREQ
10748  *  0b1..Host request input is input trigger
10749  */
10750 #define LPI2C_MCFGR0_HRSEL(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HRSEL_SHIFT)) & LPI2C_MCFGR0_HRSEL_MASK)
10751 
10752 #define LPI2C_MCFGR0_CIRFIFO_MASK                (0x100U)
10753 #define LPI2C_MCFGR0_CIRFIFO_SHIFT               (8U)
10754 /*! CIRFIFO - Circular FIFO Enable
10755  *  0b0..Circular FIFO is disabled
10756  *  0b1..Circular FIFO is enabled
10757  */
10758 #define LPI2C_MCFGR0_CIRFIFO(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_CIRFIFO_SHIFT)) & LPI2C_MCFGR0_CIRFIFO_MASK)
10759 
10760 #define LPI2C_MCFGR0_RDMO_MASK                   (0x200U)
10761 #define LPI2C_MCFGR0_RDMO_SHIFT                  (9U)
10762 /*! RDMO - Receive Data Match Only
10763  *  0b0..Received data is stored in the receive FIFO
10764  *  0b1..Received data is discarded unless the the Data Match Flag (MSR[DMF]) is set
10765  */
10766 #define LPI2C_MCFGR0_RDMO(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_RDMO_SHIFT)) & LPI2C_MCFGR0_RDMO_MASK)
10767 /*! @} */
10768 
10769 /*! @name MCFGR1 - Master Configuration Register 1 */
10770 /*! @{ */
10771 
10772 #define LPI2C_MCFGR1_PRESCALE_MASK               (0x7U)
10773 #define LPI2C_MCFGR1_PRESCALE_SHIFT              (0U)
10774 /*! PRESCALE - Prescaler
10775  *  0b000..Divide by 1
10776  *  0b001..Divide by 2
10777  *  0b010..Divide by 4
10778  *  0b011..Divide by 8
10779  *  0b100..Divide by 16
10780  *  0b101..Divide by 32
10781  *  0b110..Divide by 64
10782  *  0b111..Divide by 128
10783  */
10784 #define LPI2C_MCFGR1_PRESCALE(x)                 (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_PRESCALE_SHIFT)) & LPI2C_MCFGR1_PRESCALE_MASK)
10785 
10786 #define LPI2C_MCFGR1_AUTOSTOP_MASK               (0x100U)
10787 #define LPI2C_MCFGR1_AUTOSTOP_SHIFT              (8U)
10788 /*! AUTOSTOP - Automatic STOP Generation
10789  *  0b0..No effect
10790  *  0b1..STOP condition is automatically generated whenever the transmit FIFO is empty and the LPI2C master is busy
10791  */
10792 #define LPI2C_MCFGR1_AUTOSTOP(x)                 (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_AUTOSTOP_SHIFT)) & LPI2C_MCFGR1_AUTOSTOP_MASK)
10793 
10794 #define LPI2C_MCFGR1_IGNACK_MASK                 (0x200U)
10795 #define LPI2C_MCFGR1_IGNACK_SHIFT                (9U)
10796 /*! IGNACK - IGNACK
10797  *  0b0..LPI2C Master will receive ACK and NACK normally
10798  *  0b1..LPI2C Master will treat a received NACK as if it (NACK) was an ACK
10799  */
10800 #define LPI2C_MCFGR1_IGNACK(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_IGNACK_SHIFT)) & LPI2C_MCFGR1_IGNACK_MASK)
10801 
10802 #define LPI2C_MCFGR1_TIMECFG_MASK                (0x400U)
10803 #define LPI2C_MCFGR1_TIMECFG_SHIFT               (10U)
10804 /*! TIMECFG - Timeout Configuration
10805  *  0b0..Pin Low Timeout Flag will set if SCL is low for longer than the configured timeout
10806  *  0b1..Pin Low Timeout Flag will set if either SCL or SDA is low for longer than the configured timeout
10807  */
10808 #define LPI2C_MCFGR1_TIMECFG(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_TIMECFG_SHIFT)) & LPI2C_MCFGR1_TIMECFG_MASK)
10809 
10810 #define LPI2C_MCFGR1_MATCFG_MASK                 (0x70000U)
10811 #define LPI2C_MCFGR1_MATCFG_SHIFT                (16U)
10812 /*! MATCFG - Match Configuration
10813  *  0b000..Match is disabled
10814  *  0b001..Reserved
10815  *  0b010..Match is enabled (1st data word equals MATCH0 OR MATCH1)
10816  *  0b011..Match is enabled (any data word equals MATCH0 OR MATCH1)
10817  *  0b100..Match is enabled (1st data word equals MATCH0 AND 2nd data word equals MATCH1)
10818  *  0b101..Match is enabled (any data word equals MATCH0 AND next data word equals MATCH1)
10819  *  0b110..Match is enabled (1st data word AND MATCH1 equals MATCH0 AND MATCH1)
10820  *  0b111..Match is enabled (any data word AND MATCH1 equals MATCH0 AND MATCH1)
10821  */
10822 #define LPI2C_MCFGR1_MATCFG(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_MATCFG_SHIFT)) & LPI2C_MCFGR1_MATCFG_MASK)
10823 
10824 #define LPI2C_MCFGR1_PINCFG_MASK                 (0x7000000U)
10825 #define LPI2C_MCFGR1_PINCFG_SHIFT                (24U)
10826 /*! PINCFG - Pin Configuration
10827  *  0b000..2-pin open drain mode
10828  *  0b001..2-pin output only mode (ultra-fast mode)
10829  *  0b010..2-pin push-pull mode
10830  *  0b011..4-pin push-pull mode
10831  *  0b100..2-pin open drain mode with separate LPI2C slave
10832  *  0b101..2-pin output only mode (ultra-fast mode) with separate LPI2C slave
10833  *  0b110..2-pin push-pull mode with separate LPI2C slave
10834  *  0b111..4-pin push-pull mode (inverted outputs)
10835  */
10836 #define LPI2C_MCFGR1_PINCFG(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_PINCFG_SHIFT)) & LPI2C_MCFGR1_PINCFG_MASK)
10837 /*! @} */
10838 
10839 /*! @name MCFGR2 - Master Configuration Register 2 */
10840 /*! @{ */
10841 
10842 #define LPI2C_MCFGR2_BUSIDLE_MASK                (0xFFFU)
10843 #define LPI2C_MCFGR2_BUSIDLE_SHIFT               (0U)
10844 /*! BUSIDLE - Bus Idle Timeout */
10845 #define LPI2C_MCFGR2_BUSIDLE(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_BUSIDLE_SHIFT)) & LPI2C_MCFGR2_BUSIDLE_MASK)
10846 
10847 #define LPI2C_MCFGR2_FILTSCL_MASK                (0xF0000U)
10848 #define LPI2C_MCFGR2_FILTSCL_SHIFT               (16U)
10849 /*! FILTSCL - Glitch Filter SCL */
10850 #define LPI2C_MCFGR2_FILTSCL(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_FILTSCL_SHIFT)) & LPI2C_MCFGR2_FILTSCL_MASK)
10851 
10852 #define LPI2C_MCFGR2_FILTSDA_MASK                (0xF000000U)
10853 #define LPI2C_MCFGR2_FILTSDA_SHIFT               (24U)
10854 /*! FILTSDA - Glitch Filter SDA */
10855 #define LPI2C_MCFGR2_FILTSDA(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_FILTSDA_SHIFT)) & LPI2C_MCFGR2_FILTSDA_MASK)
10856 /*! @} */
10857 
10858 /*! @name MCFGR3 - Master Configuration Register 3 */
10859 /*! @{ */
10860 
10861 #define LPI2C_MCFGR3_PINLOW_MASK                 (0xFFF00U)
10862 #define LPI2C_MCFGR3_PINLOW_SHIFT                (8U)
10863 /*! PINLOW - Pin Low Timeout */
10864 #define LPI2C_MCFGR3_PINLOW(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR3_PINLOW_SHIFT)) & LPI2C_MCFGR3_PINLOW_MASK)
10865 /*! @} */
10866 
10867 /*! @name MDMR - Master Data Match Register */
10868 /*! @{ */
10869 
10870 #define LPI2C_MDMR_MATCH0_MASK                   (0xFFU)
10871 #define LPI2C_MDMR_MATCH0_SHIFT                  (0U)
10872 /*! MATCH0 - Match 0 Value */
10873 #define LPI2C_MDMR_MATCH0(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MDMR_MATCH0_SHIFT)) & LPI2C_MDMR_MATCH0_MASK)
10874 
10875 #define LPI2C_MDMR_MATCH1_MASK                   (0xFF0000U)
10876 #define LPI2C_MDMR_MATCH1_SHIFT                  (16U)
10877 /*! MATCH1 - Match 1 Value */
10878 #define LPI2C_MDMR_MATCH1(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MDMR_MATCH1_SHIFT)) & LPI2C_MDMR_MATCH1_MASK)
10879 /*! @} */
10880 
10881 /*! @name MCCR0 - Master Clock Configuration Register 0 */
10882 /*! @{ */
10883 
10884 #define LPI2C_MCCR0_CLKLO_MASK                   (0x3FU)
10885 #define LPI2C_MCCR0_CLKLO_SHIFT                  (0U)
10886 /*! CLKLO - Clock Low Period */
10887 #define LPI2C_MCCR0_CLKLO(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_CLKLO_SHIFT)) & LPI2C_MCCR0_CLKLO_MASK)
10888 
10889 #define LPI2C_MCCR0_CLKHI_MASK                   (0x3F00U)
10890 #define LPI2C_MCCR0_CLKHI_SHIFT                  (8U)
10891 /*! CLKHI - Clock High Period */
10892 #define LPI2C_MCCR0_CLKHI(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_CLKHI_SHIFT)) & LPI2C_MCCR0_CLKHI_MASK)
10893 
10894 #define LPI2C_MCCR0_SETHOLD_MASK                 (0x3F0000U)
10895 #define LPI2C_MCCR0_SETHOLD_SHIFT                (16U)
10896 /*! SETHOLD - Setup Hold Delay */
10897 #define LPI2C_MCCR0_SETHOLD(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_SETHOLD_SHIFT)) & LPI2C_MCCR0_SETHOLD_MASK)
10898 
10899 #define LPI2C_MCCR0_DATAVD_MASK                  (0x3F000000U)
10900 #define LPI2C_MCCR0_DATAVD_SHIFT                 (24U)
10901 /*! DATAVD - Data Valid Delay */
10902 #define LPI2C_MCCR0_DATAVD(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_DATAVD_SHIFT)) & LPI2C_MCCR0_DATAVD_MASK)
10903 /*! @} */
10904 
10905 /*! @name MCCR1 - Master Clock Configuration Register 1 */
10906 /*! @{ */
10907 
10908 #define LPI2C_MCCR1_CLKLO_MASK                   (0x3FU)
10909 #define LPI2C_MCCR1_CLKLO_SHIFT                  (0U)
10910 /*! CLKLO - Clock Low Period */
10911 #define LPI2C_MCCR1_CLKLO(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_CLKLO_SHIFT)) & LPI2C_MCCR1_CLKLO_MASK)
10912 
10913 #define LPI2C_MCCR1_CLKHI_MASK                   (0x3F00U)
10914 #define LPI2C_MCCR1_CLKHI_SHIFT                  (8U)
10915 /*! CLKHI - Clock High Period */
10916 #define LPI2C_MCCR1_CLKHI(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_CLKHI_SHIFT)) & LPI2C_MCCR1_CLKHI_MASK)
10917 
10918 #define LPI2C_MCCR1_SETHOLD_MASK                 (0x3F0000U)
10919 #define LPI2C_MCCR1_SETHOLD_SHIFT                (16U)
10920 /*! SETHOLD - Setup Hold Delay */
10921 #define LPI2C_MCCR1_SETHOLD(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_SETHOLD_SHIFT)) & LPI2C_MCCR1_SETHOLD_MASK)
10922 
10923 #define LPI2C_MCCR1_DATAVD_MASK                  (0x3F000000U)
10924 #define LPI2C_MCCR1_DATAVD_SHIFT                 (24U)
10925 /*! DATAVD - Data Valid Delay */
10926 #define LPI2C_MCCR1_DATAVD(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_DATAVD_SHIFT)) & LPI2C_MCCR1_DATAVD_MASK)
10927 /*! @} */
10928 
10929 /*! @name MFCR - Master FIFO Control Register */
10930 /*! @{ */
10931 
10932 #define LPI2C_MFCR_TXWATER_MASK                  (0x3U)
10933 #define LPI2C_MFCR_TXWATER_SHIFT                 (0U)
10934 /*! TXWATER - Transmit FIFO Watermark */
10935 #define LPI2C_MFCR_TXWATER(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MFCR_TXWATER_SHIFT)) & LPI2C_MFCR_TXWATER_MASK)
10936 
10937 #define LPI2C_MFCR_RXWATER_MASK                  (0x30000U)
10938 #define LPI2C_MFCR_RXWATER_SHIFT                 (16U)
10939 /*! RXWATER - Receive FIFO Watermark */
10940 #define LPI2C_MFCR_RXWATER(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MFCR_RXWATER_SHIFT)) & LPI2C_MFCR_RXWATER_MASK)
10941 /*! @} */
10942 
10943 /*! @name MFSR - Master FIFO Status Register */
10944 /*! @{ */
10945 
10946 #define LPI2C_MFSR_TXCOUNT_MASK                  (0x7U)
10947 #define LPI2C_MFSR_TXCOUNT_SHIFT                 (0U)
10948 /*! TXCOUNT - Transmit FIFO Count */
10949 #define LPI2C_MFSR_TXCOUNT(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MFSR_TXCOUNT_SHIFT)) & LPI2C_MFSR_TXCOUNT_MASK)
10950 
10951 #define LPI2C_MFSR_RXCOUNT_MASK                  (0x70000U)
10952 #define LPI2C_MFSR_RXCOUNT_SHIFT                 (16U)
10953 /*! RXCOUNT - Receive FIFO Count */
10954 #define LPI2C_MFSR_RXCOUNT(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MFSR_RXCOUNT_SHIFT)) & LPI2C_MFSR_RXCOUNT_MASK)
10955 /*! @} */
10956 
10957 /*! @name MTDR - Master Transmit Data Register */
10958 /*! @{ */
10959 
10960 #define LPI2C_MTDR_DATA_MASK                     (0xFFU)
10961 #define LPI2C_MTDR_DATA_SHIFT                    (0U)
10962 /*! DATA - Transmit Data */
10963 #define LPI2C_MTDR_DATA(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MTDR_DATA_SHIFT)) & LPI2C_MTDR_DATA_MASK)
10964 
10965 #define LPI2C_MTDR_CMD_MASK                      (0x700U)
10966 #define LPI2C_MTDR_CMD_SHIFT                     (8U)
10967 /*! CMD - Command Data
10968  *  0b000..Transmit DATA[7:0]
10969  *  0b001..Receive (DATA[7:0] + 1) bytes
10970  *  0b010..Generate STOP condition
10971  *  0b011..Receive and discard (DATA[7:0] + 1) bytes
10972  *  0b100..Generate (repeated) START and transmit address in DATA[7:0]
10973  *  0b101..Generate (repeated) START and transmit address in DATA[7:0]. This transfer expects a NACK to be returned.
10974  *  0b110..Generate (repeated) START and transmit address in DATA[7:0] using high speed mode
10975  *  0b111..Generate (repeated) START and transmit address in DATA[7:0] using high speed mode. This transfer expects a NACK to be returned.
10976  */
10977 #define LPI2C_MTDR_CMD(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_MTDR_CMD_SHIFT)) & LPI2C_MTDR_CMD_MASK)
10978 /*! @} */
10979 
10980 /*! @name MRDR - Master Receive Data Register */
10981 /*! @{ */
10982 
10983 #define LPI2C_MRDR_DATA_MASK                     (0xFFU)
10984 #define LPI2C_MRDR_DATA_SHIFT                    (0U)
10985 /*! DATA - Receive Data */
10986 #define LPI2C_MRDR_DATA(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_MRDR_DATA_SHIFT)) & LPI2C_MRDR_DATA_MASK)
10987 
10988 #define LPI2C_MRDR_RXEMPTY_MASK                  (0x4000U)
10989 #define LPI2C_MRDR_RXEMPTY_SHIFT                 (14U)
10990 /*! RXEMPTY - RX Empty
10991  *  0b0..Receive FIFO is not empty
10992  *  0b1..Receive FIFO is empty
10993  */
10994 #define LPI2C_MRDR_RXEMPTY(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_MRDR_RXEMPTY_SHIFT)) & LPI2C_MRDR_RXEMPTY_MASK)
10995 /*! @} */
10996 
10997 /*! @name SCR - Slave Control Register */
10998 /*! @{ */
10999 
11000 #define LPI2C_SCR_SEN_MASK                       (0x1U)
11001 #define LPI2C_SCR_SEN_SHIFT                      (0U)
11002 /*! SEN - Slave Enable
11003  *  0b0..I2C Slave mode is disabled
11004  *  0b1..I2C Slave mode is enabled
11005  */
11006 #define LPI2C_SCR_SEN(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_SEN_SHIFT)) & LPI2C_SCR_SEN_MASK)
11007 
11008 #define LPI2C_SCR_RST_MASK                       (0x2U)
11009 #define LPI2C_SCR_RST_SHIFT                      (1U)
11010 /*! RST - Software Reset
11011  *  0b0..Slave mode logic is not reset
11012  *  0b1..Slave mode logic is reset
11013  */
11014 #define LPI2C_SCR_RST(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RST_SHIFT)) & LPI2C_SCR_RST_MASK)
11015 
11016 #define LPI2C_SCR_FILTEN_MASK                    (0x10U)
11017 #define LPI2C_SCR_FILTEN_SHIFT                   (4U)
11018 /*! FILTEN - Filter Enable
11019  *  0b0..Disable digital filter and output delay counter for slave mode
11020  *  0b1..Enable digital filter and output delay counter for slave mode
11021  */
11022 #define LPI2C_SCR_FILTEN(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_FILTEN_SHIFT)) & LPI2C_SCR_FILTEN_MASK)
11023 
11024 #define LPI2C_SCR_FILTDZ_MASK                    (0x20U)
11025 #define LPI2C_SCR_FILTDZ_SHIFT                   (5U)
11026 /*! FILTDZ - Filter Doze Enable
11027  *  0b0..Filter remains enabled in Doze mode
11028  *  0b1..Filter is disabled in Doze mode
11029  */
11030 #define LPI2C_SCR_FILTDZ(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_FILTDZ_SHIFT)) & LPI2C_SCR_FILTDZ_MASK)
11031 
11032 #define LPI2C_SCR_RTF_MASK                       (0x100U)
11033 #define LPI2C_SCR_RTF_SHIFT                      (8U)
11034 /*! RTF - Reset Transmit FIFO
11035  *  0b0..No effect
11036  *  0b1..Transmit Data Register is now empty
11037  */
11038 #define LPI2C_SCR_RTF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RTF_SHIFT)) & LPI2C_SCR_RTF_MASK)
11039 
11040 #define LPI2C_SCR_RRF_MASK                       (0x200U)
11041 #define LPI2C_SCR_RRF_SHIFT                      (9U)
11042 /*! RRF - Reset Receive FIFO
11043  *  0b0..No effect
11044  *  0b1..Receive Data Register is now empty
11045  */
11046 #define LPI2C_SCR_RRF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RRF_SHIFT)) & LPI2C_SCR_RRF_MASK)
11047 /*! @} */
11048 
11049 /*! @name SSR - Slave Status Register */
11050 /*! @{ */
11051 
11052 #define LPI2C_SSR_TDF_MASK                       (0x1U)
11053 #define LPI2C_SSR_TDF_SHIFT                      (0U)
11054 /*! TDF - Transmit Data Flag
11055  *  0b0..Transmit data not requested
11056  *  0b1..Transmit data is requested
11057  */
11058 #define LPI2C_SSR_TDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_TDF_SHIFT)) & LPI2C_SSR_TDF_MASK)
11059 
11060 #define LPI2C_SSR_RDF_MASK                       (0x2U)
11061 #define LPI2C_SSR_RDF_SHIFT                      (1U)
11062 /*! RDF - Receive Data Flag
11063  *  0b0..Receive data is not ready
11064  *  0b1..Receive data is ready
11065  */
11066 #define LPI2C_SSR_RDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_RDF_SHIFT)) & LPI2C_SSR_RDF_MASK)
11067 
11068 #define LPI2C_SSR_AVF_MASK                       (0x4U)
11069 #define LPI2C_SSR_AVF_SHIFT                      (2U)
11070 /*! AVF - Address Valid Flag
11071  *  0b0..Address Status Register is not valid
11072  *  0b1..Address Status Register is valid
11073  */
11074 #define LPI2C_SSR_AVF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AVF_SHIFT)) & LPI2C_SSR_AVF_MASK)
11075 
11076 #define LPI2C_SSR_TAF_MASK                       (0x8U)
11077 #define LPI2C_SSR_TAF_SHIFT                      (3U)
11078 /*! TAF - Transmit ACK Flag
11079  *  0b0..Transmit ACK/NACK is not required
11080  *  0b1..Transmit ACK/NACK is required
11081  */
11082 #define LPI2C_SSR_TAF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_TAF_SHIFT)) & LPI2C_SSR_TAF_MASK)
11083 
11084 #define LPI2C_SSR_RSF_MASK                       (0x100U)
11085 #define LPI2C_SSR_RSF_SHIFT                      (8U)
11086 /*! RSF - Repeated Start Flag
11087  *  0b0..Slave has not detected a Repeated START condition
11088  *  0b1..Slave has detected a Repeated START condition
11089  */
11090 #define LPI2C_SSR_RSF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_RSF_SHIFT)) & LPI2C_SSR_RSF_MASK)
11091 
11092 #define LPI2C_SSR_SDF_MASK                       (0x200U)
11093 #define LPI2C_SSR_SDF_SHIFT                      (9U)
11094 /*! SDF - STOP Detect Flag
11095  *  0b0..Slave has not detected a STOP condition
11096  *  0b1..Slave has detected a STOP condition
11097  */
11098 #define LPI2C_SSR_SDF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SDF_SHIFT)) & LPI2C_SSR_SDF_MASK)
11099 
11100 #define LPI2C_SSR_BEF_MASK                       (0x400U)
11101 #define LPI2C_SSR_BEF_SHIFT                      (10U)
11102 /*! BEF - Bit Error Flag
11103  *  0b0..Slave has not detected a bit error
11104  *  0b1..Slave has detected a bit error
11105  */
11106 #define LPI2C_SSR_BEF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_BEF_SHIFT)) & LPI2C_SSR_BEF_MASK)
11107 
11108 #define LPI2C_SSR_FEF_MASK                       (0x800U)
11109 #define LPI2C_SSR_FEF_SHIFT                      (11U)
11110 /*! FEF - FIFO Error Flag
11111  *  0b0..FIFO underflow or overflow was not detected
11112  *  0b1..FIFO underflow or overflow was detected
11113  */
11114 #define LPI2C_SSR_FEF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_FEF_SHIFT)) & LPI2C_SSR_FEF_MASK)
11115 
11116 #define LPI2C_SSR_AM0F_MASK                      (0x1000U)
11117 #define LPI2C_SSR_AM0F_SHIFT                     (12U)
11118 /*! AM0F - Address Match 0 Flag
11119  *  0b0..Have not received an ADDR0 matching address
11120  *  0b1..Have received an ADDR0 matching address
11121  */
11122 #define LPI2C_SSR_AM0F(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AM0F_SHIFT)) & LPI2C_SSR_AM0F_MASK)
11123 
11124 #define LPI2C_SSR_AM1F_MASK                      (0x2000U)
11125 #define LPI2C_SSR_AM1F_SHIFT                     (13U)
11126 /*! AM1F - Address Match 1 Flag
11127  *  0b0..Have not received an ADDR1 or ADDR0/ADDR1 range matching address
11128  *  0b1..Have received an ADDR1 or ADDR0/ADDR1 range matching address
11129  */
11130 #define LPI2C_SSR_AM1F(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AM1F_SHIFT)) & LPI2C_SSR_AM1F_MASK)
11131 
11132 #define LPI2C_SSR_GCF_MASK                       (0x4000U)
11133 #define LPI2C_SSR_GCF_SHIFT                      (14U)
11134 /*! GCF - General Call Flag
11135  *  0b0..Slave has not detected the General Call Address or the General Call Address is disabled
11136  *  0b1..Slave has detected the General Call Address
11137  */
11138 #define LPI2C_SSR_GCF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_GCF_SHIFT)) & LPI2C_SSR_GCF_MASK)
11139 
11140 #define LPI2C_SSR_SARF_MASK                      (0x8000U)
11141 #define LPI2C_SSR_SARF_SHIFT                     (15U)
11142 /*! SARF - SMBus Alert Response Flag
11143  *  0b0..SMBus Alert Response is disabled or not detected
11144  *  0b1..SMBus Alert Response is enabled and detected
11145  */
11146 #define LPI2C_SSR_SARF(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SARF_SHIFT)) & LPI2C_SSR_SARF_MASK)
11147 
11148 #define LPI2C_SSR_SBF_MASK                       (0x1000000U)
11149 #define LPI2C_SSR_SBF_SHIFT                      (24U)
11150 /*! SBF - Slave Busy Flag
11151  *  0b0..I2C Slave is idle
11152  *  0b1..I2C Slave is busy
11153  */
11154 #define LPI2C_SSR_SBF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SBF_SHIFT)) & LPI2C_SSR_SBF_MASK)
11155 
11156 #define LPI2C_SSR_BBF_MASK                       (0x2000000U)
11157 #define LPI2C_SSR_BBF_SHIFT                      (25U)
11158 /*! BBF - Bus Busy Flag
11159  *  0b0..I2C Bus is idle
11160  *  0b1..I2C Bus is busy
11161  */
11162 #define LPI2C_SSR_BBF(x)                         (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_BBF_SHIFT)) & LPI2C_SSR_BBF_MASK)
11163 /*! @} */
11164 
11165 /*! @name SIER - Slave Interrupt Enable Register */
11166 /*! @{ */
11167 
11168 #define LPI2C_SIER_TDIE_MASK                     (0x1U)
11169 #define LPI2C_SIER_TDIE_SHIFT                    (0U)
11170 /*! TDIE - Transmit Data Interrupt Enable
11171  *  0b0..Disabled
11172  *  0b1..Enabled
11173  */
11174 #define LPI2C_SIER_TDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_TDIE_SHIFT)) & LPI2C_SIER_TDIE_MASK)
11175 
11176 #define LPI2C_SIER_RDIE_MASK                     (0x2U)
11177 #define LPI2C_SIER_RDIE_SHIFT                    (1U)
11178 /*! RDIE - Receive Data Interrupt Enable
11179  *  0b0..Disabled
11180  *  0b1..Enabled
11181  */
11182 #define LPI2C_SIER_RDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_RDIE_SHIFT)) & LPI2C_SIER_RDIE_MASK)
11183 
11184 #define LPI2C_SIER_AVIE_MASK                     (0x4U)
11185 #define LPI2C_SIER_AVIE_SHIFT                    (2U)
11186 /*! AVIE - Address Valid Interrupt Enable
11187  *  0b0..Disabled
11188  *  0b1..Enabled
11189  */
11190 #define LPI2C_SIER_AVIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AVIE_SHIFT)) & LPI2C_SIER_AVIE_MASK)
11191 
11192 #define LPI2C_SIER_TAIE_MASK                     (0x8U)
11193 #define LPI2C_SIER_TAIE_SHIFT                    (3U)
11194 /*! TAIE - Transmit ACK Interrupt Enable
11195  *  0b0..Disabled
11196  *  0b1..Enabled
11197  */
11198 #define LPI2C_SIER_TAIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_TAIE_SHIFT)) & LPI2C_SIER_TAIE_MASK)
11199 
11200 #define LPI2C_SIER_RSIE_MASK                     (0x100U)
11201 #define LPI2C_SIER_RSIE_SHIFT                    (8U)
11202 /*! RSIE - Repeated Start Interrupt Enable
11203  *  0b0..Disabled
11204  *  0b1..Enabled
11205  */
11206 #define LPI2C_SIER_RSIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_RSIE_SHIFT)) & LPI2C_SIER_RSIE_MASK)
11207 
11208 #define LPI2C_SIER_SDIE_MASK                     (0x200U)
11209 #define LPI2C_SIER_SDIE_SHIFT                    (9U)
11210 /*! SDIE - STOP Detect Interrupt Enable
11211  *  0b0..Disabled
11212  *  0b1..Enabled
11213  */
11214 #define LPI2C_SIER_SDIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_SDIE_SHIFT)) & LPI2C_SIER_SDIE_MASK)
11215 
11216 #define LPI2C_SIER_BEIE_MASK                     (0x400U)
11217 #define LPI2C_SIER_BEIE_SHIFT                    (10U)
11218 /*! BEIE - Bit Error Interrupt Enable
11219  *  0b0..Disabled
11220  *  0b1..Enabled
11221  */
11222 #define LPI2C_SIER_BEIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_BEIE_SHIFT)) & LPI2C_SIER_BEIE_MASK)
11223 
11224 #define LPI2C_SIER_FEIE_MASK                     (0x800U)
11225 #define LPI2C_SIER_FEIE_SHIFT                    (11U)
11226 /*! FEIE - FIFO Error Interrupt Enable
11227  *  0b0..Disabled
11228  *  0b1..Enabled
11229  */
11230 #define LPI2C_SIER_FEIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_FEIE_SHIFT)) & LPI2C_SIER_FEIE_MASK)
11231 
11232 #define LPI2C_SIER_AM0IE_MASK                    (0x1000U)
11233 #define LPI2C_SIER_AM0IE_SHIFT                   (12U)
11234 /*! AM0IE - Address Match 0 Interrupt Enable
11235  *  0b0..Enabled
11236  *  0b1..Disabled
11237  */
11238 #define LPI2C_SIER_AM0IE(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AM0IE_SHIFT)) & LPI2C_SIER_AM0IE_MASK)
11239 
11240 #define LPI2C_SIER_AM1F_MASK                     (0x2000U)
11241 #define LPI2C_SIER_AM1F_SHIFT                    (13U)
11242 /*! AM1F - Address Match 1 Interrupt Enable
11243  *  0b0..Disabled
11244  *  0b1..Enabled
11245  */
11246 #define LPI2C_SIER_AM1F(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AM1F_SHIFT)) & LPI2C_SIER_AM1F_MASK)
11247 
11248 #define LPI2C_SIER_GCIE_MASK                     (0x4000U)
11249 #define LPI2C_SIER_GCIE_SHIFT                    (14U)
11250 /*! GCIE - General Call Interrupt Enable
11251  *  0b0..Disabled
11252  *  0b1..Enabled
11253  */
11254 #define LPI2C_SIER_GCIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_GCIE_SHIFT)) & LPI2C_SIER_GCIE_MASK)
11255 
11256 #define LPI2C_SIER_SARIE_MASK                    (0x8000U)
11257 #define LPI2C_SIER_SARIE_SHIFT                   (15U)
11258 /*! SARIE - SMBus Alert Response Interrupt Enable
11259  *  0b0..Disabled
11260  *  0b1..Enabled
11261  */
11262 #define LPI2C_SIER_SARIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_SARIE_SHIFT)) & LPI2C_SIER_SARIE_MASK)
11263 /*! @} */
11264 
11265 /*! @name SDER - Slave DMA Enable Register */
11266 /*! @{ */
11267 
11268 #define LPI2C_SDER_TDDE_MASK                     (0x1U)
11269 #define LPI2C_SDER_TDDE_SHIFT                    (0U)
11270 /*! TDDE - Transmit Data DMA Enable
11271  *  0b0..DMA request is disabled
11272  *  0b1..DMA request is enabled
11273  */
11274 #define LPI2C_SDER_TDDE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_TDDE_SHIFT)) & LPI2C_SDER_TDDE_MASK)
11275 
11276 #define LPI2C_SDER_RDDE_MASK                     (0x2U)
11277 #define LPI2C_SDER_RDDE_SHIFT                    (1U)
11278 /*! RDDE - Receive Data DMA Enable
11279  *  0b0..DMA request is disabled
11280  *  0b1..DMA request is enabled
11281  */
11282 #define LPI2C_SDER_RDDE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_RDDE_SHIFT)) & LPI2C_SDER_RDDE_MASK)
11283 
11284 #define LPI2C_SDER_AVDE_MASK                     (0x4U)
11285 #define LPI2C_SDER_AVDE_SHIFT                    (2U)
11286 /*! AVDE - Address Valid DMA Enable
11287  *  0b0..DMA request is disabled
11288  *  0b1..DMA request is enabled
11289  */
11290 #define LPI2C_SDER_AVDE(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_AVDE_SHIFT)) & LPI2C_SDER_AVDE_MASK)
11291 /*! @} */
11292 
11293 /*! @name SCFGR1 - Slave Configuration Register 1 */
11294 /*! @{ */
11295 
11296 #define LPI2C_SCFGR1_ADRSTALL_MASK               (0x1U)
11297 #define LPI2C_SCFGR1_ADRSTALL_SHIFT              (0U)
11298 /*! ADRSTALL - Address SCL Stall
11299  *  0b0..Clock stretching is disabled
11300  *  0b1..Clock stretching is enabled
11301  */
11302 #define LPI2C_SCFGR1_ADRSTALL(x)                 (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ADRSTALL_SHIFT)) & LPI2C_SCFGR1_ADRSTALL_MASK)
11303 
11304 #define LPI2C_SCFGR1_RXSTALL_MASK                (0x2U)
11305 #define LPI2C_SCFGR1_RXSTALL_SHIFT               (1U)
11306 /*! RXSTALL - RX SCL Stall
11307  *  0b0..Clock stretching is disabled
11308  *  0b1..Clock stretching is enabled
11309  */
11310 #define LPI2C_SCFGR1_RXSTALL(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_RXSTALL_SHIFT)) & LPI2C_SCFGR1_RXSTALL_MASK)
11311 
11312 #define LPI2C_SCFGR1_TXDSTALL_MASK               (0x4U)
11313 #define LPI2C_SCFGR1_TXDSTALL_SHIFT              (2U)
11314 /*! TXDSTALL - TX Data SCL Stall
11315  *  0b0..Clock stretching is disabled
11316  *  0b1..Clock stretching is enabled
11317  */
11318 #define LPI2C_SCFGR1_TXDSTALL(x)                 (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_TXDSTALL_SHIFT)) & LPI2C_SCFGR1_TXDSTALL_MASK)
11319 
11320 #define LPI2C_SCFGR1_ACKSTALL_MASK               (0x8U)
11321 #define LPI2C_SCFGR1_ACKSTALL_SHIFT              (3U)
11322 /*! ACKSTALL - ACK SCL Stall
11323  *  0b0..Clock stretching is disabled
11324  *  0b1..Clock stretching is enabled
11325  */
11326 #define LPI2C_SCFGR1_ACKSTALL(x)                 (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ACKSTALL_SHIFT)) & LPI2C_SCFGR1_ACKSTALL_MASK)
11327 
11328 #define LPI2C_SCFGR1_GCEN_MASK                   (0x100U)
11329 #define LPI2C_SCFGR1_GCEN_SHIFT                  (8U)
11330 /*! GCEN - General Call Enable
11331  *  0b0..General Call address is disabled
11332  *  0b1..General Call address is enabled
11333  */
11334 #define LPI2C_SCFGR1_GCEN(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_GCEN_SHIFT)) & LPI2C_SCFGR1_GCEN_MASK)
11335 
11336 #define LPI2C_SCFGR1_SAEN_MASK                   (0x200U)
11337 #define LPI2C_SCFGR1_SAEN_SHIFT                  (9U)
11338 /*! SAEN - SMBus Alert Enable
11339  *  0b0..Disables match on SMBus Alert
11340  *  0b1..Enables match on SMBus Alert
11341  */
11342 #define LPI2C_SCFGR1_SAEN(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_SAEN_SHIFT)) & LPI2C_SCFGR1_SAEN_MASK)
11343 
11344 #define LPI2C_SCFGR1_TXCFG_MASK                  (0x400U)
11345 #define LPI2C_SCFGR1_TXCFG_SHIFT                 (10U)
11346 /*! TXCFG - Transmit Flag Configuration
11347  *  0b0..Transmit Data Flag will only assert during a slave-transmit transfer when the Transmit Data register is empty
11348  *  0b1..Transmit Data Flag will assert whenever the Transmit Data register is empty
11349  */
11350 #define LPI2C_SCFGR1_TXCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_TXCFG_SHIFT)) & LPI2C_SCFGR1_TXCFG_MASK)
11351 
11352 #define LPI2C_SCFGR1_RXCFG_MASK                  (0x800U)
11353 #define LPI2C_SCFGR1_RXCFG_SHIFT                 (11U)
11354 /*! RXCFG - Receive Data Configuration
11355  *  0b0..Reading the Receive Data register will return received data and clear the Receive Data flag (MSR[RDF]).
11356  *  0b1..Reading the Receive Data register when the Address Valid flag (SSR[AVF])is set, will return the Address
11357  *       Status register and clear the Address Valid flag. Reading the Receive Data register when the Address Valid
11358  *       flag is clear, will return received data and clear the Receive Data flag (MSR[RDF]).
11359  */
11360 #define LPI2C_SCFGR1_RXCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_RXCFG_SHIFT)) & LPI2C_SCFGR1_RXCFG_MASK)
11361 
11362 #define LPI2C_SCFGR1_IGNACK_MASK                 (0x1000U)
11363 #define LPI2C_SCFGR1_IGNACK_SHIFT                (12U)
11364 /*! IGNACK - Ignore NACK
11365  *  0b0..Slave will end transfer when NACK is detected
11366  *  0b1..Slave will not end transfer when NACK detected
11367  */
11368 #define LPI2C_SCFGR1_IGNACK(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_IGNACK_SHIFT)) & LPI2C_SCFGR1_IGNACK_MASK)
11369 
11370 #define LPI2C_SCFGR1_HSMEN_MASK                  (0x2000U)
11371 #define LPI2C_SCFGR1_HSMEN_SHIFT                 (13U)
11372 /*! HSMEN - High Speed Mode Enable
11373  *  0b0..Disables detection of HS-mode master code
11374  *  0b1..Enables detection of HS-mode master code
11375  */
11376 #define LPI2C_SCFGR1_HSMEN(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_HSMEN_SHIFT)) & LPI2C_SCFGR1_HSMEN_MASK)
11377 
11378 #define LPI2C_SCFGR1_ADDRCFG_MASK                (0x70000U)
11379 #define LPI2C_SCFGR1_ADDRCFG_SHIFT               (16U)
11380 /*! ADDRCFG - Address Configuration
11381  *  0b000..Address match 0 (7-bit)
11382  *  0b001..Address match 0 (10-bit)
11383  *  0b010..Address match 0 (7-bit) or Address match 1 (7-bit)
11384  *  0b011..Address match 0 (10-bit) or Address match 1 (10-bit)
11385  *  0b100..Address match 0 (7-bit) or Address match 1 (10-bit)
11386  *  0b101..Address match 0 (10-bit) or Address match 1 (7-bit)
11387  *  0b110..From Address match 0 (7-bit) to Address match 1 (7-bit)
11388  *  0b111..From Address match 0 (10-bit) to Address match 1 (10-bit)
11389  */
11390 #define LPI2C_SCFGR1_ADDRCFG(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ADDRCFG_SHIFT)) & LPI2C_SCFGR1_ADDRCFG_MASK)
11391 /*! @} */
11392 
11393 /*! @name SCFGR2 - Slave Configuration Register 2 */
11394 /*! @{ */
11395 
11396 #define LPI2C_SCFGR2_CLKHOLD_MASK                (0xFU)
11397 #define LPI2C_SCFGR2_CLKHOLD_SHIFT               (0U)
11398 /*! CLKHOLD - Clock Hold Time */
11399 #define LPI2C_SCFGR2_CLKHOLD(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_CLKHOLD_SHIFT)) & LPI2C_SCFGR2_CLKHOLD_MASK)
11400 
11401 #define LPI2C_SCFGR2_DATAVD_MASK                 (0x3F00U)
11402 #define LPI2C_SCFGR2_DATAVD_SHIFT                (8U)
11403 /*! DATAVD - Data Valid Delay */
11404 #define LPI2C_SCFGR2_DATAVD(x)                   (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_DATAVD_SHIFT)) & LPI2C_SCFGR2_DATAVD_MASK)
11405 
11406 #define LPI2C_SCFGR2_FILTSCL_MASK                (0xF0000U)
11407 #define LPI2C_SCFGR2_FILTSCL_SHIFT               (16U)
11408 /*! FILTSCL - Glitch Filter SCL */
11409 #define LPI2C_SCFGR2_FILTSCL(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_FILTSCL_SHIFT)) & LPI2C_SCFGR2_FILTSCL_MASK)
11410 
11411 #define LPI2C_SCFGR2_FILTSDA_MASK                (0xF000000U)
11412 #define LPI2C_SCFGR2_FILTSDA_SHIFT               (24U)
11413 /*! FILTSDA - Glitch Filter SDA */
11414 #define LPI2C_SCFGR2_FILTSDA(x)                  (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_FILTSDA_SHIFT)) & LPI2C_SCFGR2_FILTSDA_MASK)
11415 /*! @} */
11416 
11417 /*! @name SAMR - Slave Address Match Register */
11418 /*! @{ */
11419 
11420 #define LPI2C_SAMR_ADDR0_MASK                    (0x7FEU)
11421 #define LPI2C_SAMR_ADDR0_SHIFT                   (1U)
11422 /*! ADDR0 - Address 0 Value */
11423 #define LPI2C_SAMR_ADDR0(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SAMR_ADDR0_SHIFT)) & LPI2C_SAMR_ADDR0_MASK)
11424 
11425 #define LPI2C_SAMR_ADDR1_MASK                    (0x7FE0000U)
11426 #define LPI2C_SAMR_ADDR1_SHIFT                   (17U)
11427 /*! ADDR1 - Address 1 Value */
11428 #define LPI2C_SAMR_ADDR1(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SAMR_ADDR1_SHIFT)) & LPI2C_SAMR_ADDR1_MASK)
11429 /*! @} */
11430 
11431 /*! @name SASR - Slave Address Status Register */
11432 /*! @{ */
11433 
11434 #define LPI2C_SASR_RADDR_MASK                    (0x7FFU)
11435 #define LPI2C_SASR_RADDR_SHIFT                   (0U)
11436 /*! RADDR - Received Address */
11437 #define LPI2C_SASR_RADDR(x)                      (((uint32_t)(((uint32_t)(x)) << LPI2C_SASR_RADDR_SHIFT)) & LPI2C_SASR_RADDR_MASK)
11438 
11439 #define LPI2C_SASR_ANV_MASK                      (0x4000U)
11440 #define LPI2C_SASR_ANV_SHIFT                     (14U)
11441 /*! ANV - Address Not Valid
11442  *  0b0..Received Address (RADDR) is valid
11443  *  0b1..Received Address (RADDR) is not valid
11444  */
11445 #define LPI2C_SASR_ANV(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_SASR_ANV_SHIFT)) & LPI2C_SASR_ANV_MASK)
11446 /*! @} */
11447 
11448 /*! @name STAR - Slave Transmit ACK Register */
11449 /*! @{ */
11450 
11451 #define LPI2C_STAR_TXNACK_MASK                   (0x1U)
11452 #define LPI2C_STAR_TXNACK_SHIFT                  (0U)
11453 /*! TXNACK - Transmit NACK
11454  *  0b0..Write a Transmit ACK for each received word
11455  *  0b1..Write a Transmit NACK for each received word
11456  */
11457 #define LPI2C_STAR_TXNACK(x)                     (((uint32_t)(((uint32_t)(x)) << LPI2C_STAR_TXNACK_SHIFT)) & LPI2C_STAR_TXNACK_MASK)
11458 /*! @} */
11459 
11460 /*! @name STDR - Slave Transmit Data Register */
11461 /*! @{ */
11462 
11463 #define LPI2C_STDR_DATA_MASK                     (0xFFU)
11464 #define LPI2C_STDR_DATA_SHIFT                    (0U)
11465 /*! DATA - Transmit Data */
11466 #define LPI2C_STDR_DATA(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_STDR_DATA_SHIFT)) & LPI2C_STDR_DATA_MASK)
11467 /*! @} */
11468 
11469 /*! @name SRDR - Slave Receive Data Register */
11470 /*! @{ */
11471 
11472 #define LPI2C_SRDR_DATA_MASK                     (0xFFU)
11473 #define LPI2C_SRDR_DATA_SHIFT                    (0U)
11474 /*! DATA - Receive Data */
11475 #define LPI2C_SRDR_DATA(x)                       (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_DATA_SHIFT)) & LPI2C_SRDR_DATA_MASK)
11476 
11477 #define LPI2C_SRDR_RXEMPTY_MASK                  (0x4000U)
11478 #define LPI2C_SRDR_RXEMPTY_SHIFT                 (14U)
11479 /*! RXEMPTY - RX Empty
11480  *  0b0..The Receive Data Register is not empty
11481  *  0b1..The Receive Data Register is empty
11482  */
11483 #define LPI2C_SRDR_RXEMPTY(x)                    (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_RXEMPTY_SHIFT)) & LPI2C_SRDR_RXEMPTY_MASK)
11484 
11485 #define LPI2C_SRDR_SOF_MASK                      (0x8000U)
11486 #define LPI2C_SRDR_SOF_SHIFT                     (15U)
11487 /*! SOF - Start Of Frame
11488  *  0b0..Indicates this is not the first data word since a (repeated) START or STOP condition
11489  *  0b1..Indicates this is the first data word since a (repeated) START or STOP condition
11490  */
11491 #define LPI2C_SRDR_SOF(x)                        (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_SOF_SHIFT)) & LPI2C_SRDR_SOF_MASK)
11492 /*! @} */
11493 
11494 
11495 /*!
11496  * @}
11497  */ /* end of group LPI2C_Register_Masks */
11498 
11499 
11500 /* LPI2C - Peripheral instance base addresses */
11501 /** Peripheral LPI2C0 base address */
11502 #define LPI2C0_BASE                              (0x4003A000u)
11503 /** Peripheral LPI2C0 base pointer */
11504 #define LPI2C0                                   ((LPI2C_Type *)LPI2C0_BASE)
11505 /** Peripheral LPI2C1 base address */
11506 #define LPI2C1_BASE                              (0x4003B000u)
11507 /** Peripheral LPI2C1 base pointer */
11508 #define LPI2C1                                   ((LPI2C_Type *)LPI2C1_BASE)
11509 /** Peripheral LPI2C2 base address */
11510 #define LPI2C2_BASE                              (0x4003C000u)
11511 /** Peripheral LPI2C2 base pointer */
11512 #define LPI2C2                                   ((LPI2C_Type *)LPI2C2_BASE)
11513 /** Peripheral LPI2C3 base address */
11514 #define LPI2C3_BASE                              (0x4102E000u)
11515 /** Peripheral LPI2C3 base pointer */
11516 #define LPI2C3                                   ((LPI2C_Type *)LPI2C3_BASE)
11517 /** Array initializer of LPI2C peripheral base addresses */
11518 #define LPI2C_BASE_ADDRS                         { LPI2C0_BASE, LPI2C1_BASE, LPI2C2_BASE, LPI2C3_BASE }
11519 /** Array initializer of LPI2C peripheral base pointers */
11520 #define LPI2C_BASE_PTRS                          { LPI2C0, LPI2C1, LPI2C2, LPI2C3 }
11521 /** Interrupt vectors for the LPI2C peripheral type */
11522 #define LPI2C_IRQS                               { LPI2C0_IRQn, LPI2C1_IRQn, LPI2C2_IRQn, LPI2C3_IRQn }
11523 
11524 /*!
11525  * @}
11526  */ /* end of group LPI2C_Peripheral_Access_Layer */
11527 
11528 
11529 /* ----------------------------------------------------------------------------
11530    -- LPIT Peripheral Access Layer
11531    ---------------------------------------------------------------------------- */
11532 
11533 /*!
11534  * @addtogroup LPIT_Peripheral_Access_Layer LPIT Peripheral Access Layer
11535  * @{
11536  */
11537 
11538 /** LPIT - Register Layout Typedef */
11539 typedef struct {
11540   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
11541   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
11542   __IO uint32_t MCR;                               /**< Module Control Register, offset: 0x8 */
11543   __IO uint32_t MSR;                               /**< Module Status Register, offset: 0xC */
11544   __IO uint32_t MIER;                              /**< Module Interrupt Enable Register, offset: 0x10 */
11545   __IO uint32_t SETTEN;                            /**< Set Timer Enable Register, offset: 0x14 */
11546   __O  uint32_t CLRTEN;                            /**< Clear Timer Enable Register, offset: 0x18 */
11547        uint8_t RESERVED_0[4];
11548   struct {                                         /* offset: 0x20, array step: 0x10 */
11549     __IO uint32_t TVAL;                              /**< Timer Value Register, array offset: 0x20, array step: 0x10 */
11550     __I  uint32_t CVAL;                              /**< Current Timer Value, array offset: 0x24, array step: 0x10 */
11551     __IO uint32_t TCTRL;                             /**< Timer Control Register, array offset: 0x28, array step: 0x10 */
11552          uint8_t RESERVED_0[4];
11553   } CHANNEL[4];
11554 } LPIT_Type;
11555 
11556 /* ----------------------------------------------------------------------------
11557    -- LPIT Register Masks
11558    ---------------------------------------------------------------------------- */
11559 
11560 /*!
11561  * @addtogroup LPIT_Register_Masks LPIT Register Masks
11562  * @{
11563  */
11564 
11565 /*! @name VERID - Version ID Register */
11566 /*! @{ */
11567 
11568 #define LPIT_VERID_FEATURE_MASK                  (0xFFFFU)
11569 #define LPIT_VERID_FEATURE_SHIFT                 (0U)
11570 /*! FEATURE - Feature Number */
11571 #define LPIT_VERID_FEATURE(x)                    (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_FEATURE_SHIFT)) & LPIT_VERID_FEATURE_MASK)
11572 
11573 #define LPIT_VERID_MINOR_MASK                    (0xFF0000U)
11574 #define LPIT_VERID_MINOR_SHIFT                   (16U)
11575 /*! MINOR - Minor Version Number */
11576 #define LPIT_VERID_MINOR(x)                      (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_MINOR_SHIFT)) & LPIT_VERID_MINOR_MASK)
11577 
11578 #define LPIT_VERID_MAJOR_MASK                    (0xFF000000U)
11579 #define LPIT_VERID_MAJOR_SHIFT                   (24U)
11580 /*! MAJOR - Major Version Number */
11581 #define LPIT_VERID_MAJOR(x)                      (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_MAJOR_SHIFT)) & LPIT_VERID_MAJOR_MASK)
11582 /*! @} */
11583 
11584 /*! @name PARAM - Parameter Register */
11585 /*! @{ */
11586 
11587 #define LPIT_PARAM_CHANNEL_MASK                  (0xFFU)
11588 #define LPIT_PARAM_CHANNEL_SHIFT                 (0U)
11589 /*! CHANNEL - Number of Timer Channels */
11590 #define LPIT_PARAM_CHANNEL(x)                    (((uint32_t)(((uint32_t)(x)) << LPIT_PARAM_CHANNEL_SHIFT)) & LPIT_PARAM_CHANNEL_MASK)
11591 
11592 #define LPIT_PARAM_EXT_TRIG_MASK                 (0xFF00U)
11593 #define LPIT_PARAM_EXT_TRIG_SHIFT                (8U)
11594 /*! EXT_TRIG - Number of External Trigger Inputs */
11595 #define LPIT_PARAM_EXT_TRIG(x)                   (((uint32_t)(((uint32_t)(x)) << LPIT_PARAM_EXT_TRIG_SHIFT)) & LPIT_PARAM_EXT_TRIG_MASK)
11596 /*! @} */
11597 
11598 /*! @name MCR - Module Control Register */
11599 /*! @{ */
11600 
11601 #define LPIT_MCR_M_CEN_MASK                      (0x1U)
11602 #define LPIT_MCR_M_CEN_SHIFT                     (0U)
11603 /*! M_CEN - Module Clock Enable
11604  *  0b0..Disable peripheral clock to timers
11605  *  0b1..Enable peripheral clock to timers
11606  */
11607 #define LPIT_MCR_M_CEN(x)                        (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_M_CEN_SHIFT)) & LPIT_MCR_M_CEN_MASK)
11608 
11609 #define LPIT_MCR_SW_RST_MASK                     (0x2U)
11610 #define LPIT_MCR_SW_RST_SHIFT                    (1U)
11611 /*! SW_RST - Software Reset Bit
11612  *  0b0..Timer channels and registers are not reset
11613  *  0b1..Reset timer channels and registers
11614  */
11615 #define LPIT_MCR_SW_RST(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_SW_RST_SHIFT)) & LPIT_MCR_SW_RST_MASK)
11616 
11617 #define LPIT_MCR_DOZE_EN_MASK                    (0x4U)
11618 #define LPIT_MCR_DOZE_EN_SHIFT                   (2U)
11619 /*! DOZE_EN - DOZE Mode Enable Bit
11620  *  0b0..Stop timer channels in DOZE mode
11621  *  0b1..Allow timer channels to continue to run in DOZE mode
11622  */
11623 #define LPIT_MCR_DOZE_EN(x)                      (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_DOZE_EN_SHIFT)) & LPIT_MCR_DOZE_EN_MASK)
11624 
11625 #define LPIT_MCR_DBG_EN_MASK                     (0x8U)
11626 #define LPIT_MCR_DBG_EN_SHIFT                    (3U)
11627 /*! DBG_EN - Debug Enable Bit
11628  *  0b0..Stop timer channels in Debug mode
11629  *  0b1..Allow timer channels to continue to run in Debug mode
11630  */
11631 #define LPIT_MCR_DBG_EN(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_DBG_EN_SHIFT)) & LPIT_MCR_DBG_EN_MASK)
11632 /*! @} */
11633 
11634 /*! @name MSR - Module Status Register */
11635 /*! @{ */
11636 
11637 #define LPIT_MSR_TIF0_MASK                       (0x1U)
11638 #define LPIT_MSR_TIF0_SHIFT                      (0U)
11639 /*! TIF0 - Channel 0 Timer Interrupt Flag
11640  *  0b0..Timer has not timed out
11641  *  0b1..Timeout has occurred (timer has timed out)
11642  */
11643 #define LPIT_MSR_TIF0(x)                         (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF0_SHIFT)) & LPIT_MSR_TIF0_MASK)
11644 
11645 #define LPIT_MSR_TIF1_MASK                       (0x2U)
11646 #define LPIT_MSR_TIF1_SHIFT                      (1U)
11647 /*! TIF1 - Channel 1 Timer Interrupt Flag
11648  *  0b0..Timer has not timed out
11649  *  0b1..Timeout has occurred (timer has timed out)
11650  */
11651 #define LPIT_MSR_TIF1(x)                         (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF1_SHIFT)) & LPIT_MSR_TIF1_MASK)
11652 
11653 #define LPIT_MSR_TIF2_MASK                       (0x4U)
11654 #define LPIT_MSR_TIF2_SHIFT                      (2U)
11655 /*! TIF2 - Channel 2 Timer Interrupt Flag
11656  *  0b0..Timer has not timed out
11657  *  0b1..Timeout has occurred (timer has timed out)
11658  */
11659 #define LPIT_MSR_TIF2(x)                         (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF2_SHIFT)) & LPIT_MSR_TIF2_MASK)
11660 
11661 #define LPIT_MSR_TIF3_MASK                       (0x8U)
11662 #define LPIT_MSR_TIF3_SHIFT                      (3U)
11663 /*! TIF3 - Channel 3 Timer Interrupt Flag
11664  *  0b0..Timer has not timed out
11665  *  0b1..Timeout has occurred (timer has timed out)
11666  */
11667 #define LPIT_MSR_TIF3(x)                         (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF3_SHIFT)) & LPIT_MSR_TIF3_MASK)
11668 /*! @} */
11669 
11670 /*! @name MIER - Module Interrupt Enable Register */
11671 /*! @{ */
11672 
11673 #define LPIT_MIER_TIE0_MASK                      (0x1U)
11674 #define LPIT_MIER_TIE0_SHIFT                     (0U)
11675 /*! TIE0 - Channel 0 Timer Interrupt Enable
11676  *  0b0..Disabled
11677  *  0b1..Enabled
11678  */
11679 #define LPIT_MIER_TIE0(x)                        (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE0_SHIFT)) & LPIT_MIER_TIE0_MASK)
11680 
11681 #define LPIT_MIER_TIE1_MASK                      (0x2U)
11682 #define LPIT_MIER_TIE1_SHIFT                     (1U)
11683 /*! TIE1 - Channel 1 Timer Interrupt Enable
11684  *  0b0..Disabled
11685  *  0b1..Enabled
11686  */
11687 #define LPIT_MIER_TIE1(x)                        (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE1_SHIFT)) & LPIT_MIER_TIE1_MASK)
11688 
11689 #define LPIT_MIER_TIE2_MASK                      (0x4U)
11690 #define LPIT_MIER_TIE2_SHIFT                     (2U)
11691 /*! TIE2 - Channel 2 Timer Interrupt Enable
11692  *  0b0..Disabled
11693  *  0b1..Enabled
11694  */
11695 #define LPIT_MIER_TIE2(x)                        (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE2_SHIFT)) & LPIT_MIER_TIE2_MASK)
11696 
11697 #define LPIT_MIER_TIE3_MASK                      (0x8U)
11698 #define LPIT_MIER_TIE3_SHIFT                     (3U)
11699 /*! TIE3 - Channel 3 Timer Interrupt Enable
11700  *  0b0..Disabled
11701  *  0b1..Enabled
11702  */
11703 #define LPIT_MIER_TIE3(x)                        (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE3_SHIFT)) & LPIT_MIER_TIE3_MASK)
11704 /*! @} */
11705 
11706 /*! @name SETTEN - Set Timer Enable Register */
11707 /*! @{ */
11708 
11709 #define LPIT_SETTEN_SET_T_EN_0_MASK              (0x1U)
11710 #define LPIT_SETTEN_SET_T_EN_0_SHIFT             (0U)
11711 /*! SET_T_EN_0 - Set Timer 0 Enable
11712  *  0b0..No effect
11713  *  0b1..Enables Timer Channel 0
11714  */
11715 #define LPIT_SETTEN_SET_T_EN_0(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_0_SHIFT)) & LPIT_SETTEN_SET_T_EN_0_MASK)
11716 
11717 #define LPIT_SETTEN_SET_T_EN_1_MASK              (0x2U)
11718 #define LPIT_SETTEN_SET_T_EN_1_SHIFT             (1U)
11719 /*! SET_T_EN_1 - Set Timer 1 Enable
11720  *  0b0..No Effect
11721  *  0b1..Enables Timer Channel 1
11722  */
11723 #define LPIT_SETTEN_SET_T_EN_1(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_1_SHIFT)) & LPIT_SETTEN_SET_T_EN_1_MASK)
11724 
11725 #define LPIT_SETTEN_SET_T_EN_2_MASK              (0x4U)
11726 #define LPIT_SETTEN_SET_T_EN_2_SHIFT             (2U)
11727 /*! SET_T_EN_2 - Set Timer 2 Enable
11728  *  0b0..No Effect
11729  *  0b1..Enables Timer Channel 2
11730  */
11731 #define LPIT_SETTEN_SET_T_EN_2(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_2_SHIFT)) & LPIT_SETTEN_SET_T_EN_2_MASK)
11732 
11733 #define LPIT_SETTEN_SET_T_EN_3_MASK              (0x8U)
11734 #define LPIT_SETTEN_SET_T_EN_3_SHIFT             (3U)
11735 /*! SET_T_EN_3 - Set Timer 3 Enable
11736  *  0b0..No effect
11737  *  0b1..Enables Timer Channel 3
11738  */
11739 #define LPIT_SETTEN_SET_T_EN_3(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_3_SHIFT)) & LPIT_SETTEN_SET_T_EN_3_MASK)
11740 /*! @} */
11741 
11742 /*! @name CLRTEN - Clear Timer Enable Register */
11743 /*! @{ */
11744 
11745 #define LPIT_CLRTEN_CLR_T_EN_0_MASK              (0x1U)
11746 #define LPIT_CLRTEN_CLR_T_EN_0_SHIFT             (0U)
11747 /*! CLR_T_EN_0 - Clear Timer 0 Enable
11748  *  0b0..No action
11749  *  0b1..Clear the Timer Enable bit (TCTRL0[T_EN]) for Timer Channel 0
11750  */
11751 #define LPIT_CLRTEN_CLR_T_EN_0(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_0_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_0_MASK)
11752 
11753 #define LPIT_CLRTEN_CLR_T_EN_1_MASK              (0x2U)
11754 #define LPIT_CLRTEN_CLR_T_EN_1_SHIFT             (1U)
11755 /*! CLR_T_EN_1 - Clear Timer 1 Enable
11756  *  0b0..No Action
11757  *  0b1..Clear the Timer Enable bit (TCTRL1[T_EN]) for Timer Channel 1
11758  */
11759 #define LPIT_CLRTEN_CLR_T_EN_1(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_1_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_1_MASK)
11760 
11761 #define LPIT_CLRTEN_CLR_T_EN_2_MASK              (0x4U)
11762 #define LPIT_CLRTEN_CLR_T_EN_2_SHIFT             (2U)
11763 /*! CLR_T_EN_2 - Clear Timer 2 Enable
11764  *  0b0..No Action
11765  *  0b1..Clear the Timer Enable bit (TCTRL2[T_EN]) for Timer Channel 2
11766  */
11767 #define LPIT_CLRTEN_CLR_T_EN_2(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_2_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_2_MASK)
11768 
11769 #define LPIT_CLRTEN_CLR_T_EN_3_MASK              (0x8U)
11770 #define LPIT_CLRTEN_CLR_T_EN_3_SHIFT             (3U)
11771 /*! CLR_T_EN_3 - Clear Timer 3 Enable
11772  *  0b0..No Action
11773  *  0b1..Clear the Timer Enable bit (TCTRL3[T_EN]) for Timer Channel 3
11774  */
11775 #define LPIT_CLRTEN_CLR_T_EN_3(x)                (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_3_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_3_MASK)
11776 /*! @} */
11777 
11778 /*! @name TVAL - Timer Value Register */
11779 /*! @{ */
11780 
11781 #define LPIT_TVAL_TMR_VAL_MASK                   (0xFFFFFFFFU)
11782 #define LPIT_TVAL_TMR_VAL_SHIFT                  (0U)
11783 /*! TMR_VAL - Timer Value
11784  *  0b00000000000000000000000000000000..Invalid load value in compare mode
11785  *  0b00000000000000000000000000000001..Invalid load value in compare mode
11786  *  0b00000000000000000000000000000010-0b11111111111111111111111111111111..In compare mode: the value to be loaded; in capture mode, the value of the timer
11787  */
11788 #define LPIT_TVAL_TMR_VAL(x)                     (((uint32_t)(((uint32_t)(x)) << LPIT_TVAL_TMR_VAL_SHIFT)) & LPIT_TVAL_TMR_VAL_MASK)
11789 /*! @} */
11790 
11791 /* The count of LPIT_TVAL */
11792 #define LPIT_TVAL_COUNT                          (4U)
11793 
11794 /*! @name CVAL - Current Timer Value */
11795 /*! @{ */
11796 
11797 #define LPIT_CVAL_TMR_CUR_VAL_MASK               (0xFFFFFFFFU)
11798 #define LPIT_CVAL_TMR_CUR_VAL_SHIFT              (0U)
11799 /*! TMR_CUR_VAL - Current Timer Value */
11800 #define LPIT_CVAL_TMR_CUR_VAL(x)                 (((uint32_t)(((uint32_t)(x)) << LPIT_CVAL_TMR_CUR_VAL_SHIFT)) & LPIT_CVAL_TMR_CUR_VAL_MASK)
11801 /*! @} */
11802 
11803 /* The count of LPIT_CVAL */
11804 #define LPIT_CVAL_COUNT                          (4U)
11805 
11806 /*! @name TCTRL - Timer Control Register */
11807 /*! @{ */
11808 
11809 #define LPIT_TCTRL_T_EN_MASK                     (0x1U)
11810 #define LPIT_TCTRL_T_EN_SHIFT                    (0U)
11811 /*! T_EN - Timer Enable
11812  *  0b0..Timer Channel is disabled
11813  *  0b1..Timer Channel is enabled
11814  */
11815 #define LPIT_TCTRL_T_EN(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_T_EN_SHIFT)) & LPIT_TCTRL_T_EN_MASK)
11816 
11817 #define LPIT_TCTRL_CHAIN_MASK                    (0x2U)
11818 #define LPIT_TCTRL_CHAIN_SHIFT                   (1U)
11819 /*! CHAIN - Chain Channel
11820  *  0b0..Channel Chaining is disabled. The channel timer runs independently.
11821  *  0b1..Channel Chaining is enabled. The timer decrements on the previous channel's timeout.
11822  */
11823 #define LPIT_TCTRL_CHAIN(x)                      (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_CHAIN_SHIFT)) & LPIT_TCTRL_CHAIN_MASK)
11824 
11825 #define LPIT_TCTRL_MODE_MASK                     (0xCU)
11826 #define LPIT_TCTRL_MODE_SHIFT                    (2U)
11827 /*! MODE - Timer Operation Mode
11828  *  0b00..32-bit Periodic Counter
11829  *  0b01..Dual 16-bit Periodic Counter
11830  *  0b10..32-bit Trigger Accumulator
11831  *  0b11..32-bit Trigger Input Capture
11832  */
11833 #define LPIT_TCTRL_MODE(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_MODE_SHIFT)) & LPIT_TCTRL_MODE_MASK)
11834 
11835 #define LPIT_TCTRL_TSOT_MASK                     (0x10000U)
11836 #define LPIT_TCTRL_TSOT_SHIFT                    (16U)
11837 /*! TSOT - Timer Start On Trigger
11838  *  0b0..Timer starts to decrement immediately based on the restart condition (controlled by the Timer Stop On Interrupt bit (TSOI))
11839  *  0b1..Timer starts to decrement when a rising edge on a selected trigger is detected
11840  */
11841 #define LPIT_TCTRL_TSOT(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TSOT_SHIFT)) & LPIT_TCTRL_TSOT_MASK)
11842 
11843 #define LPIT_TCTRL_TSOI_MASK                     (0x20000U)
11844 #define LPIT_TCTRL_TSOI_SHIFT                    (17U)
11845 /*! TSOI - Timer Stop On Interrupt
11846  *  0b0..The channel timer does not stop after timeout
11847  *  0b1..The channel timer will stop after a timeout, and the channel timer will restart based on Timer Start On
11848  *       Trigger bit (TSOT). When TSOT = 0, the channel timer will restart after a rising edge on the Timer Enable
11849  *       bit (T_EN) is detected (which means that the timer channel is disabled and then enabled). When TSOT = 1,
11850  *       the channel timer will restart after a rising edge on the selected trigger is detected.
11851  */
11852 #define LPIT_TCTRL_TSOI(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TSOI_SHIFT)) & LPIT_TCTRL_TSOI_MASK)
11853 
11854 #define LPIT_TCTRL_TROT_MASK                     (0x40000U)
11855 #define LPIT_TCTRL_TROT_SHIFT                    (18U)
11856 /*! TROT - Timer Reload On Trigger
11857  *  0b0..Timer will not reload on the selected trigger
11858  *  0b1..Timer will reload on the selected trigger
11859  */
11860 #define LPIT_TCTRL_TROT(x)                       (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TROT_SHIFT)) & LPIT_TCTRL_TROT_MASK)
11861 
11862 #define LPIT_TCTRL_TRG_SRC_MASK                  (0x800000U)
11863 #define LPIT_TCTRL_TRG_SRC_SHIFT                 (23U)
11864 /*! TRG_SRC - Trigger Source
11865  *  0b0..Selects external triggers
11866  *  0b1..Selects internal triggers
11867  */
11868 #define LPIT_TCTRL_TRG_SRC(x)                    (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TRG_SRC_SHIFT)) & LPIT_TCTRL_TRG_SRC_MASK)
11869 
11870 #define LPIT_TCTRL_TRG_SEL_MASK                  (0xF000000U)
11871 #define LPIT_TCTRL_TRG_SEL_SHIFT                 (24U)
11872 /*! TRG_SEL - Trigger Select
11873  *  0b0000-0b0011..Timer channel 0 - 3 trigger source is selected
11874  *  0b0100-0b1111..Reserved
11875  */
11876 #define LPIT_TCTRL_TRG_SEL(x)                    (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TRG_SEL_SHIFT)) & LPIT_TCTRL_TRG_SEL_MASK)
11877 /*! @} */
11878 
11879 /* The count of LPIT_TCTRL */
11880 #define LPIT_TCTRL_COUNT                         (4U)
11881 
11882 
11883 /*!
11884  * @}
11885  */ /* end of group LPIT_Register_Masks */
11886 
11887 
11888 /* LPIT - Peripheral instance base addresses */
11889 /** Peripheral LPIT0 base address */
11890 #define LPIT0_BASE                               (0x40030000u)
11891 /** Peripheral LPIT0 base pointer */
11892 #define LPIT0                                    ((LPIT_Type *)LPIT0_BASE)
11893 /** Peripheral LPIT1 base address */
11894 #define LPIT1_BASE                               (0x4102A000u)
11895 /** Peripheral LPIT1 base pointer */
11896 #define LPIT1                                    ((LPIT_Type *)LPIT1_BASE)
11897 /** Array initializer of LPIT peripheral base addresses */
11898 #define LPIT_BASE_ADDRS                          { LPIT0_BASE, LPIT1_BASE }
11899 /** Array initializer of LPIT peripheral base pointers */
11900 #define LPIT_BASE_PTRS                           { LPIT0, LPIT1 }
11901 /** Interrupt vectors for the LPIT peripheral type */
11902 #define LPIT_IRQS                                { { LPIT0_IRQn, LPIT0_IRQn, LPIT0_IRQn, LPIT0_IRQn }, { LPIT1_IRQn, LPIT1_IRQn, LPIT1_IRQn, LPIT1_IRQn } }
11903 
11904 /*!
11905  * @}
11906  */ /* end of group LPIT_Peripheral_Access_Layer */
11907 
11908 
11909 /* ----------------------------------------------------------------------------
11910    -- LPSPI Peripheral Access Layer
11911    ---------------------------------------------------------------------------- */
11912 
11913 /*!
11914  * @addtogroup LPSPI_Peripheral_Access_Layer LPSPI Peripheral Access Layer
11915  * @{
11916  */
11917 
11918 /** LPSPI - Register Layout Typedef */
11919 typedef struct {
11920   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
11921   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
11922        uint8_t RESERVED_0[8];
11923   __IO uint32_t CR;                                /**< Control Register, offset: 0x10 */
11924   __IO uint32_t SR;                                /**< Status Register, offset: 0x14 */
11925   __IO uint32_t IER;                               /**< Interrupt Enable Register, offset: 0x18 */
11926   __IO uint32_t DER;                               /**< DMA Enable Register, offset: 0x1C */
11927   __IO uint32_t CFGR0;                             /**< Configuration Register 0, offset: 0x20 */
11928   __IO uint32_t CFGR1;                             /**< Configuration Register 1, offset: 0x24 */
11929        uint8_t RESERVED_1[8];
11930   __IO uint32_t DMR0;                              /**< Data Match Register 0, offset: 0x30 */
11931   __IO uint32_t DMR1;                              /**< Data Match Register 1, offset: 0x34 */
11932        uint8_t RESERVED_2[8];
11933   __IO uint32_t CCR;                               /**< Clock Configuration Register, offset: 0x40 */
11934        uint8_t RESERVED_3[20];
11935   __IO uint32_t FCR;                               /**< FIFO Control Register, offset: 0x58 */
11936   __I  uint32_t FSR;                               /**< FIFO Status Register, offset: 0x5C */
11937   __IO uint32_t TCR;                               /**< Transmit Command Register, offset: 0x60 */
11938   __O  uint32_t TDR;                               /**< Transmit Data Register, offset: 0x64 */
11939        uint8_t RESERVED_4[8];
11940   __I  uint32_t RSR;                               /**< Receive Status Register, offset: 0x70 */
11941   __I  uint32_t RDR;                               /**< Receive Data Register, offset: 0x74 */
11942 } LPSPI_Type;
11943 
11944 /* ----------------------------------------------------------------------------
11945    -- LPSPI Register Masks
11946    ---------------------------------------------------------------------------- */
11947 
11948 /*!
11949  * @addtogroup LPSPI_Register_Masks LPSPI Register Masks
11950  * @{
11951  */
11952 
11953 /*! @name VERID - Version ID Register */
11954 /*! @{ */
11955 
11956 #define LPSPI_VERID_FEATURE_MASK                 (0xFFFFU)
11957 #define LPSPI_VERID_FEATURE_SHIFT                (0U)
11958 /*! FEATURE - Module Identification Number
11959  *  0b0000000000000100..Standard feature set supporting a 32-bit shift register.
11960  */
11961 #define LPSPI_VERID_FEATURE(x)                   (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_FEATURE_SHIFT)) & LPSPI_VERID_FEATURE_MASK)
11962 
11963 #define LPSPI_VERID_MINOR_MASK                   (0xFF0000U)
11964 #define LPSPI_VERID_MINOR_SHIFT                  (16U)
11965 /*! MINOR - Minor Version Number */
11966 #define LPSPI_VERID_MINOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_MINOR_SHIFT)) & LPSPI_VERID_MINOR_MASK)
11967 
11968 #define LPSPI_VERID_MAJOR_MASK                   (0xFF000000U)
11969 #define LPSPI_VERID_MAJOR_SHIFT                  (24U)
11970 /*! MAJOR - Major Version Number */
11971 #define LPSPI_VERID_MAJOR(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_MAJOR_SHIFT)) & LPSPI_VERID_MAJOR_MASK)
11972 /*! @} */
11973 
11974 /*! @name PARAM - Parameter Register */
11975 /*! @{ */
11976 
11977 #define LPSPI_PARAM_TXFIFO_MASK                  (0xFFU)
11978 #define LPSPI_PARAM_TXFIFO_SHIFT                 (0U)
11979 /*! TXFIFO - Transmit FIFO Size */
11980 #define LPSPI_PARAM_TXFIFO(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_PARAM_TXFIFO_SHIFT)) & LPSPI_PARAM_TXFIFO_MASK)
11981 
11982 #define LPSPI_PARAM_RXFIFO_MASK                  (0xFF00U)
11983 #define LPSPI_PARAM_RXFIFO_SHIFT                 (8U)
11984 /*! RXFIFO - Receive FIFO Size */
11985 #define LPSPI_PARAM_RXFIFO(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_PARAM_RXFIFO_SHIFT)) & LPSPI_PARAM_RXFIFO_MASK)
11986 /*! @} */
11987 
11988 /*! @name CR - Control Register */
11989 /*! @{ */
11990 
11991 #define LPSPI_CR_MEN_MASK                        (0x1U)
11992 #define LPSPI_CR_MEN_SHIFT                       (0U)
11993 /*! MEN - Module Enable
11994  *  0b0..Module is disabled
11995  *  0b1..Module is enabled
11996  */
11997 #define LPSPI_CR_MEN(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_MEN_SHIFT)) & LPSPI_CR_MEN_MASK)
11998 
11999 #define LPSPI_CR_RST_MASK                        (0x2U)
12000 #define LPSPI_CR_RST_SHIFT                       (1U)
12001 /*! RST - Software Reset
12002  *  0b0..Master logic is not reset
12003  *  0b1..Master logic is reset
12004  */
12005 #define LPSPI_CR_RST(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RST_SHIFT)) & LPSPI_CR_RST_MASK)
12006 
12007 #define LPSPI_CR_DOZEN_MASK                      (0x4U)
12008 #define LPSPI_CR_DOZEN_SHIFT                     (2U)
12009 /*! DOZEN - Doze mode enable
12010  *  0b0..Module is enabled in Doze mode
12011  *  0b1..Module is disabled in Doze mode
12012  */
12013 #define LPSPI_CR_DOZEN(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_DOZEN_SHIFT)) & LPSPI_CR_DOZEN_MASK)
12014 
12015 #define LPSPI_CR_DBGEN_MASK                      (0x8U)
12016 #define LPSPI_CR_DBGEN_SHIFT                     (3U)
12017 /*! DBGEN - Debug Enable
12018  *  0b0..Module is disabled in debug mode
12019  *  0b1..Module is enabled in debug mode
12020  */
12021 #define LPSPI_CR_DBGEN(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_DBGEN_SHIFT)) & LPSPI_CR_DBGEN_MASK)
12022 
12023 #define LPSPI_CR_RTF_MASK                        (0x100U)
12024 #define LPSPI_CR_RTF_SHIFT                       (8U)
12025 /*! RTF - Reset Transmit FIFO
12026  *  0b0..No effect
12027  *  0b1..Transmit FIFO is reset
12028  */
12029 #define LPSPI_CR_RTF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RTF_SHIFT)) & LPSPI_CR_RTF_MASK)
12030 
12031 #define LPSPI_CR_RRF_MASK                        (0x200U)
12032 #define LPSPI_CR_RRF_SHIFT                       (9U)
12033 /*! RRF - Reset Receive FIFO
12034  *  0b0..No effect
12035  *  0b1..Receive FIFO is reset
12036  */
12037 #define LPSPI_CR_RRF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RRF_SHIFT)) & LPSPI_CR_RRF_MASK)
12038 /*! @} */
12039 
12040 /*! @name SR - Status Register */
12041 /*! @{ */
12042 
12043 #define LPSPI_SR_TDF_MASK                        (0x1U)
12044 #define LPSPI_SR_TDF_SHIFT                       (0U)
12045 /*! TDF - Transmit Data Flag
12046  *  0b0..Transmit data not requested
12047  *  0b1..Transmit data is requested
12048  */
12049 #define LPSPI_SR_TDF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TDF_SHIFT)) & LPSPI_SR_TDF_MASK)
12050 
12051 #define LPSPI_SR_RDF_MASK                        (0x2U)
12052 #define LPSPI_SR_RDF_SHIFT                       (1U)
12053 /*! RDF - Receive Data Flag
12054  *  0b0..Receive Data is not ready
12055  *  0b1..Receive data is ready
12056  */
12057 #define LPSPI_SR_RDF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_RDF_SHIFT)) & LPSPI_SR_RDF_MASK)
12058 
12059 #define LPSPI_SR_WCF_MASK                        (0x100U)
12060 #define LPSPI_SR_WCF_SHIFT                       (8U)
12061 /*! WCF - Word Complete Flag
12062  *  0b0..Transfer of a received word has not yet completed
12063  *  0b1..Transfer of a received word has completed
12064  */
12065 #define LPSPI_SR_WCF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_WCF_SHIFT)) & LPSPI_SR_WCF_MASK)
12066 
12067 #define LPSPI_SR_FCF_MASK                        (0x200U)
12068 #define LPSPI_SR_FCF_SHIFT                       (9U)
12069 /*! FCF - Frame Complete Flag
12070  *  0b0..Frame transfer has not completed
12071  *  0b1..Frame transfer has completed
12072  */
12073 #define LPSPI_SR_FCF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_FCF_SHIFT)) & LPSPI_SR_FCF_MASK)
12074 
12075 #define LPSPI_SR_TCF_MASK                        (0x400U)
12076 #define LPSPI_SR_TCF_SHIFT                       (10U)
12077 /*! TCF - Transfer Complete Flag
12078  *  0b0..All transfers have not completed
12079  *  0b1..All transfers have completed
12080  */
12081 #define LPSPI_SR_TCF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TCF_SHIFT)) & LPSPI_SR_TCF_MASK)
12082 
12083 #define LPSPI_SR_TEF_MASK                        (0x800U)
12084 #define LPSPI_SR_TEF_SHIFT                       (11U)
12085 /*! TEF - Transmit Error Flag
12086  *  0b0..Transmit FIFO underrun has not occurred
12087  *  0b1..Transmit FIFO underrun has occurred
12088  */
12089 #define LPSPI_SR_TEF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TEF_SHIFT)) & LPSPI_SR_TEF_MASK)
12090 
12091 #define LPSPI_SR_REF_MASK                        (0x1000U)
12092 #define LPSPI_SR_REF_SHIFT                       (12U)
12093 /*! REF - Receive Error Flag
12094  *  0b0..Receive FIFO has not overflowed
12095  *  0b1..Receive FIFO has overflowed
12096  */
12097 #define LPSPI_SR_REF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_REF_SHIFT)) & LPSPI_SR_REF_MASK)
12098 
12099 #define LPSPI_SR_DMF_MASK                        (0x2000U)
12100 #define LPSPI_SR_DMF_SHIFT                       (13U)
12101 /*! DMF - Data Match Flag
12102  *  0b0..Have not received matching data
12103  *  0b1..Have received matching data
12104  */
12105 #define LPSPI_SR_DMF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_DMF_SHIFT)) & LPSPI_SR_DMF_MASK)
12106 
12107 #define LPSPI_SR_MBF_MASK                        (0x1000000U)
12108 #define LPSPI_SR_MBF_SHIFT                       (24U)
12109 /*! MBF - Module Busy Flag
12110  *  0b0..LPSPI is idle
12111  *  0b1..LPSPI is busy
12112  */
12113 #define LPSPI_SR_MBF(x)                          (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_MBF_SHIFT)) & LPSPI_SR_MBF_MASK)
12114 /*! @} */
12115 
12116 /*! @name IER - Interrupt Enable Register */
12117 /*! @{ */
12118 
12119 #define LPSPI_IER_TDIE_MASK                      (0x1U)
12120 #define LPSPI_IER_TDIE_SHIFT                     (0U)
12121 /*! TDIE - Transmit Data Interrupt Enable
12122  *  0b0..Disabled
12123  *  0b1..Enabled
12124  */
12125 #define LPSPI_IER_TDIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TDIE_SHIFT)) & LPSPI_IER_TDIE_MASK)
12126 
12127 #define LPSPI_IER_RDIE_MASK                      (0x2U)
12128 #define LPSPI_IER_RDIE_SHIFT                     (1U)
12129 /*! RDIE - Receive Data Interrupt Enable
12130  *  0b0..Disabled
12131  *  0b1..Enabled
12132  */
12133 #define LPSPI_IER_RDIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_RDIE_SHIFT)) & LPSPI_IER_RDIE_MASK)
12134 
12135 #define LPSPI_IER_WCIE_MASK                      (0x100U)
12136 #define LPSPI_IER_WCIE_SHIFT                     (8U)
12137 /*! WCIE - Word Complete Interrupt Enable
12138  *  0b0..Disabled
12139  *  0b1..Enabled
12140  */
12141 #define LPSPI_IER_WCIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_WCIE_SHIFT)) & LPSPI_IER_WCIE_MASK)
12142 
12143 #define LPSPI_IER_FCIE_MASK                      (0x200U)
12144 #define LPSPI_IER_FCIE_SHIFT                     (9U)
12145 /*! FCIE - Frame Complete Interrupt Enable
12146  *  0b0..Disabled
12147  *  0b1..Enabled
12148  */
12149 #define LPSPI_IER_FCIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_FCIE_SHIFT)) & LPSPI_IER_FCIE_MASK)
12150 
12151 #define LPSPI_IER_TCIE_MASK                      (0x400U)
12152 #define LPSPI_IER_TCIE_SHIFT                     (10U)
12153 /*! TCIE - Transfer Complete Interrupt Enable
12154  *  0b0..Disabled
12155  *  0b1..Enabled
12156  */
12157 #define LPSPI_IER_TCIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TCIE_SHIFT)) & LPSPI_IER_TCIE_MASK)
12158 
12159 #define LPSPI_IER_TEIE_MASK                      (0x800U)
12160 #define LPSPI_IER_TEIE_SHIFT                     (11U)
12161 /*! TEIE - Transmit Error Interrupt Enable
12162  *  0b0..Disabled
12163  *  0b1..Enabled
12164  */
12165 #define LPSPI_IER_TEIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TEIE_SHIFT)) & LPSPI_IER_TEIE_MASK)
12166 
12167 #define LPSPI_IER_REIE_MASK                      (0x1000U)
12168 #define LPSPI_IER_REIE_SHIFT                     (12U)
12169 /*! REIE - Receive Error Interrupt Enable
12170  *  0b0..Disabled
12171  *  0b1..Enabled
12172  */
12173 #define LPSPI_IER_REIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_REIE_SHIFT)) & LPSPI_IER_REIE_MASK)
12174 
12175 #define LPSPI_IER_DMIE_MASK                      (0x2000U)
12176 #define LPSPI_IER_DMIE_SHIFT                     (13U)
12177 /*! DMIE - Data Match Interrupt Enable
12178  *  0b0..Disabled
12179  *  0b1..Enabled
12180  */
12181 #define LPSPI_IER_DMIE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_DMIE_SHIFT)) & LPSPI_IER_DMIE_MASK)
12182 /*! @} */
12183 
12184 /*! @name DER - DMA Enable Register */
12185 /*! @{ */
12186 
12187 #define LPSPI_DER_TDDE_MASK                      (0x1U)
12188 #define LPSPI_DER_TDDE_SHIFT                     (0U)
12189 /*! TDDE - Transmit Data DMA Enable
12190  *  0b0..DMA request is disabled
12191  *  0b1..DMA request is enabled
12192  */
12193 #define LPSPI_DER_TDDE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_DER_TDDE_SHIFT)) & LPSPI_DER_TDDE_MASK)
12194 
12195 #define LPSPI_DER_RDDE_MASK                      (0x2U)
12196 #define LPSPI_DER_RDDE_SHIFT                     (1U)
12197 /*! RDDE - Receive Data DMA Enable
12198  *  0b0..DMA request is disabled
12199  *  0b1..DMA request is enabled
12200  */
12201 #define LPSPI_DER_RDDE(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_DER_RDDE_SHIFT)) & LPSPI_DER_RDDE_MASK)
12202 /*! @} */
12203 
12204 /*! @name CFGR0 - Configuration Register 0 */
12205 /*! @{ */
12206 
12207 #define LPSPI_CFGR0_HREN_MASK                    (0x1U)
12208 #define LPSPI_CFGR0_HREN_SHIFT                   (0U)
12209 /*! HREN - Host Request Enable
12210  *  0b0..Host request is disabled
12211  *  0b1..Host request is enabled
12212  */
12213 #define LPSPI_CFGR0_HREN(x)                      (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HREN_SHIFT)) & LPSPI_CFGR0_HREN_MASK)
12214 
12215 #define LPSPI_CFGR0_HRPOL_MASK                   (0x2U)
12216 #define LPSPI_CFGR0_HRPOL_SHIFT                  (1U)
12217 /*! HRPOL - Host Request Polarity
12218  *  0b0..Active low
12219  *  0b1..Active high
12220  */
12221 #define LPSPI_CFGR0_HRPOL(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HRPOL_SHIFT)) & LPSPI_CFGR0_HRPOL_MASK)
12222 
12223 #define LPSPI_CFGR0_HRSEL_MASK                   (0x4U)
12224 #define LPSPI_CFGR0_HRSEL_SHIFT                  (2U)
12225 /*! HRSEL - Host Request Select
12226  *  0b0..Host request input is the LPSPI_HREQ pin
12227  *  0b1..Host request input is the input trigger
12228  */
12229 #define LPSPI_CFGR0_HRSEL(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HRSEL_SHIFT)) & LPSPI_CFGR0_HRSEL_MASK)
12230 
12231 #define LPSPI_CFGR0_CIRFIFO_MASK                 (0x100U)
12232 #define LPSPI_CFGR0_CIRFIFO_SHIFT                (8U)
12233 /*! CIRFIFO - Circular FIFO Enable
12234  *  0b0..Circular FIFO is disabled
12235  *  0b1..Circular FIFO is enabled
12236  */
12237 #define LPSPI_CFGR0_CIRFIFO(x)                   (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_CIRFIFO_SHIFT)) & LPSPI_CFGR0_CIRFIFO_MASK)
12238 
12239 #define LPSPI_CFGR0_RDMO_MASK                    (0x200U)
12240 #define LPSPI_CFGR0_RDMO_SHIFT                   (9U)
12241 /*! RDMO - Receive Data Match Only
12242  *  0b0..Received data is stored in the receive FIFO as in normal operations
12243  *  0b1..Received data is discarded unless the Data Match Flag (DMF) is set
12244  */
12245 #define LPSPI_CFGR0_RDMO(x)                      (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_RDMO_SHIFT)) & LPSPI_CFGR0_RDMO_MASK)
12246 /*! @} */
12247 
12248 /*! @name CFGR1 - Configuration Register 1 */
12249 /*! @{ */
12250 
12251 #define LPSPI_CFGR1_MASTER_MASK                  (0x1U)
12252 #define LPSPI_CFGR1_MASTER_SHIFT                 (0U)
12253 /*! MASTER - Master Mode
12254  *  0b0..Slave mode
12255  *  0b1..Master mode
12256  */
12257 #define LPSPI_CFGR1_MASTER(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_MASTER_SHIFT)) & LPSPI_CFGR1_MASTER_MASK)
12258 
12259 #define LPSPI_CFGR1_SAMPLE_MASK                  (0x2U)
12260 #define LPSPI_CFGR1_SAMPLE_SHIFT                 (1U)
12261 /*! SAMPLE - Sample Point
12262  *  0b0..Input data is sampled on SCK edge
12263  *  0b1..Input data is sampled on delayed SCK edge
12264  */
12265 #define LPSPI_CFGR1_SAMPLE(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_SAMPLE_SHIFT)) & LPSPI_CFGR1_SAMPLE_MASK)
12266 
12267 #define LPSPI_CFGR1_AUTOPCS_MASK                 (0x4U)
12268 #define LPSPI_CFGR1_AUTOPCS_SHIFT                (2U)
12269 /*! AUTOPCS - Automatic PCS
12270  *  0b0..Automatic PCS generation is disabled
12271  *  0b1..Automatic PCS generation is enabled
12272  */
12273 #define LPSPI_CFGR1_AUTOPCS(x)                   (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_AUTOPCS_SHIFT)) & LPSPI_CFGR1_AUTOPCS_MASK)
12274 
12275 #define LPSPI_CFGR1_NOSTALL_MASK                 (0x8U)
12276 #define LPSPI_CFGR1_NOSTALL_SHIFT                (3U)
12277 /*! NOSTALL - No Stall
12278  *  0b0..Transfers will stall when the transmit FIFO is empty or the receive FIFO is full
12279  *  0b1..Transfers will not stall, allowing transmit FIFO underruns or receive FIFO overruns to occur
12280  */
12281 #define LPSPI_CFGR1_NOSTALL(x)                   (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_NOSTALL_SHIFT)) & LPSPI_CFGR1_NOSTALL_MASK)
12282 
12283 #define LPSPI_CFGR1_PCSPOL_MASK                  (0xF00U)
12284 #define LPSPI_CFGR1_PCSPOL_SHIFT                 (8U)
12285 /*! PCSPOL - Peripheral Chip Select Polarity
12286  *  0b0000..The Peripheral Chip Select pin PCSx is active low
12287  *  0b0001..The Peripheral Chip Select pin PCSx is active high
12288  */
12289 #define LPSPI_CFGR1_PCSPOL(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PCSPOL_SHIFT)) & LPSPI_CFGR1_PCSPOL_MASK)
12290 
12291 #define LPSPI_CFGR1_MATCFG_MASK                  (0x70000U)
12292 #define LPSPI_CFGR1_MATCFG_SHIFT                 (16U)
12293 /*! MATCFG - Match Configuration
12294  *  0b000..Match is disabled
12295  *  0b001..Reserved
12296  *  0b010..010b - Match is enabled, if 1st data word equals MATCH0 OR MATCH1, i.e., (1st data word = MATCH0 + MATCH1)
12297  *  0b011..011b - Match is enabled, if any data word equals MATCH0 OR MATCH1, i.e., (any data word = MATCH0 + MATCH1)
12298  *  0b100..100b - Match is enabled, if 1st data word equals MATCH0 AND 2nd data word equals MATCH1, i.e., [(1st
12299  *         data word = MATCH0) * (2nd data word = MATCH1)]
12300  *  0b101..101b - Match is enabled, if any data word equals MATCH0 AND the next data word equals MATCH1, i.e.,
12301  *         [(any data word = MATCH0) * (next data word = MATCH1)]
12302  *  0b110..110b - Match is enabled, if (1st data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., [(1st data word * MATCH1) = (MATCH0 * MATCH1)]
12303  *  0b111..111b - Match is enabled, if (any data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., [(any data word * MATCH1) = (MATCH0 * MATCH1)]
12304  */
12305 #define LPSPI_CFGR1_MATCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_MATCFG_SHIFT)) & LPSPI_CFGR1_MATCFG_MASK)
12306 
12307 #define LPSPI_CFGR1_PINCFG_MASK                  (0x3000000U)
12308 #define LPSPI_CFGR1_PINCFG_SHIFT                 (24U)
12309 /*! PINCFG - Pin Configuration
12310  *  0b00..SIN is used for input data and SOUT is used for output data
12311  *  0b01..SIN is used for both input and output data
12312  *  0b10..SOUT is used for both input and output data
12313  *  0b11..SOUT is used for input data and SIN is used for output data
12314  */
12315 #define LPSPI_CFGR1_PINCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PINCFG_SHIFT)) & LPSPI_CFGR1_PINCFG_MASK)
12316 
12317 #define LPSPI_CFGR1_OUTCFG_MASK                  (0x4000000U)
12318 #define LPSPI_CFGR1_OUTCFG_SHIFT                 (26U)
12319 /*! OUTCFG - Output Config
12320  *  0b0..Output data retains last value when chip select is negated
12321  *  0b1..Output data is tristated when chip select is negated
12322  */
12323 #define LPSPI_CFGR1_OUTCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_OUTCFG_SHIFT)) & LPSPI_CFGR1_OUTCFG_MASK)
12324 
12325 #define LPSPI_CFGR1_PCSCFG_MASK                  (0x8000000U)
12326 #define LPSPI_CFGR1_PCSCFG_SHIFT                 (27U)
12327 /*! PCSCFG - Peripheral Chip Select Configuration
12328  *  0b0..PCS[3:2] are enabled
12329  *  0b1..PCS[3:2] are disabled
12330  */
12331 #define LPSPI_CFGR1_PCSCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PCSCFG_SHIFT)) & LPSPI_CFGR1_PCSCFG_MASK)
12332 /*! @} */
12333 
12334 /*! @name DMR0 - Data Match Register 0 */
12335 /*! @{ */
12336 
12337 #define LPSPI_DMR0_MATCH0_MASK                   (0xFFFFFFFFU)
12338 #define LPSPI_DMR0_MATCH0_SHIFT                  (0U)
12339 /*! MATCH0 - Match 0 Value */
12340 #define LPSPI_DMR0_MATCH0(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_DMR0_MATCH0_SHIFT)) & LPSPI_DMR0_MATCH0_MASK)
12341 /*! @} */
12342 
12343 /*! @name DMR1 - Data Match Register 1 */
12344 /*! @{ */
12345 
12346 #define LPSPI_DMR1_MATCH1_MASK                   (0xFFFFFFFFU)
12347 #define LPSPI_DMR1_MATCH1_SHIFT                  (0U)
12348 /*! MATCH1 - Match 1 Value */
12349 #define LPSPI_DMR1_MATCH1(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_DMR1_MATCH1_SHIFT)) & LPSPI_DMR1_MATCH1_MASK)
12350 /*! @} */
12351 
12352 /*! @name CCR - Clock Configuration Register */
12353 /*! @{ */
12354 
12355 #define LPSPI_CCR_SCKDIV_MASK                    (0xFFU)
12356 #define LPSPI_CCR_SCKDIV_SHIFT                   (0U)
12357 /*! SCKDIV - SCK Divider */
12358 #define LPSPI_CCR_SCKDIV(x)                      (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_SCKDIV_SHIFT)) & LPSPI_CCR_SCKDIV_MASK)
12359 
12360 #define LPSPI_CCR_DBT_MASK                       (0xFF00U)
12361 #define LPSPI_CCR_DBT_SHIFT                      (8U)
12362 /*! DBT - Delay Between Transfers */
12363 #define LPSPI_CCR_DBT(x)                         (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_DBT_SHIFT)) & LPSPI_CCR_DBT_MASK)
12364 
12365 #define LPSPI_CCR_PCSSCK_MASK                    (0xFF0000U)
12366 #define LPSPI_CCR_PCSSCK_SHIFT                   (16U)
12367 /*! PCSSCK - PCS-to-SCK Delay */
12368 #define LPSPI_CCR_PCSSCK(x)                      (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_PCSSCK_SHIFT)) & LPSPI_CCR_PCSSCK_MASK)
12369 
12370 #define LPSPI_CCR_SCKPCS_MASK                    (0xFF000000U)
12371 #define LPSPI_CCR_SCKPCS_SHIFT                   (24U)
12372 /*! SCKPCS - SCK-to-PCS Delay */
12373 #define LPSPI_CCR_SCKPCS(x)                      (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_SCKPCS_SHIFT)) & LPSPI_CCR_SCKPCS_MASK)
12374 /*! @} */
12375 
12376 /*! @name FCR - FIFO Control Register */
12377 /*! @{ */
12378 
12379 #define LPSPI_FCR_TXWATER_MASK                   (0x3U)
12380 #define LPSPI_FCR_TXWATER_SHIFT                  (0U)
12381 /*! TXWATER - Transmit FIFO Watermark */
12382 #define LPSPI_FCR_TXWATER(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_FCR_TXWATER_SHIFT)) & LPSPI_FCR_TXWATER_MASK)
12383 
12384 #define LPSPI_FCR_RXWATER_MASK                   (0x30000U)
12385 #define LPSPI_FCR_RXWATER_SHIFT                  (16U)
12386 /*! RXWATER - Receive FIFO Watermark */
12387 #define LPSPI_FCR_RXWATER(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_FCR_RXWATER_SHIFT)) & LPSPI_FCR_RXWATER_MASK)
12388 /*! @} */
12389 
12390 /*! @name FSR - FIFO Status Register */
12391 /*! @{ */
12392 
12393 #define LPSPI_FSR_TXCOUNT_MASK                   (0x7U)
12394 #define LPSPI_FSR_TXCOUNT_SHIFT                  (0U)
12395 /*! TXCOUNT - Transmit FIFO Count */
12396 #define LPSPI_FSR_TXCOUNT(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_FSR_TXCOUNT_SHIFT)) & LPSPI_FSR_TXCOUNT_MASK)
12397 
12398 #define LPSPI_FSR_RXCOUNT_MASK                   (0x70000U)
12399 #define LPSPI_FSR_RXCOUNT_SHIFT                  (16U)
12400 /*! RXCOUNT - Receive FIFO Count */
12401 #define LPSPI_FSR_RXCOUNT(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_FSR_RXCOUNT_SHIFT)) & LPSPI_FSR_RXCOUNT_MASK)
12402 /*! @} */
12403 
12404 /*! @name TCR - Transmit Command Register */
12405 /*! @{ */
12406 
12407 #define LPSPI_TCR_FRAMESZ_MASK                   (0xFFFU)
12408 #define LPSPI_TCR_FRAMESZ_SHIFT                  (0U)
12409 /*! FRAMESZ - Frame Size */
12410 #define LPSPI_TCR_FRAMESZ(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_FRAMESZ_SHIFT)) & LPSPI_TCR_FRAMESZ_MASK)
12411 
12412 #define LPSPI_TCR_WIDTH_MASK                     (0x30000U)
12413 #define LPSPI_TCR_WIDTH_SHIFT                    (16U)
12414 /*! WIDTH - Transfer Width
12415  *  0b00..1 bit transfer
12416  *  0b01..2 bit transfer
12417  *  0b10..4 bit transfer
12418  *  0b11..Reserved
12419  */
12420 #define LPSPI_TCR_WIDTH(x)                       (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_WIDTH_SHIFT)) & LPSPI_TCR_WIDTH_MASK)
12421 
12422 #define LPSPI_TCR_TXMSK_MASK                     (0x40000U)
12423 #define LPSPI_TCR_TXMSK_SHIFT                    (18U)
12424 /*! TXMSK - Transmit Data Mask
12425  *  0b0..Normal transfer
12426  *  0b1..Mask transmit data
12427  */
12428 #define LPSPI_TCR_TXMSK(x)                       (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_TXMSK_SHIFT)) & LPSPI_TCR_TXMSK_MASK)
12429 
12430 #define LPSPI_TCR_RXMSK_MASK                     (0x80000U)
12431 #define LPSPI_TCR_RXMSK_SHIFT                    (19U)
12432 /*! RXMSK - Receive Data Mask
12433  *  0b0..Normal transfer
12434  *  0b1..Receive data is masked
12435  */
12436 #define LPSPI_TCR_RXMSK(x)                       (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_RXMSK_SHIFT)) & LPSPI_TCR_RXMSK_MASK)
12437 
12438 #define LPSPI_TCR_CONTC_MASK                     (0x100000U)
12439 #define LPSPI_TCR_CONTC_SHIFT                    (20U)
12440 /*! CONTC - Continuing Command
12441  *  0b0..Command word for start of new transfer
12442  *  0b1..Command word for continuing transfer
12443  */
12444 #define LPSPI_TCR_CONTC(x)                       (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CONTC_SHIFT)) & LPSPI_TCR_CONTC_MASK)
12445 
12446 #define LPSPI_TCR_CONT_MASK                      (0x200000U)
12447 #define LPSPI_TCR_CONT_SHIFT                     (21U)
12448 /*! CONT - Continuous Transfer
12449  *  0b0..Continuous transfer is disabled
12450  *  0b1..Continuous transfer is enabled
12451  */
12452 #define LPSPI_TCR_CONT(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CONT_SHIFT)) & LPSPI_TCR_CONT_MASK)
12453 
12454 #define LPSPI_TCR_BYSW_MASK                      (0x400000U)
12455 #define LPSPI_TCR_BYSW_SHIFT                     (22U)
12456 /*! BYSW - Byte Swap
12457  *  0b0..Byte swap is disabled
12458  *  0b1..Byte swap is enabled
12459  */
12460 #define LPSPI_TCR_BYSW(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_BYSW_SHIFT)) & LPSPI_TCR_BYSW_MASK)
12461 
12462 #define LPSPI_TCR_LSBF_MASK                      (0x800000U)
12463 #define LPSPI_TCR_LSBF_SHIFT                     (23U)
12464 /*! LSBF - LSB First
12465  *  0b0..Data is transferred MSB first
12466  *  0b1..Data is transferred LSB first
12467  */
12468 #define LPSPI_TCR_LSBF(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_LSBF_SHIFT)) & LPSPI_TCR_LSBF_MASK)
12469 
12470 #define LPSPI_TCR_PCS_MASK                       (0x3000000U)
12471 #define LPSPI_TCR_PCS_SHIFT                      (24U)
12472 /*! PCS - Peripheral Chip Select
12473  *  0b00..Transfer using LPSPI_PCS[0]
12474  *  0b01..Transfer using LPSPI_PCS[1]
12475  *  0b10..Transfer using LPSPI_PCS[2]
12476  *  0b11..Transfer using LPSPI_PCS[3]
12477  */
12478 #define LPSPI_TCR_PCS(x)                         (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_PCS_SHIFT)) & LPSPI_TCR_PCS_MASK)
12479 
12480 #define LPSPI_TCR_PRESCALE_MASK                  (0x38000000U)
12481 #define LPSPI_TCR_PRESCALE_SHIFT                 (27U)
12482 /*! PRESCALE - Prescaler Value
12483  *  0b000..Divide by 1
12484  *  0b001..Divide by 2
12485  *  0b010..Divide by 4
12486  *  0b011..Divide by 8
12487  *  0b100..Divide by 16
12488  *  0b101..Divide by 32
12489  *  0b110..Divide by 64
12490  *  0b111..Divide by 128
12491  */
12492 #define LPSPI_TCR_PRESCALE(x)                    (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_PRESCALE_SHIFT)) & LPSPI_TCR_PRESCALE_MASK)
12493 
12494 #define LPSPI_TCR_CPHA_MASK                      (0x40000000U)
12495 #define LPSPI_TCR_CPHA_SHIFT                     (30U)
12496 /*! CPHA - Clock Phase
12497  *  0b0..Data is captured on the leading edge of SCK and changed on the following edge of SCK
12498  *  0b1..Data is changed on the leading edge of SCK and captured on the following edge of SCK
12499  */
12500 #define LPSPI_TCR_CPHA(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CPHA_SHIFT)) & LPSPI_TCR_CPHA_MASK)
12501 
12502 #define LPSPI_TCR_CPOL_MASK                      (0x80000000U)
12503 #define LPSPI_TCR_CPOL_SHIFT                     (31U)
12504 /*! CPOL - Clock Polarity
12505  *  0b0..The inactive state value of SCK is low
12506  *  0b1..The inactive state value of SCK is high
12507  */
12508 #define LPSPI_TCR_CPOL(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CPOL_SHIFT)) & LPSPI_TCR_CPOL_MASK)
12509 /*! @} */
12510 
12511 /*! @name TDR - Transmit Data Register */
12512 /*! @{ */
12513 
12514 #define LPSPI_TDR_DATA_MASK                      (0xFFFFFFFFU)
12515 #define LPSPI_TDR_DATA_SHIFT                     (0U)
12516 /*! DATA - Transmit Data */
12517 #define LPSPI_TDR_DATA(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_TDR_DATA_SHIFT)) & LPSPI_TDR_DATA_MASK)
12518 /*! @} */
12519 
12520 /*! @name RSR - Receive Status Register */
12521 /*! @{ */
12522 
12523 #define LPSPI_RSR_SOF_MASK                       (0x1U)
12524 #define LPSPI_RSR_SOF_SHIFT                      (0U)
12525 /*! SOF - Start Of Frame
12526  *  0b0..Subsequent data word received after LPSPI_PCS assertion
12527  *  0b1..First data word received after LPSPI_PCS assertion
12528  */
12529 #define LPSPI_RSR_SOF(x)                         (((uint32_t)(((uint32_t)(x)) << LPSPI_RSR_SOF_SHIFT)) & LPSPI_RSR_SOF_MASK)
12530 
12531 #define LPSPI_RSR_RXEMPTY_MASK                   (0x2U)
12532 #define LPSPI_RSR_RXEMPTY_SHIFT                  (1U)
12533 /*! RXEMPTY - RX FIFO Empty
12534  *  0b0..RX FIFO is not empty
12535  *  0b1..RX FIFO is empty
12536  */
12537 #define LPSPI_RSR_RXEMPTY(x)                     (((uint32_t)(((uint32_t)(x)) << LPSPI_RSR_RXEMPTY_SHIFT)) & LPSPI_RSR_RXEMPTY_MASK)
12538 /*! @} */
12539 
12540 /*! @name RDR - Receive Data Register */
12541 /*! @{ */
12542 
12543 #define LPSPI_RDR_DATA_MASK                      (0xFFFFFFFFU)
12544 #define LPSPI_RDR_DATA_SHIFT                     (0U)
12545 /*! DATA - Receive Data */
12546 #define LPSPI_RDR_DATA(x)                        (((uint32_t)(((uint32_t)(x)) << LPSPI_RDR_DATA_SHIFT)) & LPSPI_RDR_DATA_MASK)
12547 /*! @} */
12548 
12549 
12550 /*!
12551  * @}
12552  */ /* end of group LPSPI_Register_Masks */
12553 
12554 
12555 /* LPSPI - Peripheral instance base addresses */
12556 /** Peripheral LPSPI0 base address */
12557 #define LPSPI0_BASE                              (0x4003F000u)
12558 /** Peripheral LPSPI0 base pointer */
12559 #define LPSPI0                                   ((LPSPI_Type *)LPSPI0_BASE)
12560 /** Peripheral LPSPI1 base address */
12561 #define LPSPI1_BASE                              (0x40040000u)
12562 /** Peripheral LPSPI1 base pointer */
12563 #define LPSPI1                                   ((LPSPI_Type *)LPSPI1_BASE)
12564 /** Peripheral LPSPI2 base address */
12565 #define LPSPI2_BASE                              (0x40041000u)
12566 /** Peripheral LPSPI2 base pointer */
12567 #define LPSPI2                                   ((LPSPI_Type *)LPSPI2_BASE)
12568 /** Peripheral LPSPI3 base address */
12569 #define LPSPI3_BASE                              (0x41035000u)
12570 /** Peripheral LPSPI3 base pointer */
12571 #define LPSPI3                                   ((LPSPI_Type *)LPSPI3_BASE)
12572 /** Array initializer of LPSPI peripheral base addresses */
12573 #define LPSPI_BASE_ADDRS                         { LPSPI0_BASE, LPSPI1_BASE, LPSPI2_BASE, LPSPI3_BASE }
12574 /** Array initializer of LPSPI peripheral base pointers */
12575 #define LPSPI_BASE_PTRS                          { LPSPI0, LPSPI1, LPSPI2, LPSPI3 }
12576 /** Interrupt vectors for the LPSPI peripheral type */
12577 #define LPSPI_IRQS                               { LPSPI0_IRQn, LPSPI1_IRQn, LPSPI2_IRQn, LPSPI3_IRQn }
12578 
12579 /*!
12580  * @}
12581  */ /* end of group LPSPI_Peripheral_Access_Layer */
12582 
12583 
12584 /* ----------------------------------------------------------------------------
12585    -- LPTMR Peripheral Access Layer
12586    ---------------------------------------------------------------------------- */
12587 
12588 /*!
12589  * @addtogroup LPTMR_Peripheral_Access_Layer LPTMR Peripheral Access Layer
12590  * @{
12591  */
12592 
12593 /** LPTMR - Register Layout Typedef */
12594 typedef struct {
12595   __IO uint32_t CSR;                               /**< Low Power Timer Control Status Register, offset: 0x0 */
12596   __IO uint32_t PSR;                               /**< Low Power Timer Prescale Register, offset: 0x4 */
12597   __IO uint32_t CMR;                               /**< Low Power Timer Compare Register, offset: 0x8 */
12598   __IO uint32_t CNR;                               /**< Low Power Timer Counter Register, offset: 0xC */
12599 } LPTMR_Type;
12600 
12601 /* ----------------------------------------------------------------------------
12602    -- LPTMR Register Masks
12603    ---------------------------------------------------------------------------- */
12604 
12605 /*!
12606  * @addtogroup LPTMR_Register_Masks LPTMR Register Masks
12607  * @{
12608  */
12609 
12610 /*! @name CSR - Low Power Timer Control Status Register */
12611 /*! @{ */
12612 
12613 #define LPTMR_CSR_TEN_MASK                       (0x1U)
12614 #define LPTMR_CSR_TEN_SHIFT                      (0U)
12615 /*! TEN - Timer Enable
12616  *  0b0..LPTMR is disabled and internal logic is reset.
12617  *  0b1..LPTMR is enabled.
12618  */
12619 #define LPTMR_CSR_TEN(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TEN_SHIFT)) & LPTMR_CSR_TEN_MASK)
12620 
12621 #define LPTMR_CSR_TMS_MASK                       (0x2U)
12622 #define LPTMR_CSR_TMS_SHIFT                      (1U)
12623 /*! TMS - Timer Mode Select
12624  *  0b0..Time Counter mode.
12625  *  0b1..Pulse Counter mode.
12626  */
12627 #define LPTMR_CSR_TMS(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TMS_SHIFT)) & LPTMR_CSR_TMS_MASK)
12628 
12629 #define LPTMR_CSR_TFC_MASK                       (0x4U)
12630 #define LPTMR_CSR_TFC_SHIFT                      (2U)
12631 /*! TFC - Timer Free-Running Counter
12632  *  0b0..CNR is reset whenever TCF is set.
12633  *  0b1..CNR is reset on overflow.
12634  */
12635 #define LPTMR_CSR_TFC(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TFC_SHIFT)) & LPTMR_CSR_TFC_MASK)
12636 
12637 #define LPTMR_CSR_TPP_MASK                       (0x8U)
12638 #define LPTMR_CSR_TPP_SHIFT                      (3U)
12639 /*! TPP - Timer Pin Polarity
12640  *  0b0..Pulse Counter input source is active-high, and the CNR will increment on the rising-edge.
12641  *  0b1..Pulse Counter input source is active-low, and the CNR will increment on the falling-edge.
12642  */
12643 #define LPTMR_CSR_TPP(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPP_SHIFT)) & LPTMR_CSR_TPP_MASK)
12644 
12645 #define LPTMR_CSR_TPS_MASK                       (0x30U)
12646 #define LPTMR_CSR_TPS_SHIFT                      (4U)
12647 /*! TPS - Timer Pin Select
12648  *  0b00..Pulse counter input 0 is selected.
12649  *  0b01..Pulse counter input 1 is selected.
12650  *  0b10..Pulse counter input 2 is selected.
12651  *  0b11..Pulse counter input 3 is selected.
12652  */
12653 #define LPTMR_CSR_TPS(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPS_SHIFT)) & LPTMR_CSR_TPS_MASK)
12654 
12655 #define LPTMR_CSR_TIE_MASK                       (0x40U)
12656 #define LPTMR_CSR_TIE_SHIFT                      (6U)
12657 /*! TIE - Timer Interrupt Enable
12658  *  0b0..Timer interrupt disabled.
12659  *  0b1..Timer interrupt enabled.
12660  */
12661 #define LPTMR_CSR_TIE(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TIE_SHIFT)) & LPTMR_CSR_TIE_MASK)
12662 
12663 #define LPTMR_CSR_TCF_MASK                       (0x80U)
12664 #define LPTMR_CSR_TCF_SHIFT                      (7U)
12665 /*! TCF - Timer Compare Flag
12666  *  0b0..The value of CNR is not equal to CMR and increments.
12667  *  0b1..The value of CNR is equal to CMR and increments.
12668  */
12669 #define LPTMR_CSR_TCF(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TCF_SHIFT)) & LPTMR_CSR_TCF_MASK)
12670 
12671 #define LPTMR_CSR_TDRE_MASK                      (0x100U)
12672 #define LPTMR_CSR_TDRE_SHIFT                     (8U)
12673 /*! TDRE - Timer DMA Request Enable
12674  *  0b0..Timer DMA Request disabled.
12675  *  0b1..Timer DMA Request enabled.
12676  */
12677 #define LPTMR_CSR_TDRE(x)                        (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TDRE_SHIFT)) & LPTMR_CSR_TDRE_MASK)
12678 /*! @} */
12679 
12680 /*! @name PSR - Low Power Timer Prescale Register */
12681 /*! @{ */
12682 
12683 #define LPTMR_PSR_PCS_MASK                       (0x3U)
12684 #define LPTMR_PSR_PCS_SHIFT                      (0U)
12685 /*! PCS - Prescaler Clock Select
12686  *  0b00..Prescaler/glitch filter clock 0 selected.
12687  *  0b01..Prescaler/glitch filter clock 1 selected.
12688  *  0b10..Prescaler/glitch filter clock 2 selected.
12689  *  0b11..Prescaler/glitch filter clock 3 selected.
12690  */
12691 #define LPTMR_PSR_PCS(x)                         (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PCS_SHIFT)) & LPTMR_PSR_PCS_MASK)
12692 
12693 #define LPTMR_PSR_PBYP_MASK                      (0x4U)
12694 #define LPTMR_PSR_PBYP_SHIFT                     (2U)
12695 /*! PBYP - Prescaler Bypass
12696  *  0b0..Prescaler/glitch filter is enabled.
12697  *  0b1..Prescaler/glitch filter is bypassed.
12698  */
12699 #define LPTMR_PSR_PBYP(x)                        (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PBYP_SHIFT)) & LPTMR_PSR_PBYP_MASK)
12700 
12701 #define LPTMR_PSR_PRESCALE_MASK                  (0x78U)
12702 #define LPTMR_PSR_PRESCALE_SHIFT                 (3U)
12703 /*! PRESCALE - Prescale Value
12704  *  0b0000..Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration.
12705  *  0b0001..Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges.
12706  *  0b0010..Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges.
12707  *  0b0011..Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges.
12708  *  0b0100..Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges.
12709  *  0b0101..Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges.
12710  *  0b0110..Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges.
12711  *  0b0111..Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges.
12712  *  0b1000..Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges.
12713  *  0b1001..Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges.
12714  *  0b1010..Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges.
12715  *  0b1011..Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges.
12716  *  0b1100..Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges.
12717  *  0b1101..Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges.
12718  *  0b1110..Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges.
12719  *  0b1111..Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges.
12720  */
12721 #define LPTMR_PSR_PRESCALE(x)                    (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PRESCALE_SHIFT)) & LPTMR_PSR_PRESCALE_MASK)
12722 /*! @} */
12723 
12724 /*! @name CMR - Low Power Timer Compare Register */
12725 /*! @{ */
12726 
12727 #define LPTMR_CMR_COMPARE_MASK                   (0xFFFFFFFFU)
12728 #define LPTMR_CMR_COMPARE_SHIFT                  (0U)
12729 /*! COMPARE - Compare Value */
12730 #define LPTMR_CMR_COMPARE(x)                     (((uint32_t)(((uint32_t)(x)) << LPTMR_CMR_COMPARE_SHIFT)) & LPTMR_CMR_COMPARE_MASK)
12731 /*! @} */
12732 
12733 /*! @name CNR - Low Power Timer Counter Register */
12734 /*! @{ */
12735 
12736 #define LPTMR_CNR_COUNTER_MASK                   (0xFFFFFFFFU)
12737 #define LPTMR_CNR_COUNTER_SHIFT                  (0U)
12738 /*! COUNTER - Counter Value */
12739 #define LPTMR_CNR_COUNTER(x)                     (((uint32_t)(((uint32_t)(x)) << LPTMR_CNR_COUNTER_SHIFT)) & LPTMR_CNR_COUNTER_MASK)
12740 /*! @} */
12741 
12742 
12743 /*!
12744  * @}
12745  */ /* end of group LPTMR_Register_Masks */
12746 
12747 
12748 /* LPTMR - Peripheral instance base addresses */
12749 /** Peripheral LPTMR0 base address */
12750 #define LPTMR0_BASE                              (0x40032000u)
12751 /** Peripheral LPTMR0 base pointer */
12752 #define LPTMR0                                   ((LPTMR_Type *)LPTMR0_BASE)
12753 /** Peripheral LPTMR1 base address */
12754 #define LPTMR1_BASE                              (0x40033000u)
12755 /** Peripheral LPTMR1 base pointer */
12756 #define LPTMR1                                   ((LPTMR_Type *)LPTMR1_BASE)
12757 /** Peripheral LPTMR2 base address */
12758 #define LPTMR2_BASE                              (0x4102B000u)
12759 /** Peripheral LPTMR2 base pointer */
12760 #define LPTMR2                                   ((LPTMR_Type *)LPTMR2_BASE)
12761 /** Array initializer of LPTMR peripheral base addresses */
12762 #define LPTMR_BASE_ADDRS                         { LPTMR0_BASE, LPTMR1_BASE, LPTMR2_BASE }
12763 /** Array initializer of LPTMR peripheral base pointers */
12764 #define LPTMR_BASE_PTRS                          { LPTMR0, LPTMR1, LPTMR2 }
12765 /** Interrupt vectors for the LPTMR peripheral type */
12766 #define LPTMR_IRQS                               { LPTMR0_IRQn, LPTMR1_IRQn, LPTMR2_IRQn }
12767 
12768 /*!
12769  * @}
12770  */ /* end of group LPTMR_Peripheral_Access_Layer */
12771 
12772 
12773 /* ----------------------------------------------------------------------------
12774    -- LPUART Peripheral Access Layer
12775    ---------------------------------------------------------------------------- */
12776 
12777 /*!
12778  * @addtogroup LPUART_Peripheral_Access_Layer LPUART Peripheral Access Layer
12779  * @{
12780  */
12781 
12782 /** LPUART - Register Layout Typedef */
12783 typedef struct {
12784   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
12785   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
12786   __IO uint32_t GLOBAL;                            /**< LPUART Global Register, offset: 0x8 */
12787   __IO uint32_t PINCFG;                            /**< LPUART Pin Configuration Register, offset: 0xC */
12788   __IO uint32_t BAUD;                              /**< LPUART Baud Rate Register, offset: 0x10 */
12789   __IO uint32_t STAT;                              /**< LPUART Status Register, offset: 0x14 */
12790   __IO uint32_t CTRL;                              /**< LPUART Control Register, offset: 0x18 */
12791   __IO uint32_t DATA;                              /**< LPUART Data Register, offset: 0x1C */
12792   __IO uint32_t MATCH;                             /**< LPUART Match Address Register, offset: 0x20 */
12793   __IO uint32_t MODIR;                             /**< LPUART Modem IrDA Register, offset: 0x24 */
12794   __IO uint32_t FIFO;                              /**< LPUART FIFO Register, offset: 0x28 */
12795   __IO uint32_t WATER;                             /**< LPUART Watermark Register, offset: 0x2C */
12796 } LPUART_Type;
12797 
12798 /* ----------------------------------------------------------------------------
12799    -- LPUART Register Masks
12800    ---------------------------------------------------------------------------- */
12801 
12802 /*!
12803  * @addtogroup LPUART_Register_Masks LPUART Register Masks
12804  * @{
12805  */
12806 
12807 /*! @name VERID - Version ID Register */
12808 /*! @{ */
12809 
12810 #define LPUART_VERID_FEATURE_MASK                (0xFFFFU)
12811 #define LPUART_VERID_FEATURE_SHIFT               (0U)
12812 /*! FEATURE - Feature Identification Number
12813  *  0b0000000000000001..Standard feature set.
12814  *  0b0000000000000011..Standard feature set with MODEM/IrDA support.
12815  */
12816 #define LPUART_VERID_FEATURE(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_FEATURE_SHIFT)) & LPUART_VERID_FEATURE_MASK)
12817 
12818 #define LPUART_VERID_MINOR_MASK                  (0xFF0000U)
12819 #define LPUART_VERID_MINOR_SHIFT                 (16U)
12820 /*! MINOR - Minor Version Number */
12821 #define LPUART_VERID_MINOR(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_MINOR_SHIFT)) & LPUART_VERID_MINOR_MASK)
12822 
12823 #define LPUART_VERID_MAJOR_MASK                  (0xFF000000U)
12824 #define LPUART_VERID_MAJOR_SHIFT                 (24U)
12825 /*! MAJOR - Major Version Number */
12826 #define LPUART_VERID_MAJOR(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_MAJOR_SHIFT)) & LPUART_VERID_MAJOR_MASK)
12827 /*! @} */
12828 
12829 /*! @name PARAM - Parameter Register */
12830 /*! @{ */
12831 
12832 #define LPUART_PARAM_TXFIFO_MASK                 (0xFFU)
12833 #define LPUART_PARAM_TXFIFO_SHIFT                (0U)
12834 /*! TXFIFO - Transmit FIFO Size */
12835 #define LPUART_PARAM_TXFIFO(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_PARAM_TXFIFO_SHIFT)) & LPUART_PARAM_TXFIFO_MASK)
12836 
12837 #define LPUART_PARAM_RXFIFO_MASK                 (0xFF00U)
12838 #define LPUART_PARAM_RXFIFO_SHIFT                (8U)
12839 /*! RXFIFO - Receive FIFO Size */
12840 #define LPUART_PARAM_RXFIFO(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_PARAM_RXFIFO_SHIFT)) & LPUART_PARAM_RXFIFO_MASK)
12841 /*! @} */
12842 
12843 /*! @name GLOBAL - LPUART Global Register */
12844 /*! @{ */
12845 
12846 #define LPUART_GLOBAL_RST_MASK                   (0x2U)
12847 #define LPUART_GLOBAL_RST_SHIFT                  (1U)
12848 /*! RST - Software Reset
12849  *  0b0..Module is not reset.
12850  *  0b1..Module is reset.
12851  */
12852 #define LPUART_GLOBAL_RST(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_GLOBAL_RST_SHIFT)) & LPUART_GLOBAL_RST_MASK)
12853 /*! @} */
12854 
12855 /*! @name PINCFG - LPUART Pin Configuration Register */
12856 /*! @{ */
12857 
12858 #define LPUART_PINCFG_TRGSEL_MASK                (0x3U)
12859 #define LPUART_PINCFG_TRGSEL_SHIFT               (0U)
12860 /*! TRGSEL - Trigger Select
12861  *  0b00..Input trigger is disabled.
12862  *  0b01..Input trigger is used instead of RXD pin input.
12863  *  0b10..Input trigger is used instead of CTS_B pin input.
12864  *  0b11..Input trigger is used to modulate the TXD pin output. The TXD pin output (after TXINV configuration) is ANDed with the input trigger.
12865  */
12866 #define LPUART_PINCFG_TRGSEL(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_PINCFG_TRGSEL_SHIFT)) & LPUART_PINCFG_TRGSEL_MASK)
12867 /*! @} */
12868 
12869 /*! @name BAUD - LPUART Baud Rate Register */
12870 /*! @{ */
12871 
12872 #define LPUART_BAUD_SBR_MASK                     (0x1FFFU)
12873 #define LPUART_BAUD_SBR_SHIFT                    (0U)
12874 /*! SBR - Baud Rate Modulo Divisor. */
12875 #define LPUART_BAUD_SBR(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBR_SHIFT)) & LPUART_BAUD_SBR_MASK)
12876 
12877 #define LPUART_BAUD_SBNS_MASK                    (0x2000U)
12878 #define LPUART_BAUD_SBNS_SHIFT                   (13U)
12879 /*! SBNS - Stop Bit Number Select
12880  *  0b0..One stop bit.
12881  *  0b1..Two stop bits.
12882  */
12883 #define LPUART_BAUD_SBNS(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBNS_SHIFT)) & LPUART_BAUD_SBNS_MASK)
12884 
12885 #define LPUART_BAUD_RXEDGIE_MASK                 (0x4000U)
12886 #define LPUART_BAUD_RXEDGIE_SHIFT                (14U)
12887 /*! RXEDGIE - RX Input Active Edge Interrupt Enable
12888  *  0b0..Hardware interrupts from LPUART_STAT[RXEDGIF] disabled.
12889  *  0b1..Hardware interrupt requested when LPUART_STAT[RXEDGIF] flag is 1.
12890  */
12891 #define LPUART_BAUD_RXEDGIE(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RXEDGIE_SHIFT)) & LPUART_BAUD_RXEDGIE_MASK)
12892 
12893 #define LPUART_BAUD_LBKDIE_MASK                  (0x8000U)
12894 #define LPUART_BAUD_LBKDIE_SHIFT                 (15U)
12895 /*! LBKDIE - LIN Break Detect Interrupt Enable
12896  *  0b0..Hardware interrupts from LPUART_STAT[LBKDIF] disabled (use polling).
12897  *  0b1..Hardware interrupt requested when LPUART_STAT[LBKDIF] flag is 1.
12898  */
12899 #define LPUART_BAUD_LBKDIE(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_LBKDIE_SHIFT)) & LPUART_BAUD_LBKDIE_MASK)
12900 
12901 #define LPUART_BAUD_RESYNCDIS_MASK               (0x10000U)
12902 #define LPUART_BAUD_RESYNCDIS_SHIFT              (16U)
12903 /*! RESYNCDIS - Resynchronization Disable
12904  *  0b0..Resynchronization during received data word is supported
12905  *  0b1..Resynchronization during received data word is disabled
12906  */
12907 #define LPUART_BAUD_RESYNCDIS(x)                 (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RESYNCDIS_SHIFT)) & LPUART_BAUD_RESYNCDIS_MASK)
12908 
12909 #define LPUART_BAUD_BOTHEDGE_MASK                (0x20000U)
12910 #define LPUART_BAUD_BOTHEDGE_SHIFT               (17U)
12911 /*! BOTHEDGE - Both Edge Sampling
12912  *  0b0..Receiver samples input data using the rising edge of the baud rate clock.
12913  *  0b1..Receiver samples input data using the rising and falling edge of the baud rate clock.
12914  */
12915 #define LPUART_BAUD_BOTHEDGE(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_BOTHEDGE_SHIFT)) & LPUART_BAUD_BOTHEDGE_MASK)
12916 
12917 #define LPUART_BAUD_MATCFG_MASK                  (0xC0000U)
12918 #define LPUART_BAUD_MATCFG_SHIFT                 (18U)
12919 /*! MATCFG - Match Configuration
12920  *  0b00..Address Match Wakeup
12921  *  0b01..Idle Match Wakeup
12922  *  0b10..Match On and Match Off
12923  *  0b11..Enables RWU on Data Match and Match On/Off for transmitter CTS input
12924  */
12925 #define LPUART_BAUD_MATCFG(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MATCFG_SHIFT)) & LPUART_BAUD_MATCFG_MASK)
12926 
12927 #define LPUART_BAUD_RIDMAE_MASK                  (0x100000U)
12928 #define LPUART_BAUD_RIDMAE_SHIFT                 (20U)
12929 /*! RIDMAE - Receiver Idle DMA Enable
12930  *  0b0..DMA request disabled.
12931  *  0b1..DMA request enabled.
12932  */
12933 #define LPUART_BAUD_RIDMAE(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RIDMAE_SHIFT)) & LPUART_BAUD_RIDMAE_MASK)
12934 
12935 #define LPUART_BAUD_RDMAE_MASK                   (0x200000U)
12936 #define LPUART_BAUD_RDMAE_SHIFT                  (21U)
12937 /*! RDMAE - Receiver Full DMA Enable
12938  *  0b0..DMA request disabled.
12939  *  0b1..DMA request enabled.
12940  */
12941 #define LPUART_BAUD_RDMAE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RDMAE_SHIFT)) & LPUART_BAUD_RDMAE_MASK)
12942 
12943 #define LPUART_BAUD_TDMAE_MASK                   (0x800000U)
12944 #define LPUART_BAUD_TDMAE_SHIFT                  (23U)
12945 /*! TDMAE - Transmitter DMA Enable
12946  *  0b0..DMA request disabled.
12947  *  0b1..DMA request enabled.
12948  */
12949 #define LPUART_BAUD_TDMAE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_TDMAE_SHIFT)) & LPUART_BAUD_TDMAE_MASK)
12950 
12951 #define LPUART_BAUD_OSR_MASK                     (0x1F000000U)
12952 #define LPUART_BAUD_OSR_SHIFT                    (24U)
12953 /*! OSR - Oversampling Ratio
12954  *  0b00000..Writing 0 to this field will result in an oversampling ratio of 16
12955  *  0b00001..Reserved
12956  *  0b00010..Reserved
12957  *  0b00011..Oversampling ratio of 4, requires BOTHEDGE to be set.
12958  *  0b00100..Oversampling ratio of 5, requires BOTHEDGE to be set.
12959  *  0b00101..Oversampling ratio of 6, requires BOTHEDGE to be set.
12960  *  0b00110..Oversampling ratio of 7, requires BOTHEDGE to be set.
12961  *  0b00111..Oversampling ratio of 8.
12962  *  0b01000..Oversampling ratio of 9.
12963  *  0b01001..Oversampling ratio of 10.
12964  *  0b01010..Oversampling ratio of 11.
12965  *  0b01011..Oversampling ratio of 12.
12966  *  0b01100..Oversampling ratio of 13.
12967  *  0b01101..Oversampling ratio of 14.
12968  *  0b01110..Oversampling ratio of 15.
12969  *  0b01111..Oversampling ratio of 16.
12970  *  0b10000..Oversampling ratio of 17.
12971  *  0b10001..Oversampling ratio of 18.
12972  *  0b10010..Oversampling ratio of 19.
12973  *  0b10011..Oversampling ratio of 20.
12974  *  0b10100..Oversampling ratio of 21.
12975  *  0b10101..Oversampling ratio of 22.
12976  *  0b10110..Oversampling ratio of 23.
12977  *  0b10111..Oversampling ratio of 24.
12978  *  0b11000..Oversampling ratio of 25.
12979  *  0b11001..Oversampling ratio of 26.
12980  *  0b11010..Oversampling ratio of 27.
12981  *  0b11011..Oversampling ratio of 28.
12982  *  0b11100..Oversampling ratio of 29.
12983  *  0b11101..Oversampling ratio of 30.
12984  *  0b11110..Oversampling ratio of 31.
12985  *  0b11111..Oversampling ratio of 32.
12986  */
12987 #define LPUART_BAUD_OSR(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_OSR_SHIFT)) & LPUART_BAUD_OSR_MASK)
12988 
12989 #define LPUART_BAUD_M10_MASK                     (0x20000000U)
12990 #define LPUART_BAUD_M10_SHIFT                    (29U)
12991 /*! M10 - 10-bit Mode select
12992  *  0b0..Receiver and transmitter use 7-bit to 9-bit data characters.
12993  *  0b1..Receiver and transmitter use 10-bit data characters.
12994  */
12995 #define LPUART_BAUD_M10(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_M10_SHIFT)) & LPUART_BAUD_M10_MASK)
12996 
12997 #define LPUART_BAUD_MAEN2_MASK                   (0x40000000U)
12998 #define LPUART_BAUD_MAEN2_SHIFT                  (30U)
12999 /*! MAEN2 - Match Address Mode Enable 2
13000  *  0b0..Normal operation.
13001  *  0b1..Enables automatic address matching or data matching mode for MATCH[MA2].
13002  */
13003 #define LPUART_BAUD_MAEN2(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN2_SHIFT)) & LPUART_BAUD_MAEN2_MASK)
13004 
13005 #define LPUART_BAUD_MAEN1_MASK                   (0x80000000U)
13006 #define LPUART_BAUD_MAEN1_SHIFT                  (31U)
13007 /*! MAEN1 - Match Address Mode Enable 1
13008  *  0b0..Normal operation.
13009  *  0b1..Enables automatic address matching or data matching mode for MATCH[MA1].
13010  */
13011 #define LPUART_BAUD_MAEN1(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN1_SHIFT)) & LPUART_BAUD_MAEN1_MASK)
13012 /*! @} */
13013 
13014 /*! @name STAT - LPUART Status Register */
13015 /*! @{ */
13016 
13017 #define LPUART_STAT_MA2F_MASK                    (0x4000U)
13018 #define LPUART_STAT_MA2F_SHIFT                   (14U)
13019 /*! MA2F - Match 2 Flag
13020  *  0b0..Received data is not equal to MA2
13021  *  0b1..Received data is equal to MA2
13022  */
13023 #define LPUART_STAT_MA2F(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA2F_SHIFT)) & LPUART_STAT_MA2F_MASK)
13024 
13025 #define LPUART_STAT_MA1F_MASK                    (0x8000U)
13026 #define LPUART_STAT_MA1F_SHIFT                   (15U)
13027 /*! MA1F - Match 1 Flag
13028  *  0b0..Received data is not equal to MA1
13029  *  0b1..Received data is equal to MA1
13030  */
13031 #define LPUART_STAT_MA1F(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA1F_SHIFT)) & LPUART_STAT_MA1F_MASK)
13032 
13033 #define LPUART_STAT_PF_MASK                      (0x10000U)
13034 #define LPUART_STAT_PF_SHIFT                     (16U)
13035 /*! PF - Parity Error Flag
13036  *  0b0..No parity error.
13037  *  0b1..Parity error.
13038  */
13039 #define LPUART_STAT_PF(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_PF_SHIFT)) & LPUART_STAT_PF_MASK)
13040 
13041 #define LPUART_STAT_FE_MASK                      (0x20000U)
13042 #define LPUART_STAT_FE_SHIFT                     (17U)
13043 /*! FE - Framing Error Flag
13044  *  0b0..No framing error detected. This does not guarantee the framing is correct.
13045  *  0b1..Framing error.
13046  */
13047 #define LPUART_STAT_FE(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_FE_SHIFT)) & LPUART_STAT_FE_MASK)
13048 
13049 #define LPUART_STAT_NF_MASK                      (0x40000U)
13050 #define LPUART_STAT_NF_SHIFT                     (18U)
13051 /*! NF - Noise Flag
13052  *  0b0..No noise detected.
13053  *  0b1..Noise detected in the received character in LPUART_DATA.
13054  */
13055 #define LPUART_STAT_NF(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_NF_SHIFT)) & LPUART_STAT_NF_MASK)
13056 
13057 #define LPUART_STAT_OR_MASK                      (0x80000U)
13058 #define LPUART_STAT_OR_SHIFT                     (19U)
13059 /*! OR - Receiver Overrun Flag
13060  *  0b0..No overrun.
13061  *  0b1..Receive overrun (new LPUART data lost).
13062  */
13063 #define LPUART_STAT_OR(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_OR_SHIFT)) & LPUART_STAT_OR_MASK)
13064 
13065 #define LPUART_STAT_IDLE_MASK                    (0x100000U)
13066 #define LPUART_STAT_IDLE_SHIFT                   (20U)
13067 /*! IDLE - Idle Line Flag
13068  *  0b0..No idle line detected.
13069  *  0b1..Idle line was detected.
13070  */
13071 #define LPUART_STAT_IDLE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_IDLE_SHIFT)) & LPUART_STAT_IDLE_MASK)
13072 
13073 #define LPUART_STAT_RDRF_MASK                    (0x200000U)
13074 #define LPUART_STAT_RDRF_SHIFT                   (21U)
13075 /*! RDRF - Receive Data Register Full Flag
13076  *  0b0..Receive data buffer empty.
13077  *  0b1..Receive data buffer full.
13078  */
13079 #define LPUART_STAT_RDRF(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RDRF_SHIFT)) & LPUART_STAT_RDRF_MASK)
13080 
13081 #define LPUART_STAT_TC_MASK                      (0x400000U)
13082 #define LPUART_STAT_TC_SHIFT                     (22U)
13083 /*! TC - Transmission Complete Flag
13084  *  0b0..Transmitter active (sending data, a preamble, or a break).
13085  *  0b1..Transmitter idle (transmission activity complete).
13086  */
13087 #define LPUART_STAT_TC(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TC_SHIFT)) & LPUART_STAT_TC_MASK)
13088 
13089 #define LPUART_STAT_TDRE_MASK                    (0x800000U)
13090 #define LPUART_STAT_TDRE_SHIFT                   (23U)
13091 /*! TDRE - Transmit Data Register Empty Flag
13092  *  0b0..Transmit data buffer full.
13093  *  0b1..Transmit data buffer empty.
13094  */
13095 #define LPUART_STAT_TDRE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TDRE_SHIFT)) & LPUART_STAT_TDRE_MASK)
13096 
13097 #define LPUART_STAT_RAF_MASK                     (0x1000000U)
13098 #define LPUART_STAT_RAF_SHIFT                    (24U)
13099 /*! RAF - Receiver Active Flag
13100  *  0b0..LPUART receiver idle waiting for a start bit.
13101  *  0b1..LPUART receiver active (RXD input not idle).
13102  */
13103 #define LPUART_STAT_RAF(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RAF_SHIFT)) & LPUART_STAT_RAF_MASK)
13104 
13105 #define LPUART_STAT_LBKDE_MASK                   (0x2000000U)
13106 #define LPUART_STAT_LBKDE_SHIFT                  (25U)
13107 /*! LBKDE - LIN Break Detection Enable
13108  *  0b0..LIN break detect is disabled, normal break character can be detected.
13109  *  0b1..LIN break detect is enabled. LIN break character is detected at length of 11 bit times (if M = 0) or 12 (if M = 1) or 13 (M10 = 1).
13110  */
13111 #define LPUART_STAT_LBKDE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDE_SHIFT)) & LPUART_STAT_LBKDE_MASK)
13112 
13113 #define LPUART_STAT_BRK13_MASK                   (0x4000000U)
13114 #define LPUART_STAT_BRK13_SHIFT                  (26U)
13115 /*! BRK13 - Break Character Generation Length
13116  *  0b0..Break character is transmitted with length of 9 to 13 bit times.
13117  *  0b1..Break character is transmitted with length of 12 to 15 bit times.
13118  */
13119 #define LPUART_STAT_BRK13(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_BRK13_SHIFT)) & LPUART_STAT_BRK13_MASK)
13120 
13121 #define LPUART_STAT_RWUID_MASK                   (0x8000000U)
13122 #define LPUART_STAT_RWUID_SHIFT                  (27U)
13123 /*! RWUID - Receive Wake Up Idle Detect
13124  *  0b0..During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle
13125  *       character. During address match wakeup, the IDLE bit does not set when an address does not match.
13126  *  0b1..During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character. During
13127  *       address match wakeup, the IDLE bit does set when an address does not match.
13128  */
13129 #define LPUART_STAT_RWUID(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RWUID_SHIFT)) & LPUART_STAT_RWUID_MASK)
13130 
13131 #define LPUART_STAT_RXINV_MASK                   (0x10000000U)
13132 #define LPUART_STAT_RXINV_SHIFT                  (28U)
13133 /*! RXINV - Receive Data Inversion
13134  *  0b0..Receive data not inverted.
13135  *  0b1..Receive data inverted.
13136  */
13137 #define LPUART_STAT_RXINV(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXINV_SHIFT)) & LPUART_STAT_RXINV_MASK)
13138 
13139 #define LPUART_STAT_MSBF_MASK                    (0x20000000U)
13140 #define LPUART_STAT_MSBF_SHIFT                   (29U)
13141 /*! MSBF - MSB First
13142  *  0b0..LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received
13143  *       after the start bit is identified as bit0.
13144  *  0b1..MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted following the start bit depending on
13145  *       the setting of CTRL[M], CTRL[PE] and BAUD[M10]. Further, the first bit received after the start bit is
13146  *       identified as bit9, bit8, bit7 or bit6 depending on the setting of CTRL[M] and CTRL[PE].
13147  */
13148 #define LPUART_STAT_MSBF(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MSBF_SHIFT)) & LPUART_STAT_MSBF_MASK)
13149 
13150 #define LPUART_STAT_RXEDGIF_MASK                 (0x40000000U)
13151 #define LPUART_STAT_RXEDGIF_SHIFT                (30U)
13152 /*! RXEDGIF - RXD Pin Active Edge Interrupt Flag
13153  *  0b0..No active edge on the receive pin has occurred.
13154  *  0b1..An active edge on the receive pin has occurred.
13155  */
13156 #define LPUART_STAT_RXEDGIF(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXEDGIF_SHIFT)) & LPUART_STAT_RXEDGIF_MASK)
13157 
13158 #define LPUART_STAT_LBKDIF_MASK                  (0x80000000U)
13159 #define LPUART_STAT_LBKDIF_SHIFT                 (31U)
13160 /*! LBKDIF - LIN Break Detect Interrupt Flag
13161  *  0b0..No LIN break character has been detected.
13162  *  0b1..LIN break character has been detected.
13163  */
13164 #define LPUART_STAT_LBKDIF(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDIF_SHIFT)) & LPUART_STAT_LBKDIF_MASK)
13165 /*! @} */
13166 
13167 /*! @name CTRL - LPUART Control Register */
13168 /*! @{ */
13169 
13170 #define LPUART_CTRL_PT_MASK                      (0x1U)
13171 #define LPUART_CTRL_PT_SHIFT                     (0U)
13172 /*! PT - Parity Type
13173  *  0b0..Even parity.
13174  *  0b1..Odd parity.
13175  */
13176 #define LPUART_CTRL_PT(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PT_SHIFT)) & LPUART_CTRL_PT_MASK)
13177 
13178 #define LPUART_CTRL_PE_MASK                      (0x2U)
13179 #define LPUART_CTRL_PE_SHIFT                     (1U)
13180 /*! PE - Parity Enable
13181  *  0b0..No hardware parity generation or checking.
13182  *  0b1..Parity enabled.
13183  */
13184 #define LPUART_CTRL_PE(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PE_SHIFT)) & LPUART_CTRL_PE_MASK)
13185 
13186 #define LPUART_CTRL_ILT_MASK                     (0x4U)
13187 #define LPUART_CTRL_ILT_SHIFT                    (2U)
13188 /*! ILT - Idle Line Type Select
13189  *  0b0..Idle character bit count starts after start bit.
13190  *  0b1..Idle character bit count starts after stop bit.
13191  */
13192 #define LPUART_CTRL_ILT(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILT_SHIFT)) & LPUART_CTRL_ILT_MASK)
13193 
13194 #define LPUART_CTRL_WAKE_MASK                    (0x8U)
13195 #define LPUART_CTRL_WAKE_SHIFT                   (3U)
13196 /*! WAKE - Receiver Wakeup Method Select
13197  *  0b0..Configures RWU for idle-line wakeup.
13198  *  0b1..Configures RWU with address-mark wakeup.
13199  */
13200 #define LPUART_CTRL_WAKE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_WAKE_SHIFT)) & LPUART_CTRL_WAKE_MASK)
13201 
13202 #define LPUART_CTRL_M_MASK                       (0x10U)
13203 #define LPUART_CTRL_M_SHIFT                      (4U)
13204 /*! M - 9-Bit or 8-Bit Mode Select
13205  *  0b0..Receiver and transmitter use 8-bit data characters.
13206  *  0b1..Receiver and transmitter use 9-bit data characters.
13207  */
13208 #define LPUART_CTRL_M(x)                         (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_M_SHIFT)) & LPUART_CTRL_M_MASK)
13209 
13210 #define LPUART_CTRL_RSRC_MASK                    (0x20U)
13211 #define LPUART_CTRL_RSRC_SHIFT                   (5U)
13212 /*! RSRC - Receiver Source Select
13213  *  0b0..Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the LPUART does not use the RXD pin.
13214  *  0b1..Single-wire LPUART mode where the TXD pin is connected to the transmitter output and receiver input.
13215  */
13216 #define LPUART_CTRL_RSRC(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RSRC_SHIFT)) & LPUART_CTRL_RSRC_MASK)
13217 
13218 #define LPUART_CTRL_DOZEEN_MASK                  (0x40U)
13219 #define LPUART_CTRL_DOZEEN_SHIFT                 (6U)
13220 /*! DOZEEN - Doze Enable
13221  *  0b0..LPUART is enabled in Doze mode.
13222  *  0b1..LPUART is disabled in Doze mode.
13223  */
13224 #define LPUART_CTRL_DOZEEN(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_DOZEEN_SHIFT)) & LPUART_CTRL_DOZEEN_MASK)
13225 
13226 #define LPUART_CTRL_LOOPS_MASK                   (0x80U)
13227 #define LPUART_CTRL_LOOPS_SHIFT                  (7U)
13228 /*! LOOPS - Loop Mode Select
13229  *  0b0..Normal operation - RXD and TXD use separate pins.
13230  *  0b1..Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input (see RSRC bit).
13231  */
13232 #define LPUART_CTRL_LOOPS(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_LOOPS_SHIFT)) & LPUART_CTRL_LOOPS_MASK)
13233 
13234 #define LPUART_CTRL_IDLECFG_MASK                 (0x700U)
13235 #define LPUART_CTRL_IDLECFG_SHIFT                (8U)
13236 /*! IDLECFG - Idle Configuration
13237  *  0b000..1 idle character
13238  *  0b001..2 idle characters
13239  *  0b010..4 idle characters
13240  *  0b011..8 idle characters
13241  *  0b100..16 idle characters
13242  *  0b101..32 idle characters
13243  *  0b110..64 idle characters
13244  *  0b111..128 idle characters
13245  */
13246 #define LPUART_CTRL_IDLECFG(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_IDLECFG_SHIFT)) & LPUART_CTRL_IDLECFG_MASK)
13247 
13248 #define LPUART_CTRL_M7_MASK                      (0x800U)
13249 #define LPUART_CTRL_M7_SHIFT                     (11U)
13250 /*! M7 - 7-Bit Mode Select
13251  *  0b0..Receiver and transmitter use 8-bit to 10-bit data characters.
13252  *  0b1..Receiver and transmitter use 7-bit data characters.
13253  */
13254 #define LPUART_CTRL_M7(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_M7_SHIFT)) & LPUART_CTRL_M7_MASK)
13255 
13256 #define LPUART_CTRL_MA2IE_MASK                   (0x4000U)
13257 #define LPUART_CTRL_MA2IE_SHIFT                  (14U)
13258 /*! MA2IE - Match 2 Interrupt Enable
13259  *  0b0..MA2F interrupt disabled
13260  *  0b1..MA2F interrupt enabled
13261  */
13262 #define LPUART_CTRL_MA2IE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA2IE_SHIFT)) & LPUART_CTRL_MA2IE_MASK)
13263 
13264 #define LPUART_CTRL_MA1IE_MASK                   (0x8000U)
13265 #define LPUART_CTRL_MA1IE_SHIFT                  (15U)
13266 /*! MA1IE - Match 1 Interrupt Enable
13267  *  0b0..MA1F interrupt disabled
13268  *  0b1..MA1F interrupt enabled
13269  */
13270 #define LPUART_CTRL_MA1IE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA1IE_SHIFT)) & LPUART_CTRL_MA1IE_MASK)
13271 
13272 #define LPUART_CTRL_SBK_MASK                     (0x10000U)
13273 #define LPUART_CTRL_SBK_SHIFT                    (16U)
13274 /*! SBK - Send Break
13275  *  0b0..Normal transmitter operation.
13276  *  0b1..Queue break character(s) to be sent.
13277  */
13278 #define LPUART_CTRL_SBK(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_SBK_SHIFT)) & LPUART_CTRL_SBK_MASK)
13279 
13280 #define LPUART_CTRL_RWU_MASK                     (0x20000U)
13281 #define LPUART_CTRL_RWU_SHIFT                    (17U)
13282 /*! RWU - Receiver Wakeup Control
13283  *  0b0..Normal receiver operation.
13284  *  0b1..LPUART receiver in standby waiting for wakeup condition.
13285  */
13286 #define LPUART_CTRL_RWU(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RWU_SHIFT)) & LPUART_CTRL_RWU_MASK)
13287 
13288 #define LPUART_CTRL_RE_MASK                      (0x40000U)
13289 #define LPUART_CTRL_RE_SHIFT                     (18U)
13290 /*! RE - Receiver Enable
13291  *  0b0..Receiver disabled.
13292  *  0b1..Receiver enabled.
13293  */
13294 #define LPUART_CTRL_RE(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RE_SHIFT)) & LPUART_CTRL_RE_MASK)
13295 
13296 #define LPUART_CTRL_TE_MASK                      (0x80000U)
13297 #define LPUART_CTRL_TE_SHIFT                     (19U)
13298 /*! TE - Transmitter Enable
13299  *  0b0..Transmitter disabled.
13300  *  0b1..Transmitter enabled.
13301  */
13302 #define LPUART_CTRL_TE(x)                        (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TE_SHIFT)) & LPUART_CTRL_TE_MASK)
13303 
13304 #define LPUART_CTRL_ILIE_MASK                    (0x100000U)
13305 #define LPUART_CTRL_ILIE_SHIFT                   (20U)
13306 /*! ILIE - Idle Line Interrupt Enable
13307  *  0b0..Hardware interrupts from IDLE disabled; use polling.
13308  *  0b1..Hardware interrupt requested when IDLE flag is 1.
13309  */
13310 #define LPUART_CTRL_ILIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILIE_SHIFT)) & LPUART_CTRL_ILIE_MASK)
13311 
13312 #define LPUART_CTRL_RIE_MASK                     (0x200000U)
13313 #define LPUART_CTRL_RIE_SHIFT                    (21U)
13314 /*! RIE - Receiver Interrupt Enable
13315  *  0b0..Hardware interrupts from RDRF disabled; use polling.
13316  *  0b1..Hardware interrupt requested when RDRF flag is 1.
13317  */
13318 #define LPUART_CTRL_RIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RIE_SHIFT)) & LPUART_CTRL_RIE_MASK)
13319 
13320 #define LPUART_CTRL_TCIE_MASK                    (0x400000U)
13321 #define LPUART_CTRL_TCIE_SHIFT                   (22U)
13322 /*! TCIE - Transmission Complete Interrupt Enable for
13323  *  0b0..Hardware interrupts from TC disabled; use polling.
13324  *  0b1..Hardware interrupt requested when TC flag is 1.
13325  */
13326 #define LPUART_CTRL_TCIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TCIE_SHIFT)) & LPUART_CTRL_TCIE_MASK)
13327 
13328 #define LPUART_CTRL_TIE_MASK                     (0x800000U)
13329 #define LPUART_CTRL_TIE_SHIFT                    (23U)
13330 /*! TIE - Transmit Interrupt Enable
13331  *  0b0..Hardware interrupts from TDRE disabled; use polling.
13332  *  0b1..Hardware interrupt requested when TDRE flag is 1.
13333  */
13334 #define LPUART_CTRL_TIE(x)                       (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TIE_SHIFT)) & LPUART_CTRL_TIE_MASK)
13335 
13336 #define LPUART_CTRL_PEIE_MASK                    (0x1000000U)
13337 #define LPUART_CTRL_PEIE_SHIFT                   (24U)
13338 /*! PEIE - Parity Error Interrupt Enable
13339  *  0b0..PF interrupts disabled; use polling).
13340  *  0b1..Hardware interrupt requested when PF is set.
13341  */
13342 #define LPUART_CTRL_PEIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PEIE_SHIFT)) & LPUART_CTRL_PEIE_MASK)
13343 
13344 #define LPUART_CTRL_FEIE_MASK                    (0x2000000U)
13345 #define LPUART_CTRL_FEIE_SHIFT                   (25U)
13346 /*! FEIE - Framing Error Interrupt Enable
13347  *  0b0..FE interrupts disabled; use polling.
13348  *  0b1..Hardware interrupt requested when FE is set.
13349  */
13350 #define LPUART_CTRL_FEIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_FEIE_SHIFT)) & LPUART_CTRL_FEIE_MASK)
13351 
13352 #define LPUART_CTRL_NEIE_MASK                    (0x4000000U)
13353 #define LPUART_CTRL_NEIE_SHIFT                   (26U)
13354 /*! NEIE - Noise Error Interrupt Enable
13355  *  0b0..NF interrupts disabled; use polling.
13356  *  0b1..Hardware interrupt requested when NF is set.
13357  */
13358 #define LPUART_CTRL_NEIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_NEIE_SHIFT)) & LPUART_CTRL_NEIE_MASK)
13359 
13360 #define LPUART_CTRL_ORIE_MASK                    (0x8000000U)
13361 #define LPUART_CTRL_ORIE_SHIFT                   (27U)
13362 /*! ORIE - Overrun Interrupt Enable
13363  *  0b0..OR interrupts disabled; use polling.
13364  *  0b1..Hardware interrupt requested when OR is set.
13365  */
13366 #define LPUART_CTRL_ORIE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ORIE_SHIFT)) & LPUART_CTRL_ORIE_MASK)
13367 
13368 #define LPUART_CTRL_TXINV_MASK                   (0x10000000U)
13369 #define LPUART_CTRL_TXINV_SHIFT                  (28U)
13370 /*! TXINV - Transmit Data Inversion
13371  *  0b0..Transmit data not inverted.
13372  *  0b1..Transmit data inverted.
13373  */
13374 #define LPUART_CTRL_TXINV(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXINV_SHIFT)) & LPUART_CTRL_TXINV_MASK)
13375 
13376 #define LPUART_CTRL_TXDIR_MASK                   (0x20000000U)
13377 #define LPUART_CTRL_TXDIR_SHIFT                  (29U)
13378 /*! TXDIR - TXD Pin Direction in Single-Wire Mode
13379  *  0b0..TXD pin is an input in single-wire mode.
13380  *  0b1..TXD pin is an output in single-wire mode.
13381  */
13382 #define LPUART_CTRL_TXDIR(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXDIR_SHIFT)) & LPUART_CTRL_TXDIR_MASK)
13383 
13384 #define LPUART_CTRL_R9T8_MASK                    (0x40000000U)
13385 #define LPUART_CTRL_R9T8_SHIFT                   (30U)
13386 /*! R9T8 - Receive Bit 9 / Transmit Bit 8 */
13387 #define LPUART_CTRL_R9T8(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R9T8_SHIFT)) & LPUART_CTRL_R9T8_MASK)
13388 
13389 #define LPUART_CTRL_R8T9_MASK                    (0x80000000U)
13390 #define LPUART_CTRL_R8T9_SHIFT                   (31U)
13391 /*! R8T9 - Receive Bit 8 / Transmit Bit 9 */
13392 #define LPUART_CTRL_R8T9(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R8T9_SHIFT)) & LPUART_CTRL_R8T9_MASK)
13393 /*! @} */
13394 
13395 /*! @name DATA - LPUART Data Register */
13396 /*! @{ */
13397 
13398 #define LPUART_DATA_R0T0_MASK                    (0x1U)
13399 #define LPUART_DATA_R0T0_SHIFT                   (0U)
13400 /*! R0T0 - R0T0 */
13401 #define LPUART_DATA_R0T0(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R0T0_SHIFT)) & LPUART_DATA_R0T0_MASK)
13402 
13403 #define LPUART_DATA_R1T1_MASK                    (0x2U)
13404 #define LPUART_DATA_R1T1_SHIFT                   (1U)
13405 /*! R1T1 - R1T1 */
13406 #define LPUART_DATA_R1T1(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R1T1_SHIFT)) & LPUART_DATA_R1T1_MASK)
13407 
13408 #define LPUART_DATA_R2T2_MASK                    (0x4U)
13409 #define LPUART_DATA_R2T2_SHIFT                   (2U)
13410 /*! R2T2 - R2T2 */
13411 #define LPUART_DATA_R2T2(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R2T2_SHIFT)) & LPUART_DATA_R2T2_MASK)
13412 
13413 #define LPUART_DATA_R3T3_MASK                    (0x8U)
13414 #define LPUART_DATA_R3T3_SHIFT                   (3U)
13415 /*! R3T3 - R3T3 */
13416 #define LPUART_DATA_R3T3(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R3T3_SHIFT)) & LPUART_DATA_R3T3_MASK)
13417 
13418 #define LPUART_DATA_R4T4_MASK                    (0x10U)
13419 #define LPUART_DATA_R4T4_SHIFT                   (4U)
13420 /*! R4T4 - R4T4 */
13421 #define LPUART_DATA_R4T4(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R4T4_SHIFT)) & LPUART_DATA_R4T4_MASK)
13422 
13423 #define LPUART_DATA_R5T5_MASK                    (0x20U)
13424 #define LPUART_DATA_R5T5_SHIFT                   (5U)
13425 /*! R5T5 - R5T5 */
13426 #define LPUART_DATA_R5T5(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R5T5_SHIFT)) & LPUART_DATA_R5T5_MASK)
13427 
13428 #define LPUART_DATA_R6T6_MASK                    (0x40U)
13429 #define LPUART_DATA_R6T6_SHIFT                   (6U)
13430 /*! R6T6 - R6T6 */
13431 #define LPUART_DATA_R6T6(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R6T6_SHIFT)) & LPUART_DATA_R6T6_MASK)
13432 
13433 #define LPUART_DATA_R7T7_MASK                    (0x80U)
13434 #define LPUART_DATA_R7T7_SHIFT                   (7U)
13435 /*! R7T7 - R7T7 */
13436 #define LPUART_DATA_R7T7(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R7T7_SHIFT)) & LPUART_DATA_R7T7_MASK)
13437 
13438 #define LPUART_DATA_R8T8_MASK                    (0x100U)
13439 #define LPUART_DATA_R8T8_SHIFT                   (8U)
13440 /*! R8T8 - R8T8 */
13441 #define LPUART_DATA_R8T8(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R8T8_SHIFT)) & LPUART_DATA_R8T8_MASK)
13442 
13443 #define LPUART_DATA_R9T9_MASK                    (0x200U)
13444 #define LPUART_DATA_R9T9_SHIFT                   (9U)
13445 /*! R9T9 - R9T9 */
13446 #define LPUART_DATA_R9T9(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R9T9_SHIFT)) & LPUART_DATA_R9T9_MASK)
13447 
13448 #define LPUART_DATA_IDLINE_MASK                  (0x800U)
13449 #define LPUART_DATA_IDLINE_SHIFT                 (11U)
13450 /*! IDLINE - Idle Line
13451  *  0b0..Receiver was not idle before receiving this character.
13452  *  0b1..Receiver was idle before receiving this character.
13453  */
13454 #define LPUART_DATA_IDLINE(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_IDLINE_SHIFT)) & LPUART_DATA_IDLINE_MASK)
13455 
13456 #define LPUART_DATA_RXEMPT_MASK                  (0x1000U)
13457 #define LPUART_DATA_RXEMPT_SHIFT                 (12U)
13458 /*! RXEMPT - Receive Buffer Empty
13459  *  0b0..Receive buffer contains valid data.
13460  *  0b1..Receive buffer is empty, data returned on read is not valid.
13461  */
13462 #define LPUART_DATA_RXEMPT(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_RXEMPT_SHIFT)) & LPUART_DATA_RXEMPT_MASK)
13463 
13464 #define LPUART_DATA_FRETSC_MASK                  (0x2000U)
13465 #define LPUART_DATA_FRETSC_SHIFT                 (13U)
13466 /*! FRETSC - Frame Error / Transmit Special Character
13467  *  0b0..The dataword was received without a frame error on read, or transmit a normal character on write.
13468  *  0b1..The dataword was received with a frame error, or transmit an idle or break character on transmit.
13469  */
13470 #define LPUART_DATA_FRETSC(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_FRETSC_SHIFT)) & LPUART_DATA_FRETSC_MASK)
13471 
13472 #define LPUART_DATA_PARITYE_MASK                 (0x4000U)
13473 #define LPUART_DATA_PARITYE_SHIFT                (14U)
13474 /*! PARITYE - PARITYE
13475  *  0b0..The dataword was received without a parity error.
13476  *  0b1..The dataword was received with a parity error.
13477  */
13478 #define LPUART_DATA_PARITYE(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_PARITYE_SHIFT)) & LPUART_DATA_PARITYE_MASK)
13479 
13480 #define LPUART_DATA_NOISY_MASK                   (0x8000U)
13481 #define LPUART_DATA_NOISY_SHIFT                  (15U)
13482 /*! NOISY - NOISY
13483  *  0b0..The dataword was received without noise.
13484  *  0b1..The data was received with noise.
13485  */
13486 #define LPUART_DATA_NOISY(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_NOISY_SHIFT)) & LPUART_DATA_NOISY_MASK)
13487 /*! @} */
13488 
13489 /*! @name MATCH - LPUART Match Address Register */
13490 /*! @{ */
13491 
13492 #define LPUART_MATCH_MA1_MASK                    (0x3FFU)
13493 #define LPUART_MATCH_MA1_SHIFT                   (0U)
13494 /*! MA1 - Match Address 1 */
13495 #define LPUART_MATCH_MA1(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA1_SHIFT)) & LPUART_MATCH_MA1_MASK)
13496 
13497 #define LPUART_MATCH_MA2_MASK                    (0x3FF0000U)
13498 #define LPUART_MATCH_MA2_SHIFT                   (16U)
13499 /*! MA2 - Match Address 2 */
13500 #define LPUART_MATCH_MA2(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA2_SHIFT)) & LPUART_MATCH_MA2_MASK)
13501 /*! @} */
13502 
13503 /*! @name MODIR - LPUART Modem IrDA Register */
13504 /*! @{ */
13505 
13506 #define LPUART_MODIR_TXCTSE_MASK                 (0x1U)
13507 #define LPUART_MODIR_TXCTSE_SHIFT                (0U)
13508 /*! TXCTSE - Transmitter clear-to-send enable
13509  *  0b0..CTS has no effect on the transmitter.
13510  *  0b1..Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a
13511  *       character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the
13512  *       mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent
13513  *       do not affect its transmission.
13514  */
13515 #define LPUART_MODIR_TXCTSE(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSE_SHIFT)) & LPUART_MODIR_TXCTSE_MASK)
13516 
13517 #define LPUART_MODIR_TXRTSE_MASK                 (0x2U)
13518 #define LPUART_MODIR_TXRTSE_SHIFT                (1U)
13519 /*! TXRTSE - Transmitter request-to-send enable
13520  *  0b0..The transmitter has no effect on RTS.
13521  *  0b1..When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the
13522  *       start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and
13523  *       shift register are completely sent, including the last stop bit.
13524  */
13525 #define LPUART_MODIR_TXRTSE(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSE_SHIFT)) & LPUART_MODIR_TXRTSE_MASK)
13526 
13527 #define LPUART_MODIR_TXRTSPOL_MASK               (0x4U)
13528 #define LPUART_MODIR_TXRTSPOL_SHIFT              (2U)
13529 /*! TXRTSPOL - Transmitter request-to-send polarity
13530  *  0b0..Transmitter RTS is active low.
13531  *  0b1..Transmitter RTS is active high.
13532  */
13533 #define LPUART_MODIR_TXRTSPOL(x)                 (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSPOL_SHIFT)) & LPUART_MODIR_TXRTSPOL_MASK)
13534 
13535 #define LPUART_MODIR_RXRTSE_MASK                 (0x8U)
13536 #define LPUART_MODIR_RXRTSE_SHIFT                (3U)
13537 /*! RXRTSE - Receiver request-to-send enable
13538  *  0b0..The receiver has no effect on RTS.
13539  *  0b1..RTS is deasserted if the receiver data register is full or a start bit has been detected that would cause
13540  *       the receiver data register to become full. RTS is asserted if the receiver data register is not full and
13541  *       has not detected a start bit that would cause the receiver data register to become full.
13542  */
13543 #define LPUART_MODIR_RXRTSE(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RXRTSE_SHIFT)) & LPUART_MODIR_RXRTSE_MASK)
13544 
13545 #define LPUART_MODIR_TXCTSC_MASK                 (0x10U)
13546 #define LPUART_MODIR_TXCTSC_SHIFT                (4U)
13547 /*! TXCTSC - Transmit CTS Configuration
13548  *  0b0..CTS input is sampled at the start of each character.
13549  *  0b1..CTS input is sampled when the transmitter is idle.
13550  */
13551 #define LPUART_MODIR_TXCTSC(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSC_SHIFT)) & LPUART_MODIR_TXCTSC_MASK)
13552 
13553 #define LPUART_MODIR_TXCTSSRC_MASK               (0x20U)
13554 #define LPUART_MODIR_TXCTSSRC_SHIFT              (5U)
13555 /*! TXCTSSRC - Transmit CTS Source
13556  *  0b0..CTS input is the CTS_B pin.
13557  *  0b1..CTS input is the inverted Receiver Match result.
13558  */
13559 #define LPUART_MODIR_TXCTSSRC(x)                 (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSSRC_SHIFT)) & LPUART_MODIR_TXCTSSRC_MASK)
13560 
13561 #define LPUART_MODIR_RTSWATER_MASK               (0x700U)
13562 #define LPUART_MODIR_RTSWATER_SHIFT              (8U)
13563 /*! RTSWATER - Receive RTS Configuration */
13564 #define LPUART_MODIR_RTSWATER(x)                 (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RTSWATER_SHIFT)) & LPUART_MODIR_RTSWATER_MASK)
13565 
13566 #define LPUART_MODIR_TNP_MASK                    (0x30000U)
13567 #define LPUART_MODIR_TNP_SHIFT                   (16U)
13568 /*! TNP - Transmitter narrow pulse
13569  *  0b00..1/OSR.
13570  *  0b01..2/OSR.
13571  *  0b10..3/OSR.
13572  *  0b11..4/OSR.
13573  */
13574 #define LPUART_MODIR_TNP(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TNP_SHIFT)) & LPUART_MODIR_TNP_MASK)
13575 
13576 #define LPUART_MODIR_IREN_MASK                   (0x40000U)
13577 #define LPUART_MODIR_IREN_SHIFT                  (18U)
13578 /*! IREN - Infrared enable
13579  *  0b0..IR disabled.
13580  *  0b1..IR enabled.
13581  */
13582 #define LPUART_MODIR_IREN(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_IREN_SHIFT)) & LPUART_MODIR_IREN_MASK)
13583 /*! @} */
13584 
13585 /*! @name FIFO - LPUART FIFO Register */
13586 /*! @{ */
13587 
13588 #define LPUART_FIFO_RXFIFOSIZE_MASK              (0x7U)
13589 #define LPUART_FIFO_RXFIFOSIZE_SHIFT             (0U)
13590 /*! RXFIFOSIZE - Receive FIFO. Buffer Depth
13591  *  0b000..Receive FIFO/Buffer depth = 1 dataword.
13592  *  0b001..Receive FIFO/Buffer depth = 4 datawords.
13593  *  0b010..Receive FIFO/Buffer depth = 8 datawords.
13594  *  0b011..Receive FIFO/Buffer depth = 16 datawords.
13595  *  0b100..Receive FIFO/Buffer depth = 32 datawords.
13596  *  0b101..Receive FIFO/Buffer depth = 64 datawords.
13597  *  0b110..Receive FIFO/Buffer depth = 128 datawords.
13598  *  0b111..Receive FIFO/Buffer depth = 256 datawords.
13599  */
13600 #define LPUART_FIFO_RXFIFOSIZE(x)                (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFIFOSIZE_SHIFT)) & LPUART_FIFO_RXFIFOSIZE_MASK)
13601 
13602 #define LPUART_FIFO_RXFE_MASK                    (0x8U)
13603 #define LPUART_FIFO_RXFE_SHIFT                   (3U)
13604 /*! RXFE - Receive FIFO Enable
13605  *  0b0..Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)
13606  *  0b1..Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE.
13607  */
13608 #define LPUART_FIFO_RXFE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFE_SHIFT)) & LPUART_FIFO_RXFE_MASK)
13609 
13610 #define LPUART_FIFO_TXFIFOSIZE_MASK              (0x70U)
13611 #define LPUART_FIFO_TXFIFOSIZE_SHIFT             (4U)
13612 /*! TXFIFOSIZE - Transmit FIFO. Buffer Depth
13613  *  0b000..Transmit FIFO/Buffer depth = 1 dataword.
13614  *  0b001..Transmit FIFO/Buffer depth = 4 datawords.
13615  *  0b010..Transmit FIFO/Buffer depth = 8 datawords.
13616  *  0b011..Transmit FIFO/Buffer depth = 16 datawords.
13617  *  0b100..Transmit FIFO/Buffer depth = 32 datawords.
13618  *  0b101..Transmit FIFO/Buffer depth = 64 datawords.
13619  *  0b110..Transmit FIFO/Buffer depth = 128 datawords.
13620  *  0b111..Transmit FIFO/Buffer depth = 256 datawords
13621  */
13622 #define LPUART_FIFO_TXFIFOSIZE(x)                (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFIFOSIZE_SHIFT)) & LPUART_FIFO_TXFIFOSIZE_MASK)
13623 
13624 #define LPUART_FIFO_TXFE_MASK                    (0x80U)
13625 #define LPUART_FIFO_TXFE_SHIFT                   (7U)
13626 /*! TXFE - Transmit FIFO Enable
13627  *  0b0..Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support).
13628  *  0b1..Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE.
13629  */
13630 #define LPUART_FIFO_TXFE(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFE_SHIFT)) & LPUART_FIFO_TXFE_MASK)
13631 
13632 #define LPUART_FIFO_RXUFE_MASK                   (0x100U)
13633 #define LPUART_FIFO_RXUFE_SHIFT                  (8U)
13634 /*! RXUFE - Receive FIFO Underflow Interrupt Enable
13635  *  0b0..RXUF flag does not generate an interrupt to the host.
13636  *  0b1..RXUF flag generates an interrupt to the host.
13637  */
13638 #define LPUART_FIFO_RXUFE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUFE_SHIFT)) & LPUART_FIFO_RXUFE_MASK)
13639 
13640 #define LPUART_FIFO_TXOFE_MASK                   (0x200U)
13641 #define LPUART_FIFO_TXOFE_SHIFT                  (9U)
13642 /*! TXOFE - Transmit FIFO Overflow Interrupt Enable
13643  *  0b0..TXOF flag does not generate an interrupt to the host.
13644  *  0b1..TXOF flag generates an interrupt to the host.
13645  */
13646 #define LPUART_FIFO_TXOFE(x)                     (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOFE_SHIFT)) & LPUART_FIFO_TXOFE_MASK)
13647 
13648 #define LPUART_FIFO_RXIDEN_MASK                  (0x1C00U)
13649 #define LPUART_FIFO_RXIDEN_SHIFT                 (10U)
13650 /*! RXIDEN - Receiver Idle Empty Enable
13651  *  0b000..Disable RDRF assertion due to partially filled FIFO when receiver is idle.
13652  *  0b001..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 1 character.
13653  *  0b010..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 2 characters.
13654  *  0b011..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 4 characters.
13655  *  0b100..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 8 characters.
13656  *  0b101..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 16 characters.
13657  *  0b110..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 32 characters.
13658  *  0b111..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 64 characters.
13659  */
13660 #define LPUART_FIFO_RXIDEN(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXIDEN_SHIFT)) & LPUART_FIFO_RXIDEN_MASK)
13661 
13662 #define LPUART_FIFO_RXFLUSH_MASK                 (0x4000U)
13663 #define LPUART_FIFO_RXFLUSH_SHIFT                (14U)
13664 /*! RXFLUSH - Receive FIFO/Buffer Flush
13665  *  0b0..No flush operation occurs.
13666  *  0b1..All data in the receive FIFO/buffer is cleared out.
13667  */
13668 #define LPUART_FIFO_RXFLUSH(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFLUSH_SHIFT)) & LPUART_FIFO_RXFLUSH_MASK)
13669 
13670 #define LPUART_FIFO_TXFLUSH_MASK                 (0x8000U)
13671 #define LPUART_FIFO_TXFLUSH_SHIFT                (15U)
13672 /*! TXFLUSH - Transmit FIFO/Buffer Flush
13673  *  0b0..No flush operation occurs.
13674  *  0b1..All data in the transmit FIFO/Buffer is cleared out.
13675  */
13676 #define LPUART_FIFO_TXFLUSH(x)                   (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFLUSH_SHIFT)) & LPUART_FIFO_TXFLUSH_MASK)
13677 
13678 #define LPUART_FIFO_RXUF_MASK                    (0x10000U)
13679 #define LPUART_FIFO_RXUF_SHIFT                   (16U)
13680 /*! RXUF - Receiver Buffer Underflow Flag
13681  *  0b0..No receive buffer underflow has occurred since the last time the flag was cleared.
13682  *  0b1..At least one receive buffer underflow has occurred since the last time the flag was cleared.
13683  */
13684 #define LPUART_FIFO_RXUF(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUF_SHIFT)) & LPUART_FIFO_RXUF_MASK)
13685 
13686 #define LPUART_FIFO_TXOF_MASK                    (0x20000U)
13687 #define LPUART_FIFO_TXOF_SHIFT                   (17U)
13688 /*! TXOF - Transmitter Buffer Overflow Flag
13689  *  0b0..No transmit buffer overflow has occurred since the last time the flag was cleared.
13690  *  0b1..At least one transmit buffer overflow has occurred since the last time the flag was cleared.
13691  */
13692 #define LPUART_FIFO_TXOF(x)                      (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOF_SHIFT)) & LPUART_FIFO_TXOF_MASK)
13693 
13694 #define LPUART_FIFO_RXEMPT_MASK                  (0x400000U)
13695 #define LPUART_FIFO_RXEMPT_SHIFT                 (22U)
13696 /*! RXEMPT - Receive Buffer/FIFO Empty
13697  *  0b0..Receive buffer is not empty.
13698  *  0b1..Receive buffer is empty.
13699  */
13700 #define LPUART_FIFO_RXEMPT(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXEMPT_SHIFT)) & LPUART_FIFO_RXEMPT_MASK)
13701 
13702 #define LPUART_FIFO_TXEMPT_MASK                  (0x800000U)
13703 #define LPUART_FIFO_TXEMPT_SHIFT                 (23U)
13704 /*! TXEMPT - Transmit Buffer/FIFO Empty
13705  *  0b0..Transmit buffer is not empty.
13706  *  0b1..Transmit buffer is empty.
13707  */
13708 #define LPUART_FIFO_TXEMPT(x)                    (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXEMPT_SHIFT)) & LPUART_FIFO_TXEMPT_MASK)
13709 /*! @} */
13710 
13711 /*! @name WATER - LPUART Watermark Register */
13712 /*! @{ */
13713 
13714 #define LPUART_WATER_TXWATER_MASK                (0x7U)
13715 #define LPUART_WATER_TXWATER_SHIFT               (0U)
13716 /*! TXWATER - Transmit Watermark */
13717 #define LPUART_WATER_TXWATER(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXWATER_SHIFT)) & LPUART_WATER_TXWATER_MASK)
13718 
13719 #define LPUART_WATER_TXCOUNT_MASK                (0xF00U)
13720 #define LPUART_WATER_TXCOUNT_SHIFT               (8U)
13721 /*! TXCOUNT - Transmit Counter */
13722 #define LPUART_WATER_TXCOUNT(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXCOUNT_SHIFT)) & LPUART_WATER_TXCOUNT_MASK)
13723 
13724 #define LPUART_WATER_RXWATER_MASK                (0x70000U)
13725 #define LPUART_WATER_RXWATER_SHIFT               (16U)
13726 /*! RXWATER - Receive Watermark */
13727 #define LPUART_WATER_RXWATER(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXWATER_SHIFT)) & LPUART_WATER_RXWATER_MASK)
13728 
13729 #define LPUART_WATER_RXCOUNT_MASK                (0xF000000U)
13730 #define LPUART_WATER_RXCOUNT_SHIFT               (24U)
13731 /*! RXCOUNT - Receive Counter */
13732 #define LPUART_WATER_RXCOUNT(x)                  (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXCOUNT_SHIFT)) & LPUART_WATER_RXCOUNT_MASK)
13733 /*! @} */
13734 
13735 
13736 /*!
13737  * @}
13738  */ /* end of group LPUART_Register_Masks */
13739 
13740 
13741 /* LPUART - Peripheral instance base addresses */
13742 /** Peripheral LPUART0 base address */
13743 #define LPUART0_BASE                             (0x40042000u)
13744 /** Peripheral LPUART0 base pointer */
13745 #define LPUART0                                  ((LPUART_Type *)LPUART0_BASE)
13746 /** Peripheral LPUART1 base address */
13747 #define LPUART1_BASE                             (0x40043000u)
13748 /** Peripheral LPUART1 base pointer */
13749 #define LPUART1                                  ((LPUART_Type *)LPUART1_BASE)
13750 /** Peripheral LPUART2 base address */
13751 #define LPUART2_BASE                             (0x40044000u)
13752 /** Peripheral LPUART2 base pointer */
13753 #define LPUART2                                  ((LPUART_Type *)LPUART2_BASE)
13754 /** Peripheral LPUART3 base address */
13755 #define LPUART3_BASE                             (0x41036000u)
13756 /** Peripheral LPUART3 base pointer */
13757 #define LPUART3                                  ((LPUART_Type *)LPUART3_BASE)
13758 /** Array initializer of LPUART peripheral base addresses */
13759 #define LPUART_BASE_ADDRS                        { LPUART0_BASE, LPUART1_BASE, LPUART2_BASE, LPUART3_BASE }
13760 /** Array initializer of LPUART peripheral base pointers */
13761 #define LPUART_BASE_PTRS                         { LPUART0, LPUART1, LPUART2, LPUART3 }
13762 /** Interrupt vectors for the LPUART peripheral type */
13763 #define LPUART_RX_TX_IRQS                        { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn }
13764 #define LPUART_ERR_IRQS                          { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn }
13765 
13766 /*!
13767  * @}
13768  */ /* end of group LPUART_Peripheral_Access_Layer */
13769 
13770 
13771 /* ----------------------------------------------------------------------------
13772    -- MCM Peripheral Access Layer
13773    ---------------------------------------------------------------------------- */
13774 
13775 /*!
13776  * @addtogroup MCM_Peripheral_Access_Layer MCM Peripheral Access Layer
13777  * @{
13778  */
13779 
13780 /** MCM - Register Layout Typedef */
13781 typedef struct {
13782        uint8_t RESERVED_0[8];
13783   __I  uint16_t PLASC;                             /**< Crossbar Switch (AXBS) Slave Configuration, offset: 0x8 */
13784   __I  uint16_t PLAMC;                             /**< Crossbar Switch (AXBS) Master Configuration, offset: 0xA */
13785   __IO uint32_t CPCR;                              /**< Core Platform Control Register, offset: 0xC */
13786        uint8_t RESERVED_1[36];
13787   __IO uint32_t CPCR2;                             /**< Core Platform Control Register 2, offset: 0x34 */
13788        uint8_t RESERVED_2[8];
13789   __IO uint32_t CPO;                               /**< Compute Operation Control Register, offset: 0x40 */
13790 } MCM_Type;
13791 
13792 /* ----------------------------------------------------------------------------
13793    -- MCM Register Masks
13794    ---------------------------------------------------------------------------- */
13795 
13796 /*!
13797  * @addtogroup MCM_Register_Masks MCM Register Masks
13798  * @{
13799  */
13800 
13801 /*! @name PLASC - Crossbar Switch (AXBS) Slave Configuration */
13802 /*! @{ */
13803 
13804 #define MCM_PLASC_ASC_MASK                       (0xFFU)
13805 #define MCM_PLASC_ASC_SHIFT                      (0U)
13806 /*! ASC - Each bit in the ASC field indicates whether there is a corresponding connection to the
13807  *    crossbar switch's slave input port.
13808  *  0b00000000..A bus slave connection to AXBS input port n is absent
13809  *  0b00000001..A bus slave connection to AXBS input port n is present
13810  */
13811 #define MCM_PLASC_ASC(x)                         (((uint16_t)(((uint16_t)(x)) << MCM_PLASC_ASC_SHIFT)) & MCM_PLASC_ASC_MASK)
13812 /*! @} */
13813 
13814 /*! @name PLAMC - Crossbar Switch (AXBS) Master Configuration */
13815 /*! @{ */
13816 
13817 #define MCM_PLAMC_AMC_MASK                       (0xFFU)
13818 #define MCM_PLAMC_AMC_SHIFT                      (0U)
13819 /*! AMC - Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port.
13820  *  0b00000000..A bus master connection to AXBS input port n is absent
13821  *  0b00000001..A bus master connection to AXBS input port n is present
13822  */
13823 #define MCM_PLAMC_AMC(x)                         (((uint16_t)(((uint16_t)(x)) << MCM_PLAMC_AMC_SHIFT)) & MCM_PLAMC_AMC_MASK)
13824 /*! @} */
13825 
13826 /*! @name CPCR - Core Platform Control Register */
13827 /*! @{ */
13828 
13829 #define MCM_CPCR_ARB_MASK                        (0x200U)
13830 #define MCM_CPCR_ARB_SHIFT                       (9U)
13831 /*! ARB - Arbitration select
13832  *  0b0..Fixed-priority arbitration for the crossbar masters
13833  *  0b1..Round-robin arbitration for the crossbar masters
13834  */
13835 #define MCM_CPCR_ARB(x)                          (((uint32_t)(((uint32_t)(x)) << MCM_CPCR_ARB_SHIFT)) & MCM_CPCR_ARB_MASK)
13836 /*! @} */
13837 
13838 /*! @name CPCR2 - Core Platform Control Register 2 */
13839 /*! @{ */
13840 
13841 #define MCM_CPCR2_CCBC_MASK                      (0x1U)
13842 #define MCM_CPCR2_CCBC_SHIFT                     (0U)
13843 /*! CCBC - Clear code bus cache */
13844 #define MCM_CPCR2_CCBC(x)                        (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_CCBC_SHIFT)) & MCM_CPCR2_CCBC_MASK)
13845 
13846 #define MCM_CPCR2_DCC_MASK                       (0x8U)
13847 #define MCM_CPCR2_DCC_SHIFT                      (3U)
13848 /*! DCC - Disable the code cache */
13849 #define MCM_CPCR2_DCC(x)                         (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_DCC_SHIFT)) & MCM_CPCR2_DCC_MASK)
13850 
13851 #define MCM_CPCR2_CCSIZ_MASK                     (0xF0U)
13852 #define MCM_CPCR2_CCSIZ_SHIFT                    (4U)
13853 /*! CCSIZ - Code cache size
13854  *  0b0000..No cache
13855  *  0b0010..2KB
13856  *  0b0011..4KB
13857  *  0b0100..8KB
13858  */
13859 #define MCM_CPCR2_CCSIZ(x)                       (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_CCSIZ_SHIFT)) & MCM_CPCR2_CCSIZ_MASK)
13860 /*! @} */
13861 
13862 /*! @name CPO - Compute Operation Control Register */
13863 /*! @{ */
13864 
13865 #define MCM_CPO_CPOREQ_MASK                      (0x1U)
13866 #define MCM_CPO_CPOREQ_SHIFT                     (0U)
13867 /*! CPOREQ - Compute Operation request
13868  *  0b0..Request is cleared.
13869  *  0b1..Request Compute Operation.
13870  */
13871 #define MCM_CPO_CPOREQ(x)                        (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOREQ_SHIFT)) & MCM_CPO_CPOREQ_MASK)
13872 
13873 #define MCM_CPO_CPOACK_MASK                      (0x2U)
13874 #define MCM_CPO_CPOACK_SHIFT                     (1U)
13875 /*! CPOACK - Compute Operation acknowledge
13876  *  0b0..Compute operation entry has not completed or compute operation exit has completed.
13877  *  0b1..Compute operation entry has completed or compute operation exit has not completed.
13878  */
13879 #define MCM_CPO_CPOACK(x)                        (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOACK_SHIFT)) & MCM_CPO_CPOACK_MASK)
13880 
13881 #define MCM_CPO_CPOWOI_MASK                      (0x4U)
13882 #define MCM_CPO_CPOWOI_SHIFT                     (2U)
13883 /*! CPOWOI - Compute Operation wakeup on interrupt
13884  *  0b0..No effect.
13885  *  0b1..When set, the CPOREQ is cleared on any interrupt or exception vector fetch.
13886  */
13887 #define MCM_CPO_CPOWOI(x)                        (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOWOI_SHIFT)) & MCM_CPO_CPOWOI_MASK)
13888 /*! @} */
13889 
13890 
13891 /*!
13892  * @}
13893  */ /* end of group MCM_Register_Masks */
13894 
13895 
13896 /* MCM - Peripheral instance base addresses */
13897 /** Peripheral MCM1 base address */
13898 #define MCM1_BASE                                (0xF0003000u)
13899 /** Peripheral MCM1 base pointer */
13900 #define MCM1                                     ((MCM_Type *)MCM1_BASE)
13901 /** Array initializer of MCM peripheral base addresses */
13902 #define MCM_BASE_ADDRS                           { 0u, MCM1_BASE }
13903 /** Array initializer of MCM peripheral base pointers */
13904 #define MCM_BASE_PTRS                            { (MCM_Type *)0u, MCM1 }
13905 /* MCM compatibility definitions */
13906 #define MCM_BASE                  MCM1_BASE
13907 #define MCM                       MCM1
13908 
13909 
13910 /*!
13911  * @}
13912  */ /* end of group MCM_Peripheral_Access_Layer */
13913 
13914 
13915 /* ----------------------------------------------------------------------------
13916    -- MMDVSQ Peripheral Access Layer
13917    ---------------------------------------------------------------------------- */
13918 
13919 /*!
13920  * @addtogroup MMDVSQ_Peripheral_Access_Layer MMDVSQ Peripheral Access Layer
13921  * @{
13922  */
13923 
13924 /** MMDVSQ - Register Layout Typedef */
13925 typedef struct {
13926   __IO uint32_t DEND;                              /**< Dividend Register, offset: 0x0 */
13927   __IO uint32_t DSOR;                              /**< Divisor Register, offset: 0x4 */
13928   __IO uint32_t CSR;                               /**< Control/Status Register, offset: 0x8 */
13929   __IO uint32_t RES;                               /**< Result Register, offset: 0xC */
13930   __O  uint32_t RCND;                              /**< Radicand Register, offset: 0x10 */
13931 } MMDVSQ_Type;
13932 
13933 /* ----------------------------------------------------------------------------
13934    -- MMDVSQ Register Masks
13935    ---------------------------------------------------------------------------- */
13936 
13937 /*!
13938  * @addtogroup MMDVSQ_Register_Masks MMDVSQ Register Masks
13939  * @{
13940  */
13941 
13942 /*! @name DEND - Dividend Register */
13943 /*! @{ */
13944 
13945 #define MMDVSQ_DEND_DIVIDEND_MASK                (0xFFFFFFFFU)
13946 #define MMDVSQ_DEND_DIVIDEND_SHIFT               (0U)
13947 /*! DIVIDEND - Dividend */
13948 #define MMDVSQ_DEND_DIVIDEND(x)                  (((uint32_t)(((uint32_t)(x)) << MMDVSQ_DEND_DIVIDEND_SHIFT)) & MMDVSQ_DEND_DIVIDEND_MASK)
13949 /*! @} */
13950 
13951 /*! @name DSOR - Divisor Register */
13952 /*! @{ */
13953 
13954 #define MMDVSQ_DSOR_DIVISOR_MASK                 (0xFFFFFFFFU)
13955 #define MMDVSQ_DSOR_DIVISOR_SHIFT                (0U)
13956 /*! DIVISOR - Divisor */
13957 #define MMDVSQ_DSOR_DIVISOR(x)                   (((uint32_t)(((uint32_t)(x)) << MMDVSQ_DSOR_DIVISOR_SHIFT)) & MMDVSQ_DSOR_DIVISOR_MASK)
13958 /*! @} */
13959 
13960 /*! @name CSR - Control/Status Register */
13961 /*! @{ */
13962 
13963 #define MMDVSQ_CSR_SRT_MASK                      (0x1U)
13964 #define MMDVSQ_CSR_SRT_SHIFT                     (0U)
13965 /*! SRT - Start
13966  *  0b0..No operation initiated
13967  *  0b1..If CSR[DFS] = 1, then initiate a divide calculation, else ignore
13968  */
13969 #define MMDVSQ_CSR_SRT(x)                        (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_SRT_SHIFT)) & MMDVSQ_CSR_SRT_MASK)
13970 
13971 #define MMDVSQ_CSR_USGN_MASK                     (0x2U)
13972 #define MMDVSQ_CSR_USGN_SHIFT                    (1U)
13973 /*! USGN - Unsigned calculation
13974  *  0b0..Perform a signed divide
13975  *  0b1..Perform an unsigned divide
13976  */
13977 #define MMDVSQ_CSR_USGN(x)                       (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_USGN_SHIFT)) & MMDVSQ_CSR_USGN_MASK)
13978 
13979 #define MMDVSQ_CSR_REM_MASK                      (0x4U)
13980 #define MMDVSQ_CSR_REM_SHIFT                     (2U)
13981 /*! REM - REMainder calculation
13982  *  0b0..Return the quotient in the RES for the divide calculation
13983  *  0b1..Return the remainder in the RES for the divide calculation
13984  */
13985 #define MMDVSQ_CSR_REM(x)                        (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_REM_SHIFT)) & MMDVSQ_CSR_REM_MASK)
13986 
13987 #define MMDVSQ_CSR_DZE_MASK                      (0x8U)
13988 #define MMDVSQ_CSR_DZE_SHIFT                     (3U)
13989 /*! DZE - Divide-by-Zero-Enable
13990  *  0b0..Reads of the RES register return the register contents
13991  *  0b1..If CSR[DZ] = 1, an attempted read of RES register is error terminated to signal a divide-by-zero, else the register contents are returned
13992  */
13993 #define MMDVSQ_CSR_DZE(x)                        (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DZE_SHIFT)) & MMDVSQ_CSR_DZE_MASK)
13994 
13995 #define MMDVSQ_CSR_DZ_MASK                       (0x10U)
13996 #define MMDVSQ_CSR_DZ_SHIFT                      (4U)
13997 /*! DZ - Divide-by-Zero
13998  *  0b0..The last divide operation had a non-zero divisor, that is, DSOR != 0
13999  *  0b1..The last divide operation had a zero divisor, that is, DSOR = 0
14000  */
14001 #define MMDVSQ_CSR_DZ(x)                         (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DZ_SHIFT)) & MMDVSQ_CSR_DZ_MASK)
14002 
14003 #define MMDVSQ_CSR_DFS_MASK                      (0x20U)
14004 #define MMDVSQ_CSR_DFS_SHIFT                     (5U)
14005 /*! DFS - Disable Fast Start
14006  *  0b0..A divide operation is initiated by a write to the DSOR register
14007  *  0b1..A divide operation is initiated by a write to the CSR register with CSR[SRT] = 1
14008  */
14009 #define MMDVSQ_CSR_DFS(x)                        (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DFS_SHIFT)) & MMDVSQ_CSR_DFS_MASK)
14010 
14011 #define MMDVSQ_CSR_SQRT_MASK                     (0x20000000U)
14012 #define MMDVSQ_CSR_SQRT_SHIFT                    (29U)
14013 /*! SQRT - SQUARE ROOT
14014  *  0b0..Current or last MMDVSQ operation was not a square root
14015  *  0b1..Current or last MMDVSQ operation was a square root
14016  */
14017 #define MMDVSQ_CSR_SQRT(x)                       (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_SQRT_SHIFT)) & MMDVSQ_CSR_SQRT_MASK)
14018 
14019 #define MMDVSQ_CSR_DIV_MASK                      (0x40000000U)
14020 #define MMDVSQ_CSR_DIV_SHIFT                     (30U)
14021 /*! DIV - DIVIDE
14022  *  0b0..Current or last MMDVSQ operation was not a divide
14023  *  0b1..Current or last MMDVSQ operation was a divide
14024  */
14025 #define MMDVSQ_CSR_DIV(x)                        (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DIV_SHIFT)) & MMDVSQ_CSR_DIV_MASK)
14026 
14027 #define MMDVSQ_CSR_BUSY_MASK                     (0x80000000U)
14028 #define MMDVSQ_CSR_BUSY_SHIFT                    (31U)
14029 /*! BUSY - BUSY
14030  *  0b0..MMDVSQ is idle
14031  *  0b1..MMDVSQ is busy performing a divide or square root calculation
14032  */
14033 #define MMDVSQ_CSR_BUSY(x)                       (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_BUSY_SHIFT)) & MMDVSQ_CSR_BUSY_MASK)
14034 /*! @} */
14035 
14036 /*! @name RES - Result Register */
14037 /*! @{ */
14038 
14039 #define MMDVSQ_RES_RESULT_MASK                   (0xFFFFFFFFU)
14040 #define MMDVSQ_RES_RESULT_SHIFT                  (0U)
14041 /*! RESULT - Result */
14042 #define MMDVSQ_RES_RESULT(x)                     (((uint32_t)(((uint32_t)(x)) << MMDVSQ_RES_RESULT_SHIFT)) & MMDVSQ_RES_RESULT_MASK)
14043 /*! @} */
14044 
14045 /*! @name RCND - Radicand Register */
14046 /*! @{ */
14047 
14048 #define MMDVSQ_RCND_RADICAND_MASK                (0xFFFFFFFFU)
14049 #define MMDVSQ_RCND_RADICAND_SHIFT               (0U)
14050 /*! RADICAND - Radicand */
14051 #define MMDVSQ_RCND_RADICAND(x)                  (((uint32_t)(((uint32_t)(x)) << MMDVSQ_RCND_RADICAND_SHIFT)) & MMDVSQ_RCND_RADICAND_MASK)
14052 /*! @} */
14053 
14054 
14055 /*!
14056  * @}
14057  */ /* end of group MMDVSQ_Register_Masks */
14058 
14059 
14060 /* MMDVSQ - Peripheral instance base addresses */
14061 /** Peripheral MMDVSQ1 base address */
14062 #define MMDVSQ1_BASE                             (0xF0004000u)
14063 /** Peripheral MMDVSQ1 base pointer */
14064 #define MMDVSQ1                                  ((MMDVSQ_Type *)MMDVSQ1_BASE)
14065 /** Array initializer of MMDVSQ peripheral base addresses */
14066 #define MMDVSQ_BASE_ADDRS                        { 0u, MMDVSQ1_BASE }
14067 /** Array initializer of MMDVSQ peripheral base pointers */
14068 #define MMDVSQ_BASE_PTRS                         { (MMDVSQ_Type *)0u, MMDVSQ1 }
14069 
14070 /*!
14071  * @}
14072  */ /* end of group MMDVSQ_Peripheral_Access_Layer */
14073 
14074 
14075 /* ----------------------------------------------------------------------------
14076    -- MSCM Peripheral Access Layer
14077    ---------------------------------------------------------------------------- */
14078 
14079 /*!
14080  * @addtogroup MSCM_Peripheral_Access_Layer MSCM Peripheral Access Layer
14081  * @{
14082  */
14083 
14084 /** MSCM - Register Layout Typedef */
14085 typedef struct {
14086   __I  uint32_t CPXTYPE;                           /**< Processor X Type Register, offset: 0x0 */
14087   __I  uint32_t CPXNUM;                            /**< Processor X Number Register, offset: 0x4 */
14088   __I  uint32_t CPXMASTER;                         /**< Processor X Master Register, offset: 0x8 */
14089   __I  uint32_t CPXCOUNT;                          /**< Processor X Count Register, offset: 0xC */
14090   __I  uint32_t CPXCFG0;                           /**< Processor X Configuration Register 0, offset: 0x10 */
14091   __I  uint32_t CPXCFG1;                           /**< Processor X Configuration Register 1, offset: 0x14 */
14092   __I  uint32_t CPXCFG2;                           /**< Processor X Configuration Register 2, offset: 0x18 */
14093   __I  uint32_t CPXCFG3;                           /**< Processor X Configuration Register 3, offset: 0x1C */
14094   struct {                                         /* offset: 0x20, array step: 0x20 */
14095     __I  uint32_t TYPE;                              /**< Processor 0 Type Register..Processor 1 Type Register, array offset: 0x20, array step: 0x20 */
14096     __I  uint32_t NUM;                               /**< Processor 0 Number Register..Processor 1 Number Register, array offset: 0x24, array step: 0x20 */
14097     __I  uint32_t MASTER;                            /**< Processor 0 Master Register..Processor 1 Master Register, array offset: 0x28, array step: 0x20 */
14098     __I  uint32_t COUNT;                             /**< Processor 0 Count Register..Processor 1 Count Register, array offset: 0x2C, array step: 0x20 */
14099     __I  uint32_t CFG0;                              /**< Processor 0 Configuration Register 0..Processor 1 Configuration Register 0, array offset: 0x30, array step: 0x20 */
14100     __I  uint32_t CFG1;                              /**< Processor 0 Configuration Register 1..Processor 1 Configuration Register 1, array offset: 0x34, array step: 0x20 */
14101     __I  uint32_t CFG2;                              /**< Processor 0 Configuration Register 2..Processor 1 Configuration Register 2, array offset: 0x38, array step: 0x20 */
14102     __I  uint32_t CFG3;                              /**< Processor 0 Configuration Register 3..Processor 1 Configuration Register 3, array offset: 0x3C, array step: 0x20 */
14103   } CP[2];
14104        uint8_t RESERVED_0[928];
14105   __IO uint32_t OCMDR0;                            /**< On-Chip Memory Descriptor Register, offset: 0x400 */
14106   __IO uint32_t OCMDR1;                            /**< On-Chip Memory Descriptor Register, offset: 0x404 */
14107   __IO uint32_t OCMDR2;                            /**< On-Chip Memory Descriptor Register, offset: 0x408 */
14108   __IO uint32_t OCMDR3;                            /**< On-Chip Memory Descriptor Register, offset: 0x40C */
14109 } MSCM_Type;
14110 
14111 /* ----------------------------------------------------------------------------
14112    -- MSCM Register Masks
14113    ---------------------------------------------------------------------------- */
14114 
14115 /*!
14116  * @addtogroup MSCM_Register_Masks MSCM Register Masks
14117  * @{
14118  */
14119 
14120 /*! @name CPXTYPE - Processor X Type Register */
14121 /*! @{ */
14122 
14123 #define MSCM_CPXTYPE_RYPZ_MASK                   (0xFFU)
14124 #define MSCM_CPXTYPE_RYPZ_SHIFT                  (0U)
14125 /*! RYPZ - Processor x Revision */
14126 #define MSCM_CPXTYPE_RYPZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXTYPE_RYPZ_SHIFT)) & MSCM_CPXTYPE_RYPZ_MASK)
14127 
14128 #define MSCM_CPXTYPE_PERSONALITY_MASK            (0xFFFFFF00U)
14129 #define MSCM_CPXTYPE_PERSONALITY_SHIFT           (8U)
14130 /*! PERSONALITY - Processor x Personality */
14131 #define MSCM_CPXTYPE_PERSONALITY(x)              (((uint32_t)(((uint32_t)(x)) << MSCM_CPXTYPE_PERSONALITY_SHIFT)) & MSCM_CPXTYPE_PERSONALITY_MASK)
14132 /*! @} */
14133 
14134 /*! @name CPXNUM - Processor X Number Register */
14135 /*! @{ */
14136 
14137 #define MSCM_CPXNUM_CPN_MASK                     (0x1U)
14138 #define MSCM_CPXNUM_CPN_SHIFT                    (0U)
14139 /*! CPN - Processor x Number */
14140 #define MSCM_CPXNUM_CPN(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_CPXNUM_CPN_SHIFT)) & MSCM_CPXNUM_CPN_MASK)
14141 /*! @} */
14142 
14143 /*! @name CPXMASTER - Processor X Master Register */
14144 /*! @{ */
14145 
14146 #define MSCM_CPXMASTER_PPMN_MASK                 (0x3FU)
14147 #define MSCM_CPXMASTER_PPMN_SHIFT                (0U)
14148 /*! PPMN - Processor x Physical Master Number */
14149 #define MSCM_CPXMASTER_PPMN(x)                   (((uint32_t)(((uint32_t)(x)) << MSCM_CPXMASTER_PPMN_SHIFT)) & MSCM_CPXMASTER_PPMN_MASK)
14150 /*! @} */
14151 
14152 /*! @name CPXCOUNT - Processor X Count Register */
14153 /*! @{ */
14154 
14155 #define MSCM_CPXCOUNT_PCNT_MASK                  (0x3U)
14156 #define MSCM_CPXCOUNT_PCNT_SHIFT                 (0U)
14157 /*! PCNT - Processor Count */
14158 #define MSCM_CPXCOUNT_PCNT(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCOUNT_PCNT_SHIFT)) & MSCM_CPXCOUNT_PCNT_MASK)
14159 /*! @} */
14160 
14161 /*! @name CPXCFG0 - Processor X Configuration Register 0 */
14162 /*! @{ */
14163 
14164 #define MSCM_CPXCFG0_DCWY_MASK                   (0xFFU)
14165 #define MSCM_CPXCFG0_DCWY_SHIFT                  (0U)
14166 /*! DCWY - Level 1 Data Cache Ways */
14167 #define MSCM_CPXCFG0_DCWY(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_DCWY_SHIFT)) & MSCM_CPXCFG0_DCWY_MASK)
14168 
14169 #define MSCM_CPXCFG0_DCSZ_MASK                   (0xFF00U)
14170 #define MSCM_CPXCFG0_DCSZ_SHIFT                  (8U)
14171 /*! DCSZ - Level 1 Data Cache Size */
14172 #define MSCM_CPXCFG0_DCSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_DCSZ_SHIFT)) & MSCM_CPXCFG0_DCSZ_MASK)
14173 
14174 #define MSCM_CPXCFG0_ICWY_MASK                   (0xFF0000U)
14175 #define MSCM_CPXCFG0_ICWY_SHIFT                  (16U)
14176 /*! ICWY - Level 1 Instruction Cache Ways */
14177 #define MSCM_CPXCFG0_ICWY(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_ICWY_SHIFT)) & MSCM_CPXCFG0_ICWY_MASK)
14178 
14179 #define MSCM_CPXCFG0_ICSZ_MASK                   (0xFF000000U)
14180 #define MSCM_CPXCFG0_ICSZ_SHIFT                  (24U)
14181 /*! ICSZ - Level 1 Instruction Cache Size */
14182 #define MSCM_CPXCFG0_ICSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_ICSZ_SHIFT)) & MSCM_CPXCFG0_ICSZ_MASK)
14183 /*! @} */
14184 
14185 /*! @name CPXCFG1 - Processor X Configuration Register 1 */
14186 /*! @{ */
14187 
14188 #define MSCM_CPXCFG1_L2WY_MASK                   (0xFF0000U)
14189 #define MSCM_CPXCFG1_L2WY_SHIFT                  (16U)
14190 /*! L2WY - Level 2 Instruction Cache Ways */
14191 #define MSCM_CPXCFG1_L2WY(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG1_L2WY_SHIFT)) & MSCM_CPXCFG1_L2WY_MASK)
14192 
14193 #define MSCM_CPXCFG1_L2SZ_MASK                   (0xFF000000U)
14194 #define MSCM_CPXCFG1_L2SZ_SHIFT                  (24U)
14195 /*! L2SZ - Level 2 Instruction Cache Size */
14196 #define MSCM_CPXCFG1_L2SZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG1_L2SZ_SHIFT)) & MSCM_CPXCFG1_L2SZ_MASK)
14197 /*! @} */
14198 
14199 /*! @name CPXCFG2 - Processor X Configuration Register 2 */
14200 /*! @{ */
14201 
14202 #define MSCM_CPXCFG2_TMUSZ_MASK                  (0xFF00U)
14203 #define MSCM_CPXCFG2_TMUSZ_SHIFT                 (8U)
14204 /*! TMUSZ - Tightly-coupled Memory Upper Size */
14205 #define MSCM_CPXCFG2_TMUSZ(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG2_TMUSZ_SHIFT)) & MSCM_CPXCFG2_TMUSZ_MASK)
14206 
14207 #define MSCM_CPXCFG2_TMLSZ_MASK                  (0xFF000000U)
14208 #define MSCM_CPXCFG2_TMLSZ_SHIFT                 (24U)
14209 /*! TMLSZ - Tightly-coupled Memory Lower Size */
14210 #define MSCM_CPXCFG2_TMLSZ(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG2_TMLSZ_SHIFT)) & MSCM_CPXCFG2_TMLSZ_MASK)
14211 /*! @} */
14212 
14213 /*! @name CPXCFG3 - Processor X Configuration Register 3 */
14214 /*! @{ */
14215 
14216 #define MSCM_CPXCFG3_FPU_MASK                    (0x1U)
14217 #define MSCM_CPXCFG3_FPU_SHIFT                   (0U)
14218 /*! FPU - Floating Point Unit
14219  *  0b0..FPU support is not included.
14220  *  0b1..FPU support is included.
14221  */
14222 #define MSCM_CPXCFG3_FPU(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_FPU_SHIFT)) & MSCM_CPXCFG3_FPU_MASK)
14223 
14224 #define MSCM_CPXCFG3_SIMD_MASK                   (0x2U)
14225 #define MSCM_CPXCFG3_SIMD_SHIFT                  (1U)
14226 /*! SIMD - SIMD/NEON instruction support
14227  *  0b0..SIMD/NEON support is not included.
14228  *  0b1..SIMD/NEON support is included.
14229  */
14230 #define MSCM_CPXCFG3_SIMD(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_SIMD_SHIFT)) & MSCM_CPXCFG3_SIMD_MASK)
14231 
14232 #define MSCM_CPXCFG3_JAZ_MASK                    (0x4U)
14233 #define MSCM_CPXCFG3_JAZ_SHIFT                   (2U)
14234 /*! JAZ - Jazelle support
14235  *  0b0..Jazelle support is not included.
14236  *  0b1..Jazelle support is included.
14237  */
14238 #define MSCM_CPXCFG3_JAZ(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_JAZ_SHIFT)) & MSCM_CPXCFG3_JAZ_MASK)
14239 
14240 #define MSCM_CPXCFG3_MMU_MASK                    (0x8U)
14241 #define MSCM_CPXCFG3_MMU_SHIFT                   (3U)
14242 /*! MMU - Memory Management Unit
14243  *  0b0..MMU support is not included.
14244  *  0b1..MMU support is included.
14245  */
14246 #define MSCM_CPXCFG3_MMU(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_MMU_SHIFT)) & MSCM_CPXCFG3_MMU_MASK)
14247 
14248 #define MSCM_CPXCFG3_TZ_MASK                     (0x10U)
14249 #define MSCM_CPXCFG3_TZ_SHIFT                    (4U)
14250 /*! TZ - Trust Zone
14251  *  0b0..Trust Zone support is not included.
14252  *  0b1..Trust Zone support is included.
14253  */
14254 #define MSCM_CPXCFG3_TZ(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_TZ_SHIFT)) & MSCM_CPXCFG3_TZ_MASK)
14255 
14256 #define MSCM_CPXCFG3_CMP_MASK                    (0x20U)
14257 #define MSCM_CPXCFG3_CMP_SHIFT                   (5U)
14258 /*! CMP - Core Memory Protection unit
14259  *  0b0..Core Memory Protection is not included.
14260  *  0b1..Core Memory Protection is included.
14261  */
14262 #define MSCM_CPXCFG3_CMP(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_CMP_SHIFT)) & MSCM_CPXCFG3_CMP_MASK)
14263 
14264 #define MSCM_CPXCFG3_BB_MASK                     (0x40U)
14265 #define MSCM_CPXCFG3_BB_SHIFT                    (6U)
14266 /*! BB - Bit Banding
14267  *  0b0..Bit Banding is not supported.
14268  *  0b1..Bit Banding is supported.
14269  */
14270 #define MSCM_CPXCFG3_BB(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_BB_SHIFT)) & MSCM_CPXCFG3_BB_MASK)
14271 
14272 #define MSCM_CPXCFG3_SBP_MASK                    (0x300U)
14273 #define MSCM_CPXCFG3_SBP_SHIFT                   (8U)
14274 /*! SBP - System Bus Ports */
14275 #define MSCM_CPXCFG3_SBP(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_SBP_SHIFT)) & MSCM_CPXCFG3_SBP_MASK)
14276 /*! @} */
14277 
14278 /*! @name TYPE - Processor 0 Type Register..Processor 1 Type Register */
14279 /*! @{ */
14280 
14281 #define MSCM_TYPE_RYPZ_MASK                      (0xFFU)
14282 #define MSCM_TYPE_RYPZ_SHIFT                     (0U)
14283 /*! RYPZ - Processor 1 Revision */
14284 #define MSCM_TYPE_RYPZ(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_RYPZ_SHIFT)) & MSCM_TYPE_RYPZ_MASK)
14285 
14286 #define MSCM_TYPE_PERSONALITY_MASK               (0xFFFFFF00U)
14287 #define MSCM_TYPE_PERSONALITY_SHIFT              (8U)
14288 /*! PERSONALITY - Processor 1 Personality */
14289 #define MSCM_TYPE_PERSONALITY(x)                 (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_PERSONALITY_SHIFT)) & MSCM_TYPE_PERSONALITY_MASK)
14290 /*! @} */
14291 
14292 /* The count of MSCM_TYPE */
14293 #define MSCM_TYPE_COUNT                          (2U)
14294 
14295 /*! @name NUM - Processor 0 Number Register..Processor 1 Number Register */
14296 /*! @{ */
14297 
14298 #define MSCM_NUM_CPN_MASK                        (0x1U)
14299 #define MSCM_NUM_CPN_SHIFT                       (0U)
14300 /*! CPN - Processor 1 Number */
14301 #define MSCM_NUM_CPN(x)                          (((uint32_t)(((uint32_t)(x)) << MSCM_NUM_CPN_SHIFT)) & MSCM_NUM_CPN_MASK)
14302 /*! @} */
14303 
14304 /* The count of MSCM_NUM */
14305 #define MSCM_NUM_COUNT                           (2U)
14306 
14307 /*! @name MASTER - Processor 0 Master Register..Processor 1 Master Register */
14308 /*! @{ */
14309 
14310 #define MSCM_MASTER_PPMN_MASK                    (0x3FU)
14311 #define MSCM_MASTER_PPMN_SHIFT                   (0U)
14312 /*! PPMN - Processor 1 Physical Master Number */
14313 #define MSCM_MASTER_PPMN(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_MASTER_PPMN_SHIFT)) & MSCM_MASTER_PPMN_MASK)
14314 /*! @} */
14315 
14316 /* The count of MSCM_MASTER */
14317 #define MSCM_MASTER_COUNT                        (2U)
14318 
14319 /*! @name COUNT - Processor 0 Count Register..Processor 1 Count Register */
14320 /*! @{ */
14321 
14322 #define MSCM_COUNT_PCNT_MASK                     (0x3U)
14323 #define MSCM_COUNT_PCNT_SHIFT                    (0U)
14324 /*! PCNT - Processor Count */
14325 #define MSCM_COUNT_PCNT(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_COUNT_PCNT_SHIFT)) & MSCM_COUNT_PCNT_MASK)
14326 /*! @} */
14327 
14328 /* The count of MSCM_COUNT */
14329 #define MSCM_COUNT_COUNT                         (2U)
14330 
14331 /*! @name CFG0 - Processor 0 Configuration Register 0..Processor 1 Configuration Register 0 */
14332 /*! @{ */
14333 
14334 #define MSCM_CFG0_DCWY_MASK                      (0xFFU)
14335 #define MSCM_CFG0_DCWY_SHIFT                     (0U)
14336 /*! DCWY - Level 1 Data Cache Ways */
14337 #define MSCM_CFG0_DCWY(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_DCWY_SHIFT)) & MSCM_CFG0_DCWY_MASK)
14338 
14339 #define MSCM_CFG0_DCSZ_MASK                      (0xFF00U)
14340 #define MSCM_CFG0_DCSZ_SHIFT                     (8U)
14341 /*! DCSZ - Level 1 Data Cache Size */
14342 #define MSCM_CFG0_DCSZ(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_DCSZ_SHIFT)) & MSCM_CFG0_DCSZ_MASK)
14343 
14344 #define MSCM_CFG0_ICWY_MASK                      (0xFF0000U)
14345 #define MSCM_CFG0_ICWY_SHIFT                     (16U)
14346 /*! ICWY - Level 1 Instruction Cache Ways */
14347 #define MSCM_CFG0_ICWY(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_ICWY_SHIFT)) & MSCM_CFG0_ICWY_MASK)
14348 
14349 #define MSCM_CFG0_ICSZ_MASK                      (0xFF000000U)
14350 #define MSCM_CFG0_ICSZ_SHIFT                     (24U)
14351 /*! ICSZ - Level 1 Instruction Cache Size */
14352 #define MSCM_CFG0_ICSZ(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_ICSZ_SHIFT)) & MSCM_CFG0_ICSZ_MASK)
14353 /*! @} */
14354 
14355 /* The count of MSCM_CFG0 */
14356 #define MSCM_CFG0_COUNT                          (2U)
14357 
14358 /*! @name CFG1 - Processor 0 Configuration Register 1..Processor 1 Configuration Register 1 */
14359 /*! @{ */
14360 
14361 #define MSCM_CFG1_L2WY_MASK                      (0xFF0000U)
14362 #define MSCM_CFG1_L2WY_SHIFT                     (16U)
14363 /*! L2WY - Level 2 Instruction Cache Ways */
14364 #define MSCM_CFG1_L2WY(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2WY_SHIFT)) & MSCM_CFG1_L2WY_MASK)
14365 
14366 #define MSCM_CFG1_L2SZ_MASK                      (0xFF000000U)
14367 #define MSCM_CFG1_L2SZ_SHIFT                     (24U)
14368 /*! L2SZ - Level 2 Instruction Cache Size */
14369 #define MSCM_CFG1_L2SZ(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2SZ_SHIFT)) & MSCM_CFG1_L2SZ_MASK)
14370 /*! @} */
14371 
14372 /* The count of MSCM_CFG1 */
14373 #define MSCM_CFG1_COUNT                          (2U)
14374 
14375 /*! @name CFG2 - Processor 0 Configuration Register 2..Processor 1 Configuration Register 2 */
14376 /*! @{ */
14377 
14378 #define MSCM_CFG2_TMUSZ_MASK                     (0xFF00U)
14379 #define MSCM_CFG2_TMUSZ_SHIFT                    (8U)
14380 /*! TMUSZ - Tightly-coupled Memory Upper Size */
14381 #define MSCM_CFG2_TMUSZ(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_CFG2_TMUSZ_SHIFT)) & MSCM_CFG2_TMUSZ_MASK)
14382 
14383 #define MSCM_CFG2_TMLSZ_MASK                     (0xFF000000U)
14384 #define MSCM_CFG2_TMLSZ_SHIFT                    (24U)
14385 /*! TMLSZ - Tightly-coupled Memory Lower Size */
14386 #define MSCM_CFG2_TMLSZ(x)                       (((uint32_t)(((uint32_t)(x)) << MSCM_CFG2_TMLSZ_SHIFT)) & MSCM_CFG2_TMLSZ_MASK)
14387 /*! @} */
14388 
14389 /* The count of MSCM_CFG2 */
14390 #define MSCM_CFG2_COUNT                          (2U)
14391 
14392 /*! @name CFG3 - Processor 0 Configuration Register 3..Processor 1 Configuration Register 3 */
14393 /*! @{ */
14394 
14395 #define MSCM_CFG3_FPU_MASK                       (0x1U)
14396 #define MSCM_CFG3_FPU_SHIFT                      (0U)
14397 /*! FPU - Floating Point Unit
14398  *  0b0..FPU support is not included.
14399  *  0b1..FPU support is included.
14400  */
14401 #define MSCM_CFG3_FPU(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_FPU_SHIFT)) & MSCM_CFG3_FPU_MASK)
14402 
14403 #define MSCM_CFG3_SIMD_MASK                      (0x2U)
14404 #define MSCM_CFG3_SIMD_SHIFT                     (1U)
14405 /*! SIMD - SIMD/NEON instruction support
14406  *  0b0..SIMD/NEON support is not included.
14407  *  0b1..SIMD/NEON support is included.
14408  */
14409 #define MSCM_CFG3_SIMD(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SIMD_SHIFT)) & MSCM_CFG3_SIMD_MASK)
14410 
14411 #define MSCM_CFG3_JAZ_MASK                       (0x4U)
14412 #define MSCM_CFG3_JAZ_SHIFT                      (2U)
14413 /*! JAZ - Jazelle support
14414  *  0b0..Jazelle support is not included.
14415  *  0b1..Jazelle support is included.
14416  */
14417 #define MSCM_CFG3_JAZ(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_JAZ_SHIFT)) & MSCM_CFG3_JAZ_MASK)
14418 
14419 #define MSCM_CFG3_MMU_MASK                       (0x8U)
14420 #define MSCM_CFG3_MMU_SHIFT                      (3U)
14421 /*! MMU - Memory Management Unit
14422  *  0b0..MMU support is not included.
14423  *  0b1..MMU support is included.
14424  */
14425 #define MSCM_CFG3_MMU(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_MMU_SHIFT)) & MSCM_CFG3_MMU_MASK)
14426 
14427 #define MSCM_CFG3_TZ_MASK                        (0x10U)
14428 #define MSCM_CFG3_TZ_SHIFT                       (4U)
14429 /*! TZ - Trust Zone
14430  *  0b0..Trust Zone support is not included.
14431  *  0b1..Trust Zone support is included.
14432  */
14433 #define MSCM_CFG3_TZ(x)                          (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_TZ_SHIFT)) & MSCM_CFG3_TZ_MASK)
14434 
14435 #define MSCM_CFG3_CMP_MASK                       (0x20U)
14436 #define MSCM_CFG3_CMP_SHIFT                      (5U)
14437 /*! CMP - Core Memory Protection unit
14438  *  0b0..Core Memory Protection is not included.
14439  *  0b1..Core Memory Protection is included.
14440  */
14441 #define MSCM_CFG3_CMP(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_CMP_SHIFT)) & MSCM_CFG3_CMP_MASK)
14442 
14443 #define MSCM_CFG3_BB_MASK                        (0x40U)
14444 #define MSCM_CFG3_BB_SHIFT                       (6U)
14445 /*! BB - Bit Banding
14446  *  0b0..Bit Banding is not supported.
14447  *  0b1..Bit Banding is supported.
14448  */
14449 #define MSCM_CFG3_BB(x)                          (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_BB_SHIFT)) & MSCM_CFG3_BB_MASK)
14450 
14451 #define MSCM_CFG3_SBP_MASK                       (0x300U)
14452 #define MSCM_CFG3_SBP_SHIFT                      (8U)
14453 /*! SBP - System Bus Ports */
14454 #define MSCM_CFG3_SBP(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SBP_SHIFT)) & MSCM_CFG3_SBP_MASK)
14455 /*! @} */
14456 
14457 /* The count of MSCM_CFG3 */
14458 #define MSCM_CFG3_COUNT                          (2U)
14459 
14460 /*! @name OCMDR0 - On-Chip Memory Descriptor Register */
14461 /*! @{ */
14462 
14463 #define MSCM_OCMDR0_OCM1_MASK                    (0x30U)
14464 #define MSCM_OCMDR0_OCM1_SHIFT                   (4U)
14465 /*! OCM1 - OCMEM Control Field 1 */
14466 #define MSCM_OCMDR0_OCM1(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCM1_SHIFT)) & MSCM_OCMDR0_OCM1_MASK)
14467 
14468 #define MSCM_OCMDR0_OCMPU_MASK                   (0x1000U)
14469 #define MSCM_OCMDR0_OCMPU_SHIFT                  (12U)
14470 /*! OCMPU - OCMPU */
14471 #define MSCM_OCMDR0_OCMPU(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMPU_SHIFT)) & MSCM_OCMDR0_OCMPU_MASK)
14472 
14473 #define MSCM_OCMDR0_OCMT_MASK                    (0xE000U)
14474 #define MSCM_OCMDR0_OCMT_SHIFT                   (13U)
14475 /*! OCMT - OCMT
14476  *  0b000..Reserved
14477  *  0b001..Reserved
14478  *  0b010..Reserved
14479  *  0b011..OCMEMn is a ROM.
14480  *  0b100..OCMEMn is a Program Flash.
14481  *  0b101..Reserved
14482  *  0b110..OCMEMn is an EEE.
14483  *  0b111..Reserved
14484  */
14485 #define MSCM_OCMDR0_OCMT(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMT_SHIFT)) & MSCM_OCMDR0_OCMT_MASK)
14486 
14487 #define MSCM_OCMDR0_RO_MASK                      (0x10000U)
14488 #define MSCM_OCMDR0_RO_SHIFT                     (16U)
14489 /*! RO - RO
14490  *  0b0..Writes to the OCMDRn[11:0] are allowed
14491  *  0b1..Writes to the OCMDRn[11:0] are ignored
14492  */
14493 #define MSCM_OCMDR0_RO(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_RO_SHIFT)) & MSCM_OCMDR0_RO_MASK)
14494 
14495 #define MSCM_OCMDR0_OCMW_MASK                    (0xE0000U)
14496 #define MSCM_OCMDR0_OCMW_SHIFT                   (17U)
14497 /*! OCMW - OCMW
14498  *  0b000-0b001..Reserved
14499  *  0b010..OCMEMn 32-bits wide
14500  *  0b011..OCMEMn 64-bits wide
14501  *  0b100..OCMEMn 128-bits wide
14502  *  0b101..OCMEMn 256-bits wide
14503  *  0b110-0b111..Reserved
14504  */
14505 #define MSCM_OCMDR0_OCMW(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMW_SHIFT)) & MSCM_OCMDR0_OCMW_MASK)
14506 
14507 #define MSCM_OCMDR0_OCMSZ_MASK                   (0xF000000U)
14508 #define MSCM_OCMDR0_OCMSZ_SHIFT                  (24U)
14509 /*! OCMSZ - OCMSZ
14510  *  0b0000..no OCMEMn
14511  *  0b0001..1KB OCMEMn
14512  *  0b0010..2KB OCMEMn
14513  *  0b0011..4KB OCMEMn
14514  *  0b0100..8KB OCMEMn
14515  *  0b0101..16KB OCMEMn
14516  *  0b0110..32KB OCMEMn
14517  *  0b0111..64KB OCMEMn
14518  *  0b1000..128KB OCMEMn
14519  *  0b1001..256KB OCMEMn
14520  *  0b1010..512KB OCMEMn
14521  *  0b1011..1MB OCMEMn
14522  *  0b1100..2MB OCMEMn
14523  *  0b1101..4MB OCMEMn
14524  *  0b1110..8MB OCMEMn
14525  *  0b1111..16MB OCMEMn
14526  */
14527 #define MSCM_OCMDR0_OCMSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMSZ_SHIFT)) & MSCM_OCMDR0_OCMSZ_MASK)
14528 
14529 #define MSCM_OCMDR0_OCMSZH_MASK                  (0x10000000U)
14530 #define MSCM_OCMDR0_OCMSZH_SHIFT                 (28U)
14531 /*! OCMSZH - OCMSZH
14532  *  0b0..OCMEMn is a power-of-2 capacity.
14533  *  0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ.
14534  */
14535 #define MSCM_OCMDR0_OCMSZH(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMSZH_SHIFT)) & MSCM_OCMDR0_OCMSZH_MASK)
14536 
14537 #define MSCM_OCMDR0_V_MASK                       (0x80000000U)
14538 #define MSCM_OCMDR0_V_SHIFT                      (31U)
14539 /*! V - V
14540  *  0b0..OCMEMn is not present.
14541  *  0b1..OCMEMn is present.
14542  */
14543 #define MSCM_OCMDR0_V(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_V_SHIFT)) & MSCM_OCMDR0_V_MASK)
14544 /*! @} */
14545 
14546 /*! @name OCMDR1 - On-Chip Memory Descriptor Register */
14547 /*! @{ */
14548 
14549 #define MSCM_OCMDR1_OCM1_MASK                    (0x30U)
14550 #define MSCM_OCMDR1_OCM1_SHIFT                   (4U)
14551 /*! OCM1 - OCMEM Control Field 1 */
14552 #define MSCM_OCMDR1_OCM1(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCM1_SHIFT)) & MSCM_OCMDR1_OCM1_MASK)
14553 
14554 #define MSCM_OCMDR1_OCMPU_MASK                   (0x1000U)
14555 #define MSCM_OCMDR1_OCMPU_SHIFT                  (12U)
14556 /*! OCMPU - OCMPU */
14557 #define MSCM_OCMDR1_OCMPU(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMPU_SHIFT)) & MSCM_OCMDR1_OCMPU_MASK)
14558 
14559 #define MSCM_OCMDR1_OCMT_MASK                    (0xE000U)
14560 #define MSCM_OCMDR1_OCMT_SHIFT                   (13U)
14561 /*! OCMT - OCMT
14562  *  0b000..Reserved
14563  *  0b001..Reserved
14564  *  0b010..Reserved
14565  *  0b011..OCMEMn is a ROM.
14566  *  0b100..OCMEMn is a Program Flash.
14567  *  0b101..Reserved
14568  *  0b110..OCMEMn is an EEE.
14569  *  0b111..Reserved
14570  */
14571 #define MSCM_OCMDR1_OCMT(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMT_SHIFT)) & MSCM_OCMDR1_OCMT_MASK)
14572 
14573 #define MSCM_OCMDR1_RO_MASK                      (0x10000U)
14574 #define MSCM_OCMDR1_RO_SHIFT                     (16U)
14575 /*! RO - RO
14576  *  0b0..Writes to the OCMDRn[11:0] are allowed
14577  *  0b1..Writes to the OCMDRn[11:0] are ignored
14578  */
14579 #define MSCM_OCMDR1_RO(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_RO_SHIFT)) & MSCM_OCMDR1_RO_MASK)
14580 
14581 #define MSCM_OCMDR1_OCMW_MASK                    (0xE0000U)
14582 #define MSCM_OCMDR1_OCMW_SHIFT                   (17U)
14583 /*! OCMW - OCMW
14584  *  0b000-0b001..Reserved
14585  *  0b010..OCMEMn 32-bits wide
14586  *  0b011..OCMEMn 64-bits wide
14587  *  0b100..OCMEMn 128-bits wide
14588  *  0b101..OCMEMn 256-bits wide
14589  *  0b110-0b111..Reserved
14590  */
14591 #define MSCM_OCMDR1_OCMW(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMW_SHIFT)) & MSCM_OCMDR1_OCMW_MASK)
14592 
14593 #define MSCM_OCMDR1_OCMSZ_MASK                   (0xF000000U)
14594 #define MSCM_OCMDR1_OCMSZ_SHIFT                  (24U)
14595 /*! OCMSZ - OCMSZ
14596  *  0b0000..no OCMEMn
14597  *  0b0001..1KB OCMEMn
14598  *  0b0010..2KB OCMEMn
14599  *  0b0011..4KB OCMEMn
14600  *  0b0100..8KB OCMEMn
14601  *  0b0101..16KB OCMEMn
14602  *  0b0110..32KB OCMEMn
14603  *  0b0111..64KB OCMEMn
14604  *  0b1000..128KB OCMEMn
14605  *  0b1001..256KB OCMEMn
14606  *  0b1010..512KB OCMEMn
14607  *  0b1011..1MB OCMEMn
14608  *  0b1100..2MB OCMEMn
14609  *  0b1101..4MB OCMEMn
14610  *  0b1110..8MB OCMEMn
14611  *  0b1111..16MB OCMEMn
14612  */
14613 #define MSCM_OCMDR1_OCMSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMSZ_SHIFT)) & MSCM_OCMDR1_OCMSZ_MASK)
14614 
14615 #define MSCM_OCMDR1_OCMSZH_MASK                  (0x10000000U)
14616 #define MSCM_OCMDR1_OCMSZH_SHIFT                 (28U)
14617 /*! OCMSZH - OCMSZH
14618  *  0b0..OCMEMn is a power-of-2 capacity.
14619  *  0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ.
14620  */
14621 #define MSCM_OCMDR1_OCMSZH(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMSZH_SHIFT)) & MSCM_OCMDR1_OCMSZH_MASK)
14622 
14623 #define MSCM_OCMDR1_V_MASK                       (0x80000000U)
14624 #define MSCM_OCMDR1_V_SHIFT                      (31U)
14625 /*! V - V
14626  *  0b0..OCMEMn is not present.
14627  *  0b1..OCMEMn is present.
14628  */
14629 #define MSCM_OCMDR1_V(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_V_SHIFT)) & MSCM_OCMDR1_V_MASK)
14630 /*! @} */
14631 
14632 /*! @name OCMDR2 - On-Chip Memory Descriptor Register */
14633 /*! @{ */
14634 
14635 #define MSCM_OCMDR2_OCMPU_MASK                   (0x1000U)
14636 #define MSCM_OCMDR2_OCMPU_SHIFT                  (12U)
14637 /*! OCMPU - OCMPU */
14638 #define MSCM_OCMDR2_OCMPU(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMPU_SHIFT)) & MSCM_OCMDR2_OCMPU_MASK)
14639 
14640 #define MSCM_OCMDR2_OCMT_MASK                    (0xE000U)
14641 #define MSCM_OCMDR2_OCMT_SHIFT                   (13U)
14642 /*! OCMT - OCMT
14643  *  0b000..Reserved
14644  *  0b001..Reserved
14645  *  0b010..Reserved
14646  *  0b011..OCMEMn is a ROM.
14647  *  0b100..OCMEMn is a Program Flash.
14648  *  0b101..Reserved
14649  *  0b110..OCMEMn is an EEE.
14650  *  0b111..Reserved
14651  */
14652 #define MSCM_OCMDR2_OCMT(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMT_SHIFT)) & MSCM_OCMDR2_OCMT_MASK)
14653 
14654 #define MSCM_OCMDR2_RO_MASK                      (0x10000U)
14655 #define MSCM_OCMDR2_RO_SHIFT                     (16U)
14656 /*! RO - RO
14657  *  0b0..Writes to the OCMDRn[11:0] are allowed
14658  *  0b1..Writes to the OCMDRn[11:0] are ignored
14659  */
14660 #define MSCM_OCMDR2_RO(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_RO_SHIFT)) & MSCM_OCMDR2_RO_MASK)
14661 
14662 #define MSCM_OCMDR2_OCMW_MASK                    (0xE0000U)
14663 #define MSCM_OCMDR2_OCMW_SHIFT                   (17U)
14664 /*! OCMW - OCMW
14665  *  0b000-0b001..Reserved
14666  *  0b010..OCMEMn 32-bits wide
14667  *  0b011..OCMEMn 64-bits wide
14668  *  0b100..OCMEMn 128-bits wide
14669  *  0b101..OCMEMn 256-bits wide
14670  *  0b110-0b111..Reserved
14671  */
14672 #define MSCM_OCMDR2_OCMW(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMW_SHIFT)) & MSCM_OCMDR2_OCMW_MASK)
14673 
14674 #define MSCM_OCMDR2_OCMSZ_MASK                   (0xF000000U)
14675 #define MSCM_OCMDR2_OCMSZ_SHIFT                  (24U)
14676 /*! OCMSZ - OCMSZ
14677  *  0b0000..no OCMEMn
14678  *  0b0001..1KB OCMEMn
14679  *  0b0010..2KB OCMEMn
14680  *  0b0011..4KB OCMEMn
14681  *  0b0100..8KB OCMEMn
14682  *  0b0101..16KB OCMEMn
14683  *  0b0110..32KB OCMEMn
14684  *  0b0111..64KB OCMEMn
14685  *  0b1000..128KB OCMEMn
14686  *  0b1001..256KB OCMEMn
14687  *  0b1010..512KB OCMEMn
14688  *  0b1011..1MB OCMEMn
14689  *  0b1100..2MB OCMEMn
14690  *  0b1101..4MB OCMEMn
14691  *  0b1110..8MB OCMEMn
14692  *  0b1111..16MB OCMEMn
14693  */
14694 #define MSCM_OCMDR2_OCMSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMSZ_SHIFT)) & MSCM_OCMDR2_OCMSZ_MASK)
14695 
14696 #define MSCM_OCMDR2_OCMSZH_MASK                  (0x10000000U)
14697 #define MSCM_OCMDR2_OCMSZH_SHIFT                 (28U)
14698 /*! OCMSZH - OCMSZH
14699  *  0b0..OCMEMn is a power-of-2 capacity.
14700  *  0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ.
14701  */
14702 #define MSCM_OCMDR2_OCMSZH(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMSZH_SHIFT)) & MSCM_OCMDR2_OCMSZH_MASK)
14703 
14704 #define MSCM_OCMDR2_V_MASK                       (0x80000000U)
14705 #define MSCM_OCMDR2_V_SHIFT                      (31U)
14706 /*! V - V
14707  *  0b0..OCMEMn is not present.
14708  *  0b1..OCMEMn is present.
14709  */
14710 #define MSCM_OCMDR2_V(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_V_SHIFT)) & MSCM_OCMDR2_V_MASK)
14711 /*! @} */
14712 
14713 /*! @name OCMDR3 - On-Chip Memory Descriptor Register */
14714 /*! @{ */
14715 
14716 #define MSCM_OCMDR3_OCMPU_MASK                   (0x1000U)
14717 #define MSCM_OCMDR3_OCMPU_SHIFT                  (12U)
14718 /*! OCMPU - OCMPU */
14719 #define MSCM_OCMDR3_OCMPU(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMPU_SHIFT)) & MSCM_OCMDR3_OCMPU_MASK)
14720 
14721 #define MSCM_OCMDR3_OCMT_MASK                    (0xE000U)
14722 #define MSCM_OCMDR3_OCMT_SHIFT                   (13U)
14723 /*! OCMT - OCMT
14724  *  0b000..Reserved
14725  *  0b001..Reserved
14726  *  0b010..Reserved
14727  *  0b011..OCMEMn is a ROM.
14728  *  0b100..OCMEMn is a Program Flash.
14729  *  0b101..Reserved
14730  *  0b110..OCMEMn is an EEE.
14731  *  0b111..Reserved
14732  */
14733 #define MSCM_OCMDR3_OCMT(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMT_SHIFT)) & MSCM_OCMDR3_OCMT_MASK)
14734 
14735 #define MSCM_OCMDR3_RO_MASK                      (0x10000U)
14736 #define MSCM_OCMDR3_RO_SHIFT                     (16U)
14737 /*! RO - RO
14738  *  0b0..Writes to the OCMDRn[11:0] are allowed
14739  *  0b1..Writes to the OCMDRn[11:0] are ignored
14740  */
14741 #define MSCM_OCMDR3_RO(x)                        (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_RO_SHIFT)) & MSCM_OCMDR3_RO_MASK)
14742 
14743 #define MSCM_OCMDR3_OCMW_MASK                    (0xE0000U)
14744 #define MSCM_OCMDR3_OCMW_SHIFT                   (17U)
14745 /*! OCMW - OCMW
14746  *  0b000-0b001..Reserved
14747  *  0b010..OCMEMn 32-bits wide
14748  *  0b011..OCMEMn 64-bits wide
14749  *  0b100..OCMEMn 128-bits wide
14750  *  0b101..OCMEMn 256-bits wide
14751  *  0b110-0b111..Reserved
14752  */
14753 #define MSCM_OCMDR3_OCMW(x)                      (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMW_SHIFT)) & MSCM_OCMDR3_OCMW_MASK)
14754 
14755 #define MSCM_OCMDR3_OCMSZ_MASK                   (0xF000000U)
14756 #define MSCM_OCMDR3_OCMSZ_SHIFT                  (24U)
14757 /*! OCMSZ - OCMSZ
14758  *  0b0000..no OCMEMn
14759  *  0b0001..1KB OCMEMn
14760  *  0b0010..2KB OCMEMn
14761  *  0b0011..4KB OCMEMn
14762  *  0b0100..8KB OCMEMn
14763  *  0b0101..16KB OCMEMn
14764  *  0b0110..32KB OCMEMn
14765  *  0b0111..64KB OCMEMn
14766  *  0b1000..128KB OCMEMn
14767  *  0b1001..256KB OCMEMn
14768  *  0b1010..512KB OCMEMn
14769  *  0b1011..1MB OCMEMn
14770  *  0b1100..2MB OCMEMn
14771  *  0b1101..4MB OCMEMn
14772  *  0b1110..8MB OCMEMn
14773  *  0b1111..16MB OCMEMn
14774  */
14775 #define MSCM_OCMDR3_OCMSZ(x)                     (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMSZ_SHIFT)) & MSCM_OCMDR3_OCMSZ_MASK)
14776 
14777 #define MSCM_OCMDR3_OCMSZH_MASK                  (0x10000000U)
14778 #define MSCM_OCMDR3_OCMSZH_SHIFT                 (28U)
14779 /*! OCMSZH - OCMSZH
14780  *  0b0..OCMEMn is a power-of-2 capacity.
14781  *  0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ.
14782  */
14783 #define MSCM_OCMDR3_OCMSZH(x)                    (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMSZH_SHIFT)) & MSCM_OCMDR3_OCMSZH_MASK)
14784 
14785 #define MSCM_OCMDR3_V_MASK                       (0x80000000U)
14786 #define MSCM_OCMDR3_V_SHIFT                      (31U)
14787 /*! V - V
14788  *  0b0..OCMEMn is not present.
14789  *  0b1..OCMEMn is present.
14790  */
14791 #define MSCM_OCMDR3_V(x)                         (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_V_SHIFT)) & MSCM_OCMDR3_V_MASK)
14792 /*! @} */
14793 
14794 
14795 /*!
14796  * @}
14797  */ /* end of group MSCM_Register_Masks */
14798 
14799 
14800 /* MSCM - Peripheral instance base addresses */
14801 /** Peripheral MSCM base address */
14802 #define MSCM_BASE                                (0x40001000u)
14803 /** Peripheral MSCM base pointer */
14804 #define MSCM                                     ((MSCM_Type *)MSCM_BASE)
14805 /** Array initializer of MSCM peripheral base addresses */
14806 #define MSCM_BASE_ADDRS                          { MSCM_BASE }
14807 /** Array initializer of MSCM peripheral base pointers */
14808 #define MSCM_BASE_PTRS                           { MSCM }
14809 
14810 /*!
14811  * @}
14812  */ /* end of group MSCM_Peripheral_Access_Layer */
14813 
14814 
14815 /* ----------------------------------------------------------------------------
14816    -- MTB Peripheral Access Layer
14817    ---------------------------------------------------------------------------- */
14818 
14819 /*!
14820  * @addtogroup MTB_Peripheral_Access_Layer MTB Peripheral Access Layer
14821  * @{
14822  */
14823 
14824 /** MTB - Register Layout Typedef */
14825 typedef struct {
14826   __IO uint32_t POSITION;                          /**< MTB Position Register, offset: 0x0 */
14827   __IO uint32_t MASTER;                            /**< MTB Master Register, offset: 0x4 */
14828   __IO uint32_t FLOW;                              /**< MTB Flow Register, offset: 0x8 */
14829   __I  uint32_t BASE;                              /**< MTB Base Register, offset: 0xC */
14830        uint8_t RESERVED_0[3824];
14831   __I  uint32_t MODECTRL;                          /**< Integration Mode Control Register, offset: 0xF00 */
14832        uint8_t RESERVED_1[156];
14833   __I  uint32_t TAGSET;                            /**< Claim TAG Set Register, offset: 0xFA0 */
14834   __I  uint32_t TAGCLEAR;                          /**< Claim TAG Clear Register, offset: 0xFA4 */
14835        uint8_t RESERVED_2[8];
14836   __I  uint32_t LOCKACCESS;                        /**< Lock Access Register, offset: 0xFB0 */
14837   __I  uint32_t LOCKSTAT;                          /**< Lock Status Register, offset: 0xFB4 */
14838   __I  uint32_t AUTHSTAT;                          /**< Authentication Status Register, offset: 0xFB8 */
14839   __I  uint32_t DEVICEARCH;                        /**< Device Architecture Register, offset: 0xFBC */
14840        uint8_t RESERVED_3[8];
14841   __I  uint32_t DEVICECFG;                         /**< Device Configuration Register, offset: 0xFC8 */
14842   __I  uint32_t DEVICETYPID;                       /**< Device Type Identifier Register, offset: 0xFCC */
14843   __I  uint32_t PERIPHID4;                         /**< Peripheral ID Register, offset: 0xFD0 */
14844   __I  uint32_t PERIPHID5;                         /**< Peripheral ID Register, offset: 0xFD4 */
14845   __I  uint32_t PERIPHID6;                         /**< Peripheral ID Register, offset: 0xFD8 */
14846   __I  uint32_t PERIPHID7;                         /**< Peripheral ID Register, offset: 0xFDC */
14847   __I  uint32_t PERIPHID0;                         /**< Peripheral ID Register, offset: 0xFE0 */
14848   __I  uint32_t PERIPHID1;                         /**< Peripheral ID Register, offset: 0xFE4 */
14849   __I  uint32_t PERIPHID2;                         /**< Peripheral ID Register, offset: 0xFE8 */
14850   __I  uint32_t PERIPHID3;                         /**< Peripheral ID Register, offset: 0xFEC */
14851   __I  uint32_t COMPID[4];                         /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */
14852 } MTB_Type;
14853 
14854 /* ----------------------------------------------------------------------------
14855    -- MTB Register Masks
14856    ---------------------------------------------------------------------------- */
14857 
14858 /*!
14859  * @addtogroup MTB_Register_Masks MTB Register Masks
14860  * @{
14861  */
14862 
14863 /*! @name POSITION - MTB Position Register */
14864 /*! @{ */
14865 
14866 #define MTB_POSITION_WRAP_MASK                   (0x4U)
14867 #define MTB_POSITION_WRAP_SHIFT                  (2U)
14868 /*! WRAP - WRAP */
14869 #define MTB_POSITION_WRAP(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_POSITION_WRAP_SHIFT)) & MTB_POSITION_WRAP_MASK)
14870 
14871 #define MTB_POSITION_POINTER_MASK                (0xFFF8U)
14872 #define MTB_POSITION_POINTER_SHIFT               (3U)
14873 /*! POINTER - Trace Packet Address Pointer */
14874 #define MTB_POSITION_POINTER(x)                  (((uint32_t)(((uint32_t)(x)) << MTB_POSITION_POINTER_SHIFT)) & MTB_POSITION_POINTER_MASK)
14875 /*! @} */
14876 
14877 /*! @name MASTER - MTB Master Register */
14878 /*! @{ */
14879 
14880 #define MTB_MASTER_MASK_MASK                     (0x1FU)
14881 #define MTB_MASTER_MASK_SHIFT                    (0U)
14882 /*! MASK - Mask */
14883 #define MTB_MASTER_MASK(x)                       (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_MASK_SHIFT)) & MTB_MASTER_MASK_MASK)
14884 
14885 #define MTB_MASTER_TSTARTEN_MASK                 (0x20U)
14886 #define MTB_MASTER_TSTARTEN_SHIFT                (5U)
14887 /*! TSTARTEN - Trace Start Input Enable */
14888 #define MTB_MASTER_TSTARTEN(x)                   (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_TSTARTEN_SHIFT)) & MTB_MASTER_TSTARTEN_MASK)
14889 
14890 #define MTB_MASTER_TSTOPEN_MASK                  (0x40U)
14891 #define MTB_MASTER_TSTOPEN_SHIFT                 (6U)
14892 /*! TSTOPEN - Trace Stop Input Enable */
14893 #define MTB_MASTER_TSTOPEN(x)                    (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_TSTOPEN_SHIFT)) & MTB_MASTER_TSTOPEN_MASK)
14894 
14895 #define MTB_MASTER_SFRWPRIV_MASK                 (0x80U)
14896 #define MTB_MASTER_SFRWPRIV_SHIFT                (7U)
14897 /*! SFRWPRIV - Special Function Register Write Privilege */
14898 #define MTB_MASTER_SFRWPRIV(x)                   (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_SFRWPRIV_SHIFT)) & MTB_MASTER_SFRWPRIV_MASK)
14899 
14900 #define MTB_MASTER_RAMPRIV_MASK                  (0x100U)
14901 #define MTB_MASTER_RAMPRIV_SHIFT                 (8U)
14902 /*! RAMPRIV - RAM Privilege */
14903 #define MTB_MASTER_RAMPRIV(x)                    (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_RAMPRIV_SHIFT)) & MTB_MASTER_RAMPRIV_MASK)
14904 
14905 #define MTB_MASTER_HALTREQ_MASK                  (0x200U)
14906 #define MTB_MASTER_HALTREQ_SHIFT                 (9U)
14907 /*! HALTREQ - Halt Request */
14908 #define MTB_MASTER_HALTREQ(x)                    (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_HALTREQ_SHIFT)) & MTB_MASTER_HALTREQ_MASK)
14909 
14910 #define MTB_MASTER_EN_MASK                       (0x80000000U)
14911 #define MTB_MASTER_EN_SHIFT                      (31U)
14912 /*! EN - Main Trace Enable */
14913 #define MTB_MASTER_EN(x)                         (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_EN_SHIFT)) & MTB_MASTER_EN_MASK)
14914 /*! @} */
14915 
14916 /*! @name FLOW - MTB Flow Register */
14917 /*! @{ */
14918 
14919 #define MTB_FLOW_AUTOSTOP_MASK                   (0x1U)
14920 #define MTB_FLOW_AUTOSTOP_SHIFT                  (0U)
14921 /*! AUTOSTOP - AUTOSTOP */
14922 #define MTB_FLOW_AUTOSTOP(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_AUTOSTOP_SHIFT)) & MTB_FLOW_AUTOSTOP_MASK)
14923 
14924 #define MTB_FLOW_AUTOHALT_MASK                   (0x2U)
14925 #define MTB_FLOW_AUTOHALT_SHIFT                  (1U)
14926 /*! AUTOHALT - AUTOHALT */
14927 #define MTB_FLOW_AUTOHALT(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_AUTOHALT_SHIFT)) & MTB_FLOW_AUTOHALT_MASK)
14928 
14929 #define MTB_FLOW_WATERMARK_MASK                  (0xFFFFFFF8U)
14930 #define MTB_FLOW_WATERMARK_SHIFT                 (3U)
14931 /*! WATERMARK - WATERMARK[28:0] */
14932 #define MTB_FLOW_WATERMARK(x)                    (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_WATERMARK_SHIFT)) & MTB_FLOW_WATERMARK_MASK)
14933 /*! @} */
14934 
14935 /*! @name BASE - MTB Base Register */
14936 /*! @{ */
14937 
14938 #define MTB_BASE_BASEADDR_MASK                   (0xFFFFFFFFU)
14939 #define MTB_BASE_BASEADDR_SHIFT                  (0U)
14940 /*! BASEADDR - BASEADDR */
14941 #define MTB_BASE_BASEADDR(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_BASE_BASEADDR_SHIFT)) & MTB_BASE_BASEADDR_MASK)
14942 /*! @} */
14943 
14944 /*! @name MODECTRL - Integration Mode Control Register */
14945 /*! @{ */
14946 
14947 #define MTB_MODECTRL_MODECTRL_MASK               (0xFFFFFFFFU)
14948 #define MTB_MODECTRL_MODECTRL_SHIFT              (0U)
14949 /*! MODECTRL - MODECTRL */
14950 #define MTB_MODECTRL_MODECTRL(x)                 (((uint32_t)(((uint32_t)(x)) << MTB_MODECTRL_MODECTRL_SHIFT)) & MTB_MODECTRL_MODECTRL_MASK)
14951 /*! @} */
14952 
14953 /*! @name TAGSET - Claim TAG Set Register */
14954 /*! @{ */
14955 
14956 #define MTB_TAGSET_TAGSET_MASK                   (0xFFFFFFFFU)
14957 #define MTB_TAGSET_TAGSET_SHIFT                  (0U)
14958 /*! TAGSET - TAGSET */
14959 #define MTB_TAGSET_TAGSET(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_TAGSET_TAGSET_SHIFT)) & MTB_TAGSET_TAGSET_MASK)
14960 /*! @} */
14961 
14962 /*! @name TAGCLEAR - Claim TAG Clear Register */
14963 /*! @{ */
14964 
14965 #define MTB_TAGCLEAR_TAGCLEAR_MASK               (0xFFFFFFFFU)
14966 #define MTB_TAGCLEAR_TAGCLEAR_SHIFT              (0U)
14967 /*! TAGCLEAR - TAGCLEAR */
14968 #define MTB_TAGCLEAR_TAGCLEAR(x)                 (((uint32_t)(((uint32_t)(x)) << MTB_TAGCLEAR_TAGCLEAR_SHIFT)) & MTB_TAGCLEAR_TAGCLEAR_MASK)
14969 /*! @} */
14970 
14971 /*! @name LOCKACCESS - Lock Access Register */
14972 /*! @{ */
14973 
14974 #define MTB_LOCKACCESS_LOCKACCESS_MASK           (0xFFFFFFFFU)
14975 #define MTB_LOCKACCESS_LOCKACCESS_SHIFT          (0U)
14976 /*! LOCKACCESS - LOCKACCESS */
14977 #define MTB_LOCKACCESS_LOCKACCESS(x)             (((uint32_t)(((uint32_t)(x)) << MTB_LOCKACCESS_LOCKACCESS_SHIFT)) & MTB_LOCKACCESS_LOCKACCESS_MASK)
14978 /*! @} */
14979 
14980 /*! @name LOCKSTAT - Lock Status Register */
14981 /*! @{ */
14982 
14983 #define MTB_LOCKSTAT_LOCKSTAT_MASK               (0xFFFFFFFFU)
14984 #define MTB_LOCKSTAT_LOCKSTAT_SHIFT              (0U)
14985 /*! LOCKSTAT - LOCKSTAT */
14986 #define MTB_LOCKSTAT_LOCKSTAT(x)                 (((uint32_t)(((uint32_t)(x)) << MTB_LOCKSTAT_LOCKSTAT_SHIFT)) & MTB_LOCKSTAT_LOCKSTAT_MASK)
14987 /*! @} */
14988 
14989 /*! @name AUTHSTAT - Authentication Status Register */
14990 /*! @{ */
14991 
14992 #define MTB_AUTHSTAT_BIT0_MASK                   (0x1U)
14993 #define MTB_AUTHSTAT_BIT0_SHIFT                  (0U)
14994 /*! BIT0 - BIT0 */
14995 #define MTB_AUTHSTAT_BIT0(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT0_SHIFT)) & MTB_AUTHSTAT_BIT0_MASK)
14996 
14997 #define MTB_AUTHSTAT_BIT1_MASK                   (0x2U)
14998 #define MTB_AUTHSTAT_BIT1_SHIFT                  (1U)
14999 /*! BIT1 - BIT1 */
15000 #define MTB_AUTHSTAT_BIT1(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT1_SHIFT)) & MTB_AUTHSTAT_BIT1_MASK)
15001 
15002 #define MTB_AUTHSTAT_BIT2_MASK                   (0x4U)
15003 #define MTB_AUTHSTAT_BIT2_SHIFT                  (2U)
15004 /*! BIT2 - BIT2 */
15005 #define MTB_AUTHSTAT_BIT2(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT2_SHIFT)) & MTB_AUTHSTAT_BIT2_MASK)
15006 
15007 #define MTB_AUTHSTAT_BIT3_MASK                   (0x8U)
15008 #define MTB_AUTHSTAT_BIT3_SHIFT                  (3U)
15009 /*! BIT3 - BIT3 */
15010 #define MTB_AUTHSTAT_BIT3(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT3_SHIFT)) & MTB_AUTHSTAT_BIT3_MASK)
15011 /*! @} */
15012 
15013 /*! @name DEVICEARCH - Device Architecture Register */
15014 /*! @{ */
15015 
15016 #define MTB_DEVICEARCH_DEVICEARCH_MASK           (0xFFFFFFFFU)
15017 #define MTB_DEVICEARCH_DEVICEARCH_SHIFT          (0U)
15018 /*! DEVICEARCH - DEVICEARCH */
15019 #define MTB_DEVICEARCH_DEVICEARCH(x)             (((uint32_t)(((uint32_t)(x)) << MTB_DEVICEARCH_DEVICEARCH_SHIFT)) & MTB_DEVICEARCH_DEVICEARCH_MASK)
15020 /*! @} */
15021 
15022 /*! @name DEVICECFG - Device Configuration Register */
15023 /*! @{ */
15024 
15025 #define MTB_DEVICECFG_DEVICECFG_MASK             (0xFFFFFFFFU)
15026 #define MTB_DEVICECFG_DEVICECFG_SHIFT            (0U)
15027 /*! DEVICECFG - DEVICECFG */
15028 #define MTB_DEVICECFG_DEVICECFG(x)               (((uint32_t)(((uint32_t)(x)) << MTB_DEVICECFG_DEVICECFG_SHIFT)) & MTB_DEVICECFG_DEVICECFG_MASK)
15029 /*! @} */
15030 
15031 /*! @name DEVICETYPID - Device Type Identifier Register */
15032 /*! @{ */
15033 
15034 #define MTB_DEVICETYPID_DEVICETYPID_MASK         (0xFFFFFFFFU)
15035 #define MTB_DEVICETYPID_DEVICETYPID_SHIFT        (0U)
15036 /*! DEVICETYPID - DEVICETYPID */
15037 #define MTB_DEVICETYPID_DEVICETYPID(x)           (((uint32_t)(((uint32_t)(x)) << MTB_DEVICETYPID_DEVICETYPID_SHIFT)) & MTB_DEVICETYPID_DEVICETYPID_MASK)
15038 /*! @} */
15039 
15040 /*! @name PERIPHID4 - Peripheral ID Register */
15041 /*! @{ */
15042 
15043 #define MTB_PERIPHID4_PERIPHID_MASK              (0xFFFFFFFFU)
15044 #define MTB_PERIPHID4_PERIPHID_SHIFT             (0U)
15045 /*! PERIPHID - PERIPHID */
15046 #define MTB_PERIPHID4_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID4_PERIPHID_SHIFT)) & MTB_PERIPHID4_PERIPHID_MASK)
15047 /*! @} */
15048 
15049 /*! @name PERIPHID5 - Peripheral ID Register */
15050 /*! @{ */
15051 
15052 #define MTB_PERIPHID5_PERIPHID_MASK              (0xFFFFFFFFU)
15053 #define MTB_PERIPHID5_PERIPHID_SHIFT             (0U)
15054 /*! PERIPHID - PERIPHID */
15055 #define MTB_PERIPHID5_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID5_PERIPHID_SHIFT)) & MTB_PERIPHID5_PERIPHID_MASK)
15056 /*! @} */
15057 
15058 /*! @name PERIPHID6 - Peripheral ID Register */
15059 /*! @{ */
15060 
15061 #define MTB_PERIPHID6_PERIPHID_MASK              (0xFFFFFFFFU)
15062 #define MTB_PERIPHID6_PERIPHID_SHIFT             (0U)
15063 /*! PERIPHID - PERIPHID */
15064 #define MTB_PERIPHID6_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID6_PERIPHID_SHIFT)) & MTB_PERIPHID6_PERIPHID_MASK)
15065 /*! @} */
15066 
15067 /*! @name PERIPHID7 - Peripheral ID Register */
15068 /*! @{ */
15069 
15070 #define MTB_PERIPHID7_PERIPHID_MASK              (0xFFFFFFFFU)
15071 #define MTB_PERIPHID7_PERIPHID_SHIFT             (0U)
15072 /*! PERIPHID - PERIPHID */
15073 #define MTB_PERIPHID7_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID7_PERIPHID_SHIFT)) & MTB_PERIPHID7_PERIPHID_MASK)
15074 /*! @} */
15075 
15076 /*! @name PERIPHID0 - Peripheral ID Register */
15077 /*! @{ */
15078 
15079 #define MTB_PERIPHID0_PERIPHID_MASK              (0xFFFFFFFFU)
15080 #define MTB_PERIPHID0_PERIPHID_SHIFT             (0U)
15081 /*! PERIPHID - PERIPHID */
15082 #define MTB_PERIPHID0_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID0_PERIPHID_SHIFT)) & MTB_PERIPHID0_PERIPHID_MASK)
15083 /*! @} */
15084 
15085 /*! @name PERIPHID1 - Peripheral ID Register */
15086 /*! @{ */
15087 
15088 #define MTB_PERIPHID1_PERIPHID_MASK              (0xFFFFFFFFU)
15089 #define MTB_PERIPHID1_PERIPHID_SHIFT             (0U)
15090 /*! PERIPHID - PERIPHID */
15091 #define MTB_PERIPHID1_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID1_PERIPHID_SHIFT)) & MTB_PERIPHID1_PERIPHID_MASK)
15092 /*! @} */
15093 
15094 /*! @name PERIPHID2 - Peripheral ID Register */
15095 /*! @{ */
15096 
15097 #define MTB_PERIPHID2_PERIPHID_MASK              (0xFFFFFFFFU)
15098 #define MTB_PERIPHID2_PERIPHID_SHIFT             (0U)
15099 /*! PERIPHID - PERIPHID */
15100 #define MTB_PERIPHID2_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID2_PERIPHID_SHIFT)) & MTB_PERIPHID2_PERIPHID_MASK)
15101 /*! @} */
15102 
15103 /*! @name PERIPHID3 - Peripheral ID Register */
15104 /*! @{ */
15105 
15106 #define MTB_PERIPHID3_PERIPHID_MASK              (0xFFFFFFFFU)
15107 #define MTB_PERIPHID3_PERIPHID_SHIFT             (0U)
15108 /*! PERIPHID - PERIPHID */
15109 #define MTB_PERIPHID3_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID3_PERIPHID_SHIFT)) & MTB_PERIPHID3_PERIPHID_MASK)
15110 /*! @} */
15111 
15112 /*! @name COMPID - Component ID Register */
15113 /*! @{ */
15114 
15115 #define MTB_COMPID_COMPID_MASK                   (0xFFFFFFFFU)
15116 #define MTB_COMPID_COMPID_SHIFT                  (0U)
15117 /*! COMPID - Component ID */
15118 #define MTB_COMPID_COMPID(x)                     (((uint32_t)(((uint32_t)(x)) << MTB_COMPID_COMPID_SHIFT)) & MTB_COMPID_COMPID_MASK)
15119 /*! @} */
15120 
15121 /* The count of MTB_COMPID */
15122 #define MTB_COMPID_COUNT                         (4U)
15123 
15124 
15125 /*!
15126  * @}
15127  */ /* end of group MTB_Register_Masks */
15128 
15129 
15130 /* MTB - Peripheral instance base addresses */
15131 /** Peripheral MTB base address */
15132 #define MTB_BASE                                 (0xF0000000u)
15133 /** Peripheral MTB base pointer */
15134 #define MTB                                      ((MTB_Type *)MTB_BASE)
15135 /** Array initializer of MTB peripheral base addresses */
15136 #define MTB_BASE_ADDRS                           { MTB_BASE }
15137 /** Array initializer of MTB peripheral base pointers */
15138 #define MTB_BASE_PTRS                            { MTB }
15139 
15140 /*!
15141  * @}
15142  */ /* end of group MTB_Peripheral_Access_Layer */
15143 
15144 
15145 /* ----------------------------------------------------------------------------
15146    -- MTBDWT Peripheral Access Layer
15147    ---------------------------------------------------------------------------- */
15148 
15149 /*!
15150  * @addtogroup MTBDWT_Peripheral_Access_Layer MTBDWT Peripheral Access Layer
15151  * @{
15152  */
15153 
15154 /** MTBDWT - Register Layout Typedef */
15155 typedef struct {
15156   __I  uint32_t CTRL;                              /**< DWT Control Register, offset: 0x0 */
15157        uint8_t RESERVED_0[28];
15158   struct {                                         /* offset: 0x20, array step: 0x10 */
15159     __IO uint32_t COMP;                              /**< DWT Comparator Register, array offset: 0x20, array step: 0x10 */
15160     __IO uint32_t MASK;                              /**< DWT Comparator Mask Register, array offset: 0x24, array step: 0x10 */
15161     __IO uint32_t FCT;                               /**< DWT Comparator Function Register 0..DWT Comparator Function Register 1, array offset: 0x28, array step: 0x10 */
15162          uint8_t RESERVED_0[4];
15163   } COMPARATOR[2];
15164        uint8_t RESERVED_1[448];
15165   __IO uint32_t TBCTRL;                            /**< DWT Trace Buffer Control Register, offset: 0x200 */
15166        uint8_t RESERVED_2[3524];
15167   __I  uint32_t DEVICECFG;                         /**< Device Configuration Register, offset: 0xFC8 */
15168   __I  uint32_t DEVICETYPID;                       /**< Device Type Identifier Register, offset: 0xFCC */
15169   __I  uint32_t PERIPHID4;                         /**< Peripheral ID Register, offset: 0xFD0 */
15170   __I  uint32_t PERIPHID5;                         /**< Peripheral ID Register, offset: 0xFD4 */
15171   __I  uint32_t PERIPHID6;                         /**< Peripheral ID Register, offset: 0xFD8 */
15172   __I  uint32_t PERIPHID7;                         /**< Peripheral ID Register, offset: 0xFDC */
15173   __I  uint32_t PERIPHID0;                         /**< Peripheral ID Register, offset: 0xFE0 */
15174   __I  uint32_t PERIPHID1;                         /**< Peripheral ID Register, offset: 0xFE4 */
15175   __I  uint32_t PERIPHID2;                         /**< Peripheral ID Register, offset: 0xFE8 */
15176   __I  uint32_t PERIPHID3;                         /**< Peripheral ID Register, offset: 0xFEC */
15177   __I  uint32_t COMPID[4];                         /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */
15178 } MTBDWT_Type;
15179 
15180 /* ----------------------------------------------------------------------------
15181    -- MTBDWT Register Masks
15182    ---------------------------------------------------------------------------- */
15183 
15184 /*!
15185  * @addtogroup MTBDWT_Register_Masks MTBDWT Register Masks
15186  * @{
15187  */
15188 
15189 /*! @name CTRL - DWT Control Register */
15190 /*! @{ */
15191 
15192 #define MTBDWT_CTRL_DWTCFGCTRL_MASK              (0xFFFFFFFU)
15193 #define MTBDWT_CTRL_DWTCFGCTRL_SHIFT             (0U)
15194 /*! DWTCFGCTRL - DWT configuration controls */
15195 #define MTBDWT_CTRL_DWTCFGCTRL(x)                (((uint32_t)(((uint32_t)(x)) << MTBDWT_CTRL_DWTCFGCTRL_SHIFT)) & MTBDWT_CTRL_DWTCFGCTRL_MASK)
15196 
15197 #define MTBDWT_CTRL_NUMCMP_MASK                  (0xF0000000U)
15198 #define MTBDWT_CTRL_NUMCMP_SHIFT                 (28U)
15199 /*! NUMCMP - Number of comparators */
15200 #define MTBDWT_CTRL_NUMCMP(x)                    (((uint32_t)(((uint32_t)(x)) << MTBDWT_CTRL_NUMCMP_SHIFT)) & MTBDWT_CTRL_NUMCMP_MASK)
15201 /*! @} */
15202 
15203 /*! @name COMP - DWT Comparator Register */
15204 /*! @{ */
15205 
15206 #define MTBDWT_COMP_COMP_MASK                    (0xFFFFFFFFU)
15207 #define MTBDWT_COMP_COMP_SHIFT                   (0U)
15208 /*! COMP - Reference value for comparison */
15209 #define MTBDWT_COMP_COMP(x)                      (((uint32_t)(((uint32_t)(x)) << MTBDWT_COMP_COMP_SHIFT)) & MTBDWT_COMP_COMP_MASK)
15210 /*! @} */
15211 
15212 /* The count of MTBDWT_COMP */
15213 #define MTBDWT_COMP_COUNT                        (2U)
15214 
15215 /*! @name MASK - DWT Comparator Mask Register */
15216 /*! @{ */
15217 
15218 #define MTBDWT_MASK_MASK_MASK                    (0x1FU)
15219 #define MTBDWT_MASK_MASK_SHIFT                   (0U)
15220 /*! MASK - MASK */
15221 #define MTBDWT_MASK_MASK(x)                      (((uint32_t)(((uint32_t)(x)) << MTBDWT_MASK_MASK_SHIFT)) & MTBDWT_MASK_MASK_MASK)
15222 /*! @} */
15223 
15224 /* The count of MTBDWT_MASK */
15225 #define MTBDWT_MASK_COUNT                        (2U)
15226 
15227 /*! @name FCT - DWT Comparator Function Register 0..DWT Comparator Function Register 1 */
15228 /*! @{ */
15229 
15230 #define MTBDWT_FCT_FUNCTION_MASK                 (0xFU)
15231 #define MTBDWT_FCT_FUNCTION_SHIFT                (0U)
15232 /*! FUNCTION - Function
15233  *  0b0000..Disabled.
15234  *  0b0001-0b0011..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior.
15235  *  0b0100..Instruction fetch.
15236  *  0b0101..Data operand read.
15237  *  0b0110..Data operand write.
15238  *  0b0111..Data operand (read + write).
15239  *  0b1000-0b1111..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior.
15240  */
15241 #define MTBDWT_FCT_FUNCTION(x)                   (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_FUNCTION_SHIFT)) & MTBDWT_FCT_FUNCTION_MASK)
15242 
15243 #define MTBDWT_FCT_DATAVMATCH_MASK               (0x100U)
15244 #define MTBDWT_FCT_DATAVMATCH_SHIFT              (8U)
15245 /*! DATAVMATCH - Data Value Match
15246  *  0b0..Perform address comparison.
15247  *  0b1..Perform data value comparison.
15248  */
15249 #define MTBDWT_FCT_DATAVMATCH(x)                 (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVMATCH_SHIFT)) & MTBDWT_FCT_DATAVMATCH_MASK)
15250 
15251 #define MTBDWT_FCT_DATAVSIZE_MASK                (0xC00U)
15252 #define MTBDWT_FCT_DATAVSIZE_SHIFT               (10U)
15253 /*! DATAVSIZE - Data Value Size
15254  *  0b00..Byte.
15255  *  0b01..Halfword.
15256  *  0b10..Word.
15257  *  0b11..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior.
15258  */
15259 #define MTBDWT_FCT_DATAVSIZE(x)                  (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVSIZE_SHIFT)) & MTBDWT_FCT_DATAVSIZE_MASK)
15260 
15261 #define MTBDWT_FCT_DATAVADDR0_MASK               (0xF000U)
15262 #define MTBDWT_FCT_DATAVADDR0_SHIFT              (12U)
15263 /*! DATAVADDR0 - Data Value Address 0 */
15264 #define MTBDWT_FCT_DATAVADDR0(x)                 (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVADDR0_SHIFT)) & MTBDWT_FCT_DATAVADDR0_MASK)
15265 
15266 #define MTBDWT_FCT_MATCHED_MASK                  (0x1000000U)
15267 #define MTBDWT_FCT_MATCHED_SHIFT                 (24U)
15268 /*! MATCHED - Comparator match
15269  *  0b0..No match.
15270  *  0b1..Match occurred.
15271  */
15272 #define MTBDWT_FCT_MATCHED(x)                    (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_MATCHED_SHIFT)) & MTBDWT_FCT_MATCHED_MASK)
15273 /*! @} */
15274 
15275 /* The count of MTBDWT_FCT */
15276 #define MTBDWT_FCT_COUNT                         (2U)
15277 
15278 /*! @name TBCTRL - DWT Trace Buffer Control Register */
15279 /*! @{ */
15280 
15281 #define MTBDWT_TBCTRL_ACOMP0_MASK                (0x1U)
15282 #define MTBDWT_TBCTRL_ACOMP0_SHIFT               (0U)
15283 /*! ACOMP0 - Action based on Comparator 0 match
15284  *  0b0..Trigger TSTOP based on the assertion of FCT0[MATCHED].
15285  *  0b1..Trigger TSTART based on the assertion of FCT0[MATCHED].
15286  */
15287 #define MTBDWT_TBCTRL_ACOMP0(x)                  (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_ACOMP0_SHIFT)) & MTBDWT_TBCTRL_ACOMP0_MASK)
15288 
15289 #define MTBDWT_TBCTRL_ACOMP1_MASK                (0x2U)
15290 #define MTBDWT_TBCTRL_ACOMP1_SHIFT               (1U)
15291 /*! ACOMP1 - Action based on Comparator 1 match
15292  *  0b0..Trigger TSTOP based on the assertion of FCT1[MATCHED].
15293  *  0b1..Trigger TSTART based on the assertion of FCT1[MATCHED].
15294  */
15295 #define MTBDWT_TBCTRL_ACOMP1(x)                  (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_ACOMP1_SHIFT)) & MTBDWT_TBCTRL_ACOMP1_MASK)
15296 
15297 #define MTBDWT_TBCTRL_NUMCOMP_MASK               (0xF0000000U)
15298 #define MTBDWT_TBCTRL_NUMCOMP_SHIFT              (28U)
15299 /*! NUMCOMP - Number of Comparators */
15300 #define MTBDWT_TBCTRL_NUMCOMP(x)                 (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_NUMCOMP_SHIFT)) & MTBDWT_TBCTRL_NUMCOMP_MASK)
15301 /*! @} */
15302 
15303 /*! @name DEVICECFG - Device Configuration Register */
15304 /*! @{ */
15305 
15306 #define MTBDWT_DEVICECFG_DEVICECFG_MASK          (0xFFFFFFFFU)
15307 #define MTBDWT_DEVICECFG_DEVICECFG_SHIFT         (0U)
15308 /*! DEVICECFG - DEVICECFG */
15309 #define MTBDWT_DEVICECFG_DEVICECFG(x)            (((uint32_t)(((uint32_t)(x)) << MTBDWT_DEVICECFG_DEVICECFG_SHIFT)) & MTBDWT_DEVICECFG_DEVICECFG_MASK)
15310 /*! @} */
15311 
15312 /*! @name DEVICETYPID - Device Type Identifier Register */
15313 /*! @{ */
15314 
15315 #define MTBDWT_DEVICETYPID_DEVICETYPID_MASK      (0xFFFFFFFFU)
15316 #define MTBDWT_DEVICETYPID_DEVICETYPID_SHIFT     (0U)
15317 /*! DEVICETYPID - DEVICETYPID */
15318 #define MTBDWT_DEVICETYPID_DEVICETYPID(x)        (((uint32_t)(((uint32_t)(x)) << MTBDWT_DEVICETYPID_DEVICETYPID_SHIFT)) & MTBDWT_DEVICETYPID_DEVICETYPID_MASK)
15319 /*! @} */
15320 
15321 /*! @name PERIPHID4 - Peripheral ID Register */
15322 /*! @{ */
15323 
15324 #define MTBDWT_PERIPHID4_PERIPHID_MASK           (0xFFFFFFFFU)
15325 #define MTBDWT_PERIPHID4_PERIPHID_SHIFT          (0U)
15326 /*! PERIPHID - PERIPHID */
15327 #define MTBDWT_PERIPHID4_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID4_PERIPHID_SHIFT)) & MTBDWT_PERIPHID4_PERIPHID_MASK)
15328 /*! @} */
15329 
15330 /*! @name PERIPHID5 - Peripheral ID Register */
15331 /*! @{ */
15332 
15333 #define MTBDWT_PERIPHID5_PERIPHID_MASK           (0xFFFFFFFFU)
15334 #define MTBDWT_PERIPHID5_PERIPHID_SHIFT          (0U)
15335 /*! PERIPHID - PERIPHID */
15336 #define MTBDWT_PERIPHID5_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID5_PERIPHID_SHIFT)) & MTBDWT_PERIPHID5_PERIPHID_MASK)
15337 /*! @} */
15338 
15339 /*! @name PERIPHID6 - Peripheral ID Register */
15340 /*! @{ */
15341 
15342 #define MTBDWT_PERIPHID6_PERIPHID_MASK           (0xFFFFFFFFU)
15343 #define MTBDWT_PERIPHID6_PERIPHID_SHIFT          (0U)
15344 /*! PERIPHID - PERIPHID */
15345 #define MTBDWT_PERIPHID6_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID6_PERIPHID_SHIFT)) & MTBDWT_PERIPHID6_PERIPHID_MASK)
15346 /*! @} */
15347 
15348 /*! @name PERIPHID7 - Peripheral ID Register */
15349 /*! @{ */
15350 
15351 #define MTBDWT_PERIPHID7_PERIPHID_MASK           (0xFFFFFFFFU)
15352 #define MTBDWT_PERIPHID7_PERIPHID_SHIFT          (0U)
15353 /*! PERIPHID - PERIPHID */
15354 #define MTBDWT_PERIPHID7_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID7_PERIPHID_SHIFT)) & MTBDWT_PERIPHID7_PERIPHID_MASK)
15355 /*! @} */
15356 
15357 /*! @name PERIPHID0 - Peripheral ID Register */
15358 /*! @{ */
15359 
15360 #define MTBDWT_PERIPHID0_PERIPHID_MASK           (0xFFFFFFFFU)
15361 #define MTBDWT_PERIPHID0_PERIPHID_SHIFT          (0U)
15362 /*! PERIPHID - PERIPHID */
15363 #define MTBDWT_PERIPHID0_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID0_PERIPHID_SHIFT)) & MTBDWT_PERIPHID0_PERIPHID_MASK)
15364 /*! @} */
15365 
15366 /*! @name PERIPHID1 - Peripheral ID Register */
15367 /*! @{ */
15368 
15369 #define MTBDWT_PERIPHID1_PERIPHID_MASK           (0xFFFFFFFFU)
15370 #define MTBDWT_PERIPHID1_PERIPHID_SHIFT          (0U)
15371 /*! PERIPHID - PERIPHID */
15372 #define MTBDWT_PERIPHID1_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID1_PERIPHID_SHIFT)) & MTBDWT_PERIPHID1_PERIPHID_MASK)
15373 /*! @} */
15374 
15375 /*! @name PERIPHID2 - Peripheral ID Register */
15376 /*! @{ */
15377 
15378 #define MTBDWT_PERIPHID2_PERIPHID_MASK           (0xFFFFFFFFU)
15379 #define MTBDWT_PERIPHID2_PERIPHID_SHIFT          (0U)
15380 /*! PERIPHID - PERIPHID */
15381 #define MTBDWT_PERIPHID2_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID2_PERIPHID_SHIFT)) & MTBDWT_PERIPHID2_PERIPHID_MASK)
15382 /*! @} */
15383 
15384 /*! @name PERIPHID3 - Peripheral ID Register */
15385 /*! @{ */
15386 
15387 #define MTBDWT_PERIPHID3_PERIPHID_MASK           (0xFFFFFFFFU)
15388 #define MTBDWT_PERIPHID3_PERIPHID_SHIFT          (0U)
15389 /*! PERIPHID - PERIPHID */
15390 #define MTBDWT_PERIPHID3_PERIPHID(x)             (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID3_PERIPHID_SHIFT)) & MTBDWT_PERIPHID3_PERIPHID_MASK)
15391 /*! @} */
15392 
15393 /*! @name COMPID - Component ID Register */
15394 /*! @{ */
15395 
15396 #define MTBDWT_COMPID_COMPID_MASK                (0xFFFFFFFFU)
15397 #define MTBDWT_COMPID_COMPID_SHIFT               (0U)
15398 /*! COMPID - Component ID */
15399 #define MTBDWT_COMPID_COMPID(x)                  (((uint32_t)(((uint32_t)(x)) << MTBDWT_COMPID_COMPID_SHIFT)) & MTBDWT_COMPID_COMPID_MASK)
15400 /*! @} */
15401 
15402 /* The count of MTBDWT_COMPID */
15403 #define MTBDWT_COMPID_COUNT                      (4U)
15404 
15405 
15406 /*!
15407  * @}
15408  */ /* end of group MTBDWT_Register_Masks */
15409 
15410 
15411 /* MTBDWT - Peripheral instance base addresses */
15412 /** Peripheral MTBDWT base address */
15413 #define MTBDWT_BASE                              (0xF0001000u)
15414 /** Peripheral MTBDWT base pointer */
15415 #define MTBDWT                                   ((MTBDWT_Type *)MTBDWT_BASE)
15416 /** Array initializer of MTBDWT peripheral base addresses */
15417 #define MTBDWT_BASE_ADDRS                        { MTBDWT_BASE }
15418 /** Array initializer of MTBDWT peripheral base pointers */
15419 #define MTBDWT_BASE_PTRS                         { MTBDWT }
15420 
15421 /*!
15422  * @}
15423  */ /* end of group MTBDWT_Peripheral_Access_Layer */
15424 
15425 /*!
15426  * @brief Core boot mode.
15427  */
15428 typedef enum _mu_core_boot_mode
15429 {
15430     kMU_CoreBootFromPflashBase = 0x00U, /*!< Boot from pflash base.  */
15431     kMU_CoreBootFromCM4RamBase = 0x02U, /*!< Boot from CM4 RAM base. */
15432 } mu_core_boot_mode_t;
15433 /*!
15434  * @brief Power mode on the other side definition.
15435  */
15436 typedef enum _mu_power_mode
15437 {
15438     kMU_PowerModeRun = 0x00U,  /*!< Run mode.           */
15439     kMU_PowerModeCoo = 0x01U,  /*!< COO mode.           */
15440     kMU_PowerModeWait = 0x02U, /*!< WAIT mode.          */
15441     kMU_PowerModeStop = 0x03U, /*!< STOP/VLPS mode.     */
15442     kMU_PowerModeDsm = 0x04U   /*!< DSM: LLS/VLLS mode. */
15443 } mu_power_mode_t;
15444 
15445 
15446 /* ----------------------------------------------------------------------------
15447    -- MU Peripheral Access Layer
15448    ---------------------------------------------------------------------------- */
15449 
15450 /*!
15451  * @addtogroup MU_Peripheral_Access_Layer MU Peripheral Access Layer
15452  * @{
15453  */
15454 
15455 /** MU - Register Layout Typedef */
15456 typedef struct {
15457   __I  uint32_t VER;                               /**< Version ID Register, offset: 0x0 */
15458   __I  uint32_t PAR;                               /**< Parameter Register, offset: 0x4 */
15459        uint8_t RESERVED_0[24];
15460   __IO uint32_t TR[4];                             /**< Transmit Register, array offset: 0x20, array step: 0x4 */
15461        uint8_t RESERVED_1[16];
15462   __I  uint32_t RR[4];                             /**< Receive Register, array offset: 0x40, array step: 0x4 */
15463        uint8_t RESERVED_2[16];
15464   __IO uint32_t SR;                                /**< Status Register, offset: 0x60 */
15465   __IO uint32_t CR;                                /**< Control Register, offset: 0x64 */
15466   __IO uint32_t CCR;                               /**< Core Control Register, offset: 0x68 */
15467 } MU_Type;
15468 
15469 /* ----------------------------------------------------------------------------
15470    -- MU Register Masks
15471    ---------------------------------------------------------------------------- */
15472 
15473 /*!
15474  * @addtogroup MU_Register_Masks MU Register Masks
15475  * @{
15476  */
15477 
15478 /*! @name VER - Version ID Register */
15479 /*! @{ */
15480 
15481 #define MU_VER_FEATURE_MASK                      (0xFFFFU)
15482 #define MU_VER_FEATURE_SHIFT                     (0U)
15483 /*! FEATURE - Feature Specification Number
15484  *  0b000000000000x1xx..Core Control and Status Registers are implemented in both MUA and MUB.
15485  *  0b000000000000xx1x..RAIP/RAIE register bits are implemented.
15486  *  0b000000000000xxx0..Standard features implemented
15487  */
15488 #define MU_VER_FEATURE(x)                        (((uint32_t)(((uint32_t)(x)) << MU_VER_FEATURE_SHIFT)) & MU_VER_FEATURE_MASK)
15489 
15490 #define MU_VER_MINOR_MASK                        (0xFF0000U)
15491 #define MU_VER_MINOR_SHIFT                       (16U)
15492 /*! MINOR - Minor Version Number */
15493 #define MU_VER_MINOR(x)                          (((uint32_t)(((uint32_t)(x)) << MU_VER_MINOR_SHIFT)) & MU_VER_MINOR_MASK)
15494 
15495 #define MU_VER_MAJOR_MASK                        (0xFF000000U)
15496 #define MU_VER_MAJOR_SHIFT                       (24U)
15497 /*! MAJOR - Major Version Number */
15498 #define MU_VER_MAJOR(x)                          (((uint32_t)(((uint32_t)(x)) << MU_VER_MAJOR_SHIFT)) & MU_VER_MAJOR_MASK)
15499 /*! @} */
15500 
15501 /*! @name PAR - Parameter Register */
15502 /*! @{ */
15503 
15504 #define MU_PAR_PARAMETER_MASK                    (0xFFFFFFFFU)
15505 #define MU_PAR_PARAMETER_SHIFT                   (0U)
15506 /*! PARAMETER - This bitfield contains the parameter settings of MUB. */
15507 #define MU_PAR_PARAMETER(x)                      (((uint32_t)(((uint32_t)(x)) << MU_PAR_PARAMETER_SHIFT)) & MU_PAR_PARAMETER_MASK)
15508 /*! @} */
15509 
15510 /*! @name TR - Transmit Register */
15511 /*! @{ */
15512 
15513 #define MU_TR_DATA_MASK                          (0xFFFFFFFFU)
15514 #define MU_TR_DATA_SHIFT                         (0U)
15515 /*! DATA - DATA */
15516 #define MU_TR_DATA(x)                            (((uint32_t)(((uint32_t)(x)) << MU_TR_DATA_SHIFT)) & MU_TR_DATA_MASK)
15517 /*! @} */
15518 
15519 /* The count of MU_TR */
15520 #define MU_TR_COUNT                              (4U)
15521 
15522 /*! @name RR - Receive Register */
15523 /*! @{ */
15524 
15525 #define MU_RR_DATA_MASK                          (0xFFFFFFFFU)
15526 #define MU_RR_DATA_SHIFT                         (0U)
15527 /*! DATA - DATA */
15528 #define MU_RR_DATA(x)                            (((uint32_t)(((uint32_t)(x)) << MU_RR_DATA_SHIFT)) & MU_RR_DATA_MASK)
15529 /*! @} */
15530 
15531 /* The count of MU_RR */
15532 #define MU_RR_COUNT                              (4U)
15533 
15534 /*! @name SR - Status Register */
15535 /*! @{ */
15536 
15537 #define MU_SR_Fn_MASK                            (0x7U)
15538 #define MU_SR_Fn_SHIFT                           (0U)
15539 /*! Fn - Fn
15540  *  0b000..Fn bit in the MUA CR register is written 0 (default).
15541  *  0b001..Fn bit in the MUA CR register is written 1.
15542  */
15543 #define MU_SR_Fn(x)                              (((uint32_t)(((uint32_t)(x)) << MU_SR_Fn_SHIFT)) & MU_SR_Fn_MASK)
15544 
15545 #define MU_SR_NMIC_MASK                          (0x8U)
15546 #define MU_SR_NMIC_SHIFT                         (3U)
15547 /*! NMIC - NMIC
15548  *  0b0..Default
15549  *  0b1..Writing "1" clears the NMI bit in the MUA CR register.
15550  */
15551 #define MU_SR_NMIC(x)                            (((uint32_t)(((uint32_t)(x)) << MU_SR_NMIC_SHIFT)) & MU_SR_NMIC_MASK)
15552 
15553 #define MU_SR_EP_MASK                            (0x10U)
15554 #define MU_SR_EP_SHIFT                           (4U)
15555 /*! EP - EP
15556  *  0b0..The MUB side event is not pending (default).
15557  *  0b1..The MUB side event is pending.
15558  */
15559 #define MU_SR_EP(x)                              (((uint32_t)(((uint32_t)(x)) << MU_SR_EP_SHIFT)) & MU_SR_EP_MASK)
15560 
15561 #define MU_SR_HRIP_MASK                          (0x80U)
15562 #define MU_SR_HRIP_SHIFT                         (7U)
15563 /*! HRIP - HRIP
15564  *  0b0..MUA didn't issue hardware reset to Processor B
15565  *  0b1..MUA had initiated a hardware reset to Processor B through HR bit.
15566  */
15567 #define MU_SR_HRIP(x)                            (((uint32_t)(((uint32_t)(x)) << MU_SR_HRIP_SHIFT)) & MU_SR_HRIP_MASK)
15568 
15569 #define MU_SR_FUP_MASK                           (0x100U)
15570 #define MU_SR_FUP_SHIFT                          (8U)
15571 /*! FUP - FUP
15572  *  0b0..No flags updated, initiated by the MUB, in progress (default)
15573  *  0b1..MUB initiated flags update, processing
15574  */
15575 #define MU_SR_FUP(x)                             (((uint32_t)(((uint32_t)(x)) << MU_SR_FUP_SHIFT)) & MU_SR_FUP_MASK)
15576 
15577 #define MU_SR_RDIP_MASK                          (0x200U)
15578 #define MU_SR_RDIP_SHIFT                         (9U)
15579 /*! RDIP - RDIP
15580  *  0b0..Processor A did not exit reset
15581  *  0b1..Processor A exited from reset
15582  */
15583 #define MU_SR_RDIP(x)                            (((uint32_t)(((uint32_t)(x)) << MU_SR_RDIP_SHIFT)) & MU_SR_RDIP_MASK)
15584 
15585 #define MU_SR_RAIP_MASK                          (0x400U)
15586 #define MU_SR_RAIP_SHIFT                         (10U)
15587 /*! RAIP - RAIP
15588  *  0b0..Processor A did not enter reset
15589  *  0b1..Processor A entered reset
15590  */
15591 #define MU_SR_RAIP(x)                            (((uint32_t)(((uint32_t)(x)) << MU_SR_RAIP_SHIFT)) & MU_SR_RAIP_MASK)
15592 
15593 #define MU_SR_MURIP_MASK                         (0x800U)
15594 #define MU_SR_MURIP_SHIFT                        (11U)
15595 /*! MURIP - MURIP
15596  *  0b0..Processor A did not issue MU reset
15597  *  0b1..Processor A issued MU reset
15598  */
15599 #define MU_SR_MURIP(x)                           (((uint32_t)(((uint32_t)(x)) << MU_SR_MURIP_SHIFT)) & MU_SR_MURIP_MASK)
15600 
15601 #define MU_SR_PM_MASK                            (0x7000U)
15602 #define MU_SR_PM_SHIFT                           (12U)
15603 /*! PM - PM
15604  *  0b000..The MUA processor is in Run Mode.
15605  *  0b001..The MUA processor is in COO Mode.
15606  *  0b010..The MUA processor is in WAIT Mode.
15607  *  0b011..The MUA processor is in STOP/VLPS Mode.
15608  *  0b100..The MUA processor is in LLS/VLLS Mode.
15609  */
15610 #define MU_SR_PM(x)                              (((uint32_t)(((uint32_t)(x)) << MU_SR_PM_SHIFT)) & MU_SR_PM_MASK)
15611 
15612 #define MU_SR_TEn_MASK                           (0xF00000U)
15613 #define MU_SR_TEn_SHIFT                          (20U)
15614 /*! TEn - TEn
15615  *  0b0000..MUB TRn register is not empty.
15616  *  0b0001..MUB TRn register is empty (default).
15617  */
15618 #define MU_SR_TEn(x)                             (((uint32_t)(((uint32_t)(x)) << MU_SR_TEn_SHIFT)) & MU_SR_TEn_MASK)
15619 
15620 #define MU_SR_RFn_MASK                           (0xF000000U)
15621 #define MU_SR_RFn_SHIFT                          (24U)
15622 /*! RFn - RFn
15623  *  0b0000..MUB RRn register is not full (default).
15624  *  0b0001..MUB RRn register has received data from MUA TRn register and is ready to be read by the MUB.
15625  */
15626 #define MU_SR_RFn(x)                             (((uint32_t)(((uint32_t)(x)) << MU_SR_RFn_SHIFT)) & MU_SR_RFn_MASK)
15627 
15628 #define MU_SR_GIPn_MASK                          (0xF0000000U)
15629 #define MU_SR_GIPn_SHIFT                         (28U)
15630 /*! GIPn - GIPn
15631  *  0b0000..MUB general purpose interrupt n is not pending. (default)
15632  *  0b0001..MUB general purpose interrupt n is pending.
15633  */
15634 #define MU_SR_GIPn(x)                            (((uint32_t)(((uint32_t)(x)) << MU_SR_GIPn_SHIFT)) & MU_SR_GIPn_MASK)
15635 /*! @} */
15636 
15637 /*! @name CR - Control Register */
15638 /*! @{ */
15639 
15640 #define MU_CR_Fn_MASK                            (0x7U)
15641 #define MU_CR_Fn_SHIFT                           (0U)
15642 /*! Fn - Fn
15643  *  0b000..Clears the Fn bit in the SR register.
15644  *  0b001..Sets the Fn bit in the SR register.
15645  */
15646 #define MU_CR_Fn(x)                              (((uint32_t)(((uint32_t)(x)) << MU_CR_Fn_SHIFT)) & MU_CR_Fn_MASK)
15647 
15648 #define MU_CR_NMI_MASK                           (0x8U)
15649 #define MU_CR_NMI_SHIFT                          (3U)
15650 /*! NMI - NMI
15651  *  0b0..Non-maskable interrupt is not issued to the Processor A by the Processor B (default).
15652  *  0b1..Non-maskable interrupt is issued to the Processor A by the Processor B.
15653  */
15654 #define MU_CR_NMI(x)                             (((uint32_t)(((uint32_t)(x)) << MU_CR_NMI_SHIFT)) & MU_CR_NMI_MASK)
15655 
15656 #define MU_CR_MUR_MASK                           (0x20U)
15657 #define MU_CR_MUR_SHIFT                          (5U)
15658 /*! MUR - MUR
15659  *  0b0..N/A. Self clearing bit (default).
15660  *  0b1..Asserts the MU reset.
15661  */
15662 #define MU_CR_MUR(x)                             (((uint32_t)(((uint32_t)(x)) << MU_CR_MUR_SHIFT)) & MU_CR_MUR_MASK)
15663 
15664 #define MU_CR_RDIE_MASK                          (0x40U)
15665 #define MU_CR_RDIE_SHIFT                         (6U)
15666 /*! RDIE - RDIE
15667  *  0b0..Disables Processor B General Purpose Interrupt 3 request due to Processor A reset de-assertion.
15668  *  0b1..Enables Processor B General Purpose Interrupt 3 request due to Processor A reset de-assertion.
15669  */
15670 #define MU_CR_RDIE(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_RDIE_SHIFT)) & MU_CR_RDIE_MASK)
15671 
15672 #define MU_CR_HRIE_MASK                          (0x80U)
15673 #define MU_CR_HRIE_SHIFT                         (7U)
15674 /*! HRIE - Processor B hardware reset interrupt enable
15675  *  0b0..Disables Processor B General Purpose Interrupt 3 request due to Processor A issued HR to Processor B.
15676  *  0b1..Enables Processor B General Purpose Interrupt 3 request due to Processor A issued HR to Processor B.
15677  */
15678 #define MU_CR_HRIE(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_HRIE_SHIFT)) & MU_CR_HRIE_MASK)
15679 
15680 #define MU_CR_MURIE_MASK                         (0x800U)
15681 #define MU_CR_MURIE_SHIFT                        (11U)
15682 /*! MURIE - MURIE
15683  *  0b0..Disables Processor B-side General Purpose Interrupt 3 request due to MU reset issued by MUA.
15684  *  0b1..Enables Processor B-side General Purpose Interrupt 3 request due to MU reset issued by MUA.
15685  */
15686 #define MU_CR_MURIE(x)                           (((uint32_t)(((uint32_t)(x)) << MU_CR_MURIE_SHIFT)) & MU_CR_MURIE_MASK)
15687 
15688 #define MU_CR_RAIE_MASK                          (0x1000U)
15689 #define MU_CR_RAIE_SHIFT                         (12U)
15690 /*! RAIE - RAIE
15691  *  0b0..Disables Processor B-side General Purpose Interrupt 3 request due to Processor A reset assertion.
15692  *  0b1..Enables Processor B-side General Purpose Interrupt 3 request due to Processor A reset assertion.
15693  */
15694 #define MU_CR_RAIE(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_RAIE_SHIFT)) & MU_CR_RAIE_MASK)
15695 
15696 #define MU_CR_GIRn_MASK                          (0xF0000U)
15697 #define MU_CR_GIRn_SHIFT                         (16U)
15698 /*! GIRn - GIRn
15699  *  0b0000..MUB General Interrupt n is not requested to the MUA (default).
15700  *  0b0001..MUB General Interrupt n is requested to the MUA.
15701  */
15702 #define MU_CR_GIRn(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_GIRn_SHIFT)) & MU_CR_GIRn_MASK)
15703 
15704 #define MU_CR_TIEn_MASK                          (0xF00000U)
15705 #define MU_CR_TIEn_SHIFT                         (20U)
15706 /*! TIEn - TIEn
15707  *  0b0000..Disables MUB Transmit Interrupt n. (default)
15708  *  0b0001..Enables MUB Transmit Interrupt n.
15709  */
15710 #define MU_CR_TIEn(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_TIEn_SHIFT)) & MU_CR_TIEn_MASK)
15711 
15712 #define MU_CR_RIEn_MASK                          (0xF000000U)
15713 #define MU_CR_RIEn_SHIFT                         (24U)
15714 /*! RIEn - RIEn
15715  *  0b0000..Disables MUB Receive Interrupt n. (default)
15716  *  0b0001..Enables MUB Receive Interrupt n.
15717  */
15718 #define MU_CR_RIEn(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_RIEn_SHIFT)) & MU_CR_RIEn_MASK)
15719 
15720 #define MU_CR_GIEn_MASK                          (0xF0000000U)
15721 #define MU_CR_GIEn_SHIFT                         (28U)
15722 /*! GIEn - GIEn
15723  *  0b0000..Disables MUB General Interrupt n. (default)
15724  *  0b0001..Enables MUB General Interrupt n.
15725  */
15726 #define MU_CR_GIEn(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CR_GIEn_SHIFT)) & MU_CR_GIEn_MASK)
15727 /*! @} */
15728 
15729 /*! @name CCR - Core Control Register */
15730 /*! @{ */
15731 
15732 #define MU_CCR_HR_MASK                           (0x1U)
15733 #define MU_CCR_HR_SHIFT                          (0U)
15734 /*! HR - HR
15735  *  0b0..De-assert Hardware reset to the Processor A. (default)
15736  *  0b1..Assert Hardware reset to the Processor A.
15737  */
15738 #define MU_CCR_HR(x)                             (((uint32_t)(((uint32_t)(x)) << MU_CCR_HR_SHIFT)) & MU_CCR_HR_MASK)
15739 
15740 #define MU_CCR_HRM_MASK                          (0x2U)
15741 #define MU_CCR_HRM_SHIFT                         (1U)
15742 /*! HRM - When set, HR bit in MUA CCR has no effect
15743  *  0b0..HR bit in MUA CCR is not masked, enables the hardware reset to the Processor B (default after hardware reset).
15744  *  0b1..HR bit in MUA CCR is masked, disables the hardware reset request to the Processor B.
15745  */
15746 #define MU_CCR_HRM(x)                            (((uint32_t)(((uint32_t)(x)) << MU_CCR_HRM_SHIFT)) & MU_CCR_HRM_MASK)
15747 
15748 #define MU_CCR_RSTH_MASK                         (0x4U)
15749 #define MU_CCR_RSTH_SHIFT                        (2U)
15750 /*! RSTH - Processor A Reset Hold
15751  *  0b0..Release Processor A from reset
15752  *  0b1..Hold Processor A in reset
15753  */
15754 #define MU_CCR_RSTH(x)                           (((uint32_t)(((uint32_t)(x)) << MU_CCR_RSTH_SHIFT)) & MU_CCR_RSTH_MASK)
15755 
15756 #define MU_CCR_CLKE_MASK                         (0x8U)
15757 #define MU_CCR_CLKE_SHIFT                        (3U)
15758 /*! CLKE - MUA clock enable
15759  *  0b0..MUA platform clock gated when MUA-side enters a stop mode.
15760  *  0b1..MUA platform clock kept running after MUA-side enters a stop mode, until MUB also enters a stop mode.
15761  */
15762 #define MU_CCR_CLKE(x)                           (((uint32_t)(((uint32_t)(x)) << MU_CCR_CLKE_SHIFT)) & MU_CCR_CLKE_MASK)
15763 
15764 #define MU_CCR_BOOT_MASK                         (0x30U)
15765 #define MU_CCR_BOOT_SHIFT                        (4U)
15766 /*! BOOT - Slave Processor A Boot Config.
15767  *  0b00..Boot from Pflash base
15768  *  0b01..Reserved
15769  *  0b10..Boot from CM4 RAM base
15770  *  0b11..Reserved
15771  */
15772 #define MU_CCR_BOOT(x)                           (((uint32_t)(((uint32_t)(x)) << MU_CCR_BOOT_SHIFT)) & MU_CCR_BOOT_MASK)
15773 /*! @} */
15774 
15775 
15776 /*!
15777  * @}
15778  */ /* end of group MU_Register_Masks */
15779 
15780 
15781 /* MU - Peripheral instance base addresses */
15782 /** Peripheral MUB base address */
15783 #define MUB_BASE                                 (0x41024000u)
15784 /** Peripheral MUB base pointer */
15785 #define MUB                                      ((MU_Type *)MUB_BASE)
15786 /** Array initializer of MU peripheral base addresses */
15787 #define MU_BASE_ADDRS                            { MUB_BASE }
15788 /** Array initializer of MU peripheral base pointers */
15789 #define MU_BASE_PTRS                             { MUB }
15790 /** Interrupt vectors for the MU peripheral type */
15791 #define MU_IRQS                                  { MUB_IRQn }
15792 
15793 /*!
15794  * @}
15795  */ /* end of group MU_Peripheral_Access_Layer */
15796 
15797 
15798 /* ----------------------------------------------------------------------------
15799    -- PCC Peripheral Access Layer
15800    ---------------------------------------------------------------------------- */
15801 
15802 /*!
15803  * @addtogroup PCC_Peripheral_Access_Layer PCC Peripheral Access Layer
15804  * @{
15805  */
15806 
15807 /** PCC - Register Layout Typedef */
15808 typedef struct {
15809   __IO uint32_t CLKCFG[130];                       /**< PCC MSCM Register..PCC EXT_CLK Register, array offset: 0x0, array step: 0x4, irregular array, not all indices are valid */
15810 } PCC_Type;
15811 
15812 /* ----------------------------------------------------------------------------
15813    -- PCC Register Masks
15814    ---------------------------------------------------------------------------- */
15815 
15816 /*!
15817  * @addtogroup PCC_Register_Masks PCC Register Masks
15818  * @{
15819  */
15820 
15821 /*! @name CLKCFG - PCC MSCM Register..PCC EXT_CLK Register */
15822 /*! @{ */
15823 
15824 #define PCC_CLKCFG_PCD_MASK                      (0x7U)
15825 #define PCC_CLKCFG_PCD_SHIFT                     (0U)
15826 /*! PCD - Peripheral Clock Divider Select
15827  *  0b000..Divide by 1.
15828  *  0b001..Divide by 2.
15829  *  0b010..Divide by 3.
15830  *  0b011..Divide by 4.
15831  *  0b100..Divide by 5.
15832  *  0b101..Divide by 6.
15833  *  0b110..Divide by 7.
15834  *  0b111..Divide by 8.
15835  */
15836 #define PCC_CLKCFG_PCD(x)                        (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PCD_SHIFT)) & PCC_CLKCFG_PCD_MASK)
15837 
15838 #define PCC_CLKCFG_FRAC_MASK                     (0x8U)
15839 #define PCC_CLKCFG_FRAC_SHIFT                    (3U)
15840 /*! FRAC - Peripheral Clock Divider Fraction
15841  *  0b0..Fractional value is 0.
15842  *  0b1..Fractional value is 1.
15843  */
15844 #define PCC_CLKCFG_FRAC(x)                       (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_FRAC_SHIFT)) & PCC_CLKCFG_FRAC_MASK)
15845 
15846 #define PCC_CLKCFG_PCS_MASK                      (0x7000000U)
15847 #define PCC_CLKCFG_PCS_SHIFT                     (24U)
15848 /*! PCS - Peripheral Clock Source Select
15849  *  0b000..Clock is off. An external clock can be enabled for this peripheral.
15850  *  0b001..Clock option 1
15851  *  0b010..Clock option 2
15852  *  0b011..Clock option 3
15853  *  0b100..Clock option 4
15854  *  0b101..Clock option 5
15855  *  0b110..Clock option 6
15856  *  0b111..Clock option 7
15857  */
15858 #define PCC_CLKCFG_PCS(x)                        (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PCS_SHIFT)) & PCC_CLKCFG_PCS_MASK)
15859 
15860 #define PCC_CLKCFG_INUSE_MASK                    (0x20000000U)
15861 #define PCC_CLKCFG_INUSE_SHIFT                   (29U)
15862 /*! INUSE - In use flag
15863  *  0b0..Peripheral is not being used.
15864  *  0b1..Peripheral is being used. Software cannot modify the existing clocking configuration.
15865  */
15866 #define PCC_CLKCFG_INUSE(x)                      (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_INUSE_SHIFT)) & PCC_CLKCFG_INUSE_MASK)
15867 
15868 #define PCC_CLKCFG_CGC_MASK                      (0x40000000U)
15869 #define PCC_CLKCFG_CGC_SHIFT                     (30U)
15870 /*! CGC - Clock Gate Control
15871  *  0b0..Clock disabled
15872  *  0b1..Clock enabled. The current clock selection and divider options are locked.
15873  */
15874 #define PCC_CLKCFG_CGC(x)                        (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_CGC_SHIFT)) & PCC_CLKCFG_CGC_MASK)
15875 
15876 #define PCC_CLKCFG_PR_MASK                       (0x80000000U)
15877 #define PCC_CLKCFG_PR_SHIFT                      (31U)
15878 /*! PR - Present
15879  *  0b0..Peripheral is not present.
15880  *  0b1..Peripheral is present.
15881  */
15882 #define PCC_CLKCFG_PR(x)                         (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PR_SHIFT)) & PCC_CLKCFG_PR_MASK)
15883 /*! @} */
15884 
15885 /* The count of PCC_CLKCFG */
15886 #define PCC_CLKCFG_COUNT                         (130U)
15887 
15888 
15889 /*!
15890  * @}
15891  */ /* end of group PCC_Register_Masks */
15892 
15893 
15894 /* PCC - Peripheral instance base addresses */
15895 /** Peripheral PCC0 base address */
15896 #define PCC0_BASE                                (0x4002B000u)
15897 /** Peripheral PCC0 base pointer */
15898 #define PCC0                                     ((PCC_Type *)PCC0_BASE)
15899 /** Peripheral PCC1 base address */
15900 #define PCC1_BASE                                (0x41027000u)
15901 /** Peripheral PCC1 base pointer */
15902 #define PCC1                                     ((PCC_Type *)PCC1_BASE)
15903 /** Array initializer of PCC peripheral base addresses */
15904 #define PCC_BASE_ADDRS                           { PCC0_BASE, PCC1_BASE }
15905 /** Array initializer of PCC peripheral base pointers */
15906 #define PCC_BASE_PTRS                            { PCC0, PCC1 }
15907 
15908 /*!
15909  * @}
15910  */ /* end of group PCC_Peripheral_Access_Layer */
15911 
15912 
15913 /* ----------------------------------------------------------------------------
15914    -- PORT Peripheral Access Layer
15915    ---------------------------------------------------------------------------- */
15916 
15917 /*!
15918  * @addtogroup PORT_Peripheral_Access_Layer PORT Peripheral Access Layer
15919  * @{
15920  */
15921 
15922 /** PORT - Register Layout Typedef */
15923 typedef struct {
15924   __IO uint32_t PCR[32];                           /**< Pin Control Register 0..Pin Control Register 31, array offset: 0x0, array step: 0x4, irregular array, not all indices are valid */
15925   __O  uint32_t GPCLR;                             /**< Global Pin Control Low Register, offset: 0x80 */
15926   __O  uint32_t GPCHR;                             /**< Global Pin Control High Register, offset: 0x84 */
15927   __O  uint32_t GICLR;                             /**< Global Interrupt Control Low Register, offset: 0x88 */
15928   __O  uint32_t GICHR;                             /**< Global Interrupt Control High Register, offset: 0x8C */
15929        uint8_t RESERVED_0[16];
15930   __IO uint32_t ISFR;                              /**< Interrupt Status Flag Register, offset: 0xA0 */
15931        uint8_t RESERVED_1[28];
15932   __IO uint32_t DFER;                              /**< Digital Filter Enable Register, offset: 0xC0, available only on: PORTD (missing on PORTA, PORTB, PORTC, PORTE) */
15933   __IO uint32_t DFCR;                              /**< Digital Filter Clock Register, offset: 0xC4, available only on: PORTD (missing on PORTA, PORTB, PORTC, PORTE) */
15934   __IO uint32_t DFWR;                              /**< Digital Filter Width Register, offset: 0xC8, available only on: PORTD (missing on PORTA, PORTB, PORTC, PORTE) */
15935 } PORT_Type;
15936 
15937 /* ----------------------------------------------------------------------------
15938    -- PORT Register Masks
15939    ---------------------------------------------------------------------------- */
15940 
15941 /*!
15942  * @addtogroup PORT_Register_Masks PORT Register Masks
15943  * @{
15944  */
15945 
15946 /*! @name PCR - Pin Control Register 0..Pin Control Register 31 */
15947 /*! @{ */
15948 
15949 #define PORT_PCR_PS_MASK                         (0x1U)
15950 #define PORT_PCR_PS_SHIFT                        (0U)
15951 /*! PS - Pull Select
15952  *  0b0..Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set.
15953  *  0b1..Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set.
15954  */
15955 #define PORT_PCR_PS(x)                           (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PS_SHIFT)) & PORT_PCR_PS_MASK)
15956 
15957 #define PORT_PCR_PE_MASK                         (0x2U)
15958 #define PORT_PCR_PE_SHIFT                        (1U)
15959 /*! PE - Pull Enable
15960  *  0b0..Internal pull resistor is not enabled on the corresponding pin.
15961  *  0b1..Internal pull resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
15962  */
15963 #define PORT_PCR_PE(x)                           (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PE_SHIFT)) & PORT_PCR_PE_MASK)
15964 
15965 #define PORT_PCR_SRE_MASK                        (0x4U)
15966 #define PORT_PCR_SRE_SHIFT                       (2U)
15967 /*! SRE - Slew Rate Enable
15968  *  0b0..Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
15969  *  0b1..Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
15970  */
15971 #define PORT_PCR_SRE(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_SRE_SHIFT)) & PORT_PCR_SRE_MASK)
15972 
15973 #define PORT_PCR_PFE_MASK                        (0x10U)
15974 #define PORT_PCR_PFE_SHIFT                       (4U)
15975 /*! PFE - Passive Filter Enable
15976  *  0b0..Passive input filter is disabled on the corresponding pin.
15977  *  0b1..Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input.
15978  *       Refer to the device data sheet for filter characteristics.
15979  */
15980 #define PORT_PCR_PFE(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PFE_SHIFT)) & PORT_PCR_PFE_MASK)
15981 
15982 #define PORT_PCR_ODE_MASK                        (0x20U)
15983 #define PORT_PCR_ODE_SHIFT                       (5U)
15984 /*! ODE - Open Drain Enable
15985  *  0b0..Open drain output is disabled on the corresponding pin.
15986  *  0b1..Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output.
15987  */
15988 #define PORT_PCR_ODE(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ODE_SHIFT)) & PORT_PCR_ODE_MASK)
15989 
15990 #define PORT_PCR_DSE_MASK                        (0x40U)
15991 #define PORT_PCR_DSE_SHIFT                       (6U)
15992 /*! DSE - Drive Strength Enable
15993  *  0b0..Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
15994  *  0b1..High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
15995  */
15996 #define PORT_PCR_DSE(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_DSE_SHIFT)) & PORT_PCR_DSE_MASK)
15997 
15998 #define PORT_PCR_MUX_MASK                        (0x700U)
15999 #define PORT_PCR_MUX_SHIFT                       (8U)
16000 /*! MUX - Pin Mux Control
16001  *  0b000..Pin disabled (Alternative 0) (analog).
16002  *  0b001..Alternative 1 (GPIO).
16003  *  0b010..Alternative 2 (chip-specific).
16004  *  0b011..Alternative 3 (chip-specific).
16005  *  0b100..Alternative 4 (chip-specific).
16006  *  0b101..Alternative 5 (chip-specific).
16007  *  0b110..Alternative 6 (chip-specific).
16008  *  0b111..Alternative 7 (chip-specific).
16009  */
16010 #define PORT_PCR_MUX(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_MUX_SHIFT)) & PORT_PCR_MUX_MASK)
16011 
16012 #define PORT_PCR_LK_MASK                         (0x8000U)
16013 #define PORT_PCR_LK_SHIFT                        (15U)
16014 /*! LK - Lock Register
16015  *  0b0..Pin Control Register is not locked.
16016  *  0b1..Pin Control Register is locked and cannot be updated until the next system reset.
16017  */
16018 #define PORT_PCR_LK(x)                           (((uint32_t)(((uint32_t)(x)) << PORT_PCR_LK_SHIFT)) & PORT_PCR_LK_MASK)
16019 
16020 #define PORT_PCR_IRQC_MASK                       (0xF0000U)
16021 #define PORT_PCR_IRQC_SHIFT                      (16U)
16022 /*! IRQC - Interrupt Configuration
16023  *  0b0000..Interrupt Status Flag (ISF) is disabled.
16024  *  0b0001..ISF flag and DMA request on rising edge.
16025  *  0b0010..ISF flag and DMA request on falling edge.
16026  *  0b0011..ISF flag and DMA request on either edge.
16027  *  0b0100..Reserved.
16028  *  0b0101..Flag sets on rising edge.
16029  *  0b0110..Flag sets on falling edge.
16030  *  0b0111..Flag sets on either edge.
16031  *  0b1000..ISF flag and Interrupt when logic 0.
16032  *  0b1001..ISF flag and Interrupt on rising-edge.
16033  *  0b1010..ISF flag and Interrupt on falling-edge.
16034  *  0b1011..ISF flag and Interrupt on either edge.
16035  *  0b1100..ISF flag and Interrupt when logic 1.
16036  *  0b1101..Enable active high trigger output, flag is disabled. [The trigger output goes to the trigger mux,
16037  *          which allows pins to trigger other peripherals (configurable polarity; 1 pin per port; if multiple pins are
16038  *          configured, then they are ORed together to create the trigger)]
16039  *  0b1110..Enable active low trigger output, flag is disabled.
16040  *  0b1111..Reserved.
16041  */
16042 #define PORT_PCR_IRQC(x)                         (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK)
16043 
16044 #define PORT_PCR_ISF_MASK                        (0x1000000U)
16045 #define PORT_PCR_ISF_SHIFT                       (24U)
16046 /*! ISF - Interrupt Status Flag
16047  *  0b0..Configured interrupt is not detected.
16048  *  0b1..Configured interrupt is detected. If the pin is configured to generate a DMA request, then the
16049  *       corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the
16050  *       flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive
16051  *       interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
16052  */
16053 #define PORT_PCR_ISF(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ISF_SHIFT)) & PORT_PCR_ISF_MASK)
16054 /*! @} */
16055 
16056 /* The count of PORT_PCR */
16057 #define PORT_PCR_COUNT                           (32U)
16058 
16059 /*! @name GPCLR - Global Pin Control Low Register */
16060 /*! @{ */
16061 
16062 #define PORT_GPCLR_GPWD_MASK                     (0xFFFFU)
16063 #define PORT_GPCLR_GPWD_SHIFT                    (0U)
16064 /*! GPWD - Global Pin Write Data */
16065 #define PORT_GPCLR_GPWD(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWD_SHIFT)) & PORT_GPCLR_GPWD_MASK)
16066 
16067 #define PORT_GPCLR_GPWE_MASK                     (0xFFFF0000U)
16068 #define PORT_GPCLR_GPWE_SHIFT                    (16U)
16069 /*! GPWE - Global Pin Write Enable */
16070 #define PORT_GPCLR_GPWE(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWE_SHIFT)) & PORT_GPCLR_GPWE_MASK)
16071 /*! @} */
16072 
16073 /*! @name GPCHR - Global Pin Control High Register */
16074 /*! @{ */
16075 
16076 #define PORT_GPCHR_GPWD_MASK                     (0xFFFFU)
16077 #define PORT_GPCHR_GPWD_SHIFT                    (0U)
16078 /*! GPWD - Global Pin Write Data */
16079 #define PORT_GPCHR_GPWD(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWD_SHIFT)) & PORT_GPCHR_GPWD_MASK)
16080 
16081 #define PORT_GPCHR_GPWE_MASK                     (0xFFFF0000U)
16082 #define PORT_GPCHR_GPWE_SHIFT                    (16U)
16083 /*! GPWE - Global Pin Write Enable */
16084 #define PORT_GPCHR_GPWE(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWE_SHIFT)) & PORT_GPCHR_GPWE_MASK)
16085 /*! @} */
16086 
16087 /*! @name GICLR - Global Interrupt Control Low Register */
16088 /*! @{ */
16089 
16090 #define PORT_GICLR_GIWE_MASK                     (0xFFFFU)
16091 #define PORT_GICLR_GIWE_SHIFT                    (0U)
16092 /*! GIWE - Global Interrupt Write Enable */
16093 #define PORT_GICLR_GIWE(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GICLR_GIWE_SHIFT)) & PORT_GICLR_GIWE_MASK)
16094 
16095 #define PORT_GICLR_GIWD_MASK                     (0xFFFF0000U)
16096 #define PORT_GICLR_GIWD_SHIFT                    (16U)
16097 /*! GIWD - Global Interrupt Write Data */
16098 #define PORT_GICLR_GIWD(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GICLR_GIWD_SHIFT)) & PORT_GICLR_GIWD_MASK)
16099 /*! @} */
16100 
16101 /*! @name GICHR - Global Interrupt Control High Register */
16102 /*! @{ */
16103 
16104 #define PORT_GICHR_GIWE_MASK                     (0xFFFFU)
16105 #define PORT_GICHR_GIWE_SHIFT                    (0U)
16106 /*! GIWE - Global Interrupt Write Enable */
16107 #define PORT_GICHR_GIWE(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GICHR_GIWE_SHIFT)) & PORT_GICHR_GIWE_MASK)
16108 
16109 #define PORT_GICHR_GIWD_MASK                     (0xFFFF0000U)
16110 #define PORT_GICHR_GIWD_SHIFT                    (16U)
16111 /*! GIWD - Global Interrupt Write Data */
16112 #define PORT_GICHR_GIWD(x)                       (((uint32_t)(((uint32_t)(x)) << PORT_GICHR_GIWD_SHIFT)) & PORT_GICHR_GIWD_MASK)
16113 /*! @} */
16114 
16115 /*! @name ISFR - Interrupt Status Flag Register */
16116 /*! @{ */
16117 
16118 #define PORT_ISFR_ISF_MASK                       (0xFFFFFFFFU)
16119 #define PORT_ISFR_ISF_SHIFT                      (0U)
16120 /*! ISF - Interrupt Status Flag */
16121 #define PORT_ISFR_ISF(x)                         (((uint32_t)(((uint32_t)(x)) << PORT_ISFR_ISF_SHIFT)) & PORT_ISFR_ISF_MASK)
16122 /*! @} */
16123 
16124 /*! @name DFER - Digital Filter Enable Register */
16125 /*! @{ */
16126 
16127 #define PORT_DFER_DFE_MASK                       (0xFFFFFFFFU)
16128 #define PORT_DFER_DFE_SHIFT                      (0U)
16129 /*! DFE - Digital Filter Enable */
16130 #define PORT_DFER_DFE(x)                         (((uint32_t)(((uint32_t)(x)) << PORT_DFER_DFE_SHIFT)) & PORT_DFER_DFE_MASK)
16131 /*! @} */
16132 
16133 /*! @name DFCR - Digital Filter Clock Register */
16134 /*! @{ */
16135 
16136 #define PORT_DFCR_CS_MASK                        (0x1U)
16137 #define PORT_DFCR_CS_SHIFT                       (0U)
16138 /*! CS - Clock Source
16139  *  0b0..Digital filters are clocked by the bus clock.
16140  *  0b1..Digital filters are clocked by the 8 clock.
16141  */
16142 #define PORT_DFCR_CS(x)                          (((uint32_t)(((uint32_t)(x)) << PORT_DFCR_CS_SHIFT)) & PORT_DFCR_CS_MASK)
16143 /*! @} */
16144 
16145 /*! @name DFWR - Digital Filter Width Register */
16146 /*! @{ */
16147 
16148 #define PORT_DFWR_FILT_MASK                      (0x1FU)
16149 #define PORT_DFWR_FILT_SHIFT                     (0U)
16150 /*! FILT - Filter Length */
16151 #define PORT_DFWR_FILT(x)                        (((uint32_t)(((uint32_t)(x)) << PORT_DFWR_FILT_SHIFT)) & PORT_DFWR_FILT_MASK)
16152 /*! @} */
16153 
16154 
16155 /*!
16156  * @}
16157  */ /* end of group PORT_Register_Masks */
16158 
16159 
16160 /* PORT - Peripheral instance base addresses */
16161 /** Peripheral PORTA base address */
16162 #define PORTA_BASE                               (0x40046000u)
16163 /** Peripheral PORTA base pointer */
16164 #define PORTA                                    ((PORT_Type *)PORTA_BASE)
16165 /** Peripheral PORTB base address */
16166 #define PORTB_BASE                               (0x40047000u)
16167 /** Peripheral PORTB base pointer */
16168 #define PORTB                                    ((PORT_Type *)PORTB_BASE)
16169 /** Peripheral PORTC base address */
16170 #define PORTC_BASE                               (0x40048000u)
16171 /** Peripheral PORTC base pointer */
16172 #define PORTC                                    ((PORT_Type *)PORTC_BASE)
16173 /** Peripheral PORTD base address */
16174 #define PORTD_BASE                               (0x40049000u)
16175 /** Peripheral PORTD base pointer */
16176 #define PORTD                                    ((PORT_Type *)PORTD_BASE)
16177 /** Peripheral PORTE base address */
16178 #define PORTE_BASE                               (0x41037000u)
16179 /** Peripheral PORTE base pointer */
16180 #define PORTE                                    ((PORT_Type *)PORTE_BASE)
16181 /** Array initializer of PORT peripheral base addresses */
16182 #define PORT_BASE_ADDRS                          { PORTA_BASE, PORTB_BASE, PORTC_BASE, PORTD_BASE, PORTE_BASE }
16183 /** Array initializer of PORT peripheral base pointers */
16184 #define PORT_BASE_PTRS                           { PORTA, PORTB, PORTC, PORTD, PORTE }
16185 /** Interrupt vectors for the PORT peripheral type */
16186 #define PORT_IRQS                                { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn }
16187 
16188 /*!
16189  * @}
16190  */ /* end of group PORT_Peripheral_Access_Layer */
16191 
16192 
16193 /* ----------------------------------------------------------------------------
16194    -- ROM Peripheral Access Layer
16195    ---------------------------------------------------------------------------- */
16196 
16197 /*!
16198  * @addtogroup ROM_Peripheral_Access_Layer ROM Peripheral Access Layer
16199  * @{
16200  */
16201 
16202 /** ROM - Register Layout Typedef */
16203 typedef struct {
16204   __I  uint32_t ENTRY[4];                          /**< Entry, array offset: 0x0, array step: 0x4 */
16205   __I  uint32_t TABLEMARK;                         /**< End of Table Marker Register, offset: 0x10 */
16206        uint8_t RESERVED_0[4024];
16207   __I  uint32_t SYSACCESS;                         /**< System Access Register, offset: 0xFCC */
16208   __I  uint32_t PERIPHID4;                         /**< Peripheral ID Register, offset: 0xFD0 */
16209   __I  uint32_t PERIPHID5;                         /**< Peripheral ID Register, offset: 0xFD4 */
16210   __I  uint32_t PERIPHID6;                         /**< Peripheral ID Register, offset: 0xFD8 */
16211   __I  uint32_t PERIPHID7;                         /**< Peripheral ID Register, offset: 0xFDC */
16212   __I  uint32_t PERIPHID0;                         /**< Peripheral ID Register, offset: 0xFE0 */
16213   __I  uint32_t PERIPHID1;                         /**< Peripheral ID Register, offset: 0xFE4 */
16214   __I  uint32_t PERIPHID2;                         /**< Peripheral ID Register, offset: 0xFE8 */
16215   __I  uint32_t PERIPHID3;                         /**< Peripheral ID Register, offset: 0xFEC */
16216   __I  uint32_t COMPID[4];                         /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */
16217 } ROM_Type;
16218 
16219 /* ----------------------------------------------------------------------------
16220    -- ROM Register Masks
16221    ---------------------------------------------------------------------------- */
16222 
16223 /*!
16224  * @addtogroup ROM_Register_Masks ROM Register Masks
16225  * @{
16226  */
16227 
16228 /*! @name ENTRY - Entry */
16229 /*! @{ */
16230 
16231 #define ROM_ENTRY_ENTRY_MASK                     (0xFFFFFFFFU)
16232 #define ROM_ENTRY_ENTRY_SHIFT                    (0U)
16233 /*! ENTRY - ENTRY */
16234 #define ROM_ENTRY_ENTRY(x)                       (((uint32_t)(((uint32_t)(x)) << ROM_ENTRY_ENTRY_SHIFT)) & ROM_ENTRY_ENTRY_MASK)
16235 /*! @} */
16236 
16237 /* The count of ROM_ENTRY */
16238 #define ROM_ENTRY_COUNT                          (4U)
16239 
16240 /*! @name TABLEMARK - End of Table Marker Register */
16241 /*! @{ */
16242 
16243 #define ROM_TABLEMARK_MARK_MASK                  (0xFFFFFFFFU)
16244 #define ROM_TABLEMARK_MARK_SHIFT                 (0U)
16245 /*! MARK - MARK */
16246 #define ROM_TABLEMARK_MARK(x)                    (((uint32_t)(((uint32_t)(x)) << ROM_TABLEMARK_MARK_SHIFT)) & ROM_TABLEMARK_MARK_MASK)
16247 /*! @} */
16248 
16249 /*! @name SYSACCESS - System Access Register */
16250 /*! @{ */
16251 
16252 #define ROM_SYSACCESS_SYSACCESS_MASK             (0xFFFFFFFFU)
16253 #define ROM_SYSACCESS_SYSACCESS_SHIFT            (0U)
16254 /*! SYSACCESS - SYSACCESS */
16255 #define ROM_SYSACCESS_SYSACCESS(x)               (((uint32_t)(((uint32_t)(x)) << ROM_SYSACCESS_SYSACCESS_SHIFT)) & ROM_SYSACCESS_SYSACCESS_MASK)
16256 /*! @} */
16257 
16258 /*! @name PERIPHID4 - Peripheral ID Register */
16259 /*! @{ */
16260 
16261 #define ROM_PERIPHID4_PERIPHID_MASK              (0xFFFFFFFFU)
16262 #define ROM_PERIPHID4_PERIPHID_SHIFT             (0U)
16263 /*! PERIPHID - PERIPHID */
16264 #define ROM_PERIPHID4_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID4_PERIPHID_SHIFT)) & ROM_PERIPHID4_PERIPHID_MASK)
16265 /*! @} */
16266 
16267 /*! @name PERIPHID5 - Peripheral ID Register */
16268 /*! @{ */
16269 
16270 #define ROM_PERIPHID5_PERIPHID_MASK              (0xFFFFFFFFU)
16271 #define ROM_PERIPHID5_PERIPHID_SHIFT             (0U)
16272 /*! PERIPHID - PERIPHID */
16273 #define ROM_PERIPHID5_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID5_PERIPHID_SHIFT)) & ROM_PERIPHID5_PERIPHID_MASK)
16274 /*! @} */
16275 
16276 /*! @name PERIPHID6 - Peripheral ID Register */
16277 /*! @{ */
16278 
16279 #define ROM_PERIPHID6_PERIPHID_MASK              (0xFFFFFFFFU)
16280 #define ROM_PERIPHID6_PERIPHID_SHIFT             (0U)
16281 /*! PERIPHID - PERIPHID */
16282 #define ROM_PERIPHID6_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID6_PERIPHID_SHIFT)) & ROM_PERIPHID6_PERIPHID_MASK)
16283 /*! @} */
16284 
16285 /*! @name PERIPHID7 - Peripheral ID Register */
16286 /*! @{ */
16287 
16288 #define ROM_PERIPHID7_PERIPHID_MASK              (0xFFFFFFFFU)
16289 #define ROM_PERIPHID7_PERIPHID_SHIFT             (0U)
16290 /*! PERIPHID - PERIPHID */
16291 #define ROM_PERIPHID7_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID7_PERIPHID_SHIFT)) & ROM_PERIPHID7_PERIPHID_MASK)
16292 /*! @} */
16293 
16294 /*! @name PERIPHID0 - Peripheral ID Register */
16295 /*! @{ */
16296 
16297 #define ROM_PERIPHID0_PERIPHID_MASK              (0xFFFFFFFFU)
16298 #define ROM_PERIPHID0_PERIPHID_SHIFT             (0U)
16299 /*! PERIPHID - PERIPHID */
16300 #define ROM_PERIPHID0_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID0_PERIPHID_SHIFT)) & ROM_PERIPHID0_PERIPHID_MASK)
16301 /*! @} */
16302 
16303 /*! @name PERIPHID1 - Peripheral ID Register */
16304 /*! @{ */
16305 
16306 #define ROM_PERIPHID1_PERIPHID_MASK              (0xFFFFFFFFU)
16307 #define ROM_PERIPHID1_PERIPHID_SHIFT             (0U)
16308 /*! PERIPHID - PERIPHID */
16309 #define ROM_PERIPHID1_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID1_PERIPHID_SHIFT)) & ROM_PERIPHID1_PERIPHID_MASK)
16310 /*! @} */
16311 
16312 /*! @name PERIPHID2 - Peripheral ID Register */
16313 /*! @{ */
16314 
16315 #define ROM_PERIPHID2_PERIPHID_MASK              (0xFFFFFFFFU)
16316 #define ROM_PERIPHID2_PERIPHID_SHIFT             (0U)
16317 /*! PERIPHID - PERIPHID */
16318 #define ROM_PERIPHID2_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID2_PERIPHID_SHIFT)) & ROM_PERIPHID2_PERIPHID_MASK)
16319 /*! @} */
16320 
16321 /*! @name PERIPHID3 - Peripheral ID Register */
16322 /*! @{ */
16323 
16324 #define ROM_PERIPHID3_PERIPHID_MASK              (0xFFFFFFFFU)
16325 #define ROM_PERIPHID3_PERIPHID_SHIFT             (0U)
16326 /*! PERIPHID - PERIPHID */
16327 #define ROM_PERIPHID3_PERIPHID(x)                (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID3_PERIPHID_SHIFT)) & ROM_PERIPHID3_PERIPHID_MASK)
16328 /*! @} */
16329 
16330 /*! @name COMPID - Component ID Register */
16331 /*! @{ */
16332 
16333 #define ROM_COMPID_COMPID_MASK                   (0xFFFFFFFFU)
16334 #define ROM_COMPID_COMPID_SHIFT                  (0U)
16335 /*! COMPID - Component ID */
16336 #define ROM_COMPID_COMPID(x)                     (((uint32_t)(((uint32_t)(x)) << ROM_COMPID_COMPID_SHIFT)) & ROM_COMPID_COMPID_MASK)
16337 /*! @} */
16338 
16339 /* The count of ROM_COMPID */
16340 #define ROM_COMPID_COUNT                         (4U)
16341 
16342 
16343 /*!
16344  * @}
16345  */ /* end of group ROM_Register_Masks */
16346 
16347 
16348 /* ROM - Peripheral instance base addresses */
16349 /** Peripheral ROM base address */
16350 #define ROM_BASE                                 (0xF0002000u)
16351 /** Peripheral ROM base pointer */
16352 #define ROM                                      ((ROM_Type *)ROM_BASE)
16353 /** Array initializer of ROM peripheral base addresses */
16354 #define ROM_BASE_ADDRS                           { ROM_BASE }
16355 /** Array initializer of ROM peripheral base pointers */
16356 #define ROM_BASE_PTRS                            { ROM }
16357 
16358 /*!
16359  * @}
16360  */ /* end of group ROM_Peripheral_Access_Layer */
16361 
16362 
16363 /* ----------------------------------------------------------------------------
16364    -- RTC Peripheral Access Layer
16365    ---------------------------------------------------------------------------- */
16366 
16367 /*!
16368  * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
16369  * @{
16370  */
16371 
16372 /** RTC - Register Layout Typedef */
16373 typedef struct {
16374   __IO uint32_t TSR;                               /**< RTC Time Seconds Register, offset: 0x0 */
16375   __IO uint32_t TPR;                               /**< RTC Time Prescaler Register, offset: 0x4 */
16376   __IO uint32_t TAR;                               /**< RTC Time Alarm Register, offset: 0x8 */
16377   __IO uint32_t TCR;                               /**< RTC Time Compensation Register, offset: 0xC */
16378   __IO uint32_t CR;                                /**< RTC Control Register, offset: 0x10 */
16379   __IO uint32_t SR;                                /**< RTC Status Register, offset: 0x14 */
16380   __IO uint32_t LR;                                /**< RTC Lock Register, offset: 0x18 */
16381   __IO uint32_t IER;                               /**< RTC Interrupt Enable Register, offset: 0x1C */
16382   __I  uint32_t TTSR;                              /**< RTC Tamper Time Seconds Register, offset: 0x20 */
16383   __IO uint32_t MER;                               /**< RTC Monotonic Enable Register, offset: 0x24 */
16384   __IO uint32_t MCLR;                              /**< RTC Monotonic Counter Low Register, offset: 0x28 */
16385   __IO uint32_t MCHR;                              /**< RTC Monotonic Counter High Register, offset: 0x2C */
16386        uint8_t RESERVED_0[4];
16387   __IO uint32_t TDR;                               /**< RTC Tamper Detect Register, offset: 0x34 */
16388        uint8_t RESERVED_1[4];
16389   __IO uint32_t TIR;                               /**< RTC Tamper Interrupt Register, offset: 0x3C */
16390   __IO uint32_t PCR[4];                            /**< RTC Pin Configuration Register, array offset: 0x40, array step: 0x4 */
16391        uint8_t RESERVED_2[1968];
16392   __IO uint32_t WAR;                               /**< RTC Write Access Register, offset: 0x800 */
16393   __IO uint32_t RAR;                               /**< RTC Read Access Register, offset: 0x804 */
16394 } RTC_Type;
16395 
16396 /* ----------------------------------------------------------------------------
16397    -- RTC Register Masks
16398    ---------------------------------------------------------------------------- */
16399 
16400 /*!
16401  * @addtogroup RTC_Register_Masks RTC Register Masks
16402  * @{
16403  */
16404 
16405 /*! @name TSR - RTC Time Seconds Register */
16406 /*! @{ */
16407 
16408 #define RTC_TSR_TSR_MASK                         (0xFFFFFFFFU)
16409 #define RTC_TSR_TSR_SHIFT                        (0U)
16410 /*! TSR - Time Seconds Register */
16411 #define RTC_TSR_TSR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TSR_TSR_SHIFT)) & RTC_TSR_TSR_MASK)
16412 /*! @} */
16413 
16414 /*! @name TPR - RTC Time Prescaler Register */
16415 /*! @{ */
16416 
16417 #define RTC_TPR_TPR_MASK                         (0xFFFFU)
16418 #define RTC_TPR_TPR_SHIFT                        (0U)
16419 /*! TPR - Time Prescaler Register */
16420 #define RTC_TPR_TPR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TPR_TPR_SHIFT)) & RTC_TPR_TPR_MASK)
16421 /*! @} */
16422 
16423 /*! @name TAR - RTC Time Alarm Register */
16424 /*! @{ */
16425 
16426 #define RTC_TAR_TAR_MASK                         (0xFFFFFFFFU)
16427 #define RTC_TAR_TAR_SHIFT                        (0U)
16428 /*! TAR - Time Alarm Register */
16429 #define RTC_TAR_TAR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TAR_TAR_SHIFT)) & RTC_TAR_TAR_MASK)
16430 /*! @} */
16431 
16432 /*! @name TCR - RTC Time Compensation Register */
16433 /*! @{ */
16434 
16435 #define RTC_TCR_TCR_MASK                         (0xFFU)
16436 #define RTC_TCR_TCR_SHIFT                        (0U)
16437 /*! TCR - Time Compensation Register
16438  *  0b10000000..Time Prescaler Register overflows every 32896 clock cycles.
16439  *  0b10000001..Time Prescaler Register overflows every 32895 clock cycles.
16440  *  0b11111111..Time Prescaler Register overflows every 32769 clock cycles.
16441  *  0b00000000..Time Prescaler Register overflows every 32768 clock cycles.
16442  *  0b00000001..Time Prescaler Register overflows every 32767 clock cycles.
16443  *  0b01111110..Time Prescaler Register overflows every 32642 clock cycles.
16444  *  0b01111111..Time Prescaler Register overflows every 32641 clock cycles.
16445  */
16446 #define RTC_TCR_TCR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCR_SHIFT)) & RTC_TCR_TCR_MASK)
16447 
16448 #define RTC_TCR_CIR_MASK                         (0xFF00U)
16449 #define RTC_TCR_CIR_SHIFT                        (8U)
16450 /*! CIR - Compensation Interval Register */
16451 #define RTC_TCR_CIR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIR_SHIFT)) & RTC_TCR_CIR_MASK)
16452 
16453 #define RTC_TCR_TCV_MASK                         (0xFF0000U)
16454 #define RTC_TCR_TCV_SHIFT                        (16U)
16455 /*! TCV - Time Compensation Value */
16456 #define RTC_TCR_TCV(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCV_SHIFT)) & RTC_TCR_TCV_MASK)
16457 
16458 #define RTC_TCR_CIC_MASK                         (0xFF000000U)
16459 #define RTC_TCR_CIC_SHIFT                        (24U)
16460 /*! CIC - Compensation Interval Counter */
16461 #define RTC_TCR_CIC(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIC_SHIFT)) & RTC_TCR_CIC_MASK)
16462 /*! @} */
16463 
16464 /*! @name CR - RTC Control Register */
16465 /*! @{ */
16466 
16467 #define RTC_CR_SWR_MASK                          (0x1U)
16468 #define RTC_CR_SWR_SHIFT                         (0U)
16469 /*! SWR - Software Reset
16470  *  0b0..No effect.
16471  *  0b1..Resets all RTC registers except for the SWR bit and the RTC_WAR and RTC_RAR registers . The SWR bit is
16472  *       cleared by VBAT POR and by software explicitly clearing it.
16473  */
16474 #define RTC_CR_SWR(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_SWR_SHIFT)) & RTC_CR_SWR_MASK)
16475 
16476 #define RTC_CR_WPE_MASK                          (0x2U)
16477 #define RTC_CR_WPE_SHIFT                         (1U)
16478 /*! WPE - Wakeup Pin Enable
16479  *  0b0..RTC_WAKEUP pin is disabled.
16480  *  0b1..RTC_WAKEUP pin is enabled and asserts if the RTC interrupt asserts or if the wakeup pin is forced on.
16481  */
16482 #define RTC_CR_WPE(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPE_SHIFT)) & RTC_CR_WPE_MASK)
16483 
16484 #define RTC_CR_SUP_MASK                          (0x4U)
16485 #define RTC_CR_SUP_SHIFT                         (2U)
16486 /*! SUP - Supervisor Access
16487  *  0b0..Non-supervisor mode write accesses are not supported and generate a bus error.
16488  *  0b1..Non-supervisor mode write accesses are supported.
16489  */
16490 #define RTC_CR_SUP(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_SUP_SHIFT)) & RTC_CR_SUP_MASK)
16491 
16492 #define RTC_CR_UM_MASK                           (0x8U)
16493 #define RTC_CR_UM_SHIFT                          (3U)
16494 /*! UM - Update Mode
16495  *  0b0..Registers cannot be written when locked.
16496  *  0b1..Registers can be written when locked under limited conditions.
16497  */
16498 #define RTC_CR_UM(x)                             (((uint32_t)(((uint32_t)(x)) << RTC_CR_UM_SHIFT)) & RTC_CR_UM_MASK)
16499 
16500 #define RTC_CR_WPS_MASK                          (0x10U)
16501 #define RTC_CR_WPS_SHIFT                         (4U)
16502 /*! WPS - Wakeup Pin Select
16503  *  0b0..RTC_WAKEUP pin asserts (active low, open drain) if the RTC interrupt asserts or the wakeup pin is turned on.
16504  *  0b1..RTC_WAKEUP pin outputs the RTC 32kHz clock, provided the wakeup pin is turned on and the 32kHz clock is output to other peripherals.
16505  */
16506 #define RTC_CR_WPS(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPS_SHIFT)) & RTC_CR_WPS_MASK)
16507 
16508 #define RTC_CR_CPS_MASK                          (0x20U)
16509 #define RTC_CR_CPS_SHIFT                         (5U)
16510 /*! CPS - Clock Pin Select
16511  *  0b0..The prescaler output clock (as configured by TSIC) is output on RTC_CLKOUT.
16512  *  0b1..The RTC 32.768 kHz clock is output on RTC_CLKOUT, provided it is output to other peripherals.
16513  */
16514 #define RTC_CR_CPS(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_CPS_SHIFT)) & RTC_CR_CPS_MASK)
16515 
16516 #define RTC_CR_LPOS_MASK                         (0x80U)
16517 #define RTC_CR_LPOS_SHIFT                        (7U)
16518 /*! LPOS - LPO Select
16519  *  0b0..RTC prescaler increments using 32.768 kHz clock.
16520  *  0b1..RTC prescaler increments using 1 kHz LPO, bits [4:0] of the prescaler are ignored.
16521  */
16522 #define RTC_CR_LPOS(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_LPOS_SHIFT)) & RTC_CR_LPOS_MASK)
16523 
16524 #define RTC_CR_OSCE_MASK                         (0x100U)
16525 #define RTC_CR_OSCE_SHIFT                        (8U)
16526 /*! OSCE - Oscillator Enable
16527  *  0b0..32.768 kHz oscillator is disabled.
16528  *  0b1..32.768 kHz oscillator is enabled. After setting this bit, wait the oscillator startup time before
16529  *       enabling the time counter to allow the 32.768 kHz clock time to stabilize.
16530  */
16531 #define RTC_CR_OSCE(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCE_SHIFT)) & RTC_CR_OSCE_MASK)
16532 
16533 #define RTC_CR_CLKO_MASK                         (0x200U)
16534 #define RTC_CR_CLKO_SHIFT                        (9U)
16535 /*! CLKO - Clock Output
16536  *  0b0..The 32 kHz clock is output to other peripherals.
16537  *  0b1..The 32 kHz clock is not output to other peripherals.
16538  */
16539 #define RTC_CR_CLKO(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_CLKO_SHIFT)) & RTC_CR_CLKO_MASK)
16540 
16541 #define RTC_CR_SC16P_MASK                        (0x400U)
16542 #define RTC_CR_SC16P_SHIFT                       (10U)
16543 /*! SC16P - Oscillator 16pF Load Configure
16544  *  0b0..Disable the load.
16545  *  0b1..Enable the additional load.
16546  */
16547 #define RTC_CR_SC16P(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC16P_SHIFT)) & RTC_CR_SC16P_MASK)
16548 
16549 #define RTC_CR_SC8P_MASK                         (0x800U)
16550 #define RTC_CR_SC8P_SHIFT                        (11U)
16551 /*! SC8P - Oscillator 8pF Load Configure
16552  *  0b0..Disable the load.
16553  *  0b1..Enable the additional load.
16554  */
16555 #define RTC_CR_SC8P(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC8P_SHIFT)) & RTC_CR_SC8P_MASK)
16556 
16557 #define RTC_CR_SC4P_MASK                         (0x1000U)
16558 #define RTC_CR_SC4P_SHIFT                        (12U)
16559 /*! SC4P - Oscillator 4pF Load Configure
16560  *  0b0..Disable the load.
16561  *  0b1..Enable the additional load.
16562  */
16563 #define RTC_CR_SC4P(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC4P_SHIFT)) & RTC_CR_SC4P_MASK)
16564 
16565 #define RTC_CR_SC2P_MASK                         (0x2000U)
16566 #define RTC_CR_SC2P_SHIFT                        (13U)
16567 /*! SC2P - Oscillator 2pF Load Configure
16568  *  0b0..Disable the load.
16569  *  0b1..Enable the additional load.
16570  */
16571 #define RTC_CR_SC2P(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC2P_SHIFT)) & RTC_CR_SC2P_MASK)
16572 
16573 #define RTC_CR_OSCM_MASK                         (0x8000U)
16574 #define RTC_CR_OSCM_SHIFT                        (15U)
16575 /*! OSCM - Oscillator Mode Select
16576  *  0b0..Configures the 32.768kHz crystal oscillator for robust operation supporting a wide range of crystals.
16577  *  0b1..Configures the 32.768kHz crystal oscillator for low power operation supporting a more limited range of crystals.
16578  */
16579 #define RTC_CR_OSCM(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCM_SHIFT)) & RTC_CR_OSCM_MASK)
16580 
16581 #define RTC_CR_PORS_MASK                         (0x30000U)
16582 #define RTC_CR_PORS_SHIFT                        (16U)
16583 /*! PORS - POR Select
16584  *  0b00..POR brownout enabled for 120us every 128ms.
16585  *  0b01..POR brownout enabled for 120us every 64ms.
16586  *  0b10..POR brownout enabled for 120us every 32ms.
16587  *  0b11..POR brownout always enabled.
16588  */
16589 #define RTC_CR_PORS(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_CR_PORS_SHIFT)) & RTC_CR_PORS_MASK)
16590 
16591 #define RTC_CR_CPE_MASK                          (0x3000000U)
16592 #define RTC_CR_CPE_SHIFT                         (24U)
16593 /*! CPE - Clock Pin Enable
16594  *  0b00..The RTC_CLKOUT function is disabled.
16595  *  0b01..Enable RTC_CLKOUT pin on pin 1.
16596  *  0b10..Enable RTC_CLKOUT pin on pin 2.
16597  *  0b11..Enable RTC_CLKOUT pin on pin 3.
16598  */
16599 #define RTC_CR_CPE(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_CR_CPE_SHIFT)) & RTC_CR_CPE_MASK)
16600 /*! @} */
16601 
16602 /*! @name SR - RTC Status Register */
16603 /*! @{ */
16604 
16605 #define RTC_SR_TIF_MASK                          (0x1U)
16606 #define RTC_SR_TIF_SHIFT                         (0U)
16607 /*! TIF - Time Invalid Flag
16608  *  0b0..Time is valid.
16609  *  0b1..Time is invalid and time counter is read as zero.
16610  */
16611 #define RTC_SR_TIF(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIF_SHIFT)) & RTC_SR_TIF_MASK)
16612 
16613 #define RTC_SR_TOF_MASK                          (0x2U)
16614 #define RTC_SR_TOF_SHIFT                         (1U)
16615 /*! TOF - Time Overflow Flag
16616  *  0b0..Time overflow has not occurred.
16617  *  0b1..Time overflow has occurred and time counter is read as zero.
16618  */
16619 #define RTC_SR_TOF(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_SR_TOF_SHIFT)) & RTC_SR_TOF_MASK)
16620 
16621 #define RTC_SR_TAF_MASK                          (0x4U)
16622 #define RTC_SR_TAF_SHIFT                         (2U)
16623 /*! TAF - Time Alarm Flag
16624  *  0b0..Time alarm has not occurred.
16625  *  0b1..Time alarm has occurred.
16626  */
16627 #define RTC_SR_TAF(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_SR_TAF_SHIFT)) & RTC_SR_TAF_MASK)
16628 
16629 #define RTC_SR_MOF_MASK                          (0x8U)
16630 #define RTC_SR_MOF_SHIFT                         (3U)
16631 /*! MOF - Monotonic Overflow Flag
16632  *  0b0..Monotonic counter overflow has not occurred.
16633  *  0b1..Monotonic counter overflow has occurred and monotonic counter is read as zero.
16634  */
16635 #define RTC_SR_MOF(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_SR_MOF_SHIFT)) & RTC_SR_MOF_MASK)
16636 
16637 #define RTC_SR_TCE_MASK                          (0x10U)
16638 #define RTC_SR_TCE_SHIFT                         (4U)
16639 /*! TCE - Time Counter Enable
16640  *  0b0..Time counter is disabled.
16641  *  0b1..Time counter is enabled.
16642  */
16643 #define RTC_SR_TCE(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_SR_TCE_SHIFT)) & RTC_SR_TCE_MASK)
16644 
16645 #define RTC_SR_TIDF_MASK                         (0x80U)
16646 #define RTC_SR_TIDF_SHIFT                        (7U)
16647 /*! TIDF - Tamper Interrupt Detect Flag
16648  *  0b0..Tamper interrupt has not asserted.
16649  *  0b1..Tamper interrupt has asserted.
16650  */
16651 #define RTC_SR_TIDF(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIDF_SHIFT)) & RTC_SR_TIDF_MASK)
16652 /*! @} */
16653 
16654 /*! @name LR - RTC Lock Register */
16655 /*! @{ */
16656 
16657 #define RTC_LR_TCL_MASK                          (0x8U)
16658 #define RTC_LR_TCL_SHIFT                         (3U)
16659 /*! TCL - Time Compensation Lock
16660  *  0b0..Time Compensation Register is locked and writes are ignored.
16661  *  0b1..Time Compensation Register is not locked and writes complete as normal.
16662  */
16663 #define RTC_LR_TCL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_TCL_SHIFT)) & RTC_LR_TCL_MASK)
16664 
16665 #define RTC_LR_CRL_MASK                          (0x10U)
16666 #define RTC_LR_CRL_SHIFT                         (4U)
16667 /*! CRL - Control Register Lock
16668  *  0b0..Control Register is locked and writes are ignored.
16669  *  0b1..Control Register is not locked and writes complete as normal.
16670  */
16671 #define RTC_LR_CRL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_CRL_SHIFT)) & RTC_LR_CRL_MASK)
16672 
16673 #define RTC_LR_SRL_MASK                          (0x20U)
16674 #define RTC_LR_SRL_SHIFT                         (5U)
16675 /*! SRL - Status Register Lock
16676  *  0b0..Status Register is locked and writes are ignored.
16677  *  0b1..Status Register is not locked and writes complete as normal.
16678  */
16679 #define RTC_LR_SRL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_SRL_SHIFT)) & RTC_LR_SRL_MASK)
16680 
16681 #define RTC_LR_LRL_MASK                          (0x40U)
16682 #define RTC_LR_LRL_SHIFT                         (6U)
16683 /*! LRL - Lock Register Lock
16684  *  0b0..Lock Register is locked and writes are ignored.
16685  *  0b1..Lock Register is not locked and writes complete as normal.
16686  */
16687 #define RTC_LR_LRL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_LRL_SHIFT)) & RTC_LR_LRL_MASK)
16688 
16689 #define RTC_LR_TTSL_MASK                         (0x100U)
16690 #define RTC_LR_TTSL_SHIFT                        (8U)
16691 /*! TTSL - Tamper Time Seconds Lock
16692  *  0b0..Tamper Time Seconds Register is locked and writes are ignored.
16693  *  0b1..Tamper Time Seconds Register is not locked and writes complete as normal.
16694  */
16695 #define RTC_LR_TTSL(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_LR_TTSL_SHIFT)) & RTC_LR_TTSL_MASK)
16696 
16697 #define RTC_LR_MEL_MASK                          (0x200U)
16698 #define RTC_LR_MEL_SHIFT                         (9U)
16699 /*! MEL - Monotonic Enable Lock
16700  *  0b0..Monotonic Enable Register is locked and writes are ignored.
16701  *  0b1..Monotonic Enable Register is not locked and writes complete as normal.
16702  */
16703 #define RTC_LR_MEL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_MEL_SHIFT)) & RTC_LR_MEL_MASK)
16704 
16705 #define RTC_LR_MCLL_MASK                         (0x400U)
16706 #define RTC_LR_MCLL_SHIFT                        (10U)
16707 /*! MCLL - Monotonic Counter Low Lock
16708  *  0b0..Monotonic Counter Low Register is locked and writes are ignored.
16709  *  0b1..Monotonic Counter Low Register is not locked and writes complete as normal.
16710  */
16711 #define RTC_LR_MCLL(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_LR_MCLL_SHIFT)) & RTC_LR_MCLL_MASK)
16712 
16713 #define RTC_LR_MCHL_MASK                         (0x800U)
16714 #define RTC_LR_MCHL_SHIFT                        (11U)
16715 /*! MCHL - Monotonic Counter High Lock
16716  *  0b0..Monotonic Counter High Register is locked and writes are ignored.
16717  *  0b1..Monotonic Counter High Register is not locked and writes complete as normal.
16718  */
16719 #define RTC_LR_MCHL(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_LR_MCHL_SHIFT)) & RTC_LR_MCHL_MASK)
16720 
16721 #define RTC_LR_TDL_MASK                          (0x2000U)
16722 #define RTC_LR_TDL_SHIFT                         (13U)
16723 /*! TDL - Tamper Detect Lock
16724  *  0b0..Tamper Detect Register is locked and writes are ignored.
16725  *  0b1..Tamper Detect Register is not locked and writes complete as normal.
16726  */
16727 #define RTC_LR_TDL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_TDL_SHIFT)) & RTC_LR_TDL_MASK)
16728 
16729 #define RTC_LR_TIL_MASK                          (0x8000U)
16730 #define RTC_LR_TIL_SHIFT                         (15U)
16731 /*! TIL - Tamper Interrupt Lock
16732  *  0b0..Tamper Interrupt Register is locked and writes are ignored.
16733  *  0b1..Tamper Interrupt Register is not locked and writes complete as normal.
16734  */
16735 #define RTC_LR_TIL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_TIL_SHIFT)) & RTC_LR_TIL_MASK)
16736 
16737 #define RTC_LR_PCL_MASK                          (0xF0000U)
16738 #define RTC_LR_PCL_SHIFT                         (16U)
16739 /*! PCL - Pin Configuration Lock */
16740 #define RTC_LR_PCL(x)                            (((uint32_t)(((uint32_t)(x)) << RTC_LR_PCL_SHIFT)) & RTC_LR_PCL_MASK)
16741 /*! @} */
16742 
16743 /*! @name IER - RTC Interrupt Enable Register */
16744 /*! @{ */
16745 
16746 #define RTC_IER_TIIE_MASK                        (0x1U)
16747 #define RTC_IER_TIIE_SHIFT                       (0U)
16748 /*! TIIE - Time Invalid Interrupt Enable
16749  *  0b0..Time invalid flag does not generate an interrupt.
16750  *  0b1..Time invalid flag does generate an interrupt.
16751  */
16752 #define RTC_IER_TIIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_TIIE_SHIFT)) & RTC_IER_TIIE_MASK)
16753 
16754 #define RTC_IER_TOIE_MASK                        (0x2U)
16755 #define RTC_IER_TOIE_SHIFT                       (1U)
16756 /*! TOIE - Time Overflow Interrupt Enable
16757  *  0b0..Time overflow flag does not generate an interrupt.
16758  *  0b1..Time overflow flag does generate an interrupt.
16759  */
16760 #define RTC_IER_TOIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_TOIE_SHIFT)) & RTC_IER_TOIE_MASK)
16761 
16762 #define RTC_IER_TAIE_MASK                        (0x4U)
16763 #define RTC_IER_TAIE_SHIFT                       (2U)
16764 /*! TAIE - Time Alarm Interrupt Enable
16765  *  0b0..Time alarm flag does not generate an interrupt.
16766  *  0b1..Time alarm flag does generate an interrupt.
16767  */
16768 #define RTC_IER_TAIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_TAIE_SHIFT)) & RTC_IER_TAIE_MASK)
16769 
16770 #define RTC_IER_MOIE_MASK                        (0x8U)
16771 #define RTC_IER_MOIE_SHIFT                       (3U)
16772 /*! MOIE - Monotonic Overflow Interrupt Enable
16773  *  0b0..Monotonic overflow flag does not generate an interrupt.
16774  *  0b1..Monotonic overflow flag does generate an interrupt.
16775  */
16776 #define RTC_IER_MOIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_MOIE_SHIFT)) & RTC_IER_MOIE_MASK)
16777 
16778 #define RTC_IER_TSIE_MASK                        (0x10U)
16779 #define RTC_IER_TSIE_SHIFT                       (4U)
16780 /*! TSIE - Time Seconds Interrupt Enable
16781  *  0b0..Seconds interrupt is disabled.
16782  *  0b1..Seconds interrupt is enabled.
16783  */
16784 #define RTC_IER_TSIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIE_SHIFT)) & RTC_IER_TSIE_MASK)
16785 
16786 #define RTC_IER_WPON_MASK                        (0x80U)
16787 #define RTC_IER_WPON_SHIFT                       (7U)
16788 /*! WPON - Wakeup Pin On
16789  *  0b0..No effect.
16790  *  0b1..If the RTC_WAKEUP pin is enabled, then the pin will assert.
16791  */
16792 #define RTC_IER_WPON(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_WPON_SHIFT)) & RTC_IER_WPON_MASK)
16793 
16794 #define RTC_IER_TSIC_MASK                        (0x70000U)
16795 #define RTC_IER_TSIC_SHIFT                       (16U)
16796 /*! TSIC - Timer Seconds Interrupt Configuration
16797  *  0b000..1 Hz.
16798  *  0b001..2 Hz.
16799  *  0b010..4 Hz.
16800  *  0b011..8 Hz.
16801  *  0b100..16 Hz.
16802  *  0b101..32 Hz.
16803  *  0b110..64 Hz.
16804  *  0b111..128 Hz.
16805  */
16806 #define RTC_IER_TSIC(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIC_SHIFT)) & RTC_IER_TSIC_MASK)
16807 /*! @} */
16808 
16809 /*! @name TTSR - RTC Tamper Time Seconds Register */
16810 /*! @{ */
16811 
16812 #define RTC_TTSR_TTS_MASK                        (0xFFFFFFFFU)
16813 #define RTC_TTSR_TTS_SHIFT                       (0U)
16814 /*! TTS - Tamper Time Seconds */
16815 #define RTC_TTSR_TTS(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TTSR_TTS_SHIFT)) & RTC_TTSR_TTS_MASK)
16816 /*! @} */
16817 
16818 /*! @name MER - RTC Monotonic Enable Register */
16819 /*! @{ */
16820 
16821 #define RTC_MER_MCE_MASK                         (0x10U)
16822 #define RTC_MER_MCE_SHIFT                        (4U)
16823 /*! MCE - Monotonic Counter Enable
16824  *  0b0..Writes to the monotonic counter load the counter with the value written.
16825  *  0b1..Writes to the monotonic counter increment the counter.
16826  */
16827 #define RTC_MER_MCE(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_MER_MCE_SHIFT)) & RTC_MER_MCE_MASK)
16828 /*! @} */
16829 
16830 /*! @name MCLR - RTC Monotonic Counter Low Register */
16831 /*! @{ */
16832 
16833 #define RTC_MCLR_MCL_MASK                        (0xFFFFFFFFU)
16834 #define RTC_MCLR_MCL_SHIFT                       (0U)
16835 /*! MCL - Monotonic Counter Low */
16836 #define RTC_MCLR_MCL(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_MCLR_MCL_SHIFT)) & RTC_MCLR_MCL_MASK)
16837 /*! @} */
16838 
16839 /*! @name MCHR - RTC Monotonic Counter High Register */
16840 /*! @{ */
16841 
16842 #define RTC_MCHR_MCH_MASK                        (0xFFFFFFFFU)
16843 #define RTC_MCHR_MCH_SHIFT                       (0U)
16844 /*! MCH - Monotonic Counter High */
16845 #define RTC_MCHR_MCH(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_MCHR_MCH_SHIFT)) & RTC_MCHR_MCH_MASK)
16846 /*! @} */
16847 
16848 /*! @name TDR - RTC Tamper Detect Register */
16849 /*! @{ */
16850 
16851 #define RTC_TDR_LCTF_MASK                        (0x10U)
16852 #define RTC_TDR_LCTF_SHIFT                       (4U)
16853 /*! LCTF - Loss of Clock Tamper Flag
16854  *  0b0..Tamper not detected.
16855  *  0b1..Loss of Clock tamper detected.
16856  */
16857 #define RTC_TDR_LCTF(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TDR_LCTF_SHIFT)) & RTC_TDR_LCTF_MASK)
16858 
16859 #define RTC_TDR_STF_MASK                         (0x20U)
16860 #define RTC_TDR_STF_SHIFT                        (5U)
16861 /*! STF - Security Tamper Flag
16862  *  0b0..Tamper not detected.
16863  *  0b1..Security module tamper detected.
16864  */
16865 #define RTC_TDR_STF(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TDR_STF_SHIFT)) & RTC_TDR_STF_MASK)
16866 
16867 #define RTC_TDR_FSF_MASK                         (0x40U)
16868 #define RTC_TDR_FSF_SHIFT                        (6U)
16869 /*! FSF - Flash Security Flag
16870  *  0b0..Tamper not detected.
16871  *  0b1..Flash security tamper detected.
16872  */
16873 #define RTC_TDR_FSF(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TDR_FSF_SHIFT)) & RTC_TDR_FSF_MASK)
16874 
16875 #define RTC_TDR_TMF_MASK                         (0x80U)
16876 #define RTC_TDR_TMF_SHIFT                        (7U)
16877 /*! TMF - Test Mode Flag
16878  *  0b0..Tamper not detected.
16879  *  0b1..Test mode tamper detected.
16880  */
16881 #define RTC_TDR_TMF(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TDR_TMF_SHIFT)) & RTC_TDR_TMF_MASK)
16882 
16883 #define RTC_TDR_TPF_MASK                         (0xF0000U)
16884 #define RTC_TDR_TPF_SHIFT                        (16U)
16885 /*! TPF - Tamper Pin Flag */
16886 #define RTC_TDR_TPF(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TDR_TPF_SHIFT)) & RTC_TDR_TPF_MASK)
16887 /*! @} */
16888 
16889 /*! @name TIR - RTC Tamper Interrupt Register */
16890 /*! @{ */
16891 
16892 #define RTC_TIR_LCIE_MASK                        (0x10U)
16893 #define RTC_TIR_LCIE_SHIFT                       (4U)
16894 /*! LCIE - Loss of Clock Interrupt Enable
16895  *  0b0..Interupt disabled.
16896  *  0b1..An interrupt is generated when the loss of clock flag is set.
16897  */
16898 #define RTC_TIR_LCIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TIR_LCIE_SHIFT)) & RTC_TIR_LCIE_MASK)
16899 
16900 #define RTC_TIR_SIE_MASK                         (0x20U)
16901 #define RTC_TIR_SIE_SHIFT                        (5U)
16902 /*! SIE - Security Module Interrupt Enable
16903  *  0b0..Interupt disabled.
16904  *  0b1..An interrupt is generated when the security module flag is set.
16905  */
16906 #define RTC_TIR_SIE(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_TIR_SIE_SHIFT)) & RTC_TIR_SIE_MASK)
16907 
16908 #define RTC_TIR_FSIE_MASK                        (0x40U)
16909 #define RTC_TIR_FSIE_SHIFT                       (6U)
16910 /*! FSIE - Flash Security Interrupt Enable
16911  *  0b0..Interupt disabled.
16912  *  0b1..An interrupt is generated when the flash security flag is set.
16913  */
16914 #define RTC_TIR_FSIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TIR_FSIE_SHIFT)) & RTC_TIR_FSIE_MASK)
16915 
16916 #define RTC_TIR_TMIE_MASK                        (0x80U)
16917 #define RTC_TIR_TMIE_SHIFT                       (7U)
16918 /*! TMIE - Test Mode Interrupt Enable
16919  *  0b0..Interupt disabled.
16920  *  0b1..An interrupt is generated when the test mode flag is set.
16921  */
16922 #define RTC_TIR_TMIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TIR_TMIE_SHIFT)) & RTC_TIR_TMIE_MASK)
16923 
16924 #define RTC_TIR_TPIE_MASK                        (0xF0000U)
16925 #define RTC_TIR_TPIE_SHIFT                       (16U)
16926 /*! TPIE - Tamper Pin Interrupt Enable */
16927 #define RTC_TIR_TPIE(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_TIR_TPIE_SHIFT)) & RTC_TIR_TPIE_MASK)
16928 /*! @} */
16929 
16930 /*! @name PCR - RTC Pin Configuration Register */
16931 /*! @{ */
16932 
16933 #define RTC_PCR_TPE_MASK                         (0x1000000U)
16934 #define RTC_PCR_TPE_SHIFT                        (24U)
16935 /*! TPE - Tamper Pull Enable
16936  *  0b0..Pull resistor is disabled on tamper pin.
16937  *  0b1..Pull resistor is enabled on tamper pin.
16938  */
16939 #define RTC_PCR_TPE(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPE_SHIFT)) & RTC_PCR_TPE_MASK)
16940 
16941 #define RTC_PCR_TPS_MASK                         (0x2000000U)
16942 #define RTC_PCR_TPS_SHIFT                        (25U)
16943 /*! TPS - Tamper Pull Select
16944  *  0b0..Tamper pin pull resistor direction will assert the tamper pin.
16945  *  0b1..Tamper pin pull resistor direction will negate the tamper pin.
16946  */
16947 #define RTC_PCR_TPS(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPS_SHIFT)) & RTC_PCR_TPS_MASK)
16948 
16949 #define RTC_PCR_TFE_MASK                         (0x4000000U)
16950 #define RTC_PCR_TFE_SHIFT                        (26U)
16951 /*! TFE - Tamper Filter Enable
16952  *  0b0..Input filter is disabled on the tamper pin.
16953  *  0b1..Input filter is enabled on the tamper pin.
16954  */
16955 #define RTC_PCR_TFE(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TFE_SHIFT)) & RTC_PCR_TFE_MASK)
16956 
16957 #define RTC_PCR_TPP_MASK                         (0x8000000U)
16958 #define RTC_PCR_TPP_SHIFT                        (27U)
16959 /*! TPP - Tamper Pin Polarity
16960  *  0b0..Tamper pin is active high.
16961  *  0b1..Tamper pin is active low.
16962  */
16963 #define RTC_PCR_TPP(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPP_SHIFT)) & RTC_PCR_TPP_MASK)
16964 
16965 #define RTC_PCR_TPID_MASK                        (0x80000000U)
16966 #define RTC_PCR_TPID_SHIFT                       (31U)
16967 /*! TPID - Tamper Pin Input Data
16968  *  0b0..Tamper pin input data is logic zero.
16969  *  0b1..Tamper pin input data is logic one.
16970  */
16971 #define RTC_PCR_TPID(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPID_SHIFT)) & RTC_PCR_TPID_MASK)
16972 /*! @} */
16973 
16974 /* The count of RTC_PCR */
16975 #define RTC_PCR_COUNT                            (4U)
16976 
16977 /*! @name WAR - RTC Write Access Register */
16978 /*! @{ */
16979 
16980 #define RTC_WAR_TSRW_MASK                        (0x1U)
16981 #define RTC_WAR_TSRW_SHIFT                       (0U)
16982 /*! TSRW - Time Seconds Register Write
16983  *  0b0..Writes to the Time Seconds Register are ignored.
16984  *  0b1..Writes to the Time Seconds Register complete as normal.
16985  */
16986 #define RTC_WAR_TSRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TSRW_SHIFT)) & RTC_WAR_TSRW_MASK)
16987 
16988 #define RTC_WAR_TPRW_MASK                        (0x2U)
16989 #define RTC_WAR_TPRW_SHIFT                       (1U)
16990 /*! TPRW - Time Prescaler Register Write
16991  *  0b0..Writes to the Time Prescaler Register are ignored.
16992  *  0b1..Writes to the Time Prescaler Register complete as normal.
16993  */
16994 #define RTC_WAR_TPRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TPRW_SHIFT)) & RTC_WAR_TPRW_MASK)
16995 
16996 #define RTC_WAR_TARW_MASK                        (0x4U)
16997 #define RTC_WAR_TARW_SHIFT                       (2U)
16998 /*! TARW - Time Alarm Register Write
16999  *  0b0..Writes to the Time Alarm Register are ignored.
17000  *  0b1..Writes to the Time Alarm Register complete as normal.
17001  */
17002 #define RTC_WAR_TARW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TARW_SHIFT)) & RTC_WAR_TARW_MASK)
17003 
17004 #define RTC_WAR_TCRW_MASK                        (0x8U)
17005 #define RTC_WAR_TCRW_SHIFT                       (3U)
17006 /*! TCRW - Time Compensation Register Write
17007  *  0b0..Writes to the Time Compensation Register are ignored.
17008  *  0b1..Writes to the Time Compensation Register complete as normal.
17009  */
17010 #define RTC_WAR_TCRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TCRW_SHIFT)) & RTC_WAR_TCRW_MASK)
17011 
17012 #define RTC_WAR_CRW_MASK                         (0x10U)
17013 #define RTC_WAR_CRW_SHIFT                        (4U)
17014 /*! CRW - Control Register Write
17015  *  0b0..Writes to the Control Register are ignored.
17016  *  0b1..Writes to the Control Register complete as normal.
17017  */
17018 #define RTC_WAR_CRW(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_WAR_CRW_SHIFT)) & RTC_WAR_CRW_MASK)
17019 
17020 #define RTC_WAR_SRW_MASK                         (0x20U)
17021 #define RTC_WAR_SRW_SHIFT                        (5U)
17022 /*! SRW - Status Register Write
17023  *  0b0..Writes to the Status Register are ignored.
17024  *  0b1..Writes to the Status Register complete as normal.
17025  */
17026 #define RTC_WAR_SRW(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_WAR_SRW_SHIFT)) & RTC_WAR_SRW_MASK)
17027 
17028 #define RTC_WAR_LRW_MASK                         (0x40U)
17029 #define RTC_WAR_LRW_SHIFT                        (6U)
17030 /*! LRW - Lock Register Write
17031  *  0b0..Writes to the Lock Register are ignored.
17032  *  0b1..Writes to the Lock Register complete as normal.
17033  */
17034 #define RTC_WAR_LRW(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_WAR_LRW_SHIFT)) & RTC_WAR_LRW_MASK)
17035 
17036 #define RTC_WAR_IERW_MASK                        (0x80U)
17037 #define RTC_WAR_IERW_SHIFT                       (7U)
17038 /*! IERW - Interrupt Enable Register Write
17039  *  0b0..Writes to the Interupt Enable Register are ignored.
17040  *  0b1..Writes to the Interrupt Enable Register complete as normal.
17041  */
17042 #define RTC_WAR_IERW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_IERW_SHIFT)) & RTC_WAR_IERW_MASK)
17043 
17044 #define RTC_WAR_TTSW_MASK                        (0x100U)
17045 #define RTC_WAR_TTSW_SHIFT                       (8U)
17046 /*! TTSW - Tamper Time Seconds Write
17047  *  0b0..Writes to the Tamper Time Seconds Register are ignored.
17048  *  0b1..Writes to the Tamper Time Seconds Register complete as normal.
17049  */
17050 #define RTC_WAR_TTSW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TTSW_SHIFT)) & RTC_WAR_TTSW_MASK)
17051 
17052 #define RTC_WAR_MERW_MASK                        (0x200U)
17053 #define RTC_WAR_MERW_SHIFT                       (9U)
17054 /*! MERW - Monotonic Enable Register Write
17055  *  0b0..Writes to the Monotonic Enable Register are ignored.
17056  *  0b1..Writes to the Monotonic Enable Register complete as normal.
17057  */
17058 #define RTC_WAR_MERW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MERW_SHIFT)) & RTC_WAR_MERW_MASK)
17059 
17060 #define RTC_WAR_MCLW_MASK                        (0x400U)
17061 #define RTC_WAR_MCLW_SHIFT                       (10U)
17062 /*! MCLW - Monotonic Counter Low Write
17063  *  0b0..Writes to the Monotonic Counter Low Register are ignored.
17064  *  0b1..Writes to the Monotonic Counter Low Register complete as normal.
17065  */
17066 #define RTC_WAR_MCLW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MCLW_SHIFT)) & RTC_WAR_MCLW_MASK)
17067 
17068 #define RTC_WAR_MCHW_MASK                        (0x800U)
17069 #define RTC_WAR_MCHW_SHIFT                       (11U)
17070 /*! MCHW - Monotonic Counter High Write
17071  *  0b0..Writes to the Monotonic Counter High Register are ignored.
17072  *  0b1..Writes to the Monotonic Counter High Register complete as normal.
17073  */
17074 #define RTC_WAR_MCHW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MCHW_SHIFT)) & RTC_WAR_MCHW_MASK)
17075 
17076 #define RTC_WAR_TDRW_MASK                        (0x2000U)
17077 #define RTC_WAR_TDRW_SHIFT                       (13U)
17078 /*! TDRW - Tamper Detect Register Write
17079  *  0b0..Writes to the Tamper Detect Register are ignored.
17080  *  0b1..Writes to the Tamper Detect Register complete as normal.
17081  */
17082 #define RTC_WAR_TDRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TDRW_SHIFT)) & RTC_WAR_TDRW_MASK)
17083 
17084 #define RTC_WAR_TIRW_MASK                        (0x8000U)
17085 #define RTC_WAR_TIRW_SHIFT                       (15U)
17086 /*! TIRW - Tamper Interrupt Register Write
17087  *  0b0..Writes to the Tamper Interrupt Register are ignored.
17088  *  0b1..Writes to the Tamper Interrupt Register complete as normal.
17089  */
17090 #define RTC_WAR_TIRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TIRW_SHIFT)) & RTC_WAR_TIRW_MASK)
17091 
17092 #define RTC_WAR_PCRW_MASK                        (0xF0000U)
17093 #define RTC_WAR_PCRW_SHIFT                       (16U)
17094 /*! PCRW - Pin Configuration Register Write */
17095 #define RTC_WAR_PCRW(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_WAR_PCRW_SHIFT)) & RTC_WAR_PCRW_MASK)
17096 /*! @} */
17097 
17098 /*! @name RAR - RTC Read Access Register */
17099 /*! @{ */
17100 
17101 #define RTC_RAR_TSRR_MASK                        (0x1U)
17102 #define RTC_RAR_TSRR_SHIFT                       (0U)
17103 /*! TSRR - Time Seconds Register Read
17104  *  0b0..Reads to the Time Seconds Register are ignored.
17105  *  0b1..Reads to the Time Seconds Register complete as normal.
17106  */
17107 #define RTC_RAR_TSRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TSRR_SHIFT)) & RTC_RAR_TSRR_MASK)
17108 
17109 #define RTC_RAR_TPRR_MASK                        (0x2U)
17110 #define RTC_RAR_TPRR_SHIFT                       (1U)
17111 /*! TPRR - Time Prescaler Register Read
17112  *  0b0..Reads to the Time Pprescaler Register are ignored.
17113  *  0b1..Reads to the Time Prescaler Register complete as normal.
17114  */
17115 #define RTC_RAR_TPRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TPRR_SHIFT)) & RTC_RAR_TPRR_MASK)
17116 
17117 #define RTC_RAR_TARR_MASK                        (0x4U)
17118 #define RTC_RAR_TARR_SHIFT                       (2U)
17119 /*! TARR - Time Alarm Register Read
17120  *  0b0..Reads to the Time Alarm Register are ignored.
17121  *  0b1..Reads to the Time Alarm Register complete as normal.
17122  */
17123 #define RTC_RAR_TARR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TARR_SHIFT)) & RTC_RAR_TARR_MASK)
17124 
17125 #define RTC_RAR_TCRR_MASK                        (0x8U)
17126 #define RTC_RAR_TCRR_SHIFT                       (3U)
17127 /*! TCRR - Time Compensation Register Read
17128  *  0b0..Reads to the Time Compensation Register are ignored.
17129  *  0b1..Reads to the Time Compensation Register complete as normal.
17130  */
17131 #define RTC_RAR_TCRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TCRR_SHIFT)) & RTC_RAR_TCRR_MASK)
17132 
17133 #define RTC_RAR_CRR_MASK                         (0x10U)
17134 #define RTC_RAR_CRR_SHIFT                        (4U)
17135 /*! CRR - Control Register Read
17136  *  0b0..Reads to the Control Register are ignored.
17137  *  0b1..Reads to the Control Register complete as normal.
17138  */
17139 #define RTC_RAR_CRR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_RAR_CRR_SHIFT)) & RTC_RAR_CRR_MASK)
17140 
17141 #define RTC_RAR_SRR_MASK                         (0x20U)
17142 #define RTC_RAR_SRR_SHIFT                        (5U)
17143 /*! SRR - Status Register Read
17144  *  0b0..Reads to the Status Register are ignored.
17145  *  0b1..Reads to the Status Register complete as normal.
17146  */
17147 #define RTC_RAR_SRR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_RAR_SRR_SHIFT)) & RTC_RAR_SRR_MASK)
17148 
17149 #define RTC_RAR_LRR_MASK                         (0x40U)
17150 #define RTC_RAR_LRR_SHIFT                        (6U)
17151 /*! LRR - Lock Register Read
17152  *  0b0..Reads to the Lock Register are ignored.
17153  *  0b1..Reads to the Lock Register complete as normal.
17154  */
17155 #define RTC_RAR_LRR(x)                           (((uint32_t)(((uint32_t)(x)) << RTC_RAR_LRR_SHIFT)) & RTC_RAR_LRR_MASK)
17156 
17157 #define RTC_RAR_IERR_MASK                        (0x80U)
17158 #define RTC_RAR_IERR_SHIFT                       (7U)
17159 /*! IERR - Interrupt Enable Register Read
17160  *  0b0..Reads to the Interrupt Enable Register are ignored.
17161  *  0b1..Reads to the Interrupt Enable Register complete as normal.
17162  */
17163 #define RTC_RAR_IERR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_IERR_SHIFT)) & RTC_RAR_IERR_MASK)
17164 
17165 #define RTC_RAR_TTSR_MASK                        (0x100U)
17166 #define RTC_RAR_TTSR_SHIFT                       (8U)
17167 /*! TTSR - Tamper Time Seconds Read
17168  *  0b0..Reads to the Tamper Time Seconds Register are ignored.
17169  *  0b1..Reads to the Tamper Time Seconds Register complete as normal.
17170  */
17171 #define RTC_RAR_TTSR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TTSR_SHIFT)) & RTC_RAR_TTSR_MASK)
17172 
17173 #define RTC_RAR_MERR_MASK                        (0x200U)
17174 #define RTC_RAR_MERR_SHIFT                       (9U)
17175 /*! MERR - Monotonic Enable Register Read
17176  *  0b0..Reads to the Monotonic Enable Register are ignored.
17177  *  0b1..Reads to the Monotonic Enable Register complete as normal.
17178  */
17179 #define RTC_RAR_MERR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MERR_SHIFT)) & RTC_RAR_MERR_MASK)
17180 
17181 #define RTC_RAR_MCLR_MASK                        (0x400U)
17182 #define RTC_RAR_MCLR_SHIFT                       (10U)
17183 /*! MCLR - Monotonic Counter Low Read
17184  *  0b0..Reads to the Monotonic Counter Low Register are ignored.
17185  *  0b1..Reads to the Monotonic Counter Low Register complete as normal.
17186  */
17187 #define RTC_RAR_MCLR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MCLR_SHIFT)) & RTC_RAR_MCLR_MASK)
17188 
17189 #define RTC_RAR_MCHR_MASK                        (0x800U)
17190 #define RTC_RAR_MCHR_SHIFT                       (11U)
17191 /*! MCHR - Monotonic Counter High Read
17192  *  0b0..Reads to the Monotonic Counter High Register are ignored.
17193  *  0b1..Reads to the Monotonic Counter High Register complete as normal.
17194  */
17195 #define RTC_RAR_MCHR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MCHR_SHIFT)) & RTC_RAR_MCHR_MASK)
17196 
17197 #define RTC_RAR_TDRR_MASK                        (0x2000U)
17198 #define RTC_RAR_TDRR_SHIFT                       (13U)
17199 /*! TDRR - Tamper Detect Register Read
17200  *  0b0..Reads to the Tamper Detect Register are ignored.
17201  *  0b1..Reads to the Tamper Detect Register complete as normal.
17202  */
17203 #define RTC_RAR_TDRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TDRR_SHIFT)) & RTC_RAR_TDRR_MASK)
17204 
17205 #define RTC_RAR_TIRR_MASK                        (0x8000U)
17206 #define RTC_RAR_TIRR_SHIFT                       (15U)
17207 /*! TIRR - Tamper Interrupt Register Read
17208  *  0b0..Reads to the Tamper Interrupt Register are ignored.
17209  *  0b1..Reads to the Tamper Interrupt Register complete as normal.
17210  */
17211 #define RTC_RAR_TIRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TIRR_SHIFT)) & RTC_RAR_TIRR_MASK)
17212 
17213 #define RTC_RAR_PCRR_MASK                        (0xF0000U)
17214 #define RTC_RAR_PCRR_SHIFT                       (16U)
17215 /*! PCRR - Pin Configuration Register Read */
17216 #define RTC_RAR_PCRR(x)                          (((uint32_t)(((uint32_t)(x)) << RTC_RAR_PCRR_SHIFT)) & RTC_RAR_PCRR_MASK)
17217 /*! @} */
17218 
17219 
17220 /*!
17221  * @}
17222  */ /* end of group RTC_Register_Masks */
17223 
17224 
17225 /* RTC - Peripheral instance base addresses */
17226 /** Peripheral RTC base address */
17227 #define RTC_BASE                                 (0x40031000u)
17228 /** Peripheral RTC base pointer */
17229 #define RTC                                      ((RTC_Type *)RTC_BASE)
17230 /** Array initializer of RTC peripheral base addresses */
17231 #define RTC_BASE_ADDRS                           { RTC_BASE }
17232 /** Array initializer of RTC peripheral base pointers */
17233 #define RTC_BASE_PTRS                            { RTC }
17234 /** Interrupt vectors for the RTC peripheral type */
17235 #define RTC_IRQS                                 { RTC_IRQn }
17236 
17237 /*!
17238  * @}
17239  */ /* end of group RTC_Peripheral_Access_Layer */
17240 
17241 
17242 /* ----------------------------------------------------------------------------
17243    -- SCG Peripheral Access Layer
17244    ---------------------------------------------------------------------------- */
17245 
17246 /*!
17247  * @addtogroup SCG_Peripheral_Access_Layer SCG Peripheral Access Layer
17248  * @{
17249  */
17250 
17251 /** SCG - Register Layout Typedef */
17252 typedef struct {
17253   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
17254   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
17255        uint8_t RESERVED_0[8];
17256   __I  uint32_t CSR;                               /**< Clock Status Register, offset: 0x10 */
17257   __IO uint32_t RCCR;                              /**< Run Clock Control Register, offset: 0x14 */
17258   __IO uint32_t VCCR;                              /**< VLPR Clock Control Register, offset: 0x18 */
17259   __IO uint32_t HCCR;                              /**< HSRUN Clock Control Register, offset: 0x1C */
17260   __IO uint32_t CLKOUTCNFG;                        /**< SCG CLKOUT Configuration Register, offset: 0x20 */
17261        uint8_t RESERVED_1[476];
17262   __IO uint32_t SIRCCSR;                           /**< Slow IRC Control Status Register, offset: 0x200 */
17263   __IO uint32_t SIRCDIV;                           /**< Slow IRC Divide Register, offset: 0x204 */
17264   __IO uint32_t SIRCCFG;                           /**< Slow IRC Configuration Register, offset: 0x208 */
17265        uint8_t RESERVED_2[244];
17266   __IO uint32_t FIRCCSR;                           /**< Fast IRC Control Status Register, offset: 0x300 */
17267   __IO uint32_t FIRCDIV;                           /**< Fast IRC Divide Register, offset: 0x304 */
17268   __IO uint32_t FIRCCFG;                           /**< Fast IRC Configuration Register, offset: 0x308 */
17269   __IO uint32_t FIRCTCFG;                          /**< Fast IRC Trim Configuration Register, offset: 0x30C */
17270        uint8_t RESERVED_3[8];
17271   __IO uint32_t FIRCSTAT;                          /**< Fast IRC Status Register, offset: 0x318 */
17272        uint8_t RESERVED_4[228];
17273   __IO uint32_t ROSCCSR;                           /**< RTC OSC Control Status Register, offset: 0x400 */
17274        uint8_t RESERVED_5[252];
17275   __IO uint32_t LPFLLCSR;                          /**< Low Power FLL Control Status Register, offset: 0x500 */
17276   __IO uint32_t LPFLLDIV;                          /**< Low Power FLL Divide Register, offset: 0x504 */
17277   __IO uint32_t LPFLLCFG;                          /**< Low Power FLL Configuration Register, offset: 0x508 */
17278   __IO uint32_t LPFLLTCFG;                         /**< Low Power FLL Trim Configuration Register, offset: 0x50C */
17279        uint8_t RESERVED_6[4];
17280   __IO uint32_t LPFLLSTAT;                         /**< Low Power FLL Status Register, offset: 0x514 */
17281 } SCG_Type;
17282 
17283 /* ----------------------------------------------------------------------------
17284    -- SCG Register Masks
17285    ---------------------------------------------------------------------------- */
17286 
17287 /*!
17288  * @addtogroup SCG_Register_Masks SCG Register Masks
17289  * @{
17290  */
17291 
17292 /*! @name VERID - Version ID Register */
17293 /*! @{ */
17294 
17295 #define SCG_VERID_VERSION_MASK                   (0xFFFFFFFFU)
17296 #define SCG_VERID_VERSION_SHIFT                  (0U)
17297 /*! VERSION - SCG Version Number */
17298 #define SCG_VERID_VERSION(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_VERID_VERSION_SHIFT)) & SCG_VERID_VERSION_MASK)
17299 /*! @} */
17300 
17301 /*! @name PARAM - Parameter Register */
17302 /*! @{ */
17303 
17304 #define SCG_PARAM_CLKPRES_MASK                   (0xFFU)
17305 #define SCG_PARAM_CLKPRES_SHIFT                  (0U)
17306 /*! CLKPRES - Clock Present
17307  *  0b00000000-0b00000001..Reserved
17308  *  0bxxxxxx1x..Reserved.
17309  *  0bxxxxx1xx..Slow IRC (SIRC) is present.
17310  *  0bxxxx1xxx..Fast IRC (FIRC) is present.
17311  *  0bxxx1xxxx..RTC OSC (ROSC) is present.
17312  *  0bxx1xxxxx..Low Power FLL (LPFLL) is present.
17313  */
17314 #define SCG_PARAM_CLKPRES(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_PARAM_CLKPRES_SHIFT)) & SCG_PARAM_CLKPRES_MASK)
17315 
17316 #define SCG_PARAM_DIVPRES_MASK                   (0xF8000000U)
17317 #define SCG_PARAM_DIVPRES_SHIFT                  (27U)
17318 /*! DIVPRES - Divider Present
17319  *  0bxxxx1..System DIVSLOW is present.
17320  *  0bxxx1x..System DIVBUS is present.
17321  *  0bxx1xx..System DIVEXT is present.
17322  *  0b1xxxx..System DIVCORE is present.
17323  */
17324 #define SCG_PARAM_DIVPRES(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_PARAM_DIVPRES_SHIFT)) & SCG_PARAM_DIVPRES_MASK)
17325 /*! @} */
17326 
17327 /*! @name CSR - Clock Status Register */
17328 /*! @{ */
17329 
17330 #define SCG_CSR_DIVSLOW_MASK                     (0xFU)
17331 #define SCG_CSR_DIVSLOW_SHIFT                    (0U)
17332 /*! DIVSLOW - Slow Clock Divide Ratio
17333  *  0b0000..Reserved
17334  *  0b0001..Divide-by-2
17335  *  0b0010..Divide-by-3
17336  *  0b0011..Divide-by-4
17337  *  0b0100..Divide-by-5
17338  *  0b0101..Divide-by-6
17339  *  0b0110..Divide-by-7
17340  *  0b0111..Divide-by-8
17341  *  0b1000..Divide-by-9
17342  *  0b1001..Divide-by-10
17343  *  0b1010..Divide-by-11
17344  *  0b1011..Divide-by-12
17345  *  0b1100..Divide-by-13
17346  *  0b1101..Divide-by-14
17347  *  0b1110..Divide-by-15
17348  *  0b1111..Divide-by-16
17349  */
17350 #define SCG_CSR_DIVSLOW(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVSLOW_SHIFT)) & SCG_CSR_DIVSLOW_MASK)
17351 
17352 #define SCG_CSR_DIVBUS_MASK                      (0xF0U)
17353 #define SCG_CSR_DIVBUS_SHIFT                     (4U)
17354 /*! DIVBUS - Bus Clock Divide Ratio
17355  *  0b0000..Divide-by-1
17356  *  0b0001..Divide-by-2
17357  *  0b0010..Divide-by-3
17358  *  0b0011..Divide-by-4
17359  *  0b0100..Divide-by-5
17360  *  0b0101..Divide-by-6
17361  *  0b0110..Divide-by-7
17362  *  0b0111..Divide-by-8
17363  *  0b1000..Divide-by-9
17364  *  0b1001..Divide-by-10
17365  *  0b1010..Divide-by-11
17366  *  0b1011..Divide-by-12
17367  *  0b1100..Divide-by-13
17368  *  0b1101..Divide-by-14
17369  *  0b1110..Divide-by-15
17370  *  0b1111..Divide-by-16
17371  */
17372 #define SCG_CSR_DIVBUS(x)                        (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVBUS_SHIFT)) & SCG_CSR_DIVBUS_MASK)
17373 
17374 #define SCG_CSR_DIVEXT_MASK                      (0xF00U)
17375 #define SCG_CSR_DIVEXT_SHIFT                     (8U)
17376 /*! DIVEXT - External Clock Divide Ratio
17377  *  0b0000..Divide-by-1
17378  *  0b0001..Divide-by-2
17379  *  0b0010..Divide-by-3
17380  *  0b0011..Divide-by-4
17381  *  0b0100..Divide-by-5
17382  *  0b0101..Divide-by-6
17383  *  0b0110..Divide-by-7
17384  *  0b0111..Divide-by-8
17385  *  0b1000..Divide-by-9
17386  *  0b1001..Divide-by-10
17387  *  0b1010..Divide-by-11
17388  *  0b1011..Divide-by-12
17389  *  0b1100..Divide-by-13
17390  *  0b1101..Divide-by-14
17391  *  0b1110..Divide-by-15
17392  *  0b1111..Divide-by-16
17393  */
17394 #define SCG_CSR_DIVEXT(x)                        (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVEXT_SHIFT)) & SCG_CSR_DIVEXT_MASK)
17395 
17396 #define SCG_CSR_DIVCORE_MASK                     (0xF0000U)
17397 #define SCG_CSR_DIVCORE_SHIFT                    (16U)
17398 /*! DIVCORE - Core Clock Divide Ratio
17399  *  0b0000..Divide-by-1
17400  *  0b0001..Divide-by-2
17401  *  0b0010..Divide-by-3
17402  *  0b0011..Divide-by-4
17403  *  0b0100..Divide-by-5
17404  *  0b0101..Divide-by-6
17405  *  0b0110..Divide-by-7
17406  *  0b0111..Divide-by-8
17407  *  0b1000..Divide-by-9
17408  *  0b1001..Divide-by-10
17409  *  0b1010..Divide-by-11
17410  *  0b1011..Divide-by-12
17411  *  0b1100..Divide-by-13
17412  *  0b1101..Divide-by-14
17413  *  0b1110..Divide-by-15
17414  *  0b1111..Divide-by-16
17415  */
17416 #define SCG_CSR_DIVCORE(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVCORE_SHIFT)) & SCG_CSR_DIVCORE_MASK)
17417 
17418 #define SCG_CSR_SCS_MASK                         (0xF000000U)
17419 #define SCG_CSR_SCS_SHIFT                        (24U)
17420 /*! SCS - System Clock Source
17421  *  0b0000..Reserved
17422  *  0b0001..Reserved
17423  *  0b0010..Slow IRC (SIRC_CLK)
17424  *  0b0011..Fast IRC (FIRC_CLK)
17425  *  0b0100..RTC OSC (ROSC_CLK)
17426  *  0b0101..Low Power FLL (LPFLL_CLK)
17427  *  0b0110..Reserved
17428  *  0b0111..Reserved
17429  */
17430 #define SCG_CSR_SCS(x)                           (((uint32_t)(((uint32_t)(x)) << SCG_CSR_SCS_SHIFT)) & SCG_CSR_SCS_MASK)
17431 /*! @} */
17432 
17433 /*! @name RCCR - Run Clock Control Register */
17434 /*! @{ */
17435 
17436 #define SCG_RCCR_DIVSLOW_MASK                    (0xFU)
17437 #define SCG_RCCR_DIVSLOW_SHIFT                   (0U)
17438 /*! DIVSLOW - Slow Clock Divide Ratio
17439  *  0b0000..Reserved
17440  *  0b0001..Divide-by-2
17441  *  0b0010..Divide-by-3
17442  *  0b0011..Divide-by-4
17443  *  0b0100..Divide-by-5
17444  *  0b0101..Divide-by-6
17445  *  0b0110..Divide-by-7
17446  *  0b0111..Divide-by-8
17447  *  0b1000..Divide-by-9
17448  *  0b1001..Divide-by-10
17449  *  0b1010..Divide-by-11
17450  *  0b1011..Divide-by-12
17451  *  0b1100..Divide-by-13
17452  *  0b1101..Divide-by-14
17453  *  0b1110..Divide-by-15
17454  *  0b1111..Divide-by-16
17455  */
17456 #define SCG_RCCR_DIVSLOW(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVSLOW_SHIFT)) & SCG_RCCR_DIVSLOW_MASK)
17457 
17458 #define SCG_RCCR_DIVBUS_MASK                     (0xF0U)
17459 #define SCG_RCCR_DIVBUS_SHIFT                    (4U)
17460 /*! DIVBUS - Bus Clock Divide Ratio
17461  *  0b0000..Divide-by-1
17462  *  0b0001..Divide-by-2
17463  *  0b0010..Divide-by-3
17464  *  0b0011..Divide-by-4
17465  *  0b0100..Divide-by-5
17466  *  0b0101..Divide-by-6
17467  *  0b0110..Divide-by-7
17468  *  0b0111..Divide-by-8
17469  *  0b1000..Divide-by-9
17470  *  0b1001..Divide-by-10
17471  *  0b1010..Divide-by-11
17472  *  0b1011..Divide-by-12
17473  *  0b1100..Divide-by-13
17474  *  0b1101..Divide-by-14
17475  *  0b1110..Divide-by-15
17476  *  0b1111..Divide-by-16
17477  */
17478 #define SCG_RCCR_DIVBUS(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVBUS_SHIFT)) & SCG_RCCR_DIVBUS_MASK)
17479 
17480 #define SCG_RCCR_DIVEXT_MASK                     (0xF00U)
17481 #define SCG_RCCR_DIVEXT_SHIFT                    (8U)
17482 /*! DIVEXT - External Clock Divide Ratio
17483  *  0b0000..Divide-by-1
17484  *  0b0001..Divide-by-2
17485  *  0b0010..Divide-by-3
17486  *  0b0011..Divide-by-4
17487  *  0b0100..Divide-by-5
17488  *  0b0101..Divide-by-6
17489  *  0b0110..Divide-by-7
17490  *  0b0111..Divide-by-8
17491  *  0b1000..Divide-by-9
17492  *  0b1001..Divide-by-10
17493  *  0b1010..Divide-by-11
17494  *  0b1011..Divide-by-12
17495  *  0b1100..Divide-by-13
17496  *  0b1101..Divide-by-14
17497  *  0b1110..Divide-by-15
17498  *  0b1111..Divide-by-16
17499  */
17500 #define SCG_RCCR_DIVEXT(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVEXT_SHIFT)) & SCG_RCCR_DIVEXT_MASK)
17501 
17502 #define SCG_RCCR_DIVCORE_MASK                    (0xF0000U)
17503 #define SCG_RCCR_DIVCORE_SHIFT                   (16U)
17504 /*! DIVCORE - Core Clock Divide Ratio
17505  *  0b0000..Divide-by-1
17506  *  0b0001..Divide-by-2
17507  *  0b0010..Divide-by-3
17508  *  0b0011..Divide-by-4
17509  *  0b0100..Divide-by-5
17510  *  0b0101..Divide-by-6
17511  *  0b0110..Divide-by-7
17512  *  0b0111..Divide-by-8
17513  *  0b1000..Divide-by-9
17514  *  0b1001..Divide-by-10
17515  *  0b1010..Divide-by-11
17516  *  0b1011..Divide-by-12
17517  *  0b1100..Divide-by-13
17518  *  0b1101..Divide-by-14
17519  *  0b1110..Divide-by-15
17520  *  0b1111..Divide-by-16
17521  */
17522 #define SCG_RCCR_DIVCORE(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVCORE_SHIFT)) & SCG_RCCR_DIVCORE_MASK)
17523 
17524 #define SCG_RCCR_SCS_MASK                        (0x7000000U)
17525 #define SCG_RCCR_SCS_SHIFT                       (24U)
17526 /*! SCS - System Clock Source
17527  *  0b000..Reserved
17528  *  0b001..Reserved
17529  *  0b010..Slow IRC (SIRC_CLK)
17530  *  0b011..Fast IRC (FIRC_CLK)
17531  *  0b100..RTC OSC (ROSC_CLK)
17532  *  0b101..Low Power FLL (LPFLL_CLK)
17533  *  0b110..Reserved
17534  *  0b111..Reserved
17535  */
17536 #define SCG_RCCR_SCS(x)                          (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_SCS_SHIFT)) & SCG_RCCR_SCS_MASK)
17537 /*! @} */
17538 
17539 /*! @name VCCR - VLPR Clock Control Register */
17540 /*! @{ */
17541 
17542 #define SCG_VCCR_DIVSLOW_MASK                    (0xFU)
17543 #define SCG_VCCR_DIVSLOW_SHIFT                   (0U)
17544 /*! DIVSLOW - Slow Clock Divide Ratio
17545  *  0b0000..Reserved
17546  *  0b0001..Divide-by-2
17547  *  0b0010..Divide-by-3
17548  *  0b0011..Divide-by-4
17549  *  0b0100..Divide-by-5
17550  *  0b0101..Divide-by-6
17551  *  0b0110..Divide-by-7
17552  *  0b0111..Divide-by-8
17553  *  0b1000..Divide-by-9
17554  *  0b1001..Divide-by-10
17555  *  0b1010..Divide-by-11
17556  *  0b1011..Divide-by-12
17557  *  0b1100..Divide-by-13
17558  *  0b1101..Divide-by-14
17559  *  0b1110..Divide-by-15
17560  *  0b1111..Divide-by-16
17561  */
17562 #define SCG_VCCR_DIVSLOW(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVSLOW_SHIFT)) & SCG_VCCR_DIVSLOW_MASK)
17563 
17564 #define SCG_VCCR_DIVBUS_MASK                     (0xF0U)
17565 #define SCG_VCCR_DIVBUS_SHIFT                    (4U)
17566 /*! DIVBUS - Bus Clock Divide Ratio
17567  *  0b0000..Divide-by-1
17568  *  0b0001..Divide-by-2
17569  *  0b0010..Divide-by-3
17570  *  0b0011..Divide-by-4
17571  *  0b0100..Divide-by-5
17572  *  0b0101..Divide-by-6
17573  *  0b0110..Divide-by-7
17574  *  0b0111..Divide-by-8
17575  *  0b1000..Divide-by-9
17576  *  0b1001..Divide-by-10
17577  *  0b1010..Divide-by-11
17578  *  0b1011..Divide-by-12
17579  *  0b1100..Divide-by-13
17580  *  0b1101..Divide-by-14
17581  *  0b1110..Divide-by-15
17582  *  0b1111..Divide-by-16
17583  */
17584 #define SCG_VCCR_DIVBUS(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVBUS_SHIFT)) & SCG_VCCR_DIVBUS_MASK)
17585 
17586 #define SCG_VCCR_DIVEXT_MASK                     (0xF00U)
17587 #define SCG_VCCR_DIVEXT_SHIFT                    (8U)
17588 /*! DIVEXT - External Clock Divide Ratio
17589  *  0b0000..Divide-by-1
17590  *  0b0001..Divide-by-2
17591  *  0b0010..Divide-by-3
17592  *  0b0011..Divide-by-4
17593  *  0b0100..Divide-by-5
17594  *  0b0101..Divide-by-6
17595  *  0b0110..Divide-by-7
17596  *  0b0111..Divide-by-8
17597  *  0b1000..Divide-by-9
17598  *  0b1001..Divide-by-10
17599  *  0b1010..Divide-by-11
17600  *  0b1011..Divide-by-12
17601  *  0b1100..Divide-by-13
17602  *  0b1101..Divide-by-14
17603  *  0b1110..Divide-by-15
17604  *  0b1111..Divide-by-16
17605  */
17606 #define SCG_VCCR_DIVEXT(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVEXT_SHIFT)) & SCG_VCCR_DIVEXT_MASK)
17607 
17608 #define SCG_VCCR_DIVCORE_MASK                    (0xF0000U)
17609 #define SCG_VCCR_DIVCORE_SHIFT                   (16U)
17610 /*! DIVCORE - Core Clock Divide Ratio
17611  *  0b0000..Divide-by-1
17612  *  0b0001..Divide-by-2
17613  *  0b0010..Divide-by-3
17614  *  0b0011..Divide-by-4
17615  *  0b0100..Divide-by-5
17616  *  0b0101..Divide-by-6
17617  *  0b0110..Divide-by-7
17618  *  0b0111..Divide-by-8
17619  *  0b1000..Divide-by-9
17620  *  0b1001..Divide-by-10
17621  *  0b1010..Divide-by-11
17622  *  0b1011..Divide-by-12
17623  *  0b1100..Divide-by-13
17624  *  0b1101..Divide-by-14
17625  *  0b1110..Divide-by-15
17626  *  0b1111..Divide-by-16
17627  */
17628 #define SCG_VCCR_DIVCORE(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVCORE_SHIFT)) & SCG_VCCR_DIVCORE_MASK)
17629 
17630 #define SCG_VCCR_SCS_MASK                        (0xF000000U)
17631 #define SCG_VCCR_SCS_SHIFT                       (24U)
17632 /*! SCS - System Clock Source
17633  *  0b0000..Reserved
17634  *  0b0001..Reserved
17635  *  0b0010..Slow IRC (SIRC_CLK)
17636  *  0b0011..Reserved
17637  *  0b0100..RTC OSC (ROSC_CLK)
17638  *  0b0101..Reserved
17639  *  0b0110..Reserved
17640  *  0b0111..Reserved
17641  */
17642 #define SCG_VCCR_SCS(x)                          (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_SCS_SHIFT)) & SCG_VCCR_SCS_MASK)
17643 /*! @} */
17644 
17645 /*! @name HCCR - HSRUN Clock Control Register */
17646 /*! @{ */
17647 
17648 #define SCG_HCCR_DIVSLOW_MASK                    (0xFU)
17649 #define SCG_HCCR_DIVSLOW_SHIFT                   (0U)
17650 /*! DIVSLOW - Slow Clock Divide Ratio
17651  *  0b0000..Reserved
17652  *  0b0001..Divide-by-2
17653  *  0b0010..Divide-by-3
17654  *  0b0011..Divide-by-4
17655  *  0b0100..Divide-by-5
17656  *  0b0101..Divide-by-6
17657  *  0b0110..Divide-by-7
17658  *  0b0111..Divide-by-8
17659  *  0b1000..Divide-by-9
17660  *  0b1001..Divide-by-10
17661  *  0b1010..Divide-by-11
17662  *  0b1011..Divide-by-12
17663  *  0b1100..Divide-by-13
17664  *  0b1101..Divide-by-14
17665  *  0b1110..Divide-by-15
17666  *  0b1111..Divide-by-16
17667  */
17668 #define SCG_HCCR_DIVSLOW(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVSLOW_SHIFT)) & SCG_HCCR_DIVSLOW_MASK)
17669 
17670 #define SCG_HCCR_DIVBUS_MASK                     (0xF0U)
17671 #define SCG_HCCR_DIVBUS_SHIFT                    (4U)
17672 /*! DIVBUS - Bus Clock Divide Ratio
17673  *  0b0000..Divide-by-1
17674  *  0b0001..Divide-by-2
17675  *  0b0010..Divide-by-3
17676  *  0b0011..Divide-by-4
17677  *  0b0100..Divide-by-5
17678  *  0b0101..Divide-by-6
17679  *  0b0110..Divide-by-7
17680  *  0b0111..Divide-by-8
17681  *  0b1000..Divide-by-9
17682  *  0b1001..Divide-by-10
17683  *  0b1010..Divide-by-11
17684  *  0b1011..Divide-by-12
17685  *  0b1100..Divide-by-13
17686  *  0b1101..Divide-by-14
17687  *  0b1110..Divide-by-15
17688  *  0b1111..Divide-by-16
17689  */
17690 #define SCG_HCCR_DIVBUS(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVBUS_SHIFT)) & SCG_HCCR_DIVBUS_MASK)
17691 
17692 #define SCG_HCCR_DIVEXT_MASK                     (0xF00U)
17693 #define SCG_HCCR_DIVEXT_SHIFT                    (8U)
17694 /*! DIVEXT - External Clock Divide Ratio
17695  *  0b0000..Divide-by-1
17696  *  0b0001..Divide-by-2
17697  *  0b0010..Divide-by-3
17698  *  0b0011..Divide-by-4
17699  *  0b0100..Divide-by-5
17700  *  0b0101..Divide-by-6
17701  *  0b0110..Divide-by-7
17702  *  0b0111..Divide-by-8
17703  *  0b1000..Divide-by-9
17704  *  0b1001..Divide-by-10
17705  *  0b1010..Divide-by-11
17706  *  0b1011..Divide-by-12
17707  *  0b1100..Divide-by-13
17708  *  0b1101..Divide-by-14
17709  *  0b1110..Divide-by-15
17710  *  0b1111..Divide-by-16
17711  */
17712 #define SCG_HCCR_DIVEXT(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVEXT_SHIFT)) & SCG_HCCR_DIVEXT_MASK)
17713 
17714 #define SCG_HCCR_DIVCORE_MASK                    (0xF0000U)
17715 #define SCG_HCCR_DIVCORE_SHIFT                   (16U)
17716 /*! DIVCORE - Core Clock Divide Ratio
17717  *  0b0000..Divide-by-1
17718  *  0b0001..Divide-by-2
17719  *  0b0010..Divide-by-3
17720  *  0b0011..Divide-by-4
17721  *  0b0100..Divide-by-5
17722  *  0b0101..Divide-by-6
17723  *  0b0110..Divide-by-7
17724  *  0b0111..Divide-by-8
17725  *  0b1000..Divide-by-9
17726  *  0b1001..Divide-by-10
17727  *  0b1010..Divide-by-11
17728  *  0b1011..Divide-by-12
17729  *  0b1100..Divide-by-13
17730  *  0b1101..Divide-by-14
17731  *  0b1110..Divide-by-15
17732  *  0b1111..Divide-by-16
17733  */
17734 #define SCG_HCCR_DIVCORE(x)                      (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVCORE_SHIFT)) & SCG_HCCR_DIVCORE_MASK)
17735 
17736 #define SCG_HCCR_SCS_MASK                        (0xF000000U)
17737 #define SCG_HCCR_SCS_SHIFT                       (24U)
17738 /*! SCS - System Clock Source
17739  *  0b0000..Reserved
17740  *  0b0001..Reserved
17741  *  0b0010..Slow IRC (SIRC_CLK)
17742  *  0b0011..Fast IRC (FIRC_CLK)
17743  *  0b0100..RTC OSC (ROSC_CLK)
17744  *  0b0101..Low Power FLL (LPFLL_CLK)
17745  *  0b0110..Reserved
17746  *  0b0111..Reserved
17747  */
17748 #define SCG_HCCR_SCS(x)                          (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_SCS_SHIFT)) & SCG_HCCR_SCS_MASK)
17749 /*! @} */
17750 
17751 /*! @name CLKOUTCNFG - SCG CLKOUT Configuration Register */
17752 /*! @{ */
17753 
17754 #define SCG_CLKOUTCNFG_CLKOUTSEL_MASK            (0xF000000U)
17755 #define SCG_CLKOUTCNFG_CLKOUTSEL_SHIFT           (24U)
17756 /*! CLKOUTSEL - SCG Clkout Select
17757  *  0b0000..SCG EXTERNAL Clock
17758  *  0b0001..Reserved
17759  *  0b0010..Slow IRC (SIRC_CLK)
17760  *  0b0011..Fast IRC (FIRC_CLK)
17761  *  0b0100..RTC OSC (ROSC_CLK)
17762  *  0b0101..Low Power FLL (LPFLL_CLK)
17763  *  0b0110..Reserved
17764  *  0b0111..Reserved
17765  *  0b1111..Reserved
17766  */
17767 #define SCG_CLKOUTCNFG_CLKOUTSEL(x)              (((uint32_t)(((uint32_t)(x)) << SCG_CLKOUTCNFG_CLKOUTSEL_SHIFT)) & SCG_CLKOUTCNFG_CLKOUTSEL_MASK)
17768 /*! @} */
17769 
17770 /*! @name SIRCCSR - Slow IRC Control Status Register */
17771 /*! @{ */
17772 
17773 #define SCG_SIRCCSR_SIRCEN_MASK                  (0x1U)
17774 #define SCG_SIRCCSR_SIRCEN_SHIFT                 (0U)
17775 /*! SIRCEN - Slow IRC Enable
17776  *  0b0..Slow IRC is disabled
17777  *  0b1..Slow IRC is enabled
17778  */
17779 #define SCG_SIRCCSR_SIRCEN(x)                    (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCEN_SHIFT)) & SCG_SIRCCSR_SIRCEN_MASK)
17780 
17781 #define SCG_SIRCCSR_SIRCSTEN_MASK                (0x2U)
17782 #define SCG_SIRCCSR_SIRCSTEN_SHIFT               (1U)
17783 /*! SIRCSTEN - Slow IRC Stop Enable
17784  *  0b0..Slow IRC is disabled in Stop modes
17785  *  0b1..Slow IRC is enabled in Stop modes
17786  */
17787 #define SCG_SIRCCSR_SIRCSTEN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCSTEN_SHIFT)) & SCG_SIRCCSR_SIRCSTEN_MASK)
17788 
17789 #define SCG_SIRCCSR_SIRCLPEN_MASK                (0x4U)
17790 #define SCG_SIRCCSR_SIRCLPEN_SHIFT               (2U)
17791 /*! SIRCLPEN - Slow IRC Low Power Enable
17792  *  0b0..Slow IRC is disabled in VLP modes
17793  *  0b1..Slow IRC is enabled in VLP modes
17794  */
17795 #define SCG_SIRCCSR_SIRCLPEN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCLPEN_SHIFT)) & SCG_SIRCCSR_SIRCLPEN_MASK)
17796 
17797 #define SCG_SIRCCSR_LK_MASK                      (0x800000U)
17798 #define SCG_SIRCCSR_LK_SHIFT                     (23U)
17799 /*! LK - Lock Register
17800  *  0b0..Control Status Register can be written.
17801  *  0b1..Control Status Register cannot be written.
17802  */
17803 #define SCG_SIRCCSR_LK(x)                        (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_LK_SHIFT)) & SCG_SIRCCSR_LK_MASK)
17804 
17805 #define SCG_SIRCCSR_SIRCVLD_MASK                 (0x1000000U)
17806 #define SCG_SIRCCSR_SIRCVLD_SHIFT                (24U)
17807 /*! SIRCVLD - Slow IRC Valid
17808  *  0b0..Slow IRC is not enabled or clock is not valid
17809  *  0b1..Slow IRC is enabled and output clock is valid
17810  */
17811 #define SCG_SIRCCSR_SIRCVLD(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCVLD_SHIFT)) & SCG_SIRCCSR_SIRCVLD_MASK)
17812 
17813 #define SCG_SIRCCSR_SIRCSEL_MASK                 (0x2000000U)
17814 #define SCG_SIRCCSR_SIRCSEL_SHIFT                (25U)
17815 /*! SIRCSEL - Slow IRC Selected
17816  *  0b0..Slow IRC is not the system clock source
17817  *  0b1..Slow IRC is the system clock source
17818  */
17819 #define SCG_SIRCCSR_SIRCSEL(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCSEL_SHIFT)) & SCG_SIRCCSR_SIRCSEL_MASK)
17820 /*! @} */
17821 
17822 /*! @name SIRCDIV - Slow IRC Divide Register */
17823 /*! @{ */
17824 
17825 #define SCG_SIRCDIV_SIRCDIV1_MASK                (0x7U)
17826 #define SCG_SIRCDIV_SIRCDIV1_SHIFT               (0U)
17827 /*! SIRCDIV1 - Slow IRC Clock Divide 1
17828  *  0b000..Output disabled
17829  *  0b001..Divide by 1
17830  *  0b010..Divide by 2
17831  *  0b011..Divide by 4
17832  *  0b100..Divide by 8
17833  *  0b101..Divide by 16
17834  *  0b110..Divide by 32
17835  *  0b111..Divide by 64
17836  */
17837 #define SCG_SIRCDIV_SIRCDIV1(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV1_SHIFT)) & SCG_SIRCDIV_SIRCDIV1_MASK)
17838 
17839 #define SCG_SIRCDIV_SIRCDIV2_MASK                (0x700U)
17840 #define SCG_SIRCDIV_SIRCDIV2_SHIFT               (8U)
17841 /*! SIRCDIV2 - Slow IRC Clock Divide 2
17842  *  0b000..Output disabled
17843  *  0b001..Divide by 1
17844  *  0b010..Divide by 2
17845  *  0b011..Divide by 4
17846  *  0b100..Divide by 8
17847  *  0b101..Divide by 16
17848  *  0b110..Divide by 32
17849  *  0b111..Divide by 64
17850  */
17851 #define SCG_SIRCDIV_SIRCDIV2(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV2_SHIFT)) & SCG_SIRCDIV_SIRCDIV2_MASK)
17852 
17853 #define SCG_SIRCDIV_SIRCDIV3_MASK                (0x70000U)
17854 #define SCG_SIRCDIV_SIRCDIV3_SHIFT               (16U)
17855 /*! SIRCDIV3 - Slow IRC Clock Divider 3
17856  *  0b000..Output disabled
17857  *  0b001..Divide by 1
17858  *  0b010..Divide by 2
17859  *  0b011..Divide by 4
17860  *  0b100..Divide by 8
17861  *  0b101..Divide by 16
17862  *  0b110..Divide by 32
17863  *  0b111..Divide by 64
17864  */
17865 #define SCG_SIRCDIV_SIRCDIV3(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV3_SHIFT)) & SCG_SIRCDIV_SIRCDIV3_MASK)
17866 /*! @} */
17867 
17868 /*! @name SIRCCFG - Slow IRC Configuration Register */
17869 /*! @{ */
17870 
17871 #define SCG_SIRCCFG_RANGE_MASK                   (0x1U)
17872 #define SCG_SIRCCFG_RANGE_SHIFT                  (0U)
17873 /*! RANGE - Frequency Range
17874  *  0b0..Slow IRC low range clock (2 MHz)
17875  *  0b1..Slow IRC high range clock (8 MHz )
17876  */
17877 #define SCG_SIRCCFG_RANGE(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCFG_RANGE_SHIFT)) & SCG_SIRCCFG_RANGE_MASK)
17878 /*! @} */
17879 
17880 /*! @name FIRCCSR - Fast IRC Control Status Register */
17881 /*! @{ */
17882 
17883 #define SCG_FIRCCSR_FIRCEN_MASK                  (0x1U)
17884 #define SCG_FIRCCSR_FIRCEN_SHIFT                 (0U)
17885 /*! FIRCEN - Fast IRC Enable
17886  *  0b0..Fast IRC is disabled
17887  *  0b1..Fast IRC is enabled
17888  */
17889 #define SCG_FIRCCSR_FIRCEN(x)                    (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCEN_SHIFT)) & SCG_FIRCCSR_FIRCEN_MASK)
17890 
17891 #define SCG_FIRCCSR_FIRCSTEN_MASK                (0x2U)
17892 #define SCG_FIRCCSR_FIRCSTEN_SHIFT               (1U)
17893 /*! FIRCSTEN - Fast IRC Stop Enable
17894  *  0b0..Fast IRC is disabled in Stop modes.
17895  *  0b1..Fast IRC is enabled in Stop modes
17896  */
17897 #define SCG_FIRCCSR_FIRCSTEN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCSTEN_SHIFT)) & SCG_FIRCCSR_FIRCSTEN_MASK)
17898 
17899 #define SCG_FIRCCSR_FIRCLPEN_MASK                (0x4U)
17900 #define SCG_FIRCCSR_FIRCLPEN_SHIFT               (2U)
17901 /*! FIRCLPEN - Fast IRC Low Power Enable
17902  *  0b0..Fast IRC is disabled in VLP modes
17903  *  0b1..Fast IRC is enabled in VLP modes
17904  */
17905 #define SCG_FIRCCSR_FIRCLPEN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCLPEN_SHIFT)) & SCG_FIRCCSR_FIRCLPEN_MASK)
17906 
17907 #define SCG_FIRCCSR_FIRCREGOFF_MASK              (0x8U)
17908 #define SCG_FIRCCSR_FIRCREGOFF_SHIFT             (3U)
17909 /*! FIRCREGOFF - Fast IRC Regulator Enable
17910  *  0b0..Fast IRC Regulator is enabled.
17911  *  0b1..Fast IRC Regulator is disabled.
17912  */
17913 #define SCG_FIRCCSR_FIRCREGOFF(x)                (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCREGOFF_SHIFT)) & SCG_FIRCCSR_FIRCREGOFF_MASK)
17914 
17915 #define SCG_FIRCCSR_FIRCTREN_MASK                (0x100U)
17916 #define SCG_FIRCCSR_FIRCTREN_SHIFT               (8U)
17917 /*! FIRCTREN - Fast IRC Trim Enable
17918  *  0b0..Disable trimming Fast IRC to an external clock source
17919  *  0b1..Enable trimming Fast IRC to an external clock source
17920  */
17921 #define SCG_FIRCCSR_FIRCTREN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCTREN_SHIFT)) & SCG_FIRCCSR_FIRCTREN_MASK)
17922 
17923 #define SCG_FIRCCSR_FIRCTRUP_MASK                (0x200U)
17924 #define SCG_FIRCCSR_FIRCTRUP_SHIFT               (9U)
17925 /*! FIRCTRUP - Fast IRC Trim Update
17926  *  0b0..Disable Fast IRC trimming updates
17927  *  0b1..Enable Fast IRC trimming updates
17928  */
17929 #define SCG_FIRCCSR_FIRCTRUP(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCTRUP_SHIFT)) & SCG_FIRCCSR_FIRCTRUP_MASK)
17930 
17931 #define SCG_FIRCCSR_LK_MASK                      (0x800000U)
17932 #define SCG_FIRCCSR_LK_SHIFT                     (23U)
17933 /*! LK - Lock Register
17934  *  0b0..Control Status Register can be written.
17935  *  0b1..Control Status Register cannot be written.
17936  */
17937 #define SCG_FIRCCSR_LK(x)                        (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_LK_SHIFT)) & SCG_FIRCCSR_LK_MASK)
17938 
17939 #define SCG_FIRCCSR_FIRCVLD_MASK                 (0x1000000U)
17940 #define SCG_FIRCCSR_FIRCVLD_SHIFT                (24U)
17941 /*! FIRCVLD - Fast IRC Valid status
17942  *  0b0..Fast IRC is not enabled or clock is not valid.
17943  *  0b1..Fast IRC is enabled and output clock is valid. The clock is valid after there is an output clock from the FIRC analog.
17944  */
17945 #define SCG_FIRCCSR_FIRCVLD(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCVLD_SHIFT)) & SCG_FIRCCSR_FIRCVLD_MASK)
17946 
17947 #define SCG_FIRCCSR_FIRCSEL_MASK                 (0x2000000U)
17948 #define SCG_FIRCCSR_FIRCSEL_SHIFT                (25U)
17949 /*! FIRCSEL - Fast IRC Selected status
17950  *  0b0..Fast IRC is not the system clock source
17951  *  0b1..Fast IRC is the system clock source
17952  */
17953 #define SCG_FIRCCSR_FIRCSEL(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCSEL_SHIFT)) & SCG_FIRCCSR_FIRCSEL_MASK)
17954 
17955 #define SCG_FIRCCSR_FIRCERR_MASK                 (0x4000000U)
17956 #define SCG_FIRCCSR_FIRCERR_SHIFT                (26U)
17957 /*! FIRCERR - Fast IRC Clock Error
17958  *  0b0..Error not detected with the Fast IRC trimming.
17959  *  0b1..Error detected with the Fast IRC trimming.
17960  */
17961 #define SCG_FIRCCSR_FIRCERR(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCERR_SHIFT)) & SCG_FIRCCSR_FIRCERR_MASK)
17962 /*! @} */
17963 
17964 /*! @name FIRCDIV - Fast IRC Divide Register */
17965 /*! @{ */
17966 
17967 #define SCG_FIRCDIV_FIRCDIV1_MASK                (0x7U)
17968 #define SCG_FIRCDIV_FIRCDIV1_SHIFT               (0U)
17969 /*! FIRCDIV1 - Fast IRC Clock Divide 1
17970  *  0b000..Output disabled
17971  *  0b001..Divide by 1
17972  *  0b010..Divide by 2
17973  *  0b011..Divide by 4
17974  *  0b100..Divide by 8
17975  *  0b101..Divide by 16
17976  *  0b110..Divide by 32
17977  *  0b111..Divide by 64
17978  */
17979 #define SCG_FIRCDIV_FIRCDIV1(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV1_SHIFT)) & SCG_FIRCDIV_FIRCDIV1_MASK)
17980 
17981 #define SCG_FIRCDIV_FIRCDIV2_MASK                (0x700U)
17982 #define SCG_FIRCDIV_FIRCDIV2_SHIFT               (8U)
17983 /*! FIRCDIV2 - Fast IRC Clock Divide 2
17984  *  0b000..Output disabled
17985  *  0b001..Divide by 1
17986  *  0b010..Divide by 2
17987  *  0b011..Divide by 4
17988  *  0b100..Divide by 8
17989  *  0b101..Divide by 16
17990  *  0b110..Divide by 32
17991  *  0b111..Divide by 64
17992  */
17993 #define SCG_FIRCDIV_FIRCDIV2(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV2_SHIFT)) & SCG_FIRCDIV_FIRCDIV2_MASK)
17994 
17995 #define SCG_FIRCDIV_FIRCDIV3_MASK                (0x70000U)
17996 #define SCG_FIRCDIV_FIRCDIV3_SHIFT               (16U)
17997 /*! FIRCDIV3 - Fast IRC Clock Divider 3
17998  *  0b000..Clock disabled
17999  *  0b001..Divide by 1
18000  *  0b010..Divide by 2
18001  *  0b011..Divide by 4
18002  *  0b100..Divide by 8
18003  *  0b101..Divide by 16
18004  *  0b110..Divide by 32
18005  *  0b111..Divide by 64
18006  */
18007 #define SCG_FIRCDIV_FIRCDIV3(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV3_SHIFT)) & SCG_FIRCDIV_FIRCDIV3_MASK)
18008 /*! @} */
18009 
18010 /*! @name FIRCCFG - Fast IRC Configuration Register */
18011 /*! @{ */
18012 
18013 #define SCG_FIRCCFG_RANGE_MASK                   (0x3U)
18014 #define SCG_FIRCCFG_RANGE_SHIFT                  (0U)
18015 /*! RANGE - Frequency Range
18016  *  0b00..Fast IRC is trimmed to 48 MHz
18017  *  0b01..Fast IRC is trimmed to 52 MHz
18018  *  0b10..Fast IRC is trimmed to 56 MHz
18019  *  0b11..Fast IRC is trimmed to 60 MHz
18020  */
18021 #define SCG_FIRCCFG_RANGE(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCFG_RANGE_SHIFT)) & SCG_FIRCCFG_RANGE_MASK)
18022 /*! @} */
18023 
18024 /*! @name FIRCTCFG - Fast IRC Trim Configuration Register */
18025 /*! @{ */
18026 
18027 #define SCG_FIRCTCFG_TRIMSRC_MASK                (0x3U)
18028 #define SCG_FIRCTCFG_TRIMSRC_SHIFT               (0U)
18029 /*! TRIMSRC - Trim Source
18030  *  0b00..Reserved
18031  *  0b01..Reserved
18032  *  0b10..Reserved
18033  *  0b11..RTC OSC (32.768 kHz)
18034  */
18035 #define SCG_FIRCTCFG_TRIMSRC(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_FIRCTCFG_TRIMSRC_SHIFT)) & SCG_FIRCTCFG_TRIMSRC_MASK)
18036 /*! @} */
18037 
18038 /*! @name FIRCSTAT - Fast IRC Status Register */
18039 /*! @{ */
18040 
18041 #define SCG_FIRCSTAT_TRIMFINE_MASK               (0x7FU)
18042 #define SCG_FIRCSTAT_TRIMFINE_SHIFT              (0U)
18043 /*! TRIMFINE - Trim Fine */
18044 #define SCG_FIRCSTAT_TRIMFINE(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_FIRCSTAT_TRIMFINE_SHIFT)) & SCG_FIRCSTAT_TRIMFINE_MASK)
18045 
18046 #define SCG_FIRCSTAT_TRIMCOAR_MASK               (0x3F00U)
18047 #define SCG_FIRCSTAT_TRIMCOAR_SHIFT              (8U)
18048 /*! TRIMCOAR - Trim Coarse */
18049 #define SCG_FIRCSTAT_TRIMCOAR(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_FIRCSTAT_TRIMCOAR_SHIFT)) & SCG_FIRCSTAT_TRIMCOAR_MASK)
18050 /*! @} */
18051 
18052 /*! @name ROSCCSR - RTC OSC Control Status Register */
18053 /*! @{ */
18054 
18055 #define SCG_ROSCCSR_ROSCCM_MASK                  (0x10000U)
18056 #define SCG_ROSCCSR_ROSCCM_SHIFT                 (16U)
18057 /*! ROSCCM - RTC OSC Clock Monitor
18058  *  0b0..RTC OSC Clock Monitor is disabled
18059  *  0b1..RTC OSC Clock Monitor is enabled
18060  */
18061 #define SCG_ROSCCSR_ROSCCM(x)                    (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCCM_SHIFT)) & SCG_ROSCCSR_ROSCCM_MASK)
18062 
18063 #define SCG_ROSCCSR_ROSCCMRE_MASK                (0x20000U)
18064 #define SCG_ROSCCSR_ROSCCMRE_SHIFT               (17U)
18065 /*! ROSCCMRE - RTC OSC Clock Monitor Reset Enable
18066  *  0b0..Clock Monitor generates interrupt when error detected
18067  *  0b1..Clock Monitor generates reset when error detected
18068  */
18069 #define SCG_ROSCCSR_ROSCCMRE(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCCMRE_SHIFT)) & SCG_ROSCCSR_ROSCCMRE_MASK)
18070 
18071 #define SCG_ROSCCSR_LK_MASK                      (0x800000U)
18072 #define SCG_ROSCCSR_LK_SHIFT                     (23U)
18073 /*! LK - Lock Register
18074  *  0b0..Control Status Register can be written.
18075  *  0b1..Control Status Register cannot be written.
18076  */
18077 #define SCG_ROSCCSR_LK(x)                        (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_LK_SHIFT)) & SCG_ROSCCSR_LK_MASK)
18078 
18079 #define SCG_ROSCCSR_ROSCVLD_MASK                 (0x1000000U)
18080 #define SCG_ROSCCSR_ROSCVLD_SHIFT                (24U)
18081 /*! ROSCVLD - RTC OSC Valid
18082  *  0b0..RTC OSC is not enabled or clock is not valid
18083  *  0b1..RTC OSC is enabled and output clock is valid
18084  */
18085 #define SCG_ROSCCSR_ROSCVLD(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCVLD_SHIFT)) & SCG_ROSCCSR_ROSCVLD_MASK)
18086 
18087 #define SCG_ROSCCSR_ROSCSEL_MASK                 (0x2000000U)
18088 #define SCG_ROSCCSR_ROSCSEL_SHIFT                (25U)
18089 /*! ROSCSEL - RTC OSC Selected
18090  *  0b0..RTC OSC is not the system clock source
18091  *  0b1..RTC OSC is the system clock source
18092  */
18093 #define SCG_ROSCCSR_ROSCSEL(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCSEL_SHIFT)) & SCG_ROSCCSR_ROSCSEL_MASK)
18094 
18095 #define SCG_ROSCCSR_ROSCERR_MASK                 (0x4000000U)
18096 #define SCG_ROSCCSR_ROSCERR_SHIFT                (26U)
18097 /*! ROSCERR - RTC OSC Clock Error
18098  *  0b0..RTC OSC Clock Monitor is disabled or has not detected an error
18099  *  0b1..RTC OSC Clock Monitor is enabled and detected an RTC loss of clock error
18100  */
18101 #define SCG_ROSCCSR_ROSCERR(x)                   (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCERR_SHIFT)) & SCG_ROSCCSR_ROSCERR_MASK)
18102 /*! @} */
18103 
18104 /*! @name LPFLLCSR - Low Power FLL Control Status Register */
18105 /*! @{ */
18106 
18107 #define SCG_LPFLLCSR_LPFLLEN_MASK                (0x1U)
18108 #define SCG_LPFLLCSR_LPFLLEN_SHIFT               (0U)
18109 /*! LPFLLEN - LPFLL Enable
18110  *  0b0..LPFLL is disabled
18111  *  0b1..LPFLL is enabled
18112  */
18113 #define SCG_LPFLLCSR_LPFLLEN(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLEN_SHIFT)) & SCG_LPFLLCSR_LPFLLEN_MASK)
18114 
18115 #define SCG_LPFLLCSR_LPFLLSTEN_MASK              (0x2U)
18116 #define SCG_LPFLLCSR_LPFLLSTEN_SHIFT             (1U)
18117 /*! LPFLLSTEN - LPFLL Stop Enable
18118  *  0b0..LPFLL is disabled in Stop modes.
18119  *  0b1..LPFLL is enabled in Stop modes
18120  */
18121 #define SCG_LPFLLCSR_LPFLLSTEN(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLSTEN_SHIFT)) & SCG_LPFLLCSR_LPFLLSTEN_MASK)
18122 
18123 #define SCG_LPFLLCSR_LPFLLTREN_MASK              (0x100U)
18124 #define SCG_LPFLLCSR_LPFLLTREN_SHIFT             (8U)
18125 /*! LPFLLTREN - LPFLL Trim Enable
18126  *  0b0..Disable trimming LPFLL to an reference clock source
18127  *  0b1..Enable trimming LPFLL to an reference clock source
18128  */
18129 #define SCG_LPFLLCSR_LPFLLTREN(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTREN_SHIFT)) & SCG_LPFLLCSR_LPFLLTREN_MASK)
18130 
18131 #define SCG_LPFLLCSR_LPFLLTRUP_MASK              (0x200U)
18132 #define SCG_LPFLLCSR_LPFLLTRUP_SHIFT             (9U)
18133 /*! LPFLLTRUP - LPFLL Trim Update
18134  *  0b0..Disable LPFLL trimming updates. LPFLL frequency determined by AUTOTRIM written value.
18135  *  0b1..Enable LPFLL trimming updates. LPFLL frequency determined by reference clock multiplication
18136  */
18137 #define SCG_LPFLLCSR_LPFLLTRUP(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTRUP_SHIFT)) & SCG_LPFLLCSR_LPFLLTRUP_MASK)
18138 
18139 #define SCG_LPFLLCSR_LPFLLTRMLOCK_MASK           (0x400U)
18140 #define SCG_LPFLLCSR_LPFLLTRMLOCK_SHIFT          (10U)
18141 /*! LPFLLTRMLOCK - LPFLL Trim LOCK
18142  *  0b0..LPFLL not locked
18143  *  0b1..LPFLL trimmed and locked
18144  */
18145 #define SCG_LPFLLCSR_LPFLLTRMLOCK(x)             (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTRMLOCK_SHIFT)) & SCG_LPFLLCSR_LPFLLTRMLOCK_MASK)
18146 
18147 #define SCG_LPFLLCSR_LPFLLCM_MASK                (0x10000U)
18148 #define SCG_LPFLLCSR_LPFLLCM_SHIFT               (16U)
18149 /*! LPFLLCM - LPFLL Clock Monitor
18150  *  0b0..LPFLL Clock Monitor is disabled
18151  *  0b1..LPFLL Clock Monitor is enabled
18152  */
18153 #define SCG_LPFLLCSR_LPFLLCM(x)                  (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLCM_SHIFT)) & SCG_LPFLLCSR_LPFLLCM_MASK)
18154 
18155 #define SCG_LPFLLCSR_LPFLLCMRE_MASK              (0x20000U)
18156 #define SCG_LPFLLCSR_LPFLLCMRE_SHIFT             (17U)
18157 /*! LPFLLCMRE - LPFLL Clock Monitor Reset Enable
18158  *  0b0..Clock Monitor generates interrupt when error detected
18159  *  0b1..Clock Monitor generates reset when error detected
18160  */
18161 #define SCG_LPFLLCSR_LPFLLCMRE(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLCMRE_SHIFT)) & SCG_LPFLLCSR_LPFLLCMRE_MASK)
18162 
18163 #define SCG_LPFLLCSR_LK_MASK                     (0x800000U)
18164 #define SCG_LPFLLCSR_LK_SHIFT                    (23U)
18165 /*! LK - Lock Register
18166  *  0b0..Control Status Register can be written.
18167  *  0b1..Control Status Register cannot be written.
18168  */
18169 #define SCG_LPFLLCSR_LK(x)                       (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LK_SHIFT)) & SCG_LPFLLCSR_LK_MASK)
18170 
18171 #define SCG_LPFLLCSR_LPFLLVLD_MASK               (0x1000000U)
18172 #define SCG_LPFLLCSR_LPFLLVLD_SHIFT              (24U)
18173 /*! LPFLLVLD - LPFLL Valid
18174  *  0b0..LPFLL is not enabled or clock is not valid.
18175  *  0b1..LPFLL is enabled and output clock is valid.
18176  */
18177 #define SCG_LPFLLCSR_LPFLLVLD(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLVLD_SHIFT)) & SCG_LPFLLCSR_LPFLLVLD_MASK)
18178 
18179 #define SCG_LPFLLCSR_LPFLLSEL_MASK               (0x2000000U)
18180 #define SCG_LPFLLCSR_LPFLLSEL_SHIFT              (25U)
18181 /*! LPFLLSEL - LPFLL Selected
18182  *  0b0..LPFLL is not the system clock source
18183  *  0b1..LPFLL is the system clock source
18184  */
18185 #define SCG_LPFLLCSR_LPFLLSEL(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLSEL_SHIFT)) & SCG_LPFLLCSR_LPFLLSEL_MASK)
18186 
18187 #define SCG_LPFLLCSR_LPFLLERR_MASK               (0x4000000U)
18188 #define SCG_LPFLLCSR_LPFLLERR_SHIFT              (26U)
18189 /*! LPFLLERR - LPFLL Clock Error
18190  *  0b0..Error not detected with the LPFLL trimming.
18191  *  0b1..Error detected with the LPFLL trimming.
18192  */
18193 #define SCG_LPFLLCSR_LPFLLERR(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLERR_SHIFT)) & SCG_LPFLLCSR_LPFLLERR_MASK)
18194 /*! @} */
18195 
18196 /*! @name LPFLLDIV - Low Power FLL Divide Register */
18197 /*! @{ */
18198 
18199 #define SCG_LPFLLDIV_LPFLLDIV1_MASK              (0x7U)
18200 #define SCG_LPFLLDIV_LPFLLDIV1_SHIFT             (0U)
18201 /*! LPFLLDIV1 - LPFLL Clock Divide 1
18202  *  0b000..Output disabled
18203  *  0b001..Divide by 1
18204  *  0b010..Divide by 2
18205  *  0b011..Divide by 4
18206  *  0b100..Divide by 8
18207  *  0b101..Divide by 16
18208  *  0b110..Divide by 32
18209  *  0b111..Divide by 64
18210  */
18211 #define SCG_LPFLLDIV_LPFLLDIV1(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV1_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV1_MASK)
18212 
18213 #define SCG_LPFLLDIV_LPFLLDIV2_MASK              (0x700U)
18214 #define SCG_LPFLLDIV_LPFLLDIV2_SHIFT             (8U)
18215 /*! LPFLLDIV2 - LPFLL Clock Divide 2
18216  *  0b000..Output disabled
18217  *  0b001..Divide by 1
18218  *  0b010..Divide by 2
18219  *  0b011..Divide by 4
18220  *  0b100..Divide by 8
18221  *  0b101..Divide by 16
18222  *  0b110..Divide by 32
18223  *  0b111..Divide by 64
18224  */
18225 #define SCG_LPFLLDIV_LPFLLDIV2(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV2_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV2_MASK)
18226 
18227 #define SCG_LPFLLDIV_LPFLLDIV3_MASK              (0x70000U)
18228 #define SCG_LPFLLDIV_LPFLLDIV3_SHIFT             (16U)
18229 /*! LPFLLDIV3 - LPFLL Clock Divide 3
18230  *  0b000..Clock disabled
18231  *  0b001..Divide by 1
18232  *  0b010..Divide by 2
18233  *  0b011..Divide by 4
18234  *  0b100..Divide by 8
18235  *  0b101..Divide by 16
18236  *  0b110..Divide by 32
18237  *  0b111..Divide by 64
18238  */
18239 #define SCG_LPFLLDIV_LPFLLDIV3(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV3_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV3_MASK)
18240 /*! @} */
18241 
18242 /*! @name LPFLLCFG - Low Power FLL Configuration Register */
18243 /*! @{ */
18244 
18245 #define SCG_LPFLLCFG_FSEL_MASK                   (0x3U)
18246 #define SCG_LPFLLCFG_FSEL_SHIFT                  (0U)
18247 /*! FSEL - Frequency Select
18248  *  0b00..LPFLL is trimmed to 48 MHz.
18249  *  0b01..LPFLL is trimmed to 72 MHz.
18250  *  0b10..Reserved
18251  *  0b11..Reserved
18252  */
18253 #define SCG_LPFLLCFG_FSEL(x)                     (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCFG_FSEL_SHIFT)) & SCG_LPFLLCFG_FSEL_MASK)
18254 /*! @} */
18255 
18256 /*! @name LPFLLTCFG - Low Power FLL Trim Configuration Register */
18257 /*! @{ */
18258 
18259 #define SCG_LPFLLTCFG_TRIMSRC_MASK               (0x3U)
18260 #define SCG_LPFLLTCFG_TRIMSRC_SHIFT              (0U)
18261 /*! TRIMSRC - Trim Source
18262  *  0b00..SIRC
18263  *  0b01..FIRC
18264  *  0b10..Reserved
18265  *  0b11..RTC OSC
18266  */
18267 #define SCG_LPFLLTCFG_TRIMSRC(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_TRIMSRC_SHIFT)) & SCG_LPFLLTCFG_TRIMSRC_MASK)
18268 
18269 #define SCG_LPFLLTCFG_TRIMDIV_MASK               (0x1F00U)
18270 #define SCG_LPFLLTCFG_TRIMDIV_SHIFT              (8U)
18271 /*! TRIMDIV - LPFLL Trim Predivide */
18272 #define SCG_LPFLLTCFG_TRIMDIV(x)                 (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_TRIMDIV_SHIFT)) & SCG_LPFLLTCFG_TRIMDIV_MASK)
18273 
18274 #define SCG_LPFLLTCFG_LOCKW2LSB_MASK             (0x10000U)
18275 #define SCG_LPFLLTCFG_LOCKW2LSB_SHIFT            (16U)
18276 /*! LOCKW2LSB - Lock LPFLL with 2 LSBS
18277  *  0b0..LPFLL locks within 1LSB (0.4%)
18278  *  0b1..LPFLL locks within 2LSB (0.8%)
18279  */
18280 #define SCG_LPFLLTCFG_LOCKW2LSB(x)               (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_LOCKW2LSB_SHIFT)) & SCG_LPFLLTCFG_LOCKW2LSB_MASK)
18281 /*! @} */
18282 
18283 /*! @name LPFLLSTAT - Low Power FLL Status Register */
18284 /*! @{ */
18285 
18286 #define SCG_LPFLLSTAT_AUTOTRIM_MASK              (0xFFU)
18287 #define SCG_LPFLLSTAT_AUTOTRIM_SHIFT             (0U)
18288 /*! AUTOTRIM - Auto Tune Trim Status */
18289 #define SCG_LPFLLSTAT_AUTOTRIM(x)                (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLSTAT_AUTOTRIM_SHIFT)) & SCG_LPFLLSTAT_AUTOTRIM_MASK)
18290 /*! @} */
18291 
18292 
18293 /*!
18294  * @}
18295  */ /* end of group SCG_Register_Masks */
18296 
18297 
18298 /* SCG - Peripheral instance base addresses */
18299 /** Peripheral SCG base address */
18300 #define SCG_BASE                                 (0x4002C000u)
18301 /** Peripheral SCG base pointer */
18302 #define SCG                                      ((SCG_Type *)SCG_BASE)
18303 /** Array initializer of SCG peripheral base addresses */
18304 #define SCG_BASE_ADDRS                           { SCG_BASE }
18305 /** Array initializer of SCG peripheral base pointers */
18306 #define SCG_BASE_PTRS                            { SCG }
18307 /** Interrupt vectors for the SCG peripheral type */
18308 #define SCG_IRQS                                 { SCG_IRQn }
18309 
18310 /*!
18311  * @}
18312  */ /* end of group SCG_Peripheral_Access_Layer */
18313 
18314 
18315 /* ----------------------------------------------------------------------------
18316    -- SEMA42 Peripheral Access Layer
18317    ---------------------------------------------------------------------------- */
18318 
18319 /*!
18320  * @addtogroup SEMA42_Peripheral_Access_Layer SEMA42 Peripheral Access Layer
18321  * @{
18322  */
18323 
18324 /** SEMA42 - Register Layout Typedef */
18325 typedef struct {
18326   __IO uint8_t GATE3;                              /**< Gate Register, offset: 0x0 */
18327   __IO uint8_t GATE2;                              /**< Gate Register, offset: 0x1 */
18328   __IO uint8_t GATE1;                              /**< Gate Register, offset: 0x2 */
18329   __IO uint8_t GATE0;                              /**< Gate Register, offset: 0x3 */
18330   __IO uint8_t GATE7;                              /**< Gate Register, offset: 0x4 */
18331   __IO uint8_t GATE6;                              /**< Gate Register, offset: 0x5 */
18332   __IO uint8_t GATE5;                              /**< Gate Register, offset: 0x6 */
18333   __IO uint8_t GATE4;                              /**< Gate Register, offset: 0x7 */
18334   __IO uint8_t GATE11;                             /**< Gate Register, offset: 0x8 */
18335   __IO uint8_t GATE10;                             /**< Gate Register, offset: 0x9 */
18336   __IO uint8_t GATE9;                              /**< Gate Register, offset: 0xA */
18337   __IO uint8_t GATE8;                              /**< Gate Register, offset: 0xB */
18338   __IO uint8_t GATE15;                             /**< Gate Register, offset: 0xC */
18339   __IO uint8_t GATE14;                             /**< Gate Register, offset: 0xD */
18340   __IO uint8_t GATE13;                             /**< Gate Register, offset: 0xE */
18341   __IO uint8_t GATE12;                             /**< Gate Register, offset: 0xF */
18342        uint8_t RESERVED_0[50];
18343   union {                                          /* offset: 0x42 */
18344     __I  uint16_t RSTGT_R;                           /**< Reset Gate Read, offset: 0x42 */
18345     __O  uint16_t RSTGT_W;                           /**< Reset Gate Write, offset: 0x42 */
18346   };
18347 } SEMA42_Type;
18348 
18349 /* ----------------------------------------------------------------------------
18350    -- SEMA42 Register Masks
18351    ---------------------------------------------------------------------------- */
18352 
18353 /*!
18354  * @addtogroup SEMA42_Register_Masks SEMA42 Register Masks
18355  * @{
18356  */
18357 
18358 /*! @name GATE3 - Gate Register */
18359 /*! @{ */
18360 
18361 #define SEMA42_GATE3_GTFSM_MASK                  (0xFU)
18362 #define SEMA42_GATE3_GTFSM_SHIFT                 (0U)
18363 /*! GTFSM - GTFSM
18364  *  0b0000..The gate is unlocked (free).
18365  *  0b0001..The gate has been locked by processor 0.
18366  *  0b0010..The gate has been locked by processor 1.
18367  *  0b0011..The gate has been locked by processor 2.
18368  *  0b0100..The gate has been locked by processor 3.
18369  *  0b0101..The gate has been locked by processor 4.
18370  *  0b0110..The gate has been locked by processor 5.
18371  *  0b0111..The gate has been locked by processor 6.
18372  *  0b1000..The gate has been locked by processor 7.
18373  *  0b1001..The gate has been locked by processor 8.
18374  *  0b1010..The gate has been locked by processor 9.
18375  *  0b1011..The gate has been locked by processor 10.
18376  *  0b1100..The gate has been locked by processor 11.
18377  *  0b1101..The gate has been locked by processor 12.
18378  *  0b1110..The gate has been locked by processor 13.
18379  *  0b1111..The gate has been locked by processor 14.
18380  */
18381 #define SEMA42_GATE3_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE3_GTFSM_SHIFT)) & SEMA42_GATE3_GTFSM_MASK)
18382 /*! @} */
18383 
18384 /*! @name GATE2 - Gate Register */
18385 /*! @{ */
18386 
18387 #define SEMA42_GATE2_GTFSM_MASK                  (0xFU)
18388 #define SEMA42_GATE2_GTFSM_SHIFT                 (0U)
18389 /*! GTFSM - GTFSM
18390  *  0b0000..The gate is unlocked (free).
18391  *  0b0001..The gate has been locked by processor 0.
18392  *  0b0010..The gate has been locked by processor 1.
18393  *  0b0011..The gate has been locked by processor 2.
18394  *  0b0100..The gate has been locked by processor 3.
18395  *  0b0101..The gate has been locked by processor 4.
18396  *  0b0110..The gate has been locked by processor 5.
18397  *  0b0111..The gate has been locked by processor 6.
18398  *  0b1000..The gate has been locked by processor 7.
18399  *  0b1001..The gate has been locked by processor 8.
18400  *  0b1010..The gate has been locked by processor 9.
18401  *  0b1011..The gate has been locked by processor 10.
18402  *  0b1100..The gate has been locked by processor 11.
18403  *  0b1101..The gate has been locked by processor 12.
18404  *  0b1110..The gate has been locked by processor 13.
18405  *  0b1111..The gate has been locked by processor 14.
18406  */
18407 #define SEMA42_GATE2_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE2_GTFSM_SHIFT)) & SEMA42_GATE2_GTFSM_MASK)
18408 /*! @} */
18409 
18410 /*! @name GATE1 - Gate Register */
18411 /*! @{ */
18412 
18413 #define SEMA42_GATE1_GTFSM_MASK                  (0xFU)
18414 #define SEMA42_GATE1_GTFSM_SHIFT                 (0U)
18415 /*! GTFSM - GTFSM
18416  *  0b0000..The gate is unlocked (free).
18417  *  0b0001..The gate has been locked by processor 0.
18418  *  0b0010..The gate has been locked by processor 1.
18419  *  0b0011..The gate has been locked by processor 2.
18420  *  0b0100..The gate has been locked by processor 3.
18421  *  0b0101..The gate has been locked by processor 4.
18422  *  0b0110..The gate has been locked by processor 5.
18423  *  0b0111..The gate has been locked by processor 6.
18424  *  0b1000..The gate has been locked by processor 7.
18425  *  0b1001..The gate has been locked by processor 8.
18426  *  0b1010..The gate has been locked by processor 9.
18427  *  0b1011..The gate has been locked by processor 10.
18428  *  0b1100..The gate has been locked by processor 11.
18429  *  0b1101..The gate has been locked by processor 12.
18430  *  0b1110..The gate has been locked by processor 13.
18431  *  0b1111..The gate has been locked by processor 14.
18432  */
18433 #define SEMA42_GATE1_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE1_GTFSM_SHIFT)) & SEMA42_GATE1_GTFSM_MASK)
18434 /*! @} */
18435 
18436 /*! @name GATE0 - Gate Register */
18437 /*! @{ */
18438 
18439 #define SEMA42_GATE0_GTFSM_MASK                  (0xFU)
18440 #define SEMA42_GATE0_GTFSM_SHIFT                 (0U)
18441 /*! GTFSM - GTFSM
18442  *  0b0000..The gate is unlocked (free).
18443  *  0b0001..The gate has been locked by processor 0.
18444  *  0b0010..The gate has been locked by processor 1.
18445  *  0b0011..The gate has been locked by processor 2.
18446  *  0b0100..The gate has been locked by processor 3.
18447  *  0b0101..The gate has been locked by processor 4.
18448  *  0b0110..The gate has been locked by processor 5.
18449  *  0b0111..The gate has been locked by processor 6.
18450  *  0b1000..The gate has been locked by processor 7.
18451  *  0b1001..The gate has been locked by processor 8.
18452  *  0b1010..The gate has been locked by processor 9.
18453  *  0b1011..The gate has been locked by processor 10.
18454  *  0b1100..The gate has been locked by processor 11.
18455  *  0b1101..The gate has been locked by processor 12.
18456  *  0b1110..The gate has been locked by processor 13.
18457  *  0b1111..The gate has been locked by processor 14.
18458  */
18459 #define SEMA42_GATE0_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE0_GTFSM_SHIFT)) & SEMA42_GATE0_GTFSM_MASK)
18460 /*! @} */
18461 
18462 /*! @name GATE7 - Gate Register */
18463 /*! @{ */
18464 
18465 #define SEMA42_GATE7_GTFSM_MASK                  (0xFU)
18466 #define SEMA42_GATE7_GTFSM_SHIFT                 (0U)
18467 /*! GTFSM - GTFSM
18468  *  0b0000..The gate is unlocked (free).
18469  *  0b0001..The gate has been locked by processor 0.
18470  *  0b0010..The gate has been locked by processor 1.
18471  *  0b0011..The gate has been locked by processor 2.
18472  *  0b0100..The gate has been locked by processor 3.
18473  *  0b0101..The gate has been locked by processor 4.
18474  *  0b0110..The gate has been locked by processor 5.
18475  *  0b0111..The gate has been locked by processor 6.
18476  *  0b1000..The gate has been locked by processor 7.
18477  *  0b1001..The gate has been locked by processor 8.
18478  *  0b1010..The gate has been locked by processor 9.
18479  *  0b1011..The gate has been locked by processor 10.
18480  *  0b1100..The gate has been locked by processor 11.
18481  *  0b1101..The gate has been locked by processor 12.
18482  *  0b1110..The gate has been locked by processor 13.
18483  *  0b1111..The gate has been locked by processor 14.
18484  */
18485 #define SEMA42_GATE7_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE7_GTFSM_SHIFT)) & SEMA42_GATE7_GTFSM_MASK)
18486 /*! @} */
18487 
18488 /*! @name GATE6 - Gate Register */
18489 /*! @{ */
18490 
18491 #define SEMA42_GATE6_GTFSM_MASK                  (0xFU)
18492 #define SEMA42_GATE6_GTFSM_SHIFT                 (0U)
18493 /*! GTFSM - GTFSM
18494  *  0b0000..The gate is unlocked (free).
18495  *  0b0001..The gate has been locked by processor 0.
18496  *  0b0010..The gate has been locked by processor 1.
18497  *  0b0011..The gate has been locked by processor 2.
18498  *  0b0100..The gate has been locked by processor 3.
18499  *  0b0101..The gate has been locked by processor 4.
18500  *  0b0110..The gate has been locked by processor 5.
18501  *  0b0111..The gate has been locked by processor 6.
18502  *  0b1000..The gate has been locked by processor 7.
18503  *  0b1001..The gate has been locked by processor 8.
18504  *  0b1010..The gate has been locked by processor 9.
18505  *  0b1011..The gate has been locked by processor 10.
18506  *  0b1100..The gate has been locked by processor 11.
18507  *  0b1101..The gate has been locked by processor 12.
18508  *  0b1110..The gate has been locked by processor 13.
18509  *  0b1111..The gate has been locked by processor 14.
18510  */
18511 #define SEMA42_GATE6_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE6_GTFSM_SHIFT)) & SEMA42_GATE6_GTFSM_MASK)
18512 /*! @} */
18513 
18514 /*! @name GATE5 - Gate Register */
18515 /*! @{ */
18516 
18517 #define SEMA42_GATE5_GTFSM_MASK                  (0xFU)
18518 #define SEMA42_GATE5_GTFSM_SHIFT                 (0U)
18519 /*! GTFSM - GTFSM
18520  *  0b0000..The gate is unlocked (free).
18521  *  0b0001..The gate has been locked by processor 0.
18522  *  0b0010..The gate has been locked by processor 1.
18523  *  0b0011..The gate has been locked by processor 2.
18524  *  0b0100..The gate has been locked by processor 3.
18525  *  0b0101..The gate has been locked by processor 4.
18526  *  0b0110..The gate has been locked by processor 5.
18527  *  0b0111..The gate has been locked by processor 6.
18528  *  0b1000..The gate has been locked by processor 7.
18529  *  0b1001..The gate has been locked by processor 8.
18530  *  0b1010..The gate has been locked by processor 9.
18531  *  0b1011..The gate has been locked by processor 10.
18532  *  0b1100..The gate has been locked by processor 11.
18533  *  0b1101..The gate has been locked by processor 12.
18534  *  0b1110..The gate has been locked by processor 13.
18535  *  0b1111..The gate has been locked by processor 14.
18536  */
18537 #define SEMA42_GATE5_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE5_GTFSM_SHIFT)) & SEMA42_GATE5_GTFSM_MASK)
18538 /*! @} */
18539 
18540 /*! @name GATE4 - Gate Register */
18541 /*! @{ */
18542 
18543 #define SEMA42_GATE4_GTFSM_MASK                  (0xFU)
18544 #define SEMA42_GATE4_GTFSM_SHIFT                 (0U)
18545 /*! GTFSM - GTFSM
18546  *  0b0000..The gate is unlocked (free).
18547  *  0b0001..The gate has been locked by processor 0.
18548  *  0b0010..The gate has been locked by processor 1.
18549  *  0b0011..The gate has been locked by processor 2.
18550  *  0b0100..The gate has been locked by processor 3.
18551  *  0b0101..The gate has been locked by processor 4.
18552  *  0b0110..The gate has been locked by processor 5.
18553  *  0b0111..The gate has been locked by processor 6.
18554  *  0b1000..The gate has been locked by processor 7.
18555  *  0b1001..The gate has been locked by processor 8.
18556  *  0b1010..The gate has been locked by processor 9.
18557  *  0b1011..The gate has been locked by processor 10.
18558  *  0b1100..The gate has been locked by processor 11.
18559  *  0b1101..The gate has been locked by processor 12.
18560  *  0b1110..The gate has been locked by processor 13.
18561  *  0b1111..The gate has been locked by processor 14.
18562  */
18563 #define SEMA42_GATE4_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE4_GTFSM_SHIFT)) & SEMA42_GATE4_GTFSM_MASK)
18564 /*! @} */
18565 
18566 /*! @name GATE11 - Gate Register */
18567 /*! @{ */
18568 
18569 #define SEMA42_GATE11_GTFSM_MASK                 (0xFU)
18570 #define SEMA42_GATE11_GTFSM_SHIFT                (0U)
18571 /*! GTFSM - GTFSM
18572  *  0b0000..The gate is unlocked (free).
18573  *  0b0001..The gate has been locked by processor 0.
18574  *  0b0010..The gate has been locked by processor 1.
18575  *  0b0011..The gate has been locked by processor 2.
18576  *  0b0100..The gate has been locked by processor 3.
18577  *  0b0101..The gate has been locked by processor 4.
18578  *  0b0110..The gate has been locked by processor 5.
18579  *  0b0111..The gate has been locked by processor 6.
18580  *  0b1000..The gate has been locked by processor 7.
18581  *  0b1001..The gate has been locked by processor 8.
18582  *  0b1010..The gate has been locked by processor 9.
18583  *  0b1011..The gate has been locked by processor 10.
18584  *  0b1100..The gate has been locked by processor 11.
18585  *  0b1101..The gate has been locked by processor 12.
18586  *  0b1110..The gate has been locked by processor 13.
18587  *  0b1111..The gate has been locked by processor 14.
18588  */
18589 #define SEMA42_GATE11_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE11_GTFSM_SHIFT)) & SEMA42_GATE11_GTFSM_MASK)
18590 /*! @} */
18591 
18592 /*! @name GATE10 - Gate Register */
18593 /*! @{ */
18594 
18595 #define SEMA42_GATE10_GTFSM_MASK                 (0xFU)
18596 #define SEMA42_GATE10_GTFSM_SHIFT                (0U)
18597 /*! GTFSM - GTFSM
18598  *  0b0000..The gate is unlocked (free).
18599  *  0b0001..The gate has been locked by processor 0.
18600  *  0b0010..The gate has been locked by processor 1.
18601  *  0b0011..The gate has been locked by processor 2.
18602  *  0b0100..The gate has been locked by processor 3.
18603  *  0b0101..The gate has been locked by processor 4.
18604  *  0b0110..The gate has been locked by processor 5.
18605  *  0b0111..The gate has been locked by processor 6.
18606  *  0b1000..The gate has been locked by processor 7.
18607  *  0b1001..The gate has been locked by processor 8.
18608  *  0b1010..The gate has been locked by processor 9.
18609  *  0b1011..The gate has been locked by processor 10.
18610  *  0b1100..The gate has been locked by processor 11.
18611  *  0b1101..The gate has been locked by processor 12.
18612  *  0b1110..The gate has been locked by processor 13.
18613  *  0b1111..The gate has been locked by processor 14.
18614  */
18615 #define SEMA42_GATE10_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE10_GTFSM_SHIFT)) & SEMA42_GATE10_GTFSM_MASK)
18616 /*! @} */
18617 
18618 /*! @name GATE9 - Gate Register */
18619 /*! @{ */
18620 
18621 #define SEMA42_GATE9_GTFSM_MASK                  (0xFU)
18622 #define SEMA42_GATE9_GTFSM_SHIFT                 (0U)
18623 /*! GTFSM - GTFSM
18624  *  0b0000..The gate is unlocked (free).
18625  *  0b0001..The gate has been locked by processor 0.
18626  *  0b0010..The gate has been locked by processor 1.
18627  *  0b0011..The gate has been locked by processor 2.
18628  *  0b0100..The gate has been locked by processor 3.
18629  *  0b0101..The gate has been locked by processor 4.
18630  *  0b0110..The gate has been locked by processor 5.
18631  *  0b0111..The gate has been locked by processor 6.
18632  *  0b1000..The gate has been locked by processor 7.
18633  *  0b1001..The gate has been locked by processor 8.
18634  *  0b1010..The gate has been locked by processor 9.
18635  *  0b1011..The gate has been locked by processor 10.
18636  *  0b1100..The gate has been locked by processor 11.
18637  *  0b1101..The gate has been locked by processor 12.
18638  *  0b1110..The gate has been locked by processor 13.
18639  *  0b1111..The gate has been locked by processor 14.
18640  */
18641 #define SEMA42_GATE9_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE9_GTFSM_SHIFT)) & SEMA42_GATE9_GTFSM_MASK)
18642 /*! @} */
18643 
18644 /*! @name GATE8 - Gate Register */
18645 /*! @{ */
18646 
18647 #define SEMA42_GATE8_GTFSM_MASK                  (0xFU)
18648 #define SEMA42_GATE8_GTFSM_SHIFT                 (0U)
18649 /*! GTFSM - GTFSM
18650  *  0b0000..The gate is unlocked (free).
18651  *  0b0001..The gate has been locked by processor 0.
18652  *  0b0010..The gate has been locked by processor 1.
18653  *  0b0011..The gate has been locked by processor 2.
18654  *  0b0100..The gate has been locked by processor 3.
18655  *  0b0101..The gate has been locked by processor 4.
18656  *  0b0110..The gate has been locked by processor 5.
18657  *  0b0111..The gate has been locked by processor 6.
18658  *  0b1000..The gate has been locked by processor 7.
18659  *  0b1001..The gate has been locked by processor 8.
18660  *  0b1010..The gate has been locked by processor 9.
18661  *  0b1011..The gate has been locked by processor 10.
18662  *  0b1100..The gate has been locked by processor 11.
18663  *  0b1101..The gate has been locked by processor 12.
18664  *  0b1110..The gate has been locked by processor 13.
18665  *  0b1111..The gate has been locked by processor 14.
18666  */
18667 #define SEMA42_GATE8_GTFSM(x)                    (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE8_GTFSM_SHIFT)) & SEMA42_GATE8_GTFSM_MASK)
18668 /*! @} */
18669 
18670 /*! @name GATE15 - Gate Register */
18671 /*! @{ */
18672 
18673 #define SEMA42_GATE15_GTFSM_MASK                 (0xFU)
18674 #define SEMA42_GATE15_GTFSM_SHIFT                (0U)
18675 /*! GTFSM - GTFSM
18676  *  0b0000..The gate is unlocked (free).
18677  *  0b0001..The gate has been locked by processor 0.
18678  *  0b0010..The gate has been locked by processor 1.
18679  *  0b0011..The gate has been locked by processor 2.
18680  *  0b0100..The gate has been locked by processor 3.
18681  *  0b0101..The gate has been locked by processor 4.
18682  *  0b0110..The gate has been locked by processor 5.
18683  *  0b0111..The gate has been locked by processor 6.
18684  *  0b1000..The gate has been locked by processor 7.
18685  *  0b1001..The gate has been locked by processor 8.
18686  *  0b1010..The gate has been locked by processor 9.
18687  *  0b1011..The gate has been locked by processor 10.
18688  *  0b1100..The gate has been locked by processor 11.
18689  *  0b1101..The gate has been locked by processor 12.
18690  *  0b1110..The gate has been locked by processor 13.
18691  *  0b1111..The gate has been locked by processor 14.
18692  */
18693 #define SEMA42_GATE15_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE15_GTFSM_SHIFT)) & SEMA42_GATE15_GTFSM_MASK)
18694 /*! @} */
18695 
18696 /*! @name GATE14 - Gate Register */
18697 /*! @{ */
18698 
18699 #define SEMA42_GATE14_GTFSM_MASK                 (0xFU)
18700 #define SEMA42_GATE14_GTFSM_SHIFT                (0U)
18701 /*! GTFSM - GTFSM
18702  *  0b0000..The gate is unlocked (free).
18703  *  0b0001..The gate has been locked by processor 0.
18704  *  0b0010..The gate has been locked by processor 1.
18705  *  0b0011..The gate has been locked by processor 2.
18706  *  0b0100..The gate has been locked by processor 3.
18707  *  0b0101..The gate has been locked by processor 4.
18708  *  0b0110..The gate has been locked by processor 5.
18709  *  0b0111..The gate has been locked by processor 6.
18710  *  0b1000..The gate has been locked by processor 7.
18711  *  0b1001..The gate has been locked by processor 8.
18712  *  0b1010..The gate has been locked by processor 9.
18713  *  0b1011..The gate has been locked by processor 10.
18714  *  0b1100..The gate has been locked by processor 11.
18715  *  0b1101..The gate has been locked by processor 12.
18716  *  0b1110..The gate has been locked by processor 13.
18717  *  0b1111..The gate has been locked by processor 14.
18718  */
18719 #define SEMA42_GATE14_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE14_GTFSM_SHIFT)) & SEMA42_GATE14_GTFSM_MASK)
18720 /*! @} */
18721 
18722 /*! @name GATE13 - Gate Register */
18723 /*! @{ */
18724 
18725 #define SEMA42_GATE13_GTFSM_MASK                 (0xFU)
18726 #define SEMA42_GATE13_GTFSM_SHIFT                (0U)
18727 /*! GTFSM - GTFSM
18728  *  0b0000..The gate is unlocked (free).
18729  *  0b0001..The gate has been locked by processor 0.
18730  *  0b0010..The gate has been locked by processor 1.
18731  *  0b0011..The gate has been locked by processor 2.
18732  *  0b0100..The gate has been locked by processor 3.
18733  *  0b0101..The gate has been locked by processor 4.
18734  *  0b0110..The gate has been locked by processor 5.
18735  *  0b0111..The gate has been locked by processor 6.
18736  *  0b1000..The gate has been locked by processor 7.
18737  *  0b1001..The gate has been locked by processor 8.
18738  *  0b1010..The gate has been locked by processor 9.
18739  *  0b1011..The gate has been locked by processor 10.
18740  *  0b1100..The gate has been locked by processor 11.
18741  *  0b1101..The gate has been locked by processor 12.
18742  *  0b1110..The gate has been locked by processor 13.
18743  *  0b1111..The gate has been locked by processor 14.
18744  */
18745 #define SEMA42_GATE13_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE13_GTFSM_SHIFT)) & SEMA42_GATE13_GTFSM_MASK)
18746 /*! @} */
18747 
18748 /*! @name GATE12 - Gate Register */
18749 /*! @{ */
18750 
18751 #define SEMA42_GATE12_GTFSM_MASK                 (0xFU)
18752 #define SEMA42_GATE12_GTFSM_SHIFT                (0U)
18753 /*! GTFSM - GTFSM
18754  *  0b0000..The gate is unlocked (free).
18755  *  0b0001..The gate has been locked by processor 0.
18756  *  0b0010..The gate has been locked by processor 1.
18757  *  0b0011..The gate has been locked by processor 2.
18758  *  0b0100..The gate has been locked by processor 3.
18759  *  0b0101..The gate has been locked by processor 4.
18760  *  0b0110..The gate has been locked by processor 5.
18761  *  0b0111..The gate has been locked by processor 6.
18762  *  0b1000..The gate has been locked by processor 7.
18763  *  0b1001..The gate has been locked by processor 8.
18764  *  0b1010..The gate has been locked by processor 9.
18765  *  0b1011..The gate has been locked by processor 10.
18766  *  0b1100..The gate has been locked by processor 11.
18767  *  0b1101..The gate has been locked by processor 12.
18768  *  0b1110..The gate has been locked by processor 13.
18769  *  0b1111..The gate has been locked by processor 14.
18770  */
18771 #define SEMA42_GATE12_GTFSM(x)                   (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE12_GTFSM_SHIFT)) & SEMA42_GATE12_GTFSM_MASK)
18772 /*! @} */
18773 
18774 /*! @name RSTGT_R - Reset Gate Read */
18775 /*! @{ */
18776 
18777 #define SEMA42_RSTGT_R_RSTGTN_MASK               (0xFFU)
18778 #define SEMA42_RSTGT_R_RSTGTN_SHIFT              (0U)
18779 /*! RSTGTN - RSTGTN */
18780 #define SEMA42_RSTGT_R_RSTGTN(x)                 (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGTN_SHIFT)) & SEMA42_RSTGT_R_RSTGTN_MASK)
18781 
18782 #define SEMA42_RSTGT_R_RSTGMS_MASK               (0xF00U)
18783 #define SEMA42_RSTGT_R_RSTGMS_SHIFT              (8U)
18784 /*! RSTGMS - RSTGMS */
18785 #define SEMA42_RSTGT_R_RSTGMS(x)                 (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGMS_SHIFT)) & SEMA42_RSTGT_R_RSTGMS_MASK)
18786 
18787 #define SEMA42_RSTGT_R_RSTGSM_MASK               (0x3000U)
18788 #define SEMA42_RSTGT_R_RSTGSM_SHIFT              (12U)
18789 /*! RSTGSM - RSTGSM
18790  *  0b00..Idle, waiting for the first data pattern write.
18791  *  0b01..Waiting for the second data pattern write.
18792  *  0b10..The 2-write sequence has completed. Generate the specified gate reset(s). After the reset is performed,
18793  *        this machine returns to the idle (waiting for first data pattern write) state. The "01" state persists
18794  *        for only one clock cycle. Software cannot observe this state.
18795  *  0b11..This state encoding is never used and therefore reserved.
18796  */
18797 #define SEMA42_RSTGT_R_RSTGSM(x)                 (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGSM_SHIFT)) & SEMA42_RSTGT_R_RSTGSM_MASK)
18798 
18799 #define SEMA42_RSTGT_R_ROZ_MASK                  (0xC000U)
18800 #define SEMA42_RSTGT_R_ROZ_SHIFT                 (14U)
18801 /*! ROZ - ROZ */
18802 #define SEMA42_RSTGT_R_ROZ(x)                    (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_ROZ_SHIFT)) & SEMA42_RSTGT_R_ROZ_MASK)
18803 /*! @} */
18804 
18805 /*! @name RSTGT_W - Reset Gate Write */
18806 /*! @{ */
18807 
18808 #define SEMA42_RSTGT_W_RSTGTN_MASK               (0xFFU)
18809 #define SEMA42_RSTGT_W_RSTGTN_SHIFT              (0U)
18810 /*! RSTGTN - RSTGTN */
18811 #define SEMA42_RSTGT_W_RSTGTN(x)                 (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_W_RSTGTN_SHIFT)) & SEMA42_RSTGT_W_RSTGTN_MASK)
18812 
18813 #define SEMA42_RSTGT_W_RSTGDP_MASK               (0xFF00U)
18814 #define SEMA42_RSTGT_W_RSTGDP_SHIFT              (8U)
18815 /*! RSTGDP - RSTGDP */
18816 #define SEMA42_RSTGT_W_RSTGDP(x)                 (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_W_RSTGDP_SHIFT)) & SEMA42_RSTGT_W_RSTGDP_MASK)
18817 /*! @} */
18818 
18819 
18820 /*!
18821  * @}
18822  */ /* end of group SEMA42_Register_Masks */
18823 
18824 
18825 /* SEMA42 - Peripheral instance base addresses */
18826 /** Peripheral SEMA420 base address */
18827 #define SEMA420_BASE                             (0x4001B000u)
18828 /** Peripheral SEMA420 base pointer */
18829 #define SEMA420                                  ((SEMA42_Type *)SEMA420_BASE)
18830 /** Peripheral SEMA421 base address */
18831 #define SEMA421_BASE                             (0x4101B000u)
18832 /** Peripheral SEMA421 base pointer */
18833 #define SEMA421                                  ((SEMA42_Type *)SEMA421_BASE)
18834 /** Array initializer of SEMA42 peripheral base addresses */
18835 #define SEMA42_BASE_ADDRS                        { SEMA420_BASE, SEMA421_BASE }
18836 /** Array initializer of SEMA42 peripheral base pointers */
18837 #define SEMA42_BASE_PTRS                         { SEMA420, SEMA421 }
18838 
18839 /*!
18840  * @}
18841  */ /* end of group SEMA42_Peripheral_Access_Layer */
18842 
18843 
18844 /* ----------------------------------------------------------------------------
18845    -- SIM Peripheral Access Layer
18846    ---------------------------------------------------------------------------- */
18847 
18848 /*!
18849  * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer
18850  * @{
18851  */
18852 
18853 /** SIM - Register Layout Typedef */
18854 typedef struct {
18855        uint8_t RESERVED_0[4];
18856   __IO uint32_t CHIPCTRL;                          /**< Chip Control Register, offset: 0x4 */
18857        uint8_t RESERVED_1[28];
18858   __IO uint32_t SDID;                              /**< System Device Identification Register, offset: 0x24 */
18859        uint8_t RESERVED_2[36];
18860   __IO uint32_t FCFG1;                             /**< Flash Configuration Register 1, offset: 0x4C */
18861   __I  uint32_t FCFG2;                             /**< Flash Configuration Register 2, offset: 0x50 */
18862        uint8_t RESERVED_3[4];
18863   __I  uint32_t UIDH;                              /**< Unique Identification Register High, offset: 0x58 */
18864   __I  uint32_t UIDM;                              /**< Unique Identification Register Mid Middle, offset: 0x5C */
18865   __I  uint32_t UIDL;                              /**< Unique Identification Register Mid Low, offset: 0x60 */
18866        uint8_t RESERVED_4[12];
18867   __IO uint32_t MISC2;                             /**< MISC2 Register, offset: 0x70 */
18868 } SIM_Type;
18869 
18870 /* ----------------------------------------------------------------------------
18871    -- SIM Register Masks
18872    ---------------------------------------------------------------------------- */
18873 
18874 /*!
18875  * @addtogroup SIM_Register_Masks SIM Register Masks
18876  * @{
18877  */
18878 
18879 /*! @name CHIPCTRL - Chip Control Register */
18880 /*! @{ */
18881 
18882 #define SIM_CHIPCTRL_FBSL_MASK                   (0x300U)
18883 #define SIM_CHIPCTRL_FBSL_SHIFT                  (8U)
18884 /*! FBSL - FLEXBUS security level
18885  *  0b00..All off-chip access(instruction and data) via the Flexbus or sdram are disallowed
18886  *  0b01..All off-chip access(instruction and data) via the Flexbus or sdram are disallowed
18887  *  0b10..off-chip instruction access are disallowed, data access are allowed
18888  *  0b11..off-chip instruction access and data access are allowed
18889  */
18890 #define SIM_CHIPCTRL_FBSL(x)                     (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTRL_FBSL_SHIFT)) & SIM_CHIPCTRL_FBSL_MASK)
18891 /*! @} */
18892 
18893 /*! @name SDID - System Device Identification Register */
18894 /*! @{ */
18895 
18896 #define SIM_SDID_PINID_MASK                      (0xFU)
18897 #define SIM_SDID_PINID_SHIFT                     (0U)
18898 /*! PINID - PINID
18899  *  0b1000..176-pin
18900  */
18901 #define SIM_SDID_PINID(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PINID_SHIFT)) & SIM_SDID_PINID_MASK)
18902 
18903 #define SIM_SDID_DIEID_MASK                      (0xF80U)
18904 #define SIM_SDID_DIEID_SHIFT                     (7U)
18905 /*! DIEID - DIEID */
18906 #define SIM_SDID_DIEID(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DIEID_SHIFT)) & SIM_SDID_DIEID_MASK)
18907 
18908 #define SIM_SDID_REVID_MASK                      (0xF000U)
18909 #define SIM_SDID_REVID_SHIFT                     (12U)
18910 /*! REVID - REVID */
18911 #define SIM_SDID_REVID(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK)
18912 
18913 #define SIM_SDID_SERIESID_MASK                   (0xF00000U)
18914 #define SIM_SDID_SERIESID_SHIFT                  (20U)
18915 /*! SERIESID - SERIESID */
18916 #define SIM_SDID_SERIESID(x)                     (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SERIESID_SHIFT)) & SIM_SDID_SERIESID_MASK)
18917 
18918 #define SIM_SDID_SUBFAMID_MASK                   (0xF000000U)
18919 #define SIM_SDID_SUBFAMID_SHIFT                  (24U)
18920 /*! SUBFAMID - SUBFAMID
18921  *  0b0000..L3A
18922  */
18923 #define SIM_SDID_SUBFAMID(x)                     (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBFAMID_SHIFT)) & SIM_SDID_SUBFAMID_MASK)
18924 
18925 #define SIM_SDID_FAMID_MASK                      (0xF0000000U)
18926 #define SIM_SDID_FAMID_SHIFT                     (28U)
18927 /*! FAMID - FAMID
18928  *  0b0000..K32
18929  */
18930 #define SIM_SDID_FAMID(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMID_SHIFT)) & SIM_SDID_FAMID_MASK)
18931 /*! @} */
18932 
18933 /*! @name FCFG1 - Flash Configuration Register 1 */
18934 /*! @{ */
18935 
18936 #define SIM_FCFG1_FLASHDIS_MASK                  (0x1U)
18937 #define SIM_FCFG1_FLASHDIS_SHIFT                 (0U)
18938 /*! FLASHDIS - Flash disable
18939  *  0b0..Flash is enabled
18940  *  0b1..Flash is disabled
18941  */
18942 #define SIM_FCFG1_FLASHDIS(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDIS_SHIFT)) & SIM_FCFG1_FLASHDIS_MASK)
18943 
18944 #define SIM_FCFG1_FLASHDOZE_MASK                 (0x2U)
18945 #define SIM_FCFG1_FLASHDOZE_SHIFT                (1U)
18946 /*! FLASHDOZE - Flash Doze
18947  *  0b0..Flash remains enabled during Doze mode
18948  *  0b1..Flash is disabled for the duration of Doze mode
18949  */
18950 #define SIM_FCFG1_FLASHDOZE(x)                   (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDOZE_SHIFT)) & SIM_FCFG1_FLASHDOZE_MASK)
18951 
18952 #define SIM_FCFG1_FLSAUTODISEN_MASK              (0x4U)
18953 #define SIM_FCFG1_FLSAUTODISEN_SHIFT             (2U)
18954 /*! FLSAUTODISEN - Flash auto disable enabled.
18955  *  0b0..Disable flash auto disable function
18956  *  0b1..Enable flash auto disable function
18957  */
18958 #define SIM_FCFG1_FLSAUTODISEN(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLSAUTODISEN_SHIFT)) & SIM_FCFG1_FLSAUTODISEN_MASK)
18959 
18960 #define SIM_FCFG1_FLSAUTODISWD_MASK              (0x3FF8U)
18961 #define SIM_FCFG1_FLSAUTODISWD_SHIFT             (3U)
18962 /*! FLSAUTODISWD - The clock counter for time period of flash auto disable. */
18963 #define SIM_FCFG1_FLSAUTODISWD(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLSAUTODISWD_SHIFT)) & SIM_FCFG1_FLSAUTODISWD_MASK)
18964 
18965 #define SIM_FCFG1_CORE1_SRAMSIZE_MASK            (0xF0000U)
18966 #define SIM_FCFG1_CORE1_SRAMSIZE_SHIFT           (16U)
18967 /*! CORE1_SRAMSIZE
18968  *  0b1001..CM0+ has 128 KB SRAM
18969  */
18970 #define SIM_FCFG1_CORE1_SRAMSIZE(x)              (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE1_SRAMSIZE_SHIFT)) & SIM_FCFG1_CORE1_SRAMSIZE_MASK)
18971 
18972 #define SIM_FCFG1_CORE0_SRAMSIZE_MASK            (0xF00000U)
18973 #define SIM_FCFG1_CORE0_SRAMSIZE_SHIFT           (20U)
18974 /*! CORE0_SRAMSIZE
18975  *  0b1010..CM4 has 256 KB SRAM
18976  */
18977 #define SIM_FCFG1_CORE0_SRAMSIZE(x)              (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE0_SRAMSIZE_SHIFT)) & SIM_FCFG1_CORE0_SRAMSIZE_MASK)
18978 
18979 #define SIM_FCFG1_CORE1_PFSIZE_MASK              (0xF000000U)
18980 #define SIM_FCFG1_CORE1_PFSIZE_SHIFT             (24U)
18981 /*! CORE1_PFSIZE
18982  *  0b1010..CM0+ has 256 KB flash size.
18983  */
18984 #define SIM_FCFG1_CORE1_PFSIZE(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE1_PFSIZE_SHIFT)) & SIM_FCFG1_CORE1_PFSIZE_MASK)
18985 
18986 #define SIM_FCFG1_CORE0_PFSIZE_MASK              (0xF0000000U)
18987 #define SIM_FCFG1_CORE0_PFSIZE_SHIFT             (28U)
18988 /*! CORE0_PFSIZE
18989  *  0b1100..CM4 has 1 MB flash size.
18990  */
18991 #define SIM_FCFG1_CORE0_PFSIZE(x)                (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE0_PFSIZE_SHIFT)) & SIM_FCFG1_CORE0_PFSIZE_MASK)
18992 /*! @} */
18993 
18994 /*! @name FCFG2 - Flash Configuration Register 2 */
18995 /*! @{ */
18996 
18997 #define SIM_FCFG2_MAXADDR2_MASK                  (0x3F0000U)
18998 #define SIM_FCFG2_MAXADDR2_SHIFT                 (16U)
18999 /*! MAXADDR2 - Max Address lock */
19000 #define SIM_FCFG2_MAXADDR2(x)                    (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR2_SHIFT)) & SIM_FCFG2_MAXADDR2_MASK)
19001 
19002 #define SIM_FCFG2_MAXADDR01_MASK                 (0x7F000000U)
19003 #define SIM_FCFG2_MAXADDR01_SHIFT                (24U)
19004 /*! MAXADDR01 - Max Address lock */
19005 #define SIM_FCFG2_MAXADDR01(x)                   (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR01_SHIFT)) & SIM_FCFG2_MAXADDR01_MASK)
19006 
19007 #define SIM_FCFG2_SWAP_MASK                      (0x80000000U)
19008 #define SIM_FCFG2_SWAP_SHIFT                     (31U)
19009 /*! SWAP - SWAP
19010  *  0b0..Logical P-flash Block 0 is located at relative address 0x0000
19011  *  0b1..Logical P-flash Block 1 is located at relative address 0x0000
19012  */
19013 #define SIM_FCFG2_SWAP(x)                        (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_SWAP_SHIFT)) & SIM_FCFG2_SWAP_MASK)
19014 /*! @} */
19015 
19016 /*! @name UIDH - Unique Identification Register High */
19017 /*! @{ */
19018 
19019 #define SIM_UIDH_UID_MASK                        (0xFFFFU)
19020 #define SIM_UIDH_UID_SHIFT                       (0U)
19021 /*! UID - Unique Identification */
19022 #define SIM_UIDH_UID(x)                          (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID_SHIFT)) & SIM_UIDH_UID_MASK)
19023 /*! @} */
19024 
19025 /*! @name UIDM - Unique Identification Register Mid Middle */
19026 /*! @{ */
19027 
19028 #define SIM_UIDM_UID_MASK                        (0xFFFFFFFFU)
19029 #define SIM_UIDM_UID_SHIFT                       (0U)
19030 /*! UID - Unique Identification */
19031 #define SIM_UIDM_UID(x)                          (((uint32_t)(((uint32_t)(x)) << SIM_UIDM_UID_SHIFT)) & SIM_UIDM_UID_MASK)
19032 /*! @} */
19033 
19034 /*! @name UIDL - Unique Identification Register Mid Low */
19035 /*! @{ */
19036 
19037 #define SIM_UIDL_UID_MASK                        (0xFFFFFFFFU)
19038 #define SIM_UIDL_UID_SHIFT                       (0U)
19039 /*! UID - Unique Identification */
19040 #define SIM_UIDL_UID(x)                          (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID_SHIFT)) & SIM_UIDL_UID_MASK)
19041 /*! @} */
19042 
19043 /*! @name MISC2 - MISC2 Register */
19044 /*! @{ */
19045 
19046 #define SIM_MISC2_SYSTICK_CLK_EN_MASK            (0x1U)
19047 #define SIM_MISC2_SYSTICK_CLK_EN_SHIFT           (0U)
19048 /*! systick_clk_en - Systick clock enable
19049  *  0b0..Systick clock is disabled
19050  *  0b1..Systick clock is enabled
19051  */
19052 #define SIM_MISC2_SYSTICK_CLK_EN(x)              (((uint32_t)(((uint32_t)(x)) << SIM_MISC2_SYSTICK_CLK_EN_SHIFT)) & SIM_MISC2_SYSTICK_CLK_EN_MASK)
19053 /*! @} */
19054 
19055 
19056 /*!
19057  * @}
19058  */ /* end of group SIM_Register_Masks */
19059 
19060 
19061 /* SIM - Peripheral instance base addresses */
19062 /** Peripheral SIM base address */
19063 #define SIM_BASE                                 (0x40026000u)
19064 /** Peripheral SIM base pointer */
19065 #define SIM                                      ((SIM_Type *)SIM_BASE)
19066 /** Array initializer of SIM peripheral base addresses */
19067 #define SIM_BASE_ADDRS                           { SIM_BASE }
19068 /** Array initializer of SIM peripheral base pointers */
19069 #define SIM_BASE_PTRS                            { SIM }
19070 
19071 /*!
19072  * @}
19073  */ /* end of group SIM_Peripheral_Access_Layer */
19074 
19075 
19076 /* ----------------------------------------------------------------------------
19077    -- SMC Peripheral Access Layer
19078    ---------------------------------------------------------------------------- */
19079 
19080 /*!
19081  * @addtogroup SMC_Peripheral_Access_Layer SMC Peripheral Access Layer
19082  * @{
19083  */
19084 
19085 /** SMC - Register Layout Typedef */
19086 typedef struct {
19087   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
19088   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
19089   __IO uint32_t PMPROT;                            /**< Power Mode Protection register, offset: 0x8 */
19090        uint8_t RESERVED_0[4];
19091   __IO uint32_t PMCTRL;                            /**< Power Mode Control register, offset: 0x10 */
19092        uint8_t RESERVED_1[4];
19093   __IO uint32_t PMSTAT;                            /**< Power Mode Status register, offset: 0x18 */
19094        uint8_t RESERVED_2[4];
19095   __I  uint32_t SRS;                               /**< System Reset Status, offset: 0x20 */
19096   __IO uint32_t RPC;                               /**< Reset Pin Control, offset: 0x24, available only on: SMC0 (missing on SMC1) */
19097   __IO uint32_t SSRS;                              /**< Sticky System Reset Status, offset: 0x28 */
19098   __IO uint32_t SRIE;                              /**< System Reset Interrupt Enable, offset: 0x2C */
19099   __IO uint32_t SRIF;                              /**< System Reset Interrupt Flag, offset: 0x30 */
19100        uint8_t RESERVED_3[12];
19101   __IO uint32_t MR;                                /**< Mode Register, offset: 0x40 */
19102        uint8_t RESERVED_4[12];
19103   __IO uint32_t FM;                                /**< Force Mode Register, offset: 0x50 */
19104        uint8_t RESERVED_5[12];
19105   __IO uint32_t SRAMLPR;                           /**< SRAM Low Power Register, offset: 0x60 */
19106   __IO uint32_t SRAMDSR;                           /**< SRAM Deep Sleep Register, offset: 0x64 */
19107 } SMC_Type;
19108 
19109 /* ----------------------------------------------------------------------------
19110    -- SMC Register Masks
19111    ---------------------------------------------------------------------------- */
19112 
19113 /*!
19114  * @addtogroup SMC_Register_Masks SMC Register Masks
19115  * @{
19116  */
19117 
19118 /*! @name VERID - Version ID Register */
19119 /*! @{ */
19120 
19121 #define SMC_VERID_FEATURE_MASK                   (0xFFFFU)
19122 #define SMC_VERID_FEATURE_SHIFT                  (0U)
19123 /*! FEATURE - Feature Specification Number
19124  *  0b0000000010101011..Default features supported
19125  */
19126 #define SMC_VERID_FEATURE(x)                     (((uint32_t)(((uint32_t)(x)) << SMC_VERID_FEATURE_SHIFT)) & SMC_VERID_FEATURE_MASK)
19127 
19128 #define SMC_VERID_MINOR_MASK                     (0xFF0000U)
19129 #define SMC_VERID_MINOR_SHIFT                    (16U)
19130 /*! MINOR - Minor Version Number */
19131 #define SMC_VERID_MINOR(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_VERID_MINOR_SHIFT)) & SMC_VERID_MINOR_MASK)
19132 
19133 #define SMC_VERID_MAJOR_MASK                     (0xFF000000U)
19134 #define SMC_VERID_MAJOR_SHIFT                    (24U)
19135 /*! MAJOR - Major Version Number */
19136 #define SMC_VERID_MAJOR(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_VERID_MAJOR_SHIFT)) & SMC_VERID_MAJOR_MASK)
19137 /*! @} */
19138 
19139 /*! @name PARAM - Parameter Register */
19140 /*! @{ */
19141 
19142 #define SMC_PARAM_PWRD_INDPT_MASK                (0x1U)
19143 #define SMC_PARAM_PWRD_INDPT_SHIFT               (0U)
19144 /*! PWRD_INDPT - Power Domains Independent */
19145 #define SMC_PARAM_PWRD_INDPT(x)                  (((uint32_t)(((uint32_t)(x)) << SMC_PARAM_PWRD_INDPT_SHIFT)) & SMC_PARAM_PWRD_INDPT_MASK)
19146 /*! @} */
19147 
19148 /*! @name PMPROT - Power Mode Protection register */
19149 /*! @{ */
19150 
19151 #define SMC_PMPROT_AVLLS_MASK                    (0x3U)
19152 #define SMC_PMPROT_AVLLS_SHIFT                   (0U)
19153 /*! AVLLS - Allow Very-Low-Leakage Stop Mode
19154  *  0b00..VLLS mode is not allowed
19155  *  0b01..VLLS0/1 mode is allowed
19156  *  0b10..VLLS2/3 mode is allowed
19157  *  0b11..VLLS0/1/2/3 mode is allowed
19158  */
19159 #define SMC_PMPROT_AVLLS(x)                      (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AVLLS_SHIFT)) & SMC_PMPROT_AVLLS_MASK)
19160 
19161 #define SMC_PMPROT_ALLS_MASK                     (0x8U)
19162 #define SMC_PMPROT_ALLS_SHIFT                    (3U)
19163 /*! ALLS - Allow Low-Leakage Stop Mode
19164  *  0b0..LLS is not allowed
19165  *  0b1..LLS is allowed
19166  */
19167 #define SMC_PMPROT_ALLS(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_ALLS_SHIFT)) & SMC_PMPROT_ALLS_MASK)
19168 
19169 #define SMC_PMPROT_AVLP_MASK                     (0x20U)
19170 #define SMC_PMPROT_AVLP_SHIFT                    (5U)
19171 /*! AVLP - Allow Very-Low-Power Modes
19172  *  0b0..VLPR, VLPW, and VLPS are not allowed.
19173  *  0b1..VLPR, VLPW, and VLPS are allowed.
19174  */
19175 #define SMC_PMPROT_AVLP(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AVLP_SHIFT)) & SMC_PMPROT_AVLP_MASK)
19176 
19177 #define SMC_PMPROT_AHSRUN_MASK                   (0x80U)
19178 #define SMC_PMPROT_AHSRUN_SHIFT                  (7U)
19179 /*! AHSRUN - Allow High Speed Run mode
19180  *  0b0..HSRUN is not allowed
19181  *  0b1..HSRUN is allowed
19182  */
19183 #define SMC_PMPROT_AHSRUN(x)                     (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AHSRUN_SHIFT)) & SMC_PMPROT_AHSRUN_MASK)
19184 /*! @} */
19185 
19186 /*! @name PMCTRL - Power Mode Control register */
19187 /*! @{ */
19188 
19189 #define SMC_PMCTRL_STOPM_MASK                    (0x7U)
19190 #define SMC_PMCTRL_STOPM_SHIFT                   (0U)
19191 /*! STOPM - Stop Mode Control
19192  *  0b000..Normal Stop (STOP)
19193  *  0b001..Reserved
19194  *  0b010..Very-Low-Power Stop (VLPS)
19195  *  0b011..Low-Leakage Stop (LLS)
19196  *  0b100..Very-Low-Leakage Stop with SRAM retention(VLLS2/3)
19197  *  0b101..Reserved
19198  *  0b110..Very-Low-Leakage Stop without SRAM retention (VLLS0/1)
19199  *  0b111..Reserved
19200  */
19201 #define SMC_PMCTRL_STOPM(x)                      (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_STOPM_SHIFT)) & SMC_PMCTRL_STOPM_MASK)
19202 
19203 #define SMC_PMCTRL_RUNM_MASK                     (0x300U)
19204 #define SMC_PMCTRL_RUNM_SHIFT                    (8U)
19205 /*! RUNM - Run Mode Control
19206  *  0b00..Normal Run mode (RUN)
19207  *  0b01..Reserved
19208  *  0b10..Very-Low-Power Run mode (VLPR)
19209  *  0b11..High Speed Run mode (HSRUN)
19210  */
19211 #define SMC_PMCTRL_RUNM(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_RUNM_SHIFT)) & SMC_PMCTRL_RUNM_MASK)
19212 
19213 #define SMC_PMCTRL_PSTOPO_MASK                   (0x30000U)
19214 #define SMC_PMCTRL_PSTOPO_SHIFT                  (16U)
19215 /*! PSTOPO - Partial Stop Option
19216  *  0b00..STOP - Normal Stop mode
19217  *  0b01..PSTOP1 - Partial Stop with system and bus clock disabled
19218  *  0b10..PSTOP2 - Partial Stop with system clock disabled and bus clock enabled
19219  *  0b11..PSTOP3 - Partial Stop with system clock enabled and bus clock enabled
19220  */
19221 #define SMC_PMCTRL_PSTOPO(x)                     (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_PSTOPO_SHIFT)) & SMC_PMCTRL_PSTOPO_MASK)
19222 /*! @} */
19223 
19224 /*! @name PMSTAT - Power Mode Status register */
19225 /*! @{ */
19226 
19227 #define SMC_PMSTAT_PMSTAT_MASK                   (0xFFU)
19228 #define SMC_PMSTAT_PMSTAT_SHIFT                  (0U)
19229 /*! PMSTAT - Power Mode Status
19230  *  0b00000001..Current power mode is RUN.
19231  *  0b00000010..Current power mode is any STOP mode.
19232  *  0b00000100..Current power mode is VLPR.
19233  *  0b10000000..Current power mode is HSRUN
19234  */
19235 #define SMC_PMSTAT_PMSTAT(x)                     (((uint32_t)(((uint32_t)(x)) << SMC_PMSTAT_PMSTAT_SHIFT)) & SMC_PMSTAT_PMSTAT_MASK)
19236 
19237 #define SMC_PMSTAT_STOPSTAT_MASK                 (0xFF000000U)
19238 #define SMC_PMSTAT_STOPSTAT_SHIFT                (24U)
19239 /*! STOPSTAT - Stop Entry Status */
19240 #define SMC_PMSTAT_STOPSTAT(x)                   (((uint32_t)(((uint32_t)(x)) << SMC_PMSTAT_STOPSTAT_SHIFT)) & SMC_PMSTAT_STOPSTAT_MASK)
19241 /*! @} */
19242 
19243 /*! @name SRS - System Reset Status */
19244 /*! @{ */
19245 
19246 #define SMC_SRS_WAKEUP_MASK                      (0x1U)
19247 #define SMC_SRS_WAKEUP_SHIFT                     (0U)
19248 /*! WAKEUP - Wakeup Reset
19249  *  0b0..Reset not generated by wakeup from VLLS mode.
19250  *  0b1..Reset generated by wakeup from VLLS mode.
19251  */
19252 #define SMC_SRS_WAKEUP(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WAKEUP_SHIFT)) & SMC_SRS_WAKEUP_MASK)
19253 
19254 #define SMC_SRS_POR_MASK                         (0x2U)
19255 #define SMC_SRS_POR_SHIFT                        (1U)
19256 /*! POR - POR Reset
19257  *  0b0..Reset not generated by POR.
19258  *  0b1..Reset generated by POR.
19259  */
19260 #define SMC_SRS_POR(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_POR_SHIFT)) & SMC_SRS_POR_MASK)
19261 
19262 #define SMC_SRS_LVD_MASK                         (0x4U)
19263 #define SMC_SRS_LVD_SHIFT                        (2U)
19264 /*! LVD - LVD Reset
19265  *  0b0..Reset not generated by LVD.
19266  *  0b1..Reset generated by LVD.
19267  */
19268 #define SMC_SRS_LVD(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_LVD_SHIFT)) & SMC_SRS_LVD_MASK)
19269 
19270 #define SMC_SRS_HVD_MASK                         (0x8U)
19271 #define SMC_SRS_HVD_SHIFT                        (3U)
19272 /*! HVD - HVD Reset
19273  *  0b0..Reset not generated by HVD.
19274  *  0b1..Reset generated by HVD.
19275  */
19276 #define SMC_SRS_HVD(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_HVD_SHIFT)) & SMC_SRS_HVD_MASK)
19277 
19278 #define SMC_SRS_WARM_MASK                        (0x10U)
19279 #define SMC_SRS_WARM_SHIFT                       (4U)
19280 /*! WARM - Warm Reset
19281  *  0b0..Reset not generated by Warm Reset source.
19282  *  0b1..Reset generated by Warm Reset source.
19283  */
19284 #define SMC_SRS_WARM(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WARM_SHIFT)) & SMC_SRS_WARM_MASK)
19285 
19286 #define SMC_SRS_FATAL_MASK                       (0x20U)
19287 #define SMC_SRS_FATAL_SHIFT                      (5U)
19288 /*! FATAL - Fatal Reset
19289  *  0b0..Reset was not generated by a fatal reset source.
19290  *  0b1..Reset was generated by a fatal reset source.
19291  */
19292 #define SMC_SRS_FATAL(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SRS_FATAL_SHIFT)) & SMC_SRS_FATAL_MASK)
19293 
19294 #define SMC_SRS_CORE_MASK                        (0x80U)
19295 #define SMC_SRS_CORE_SHIFT                       (7U)
19296 /*! CORE - Core Reset
19297  *  0b0..Reset source was not core only reset.
19298  *  0b1..Reset source was core reset and reset the core only.
19299  */
19300 #define SMC_SRS_CORE(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE_SHIFT)) & SMC_SRS_CORE_MASK)
19301 
19302 #define SMC_SRS_PIN_MASK                         (0x100U)
19303 #define SMC_SRS_PIN_SHIFT                        (8U)
19304 /*! PIN - Pin Reset
19305  *  0b0..Reset was not generated from the assertion of RESET_B pin.
19306  *  0b1..Reset was generated from the assertion of RESET_B pin.
19307  */
19308 #define SMC_SRS_PIN(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_PIN_SHIFT)) & SMC_SRS_PIN_MASK)
19309 
19310 #define SMC_SRS_MDM_MASK                         (0x200U)
19311 #define SMC_SRS_MDM_SHIFT                        (9U)
19312 /*! MDM - MDM Reset
19313  *  0b0..Reset was not generated from the MDM reset request.
19314  *  0b1..Reset was generated from the MDM reset request.
19315  */
19316 #define SMC_SRS_MDM(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_MDM_SHIFT)) & SMC_SRS_MDM_MASK)
19317 
19318 #define SMC_SRS_RSTACK_MASK                      (0x400U)
19319 #define SMC_SRS_RSTACK_SHIFT                     (10U)
19320 /*! RSTACK - Reset Timeout
19321  *  0b0..Reset not generated from Reset Controller Timeout.
19322  *  0b1..Reset generated from Reset Controller Timeout.
19323  */
19324 #define SMC_SRS_RSTACK(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRS_RSTACK_SHIFT)) & SMC_SRS_RSTACK_MASK)
19325 
19326 #define SMC_SRS_STOPACK_MASK                     (0x800U)
19327 #define SMC_SRS_STOPACK_SHIFT                    (11U)
19328 /*! STOPACK - Stop Timeout Reset
19329  *  0b0..Reset not generated by Stop Controller Timeout.
19330  *  0b1..Reset generated by Stop Controller Timeout.
19331  */
19332 #define SMC_SRS_STOPACK(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SRS_STOPACK_SHIFT)) & SMC_SRS_STOPACK_MASK)
19333 
19334 #define SMC_SRS_SCG_MASK                         (0x1000U)
19335 #define SMC_SRS_SCG_SHIFT                        (12U)
19336 /*! SCG - SCG Reset
19337  *  0b0..Reset is not generated from an SCG loss of lock or loss of clock.
19338  *  0b1..Reset is generated from an SCG loss of lock or loss of clock.
19339  */
19340 #define SMC_SRS_SCG(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRS_SCG_SHIFT)) & SMC_SRS_SCG_MASK)
19341 
19342 #define SMC_SRS_WDOG_MASK                        (0x2000U)
19343 #define SMC_SRS_WDOG_SHIFT                       (13U)
19344 /*! WDOG - Watchdog Reset
19345  *  0b0..Reset is not generated from the WatchDog timeout.
19346  *  0b1..Reset is generated from the WatchDog timeout.
19347  */
19348 #define SMC_SRS_WDOG(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WDOG_SHIFT)) & SMC_SRS_WDOG_MASK)
19349 
19350 #define SMC_SRS_SW_MASK                          (0x4000U)
19351 #define SMC_SRS_SW_SHIFT                         (14U)
19352 /*! SW - Software Reset
19353  *  0b0..Reset not generated by software request from core.
19354  *  0b1..Reset generated by software request from core.
19355  */
19356 #define SMC_SRS_SW(x)                            (((uint32_t)(((uint32_t)(x)) << SMC_SRS_SW_SHIFT)) & SMC_SRS_SW_MASK)
19357 
19358 #define SMC_SRS_LOCKUP_MASK                      (0x8000U)
19359 #define SMC_SRS_LOCKUP_SHIFT                     (15U)
19360 /*! LOCKUP - Lockup Reset
19361  *  0b0..Reset not generated by core lockup or exception.
19362  *  0b1..Reset generated by core lockup or exception.
19363  */
19364 #define SMC_SRS_LOCKUP(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRS_LOCKUP_SHIFT)) & SMC_SRS_LOCKUP_MASK)
19365 
19366 #define SMC_SRS_CORE0_MASK                       (0x10000U)
19367 #define SMC_SRS_CORE0_SHIFT                      (16U)
19368 /*! CORE0 - Core0 System Reset
19369  *  0b0..Reset not generated from Core0 system reset source.
19370  *  0b1..Reset generated from Core0 system reset source.
19371  */
19372 #define SMC_SRS_CORE0(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE0_SHIFT)) & SMC_SRS_CORE0_MASK)
19373 
19374 #define SMC_SRS_CORE1_MASK                       (0x20000U)
19375 #define SMC_SRS_CORE1_SHIFT                      (17U)
19376 /*! CORE1 - Core1 System Reset
19377  *  0b0..Reset not generated from Core1 system reset source.
19378  *  0b1..Reset generated from Core1 system reset source.
19379  */
19380 #define SMC_SRS_CORE1(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE1_SHIFT)) & SMC_SRS_CORE1_MASK)
19381 
19382 #define SMC_SRS_JTAG_MASK                        (0x10000000U)
19383 #define SMC_SRS_JTAG_SHIFT                       (28U)
19384 /*! JTAG - JTAG System Reset
19385  *  0b0..Reset not generated by JTAG system reset.
19386  *  0b1..Reset generated by JTAG system reset.
19387  */
19388 #define SMC_SRS_JTAG(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRS_JTAG_SHIFT)) & SMC_SRS_JTAG_MASK)
19389 /*! @} */
19390 
19391 /*! @name RPC - Reset Pin Control */
19392 /*! @{ */
19393 
19394 #define SMC_RPC_FILTCFG_MASK                     (0x1FU)
19395 #define SMC_RPC_FILTCFG_SHIFT                    (0U)
19396 /*! FILTCFG - Reset Filter Configuration */
19397 #define SMC_RPC_FILTCFG(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_RPC_FILTCFG_SHIFT)) & SMC_RPC_FILTCFG_MASK)
19398 
19399 #define SMC_RPC_FILTEN_MASK                      (0x100U)
19400 #define SMC_RPC_FILTEN_SHIFT                     (8U)
19401 /*! FILTEN - Filter Enable
19402  *  0b0..Slow clock reset pin filter disabled.
19403  *  0b1..Slow clock reset pin filter enabled in Run modes.
19404  */
19405 #define SMC_RPC_FILTEN(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_RPC_FILTEN_SHIFT)) & SMC_RPC_FILTEN_MASK)
19406 
19407 #define SMC_RPC_LPOFEN_MASK                      (0x200U)
19408 #define SMC_RPC_LPOFEN_SHIFT                     (9U)
19409 /*! LPOFEN - LPO Filter Enable
19410  *  0b0..LPO clock reset pin filter disabled.
19411  *  0b1..LPO clock reset pin filter enabled in all modes.
19412  */
19413 #define SMC_RPC_LPOFEN(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_RPC_LPOFEN_SHIFT)) & SMC_RPC_LPOFEN_MASK)
19414 /*! @} */
19415 
19416 /*! @name SSRS - Sticky System Reset Status */
19417 /*! @{ */
19418 
19419 #define SMC_SSRS_WAKEUP_MASK                     (0x1U)
19420 #define SMC_SSRS_WAKEUP_SHIFT                    (0U)
19421 /*! WAKEUP - Wakeup Reset
19422  *  0b0..Reset not generated by wakeup from VLLS mode.
19423  *  0b1..Reset generated by wakeup from VLLS mode.
19424  */
19425 #define SMC_SSRS_WAKEUP(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WAKEUP_SHIFT)) & SMC_SSRS_WAKEUP_MASK)
19426 
19427 #define SMC_SSRS_POR_MASK                        (0x2U)
19428 #define SMC_SSRS_POR_SHIFT                       (1U)
19429 /*! POR - POR Reset
19430  *  0b0..Reset not generated by POR.
19431  *  0b1..Reset generated by POR.
19432  */
19433 #define SMC_SSRS_POR(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_POR_SHIFT)) & SMC_SSRS_POR_MASK)
19434 
19435 #define SMC_SSRS_LVD_MASK                        (0x4U)
19436 #define SMC_SSRS_LVD_SHIFT                       (2U)
19437 /*! LVD - LVD Reset
19438  *  0b0..Reset not generated by LVD.
19439  *  0b1..Reset generated by LVD.
19440  */
19441 #define SMC_SSRS_LVD(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_LVD_SHIFT)) & SMC_SSRS_LVD_MASK)
19442 
19443 #define SMC_SSRS_HVD_MASK                        (0x8U)
19444 #define SMC_SSRS_HVD_SHIFT                       (3U)
19445 /*! HVD - HVD Reset
19446  *  0b0..Reset not generated by HVD.
19447  *  0b1..Reset generated by HVD.
19448  */
19449 #define SMC_SSRS_HVD(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_HVD_SHIFT)) & SMC_SSRS_HVD_MASK)
19450 
19451 #define SMC_SSRS_WARM_MASK                       (0x10U)
19452 #define SMC_SSRS_WARM_SHIFT                      (4U)
19453 /*! WARM - Warm Reset
19454  *  0b0..Reset not generated by system reset source.
19455  *  0b1..Reset generated by system reset source.
19456  */
19457 #define SMC_SSRS_WARM(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WARM_SHIFT)) & SMC_SSRS_WARM_MASK)
19458 
19459 #define SMC_SSRS_FATAL_MASK                      (0x20U)
19460 #define SMC_SSRS_FATAL_SHIFT                     (5U)
19461 /*! FATAL - Fatal Reset
19462  *  0b0..Reset was not generated by a fatal reset source.
19463  *  0b1..Reset was generated by a fatal reset source.
19464  */
19465 #define SMC_SSRS_FATAL(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_FATAL_SHIFT)) & SMC_SSRS_FATAL_MASK)
19466 
19467 #define SMC_SSRS_PIN_MASK                        (0x100U)
19468 #define SMC_SSRS_PIN_SHIFT                       (8U)
19469 /*! PIN - Pin Reset
19470  *  0b0..Reset was not generated from the RESET_B pin.
19471  *  0b1..Reset was generated from the RESET_B pin.
19472  */
19473 #define SMC_SSRS_PIN(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_PIN_SHIFT)) & SMC_SSRS_PIN_MASK)
19474 
19475 #define SMC_SSRS_MDM_MASK                        (0x200U)
19476 #define SMC_SSRS_MDM_SHIFT                       (9U)
19477 /*! MDM - MDM Reset
19478  *  0b0..Reset was not generated from the MDM reset request.
19479  *  0b1..Reset was generated from the MDM reset request.
19480  */
19481 #define SMC_SSRS_MDM(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_MDM_SHIFT)) & SMC_SSRS_MDM_MASK)
19482 
19483 #define SMC_SSRS_RSTACK_MASK                     (0x400U)
19484 #define SMC_SSRS_RSTACK_SHIFT                    (10U)
19485 /*! RSTACK - Reset Timeout
19486  *  0b0..Reset not generated from Reset Controller Timeout.
19487  *  0b1..Reset generated from Reset Controller Timeout.
19488  */
19489 #define SMC_SSRS_RSTACK(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_RSTACK_SHIFT)) & SMC_SSRS_RSTACK_MASK)
19490 
19491 #define SMC_SSRS_STOPACK_MASK                    (0x800U)
19492 #define SMC_SSRS_STOPACK_SHIFT                   (11U)
19493 /*! STOPACK - Stop Timeout Reset
19494  *  0b0..Reset not generated by Stop Controller Timeout.
19495  *  0b1..Reset generated by Stop Controller Timeout.
19496  */
19497 #define SMC_SSRS_STOPACK(x)                      (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_STOPACK_SHIFT)) & SMC_SSRS_STOPACK_MASK)
19498 
19499 #define SMC_SSRS_SCG_MASK                        (0x1000U)
19500 #define SMC_SSRS_SCG_SHIFT                       (12U)
19501 /*! SCG - SCG Reset
19502  *  0b0..Reset is not generated from an SCG loss of lock or loss of clock.
19503  *  0b1..Reset is generated from an SCG loss of lock or loss of clock.
19504  */
19505 #define SMC_SSRS_SCG(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_SCG_SHIFT)) & SMC_SSRS_SCG_MASK)
19506 
19507 #define SMC_SSRS_WDOG_MASK                       (0x2000U)
19508 #define SMC_SSRS_WDOG_SHIFT                      (13U)
19509 /*! WDOG - Watchdog Reset
19510  *  0b0..Reset is not generated from the WatchDog timeout.
19511  *  0b1..Reset is generated from the WatchDog timeout.
19512  */
19513 #define SMC_SSRS_WDOG(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WDOG_SHIFT)) & SMC_SSRS_WDOG_MASK)
19514 
19515 #define SMC_SSRS_SW_MASK                         (0x4000U)
19516 #define SMC_SSRS_SW_SHIFT                        (14U)
19517 /*! SW - Software Reset
19518  *  0b0..Reset not generated by software request from core.
19519  *  0b1..Reset generated by software request from core.
19520  */
19521 #define SMC_SSRS_SW(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_SW_SHIFT)) & SMC_SSRS_SW_MASK)
19522 
19523 #define SMC_SSRS_LOCKUP_MASK                     (0x8000U)
19524 #define SMC_SSRS_LOCKUP_SHIFT                    (15U)
19525 /*! LOCKUP - Lockup Reset
19526  *  0b0..Reset not generated by core lockup.
19527  *  0b1..Reset generated by core lockup.
19528  */
19529 #define SMC_SSRS_LOCKUP(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_LOCKUP_SHIFT)) & SMC_SSRS_LOCKUP_MASK)
19530 
19531 #define SMC_SSRS_CORE0_MASK                      (0x10000U)
19532 #define SMC_SSRS_CORE0_SHIFT                     (16U)
19533 /*! CORE0 - Core0 Reset
19534  *  0b0..Reset not generated from Core0 reset source.
19535  *  0b1..Reset generated from Core0 reset source.
19536  */
19537 #define SMC_SSRS_CORE0(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_CORE0_SHIFT)) & SMC_SSRS_CORE0_MASK)
19538 
19539 #define SMC_SSRS_CORE1_MASK                      (0x20000U)
19540 #define SMC_SSRS_CORE1_SHIFT                     (17U)
19541 /*! CORE1 - Core1 Reset
19542  *  0b0..Reset not generated from Core1 reset source.
19543  *  0b1..Reset generated from Core1 reset source.
19544  */
19545 #define SMC_SSRS_CORE1(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_CORE1_SHIFT)) & SMC_SSRS_CORE1_MASK)
19546 
19547 #define SMC_SSRS_JTAG_MASK                       (0x10000000U)
19548 #define SMC_SSRS_JTAG_SHIFT                      (28U)
19549 /*! JTAG - JTAG System Reset
19550  *  0b0..Reset not generated by JTAG system reset.
19551  *  0b1..Reset generated by JTAG system reset.
19552  */
19553 #define SMC_SSRS_JTAG(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_JTAG_SHIFT)) & SMC_SSRS_JTAG_MASK)
19554 /*! @} */
19555 
19556 /*! @name SRIE - System Reset Interrupt Enable */
19557 /*! @{ */
19558 
19559 #define SMC_SRIE_PIN_MASK                        (0x100U)
19560 #define SMC_SRIE_PIN_SHIFT                       (8U)
19561 /*! PIN - Pin Reset
19562  *  0b0..Interrupt disabled.
19563  *  0b1..Interrupt enabled.
19564  */
19565 #define SMC_SRIE_PIN(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_PIN_SHIFT)) & SMC_SRIE_PIN_MASK)
19566 
19567 #define SMC_SRIE_MDM_MASK                        (0x200U)
19568 #define SMC_SRIE_MDM_SHIFT                       (9U)
19569 /*! MDM - MDM Reset
19570  *  0b0..Interrupt disabled.
19571  *  0b1..Interrupt enabled.
19572  */
19573 #define SMC_SRIE_MDM(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_MDM_SHIFT)) & SMC_SRIE_MDM_MASK)
19574 
19575 #define SMC_SRIE_STOPACK_MASK                    (0x800U)
19576 #define SMC_SRIE_STOPACK_SHIFT                   (11U)
19577 /*! STOPACK - Stop Timeout Reset
19578  *  0b0..Interrupt disabled.
19579  *  0b1..Interrupt enabled.
19580  */
19581 #define SMC_SRIE_STOPACK(x)                      (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_STOPACK_SHIFT)) & SMC_SRIE_STOPACK_MASK)
19582 
19583 #define SMC_SRIE_WDOG_MASK                       (0x2000U)
19584 #define SMC_SRIE_WDOG_SHIFT                      (13U)
19585 /*! WDOG - Watchdog Reset
19586  *  0b0..Interrupt disabled.
19587  *  0b1..Interrupt enabled.
19588  */
19589 #define SMC_SRIE_WDOG(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_WDOG_SHIFT)) & SMC_SRIE_WDOG_MASK)
19590 
19591 #define SMC_SRIE_SW_MASK                         (0x4000U)
19592 #define SMC_SRIE_SW_SHIFT                        (14U)
19593 /*! SW - Software Reset
19594  *  0b0..Interrupt disabled.
19595  *  0b1..Interrupt enabled.
19596  */
19597 #define SMC_SRIE_SW(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_SW_SHIFT)) & SMC_SRIE_SW_MASK)
19598 
19599 #define SMC_SRIE_LOCKUP_MASK                     (0x8000U)
19600 #define SMC_SRIE_LOCKUP_SHIFT                    (15U)
19601 /*! LOCKUP - Lockup Reset
19602  *  0b0..Interrupt disabled.
19603  *  0b1..Interrupt enabled.
19604  */
19605 #define SMC_SRIE_LOCKUP(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_LOCKUP_SHIFT)) & SMC_SRIE_LOCKUP_MASK)
19606 
19607 #define SMC_SRIE_CORE0_MASK                      (0x10000U)
19608 #define SMC_SRIE_CORE0_SHIFT                     (16U)
19609 /*! CORE0 - Core0 Reset
19610  *  0b0..Interrupt disabled.
19611  *  0b1..Interrupt enabled.
19612  */
19613 #define SMC_SRIE_CORE0(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_CORE0_SHIFT)) & SMC_SRIE_CORE0_MASK)
19614 
19615 #define SMC_SRIE_CORE1_MASK                      (0x20000U)
19616 #define SMC_SRIE_CORE1_SHIFT                     (17U)
19617 /*! CORE1 - Core1 Reset
19618  *  0b0..Interrupt disabled.
19619  *  0b1..Interrupt enabled.
19620  */
19621 #define SMC_SRIE_CORE1(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_CORE1_SHIFT)) & SMC_SRIE_CORE1_MASK)
19622 /*! @} */
19623 
19624 /*! @name SRIF - System Reset Interrupt Flag */
19625 /*! @{ */
19626 
19627 #define SMC_SRIF_PIN_MASK                        (0x100U)
19628 #define SMC_SRIF_PIN_SHIFT                       (8U)
19629 /*! PIN - Pin Reset
19630  *  0b0..Reset source not pending.
19631  *  0b1..Reset source pending.
19632  */
19633 #define SMC_SRIF_PIN(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_PIN_SHIFT)) & SMC_SRIF_PIN_MASK)
19634 
19635 #define SMC_SRIF_MDM_MASK                        (0x200U)
19636 #define SMC_SRIF_MDM_SHIFT                       (9U)
19637 /*! MDM - MDM Reset
19638  *  0b0..Reset source not pending.
19639  *  0b1..Reset source pending.
19640  */
19641 #define SMC_SRIF_MDM(x)                          (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_MDM_SHIFT)) & SMC_SRIF_MDM_MASK)
19642 
19643 #define SMC_SRIF_STOPACK_MASK                    (0x800U)
19644 #define SMC_SRIF_STOPACK_SHIFT                   (11U)
19645 /*! STOPACK - Stop Timeout Reset
19646  *  0b0..Reset source not pending.
19647  *  0b1..Reset source pending.
19648  */
19649 #define SMC_SRIF_STOPACK(x)                      (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_STOPACK_SHIFT)) & SMC_SRIF_STOPACK_MASK)
19650 
19651 #define SMC_SRIF_WDOG_MASK                       (0x2000U)
19652 #define SMC_SRIF_WDOG_SHIFT                      (13U)
19653 /*! WDOG - Watchdog Reset
19654  *  0b0..Reset source not pending.
19655  *  0b1..Reset source pending.
19656  */
19657 #define SMC_SRIF_WDOG(x)                         (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_WDOG_SHIFT)) & SMC_SRIF_WDOG_MASK)
19658 
19659 #define SMC_SRIF_SW_MASK                         (0x4000U)
19660 #define SMC_SRIF_SW_SHIFT                        (14U)
19661 /*! SW - Software Reset
19662  *  0b0..Reset source not pending.
19663  *  0b1..Reset source pending.
19664  */
19665 #define SMC_SRIF_SW(x)                           (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_SW_SHIFT)) & SMC_SRIF_SW_MASK)
19666 
19667 #define SMC_SRIF_LOCKUP_MASK                     (0x8000U)
19668 #define SMC_SRIF_LOCKUP_SHIFT                    (15U)
19669 /*! LOCKUP - Lockup Reset
19670  *  0b0..Reset source not pending.
19671  *  0b1..Reset source pending.
19672  */
19673 #define SMC_SRIF_LOCKUP(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_LOCKUP_SHIFT)) & SMC_SRIF_LOCKUP_MASK)
19674 
19675 #define SMC_SRIF_CORE0_MASK                      (0x10000U)
19676 #define SMC_SRIF_CORE0_SHIFT                     (16U)
19677 /*! CORE0 - Core0 Reset
19678  *  0b0..Reset source not pending.
19679  *  0b1..Reset source pending.
19680  */
19681 #define SMC_SRIF_CORE0(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_CORE0_SHIFT)) & SMC_SRIF_CORE0_MASK)
19682 
19683 #define SMC_SRIF_CORE1_MASK                      (0x20000U)
19684 #define SMC_SRIF_CORE1_SHIFT                     (17U)
19685 /*! CORE1 - Core1 Reset
19686  *  0b0..Reset source not pending.
19687  *  0b1..Reset source pending.
19688  */
19689 #define SMC_SRIF_CORE1(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_CORE1_SHIFT)) & SMC_SRIF_CORE1_MASK)
19690 /*! @} */
19691 
19692 /*! @name MR - Mode Register */
19693 /*! @{ */
19694 
19695 #define SMC_MR_BOOTCFG_MASK                      (0x3U)
19696 #define SMC_MR_BOOTCFG_SHIFT                     (0U)
19697 /*! BOOTCFG - Boot Configuration
19698  *  0b00..Boot from Flash.
19699  *  0b01..Boot from ROM due to BOOTCFG0 pin assertion.
19700  *  0b10..Boot from ROM due to FOPT configuration.
19701  *  0b11..Boot from ROM due to both BOOTCFG0 pin assertion and FOPT configuration.
19702  */
19703 #define SMC_MR_BOOTCFG(x)                        (((uint32_t)(((uint32_t)(x)) << SMC_MR_BOOTCFG_SHIFT)) & SMC_MR_BOOTCFG_MASK)
19704 /*! @} */
19705 
19706 /*! @name FM - Force Mode Register */
19707 /*! @{ */
19708 
19709 #define SMC_FM_FORCECFG_MASK                     (0x3U)
19710 #define SMC_FM_FORCECFG_SHIFT                    (0U)
19711 /*! FORCECFG - Boot Configuration
19712  *  0b00..No effect.
19713  *  0b01..Assert corresponding bit in Mode Register on next system reset.
19714  */
19715 #define SMC_FM_FORCECFG(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_FM_FORCECFG_SHIFT)) & SMC_FM_FORCECFG_MASK)
19716 /*! @} */
19717 
19718 /*! @name SRAMLPR - SRAM Low Power Register */
19719 /*! @{ */
19720 
19721 #define SMC_SRAMLPR_LPE_MASK                     (0xFFFFFFFFU)
19722 #define SMC_SRAMLPR_LPE_SHIFT                    (0U)
19723 /*! LPE - Low Power Enable */
19724 #define SMC_SRAMLPR_LPE(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SRAMLPR_LPE_SHIFT)) & SMC_SRAMLPR_LPE_MASK)
19725 /*! @} */
19726 
19727 /*! @name SRAMDSR - SRAM Deep Sleep Register */
19728 /*! @{ */
19729 
19730 #define SMC_SRAMDSR_DSE_MASK                     (0xFFFFFFFFU)
19731 #define SMC_SRAMDSR_DSE_SHIFT                    (0U)
19732 /*! DSE - Deep Sleep Enable */
19733 #define SMC_SRAMDSR_DSE(x)                       (((uint32_t)(((uint32_t)(x)) << SMC_SRAMDSR_DSE_SHIFT)) & SMC_SRAMDSR_DSE_MASK)
19734 /*! @} */
19735 
19736 
19737 /*!
19738  * @}
19739  */ /* end of group SMC_Register_Masks */
19740 
19741 
19742 /* SMC - Peripheral instance base addresses */
19743 /** Peripheral SMC0 base address */
19744 #define SMC0_BASE                                (0x40020000u)
19745 /** Peripheral SMC0 base pointer */
19746 #define SMC0                                     ((SMC_Type *)SMC0_BASE)
19747 /** Peripheral SMC1 base address */
19748 #define SMC1_BASE                                (0x41020000u)
19749 /** Peripheral SMC1 base pointer */
19750 #define SMC1                                     ((SMC_Type *)SMC1_BASE)
19751 /** Array initializer of SMC peripheral base addresses */
19752 #define SMC_BASE_ADDRS                           { SMC0_BASE, SMC1_BASE }
19753 /** Array initializer of SMC peripheral base pointers */
19754 #define SMC_BASE_PTRS                            { SMC0, SMC1 }
19755 /** Interrupt vectors for the SMC peripheral type */
19756 #define SMC_IRQS                                 { NotAvail_IRQn, MSMC_IRQn }
19757 
19758 /*!
19759  * @}
19760  */ /* end of group SMC_Peripheral_Access_Layer */
19761 
19762 
19763 /* ----------------------------------------------------------------------------
19764    -- SPM Peripheral Access Layer
19765    ---------------------------------------------------------------------------- */
19766 
19767 /*!
19768  * @addtogroup SPM_Peripheral_Access_Layer SPM Peripheral Access Layer
19769  * @{
19770  */
19771 
19772 /** SPM - Register Layout Typedef */
19773 typedef struct {
19774   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
19775        uint8_t RESERVED_0[4];
19776   __I  uint32_t RSR;                               /**< Regulator Status Register, offset: 0x8 */
19777        uint8_t RESERVED_1[4];
19778   __IO uint32_t RCTRL;                             /**< Run Control Register, offset: 0x10 */
19779   __IO uint32_t LPCTRL;                            /**< Low Power Control Register, offset: 0x14 */
19780        uint8_t RESERVED_2[232];
19781   __IO uint32_t CORERCNFG;                         /**< CORE LDO RUN Configuration Register, offset: 0x100 */
19782   __IO uint32_t CORELPCNFG;                        /**< CORE LDO Low Power Configuration register, offset: 0x104 */
19783   __IO uint32_t CORESC;                            /**< Core LDO Status And Control register, offset: 0x108 */
19784   __IO uint32_t LVDSC1;                            /**< Low Voltage Detect Status and Control 1 register, offset: 0x10C */
19785   __IO uint32_t LVDSC2;                            /**< Low Voltage Detect Status and Control 2 register, offset: 0x110 */
19786   __IO uint32_t HVDSC1;                            /**< High Voltage Detect Status And Control 1 register, offset: 0x114 */
19787        uint8_t RESERVED_3[232];
19788   __IO uint32_t AUXLDOLPCNFG;                      /**< AUX LDO Low Power Configuration register, offset: 0x200 */
19789   __IO uint32_t AUXLDOSC;                          /**< AUX LDO Status And Control register, offset: 0x204 */
19790        uint8_t RESERVED_4[252];
19791   __IO uint32_t DCDCSC;                            /**< DCDC Status Control Register, offset: 0x304 */
19792        uint8_t RESERVED_5[4];
19793   __IO uint32_t DCDCC1;                            /**< DCDC Control Register 1, offset: 0x30C */
19794   __IO uint32_t DCDCC2;                            /**< DCDC Control Register 2, offset: 0x310 */
19795   __IO uint32_t DCDCC3;                            /**< DCDC Control Register 3, offset: 0x314 */
19796   __IO uint32_t DCDCC4;                            /**< DCDC Control Register 4, offset: 0x318 */
19797        uint8_t RESERVED_6[4];
19798   __IO uint32_t DCDCC6;                            /**< DCDC Control Register 6, offset: 0x320 */
19799        uint8_t RESERVED_7[232];
19800   __IO uint32_t LPREQPINCNTRL;                     /**< LP Request Pin Control Register, offset: 0x40C */
19801 } SPM_Type;
19802 
19803 /* ----------------------------------------------------------------------------
19804    -- SPM Register Masks
19805    ---------------------------------------------------------------------------- */
19806 
19807 /*!
19808  * @addtogroup SPM_Register_Masks SPM Register Masks
19809  * @{
19810  */
19811 
19812 /*! @name VERID - Version ID Register */
19813 /*! @{ */
19814 
19815 #define SPM_VERID_FEATURE_MASK                   (0xFFFFU)
19816 #define SPM_VERID_FEATURE_SHIFT                  (0U)
19817 /*! FEATURE - Feature Specification Number
19818  *  0b0000000000000000..Standard features implemented.
19819  */
19820 #define SPM_VERID_FEATURE(x)                     (((uint32_t)(((uint32_t)(x)) << SPM_VERID_FEATURE_SHIFT)) & SPM_VERID_FEATURE_MASK)
19821 
19822 #define SPM_VERID_MINOR_MASK                     (0xFF0000U)
19823 #define SPM_VERID_MINOR_SHIFT                    (16U)
19824 /*! MINOR - MINOR */
19825 #define SPM_VERID_MINOR(x)                       (((uint32_t)(((uint32_t)(x)) << SPM_VERID_MINOR_SHIFT)) & SPM_VERID_MINOR_MASK)
19826 
19827 #define SPM_VERID_MAJOR_MASK                     (0xFF000000U)
19828 #define SPM_VERID_MAJOR_SHIFT                    (24U)
19829 /*! MAJOR - MAJOR */
19830 #define SPM_VERID_MAJOR(x)                       (((uint32_t)(((uint32_t)(x)) << SPM_VERID_MAJOR_SHIFT)) & SPM_VERID_MAJOR_MASK)
19831 /*! @} */
19832 
19833 /*! @name RSR - Regulator Status Register */
19834 /*! @{ */
19835 
19836 #define SPM_RSR_REGSEL_MASK                      (0x7U)
19837 #define SPM_RSR_REGSEL_SHIFT                     (0U)
19838 /*! REGSEL - REGSEL */
19839 #define SPM_RSR_REGSEL(x)                        (((uint32_t)(((uint32_t)(x)) << SPM_RSR_REGSEL_SHIFT)) & SPM_RSR_REGSEL_MASK)
19840 
19841 #define SPM_RSR_MCUPMSTAT_MASK                   (0x1F0000U)
19842 #define SPM_RSR_MCUPMSTAT_SHIFT                  (16U)
19843 /*! MCUPMSTAT - MCU Power Mode Status
19844  *  0b00000..Reserved
19845  *  0b00001..Last Low Power mode is STOP.
19846  *  0b00010..Last Low Power mode is VLPS.
19847  *  0b00100..Last Low Power mode is LLS.
19848  *  0b01000..Last Low Power mode is VLLS23.
19849  *  0b10000..Last Low Power mode is VLLS01.
19850  */
19851 #define SPM_RSR_MCUPMSTAT(x)                     (((uint32_t)(((uint32_t)(x)) << SPM_RSR_MCUPMSTAT_SHIFT)) & SPM_RSR_MCUPMSTAT_MASK)
19852 /*! @} */
19853 
19854 /*! @name RCTRL - Run Control Register */
19855 /*! @{ */
19856 
19857 #define SPM_RCTRL_REGSEL_MASK                    (0x7U)
19858 #define SPM_RCTRL_REGSEL_SHIFT                   (0U)
19859 /*! REGSEL - REGSEL */
19860 #define SPM_RCTRL_REGSEL(x)                      (((uint32_t)(((uint32_t)(x)) << SPM_RCTRL_REGSEL_SHIFT)) & SPM_RCTRL_REGSEL_MASK)
19861 /*! @} */
19862 
19863 /*! @name LPCTRL - Low Power Control Register */
19864 /*! @{ */
19865 
19866 #define SPM_LPCTRL_REGSEL_MASK                   (0x7U)
19867 #define SPM_LPCTRL_REGSEL_SHIFT                  (0U)
19868 /*! REGSEL - REGSEL */
19869 #define SPM_LPCTRL_REGSEL(x)                     (((uint32_t)(((uint32_t)(x)) << SPM_LPCTRL_REGSEL_SHIFT)) & SPM_LPCTRL_REGSEL_MASK)
19870 /*! @} */
19871 
19872 /*! @name CORERCNFG - CORE LDO RUN Configuration Register */
19873 /*! @{ */
19874 
19875 #define SPM_CORERCNFG_VDDIOVDDMEN_MASK           (0x10000U)
19876 #define SPM_CORERCNFG_VDDIOVDDMEN_SHIFT          (16U)
19877 /*! VDDIOVDDMEN - VDDIOVDDMEN
19878  *  0b0..VDDIO voltage monitor disabled in run modes.
19879  *  0b1..VDDIO voltage monitor enabled in run modes.
19880  */
19881 #define SPM_CORERCNFG_VDDIOVDDMEN(x)             (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_VDDIOVDDMEN_SHIFT)) & SPM_CORERCNFG_VDDIOVDDMEN_MASK)
19882 
19883 #define SPM_CORERCNFG_USBVDDMEN_MASK             (0x20000U)
19884 #define SPM_CORERCNFG_USBVDDMEN_SHIFT            (17U)
19885 /*! USBVDDMEN - USBVDDMEN
19886  *  0b0..USB voltage monitor disabled in run modes.
19887  *  0b1..USB voltage monitor enabled in run modes.
19888  */
19889 #define SPM_CORERCNFG_USBVDDMEN(x)               (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_USBVDDMEN_SHIFT)) & SPM_CORERCNFG_USBVDDMEN_MASK)
19890 
19891 #define SPM_CORERCNFG_RTCVDDMEN_MASK             (0x40000U)
19892 #define SPM_CORERCNFG_RTCVDDMEN_SHIFT            (18U)
19893 /*! RTCVDDMEN - RTCVDDMEN
19894  *  0b0..RTC voltage monitor disabled in run modes.
19895  *  0b1..RTC voltage monitor enabled in run modes.
19896  */
19897 #define SPM_CORERCNFG_RTCVDDMEN(x)               (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_RTCVDDMEN_SHIFT)) & SPM_CORERCNFG_RTCVDDMEN_MASK)
19898 /*! @} */
19899 
19900 /*! @name CORELPCNFG - CORE LDO Low Power Configuration register */
19901 /*! @{ */
19902 
19903 #define SPM_CORELPCNFG_LPSEL_MASK                (0x2U)
19904 #define SPM_CORELPCNFG_LPSEL_SHIFT               (1U)
19905 /*! LPSEL - LPSEL
19906  *  0b0..Core LDO enters low power state in VLP/Stop modes.
19907  *  0b1..Core LDO remains in high power state in VLP/Stop modes. If LPSEL = 1 in a low power mode then BGEN must also be set to 1.
19908  */
19909 #define SPM_CORELPCNFG_LPSEL(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPSEL_SHIFT)) & SPM_CORELPCNFG_LPSEL_MASK)
19910 
19911 #define SPM_CORELPCNFG_BGEN_MASK                 (0x4U)
19912 #define SPM_CORELPCNFG_BGEN_SHIFT                (2U)
19913 /*! BGEN - Bandgap Enable In Low Power Mode Operation
19914  *  0b0..Bandgap is disabled in STOP/VLP/LLS and VLLS modes.
19915  *  0b1..Bandgap remains enabled in STOP/VLP/LLS and VLLS modes.
19916  */
19917 #define SPM_CORELPCNFG_BGEN(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGEN_SHIFT)) & SPM_CORELPCNFG_BGEN_MASK)
19918 
19919 #define SPM_CORELPCNFG_BGBEN_MASK                (0x8U)
19920 #define SPM_CORELPCNFG_BGBEN_SHIFT               (3U)
19921 /*! BGBEN - Bandgap Buffer Enable
19922  *  0b0..Bandgap buffer not enabled
19923  *  0b1..Bandgap buffer enabled BGEN must be set when this bit is also set.
19924  */
19925 #define SPM_CORELPCNFG_BGBEN(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGBEN_SHIFT)) & SPM_CORELPCNFG_BGBEN_MASK)
19926 
19927 #define SPM_CORELPCNFG_BGBDS_MASK                (0x10U)
19928 #define SPM_CORELPCNFG_BGBDS_SHIFT               (4U)
19929 /*! BGBDS - Bandgap Buffer Drive Select
19930  *  0b0..Low Drive
19931  *  0b1..High Drive
19932  */
19933 #define SPM_CORELPCNFG_BGBDS(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGBDS_SHIFT)) & SPM_CORELPCNFG_BGBDS_MASK)
19934 
19935 #define SPM_CORELPCNFG_LPOEN_MASK                (0x80U)
19936 #define SPM_CORELPCNFG_LPOEN_SHIFT               (7U)
19937 /*! LPOEN - LPO Enabled
19938  *  0b0..LPO is disabled in VLLS0/1 modes.
19939  *  0b1..LPO remains enabled in VLLS0/1 modes.
19940  */
19941 #define SPM_CORELPCNFG_LPOEN(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPOEN_SHIFT)) & SPM_CORELPCNFG_LPOEN_MASK)
19942 
19943 #define SPM_CORELPCNFG_POREN_MASK                (0x100U)
19944 #define SPM_CORELPCNFG_POREN_SHIFT               (8U)
19945 /*! POREN - POR Enabled
19946  *  0b0..POR brownout is disabled in VLLS0/1 mode.
19947  *  0b1..POR brownout remains enabled in VLLS0/1 mode.
19948  */
19949 #define SPM_CORELPCNFG_POREN(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_POREN_SHIFT)) & SPM_CORELPCNFG_POREN_MASK)
19950 
19951 #define SPM_CORELPCNFG_LVDEN_MASK                (0x200U)
19952 #define SPM_CORELPCNFG_LVDEN_SHIFT               (9U)
19953 /*! LVDEN - LVD Enabled
19954  *  0b0..LVD/HVD is disabled in low power modes.
19955  *  0b1..LVD/HVD remains enabled in low power modes. BGEN must be set when this bit is also set.
19956  */
19957 #define SPM_CORELPCNFG_LVDEN(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LVDEN_SHIFT)) & SPM_CORELPCNFG_LVDEN_MASK)
19958 
19959 #define SPM_CORELPCNFG_LPHIDRIVE_MASK            (0x4000U)
19960 #define SPM_CORELPCNFG_LPHIDRIVE_SHIFT           (14U)
19961 /*! LPHIDRIVE - LPHIDRIVE
19962  *  0b0..High Drive disabled.
19963  *  0b1..High Drive enabled.
19964  */
19965 #define SPM_CORELPCNFG_LPHIDRIVE(x)              (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPHIDRIVE_SHIFT)) & SPM_CORELPCNFG_LPHIDRIVE_MASK)
19966 
19967 #define SPM_CORELPCNFG_ALLREFEN_MASK             (0x8000U)
19968 #define SPM_CORELPCNFG_ALLREFEN_SHIFT            (15U)
19969 /*! ALLREFEN - All Reference Enable. This bit only has an affect in VLLS0/1.
19970  *  0b0..All references are disabled in VLLS0/1.
19971  *  0b1..All references are enabled in VLLS0/1.
19972  */
19973 #define SPM_CORELPCNFG_ALLREFEN(x)               (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_ALLREFEN_SHIFT)) & SPM_CORELPCNFG_ALLREFEN_MASK)
19974 
19975 #define SPM_CORELPCNFG_VDDIOVDDMEN_MASK          (0x10000U)
19976 #define SPM_CORELPCNFG_VDDIOVDDMEN_SHIFT         (16U)
19977 /*! VDDIOVDDMEN - VDDIOVDDMEN
19978  *  0b0..VDDIO voltage monitor disabled in lp modes.
19979  *  0b1..VDDIO voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes.
19980  */
19981 #define SPM_CORELPCNFG_VDDIOVDDMEN(x)            (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_VDDIOVDDMEN_SHIFT)) & SPM_CORELPCNFG_VDDIOVDDMEN_MASK)
19982 
19983 #define SPM_CORELPCNFG_USBVDDMEN_MASK            (0x20000U)
19984 #define SPM_CORELPCNFG_USBVDDMEN_SHIFT           (17U)
19985 /*! USBVDDMEN - USBVDDMEN
19986  *  0b0..USB voltage monitor disabled in lp modes.
19987  *  0b1..USB voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes.
19988  */
19989 #define SPM_CORELPCNFG_USBVDDMEN(x)              (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_USBVDDMEN_SHIFT)) & SPM_CORELPCNFG_USBVDDMEN_MASK)
19990 
19991 #define SPM_CORELPCNFG_RTCVDDMEN_MASK            (0x40000U)
19992 #define SPM_CORELPCNFG_RTCVDDMEN_SHIFT           (18U)
19993 /*! RTCVDDMEN - RTCVDDMEN
19994  *  0b0..RTC voltage monitor disabled in lp modes.
19995  *  0b1..RTC voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes.
19996  */
19997 #define SPM_CORELPCNFG_RTCVDDMEN(x)              (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_RTCVDDMEN_SHIFT)) & SPM_CORELPCNFG_RTCVDDMEN_MASK)
19998 /*! @} */
19999 
20000 /*! @name CORESC - Core LDO Status And Control register */
20001 /*! @{ */
20002 
20003 #define SPM_CORESC_VSEL_OFFSET_MASK              (0x2U)
20004 #define SPM_CORESC_VSEL_OFFSET_SHIFT             (1U)
20005 /*! VSEL_OFFSET - Voltage Offset Select
20006  *  0b0..Core LDO offset not applied.
20007  *  0b1..Core LDO offset is applied.
20008  */
20009 #define SPM_CORESC_VSEL_OFFSET(x)                (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VSEL_OFFSET_SHIFT)) & SPM_CORESC_VSEL_OFFSET_MASK)
20010 
20011 #define SPM_CORESC_REGONS_MASK                   (0x4U)
20012 #define SPM_CORESC_REGONS_SHIFT                  (2U)
20013 /*! REGONS - CORE LDO Regulator in Run Regulation Status
20014  *  0b0..Regulator is in low power state or in transition to/from it.
20015  *  0b1..Regulator is in high power state.
20016  */
20017 #define SPM_CORESC_REGONS(x)                     (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_REGONS_SHIFT)) & SPM_CORESC_REGONS_MASK)
20018 
20019 #define SPM_CORESC_ACKISO_MASK                   (0x8U)
20020 #define SPM_CORESC_ACKISO_SHIFT                  (3U)
20021 /*! ACKISO - Acknowledge Isolation
20022  *  0b0..Peripherals and I/O pads are in normal run state.
20023  *  0b1..Certain peripherals and I/O pads are in a isolated and latched state.
20024  */
20025 #define SPM_CORESC_ACKISO(x)                     (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_ACKISO_SHIFT)) & SPM_CORESC_ACKISO_MASK)
20026 
20027 #define SPM_CORESC_TRIM_MASK                     (0x3F00U)
20028 #define SPM_CORESC_TRIM_SHIFT                    (8U)
20029 /*! TRIM - Core LDO Regulator TRIM value */
20030 #define SPM_CORESC_TRIM(x)                       (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_TRIM_SHIFT)) & SPM_CORESC_TRIM_MASK)
20031 
20032 #define SPM_CORESC_VDDIOOVRIDE_MASK              (0x10000U)
20033 #define SPM_CORESC_VDDIOOVRIDE_SHIFT             (16U)
20034 /*! VDDIOOVRIDE - VDDIOOVRIDE
20035  *  0b0..VDDIOOK status set to 1'b0.
20036  *  0b1..VDDIOOK status set to 1'b1.
20037  */
20038 #define SPM_CORESC_VDDIOOVRIDE(x)                (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VDDIOOVRIDE_SHIFT)) & SPM_CORESC_VDDIOOVRIDE_MASK)
20039 
20040 #define SPM_CORESC_USBOVRIDE_MASK                (0x20000U)
20041 #define SPM_CORESC_USBOVRIDE_SHIFT               (17U)
20042 /*! USBOVRIDE - USBOVRIDE
20043  *  0b0..USBVDDOK status set to 1'b0.
20044  *  0b1..USBVDDOK status set to 1'b1.
20045  */
20046 #define SPM_CORESC_USBOVRIDE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_USBOVRIDE_SHIFT)) & SPM_CORESC_USBOVRIDE_MASK)
20047 
20048 #define SPM_CORESC_RTCOVRIDE_MASK                (0x40000U)
20049 #define SPM_CORESC_RTCOVRIDE_SHIFT               (18U)
20050 /*! RTCOVRIDE - RTCOVRIDE
20051  *  0b0..RTCVDDOK status set to 1'b0.
20052  *  0b1..RTCVDDOK status set to 1'b1.
20053  */
20054 #define SPM_CORESC_RTCOVRIDE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_RTCOVRIDE_SHIFT)) & SPM_CORESC_RTCOVRIDE_MASK)
20055 
20056 #define SPM_CORESC_VDDIOOK_MASK                  (0x1000000U)
20057 #define SPM_CORESC_VDDIOOK_SHIFT                 (24U)
20058 /*! VDDIOOK - VDDIOOK */
20059 #define SPM_CORESC_VDDIOOK(x)                    (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VDDIOOK_SHIFT)) & SPM_CORESC_VDDIOOK_MASK)
20060 
20061 #define SPM_CORESC_USBVDDOK_MASK                 (0x2000000U)
20062 #define SPM_CORESC_USBVDDOK_SHIFT                (25U)
20063 /*! USBVDDOK - USBVDDOK */
20064 #define SPM_CORESC_USBVDDOK(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_USBVDDOK_SHIFT)) & SPM_CORESC_USBVDDOK_MASK)
20065 
20066 #define SPM_CORESC_RTCVDDOK_MASK                 (0x4000000U)
20067 #define SPM_CORESC_RTCVDDOK_SHIFT                (26U)
20068 /*! RTCVDDOK - RTCVDDOK */
20069 #define SPM_CORESC_RTCVDDOK(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_RTCVDDOK_SHIFT)) & SPM_CORESC_RTCVDDOK_MASK)
20070 /*! @} */
20071 
20072 /*! @name LVDSC1 - Low Voltage Detect Status and Control 1 register */
20073 /*! @{ */
20074 
20075 #define SPM_LVDSC1_COREVDD_LVDRE_MASK            (0x10U)
20076 #define SPM_LVDSC1_COREVDD_LVDRE_SHIFT           (4U)
20077 /*! COREVDD_LVDRE - Core Low-Voltage Detect Reset Enable
20078  *  0b0..COREVDD_LVDF does not generate hardware resets
20079  *  0b1..Force an MCU reset when CORE_LVDF = 1
20080  */
20081 #define SPM_LVDSC1_COREVDD_LVDRE(x)              (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDRE_SHIFT)) & SPM_LVDSC1_COREVDD_LVDRE_MASK)
20082 
20083 #define SPM_LVDSC1_COREVDD_LVDIE_MASK            (0x20U)
20084 #define SPM_LVDSC1_COREVDD_LVDIE_SHIFT           (5U)
20085 /*! COREVDD_LVDIE - Low-Voltage Detect Interrupt Enable
20086  *  0b0..Hardware interrupt disabled (use polling)
20087  *  0b1..Request a hardware interrupt when LVDF = 1
20088  */
20089 #define SPM_LVDSC1_COREVDD_LVDIE(x)              (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDIE_SHIFT)) & SPM_LVDSC1_COREVDD_LVDIE_MASK)
20090 
20091 #define SPM_LVDSC1_COREVDD_LVDACK_MASK           (0x40U)
20092 #define SPM_LVDSC1_COREVDD_LVDACK_SHIFT          (6U)
20093 /*! COREVDD_LVDACK - Low-Voltage Detect Acknowledge */
20094 #define SPM_LVDSC1_COREVDD_LVDACK(x)             (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDACK_SHIFT)) & SPM_LVDSC1_COREVDD_LVDACK_MASK)
20095 
20096 #define SPM_LVDSC1_COREVDD_LVDF_MASK             (0x80U)
20097 #define SPM_LVDSC1_COREVDD_LVDF_SHIFT            (7U)
20098 /*! COREVDD_LVDF - Low-Voltage Detect Flag
20099  *  0b0..Low-voltage event not detected
20100  *  0b1..Low-voltage event detected
20101  */
20102 #define SPM_LVDSC1_COREVDD_LVDF(x)               (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDF_SHIFT)) & SPM_LVDSC1_COREVDD_LVDF_MASK)
20103 
20104 #define SPM_LVDSC1_VDD_LVDV_MASK                 (0x30000U)
20105 #define SPM_LVDSC1_VDD_LVDV_SHIFT                (16U)
20106 /*! VDD_LVDV - VDD Low-Voltage Detect Voltage Select
20107  *  0b00..Low trip point selected (V LVD = V LVDL )
20108  *  0b01..High trip point selected (V LVD = V LVDH )
20109  *  0b10..Reserved
20110  *  0b11..Reserved
20111  */
20112 #define SPM_LVDSC1_VDD_LVDV(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDV_SHIFT)) & SPM_LVDSC1_VDD_LVDV_MASK)
20113 
20114 #define SPM_LVDSC1_VDD_LVDRE_MASK                (0x100000U)
20115 #define SPM_LVDSC1_VDD_LVDRE_SHIFT               (20U)
20116 /*! VDD_LVDRE - VDD Low-Voltage Detect Reset Enable
20117  *  0b0..VDD_LVDF does not generate hardware resets
20118  *  0b1..Force an MCU reset when VDD_LVDF = 1
20119  */
20120 #define SPM_LVDSC1_VDD_LVDRE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDRE_SHIFT)) & SPM_LVDSC1_VDD_LVDRE_MASK)
20121 
20122 #define SPM_LVDSC1_VDD_LVDIE_MASK                (0x200000U)
20123 #define SPM_LVDSC1_VDD_LVDIE_SHIFT               (21U)
20124 /*! VDD_LVDIE - VDD Low-Voltage Detect Interrupt Enable
20125  *  0b0..Hardware interrupt disabled (use polling)
20126  *  0b1..Request a hardware interrupt when VDD_LVDF = 1
20127  */
20128 #define SPM_LVDSC1_VDD_LVDIE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDIE_SHIFT)) & SPM_LVDSC1_VDD_LVDIE_MASK)
20129 
20130 #define SPM_LVDSC1_VDD_LVDACK_MASK               (0x400000U)
20131 #define SPM_LVDSC1_VDD_LVDACK_SHIFT              (22U)
20132 /*! VDD_LVDACK - VDD Low-Voltage Detect Acknowledge */
20133 #define SPM_LVDSC1_VDD_LVDACK(x)                 (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDACK_SHIFT)) & SPM_LVDSC1_VDD_LVDACK_MASK)
20134 
20135 #define SPM_LVDSC1_VDD_LVDF_MASK                 (0x800000U)
20136 #define SPM_LVDSC1_VDD_LVDF_SHIFT                (23U)
20137 /*! VDD_LVDF - VDD Low-Voltage Detect Flag
20138  *  0b0..Low-voltage event not detected
20139  *  0b1..Low-voltage event detected
20140  */
20141 #define SPM_LVDSC1_VDD_LVDF(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDF_SHIFT)) & SPM_LVDSC1_VDD_LVDF_MASK)
20142 /*! @} */
20143 
20144 /*! @name LVDSC2 - Low Voltage Detect Status and Control 2 register */
20145 /*! @{ */
20146 
20147 #define SPM_LVDSC2_VDD_LVWV_MASK                 (0x30000U)
20148 #define SPM_LVDSC2_VDD_LVWV_SHIFT                (16U)
20149 /*! VDD_LVWV - VDD Low-Voltage Warning Voltage Select
20150  *  0b00..Low trip point selected (V LVW = VLVW1)
20151  *  0b01..Mid 1 trip point selected (V LVW = VLVW2)
20152  *  0b10..Mid 2 trip point selected (V LVW = VLVW3)
20153  *  0b11..High trip point selected (V LVW = VLVW4)
20154  */
20155 #define SPM_LVDSC2_VDD_LVWV(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWV_SHIFT)) & SPM_LVDSC2_VDD_LVWV_MASK)
20156 
20157 #define SPM_LVDSC2_VDD_LVWIE_MASK                (0x200000U)
20158 #define SPM_LVDSC2_VDD_LVWIE_SHIFT               (21U)
20159 /*! VDD_LVWIE - VDD Low-Voltage Warning Interrupt Enable
20160  *  0b0..Hardware interrupt disabled (use polling)
20161  *  0b1..Request a hardware interrupt when VDD_LVWF = 1
20162  */
20163 #define SPM_LVDSC2_VDD_LVWIE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWIE_SHIFT)) & SPM_LVDSC2_VDD_LVWIE_MASK)
20164 
20165 #define SPM_LVDSC2_VDD_LVWACK_MASK               (0x400000U)
20166 #define SPM_LVDSC2_VDD_LVWACK_SHIFT              (22U)
20167 /*! VDD_LVWACK - VDD Low-Voltage Warning Acknowledge */
20168 #define SPM_LVDSC2_VDD_LVWACK(x)                 (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWACK_SHIFT)) & SPM_LVDSC2_VDD_LVWACK_MASK)
20169 
20170 #define SPM_LVDSC2_VDD_LVWF_MASK                 (0x800000U)
20171 #define SPM_LVDSC2_VDD_LVWF_SHIFT                (23U)
20172 /*! VDD_LVWF - VDD Low-Voltage Warning Flag
20173  *  0b0..Low-voltage warning event not detected
20174  *  0b1..Low-voltage warning event detected
20175  */
20176 #define SPM_LVDSC2_VDD_LVWF(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWF_SHIFT)) & SPM_LVDSC2_VDD_LVWF_MASK)
20177 /*! @} */
20178 
20179 /*! @name HVDSC1 - High Voltage Detect Status And Control 1 register */
20180 /*! @{ */
20181 
20182 #define SPM_HVDSC1_VDD_HVDV_MASK                 (0x10000U)
20183 #define SPM_HVDSC1_VDD_HVDV_SHIFT                (16U)
20184 /*! VDD_HVDV - VDD High-Voltage Detect Voltage Select
20185  *  0b0..Low trip point selected (V VDD = V VDD_HVDL )
20186  *  0b1..High trip point selected (V VDD = V VDD_HVDH )
20187  */
20188 #define SPM_HVDSC1_VDD_HVDV(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDV_SHIFT)) & SPM_HVDSC1_VDD_HVDV_MASK)
20189 
20190 #define SPM_HVDSC1_VDD_HVDRE_MASK                (0x100000U)
20191 #define SPM_HVDSC1_VDD_HVDRE_SHIFT               (20U)
20192 /*! VDD_HVDRE - VDD High-Voltage Detect Reset Enable
20193  *  0b0..VDD HVDF does not generate hardware resets
20194  *  0b1..Force an MCU reset when VDD_HVDF = 1
20195  */
20196 #define SPM_HVDSC1_VDD_HVDRE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDRE_SHIFT)) & SPM_HVDSC1_VDD_HVDRE_MASK)
20197 
20198 #define SPM_HVDSC1_VDD_HVDIE_MASK                (0x200000U)
20199 #define SPM_HVDSC1_VDD_HVDIE_SHIFT               (21U)
20200 /*! VDD_HVDIE - VDD High-Voltage Detect Interrupt Enable
20201  *  0b0..Hardware interrupt disabled (use polling)
20202  *  0b1..Request a hardware interrupt when HVDF = 1
20203  */
20204 #define SPM_HVDSC1_VDD_HVDIE(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDIE_SHIFT)) & SPM_HVDSC1_VDD_HVDIE_MASK)
20205 
20206 #define SPM_HVDSC1_VDD_HVDACK_MASK               (0x400000U)
20207 #define SPM_HVDSC1_VDD_HVDACK_SHIFT              (22U)
20208 /*! VDD_HVDACK - VDD High-Voltage Detect Acknowledge */
20209 #define SPM_HVDSC1_VDD_HVDACK(x)                 (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDACK_SHIFT)) & SPM_HVDSC1_VDD_HVDACK_MASK)
20210 
20211 #define SPM_HVDSC1_VDD_HVDF_MASK                 (0x800000U)
20212 #define SPM_HVDSC1_VDD_HVDF_SHIFT                (23U)
20213 /*! VDD_HVDF - VDD High-Voltage Detect Flag
20214  *  0b0..Vdd High-voltage event not detected
20215  *  0b1..Vdd High-voltage event detected
20216  */
20217 #define SPM_HVDSC1_VDD_HVDF(x)                   (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDF_SHIFT)) & SPM_HVDSC1_VDD_HVDF_MASK)
20218 /*! @} */
20219 
20220 /*! @name AUXLDOLPCNFG - AUX LDO Low Power Configuration register */
20221 /*! @{ */
20222 
20223 #define SPM_AUXLDOLPCNFG_LPSEL_MASK              (0x2U)
20224 #define SPM_AUXLDOLPCNFG_LPSEL_SHIFT             (1U)
20225 /*! LPSEL - LPSEL
20226  *  0b0..AUX LDO regulator enters low power state in VLP/Stop modes.
20227  *  0b1..AUX LDO regulator remains in high power state in VLP/Stop modes.
20228  */
20229 #define SPM_AUXLDOLPCNFG_LPSEL(x)                (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOLPCNFG_LPSEL_SHIFT)) & SPM_AUXLDOLPCNFG_LPSEL_MASK)
20230 /*! @} */
20231 
20232 /*! @name AUXLDOSC - AUX LDO Status And Control register */
20233 /*! @{ */
20234 
20235 #define SPM_AUXLDOSC_AUXREGVSEL_MASK             (0x1U)
20236 #define SPM_AUXLDOSC_AUXREGVSEL_SHIFT            (0U)
20237 /*! AUXREGVSEL - Auxiliary Regulator Voltage Select
20238  *  0b0..Regulate to 1.8V.
20239  *  0b1..Regulate to 1.5V.
20240  */
20241 #define SPM_AUXLDOSC_AUXREGVSEL(x)               (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXREGVSEL_SHIFT)) & SPM_AUXLDOSC_AUXREGVSEL_MASK)
20242 
20243 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET_MASK      (0x2U)
20244 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET_SHIFT     (1U)
20245 /*! AUXREGVSEL_OFFSET - Auxiliary Regulator Offset Voltage Select
20246  *  0b0..The AUXREG offset is not applied.
20247  *  0b1..The AUXREG offset is applied.
20248  */
20249 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET(x)        (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXREGVSEL_OFFSET_SHIFT)) & SPM_AUXLDOSC_AUXREGVSEL_OFFSET_MASK)
20250 
20251 #define SPM_AUXLDOSC_AUXTRIM_MASK                (0x1F00U)
20252 #define SPM_AUXLDOSC_AUXTRIM_SHIFT               (8U)
20253 /*! AUXTRIM - Auxiliary Regulator TRIM value */
20254 #define SPM_AUXLDOSC_AUXTRIM(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXTRIM_SHIFT)) & SPM_AUXLDOSC_AUXTRIM_MASK)
20255 
20256 #define SPM_AUXLDOSC_IOSSSEL_MASK                (0x70000U)
20257 #define SPM_AUXLDOSC_IOSSSEL_SHIFT               (16U)
20258 /*! IOSSSEL - IO 1.8 Reg Soft Start Select
20259  *  0b000..Soft Start duration set to 110us.
20260  *  0b001..Soft Start duration set to 95us.
20261  *  0b010..Soft Start duration set to 60us.
20262  *  0b011..Soft Start duration set to 48us.
20263  *  0b100..Soft Start duration set to 38us.
20264  *  0b101..Soft Start duration set to 30us.
20265  *  0b110..Soft Start duration set to 24us.
20266  *  0b111..Soft Start duration set to 17us.
20267  */
20268 #define SPM_AUXLDOSC_IOSSSEL(x)                  (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_IOSSSEL_SHIFT)) & SPM_AUXLDOSC_IOSSSEL_MASK)
20269 /*! @} */
20270 
20271 /*! @name DCDCSC - DCDC Status Control Register */
20272 /*! @{ */
20273 
20274 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_MASK (0x2U)
20275 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_SHIFT (1U)
20276 /*! DCDC_DISABLE_AUTO_CLK_SWITCH - DCDC_DISABLE_AUTO_CLK_SWITCH */
20277 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_SHIFT)) & SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_MASK)
20278 
20279 #define SPM_DCDCSC_DCDC_SEL_CLK_MASK             (0x4U)
20280 #define SPM_DCDCSC_DCDC_SEL_CLK_SHIFT            (2U)
20281 /*! DCDC_SEL_CLK - DCDC_SEL_CLK */
20282 #define SPM_DCDCSC_DCDC_SEL_CLK(x)               (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_SEL_CLK_SHIFT)) & SPM_DCDCSC_DCDC_SEL_CLK_MASK)
20283 
20284 #define SPM_DCDCSC_DCDC_PWD_OSC_INT_MASK         (0x8U)
20285 #define SPM_DCDCSC_DCDC_PWD_OSC_INT_SHIFT        (3U)
20286 /*! DCDC_PWD_OSC_INT - DCDC_PWD_OSC_INT */
20287 #define SPM_DCDCSC_DCDC_PWD_OSC_INT(x)           (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_PWD_OSC_INT_SHIFT)) & SPM_DCDCSC_DCDC_PWD_OSC_INT_MASK)
20288 
20289 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_MASK       (0xC00U)
20290 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_SHIFT      (10U)
20291 /*! DCDC_VBAT_DIV_CTRL - DCDC_VBAT_DIV_CTRL
20292  *  0b00..OFF
20293  *  0b01..VBAT
20294  *  0b10..VBAT / 2
20295  *  0b11..VBAT / 4
20296  */
20297 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL(x)         (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_SHIFT)) & SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_MASK)
20298 
20299 #define SPM_DCDCSC_DCDC_LESS_I_MASK              (0x2000000U)
20300 #define SPM_DCDCSC_DCDC_LESS_I_SHIFT             (25U)
20301 /*! DCDC_LESS_I - DCDC_LESS_I */
20302 #define SPM_DCDCSC_DCDC_LESS_I(x)                (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_LESS_I_SHIFT)) & SPM_DCDCSC_DCDC_LESS_I_MASK)
20303 
20304 #define SPM_DCDCSC_PWD_CMP_OFFSET_MASK           (0x4000000U)
20305 #define SPM_DCDCSC_PWD_CMP_OFFSET_SHIFT          (26U)
20306 /*! PWD_CMP_OFFSET - PWD_CMP_OFFSET */
20307 #define SPM_DCDCSC_PWD_CMP_OFFSET(x)             (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_PWD_CMP_OFFSET_SHIFT)) & SPM_DCDCSC_PWD_CMP_OFFSET_MASK)
20308 
20309 #define SPM_DCDCSC_CLKFLT_FAULT_MASK             (0x40000000U)
20310 #define SPM_DCDCSC_CLKFLT_FAULT_SHIFT            (30U)
20311 /*! CLKFLT_FAULT - DCDC CLKFLT Fault Status Flag */
20312 #define SPM_DCDCSC_CLKFLT_FAULT(x)               (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_CLKFLT_FAULT_SHIFT)) & SPM_DCDCSC_CLKFLT_FAULT_MASK)
20313 
20314 #define SPM_DCDCSC_DCDC_STS_DC_OK_MASK           (0x80000000U)
20315 #define SPM_DCDCSC_DCDC_STS_DC_OK_SHIFT          (31U)
20316 /*! DCDC_STS_DC_OK - DCDC_STS_DC_OK */
20317 #define SPM_DCDCSC_DCDC_STS_DC_OK(x)             (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_STS_DC_OK_SHIFT)) & SPM_DCDCSC_DCDC_STS_DC_OK_MASK)
20318 /*! @} */
20319 
20320 /*! @name DCDCC1 - DCDC Control Register 1 */
20321 /*! @{ */
20322 
20323 #define SPM_DCDCC1_POSLIMIT_BUCK_IN_MASK         (0x7FU)
20324 #define SPM_DCDCC1_POSLIMIT_BUCK_IN_SHIFT        (0U)
20325 /*! POSLIMIT_BUCK_IN - POSLIMIT_BUCK_IN */
20326 #define SPM_DCDCC1_POSLIMIT_BUCK_IN(x)           (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_POSLIMIT_BUCK_IN_SHIFT)) & SPM_DCDCC1_POSLIMIT_BUCK_IN_MASK)
20327 
20328 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_MASK (0x4000000U)
20329 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_SHIFT (26U)
20330 /*! DCDC_LOOPCTRL_EN_CM_HYST - DCDC_LOOPCTRL_EN_CM_HYST */
20331 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST(x)   (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_SHIFT)) & SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_MASK)
20332 
20333 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_MASK (0x8000000U)
20334 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_SHIFT (27U)
20335 /*! DCDC_LOOPCTRL_EN_DF_HYST - DCDC_LOOPCTRL_EN_DF_HYST */
20336 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST(x)   (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_SHIFT)) & SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_MASK)
20337 /*! @} */
20338 
20339 /*! @name DCDCC2 - DCDC Control Register 2 */
20340 /*! @{ */
20341 
20342 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_MASK  (0x2000U)
20343 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_SHIFT (13U)
20344 /*! DCDC_LOOPCTRL_HYST_SIGN - DCDC_LOOPCTRL_HYST_SIGN */
20345 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN(x)    (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_SHIFT)) & SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_MASK)
20346 
20347 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_MASK (0x8000U)
20348 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_SHIFT (15U)
20349 /*! DCDC_BATTMONITOR_EN_BATADJ - DCDC_BATTMONITOR_EN_BATADJ */
20350 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_SHIFT)) & SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_MASK)
20351 
20352 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_MASK (0x3FF0000U)
20353 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_SHIFT (16U)
20354 /*! DCDC_BATTMONITOR_BATT_VAL - DCDC_BATTMONITOR_BATT_VAL */
20355 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL(x)  (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_SHIFT)) & SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_MASK)
20356 /*! @} */
20357 
20358 /*! @name DCDCC3 - DCDC Control Register 3 */
20359 /*! @{ */
20360 
20361 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_MASK     (0x1U)
20362 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_SHIFT    (0U)
20363 /*! DCDC_BYPASS_ADC_MEAS - DCDC_BYPASS_ADC_MEAS */
20364 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS(x)       (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_SHIFT)) & SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_MASK)
20365 
20366 #define SPM_DCDCC3_DCDC_VBAT_VALUE_MASK          (0x1CU)
20367 #define SPM_DCDCC3_DCDC_VBAT_VALUE_SHIFT         (2U)
20368 /*! DCDC_VBAT_VALUE - DCDC_VBAT_VALUE */
20369 #define SPM_DCDCC3_DCDC_VBAT_VALUE(x)            (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VBAT_VALUE_SHIFT)) & SPM_DCDCC3_DCDC_VBAT_VALUE_MASK)
20370 
20371 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_MASK    (0xF0000U)
20372 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_SHIFT   (16U)
20373 /*! DCDC_VDD1P2CTRL_ADJTN - DCDC_VDD1P2CTRL_ADJTN */
20374 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN(x)      (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_MASK)
20375 
20376 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_MASK   (0x1000000U)
20377 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_SHIFT  (24U)
20378 /*! DCDC_MINPWR_DC_HALFCLK - DCDC_MINPWR_DC_HALFCLK */
20379 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK(x)     (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_MASK)
20380 
20381 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_MASK (0x2000000U)
20382 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_SHIFT (25U)
20383 /*! DCDC_MINPWR_EXTRA_DOUBLE_FETS - DCDC_MINPWR_EXTRA_DOUBLE_FETS */
20384 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_MASK)
20385 
20386 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_MASK  (0x4000000U)
20387 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_SHIFT (26U)
20388 /*! DCDC_MINPWR_DOUBLE_FETS - DCDC_MINPWR_DOUBLE_FETS */
20389 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS(x)    (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_MASK)
20390 
20391 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_MASK    (0x8000000U)
20392 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_SHIFT   (27U)
20393 /*! DCDC_MINPWR_HALF_FETS - DCDC_MINPWR_HALF_FETS */
20394 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS(x)      (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_MASK)
20395 
20396 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_MASK (0x40000000U)
20397 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_SHIFT (30U)
20398 /*! DCDC_VDD1P2CTRL_DISABLE_STEP - DCDC_VDD1P2CTRL_DISABLE_STEP */
20399 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_MASK)
20400 
20401 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_MASK (0x80000000U)
20402 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_SHIFT (31U)
20403 /*! DCDC_VDD1P8CTRL_DISABLE_STEP - DCDC_VDD1P8CTRL_DISABLE_STEP */
20404 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_MASK)
20405 /*! @} */
20406 
20407 /*! @name DCDCC4 - DCDC Control Register 4 */
20408 /*! @{ */
20409 
20410 #define SPM_DCDCC4_INTEGRATOR_VALUE_MASK         (0x7FFFFU)
20411 #define SPM_DCDCC4_INTEGRATOR_VALUE_SHIFT        (0U)
20412 /*! INTEGRATOR_VALUE - INTEGRATOR VALUE */
20413 #define SPM_DCDCC4_INTEGRATOR_VALUE(x)           (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_INTEGRATOR_VALUE_SHIFT)) & SPM_DCDCC4_INTEGRATOR_VALUE_MASK)
20414 
20415 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_MASK  (0x80000U)
20416 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_SHIFT (19U)
20417 /*! INTEGRATOR_VALUE_SELECT - INTEGRATOR VALUE SELECT
20418  *  0b0..Select the saved value in hardware
20419  *  0b1..Select the integrator value in this register
20420  */
20421 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT(x)    (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_SHIFT)) & SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_MASK)
20422 
20423 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP_MASK        (0x100000U)
20424 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP_SHIFT       (20U)
20425 /*! PULSE_RUN_SPEEDUP - PULSE RUN SPEEDUP */
20426 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP(x)          (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_PULSE_RUN_SPEEDUP_SHIFT)) & SPM_DCDCC4_PULSE_RUN_SPEEDUP_MASK)
20427 /*! @} */
20428 
20429 /*! @name DCDCC6 - DCDC Control Register 6 */
20430 /*! @{ */
20431 
20432 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_MASK      (0x1FU)
20433 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_SHIFT     (0U)
20434 /*! DCDC_VDD1P8CTRL_TRG - DCDC_VDD1P8CTRL_TRG */
20435 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG(x)        (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_SHIFT)) & SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_MASK)
20436 
20437 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_MASK (0xF00U)
20438 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_SHIFT (8U)
20439 /*! DCDC_VDD1P2CTRL_TRG_BUCK - DCDC_VDD1P2CTRL_TRG_BUCK */
20440 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK(x)   (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_SHIFT)) & SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_MASK)
20441 
20442 #define SPM_DCDCC6_DCDC_HSVDD_TRIM_MASK          (0xF000000U)
20443 #define SPM_DCDCC6_DCDC_HSVDD_TRIM_SHIFT         (24U)
20444 /*! DCDC_HSVDD_TRIM - DCDC_HSVDD_TRIM */
20445 #define SPM_DCDCC6_DCDC_HSVDD_TRIM(x)            (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_HSVDD_TRIM_SHIFT)) & SPM_DCDCC6_DCDC_HSVDD_TRIM_MASK)
20446 /*! @} */
20447 
20448 /*! @name LPREQPINCNTRL - LP Request Pin Control Register */
20449 /*! @{ */
20450 
20451 #define SPM_LPREQPINCNTRL_LPREQOE_MASK           (0x1U)
20452 #define SPM_LPREQPINCNTRL_LPREQOE_SHIFT          (0U)
20453 /*! LPREQOE - Low Power Request Output Enable Register
20454  *  0b0..Low Power request output pin not enabled.
20455  *  0b1..Low Power request output pin enabled.
20456  */
20457 #define SPM_LPREQPINCNTRL_LPREQOE(x)             (((uint32_t)(((uint32_t)(x)) << SPM_LPREQPINCNTRL_LPREQOE_SHIFT)) & SPM_LPREQPINCNTRL_LPREQOE_MASK)
20458 
20459 #define SPM_LPREQPINCNTRL_POLARITY_MASK          (0x2U)
20460 #define SPM_LPREQPINCNTRL_POLARITY_SHIFT         (1U)
20461 /*! POLARITY - Low Power Request Output Pin Polarity Control Register
20462  *  0b0..High true polarity.
20463  *  0b1..Low true polarity.
20464  */
20465 #define SPM_LPREQPINCNTRL_POLARITY(x)            (((uint32_t)(((uint32_t)(x)) << SPM_LPREQPINCNTRL_POLARITY_SHIFT)) & SPM_LPREQPINCNTRL_POLARITY_MASK)
20466 /*! @} */
20467 
20468 
20469 /*!
20470  * @}
20471  */ /* end of group SPM_Register_Masks */
20472 
20473 
20474 /* SPM - Peripheral instance base addresses */
20475 /** Peripheral SPM base address */
20476 #define SPM_BASE                                 (0x40028000u)
20477 /** Peripheral SPM base pointer */
20478 #define SPM                                      ((SPM_Type *)SPM_BASE)
20479 /** Array initializer of SPM peripheral base addresses */
20480 #define SPM_BASE_ADDRS                           { SPM_BASE }
20481 /** Array initializer of SPM peripheral base pointers */
20482 #define SPM_BASE_PTRS                            { SPM }
20483 /** Interrupt vectors for the SPM peripheral type */
20484 #define SPM_IRQS                                 { SPM_IRQn }
20485 
20486 /*!
20487  * @}
20488  */ /* end of group SPM_Peripheral_Access_Layer */
20489 
20490 
20491 /* ----------------------------------------------------------------------------
20492    -- TPM Peripheral Access Layer
20493    ---------------------------------------------------------------------------- */
20494 
20495 /*!
20496  * @addtogroup TPM_Peripheral_Access_Layer TPM Peripheral Access Layer
20497  * @{
20498  */
20499 
20500 /** TPM - Register Layout Typedef */
20501 typedef struct {
20502   __I  uint32_t VERID;                             /**< Version ID Register, offset: 0x0 */
20503   __I  uint32_t PARAM;                             /**< Parameter Register, offset: 0x4 */
20504   __IO uint32_t GLOBAL;                            /**< TPM Global Register, offset: 0x8 */
20505        uint8_t RESERVED_0[4];
20506   __IO uint32_t SC;                                /**< Status and Control, offset: 0x10 */
20507   __IO uint32_t CNT;                               /**< Counter, offset: 0x14 */
20508   __IO uint32_t MOD;                               /**< Modulo, offset: 0x18 */
20509   __IO uint32_t STATUS;                            /**< Capture and Compare Status, offset: 0x1C */
20510   struct {                                         /* offset: 0x20, array step: 0x8 */
20511     __IO uint32_t CnSC;                              /**< Channel (n) Status and Control, array offset: 0x20, array step: 0x8, irregular array, not all indices are valid */
20512     __IO uint32_t CnV;                               /**< Channel (n) Value, array offset: 0x24, array step: 0x8, irregular array, not all indices are valid */
20513   } CONTROLS[6];
20514        uint8_t RESERVED_1[20];
20515   __IO uint32_t COMBINE;                           /**< Combine Channel Register, offset: 0x64 */
20516        uint8_t RESERVED_2[4];
20517   __IO uint32_t TRIG;                              /**< Channel Trigger, offset: 0x6C */
20518   __IO uint32_t POL;                               /**< Channel Polarity, offset: 0x70 */
20519        uint8_t RESERVED_3[4];
20520   __IO uint32_t FILTER;                            /**< Filter Control, offset: 0x78 */
20521        uint8_t RESERVED_4[4];
20522   __IO uint32_t QDCTRL;                            /**< Quadrature Decoder Control and Status, offset: 0x80 */
20523   __IO uint32_t CONF;                              /**< Configuration, offset: 0x84 */
20524 } TPM_Type;
20525 
20526 /* ----------------------------------------------------------------------------
20527    -- TPM Register Masks
20528    ---------------------------------------------------------------------------- */
20529 
20530 /*!
20531  * @addtogroup TPM_Register_Masks TPM Register Masks
20532  * @{
20533  */
20534 
20535 /*! @name VERID - Version ID Register */
20536 /*! @{ */
20537 
20538 #define TPM_VERID_FEATURE_MASK                   (0xFFFFU)
20539 #define TPM_VERID_FEATURE_SHIFT                  (0U)
20540 /*! FEATURE - Feature Identification Number
20541  *  0b0000000000000001..Standard feature set.
20542  *  0b0000000000000011..Standard feature set with Filter and Combine registers implemented.
20543  *  0b0000000000000111..Standard feature set with Filter, Combine and Quadrature registers implemented.
20544  */
20545 #define TPM_VERID_FEATURE(x)                     (((uint32_t)(((uint32_t)(x)) << TPM_VERID_FEATURE_SHIFT)) & TPM_VERID_FEATURE_MASK)
20546 
20547 #define TPM_VERID_MINOR_MASK                     (0xFF0000U)
20548 #define TPM_VERID_MINOR_SHIFT                    (16U)
20549 /*! MINOR - Minor Version Number */
20550 #define TPM_VERID_MINOR(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_VERID_MINOR_SHIFT)) & TPM_VERID_MINOR_MASK)
20551 
20552 #define TPM_VERID_MAJOR_MASK                     (0xFF000000U)
20553 #define TPM_VERID_MAJOR_SHIFT                    (24U)
20554 /*! MAJOR - Major Version Number */
20555 #define TPM_VERID_MAJOR(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_VERID_MAJOR_SHIFT)) & TPM_VERID_MAJOR_MASK)
20556 /*! @} */
20557 
20558 /*! @name PARAM - Parameter Register */
20559 /*! @{ */
20560 
20561 #define TPM_PARAM_CHAN_MASK                      (0xFFU)
20562 #define TPM_PARAM_CHAN_SHIFT                     (0U)
20563 /*! CHAN - Channel Count */
20564 #define TPM_PARAM_CHAN(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_CHAN_SHIFT)) & TPM_PARAM_CHAN_MASK)
20565 
20566 #define TPM_PARAM_TRIG_MASK                      (0xFF00U)
20567 #define TPM_PARAM_TRIG_SHIFT                     (8U)
20568 /*! TRIG - Trigger Count */
20569 #define TPM_PARAM_TRIG(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_TRIG_SHIFT)) & TPM_PARAM_TRIG_MASK)
20570 
20571 #define TPM_PARAM_WIDTH_MASK                     (0xFF0000U)
20572 #define TPM_PARAM_WIDTH_SHIFT                    (16U)
20573 /*! WIDTH - Counter Width */
20574 #define TPM_PARAM_WIDTH(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_WIDTH_SHIFT)) & TPM_PARAM_WIDTH_MASK)
20575 /*! @} */
20576 
20577 /*! @name GLOBAL - TPM Global Register */
20578 /*! @{ */
20579 
20580 #define TPM_GLOBAL_NOUPDATE_MASK                 (0x1U)
20581 #define TPM_GLOBAL_NOUPDATE_SHIFT                (0U)
20582 /*! NOUPDATE - No Update
20583  *  0b0..Internal double buffered registers update as normal.
20584  *  0b1..Internal double buffered registers do not update.
20585  */
20586 #define TPM_GLOBAL_NOUPDATE(x)                   (((uint32_t)(((uint32_t)(x)) << TPM_GLOBAL_NOUPDATE_SHIFT)) & TPM_GLOBAL_NOUPDATE_MASK)
20587 
20588 #define TPM_GLOBAL_RST_MASK                      (0x2U)
20589 #define TPM_GLOBAL_RST_SHIFT                     (1U)
20590 /*! RST - Software Reset
20591  *  0b0..Module is not reset.
20592  *  0b1..Module is reset.
20593  */
20594 #define TPM_GLOBAL_RST(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_GLOBAL_RST_SHIFT)) & TPM_GLOBAL_RST_MASK)
20595 /*! @} */
20596 
20597 /*! @name SC - Status and Control */
20598 /*! @{ */
20599 
20600 #define TPM_SC_PS_MASK                           (0x7U)
20601 #define TPM_SC_PS_SHIFT                          (0U)
20602 /*! PS - Prescale Factor Selection
20603  *  0b000..Divide by 1
20604  *  0b001..Divide by 2
20605  *  0b010..Divide by 4
20606  *  0b011..Divide by 8
20607  *  0b100..Divide by 16
20608  *  0b101..Divide by 32
20609  *  0b110..Divide by 64
20610  *  0b111..Divide by 128
20611  */
20612 #define TPM_SC_PS(x)                             (((uint32_t)(((uint32_t)(x)) << TPM_SC_PS_SHIFT)) & TPM_SC_PS_MASK)
20613 
20614 #define TPM_SC_CMOD_MASK                         (0x18U)
20615 #define TPM_SC_CMOD_SHIFT                        (3U)
20616 /*! CMOD - Clock Mode Selection
20617  *  0b00..TPM counter is disabled
20618  *  0b01..TPM counter increments on every TPM counter clock
20619  *  0b10..TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock
20620  *  0b11..TPM counter increments on rising edge of the selected external input trigger.
20621  */
20622 #define TPM_SC_CMOD(x)                           (((uint32_t)(((uint32_t)(x)) << TPM_SC_CMOD_SHIFT)) & TPM_SC_CMOD_MASK)
20623 
20624 #define TPM_SC_CPWMS_MASK                        (0x20U)
20625 #define TPM_SC_CPWMS_SHIFT                       (5U)
20626 /*! CPWMS - Center-Aligned PWM Select
20627  *  0b0..TPM counter operates in up counting mode.
20628  *  0b1..TPM counter operates in up-down counting mode.
20629  */
20630 #define TPM_SC_CPWMS(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_SC_CPWMS_SHIFT)) & TPM_SC_CPWMS_MASK)
20631 
20632 #define TPM_SC_TOIE_MASK                         (0x40U)
20633 #define TPM_SC_TOIE_SHIFT                        (6U)
20634 /*! TOIE - Timer Overflow Interrupt Enable
20635  *  0b0..Disable TOF interrupts. Use software polling or DMA request.
20636  *  0b1..Enable TOF interrupts. An interrupt is generated when TOF equals one.
20637  */
20638 #define TPM_SC_TOIE(x)                           (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOIE_SHIFT)) & TPM_SC_TOIE_MASK)
20639 
20640 #define TPM_SC_TOF_MASK                          (0x80U)
20641 #define TPM_SC_TOF_SHIFT                         (7U)
20642 /*! TOF - Timer Overflow Flag
20643  *  0b0..TPM counter has not overflowed.
20644  *  0b1..TPM counter has overflowed.
20645  */
20646 #define TPM_SC_TOF(x)                            (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOF_SHIFT)) & TPM_SC_TOF_MASK)
20647 
20648 #define TPM_SC_DMA_MASK                          (0x100U)
20649 #define TPM_SC_DMA_SHIFT                         (8U)
20650 /*! DMA - DMA Enable
20651  *  0b0..Disables DMA transfers.
20652  *  0b1..Enables DMA transfers.
20653  */
20654 #define TPM_SC_DMA(x)                            (((uint32_t)(((uint32_t)(x)) << TPM_SC_DMA_SHIFT)) & TPM_SC_DMA_MASK)
20655 /*! @} */
20656 
20657 /*! @name CNT - Counter */
20658 /*! @{ */
20659 
20660 #define TPM_CNT_COUNT_MASK                       (0xFFFFU)
20661 #define TPM_CNT_COUNT_SHIFT                      (0U)
20662 /*! COUNT - Counter value */
20663 #define TPM_CNT_COUNT(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CNT_COUNT_SHIFT)) & TPM_CNT_COUNT_MASK)
20664 /*! @} */
20665 
20666 /*! @name MOD - Modulo */
20667 /*! @{ */
20668 
20669 #define TPM_MOD_MOD_MASK                         (0xFFFFU)
20670 #define TPM_MOD_MOD_SHIFT                        (0U)
20671 /*! MOD - Modulo value */
20672 #define TPM_MOD_MOD(x)                           (((uint32_t)(((uint32_t)(x)) << TPM_MOD_MOD_SHIFT)) & TPM_MOD_MOD_MASK)
20673 /*! @} */
20674 
20675 /*! @name STATUS - Capture and Compare Status */
20676 /*! @{ */
20677 
20678 #define TPM_STATUS_CH0F_MASK                     (0x1U)
20679 #define TPM_STATUS_CH0F_SHIFT                    (0U)
20680 /*! CH0F - Channel 0 Flag
20681  *  0b0..No channel event has occurred.
20682  *  0b1..A channel event has occurred.
20683  */
20684 #define TPM_STATUS_CH0F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH0F_SHIFT)) & TPM_STATUS_CH0F_MASK)
20685 
20686 #define TPM_STATUS_CH1F_MASK                     (0x2U)
20687 #define TPM_STATUS_CH1F_SHIFT                    (1U)
20688 /*! CH1F - Channel 1 Flag
20689  *  0b0..No channel event has occurred.
20690  *  0b1..A channel event has occurred.
20691  */
20692 #define TPM_STATUS_CH1F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH1F_SHIFT)) & TPM_STATUS_CH1F_MASK)
20693 
20694 #define TPM_STATUS_CH2F_MASK                     (0x4U)
20695 #define TPM_STATUS_CH2F_SHIFT                    (2U)
20696 /*! CH2F - Channel 2 Flag
20697  *  0b0..No channel event has occurred.
20698  *  0b1..A channel event has occurred.
20699  */
20700 #define TPM_STATUS_CH2F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH2F_SHIFT)) & TPM_STATUS_CH2F_MASK)
20701 
20702 #define TPM_STATUS_CH3F_MASK                     (0x8U)
20703 #define TPM_STATUS_CH3F_SHIFT                    (3U)
20704 /*! CH3F - Channel 3 Flag
20705  *  0b0..No channel event has occurred.
20706  *  0b1..A channel event has occurred.
20707  */
20708 #define TPM_STATUS_CH3F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH3F_SHIFT)) & TPM_STATUS_CH3F_MASK)
20709 
20710 #define TPM_STATUS_CH4F_MASK                     (0x10U)
20711 #define TPM_STATUS_CH4F_SHIFT                    (4U)
20712 /*! CH4F - Channel 4 Flag
20713  *  0b0..No channel event has occurred.
20714  *  0b1..A channel event has occurred.
20715  */
20716 #define TPM_STATUS_CH4F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH4F_SHIFT)) & TPM_STATUS_CH4F_MASK)
20717 
20718 #define TPM_STATUS_CH5F_MASK                     (0x20U)
20719 #define TPM_STATUS_CH5F_SHIFT                    (5U)
20720 /*! CH5F - Channel 5 Flag
20721  *  0b0..No channel event has occurred.
20722  *  0b1..A channel event has occurred.
20723  */
20724 #define TPM_STATUS_CH5F(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH5F_SHIFT)) & TPM_STATUS_CH5F_MASK)
20725 
20726 #define TPM_STATUS_TOF_MASK                      (0x100U)
20727 #define TPM_STATUS_TOF_SHIFT                     (8U)
20728 /*! TOF - Timer Overflow Flag
20729  *  0b0..TPM counter has not overflowed.
20730  *  0b1..TPM counter has overflowed.
20731  */
20732 #define TPM_STATUS_TOF(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_TOF_SHIFT)) & TPM_STATUS_TOF_MASK)
20733 /*! @} */
20734 
20735 /*! @name CnSC - Channel (n) Status and Control */
20736 /*! @{ */
20737 
20738 #define TPM_CnSC_DMA_MASK                        (0x1U)
20739 #define TPM_CnSC_DMA_SHIFT                       (0U)
20740 /*! DMA - DMA Enable
20741  *  0b0..Disable DMA transfers.
20742  *  0b1..Enable DMA transfers.
20743  */
20744 #define TPM_CnSC_DMA(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_DMA_SHIFT)) & TPM_CnSC_DMA_MASK)
20745 
20746 #define TPM_CnSC_ELSA_MASK                       (0x4U)
20747 #define TPM_CnSC_ELSA_SHIFT                      (2U)
20748 /*! ELSA - Edge or Level Select */
20749 #define TPM_CnSC_ELSA(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSA_SHIFT)) & TPM_CnSC_ELSA_MASK)
20750 
20751 #define TPM_CnSC_ELSB_MASK                       (0x8U)
20752 #define TPM_CnSC_ELSB_SHIFT                      (3U)
20753 /*! ELSB - Edge or Level Select */
20754 #define TPM_CnSC_ELSB(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSB_SHIFT)) & TPM_CnSC_ELSB_MASK)
20755 
20756 #define TPM_CnSC_MSA_MASK                        (0x10U)
20757 #define TPM_CnSC_MSA_SHIFT                       (4U)
20758 /*! MSA - Channel Mode Select */
20759 #define TPM_CnSC_MSA(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSA_SHIFT)) & TPM_CnSC_MSA_MASK)
20760 
20761 #define TPM_CnSC_MSB_MASK                        (0x20U)
20762 #define TPM_CnSC_MSB_SHIFT                       (5U)
20763 /*! MSB - Channel Mode Select */
20764 #define TPM_CnSC_MSB(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSB_SHIFT)) & TPM_CnSC_MSB_MASK)
20765 
20766 #define TPM_CnSC_CHIE_MASK                       (0x40U)
20767 #define TPM_CnSC_CHIE_SHIFT                      (6U)
20768 /*! CHIE - Channel Interrupt Enable
20769  *  0b0..Disable channel interrupts.
20770  *  0b1..Enable channel interrupts.
20771  */
20772 #define TPM_CnSC_CHIE(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHIE_SHIFT)) & TPM_CnSC_CHIE_MASK)
20773 
20774 #define TPM_CnSC_CHF_MASK                        (0x80U)
20775 #define TPM_CnSC_CHF_SHIFT                       (7U)
20776 /*! CHF - Channel Flag
20777  *  0b0..No channel event has occurred.
20778  *  0b1..A channel event has occurred.
20779  */
20780 #define TPM_CnSC_CHF(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHF_SHIFT)) & TPM_CnSC_CHF_MASK)
20781 /*! @} */
20782 
20783 /* The count of TPM_CnSC */
20784 #define TPM_CnSC_COUNT                           (6U)
20785 
20786 /*! @name CnV - Channel (n) Value */
20787 /*! @{ */
20788 
20789 #define TPM_CnV_VAL_MASK                         (0xFFFFU)
20790 #define TPM_CnV_VAL_SHIFT                        (0U)
20791 /*! VAL - Channel Value */
20792 #define TPM_CnV_VAL(x)                           (((uint32_t)(((uint32_t)(x)) << TPM_CnV_VAL_SHIFT)) & TPM_CnV_VAL_MASK)
20793 /*! @} */
20794 
20795 /* The count of TPM_CnV */
20796 #define TPM_CnV_COUNT                            (6U)
20797 
20798 /*! @name COMBINE - Combine Channel Register */
20799 /*! @{ */
20800 
20801 #define TPM_COMBINE_COMBINE0_MASK                (0x1U)
20802 #define TPM_COMBINE_COMBINE0_SHIFT               (0U)
20803 /*! COMBINE0 - Combine Channels 0 and 1
20804  *  0b0..Channels 0 and 1 are independent.
20805  *  0b1..Channels 0 and 1 are combined.
20806  */
20807 #define TPM_COMBINE_COMBINE0(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE0_SHIFT)) & TPM_COMBINE_COMBINE0_MASK)
20808 
20809 #define TPM_COMBINE_COMSWAP0_MASK                (0x2U)
20810 #define TPM_COMBINE_COMSWAP0_SHIFT               (1U)
20811 /*! COMSWAP0 - Combine Channel 0 and 1 Swap
20812  *  0b0..Even channel is used for input capture and 1st compare.
20813  *  0b1..Odd channel is used for input capture and 1st compare.
20814  */
20815 #define TPM_COMBINE_COMSWAP0(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP0_SHIFT)) & TPM_COMBINE_COMSWAP0_MASK)
20816 
20817 #define TPM_COMBINE_COMBINE1_MASK                (0x100U)
20818 #define TPM_COMBINE_COMBINE1_SHIFT               (8U)
20819 /*! COMBINE1 - Combine Channels 2 and 3
20820  *  0b0..Channels 2 and 3 are independent.
20821  *  0b1..Channels 2 and 3 are combined.
20822  */
20823 #define TPM_COMBINE_COMBINE1(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE1_SHIFT)) & TPM_COMBINE_COMBINE1_MASK)
20824 
20825 #define TPM_COMBINE_COMSWAP1_MASK                (0x200U)
20826 #define TPM_COMBINE_COMSWAP1_SHIFT               (9U)
20827 /*! COMSWAP1 - Combine Channels 2 and 3 Swap
20828  *  0b0..Even channel is used for input capture and 1st compare.
20829  *  0b1..Odd channel is used for input capture and 1st compare.
20830  */
20831 #define TPM_COMBINE_COMSWAP1(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP1_SHIFT)) & TPM_COMBINE_COMSWAP1_MASK)
20832 
20833 #define TPM_COMBINE_COMBINE2_MASK                (0x10000U)
20834 #define TPM_COMBINE_COMBINE2_SHIFT               (16U)
20835 /*! COMBINE2 - Combine Channels 4 and 5
20836  *  0b0..Channels 4 and 5 are independent.
20837  *  0b1..Channels 4 and 5 are combined.
20838  */
20839 #define TPM_COMBINE_COMBINE2(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE2_SHIFT)) & TPM_COMBINE_COMBINE2_MASK)
20840 
20841 #define TPM_COMBINE_COMSWAP2_MASK                (0x20000U)
20842 #define TPM_COMBINE_COMSWAP2_SHIFT               (17U)
20843 /*! COMSWAP2 - Combine Channels 4 and 5 Swap
20844  *  0b0..Even channel is used for input capture and 1st compare.
20845  *  0b1..Odd channel is used for input capture and 1st compare.
20846  */
20847 #define TPM_COMBINE_COMSWAP2(x)                  (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP2_SHIFT)) & TPM_COMBINE_COMSWAP2_MASK)
20848 /*! @} */
20849 
20850 /*! @name TRIG - Channel Trigger */
20851 /*! @{ */
20852 
20853 #define TPM_TRIG_TRIG0_MASK                      (0x1U)
20854 #define TPM_TRIG_TRIG0_SHIFT                     (0U)
20855 /*! TRIG0 - Channel 0 Trigger
20856  *  0b0..No effect.
20857  *  0b1..Configures trigger input 0 to be used by channel 0.
20858  */
20859 #define TPM_TRIG_TRIG0(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG0_SHIFT)) & TPM_TRIG_TRIG0_MASK)
20860 
20861 #define TPM_TRIG_TRIG1_MASK                      (0x2U)
20862 #define TPM_TRIG_TRIG1_SHIFT                     (1U)
20863 /*! TRIG1 - Channel 1 Trigger
20864  *  0b0..No effect.
20865  *  0b1..Configures trigger input 1 to be used by channel 1.
20866  */
20867 #define TPM_TRIG_TRIG1(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG1_SHIFT)) & TPM_TRIG_TRIG1_MASK)
20868 
20869 #define TPM_TRIG_TRIG2_MASK                      (0x4U)
20870 #define TPM_TRIG_TRIG2_SHIFT                     (2U)
20871 /*! TRIG2 - Channel 2 Trigger
20872  *  0b0..No effect.
20873  *  0b1..Configures trigger input 0 to be used by channel 2.
20874  */
20875 #define TPM_TRIG_TRIG2(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG2_SHIFT)) & TPM_TRIG_TRIG2_MASK)
20876 
20877 #define TPM_TRIG_TRIG3_MASK                      (0x8U)
20878 #define TPM_TRIG_TRIG3_SHIFT                     (3U)
20879 /*! TRIG3 - Channel 3 Trigger
20880  *  0b0..No effect.
20881  *  0b1..Configures trigger input 1 to be used by channel 3.
20882  */
20883 #define TPM_TRIG_TRIG3(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG3_SHIFT)) & TPM_TRIG_TRIG3_MASK)
20884 
20885 #define TPM_TRIG_TRIG4_MASK                      (0x10U)
20886 #define TPM_TRIG_TRIG4_SHIFT                     (4U)
20887 /*! TRIG4 - Channel 4 Trigger
20888  *  0b0..No effect.
20889  *  0b1..Configures trigger input 0 to be used by channel 4.
20890  */
20891 #define TPM_TRIG_TRIG4(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG4_SHIFT)) & TPM_TRIG_TRIG4_MASK)
20892 
20893 #define TPM_TRIG_TRIG5_MASK                      (0x20U)
20894 #define TPM_TRIG_TRIG5_SHIFT                     (5U)
20895 /*! TRIG5 - Channel 5 Trigger
20896  *  0b0..No effect.
20897  *  0b1..Configures trigger input 1 to be used by channel 5.
20898  */
20899 #define TPM_TRIG_TRIG5(x)                        (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG5_SHIFT)) & TPM_TRIG_TRIG5_MASK)
20900 /*! @} */
20901 
20902 /*! @name POL - Channel Polarity */
20903 /*! @{ */
20904 
20905 #define TPM_POL_POL0_MASK                        (0x1U)
20906 #define TPM_POL_POL0_SHIFT                       (0U)
20907 /*! POL0 - Channel 0 Polarity
20908  *  0b0..The channel polarity is active high.
20909  *  0b1..The channel polarity is active low.
20910  */
20911 #define TPM_POL_POL0(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL0_SHIFT)) & TPM_POL_POL0_MASK)
20912 
20913 #define TPM_POL_POL1_MASK                        (0x2U)
20914 #define TPM_POL_POL1_SHIFT                       (1U)
20915 /*! POL1 - Channel 1 Polarity
20916  *  0b0..The channel polarity is active high.
20917  *  0b1..The channel polarity is active low.
20918  */
20919 #define TPM_POL_POL1(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL1_SHIFT)) & TPM_POL_POL1_MASK)
20920 
20921 #define TPM_POL_POL2_MASK                        (0x4U)
20922 #define TPM_POL_POL2_SHIFT                       (2U)
20923 /*! POL2 - Channel 2 Polarity
20924  *  0b0..The channel polarity is active high.
20925  *  0b1..The channel polarity is active low.
20926  */
20927 #define TPM_POL_POL2(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL2_SHIFT)) & TPM_POL_POL2_MASK)
20928 
20929 #define TPM_POL_POL3_MASK                        (0x8U)
20930 #define TPM_POL_POL3_SHIFT                       (3U)
20931 /*! POL3 - Channel 3 Polarity
20932  *  0b0..The channel polarity is active high.
20933  *  0b1..The channel polarity is active low.
20934  */
20935 #define TPM_POL_POL3(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL3_SHIFT)) & TPM_POL_POL3_MASK)
20936 
20937 #define TPM_POL_POL4_MASK                        (0x10U)
20938 #define TPM_POL_POL4_SHIFT                       (4U)
20939 /*! POL4 - Channel 4 Polarity
20940  *  0b0..The channel polarity is active high
20941  *  0b1..The channel polarity is active low.
20942  */
20943 #define TPM_POL_POL4(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL4_SHIFT)) & TPM_POL_POL4_MASK)
20944 
20945 #define TPM_POL_POL5_MASK                        (0x20U)
20946 #define TPM_POL_POL5_SHIFT                       (5U)
20947 /*! POL5 - Channel 5 Polarity
20948  *  0b0..The channel polarity is active high.
20949  *  0b1..The channel polarity is active low.
20950  */
20951 #define TPM_POL_POL5(x)                          (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL5_SHIFT)) & TPM_POL_POL5_MASK)
20952 /*! @} */
20953 
20954 /*! @name FILTER - Filter Control */
20955 /*! @{ */
20956 
20957 #define TPM_FILTER_CH0FVAL_MASK                  (0xFU)
20958 #define TPM_FILTER_CH0FVAL_SHIFT                 (0U)
20959 /*! CH0FVAL - Channel 0 Filter Value */
20960 #define TPM_FILTER_CH0FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH0FVAL_SHIFT)) & TPM_FILTER_CH0FVAL_MASK)
20961 
20962 #define TPM_FILTER_CH1FVAL_MASK                  (0xF0U)
20963 #define TPM_FILTER_CH1FVAL_SHIFT                 (4U)
20964 /*! CH1FVAL - Channel 1 Filter Value */
20965 #define TPM_FILTER_CH1FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH1FVAL_SHIFT)) & TPM_FILTER_CH1FVAL_MASK)
20966 
20967 #define TPM_FILTER_CH2FVAL_MASK                  (0xF00U)
20968 #define TPM_FILTER_CH2FVAL_SHIFT                 (8U)
20969 /*! CH2FVAL - Channel 2 Filter Value */
20970 #define TPM_FILTER_CH2FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH2FVAL_SHIFT)) & TPM_FILTER_CH2FVAL_MASK)
20971 
20972 #define TPM_FILTER_CH3FVAL_MASK                  (0xF000U)
20973 #define TPM_FILTER_CH3FVAL_SHIFT                 (12U)
20974 /*! CH3FVAL - Channel 3 Filter Value */
20975 #define TPM_FILTER_CH3FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH3FVAL_SHIFT)) & TPM_FILTER_CH3FVAL_MASK)
20976 
20977 #define TPM_FILTER_CH4FVAL_MASK                  (0xF0000U)
20978 #define TPM_FILTER_CH4FVAL_SHIFT                 (16U)
20979 /*! CH4FVAL - Channel 4 Filter Value */
20980 #define TPM_FILTER_CH4FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH4FVAL_SHIFT)) & TPM_FILTER_CH4FVAL_MASK)
20981 
20982 #define TPM_FILTER_CH5FVAL_MASK                  (0xF00000U)
20983 #define TPM_FILTER_CH5FVAL_SHIFT                 (20U)
20984 /*! CH5FVAL - Channel 5 Filter Value */
20985 #define TPM_FILTER_CH5FVAL(x)                    (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH5FVAL_SHIFT)) & TPM_FILTER_CH5FVAL_MASK)
20986 /*! @} */
20987 
20988 /*! @name QDCTRL - Quadrature Decoder Control and Status */
20989 /*! @{ */
20990 
20991 #define TPM_QDCTRL_QUADEN_MASK                   (0x1U)
20992 #define TPM_QDCTRL_QUADEN_SHIFT                  (0U)
20993 /*! QUADEN - QUADEN
20994  *  0b0..Quadrature decoder mode is disabled.
20995  *  0b1..Quadrature decoder mode is enabled.
20996  */
20997 #define TPM_QDCTRL_QUADEN(x)                     (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADEN_SHIFT)) & TPM_QDCTRL_QUADEN_MASK)
20998 
20999 #define TPM_QDCTRL_TOFDIR_MASK                   (0x2U)
21000 #define TPM_QDCTRL_TOFDIR_SHIFT                  (1U)
21001 /*! TOFDIR - TOFDIR
21002  *  0b0..TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes
21003  *       from its minimum value (zero) to its maximum value (MOD register).
21004  *  0b1..TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from
21005  *       its maximum value (MOD register) to its minimum value (zero).
21006  */
21007 #define TPM_QDCTRL_TOFDIR(x)                     (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_TOFDIR_SHIFT)) & TPM_QDCTRL_TOFDIR_MASK)
21008 
21009 #define TPM_QDCTRL_QUADIR_MASK                   (0x4U)
21010 #define TPM_QDCTRL_QUADIR_SHIFT                  (2U)
21011 /*! QUADIR - Counter Direction in Quadrature Decode Mode
21012  *  0b0..Counter direction is decreasing (counter decrement).
21013  *  0b1..Counter direction is increasing (counter increment).
21014  */
21015 #define TPM_QDCTRL_QUADIR(x)                     (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADIR_SHIFT)) & TPM_QDCTRL_QUADIR_MASK)
21016 
21017 #define TPM_QDCTRL_QUADMODE_MASK                 (0x8U)
21018 #define TPM_QDCTRL_QUADMODE_SHIFT                (3U)
21019 /*! QUADMODE - Quadrature Decoder Mode
21020  *  0b0..Phase encoding mode.
21021  *  0b1..Count and direction encoding mode.
21022  */
21023 #define TPM_QDCTRL_QUADMODE(x)                   (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADMODE_SHIFT)) & TPM_QDCTRL_QUADMODE_MASK)
21024 /*! @} */
21025 
21026 /*! @name CONF - Configuration */
21027 /*! @{ */
21028 
21029 #define TPM_CONF_DOZEEN_MASK                     (0x20U)
21030 #define TPM_CONF_DOZEEN_SHIFT                    (5U)
21031 /*! DOZEEN - Doze Enable
21032  *  0b0..Internal TPM counter continues in Doze mode.
21033  *  0b1..Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture
21034  *       events are ignored, and PWM outputs are forced to their default state.
21035  */
21036 #define TPM_CONF_DOZEEN(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DOZEEN_SHIFT)) & TPM_CONF_DOZEEN_MASK)
21037 
21038 #define TPM_CONF_DBGMODE_MASK                    (0xC0U)
21039 #define TPM_CONF_DBGMODE_SHIFT                   (6U)
21040 /*! DBGMODE - Debug Mode
21041  *  0b00..TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events
21042  *        are ignored, and PWM outputs are forced to their default state.
21043  *  0b11..TPM counter continues in debug mode.
21044  */
21045 #define TPM_CONF_DBGMODE(x)                      (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DBGMODE_SHIFT)) & TPM_CONF_DBGMODE_MASK)
21046 
21047 #define TPM_CONF_GTBSYNC_MASK                    (0x100U)
21048 #define TPM_CONF_GTBSYNC_SHIFT                   (8U)
21049 /*! GTBSYNC - Global Time Base Synchronization
21050  *  0b0..Global timebase synchronization disabled.
21051  *  0b1..Global timebase synchronization enabled.
21052  */
21053 #define TPM_CONF_GTBSYNC(x)                      (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBSYNC_SHIFT)) & TPM_CONF_GTBSYNC_MASK)
21054 
21055 #define TPM_CONF_GTBEEN_MASK                     (0x200U)
21056 #define TPM_CONF_GTBEEN_SHIFT                    (9U)
21057 /*! GTBEEN - Global time base enable
21058  *  0b0..All channels use the internally generated TPM counter as their timebase
21059  *  0b1..All channels use an externally generated global timebase as their timebase
21060  */
21061 #define TPM_CONF_GTBEEN(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBEEN_SHIFT)) & TPM_CONF_GTBEEN_MASK)
21062 
21063 #define TPM_CONF_CSOT_MASK                       (0x10000U)
21064 #define TPM_CONF_CSOT_SHIFT                      (16U)
21065 /*! CSOT - Counter Start on Trigger
21066  *  0b0..TPM counter starts to increment immediately, once it is enabled.
21067  *  0b1..TPM counter only starts to increment when it a rising edge on the selected input trigger is detected,
21068  *       after it has been enabled or after it has stopped due to overflow.
21069  */
21070 #define TPM_CONF_CSOT(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOT_SHIFT)) & TPM_CONF_CSOT_MASK)
21071 
21072 #define TPM_CONF_CSOO_MASK                       (0x20000U)
21073 #define TPM_CONF_CSOO_SHIFT                      (17U)
21074 /*! CSOO - Counter Stop On Overflow
21075  *  0b0..TPM counter continues incrementing or decrementing after overflow
21076  *  0b1..TPM counter stops incrementing or decrementing after overflow.
21077  */
21078 #define TPM_CONF_CSOO(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOO_SHIFT)) & TPM_CONF_CSOO_MASK)
21079 
21080 #define TPM_CONF_CROT_MASK                       (0x40000U)
21081 #define TPM_CONF_CROT_SHIFT                      (18U)
21082 /*! CROT - Counter Reload On Trigger
21083  *  0b0..Counter is not reloaded due to a rising edge on the selected input trigger
21084  *  0b1..Counter is reloaded when a rising edge is detected on the selected input trigger
21085  */
21086 #define TPM_CONF_CROT(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CROT_SHIFT)) & TPM_CONF_CROT_MASK)
21087 
21088 #define TPM_CONF_CPOT_MASK                       (0x80000U)
21089 #define TPM_CONF_CPOT_SHIFT                      (19U)
21090 /*! CPOT - Counter Pause On Trigger */
21091 #define TPM_CONF_CPOT(x)                         (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CPOT_SHIFT)) & TPM_CONF_CPOT_MASK)
21092 
21093 #define TPM_CONF_TRGPOL_MASK                     (0x400000U)
21094 #define TPM_CONF_TRGPOL_SHIFT                    (22U)
21095 /*! TRGPOL - Trigger Polarity
21096  *  0b0..Trigger is active high.
21097  *  0b1..Trigger is active low.
21098  */
21099 #define TPM_CONF_TRGPOL(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGPOL_SHIFT)) & TPM_CONF_TRGPOL_MASK)
21100 
21101 #define TPM_CONF_TRGSRC_MASK                     (0x800000U)
21102 #define TPM_CONF_TRGSRC_SHIFT                    (23U)
21103 /*! TRGSRC - Trigger Source
21104  *  0b0..Trigger source selected by TRGSEL is external.
21105  *  0b1..Trigger source selected by TRGSEL is internal (channel pin input capture).
21106  */
21107 #define TPM_CONF_TRGSRC(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSRC_SHIFT)) & TPM_CONF_TRGSRC_MASK)
21108 
21109 #define TPM_CONF_TRGSEL_MASK                     (0x3000000U)
21110 #define TPM_CONF_TRGSEL_SHIFT                    (24U)
21111 /*! TRGSEL - Trigger Select
21112  *  0b01..Channel 0 pin input capture
21113  *  0b10..Channel 1 pin input capture
21114  *  0b11..Channel 0 or Channel 1 pin input capture
21115  */
21116 #define TPM_CONF_TRGSEL(x)                       (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSEL_SHIFT)) & TPM_CONF_TRGSEL_MASK)
21117 /*! @} */
21118 
21119 
21120 /*!
21121  * @}
21122  */ /* end of group TPM_Register_Masks */
21123 
21124 
21125 /* TPM - Peripheral instance base addresses */
21126 /** Peripheral TPM0 base address */
21127 #define TPM0_BASE                                (0x40035000u)
21128 /** Peripheral TPM0 base pointer */
21129 #define TPM0                                     ((TPM_Type *)TPM0_BASE)
21130 /** Peripheral TPM1 base address */
21131 #define TPM1_BASE                                (0x40036000u)
21132 /** Peripheral TPM1 base pointer */
21133 #define TPM1                                     ((TPM_Type *)TPM1_BASE)
21134 /** Peripheral TPM2 base address */
21135 #define TPM2_BASE                                (0x40037000u)
21136 /** Peripheral TPM2 base pointer */
21137 #define TPM2                                     ((TPM_Type *)TPM2_BASE)
21138 /** Peripheral TPM3 base address */
21139 #define TPM3_BASE                                (0x4102D000u)
21140 /** Peripheral TPM3 base pointer */
21141 #define TPM3                                     ((TPM_Type *)TPM3_BASE)
21142 /** Array initializer of TPM peripheral base addresses */
21143 #define TPM_BASE_ADDRS                           { TPM0_BASE, TPM1_BASE, TPM2_BASE, TPM3_BASE }
21144 /** Array initializer of TPM peripheral base pointers */
21145 #define TPM_BASE_PTRS                            { TPM0, TPM1, TPM2, TPM3 }
21146 /** Interrupt vectors for the TPM peripheral type */
21147 #define TPM_IRQS                                 { TPM0_IRQn, TPM1_IRQn, TPM2_IRQn, TPM3_IRQn }
21148 
21149 /*!
21150  * @}
21151  */ /* end of group TPM_Peripheral_Access_Layer */
21152 
21153 
21154 /* ----------------------------------------------------------------------------
21155    -- TRGMUX Peripheral Access Layer
21156    ---------------------------------------------------------------------------- */
21157 
21158 /*!
21159  * @addtogroup TRGMUX_Peripheral_Access_Layer TRGMUX Peripheral Access Layer
21160  * @{
21161  */
21162 
21163 /** TRGMUX - Register Layout Typedef */
21164 typedef struct {
21165   __IO uint32_t TRGCFG[25];                        /**< TRGMUX TRGMUX_DMAMUX0 Register..TRGMUX TRGMUX_LPCMP1 Register, array offset: 0x0, array step: 0x4 */
21166 } TRGMUX_Type;
21167 
21168 /* ----------------------------------------------------------------------------
21169    -- TRGMUX Register Masks
21170    ---------------------------------------------------------------------------- */
21171 
21172 /*!
21173  * @addtogroup TRGMUX_Register_Masks TRGMUX Register Masks
21174  * @{
21175  */
21176 
21177 /*! @name TRGCFG - TRGMUX TRGMUX_DMAMUX0 Register..TRGMUX TRGMUX_LPCMP1 Register */
21178 /*! @{ */
21179 
21180 #define TRGMUX_TRGCFG_SEL0_MASK                  (0x3FU)
21181 #define TRGMUX_TRGCFG_SEL0_SHIFT                 (0U)
21182 /*! SEL0 - Trigger MUX Input 0 Source Select */
21183 #define TRGMUX_TRGCFG_SEL0(x)                    (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL0_SHIFT)) & TRGMUX_TRGCFG_SEL0_MASK)
21184 
21185 #define TRGMUX_TRGCFG_SEL1_MASK                  (0x3F00U)
21186 #define TRGMUX_TRGCFG_SEL1_SHIFT                 (8U)
21187 /*! SEL1 - Trigger MUX Input 1 Source Select */
21188 #define TRGMUX_TRGCFG_SEL1(x)                    (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL1_SHIFT)) & TRGMUX_TRGCFG_SEL1_MASK)
21189 
21190 #define TRGMUX_TRGCFG_SEL2_MASK                  (0x3F0000U)
21191 #define TRGMUX_TRGCFG_SEL2_SHIFT                 (16U)
21192 /*! SEL2 - Trigger MUX Input 2 Source Select */
21193 #define TRGMUX_TRGCFG_SEL2(x)                    (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL2_SHIFT)) & TRGMUX_TRGCFG_SEL2_MASK)
21194 
21195 #define TRGMUX_TRGCFG_SEL3_MASK                  (0x3F000000U)
21196 #define TRGMUX_TRGCFG_SEL3_SHIFT                 (24U)
21197 /*! SEL3 - Trigger MUX Input 3 Source Select */
21198 #define TRGMUX_TRGCFG_SEL3(x)                    (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL3_SHIFT)) & TRGMUX_TRGCFG_SEL3_MASK)
21199 
21200 #define TRGMUX_TRGCFG_LK_MASK                    (0x80000000U)
21201 #define TRGMUX_TRGCFG_LK_SHIFT                   (31U)
21202 /*! LK - TRGMUX register lock.
21203  *  0b0..Register can be written.
21204  *  0b1..Register cannot be written until the next system Reset.
21205  */
21206 #define TRGMUX_TRGCFG_LK(x)                      (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_LK_SHIFT)) & TRGMUX_TRGCFG_LK_MASK)
21207 /*! @} */
21208 
21209 /* The count of TRGMUX_TRGCFG */
21210 #define TRGMUX_TRGCFG_COUNT                      (25U)
21211 
21212 
21213 /*!
21214  * @}
21215  */ /* end of group TRGMUX_Register_Masks */
21216 
21217 
21218 /* TRGMUX - Peripheral instance base addresses */
21219 /** Peripheral TRGMUX0 base address */
21220 #define TRGMUX0_BASE                             (0x40029000u)
21221 /** Peripheral TRGMUX0 base pointer */
21222 #define TRGMUX0                                  ((TRGMUX_Type *)TRGMUX0_BASE)
21223 /** Peripheral TRGMUX1 base address */
21224 #define TRGMUX1_BASE                             (0x41025000u)
21225 /** Peripheral TRGMUX1 base pointer */
21226 #define TRGMUX1                                  ((TRGMUX_Type *)TRGMUX1_BASE)
21227 /** Array initializer of TRGMUX peripheral base addresses */
21228 #define TRGMUX_BASE_ADDRS                        { TRGMUX0_BASE, TRGMUX1_BASE }
21229 /** Array initializer of TRGMUX peripheral base pointers */
21230 #define TRGMUX_BASE_PTRS                         { TRGMUX0, TRGMUX1 }
21231 
21232 /*!
21233  * @}
21234  */ /* end of group TRGMUX_Peripheral_Access_Layer */
21235 
21236 
21237 /* ----------------------------------------------------------------------------
21238    -- TRNG Peripheral Access Layer
21239    ---------------------------------------------------------------------------- */
21240 
21241 /*!
21242  * @addtogroup TRNG_Peripheral_Access_Layer TRNG Peripheral Access Layer
21243  * @{
21244  */
21245 
21246 /** TRNG - Register Layout Typedef */
21247 typedef struct {
21248   __IO uint32_t MCTL;                              /**< Miscellaneous Control Register, offset: 0x0 */
21249   __IO uint32_t SCMISC;                            /**< Statistical Check Miscellaneous Register, offset: 0x4 */
21250   __IO uint32_t PKRRNG;                            /**< Poker Range Register, offset: 0x8 */
21251   union {                                          /* offset: 0xC */
21252     __IO uint32_t PKRMAX;                            /**< Poker Maximum Limit Register, offset: 0xC */
21253     __I  uint32_t PKRSQ;                             /**< Poker Square Calculation Result Register, offset: 0xC */
21254   };
21255   __IO uint32_t SDCTL;                             /**< Seed Control Register, offset: 0x10 */
21256   union {                                          /* offset: 0x14 */
21257     __IO uint32_t SBLIM;                             /**< Sparse Bit Limit Register, offset: 0x14 */
21258     __I  uint32_t TOTSAM;                            /**< Total Samples Register, offset: 0x14 */
21259   };
21260   __IO uint32_t FRQMIN;                            /**< Frequency Count Minimum Limit Register, offset: 0x18 */
21261   union {                                          /* offset: 0x1C */
21262     __I  uint32_t FRQCNT;                            /**< Frequency Count Register, offset: 0x1C */
21263     __IO uint32_t FRQMAX;                            /**< Frequency Count Maximum Limit Register, offset: 0x1C */
21264   };
21265   union {                                          /* offset: 0x20 */
21266     __I  uint32_t SCMC;                              /**< Statistical Check Monobit Count Register, offset: 0x20 */
21267     __IO uint32_t SCML;                              /**< Statistical Check Monobit Limit Register, offset: 0x20 */
21268   };
21269   union {                                          /* offset: 0x24 */
21270     __I  uint32_t SCR1C;                             /**< Statistical Check Run Length 1 Count Register, offset: 0x24 */
21271     __IO uint32_t SCR1L;                             /**< Statistical Check Run Length 1 Limit Register, offset: 0x24 */
21272   };
21273   union {                                          /* offset: 0x28 */
21274     __I  uint32_t SCR2C;                             /**< Statistical Check Run Length 2 Count Register, offset: 0x28 */
21275     __IO uint32_t SCR2L;                             /**< Statistical Check Run Length 2 Limit Register, offset: 0x28 */
21276   };
21277   union {                                          /* offset: 0x2C */
21278     __I  uint32_t SCR3C;                             /**< Statistical Check Run Length 3 Count Register, offset: 0x2C */
21279     __IO uint32_t SCR3L;                             /**< Statistical Check Run Length 3 Limit Register, offset: 0x2C */
21280   };
21281   union {                                          /* offset: 0x30 */
21282     __I  uint32_t SCR4C;                             /**< Statistical Check Run Length 4 Count Register, offset: 0x30 */
21283     __IO uint32_t SCR4L;                             /**< Statistical Check Run Length 4 Limit Register, offset: 0x30 */
21284   };
21285   union {                                          /* offset: 0x34 */
21286     __I  uint32_t SCR5C;                             /**< Statistical Check Run Length 5 Count Register, offset: 0x34 */
21287     __IO uint32_t SCR5L;                             /**< Statistical Check Run Length 5 Limit Register, offset: 0x34 */
21288   };
21289   union {                                          /* offset: 0x38 */
21290     __I  uint32_t SCR6PC;                            /**< Statistical Check Run Length 6+ Count Register, offset: 0x38 */
21291     __IO uint32_t SCR6PL;                            /**< Statistical Check Run Length 6+ Limit Register, offset: 0x38 */
21292   };
21293   __I  uint32_t STATUS;                            /**< Status Register, offset: 0x3C */
21294   __I  uint32_t ENT[16];                           /**< Entropy Read Register, array offset: 0x40, array step: 0x4 */
21295   __I  uint32_t PKRCNT10;                          /**< Statistical Check Poker Count 1 and 0 Register, offset: 0x80 */
21296   __I  uint32_t PKRCNT32;                          /**< Statistical Check Poker Count 3 and 2 Register, offset: 0x84 */
21297   __I  uint32_t PKRCNT54;                          /**< Statistical Check Poker Count 5 and 4 Register, offset: 0x88 */
21298   __I  uint32_t PKRCNT76;                          /**< Statistical Check Poker Count 7 and 6 Register, offset: 0x8C */
21299   __I  uint32_t PKRCNT98;                          /**< Statistical Check Poker Count 9 and 8 Register, offset: 0x90 */
21300   __I  uint32_t PKRCNTBA;                          /**< Statistical Check Poker Count B and A Register, offset: 0x94 */
21301   __I  uint32_t PKRCNTDC;                          /**< Statistical Check Poker Count D and C Register, offset: 0x98 */
21302   __I  uint32_t PKRCNTFE;                          /**< Statistical Check Poker Count F and E Register, offset: 0x9C */
21303   __IO uint32_t SEC_CFG;                           /**< Security Configuration Register, offset: 0xA0 */
21304   __IO uint32_t INT_CTRL;                          /**< Interrupt Control Register, offset: 0xA4 */
21305   __IO uint32_t INT_MASK;                          /**< Mask Register, offset: 0xA8 */
21306   __I  uint32_t INT_STATUS;                        /**< Interrupt Status Register, offset: 0xAC */
21307        uint8_t RESERVED_0[64];
21308   __I  uint32_t VID1;                              /**< Version ID Register (MS), offset: 0xF0 */
21309   __I  uint32_t VID2;                              /**< Version ID Register (LS), offset: 0xF4 */
21310 } TRNG_Type;
21311 
21312 /* ----------------------------------------------------------------------------
21313    -- TRNG Register Masks
21314    ---------------------------------------------------------------------------- */
21315 
21316 /*!
21317  * @addtogroup TRNG_Register_Masks TRNG Register Masks
21318  * @{
21319  */
21320 
21321 /*! @name MCTL - Miscellaneous Control Register */
21322 /*! @{ */
21323 
21324 #define TRNG_MCTL_SAMP_MODE_MASK                 (0x3U)
21325 #define TRNG_MCTL_SAMP_MODE_SHIFT                (0U)
21326 /*! SAMP_MODE
21327  *  0b00..use Von Neumann data into both Entropy shifter and Statistical Checker
21328  *  0b01..use raw data into both Entropy shifter and Statistical Checker
21329  *  0b10..use Von Neumann data into Entropy shifter. Use raw data into Statistical Checker
21330  *  0b11..undefined/reserved.
21331  */
21332 #define TRNG_MCTL_SAMP_MODE(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_SAMP_MODE_SHIFT)) & TRNG_MCTL_SAMP_MODE_MASK)
21333 
21334 #define TRNG_MCTL_OSC_DIV_MASK                   (0xCU)
21335 #define TRNG_MCTL_OSC_DIV_SHIFT                  (2U)
21336 /*! OSC_DIV
21337  *  0b00..use ring oscillator with no divide
21338  *  0b01..use ring oscillator divided-by-2
21339  *  0b10..use ring oscillator divided-by-4
21340  *  0b11..use ring oscillator divided-by-8
21341  */
21342 #define TRNG_MCTL_OSC_DIV(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_OSC_DIV_SHIFT)) & TRNG_MCTL_OSC_DIV_MASK)
21343 
21344 #define TRNG_MCTL_UNUSED4_MASK                   (0x10U)
21345 #define TRNG_MCTL_UNUSED4_SHIFT                  (4U)
21346 #define TRNG_MCTL_UNUSED4(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_UNUSED4_SHIFT)) & TRNG_MCTL_UNUSED4_MASK)
21347 
21348 #define TRNG_MCTL_TRNG_ACC_MASK                  (0x20U)
21349 #define TRNG_MCTL_TRNG_ACC_SHIFT                 (5U)
21350 #define TRNG_MCTL_TRNG_ACC(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TRNG_ACC_SHIFT)) & TRNG_MCTL_TRNG_ACC_MASK)
21351 
21352 #define TRNG_MCTL_RST_DEF_MASK                   (0x40U)
21353 #define TRNG_MCTL_RST_DEF_SHIFT                  (6U)
21354 #define TRNG_MCTL_RST_DEF(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_RST_DEF_SHIFT)) & TRNG_MCTL_RST_DEF_MASK)
21355 
21356 #define TRNG_MCTL_FOR_SCLK_MASK                  (0x80U)
21357 #define TRNG_MCTL_FOR_SCLK_SHIFT                 (7U)
21358 #define TRNG_MCTL_FOR_SCLK(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FOR_SCLK_SHIFT)) & TRNG_MCTL_FOR_SCLK_MASK)
21359 
21360 #define TRNG_MCTL_FCT_FAIL_MASK                  (0x100U)
21361 #define TRNG_MCTL_FCT_FAIL_SHIFT                 (8U)
21362 #define TRNG_MCTL_FCT_FAIL(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_FAIL_SHIFT)) & TRNG_MCTL_FCT_FAIL_MASK)
21363 
21364 #define TRNG_MCTL_FCT_VAL_MASK                   (0x200U)
21365 #define TRNG_MCTL_FCT_VAL_SHIFT                  (9U)
21366 #define TRNG_MCTL_FCT_VAL(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_VAL_SHIFT)) & TRNG_MCTL_FCT_VAL_MASK)
21367 
21368 #define TRNG_MCTL_ENT_VAL_MASK                   (0x400U)
21369 #define TRNG_MCTL_ENT_VAL_SHIFT                  (10U)
21370 #define TRNG_MCTL_ENT_VAL(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ENT_VAL_SHIFT)) & TRNG_MCTL_ENT_VAL_MASK)
21371 
21372 #define TRNG_MCTL_TST_OUT_MASK                   (0x800U)
21373 #define TRNG_MCTL_TST_OUT_SHIFT                  (11U)
21374 #define TRNG_MCTL_TST_OUT(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TST_OUT_SHIFT)) & TRNG_MCTL_TST_OUT_MASK)
21375 
21376 #define TRNG_MCTL_ERR_MASK                       (0x1000U)
21377 #define TRNG_MCTL_ERR_SHIFT                      (12U)
21378 #define TRNG_MCTL_ERR(x)                         (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ERR_SHIFT)) & TRNG_MCTL_ERR_MASK)
21379 
21380 #define TRNG_MCTL_TSTOP_OK_MASK                  (0x2000U)
21381 #define TRNG_MCTL_TSTOP_OK_SHIFT                 (13U)
21382 #define TRNG_MCTL_TSTOP_OK(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TSTOP_OK_SHIFT)) & TRNG_MCTL_TSTOP_OK_MASK)
21383 
21384 #define TRNG_MCTL_PRGM_MASK                      (0x10000U)
21385 #define TRNG_MCTL_PRGM_SHIFT                     (16U)
21386 #define TRNG_MCTL_PRGM(x)                        (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_PRGM_SHIFT)) & TRNG_MCTL_PRGM_MASK)
21387 /*! @} */
21388 
21389 /*! @name SCMISC - Statistical Check Miscellaneous Register */
21390 /*! @{ */
21391 
21392 #define TRNG_SCMISC_LRUN_MAX_MASK                (0xFFU)
21393 #define TRNG_SCMISC_LRUN_MAX_SHIFT               (0U)
21394 #define TRNG_SCMISC_LRUN_MAX(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_LRUN_MAX_SHIFT)) & TRNG_SCMISC_LRUN_MAX_MASK)
21395 
21396 #define TRNG_SCMISC_RTY_CT_MASK                  (0xF0000U)
21397 #define TRNG_SCMISC_RTY_CT_SHIFT                 (16U)
21398 #define TRNG_SCMISC_RTY_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_RTY_CT_SHIFT)) & TRNG_SCMISC_RTY_CT_MASK)
21399 /*! @} */
21400 
21401 /*! @name PKRRNG - Poker Range Register */
21402 /*! @{ */
21403 
21404 #define TRNG_PKRRNG_PKR_RNG_MASK                 (0xFFFFU)
21405 #define TRNG_PKRRNG_PKR_RNG_SHIFT                (0U)
21406 #define TRNG_PKRRNG_PKR_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_PKRRNG_PKR_RNG_SHIFT)) & TRNG_PKRRNG_PKR_RNG_MASK)
21407 /*! @} */
21408 
21409 /*! @name PKRMAX - Poker Maximum Limit Register */
21410 /*! @{ */
21411 
21412 #define TRNG_PKRMAX_PKR_MAX_MASK                 (0xFFFFFFU)
21413 #define TRNG_PKRMAX_PKR_MAX_SHIFT                (0U)
21414 /*! PKR_MAX - Poker Maximum Limit. */
21415 #define TRNG_PKRMAX_PKR_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_PKRMAX_PKR_MAX_SHIFT)) & TRNG_PKRMAX_PKR_MAX_MASK)
21416 /*! @} */
21417 
21418 /*! @name PKRSQ - Poker Square Calculation Result Register */
21419 /*! @{ */
21420 
21421 #define TRNG_PKRSQ_PKR_SQ_MASK                   (0xFFFFFFU)
21422 #define TRNG_PKRSQ_PKR_SQ_SHIFT                  (0U)
21423 /*! PKR_SQ - Poker Square Calculation Result. */
21424 #define TRNG_PKRSQ_PKR_SQ(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_PKRSQ_PKR_SQ_SHIFT)) & TRNG_PKRSQ_PKR_SQ_MASK)
21425 /*! @} */
21426 
21427 /*! @name SDCTL - Seed Control Register */
21428 /*! @{ */
21429 
21430 #define TRNG_SDCTL_SAMP_SIZE_MASK                (0xFFFFU)
21431 #define TRNG_SDCTL_SAMP_SIZE_SHIFT               (0U)
21432 #define TRNG_SDCTL_SAMP_SIZE(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_SAMP_SIZE_SHIFT)) & TRNG_SDCTL_SAMP_SIZE_MASK)
21433 
21434 #define TRNG_SDCTL_ENT_DLY_MASK                  (0xFFFF0000U)
21435 #define TRNG_SDCTL_ENT_DLY_SHIFT                 (16U)
21436 #define TRNG_SDCTL_ENT_DLY(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_ENT_DLY_SHIFT)) & TRNG_SDCTL_ENT_DLY_MASK)
21437 /*! @} */
21438 
21439 /*! @name SBLIM - Sparse Bit Limit Register */
21440 /*! @{ */
21441 
21442 #define TRNG_SBLIM_SB_LIM_MASK                   (0x3FFU)
21443 #define TRNG_SBLIM_SB_LIM_SHIFT                  (0U)
21444 #define TRNG_SBLIM_SB_LIM(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_SBLIM_SB_LIM_SHIFT)) & TRNG_SBLIM_SB_LIM_MASK)
21445 /*! @} */
21446 
21447 /*! @name TOTSAM - Total Samples Register */
21448 /*! @{ */
21449 
21450 #define TRNG_TOTSAM_TOT_SAM_MASK                 (0xFFFFFU)
21451 #define TRNG_TOTSAM_TOT_SAM_SHIFT                (0U)
21452 #define TRNG_TOTSAM_TOT_SAM(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_TOTSAM_TOT_SAM_SHIFT)) & TRNG_TOTSAM_TOT_SAM_MASK)
21453 /*! @} */
21454 
21455 /*! @name FRQMIN - Frequency Count Minimum Limit Register */
21456 /*! @{ */
21457 
21458 #define TRNG_FRQMIN_FRQ_MIN_MASK                 (0x3FFFFFU)
21459 #define TRNG_FRQMIN_FRQ_MIN_SHIFT                (0U)
21460 #define TRNG_FRQMIN_FRQ_MIN(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMIN_FRQ_MIN_SHIFT)) & TRNG_FRQMIN_FRQ_MIN_MASK)
21461 /*! @} */
21462 
21463 /*! @name FRQCNT - Frequency Count Register */
21464 /*! @{ */
21465 
21466 #define TRNG_FRQCNT_FRQ_CT_MASK                  (0x3FFFFFU)
21467 #define TRNG_FRQCNT_FRQ_CT_SHIFT                 (0U)
21468 #define TRNG_FRQCNT_FRQ_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_FRQCNT_FRQ_CT_SHIFT)) & TRNG_FRQCNT_FRQ_CT_MASK)
21469 /*! @} */
21470 
21471 /*! @name FRQMAX - Frequency Count Maximum Limit Register */
21472 /*! @{ */
21473 
21474 #define TRNG_FRQMAX_FRQ_MAX_MASK                 (0x3FFFFFU)
21475 #define TRNG_FRQMAX_FRQ_MAX_SHIFT                (0U)
21476 #define TRNG_FRQMAX_FRQ_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMAX_FRQ_MAX_SHIFT)) & TRNG_FRQMAX_FRQ_MAX_MASK)
21477 /*! @} */
21478 
21479 /*! @name SCMC - Statistical Check Monobit Count Register */
21480 /*! @{ */
21481 
21482 #define TRNG_SCMC_MONO_CT_MASK                   (0xFFFFU)
21483 #define TRNG_SCMC_MONO_CT_SHIFT                  (0U)
21484 #define TRNG_SCMC_MONO_CT(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_SCMC_MONO_CT_SHIFT)) & TRNG_SCMC_MONO_CT_MASK)
21485 /*! @} */
21486 
21487 /*! @name SCML - Statistical Check Monobit Limit Register */
21488 /*! @{ */
21489 
21490 #define TRNG_SCML_MONO_MAX_MASK                  (0xFFFFU)
21491 #define TRNG_SCML_MONO_MAX_SHIFT                 (0U)
21492 #define TRNG_SCML_MONO_MAX(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_MAX_SHIFT)) & TRNG_SCML_MONO_MAX_MASK)
21493 
21494 #define TRNG_SCML_MONO_RNG_MASK                  (0xFFFF0000U)
21495 #define TRNG_SCML_MONO_RNG_SHIFT                 (16U)
21496 #define TRNG_SCML_MONO_RNG(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_RNG_SHIFT)) & TRNG_SCML_MONO_RNG_MASK)
21497 /*! @} */
21498 
21499 /*! @name SCR1C - Statistical Check Run Length 1 Count Register */
21500 /*! @{ */
21501 
21502 #define TRNG_SCR1C_R1_0_CT_MASK                  (0x7FFFU)
21503 #define TRNG_SCR1C_R1_0_CT_SHIFT                 (0U)
21504 #define TRNG_SCR1C_R1_0_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_0_CT_SHIFT)) & TRNG_SCR1C_R1_0_CT_MASK)
21505 
21506 #define TRNG_SCR1C_R1_1_CT_MASK                  (0x7FFF0000U)
21507 #define TRNG_SCR1C_R1_1_CT_SHIFT                 (16U)
21508 #define TRNG_SCR1C_R1_1_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_1_CT_SHIFT)) & TRNG_SCR1C_R1_1_CT_MASK)
21509 /*! @} */
21510 
21511 /*! @name SCR1L - Statistical Check Run Length 1 Limit Register */
21512 /*! @{ */
21513 
21514 #define TRNG_SCR1L_RUN1_MAX_MASK                 (0x7FFFU)
21515 #define TRNG_SCR1L_RUN1_MAX_SHIFT                (0U)
21516 #define TRNG_SCR1L_RUN1_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_MAX_SHIFT)) & TRNG_SCR1L_RUN1_MAX_MASK)
21517 
21518 #define TRNG_SCR1L_RUN1_RNG_MASK                 (0x7FFF0000U)
21519 #define TRNG_SCR1L_RUN1_RNG_SHIFT                (16U)
21520 #define TRNG_SCR1L_RUN1_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_RNG_SHIFT)) & TRNG_SCR1L_RUN1_RNG_MASK)
21521 /*! @} */
21522 
21523 /*! @name SCR2C - Statistical Check Run Length 2 Count Register */
21524 /*! @{ */
21525 
21526 #define TRNG_SCR2C_R2_0_CT_MASK                  (0x3FFFU)
21527 #define TRNG_SCR2C_R2_0_CT_SHIFT                 (0U)
21528 #define TRNG_SCR2C_R2_0_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_0_CT_SHIFT)) & TRNG_SCR2C_R2_0_CT_MASK)
21529 
21530 #define TRNG_SCR2C_R2_1_CT_MASK                  (0x3FFF0000U)
21531 #define TRNG_SCR2C_R2_1_CT_SHIFT                 (16U)
21532 #define TRNG_SCR2C_R2_1_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_1_CT_SHIFT)) & TRNG_SCR2C_R2_1_CT_MASK)
21533 /*! @} */
21534 
21535 /*! @name SCR2L - Statistical Check Run Length 2 Limit Register */
21536 /*! @{ */
21537 
21538 #define TRNG_SCR2L_RUN2_MAX_MASK                 (0x3FFFU)
21539 #define TRNG_SCR2L_RUN2_MAX_SHIFT                (0U)
21540 #define TRNG_SCR2L_RUN2_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_MAX_SHIFT)) & TRNG_SCR2L_RUN2_MAX_MASK)
21541 
21542 #define TRNG_SCR2L_RUN2_RNG_MASK                 (0x3FFF0000U)
21543 #define TRNG_SCR2L_RUN2_RNG_SHIFT                (16U)
21544 #define TRNG_SCR2L_RUN2_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_RNG_SHIFT)) & TRNG_SCR2L_RUN2_RNG_MASK)
21545 /*! @} */
21546 
21547 /*! @name SCR3C - Statistical Check Run Length 3 Count Register */
21548 /*! @{ */
21549 
21550 #define TRNG_SCR3C_R3_0_CT_MASK                  (0x1FFFU)
21551 #define TRNG_SCR3C_R3_0_CT_SHIFT                 (0U)
21552 #define TRNG_SCR3C_R3_0_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_0_CT_SHIFT)) & TRNG_SCR3C_R3_0_CT_MASK)
21553 
21554 #define TRNG_SCR3C_R3_1_CT_MASK                  (0x1FFF0000U)
21555 #define TRNG_SCR3C_R3_1_CT_SHIFT                 (16U)
21556 #define TRNG_SCR3C_R3_1_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_1_CT_SHIFT)) & TRNG_SCR3C_R3_1_CT_MASK)
21557 /*! @} */
21558 
21559 /*! @name SCR3L - Statistical Check Run Length 3 Limit Register */
21560 /*! @{ */
21561 
21562 #define TRNG_SCR3L_RUN3_MAX_MASK                 (0x1FFFU)
21563 #define TRNG_SCR3L_RUN3_MAX_SHIFT                (0U)
21564 #define TRNG_SCR3L_RUN3_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_MAX_SHIFT)) & TRNG_SCR3L_RUN3_MAX_MASK)
21565 
21566 #define TRNG_SCR3L_RUN3_RNG_MASK                 (0x1FFF0000U)
21567 #define TRNG_SCR3L_RUN3_RNG_SHIFT                (16U)
21568 #define TRNG_SCR3L_RUN3_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_RNG_SHIFT)) & TRNG_SCR3L_RUN3_RNG_MASK)
21569 /*! @} */
21570 
21571 /*! @name SCR4C - Statistical Check Run Length 4 Count Register */
21572 /*! @{ */
21573 
21574 #define TRNG_SCR4C_R4_0_CT_MASK                  (0xFFFU)
21575 #define TRNG_SCR4C_R4_0_CT_SHIFT                 (0U)
21576 #define TRNG_SCR4C_R4_0_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_0_CT_SHIFT)) & TRNG_SCR4C_R4_0_CT_MASK)
21577 
21578 #define TRNG_SCR4C_R4_1_CT_MASK                  (0xFFF0000U)
21579 #define TRNG_SCR4C_R4_1_CT_SHIFT                 (16U)
21580 #define TRNG_SCR4C_R4_1_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_1_CT_SHIFT)) & TRNG_SCR4C_R4_1_CT_MASK)
21581 /*! @} */
21582 
21583 /*! @name SCR4L - Statistical Check Run Length 4 Limit Register */
21584 /*! @{ */
21585 
21586 #define TRNG_SCR4L_RUN4_MAX_MASK                 (0xFFFU)
21587 #define TRNG_SCR4L_RUN4_MAX_SHIFT                (0U)
21588 #define TRNG_SCR4L_RUN4_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_MAX_SHIFT)) & TRNG_SCR4L_RUN4_MAX_MASK)
21589 
21590 #define TRNG_SCR4L_RUN4_RNG_MASK                 (0xFFF0000U)
21591 #define TRNG_SCR4L_RUN4_RNG_SHIFT                (16U)
21592 #define TRNG_SCR4L_RUN4_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_RNG_SHIFT)) & TRNG_SCR4L_RUN4_RNG_MASK)
21593 /*! @} */
21594 
21595 /*! @name SCR5C - Statistical Check Run Length 5 Count Register */
21596 /*! @{ */
21597 
21598 #define TRNG_SCR5C_R5_0_CT_MASK                  (0x7FFU)
21599 #define TRNG_SCR5C_R5_0_CT_SHIFT                 (0U)
21600 #define TRNG_SCR5C_R5_0_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_0_CT_SHIFT)) & TRNG_SCR5C_R5_0_CT_MASK)
21601 
21602 #define TRNG_SCR5C_R5_1_CT_MASK                  (0x7FF0000U)
21603 #define TRNG_SCR5C_R5_1_CT_SHIFT                 (16U)
21604 #define TRNG_SCR5C_R5_1_CT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_1_CT_SHIFT)) & TRNG_SCR5C_R5_1_CT_MASK)
21605 /*! @} */
21606 
21607 /*! @name SCR5L - Statistical Check Run Length 5 Limit Register */
21608 /*! @{ */
21609 
21610 #define TRNG_SCR5L_RUN5_MAX_MASK                 (0x7FFU)
21611 #define TRNG_SCR5L_RUN5_MAX_SHIFT                (0U)
21612 #define TRNG_SCR5L_RUN5_MAX(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_MAX_SHIFT)) & TRNG_SCR5L_RUN5_MAX_MASK)
21613 
21614 #define TRNG_SCR5L_RUN5_RNG_MASK                 (0x7FF0000U)
21615 #define TRNG_SCR5L_RUN5_RNG_SHIFT                (16U)
21616 #define TRNG_SCR5L_RUN5_RNG(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_RNG_SHIFT)) & TRNG_SCR5L_RUN5_RNG_MASK)
21617 /*! @} */
21618 
21619 /*! @name SCR6PC - Statistical Check Run Length 6+ Count Register */
21620 /*! @{ */
21621 
21622 #define TRNG_SCR6PC_R6P_0_CT_MASK                (0x7FFU)
21623 #define TRNG_SCR6PC_R6P_0_CT_SHIFT               (0U)
21624 #define TRNG_SCR6PC_R6P_0_CT(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_0_CT_SHIFT)) & TRNG_SCR6PC_R6P_0_CT_MASK)
21625 
21626 #define TRNG_SCR6PC_R6P_1_CT_MASK                (0x7FF0000U)
21627 #define TRNG_SCR6PC_R6P_1_CT_SHIFT               (16U)
21628 #define TRNG_SCR6PC_R6P_1_CT(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_1_CT_SHIFT)) & TRNG_SCR6PC_R6P_1_CT_MASK)
21629 /*! @} */
21630 
21631 /*! @name SCR6PL - Statistical Check Run Length 6+ Limit Register */
21632 /*! @{ */
21633 
21634 #define TRNG_SCR6PL_RUN6P_MAX_MASK               (0x7FFU)
21635 #define TRNG_SCR6PL_RUN6P_MAX_SHIFT              (0U)
21636 #define TRNG_SCR6PL_RUN6P_MAX(x)                 (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_MAX_SHIFT)) & TRNG_SCR6PL_RUN6P_MAX_MASK)
21637 
21638 #define TRNG_SCR6PL_RUN6P_RNG_MASK               (0x7FF0000U)
21639 #define TRNG_SCR6PL_RUN6P_RNG_SHIFT              (16U)
21640 #define TRNG_SCR6PL_RUN6P_RNG(x)                 (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_RNG_SHIFT)) & TRNG_SCR6PL_RUN6P_RNG_MASK)
21641 /*! @} */
21642 
21643 /*! @name STATUS - Status Register */
21644 /*! @{ */
21645 
21646 #define TRNG_STATUS_TF1BR0_MASK                  (0x1U)
21647 #define TRNG_STATUS_TF1BR0_SHIFT                 (0U)
21648 #define TRNG_STATUS_TF1BR0(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR0_SHIFT)) & TRNG_STATUS_TF1BR0_MASK)
21649 
21650 #define TRNG_STATUS_TF1BR1_MASK                  (0x2U)
21651 #define TRNG_STATUS_TF1BR1_SHIFT                 (1U)
21652 #define TRNG_STATUS_TF1BR1(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR1_SHIFT)) & TRNG_STATUS_TF1BR1_MASK)
21653 
21654 #define TRNG_STATUS_TF2BR0_MASK                  (0x4U)
21655 #define TRNG_STATUS_TF2BR0_SHIFT                 (2U)
21656 #define TRNG_STATUS_TF2BR0(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR0_SHIFT)) & TRNG_STATUS_TF2BR0_MASK)
21657 
21658 #define TRNG_STATUS_TF2BR1_MASK                  (0x8U)
21659 #define TRNG_STATUS_TF2BR1_SHIFT                 (3U)
21660 #define TRNG_STATUS_TF2BR1(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR1_SHIFT)) & TRNG_STATUS_TF2BR1_MASK)
21661 
21662 #define TRNG_STATUS_TF3BR0_MASK                  (0x10U)
21663 #define TRNG_STATUS_TF3BR0_SHIFT                 (4U)
21664 #define TRNG_STATUS_TF3BR0(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR0_SHIFT)) & TRNG_STATUS_TF3BR0_MASK)
21665 
21666 #define TRNG_STATUS_TF3BR1_MASK                  (0x20U)
21667 #define TRNG_STATUS_TF3BR1_SHIFT                 (5U)
21668 #define TRNG_STATUS_TF3BR1(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR1_SHIFT)) & TRNG_STATUS_TF3BR1_MASK)
21669 
21670 #define TRNG_STATUS_TF4BR0_MASK                  (0x40U)
21671 #define TRNG_STATUS_TF4BR0_SHIFT                 (6U)
21672 #define TRNG_STATUS_TF4BR0(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR0_SHIFT)) & TRNG_STATUS_TF4BR0_MASK)
21673 
21674 #define TRNG_STATUS_TF4BR1_MASK                  (0x80U)
21675 #define TRNG_STATUS_TF4BR1_SHIFT                 (7U)
21676 #define TRNG_STATUS_TF4BR1(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR1_SHIFT)) & TRNG_STATUS_TF4BR1_MASK)
21677 
21678 #define TRNG_STATUS_TF5BR0_MASK                  (0x100U)
21679 #define TRNG_STATUS_TF5BR0_SHIFT                 (8U)
21680 #define TRNG_STATUS_TF5BR0(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR0_SHIFT)) & TRNG_STATUS_TF5BR0_MASK)
21681 
21682 #define TRNG_STATUS_TF5BR1_MASK                  (0x200U)
21683 #define TRNG_STATUS_TF5BR1_SHIFT                 (9U)
21684 #define TRNG_STATUS_TF5BR1(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR1_SHIFT)) & TRNG_STATUS_TF5BR1_MASK)
21685 
21686 #define TRNG_STATUS_TF6PBR0_MASK                 (0x400U)
21687 #define TRNG_STATUS_TF6PBR0_SHIFT                (10U)
21688 #define TRNG_STATUS_TF6PBR0(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR0_SHIFT)) & TRNG_STATUS_TF6PBR0_MASK)
21689 
21690 #define TRNG_STATUS_TF6PBR1_MASK                 (0x800U)
21691 #define TRNG_STATUS_TF6PBR1_SHIFT                (11U)
21692 #define TRNG_STATUS_TF6PBR1(x)                   (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR1_SHIFT)) & TRNG_STATUS_TF6PBR1_MASK)
21693 
21694 #define TRNG_STATUS_TFSB_MASK                    (0x1000U)
21695 #define TRNG_STATUS_TFSB_SHIFT                   (12U)
21696 #define TRNG_STATUS_TFSB(x)                      (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFSB_SHIFT)) & TRNG_STATUS_TFSB_MASK)
21697 
21698 #define TRNG_STATUS_TFLR_MASK                    (0x2000U)
21699 #define TRNG_STATUS_TFLR_SHIFT                   (13U)
21700 #define TRNG_STATUS_TFLR(x)                      (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFLR_SHIFT)) & TRNG_STATUS_TFLR_MASK)
21701 
21702 #define TRNG_STATUS_TFP_MASK                     (0x4000U)
21703 #define TRNG_STATUS_TFP_SHIFT                    (14U)
21704 #define TRNG_STATUS_TFP(x)                       (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFP_SHIFT)) & TRNG_STATUS_TFP_MASK)
21705 
21706 #define TRNG_STATUS_TFMB_MASK                    (0x8000U)
21707 #define TRNG_STATUS_TFMB_SHIFT                   (15U)
21708 #define TRNG_STATUS_TFMB(x)                      (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFMB_SHIFT)) & TRNG_STATUS_TFMB_MASK)
21709 
21710 #define TRNG_STATUS_RETRY_CT_MASK                (0xF0000U)
21711 #define TRNG_STATUS_RETRY_CT_SHIFT               (16U)
21712 #define TRNG_STATUS_RETRY_CT(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_RETRY_CT_SHIFT)) & TRNG_STATUS_RETRY_CT_MASK)
21713 /*! @} */
21714 
21715 /*! @name ENT - Entropy Read Register */
21716 /*! @{ */
21717 
21718 #define TRNG_ENT_ENT_MASK                        (0xFFFFFFFFU)
21719 #define TRNG_ENT_ENT_SHIFT                       (0U)
21720 #define TRNG_ENT_ENT(x)                          (((uint32_t)(((uint32_t)(x)) << TRNG_ENT_ENT_SHIFT)) & TRNG_ENT_ENT_MASK)
21721 /*! @} */
21722 
21723 /* The count of TRNG_ENT */
21724 #define TRNG_ENT_COUNT                           (16U)
21725 
21726 /*! @name PKRCNT10 - Statistical Check Poker Count 1 and 0 Register */
21727 /*! @{ */
21728 
21729 #define TRNG_PKRCNT10_PKR_0_CT_MASK              (0xFFFFU)
21730 #define TRNG_PKRCNT10_PKR_0_CT_SHIFT             (0U)
21731 #define TRNG_PKRCNT10_PKR_0_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_0_CT_SHIFT)) & TRNG_PKRCNT10_PKR_0_CT_MASK)
21732 
21733 #define TRNG_PKRCNT10_PKR_1_CT_MASK              (0xFFFF0000U)
21734 #define TRNG_PKRCNT10_PKR_1_CT_SHIFT             (16U)
21735 #define TRNG_PKRCNT10_PKR_1_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_1_CT_SHIFT)) & TRNG_PKRCNT10_PKR_1_CT_MASK)
21736 /*! @} */
21737 
21738 /*! @name PKRCNT32 - Statistical Check Poker Count 3 and 2 Register */
21739 /*! @{ */
21740 
21741 #define TRNG_PKRCNT32_PKR_2_CT_MASK              (0xFFFFU)
21742 #define TRNG_PKRCNT32_PKR_2_CT_SHIFT             (0U)
21743 #define TRNG_PKRCNT32_PKR_2_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_2_CT_SHIFT)) & TRNG_PKRCNT32_PKR_2_CT_MASK)
21744 
21745 #define TRNG_PKRCNT32_PKR_3_CT_MASK              (0xFFFF0000U)
21746 #define TRNG_PKRCNT32_PKR_3_CT_SHIFT             (16U)
21747 #define TRNG_PKRCNT32_PKR_3_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_3_CT_SHIFT)) & TRNG_PKRCNT32_PKR_3_CT_MASK)
21748 /*! @} */
21749 
21750 /*! @name PKRCNT54 - Statistical Check Poker Count 5 and 4 Register */
21751 /*! @{ */
21752 
21753 #define TRNG_PKRCNT54_PKR_4_CT_MASK              (0xFFFFU)
21754 #define TRNG_PKRCNT54_PKR_4_CT_SHIFT             (0U)
21755 #define TRNG_PKRCNT54_PKR_4_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_4_CT_SHIFT)) & TRNG_PKRCNT54_PKR_4_CT_MASK)
21756 
21757 #define TRNG_PKRCNT54_PKR_5_CT_MASK              (0xFFFF0000U)
21758 #define TRNG_PKRCNT54_PKR_5_CT_SHIFT             (16U)
21759 #define TRNG_PKRCNT54_PKR_5_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_5_CT_SHIFT)) & TRNG_PKRCNT54_PKR_5_CT_MASK)
21760 /*! @} */
21761 
21762 /*! @name PKRCNT76 - Statistical Check Poker Count 7 and 6 Register */
21763 /*! @{ */
21764 
21765 #define TRNG_PKRCNT76_PKR_6_CT_MASK              (0xFFFFU)
21766 #define TRNG_PKRCNT76_PKR_6_CT_SHIFT             (0U)
21767 #define TRNG_PKRCNT76_PKR_6_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_6_CT_SHIFT)) & TRNG_PKRCNT76_PKR_6_CT_MASK)
21768 
21769 #define TRNG_PKRCNT76_PKR_7_CT_MASK              (0xFFFF0000U)
21770 #define TRNG_PKRCNT76_PKR_7_CT_SHIFT             (16U)
21771 #define TRNG_PKRCNT76_PKR_7_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_7_CT_SHIFT)) & TRNG_PKRCNT76_PKR_7_CT_MASK)
21772 /*! @} */
21773 
21774 /*! @name PKRCNT98 - Statistical Check Poker Count 9 and 8 Register */
21775 /*! @{ */
21776 
21777 #define TRNG_PKRCNT98_PKR_8_CT_MASK              (0xFFFFU)
21778 #define TRNG_PKRCNT98_PKR_8_CT_SHIFT             (0U)
21779 #define TRNG_PKRCNT98_PKR_8_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_8_CT_SHIFT)) & TRNG_PKRCNT98_PKR_8_CT_MASK)
21780 
21781 #define TRNG_PKRCNT98_PKR_9_CT_MASK              (0xFFFF0000U)
21782 #define TRNG_PKRCNT98_PKR_9_CT_SHIFT             (16U)
21783 #define TRNG_PKRCNT98_PKR_9_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_9_CT_SHIFT)) & TRNG_PKRCNT98_PKR_9_CT_MASK)
21784 /*! @} */
21785 
21786 /*! @name PKRCNTBA - Statistical Check Poker Count B and A Register */
21787 /*! @{ */
21788 
21789 #define TRNG_PKRCNTBA_PKR_A_CT_MASK              (0xFFFFU)
21790 #define TRNG_PKRCNTBA_PKR_A_CT_SHIFT             (0U)
21791 #define TRNG_PKRCNTBA_PKR_A_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_A_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_A_CT_MASK)
21792 
21793 #define TRNG_PKRCNTBA_PKR_B_CT_MASK              (0xFFFF0000U)
21794 #define TRNG_PKRCNTBA_PKR_B_CT_SHIFT             (16U)
21795 #define TRNG_PKRCNTBA_PKR_B_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_B_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_B_CT_MASK)
21796 /*! @} */
21797 
21798 /*! @name PKRCNTDC - Statistical Check Poker Count D and C Register */
21799 /*! @{ */
21800 
21801 #define TRNG_PKRCNTDC_PKR_C_CT_MASK              (0xFFFFU)
21802 #define TRNG_PKRCNTDC_PKR_C_CT_SHIFT             (0U)
21803 #define TRNG_PKRCNTDC_PKR_C_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_C_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_C_CT_MASK)
21804 
21805 #define TRNG_PKRCNTDC_PKR_D_CT_MASK              (0xFFFF0000U)
21806 #define TRNG_PKRCNTDC_PKR_D_CT_SHIFT             (16U)
21807 #define TRNG_PKRCNTDC_PKR_D_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_D_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_D_CT_MASK)
21808 /*! @} */
21809 
21810 /*! @name PKRCNTFE - Statistical Check Poker Count F and E Register */
21811 /*! @{ */
21812 
21813 #define TRNG_PKRCNTFE_PKR_E_CT_MASK              (0xFFFFU)
21814 #define TRNG_PKRCNTFE_PKR_E_CT_SHIFT             (0U)
21815 #define TRNG_PKRCNTFE_PKR_E_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_E_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_E_CT_MASK)
21816 
21817 #define TRNG_PKRCNTFE_PKR_F_CT_MASK              (0xFFFF0000U)
21818 #define TRNG_PKRCNTFE_PKR_F_CT_SHIFT             (16U)
21819 #define TRNG_PKRCNTFE_PKR_F_CT(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_F_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_F_CT_MASK)
21820 /*! @} */
21821 
21822 /*! @name SEC_CFG - Security Configuration Register */
21823 /*! @{ */
21824 
21825 #define TRNG_SEC_CFG_UNUSED0_MASK                (0x1U)
21826 #define TRNG_SEC_CFG_UNUSED0_SHIFT               (0U)
21827 #define TRNG_SEC_CFG_UNUSED0(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_UNUSED0_SHIFT)) & TRNG_SEC_CFG_UNUSED0_MASK)
21828 
21829 #define TRNG_SEC_CFG_NO_PRGM_MASK                (0x2U)
21830 #define TRNG_SEC_CFG_NO_PRGM_SHIFT               (1U)
21831 /*! NO_PRGM
21832  *  0b0..Programability of registers controlled only by the Miscellaneous Control Register's access mode bit.
21833  *  0b1..Overides Miscellaneous Control Register access mode and prevents TRNG register programming.
21834  */
21835 #define TRNG_SEC_CFG_NO_PRGM(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_NO_PRGM_SHIFT)) & TRNG_SEC_CFG_NO_PRGM_MASK)
21836 
21837 #define TRNG_SEC_CFG_UNUSED2_MASK                (0x4U)
21838 #define TRNG_SEC_CFG_UNUSED2_SHIFT               (2U)
21839 #define TRNG_SEC_CFG_UNUSED2(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_UNUSED2_SHIFT)) & TRNG_SEC_CFG_UNUSED2_MASK)
21840 /*! @} */
21841 
21842 /*! @name INT_CTRL - Interrupt Control Register */
21843 /*! @{ */
21844 
21845 #define TRNG_INT_CTRL_HW_ERR_MASK                (0x1U)
21846 #define TRNG_INT_CTRL_HW_ERR_SHIFT               (0U)
21847 /*! HW_ERR
21848  *  0b0..Corresponding bit of INT_STATUS register cleared.
21849  *  0b1..Corresponding bit of INT_STATUS register active.
21850  */
21851 #define TRNG_INT_CTRL_HW_ERR(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_HW_ERR_SHIFT)) & TRNG_INT_CTRL_HW_ERR_MASK)
21852 
21853 #define TRNG_INT_CTRL_ENT_VAL_MASK               (0x2U)
21854 #define TRNG_INT_CTRL_ENT_VAL_SHIFT              (1U)
21855 /*! ENT_VAL
21856  *  0b0..Same behavior as bit 0 of this register.
21857  *  0b1..Same behavior as bit 0 of this register.
21858  */
21859 #define TRNG_INT_CTRL_ENT_VAL(x)                 (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_ENT_VAL_SHIFT)) & TRNG_INT_CTRL_ENT_VAL_MASK)
21860 
21861 #define TRNG_INT_CTRL_FRQ_CT_FAIL_MASK           (0x4U)
21862 #define TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT          (2U)
21863 /*! FRQ_CT_FAIL
21864  *  0b0..Same behavior as bit 0 of this register.
21865  *  0b1..Same behavior as bit 0 of this register.
21866  */
21867 #define TRNG_INT_CTRL_FRQ_CT_FAIL(x)             (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_CTRL_FRQ_CT_FAIL_MASK)
21868 
21869 #define TRNG_INT_CTRL_UNUSED_MASK                (0xFFFFFFF8U)
21870 #define TRNG_INT_CTRL_UNUSED_SHIFT               (3U)
21871 #define TRNG_INT_CTRL_UNUSED(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_UNUSED_SHIFT)) & TRNG_INT_CTRL_UNUSED_MASK)
21872 /*! @} */
21873 
21874 /*! @name INT_MASK - Mask Register */
21875 /*! @{ */
21876 
21877 #define TRNG_INT_MASK_HW_ERR_MASK                (0x1U)
21878 #define TRNG_INT_MASK_HW_ERR_SHIFT               (0U)
21879 /*! HW_ERR
21880  *  0b0..Corresponding interrupt of INT_STATUS is masked.
21881  *  0b1..Corresponding bit of INT_STATUS is active.
21882  */
21883 #define TRNG_INT_MASK_HW_ERR(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_HW_ERR_SHIFT)) & TRNG_INT_MASK_HW_ERR_MASK)
21884 
21885 #define TRNG_INT_MASK_ENT_VAL_MASK               (0x2U)
21886 #define TRNG_INT_MASK_ENT_VAL_SHIFT              (1U)
21887 /*! ENT_VAL
21888  *  0b0..Same behavior as bit 0 of this register.
21889  *  0b1..Same behavior as bit 0 of this register.
21890  */
21891 #define TRNG_INT_MASK_ENT_VAL(x)                 (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_ENT_VAL_SHIFT)) & TRNG_INT_MASK_ENT_VAL_MASK)
21892 
21893 #define TRNG_INT_MASK_FRQ_CT_FAIL_MASK           (0x4U)
21894 #define TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT          (2U)
21895 /*! FRQ_CT_FAIL
21896  *  0b0..Same behavior as bit 0 of this register.
21897  *  0b1..Same behavior as bit 0 of this register.
21898  */
21899 #define TRNG_INT_MASK_FRQ_CT_FAIL(x)             (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_MASK_FRQ_CT_FAIL_MASK)
21900 /*! @} */
21901 
21902 /*! @name INT_STATUS - Interrupt Status Register */
21903 /*! @{ */
21904 
21905 #define TRNG_INT_STATUS_HW_ERR_MASK              (0x1U)
21906 #define TRNG_INT_STATUS_HW_ERR_SHIFT             (0U)
21907 /*! HW_ERR
21908  *  0b0..no error
21909  *  0b1..error detected.
21910  */
21911 #define TRNG_INT_STATUS_HW_ERR(x)                (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_HW_ERR_SHIFT)) & TRNG_INT_STATUS_HW_ERR_MASK)
21912 
21913 #define TRNG_INT_STATUS_ENT_VAL_MASK             (0x2U)
21914 #define TRNG_INT_STATUS_ENT_VAL_SHIFT            (1U)
21915 /*! ENT_VAL
21916  *  0b0..Busy generation entropy. Any value read is invalid.
21917  *  0b1..TRNG can be stopped and entropy is valid if read.
21918  */
21919 #define TRNG_INT_STATUS_ENT_VAL(x)               (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_ENT_VAL_SHIFT)) & TRNG_INT_STATUS_ENT_VAL_MASK)
21920 
21921 #define TRNG_INT_STATUS_FRQ_CT_FAIL_MASK         (0x4U)
21922 #define TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT        (2U)
21923 /*! FRQ_CT_FAIL
21924  *  0b0..No hardware nor self test frequency errors.
21925  *  0b1..The frequency counter has detected a failure.
21926  */
21927 #define TRNG_INT_STATUS_FRQ_CT_FAIL(x)           (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_STATUS_FRQ_CT_FAIL_MASK)
21928 /*! @} */
21929 
21930 /*! @name VID1 - Version ID Register (MS) */
21931 /*! @{ */
21932 
21933 #define TRNG_VID1_MIN_REV_MASK                   (0xFFU)
21934 #define TRNG_VID1_MIN_REV_SHIFT                  (0U)
21935 /*! MIN_REV
21936  *  0b00000000..Minor revision number for TRNG.
21937  */
21938 #define TRNG_VID1_MIN_REV(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_MIN_REV_SHIFT)) & TRNG_VID1_MIN_REV_MASK)
21939 
21940 #define TRNG_VID1_MAJ_REV_MASK                   (0xFF00U)
21941 #define TRNG_VID1_MAJ_REV_SHIFT                  (8U)
21942 /*! MAJ_REV
21943  *  0b00000001..Major revision number for TRNG.
21944  */
21945 #define TRNG_VID1_MAJ_REV(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_MAJ_REV_SHIFT)) & TRNG_VID1_MAJ_REV_MASK)
21946 
21947 #define TRNG_VID1_IP_ID_MASK                     (0xFFFF0000U)
21948 #define TRNG_VID1_IP_ID_SHIFT                    (16U)
21949 /*! IP_ID
21950  *  0b0000000000110000..ID for TRNG.
21951  */
21952 #define TRNG_VID1_IP_ID(x)                       (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_IP_ID_SHIFT)) & TRNG_VID1_IP_ID_MASK)
21953 /*! @} */
21954 
21955 /*! @name VID2 - Version ID Register (LS) */
21956 /*! @{ */
21957 
21958 #define TRNG_VID2_CONFIG_OPT_MASK                (0xFFU)
21959 #define TRNG_VID2_CONFIG_OPT_SHIFT               (0U)
21960 /*! CONFIG_OPT
21961  *  0b00000000..TRNG_CONFIG_OPT for TRNG.
21962  */
21963 #define TRNG_VID2_CONFIG_OPT(x)                  (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_CONFIG_OPT_SHIFT)) & TRNG_VID2_CONFIG_OPT_MASK)
21964 
21965 #define TRNG_VID2_ECO_REV_MASK                   (0xFF00U)
21966 #define TRNG_VID2_ECO_REV_SHIFT                  (8U)
21967 /*! ECO_REV
21968  *  0b00000000..TRNG_ECO_REV for TRNG.
21969  */
21970 #define TRNG_VID2_ECO_REV(x)                     (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_ECO_REV_SHIFT)) & TRNG_VID2_ECO_REV_MASK)
21971 
21972 #define TRNG_VID2_INTG_OPT_MASK                  (0xFF0000U)
21973 #define TRNG_VID2_INTG_OPT_SHIFT                 (16U)
21974 /*! INTG_OPT
21975  *  0b00000000..INTG_OPT for TRNG.
21976  */
21977 #define TRNG_VID2_INTG_OPT(x)                    (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_INTG_OPT_SHIFT)) & TRNG_VID2_INTG_OPT_MASK)
21978 
21979 #define TRNG_VID2_ERA_MASK                       (0xFF000000U)
21980 #define TRNG_VID2_ERA_SHIFT                      (24U)
21981 /*! ERA
21982  *  0b00000000..COMPILE_OPT for TRNG.
21983  */
21984 #define TRNG_VID2_ERA(x)                         (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_ERA_SHIFT)) & TRNG_VID2_ERA_MASK)
21985 /*! @} */
21986 
21987 
21988 /*!
21989  * @}
21990  */ /* end of group TRNG_Register_Masks */
21991 
21992 
21993 /* TRNG - Peripheral instance base addresses */
21994 /** Peripheral TRNG base address */
21995 #define TRNG_BASE                                (0x41029000u)
21996 /** Peripheral TRNG base pointer */
21997 #define TRNG                                     ((TRNG_Type *)TRNG_BASE)
21998 /** Array initializer of TRNG peripheral base addresses */
21999 #define TRNG_BASE_ADDRS                          { TRNG_BASE }
22000 /** Array initializer of TRNG peripheral base pointers */
22001 #define TRNG_BASE_PTRS                           { TRNG }
22002 /** Interrupt vectors for the TRNG peripheral type */
22003 #define TRNG_IRQS                                { TRNG_IRQn }
22004 /** Backward compatibility macros */
22005 #define TRNG0                                    TRNG
22006 
22007 
22008 /*!
22009  * @}
22010  */ /* end of group TRNG_Peripheral_Access_Layer */
22011 
22012 
22013 /* ----------------------------------------------------------------------------
22014    -- TSTMR Peripheral Access Layer
22015    ---------------------------------------------------------------------------- */
22016 
22017 /*!
22018  * @addtogroup TSTMR_Peripheral_Access_Layer TSTMR Peripheral Access Layer
22019  * @{
22020  */
22021 
22022 /** TSTMR - Register Layout Typedef */
22023 typedef struct {
22024   __I  uint32_t L;                                 /**< Time Stamp Timer Register Low, offset: 0x0 */
22025   __I  uint32_t H;                                 /**< Time Stamp Timer Register High, offset: 0x4 */
22026 } TSTMR_Type;
22027 
22028 /* ----------------------------------------------------------------------------
22029    -- TSTMR Register Masks
22030    ---------------------------------------------------------------------------- */
22031 
22032 /*!
22033  * @addtogroup TSTMR_Register_Masks TSTMR Register Masks
22034  * @{
22035  */
22036 
22037 /*! @name L - Time Stamp Timer Register Low */
22038 /*! @{ */
22039 
22040 #define TSTMR_L_VALUE_MASK                       (0xFFFFFFFFU)
22041 #define TSTMR_L_VALUE_SHIFT                      (0U)
22042 /*! VALUE - Time Stamp Timer Low */
22043 #define TSTMR_L_VALUE(x)                         (((uint32_t)(((uint32_t)(x)) << TSTMR_L_VALUE_SHIFT)) & TSTMR_L_VALUE_MASK)
22044 /*! @} */
22045 
22046 /*! @name H - Time Stamp Timer Register High */
22047 /*! @{ */
22048 
22049 #define TSTMR_H_VALUE_MASK                       (0xFFFFFFU)
22050 #define TSTMR_H_VALUE_SHIFT                      (0U)
22051 /*! VALUE - Time Stamp Timer High */
22052 #define TSTMR_H_VALUE(x)                         (((uint32_t)(((uint32_t)(x)) << TSTMR_H_VALUE_SHIFT)) & TSTMR_H_VALUE_MASK)
22053 /*! @} */
22054 
22055 
22056 /*!
22057  * @}
22058  */ /* end of group TSTMR_Register_Masks */
22059 
22060 
22061 /* TSTMR - Peripheral instance base addresses */
22062 /** Peripheral TSTMRB base address */
22063 #define TSTMRB_BASE                              (0x4102C000u)
22064 /** Peripheral TSTMRB base pointer */
22065 #define TSTMRB                                   ((TSTMR_Type *)TSTMRB_BASE)
22066 /** Array initializer of TSTMR peripheral base addresses */
22067 #define TSTMR_BASE_ADDRS                         { TSTMRB_BASE }
22068 /** Array initializer of TSTMR peripheral base pointers */
22069 #define TSTMR_BASE_PTRS                          { TSTMRB }
22070 /* Extra definition */
22071 #define TSTMR_CLOCK_FREQUENCY_MHZ                (1U)
22072 
22073 
22074 /*!
22075  * @}
22076  */ /* end of group TSTMR_Peripheral_Access_Layer */
22077 
22078 
22079 /* ----------------------------------------------------------------------------
22080    -- USB Peripheral Access Layer
22081    ---------------------------------------------------------------------------- */
22082 
22083 /*!
22084  * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer
22085  * @{
22086  */
22087 
22088 /** USB - Register Layout Typedef */
22089 typedef struct {
22090   __I  uint8_t PERID;                              /**< Peripheral ID register, offset: 0x0 */
22091        uint8_t RESERVED_0[3];
22092   __I  uint8_t IDCOMP;                             /**< Peripheral ID Complement register, offset: 0x4 */
22093        uint8_t RESERVED_1[3];
22094   __I  uint8_t REV;                                /**< Peripheral Revision register, offset: 0x8 */
22095        uint8_t RESERVED_2[3];
22096   __I  uint8_t ADDINFO;                            /**< Peripheral Additional Info register, offset: 0xC */
22097        uint8_t RESERVED_3[15];
22098   __IO uint8_t OTGCTL;                             /**< OTG Control register, offset: 0x1C */
22099        uint8_t RESERVED_4[99];
22100   __IO uint8_t ISTAT;                              /**< Interrupt Status register, offset: 0x80 */
22101        uint8_t RESERVED_5[3];
22102   __IO uint8_t INTEN;                              /**< Interrupt Enable register, offset: 0x84 */
22103        uint8_t RESERVED_6[3];
22104   __IO uint8_t ERRSTAT;                            /**< Error Interrupt Status register, offset: 0x88 */
22105        uint8_t RESERVED_7[3];
22106   __IO uint8_t ERREN;                              /**< Error Interrupt Enable register, offset: 0x8C */
22107        uint8_t RESERVED_8[3];
22108   __I  uint8_t STAT;                               /**< Status register, offset: 0x90 */
22109        uint8_t RESERVED_9[3];
22110   __IO uint8_t CTL;                                /**< Control register, offset: 0x94 */
22111        uint8_t RESERVED_10[3];
22112   __IO uint8_t ADDR;                               /**< Address register, offset: 0x98 */
22113        uint8_t RESERVED_11[3];
22114   __IO uint8_t BDTPAGE1;                           /**< BDT Page register 1, offset: 0x9C */
22115        uint8_t RESERVED_12[3];
22116   __IO uint8_t FRMNUML;                            /**< Frame Number register Low, offset: 0xA0 */
22117        uint8_t RESERVED_13[3];
22118   __IO uint8_t FRMNUMH;                            /**< Frame Number register High, offset: 0xA4 */
22119        uint8_t RESERVED_14[11];
22120   __IO uint8_t BDTPAGE2;                           /**< BDT Page Register 2, offset: 0xB0 */
22121        uint8_t RESERVED_15[3];
22122   __IO uint8_t BDTPAGE3;                           /**< BDT Page Register 3, offset: 0xB4 */
22123        uint8_t RESERVED_16[11];
22124   struct {                                         /* offset: 0xC0, array step: 0x4 */
22125     __IO uint8_t ENDPT;                              /**< Endpoint Control register, array offset: 0xC0, array step: 0x4 */
22126          uint8_t RESERVED_0[3];
22127   } ENDPOINT[16];
22128   __IO uint8_t USBCTRL;                            /**< USB Control register, offset: 0x100 */
22129        uint8_t RESERVED_17[3];
22130   __I  uint8_t OBSERVE;                            /**< USB OTG Observe register, offset: 0x104 */
22131        uint8_t RESERVED_18[3];
22132   __IO uint8_t CONTROL;                            /**< USB OTG Control register, offset: 0x108 */
22133        uint8_t RESERVED_19[3];
22134   __IO uint8_t USBTRC0;                            /**< USB Transceiver Control register 0, offset: 0x10C */
22135        uint8_t RESERVED_20[23];
22136   __IO uint8_t KEEP_ALIVE_CTRL;                    /**< Keep Alive mode control, offset: 0x124 */
22137        uint8_t RESERVED_21[3];
22138   __IO uint8_t KEEP_ALIVE_WKCTRL;                  /**< Keep Alive mode wakeup control, offset: 0x128 */
22139        uint8_t RESERVED_22[3];
22140   __IO uint8_t MISCCTRL;                           /**< Miscellaneous Control register, offset: 0x12C */
22141        uint8_t RESERVED_23[3];
22142   __IO uint8_t STALL_IL_DIS;                       /**< Peripheral mode stall disable for endpoints 7 to 0 in IN direction, offset: 0x130 */
22143        uint8_t RESERVED_24[3];
22144   __IO uint8_t STALL_IH_DIS;                       /**< Peripheral mode stall disable for endpoints 15 to 8 in IN direction, offset: 0x134 */
22145        uint8_t RESERVED_25[3];
22146   __IO uint8_t STALL_OL_DIS;                       /**< Peripheral mode stall disable for endpoints 7 to 0 in OUT direction, offset: 0x138 */
22147        uint8_t RESERVED_26[3];
22148   __IO uint8_t STALL_OH_DIS;                       /**< Peripheral mode stall disable for endpoints 15 to 8 in OUT direction, offset: 0x13C */
22149        uint8_t RESERVED_27[3];
22150   __IO uint8_t CLK_RECOVER_CTRL;                   /**< USB Clock recovery control, offset: 0x140 */
22151        uint8_t RESERVED_28[3];
22152   __IO uint8_t CLK_RECOVER_IRC_EN;                 /**< IRC48MFIRC oscillator enable register, offset: 0x144 */
22153        uint8_t RESERVED_29[15];
22154   __IO uint8_t CLK_RECOVER_INT_EN;                 /**< Clock recovery combined interrupt enable, offset: 0x154 */
22155        uint8_t RESERVED_30[7];
22156   __IO uint8_t CLK_RECOVER_INT_STATUS;             /**< Clock recovery separated interrupt status, offset: 0x15C */
22157 } USB_Type;
22158 
22159 /* ----------------------------------------------------------------------------
22160    -- USB Register Masks
22161    ---------------------------------------------------------------------------- */
22162 
22163 /*!
22164  * @addtogroup USB_Register_Masks USB Register Masks
22165  * @{
22166  */
22167 
22168 /*! @name PERID - Peripheral ID register */
22169 /*! @{ */
22170 
22171 #define USB_PERID_ID_MASK                        (0x3FU)
22172 #define USB_PERID_ID_SHIFT                       (0U)
22173 /*! ID - Peripheral Identification */
22174 #define USB_PERID_ID(x)                          (((uint8_t)(((uint8_t)(x)) << USB_PERID_ID_SHIFT)) & USB_PERID_ID_MASK)
22175 /*! @} */
22176 
22177 /*! @name IDCOMP - Peripheral ID Complement register */
22178 /*! @{ */
22179 
22180 #define USB_IDCOMP_NID_MASK                      (0x3FU)
22181 #define USB_IDCOMP_NID_SHIFT                     (0U)
22182 /*! NID - NID */
22183 #define USB_IDCOMP_NID(x)                        (((uint8_t)(((uint8_t)(x)) << USB_IDCOMP_NID_SHIFT)) & USB_IDCOMP_NID_MASK)
22184 /*! @} */
22185 
22186 /*! @name REV - Peripheral Revision register */
22187 /*! @{ */
22188 
22189 #define USB_REV_REV_MASK                         (0xFFU)
22190 #define USB_REV_REV_SHIFT                        (0U)
22191 /*! REV - Revision */
22192 #define USB_REV_REV(x)                           (((uint8_t)(((uint8_t)(x)) << USB_REV_REV_SHIFT)) & USB_REV_REV_MASK)
22193 /*! @} */
22194 
22195 /*! @name ADDINFO - Peripheral Additional Info register */
22196 /*! @{ */
22197 
22198 #define USB_ADDINFO_IEHOST_MASK                  (0x1U)
22199 #define USB_ADDINFO_IEHOST_SHIFT                 (0U)
22200 /*! IEHOST - Host mode enable bit */
22201 #define USB_ADDINFO_IEHOST(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ADDINFO_IEHOST_SHIFT)) & USB_ADDINFO_IEHOST_MASK)
22202 /*! @} */
22203 
22204 /*! @name OTGCTL - OTG Control register */
22205 /*! @{ */
22206 
22207 #define USB_OTGCTL_DPHIGH_MASK                   (0x80U)
22208 #define USB_OTGCTL_DPHIGH_SHIFT                  (7U)
22209 /*! DPHIGH - D+ Data Line pullup resistor enable
22210  *  0b0..D+ pullup resistor is not enabled
22211  *  0b1..D+ pullup resistor is enabled
22212  */
22213 #define USB_OTGCTL_DPHIGH(x)                     (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPHIGH_SHIFT)) & USB_OTGCTL_DPHIGH_MASK)
22214 /*! @} */
22215 
22216 /*! @name ISTAT - Interrupt Status register */
22217 /*! @{ */
22218 
22219 #define USB_ISTAT_USBRST_MASK                    (0x1U)
22220 #define USB_ISTAT_USBRST_SHIFT                   (0U)
22221 /*! USBRST - USB Reset */
22222 #define USB_ISTAT_USBRST(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_USBRST_SHIFT)) & USB_ISTAT_USBRST_MASK)
22223 
22224 #define USB_ISTAT_ERROR_MASK                     (0x2U)
22225 #define USB_ISTAT_ERROR_SHIFT                    (1U)
22226 /*! ERROR - Error */
22227 #define USB_ISTAT_ERROR(x)                       (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ERROR_SHIFT)) & USB_ISTAT_ERROR_MASK)
22228 
22229 #define USB_ISTAT_SOFTOK_MASK                    (0x4U)
22230 #define USB_ISTAT_SOFTOK_SHIFT                   (2U)
22231 /*! SOFTOK - Start Of Frame (SOF) token */
22232 #define USB_ISTAT_SOFTOK(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SOFTOK_SHIFT)) & USB_ISTAT_SOFTOK_MASK)
22233 
22234 #define USB_ISTAT_TOKDNE_MASK                    (0x8U)
22235 #define USB_ISTAT_TOKDNE_SHIFT                   (3U)
22236 /*! TOKDNE - Current token processing */
22237 #define USB_ISTAT_TOKDNE(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_TOKDNE_SHIFT)) & USB_ISTAT_TOKDNE_MASK)
22238 
22239 #define USB_ISTAT_SLEEP_MASK                     (0x10U)
22240 #define USB_ISTAT_SLEEP_SHIFT                    (4U)
22241 /*! SLEEP - Sleep */
22242 #define USB_ISTAT_SLEEP(x)                       (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SLEEP_SHIFT)) & USB_ISTAT_SLEEP_MASK)
22243 
22244 #define USB_ISTAT_RESUME_MASK                    (0x20U)
22245 #define USB_ISTAT_RESUME_SHIFT                   (5U)
22246 /*! RESUME - RESUME */
22247 #define USB_ISTAT_RESUME(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_RESUME_SHIFT)) & USB_ISTAT_RESUME_MASK)
22248 
22249 #define USB_ISTAT_STALL_MASK                     (0x80U)
22250 #define USB_ISTAT_STALL_SHIFT                    (7U)
22251 /*! STALL - Stall Interrupt */
22252 #define USB_ISTAT_STALL(x)                       (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_STALL_SHIFT)) & USB_ISTAT_STALL_MASK)
22253 /*! @} */
22254 
22255 /*! @name INTEN - Interrupt Enable register */
22256 /*! @{ */
22257 
22258 #define USB_INTEN_USBRSTEN_MASK                  (0x1U)
22259 #define USB_INTEN_USBRSTEN_SHIFT                 (0U)
22260 /*! USBRSTEN - USBRST Interrupt Enable
22261  *  0b0..Disables the USBRST interrupt.
22262  *  0b1..Enables the USBRST interrupt.
22263  */
22264 #define USB_INTEN_USBRSTEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_INTEN_USBRSTEN_SHIFT)) & USB_INTEN_USBRSTEN_MASK)
22265 
22266 #define USB_INTEN_ERROREN_MASK                   (0x2U)
22267 #define USB_INTEN_ERROREN_SHIFT                  (1U)
22268 /*! ERROREN - ERROR Interrupt Enable
22269  *  0b0..Disables the ERROR interrupt.
22270  *  0b1..Enables the ERROR interrupt.
22271  */
22272 #define USB_INTEN_ERROREN(x)                     (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ERROREN_SHIFT)) & USB_INTEN_ERROREN_MASK)
22273 
22274 #define USB_INTEN_SOFTOKEN_MASK                  (0x4U)
22275 #define USB_INTEN_SOFTOKEN_SHIFT                 (2U)
22276 /*! SOFTOKEN - SOFTOK Interrupt Enable
22277  *  0b0..Disbles the SOFTOK interrupt.
22278  *  0b1..Enables the SOFTOK interrupt.
22279  */
22280 #define USB_INTEN_SOFTOKEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SOFTOKEN_SHIFT)) & USB_INTEN_SOFTOKEN_MASK)
22281 
22282 #define USB_INTEN_TOKDNEEN_MASK                  (0x8U)
22283 #define USB_INTEN_TOKDNEEN_SHIFT                 (3U)
22284 /*! TOKDNEEN - TOKDNE Interrupt Enable
22285  *  0b0..Disables the TOKDNE interrupt.
22286  *  0b1..Enables the TOKDNE interrupt.
22287  */
22288 #define USB_INTEN_TOKDNEEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_INTEN_TOKDNEEN_SHIFT)) & USB_INTEN_TOKDNEEN_MASK)
22289 
22290 #define USB_INTEN_SLEEPEN_MASK                   (0x10U)
22291 #define USB_INTEN_SLEEPEN_SHIFT                  (4U)
22292 /*! SLEEPEN - SLEEP Interrupt Enable
22293  *  0b0..Disables the SLEEP interrupt.
22294  *  0b1..Enables the SLEEP interrupt.
22295  */
22296 #define USB_INTEN_SLEEPEN(x)                     (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SLEEPEN_SHIFT)) & USB_INTEN_SLEEPEN_MASK)
22297 
22298 #define USB_INTEN_RESUMEEN_MASK                  (0x20U)
22299 #define USB_INTEN_RESUMEEN_SHIFT                 (5U)
22300 /*! RESUMEEN - RESUME Interrupt Enable
22301  *  0b0..Disables the RESUME interrupt.
22302  *  0b1..Enables the RESUME interrupt.
22303  */
22304 #define USB_INTEN_RESUMEEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_INTEN_RESUMEEN_SHIFT)) & USB_INTEN_RESUMEEN_MASK)
22305 
22306 #define USB_INTEN_STALLEN_MASK                   (0x80U)
22307 #define USB_INTEN_STALLEN_SHIFT                  (7U)
22308 /*! STALLEN - STALL Interrupt Enable
22309  *  0b0..Diasbles the STALL interrupt.
22310  *  0b1..Enables the STALL interrupt.
22311  */
22312 #define USB_INTEN_STALLEN(x)                     (((uint8_t)(((uint8_t)(x)) << USB_INTEN_STALLEN_SHIFT)) & USB_INTEN_STALLEN_MASK)
22313 /*! @} */
22314 
22315 /*! @name ERRSTAT - Error Interrupt Status register */
22316 /*! @{ */
22317 
22318 #define USB_ERRSTAT_PIDERR_MASK                  (0x1U)
22319 #define USB_ERRSTAT_PIDERR_SHIFT                 (0U)
22320 /*! PIDERR - PID error */
22321 #define USB_ERRSTAT_PIDERR(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_PIDERR_SHIFT)) & USB_ERRSTAT_PIDERR_MASK)
22322 
22323 #define USB_ERRSTAT_CRC5EOF_MASK                 (0x2U)
22324 #define USB_ERRSTAT_CRC5EOF_SHIFT                (1U)
22325 /*! CRC5EOF - CRC5 error or end of frame error */
22326 #define USB_ERRSTAT_CRC5EOF(x)                   (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC5EOF_SHIFT)) & USB_ERRSTAT_CRC5EOF_MASK)
22327 
22328 #define USB_ERRSTAT_CRC16_MASK                   (0x4U)
22329 #define USB_ERRSTAT_CRC16_SHIFT                  (2U)
22330 /*! CRC16 - CRC16 error */
22331 #define USB_ERRSTAT_CRC16(x)                     (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC16_SHIFT)) & USB_ERRSTAT_CRC16_MASK)
22332 
22333 #define USB_ERRSTAT_DFN8_MASK                    (0x8U)
22334 #define USB_ERRSTAT_DFN8_SHIFT                   (3U)
22335 /*! DFN8 - Data field not 8 bits (in length) */
22336 #define USB_ERRSTAT_DFN8(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DFN8_SHIFT)) & USB_ERRSTAT_DFN8_MASK)
22337 
22338 #define USB_ERRSTAT_BTOERR_MASK                  (0x10U)
22339 #define USB_ERRSTAT_BTOERR_SHIFT                 (4U)
22340 /*! BTOERR - Bus turnaround timeout error */
22341 #define USB_ERRSTAT_BTOERR(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTOERR_SHIFT)) & USB_ERRSTAT_BTOERR_MASK)
22342 
22343 #define USB_ERRSTAT_DMAERR_MASK                  (0x20U)
22344 #define USB_ERRSTAT_DMAERR_SHIFT                 (5U)
22345 /*! DMAERR - DMAERR */
22346 #define USB_ERRSTAT_DMAERR(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DMAERR_SHIFT)) & USB_ERRSTAT_DMAERR_MASK)
22347 
22348 #define USB_ERRSTAT_OWNERR_MASK                  (0x40U)
22349 #define USB_ERRSTAT_OWNERR_SHIFT                 (6U)
22350 /*! OWNERR - OWNERR */
22351 #define USB_ERRSTAT_OWNERR(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_OWNERR_SHIFT)) & USB_ERRSTAT_OWNERR_MASK)
22352 
22353 #define USB_ERRSTAT_BTSERR_MASK                  (0x80U)
22354 #define USB_ERRSTAT_BTSERR_SHIFT                 (7U)
22355 /*! BTSERR - Bit stuff error */
22356 #define USB_ERRSTAT_BTSERR(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTSERR_SHIFT)) & USB_ERRSTAT_BTSERR_MASK)
22357 /*! @} */
22358 
22359 /*! @name ERREN - Error Interrupt Enable register */
22360 /*! @{ */
22361 
22362 #define USB_ERREN_PIDERREN_MASK                  (0x1U)
22363 #define USB_ERREN_PIDERREN_SHIFT                 (0U)
22364 /*! PIDERREN - PIDERR Interrupt Enable
22365  *  0b0..Disables the PIDERR interrupt.
22366  *  0b1..Enters the PIDERR interrupt.
22367  */
22368 #define USB_ERREN_PIDERREN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERREN_PIDERREN_SHIFT)) & USB_ERREN_PIDERREN_MASK)
22369 
22370 #define USB_ERREN_CRC5EOFEN_MASK                 (0x2U)
22371 #define USB_ERREN_CRC5EOFEN_SHIFT                (1U)
22372 /*! CRC5EOFEN - CRC5/EOF Interrupt Enable
22373  *  0b0..Disables the CRC5/EOF interrupt.
22374  *  0b1..Enables the CRC5/EOF interrupt.
22375  */
22376 #define USB_ERREN_CRC5EOFEN(x)                   (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC5EOFEN_SHIFT)) & USB_ERREN_CRC5EOFEN_MASK)
22377 
22378 #define USB_ERREN_CRC16EN_MASK                   (0x4U)
22379 #define USB_ERREN_CRC16EN_SHIFT                  (2U)
22380 /*! CRC16EN - CRC16 Interrupt Enable
22381  *  0b0..Disables the CRC16 interrupt.
22382  *  0b1..Enables the CRC16 interrupt.
22383  */
22384 #define USB_ERREN_CRC16EN(x)                     (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC16EN_SHIFT)) & USB_ERREN_CRC16EN_MASK)
22385 
22386 #define USB_ERREN_DFN8EN_MASK                    (0x8U)
22387 #define USB_ERREN_DFN8EN_SHIFT                   (3U)
22388 /*! DFN8EN - DFN8 Interrupt Enable
22389  *  0b0..Disables the DFN8 interrupt.
22390  *  0b1..Enables the DFN8 interrupt.
22391  */
22392 #define USB_ERREN_DFN8EN(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DFN8EN_SHIFT)) & USB_ERREN_DFN8EN_MASK)
22393 
22394 #define USB_ERREN_BTOERREN_MASK                  (0x10U)
22395 #define USB_ERREN_BTOERREN_SHIFT                 (4U)
22396 /*! BTOERREN - BTOERR Interrupt Enable
22397  *  0b0..Disables the BTOERR interrupt.
22398  *  0b1..Enables the BTOERR interrupt.
22399  */
22400 #define USB_ERREN_BTOERREN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTOERREN_SHIFT)) & USB_ERREN_BTOERREN_MASK)
22401 
22402 #define USB_ERREN_DMAERREN_MASK                  (0x20U)
22403 #define USB_ERREN_DMAERREN_SHIFT                 (5U)
22404 /*! DMAERREN - DMAERR Interrupt Enable
22405  *  0b0..Disables the DMAERR interrupt.
22406  *  0b1..Enables the DMAERR interrupt.
22407  */
22408 #define USB_ERREN_DMAERREN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DMAERREN_SHIFT)) & USB_ERREN_DMAERREN_MASK)
22409 
22410 #define USB_ERREN_OWNERREN_MASK                  (0x40U)
22411 #define USB_ERREN_OWNERREN_SHIFT                 (6U)
22412 /*! OWNERREN - OWNERR Interrupt Enable
22413  *  0b0..Disables the OWNERR interrupt.
22414  *  0b1..Enables the OWNERR interrupt.
22415  */
22416 #define USB_ERREN_OWNERREN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERREN_OWNERREN_SHIFT)) & USB_ERREN_OWNERREN_MASK)
22417 
22418 #define USB_ERREN_BTSERREN_MASK                  (0x80U)
22419 #define USB_ERREN_BTSERREN_SHIFT                 (7U)
22420 /*! BTSERREN - BTSERR Interrupt Enable
22421  *  0b0..Disables the BTSERR interrupt.
22422  *  0b1..Enables the BTSERR interrupt.
22423  */
22424 #define USB_ERREN_BTSERREN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTSERREN_SHIFT)) & USB_ERREN_BTSERREN_MASK)
22425 /*! @} */
22426 
22427 /*! @name STAT - Status register */
22428 /*! @{ */
22429 
22430 #define USB_STAT_ODD_MASK                        (0x4U)
22431 #define USB_STAT_ODD_SHIFT                       (2U)
22432 /*! ODD - Odd bank */
22433 #define USB_STAT_ODD(x)                          (((uint8_t)(((uint8_t)(x)) << USB_STAT_ODD_SHIFT)) & USB_STAT_ODD_MASK)
22434 
22435 #define USB_STAT_TX_MASK                         (0x8U)
22436 #define USB_STAT_TX_SHIFT                        (3U)
22437 /*! TX - Transmit Indicator
22438  *  0b0..The most recent transaction was a receive operation.
22439  *  0b1..The most recent transaction was a transmit operation.
22440  */
22441 #define USB_STAT_TX(x)                           (((uint8_t)(((uint8_t)(x)) << USB_STAT_TX_SHIFT)) & USB_STAT_TX_MASK)
22442 
22443 #define USB_STAT_ENDP_MASK                       (0xF0U)
22444 #define USB_STAT_ENDP_SHIFT                      (4U)
22445 /*! ENDP - ENDP */
22446 #define USB_STAT_ENDP(x)                         (((uint8_t)(((uint8_t)(x)) << USB_STAT_ENDP_SHIFT)) & USB_STAT_ENDP_MASK)
22447 /*! @} */
22448 
22449 /*! @name CTL - Control register */
22450 /*! @{ */
22451 
22452 #define USB_CTL_USBENSOFEN_MASK                  (0x1U)
22453 #define USB_CTL_USBENSOFEN_SHIFT                 (0U)
22454 /*! USBENSOFEN - USB Enable
22455  *  0b0..Disables the USB Module.
22456  *  0b1..Enables the USB Module.
22457  */
22458 #define USB_CTL_USBENSOFEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_CTL_USBENSOFEN_SHIFT)) & USB_CTL_USBENSOFEN_MASK)
22459 
22460 #define USB_CTL_ODDRST_MASK                      (0x2U)
22461 #define USB_CTL_ODDRST_SHIFT                     (1U)
22462 /*! ODDRST - ODDRST */
22463 #define USB_CTL_ODDRST(x)                        (((uint8_t)(((uint8_t)(x)) << USB_CTL_ODDRST_SHIFT)) & USB_CTL_ODDRST_MASK)
22464 
22465 #define USB_CTL_RESUME_MASK                      (0x4U)
22466 #define USB_CTL_RESUME_SHIFT                     (2U)
22467 /*! RESUME - Resume */
22468 #define USB_CTL_RESUME(x)                        (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESUME_SHIFT)) & USB_CTL_RESUME_MASK)
22469 
22470 #define USB_CTL_HOSTMODEEN_MASK                  (0x8U)
22471 #define USB_CTL_HOSTMODEEN_SHIFT                 (3U)
22472 /*! HOSTMODEEN - Host mode enable
22473  *  0b0..USB Module operates in Device mode.
22474  *  0b1..USB Module operates in Host mode. In Host mode, the USB module performs USB transactions under the programmed control of the host processor.
22475  */
22476 #define USB_CTL_HOSTMODEEN(x)                    (((uint8_t)(((uint8_t)(x)) << USB_CTL_HOSTMODEEN_SHIFT)) & USB_CTL_HOSTMODEEN_MASK)
22477 
22478 #define USB_CTL_TXSUSPENDTOKENBUSY_MASK          (0x20U)
22479 #define USB_CTL_TXSUSPENDTOKENBUSY_SHIFT         (5U)
22480 /*! TXSUSPENDTOKENBUSY - TXSUSPEND or TOKENBUSY */
22481 #define USB_CTL_TXSUSPENDTOKENBUSY(x)            (((uint8_t)(((uint8_t)(x)) << USB_CTL_TXSUSPENDTOKENBUSY_SHIFT)) & USB_CTL_TXSUSPENDTOKENBUSY_MASK)
22482 
22483 #define USB_CTL_SE0_MASK                         (0x40U)
22484 #define USB_CTL_SE0_SHIFT                        (6U)
22485 /*! SE0 - Live USB Single-Ended Zero signal */
22486 #define USB_CTL_SE0(x)                           (((uint8_t)(((uint8_t)(x)) << USB_CTL_SE0_SHIFT)) & USB_CTL_SE0_MASK)
22487 
22488 #define USB_CTL_JSTATE_MASK                      (0x80U)
22489 #define USB_CTL_JSTATE_SHIFT                     (7U)
22490 /*! JSTATE - Live USB differential receiver JSTATE signal */
22491 #define USB_CTL_JSTATE(x)                        (((uint8_t)(((uint8_t)(x)) << USB_CTL_JSTATE_SHIFT)) & USB_CTL_JSTATE_MASK)
22492 /*! @} */
22493 
22494 /*! @name ADDR - Address register */
22495 /*! @{ */
22496 
22497 #define USB_ADDR_ADDR_MASK                       (0x7FU)
22498 #define USB_ADDR_ADDR_SHIFT                      (0U)
22499 /*! ADDR - USB Address */
22500 #define USB_ADDR_ADDR(x)                         (((uint8_t)(((uint8_t)(x)) << USB_ADDR_ADDR_SHIFT)) & USB_ADDR_ADDR_MASK)
22501 /*! @} */
22502 
22503 /*! @name BDTPAGE1 - BDT Page register 1 */
22504 /*! @{ */
22505 
22506 #define USB_BDTPAGE1_BDTBA_MASK                  (0xFEU)
22507 #define USB_BDTPAGE1_BDTBA_SHIFT                 (1U)
22508 /*! BDTBA - BDTBA */
22509 #define USB_BDTPAGE1_BDTBA(x)                    (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE1_BDTBA_SHIFT)) & USB_BDTPAGE1_BDTBA_MASK)
22510 /*! @} */
22511 
22512 /*! @name FRMNUML - Frame Number register Low */
22513 /*! @{ */
22514 
22515 #define USB_FRMNUML_FRM_MASK                     (0xFFU)
22516 #define USB_FRMNUML_FRM_SHIFT                    (0U)
22517 /*! FRM - FRM */
22518 #define USB_FRMNUML_FRM(x)                       (((uint8_t)(((uint8_t)(x)) << USB_FRMNUML_FRM_SHIFT)) & USB_FRMNUML_FRM_MASK)
22519 /*! @} */
22520 
22521 /*! @name FRMNUMH - Frame Number register High */
22522 /*! @{ */
22523 
22524 #define USB_FRMNUMH_FRM_MASK                     (0x7U)
22525 #define USB_FRMNUMH_FRM_SHIFT                    (0U)
22526 /*! FRM - FRM */
22527 #define USB_FRMNUMH_FRM(x)                       (((uint8_t)(((uint8_t)(x)) << USB_FRMNUMH_FRM_SHIFT)) & USB_FRMNUMH_FRM_MASK)
22528 /*! @} */
22529 
22530 /*! @name BDTPAGE2 - BDT Page Register 2 */
22531 /*! @{ */
22532 
22533 #define USB_BDTPAGE2_BDTBA_MASK                  (0xFFU)
22534 #define USB_BDTPAGE2_BDTBA_SHIFT                 (0U)
22535 /*! BDTBA - BDTBA */
22536 #define USB_BDTPAGE2_BDTBA(x)                    (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE2_BDTBA_SHIFT)) & USB_BDTPAGE2_BDTBA_MASK)
22537 /*! @} */
22538 
22539 /*! @name BDTPAGE3 - BDT Page Register 3 */
22540 /*! @{ */
22541 
22542 #define USB_BDTPAGE3_BDTBA_MASK                  (0xFFU)
22543 #define USB_BDTPAGE3_BDTBA_SHIFT                 (0U)
22544 /*! BDTBA - BDTBA */
22545 #define USB_BDTPAGE3_BDTBA(x)                    (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE3_BDTBA_SHIFT)) & USB_BDTPAGE3_BDTBA_MASK)
22546 /*! @} */
22547 
22548 /*! @name ENDPT - Endpoint Control register */
22549 /*! @{ */
22550 
22551 #define USB_ENDPT_EPHSHK_MASK                    (0x1U)
22552 #define USB_ENDPT_EPHSHK_SHIFT                   (0U)
22553 /*! EPHSHK - Endpoint handshaking enable */
22554 #define USB_ENDPT_EPHSHK(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPHSHK_SHIFT)) & USB_ENDPT_EPHSHK_MASK)
22555 
22556 #define USB_ENDPT_EPSTALL_MASK                   (0x2U)
22557 #define USB_ENDPT_EPSTALL_SHIFT                  (1U)
22558 /*! EPSTALL - Endpoint stalled */
22559 #define USB_ENDPT_EPSTALL(x)                     (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPSTALL_SHIFT)) & USB_ENDPT_EPSTALL_MASK)
22560 
22561 #define USB_ENDPT_EPTXEN_MASK                    (0x4U)
22562 #define USB_ENDPT_EPTXEN_SHIFT                   (2U)
22563 /*! EPTXEN - Endpoint for TX transfers enable */
22564 #define USB_ENDPT_EPTXEN(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPTXEN_SHIFT)) & USB_ENDPT_EPTXEN_MASK)
22565 
22566 #define USB_ENDPT_EPRXEN_MASK                    (0x8U)
22567 #define USB_ENDPT_EPRXEN_SHIFT                   (3U)
22568 /*! EPRXEN - Endpoint for RX transfers enable */
22569 #define USB_ENDPT_EPRXEN(x)                      (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPRXEN_SHIFT)) & USB_ENDPT_EPRXEN_MASK)
22570 
22571 #define USB_ENDPT_EPCTLDIS_MASK                  (0x10U)
22572 #define USB_ENDPT_EPCTLDIS_SHIFT                 (4U)
22573 /*! EPCTLDIS - Control (SETUP) transfer disable */
22574 #define USB_ENDPT_EPCTLDIS(x)                    (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPCTLDIS_SHIFT)) & USB_ENDPT_EPCTLDIS_MASK)
22575 /*! @} */
22576 
22577 /* The count of USB_ENDPT */
22578 #define USB_ENDPT_COUNT                          (16U)
22579 
22580 /*! @name USBCTRL - USB Control register */
22581 /*! @{ */
22582 
22583 #define USB_USBCTRL_UARTSEL_MASK                 (0x10U)
22584 #define USB_USBCTRL_UARTSEL_SHIFT                (4U)
22585 /*! UARTSEL - UART Select
22586  *  0b0..USB signals are not used as UART signals.
22587  *  0b1..USB signals are used as UART signals.
22588  */
22589 #define USB_USBCTRL_UARTSEL(x)                   (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTSEL_SHIFT)) & USB_USBCTRL_UARTSEL_MASK)
22590 
22591 #define USB_USBCTRL_UARTCHLS_MASK                (0x20U)
22592 #define USB_USBCTRL_UARTCHLS_SHIFT               (5U)
22593 /*! UARTCHLS - UART Signal Channel Select
22594  *  0b0..USB DP/DM signals are used as UART TX/RX.
22595  *  0b1..USB DP/DM signals are used as UART RX/TX.
22596  */
22597 #define USB_USBCTRL_UARTCHLS(x)                  (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTCHLS_SHIFT)) & USB_USBCTRL_UARTCHLS_MASK)
22598 
22599 #define USB_USBCTRL_PDE_MASK                     (0x40U)
22600 #define USB_USBCTRL_PDE_SHIFT                    (6U)
22601 /*! PDE - Pulldown enable
22602  *  0b0..Weak pulldowns are disabled on D+ and D-.
22603  *  0b1..Weak pulldowns are enabled on D+ and D-.
22604  */
22605 #define USB_USBCTRL_PDE(x)                       (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_PDE_SHIFT)) & USB_USBCTRL_PDE_MASK)
22606 
22607 #define USB_USBCTRL_SUSP_MASK                    (0x80U)
22608 #define USB_USBCTRL_SUSP_SHIFT                   (7U)
22609 /*! SUSP - Suspend
22610  *  0b0..USB transceiver is not in the Suspend state.
22611  *  0b1..USB transceiver is in the Suspend state.
22612  */
22613 #define USB_USBCTRL_SUSP(x)                      (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_SUSP_SHIFT)) & USB_USBCTRL_SUSP_MASK)
22614 /*! @} */
22615 
22616 /*! @name OBSERVE - USB OTG Observe register */
22617 /*! @{ */
22618 
22619 #define USB_OBSERVE_DMPD_MASK                    (0x10U)
22620 #define USB_OBSERVE_DMPD_SHIFT                   (4U)
22621 /*! DMPD - DMPD
22622  *  0b0..D- pulldown is disabled.
22623  *  0b1..D- pulldown is enabled.
22624  */
22625 #define USB_OBSERVE_DMPD(x)                      (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DMPD_SHIFT)) & USB_OBSERVE_DMPD_MASK)
22626 
22627 #define USB_OBSERVE_DPPD_MASK                    (0x40U)
22628 #define USB_OBSERVE_DPPD_SHIFT                   (6U)
22629 /*! DPPD - DPPD
22630  *  0b0..D+ pulldown is disabled.
22631  *  0b1..D+ pulldown is enabled.
22632  */
22633 #define USB_OBSERVE_DPPD(x)                      (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPD_SHIFT)) & USB_OBSERVE_DPPD_MASK)
22634 
22635 #define USB_OBSERVE_DPPU_MASK                    (0x80U)
22636 #define USB_OBSERVE_DPPU_SHIFT                   (7U)
22637 /*! DPPU - DPPU
22638  *  0b0..D+ pullup disabled.
22639  *  0b1..D+ pullup enabled.
22640  */
22641 #define USB_OBSERVE_DPPU(x)                      (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPU_SHIFT)) & USB_OBSERVE_DPPU_MASK)
22642 /*! @} */
22643 
22644 /*! @name CONTROL - USB OTG Control register */
22645 /*! @{ */
22646 
22647 #define USB_CONTROL_DPPULLUPNONOTG_MASK          (0x10U)
22648 #define USB_CONTROL_DPPULLUPNONOTG_SHIFT         (4U)
22649 /*! DPPULLUPNONOTG - DPPULLUPNONOTG
22650  *  0b0..DP Pullup in non-OTG Device mode is not enabled.
22651  *  0b1..DP Pullup in non-OTG Device mode is enabled.
22652  */
22653 #define USB_CONTROL_DPPULLUPNONOTG(x)            (((uint8_t)(((uint8_t)(x)) << USB_CONTROL_DPPULLUPNONOTG_SHIFT)) & USB_CONTROL_DPPULLUPNONOTG_MASK)
22654 /*! @} */
22655 
22656 /*! @name USBTRC0 - USB Transceiver Control register 0 */
22657 /*! @{ */
22658 
22659 #define USB_USBTRC0_USB_RESUME_INT_MASK          (0x1U)
22660 #define USB_USBTRC0_USB_RESUME_INT_SHIFT         (0U)
22661 /*! USB_RESUME_INT - USB Asynchronous Interrupt
22662  *  0b0..No interrupt was generated.
22663  *  0b1..Interrupt was generated because of the USB asynchronous interrupt.
22664  */
22665 #define USB_USBTRC0_USB_RESUME_INT(x)            (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_RESUME_INT_SHIFT)) & USB_USBTRC0_USB_RESUME_INT_MASK)
22666 
22667 #define USB_USBTRC0_SYNC_DET_MASK                (0x2U)
22668 #define USB_USBTRC0_SYNC_DET_SHIFT               (1U)
22669 /*! SYNC_DET - Synchronous USB Interrupt Detect
22670  *  0b0..Synchronous interrupt has not been detected.
22671  *  0b1..Synchronous interrupt has been detected.
22672  */
22673 #define USB_USBTRC0_SYNC_DET(x)                  (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_SYNC_DET_SHIFT)) & USB_USBTRC0_SYNC_DET_MASK)
22674 
22675 #define USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK    (0x4U)
22676 #define USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT   (2U)
22677 /*! USB_CLK_RECOVERY_INT - Combined USB Clock Recovery interrupt status */
22678 #define USB_USBTRC0_USB_CLK_RECOVERY_INT(x)      (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT)) & USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK)
22679 
22680 #define USB_USBTRC0_VREDG_DET_MASK               (0x8U)
22681 #define USB_USBTRC0_VREDG_DET_SHIFT              (3U)
22682 /*! VREDG_DET - VREGIN Rising Edge Interrupt Detect
22683  *  0b0..VREGIN rising edge interrupt has not been detected.
22684  *  0b1..VREGIN rising edge interrupt has been detected.
22685  */
22686 #define USB_USBTRC0_VREDG_DET(x)                 (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VREDG_DET_SHIFT)) & USB_USBTRC0_VREDG_DET_MASK)
22687 
22688 #define USB_USBTRC0_VFEDG_DET_MASK               (0x10U)
22689 #define USB_USBTRC0_VFEDG_DET_SHIFT              (4U)
22690 /*! VFEDG_DET - VREGIN Falling Edge Interrupt Detect
22691  *  0b0..VREGIN falling edge interrupt has not been detected.
22692  *  0b1..VREGIN falling edge interrupt has been detected.
22693  */
22694 #define USB_USBTRC0_VFEDG_DET(x)                 (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VFEDG_DET_SHIFT)) & USB_USBTRC0_VFEDG_DET_MASK)
22695 
22696 #define USB_USBTRC0_USBRESMEN_MASK               (0x20U)
22697 #define USB_USBTRC0_USBRESMEN_SHIFT              (5U)
22698 /*! USBRESMEN - Asynchronous Resume Interrupt Enable
22699  *  0b0..USB asynchronous wakeup from Suspend mode is disabled.
22700  *  0b1..USB asynchronous wakeup from Suspend mode is enabled.
22701  */
22702 #define USB_USBTRC0_USBRESMEN(x)                 (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESMEN_SHIFT)) & USB_USBTRC0_USBRESMEN_MASK)
22703 
22704 #define USB_USBTRC0_VREGIN_STS_MASK              (0x40U)
22705 #define USB_USBTRC0_VREGIN_STS_SHIFT             (6U)
22706 /*! VREGIN_STS - VREGIN_STS */
22707 #define USB_USBTRC0_VREGIN_STS(x)                (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VREGIN_STS_SHIFT)) & USB_USBTRC0_VREGIN_STS_MASK)
22708 
22709 #define USB_USBTRC0_USBRESET_MASK                (0x80U)
22710 #define USB_USBTRC0_USBRESET_SHIFT               (7U)
22711 /*! USBRESET - USB Reset
22712  *  0b0..Normal USB module operation.
22713  *  0b1..Returns the USB module to its reset state.
22714  */
22715 #define USB_USBTRC0_USBRESET(x)                  (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESET_SHIFT)) & USB_USBTRC0_USBRESET_MASK)
22716 /*! @} */
22717 
22718 /*! @name KEEP_ALIVE_CTRL - Keep Alive mode control */
22719 /*! @{ */
22720 
22721 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_MASK   (0x1U)
22722 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_SHIFT  (0U)
22723 /*! KEEP_ALIVE_EN - Keep Alive mode enable */
22724 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN(x)     (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_MASK)
22725 
22726 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_MASK   (0x2U)
22727 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_SHIFT  (1U)
22728 /*! OWN_OVERRD_EN - OWN bit override enable */
22729 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN(x)     (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_MASK)
22730 
22731 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_MASK (0x4U)
22732 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_SHIFT (2U)
22733 /*! STOP_ACK_DLY_EN - STOP_ACK_DLY_EN
22734  *  0b0..Enter KEEP_ALIVE mode until the USB core is idle and there is no USB AHB transfer.
22735  *  0b1..Enter KEEP_ALIVE mode immediately when there is no USB AHB transfer.
22736  */
22737 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN(x)   (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_MASK)
22738 
22739 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_MASK     (0x8U)
22740 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_SHIFT    (3U)
22741 /*! WAKE_REQ_EN - WAKE_REQ_EN
22742  *  0b0..USB bus wakeup request is disabled
22743  *  0b1..USB bus wakeup request is enabled
22744  */
22745 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN(x)       (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_MASK)
22746 
22747 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_MASK     (0x10U)
22748 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_SHIFT    (4U)
22749 /*! WAKE_INT_EN - Wakeup Interrupt Enable */
22750 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN(x)       (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_MASK)
22751 
22752 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_MASK  (0x40U)
22753 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_SHIFT (6U)
22754 /*! KEEP_ALIVE_STS - Keep Alive Status
22755  *  0b0..USB is not in Keep Alive mode.
22756  *  0b1..USB is in Keep Alive mode.
22757  */
22758 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS(x)    (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_SHIFT)) & USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_MASK)
22759 
22760 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_MASK    (0x80U)
22761 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_SHIFT   (7U)
22762 /*! WAKE_INT_STS - Wakeup Interrupt Status */
22763 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS(x)      (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_MASK)
22764 /*! @} */
22765 
22766 /*! @name KEEP_ALIVE_WKCTRL - Keep Alive mode wakeup control */
22767 /*! @{ */
22768 
22769 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_MASK  (0xFU)
22770 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_SHIFT (0U)
22771 /*! WAKE_ON_THIS - WAKE_ON_THIS
22772  *  0b0001..Wake up after receiving OUT/SETUP token packet.
22773  *  0b1101..Wake up after receiving SETUP token packet. All other values are reserved.
22774  */
22775 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS(x)    (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_SHIFT)) & USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_MASK)
22776 
22777 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_MASK    (0xF0U)
22778 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_SHIFT   (4U)
22779 /*! WAKE_ENDPT - WAKE_ENDPT */
22780 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT(x)      (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_SHIFT)) & USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_MASK)
22781 /*! @} */
22782 
22783 /*! @name MISCCTRL - Miscellaneous Control register */
22784 /*! @{ */
22785 
22786 #define USB_MISCCTRL_SOFDYNTHLD_MASK             (0x1U)
22787 #define USB_MISCCTRL_SOFDYNTHLD_SHIFT            (0U)
22788 /*! SOFDYNTHLD - Dynamic SOF Threshold Compare mode
22789  *  0b0..SOF_TOK interrupt is set when byte times SOF threshold is reached.
22790  *  0b1..SOF_TOK interrupt is set when 8 byte times SOF threshold is reached or overstepped.
22791  */
22792 #define USB_MISCCTRL_SOFDYNTHLD(x)               (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFDYNTHLD_SHIFT)) & USB_MISCCTRL_SOFDYNTHLD_MASK)
22793 
22794 #define USB_MISCCTRL_SOFBUSSET_MASK              (0x2U)
22795 #define USB_MISCCTRL_SOFBUSSET_SHIFT             (1U)
22796 /*! SOFBUSSET - SOF_TOK Interrupt Generation Mode Select
22797  *  0b0..SOF_TOK interrupt is set according to SOF threshold value.
22798  *  0b1..SOF_TOK interrupt is set when SOF counter reaches 0.
22799  */
22800 #define USB_MISCCTRL_SOFBUSSET(x)                (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFBUSSET_SHIFT)) & USB_MISCCTRL_SOFBUSSET_MASK)
22801 
22802 #define USB_MISCCTRL_OWNERRISODIS_MASK           (0x4U)
22803 #define USB_MISCCTRL_OWNERRISODIS_SHIFT          (2U)
22804 /*! OWNERRISODIS - OWN Error Detect for ISO IN / ISO OUT Disable
22805  *  0b0..OWN error detect for ISO IN / ISO OUT is not disabled.
22806  *  0b1..OWN error detect for ISO IN / ISO OUT is disabled.
22807  */
22808 #define USB_MISCCTRL_OWNERRISODIS(x)             (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_OWNERRISODIS_SHIFT)) & USB_MISCCTRL_OWNERRISODIS_MASK)
22809 
22810 #define USB_MISCCTRL_VREDG_EN_MASK               (0x8U)
22811 #define USB_MISCCTRL_VREDG_EN_SHIFT              (3U)
22812 /*! VREDG_EN - VREGIN Rising Edge Interrupt Enable
22813  *  0b0..VREGIN rising edge interrupt disabled.
22814  *  0b1..VREGIN rising edge interrupt enabled.
22815  */
22816 #define USB_MISCCTRL_VREDG_EN(x)                 (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VREDG_EN_SHIFT)) & USB_MISCCTRL_VREDG_EN_MASK)
22817 
22818 #define USB_MISCCTRL_VFEDG_EN_MASK               (0x10U)
22819 #define USB_MISCCTRL_VFEDG_EN_SHIFT              (4U)
22820 /*! VFEDG_EN - VREGIN Falling Edge Interrupt Enable
22821  *  0b0..VREGIN falling edge interrupt disabled.
22822  *  0b1..VREGIN falling edge interrupt enabled.
22823  */
22824 #define USB_MISCCTRL_VFEDG_EN(x)                 (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VFEDG_EN_SHIFT)) & USB_MISCCTRL_VFEDG_EN_MASK)
22825 
22826 #define USB_MISCCTRL_STL_ADJ_EN_MASK             (0x80U)
22827 #define USB_MISCCTRL_STL_ADJ_EN_SHIFT            (7U)
22828 /*! STL_ADJ_EN - USB Peripheral mode Stall Adjust Enable
22829  *  0b0..If USB_ENDPTn[END_STALL] = 1, both IN and OUT directions for the associated endpoint will be stalled
22830  *  0b1..If USB_ENDPTn[END_STALL] = 1, the USB_STALL_xx_DIS registers control which directions for the associated endpoint will be stalled.
22831  */
22832 #define USB_MISCCTRL_STL_ADJ_EN(x)               (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_STL_ADJ_EN_SHIFT)) & USB_MISCCTRL_STL_ADJ_EN_MASK)
22833 /*! @} */
22834 
22835 /*! @name STALL_IL_DIS - Peripheral mode stall disable for endpoints 7 to 0 in IN direction */
22836 /*! @{ */
22837 
22838 #define USB_STALL_IL_DIS_STALL_I_DIS0_MASK       (0x1U)
22839 #define USB_STALL_IL_DIS_STALL_I_DIS0_SHIFT      (0U)
22840 /*! STALL_I_DIS0 - STALL_I_DIS0
22841  *  0b0..Endpoint 0 IN direction stall is enabled.
22842  *  0b1..Endpoint 0 IN direction stall is disabled.
22843  */
22844 #define USB_STALL_IL_DIS_STALL_I_DIS0(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS0_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS0_MASK)
22845 
22846 #define USB_STALL_IL_DIS_STALL_I_DIS1_MASK       (0x2U)
22847 #define USB_STALL_IL_DIS_STALL_I_DIS1_SHIFT      (1U)
22848 /*! STALL_I_DIS1 - STALL_I_DIS1
22849  *  0b0..Endpoint 1 IN direction stall is enabled.
22850  *  0b1..Endpoint 1 IN direction stall is disabled.
22851  */
22852 #define USB_STALL_IL_DIS_STALL_I_DIS1(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS1_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS1_MASK)
22853 
22854 #define USB_STALL_IL_DIS_STALL_I_DIS2_MASK       (0x4U)
22855 #define USB_STALL_IL_DIS_STALL_I_DIS2_SHIFT      (2U)
22856 /*! STALL_I_DIS2 - STALL_I_DIS2
22857  *  0b0..Endpoint 2 IN direction stall is enabled.
22858  *  0b1..Endpoint 2 IN direction stall is disabled.
22859  */
22860 #define USB_STALL_IL_DIS_STALL_I_DIS2(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS2_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS2_MASK)
22861 
22862 #define USB_STALL_IL_DIS_STALL_I_DIS3_MASK       (0x8U)
22863 #define USB_STALL_IL_DIS_STALL_I_DIS3_SHIFT      (3U)
22864 /*! STALL_I_DIS3 - STALL_I_DIS3
22865  *  0b0..Endpoint 3 IN direction stall is enabled.
22866  *  0b1..Endpoint 3 IN direction stall is disabled.
22867  */
22868 #define USB_STALL_IL_DIS_STALL_I_DIS3(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS3_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS3_MASK)
22869 
22870 #define USB_STALL_IL_DIS_STALL_I_DIS4_MASK       (0x10U)
22871 #define USB_STALL_IL_DIS_STALL_I_DIS4_SHIFT      (4U)
22872 /*! STALL_I_DIS4 - STALL_I_DIS4
22873  *  0b0..Endpoint 4 IN direction stall is enabled.
22874  *  0b1..Endpoint 4 IN direction stall is disabled.
22875  */
22876 #define USB_STALL_IL_DIS_STALL_I_DIS4(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS4_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS4_MASK)
22877 
22878 #define USB_STALL_IL_DIS_STALL_I_DIS5_MASK       (0x20U)
22879 #define USB_STALL_IL_DIS_STALL_I_DIS5_SHIFT      (5U)
22880 /*! STALL_I_DIS5 - STALL_I_DIS5
22881  *  0b0..Endpoint 5 IN direction stall is enabled.
22882  *  0b1..Endpoint 5 IN direction stall is disabled.
22883  */
22884 #define USB_STALL_IL_DIS_STALL_I_DIS5(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS5_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS5_MASK)
22885 
22886 #define USB_STALL_IL_DIS_STALL_I_DIS6_MASK       (0x40U)
22887 #define USB_STALL_IL_DIS_STALL_I_DIS6_SHIFT      (6U)
22888 /*! STALL_I_DIS6 - STALL_I_DIS6
22889  *  0b0..Endpoint 6 IN direction stall is enabled.
22890  *  0b1..Endpoint 6 IN direction stall is disabled.
22891  */
22892 #define USB_STALL_IL_DIS_STALL_I_DIS6(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS6_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS6_MASK)
22893 
22894 #define USB_STALL_IL_DIS_STALL_I_DIS7_MASK       (0x80U)
22895 #define USB_STALL_IL_DIS_STALL_I_DIS7_SHIFT      (7U)
22896 /*! STALL_I_DIS7 - STALL_I_DIS7
22897  *  0b0..Endpoint 7 IN direction stall is enabled.
22898  *  0b1..Endpoint 7 IN direction stall is disabled.
22899  */
22900 #define USB_STALL_IL_DIS_STALL_I_DIS7(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS7_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS7_MASK)
22901 /*! @} */
22902 
22903 /*! @name STALL_IH_DIS - Peripheral mode stall disable for endpoints 15 to 8 in IN direction */
22904 /*! @{ */
22905 
22906 #define USB_STALL_IH_DIS_STALL_I_DIS8_MASK       (0x1U)
22907 #define USB_STALL_IH_DIS_STALL_I_DIS8_SHIFT      (0U)
22908 /*! STALL_I_DIS8 - STALL_I_DIS8
22909  *  0b0..Endpoint 8 IN direction stall is enabled.
22910  *  0b1..Endpoint 8 IN direction stall is disabled.
22911  */
22912 #define USB_STALL_IH_DIS_STALL_I_DIS8(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS8_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS8_MASK)
22913 
22914 #define USB_STALL_IH_DIS_STALL_I_DIS9_MASK       (0x2U)
22915 #define USB_STALL_IH_DIS_STALL_I_DIS9_SHIFT      (1U)
22916 /*! STALL_I_DIS9 - STALL_I_DIS9
22917  *  0b0..Endpoint 9 IN direction stall is enabled.
22918  *  0b1..Endpoint 9 IN direction stall is disabled.
22919  */
22920 #define USB_STALL_IH_DIS_STALL_I_DIS9(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS9_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS9_MASK)
22921 
22922 #define USB_STALL_IH_DIS_STALL_I_DIS10_MASK      (0x4U)
22923 #define USB_STALL_IH_DIS_STALL_I_DIS10_SHIFT     (2U)
22924 /*! STALL_I_DIS10 - STALL_I_DIS10
22925  *  0b0..Endpoint 10 IN direction stall is enabled.
22926  *  0b1..Endpoint 10 IN direction stall is disabled.
22927  */
22928 #define USB_STALL_IH_DIS_STALL_I_DIS10(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS10_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS10_MASK)
22929 
22930 #define USB_STALL_IH_DIS_STALL_I_DIS11_MASK      (0x8U)
22931 #define USB_STALL_IH_DIS_STALL_I_DIS11_SHIFT     (3U)
22932 /*! STALL_I_DIS11 - STALL_I_DIS11
22933  *  0b0..Endpoint 11 IN direction stall is enabled.
22934  *  0b1..Endpoint 11 IN direction stall is disabled.
22935  */
22936 #define USB_STALL_IH_DIS_STALL_I_DIS11(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS11_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS11_MASK)
22937 
22938 #define USB_STALL_IH_DIS_STALL_I_DIS12_MASK      (0x10U)
22939 #define USB_STALL_IH_DIS_STALL_I_DIS12_SHIFT     (4U)
22940 /*! STALL_I_DIS12 - STALL_I_DIS12
22941  *  0b0..Endpoint 12 IN direction stall is enabled.
22942  *  0b1..Endpoint 12 IN direction stall is disabled.
22943  */
22944 #define USB_STALL_IH_DIS_STALL_I_DIS12(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS12_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS12_MASK)
22945 
22946 #define USB_STALL_IH_DIS_STALL_I_DIS13_MASK      (0x20U)
22947 #define USB_STALL_IH_DIS_STALL_I_DIS13_SHIFT     (5U)
22948 /*! STALL_I_DIS13 - STALL_I_DIS13
22949  *  0b0..Endpoint 13 IN direction stall is enabled.
22950  *  0b1..Endpoint 13 IN direction stall is disabled.
22951  */
22952 #define USB_STALL_IH_DIS_STALL_I_DIS13(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS13_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS13_MASK)
22953 
22954 #define USB_STALL_IH_DIS_STALL_I_DIS14_MASK      (0x40U)
22955 #define USB_STALL_IH_DIS_STALL_I_DIS14_SHIFT     (6U)
22956 /*! STALL_I_DIS14 - STALL_I_DIS14
22957  *  0b0..Endpoint 14 IN direction stall is enabled.
22958  *  0b1..Endpoint 14 IN direction stall is disabled.
22959  */
22960 #define USB_STALL_IH_DIS_STALL_I_DIS14(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS14_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS14_MASK)
22961 
22962 #define USB_STALL_IH_DIS_STALL_I_DIS15_MASK      (0x80U)
22963 #define USB_STALL_IH_DIS_STALL_I_DIS15_SHIFT     (7U)
22964 /*! STALL_I_DIS15 - STALL_I_DIS15
22965  *  0b0..Endpoint 15 IN direction stall is enabled.
22966  *  0b1..Endpoint 15 IN direction stall is disabled.
22967  */
22968 #define USB_STALL_IH_DIS_STALL_I_DIS15(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS15_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS15_MASK)
22969 /*! @} */
22970 
22971 /*! @name STALL_OL_DIS - Peripheral mode stall disable for endpoints 7 to 0 in OUT direction */
22972 /*! @{ */
22973 
22974 #define USB_STALL_OL_DIS_STALL_O_DIS0_MASK       (0x1U)
22975 #define USB_STALL_OL_DIS_STALL_O_DIS0_SHIFT      (0U)
22976 /*! STALL_O_DIS0 - STALL_O_DIS0
22977  *  0b0..Endpoint 0 OUT direction stall is enabled.
22978  *  0b1..Endpoint 0 OUT direction stall is disabled.
22979  */
22980 #define USB_STALL_OL_DIS_STALL_O_DIS0(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS0_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS0_MASK)
22981 
22982 #define USB_STALL_OL_DIS_STALL_O_DIS1_MASK       (0x2U)
22983 #define USB_STALL_OL_DIS_STALL_O_DIS1_SHIFT      (1U)
22984 /*! STALL_O_DIS1 - STALL_O_DIS1
22985  *  0b0..Endpoint 1 OUT direction stall is enabled.
22986  *  0b1..Endpoint 1 OUT direction stall is disabled.
22987  */
22988 #define USB_STALL_OL_DIS_STALL_O_DIS1(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS1_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS1_MASK)
22989 
22990 #define USB_STALL_OL_DIS_STALL_O_DIS2_MASK       (0x4U)
22991 #define USB_STALL_OL_DIS_STALL_O_DIS2_SHIFT      (2U)
22992 /*! STALL_O_DIS2 - STALL_O_DIS2
22993  *  0b0..Endpoint 2 OUT direction stall is enabled.
22994  *  0b1..Endpoint 2 OUT direction stall is disabled.
22995  */
22996 #define USB_STALL_OL_DIS_STALL_O_DIS2(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS2_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS2_MASK)
22997 
22998 #define USB_STALL_OL_DIS_STALL_O_DIS3_MASK       (0x8U)
22999 #define USB_STALL_OL_DIS_STALL_O_DIS3_SHIFT      (3U)
23000 /*! STALL_O_DIS3 - STALL_O_DIS3
23001  *  0b0..Endpoint 3 OUT direction stall is enabled.
23002  *  0b1..Endpoint 3 OUT direction stall is disabled.
23003  */
23004 #define USB_STALL_OL_DIS_STALL_O_DIS3(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS3_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS3_MASK)
23005 
23006 #define USB_STALL_OL_DIS_STALL_O_DIS4_MASK       (0x10U)
23007 #define USB_STALL_OL_DIS_STALL_O_DIS4_SHIFT      (4U)
23008 /*! STALL_O_DIS4 - STALL_O_DIS4
23009  *  0b0..Endpoint 4 OUT direction stall is enabled.
23010  *  0b1..Endpoint 4 OUT direction stall is disabled.
23011  */
23012 #define USB_STALL_OL_DIS_STALL_O_DIS4(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS4_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS4_MASK)
23013 
23014 #define USB_STALL_OL_DIS_STALL_O_DIS5_MASK       (0x20U)
23015 #define USB_STALL_OL_DIS_STALL_O_DIS5_SHIFT      (5U)
23016 /*! STALL_O_DIS5 - STALL_O_DIS5
23017  *  0b0..Endpoint 5 OUT direction stall is enabled.
23018  *  0b1..Endpoint 5 OUT direction stall is disabled.
23019  */
23020 #define USB_STALL_OL_DIS_STALL_O_DIS5(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS5_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS5_MASK)
23021 
23022 #define USB_STALL_OL_DIS_STALL_O_DIS6_MASK       (0x40U)
23023 #define USB_STALL_OL_DIS_STALL_O_DIS6_SHIFT      (6U)
23024 /*! STALL_O_DIS6 - STALL_O_DIS6
23025  *  0b0..Endpoint 6 OUT direction stall is enabled.
23026  *  0b1..Endpoint 6 OUT direction stall is disabled.
23027  */
23028 #define USB_STALL_OL_DIS_STALL_O_DIS6(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS6_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS6_MASK)
23029 
23030 #define USB_STALL_OL_DIS_STALL_O_DIS7_MASK       (0x80U)
23031 #define USB_STALL_OL_DIS_STALL_O_DIS7_SHIFT      (7U)
23032 /*! STALL_O_DIS7 - STALL_O_DIS7
23033  *  0b0..Endpoint 7 OUT direction stall is enabled.
23034  *  0b1..Endpoint 7 OUT direction stall is disabled.
23035  */
23036 #define USB_STALL_OL_DIS_STALL_O_DIS7(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS7_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS7_MASK)
23037 /*! @} */
23038 
23039 /*! @name STALL_OH_DIS - Peripheral mode stall disable for endpoints 15 to 8 in OUT direction */
23040 /*! @{ */
23041 
23042 #define USB_STALL_OH_DIS_STALL_O_DIS8_MASK       (0x1U)
23043 #define USB_STALL_OH_DIS_STALL_O_DIS8_SHIFT      (0U)
23044 /*! STALL_O_DIS8 - STALL_O_DIS8
23045  *  0b0..Endpoint 8 OUT direction stall is enabled.
23046  *  0b1..Endpoint 8 OUT direction stall is disabled.
23047  */
23048 #define USB_STALL_OH_DIS_STALL_O_DIS8(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS8_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS8_MASK)
23049 
23050 #define USB_STALL_OH_DIS_STALL_O_DIS9_MASK       (0x2U)
23051 #define USB_STALL_OH_DIS_STALL_O_DIS9_SHIFT      (1U)
23052 /*! STALL_O_DIS9 - STALL_O_DIS9
23053  *  0b0..Endpoint 9 OUT direction stall is enabled.
23054  *  0b1..Endpoint 9 OUT direction stall is disabled.
23055  */
23056 #define USB_STALL_OH_DIS_STALL_O_DIS9(x)         (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS9_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS9_MASK)
23057 
23058 #define USB_STALL_OH_DIS_STALL_O_DIS10_MASK      (0x4U)
23059 #define USB_STALL_OH_DIS_STALL_O_DIS10_SHIFT     (2U)
23060 /*! STALL_O_DIS10 - STALL_O_DIS10
23061  *  0b0..Endpoint 10 OUT direction stall is enabled.
23062  *  0b1..Endpoint 10 OUT direction stall is disabled.
23063  */
23064 #define USB_STALL_OH_DIS_STALL_O_DIS10(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS10_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS10_MASK)
23065 
23066 #define USB_STALL_OH_DIS_STALL_O_DIS11_MASK      (0x8U)
23067 #define USB_STALL_OH_DIS_STALL_O_DIS11_SHIFT     (3U)
23068 /*! STALL_O_DIS11 - STALL_O_DIS11
23069  *  0b0..Endpoint 11 OUT direction stall is enabled.
23070  *  0b1..Endpoint 11 OUT direction stall is disabled.
23071  */
23072 #define USB_STALL_OH_DIS_STALL_O_DIS11(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS11_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS11_MASK)
23073 
23074 #define USB_STALL_OH_DIS_STALL_O_DIS12_MASK      (0x10U)
23075 #define USB_STALL_OH_DIS_STALL_O_DIS12_SHIFT     (4U)
23076 /*! STALL_O_DIS12 - STALL_O_DIS12
23077  *  0b0..Endpoint 12 OUT direction stall is enabled.
23078  *  0b1..Endpoint 12 OUT direction stall is disabled.
23079  */
23080 #define USB_STALL_OH_DIS_STALL_O_DIS12(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS12_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS12_MASK)
23081 
23082 #define USB_STALL_OH_DIS_STALL_O_DIS13_MASK      (0x20U)
23083 #define USB_STALL_OH_DIS_STALL_O_DIS13_SHIFT     (5U)
23084 /*! STALL_O_DIS13 - STALL_O_DIS13
23085  *  0b0..Endpoint 13 OUT direction stall is enabled.
23086  *  0b1..Endpoint 13 OUT direction stall is disabled.
23087  */
23088 #define USB_STALL_OH_DIS_STALL_O_DIS13(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS13_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS13_MASK)
23089 
23090 #define USB_STALL_OH_DIS_STALL_O_DIS14_MASK      (0x40U)
23091 #define USB_STALL_OH_DIS_STALL_O_DIS14_SHIFT     (6U)
23092 /*! STALL_O_DIS14 - STALL_O_DIS14
23093  *  0b0..Endpoint 14 OUT direction stall is enabled.
23094  *  0b1..Endpoint 14 OUT direction stall is disabled.
23095  */
23096 #define USB_STALL_OH_DIS_STALL_O_DIS14(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS14_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS14_MASK)
23097 
23098 #define USB_STALL_OH_DIS_STALL_O_DIS15_MASK      (0x80U)
23099 #define USB_STALL_OH_DIS_STALL_O_DIS15_SHIFT     (7U)
23100 /*! STALL_O_DIS15 - STALL_O_DIS15
23101  *  0b0..Endpoint 15 OUT direction stall is enabled.
23102  *  0b1..Endpoint 15 OUT direction stall is disabled.
23103  */
23104 #define USB_STALL_OH_DIS_STALL_O_DIS15(x)        (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS15_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS15_MASK)
23105 /*! @} */
23106 
23107 /*! @name CLK_RECOVER_CTRL - USB Clock recovery control */
23108 /*! @{ */
23109 
23110 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK (0x20U)
23111 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT (5U)
23112 /*! RESTART_IFRTRIM_EN - Restart from IFR trim value
23113  *  0b0..Trim fine adjustment always works based on the previous updated trim fine value (default).
23114  *  0b1..Trim fine restarts from the IFR trim value, whenever bus_reset/bus_resume is detected or module enable is desasserted.
23115  */
23116 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK)
23117 
23118 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK (0x40U)
23119 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT (6U)
23120 /*! RESET_RESUME_ROUGH_EN - Reset/resume to rough phase enable
23121  *  0b0..Always works in tracking phase after the first time rough phase, to track transition (default).
23122  *  0b1..Go back to rough stage whenever a bus reset or bus resume occurs.
23123  */
23124 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK)
23125 
23126 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK (0x80U)
23127 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT (7U)
23128 /*! CLOCK_RECOVER_EN - Crystal-less USB enable
23129  *  0b0..Disable clock recovery block (default)
23130  *  0b1..Enable clock recovery block
23131  */
23132 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK)
23133 /*! @} */
23134 
23135 /*! @name CLK_RECOVER_IRC_EN - IRC48MFIRC oscillator enable register */
23136 /*! @{ */
23137 
23138 #define USB_CLK_RECOVER_IRC_EN_REG_EN_MASK       (0x1U)
23139 #define USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT      (0U)
23140 /*! REG_EN - Regulator enable
23141  *  0b0..IRC48M local regulator is disabled
23142  *  0b1..IRC48M local regulator is enabled (default)
23143  */
23144 #define USB_CLK_RECOVER_IRC_EN_REG_EN(x)         (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_REG_EN_MASK)
23145 
23146 #define USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK       (0x2U)
23147 #define USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT      (1U)
23148 /*! IRC_EN - IRC_EN
23149  *  0b0..Disable the IRC48M module (default)
23150  *  0b1..Enable the IRC48M module
23151  */
23152 #define USB_CLK_RECOVER_IRC_EN_IRC_EN(x)         (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK)
23153 /*! @} */
23154 
23155 /*! @name CLK_RECOVER_INT_EN - Clock recovery combined interrupt enable */
23156 /*! @{ */
23157 
23158 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK (0x10U)
23159 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT (4U)
23160 /*! OVF_ERROR_EN - OVF_ERROR_EN
23161  *  0b0..The interrupt will be masked
23162  *  0b1..The interrupt will be enabled (default)
23163  */
23164 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN(x)   (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT)) & USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK)
23165 /*! @} */
23166 
23167 /*! @name CLK_RECOVER_INT_STATUS - Clock recovery separated interrupt status */
23168 /*! @{ */
23169 
23170 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK (0x10U)
23171 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT (4U)
23172 /*! OVF_ERROR - OVF_ERROR
23173  *  0b0..No interrupt is reported
23174  *  0b1..Unmasked interrupt has been generated
23175  */
23176 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR(x)  (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT)) & USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK)
23177 /*! @} */
23178 
23179 
23180 /*!
23181  * @}
23182  */ /* end of group USB_Register_Masks */
23183 
23184 
23185 /* USB - Peripheral instance base addresses */
23186 /** Peripheral USB0 base address */
23187 #define USB0_BASE                                (0x40045000u)
23188 /** Peripheral USB0 base pointer */
23189 #define USB0                                     ((USB_Type *)USB0_BASE)
23190 /** Array initializer of USB peripheral base addresses */
23191 #define USB_BASE_ADDRS                           { USB0_BASE }
23192 /** Array initializer of USB peripheral base pointers */
23193 #define USB_BASE_PTRS                            { USB0 }
23194 /** Interrupt vectors for the USB peripheral type */
23195 #define USB_IRQS                                 { USB0_IRQn }
23196 
23197 /*!
23198  * @}
23199  */ /* end of group USB_Peripheral_Access_Layer */
23200 
23201 
23202 /* ----------------------------------------------------------------------------
23203    -- USBVREG Peripheral Access Layer
23204    ---------------------------------------------------------------------------- */
23205 
23206 /*!
23207  * @addtogroup USBVREG_Peripheral_Access_Layer USBVREG Peripheral Access Layer
23208  * @{
23209  */
23210 
23211 /** USBVREG - Register Layout Typedef */
23212 typedef struct {
23213   __IO uint32_t CTRL;                              /**< USB VREG Control Register, offset: 0x0 */
23214   __IO uint32_t CFGCTRL;                           /**< USB VREG Configuration Control Register, offset: 0x4 */
23215 } USBVREG_Type;
23216 
23217 /* ----------------------------------------------------------------------------
23218    -- USBVREG Register Masks
23219    ---------------------------------------------------------------------------- */
23220 
23221 /*!
23222  * @addtogroup USBVREG_Register_Masks USBVREG Register Masks
23223  * @{
23224  */
23225 
23226 /*! @name CTRL - USB VREG Control Register */
23227 /*! @{ */
23228 
23229 #define USBVREG_CTRL_VSTBY_MASK                  (0x20000000U)
23230 #define USBVREG_CTRL_VSTBY_SHIFT                 (29U)
23231 /*! VSTBY - USB Voltage Regulator in Standby Mode during VLPR and VLPW modes
23232  *  0b0..USB voltage regulator is not in standby during VLPR and VLPW modes.
23233  *  0b1..USB voltage regulator in standby during VLPR and VLPW modes.
23234  */
23235 #define USBVREG_CTRL_VSTBY(x)                    (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_VSTBY_SHIFT)) & USBVREG_CTRL_VSTBY_MASK)
23236 
23237 #define USBVREG_CTRL_SSTBY_MASK                  (0x40000000U)
23238 #define USBVREG_CTRL_SSTBY_SHIFT                 (30U)
23239 /*! SSTBY - USB Voltage Regulator in Standby Mode during Stop, VLPS, LLS and VLLS Modes
23240  *  0b0..USB voltage regulator is not in standby during Stop,VLPS,LLS and VLLS modes.
23241  *  0b1..USB voltage regulator is in standby during Stop,VLPS,LLS and VLLS modes.
23242  */
23243 #define USBVREG_CTRL_SSTBY(x)                    (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_SSTBY_SHIFT)) & USBVREG_CTRL_SSTBY_MASK)
23244 
23245 #define USBVREG_CTRL_EN_MASK                     (0x80000000U)
23246 #define USBVREG_CTRL_EN_SHIFT                    (31U)
23247 /*! EN - USB Voltage Regulator Enable
23248  *  0b0..USB voltage regulator is disabled.
23249  *  0b1..USB voltage regulator is enabled.
23250  */
23251 #define USBVREG_CTRL_EN(x)                       (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_EN_SHIFT)) & USBVREG_CTRL_EN_MASK)
23252 /*! @} */
23253 
23254 /*! @name CFGCTRL - USB VREG Configuration Control Register */
23255 /*! @{ */
23256 
23257 #define USBVREG_CFGCTRL_URWE_MASK                (0x1000000U)
23258 #define USBVREG_CFGCTRL_URWE_SHIFT               (24U)
23259 /*! URWE - USB Voltage Regulator Enable Write Enable
23260  *  0b0..CTRL[EN] can not be written.
23261  *  0b1..CTRL[EN] can be written.
23262  */
23263 #define USBVREG_CFGCTRL_URWE(x)                  (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_URWE_SHIFT)) & USBVREG_CFGCTRL_URWE_MASK)
23264 
23265 #define USBVREG_CFGCTRL_UVSWE_MASK               (0x2000000U)
23266 #define USBVREG_CFGCTRL_UVSWE_SHIFT              (25U)
23267 /*! UVSWE - USB Voltage Regulator VLP Standby Write Enable
23268  *  0b0..CTRL[VSTBY] cannot be written.
23269  *  0b1..CTRL[VSTBY] can be written.
23270  */
23271 #define USBVREG_CFGCTRL_UVSWE(x)                 (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_UVSWE_SHIFT)) & USBVREG_CFGCTRL_UVSWE_MASK)
23272 
23273 #define USBVREG_CFGCTRL_USSWE_MASK               (0x4000000U)
23274 #define USBVREG_CFGCTRL_USSWE_SHIFT              (26U)
23275 /*! USSWE - USB Voltage Rregulator Stop Standby Write Enable
23276  *  0b0..CTRL[SSTBY] field cannot be written.
23277  *  0b1..CTRL[SSTBY] can be written.
23278  */
23279 #define USBVREG_CFGCTRL_USSWE(x)                 (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_USSWE_SHIFT)) & USBVREG_CFGCTRL_USSWE_MASK)
23280 /*! @} */
23281 
23282 
23283 /*!
23284  * @}
23285  */ /* end of group USBVREG_Register_Masks */
23286 
23287 
23288 /* USBVREG - Peripheral instance base addresses */
23289 /** Peripheral USBVREG base address */
23290 #define USBVREG_BASE                             (0x40027000u)
23291 /** Peripheral USBVREG base pointer */
23292 #define USBVREG                                  ((USBVREG_Type *)USBVREG_BASE)
23293 /** Array initializer of USBVREG peripheral base addresses */
23294 #define USBVREG_BASE_ADDRS                       { USBVREG_BASE }
23295 /** Array initializer of USBVREG peripheral base pointers */
23296 #define USBVREG_BASE_PTRS                        { USBVREG }
23297 
23298 /*!
23299  * @}
23300  */ /* end of group USBVREG_Peripheral_Access_Layer */
23301 
23302 
23303 /* ----------------------------------------------------------------------------
23304    -- USDHC Peripheral Access Layer
23305    ---------------------------------------------------------------------------- */
23306 
23307 /*!
23308  * @addtogroup USDHC_Peripheral_Access_Layer USDHC Peripheral Access Layer
23309  * @{
23310  */
23311 
23312 /** USDHC - Register Layout Typedef */
23313 typedef struct {
23314   __IO uint32_t DS_ADDR;                           /**< DMA System Address, offset: 0x0 */
23315   __IO uint32_t BLK_ATT;                           /**< Block Attributes, offset: 0x4 */
23316   __IO uint32_t CMD_ARG;                           /**< Command Argument, offset: 0x8 */
23317   __IO uint32_t CMD_XFR_TYP;                       /**< Command Transfer Type, offset: 0xC */
23318   __I  uint32_t CMD_RSP0;                          /**< Command Response0, offset: 0x10 */
23319   __I  uint32_t CMD_RSP1;                          /**< Command Response1, offset: 0x14 */
23320   __I  uint32_t CMD_RSP2;                          /**< Command Response2, offset: 0x18 */
23321   __I  uint32_t CMD_RSP3;                          /**< Command Response3, offset: 0x1C */
23322   __IO uint32_t DATA_BUFF_ACC_PORT;                /**< Data Buffer Access Port, offset: 0x20 */
23323   __I  uint32_t PRES_STATE;                        /**< Present State, offset: 0x24 */
23324   __IO uint32_t PROT_CTRL;                         /**< Protocol Control, offset: 0x28 */
23325   __IO uint32_t SYS_CTRL;                          /**< System Control, offset: 0x2C */
23326   __IO uint32_t INT_STATUS;                        /**< Interrupt Status, offset: 0x30 */
23327   __IO uint32_t INT_STATUS_EN;                     /**< Interrupt Status Enable, offset: 0x34 */
23328   __IO uint32_t INT_SIGNAL_EN;                     /**< Interrupt Signal Enable, offset: 0x38 */
23329   __I  uint32_t AUTOCMD12_ERR_STATUS;              /**< Auto CMD12 Error Status, offset: 0x3C */
23330   __I  uint32_t HOST_CTRL_CAP;                     /**< Host Controller Capabilities, offset: 0x40 */
23331   __IO uint32_t WTMK_LVL;                          /**< Watermark Level, offset: 0x44 */
23332   __IO uint32_t MIX_CTRL;                          /**< Mixer Control, offset: 0x48 */
23333        uint8_t RESERVED_0[4];
23334   __O  uint32_t FORCE_EVENT;                       /**< Force Event, offset: 0x50 */
23335   __I  uint32_t ADMA_ERR_STATUS;                   /**< ADMA Error Status Register, offset: 0x54 */
23336   __IO uint32_t ADMA_SYS_ADDR;                     /**< ADMA System Address, offset: 0x58 */
23337        uint8_t RESERVED_1[100];
23338   __IO uint32_t VEND_SPEC;                         /**< Vendor Specific Register, offset: 0xC0 */
23339   __IO uint32_t MMC_BOOT;                          /**< MMC Boot Register, offset: 0xC4 */
23340   __IO uint32_t VEND_SPEC2;                        /**< Vendor Specific 2 Register, offset: 0xC8 */
23341 } USDHC_Type;
23342 
23343 /* ----------------------------------------------------------------------------
23344    -- USDHC Register Masks
23345    ---------------------------------------------------------------------------- */
23346 
23347 /*!
23348  * @addtogroup USDHC_Register_Masks USDHC Register Masks
23349  * @{
23350  */
23351 
23352 /*! @name DS_ADDR - DMA System Address */
23353 /*! @{ */
23354 
23355 #define USDHC_DS_ADDR_DS_ADDR_MASK               (0xFFFFFFFFU)
23356 #define USDHC_DS_ADDR_DS_ADDR_SHIFT              (0U)
23357 /*! DS_ADDR - DS_ADDR */
23358 #define USDHC_DS_ADDR_DS_ADDR(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_DS_ADDR_DS_ADDR_SHIFT)) & USDHC_DS_ADDR_DS_ADDR_MASK)
23359 /*! @} */
23360 
23361 /*! @name BLK_ATT - Block Attributes */
23362 /*! @{ */
23363 
23364 #define USDHC_BLK_ATT_BLKSIZE_MASK               (0x1FFFU)
23365 #define USDHC_BLK_ATT_BLKSIZE_SHIFT              (0U)
23366 /*! BLKSIZE - Block Size
23367  *  0b1000000000000..4096 Bytes
23368  *  0b0100000000000..2048 Bytes
23369  *  0b0001000000000..512 Bytes
23370  *  0b0000111111111..511 Bytes
23371  *  0b0000000000100..4 Bytes
23372  *  0b0000000000011..3 Bytes
23373  *  0b0000000000010..2 Bytes
23374  *  0b0000000000001..1 Byte
23375  *  0b0000000000000..No data transfer
23376  */
23377 #define USDHC_BLK_ATT_BLKSIZE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_BLK_ATT_BLKSIZE_SHIFT)) & USDHC_BLK_ATT_BLKSIZE_MASK)
23378 
23379 #define USDHC_BLK_ATT_BLKCNT_MASK                (0xFFFF0000U)
23380 #define USDHC_BLK_ATT_BLKCNT_SHIFT               (16U)
23381 /*! BLKCNT - Block Count
23382  *  0b1111111111111111..65535 blocks
23383  *  0b0000000000000010..2 blocks
23384  *  0b0000000000000001..1 block
23385  *  0b0000000000000000..Stop Count
23386  */
23387 #define USDHC_BLK_ATT_BLKCNT(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_BLK_ATT_BLKCNT_SHIFT)) & USDHC_BLK_ATT_BLKCNT_MASK)
23388 /*! @} */
23389 
23390 /*! @name CMD_ARG - Command Argument */
23391 /*! @{ */
23392 
23393 #define USDHC_CMD_ARG_CMDARG_MASK                (0xFFFFFFFFU)
23394 #define USDHC_CMD_ARG_CMDARG_SHIFT               (0U)
23395 /*! CMDARG - Command Argument */
23396 #define USDHC_CMD_ARG_CMDARG(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_ARG_CMDARG_SHIFT)) & USDHC_CMD_ARG_CMDARG_MASK)
23397 /*! @} */
23398 
23399 /*! @name CMD_XFR_TYP - Command Transfer Type */
23400 /*! @{ */
23401 
23402 #define USDHC_CMD_XFR_TYP_RSPTYP_MASK            (0x30000U)
23403 #define USDHC_CMD_XFR_TYP_RSPTYP_SHIFT           (16U)
23404 /*! RSPTYP - Response Type Select
23405  *  0b00..No Response
23406  *  0b01..Response Length 136
23407  *  0b10..Response Length 48
23408  *  0b11..Response Length 48, check Busy after response
23409  */
23410 #define USDHC_CMD_XFR_TYP_RSPTYP(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_RSPTYP_SHIFT)) & USDHC_CMD_XFR_TYP_RSPTYP_MASK)
23411 
23412 #define USDHC_CMD_XFR_TYP_CCCEN_MASK             (0x80000U)
23413 #define USDHC_CMD_XFR_TYP_CCCEN_SHIFT            (19U)
23414 /*! CCCEN - Command CRC Check Enable
23415  *  0b1..Enable
23416  *  0b0..Disable
23417  */
23418 #define USDHC_CMD_XFR_TYP_CCCEN(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CCCEN_SHIFT)) & USDHC_CMD_XFR_TYP_CCCEN_MASK)
23419 
23420 #define USDHC_CMD_XFR_TYP_CICEN_MASK             (0x100000U)
23421 #define USDHC_CMD_XFR_TYP_CICEN_SHIFT            (20U)
23422 /*! CICEN - Command Index Check Enable
23423  *  0b1..Enable
23424  *  0b0..Disable
23425  */
23426 #define USDHC_CMD_XFR_TYP_CICEN(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CICEN_SHIFT)) & USDHC_CMD_XFR_TYP_CICEN_MASK)
23427 
23428 #define USDHC_CMD_XFR_TYP_DPSEL_MASK             (0x200000U)
23429 #define USDHC_CMD_XFR_TYP_DPSEL_SHIFT            (21U)
23430 /*! DPSEL - Data Present Select
23431  *  0b1..Data Present
23432  *  0b0..No Data Present
23433  */
23434 #define USDHC_CMD_XFR_TYP_DPSEL(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_DPSEL_SHIFT)) & USDHC_CMD_XFR_TYP_DPSEL_MASK)
23435 
23436 #define USDHC_CMD_XFR_TYP_CMDTYP_MASK            (0xC00000U)
23437 #define USDHC_CMD_XFR_TYP_CMDTYP_SHIFT           (22U)
23438 /*! CMDTYP - Command Type
23439  *  0b11..Abort CMD12, CMD52 for writing I/O Abort in CCCR
23440  *  0b10..Resume CMD52 for writing Function Select in CCCR
23441  *  0b01..Suspend CMD52 for writing Bus Suspend in CCCR
23442  *  0b00..Normal Other commands
23443  */
23444 #define USDHC_CMD_XFR_TYP_CMDTYP(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CMDTYP_SHIFT)) & USDHC_CMD_XFR_TYP_CMDTYP_MASK)
23445 
23446 #define USDHC_CMD_XFR_TYP_CMDINX_MASK            (0x3F000000U)
23447 #define USDHC_CMD_XFR_TYP_CMDINX_SHIFT           (24U)
23448 /*! CMDINX - Command Index */
23449 #define USDHC_CMD_XFR_TYP_CMDINX(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CMDINX_SHIFT)) & USDHC_CMD_XFR_TYP_CMDINX_MASK)
23450 /*! @} */
23451 
23452 /*! @name CMD_RSP0 - Command Response0 */
23453 /*! @{ */
23454 
23455 #define USDHC_CMD_RSP0_CMDRSP0_MASK              (0xFFFFFFFFU)
23456 #define USDHC_CMD_RSP0_CMDRSP0_SHIFT             (0U)
23457 /*! CMDRSP0 - Command Response 0 */
23458 #define USDHC_CMD_RSP0_CMDRSP0(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP0_CMDRSP0_SHIFT)) & USDHC_CMD_RSP0_CMDRSP0_MASK)
23459 /*! @} */
23460 
23461 /*! @name CMD_RSP1 - Command Response1 */
23462 /*! @{ */
23463 
23464 #define USDHC_CMD_RSP1_CMDRSP1_MASK              (0xFFFFFFFFU)
23465 #define USDHC_CMD_RSP1_CMDRSP1_SHIFT             (0U)
23466 /*! CMDRSP1 - Command Response 1 */
23467 #define USDHC_CMD_RSP1_CMDRSP1(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP1_CMDRSP1_SHIFT)) & USDHC_CMD_RSP1_CMDRSP1_MASK)
23468 /*! @} */
23469 
23470 /*! @name CMD_RSP2 - Command Response2 */
23471 /*! @{ */
23472 
23473 #define USDHC_CMD_RSP2_CMDRSP2_MASK              (0xFFFFFFFFU)
23474 #define USDHC_CMD_RSP2_CMDRSP2_SHIFT             (0U)
23475 /*! CMDRSP2 - Command Response 2 */
23476 #define USDHC_CMD_RSP2_CMDRSP2(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP2_CMDRSP2_SHIFT)) & USDHC_CMD_RSP2_CMDRSP2_MASK)
23477 /*! @} */
23478 
23479 /*! @name CMD_RSP3 - Command Response3 */
23480 /*! @{ */
23481 
23482 #define USDHC_CMD_RSP3_CMDRSP3_MASK              (0xFFFFFFFFU)
23483 #define USDHC_CMD_RSP3_CMDRSP3_SHIFT             (0U)
23484 /*! CMDRSP3 - Command Response 3 */
23485 #define USDHC_CMD_RSP3_CMDRSP3(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP3_CMDRSP3_SHIFT)) & USDHC_CMD_RSP3_CMDRSP3_MASK)
23486 /*! @} */
23487 
23488 /*! @name DATA_BUFF_ACC_PORT - Data Buffer Access Port */
23489 /*! @{ */
23490 
23491 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT_MASK    (0xFFFFFFFFU)
23492 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT_SHIFT   (0U)
23493 /*! DATCONT - Data Content */
23494 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT(x)      (((uint32_t)(((uint32_t)(x)) << USDHC_DATA_BUFF_ACC_PORT_DATCONT_SHIFT)) & USDHC_DATA_BUFF_ACC_PORT_DATCONT_MASK)
23495 /*! @} */
23496 
23497 /*! @name PRES_STATE - Present State */
23498 /*! @{ */
23499 
23500 #define USDHC_PRES_STATE_CIHB_MASK               (0x1U)
23501 #define USDHC_PRES_STATE_CIHB_SHIFT              (0U)
23502 /*! CIHB - Command Inhibit (CMD)
23503  *  0b1..Cannot issue command
23504  *  0b0..Can issue command using only CMD line
23505  */
23506 #define USDHC_PRES_STATE_CIHB(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CIHB_SHIFT)) & USDHC_PRES_STATE_CIHB_MASK)
23507 
23508 #define USDHC_PRES_STATE_CDIHB_MASK              (0x2U)
23509 #define USDHC_PRES_STATE_CDIHB_SHIFT             (1U)
23510 /*! CDIHB - Command Inhibit (DATA)
23511  *  0b1..Cannot issue command which uses the DATA line
23512  *  0b0..Can issue command which uses the DATA line
23513  */
23514 #define USDHC_PRES_STATE_CDIHB(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CDIHB_SHIFT)) & USDHC_PRES_STATE_CDIHB_MASK)
23515 
23516 #define USDHC_PRES_STATE_DLA_MASK                (0x4U)
23517 #define USDHC_PRES_STATE_DLA_SHIFT               (2U)
23518 /*! DLA - Data Line Active
23519  *  0b1..DATA Line Active
23520  *  0b0..DATA Line Inactive
23521  */
23522 #define USDHC_PRES_STATE_DLA(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_DLA_SHIFT)) & USDHC_PRES_STATE_DLA_MASK)
23523 
23524 #define USDHC_PRES_STATE_SDSTB_MASK              (0x8U)
23525 #define USDHC_PRES_STATE_SDSTB_SHIFT             (3U)
23526 /*! SDSTB - SD Clock Stable
23527  *  0b1..Clock is stable.
23528  *  0b0..Clock is changing frequency and not stable.
23529  */
23530 #define USDHC_PRES_STATE_SDSTB(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_SDSTB_SHIFT)) & USDHC_PRES_STATE_SDSTB_MASK)
23531 
23532 #define USDHC_PRES_STATE_IPGOFF_MASK             (0x10U)
23533 #define USDHC_PRES_STATE_IPGOFF_SHIFT            (4U)
23534 /*! IPGOFF - IPG_CLK Gated Off Internally
23535  *  0b1..IPG_CLK is gated off.
23536  *  0b0..IPG_CLK is active.
23537  */
23538 #define USDHC_PRES_STATE_IPGOFF(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_IPGOFF_SHIFT)) & USDHC_PRES_STATE_IPGOFF_MASK)
23539 
23540 #define USDHC_PRES_STATE_HCKOFF_MASK             (0x20U)
23541 #define USDHC_PRES_STATE_HCKOFF_SHIFT            (5U)
23542 /*! HCKOFF - HCLK Gated Off Internally
23543  *  0b1..HCLK is gated off.
23544  *  0b0..HCLK is active.
23545  */
23546 #define USDHC_PRES_STATE_HCKOFF(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_HCKOFF_SHIFT)) & USDHC_PRES_STATE_HCKOFF_MASK)
23547 
23548 #define USDHC_PRES_STATE_PEROFF_MASK             (0x40U)
23549 #define USDHC_PRES_STATE_PEROFF_SHIFT            (6U)
23550 /*! PEROFF - IPG_PERCLK Gated Off Internally
23551  *  0b1..IPG_PERCLK is gated off.
23552  *  0b0..IPG_PERCLK is active.
23553  */
23554 #define USDHC_PRES_STATE_PEROFF(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_PEROFF_SHIFT)) & USDHC_PRES_STATE_PEROFF_MASK)
23555 
23556 #define USDHC_PRES_STATE_SDOFF_MASK              (0x80U)
23557 #define USDHC_PRES_STATE_SDOFF_SHIFT             (7U)
23558 /*! SDOFF - SD Clock Gated Off Internally
23559  *  0b1..SD Clock is gated off.
23560  *  0b0..SD Clock is active.
23561  */
23562 #define USDHC_PRES_STATE_SDOFF(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_SDOFF_SHIFT)) & USDHC_PRES_STATE_SDOFF_MASK)
23563 
23564 #define USDHC_PRES_STATE_WTA_MASK                (0x100U)
23565 #define USDHC_PRES_STATE_WTA_SHIFT               (8U)
23566 /*! WTA - Write Transfer Active
23567  *  0b1..Transferring data
23568  *  0b0..No valid data
23569  */
23570 #define USDHC_PRES_STATE_WTA(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_WTA_SHIFT)) & USDHC_PRES_STATE_WTA_MASK)
23571 
23572 #define USDHC_PRES_STATE_RTA_MASK                (0x200U)
23573 #define USDHC_PRES_STATE_RTA_SHIFT               (9U)
23574 /*! RTA - Read Transfer Active
23575  *  0b1..Transferring data
23576  *  0b0..No valid data
23577  */
23578 #define USDHC_PRES_STATE_RTA(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_RTA_SHIFT)) & USDHC_PRES_STATE_RTA_MASK)
23579 
23580 #define USDHC_PRES_STATE_BWEN_MASK               (0x400U)
23581 #define USDHC_PRES_STATE_BWEN_SHIFT              (10U)
23582 /*! BWEN - Buffer Write Enable
23583  *  0b1..Write enable
23584  *  0b0..Write disable
23585  */
23586 #define USDHC_PRES_STATE_BWEN(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_BWEN_SHIFT)) & USDHC_PRES_STATE_BWEN_MASK)
23587 
23588 #define USDHC_PRES_STATE_BREN_MASK               (0x800U)
23589 #define USDHC_PRES_STATE_BREN_SHIFT              (11U)
23590 /*! BREN - Buffer Read Enable
23591  *  0b1..Read enable
23592  *  0b0..Read disable
23593  */
23594 #define USDHC_PRES_STATE_BREN(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_BREN_SHIFT)) & USDHC_PRES_STATE_BREN_MASK)
23595 
23596 #define USDHC_PRES_STATE_CINST_MASK              (0x10000U)
23597 #define USDHC_PRES_STATE_CINST_SHIFT             (16U)
23598 /*! CINST - Card Inserted
23599  *  0b1..Card Inserted
23600  *  0b0..Power on Reset or No Card
23601  */
23602 #define USDHC_PRES_STATE_CINST(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CINST_SHIFT)) & USDHC_PRES_STATE_CINST_MASK)
23603 
23604 #define USDHC_PRES_STATE_CDPL_MASK               (0x40000U)
23605 #define USDHC_PRES_STATE_CDPL_SHIFT              (18U)
23606 /*! CDPL - Card Detect Pin Level
23607  *  0b1..Card present (CD_B = 0)
23608  *  0b0..No card present (CD_B = 1)
23609  */
23610 #define USDHC_PRES_STATE_CDPL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CDPL_SHIFT)) & USDHC_PRES_STATE_CDPL_MASK)
23611 
23612 #define USDHC_PRES_STATE_WPSPL_MASK              (0x80000U)
23613 #define USDHC_PRES_STATE_WPSPL_SHIFT             (19U)
23614 /*! WPSPL - Write Protect Switch Pin Level
23615  *  0b1..Write enabled (WP = 0)
23616  *  0b0..Write protected (WP = 1)
23617  */
23618 #define USDHC_PRES_STATE_WPSPL(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_WPSPL_SHIFT)) & USDHC_PRES_STATE_WPSPL_MASK)
23619 
23620 #define USDHC_PRES_STATE_CLSL_MASK               (0x800000U)
23621 #define USDHC_PRES_STATE_CLSL_SHIFT              (23U)
23622 /*! CLSL - CMD Line Signal Level */
23623 #define USDHC_PRES_STATE_CLSL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CLSL_SHIFT)) & USDHC_PRES_STATE_CLSL_MASK)
23624 
23625 #define USDHC_PRES_STATE_DLSL_MASK               (0xFF000000U)
23626 #define USDHC_PRES_STATE_DLSL_SHIFT              (24U)
23627 /*! DLSL - DATA[7:0] Line Signal Level
23628  *  0b00000111..Data 7 line signal level
23629  *  0b00000110..Data 6 line signal level
23630  *  0b00000101..Data 5 line signal level
23631  *  0b00000100..Data 4 line signal level
23632  *  0b00000011..Data 3 line signal level
23633  *  0b00000010..Data 2 line signal level
23634  *  0b00000001..Data 1 line signal level
23635  *  0b00000000..Data 0 line signal level
23636  */
23637 #define USDHC_PRES_STATE_DLSL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_DLSL_SHIFT)) & USDHC_PRES_STATE_DLSL_MASK)
23638 /*! @} */
23639 
23640 /*! @name PROT_CTRL - Protocol Control */
23641 /*! @{ */
23642 
23643 #define USDHC_PROT_CTRL_LCTL_MASK                (0x1U)
23644 #define USDHC_PROT_CTRL_LCTL_SHIFT               (0U)
23645 /*! LCTL - LED Control
23646  *  0b1..LED on
23647  *  0b0..LED off
23648  */
23649 #define USDHC_PROT_CTRL_LCTL(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_LCTL_SHIFT)) & USDHC_PROT_CTRL_LCTL_MASK)
23650 
23651 #define USDHC_PROT_CTRL_DTW_MASK                 (0x6U)
23652 #define USDHC_PROT_CTRL_DTW_SHIFT                (1U)
23653 /*! DTW - Data Transfer Width
23654  *  0b10..8-bit mode
23655  *  0b01..4-bit mode
23656  *  0b00..1-bit mode
23657  *  0b11..Reserved
23658  */
23659 #define USDHC_PROT_CTRL_DTW(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_DTW_SHIFT)) & USDHC_PROT_CTRL_DTW_MASK)
23660 
23661 #define USDHC_PROT_CTRL_D3CD_MASK                (0x8U)
23662 #define USDHC_PROT_CTRL_D3CD_SHIFT               (3U)
23663 /*! D3CD - DATA3 as Card Detection Pin
23664  *  0b1..DATA3 as Card Detection Pin
23665  *  0b0..DATA3 does not monitor Card Insertion
23666  */
23667 #define USDHC_PROT_CTRL_D3CD(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_D3CD_SHIFT)) & USDHC_PROT_CTRL_D3CD_MASK)
23668 
23669 #define USDHC_PROT_CTRL_EMODE_MASK               (0x30U)
23670 #define USDHC_PROT_CTRL_EMODE_SHIFT              (4U)
23671 /*! EMODE - Endian Mode
23672  *  0b00..Big Endian Mode
23673  *  0b01..Half Word Big Endian Mode
23674  *  0b10..Little Endian Mode
23675  *  0b11..Reserved
23676  */
23677 #define USDHC_PROT_CTRL_EMODE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_EMODE_SHIFT)) & USDHC_PROT_CTRL_EMODE_MASK)
23678 
23679 #define USDHC_PROT_CTRL_CDTL_MASK                (0x40U)
23680 #define USDHC_PROT_CTRL_CDTL_SHIFT               (6U)
23681 /*! CDTL - Card Detect Test Level
23682  *  0b1..Card Detect Test Level is 1, card inserted
23683  *  0b0..Card Detect Test Level is 0, no card inserted
23684  */
23685 #define USDHC_PROT_CTRL_CDTL(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CDTL_SHIFT)) & USDHC_PROT_CTRL_CDTL_MASK)
23686 
23687 #define USDHC_PROT_CTRL_CDSS_MASK                (0x80U)
23688 #define USDHC_PROT_CTRL_CDSS_SHIFT               (7U)
23689 /*! CDSS - Card Detect Signal Selection
23690  *  0b1..Card Detection Test Level is selected (for test purpose).
23691  *  0b0..Card Detection Level is selected (for normal purpose).
23692  */
23693 #define USDHC_PROT_CTRL_CDSS(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CDSS_SHIFT)) & USDHC_PROT_CTRL_CDSS_MASK)
23694 
23695 #define USDHC_PROT_CTRL_DMASEL_MASK              (0x300U)
23696 #define USDHC_PROT_CTRL_DMASEL_SHIFT             (8U)
23697 /*! DMASEL - DMA Select
23698  *  0b00..No DMA or Simple DMA is selected
23699  *  0b01..ADMA1 is selected
23700  *  0b10..ADMA2 is selected
23701  *  0b11..reserved
23702  */
23703 #define USDHC_PROT_CTRL_DMASEL(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_DMASEL_SHIFT)) & USDHC_PROT_CTRL_DMASEL_MASK)
23704 
23705 #define USDHC_PROT_CTRL_SABGREQ_MASK             (0x10000U)
23706 #define USDHC_PROT_CTRL_SABGREQ_SHIFT            (16U)
23707 /*! SABGREQ - Stop At Block Gap Request
23708  *  0b1..Stop
23709  *  0b0..Transfer
23710  */
23711 #define USDHC_PROT_CTRL_SABGREQ(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_SABGREQ_SHIFT)) & USDHC_PROT_CTRL_SABGREQ_MASK)
23712 
23713 #define USDHC_PROT_CTRL_CREQ_MASK                (0x20000U)
23714 #define USDHC_PROT_CTRL_CREQ_SHIFT               (17U)
23715 /*! CREQ - Continue Request
23716  *  0b1..Restart
23717  *  0b0..No effect
23718  */
23719 #define USDHC_PROT_CTRL_CREQ(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CREQ_SHIFT)) & USDHC_PROT_CTRL_CREQ_MASK)
23720 
23721 #define USDHC_PROT_CTRL_RWCTL_MASK               (0x40000U)
23722 #define USDHC_PROT_CTRL_RWCTL_SHIFT              (18U)
23723 /*! RWCTL - Read Wait Control
23724  *  0b1..Enable Read Wait Control, and assert Read Wait without stopping SD Clock at block gap when SABGREQ bit is set
23725  *  0b0..Disable Read Wait Control, and stop SD Clock at block gap when SABGREQ bit is set
23726  */
23727 #define USDHC_PROT_CTRL_RWCTL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_RWCTL_SHIFT)) & USDHC_PROT_CTRL_RWCTL_MASK)
23728 
23729 #define USDHC_PROT_CTRL_IABG_MASK                (0x80000U)
23730 #define USDHC_PROT_CTRL_IABG_SHIFT               (19U)
23731 /*! IABG - Interrupt At Block Gap
23732  *  0b1..Enabled
23733  *  0b0..Disabled
23734  */
23735 #define USDHC_PROT_CTRL_IABG(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_IABG_SHIFT)) & USDHC_PROT_CTRL_IABG_MASK)
23736 
23737 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK_MASK     (0x100000U)
23738 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK_SHIFT    (20U)
23739 /*! RD_DONE_NO_8CLK - RD_DONE_NO_8CLK */
23740 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK(x)       (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_RD_DONE_NO_8CLK_SHIFT)) & USDHC_PROT_CTRL_RD_DONE_NO_8CLK_MASK)
23741 
23742 #define USDHC_PROT_CTRL_WECINT_MASK              (0x1000000U)
23743 #define USDHC_PROT_CTRL_WECINT_SHIFT             (24U)
23744 /*! WECINT - Wakeup Event Enable On Card Interrupt
23745  *  0b1..Enable
23746  *  0b0..Disable
23747  */
23748 #define USDHC_PROT_CTRL_WECINT(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECINT_SHIFT)) & USDHC_PROT_CTRL_WECINT_MASK)
23749 
23750 #define USDHC_PROT_CTRL_WECINS_MASK              (0x2000000U)
23751 #define USDHC_PROT_CTRL_WECINS_SHIFT             (25U)
23752 /*! WECINS - Wakeup Event Enable On SD Card Insertion
23753  *  0b1..Enable
23754  *  0b0..Disable
23755  */
23756 #define USDHC_PROT_CTRL_WECINS(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECINS_SHIFT)) & USDHC_PROT_CTRL_WECINS_MASK)
23757 
23758 #define USDHC_PROT_CTRL_WECRM_MASK               (0x4000000U)
23759 #define USDHC_PROT_CTRL_WECRM_SHIFT              (26U)
23760 /*! WECRM - Wakeup Event Enable On SD Card Removal
23761  *  0b1..Enable
23762  *  0b0..Disable
23763  */
23764 #define USDHC_PROT_CTRL_WECRM(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECRM_SHIFT)) & USDHC_PROT_CTRL_WECRM_MASK)
23765 
23766 #define USDHC_PROT_CTRL_BURST_LEN_EN_MASK        (0x38000000U)
23767 #define USDHC_PROT_CTRL_BURST_LEN_EN_SHIFT       (27U)
23768 /*! BURST_LEN_EN - BURST length enable for INCR, INCR4 / INCR8 / INCR16, INCR4-WRAP / INCR8-WRAP / INCR16-WRAP
23769  *  0bxx1..Burst length is enabled for INCR
23770  *  0bx1x..Burst length is enabled for INCR4 / INCR8 / INCR16
23771  *  0b1xx..Burst length is enabled for INCR4-WRAP / INCR8-WRAP / INCR16-WRAP
23772  */
23773 #define USDHC_PROT_CTRL_BURST_LEN_EN(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_BURST_LEN_EN_SHIFT)) & USDHC_PROT_CTRL_BURST_LEN_EN_MASK)
23774 
23775 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD_MASK    (0x40000000U)
23776 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD_SHIFT   (30U)
23777 /*! NON_EXACT_BLK_RD - NON_EXACT_BLK_RD
23778  *  0b1..The block read is non-exact block read. Host driver needs to issue abort command to terminate this multi-block read.
23779  *  0b0..The block read is exact block read. Host driver doesn't need to issue abort command to terminate this multi-block read.
23780  */
23781 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD(x)      (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_NON_EXACT_BLK_RD_SHIFT)) & USDHC_PROT_CTRL_NON_EXACT_BLK_RD_MASK)
23782 /*! @} */
23783 
23784 /*! @name SYS_CTRL - System Control */
23785 /*! @{ */
23786 
23787 #define USDHC_SYS_CTRL_DVS_MASK                  (0xF0U)
23788 #define USDHC_SYS_CTRL_DVS_SHIFT                 (4U)
23789 /*! DVS - Divisor
23790  *  0b0000..Divide-by-1
23791  *  0b0001..Divide-by-2
23792  *  0b1110..Divide-by-15
23793  *  0b1111..Divide-by-16
23794  */
23795 #define USDHC_SYS_CTRL_DVS(x)                    (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_DVS_SHIFT)) & USDHC_SYS_CTRL_DVS_MASK)
23796 
23797 #define USDHC_SYS_CTRL_SDCLKFS_MASK              (0xFF00U)
23798 #define USDHC_SYS_CTRL_SDCLKFS_SHIFT             (8U)
23799 /*! SDCLKFS - SDCLK Frequency Select */
23800 #define USDHC_SYS_CTRL_SDCLKFS(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_SDCLKFS_SHIFT)) & USDHC_SYS_CTRL_SDCLKFS_MASK)
23801 
23802 #define USDHC_SYS_CTRL_DTOCV_MASK                (0xF0000U)
23803 #define USDHC_SYS_CTRL_DTOCV_SHIFT               (16U)
23804 /*! DTOCV - Data Timeout Counter Value
23805  *  0b1111..SDCLK x 2 29
23806  *  0b1110..SDCLK x 2 28
23807  *  0b1101..SDCLK x 2 27
23808  *  0b0001..SDCLK x 2 15
23809  *  0b0000..SDCLK x 2 14
23810  */
23811 #define USDHC_SYS_CTRL_DTOCV(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_DTOCV_SHIFT)) & USDHC_SYS_CTRL_DTOCV_MASK)
23812 
23813 #define USDHC_SYS_CTRL_IPP_RST_N_MASK            (0x800000U)
23814 #define USDHC_SYS_CTRL_IPP_RST_N_SHIFT           (23U)
23815 /*! IPP_RST_N - IPP_RST_N */
23816 #define USDHC_SYS_CTRL_IPP_RST_N(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_IPP_RST_N_SHIFT)) & USDHC_SYS_CTRL_IPP_RST_N_MASK)
23817 
23818 #define USDHC_SYS_CTRL_RSTA_MASK                 (0x1000000U)
23819 #define USDHC_SYS_CTRL_RSTA_SHIFT                (24U)
23820 /*! RSTA - Software Reset For ALL
23821  *  0b1..Reset
23822  *  0b0..No Reset
23823  */
23824 #define USDHC_SYS_CTRL_RSTA(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTA_SHIFT)) & USDHC_SYS_CTRL_RSTA_MASK)
23825 
23826 #define USDHC_SYS_CTRL_RSTC_MASK                 (0x2000000U)
23827 #define USDHC_SYS_CTRL_RSTC_SHIFT                (25U)
23828 /*! RSTC - Software Reset For CMD Line
23829  *  0b1..Reset
23830  *  0b0..No Reset
23831  */
23832 #define USDHC_SYS_CTRL_RSTC(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTC_SHIFT)) & USDHC_SYS_CTRL_RSTC_MASK)
23833 
23834 #define USDHC_SYS_CTRL_RSTD_MASK                 (0x4000000U)
23835 #define USDHC_SYS_CTRL_RSTD_SHIFT                (26U)
23836 /*! RSTD - Software Reset For DATA Line
23837  *  0b1..Reset
23838  *  0b0..No Reset
23839  */
23840 #define USDHC_SYS_CTRL_RSTD(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTD_SHIFT)) & USDHC_SYS_CTRL_RSTD_MASK)
23841 
23842 #define USDHC_SYS_CTRL_INITA_MASK                (0x8000000U)
23843 #define USDHC_SYS_CTRL_INITA_SHIFT               (27U)
23844 /*! INITA - Initialization Active */
23845 #define USDHC_SYS_CTRL_INITA(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_INITA_SHIFT)) & USDHC_SYS_CTRL_INITA_MASK)
23846 /*! @} */
23847 
23848 /*! @name INT_STATUS - Interrupt Status */
23849 /*! @{ */
23850 
23851 #define USDHC_INT_STATUS_CC_MASK                 (0x1U)
23852 #define USDHC_INT_STATUS_CC_SHIFT                (0U)
23853 /*! CC - Command Complete
23854  *  0b1..Command complete
23855  *  0b0..Command not complete
23856  */
23857 #define USDHC_INT_STATUS_CC(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CC_SHIFT)) & USDHC_INT_STATUS_CC_MASK)
23858 
23859 #define USDHC_INT_STATUS_TC_MASK                 (0x2U)
23860 #define USDHC_INT_STATUS_TC_SHIFT                (1U)
23861 /*! TC - Transfer Complete
23862  *  0b1..Transfer complete
23863  *  0b0..Transfer not complete
23864  */
23865 #define USDHC_INT_STATUS_TC(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_TC_SHIFT)) & USDHC_INT_STATUS_TC_MASK)
23866 
23867 #define USDHC_INT_STATUS_BGE_MASK                (0x4U)
23868 #define USDHC_INT_STATUS_BGE_SHIFT               (2U)
23869 /*! BGE - Block Gap Event
23870  *  0b1..Transaction stopped at block gap
23871  *  0b0..No block gap event
23872  */
23873 #define USDHC_INT_STATUS_BGE(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BGE_SHIFT)) & USDHC_INT_STATUS_BGE_MASK)
23874 
23875 #define USDHC_INT_STATUS_DINT_MASK               (0x8U)
23876 #define USDHC_INT_STATUS_DINT_SHIFT              (3U)
23877 /*! DINT - DMA Interrupt
23878  *  0b1..DMA Interrupt is generated
23879  *  0b0..No DMA Interrupt
23880  */
23881 #define USDHC_INT_STATUS_DINT(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DINT_SHIFT)) & USDHC_INT_STATUS_DINT_MASK)
23882 
23883 #define USDHC_INT_STATUS_BWR_MASK                (0x10U)
23884 #define USDHC_INT_STATUS_BWR_SHIFT               (4U)
23885 /*! BWR - Buffer Write Ready
23886  *  0b1..Ready to write buffer:
23887  *  0b0..Not ready to write buffer
23888  */
23889 #define USDHC_INT_STATUS_BWR(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BWR_SHIFT)) & USDHC_INT_STATUS_BWR_MASK)
23890 
23891 #define USDHC_INT_STATUS_BRR_MASK                (0x20U)
23892 #define USDHC_INT_STATUS_BRR_SHIFT               (5U)
23893 /*! BRR - Buffer Read Ready
23894  *  0b1..Ready to read buffer
23895  *  0b0..Not ready to read buffer
23896  */
23897 #define USDHC_INT_STATUS_BRR(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BRR_SHIFT)) & USDHC_INT_STATUS_BRR_MASK)
23898 
23899 #define USDHC_INT_STATUS_CINS_MASK               (0x40U)
23900 #define USDHC_INT_STATUS_CINS_SHIFT              (6U)
23901 /*! CINS - Card Insertion
23902  *  0b1..Card inserted
23903  *  0b0..Card state unstable or removed
23904  */
23905 #define USDHC_INT_STATUS_CINS(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CINS_SHIFT)) & USDHC_INT_STATUS_CINS_MASK)
23906 
23907 #define USDHC_INT_STATUS_CRM_MASK                (0x80U)
23908 #define USDHC_INT_STATUS_CRM_SHIFT               (7U)
23909 /*! CRM - Card Removal
23910  *  0b1..Card removed
23911  *  0b0..Card state unstable or inserted
23912  */
23913 #define USDHC_INT_STATUS_CRM(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CRM_SHIFT)) & USDHC_INT_STATUS_CRM_MASK)
23914 
23915 #define USDHC_INT_STATUS_CINT_MASK               (0x100U)
23916 #define USDHC_INT_STATUS_CINT_SHIFT              (8U)
23917 /*! CINT - Card Interrupt
23918  *  0b1..Generate Card Interrupt
23919  *  0b0..No Card Interrupt
23920  */
23921 #define USDHC_INT_STATUS_CINT(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CINT_SHIFT)) & USDHC_INT_STATUS_CINT_MASK)
23922 
23923 #define USDHC_INT_STATUS_CTOE_MASK               (0x10000U)
23924 #define USDHC_INT_STATUS_CTOE_SHIFT              (16U)
23925 /*! CTOE - Command Timeout Error
23926  *  0b1..Time out
23927  *  0b0..No Error
23928  */
23929 #define USDHC_INT_STATUS_CTOE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CTOE_SHIFT)) & USDHC_INT_STATUS_CTOE_MASK)
23930 
23931 #define USDHC_INT_STATUS_CCE_MASK                (0x20000U)
23932 #define USDHC_INT_STATUS_CCE_SHIFT               (17U)
23933 /*! CCE - Command CRC Error
23934  *  0b1..CRC Error Generated.
23935  *  0b0..No Error
23936  */
23937 #define USDHC_INT_STATUS_CCE(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CCE_SHIFT)) & USDHC_INT_STATUS_CCE_MASK)
23938 
23939 #define USDHC_INT_STATUS_CEBE_MASK               (0x40000U)
23940 #define USDHC_INT_STATUS_CEBE_SHIFT              (18U)
23941 /*! CEBE - Command End Bit Error
23942  *  0b1..End Bit Error Generated
23943  *  0b0..No Error
23944  */
23945 #define USDHC_INT_STATUS_CEBE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CEBE_SHIFT)) & USDHC_INT_STATUS_CEBE_MASK)
23946 
23947 #define USDHC_INT_STATUS_CIE_MASK                (0x80000U)
23948 #define USDHC_INT_STATUS_CIE_SHIFT               (19U)
23949 /*! CIE - Command Index Error
23950  *  0b1..Error
23951  *  0b0..No Error
23952  */
23953 #define USDHC_INT_STATUS_CIE(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CIE_SHIFT)) & USDHC_INT_STATUS_CIE_MASK)
23954 
23955 #define USDHC_INT_STATUS_DTOE_MASK               (0x100000U)
23956 #define USDHC_INT_STATUS_DTOE_SHIFT              (20U)
23957 /*! DTOE - Data Timeout Error
23958  *  0b1..Time out
23959  *  0b0..No Error
23960  */
23961 #define USDHC_INT_STATUS_DTOE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DTOE_SHIFT)) & USDHC_INT_STATUS_DTOE_MASK)
23962 
23963 #define USDHC_INT_STATUS_DCE_MASK                (0x200000U)
23964 #define USDHC_INT_STATUS_DCE_SHIFT               (21U)
23965 /*! DCE - Data CRC Error
23966  *  0b1..Error
23967  *  0b0..No Error
23968  */
23969 #define USDHC_INT_STATUS_DCE(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DCE_SHIFT)) & USDHC_INT_STATUS_DCE_MASK)
23970 
23971 #define USDHC_INT_STATUS_DEBE_MASK               (0x400000U)
23972 #define USDHC_INT_STATUS_DEBE_SHIFT              (22U)
23973 /*! DEBE - Data End Bit Error
23974  *  0b1..Error
23975  *  0b0..No Error
23976  */
23977 #define USDHC_INT_STATUS_DEBE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DEBE_SHIFT)) & USDHC_INT_STATUS_DEBE_MASK)
23978 
23979 #define USDHC_INT_STATUS_AC12E_MASK              (0x1000000U)
23980 #define USDHC_INT_STATUS_AC12E_SHIFT             (24U)
23981 /*! AC12E - Auto CMD12 Error
23982  *  0b1..Error
23983  *  0b0..No Error
23984  */
23985 #define USDHC_INT_STATUS_AC12E(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_AC12E_SHIFT)) & USDHC_INT_STATUS_AC12E_MASK)
23986 
23987 #define USDHC_INT_STATUS_DMAE_MASK               (0x10000000U)
23988 #define USDHC_INT_STATUS_DMAE_SHIFT              (28U)
23989 /*! DMAE - DMA Error
23990  *  0b1..Error
23991  *  0b0..No Error
23992  */
23993 #define USDHC_INT_STATUS_DMAE(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DMAE_SHIFT)) & USDHC_INT_STATUS_DMAE_MASK)
23994 /*! @} */
23995 
23996 /*! @name INT_STATUS_EN - Interrupt Status Enable */
23997 /*! @{ */
23998 
23999 #define USDHC_INT_STATUS_EN_CCSEN_MASK           (0x1U)
24000 #define USDHC_INT_STATUS_EN_CCSEN_SHIFT          (0U)
24001 /*! CCSEN - Command Complete Status Enable
24002  *  0b1..Enabled
24003  *  0b0..Masked
24004  */
24005 #define USDHC_INT_STATUS_EN_CCSEN(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CCSEN_SHIFT)) & USDHC_INT_STATUS_EN_CCSEN_MASK)
24006 
24007 #define USDHC_INT_STATUS_EN_TCSEN_MASK           (0x2U)
24008 #define USDHC_INT_STATUS_EN_TCSEN_SHIFT          (1U)
24009 /*! TCSEN - Transfer Complete Status Enable
24010  *  0b1..Enabled
24011  *  0b0..Masked
24012  */
24013 #define USDHC_INT_STATUS_EN_TCSEN(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_TCSEN_SHIFT)) & USDHC_INT_STATUS_EN_TCSEN_MASK)
24014 
24015 #define USDHC_INT_STATUS_EN_BGESEN_MASK          (0x4U)
24016 #define USDHC_INT_STATUS_EN_BGESEN_SHIFT         (2U)
24017 /*! BGESEN - Block Gap Event Status Enable
24018  *  0b1..Enabled
24019  *  0b0..Masked
24020  */
24021 #define USDHC_INT_STATUS_EN_BGESEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BGESEN_SHIFT)) & USDHC_INT_STATUS_EN_BGESEN_MASK)
24022 
24023 #define USDHC_INT_STATUS_EN_DINTSEN_MASK         (0x8U)
24024 #define USDHC_INT_STATUS_EN_DINTSEN_SHIFT        (3U)
24025 /*! DINTSEN - DMA Interrupt Status Enable
24026  *  0b1..Enabled
24027  *  0b0..Masked
24028  */
24029 #define USDHC_INT_STATUS_EN_DINTSEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DINTSEN_SHIFT)) & USDHC_INT_STATUS_EN_DINTSEN_MASK)
24030 
24031 #define USDHC_INT_STATUS_EN_BWRSEN_MASK          (0x10U)
24032 #define USDHC_INT_STATUS_EN_BWRSEN_SHIFT         (4U)
24033 /*! BWRSEN - Buffer Write Ready Status Enable
24034  *  0b1..Enabled
24035  *  0b0..Masked
24036  */
24037 #define USDHC_INT_STATUS_EN_BWRSEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BWRSEN_SHIFT)) & USDHC_INT_STATUS_EN_BWRSEN_MASK)
24038 
24039 #define USDHC_INT_STATUS_EN_BRRSEN_MASK          (0x20U)
24040 #define USDHC_INT_STATUS_EN_BRRSEN_SHIFT         (5U)
24041 /*! BRRSEN - Buffer Read Ready Status Enable
24042  *  0b1..Enabled
24043  *  0b0..Masked
24044  */
24045 #define USDHC_INT_STATUS_EN_BRRSEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BRRSEN_SHIFT)) & USDHC_INT_STATUS_EN_BRRSEN_MASK)
24046 
24047 #define USDHC_INT_STATUS_EN_CINSSEN_MASK         (0x40U)
24048 #define USDHC_INT_STATUS_EN_CINSSEN_SHIFT        (6U)
24049 /*! CINSSEN - Card Insertion Status Enable
24050  *  0b1..Enabled
24051  *  0b0..Masked
24052  */
24053 #define USDHC_INT_STATUS_EN_CINSSEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CINSSEN_SHIFT)) & USDHC_INT_STATUS_EN_CINSSEN_MASK)
24054 
24055 #define USDHC_INT_STATUS_EN_CRMSEN_MASK          (0x80U)
24056 #define USDHC_INT_STATUS_EN_CRMSEN_SHIFT         (7U)
24057 /*! CRMSEN - Card Removal Status Enable
24058  *  0b1..Enabled
24059  *  0b0..Masked
24060  */
24061 #define USDHC_INT_STATUS_EN_CRMSEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CRMSEN_SHIFT)) & USDHC_INT_STATUS_EN_CRMSEN_MASK)
24062 
24063 #define USDHC_INT_STATUS_EN_CINTSEN_MASK         (0x100U)
24064 #define USDHC_INT_STATUS_EN_CINTSEN_SHIFT        (8U)
24065 /*! CINTSEN - Card Interrupt Status Enable
24066  *  0b1..Enabled
24067  *  0b0..Masked
24068  */
24069 #define USDHC_INT_STATUS_EN_CINTSEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CINTSEN_SHIFT)) & USDHC_INT_STATUS_EN_CINTSEN_MASK)
24070 
24071 #define USDHC_INT_STATUS_EN_CTOESEN_MASK         (0x10000U)
24072 #define USDHC_INT_STATUS_EN_CTOESEN_SHIFT        (16U)
24073 /*! CTOESEN - Command Timeout Error Status Enable
24074  *  0b1..Enabled
24075  *  0b0..Masked
24076  */
24077 #define USDHC_INT_STATUS_EN_CTOESEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CTOESEN_SHIFT)) & USDHC_INT_STATUS_EN_CTOESEN_MASK)
24078 
24079 #define USDHC_INT_STATUS_EN_CCESEN_MASK          (0x20000U)
24080 #define USDHC_INT_STATUS_EN_CCESEN_SHIFT         (17U)
24081 /*! CCESEN - Command CRC Error Status Enable
24082  *  0b1..Enabled
24083  *  0b0..Masked
24084  */
24085 #define USDHC_INT_STATUS_EN_CCESEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CCESEN_SHIFT)) & USDHC_INT_STATUS_EN_CCESEN_MASK)
24086 
24087 #define USDHC_INT_STATUS_EN_CEBESEN_MASK         (0x40000U)
24088 #define USDHC_INT_STATUS_EN_CEBESEN_SHIFT        (18U)
24089 /*! CEBESEN - Command End Bit Error Status Enable
24090  *  0b1..Enabled
24091  *  0b0..Masked
24092  */
24093 #define USDHC_INT_STATUS_EN_CEBESEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CEBESEN_SHIFT)) & USDHC_INT_STATUS_EN_CEBESEN_MASK)
24094 
24095 #define USDHC_INT_STATUS_EN_CIESEN_MASK          (0x80000U)
24096 #define USDHC_INT_STATUS_EN_CIESEN_SHIFT         (19U)
24097 /*! CIESEN - Command Index Error Status Enable
24098  *  0b1..Enabled
24099  *  0b0..Masked
24100  */
24101 #define USDHC_INT_STATUS_EN_CIESEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CIESEN_SHIFT)) & USDHC_INT_STATUS_EN_CIESEN_MASK)
24102 
24103 #define USDHC_INT_STATUS_EN_DTOESEN_MASK         (0x100000U)
24104 #define USDHC_INT_STATUS_EN_DTOESEN_SHIFT        (20U)
24105 /*! DTOESEN - Data Timeout Error Status Enable
24106  *  0b1..Enabled
24107  *  0b0..Masked
24108  */
24109 #define USDHC_INT_STATUS_EN_DTOESEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DTOESEN_SHIFT)) & USDHC_INT_STATUS_EN_DTOESEN_MASK)
24110 
24111 #define USDHC_INT_STATUS_EN_DCESEN_MASK          (0x200000U)
24112 #define USDHC_INT_STATUS_EN_DCESEN_SHIFT         (21U)
24113 /*! DCESEN - Data CRC Error Status Enable
24114  *  0b1..Enabled
24115  *  0b0..Masked
24116  */
24117 #define USDHC_INT_STATUS_EN_DCESEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DCESEN_SHIFT)) & USDHC_INT_STATUS_EN_DCESEN_MASK)
24118 
24119 #define USDHC_INT_STATUS_EN_DEBESEN_MASK         (0x400000U)
24120 #define USDHC_INT_STATUS_EN_DEBESEN_SHIFT        (22U)
24121 /*! DEBESEN - Data End Bit Error Status Enable
24122  *  0b1..Enabled
24123  *  0b0..Masked
24124  */
24125 #define USDHC_INT_STATUS_EN_DEBESEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DEBESEN_SHIFT)) & USDHC_INT_STATUS_EN_DEBESEN_MASK)
24126 
24127 #define USDHC_INT_STATUS_EN_AC12ESEN_MASK        (0x1000000U)
24128 #define USDHC_INT_STATUS_EN_AC12ESEN_SHIFT       (24U)
24129 /*! AC12ESEN - Auto CMD12 Error Status Enable
24130  *  0b1..Enabled
24131  *  0b0..Masked
24132  */
24133 #define USDHC_INT_STATUS_EN_AC12ESEN(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_AC12ESEN_SHIFT)) & USDHC_INT_STATUS_EN_AC12ESEN_MASK)
24134 
24135 #define USDHC_INT_STATUS_EN_DMAESEN_MASK         (0x10000000U)
24136 #define USDHC_INT_STATUS_EN_DMAESEN_SHIFT        (28U)
24137 /*! DMAESEN - DMA Error Status Enable
24138  *  0b1..Enabled
24139  *  0b0..Masked
24140  */
24141 #define USDHC_INT_STATUS_EN_DMAESEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DMAESEN_SHIFT)) & USDHC_INT_STATUS_EN_DMAESEN_MASK)
24142 /*! @} */
24143 
24144 /*! @name INT_SIGNAL_EN - Interrupt Signal Enable */
24145 /*! @{ */
24146 
24147 #define USDHC_INT_SIGNAL_EN_CCIEN_MASK           (0x1U)
24148 #define USDHC_INT_SIGNAL_EN_CCIEN_SHIFT          (0U)
24149 /*! CCIEN - Command Complete Interrupt Enable
24150  *  0b1..Enabled
24151  *  0b0..Masked
24152  */
24153 #define USDHC_INT_SIGNAL_EN_CCIEN(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CCIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CCIEN_MASK)
24154 
24155 #define USDHC_INT_SIGNAL_EN_TCIEN_MASK           (0x2U)
24156 #define USDHC_INT_SIGNAL_EN_TCIEN_SHIFT          (1U)
24157 /*! TCIEN - Transfer Complete Interrupt Enable
24158  *  0b1..Enabled
24159  *  0b0..Masked
24160  */
24161 #define USDHC_INT_SIGNAL_EN_TCIEN(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_TCIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_TCIEN_MASK)
24162 
24163 #define USDHC_INT_SIGNAL_EN_BGEIEN_MASK          (0x4U)
24164 #define USDHC_INT_SIGNAL_EN_BGEIEN_SHIFT         (2U)
24165 /*! BGEIEN - Block Gap Event Interrupt Enable
24166  *  0b1..Enabled
24167  *  0b0..Masked
24168  */
24169 #define USDHC_INT_SIGNAL_EN_BGEIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BGEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BGEIEN_MASK)
24170 
24171 #define USDHC_INT_SIGNAL_EN_DINTIEN_MASK         (0x8U)
24172 #define USDHC_INT_SIGNAL_EN_DINTIEN_SHIFT        (3U)
24173 /*! DINTIEN - DMA Interrupt Enable
24174  *  0b1..Enabled
24175  *  0b0..Masked
24176  */
24177 #define USDHC_INT_SIGNAL_EN_DINTIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DINTIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DINTIEN_MASK)
24178 
24179 #define USDHC_INT_SIGNAL_EN_BWRIEN_MASK          (0x10U)
24180 #define USDHC_INT_SIGNAL_EN_BWRIEN_SHIFT         (4U)
24181 /*! BWRIEN - Buffer Write Ready Interrupt Enable
24182  *  0b1..Enabled
24183  *  0b0..Masked
24184  */
24185 #define USDHC_INT_SIGNAL_EN_BWRIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BWRIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BWRIEN_MASK)
24186 
24187 #define USDHC_INT_SIGNAL_EN_BRRIEN_MASK          (0x20U)
24188 #define USDHC_INT_SIGNAL_EN_BRRIEN_SHIFT         (5U)
24189 /*! BRRIEN - Buffer Read Ready Interrupt Enable
24190  *  0b1..Enabled
24191  *  0b0..Masked
24192  */
24193 #define USDHC_INT_SIGNAL_EN_BRRIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BRRIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BRRIEN_MASK)
24194 
24195 #define USDHC_INT_SIGNAL_EN_CINSIEN_MASK         (0x40U)
24196 #define USDHC_INT_SIGNAL_EN_CINSIEN_SHIFT        (6U)
24197 /*! CINSIEN - Card Insertion Interrupt Enable
24198  *  0b1..Enabled
24199  *  0b0..Masked
24200  */
24201 #define USDHC_INT_SIGNAL_EN_CINSIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CINSIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CINSIEN_MASK)
24202 
24203 #define USDHC_INT_SIGNAL_EN_CRMIEN_MASK          (0x80U)
24204 #define USDHC_INT_SIGNAL_EN_CRMIEN_SHIFT         (7U)
24205 /*! CRMIEN - Card Removal Interrupt Enable
24206  *  0b1..Enabled
24207  *  0b0..Masked
24208  */
24209 #define USDHC_INT_SIGNAL_EN_CRMIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CRMIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CRMIEN_MASK)
24210 
24211 #define USDHC_INT_SIGNAL_EN_CINTIEN_MASK         (0x100U)
24212 #define USDHC_INT_SIGNAL_EN_CINTIEN_SHIFT        (8U)
24213 /*! CINTIEN - Card Interrupt Interrupt Enable
24214  *  0b1..Enabled
24215  *  0b0..Masked
24216  */
24217 #define USDHC_INT_SIGNAL_EN_CINTIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CINTIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CINTIEN_MASK)
24218 
24219 #define USDHC_INT_SIGNAL_EN_CTOEIEN_MASK         (0x10000U)
24220 #define USDHC_INT_SIGNAL_EN_CTOEIEN_SHIFT        (16U)
24221 /*! CTOEIEN - Command Timeout Error Interrupt Enable
24222  *  0b1..Enabled
24223  *  0b0..Masked
24224  */
24225 #define USDHC_INT_SIGNAL_EN_CTOEIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CTOEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CTOEIEN_MASK)
24226 
24227 #define USDHC_INT_SIGNAL_EN_CCEIEN_MASK          (0x20000U)
24228 #define USDHC_INT_SIGNAL_EN_CCEIEN_SHIFT         (17U)
24229 /*! CCEIEN - Command CRC Error Interrupt Enable
24230  *  0b1..Enabled
24231  *  0b0..Masked
24232  */
24233 #define USDHC_INT_SIGNAL_EN_CCEIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CCEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CCEIEN_MASK)
24234 
24235 #define USDHC_INT_SIGNAL_EN_CEBEIEN_MASK         (0x40000U)
24236 #define USDHC_INT_SIGNAL_EN_CEBEIEN_SHIFT        (18U)
24237 /*! CEBEIEN - Command End Bit Error Interrupt Enable
24238  *  0b1..Enabled
24239  *  0b0..Masked
24240  */
24241 #define USDHC_INT_SIGNAL_EN_CEBEIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CEBEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CEBEIEN_MASK)
24242 
24243 #define USDHC_INT_SIGNAL_EN_CIEIEN_MASK          (0x80000U)
24244 #define USDHC_INT_SIGNAL_EN_CIEIEN_SHIFT         (19U)
24245 /*! CIEIEN - Command Index Error Interrupt Enable
24246  *  0b1..Enabled
24247  *  0b0..Masked
24248  */
24249 #define USDHC_INT_SIGNAL_EN_CIEIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CIEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CIEIEN_MASK)
24250 
24251 #define USDHC_INT_SIGNAL_EN_DTOEIEN_MASK         (0x100000U)
24252 #define USDHC_INT_SIGNAL_EN_DTOEIEN_SHIFT        (20U)
24253 /*! DTOEIEN - Data Timeout Error Interrupt Enable
24254  *  0b1..Enabled
24255  *  0b0..Masked
24256  */
24257 #define USDHC_INT_SIGNAL_EN_DTOEIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DTOEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DTOEIEN_MASK)
24258 
24259 #define USDHC_INT_SIGNAL_EN_DCEIEN_MASK          (0x200000U)
24260 #define USDHC_INT_SIGNAL_EN_DCEIEN_SHIFT         (21U)
24261 /*! DCEIEN - Data CRC Error Interrupt Enable
24262  *  0b1..Enabled
24263  *  0b0..Masked
24264  */
24265 #define USDHC_INT_SIGNAL_EN_DCEIEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DCEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DCEIEN_MASK)
24266 
24267 #define USDHC_INT_SIGNAL_EN_DEBEIEN_MASK         (0x400000U)
24268 #define USDHC_INT_SIGNAL_EN_DEBEIEN_SHIFT        (22U)
24269 /*! DEBEIEN - Data End Bit Error Interrupt Enable
24270  *  0b1..Enabled
24271  *  0b0..Masked
24272  */
24273 #define USDHC_INT_SIGNAL_EN_DEBEIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DEBEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DEBEIEN_MASK)
24274 
24275 #define USDHC_INT_SIGNAL_EN_AC12EIEN_MASK        (0x1000000U)
24276 #define USDHC_INT_SIGNAL_EN_AC12EIEN_SHIFT       (24U)
24277 /*! AC12EIEN - Auto CMD12 Error Interrupt Enable
24278  *  0b1..Enabled
24279  *  0b0..Masked
24280  */
24281 #define USDHC_INT_SIGNAL_EN_AC12EIEN(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_AC12EIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_AC12EIEN_MASK)
24282 
24283 #define USDHC_INT_SIGNAL_EN_DMAEIEN_MASK         (0x10000000U)
24284 #define USDHC_INT_SIGNAL_EN_DMAEIEN_SHIFT        (28U)
24285 /*! DMAEIEN - DMA Error Interrupt Enable
24286  *  0b1..Enable
24287  *  0b0..Masked
24288  */
24289 #define USDHC_INT_SIGNAL_EN_DMAEIEN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DMAEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DMAEIEN_MASK)
24290 /*! @} */
24291 
24292 /*! @name AUTOCMD12_ERR_STATUS - Auto CMD12 Error Status */
24293 /*! @{ */
24294 
24295 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE_MASK   (0x1U)
24296 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE_SHIFT  (0U)
24297 /*! AC12NE - Auto CMD12 Not Executed
24298  *  0b1..Not executed
24299  *  0b0..Executed
24300  */
24301 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE(x)     (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12NE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12NE_MASK)
24302 
24303 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_MASK  (0x2U)
24304 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_SHIFT (1U)
24305 /*! AC12TOE - Auto CMD12 / 23 Timeout Error
24306  *  0b1..Time out
24307  *  0b0..No error
24308  */
24309 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE(x)    (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_MASK)
24310 
24311 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_MASK  (0x4U)
24312 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_SHIFT (2U)
24313 /*! AC12EBE - Auto CMD12 / 23 End Bit Error
24314  *  0b1..End Bit Error Generated
24315  *  0b0..No error
24316  */
24317 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE(x)    (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_MASK)
24318 
24319 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE_MASK   (0x8U)
24320 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE_SHIFT  (3U)
24321 /*! AC12CE - Auto CMD12 / 23 CRC Error
24322  *  0b1..CRC Error Met in Auto CMD12/23 Response
24323  *  0b0..No CRC error
24324  */
24325 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE(x)     (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12CE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12CE_MASK)
24326 
24327 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE_MASK   (0x10U)
24328 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE_SHIFT  (4U)
24329 /*! AC12IE - Auto CMD12 / 23 Index Error
24330  *  0b1..Error, the CMD index in response is not CMD12/23
24331  *  0b0..No error
24332  */
24333 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE(x)     (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12IE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12IE_MASK)
24334 
24335 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_MASK (0x80U)
24336 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_SHIFT (7U)
24337 /*! CNIBAC12E - Command Not Issued By Auto CMD12 Error
24338  *  0b1..Not Issued
24339  *  0b0..No error
24340  */
24341 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E(x)  (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_MASK)
24342 /*! @} */
24343 
24344 /*! @name HOST_CTRL_CAP - Host Controller Capabilities */
24345 /*! @{ */
24346 
24347 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_MASK   (0x4U)
24348 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_SHIFT  (2U)
24349 /*! DDR50_SUPPORT - DDR50 support */
24350 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT(x)     (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_SHIFT)) & USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_MASK)
24351 
24352 #define USDHC_HOST_CTRL_CAP_MBL_MASK             (0x70000U)
24353 #define USDHC_HOST_CTRL_CAP_MBL_SHIFT            (16U)
24354 /*! MBL - Max Block Length
24355  *  0b000..512 bytes
24356  *  0b001..1024 bytes
24357  *  0b010..2048 bytes
24358  *  0b011..4096 bytes
24359  */
24360 #define USDHC_HOST_CTRL_CAP_MBL(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_MBL_SHIFT)) & USDHC_HOST_CTRL_CAP_MBL_MASK)
24361 
24362 #define USDHC_HOST_CTRL_CAP_ADMAS_MASK           (0x100000U)
24363 #define USDHC_HOST_CTRL_CAP_ADMAS_SHIFT          (20U)
24364 /*! ADMAS - ADMA Support
24365  *  0b1..Advanced DMA Supported
24366  *  0b0..Advanced DMA Not supported
24367  */
24368 #define USDHC_HOST_CTRL_CAP_ADMAS(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_ADMAS_SHIFT)) & USDHC_HOST_CTRL_CAP_ADMAS_MASK)
24369 
24370 #define USDHC_HOST_CTRL_CAP_HSS_MASK             (0x200000U)
24371 #define USDHC_HOST_CTRL_CAP_HSS_SHIFT            (21U)
24372 /*! HSS - High Speed Support
24373  *  0b1..High Speed Supported
24374  *  0b0..High Speed Not Supported
24375  */
24376 #define USDHC_HOST_CTRL_CAP_HSS(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_HSS_SHIFT)) & USDHC_HOST_CTRL_CAP_HSS_MASK)
24377 
24378 #define USDHC_HOST_CTRL_CAP_DMAS_MASK            (0x400000U)
24379 #define USDHC_HOST_CTRL_CAP_DMAS_SHIFT           (22U)
24380 /*! DMAS - DMA Support
24381  *  0b1..DMA Supported
24382  *  0b0..DMA not supported
24383  */
24384 #define USDHC_HOST_CTRL_CAP_DMAS(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_DMAS_SHIFT)) & USDHC_HOST_CTRL_CAP_DMAS_MASK)
24385 
24386 #define USDHC_HOST_CTRL_CAP_SRS_MASK             (0x800000U)
24387 #define USDHC_HOST_CTRL_CAP_SRS_SHIFT            (23U)
24388 /*! SRS - Suspend / Resume Support
24389  *  0b1..Supported
24390  *  0b0..Not supported
24391  */
24392 #define USDHC_HOST_CTRL_CAP_SRS(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_SRS_SHIFT)) & USDHC_HOST_CTRL_CAP_SRS_MASK)
24393 
24394 #define USDHC_HOST_CTRL_CAP_VS33_MASK            (0x1000000U)
24395 #define USDHC_HOST_CTRL_CAP_VS33_SHIFT           (24U)
24396 /*! VS33 - Voltage Support 3.3V
24397  *  0b1..3.3V supported
24398  *  0b0..3.3V not supported
24399  */
24400 #define USDHC_HOST_CTRL_CAP_VS33(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS33_SHIFT)) & USDHC_HOST_CTRL_CAP_VS33_MASK)
24401 
24402 #define USDHC_HOST_CTRL_CAP_VS30_MASK            (0x2000000U)
24403 #define USDHC_HOST_CTRL_CAP_VS30_SHIFT           (25U)
24404 /*! VS30 - Voltage Support 3.0 V
24405  *  0b1..3.0V supported
24406  *  0b0..3.0V not supported
24407  */
24408 #define USDHC_HOST_CTRL_CAP_VS30(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS30_SHIFT)) & USDHC_HOST_CTRL_CAP_VS30_MASK)
24409 
24410 #define USDHC_HOST_CTRL_CAP_VS18_MASK            (0x4000000U)
24411 #define USDHC_HOST_CTRL_CAP_VS18_SHIFT           (26U)
24412 /*! VS18 - Voltage Support 1.8 V
24413  *  0b1..1.8V supported
24414  *  0b0..1.8V not supported
24415  */
24416 #define USDHC_HOST_CTRL_CAP_VS18(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS18_SHIFT)) & USDHC_HOST_CTRL_CAP_VS18_MASK)
24417 /*! @} */
24418 
24419 /*! @name WTMK_LVL - Watermark Level */
24420 /*! @{ */
24421 
24422 #define USDHC_WTMK_LVL_RD_WML_MASK               (0xFFU)
24423 #define USDHC_WTMK_LVL_RD_WML_SHIFT              (0U)
24424 /*! RD_WML - Read Watermark Level */
24425 #define USDHC_WTMK_LVL_RD_WML(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_RD_WML_SHIFT)) & USDHC_WTMK_LVL_RD_WML_MASK)
24426 
24427 #define USDHC_WTMK_LVL_RD_BRST_LEN_MASK          (0x1F00U)
24428 #define USDHC_WTMK_LVL_RD_BRST_LEN_SHIFT         (8U)
24429 /*! RD_BRST_LEN - Read Burst Length Due to system restriction, the actual burst length may not exceed 16. */
24430 #define USDHC_WTMK_LVL_RD_BRST_LEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_RD_BRST_LEN_SHIFT)) & USDHC_WTMK_LVL_RD_BRST_LEN_MASK)
24431 
24432 #define USDHC_WTMK_LVL_WR_WML_MASK               (0xFF0000U)
24433 #define USDHC_WTMK_LVL_WR_WML_SHIFT              (16U)
24434 /*! WR_WML - Write Watermark Level */
24435 #define USDHC_WTMK_LVL_WR_WML(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_WR_WML_SHIFT)) & USDHC_WTMK_LVL_WR_WML_MASK)
24436 
24437 #define USDHC_WTMK_LVL_WR_BRST_LEN_MASK          (0x1F000000U)
24438 #define USDHC_WTMK_LVL_WR_BRST_LEN_SHIFT         (24U)
24439 /*! WR_BRST_LEN - Write Burst Length Due to system restriction, the actual burst length may not exceed 16. */
24440 #define USDHC_WTMK_LVL_WR_BRST_LEN(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_WR_BRST_LEN_SHIFT)) & USDHC_WTMK_LVL_WR_BRST_LEN_MASK)
24441 /*! @} */
24442 
24443 /*! @name MIX_CTRL - Mixer Control */
24444 /*! @{ */
24445 
24446 #define USDHC_MIX_CTRL_DMAEN_MASK                (0x1U)
24447 #define USDHC_MIX_CTRL_DMAEN_SHIFT               (0U)
24448 /*! DMAEN - DMA Enable
24449  *  0b1..Enable
24450  *  0b0..Disable
24451  */
24452 #define USDHC_MIX_CTRL_DMAEN(x)                  (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DMAEN_SHIFT)) & USDHC_MIX_CTRL_DMAEN_MASK)
24453 
24454 #define USDHC_MIX_CTRL_BCEN_MASK                 (0x2U)
24455 #define USDHC_MIX_CTRL_BCEN_SHIFT                (1U)
24456 /*! BCEN - Block Count Enable
24457  *  0b1..Enable
24458  *  0b0..Disable
24459  */
24460 #define USDHC_MIX_CTRL_BCEN(x)                   (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_BCEN_SHIFT)) & USDHC_MIX_CTRL_BCEN_MASK)
24461 
24462 #define USDHC_MIX_CTRL_AC12EN_MASK               (0x4U)
24463 #define USDHC_MIX_CTRL_AC12EN_SHIFT              (2U)
24464 /*! AC12EN - Auto CMD12 Enable
24465  *  0b1..Enable
24466  *  0b0..Disable
24467  */
24468 #define USDHC_MIX_CTRL_AC12EN(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_AC12EN_SHIFT)) & USDHC_MIX_CTRL_AC12EN_MASK)
24469 
24470 #define USDHC_MIX_CTRL_DDR_EN_MASK               (0x8U)
24471 #define USDHC_MIX_CTRL_DDR_EN_SHIFT              (3U)
24472 /*! DDR_EN - Dual Data Rate mode selection */
24473 #define USDHC_MIX_CTRL_DDR_EN(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DDR_EN_SHIFT)) & USDHC_MIX_CTRL_DDR_EN_MASK)
24474 
24475 #define USDHC_MIX_CTRL_DTDSEL_MASK               (0x10U)
24476 #define USDHC_MIX_CTRL_DTDSEL_SHIFT              (4U)
24477 /*! DTDSEL - Data Transfer Direction Select
24478  *  0b1..Read (Card to Host)
24479  *  0b0..Write (Host to Card)
24480  */
24481 #define USDHC_MIX_CTRL_DTDSEL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DTDSEL_SHIFT)) & USDHC_MIX_CTRL_DTDSEL_MASK)
24482 
24483 #define USDHC_MIX_CTRL_MSBSEL_MASK               (0x20U)
24484 #define USDHC_MIX_CTRL_MSBSEL_SHIFT              (5U)
24485 /*! MSBSEL - Multi / Single Block Select
24486  *  0b1..Multiple Blocks
24487  *  0b0..Single Block
24488  */
24489 #define USDHC_MIX_CTRL_MSBSEL(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_MSBSEL_SHIFT)) & USDHC_MIX_CTRL_MSBSEL_MASK)
24490 
24491 #define USDHC_MIX_CTRL_NIBBLE_POS_MASK           (0x40U)
24492 #define USDHC_MIX_CTRL_NIBBLE_POS_SHIFT          (6U)
24493 /*! NIBBLE_POS - NIBBLE_POS */
24494 #define USDHC_MIX_CTRL_NIBBLE_POS(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_NIBBLE_POS_SHIFT)) & USDHC_MIX_CTRL_NIBBLE_POS_MASK)
24495 
24496 #define USDHC_MIX_CTRL_AC23EN_MASK               (0x80U)
24497 #define USDHC_MIX_CTRL_AC23EN_SHIFT              (7U)
24498 /*! AC23EN - Auto CMD23 Enable */
24499 #define USDHC_MIX_CTRL_AC23EN(x)                 (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_AC23EN_SHIFT)) & USDHC_MIX_CTRL_AC23EN_MASK)
24500 /*! @} */
24501 
24502 /*! @name FORCE_EVENT - Force Event */
24503 /*! @{ */
24504 
24505 #define USDHC_FORCE_EVENT_FEVTAC12NE_MASK        (0x1U)
24506 #define USDHC_FORCE_EVENT_FEVTAC12NE_SHIFT       (0U)
24507 /*! FEVTAC12NE - Force Event Auto Command 12 Not Executed */
24508 #define USDHC_FORCE_EVENT_FEVTAC12NE(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12NE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12NE_MASK)
24509 
24510 #define USDHC_FORCE_EVENT_FEVTAC12TOE_MASK       (0x2U)
24511 #define USDHC_FORCE_EVENT_FEVTAC12TOE_SHIFT      (1U)
24512 /*! FEVTAC12TOE - Force Event Auto Command 12 Time Out Error */
24513 #define USDHC_FORCE_EVENT_FEVTAC12TOE(x)         (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12TOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12TOE_MASK)
24514 
24515 #define USDHC_FORCE_EVENT_FEVTAC12CE_MASK        (0x4U)
24516 #define USDHC_FORCE_EVENT_FEVTAC12CE_SHIFT       (2U)
24517 /*! FEVTAC12CE - Force Event Auto Command 12 CRC Error */
24518 #define USDHC_FORCE_EVENT_FEVTAC12CE(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12CE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12CE_MASK)
24519 
24520 #define USDHC_FORCE_EVENT_FEVTAC12EBE_MASK       (0x8U)
24521 #define USDHC_FORCE_EVENT_FEVTAC12EBE_SHIFT      (3U)
24522 /*! FEVTAC12EBE - Force Event Auto Command 12 End Bit Error */
24523 #define USDHC_FORCE_EVENT_FEVTAC12EBE(x)         (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12EBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12EBE_MASK)
24524 
24525 #define USDHC_FORCE_EVENT_FEVTAC12IE_MASK        (0x10U)
24526 #define USDHC_FORCE_EVENT_FEVTAC12IE_SHIFT       (4U)
24527 /*! FEVTAC12IE - Force Event Auto Command 12 Index Error */
24528 #define USDHC_FORCE_EVENT_FEVTAC12IE(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12IE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12IE_MASK)
24529 
24530 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E_MASK     (0x80U)
24531 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E_SHIFT    (7U)
24532 /*! FEVTCNIBAC12E - Force Event Command Not Executed By Auto Command 12 Error */
24533 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E(x)       (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCNIBAC12E_SHIFT)) & USDHC_FORCE_EVENT_FEVTCNIBAC12E_MASK)
24534 
24535 #define USDHC_FORCE_EVENT_FEVTCTOE_MASK          (0x10000U)
24536 #define USDHC_FORCE_EVENT_FEVTCTOE_SHIFT         (16U)
24537 /*! FEVTCTOE - Force Event Command Time Out Error */
24538 #define USDHC_FORCE_EVENT_FEVTCTOE(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCTOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCTOE_MASK)
24539 
24540 #define USDHC_FORCE_EVENT_FEVTCCE_MASK           (0x20000U)
24541 #define USDHC_FORCE_EVENT_FEVTCCE_SHIFT          (17U)
24542 /*! FEVTCCE - Force Event Command CRC Error */
24543 #define USDHC_FORCE_EVENT_FEVTCCE(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCCE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCCE_MASK)
24544 
24545 #define USDHC_FORCE_EVENT_FEVTCEBE_MASK          (0x40000U)
24546 #define USDHC_FORCE_EVENT_FEVTCEBE_SHIFT         (18U)
24547 /*! FEVTCEBE - Force Event Command End Bit Error */
24548 #define USDHC_FORCE_EVENT_FEVTCEBE(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCEBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCEBE_MASK)
24549 
24550 #define USDHC_FORCE_EVENT_FEVTCIE_MASK           (0x80000U)
24551 #define USDHC_FORCE_EVENT_FEVTCIE_SHIFT          (19U)
24552 /*! FEVTCIE - Force Event Command Index Error */
24553 #define USDHC_FORCE_EVENT_FEVTCIE(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCIE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCIE_MASK)
24554 
24555 #define USDHC_FORCE_EVENT_FEVTDTOE_MASK          (0x100000U)
24556 #define USDHC_FORCE_EVENT_FEVTDTOE_SHIFT         (20U)
24557 /*! FEVTDTOE - Force Event Data Time Out Error */
24558 #define USDHC_FORCE_EVENT_FEVTDTOE(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDTOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDTOE_MASK)
24559 
24560 #define USDHC_FORCE_EVENT_FEVTDCE_MASK           (0x200000U)
24561 #define USDHC_FORCE_EVENT_FEVTDCE_SHIFT          (21U)
24562 /*! FEVTDCE - Force Event Data CRC Error */
24563 #define USDHC_FORCE_EVENT_FEVTDCE(x)             (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDCE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDCE_MASK)
24564 
24565 #define USDHC_FORCE_EVENT_FEVTDEBE_MASK          (0x400000U)
24566 #define USDHC_FORCE_EVENT_FEVTDEBE_SHIFT         (22U)
24567 /*! FEVTDEBE - Force Event Data End Bit Error */
24568 #define USDHC_FORCE_EVENT_FEVTDEBE(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDEBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDEBE_MASK)
24569 
24570 #define USDHC_FORCE_EVENT_FEVTAC12E_MASK         (0x1000000U)
24571 #define USDHC_FORCE_EVENT_FEVTAC12E_SHIFT        (24U)
24572 /*! FEVTAC12E - Force Event Auto Command 12 Error */
24573 #define USDHC_FORCE_EVENT_FEVTAC12E(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12E_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12E_MASK)
24574 
24575 #define USDHC_FORCE_EVENT_FEVTDMAE_MASK          (0x10000000U)
24576 #define USDHC_FORCE_EVENT_FEVTDMAE_SHIFT         (28U)
24577 /*! FEVTDMAE - Force Event DMA Error */
24578 #define USDHC_FORCE_EVENT_FEVTDMAE(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDMAE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDMAE_MASK)
24579 
24580 #define USDHC_FORCE_EVENT_FEVTCINT_MASK          (0x80000000U)
24581 #define USDHC_FORCE_EVENT_FEVTCINT_SHIFT         (31U)
24582 /*! FEVTCINT - Force Event Card Interrupt */
24583 #define USDHC_FORCE_EVENT_FEVTCINT(x)            (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCINT_SHIFT)) & USDHC_FORCE_EVENT_FEVTCINT_MASK)
24584 /*! @} */
24585 
24586 /*! @name ADMA_ERR_STATUS - ADMA Error Status Register */
24587 /*! @{ */
24588 
24589 #define USDHC_ADMA_ERR_STATUS_ADMAES_MASK        (0x3U)
24590 #define USDHC_ADMA_ERR_STATUS_ADMAES_SHIFT       (0U)
24591 /*! ADMAES - ADMA Error State (when ADMA Error is occurred) */
24592 #define USDHC_ADMA_ERR_STATUS_ADMAES(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMAES_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMAES_MASK)
24593 
24594 #define USDHC_ADMA_ERR_STATUS_ADMALME_MASK       (0x4U)
24595 #define USDHC_ADMA_ERR_STATUS_ADMALME_SHIFT      (2U)
24596 /*! ADMALME - ADMA Length Mismatch Error
24597  *  0b1..Error
24598  *  0b0..No Error
24599  */
24600 #define USDHC_ADMA_ERR_STATUS_ADMALME(x)         (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMALME_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMALME_MASK)
24601 
24602 #define USDHC_ADMA_ERR_STATUS_ADMADCE_MASK       (0x8U)
24603 #define USDHC_ADMA_ERR_STATUS_ADMADCE_SHIFT      (3U)
24604 /*! ADMADCE - ADMA Descriptor Error
24605  *  0b1..Error
24606  *  0b0..No Error
24607  */
24608 #define USDHC_ADMA_ERR_STATUS_ADMADCE(x)         (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMADCE_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMADCE_MASK)
24609 /*! @} */
24610 
24611 /*! @name ADMA_SYS_ADDR - ADMA System Address */
24612 /*! @{ */
24613 
24614 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR_MASK        (0xFFFFFFFCU)
24615 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR_SHIFT       (2U)
24616 /*! ADS_ADDR - ADMA System Address */
24617 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_SYS_ADDR_ADS_ADDR_SHIFT)) & USDHC_ADMA_SYS_ADDR_ADS_ADDR_MASK)
24618 /*! @} */
24619 
24620 /*! @name VEND_SPEC - Vendor Specific Register */
24621 /*! @{ */
24622 
24623 #define USDHC_VEND_SPEC_VSELECT_MASK             (0x2U)
24624 #define USDHC_VEND_SPEC_VSELECT_SHIFT            (1U)
24625 /*! VSELECT - Voltage Selection
24626  *  0b1..Change the voltage to low voltage range, around 1.8 V
24627  *  0b0..Change the voltage to high voltage range, around 3.0 V
24628  */
24629 #define USDHC_VEND_SPEC_VSELECT(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_VSELECT_SHIFT)) & USDHC_VEND_SPEC_VSELECT_MASK)
24630 
24631 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN_MASK     (0x4U)
24632 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN_SHIFT    (2U)
24633 /*! CONFLICT_CHK_EN - Conflict check enable.
24634  *  0b0..Conflict check disable
24635  *  0b1..Conflict check enable
24636  */
24637 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN(x)       (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CONFLICT_CHK_EN_SHIFT)) & USDHC_VEND_SPEC_CONFLICT_CHK_EN_MASK)
24638 
24639 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_MASK  (0x8U)
24640 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_SHIFT (3U)
24641 /*! AC12_WR_CHKBUSY_EN - AC12_WR_CHKBUSY_EN
24642  *  0b0..Do not check busy after auto CMD12 for write data packet
24643  *  0b1..Check busy after auto CMD12 for write data packet
24644  */
24645 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN(x)    (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_SHIFT)) & USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_MASK)
24646 
24647 #define USDHC_VEND_SPEC_FRC_SDCLK_ON_MASK        (0x100U)
24648 #define USDHC_VEND_SPEC_FRC_SDCLK_ON_SHIFT       (8U)
24649 /*! FRC_SDCLK_ON - FRC_SDCLK_ON
24650  *  0b0..CLK active or inactive is fully controlled by the hardware.
24651  *  0b1..Force CLK active.
24652  */
24653 #define USDHC_VEND_SPEC_FRC_SDCLK_ON(x)          (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_FRC_SDCLK_ON_SHIFT)) & USDHC_VEND_SPEC_FRC_SDCLK_ON_MASK)
24654 
24655 #define USDHC_VEND_SPEC_CRC_CHK_DIS_MASK         (0x8000U)
24656 #define USDHC_VEND_SPEC_CRC_CHK_DIS_SHIFT        (15U)
24657 /*! CRC_CHK_DIS - CRC Check Disable
24658  *  0b0..Check CRC16 for every read data packet and check CRC bits for every write data packet
24659  *  0b1..Ignore CRC16 check for every read data packet and ignore CRC bits check for every write data packet
24660  */
24661 #define USDHC_VEND_SPEC_CRC_CHK_DIS(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CRC_CHK_DIS_SHIFT)) & USDHC_VEND_SPEC_CRC_CHK_DIS_MASK)
24662 
24663 #define USDHC_VEND_SPEC_CMD_BYTE_EN_MASK         (0x80000000U)
24664 #define USDHC_VEND_SPEC_CMD_BYTE_EN_SHIFT        (31U)
24665 /*! CMD_BYTE_EN - CMD_BYTE_EN
24666  *  0b0..Disable
24667  *  0b1..Enable
24668  */
24669 #define USDHC_VEND_SPEC_CMD_BYTE_EN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CMD_BYTE_EN_SHIFT)) & USDHC_VEND_SPEC_CMD_BYTE_EN_MASK)
24670 /*! @} */
24671 
24672 /*! @name MMC_BOOT - MMC Boot Register */
24673 /*! @{ */
24674 
24675 #define USDHC_MMC_BOOT_DTOCV_ACK_MASK            (0xFU)
24676 #define USDHC_MMC_BOOT_DTOCV_ACK_SHIFT           (0U)
24677 /*! DTOCV_ACK - DTOCV_ACK
24678  *  0b0000..SDCLK x 2^14
24679  *  0b0001..SDCLK x 2^15
24680  *  0b0010..SDCLK x 2^16
24681  *  0b0011..SDCLK x 2^17
24682  *  0b0100..SDCLK x 2^18
24683  *  0b0101..SDCLK x 2^19
24684  *  0b0110..SDCLK x 2^20
24685  *  0b0111..SDCLK x 2^21
24686  *  0b1110..SDCLK x 2^28
24687  *  0b1111..SDCLK x 2^29
24688  */
24689 #define USDHC_MMC_BOOT_DTOCV_ACK(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_DTOCV_ACK_SHIFT)) & USDHC_MMC_BOOT_DTOCV_ACK_MASK)
24690 
24691 #define USDHC_MMC_BOOT_BOOT_ACK_MASK             (0x10U)
24692 #define USDHC_MMC_BOOT_BOOT_ACK_SHIFT            (4U)
24693 /*! BOOT_ACK - BOOT_ACK
24694  *  0b0..No ack
24695  *  0b1..Ack
24696  */
24697 #define USDHC_MMC_BOOT_BOOT_ACK(x)               (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_ACK_SHIFT)) & USDHC_MMC_BOOT_BOOT_ACK_MASK)
24698 
24699 #define USDHC_MMC_BOOT_BOOT_MODE_MASK            (0x20U)
24700 #define USDHC_MMC_BOOT_BOOT_MODE_SHIFT           (5U)
24701 /*! BOOT_MODE - BOOT_MODE
24702  *  0b0..Normal boot
24703  *  0b1..Alternative boot
24704  */
24705 #define USDHC_MMC_BOOT_BOOT_MODE(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_MODE_SHIFT)) & USDHC_MMC_BOOT_BOOT_MODE_MASK)
24706 
24707 #define USDHC_MMC_BOOT_BOOT_EN_MASK              (0x40U)
24708 #define USDHC_MMC_BOOT_BOOT_EN_SHIFT             (6U)
24709 /*! BOOT_EN - BOOT_EN
24710  *  0b0..Fast boot disable
24711  *  0b1..Fast boot enable
24712  */
24713 #define USDHC_MMC_BOOT_BOOT_EN(x)                (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_EN_SHIFT)) & USDHC_MMC_BOOT_BOOT_EN_MASK)
24714 
24715 #define USDHC_MMC_BOOT_AUTO_SABG_EN_MASK         (0x80U)
24716 #define USDHC_MMC_BOOT_AUTO_SABG_EN_SHIFT        (7U)
24717 /*! AUTO_SABG_EN - AUTO_SABG_EN */
24718 #define USDHC_MMC_BOOT_AUTO_SABG_EN(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_AUTO_SABG_EN_SHIFT)) & USDHC_MMC_BOOT_AUTO_SABG_EN_MASK)
24719 
24720 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT_MASK     (0x100U)
24721 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT_SHIFT    (8U)
24722 /*! DISABLE_TIME_OUT - Disable Time Out
24723  *  0b0..Enable time out
24724  *  0b1..Disable time out
24725  */
24726 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT(x)       (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_DISABLE_TIME_OUT_SHIFT)) & USDHC_MMC_BOOT_DISABLE_TIME_OUT_MASK)
24727 
24728 #define USDHC_MMC_BOOT_BOOT_BLK_CNT_MASK         (0xFFFF0000U)
24729 #define USDHC_MMC_BOOT_BOOT_BLK_CNT_SHIFT        (16U)
24730 /*! BOOT_BLK_CNT - BOOT_BLK_CNT */
24731 #define USDHC_MMC_BOOT_BOOT_BLK_CNT(x)           (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_BLK_CNT_SHIFT)) & USDHC_MMC_BOOT_BOOT_BLK_CNT_MASK)
24732 /*! @} */
24733 
24734 /*! @name VEND_SPEC2 - Vendor Specific 2 Register */
24735 /*! @{ */
24736 
24737 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST_MASK   (0x8U)
24738 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST_SHIFT  (3U)
24739 /*! CARD_INT_D3_TEST - Card Interrupt Detection Test
24740  *  0b0..Check the card interrupt only when DATA3 is high.
24741  *  0b1..Check the card interrupt by ignoring the status of DATA3.
24742  */
24743 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST(x)     (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_CARD_INT_D3_TEST_SHIFT)) & USDHC_VEND_SPEC2_CARD_INT_D3_TEST_MASK)
24744 
24745 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_MASK    (0x1000U)
24746 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_SHIFT   (12U)
24747 /*! ACMD23_ARGU2_EN - Argument2 register enable for ACMD23
24748  *  0b1..Argument2 register enable for ACMD23 sharing with SDMA system address register. Default is enable.
24749  *  0b0..Disable
24750  */
24751 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN(x)      (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_SHIFT)) & USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_MASK)
24752 
24753 #define USDHC_VEND_SPEC2_AHB_RST_MASK            (0x4000U)
24754 #define USDHC_VEND_SPEC2_AHB_RST_SHIFT           (14U)
24755 /*! AHB_RST - AHB BUS reset */
24756 #define USDHC_VEND_SPEC2_AHB_RST(x)              (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_AHB_RST_SHIFT)) & USDHC_VEND_SPEC2_AHB_RST_MASK)
24757 /*! @} */
24758 
24759 
24760 /*!
24761  * @}
24762  */ /* end of group USDHC_Register_Masks */
24763 
24764 
24765 /* USDHC - Peripheral instance base addresses */
24766 /** Peripheral USDHC0 base address */
24767 #define USDHC0_BASE                              (0x4003E000u)
24768 /** Peripheral USDHC0 base pointer */
24769 #define USDHC0                                   ((USDHC_Type *)USDHC0_BASE)
24770 /** Array initializer of USDHC peripheral base addresses */
24771 #define USDHC_BASE_ADDRS                         { USDHC0_BASE }
24772 /** Array initializer of USDHC peripheral base pointers */
24773 #define USDHC_BASE_PTRS                          { USDHC0 }
24774 /** Interrupt vectors for the USDHC peripheral type */
24775 #define USDHC_IRQS                               { USDHC0_IRQn }
24776 
24777 /*!
24778  * @}
24779  */ /* end of group USDHC_Peripheral_Access_Layer */
24780 
24781 
24782 /* ----------------------------------------------------------------------------
24783    -- VREF Peripheral Access Layer
24784    ---------------------------------------------------------------------------- */
24785 
24786 /*!
24787  * @addtogroup VREF_Peripheral_Access_Layer VREF Peripheral Access Layer
24788  * @{
24789  */
24790 
24791 /** VREF - Register Layout Typedef */
24792 typedef struct {
24793   __IO uint8_t TRM;                                /**< VREF Trim Register, offset: 0x0 */
24794   __IO uint8_t SC;                                 /**< VREF Status and Control Register, offset: 0x1 */
24795        uint8_t RESERVED_0[3];
24796   __IO uint8_t TRM4;                               /**< VREF Trim 2.1V Register, offset: 0x5 */
24797 } VREF_Type;
24798 
24799 /* ----------------------------------------------------------------------------
24800    -- VREF Register Masks
24801    ---------------------------------------------------------------------------- */
24802 
24803 /*!
24804  * @addtogroup VREF_Register_Masks VREF Register Masks
24805  * @{
24806  */
24807 
24808 /*! @name TRM - VREF Trim Register */
24809 /*! @{ */
24810 
24811 #define VREF_TRM_TRIM_MASK                       (0x3FU)
24812 #define VREF_TRM_TRIM_SHIFT                      (0U)
24813 /*! TRIM - Trim bits
24814  *  0b000000..Min
24815  *  0b111111..Max
24816  */
24817 #define VREF_TRM_TRIM(x)                         (((uint8_t)(((uint8_t)(x)) << VREF_TRM_TRIM_SHIFT)) & VREF_TRM_TRIM_MASK)
24818 
24819 #define VREF_TRM_CHOPEN_MASK                     (0x40U)
24820 #define VREF_TRM_CHOPEN_SHIFT                    (6U)
24821 /*! CHOPEN - Chop oscillator enable. When set, the internal chopping operation is enabled and the
24822  *    internal analog offset will be minimized.
24823  *  0b0..Chop oscillator is disabled.
24824  *  0b1..Chop oscillator is enabled.
24825  */
24826 #define VREF_TRM_CHOPEN(x)                       (((uint8_t)(((uint8_t)(x)) << VREF_TRM_CHOPEN_SHIFT)) & VREF_TRM_CHOPEN_MASK)
24827 /*! @} */
24828 
24829 /*! @name SC - VREF Status and Control Register */
24830 /*! @{ */
24831 
24832 #define VREF_SC_MODE_LV_MASK                     (0x3U)
24833 #define VREF_SC_MODE_LV_SHIFT                    (0U)
24834 /*! MODE_LV - Buffer Mode selection
24835  *  0b00..Bandgap on only, for stabilization and startup
24836  *  0b01..High power buffer mode enabled
24837  *  0b10..Low-power buffer mode enabled
24838  *  0b11..Reserved
24839  */
24840 #define VREF_SC_MODE_LV(x)                       (((uint8_t)(((uint8_t)(x)) << VREF_SC_MODE_LV_SHIFT)) & VREF_SC_MODE_LV_MASK)
24841 
24842 #define VREF_SC_VREFST_MASK                      (0x4U)
24843 #define VREF_SC_VREFST_SHIFT                     (2U)
24844 /*! VREFST - Internal Voltage Reference stable
24845  *  0b0..The module is disabled or not stable.
24846  *  0b1..The module is stable.
24847  */
24848 #define VREF_SC_VREFST(x)                        (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFST_SHIFT)) & VREF_SC_VREFST_MASK)
24849 
24850 #define VREF_SC_ICOMPEN_MASK                     (0x20U)
24851 #define VREF_SC_ICOMPEN_SHIFT                    (5U)
24852 /*! ICOMPEN - Second order curvature compensation enable
24853  *  0b0..Disabled
24854  *  0b1..Enabled
24855  */
24856 #define VREF_SC_ICOMPEN(x)                       (((uint8_t)(((uint8_t)(x)) << VREF_SC_ICOMPEN_SHIFT)) & VREF_SC_ICOMPEN_MASK)
24857 
24858 #define VREF_SC_REGEN_MASK                       (0x40U)
24859 #define VREF_SC_REGEN_SHIFT                      (6U)
24860 /*! REGEN - Regulator enable
24861  *  0b0..Internal 1.75 V regulator is disabled.
24862  *  0b1..Internal 1.75 V regulator is enabled.
24863  */
24864 #define VREF_SC_REGEN(x)                         (((uint8_t)(((uint8_t)(x)) << VREF_SC_REGEN_SHIFT)) & VREF_SC_REGEN_MASK)
24865 
24866 #define VREF_SC_VREFEN_MASK                      (0x80U)
24867 #define VREF_SC_VREFEN_SHIFT                     (7U)
24868 /*! VREFEN - Internal Voltage Reference enable
24869  *  0b0..The module is disabled.
24870  *  0b1..The module is enabled.
24871  */
24872 #define VREF_SC_VREFEN(x)                        (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFEN_SHIFT)) & VREF_SC_VREFEN_MASK)
24873 /*! @} */
24874 
24875 /*! @name TRM4 - VREF Trim 2.1V Register */
24876 /*! @{ */
24877 
24878 #define VREF_TRM4_TRIM2V1_MASK                   (0x3FU)
24879 #define VREF_TRM4_TRIM2V1_SHIFT                  (0U)
24880 /*! TRIM2V1 - VREF 2.1V Trim Bits
24881  *  0b000000..Max
24882  *  0b111111..Min
24883  */
24884 #define VREF_TRM4_TRIM2V1(x)                     (((uint8_t)(((uint8_t)(x)) << VREF_TRM4_TRIM2V1_SHIFT)) & VREF_TRM4_TRIM2V1_MASK)
24885 
24886 #define VREF_TRM4_VREF2V1_EN_MASK                (0x80U)
24887 #define VREF_TRM4_VREF2V1_EN_SHIFT               (7U)
24888 /*! VREF2V1_EN - Internal Voltage Reference (2.1V) Enable
24889  *  0b0..VREF 2.1V is enabled
24890  *  0b1..VREF 2.1V is disabled
24891  */
24892 #define VREF_TRM4_VREF2V1_EN(x)                  (((uint8_t)(((uint8_t)(x)) << VREF_TRM4_VREF2V1_EN_SHIFT)) & VREF_TRM4_VREF2V1_EN_MASK)
24893 /*! @} */
24894 
24895 
24896 /*!
24897  * @}
24898  */ /* end of group VREF_Register_Masks */
24899 
24900 
24901 /* VREF - Peripheral instance base addresses */
24902 /** Peripheral VREF base address */
24903 #define VREF_BASE                                (0x4004D000u)
24904 /** Peripheral VREF base pointer */
24905 #define VREF                                     ((VREF_Type *)VREF_BASE)
24906 /** Array initializer of VREF peripheral base addresses */
24907 #define VREF_BASE_ADDRS                          { VREF_BASE }
24908 /** Array initializer of VREF peripheral base pointers */
24909 #define VREF_BASE_PTRS                           { VREF }
24910 
24911 /*!
24912  * @}
24913  */ /* end of group VREF_Peripheral_Access_Layer */
24914 
24915 
24916 /* ----------------------------------------------------------------------------
24917    -- WDOG Peripheral Access Layer
24918    ---------------------------------------------------------------------------- */
24919 
24920 /*!
24921  * @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer
24922  * @{
24923  */
24924 
24925 /** WDOG - Register Layout Typedef */
24926 typedef struct {
24927   __IO uint32_t CS;                                /**< Watchdog Control and Status Register, offset: 0x0 */
24928   __IO uint32_t CNT;                               /**< Watchdog Counter Register, offset: 0x4 */
24929   __IO uint32_t TOVAL;                             /**< Watchdog Timeout Value Register, offset: 0x8 */
24930   __IO uint32_t WIN;                               /**< Watchdog Window Register, offset: 0xC */
24931 } WDOG_Type;
24932 
24933 /* ----------------------------------------------------------------------------
24934    -- WDOG Register Masks
24935    ---------------------------------------------------------------------------- */
24936 
24937 /*!
24938  * @addtogroup WDOG_Register_Masks WDOG Register Masks
24939  * @{
24940  */
24941 
24942 /*! @name CS - Watchdog Control and Status Register */
24943 /*! @{ */
24944 
24945 #define WDOG_CS_STOP_MASK                        (0x1U)
24946 #define WDOG_CS_STOP_SHIFT                       (0U)
24947 /*! STOP - Stop Enable
24948  *  0b0..Watchdog disabled in chip stop mode.
24949  *  0b1..Watchdog enabled in chip stop mode.
24950  */
24951 #define WDOG_CS_STOP(x)                          (((uint32_t)(((uint32_t)(x)) << WDOG_CS_STOP_SHIFT)) & WDOG_CS_STOP_MASK)
24952 
24953 #define WDOG_CS_WAIT_MASK                        (0x2U)
24954 #define WDOG_CS_WAIT_SHIFT                       (1U)
24955 /*! WAIT - Wait Enable
24956  *  0b0..Watchdog disabled in chip wait mode.
24957  *  0b1..Watchdog enabled in chip wait mode.
24958  */
24959 #define WDOG_CS_WAIT(x)                          (((uint32_t)(((uint32_t)(x)) << WDOG_CS_WAIT_SHIFT)) & WDOG_CS_WAIT_MASK)
24960 
24961 #define WDOG_CS_DBG_MASK                         (0x4U)
24962 #define WDOG_CS_DBG_SHIFT                        (2U)
24963 /*! DBG - Debug Enable
24964  *  0b0..Watchdog disabled in chip debug mode.
24965  *  0b1..Watchdog enabled in chip debug mode.
24966  */
24967 #define WDOG_CS_DBG(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_DBG_SHIFT)) & WDOG_CS_DBG_MASK)
24968 
24969 #define WDOG_CS_TST_MASK                         (0x18U)
24970 #define WDOG_CS_TST_SHIFT                        (3U)
24971 /*! TST - Watchdog Test
24972  *  0b00..Watchdog test mode disabled.
24973  *  0b01..Watchdog user mode enabled. (Watchdog test mode disabled.) After testing the watchdog, software should
24974  *        use this setting to indicate that the watchdog is functioning normally in user mode.
24975  *  0b10..Watchdog test mode enabled, only the low byte is used. CNT[CNTLOW] is compared with TOVAL[TOVALLOW].
24976  *  0b11..Watchdog test mode enabled, only the high byte is used. CNT[CNTHIGH] is compared with TOVAL[TOVALHIGH].
24977  */
24978 #define WDOG_CS_TST(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_TST_SHIFT)) & WDOG_CS_TST_MASK)
24979 
24980 #define WDOG_CS_UPDATE_MASK                      (0x20U)
24981 #define WDOG_CS_UPDATE_SHIFT                     (5U)
24982 /*! UPDATE - Allow updates
24983  *  0b0..Updates not allowed. After the initial configuration, the watchdog cannot be later modified without forcing a reset.
24984  *  0b1..Updates allowed. Software can modify the watchdog configuration registers within 128 bus clocks after performing the unlock write sequence.
24985  */
24986 #define WDOG_CS_UPDATE(x)                        (((uint32_t)(((uint32_t)(x)) << WDOG_CS_UPDATE_SHIFT)) & WDOG_CS_UPDATE_MASK)
24987 
24988 #define WDOG_CS_INT_MASK                         (0x40U)
24989 #define WDOG_CS_INT_SHIFT                        (6U)
24990 /*! INT - Watchdog Interrupt
24991  *  0b0..Watchdog interrupts are disabled. Watchdog resets are not delayed.
24992  *  0b1..Watchdog interrupts are enabled. Watchdog resets are delayed by 128 bus clocks from the interrupt vector fetch.
24993  */
24994 #define WDOG_CS_INT(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_INT_SHIFT)) & WDOG_CS_INT_MASK)
24995 
24996 #define WDOG_CS_EN_MASK                          (0x80U)
24997 #define WDOG_CS_EN_SHIFT                         (7U)
24998 /*! EN - Watchdog Enable
24999  *  0b0..Watchdog disabled.
25000  *  0b1..Watchdog enabled.
25001  */
25002 #define WDOG_CS_EN(x)                            (((uint32_t)(((uint32_t)(x)) << WDOG_CS_EN_SHIFT)) & WDOG_CS_EN_MASK)
25003 
25004 #define WDOG_CS_CLK_MASK                         (0x300U)
25005 #define WDOG_CS_CLK_SHIFT                        (8U)
25006 /*! CLK - Watchdog Clock
25007  *  0b00..Bus clock
25008  *  0b01..LPO clock
25009  *  0b10..INTCLK (internal clock)
25010  *  0b11..ERCLK (external reference clock)
25011  */
25012 #define WDOG_CS_CLK(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_CLK_SHIFT)) & WDOG_CS_CLK_MASK)
25013 
25014 #define WDOG_CS_RCS_MASK                         (0x400U)
25015 #define WDOG_CS_RCS_SHIFT                        (10U)
25016 /*! RCS - Reconfiguration Success
25017  *  0b0..Reconfiguring WDOG.
25018  *  0b1..Reconfiguration is successful.
25019  */
25020 #define WDOG_CS_RCS(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_RCS_SHIFT)) & WDOG_CS_RCS_MASK)
25021 
25022 #define WDOG_CS_ULK_MASK                         (0x800U)
25023 #define WDOG_CS_ULK_SHIFT                        (11U)
25024 /*! ULK - Unlock status
25025  *  0b0..WDOG is locked.
25026  *  0b1..WDOG is unlocked.
25027  */
25028 #define WDOG_CS_ULK(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_ULK_SHIFT)) & WDOG_CS_ULK_MASK)
25029 
25030 #define WDOG_CS_PRES_MASK                        (0x1000U)
25031 #define WDOG_CS_PRES_SHIFT                       (12U)
25032 /*! PRES - Watchdog prescaler
25033  *  0b0..256 prescaler disabled.
25034  *  0b1..256 prescaler enabled.
25035  */
25036 #define WDOG_CS_PRES(x)                          (((uint32_t)(((uint32_t)(x)) << WDOG_CS_PRES_SHIFT)) & WDOG_CS_PRES_MASK)
25037 
25038 #define WDOG_CS_CMD32EN_MASK                     (0x2000U)
25039 #define WDOG_CS_CMD32EN_SHIFT                    (13U)
25040 /*! CMD32EN - Enables or disables WDOG support for 32-bit (otherwise 16-bit or 8-bit) refresh/unlock command write words
25041  *  0b0..Disables support for 32-bit refresh/unlock command write words. Only 16-bit or 8-bit is supported.
25042  *  0b1..Enables support for 32-bit refresh/unlock command write words. 16-bit or 8-bit is NOT supported.
25043  */
25044 #define WDOG_CS_CMD32EN(x)                       (((uint32_t)(((uint32_t)(x)) << WDOG_CS_CMD32EN_SHIFT)) & WDOG_CS_CMD32EN_MASK)
25045 
25046 #define WDOG_CS_FLG_MASK                         (0x4000U)
25047 #define WDOG_CS_FLG_SHIFT                        (14U)
25048 /*! FLG - Watchdog Interrupt Flag
25049  *  0b0..No interrupt occurred.
25050  *  0b1..An interrupt occurred.
25051  */
25052 #define WDOG_CS_FLG(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_FLG_SHIFT)) & WDOG_CS_FLG_MASK)
25053 
25054 #define WDOG_CS_WIN_MASK                         (0x8000U)
25055 #define WDOG_CS_WIN_SHIFT                        (15U)
25056 /*! WIN - Watchdog Window
25057  *  0b0..Window mode disabled.
25058  *  0b1..Window mode enabled.
25059  */
25060 #define WDOG_CS_WIN(x)                           (((uint32_t)(((uint32_t)(x)) << WDOG_CS_WIN_SHIFT)) & WDOG_CS_WIN_MASK)
25061 /*! @} */
25062 
25063 /*! @name CNT - Watchdog Counter Register */
25064 /*! @{ */
25065 
25066 #define WDOG_CNT_CNTLOW_MASK                     (0xFFU)
25067 #define WDOG_CNT_CNTLOW_SHIFT                    (0U)
25068 /*! CNTLOW - Low byte of the Watchdog Counter */
25069 #define WDOG_CNT_CNTLOW(x)                       (((uint32_t)(((uint32_t)(x)) << WDOG_CNT_CNTLOW_SHIFT)) & WDOG_CNT_CNTLOW_MASK)
25070 
25071 #define WDOG_CNT_CNTHIGH_MASK                    (0xFF00U)
25072 #define WDOG_CNT_CNTHIGH_SHIFT                   (8U)
25073 /*! CNTHIGH - High byte of the Watchdog Counter */
25074 #define WDOG_CNT_CNTHIGH(x)                      (((uint32_t)(((uint32_t)(x)) << WDOG_CNT_CNTHIGH_SHIFT)) & WDOG_CNT_CNTHIGH_MASK)
25075 /*! @} */
25076 
25077 /*! @name TOVAL - Watchdog Timeout Value Register */
25078 /*! @{ */
25079 
25080 #define WDOG_TOVAL_TOVALLOW_MASK                 (0xFFU)
25081 #define WDOG_TOVAL_TOVALLOW_SHIFT                (0U)
25082 /*! TOVALLOW - Low byte of the timeout value */
25083 #define WDOG_TOVAL_TOVALLOW(x)                   (((uint32_t)(((uint32_t)(x)) << WDOG_TOVAL_TOVALLOW_SHIFT)) & WDOG_TOVAL_TOVALLOW_MASK)
25084 
25085 #define WDOG_TOVAL_TOVALHIGH_MASK                (0xFF00U)
25086 #define WDOG_TOVAL_TOVALHIGH_SHIFT               (8U)
25087 /*! TOVALHIGH - High byte of the timeout value */
25088 #define WDOG_TOVAL_TOVALHIGH(x)                  (((uint32_t)(((uint32_t)(x)) << WDOG_TOVAL_TOVALHIGH_SHIFT)) & WDOG_TOVAL_TOVALHIGH_MASK)
25089 /*! @} */
25090 
25091 /*! @name WIN - Watchdog Window Register */
25092 /*! @{ */
25093 
25094 #define WDOG_WIN_WINLOW_MASK                     (0xFFU)
25095 #define WDOG_WIN_WINLOW_SHIFT                    (0U)
25096 /*! WINLOW - Low byte of Watchdog Window */
25097 #define WDOG_WIN_WINLOW(x)                       (((uint32_t)(((uint32_t)(x)) << WDOG_WIN_WINLOW_SHIFT)) & WDOG_WIN_WINLOW_MASK)
25098 
25099 #define WDOG_WIN_WINHIGH_MASK                    (0xFF00U)
25100 #define WDOG_WIN_WINHIGH_SHIFT                   (8U)
25101 /*! WINHIGH - High byte of Watchdog Window */
25102 #define WDOG_WIN_WINHIGH(x)                      (((uint32_t)(((uint32_t)(x)) << WDOG_WIN_WINHIGH_SHIFT)) & WDOG_WIN_WINHIGH_MASK)
25103 /*! @} */
25104 
25105 
25106 /*!
25107  * @}
25108  */ /* end of group WDOG_Register_Masks */
25109 
25110 
25111 /* WDOG - Peripheral instance base addresses */
25112 /** Peripheral WDOG0 base address */
25113 #define WDOG0_BASE                               (0x4002A000u)
25114 /** Peripheral WDOG0 base pointer */
25115 #define WDOG0                                    ((WDOG_Type *)WDOG0_BASE)
25116 /** Peripheral WDOG1 base address */
25117 #define WDOG1_BASE                               (0x41026000u)
25118 /** Peripheral WDOG1 base pointer */
25119 #define WDOG1                                    ((WDOG_Type *)WDOG1_BASE)
25120 /** Array initializer of WDOG peripheral base addresses */
25121 #define WDOG_BASE_ADDRS                          { WDOG0_BASE, WDOG1_BASE }
25122 /** Array initializer of WDOG peripheral base pointers */
25123 #define WDOG_BASE_PTRS                           { WDOG0, WDOG1 }
25124 /** Interrupt vectors for the WDOG peripheral type */
25125 #define WDOG_IRQS                                { NotAvail_IRQn, WDOG1_IRQn }
25126 /* Extra definition */
25127 #define WDOG_UPDATE_KEY                          (0xD928C520U)
25128 #define WDOG_REFRESH_KEY                         (0xB480A602U)
25129 
25130 
25131 /*!
25132  * @}
25133  */ /* end of group WDOG_Peripheral_Access_Layer */
25134 
25135 
25136 /* ----------------------------------------------------------------------------
25137    -- XRDC Peripheral Access Layer
25138    ---------------------------------------------------------------------------- */
25139 
25140 /*!
25141  * @addtogroup XRDC_Peripheral_Access_Layer XRDC Peripheral Access Layer
25142  * @{
25143  */
25144 
25145 /** XRDC - Register Layout Typedef */
25146 typedef struct {
25147   __IO uint32_t CR;                                /**< Control Register, offset: 0x0 */
25148        uint8_t RESERVED_0[236];
25149   __I  uint32_t HWCFG0;                            /**< Hardware Configuration Register 0, offset: 0xF0 */
25150   __I  uint32_t HWCFG1;                            /**< Hardware Configuration Register 1, offset: 0xF4 */
25151   __I  uint32_t HWCFG2;                            /**< Hardware Configuration Register 2, offset: 0xF8 */
25152   __I  uint32_t HWCFG3;                            /**< Hardware Configuration Register 3, offset: 0xFC */
25153   __I  uint8_t MDACFG[35];                         /**< Master Domain Assignment Configuration Register, array offset: 0x100, array step: 0x1, valid indices: [0-4, 32-34] */
25154        uint8_t RESERVED_1[29];
25155   __I  uint8_t MRCFG[2];                           /**< Memory Region Configuration Register, array offset: 0x140, array step: 0x1 */
25156        uint8_t RESERVED_2[186];
25157   __IO uint32_t FDID;                              /**< Fault Domain ID, offset: 0x1FC */
25158   __I  uint32_t DERRLOC[3];                        /**< Domain Error Location Register, array offset: 0x200, array step: 0x4 */
25159        uint8_t RESERVED_3[500];
25160   __IO uint32_t DERR_W[19][4];                     /**< Domain Error Word0 Register..Domain Error Word3 Register, array offset: 0x400, array step: index*0x10, index2*0x4, valid indices: [0-1, 16-18][0], [0-1, 16-18][1], [0-1, 16-18][3] */
25161        uint8_t RESERVED_4[464];
25162   __IO uint32_t PID[33];                           /**< Process Identifier, array offset: 0x700, array step: 0x4, valid indices: [0-1, 32] */
25163        uint8_t RESERVED_5[124];
25164   struct {                                         /* offset: 0x800, array step: 0x20 */
25165     __IO uint32_t MDA_W[2];                          /**< Master Domain Assignment, array offset: 0x800, array step: index*0x20, index2*0x4, valid indices: [0-4, 32-34][0], [0-1, 32][1] */
25166          uint8_t RESERVED_0[24];
25167   } MDA[35];
25168        uint8_t RESERVED_6[928];
25169   __IO uint32_t PDAC_W[289][2];                    /**< Peripheral Domain Access Control, array offset: 0x1000, array step: index*0x8, index2*0x4, irregular array, not all indices are valid */
25170        uint8_t RESERVED_7[1784];
25171   struct {                                         /* offset: 0x2000, array step: 0x20 */
25172     __IO uint32_t MRGD_W[5];                         /**< Memory Region Descriptor, array offset: 0x2000, array step: index*0x20, index2*0x4, valid indices: [0-7, 16-23][0], [0-7, 16-23][1], [0-7, 16-23][2], [0-7, 16-23][3], [0-7, 16-23][4] */
25173          uint8_t RESERVED_0[12];
25174   } MRGD[24];
25175 } XRDC_Type;
25176 
25177 /* ----------------------------------------------------------------------------
25178    -- XRDC Register Masks
25179    ---------------------------------------------------------------------------- */
25180 
25181 /*!
25182  * @addtogroup XRDC_Register_Masks XRDC Register Masks
25183  * @{
25184  */
25185 
25186 /*! @name CR - Control Register */
25187 /*! @{ */
25188 
25189 #define XRDC_CR_GVLDM_MASK                       (0x1U)
25190 #define XRDC_CR_GVLDM_SHIFT                      (0U)
25191 /*! GVLDM - Global Valid MDACs(XRDC global enable/disable).
25192  *  0b0..XRDC MDACs are disabled.
25193  *  0b1..XRDC MDACs are enabled.
25194  */
25195 #define XRDC_CR_GVLDM(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDM_SHIFT)) & XRDC_CR_GVLDM_MASK)
25196 
25197 #define XRDC_CR_HRL_MASK                         (0x1EU)
25198 #define XRDC_CR_HRL_SHIFT                        (1U)
25199 /*! HRL - Hardware Revision Level */
25200 #define XRDC_CR_HRL(x)                           (((uint32_t)(((uint32_t)(x)) << XRDC_CR_HRL_SHIFT)) & XRDC_CR_HRL_MASK)
25201 
25202 #define XRDC_CR_VAW_MASK                         (0x100U)
25203 #define XRDC_CR_VAW_SHIFT                        (8U)
25204 /*! VAW - Virtualization aware
25205  *  0b0..Implementation is not virtualization aware.
25206  *  0b1..Implementation is virtualization aware.
25207  */
25208 #define XRDC_CR_VAW(x)                           (((uint32_t)(((uint32_t)(x)) << XRDC_CR_VAW_SHIFT)) & XRDC_CR_VAW_MASK)
25209 
25210 #define XRDC_CR_GVLDP_MASK                       (0x4000U)
25211 #define XRDC_CR_GVLDP_SHIFT                      (14U)
25212 /*! GVLDP - Global Valid for PACs/MSCs
25213  *  0b0..XRDC PACs/MSCs are disabled.
25214  *  0b1..XRDC PACs/MSCs are enabled.
25215  */
25216 #define XRDC_CR_GVLDP(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDP_SHIFT)) & XRDC_CR_GVLDP_MASK)
25217 
25218 #define XRDC_CR_GVLDC_MASK                       (0x8000U)
25219 #define XRDC_CR_GVLDC_SHIFT                      (15U)
25220 /*! GVLDC - Global Valid for MRCs
25221  *  0b0..XRDC MRCs are disabled.
25222  *  0b1..XRDC MRCs are enabled.
25223  */
25224 #define XRDC_CR_GVLDC(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDC_SHIFT)) & XRDC_CR_GVLDC_MASK)
25225 
25226 #define XRDC_CR_LK1_MASK                         (0x40000000U)
25227 #define XRDC_CR_LK1_SHIFT                        (30U)
25228 /*! LK1 - 1-bit Lock
25229  *  0b0..Register can be written by any secure privileged write.
25230  *  0b1..Register is locked (read-only) until the next reset.
25231  */
25232 #define XRDC_CR_LK1(x)                           (((uint32_t)(((uint32_t)(x)) << XRDC_CR_LK1_SHIFT)) & XRDC_CR_LK1_MASK)
25233 /*! @} */
25234 
25235 /*! @name HWCFG0 - Hardware Configuration Register 0 */
25236 /*! @{ */
25237 
25238 #define XRDC_HWCFG0_NDID_MASK                    (0xFFU)
25239 #define XRDC_HWCFG0_NDID_SHIFT                   (0U)
25240 /*! NDID - Number of domains */
25241 #define XRDC_HWCFG0_NDID(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NDID_SHIFT)) & XRDC_HWCFG0_NDID_MASK)
25242 
25243 #define XRDC_HWCFG0_NMSTR_MASK                   (0xFF00U)
25244 #define XRDC_HWCFG0_NMSTR_SHIFT                  (8U)
25245 /*! NMSTR - Number of bus masters */
25246 #define XRDC_HWCFG0_NMSTR(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NMSTR_SHIFT)) & XRDC_HWCFG0_NMSTR_MASK)
25247 
25248 #define XRDC_HWCFG0_NMRC_MASK                    (0xFF0000U)
25249 #define XRDC_HWCFG0_NMRC_SHIFT                   (16U)
25250 /*! NMRC - Number of MRCs */
25251 #define XRDC_HWCFG0_NMRC(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NMRC_SHIFT)) & XRDC_HWCFG0_NMRC_MASK)
25252 
25253 #define XRDC_HWCFG0_NPAC_MASK                    (0xF000000U)
25254 #define XRDC_HWCFG0_NPAC_SHIFT                   (24U)
25255 /*! NPAC - Number of PACs */
25256 #define XRDC_HWCFG0_NPAC(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NPAC_SHIFT)) & XRDC_HWCFG0_NPAC_MASK)
25257 
25258 #define XRDC_HWCFG0_MID_MASK                     (0xF0000000U)
25259 #define XRDC_HWCFG0_MID_SHIFT                    (28U)
25260 /*! MID - Module ID */
25261 #define XRDC_HWCFG0_MID(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_MID_SHIFT)) & XRDC_HWCFG0_MID_MASK)
25262 /*! @} */
25263 
25264 /*! @name HWCFG1 - Hardware Configuration Register 1 */
25265 /*! @{ */
25266 
25267 #define XRDC_HWCFG1_DID_MASK                     (0xFU)
25268 #define XRDC_HWCFG1_DID_SHIFT                    (0U)
25269 /*! DID - Domain identifier number */
25270 #define XRDC_HWCFG1_DID(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG1_DID_SHIFT)) & XRDC_HWCFG1_DID_MASK)
25271 /*! @} */
25272 
25273 /*! @name HWCFG2 - Hardware Configuration Register 2 */
25274 /*! @{ */
25275 
25276 #define XRDC_HWCFG2_PIDP0_MASK                   (0x1U)
25277 #define XRDC_HWCFG2_PIDP0_SHIFT                  (0U)
25278 /*! PIDP0 - Process identifier
25279  *  0b0..Bus master 0 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25280  *  0b1..Bus master 0 sources a process identifier register to the XRDC_MDAC logic.
25281  */
25282 #define XRDC_HWCFG2_PIDP0(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP0_SHIFT)) & XRDC_HWCFG2_PIDP0_MASK)
25283 
25284 #define XRDC_HWCFG2_PIDP1_MASK                   (0x2U)
25285 #define XRDC_HWCFG2_PIDP1_SHIFT                  (1U)
25286 /*! PIDP1 - Process identifier
25287  *  0b0..Bus master 1 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25288  *  0b1..Bus master 1 sources a process identifier register to the XRDC_MDAC logic.
25289  */
25290 #define XRDC_HWCFG2_PIDP1(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP1_SHIFT)) & XRDC_HWCFG2_PIDP1_MASK)
25291 
25292 #define XRDC_HWCFG2_PIDP2_MASK                   (0x4U)
25293 #define XRDC_HWCFG2_PIDP2_SHIFT                  (2U)
25294 /*! PIDP2 - Process identifier
25295  *  0b0..Bus master 2 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25296  *  0b1..Bus master 2 sources a process identifier register to the XRDC_MDAC logic.
25297  */
25298 #define XRDC_HWCFG2_PIDP2(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP2_SHIFT)) & XRDC_HWCFG2_PIDP2_MASK)
25299 
25300 #define XRDC_HWCFG2_PIDP3_MASK                   (0x8U)
25301 #define XRDC_HWCFG2_PIDP3_SHIFT                  (3U)
25302 /*! PIDP3 - Process identifier
25303  *  0b0..Bus master 3 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25304  *  0b1..Bus master 3 sources a process identifier register to the XRDC_MDAC logic.
25305  */
25306 #define XRDC_HWCFG2_PIDP3(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP3_SHIFT)) & XRDC_HWCFG2_PIDP3_MASK)
25307 
25308 #define XRDC_HWCFG2_PIDP4_MASK                   (0x10U)
25309 #define XRDC_HWCFG2_PIDP4_SHIFT                  (4U)
25310 /*! PIDP4 - Process identifier
25311  *  0b0..Bus master 4 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25312  *  0b1..Bus master 4 sources a process identifier register to the XRDC_MDAC logic.
25313  */
25314 #define XRDC_HWCFG2_PIDP4(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP4_SHIFT)) & XRDC_HWCFG2_PIDP4_MASK)
25315 
25316 #define XRDC_HWCFG2_PIDP5_MASK                   (0x20U)
25317 #define XRDC_HWCFG2_PIDP5_SHIFT                  (5U)
25318 /*! PIDP5 - Process identifier
25319  *  0b0..Bus master 5 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25320  *  0b1..Bus master 5 sources a process identifier register to the XRDC_MDAC logic.
25321  */
25322 #define XRDC_HWCFG2_PIDP5(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP5_SHIFT)) & XRDC_HWCFG2_PIDP5_MASK)
25323 
25324 #define XRDC_HWCFG2_PIDP6_MASK                   (0x40U)
25325 #define XRDC_HWCFG2_PIDP6_SHIFT                  (6U)
25326 /*! PIDP6 - Process identifier
25327  *  0b0..Bus master 6 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25328  *  0b1..Bus master 6 sources a process identifier register to the XRDC_MDAC logic.
25329  */
25330 #define XRDC_HWCFG2_PIDP6(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP6_SHIFT)) & XRDC_HWCFG2_PIDP6_MASK)
25331 
25332 #define XRDC_HWCFG2_PIDP7_MASK                   (0x80U)
25333 #define XRDC_HWCFG2_PIDP7_SHIFT                  (7U)
25334 /*! PIDP7 - Process identifier
25335  *  0b0..Bus master 7 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25336  *  0b1..Bus master 7 sources a process identifier register to the XRDC_MDAC logic.
25337  */
25338 #define XRDC_HWCFG2_PIDP7(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP7_SHIFT)) & XRDC_HWCFG2_PIDP7_MASK)
25339 
25340 #define XRDC_HWCFG2_PIDP8_MASK                   (0x100U)
25341 #define XRDC_HWCFG2_PIDP8_SHIFT                  (8U)
25342 /*! PIDP8 - Process identifier
25343  *  0b0..Bus master 8 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25344  *  0b1..Bus master 8 sources a process identifier register to the XRDC_MDAC logic.
25345  */
25346 #define XRDC_HWCFG2_PIDP8(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP8_SHIFT)) & XRDC_HWCFG2_PIDP8_MASK)
25347 
25348 #define XRDC_HWCFG2_PIDP9_MASK                   (0x200U)
25349 #define XRDC_HWCFG2_PIDP9_SHIFT                  (9U)
25350 /*! PIDP9 - Process identifier
25351  *  0b0..Bus master 9 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25352  *  0b1..Bus master 9 sources a process identifier register to the XRDC_MDAC logic.
25353  */
25354 #define XRDC_HWCFG2_PIDP9(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP9_SHIFT)) & XRDC_HWCFG2_PIDP9_MASK)
25355 
25356 #define XRDC_HWCFG2_PIDP10_MASK                  (0x400U)
25357 #define XRDC_HWCFG2_PIDP10_SHIFT                 (10U)
25358 /*! PIDP10 - Process identifier
25359  *  0b0..Bus master 10 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25360  *  0b1..Bus master 10 sources a process identifier register to the XRDC_MDAC logic.
25361  */
25362 #define XRDC_HWCFG2_PIDP10(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP10_SHIFT)) & XRDC_HWCFG2_PIDP10_MASK)
25363 
25364 #define XRDC_HWCFG2_PIDP11_MASK                  (0x800U)
25365 #define XRDC_HWCFG2_PIDP11_SHIFT                 (11U)
25366 /*! PIDP11 - Process identifier
25367  *  0b0..Bus master 11 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25368  *  0b1..Bus master 11 sources a process identifier register to the XRDC_MDAC logic.
25369  */
25370 #define XRDC_HWCFG2_PIDP11(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP11_SHIFT)) & XRDC_HWCFG2_PIDP11_MASK)
25371 
25372 #define XRDC_HWCFG2_PIDP12_MASK                  (0x1000U)
25373 #define XRDC_HWCFG2_PIDP12_SHIFT                 (12U)
25374 /*! PIDP12 - Process identifier
25375  *  0b0..Bus master 12 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25376  *  0b1..Bus master 12 sources a process identifier register to the XRDC_MDAC logic.
25377  */
25378 #define XRDC_HWCFG2_PIDP12(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP12_SHIFT)) & XRDC_HWCFG2_PIDP12_MASK)
25379 
25380 #define XRDC_HWCFG2_PIDP13_MASK                  (0x2000U)
25381 #define XRDC_HWCFG2_PIDP13_SHIFT                 (13U)
25382 /*! PIDP13 - Process identifier
25383  *  0b0..Bus master 13 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25384  *  0b1..Bus master 13 sources a process identifier register to the XRDC_MDAC logic.
25385  */
25386 #define XRDC_HWCFG2_PIDP13(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP13_SHIFT)) & XRDC_HWCFG2_PIDP13_MASK)
25387 
25388 #define XRDC_HWCFG2_PIDP14_MASK                  (0x4000U)
25389 #define XRDC_HWCFG2_PIDP14_SHIFT                 (14U)
25390 /*! PIDP14 - Process identifier
25391  *  0b0..Bus master 14 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25392  *  0b1..Bus master 14 sources a process identifier register to the XRDC_MDAC logic.
25393  */
25394 #define XRDC_HWCFG2_PIDP14(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP14_SHIFT)) & XRDC_HWCFG2_PIDP14_MASK)
25395 
25396 #define XRDC_HWCFG2_PIDP15_MASK                  (0x8000U)
25397 #define XRDC_HWCFG2_PIDP15_SHIFT                 (15U)
25398 /*! PIDP15 - Process identifier
25399  *  0b0..Bus master 15 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25400  *  0b1..Bus master 15 sources a process identifier register to the XRDC_MDAC logic.
25401  */
25402 #define XRDC_HWCFG2_PIDP15(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP15_SHIFT)) & XRDC_HWCFG2_PIDP15_MASK)
25403 
25404 #define XRDC_HWCFG2_PIDP16_MASK                  (0x10000U)
25405 #define XRDC_HWCFG2_PIDP16_SHIFT                 (16U)
25406 /*! PIDP16 - Process identifier
25407  *  0b0..Bus master 16 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25408  *  0b1..Bus master 16 sources a process identifier register to the XRDC_MDAC logic.
25409  */
25410 #define XRDC_HWCFG2_PIDP16(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP16_SHIFT)) & XRDC_HWCFG2_PIDP16_MASK)
25411 
25412 #define XRDC_HWCFG2_PIDP17_MASK                  (0x20000U)
25413 #define XRDC_HWCFG2_PIDP17_SHIFT                 (17U)
25414 /*! PIDP17 - Process identifier
25415  *  0b0..Bus master 17 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25416  *  0b1..Bus master 17 sources a process identifier register to the XRDC_MDAC logic.
25417  */
25418 #define XRDC_HWCFG2_PIDP17(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP17_SHIFT)) & XRDC_HWCFG2_PIDP17_MASK)
25419 
25420 #define XRDC_HWCFG2_PIDP18_MASK                  (0x40000U)
25421 #define XRDC_HWCFG2_PIDP18_SHIFT                 (18U)
25422 /*! PIDP18 - Process identifier
25423  *  0b0..Bus master 18 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25424  *  0b1..Bus master 18 sources a process identifier register to the XRDC_MDAC logic.
25425  */
25426 #define XRDC_HWCFG2_PIDP18(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP18_SHIFT)) & XRDC_HWCFG2_PIDP18_MASK)
25427 
25428 #define XRDC_HWCFG2_PIDP19_MASK                  (0x80000U)
25429 #define XRDC_HWCFG2_PIDP19_SHIFT                 (19U)
25430 /*! PIDP19 - Process identifier
25431  *  0b0..Bus master 19 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25432  *  0b1..Bus master 19 sources a process identifier register to the XRDC_MDAC logic.
25433  */
25434 #define XRDC_HWCFG2_PIDP19(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP19_SHIFT)) & XRDC_HWCFG2_PIDP19_MASK)
25435 
25436 #define XRDC_HWCFG2_PIDP20_MASK                  (0x100000U)
25437 #define XRDC_HWCFG2_PIDP20_SHIFT                 (20U)
25438 /*! PIDP20 - Process identifier
25439  *  0b0..Bus master 20 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25440  *  0b1..Bus master 20 sources a process identifier register to the XRDC_MDAC logic.
25441  */
25442 #define XRDC_HWCFG2_PIDP20(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP20_SHIFT)) & XRDC_HWCFG2_PIDP20_MASK)
25443 
25444 #define XRDC_HWCFG2_PIDP21_MASK                  (0x200000U)
25445 #define XRDC_HWCFG2_PIDP21_SHIFT                 (21U)
25446 /*! PIDP21 - Process identifier
25447  *  0b0..Bus master 21 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25448  *  0b1..Bus master 21 sources a process identifier register to the XRDC_MDAC logic.
25449  */
25450 #define XRDC_HWCFG2_PIDP21(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP21_SHIFT)) & XRDC_HWCFG2_PIDP21_MASK)
25451 
25452 #define XRDC_HWCFG2_PIDP22_MASK                  (0x400000U)
25453 #define XRDC_HWCFG2_PIDP22_SHIFT                 (22U)
25454 /*! PIDP22 - Process identifier
25455  *  0b0..Bus master 22 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25456  *  0b1..Bus master 22 sources a process identifier register to the XRDC_MDAC logic.
25457  */
25458 #define XRDC_HWCFG2_PIDP22(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP22_SHIFT)) & XRDC_HWCFG2_PIDP22_MASK)
25459 
25460 #define XRDC_HWCFG2_PIDP23_MASK                  (0x800000U)
25461 #define XRDC_HWCFG2_PIDP23_SHIFT                 (23U)
25462 /*! PIDP23 - Process identifier
25463  *  0b0..Bus master 23 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25464  *  0b1..Bus master 23 sources a process identifier register to the XRDC_MDAC logic.
25465  */
25466 #define XRDC_HWCFG2_PIDP23(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP23_SHIFT)) & XRDC_HWCFG2_PIDP23_MASK)
25467 
25468 #define XRDC_HWCFG2_PIDP24_MASK                  (0x1000000U)
25469 #define XRDC_HWCFG2_PIDP24_SHIFT                 (24U)
25470 /*! PIDP24 - Process identifier
25471  *  0b0..Bus master 24 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25472  *  0b1..Bus master 24 sources a process identifier register to the XRDC_MDAC logic.
25473  */
25474 #define XRDC_HWCFG2_PIDP24(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP24_SHIFT)) & XRDC_HWCFG2_PIDP24_MASK)
25475 
25476 #define XRDC_HWCFG2_PIDP25_MASK                  (0x2000000U)
25477 #define XRDC_HWCFG2_PIDP25_SHIFT                 (25U)
25478 /*! PIDP25 - Process identifier
25479  *  0b0..Bus master 25 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25480  *  0b1..Bus master 25 sources a process identifier register to the XRDC_MDAC logic.
25481  */
25482 #define XRDC_HWCFG2_PIDP25(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP25_SHIFT)) & XRDC_HWCFG2_PIDP25_MASK)
25483 
25484 #define XRDC_HWCFG2_PIDP26_MASK                  (0x4000000U)
25485 #define XRDC_HWCFG2_PIDP26_SHIFT                 (26U)
25486 /*! PIDP26 - Process identifier
25487  *  0b0..Bus master 26 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25488  *  0b1..Bus master 26 sources a process identifier register to the XRDC_MDAC logic.
25489  */
25490 #define XRDC_HWCFG2_PIDP26(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP26_SHIFT)) & XRDC_HWCFG2_PIDP26_MASK)
25491 
25492 #define XRDC_HWCFG2_PIDP27_MASK                  (0x8000000U)
25493 #define XRDC_HWCFG2_PIDP27_SHIFT                 (27U)
25494 /*! PIDP27 - Process identifier
25495  *  0b0..Bus master 27 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25496  *  0b1..Bus master 27 sources a process identifier register to the XRDC_MDAC logic.
25497  */
25498 #define XRDC_HWCFG2_PIDP27(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP27_SHIFT)) & XRDC_HWCFG2_PIDP27_MASK)
25499 
25500 #define XRDC_HWCFG2_PIDP28_MASK                  (0x10000000U)
25501 #define XRDC_HWCFG2_PIDP28_SHIFT                 (28U)
25502 /*! PIDP28 - Process identifier
25503  *  0b0..Bus master 28 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25504  *  0b1..Bus master 28 sources a process identifier register to the XRDC_MDAC logic.
25505  */
25506 #define XRDC_HWCFG2_PIDP28(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP28_SHIFT)) & XRDC_HWCFG2_PIDP28_MASK)
25507 
25508 #define XRDC_HWCFG2_PIDP29_MASK                  (0x20000000U)
25509 #define XRDC_HWCFG2_PIDP29_SHIFT                 (29U)
25510 /*! PIDP29 - Process identifier
25511  *  0b0..Bus master 29 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25512  *  0b1..Bus master 29 sources a process identifier register to the XRDC_MDAC logic.
25513  */
25514 #define XRDC_HWCFG2_PIDP29(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP29_SHIFT)) & XRDC_HWCFG2_PIDP29_MASK)
25515 
25516 #define XRDC_HWCFG2_PIDP30_MASK                  (0x40000000U)
25517 #define XRDC_HWCFG2_PIDP30_SHIFT                 (30U)
25518 /*! PIDP30 - Process identifier
25519  *  0b0..Bus master 30 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25520  *  0b1..Bus master 30 sources a process identifier register to the XRDC_MDAC logic.
25521  */
25522 #define XRDC_HWCFG2_PIDP30(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP30_SHIFT)) & XRDC_HWCFG2_PIDP30_MASK)
25523 
25524 #define XRDC_HWCFG2_PIDP31_MASK                  (0x80000000U)
25525 #define XRDC_HWCFG2_PIDP31_SHIFT                 (31U)
25526 /*! PIDP31 - Process identifier
25527  *  0b0..Bus master 31 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores.
25528  *  0b1..Bus master 31 sources a process identifier register to the XRDC_MDAC logic.
25529  */
25530 #define XRDC_HWCFG2_PIDP31(x)                    (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP31_SHIFT)) & XRDC_HWCFG2_PIDP31_MASK)
25531 /*! @} */
25532 
25533 /*! @name HWCFG3 - Hardware Configuration Register 3 */
25534 /*! @{ */
25535 
25536 #define XRDC_HWCFG3_PIDPn_MASK                   (0xFFFFFFFFU)
25537 #define XRDC_HWCFG3_PIDPn_SHIFT                  (0U)
25538 /*! PIDPn - Process identifier */
25539 #define XRDC_HWCFG3_PIDPn(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG3_PIDPn_SHIFT)) & XRDC_HWCFG3_PIDPn_MASK)
25540 /*! @} */
25541 
25542 /*! @name MDACFG - Master Domain Assignment Configuration Register */
25543 /*! @{ */
25544 
25545 #define XRDC_MDACFG_NMDAR_MASK                   (0xFU)
25546 #define XRDC_MDACFG_NMDAR_SHIFT                  (0U)
25547 /*! NMDAR - Number of master domain assignment registers for bus master m */
25548 #define XRDC_MDACFG_NMDAR(x)                     (((uint8_t)(((uint8_t)(x)) << XRDC_MDACFG_NMDAR_SHIFT)) & XRDC_MDACFG_NMDAR_MASK)
25549 
25550 #define XRDC_MDACFG_NCM_MASK                     (0x80U)
25551 #define XRDC_MDACFG_NCM_SHIFT                    (7U)
25552 /*! NCM - Non-CPU Master
25553  *  0b0..Bus master is a processor.
25554  *  0b1..Bus master is a non-processor.
25555  */
25556 #define XRDC_MDACFG_NCM(x)                       (((uint8_t)(((uint8_t)(x)) << XRDC_MDACFG_NCM_SHIFT)) & XRDC_MDACFG_NCM_MASK)
25557 /*! @} */
25558 
25559 /* The count of XRDC_MDACFG */
25560 #define XRDC_MDACFG_COUNT                        (35U)
25561 
25562 /*! @name MRCFG - Memory Region Configuration Register */
25563 /*! @{ */
25564 
25565 #define XRDC_MRCFG_NMRGD_MASK                    (0x1FU)
25566 #define XRDC_MRCFG_NMRGD_SHIFT                   (0U)
25567 /*! NMRGD - Number of memory region descriptors for memory region controller n */
25568 #define XRDC_MRCFG_NMRGD(x)                      (((uint8_t)(((uint8_t)(x)) << XRDC_MRCFG_NMRGD_SHIFT)) & XRDC_MRCFG_NMRGD_MASK)
25569 /*! @} */
25570 
25571 /* The count of XRDC_MRCFG */
25572 #define XRDC_MRCFG_COUNT                         (2U)
25573 
25574 /*! @name FDID - Fault Domain ID */
25575 /*! @{ */
25576 
25577 #define XRDC_FDID_FDID_MASK                      (0xFU)
25578 #define XRDC_FDID_FDID_SHIFT                     (0U)
25579 /*! FDID - Domain ID of Faulted Access */
25580 #define XRDC_FDID_FDID(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_FDID_FDID_SHIFT)) & XRDC_FDID_FDID_MASK)
25581 /*! @} */
25582 
25583 /*! @name DERRLOC - Domain Error Location Register */
25584 /*! @{ */
25585 
25586 #define XRDC_DERRLOC_MRCINST_MASK                (0xFFFFU)
25587 #define XRDC_DERRLOC_MRCINST_SHIFT               (0U)
25588 /*! MRCINST - MRC instance */
25589 #define XRDC_DERRLOC_MRCINST(x)                  (((uint32_t)(((uint32_t)(x)) << XRDC_DERRLOC_MRCINST_SHIFT)) & XRDC_DERRLOC_MRCINST_MASK)
25590 
25591 #define XRDC_DERRLOC_PACINST_MASK                (0xF0000U)
25592 #define XRDC_DERRLOC_PACINST_SHIFT               (16U)
25593 /*! PACINST - PAC instance */
25594 #define XRDC_DERRLOC_PACINST(x)                  (((uint32_t)(((uint32_t)(x)) << XRDC_DERRLOC_PACINST_SHIFT)) & XRDC_DERRLOC_PACINST_MASK)
25595 /*! @} */
25596 
25597 /* The count of XRDC_DERRLOC */
25598 #define XRDC_DERRLOC_COUNT                       (3U)
25599 
25600 /*! @name DERR_W - Domain Error Word0 Register..Domain Error Word3 Register */
25601 /*! @{ */
25602 
25603 #define XRDC_DERR_W_EADDR_MASK                   (0xFFFFFFFFU)
25604 #define XRDC_DERR_W_EADDR_SHIFT                  (0U)
25605 /*! EADDR - Error address */
25606 #define XRDC_DERR_W_EADDR(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EADDR_SHIFT)) & XRDC_DERR_W_EADDR_MASK)
25607 
25608 #define XRDC_DERR_W_EDID_MASK                    (0xFU)
25609 #define XRDC_DERR_W_EDID_SHIFT                   (0U)
25610 /*! EDID - Error domain identifier */
25611 #define XRDC_DERR_W_EDID(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EDID_SHIFT)) & XRDC_DERR_W_EDID_MASK)
25612 
25613 #define XRDC_DERR_W_EATR_MASK                    (0x700U)
25614 #define XRDC_DERR_W_EATR_SHIFT                   (8U)
25615 /*! EATR - Error attributes
25616  *  0b000..Secure user mode, instruction fetch access.
25617  *  0b001..Secure user mode, data access.
25618  *  0b010..Secure privileged mode, instruction fetch access.
25619  *  0b011..Secure privileged mode, data access.
25620  *  0b100..Nonsecure user mode, instruction fetch access.
25621  *  0b101..Nonsecure user mode, data access.
25622  *  0b110..Nonsecure privileged mode, instruction fetch access.
25623  *  0b111..Nonsecure privileged mode, data access.
25624  */
25625 #define XRDC_DERR_W_EATR(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EATR_SHIFT)) & XRDC_DERR_W_EATR_MASK)
25626 
25627 #define XRDC_DERR_W_ERW_MASK                     (0x800U)
25628 #define XRDC_DERR_W_ERW_SHIFT                    (11U)
25629 /*! ERW - Error read/write
25630  *  0b0..Read access
25631  *  0b1..Write access
25632  */
25633 #define XRDC_DERR_W_ERW(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_ERW_SHIFT)) & XRDC_DERR_W_ERW_MASK)
25634 
25635 #define XRDC_DERR_W_EPORT_MASK                   (0x7000000U)
25636 #define XRDC_DERR_W_EPORT_SHIFT                  (24U)
25637 /*! EPORT - Error port */
25638 #define XRDC_DERR_W_EPORT(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EPORT_SHIFT)) & XRDC_DERR_W_EPORT_MASK)
25639 
25640 #define XRDC_DERR_W_EST_MASK                     (0xC0000000U)
25641 #define XRDC_DERR_W_EST_SHIFT                    (30U)
25642 /*! EST - Error state
25643  *  0b00..No access violation has been detected.
25644  *  0b01..No access violation has been detected.
25645  *  0b10..A single access violation has been detected.
25646  *  0b11..Multiple access violations for this domain have been detected by this submodule instance. Only the
25647  *        address and attribute information for the first error have been captured in DERR_W0_i and DERR_W1_i.
25648  */
25649 #define XRDC_DERR_W_EST(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EST_SHIFT)) & XRDC_DERR_W_EST_MASK)
25650 
25651 #define XRDC_DERR_W_RECR_MASK                    (0xC0000000U)
25652 #define XRDC_DERR_W_RECR_SHIFT                   (30U)
25653 /*! RECR - Rearm Error Capture Registers */
25654 #define XRDC_DERR_W_RECR(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_RECR_SHIFT)) & XRDC_DERR_W_RECR_MASK)
25655 /*! @} */
25656 
25657 /* The count of XRDC_DERR_W */
25658 #define XRDC_DERR_W_COUNT                        (19U)
25659 
25660 /* The count of XRDC_DERR_W */
25661 #define XRDC_DERR_W_COUNT2                       (4U)
25662 
25663 /*! @name PID - Process Identifier */
25664 /*! @{ */
25665 
25666 #define XRDC_PID_PID_MASK                        (0x3FU)
25667 #define XRDC_PID_PID_SHIFT                       (0U)
25668 /*! PID - Process identifier */
25669 #define XRDC_PID_PID(x)                          (((uint32_t)(((uint32_t)(x)) << XRDC_PID_PID_SHIFT)) & XRDC_PID_PID_MASK)
25670 
25671 #define XRDC_PID_SP4SM_MASK                      (0x8000000U)
25672 #define XRDC_PID_SP4SM_SHIFT                     (27U)
25673 /*! SP4SM - Special 4-state model */
25674 #define XRDC_PID_SP4SM(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_PID_SP4SM_SHIFT)) & XRDC_PID_SP4SM_MASK)
25675 
25676 #define XRDC_PID_TSM_MASK                        (0x10000000U)
25677 #define XRDC_PID_TSM_SHIFT                       (28U)
25678 /*! TSM - Three-state model */
25679 #define XRDC_PID_TSM(x)                          (((uint32_t)(((uint32_t)(x)) << XRDC_PID_TSM_SHIFT)) & XRDC_PID_TSM_MASK)
25680 
25681 #define XRDC_PID_LK2_MASK                        (0x60000000U)
25682 #define XRDC_PID_LK2_SHIFT                       (29U)
25683 /*! LK2 - Lock
25684  *  0b00..Register can be written by any secure privileged write.
25685  *  0b01..Register can be written by any secure privileged write.
25686  *  0b10..Register can only be written by a secure privileged write from bus master m.
25687  *  0b11..Register is locked (read-only) until the next reset.
25688  */
25689 #define XRDC_PID_LK2(x)                          (((uint32_t)(((uint32_t)(x)) << XRDC_PID_LK2_SHIFT)) & XRDC_PID_LK2_MASK)
25690 /*! @} */
25691 
25692 /* The count of XRDC_PID */
25693 #define XRDC_PID_COUNT                           (33U)
25694 
25695 /*! @name MDA_W - Master Domain Assignment */
25696 /*! @{ */
25697 
25698 #define XRDC_MDA_W_DID_MASK                      (0xFU)
25699 #define XRDC_MDA_W_DID_SHIFT                     (0U)
25700 /*! DID - Domain identifier */
25701 #define XRDC_MDA_W_DID(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DID_SHIFT)) & XRDC_MDA_W_DID_MASK)
25702 
25703 #define XRDC_MDA_W_DIDS_MASK                     (0x30U)
25704 #define XRDC_MDA_W_DIDS_SHIFT                    (4U)
25705 /*! DIDS - DID Select
25706  *  0b00..Use MDAm[3:0] as the domain identifier.
25707  *  0b01..Use the input DID as the domain identifier.
25708  *  0b10..Use MDAm[3:2] concatenated with the low-order 2 bits of the input DID (DID_in[1:0]) as the domain identifier.
25709  *  0b11..Reserved for future use.
25710  */
25711 #define XRDC_MDA_W_DIDS(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DIDS_SHIFT)) & XRDC_MDA_W_DIDS_MASK)
25712 
25713 #define XRDC_MDA_W_PA_MASK                       (0x30U)
25714 #define XRDC_MDA_W_PA_SHIFT                      (4U)
25715 /*! PA - Privileged attribute
25716  *  0b00..Force the bus attribute for this master to user.
25717  *  0b01..Force the bus attribute for this master to privileged.
25718  *  0b10..Use the bus master's privileged/user attribute directly.
25719  *  0b11..Use the bus master's privileged/user attribute directly.
25720  */
25721 #define XRDC_MDA_W_PA(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PA_SHIFT)) & XRDC_MDA_W_PA_MASK)
25722 
25723 #define XRDC_MDA_W_PE_MASK                       (0xC0U)
25724 #define XRDC_MDA_W_PE_SHIFT                      (6U)
25725 /*! PE - Process identifier enable
25726  *  0b00..No process identifier is included in the domain hit evaluation.
25727  *  0b01..No process identifier is included in the domain hit evaluation.
25728  *  0b10..The process identifier is included in the domain hit evaluation as defined by the expression:
25729  *        partial_domain_hit = (PE == 2) && ((PID & ~PIDM) == (XRDC_PIDn[PID] & ~PIDM))
25730  *  0b11..The process identifier is included in the domain hit evaluation as defined by the expression:
25731  *        partial_domain_hit = (PE == 3) && ~((PID & ~PIDM) == (XRDC_PIDn[PID] & ~PIDM))
25732  */
25733 #define XRDC_MDA_W_PE(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PE_SHIFT)) & XRDC_MDA_W_PE_MASK)
25734 
25735 #define XRDC_MDA_W_SA_MASK                       (0xC0U)
25736 #define XRDC_MDA_W_SA_SHIFT                      (6U)
25737 /*! SA - Secure attribute
25738  *  0b00..Force the bus attribute for this master to secure.
25739  *  0b01..Force the bus attribute for this master to nonsecure.
25740  *  0b10..Use the bus master's secure/nonsecure attribute directly.
25741  *  0b11..Use the bus master's secure/nonsecure attribute directly.
25742  */
25743 #define XRDC_MDA_W_SA(x)                         (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_SA_SHIFT)) & XRDC_MDA_W_SA_MASK)
25744 
25745 #define XRDC_MDA_W_DIDB_MASK                     (0x100U)
25746 #define XRDC_MDA_W_DIDB_SHIFT                    (8U)
25747 /*! DIDB - DID Bypass
25748  *  0b0..Use MDAn[3:0] as the domain identifier.
25749  *  0b1..Use the DID input as the domain identifier.
25750  */
25751 #define XRDC_MDA_W_DIDB(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DIDB_SHIFT)) & XRDC_MDA_W_DIDB_MASK)
25752 
25753 #define XRDC_MDA_W_PIDM_MASK                     (0x3F00U)
25754 #define XRDC_MDA_W_PIDM_SHIFT                    (8U)
25755 /*! PIDM - Process Identifier Mask */
25756 #define XRDC_MDA_W_PIDM(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PIDM_SHIFT)) & XRDC_MDA_W_PIDM_MASK)
25757 
25758 #define XRDC_MDA_W_PID_MASK                      (0x3F0000U)
25759 #define XRDC_MDA_W_PID_SHIFT                     (16U)
25760 /*! PID - Process Identifier */
25761 #define XRDC_MDA_W_PID(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PID_SHIFT)) & XRDC_MDA_W_PID_MASK)
25762 
25763 #define XRDC_MDA_W_DFMT_MASK                     (0x20000000U)
25764 #define XRDC_MDA_W_DFMT_SHIFT                    (29U)
25765 /*! DFMT - Domain format
25766  *  0b0..Processor-core domain assignment
25767  *  0b1..Non-processor domain assignment
25768  */
25769 #define XRDC_MDA_W_DFMT(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DFMT_SHIFT)) & XRDC_MDA_W_DFMT_MASK)
25770 
25771 #define XRDC_MDA_W_LK1_MASK                      (0x40000000U)
25772 #define XRDC_MDA_W_LK1_SHIFT                     (30U)
25773 /*! LK1 - 1-bit Lock
25774  *  0b0..Register can be written by any secure privileged write.
25775  *  0b1..Register is locked (read-only) until the next reset.
25776  */
25777 #define XRDC_MDA_W_LK1(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_LK1_SHIFT)) & XRDC_MDA_W_LK1_MASK)
25778 
25779 #define XRDC_MDA_W_VLD_MASK                      (0x80000000U)
25780 #define XRDC_MDA_W_VLD_SHIFT                     (31U)
25781 /*! VLD - Valid
25782  *  0b0..The Wr domain assignment is invalid.
25783  *  0b1..The Wr domain assignment is valid.
25784  */
25785 #define XRDC_MDA_W_VLD(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_VLD_SHIFT)) & XRDC_MDA_W_VLD_MASK)
25786 /*! @} */
25787 
25788 /* The count of XRDC_MDA_W */
25789 #define XRDC_MDA_W_COUNT                         (35U)
25790 
25791 /* The count of XRDC_MDA_W */
25792 #define XRDC_MDA_W_COUNT2                        (2U)
25793 
25794 /*! @name PDAC_W - Peripheral Domain Access Control */
25795 /*! @{ */
25796 
25797 #define XRDC_PDAC_W_D0ACP_MASK                   (0x7U)
25798 #define XRDC_PDAC_W_D0ACP_SHIFT                  (0U)
25799 /*! D0ACP - Domain 0 access control policy */
25800 #define XRDC_PDAC_W_D0ACP(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D0ACP_SHIFT)) & XRDC_PDAC_W_D0ACP_MASK)
25801 
25802 #define XRDC_PDAC_W_D1ACP_MASK                   (0x38U)
25803 #define XRDC_PDAC_W_D1ACP_SHIFT                  (3U)
25804 /*! D1ACP - Domain 1 access control policy */
25805 #define XRDC_PDAC_W_D1ACP(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D1ACP_SHIFT)) & XRDC_PDAC_W_D1ACP_MASK)
25806 
25807 #define XRDC_PDAC_W_D2ACP_MASK                   (0x1C0U)
25808 #define XRDC_PDAC_W_D2ACP_SHIFT                  (6U)
25809 /*! D2ACP - Domain 2 access control policy */
25810 #define XRDC_PDAC_W_D2ACP(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D2ACP_SHIFT)) & XRDC_PDAC_W_D2ACP_MASK)
25811 
25812 #define XRDC_PDAC_W_EAL_MASK                     (0x3000000U)
25813 #define XRDC_PDAC_W_EAL_SHIFT                    (24U)
25814 /*! EAL - Exclusive Access Lock
25815  *  0b00..Lock disabled
25816  *  0b01..Lock disabled until next reset
25817  *  0b10..Lock enabled, lock state = available
25818  *  0b11..Lock enabled, lock state = not available
25819  */
25820 #define XRDC_PDAC_W_EAL(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_EAL_SHIFT)) & XRDC_PDAC_W_EAL_MASK)
25821 
25822 #define XRDC_PDAC_W_EALO_MASK                    (0xF000000U)
25823 #define XRDC_PDAC_W_EALO_SHIFT                   (24U)
25824 /*! EALO - Excessive Access Lock Owner */
25825 #define XRDC_PDAC_W_EALO(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_EALO_SHIFT)) & XRDC_PDAC_W_EALO_MASK)
25826 
25827 #define XRDC_PDAC_W_LK2_MASK                     (0x60000000U)
25828 #define XRDC_PDAC_W_LK2_SHIFT                    (29U)
25829 /*! LK2 - Lock
25830  *  0b00..Entire PDACs can be written.
25831  *  0b01..Entire PDACs can be written.
25832  *  0b10..Domain x can only update the DxACP field and the LK2 field; no other PDACs fields can be written.
25833  *  0b11..PDACs is locked (read-only) until the next reset.
25834  */
25835 #define XRDC_PDAC_W_LK2(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_LK2_SHIFT)) & XRDC_PDAC_W_LK2_MASK)
25836 
25837 #define XRDC_PDAC_W_VLD_MASK                     (0x80000000U)
25838 #define XRDC_PDAC_W_VLD_SHIFT                    (31U)
25839 /*! VLD - Valid
25840  *  0b0..The PDACs assignment is invalid.
25841  *  0b1..The PDACs assignment is valid.
25842  */
25843 #define XRDC_PDAC_W_VLD(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_VLD_SHIFT)) & XRDC_PDAC_W_VLD_MASK)
25844 /*! @} */
25845 
25846 /* The count of XRDC_PDAC_W */
25847 #define XRDC_PDAC_W_COUNT                        (289U)
25848 
25849 /* The count of XRDC_PDAC_W */
25850 #define XRDC_PDAC_W_COUNT2                       (2U)
25851 
25852 /*! @name MRGD_W - Memory Region Descriptor */
25853 /*! @{ */
25854 
25855 #define XRDC_MRGD_W_ACCSET1_MASK                 (0xFFFU)
25856 #define XRDC_MRGD_W_ACCSET1_SHIFT                (0U)
25857 /*! ACCSET1 - SET 1 of Programmable access flags. */
25858 #define XRDC_MRGD_W_ACCSET1(x)                   (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ACCSET1_SHIFT)) & XRDC_MRGD_W_ACCSET1_MASK)
25859 
25860 #define XRDC_MRGD_W_D0SEL_MASK                   (0x7U)
25861 #define XRDC_MRGD_W_D0SEL_SHIFT                  (0U)
25862 /*! D0SEL - Domain 0 select */
25863 #define XRDC_MRGD_W_D0SEL(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D0SEL_SHIFT)) & XRDC_MRGD_W_D0SEL_MASK)
25864 
25865 #define XRDC_MRGD_W_D1SEL_MASK                   (0x38U)
25866 #define XRDC_MRGD_W_D1SEL_SHIFT                  (3U)
25867 /*! D1SEL - Domain 1 select */
25868 #define XRDC_MRGD_W_D1SEL(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D1SEL_SHIFT)) & XRDC_MRGD_W_D1SEL_MASK)
25869 
25870 #define XRDC_MRGD_W_ENDADDR_MASK                 (0xFFFFFFE0U)
25871 #define XRDC_MRGD_W_ENDADDR_SHIFT                (5U)
25872 /*! ENDADDR - End Address */
25873 #define XRDC_MRGD_W_ENDADDR(x)                   (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ENDADDR_SHIFT)) & XRDC_MRGD_W_ENDADDR_MASK)
25874 
25875 #define XRDC_MRGD_W_SRTADDR_MASK                 (0xFFFFFFE0U)
25876 #define XRDC_MRGD_W_SRTADDR_SHIFT                (5U)
25877 /*! SRTADDR - Start Address */
25878 #define XRDC_MRGD_W_SRTADDR(x)                   (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_SRTADDR_SHIFT)) & XRDC_MRGD_W_SRTADDR_MASK)
25879 
25880 #define XRDC_MRGD_W_D2SEL_MASK                   (0x1C0U)
25881 #define XRDC_MRGD_W_D2SEL_SHIFT                  (6U)
25882 /*! D2SEL - Domain 2 select */
25883 #define XRDC_MRGD_W_D2SEL(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D2SEL_SHIFT)) & XRDC_MRGD_W_D2SEL_MASK)
25884 
25885 #define XRDC_MRGD_W_LKAS1_MASK                   (0x1000U)
25886 #define XRDC_MRGD_W_LKAS1_SHIFT                  (12U)
25887 /*! LKAS1 - Lock ACCSET1
25888  *  0b0..Writes to ACCSET1 affect lesser modes
25889  *  0b1..ACCSET1 cannot be modified
25890  */
25891 #define XRDC_MRGD_W_LKAS1(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LKAS1_SHIFT)) & XRDC_MRGD_W_LKAS1_MASK)
25892 
25893 #define XRDC_MRGD_W_ACCSET2_MASK                 (0xFFF0000U)
25894 #define XRDC_MRGD_W_ACCSET2_SHIFT                (16U)
25895 /*! ACCSET2 - SET 2 of Programmable access flags. */
25896 #define XRDC_MRGD_W_ACCSET2(x)                   (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ACCSET2_SHIFT)) & XRDC_MRGD_W_ACCSET2_MASK)
25897 
25898 #define XRDC_MRGD_W_EAL_MASK                     (0x3000000U)
25899 #define XRDC_MRGD_W_EAL_SHIFT                    (24U)
25900 /*! EAL - Exclusive Access Lock
25901  *  0b00..Lock disabled
25902  *  0b01..Lock disabled until next reset
25903  *  0b10..Lock enabled, lock state = available
25904  *  0b11..Lock enabled, lock state = not available
25905  */
25906 #define XRDC_MRGD_W_EAL(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_EAL_SHIFT)) & XRDC_MRGD_W_EAL_MASK)
25907 
25908 #define XRDC_MRGD_W_EALO_MASK                    (0xF000000U)
25909 #define XRDC_MRGD_W_EALO_SHIFT                   (24U)
25910 /*! EALO - Exclusive Access Lock Owner */
25911 #define XRDC_MRGD_W_EALO(x)                      (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_EALO_SHIFT)) & XRDC_MRGD_W_EALO_MASK)
25912 
25913 #define XRDC_MRGD_W_LKAS2_MASK                   (0x10000000U)
25914 #define XRDC_MRGD_W_LKAS2_SHIFT                  (28U)
25915 /*! LKAS2 - Lock ACCSET2
25916  *  0b0..Writes to ACCSET2 affect lesser modes
25917  *  0b1..ACCSET2 cannot be modified
25918  */
25919 #define XRDC_MRGD_W_LKAS2(x)                     (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LKAS2_SHIFT)) & XRDC_MRGD_W_LKAS2_MASK)
25920 
25921 #define XRDC_MRGD_W_LK2_MASK                     (0x60000000U)
25922 #define XRDC_MRGD_W_LK2_SHIFT                    (29U)
25923 /*! LK2 - Lock
25924  *  0b00..Entire MRGDn can be written.
25925  *  0b01..Entire MRGDn can be written.
25926  *  0b10..Domain x can only update the DxACP field and the LK2 field; no other MRGDn fields can be written.
25927  *  0b11..MRGDn is locked (read-only) until the next reset.
25928  */
25929 #define XRDC_MRGD_W_LK2(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LK2_SHIFT)) & XRDC_MRGD_W_LK2_MASK)
25930 
25931 #define XRDC_MRGD_W_CR_MASK                      (0x80000000U)
25932 #define XRDC_MRGD_W_CR_SHIFT                     (31U)
25933 /*! CR - Code Region Indicator */
25934 #define XRDC_MRGD_W_CR(x)                        (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_CR_SHIFT)) & XRDC_MRGD_W_CR_MASK)
25935 
25936 #define XRDC_MRGD_W_VLD_MASK                     (0x80000000U)
25937 #define XRDC_MRGD_W_VLD_SHIFT                    (31U)
25938 /*! VLD - Valid
25939  *  0b0..The MRGDn assignment is invalid.
25940  *  0b1..The MRGDn assignment is valid.
25941  */
25942 #define XRDC_MRGD_W_VLD(x)                       (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_VLD_SHIFT)) & XRDC_MRGD_W_VLD_MASK)
25943 /*! @} */
25944 
25945 /* The count of XRDC_MRGD_W */
25946 #define XRDC_MRGD_W_COUNT                        (24U)
25947 
25948 /* The count of XRDC_MRGD_W */
25949 #define XRDC_MRGD_W_COUNT2                       (5U)
25950 
25951 
25952 /*!
25953  * @}
25954  */ /* end of group XRDC_Register_Masks */
25955 
25956 
25957 /* XRDC - Peripheral instance base addresses */
25958 /** Peripheral XRDC base address */
25959 #define XRDC_BASE                                (0x40014000u)
25960 /** Peripheral XRDC base pointer */
25961 #define XRDC                                     ((XRDC_Type *)XRDC_BASE)
25962 /** Array initializer of XRDC peripheral base addresses */
25963 #define XRDC_BASE_ADDRS                          { XRDC_BASE }
25964 /** Array initializer of XRDC peripheral base pointers */
25965 #define XRDC_BASE_PTRS                           { XRDC }
25966 
25967 /*!
25968  * @}
25969  */ /* end of group XRDC_Peripheral_Access_Layer */
25970 
25971 
25972 /*
25973 ** End of section using anonymous unions
25974 */
25975 
25976 #if defined(__ARMCC_VERSION)
25977   #if (__ARMCC_VERSION >= 6010050)
25978     #pragma clang diagnostic pop
25979   #else
25980     #pragma pop
25981   #endif
25982 #elif defined(__GNUC__)
25983   /* leave anonymous unions enabled */
25984 #elif defined(__IAR_SYSTEMS_ICC__)
25985   #pragma language=default
25986 #else
25987   #error Not supported compiler type
25988 #endif
25989 
25990 /*!
25991  * @}
25992  */ /* end of group Peripheral_access_layer */
25993 
25994 
25995 /* ----------------------------------------------------------------------------
25996    -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
25997    ---------------------------------------------------------------------------- */
25998 
25999 /*!
26000  * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
26001  * @{
26002  */
26003 
26004 #if defined(__ARMCC_VERSION)
26005   #if (__ARMCC_VERSION >= 6010050)
26006     #pragma clang system_header
26007   #endif
26008 #elif defined(__IAR_SYSTEMS_ICC__)
26009   #pragma system_include
26010 #endif
26011 
26012 /**
26013  * @brief Mask and left-shift a bit field value for use in a register bit range.
26014  * @param field Name of the register bit field.
26015  * @param value Value of the bit field.
26016  * @return Masked and shifted value.
26017  */
26018 #define NXP_VAL2FLD(field, value)    (((value) << (field ## _SHIFT)) & (field ## _MASK))
26019 /**
26020  * @brief Mask and right-shift a register value to extract a bit field value.
26021  * @param field Name of the register bit field.
26022  * @param value Value of the register.
26023  * @return Masked and shifted bit field value.
26024  */
26025 #define NXP_FLD2VAL(field, value)    (((value) & (field ## _MASK)) >> (field ## _SHIFT))
26026 
26027 /*!
26028  * @}
26029  */ /* end of group Bit_Field_Generic_Macros */
26030 
26031 
26032 /* ----------------------------------------------------------------------------
26033    -- SDK Compatibility
26034    ---------------------------------------------------------------------------- */
26035 
26036 /*!
26037  * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
26038  * @{
26039  */
26040 
26041 /* No SDK compatibility issues. */
26042 
26043 /*!
26044  * @}
26045  */ /* end of group SDK_Compatibility_Symbols */
26046 
26047 
26048 #endif  /* K32L3A60_CM0PLUS_H_ */
26049 
26050