aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/LPC54S018.h22108
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/LPC54S018_features.h355
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/all_lib_device_LPC54S018.cmake134
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/arm/LPC540xx_MT25QL128.FLMbin0 -> 630100 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/arm/LPC540xx_MX25L12835FM2I.FLMbin0 -> 630208 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/arm/LPC540xx_W25Q128JVFM.FLMbin0 -> 630144 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/device_CMSIS.cmake15
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/device_startup.cmake15
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/device_system.cmake16
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/driver_power.cmake16
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/driver_clock.cmake17
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/driver_inputmux_connections.cmake15
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/driver_reset.cmake16
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_clock.c2827
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_clock.h1296
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_fro_calib.h39
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_inputmux_connections.h207
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_power.c20
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_power.h225
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_reset.c132
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/drivers/fsl_reset.h279
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/fsl_device_registers.h34
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/LPC54S018_ram.ld215
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/LPC54S018_spifi_flash.ld222
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/libfro_calib_hardabi.abin0 -> 2608 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/libfro_calib_softabi.abin0 -> 2604 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/libpower_hardabi.abin0 -> 24930 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/libpower_softabi.abin0 -> 24926 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/gcc/startup_LPC54S018.S929
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/libfro_calib_hardabi.abin0 -> 2608 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/libfro_calib_softabi.abin0 -> 2604 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/libpower_hardabi.abin0 -> 24930 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/libpower_softabi.abin0 -> 24926 bytes
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/startup_lpc54s018.c835
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/mcuxpresso/startup_lpc54s018.cpp835
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/board.c40
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/board.h121
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/clock_config.c89
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/clock_config.h68
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/peripherals.c51
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/peripherals.h34
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/pin_mux.c61
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/project_template/pin_mux.h52
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/system_LPC54S018.c364
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/system_LPC54S018.h108
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/template/RTE_Device.h281
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/utilities/fsl_notifier.c209
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/utilities/fsl_notifier.h237
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/utilities/fsl_shell.c1085
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/utilities/fsl_shell.h292
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/utilities/utility_shell.cmake18
51 files changed, 33912 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/LPC54S018.h b/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/LPC54S018.h
new file mode 100644
index 000000000..21d1abacc
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S018/LPC54S018.h
@@ -0,0 +1,22108 @@
1/*
2** ###################################################################
3** Processors: LPC54S018JBD208
4** LPC54S018JET180
5**
6** Compilers: GNU C Compiler
7** IAR ANSI C/C++ Compiler for ARM
8** Keil ARM C/C++ Compiler
9** MCUXpresso Compiler
10**
11** Reference manual: LPC540xx/LPC54S0xx User manual Rev.0.8 5 June 2018
12** Version: rev. 1.0, 2018-04-20
13** Build: b200304
14**
15** Abstract:
16** CMSIS Peripheral Access Layer for LPC54S018
17**
18** Copyright 1997-2016 Freescale Semiconductor, Inc.
19** Copyright 2016-2020 NXP
20** All rights reserved.
21**
22** SPDX-License-Identifier: BSD-3-Clause
23**
24** http: www.nxp.com
25** mail: [email protected]
26**
27** Revisions:
28** - rev. 1.0 (2018-04-20)
29** Initial version.
30**
31** ###################################################################
32*/
33
34/*!
35 * @file LPC54S018.h
36 * @version 1.0
37 * @date 2018-04-20
38 * @brief CMSIS Peripheral Access Layer for LPC54S018
39 *
40 * CMSIS Peripheral Access Layer for LPC54S018
41 */
42
43#ifndef _LPC54S018_H_
44#define _LPC54S018_H_ /**< Symbol preventing repeated inclusion */
45
46/** Memory map major version (memory maps with equal major version number are
47 * compatible) */
48#define MCU_MEM_MAP_VERSION 0x0100U
49/** Memory map minor version */
50#define MCU_MEM_MAP_VERSION_MINOR 0x0000U
51
52
53/* ----------------------------------------------------------------------------
54 -- Interrupt vector numbers
55 ---------------------------------------------------------------------------- */
56
57/*!
58 * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
59 * @{
60 */
61
62/** Interrupt Number Definitions */
63#define NUMBER_OF_INT_VECTORS 75 /**< Number of interrupts in the Vector table */
64
65typedef enum IRQn {
66 /* Auxiliary constants */
67 NotAvail_IRQn = -128, /**< Not available device specific interrupt */
68
69 /* Core interrupts */
70 NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
71 HardFault_IRQn = -13, /**< Cortex-M4 SV Hard Fault Interrupt */
72 MemoryManagement_IRQn = -12, /**< Cortex-M4 Memory Management Interrupt */
73 BusFault_IRQn = -11, /**< Cortex-M4 Bus Fault Interrupt */
74 UsageFault_IRQn = -10, /**< Cortex-M4 Usage Fault Interrupt */
75 SVCall_IRQn = -5, /**< Cortex-M4 SV Call Interrupt */
76 DebugMonitor_IRQn = -4, /**< Cortex-M4 Debug Monitor Interrupt */
77 PendSV_IRQn = -2, /**< Cortex-M4 Pend SV Interrupt */
78 SysTick_IRQn = -1, /**< Cortex-M4 System Tick Interrupt */
79
80 /* Device specific interrupts */
81 WDT_BOD_IRQn = 0, /**< Windowed watchdog timer, Brownout detect */
82 DMA0_IRQn = 1, /**< DMA controller */
83 GINT0_IRQn = 2, /**< GPIO group 0 */
84 GINT1_IRQn = 3, /**< GPIO group 1 */
85 PIN_INT0_IRQn = 4, /**< Pin interrupt 0 or pattern match engine slice 0 */
86 PIN_INT1_IRQn = 5, /**< Pin interrupt 1or pattern match engine slice 1 */
87 PIN_INT2_IRQn = 6, /**< Pin interrupt 2 or pattern match engine slice 2 */
88 PIN_INT3_IRQn = 7, /**< Pin interrupt 3 or pattern match engine slice 3 */
89 UTICK0_IRQn = 8, /**< Micro-tick Timer */
90 MRT0_IRQn = 9, /**< Multi-rate timer */
91 CTIMER0_IRQn = 10, /**< Standard counter/timer CTIMER0 */
92 CTIMER1_IRQn = 11, /**< Standard counter/timer CTIMER1 */
93 SCT0_IRQn = 12, /**< SCTimer/PWM */
94 CTIMER3_IRQn = 13, /**< Standard counter/timer CTIMER3 */
95 FLEXCOMM0_IRQn = 14, /**< Flexcomm Interface 0 (USART, SPI, I2C, FLEXCOMM) */
96 FLEXCOMM1_IRQn = 15, /**< Flexcomm Interface 1 (USART, SPI, I2C, FLEXCOMM) */
97 FLEXCOMM2_IRQn = 16, /**< Flexcomm Interface 2 (USART, SPI, I2C, FLEXCOMM) */
98 FLEXCOMM3_IRQn = 17, /**< Flexcomm Interface 3 (USART, SPI, I2C, FLEXCOMM) */
99 FLEXCOMM4_IRQn = 18, /**< Flexcomm Interface 4 (USART, SPI, I2C, FLEXCOMM) */
100 FLEXCOMM5_IRQn = 19, /**< Flexcomm Interface 5 (USART, SPI, I2C,, FLEXCOMM) */
101 FLEXCOMM6_IRQn = 20, /**< Flexcomm Interface 6 (USART, SPI, I2C, I2S,, FLEXCOMM) */
102 FLEXCOMM7_IRQn = 21, /**< Flexcomm Interface 7 (USART, SPI, I2C, I2S,, FLEXCOMM) */
103 ADC0_SEQA_IRQn = 22, /**< ADC0 sequence A completion. */
104 ADC0_SEQB_IRQn = 23, /**< ADC0 sequence B completion. */
105 ADC0_THCMP_IRQn = 24, /**< ADC0 threshold compare and error. */
106 DMIC0_IRQn = 25, /**< Digital microphone and DMIC subsystem */
107 HWVAD0_IRQn = 26, /**< Hardware Voice Activity Detector */
108 USB0_NEEDCLK_IRQn = 27, /**< USB Activity Wake-up Interrupt */
109 USB0_IRQn = 28, /**< USB device */
110 RTC_IRQn = 29, /**< RTC alarm and wake-up interrupts */
111 FLEXCOMM10_IRQn = 30, /**< Flexcomm Interface 10 (SPI, FLEXCOMM) */
112 Reserved47_IRQn = 31, /**< Reserved interrupt */
113 PIN_INT4_IRQn = 32, /**< Pin interrupt 4 or pattern match engine slice 4 int */
114 PIN_INT5_IRQn = 33, /**< Pin interrupt 5 or pattern match engine slice 5 int */
115 PIN_INT6_IRQn = 34, /**< Pin interrupt 6 or pattern match engine slice 6 int */
116 PIN_INT7_IRQn = 35, /**< Pin interrupt 7 or pattern match engine slice 7 int */
117 CTIMER2_IRQn = 36, /**< Standard counter/timer CTIMER2 */
118 CTIMER4_IRQn = 37, /**< Standard counter/timer CTIMER4 */
119 RIT_IRQn = 38, /**< Repetitive Interrupt Timer */
120 SPIFI0_IRQn = 39, /**< SPI flash interface */
121 FLEXCOMM8_IRQn = 40, /**< Flexcomm Interface 8 (USART, SPI, I2C, FLEXCOMM) */
122 FLEXCOMM9_IRQn = 41, /**< Flexcomm Interface 9 (USART, SPI, I2C, FLEXCOMM) */
123 SDIO_IRQn = 42, /**< SD/MMC */
124 CAN0_IRQ0_IRQn = 43, /**< CAN0 interrupt0 */
125 CAN0_IRQ1_IRQn = 44, /**< CAN0 interrupt1 */
126 CAN1_IRQ0_IRQn = 45, /**< CAN1 interrupt0 */
127 CAN1_IRQ1_IRQn = 46, /**< CAN1 interrupt1 */
128 USB1_IRQn = 47, /**< USB1 interrupt */
129 USB1_NEEDCLK_IRQn = 48, /**< USB1 activity */
130 ETHERNET_IRQn = 49, /**< Ethernet */
131 ETHERNET_PMT_IRQn = 50, /**< Ethernet power management interrupt */
132 ETHERNET_MACLP_IRQn = 51, /**< Ethernet MAC interrupt */
133 Reserved68_IRQn = 52, /**< Reserved interrupt */
134 LCD_IRQn = 53, /**< LCD interrupt */
135 SHA_IRQn = 54, /**< SHA interrupt */
136 SMARTCARD0_IRQn = 55, /**< Smart card 0 interrupt */
137 SMARTCARD1_IRQn = 56, /**< Smart card 1 interrupt */
138 Reserved73_IRQn = 57, /**< Reserved interrupt */
139 PUF_IRQn = 58 /**< PUF interrupt */
140} IRQn_Type;
141
142/*!
143 * @}
144 */ /* end of group Interrupt_vector_numbers */
145
146
147/* ----------------------------------------------------------------------------
148 -- Cortex M4 Core Configuration
149 ---------------------------------------------------------------------------- */
150
151/*!
152 * @addtogroup Cortex_Core_Configuration Cortex M4 Core Configuration
153 * @{
154 */
155
156#define __MPU_PRESENT 1 /**< Defines if an MPU is present or not */
157#define __NVIC_PRIO_BITS 3 /**< Number of priority bits implemented in the NVIC */
158#define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
159#define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
160
161#include "core_cm4.h" /* Core Peripheral Access Layer */
162#include "system_LPC54S018.h" /* Device specific configuration file */
163
164/*!
165 * @}
166 */ /* end of group Cortex_Core_Configuration */
167
168
169/* ----------------------------------------------------------------------------
170 -- Mapping Information
171 ---------------------------------------------------------------------------- */
172
173/*!
174 * @addtogroup Mapping_Information Mapping Information
175 * @{
176 */
177
178/** Mapping Information */
179/*!
180 * @addtogroup dma_request
181 * @{
182 */
183
184/*******************************************************************************
185 * Definitions
186 ******************************************************************************/
187
188/*!
189 * @brief Structure for the DMA hardware request
190 *
191 * Defines the structure for the DMA hardware request collections. The user can configure the
192 * hardware request to trigger the DMA transfer accordingly. The index
193 * of the hardware request varies according to the to SoC.
194 */
195typedef enum _dma_request_source
196{
197 kDmaRequestFlexcomm0Rx = 0U, /**< Flexcomm Interface 0 RX/I2C Slave */
198 kDmaRequestFlexcomm0Tx = 1U, /**< Flexcomm Interface 0 TX/I2C Master */
199 kDmaRequestFlexcomm1Rx = 2U, /**< Flexcomm Interface 1 RX/I2C Slave */
200 kDmaRequestFlexcomm1Tx = 3U, /**< Flexcomm Interface 1 TX/I2C Master */
201 kDmaRequestFlexcomm2Rx = 4U, /**< Flexcomm Interface 2 RX/I2C Slave */
202 kDmaRequestFlexcomm2Tx = 5U, /**< Flexcomm Interface 2 TX/I2C Master */
203 kDmaRequestFlexcomm3Rx = 6U, /**< Flexcomm Interface 3 RX/I2C Slave */
204 kDmaRequestFlexcomm3Tx = 7U, /**< Flexcomm Interface 3 TX/I2C Master */
205 kDmaRequestFlexcomm4Rx = 8U, /**< Flexcomm Interface 4 RX/I2C Slave */
206 kDmaRequestFlexcomm4Tx = 9U, /**< Flexcomm Interface 4 TX/I2C Master */
207 kDmaRequestFlexcomm5Rx = 10U, /**< Flexcomm Interface 5 RX/I2C Slave */
208 kDmaRequestFlexcomm5Tx = 11U, /**< Flexcomm Interface 5 TX/I2C Master */
209 kDmaRequestFlexcomm6Rx = 12U, /**< Flexcomm Interface 6 RX/I2C Slave */
210 kDmaRequestFlexcomm6Tx = 13U, /**< Flexcomm Interface 6 TX/I2C Master */
211 kDmaRequestFlexcomm7Rx = 14U, /**< Flexcomm Interface 7 RX/I2C Slave */
212 kDmaRequestFlexcomm7Tx = 15U, /**< Flexcomm Interface 7 TX/I2C Master */
213 kDmaRequestDMIC0 = 16U, /**< Digital microphone interface 0 channel 0 */
214 kDmaRequestDMIC1 = 17U, /**< Digital microphone interface 0 channel 1 */
215 kDmaRequestSPIFI = 18U, /**< SPI Flash Interface */
216 kDmaRequestSHA = 19U, /**< Secure Hash Algorithm */
217 kDmaRequestFlexcomm8Rx = 20U, /**< Flexcomm Interface 8 RX/I2C Slave */
218 kDmaRequestFlexcomm8Tx = 21U, /**< Flexcomm Interface 8 TX/I2C Slave */
219 kDmaRequestFlexcomm9Rx = 22U, /**< Flexcomm Interface 9 RX/I2C Slave */
220 kDmaRequestFlexcomm9Tx = 23U, /**< Flexcomm Interface 9 TX/I2C Slave */
221 kDmaRequestSMARTCARD0_RX = 24U, /**< SMARTCARD0 RX */
222 kDmaRequestSMARTCARD0_TX = 25U, /**< SMARTCARD0 TX */
223 kDmaRequestSMARTCARD1_RX = 26U, /**< SMARTCARD1 RX */
224 kDmaRequestSMARTCARD1_TX = 27U, /**< SMARTCARD1 TX */
225 kDmaRequestFlexcomm10Rx = 28U, /**< Flexcomm Interface 10 RX */
226 kDmaRequestFlexcomm10Tx = 29U, /**< Flexcomm Interface 10 TX */
227} dma_request_source_t;
228
229/* @} */
230
231
232/*!
233 * @}
234 */ /* end of group Mapping_Information */
235
236
237/* ----------------------------------------------------------------------------
238 -- Device Peripheral Access Layer
239 ---------------------------------------------------------------------------- */
240
241/*!
242 * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
243 * @{
244 */
245
246
247/*
248** Start of section using anonymous unions
249*/
250
251#if defined(__ARMCC_VERSION)
252 #if (__ARMCC_VERSION >= 6010050)
253 #pragma clang diagnostic push
254 #else
255 #pragma push
256 #pragma anon_unions
257 #endif
258#elif defined(__GNUC__)
259 /* anonymous unions are enabled by default */
260#elif defined(__IAR_SYSTEMS_ICC__)
261 #pragma language=extended
262#else
263 #error Not supported compiler type
264#endif
265
266/* ----------------------------------------------------------------------------
267 -- ADC Peripheral Access Layer
268 ---------------------------------------------------------------------------- */
269
270/*!
271 * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
272 * @{
273 */
274
275/** ADC - Register Layout Typedef */
276typedef struct {
277 __IO uint32_t CTRL; /**< ADC Control register. Contains the clock divide value, resolution selection, sampling time selection, and mode controls., offset: 0x0 */
278 __IO uint32_t INSEL; /**< Input Select. Allows selection of the temperature sensor as an alternate input to ADC channel 0., offset: 0x4 */
279 __IO uint32_t SEQ_CTRL[2]; /**< ADC Conversion Sequence-n control register: Controls triggering and channel selection for conversion sequence-n. Also specifies interrupt mode for sequence-n., array offset: 0x8, array step: 0x4 */
280 __I uint32_t SEQ_GDAT[2]; /**< ADC Sequence-n Global Data register. This register contains the result of the most recent ADC conversion performed under sequence-n., array offset: 0x10, array step: 0x4 */
281 uint8_t RESERVED_0[8];
282 __I uint32_t DAT[12]; /**< ADC Channel 0 Data register. This register contains the result of the most recent conversion completed on channel 0., array offset: 0x20, array step: 0x4 */
283 __IO uint32_t THR0_LOW; /**< ADC Low Compare Threshold register 0: Contains the lower threshold level for automatic threshold comparison for any channels linked to threshold pair 0., offset: 0x50 */
284 __IO uint32_t THR1_LOW; /**< ADC Low Compare Threshold register 1: Contains the lower threshold level for automatic threshold comparison for any channels linked to threshold pair 1., offset: 0x54 */
285 __IO uint32_t THR0_HIGH; /**< ADC High Compare Threshold register 0: Contains the upper threshold level for automatic threshold comparison for any channels linked to threshold pair 0., offset: 0x58 */
286 __IO uint32_t THR1_HIGH; /**< ADC High Compare Threshold register 1: Contains the upper threshold level for automatic threshold comparison for any channels linked to threshold pair 1., offset: 0x5C */
287 __IO uint32_t CHAN_THRSEL; /**< ADC Channel-Threshold Select register. Specifies which set of threshold compare registers are to be used for each channel, offset: 0x60 */
288 __IO uint32_t INTEN; /**< ADC Interrupt Enable register. This register contains enable bits that enable the sequence-A, sequence-B, threshold compare and data overrun interrupts to be generated., offset: 0x64 */
289 __IO uint32_t FLAGS; /**< ADC Flags register. Contains the four interrupt/DMA trigger flags and the individual component overrun and threshold-compare flags. (The overrun bits replicate information stored in the result registers)., offset: 0x68 */
290 __IO uint32_t STARTUP; /**< ADC Startup register., offset: 0x6C */
291 __IO uint32_t CALIB; /**< ADC Calibration register., offset: 0x70 */
292} ADC_Type;
293
294/* ----------------------------------------------------------------------------
295 -- ADC Register Masks
296 ---------------------------------------------------------------------------- */
297
298/*!
299 * @addtogroup ADC_Register_Masks ADC Register Masks
300 * @{
301 */
302
303/*! @name CTRL - ADC Control register. Contains the clock divide value, resolution selection, sampling time selection, and mode controls. */
304/*! @{ */
305#define ADC_CTRL_CLKDIV_MASK (0xFFU)
306#define ADC_CTRL_CLKDIV_SHIFT (0U)
307/*! CLKDIV - In synchronous mode only, the system clock is divided by this value plus one to produce
308 * the clock for the ADC converter, which should be less than or equal to 72 MHz. Typically,
309 * software should program the smallest value in this field that yields this maximum clock rate or
310 * slightly less, but in certain cases (such as a high-impedance analog source) a slower clock may
311 * be desirable. This field is ignored in the asynchronous operating mode.
312 */
313#define ADC_CTRL_CLKDIV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CLKDIV_SHIFT)) & ADC_CTRL_CLKDIV_MASK)
314#define ADC_CTRL_ASYNMODE_MASK (0x100U)
315#define ADC_CTRL_ASYNMODE_SHIFT (8U)
316/*! ASYNMODE - Select clock mode.
317 * 0b0..Synchronous mode. The ADC clock is derived from the system clock based on the divide value selected in
318 * the CLKDIV field. The ADC clock will be started in a controlled fashion in response to a trigger to
319 * eliminate any uncertainty in the launching of an ADC conversion in response to any synchronous (on-chip) trigger.
320 * In Synchronous mode with the SYNCBYPASS bit (in a sequence control register) set, sampling of the ADC
321 * input and start of conversion will initiate 2 system clocks after the leading edge of a (synchronous) trigger
322 * pulse.
323 * 0b1..Asynchronous mode. The ADC clock is based on the output of the ADC clock divider ADCCLKSEL in the SYSCON block.
324 */
325#define ADC_CTRL_ASYNMODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_ASYNMODE_SHIFT)) & ADC_CTRL_ASYNMODE_MASK)
326#define ADC_CTRL_RESOL_MASK (0x600U)
327#define ADC_CTRL_RESOL_SHIFT (9U)
328/*! RESOL - The number of bits of ADC resolution. Accuracy can be reduced to achieve higher
329 * conversion rates. A single conversion (including one conversion in a burst or sequence) requires the
330 * selected number of bits of resolution plus 3 ADC clocks. This field must only be altered when
331 * the ADC is fully idle. Changing it during any kind of ADC operation may have unpredictable
332 * results. ADC clock frequencies for various resolutions must not exceed: - 5x the system clock rate
333 * for 12-bit resolution - 4.3x the system clock rate for 10-bit resolution - 3.6x the system
334 * clock for 8-bit resolution - 3x the bus clock rate for 6-bit resolution
335 * 0b00..6-bit resolution. An ADC conversion requires 9 ADC clocks, plus any clocks specified by the TSAMP field.
336 * 0b01..8-bit resolution. An ADC conversion requires 11 ADC clocks, plus any clocks specified by the TSAMP field.
337 * 0b10..10-bit resolution. An ADC conversion requires 13 ADC clocks, plus any clocks specified by the TSAMP field.
338 * 0b11..12-bit resolution. An ADC conversion requires 15 ADC clocks, plus any clocks specified by the TSAMP field.
339 */
340#define ADC_CTRL_RESOL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RESOL_SHIFT)) & ADC_CTRL_RESOL_MASK)
341#define ADC_CTRL_BYPASSCAL_MASK (0x800U)
342#define ADC_CTRL_BYPASSCAL_SHIFT (11U)
343/*! BYPASSCAL - Bypass Calibration. This bit may be set to avoid the need to calibrate if offset
344 * error is not a concern in the application.
345 * 0b0..Calibrate. The stored calibration value will be applied to the ADC during conversions to compensated for
346 * offset error. A calibration cycle must be performed each time the chip is powered-up. Re-calibration may
347 * be warranted periodically - especially if operating conditions have changed.
348 * 0b1..Bypass calibration. Calibration is not utilized. Less time is required when enabling the ADC -
349 * particularly following chip power-up. Attempts to launch a calibration cycle are blocked when this bit is set.
350 */
351#define ADC_CTRL_BYPASSCAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_BYPASSCAL_SHIFT)) & ADC_CTRL_BYPASSCAL_MASK)
352#define ADC_CTRL_TSAMP_MASK (0x7000U)
353#define ADC_CTRL_TSAMP_SHIFT (12U)
354/*! TSAMP - Sample Time. The default sampling period (TSAMP = '000') at the start of each conversion
355 * is 2.5 ADC clock periods. Depending on a variety of factors, including operating conditions
356 * and the output impedance of the analog source, longer sampling times may be required. See
357 * Section 28.7.10. The TSAMP field specifies the number of additional ADC clock cycles, from zero to
358 * seven, by which the sample period will be extended. The total conversion time will increase by
359 * the same number of clocks. 000 - The sample period will be the default 2.5 ADC clocks. A
360 * complete conversion with 12-bits of accuracy will require 15 clocks. 001- The sample period will
361 * be extended by one ADC clock to a total of 3.5 clock periods. A complete 12-bit conversion will
362 * require 16 clocks. 010 - The sample period will be extended by two clocks to 4.5 ADC clock
363 * cycles. A complete 12-bit conversion will require 17 ADC clocks. 111 - The sample period will be
364 * extended by seven clocks to 9.5 ADC clock cycles. A complete 12-bit conversion will require
365 * 22 ADC clocks.
366 */
367#define ADC_CTRL_TSAMP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_TSAMP_SHIFT)) & ADC_CTRL_TSAMP_MASK)
368/*! @} */
369
370/*! @name INSEL - Input Select. Allows selection of the temperature sensor as an alternate input to ADC channel 0. */
371/*! @{ */
372#define ADC_INSEL_SEL_MASK (0x3U)
373#define ADC_INSEL_SEL_SHIFT (0U)
374/*! SEL - Selects the input source for channel 0. All other values are reserved.
375 * 0b00..ADC0_IN0 function.
376 * 0b11..Internal temperature sensor.
377 */
378#define ADC_INSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_INSEL_SEL_SHIFT)) & ADC_INSEL_SEL_MASK)
379/*! @} */
380
381/*! @name SEQ_CTRL - ADC Conversion Sequence-n control register: Controls triggering and channel selection for conversion sequence-n. Also specifies interrupt mode for sequence-n. */
382/*! @{ */
383#define ADC_SEQ_CTRL_CHANNELS_MASK (0xFFFU)
384#define ADC_SEQ_CTRL_CHANNELS_SHIFT (0U)
385/*! CHANNELS - Selects which one or more of the ADC channels will be sampled and converted when this
386 * sequence is launched. A 1 in any bit of this field will cause the corresponding channel to be
387 * included in the conversion sequence, where bit 0 corresponds to channel 0, bit 1 to channel 1
388 * and so forth. When this conversion sequence is triggered, either by a hardware trigger or via
389 * software command, ADC conversions will be performed on each enabled channel, in sequence,
390 * beginning with the lowest-ordered channel. This field can ONLY be changed while SEQA_ENA (bit 31)
391 * is LOW. It is allowed to change this field and set bit 31 in the same write.
392 */
393#define ADC_SEQ_CTRL_CHANNELS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_CHANNELS_SHIFT)) & ADC_SEQ_CTRL_CHANNELS_MASK)
394#define ADC_SEQ_CTRL_TRIGGER_MASK (0x3F000U)
395#define ADC_SEQ_CTRL_TRIGGER_SHIFT (12U)
396/*! TRIGGER - Selects which of the available hardware trigger sources will cause this conversion
397 * sequence to be initiated. Program the trigger input number in this field. See Table 476. In order
398 * to avoid generating a spurious trigger, it is recommended writing to this field only when
399 * SEQA_ENA (bit 31) is low. It is safe to change this field and set bit 31 in the same write.
400 */
401#define ADC_SEQ_CTRL_TRIGGER(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_TRIGGER_SHIFT)) & ADC_SEQ_CTRL_TRIGGER_MASK)
402#define ADC_SEQ_CTRL_TRIGPOL_MASK (0x40000U)
403#define ADC_SEQ_CTRL_TRIGPOL_SHIFT (18U)
404/*! TRIGPOL - Select the polarity of the selected input trigger for this conversion sequence. In
405 * order to avoid generating a spurious trigger, it is recommended writing to this field only when
406 * SEQA_ENA (bit 31) is low. It is safe to change this field and set bit 31 in the same write.
407 * 0b0..Negative edge. A negative edge launches the conversion sequence on the selected trigger input.
408 * 0b1..Positive edge. A positive edge launches the conversion sequence on the selected trigger input.
409 */
410#define ADC_SEQ_CTRL_TRIGPOL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_TRIGPOL_SHIFT)) & ADC_SEQ_CTRL_TRIGPOL_MASK)
411#define ADC_SEQ_CTRL_SYNCBYPASS_MASK (0x80000U)
412#define ADC_SEQ_CTRL_SYNCBYPASS_SHIFT (19U)
413/*! SYNCBYPASS - Setting this bit allows the hardware trigger input to bypass synchronization
414 * flip-flop stages and therefore shorten the time between the trigger input signal and the start of a
415 * conversion. There are slightly different criteria for whether or not this bit can be set
416 * depending on the clock operating mode: Synchronous mode (the ASYNMODE in the CTRL register = 0):
417 * Synchronization may be bypassed (this bit may be set) if the selected trigger source is already
418 * synchronous with the main system clock (eg. coming from an on-chip, system-clock-based timer).
419 * Whether this bit is set or not, a trigger pulse must be maintained for at least one system
420 * clock period. Asynchronous mode (the ASYNMODE in the CTRL register = 1): Synchronization may be
421 * bypassed (this bit may be set) if it is certain that the duration of a trigger input pulse
422 * will be at least one cycle of the ADC clock (regardless of whether the trigger comes from and
423 * on-chip or off-chip source). If this bit is NOT set, the trigger pulse must at least be
424 * maintained for one system clock period.
425 * 0b0..Enable trigger synchronization. The hardware trigger bypass is not enabled.
426 * 0b1..Bypass trigger synchronization. The hardware trigger bypass is enabled.
427 */
428#define ADC_SEQ_CTRL_SYNCBYPASS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_SYNCBYPASS_SHIFT)) & ADC_SEQ_CTRL_SYNCBYPASS_MASK)
429#define ADC_SEQ_CTRL_START_MASK (0x4000000U)
430#define ADC_SEQ_CTRL_START_SHIFT (26U)
431/*! START - Writing a 1 to this field will launch one pass through this conversion sequence. The
432 * behavior will be identical to a sequence triggered by a hardware trigger. Do not write 1 to this
433 * bit if the BURST bit is set. This bit is only set to a 1 momentarily when written to launch a
434 * conversion sequence. It will consequently always read back as a zero.
435 */
436#define ADC_SEQ_CTRL_START(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_START_SHIFT)) & ADC_SEQ_CTRL_START_MASK)
437#define ADC_SEQ_CTRL_BURST_MASK (0x8000000U)
438#define ADC_SEQ_CTRL_BURST_SHIFT (27U)
439/*! BURST - Writing a 1 to this bit will cause this conversion sequence to be continuously cycled
440 * through. Other sequence A triggers will be ignored while this bit is set. Repeated conversions
441 * can be halted by clearing this bit. The sequence currently in progress will be completed before
442 * conversions are terminated. Note that a new sequence could begin just before BURST is cleared.
443 */
444#define ADC_SEQ_CTRL_BURST(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_BURST_SHIFT)) & ADC_SEQ_CTRL_BURST_MASK)
445#define ADC_SEQ_CTRL_SINGLESTEP_MASK (0x10000000U)
446#define ADC_SEQ_CTRL_SINGLESTEP_SHIFT (28U)
447/*! SINGLESTEP - When this bit is set, a hardware trigger or a write to the START bit will launch a
448 * single conversion on the next channel in the sequence instead of the default response of
449 * launching an entire sequence of conversions. Once all of the channels comprising a sequence have
450 * been converted, a subsequent trigger will repeat the sequence beginning with the first enabled
451 * channel. Interrupt generation will still occur either after each individual conversion or at
452 * the end of the entire sequence, depending on the state of the MODE bit.
453 */
454#define ADC_SEQ_CTRL_SINGLESTEP(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_SINGLESTEP_SHIFT)) & ADC_SEQ_CTRL_SINGLESTEP_MASK)
455#define ADC_SEQ_CTRL_LOWPRIO_MASK (0x20000000U)
456#define ADC_SEQ_CTRL_LOWPRIO_SHIFT (29U)
457/*! LOWPRIO - Set priority for sequence A.
458 * 0b0..Low priority. Any B trigger which occurs while an A conversion sequence is active will be ignored and lost.
459 * 0b1..High priority. Setting this bit to a 1 will permit any enabled B sequence trigger (including a B sequence
460 * software start) to immediately interrupt sequence A and launch a B sequence in it's place. The conversion
461 * currently in progress will be terminated. The A sequence that was interrupted will automatically resume
462 * after the B sequence completes. The channel whose conversion was terminated will be re-sampled and the
463 * conversion sequence will resume from that point.
464 */
465#define ADC_SEQ_CTRL_LOWPRIO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_LOWPRIO_SHIFT)) & ADC_SEQ_CTRL_LOWPRIO_MASK)
466#define ADC_SEQ_CTRL_MODE_MASK (0x40000000U)
467#define ADC_SEQ_CTRL_MODE_SHIFT (30U)
468/*! MODE - Indicates whether the primary method for retrieving conversion results for this sequence
469 * will be accomplished via reading the global data register (SEQA_GDAT) at the end of each
470 * conversion, or the individual channel result registers at the end of the entire sequence. Impacts
471 * when conversion-complete interrupt/DMA trigger for sequence-A will be generated and which
472 * overrun conditions contribute to an overrun interrupt as described below.
473 * 0b0..End of conversion. The sequence A interrupt/DMA trigger will be set at the end of each individual ADC
474 * conversion performed under sequence A. This flag will mirror the DATAVALID bit in the SEQA_GDAT register. The
475 * OVERRUN bit in the SEQA_GDAT register will contribute to generation of an overrun interrupt/DMA trigger
476 * if enabled.
477 * 0b1..End of sequence. The sequence A interrupt/DMA trigger will be set when the entire set of sequence-A
478 * conversions completes. This flag will need to be explicitly cleared by software or by the DMA-clear signal in
479 * this mode. The OVERRUN bit in the SEQA_GDAT register will NOT contribute to generation of an overrun
480 * interrupt/DMA trigger since it is assumed this register may not be utilized in this mode.
481 */
482#define ADC_SEQ_CTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_MODE_SHIFT)) & ADC_SEQ_CTRL_MODE_MASK)
483#define ADC_SEQ_CTRL_SEQ_ENA_MASK (0x80000000U)
484#define ADC_SEQ_CTRL_SEQ_ENA_SHIFT (31U)
485/*! SEQ_ENA - Sequence Enable. In order to avoid spuriously triggering the sequence, care should be
486 * taken to only set the SEQn_ENA bit when the selected trigger input is in its INACTIVE state
487 * (as defined by the TRIGPOL bit). If this condition is not met, the sequence will be triggered
488 * immediately upon being enabled. In order to avoid spuriously triggering the sequence, care
489 * should be taken to only set the SEQn_ENA bit when the selected trigger input is in its INACTIVE
490 * state (as defined by the TRIGPOL bit). If this condition is not met, the sequence will be
491 * triggered immediately upon being enabled.
492 * 0b0..Disabled. Sequence n is disabled. Sequence n triggers are ignored. If this bit is cleared while sequence
493 * n is in progress, the sequence will be halted at the end of the current conversion. After the sequence is
494 * re-enabled, a new trigger will be required to restart the sequence beginning with the next enabled channel.
495 * 0b1..Enabled. Sequence n is enabled.
496 */
497#define ADC_SEQ_CTRL_SEQ_ENA(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_CTRL_SEQ_ENA_SHIFT)) & ADC_SEQ_CTRL_SEQ_ENA_MASK)
498/*! @} */
499
500/* The count of ADC_SEQ_CTRL */
501#define ADC_SEQ_CTRL_COUNT (2U)
502
503/*! @name SEQ_GDAT - ADC Sequence-n Global Data register. This register contains the result of the most recent ADC conversion performed under sequence-n. */
504/*! @{ */
505#define ADC_SEQ_GDAT_RESULT_MASK (0xFFF0U)
506#define ADC_SEQ_GDAT_RESULT_SHIFT (4U)
507/*! RESULT - This field contains the 12-bit ADC conversion result from the most recent conversion
508 * performed under conversion sequence associated with this register. The result is a binary
509 * fraction representing the voltage on the currently-selected input channel as it falls within the
510 * range of VREFP to VREFN. Zero in the field indicates that the voltage on the input pin was less
511 * than, equal to, or close to that on VREFN, while 0xFFF indicates that the voltage on the input
512 * was close to, equal to, or greater than that on VREFP. DATAVALID = 1 indicates that this
513 * result has not yet been read.
514 */
515#define ADC_SEQ_GDAT_RESULT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_RESULT_SHIFT)) & ADC_SEQ_GDAT_RESULT_MASK)
516#define ADC_SEQ_GDAT_THCMPRANGE_MASK (0x30000U)
517#define ADC_SEQ_GDAT_THCMPRANGE_SHIFT (16U)
518/*! THCMPRANGE - Indicates whether the result of the last conversion performed was above, below or
519 * within the range established by the designated threshold comparison registers (THRn_LOW and
520 * THRn_HIGH).
521 */
522#define ADC_SEQ_GDAT_THCMPRANGE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_THCMPRANGE_SHIFT)) & ADC_SEQ_GDAT_THCMPRANGE_MASK)
523#define ADC_SEQ_GDAT_THCMPCROSS_MASK (0xC0000U)
524#define ADC_SEQ_GDAT_THCMPCROSS_SHIFT (18U)
525/*! THCMPCROSS - Indicates whether the result of the last conversion performed represented a
526 * crossing of the threshold level established by the designated LOW threshold comparison register
527 * (THRn_LOW) and, if so, in what direction the crossing occurred.
528 */
529#define ADC_SEQ_GDAT_THCMPCROSS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_THCMPCROSS_SHIFT)) & ADC_SEQ_GDAT_THCMPCROSS_MASK)
530#define ADC_SEQ_GDAT_CHN_MASK (0x3C000000U)
531#define ADC_SEQ_GDAT_CHN_SHIFT (26U)
532/*! CHN - These bits contain the channel from which the RESULT bits were converted (e.g. 0000
533 * identifies channel 0, 0001 channel 1, etc.).
534 */
535#define ADC_SEQ_GDAT_CHN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_CHN_SHIFT)) & ADC_SEQ_GDAT_CHN_MASK)
536#define ADC_SEQ_GDAT_OVERRUN_MASK (0x40000000U)
537#define ADC_SEQ_GDAT_OVERRUN_SHIFT (30U)
538/*! OVERRUN - This bit is set if a new conversion result is loaded into the RESULT field before a
539 * previous result has been read - i.e. while the DATAVALID bit is set. This bit is cleared, along
540 * with the DATAVALID bit, whenever this register is read. This bit will contribute to an overrun
541 * interrupt/DMA trigger if the MODE bit (in SEQAA_CTRL) for the corresponding sequence is set
542 * to '0' (and if the overrun interrupt is enabled).
543 */
544#define ADC_SEQ_GDAT_OVERRUN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_OVERRUN_SHIFT)) & ADC_SEQ_GDAT_OVERRUN_MASK)
545#define ADC_SEQ_GDAT_DATAVALID_MASK (0x80000000U)
546#define ADC_SEQ_GDAT_DATAVALID_SHIFT (31U)
547/*! DATAVALID - This bit is set to '1' at the end of each conversion when a new result is loaded
548 * into the RESULT field. It is cleared whenever this register is read. This bit will cause a
549 * conversion-complete interrupt for the corresponding sequence if the MODE bit (in SEQA_CTRL) for that
550 * sequence is set to 0 (and if the interrupt is enabled).
551 */
552#define ADC_SEQ_GDAT_DATAVALID(x) (((uint32_t)(((uint32_t)(x)) << ADC_SEQ_GDAT_DATAVALID_SHIFT)) & ADC_SEQ_GDAT_DATAVALID_MASK)
553/*! @} */
554
555/* The count of ADC_SEQ_GDAT */
556#define ADC_SEQ_GDAT_COUNT (2U)
557
558/*! @name DAT - ADC Channel 0 Data register. This register contains the result of the most recent conversion completed on channel 0. */
559/*! @{ */
560#define ADC_DAT_RESULT_MASK (0xFFF0U)
561#define ADC_DAT_RESULT_SHIFT (4U)
562/*! RESULT - This field contains the 12-bit ADC conversion result from the last conversion performed
563 * on this channel. This will be a binary fraction representing the voltage on the AD0[n] pin,
564 * as it falls within the range of VREFP to VREFN. Zero in the field indicates that the voltage on
565 * the input pin was less than, equal to, or close to that on VREFN, while 0xFFF indicates that
566 * the voltage on the input was close to, equal to, or greater than that on VREFP.
567 */
568#define ADC_DAT_RESULT(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_RESULT_SHIFT)) & ADC_DAT_RESULT_MASK)
569#define ADC_DAT_THCMPRANGE_MASK (0x30000U)
570#define ADC_DAT_THCMPRANGE_SHIFT (16U)
571/*! THCMPRANGE - Threshold Range Comparison result. 0x0 = In Range: The last completed conversion
572 * was greater than or equal to the value programmed into the designated LOW threshold register
573 * (THRn_LOW) but less than or equal to the value programmed into the designated HIGH threshold
574 * register (THRn_HIGH). 0x1 = Below Range: The last completed conversion on was less than the value
575 * programmed into the designated LOW threshold register (THRn_LOW). 0x2 = Above Range: The last
576 * completed conversion was greater than the value programmed into the designated HIGH threshold
577 * register (THRn_HIGH). 0x3 = Reserved.
578 */
579#define ADC_DAT_THCMPRANGE(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_THCMPRANGE_SHIFT)) & ADC_DAT_THCMPRANGE_MASK)
580#define ADC_DAT_THCMPCROSS_MASK (0xC0000U)
581#define ADC_DAT_THCMPCROSS_SHIFT (18U)
582/*! THCMPCROSS - Threshold Crossing Comparison result. 0x0 = No threshold Crossing detected: The
583 * most recent completed conversion on this channel had the same relationship (above or below) to
584 * the threshold value established by the designated LOW threshold register (THRn_LOW) as did the
585 * previous conversion on this channel. 0x1 = Reserved. 0x2 = Downward Threshold Crossing
586 * Detected. Indicates that a threshold crossing in the downward direction has occurred - i.e. the
587 * previous sample on this channel was above the threshold value established by the designated LOW
588 * threshold register (THRn_LOW) and the current sample is below that threshold. 0x3 = Upward
589 * Threshold Crossing Detected. Indicates that a threshold crossing in the upward direction has occurred
590 * - i.e. the previous sample on this channel was below the threshold value established by the
591 * designated LOW threshold register (THRn_LOW) and the current sample is above that threshold.
592 */
593#define ADC_DAT_THCMPCROSS(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_THCMPCROSS_SHIFT)) & ADC_DAT_THCMPCROSS_MASK)
594#define ADC_DAT_CHANNEL_MASK (0x3C000000U)
595#define ADC_DAT_CHANNEL_SHIFT (26U)
596/*! CHANNEL - This field is hard-coded to contain the channel number that this particular register
597 * relates to (i.e. this field will contain 0b0000 for the DAT0 register, 0b0001 for the DAT1
598 * register, etc)
599 */
600#define ADC_DAT_CHANNEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_CHANNEL_SHIFT)) & ADC_DAT_CHANNEL_MASK)
601#define ADC_DAT_OVERRUN_MASK (0x40000000U)
602#define ADC_DAT_OVERRUN_SHIFT (30U)
603/*! OVERRUN - This bit will be set to a 1 if a new conversion on this channel completes and
604 * overwrites the previous contents of the RESULT field before it has been read - i.e. while the DONE bit
605 * is set. This bit is cleared, along with the DONE bit, whenever this register is read or when
606 * the data related to this channel is read from either of the global SEQn_GDAT registers. This
607 * bit (in any of the 12 registers) will cause an overrun interrupt/DMA trigger to be asserted if
608 * the overrun interrupt is enabled. While it is allowed to include the same channels in both
609 * conversion sequences, doing so may cause erratic behavior of the DONE and OVERRUN bits in the
610 * data registers associated with any of the channels that are shared between the two sequences. Any
611 * erratic OVERRUN behavior will also affect overrun interrupt generation, if enabled.
612 */
613#define ADC_DAT_OVERRUN(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_OVERRUN_SHIFT)) & ADC_DAT_OVERRUN_MASK)
614#define ADC_DAT_DATAVALID_MASK (0x80000000U)
615#define ADC_DAT_DATAVALID_SHIFT (31U)
616/*! DATAVALID - This bit is set to 1 when an ADC conversion on this channel completes. This bit is
617 * cleared whenever this register is read or when the data related to this channel is read from
618 * either of the global SEQn_GDAT registers. While it is allowed to include the same channels in
619 * both conversion sequences, doing so may cause erratic behavior of the DONE and OVERRUN bits in
620 * the data registers associated with any of the channels that are shared between the two
621 * sequences. Any erratic OVERRUN behavior will also affect overrun interrupt generation, if enabled.
622 */
623#define ADC_DAT_DATAVALID(x) (((uint32_t)(((uint32_t)(x)) << ADC_DAT_DATAVALID_SHIFT)) & ADC_DAT_DATAVALID_MASK)
624/*! @} */
625
626/* The count of ADC_DAT */
627#define ADC_DAT_COUNT (12U)
628
629/*! @name THR0_LOW - ADC Low Compare Threshold register 0: Contains the lower threshold level for automatic threshold comparison for any channels linked to threshold pair 0. */
630/*! @{ */
631#define ADC_THR0_LOW_THRLOW_MASK (0xFFF0U)
632#define ADC_THR0_LOW_THRLOW_SHIFT (4U)
633/*! THRLOW - Low threshold value against which ADC results will be compared
634 */
635#define ADC_THR0_LOW_THRLOW(x) (((uint32_t)(((uint32_t)(x)) << ADC_THR0_LOW_THRLOW_SHIFT)) & ADC_THR0_LOW_THRLOW_MASK)
636/*! @} */
637
638/*! @name THR1_LOW - ADC Low Compare Threshold register 1: Contains the lower threshold level for automatic threshold comparison for any channels linked to threshold pair 1. */
639/*! @{ */
640#define ADC_THR1_LOW_THRLOW_MASK (0xFFF0U)
641#define ADC_THR1_LOW_THRLOW_SHIFT (4U)
642/*! THRLOW - Low threshold value against which ADC results will be compared
643 */
644#define ADC_THR1_LOW_THRLOW(x) (((uint32_t)(((uint32_t)(x)) << ADC_THR1_LOW_THRLOW_SHIFT)) & ADC_THR1_LOW_THRLOW_MASK)
645/*! @} */
646
647/*! @name THR0_HIGH - ADC High Compare Threshold register 0: Contains the upper threshold level for automatic threshold comparison for any channels linked to threshold pair 0. */
648/*! @{ */
649#define ADC_THR0_HIGH_THRHIGH_MASK (0xFFF0U)
650#define ADC_THR0_HIGH_THRHIGH_SHIFT (4U)
651/*! THRHIGH - High threshold value against which ADC results will be compared
652 */
653#define ADC_THR0_HIGH_THRHIGH(x) (((uint32_t)(((uint32_t)(x)) << ADC_THR0_HIGH_THRHIGH_SHIFT)) & ADC_THR0_HIGH_THRHIGH_MASK)
654/*! @} */
655
656/*! @name THR1_HIGH - ADC High Compare Threshold register 1: Contains the upper threshold level for automatic threshold comparison for any channels linked to threshold pair 1. */
657/*! @{ */
658#define ADC_THR1_HIGH_THRHIGH_MASK (0xFFF0U)
659#define ADC_THR1_HIGH_THRHIGH_SHIFT (4U)
660/*! THRHIGH - High threshold value against which ADC results will be compared
661 */
662#define ADC_THR1_HIGH_THRHIGH(x) (((uint32_t)(((uint32_t)(x)) << ADC_THR1_HIGH_THRHIGH_SHIFT)) & ADC_THR1_HIGH_THRHIGH_MASK)
663/*! @} */
664
665/*! @name CHAN_THRSEL - ADC Channel-Threshold Select register. Specifies which set of threshold compare registers are to be used for each channel */
666/*! @{ */
667#define ADC_CHAN_THRSEL_CH0_THRSEL_MASK (0x1U)
668#define ADC_CHAN_THRSEL_CH0_THRSEL_SHIFT (0U)
669/*! CH0_THRSEL - Threshold select for channel 0.
670 * 0b0..Threshold 0. Results for this channel will be compared against the threshold levels indicated in the THR0_LOW and THR0_HIGH registers.
671 * 0b1..Threshold 1. Results for this channel will be compared against the threshold levels indicated in the THR1_LOW and THR1_HIGH registers.
672 */
673#define ADC_CHAN_THRSEL_CH0_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH0_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH0_THRSEL_MASK)
674#define ADC_CHAN_THRSEL_CH1_THRSEL_MASK (0x2U)
675#define ADC_CHAN_THRSEL_CH1_THRSEL_SHIFT (1U)
676/*! CH1_THRSEL - Threshold select for channel 1. See description for channel 0.
677 */
678#define ADC_CHAN_THRSEL_CH1_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH1_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH1_THRSEL_MASK)
679#define ADC_CHAN_THRSEL_CH2_THRSEL_MASK (0x4U)
680#define ADC_CHAN_THRSEL_CH2_THRSEL_SHIFT (2U)
681/*! CH2_THRSEL - Threshold select for channel 2. See description for channel 0.
682 */
683#define ADC_CHAN_THRSEL_CH2_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH2_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH2_THRSEL_MASK)
684#define ADC_CHAN_THRSEL_CH3_THRSEL_MASK (0x8U)
685#define ADC_CHAN_THRSEL_CH3_THRSEL_SHIFT (3U)
686/*! CH3_THRSEL - Threshold select for channel 3. See description for channel 0.
687 */
688#define ADC_CHAN_THRSEL_CH3_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH3_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH3_THRSEL_MASK)
689#define ADC_CHAN_THRSEL_CH4_THRSEL_MASK (0x10U)
690#define ADC_CHAN_THRSEL_CH4_THRSEL_SHIFT (4U)
691/*! CH4_THRSEL - Threshold select for channel 4. See description for channel 0.
692 */
693#define ADC_CHAN_THRSEL_CH4_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH4_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH4_THRSEL_MASK)
694#define ADC_CHAN_THRSEL_CH5_THRSEL_MASK (0x20U)
695#define ADC_CHAN_THRSEL_CH5_THRSEL_SHIFT (5U)
696/*! CH5_THRSEL - Threshold select for channel 5. See description for channel 0.
697 */
698#define ADC_CHAN_THRSEL_CH5_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH5_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH5_THRSEL_MASK)
699#define ADC_CHAN_THRSEL_CH6_THRSEL_MASK (0x40U)
700#define ADC_CHAN_THRSEL_CH6_THRSEL_SHIFT (6U)
701/*! CH6_THRSEL - Threshold select for channel 6. See description for channel 0.
702 */
703#define ADC_CHAN_THRSEL_CH6_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH6_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH6_THRSEL_MASK)
704#define ADC_CHAN_THRSEL_CH7_THRSEL_MASK (0x80U)
705#define ADC_CHAN_THRSEL_CH7_THRSEL_SHIFT (7U)
706/*! CH7_THRSEL - Threshold select for channel 7. See description for channel 0.
707 */
708#define ADC_CHAN_THRSEL_CH7_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH7_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH7_THRSEL_MASK)
709#define ADC_CHAN_THRSEL_CH8_THRSEL_MASK (0x100U)
710#define ADC_CHAN_THRSEL_CH8_THRSEL_SHIFT (8U)
711/*! CH8_THRSEL - Threshold select for channel 8. See description for channel 0.
712 */
713#define ADC_CHAN_THRSEL_CH8_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH8_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH8_THRSEL_MASK)
714#define ADC_CHAN_THRSEL_CH9_THRSEL_MASK (0x200U)
715#define ADC_CHAN_THRSEL_CH9_THRSEL_SHIFT (9U)
716/*! CH9_THRSEL - Threshold select for channel 9. See description for channel 0.
717 */
718#define ADC_CHAN_THRSEL_CH9_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH9_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH9_THRSEL_MASK)
719#define ADC_CHAN_THRSEL_CH10_THRSEL_MASK (0x400U)
720#define ADC_CHAN_THRSEL_CH10_THRSEL_SHIFT (10U)
721/*! CH10_THRSEL - Threshold select for channel 10. See description for channel 0.
722 */
723#define ADC_CHAN_THRSEL_CH10_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH10_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH10_THRSEL_MASK)
724#define ADC_CHAN_THRSEL_CH11_THRSEL_MASK (0x800U)
725#define ADC_CHAN_THRSEL_CH11_THRSEL_SHIFT (11U)
726/*! CH11_THRSEL - Threshold select for channel 11. See description for channel 0.
727 */
728#define ADC_CHAN_THRSEL_CH11_THRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CHAN_THRSEL_CH11_THRSEL_SHIFT)) & ADC_CHAN_THRSEL_CH11_THRSEL_MASK)
729/*! @} */
730
731/*! @name INTEN - ADC Interrupt Enable register. This register contains enable bits that enable the sequence-A, sequence-B, threshold compare and data overrun interrupts to be generated. */
732/*! @{ */
733#define ADC_INTEN_SEQA_INTEN_MASK (0x1U)
734#define ADC_INTEN_SEQA_INTEN_SHIFT (0U)
735/*! SEQA_INTEN - Sequence A interrupt enable.
736 * 0b0..Disabled. The sequence A interrupt/DMA trigger is disabled.
737 * 0b1..Enabled. The sequence A interrupt/DMA trigger is enabled and will be asserted either upon completion of
738 * each individual conversion performed as part of sequence A, or upon completion of the entire A sequence of
739 * conversions, depending on the MODE bit in the SEQA_CTRL register.
740 */
741#define ADC_INTEN_SEQA_INTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_SEQA_INTEN_SHIFT)) & ADC_INTEN_SEQA_INTEN_MASK)
742#define ADC_INTEN_SEQB_INTEN_MASK (0x2U)
743#define ADC_INTEN_SEQB_INTEN_SHIFT (1U)
744/*! SEQB_INTEN - Sequence B interrupt enable.
745 * 0b0..Disabled. The sequence B interrupt/DMA trigger is disabled.
746 * 0b1..Enabled. The sequence B interrupt/DMA trigger is enabled and will be asserted either upon completion of
747 * each individual conversion performed as part of sequence B, or upon completion of the entire B sequence of
748 * conversions, depending on the MODE bit in the SEQB_CTRL register.
749 */
750#define ADC_INTEN_SEQB_INTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_SEQB_INTEN_SHIFT)) & ADC_INTEN_SEQB_INTEN_MASK)
751#define ADC_INTEN_OVR_INTEN_MASK (0x4U)
752#define ADC_INTEN_OVR_INTEN_SHIFT (2U)
753/*! OVR_INTEN - Overrun interrupt enable.
754 * 0b0..Disabled. The overrun interrupt is disabled.
755 * 0b1..Enabled. The overrun interrupt is enabled. Detection of an overrun condition on any of the 12 channel
756 * data registers will cause an overrun interrupt/DMA trigger. In addition, if the MODE bit for a particular
757 * sequence is 0, then an overrun in the global data register for that sequence will also cause this
758 * interrupt/DMA trigger to be asserted.
759 */
760#define ADC_INTEN_OVR_INTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_OVR_INTEN_SHIFT)) & ADC_INTEN_OVR_INTEN_MASK)
761#define ADC_INTEN_ADCMPINTEN0_MASK (0x18U)
762#define ADC_INTEN_ADCMPINTEN0_SHIFT (3U)
763/*! ADCMPINTEN0 - Threshold comparison interrupt enable for channel 0.
764 * 0b00..Disabled.
765 * 0b01..Outside threshold.
766 * 0b10..Crossing threshold.
767 * 0b11..Reserved
768 */
769#define ADC_INTEN_ADCMPINTEN0(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN0_SHIFT)) & ADC_INTEN_ADCMPINTEN0_MASK)
770#define ADC_INTEN_ADCMPINTEN1_MASK (0x60U)
771#define ADC_INTEN_ADCMPINTEN1_SHIFT (5U)
772/*! ADCMPINTEN1 - Channel 1 threshold comparison interrupt enable. See description for channel 0.
773 */
774#define ADC_INTEN_ADCMPINTEN1(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN1_SHIFT)) & ADC_INTEN_ADCMPINTEN1_MASK)
775#define ADC_INTEN_ADCMPINTEN2_MASK (0x180U)
776#define ADC_INTEN_ADCMPINTEN2_SHIFT (7U)
777/*! ADCMPINTEN2 - Channel 2 threshold comparison interrupt enable. See description for channel 0.
778 */
779#define ADC_INTEN_ADCMPINTEN2(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN2_SHIFT)) & ADC_INTEN_ADCMPINTEN2_MASK)
780#define ADC_INTEN_ADCMPINTEN3_MASK (0x600U)
781#define ADC_INTEN_ADCMPINTEN3_SHIFT (9U)
782/*! ADCMPINTEN3 - Channel 3 threshold comparison interrupt enable. See description for channel 0.
783 */
784#define ADC_INTEN_ADCMPINTEN3(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN3_SHIFT)) & ADC_INTEN_ADCMPINTEN3_MASK)
785#define ADC_INTEN_ADCMPINTEN4_MASK (0x1800U)
786#define ADC_INTEN_ADCMPINTEN4_SHIFT (11U)
787/*! ADCMPINTEN4 - Channel 4 threshold comparison interrupt enable. See description for channel 0.
788 */
789#define ADC_INTEN_ADCMPINTEN4(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN4_SHIFT)) & ADC_INTEN_ADCMPINTEN4_MASK)
790#define ADC_INTEN_ADCMPINTEN5_MASK (0x6000U)
791#define ADC_INTEN_ADCMPINTEN5_SHIFT (13U)
792/*! ADCMPINTEN5 - Channel 5 threshold comparison interrupt enable. See description for channel 0.
793 */
794#define ADC_INTEN_ADCMPINTEN5(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN5_SHIFT)) & ADC_INTEN_ADCMPINTEN5_MASK)
795#define ADC_INTEN_ADCMPINTEN6_MASK (0x18000U)
796#define ADC_INTEN_ADCMPINTEN6_SHIFT (15U)
797/*! ADCMPINTEN6 - Channel 6 threshold comparison interrupt enable. See description for channel 0.
798 */
799#define ADC_INTEN_ADCMPINTEN6(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN6_SHIFT)) & ADC_INTEN_ADCMPINTEN6_MASK)
800#define ADC_INTEN_ADCMPINTEN7_MASK (0x60000U)
801#define ADC_INTEN_ADCMPINTEN7_SHIFT (17U)
802/*! ADCMPINTEN7 - Channel 7 threshold comparison interrupt enable. See description for channel 0.
803 */
804#define ADC_INTEN_ADCMPINTEN7(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN7_SHIFT)) & ADC_INTEN_ADCMPINTEN7_MASK)
805#define ADC_INTEN_ADCMPINTEN8_MASK (0x180000U)
806#define ADC_INTEN_ADCMPINTEN8_SHIFT (19U)
807/*! ADCMPINTEN8 - Channel 8 threshold comparison interrupt enable. See description for channel 0.
808 */
809#define ADC_INTEN_ADCMPINTEN8(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN8_SHIFT)) & ADC_INTEN_ADCMPINTEN8_MASK)
810#define ADC_INTEN_ADCMPINTEN9_MASK (0x600000U)
811#define ADC_INTEN_ADCMPINTEN9_SHIFT (21U)
812/*! ADCMPINTEN9 - Channel 9 threshold comparison interrupt enable. See description for channel 0.
813 */
814#define ADC_INTEN_ADCMPINTEN9(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN9_SHIFT)) & ADC_INTEN_ADCMPINTEN9_MASK)
815#define ADC_INTEN_ADCMPINTEN10_MASK (0x1800000U)
816#define ADC_INTEN_ADCMPINTEN10_SHIFT (23U)
817/*! ADCMPINTEN10 - Channel 10 threshold comparison interrupt enable. See description for channel 0.
818 */
819#define ADC_INTEN_ADCMPINTEN10(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN10_SHIFT)) & ADC_INTEN_ADCMPINTEN10_MASK)
820#define ADC_INTEN_ADCMPINTEN11_MASK (0x6000000U)
821#define ADC_INTEN_ADCMPINTEN11_SHIFT (25U)
822/*! ADCMPINTEN11 - Channel 21 threshold comparison interrupt enable. See description for channel 0.
823 */
824#define ADC_INTEN_ADCMPINTEN11(x) (((uint32_t)(((uint32_t)(x)) << ADC_INTEN_ADCMPINTEN11_SHIFT)) & ADC_INTEN_ADCMPINTEN11_MASK)
825/*! @} */
826
827/*! @name FLAGS - ADC Flags register. Contains the four interrupt/DMA trigger flags and the individual component overrun and threshold-compare flags. (The overrun bits replicate information stored in the result registers). */
828/*! @{ */
829#define ADC_FLAGS_THCMP0_MASK (0x1U)
830#define ADC_FLAGS_THCMP0_SHIFT (0U)
831/*! THCMP0 - Threshold comparison event on Channel 0. Set to 1 upon either an out-of-range result or
832 * a threshold-crossing result if enabled to do so in the INTEN register. This bit is cleared by
833 * writing a 1.
834 */
835#define ADC_FLAGS_THCMP0(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP0_SHIFT)) & ADC_FLAGS_THCMP0_MASK)
836#define ADC_FLAGS_THCMP1_MASK (0x2U)
837#define ADC_FLAGS_THCMP1_SHIFT (1U)
838/*! THCMP1 - Threshold comparison event on Channel 1. See description for channel 0.
839 */
840#define ADC_FLAGS_THCMP1(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP1_SHIFT)) & ADC_FLAGS_THCMP1_MASK)
841#define ADC_FLAGS_THCMP2_MASK (0x4U)
842#define ADC_FLAGS_THCMP2_SHIFT (2U)
843/*! THCMP2 - Threshold comparison event on Channel 2. See description for channel 0.
844 */
845#define ADC_FLAGS_THCMP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP2_SHIFT)) & ADC_FLAGS_THCMP2_MASK)
846#define ADC_FLAGS_THCMP3_MASK (0x8U)
847#define ADC_FLAGS_THCMP3_SHIFT (3U)
848/*! THCMP3 - Threshold comparison event on Channel 3. See description for channel 0.
849 */
850#define ADC_FLAGS_THCMP3(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP3_SHIFT)) & ADC_FLAGS_THCMP3_MASK)
851#define ADC_FLAGS_THCMP4_MASK (0x10U)
852#define ADC_FLAGS_THCMP4_SHIFT (4U)
853/*! THCMP4 - Threshold comparison event on Channel 4. See description for channel 0.
854 */
855#define ADC_FLAGS_THCMP4(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP4_SHIFT)) & ADC_FLAGS_THCMP4_MASK)
856#define ADC_FLAGS_THCMP5_MASK (0x20U)
857#define ADC_FLAGS_THCMP5_SHIFT (5U)
858/*! THCMP5 - Threshold comparison event on Channel 5. See description for channel 0.
859 */
860#define ADC_FLAGS_THCMP5(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP5_SHIFT)) & ADC_FLAGS_THCMP5_MASK)
861#define ADC_FLAGS_THCMP6_MASK (0x40U)
862#define ADC_FLAGS_THCMP6_SHIFT (6U)
863/*! THCMP6 - Threshold comparison event on Channel 6. See description for channel 0.
864 */
865#define ADC_FLAGS_THCMP6(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP6_SHIFT)) & ADC_FLAGS_THCMP6_MASK)
866#define ADC_FLAGS_THCMP7_MASK (0x80U)
867#define ADC_FLAGS_THCMP7_SHIFT (7U)
868/*! THCMP7 - Threshold comparison event on Channel 7. See description for channel 0.
869 */
870#define ADC_FLAGS_THCMP7(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP7_SHIFT)) & ADC_FLAGS_THCMP7_MASK)
871#define ADC_FLAGS_THCMP8_MASK (0x100U)
872#define ADC_FLAGS_THCMP8_SHIFT (8U)
873/*! THCMP8 - Threshold comparison event on Channel 8. See description for channel 0.
874 */
875#define ADC_FLAGS_THCMP8(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP8_SHIFT)) & ADC_FLAGS_THCMP8_MASK)
876#define ADC_FLAGS_THCMP9_MASK (0x200U)
877#define ADC_FLAGS_THCMP9_SHIFT (9U)
878/*! THCMP9 - Threshold comparison event on Channel 9. See description for channel 0.
879 */
880#define ADC_FLAGS_THCMP9(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP9_SHIFT)) & ADC_FLAGS_THCMP9_MASK)
881#define ADC_FLAGS_THCMP10_MASK (0x400U)
882#define ADC_FLAGS_THCMP10_SHIFT (10U)
883/*! THCMP10 - Threshold comparison event on Channel 10. See description for channel 0.
884 */
885#define ADC_FLAGS_THCMP10(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP10_SHIFT)) & ADC_FLAGS_THCMP10_MASK)
886#define ADC_FLAGS_THCMP11_MASK (0x800U)
887#define ADC_FLAGS_THCMP11_SHIFT (11U)
888/*! THCMP11 - Threshold comparison event on Channel 11. See description for channel 0.
889 */
890#define ADC_FLAGS_THCMP11(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP11_SHIFT)) & ADC_FLAGS_THCMP11_MASK)
891#define ADC_FLAGS_OVERRUN0_MASK (0x1000U)
892#define ADC_FLAGS_OVERRUN0_SHIFT (12U)
893/*! OVERRUN0 - Mirrors the OVERRRUN status flag from the result register for ADC channel 0
894 */
895#define ADC_FLAGS_OVERRUN0(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN0_SHIFT)) & ADC_FLAGS_OVERRUN0_MASK)
896#define ADC_FLAGS_OVERRUN1_MASK (0x2000U)
897#define ADC_FLAGS_OVERRUN1_SHIFT (13U)
898/*! OVERRUN1 - Mirrors the OVERRRUN status flag from the result register for ADC channel 1
899 */
900#define ADC_FLAGS_OVERRUN1(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN1_SHIFT)) & ADC_FLAGS_OVERRUN1_MASK)
901#define ADC_FLAGS_OVERRUN2_MASK (0x4000U)
902#define ADC_FLAGS_OVERRUN2_SHIFT (14U)
903/*! OVERRUN2 - Mirrors the OVERRRUN status flag from the result register for ADC channel 2
904 */
905#define ADC_FLAGS_OVERRUN2(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN2_SHIFT)) & ADC_FLAGS_OVERRUN2_MASK)
906#define ADC_FLAGS_OVERRUN3_MASK (0x8000U)
907#define ADC_FLAGS_OVERRUN3_SHIFT (15U)
908/*! OVERRUN3 - Mirrors the OVERRRUN status flag from the result register for ADC channel 3
909 */
910#define ADC_FLAGS_OVERRUN3(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN3_SHIFT)) & ADC_FLAGS_OVERRUN3_MASK)
911#define ADC_FLAGS_OVERRUN4_MASK (0x10000U)
912#define ADC_FLAGS_OVERRUN4_SHIFT (16U)
913/*! OVERRUN4 - Mirrors the OVERRRUN status flag from the result register for ADC channel 4
914 */
915#define ADC_FLAGS_OVERRUN4(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN4_SHIFT)) & ADC_FLAGS_OVERRUN4_MASK)
916#define ADC_FLAGS_OVERRUN5_MASK (0x20000U)
917#define ADC_FLAGS_OVERRUN5_SHIFT (17U)
918/*! OVERRUN5 - Mirrors the OVERRRUN status flag from the result register for ADC channel 5
919 */
920#define ADC_FLAGS_OVERRUN5(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN5_SHIFT)) & ADC_FLAGS_OVERRUN5_MASK)
921#define ADC_FLAGS_OVERRUN6_MASK (0x40000U)
922#define ADC_FLAGS_OVERRUN6_SHIFT (18U)
923/*! OVERRUN6 - Mirrors the OVERRRUN status flag from the result register for ADC channel 6
924 */
925#define ADC_FLAGS_OVERRUN6(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN6_SHIFT)) & ADC_FLAGS_OVERRUN6_MASK)
926#define ADC_FLAGS_OVERRUN7_MASK (0x80000U)
927#define ADC_FLAGS_OVERRUN7_SHIFT (19U)
928/*! OVERRUN7 - Mirrors the OVERRRUN status flag from the result register for ADC channel 7
929 */
930#define ADC_FLAGS_OVERRUN7(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN7_SHIFT)) & ADC_FLAGS_OVERRUN7_MASK)
931#define ADC_FLAGS_OVERRUN8_MASK (0x100000U)
932#define ADC_FLAGS_OVERRUN8_SHIFT (20U)
933/*! OVERRUN8 - Mirrors the OVERRRUN status flag from the result register for ADC channel 8
934 */
935#define ADC_FLAGS_OVERRUN8(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN8_SHIFT)) & ADC_FLAGS_OVERRUN8_MASK)
936#define ADC_FLAGS_OVERRUN9_MASK (0x200000U)
937#define ADC_FLAGS_OVERRUN9_SHIFT (21U)
938/*! OVERRUN9 - Mirrors the OVERRRUN status flag from the result register for ADC channel 9
939 */
940#define ADC_FLAGS_OVERRUN9(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN9_SHIFT)) & ADC_FLAGS_OVERRUN9_MASK)
941#define ADC_FLAGS_OVERRUN10_MASK (0x400000U)
942#define ADC_FLAGS_OVERRUN10_SHIFT (22U)
943/*! OVERRUN10 - Mirrors the OVERRRUN status flag from the result register for ADC channel 10
944 */
945#define ADC_FLAGS_OVERRUN10(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN10_SHIFT)) & ADC_FLAGS_OVERRUN10_MASK)
946#define ADC_FLAGS_OVERRUN11_MASK (0x800000U)
947#define ADC_FLAGS_OVERRUN11_SHIFT (23U)
948/*! OVERRUN11 - Mirrors the OVERRRUN status flag from the result register for ADC channel 11
949 */
950#define ADC_FLAGS_OVERRUN11(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVERRUN11_SHIFT)) & ADC_FLAGS_OVERRUN11_MASK)
951#define ADC_FLAGS_SEQA_OVR_MASK (0x1000000U)
952#define ADC_FLAGS_SEQA_OVR_SHIFT (24U)
953/*! SEQA_OVR - Mirrors the global OVERRUN status flag in the SEQA_GDAT register
954 */
955#define ADC_FLAGS_SEQA_OVR(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_SEQA_OVR_SHIFT)) & ADC_FLAGS_SEQA_OVR_MASK)
956#define ADC_FLAGS_SEQB_OVR_MASK (0x2000000U)
957#define ADC_FLAGS_SEQB_OVR_SHIFT (25U)
958/*! SEQB_OVR - Mirrors the global OVERRUN status flag in the SEQB_GDAT register
959 */
960#define ADC_FLAGS_SEQB_OVR(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_SEQB_OVR_SHIFT)) & ADC_FLAGS_SEQB_OVR_MASK)
961#define ADC_FLAGS_SEQA_INT_MASK (0x10000000U)
962#define ADC_FLAGS_SEQA_INT_SHIFT (28U)
963/*! SEQA_INT - Sequence A interrupt/DMA trigger. If the MODE bit in the SEQA_CTRL register is 0,
964 * this flag will mirror the DATAVALID bit in the sequence A global data register (SEQA_GDAT), which
965 * is set at the end of every ADC conversion performed as part of sequence A. It will be cleared
966 * automatically when the SEQA_GDAT register is read. If the MODE bit in the SEQA_CTRL register
967 * is 1, this flag will be set upon completion of an entire A sequence. In this case it must be
968 * cleared by writing a 1 to this SEQA_INT bit. This interrupt must be enabled in the INTEN
969 * register.
970 */
971#define ADC_FLAGS_SEQA_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_SEQA_INT_SHIFT)) & ADC_FLAGS_SEQA_INT_MASK)
972#define ADC_FLAGS_SEQB_INT_MASK (0x20000000U)
973#define ADC_FLAGS_SEQB_INT_SHIFT (29U)
974/*! SEQB_INT - Sequence A interrupt/DMA trigger. If the MODE bit in the SEQB_CTRL register is 0,
975 * this flag will mirror the DATAVALID bit in the sequence A global data register (SEQB_GDAT), which
976 * is set at the end of every ADC conversion performed as part of sequence B. It will be cleared
977 * automatically when the SEQB_GDAT register is read. If the MODE bit in the SEQB_CTRL register
978 * is 1, this flag will be set upon completion of an entire B sequence. In this case it must be
979 * cleared by writing a 1 to this SEQB_INT bit. This interrupt must be enabled in the INTEN
980 * register.
981 */
982#define ADC_FLAGS_SEQB_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_SEQB_INT_SHIFT)) & ADC_FLAGS_SEQB_INT_MASK)
983#define ADC_FLAGS_THCMP_INT_MASK (0x40000000U)
984#define ADC_FLAGS_THCMP_INT_SHIFT (30U)
985/*! THCMP_INT - Threshold Comparison Interrupt. This bit will be set if any of the THCMP flags in
986 * the lower bits of this register are set to 1 (due to an enabled out-of-range or
987 * threshold-crossing event on any channel). Each type of threshold comparison interrupt on each channel must be
988 * individually enabled in the INTEN register to cause this interrupt. This bit will be cleared
989 * when all of the individual threshold flags are cleared via writing 1s to those bits.
990 */
991#define ADC_FLAGS_THCMP_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_THCMP_INT_SHIFT)) & ADC_FLAGS_THCMP_INT_MASK)
992#define ADC_FLAGS_OVR_INT_MASK (0x80000000U)
993#define ADC_FLAGS_OVR_INT_SHIFT (31U)
994/*! OVR_INT - Overrun Interrupt flag. Any overrun bit in any of the individual channel data
995 * registers will cause this interrupt. In addition, if the MODE bit in either of the SEQn_CTRL registers
996 * is 0 then the OVERRUN bit in the corresponding SEQn_GDAT register will also cause this
997 * interrupt. This interrupt must be enabled in the INTEN register. This bit will be cleared when all
998 * of the individual overrun bits have been cleared via reading the corresponding data registers.
999 */
1000#define ADC_FLAGS_OVR_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FLAGS_OVR_INT_SHIFT)) & ADC_FLAGS_OVR_INT_MASK)
1001/*! @} */
1002
1003/*! @name STARTUP - ADC Startup register. */
1004/*! @{ */
1005#define ADC_STARTUP_ADC_ENA_MASK (0x1U)
1006#define ADC_STARTUP_ADC_ENA_SHIFT (0U)
1007/*! ADC_ENA - ADC Enable bit. This bit can only be set to a 1 by software. It is cleared
1008 * automatically whenever the ADC is powered down. This bit must not be set until at least 10 microseconds
1009 * after the ADC is powered up (typically by altering a system-level ADC power control bit).
1010 */
1011#define ADC_STARTUP_ADC_ENA(x) (((uint32_t)(((uint32_t)(x)) << ADC_STARTUP_ADC_ENA_SHIFT)) & ADC_STARTUP_ADC_ENA_MASK)
1012#define ADC_STARTUP_ADC_INIT_MASK (0x2U)
1013#define ADC_STARTUP_ADC_INIT_SHIFT (1U)
1014/*! ADC_INIT - ADC Initialization. After enabling the ADC (setting the ADC_ENA bit), the API routine
1015 * will EITHER set this bit or the CALIB bit in the CALIB register, depending on whether or not
1016 * calibration is required. Setting this bit will launch the 'dummy' conversion cycle that is
1017 * required if a calibration is not performed. It will also reload the stored calibration value from
1018 * a previous calibration unless the BYPASSCAL bit is set. This bit should only be set AFTER the
1019 * ADC_ENA bit is set and after the CALIREQD bit is tested to determine whether a calibration or
1020 * an ADC dummy conversion cycle is required. It should not be set during the same write that
1021 * sets the ADC_ENA bit. This bit can only be set to a '1' by software. It is cleared automatically
1022 * when the 'dummy' conversion cycle completes.
1023 */
1024#define ADC_STARTUP_ADC_INIT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STARTUP_ADC_INIT_SHIFT)) & ADC_STARTUP_ADC_INIT_MASK)
1025/*! @} */
1026
1027/*! @name CALIB - ADC Calibration register. */
1028/*! @{ */
1029#define ADC_CALIB_CALIB_MASK (0x1U)
1030#define ADC_CALIB_CALIB_SHIFT (0U)
1031/*! CALIB - Calibration request. Setting this bit will launch an ADC calibration cycle. This bit can
1032 * only be set to a '1' by software. It is cleared automatically when the calibration cycle
1033 * completes.
1034 */
1035#define ADC_CALIB_CALIB(x) (((uint32_t)(((uint32_t)(x)) << ADC_CALIB_CALIB_SHIFT)) & ADC_CALIB_CALIB_MASK)
1036#define ADC_CALIB_CALREQD_MASK (0x2U)
1037#define ADC_CALIB_CALREQD_SHIFT (1U)
1038/*! CALREQD - Calibration required. This read-only bit indicates if calibration is required when
1039 * enabling the ADC. CALREQD will be '1' if no calibration has been run since the chip was
1040 * powered-up and if the BYPASSCAL bit in the CTRL register is low. Software will test this bit to
1041 * determine whether to initiate a calibration cycle or whether to set the ADC_INIT bit (in the STARTUP
1042 * register) to launch the ADC initialization process which includes a 'dummy' conversion cycle.
1043 * Note: A 'dummy' conversion cycle requires approximately 6 ADC clocks as opposed to 81 clocks
1044 * required for calibration.
1045 */
1046#define ADC_CALIB_CALREQD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CALIB_CALREQD_SHIFT)) & ADC_CALIB_CALREQD_MASK)
1047#define ADC_CALIB_CALVALUE_MASK (0x1FCU)
1048#define ADC_CALIB_CALVALUE_SHIFT (2U)
1049/*! CALVALUE - Calibration Value. This read-only field displays the calibration value established
1050 * during last calibration cycle. This value is not typically of any use to the user.
1051 */
1052#define ADC_CALIB_CALVALUE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CALIB_CALVALUE_SHIFT)) & ADC_CALIB_CALVALUE_MASK)
1053/*! @} */
1054
1055
1056/*!
1057 * @}
1058 */ /* end of group ADC_Register_Masks */
1059
1060
1061/* ADC - Peripheral instance base addresses */
1062/** Peripheral ADC0 base address */
1063#define ADC0_BASE (0x400A0000u)
1064/** Peripheral ADC0 base pointer */
1065#define ADC0 ((ADC_Type *)ADC0_BASE)
1066/** Array initializer of ADC peripheral base addresses */
1067#define ADC_BASE_ADDRS { ADC0_BASE }
1068/** Array initializer of ADC peripheral base pointers */
1069#define ADC_BASE_PTRS { ADC0 }
1070/** Interrupt vectors for the ADC peripheral type */
1071#define ADC_SEQ_IRQS { ADC0_SEQA_IRQn, ADC0_SEQB_IRQn }
1072#define ADC_THCMP_IRQS { ADC0_THCMP_IRQn }
1073
1074/*!
1075 * @}
1076 */ /* end of group ADC_Peripheral_Access_Layer */
1077
1078
1079/* ----------------------------------------------------------------------------
1080 -- AES Peripheral Access Layer
1081 ---------------------------------------------------------------------------- */
1082
1083/*!
1084 * @addtogroup AES_Peripheral_Access_Layer AES Peripheral Access Layer
1085 * @{
1086 */
1087
1088/** AES - Register Layout Typedef */
1089typedef struct {
1090 union { /* offset: 0x0 */
1091 __IO uint32_t CFG; /**< AES Configuration register, offset: 0x0 */
1092 struct { /* offset: 0x0 */
1093 union { /* offset: 0x0 */
1094 __IO uint16_t CFG0_15; /**< AES Configuration register 0:15, offset: 0x0 */
1095 struct { /* offset: 0x0 */
1096 __IO uint8_t CFG0_7; /**< AES Configuration register 0:7, offset: 0x0 */
1097 __IO uint8_t CFG8_15; /**< AES Configuration register 8:15, offset: 0x1 */
1098 } CFGL;
1099 };
1100 __IO uint16_t CFG16_31; /**< AES Configuration register 16:31, offset: 0x2 */
1101 } CFG0_32;
1102 };
1103 __IO uint32_t CMD; /**< AES Command register, offset: 0x4 */
1104 __IO uint32_t STAT; /**< AES Status register, offset: 0x8 */
1105 __IO uint32_t CTR_INCR; /**< Counter Increment, offset: 0xC */
1106 uint8_t RESERVED_0[16];
1107 __O uint32_t KEY[8]; /**< Bits of the AES key, array offset: 0x20, array step: 0x4 */
1108 __O uint32_t INTEXT[4]; /**< Input text bits, array offset: 0x40, array step: 0x4 */
1109 __O uint32_t HOLDING[4]; /**< Holding register bits, array offset: 0x50, array step: 0x4 */
1110 __I uint32_t OUTTEXT[4]; /**< Output text bits, array offset: 0x60, array step: 0x4 */
1111 __O uint32_t GF128_Y[4]; /**< Y bits input of GF128 hash, array offset: 0x70, array step: 0x4 */
1112 __I uint32_t GF128_Z[4]; /**< Result bits of GF128 hash, array offset: 0x80, array step: 0x4 */
1113 __I uint32_t GCM_TAG[4]; /**< GCM Tag bits, array offset: 0x90, array step: 0x4 */
1114} AES_Type;
1115
1116/* ----------------------------------------------------------------------------
1117 -- AES Register Masks
1118 ---------------------------------------------------------------------------- */
1119
1120/*!
1121 * @addtogroup AES_Register_Masks AES Register Masks
1122 * @{
1123 */
1124
1125/*! @name CFG - AES Configuration register */
1126/*! @{ */
1127#define AES_CFG_PROC_EN_MASK (0x3U)
1128#define AES_CFG_PROC_EN_SHIFT (0U)
1129/*! PROC_EN - Process type enable.
1130 */
1131#define AES_CFG_PROC_EN(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_PROC_EN_SHIFT)) & AES_CFG_PROC_EN_MASK)
1132#define AES_CFG_GF128_SEL_MASK (0x4U)
1133#define AES_CFG_GF128_SEL_SHIFT (2U)
1134/*! GF128_SEL - GF128 hash selection.
1135 */
1136#define AES_CFG_GF128_SEL(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_GF128_SEL_SHIFT)) & AES_CFG_GF128_SEL_MASK)
1137#define AES_CFG_INTEXT_BSWAP_MASK (0x10U)
1138#define AES_CFG_INTEXT_BSWAP_SHIFT (4U)
1139/*! INTEXT_BSWAP - Byte swap input text.
1140 */
1141#define AES_CFG_INTEXT_BSWAP(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_INTEXT_BSWAP_SHIFT)) & AES_CFG_INTEXT_BSWAP_MASK)
1142#define AES_CFG_INTEXT_WSWAP_MASK (0x20U)
1143#define AES_CFG_INTEXT_WSWAP_SHIFT (5U)
1144/*! INTEXT_WSWAP - Word swap input text.
1145 */
1146#define AES_CFG_INTEXT_WSWAP(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_INTEXT_WSWAP_SHIFT)) & AES_CFG_INTEXT_WSWAP_MASK)
1147#define AES_CFG_OUTTEXT_BSWAP_MASK (0x40U)
1148#define AES_CFG_OUTTEXT_BSWAP_SHIFT (6U)
1149/*! OUTTEXT_BSWAP - Byte swap output text.
1150 */
1151#define AES_CFG_OUTTEXT_BSWAP(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_OUTTEXT_BSWAP_SHIFT)) & AES_CFG_OUTTEXT_BSWAP_MASK)
1152#define AES_CFG_OUTTEXT_WSWAP_MASK (0x80U)
1153#define AES_CFG_OUTTEXT_WSWAP_SHIFT (7U)
1154/*! OUTTEXT_WSWAP - Word swap output text.
1155 */
1156#define AES_CFG_OUTTEXT_WSWAP(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_OUTTEXT_WSWAP_SHIFT)) & AES_CFG_OUTTEXT_WSWAP_MASK)
1157#define AES_CFG_KEY_CFG_MASK (0x300U)
1158#define AES_CFG_KEY_CFG_SHIFT (8U)
1159/*! KEY_CFG - Key Configuration.
1160 */
1161#define AES_CFG_KEY_CFG(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_KEY_CFG_SHIFT)) & AES_CFG_KEY_CFG_MASK)
1162#define AES_CFG_INBLK_SEL_MASK (0x30000U)
1163#define AES_CFG_INBLK_SEL_SHIFT (16U)
1164/*! INBLK_SEL - Input block select.
1165 */
1166#define AES_CFG_INBLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_INBLK_SEL_SHIFT)) & AES_CFG_INBLK_SEL_MASK)
1167#define AES_CFG_HOLD_SEL_MASK (0x300000U)
1168#define AES_CFG_HOLD_SEL_SHIFT (20U)
1169/*! HOLD_SEL - Holding register source select.
1170 */
1171#define AES_CFG_HOLD_SEL(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_HOLD_SEL_SHIFT)) & AES_CFG_HOLD_SEL_MASK)
1172#define AES_CFG_OUTTEXT_SEL_MASK (0x3000000U)
1173#define AES_CFG_OUTTEXT_SEL_SHIFT (24U)
1174/*! OUTTEXT_SEL - Output text source select.
1175 */
1176#define AES_CFG_OUTTEXT_SEL(x) (((uint32_t)(((uint32_t)(x)) << AES_CFG_OUTTEXT_SEL_SHIFT)) & AES_CFG_OUTTEXT_SEL_MASK)
1177/*! @} */
1178
1179/*! @name CFG0_15 - AES Configuration register 0:15 */
1180/*! @{ */
1181#define AES_CFG0_15_PROC_EN_MASK (0x3U)
1182#define AES_CFG0_15_PROC_EN_SHIFT (0U)
1183/*! PROC_EN - Process type enable.
1184 */
1185#define AES_CFG0_15_PROC_EN(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_PROC_EN_SHIFT)) & AES_CFG0_15_PROC_EN_MASK)
1186#define AES_CFG0_15_GF128_SEL_MASK (0x4U)
1187#define AES_CFG0_15_GF128_SEL_SHIFT (2U)
1188/*! GF128_SEL - GF128 hash selection.
1189 */
1190#define AES_CFG0_15_GF128_SEL(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_GF128_SEL_SHIFT)) & AES_CFG0_15_GF128_SEL_MASK)
1191#define AES_CFG0_15_INTEXT_BSWAP_MASK (0x10U)
1192#define AES_CFG0_15_INTEXT_BSWAP_SHIFT (4U)
1193/*! INTEXT_BSWAP - Byte swap input text.
1194 */
1195#define AES_CFG0_15_INTEXT_BSWAP(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_INTEXT_BSWAP_SHIFT)) & AES_CFG0_15_INTEXT_BSWAP_MASK)
1196#define AES_CFG0_15_INTEXT_WSWAP_MASK (0x20U)
1197#define AES_CFG0_15_INTEXT_WSWAP_SHIFT (5U)
1198/*! INTEXT_WSWAP - Word swap input text.
1199 */
1200#define AES_CFG0_15_INTEXT_WSWAP(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_INTEXT_WSWAP_SHIFT)) & AES_CFG0_15_INTEXT_WSWAP_MASK)
1201#define AES_CFG0_15_OUTTEXT_BSWAP_MASK (0x40U)
1202#define AES_CFG0_15_OUTTEXT_BSWAP_SHIFT (6U)
1203/*! OUTTEXT_BSWAP - Byte swap output text.
1204 */
1205#define AES_CFG0_15_OUTTEXT_BSWAP(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_OUTTEXT_BSWAP_SHIFT)) & AES_CFG0_15_OUTTEXT_BSWAP_MASK)
1206#define AES_CFG0_15_OUTTEXT_WSWAP_MASK (0x80U)
1207#define AES_CFG0_15_OUTTEXT_WSWAP_SHIFT (7U)
1208/*! OUTTEXT_WSWAP - Word swap output text.
1209 */
1210#define AES_CFG0_15_OUTTEXT_WSWAP(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_OUTTEXT_WSWAP_SHIFT)) & AES_CFG0_15_OUTTEXT_WSWAP_MASK)
1211#define AES_CFG0_15_KEY_CFG_MASK (0x300U)
1212#define AES_CFG0_15_KEY_CFG_SHIFT (8U)
1213/*! KEY_CFG - Key Configuration.
1214 */
1215#define AES_CFG0_15_KEY_CFG(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG0_15_KEY_CFG_SHIFT)) & AES_CFG0_15_KEY_CFG_MASK)
1216/*! @} */
1217
1218/*! @name CFG0_7 - AES Configuration register 0:7 */
1219/*! @{ */
1220#define AES_CFG0_7_PROC_EN_MASK (0x3U)
1221#define AES_CFG0_7_PROC_EN_SHIFT (0U)
1222/*! PROC_EN - Process type enable.
1223 */
1224#define AES_CFG0_7_PROC_EN(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_PROC_EN_SHIFT)) & AES_CFG0_7_PROC_EN_MASK)
1225#define AES_CFG0_7_GF128_SEL_MASK (0x4U)
1226#define AES_CFG0_7_GF128_SEL_SHIFT (2U)
1227/*! GF128_SEL - GF128 hash selection.
1228 */
1229#define AES_CFG0_7_GF128_SEL(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_GF128_SEL_SHIFT)) & AES_CFG0_7_GF128_SEL_MASK)
1230#define AES_CFG0_7_INTEXT_BSWAP_MASK (0x10U)
1231#define AES_CFG0_7_INTEXT_BSWAP_SHIFT (4U)
1232/*! INTEXT_BSWAP - Byte swap input text.
1233 */
1234#define AES_CFG0_7_INTEXT_BSWAP(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_INTEXT_BSWAP_SHIFT)) & AES_CFG0_7_INTEXT_BSWAP_MASK)
1235#define AES_CFG0_7_INTEXT_WSWAP_MASK (0x20U)
1236#define AES_CFG0_7_INTEXT_WSWAP_SHIFT (5U)
1237/*! INTEXT_WSWAP - Word swap input text.
1238 */
1239#define AES_CFG0_7_INTEXT_WSWAP(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_INTEXT_WSWAP_SHIFT)) & AES_CFG0_7_INTEXT_WSWAP_MASK)
1240#define AES_CFG0_7_OUTTEXT_BSWAP_MASK (0x40U)
1241#define AES_CFG0_7_OUTTEXT_BSWAP_SHIFT (6U)
1242/*! OUTTEXT_BSWAP - Byte swap output text.
1243 */
1244#define AES_CFG0_7_OUTTEXT_BSWAP(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_OUTTEXT_BSWAP_SHIFT)) & AES_CFG0_7_OUTTEXT_BSWAP_MASK)
1245#define AES_CFG0_7_OUTTEXT_WSWAP_MASK (0x80U)
1246#define AES_CFG0_7_OUTTEXT_WSWAP_SHIFT (7U)
1247/*! OUTTEXT_WSWAP - Word swap output text.
1248 */
1249#define AES_CFG0_7_OUTTEXT_WSWAP(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG0_7_OUTTEXT_WSWAP_SHIFT)) & AES_CFG0_7_OUTTEXT_WSWAP_MASK)
1250/*! @} */
1251
1252/*! @name CFG8_15 - AES Configuration register 8:15 */
1253/*! @{ */
1254#define AES_CFG8_15_KEY_CFG_MASK (0x3U)
1255#define AES_CFG8_15_KEY_CFG_SHIFT (0U)
1256/*! KEY_CFG - Key Configuration.
1257 */
1258#define AES_CFG8_15_KEY_CFG(x) (((uint8_t)(((uint8_t)(x)) << AES_CFG8_15_KEY_CFG_SHIFT)) & AES_CFG8_15_KEY_CFG_MASK)
1259/*! @} */
1260
1261/*! @name CFG16_31 - AES Configuration register 16:31 */
1262/*! @{ */
1263#define AES_CFG16_31_INBLK_SEL_MASK (0x3U)
1264#define AES_CFG16_31_INBLK_SEL_SHIFT (0U)
1265/*! INBLK_SEL - Input block select.
1266 */
1267#define AES_CFG16_31_INBLK_SEL(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG16_31_INBLK_SEL_SHIFT)) & AES_CFG16_31_INBLK_SEL_MASK)
1268#define AES_CFG16_31_HOLD_SEL_MASK (0x30U)
1269#define AES_CFG16_31_HOLD_SEL_SHIFT (4U)
1270/*! HOLD_SEL - Holding register source select.
1271 */
1272#define AES_CFG16_31_HOLD_SEL(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG16_31_HOLD_SEL_SHIFT)) & AES_CFG16_31_HOLD_SEL_MASK)
1273#define AES_CFG16_31_OUTTEXT_SEL_MASK (0x300U)
1274#define AES_CFG16_31_OUTTEXT_SEL_SHIFT (8U)
1275/*! OUTTEXT_SEL - Output text source select.
1276 */
1277#define AES_CFG16_31_OUTTEXT_SEL(x) (((uint16_t)(((uint16_t)(x)) << AES_CFG16_31_OUTTEXT_SEL_SHIFT)) & AES_CFG16_31_OUTTEXT_SEL_MASK)
1278/*! @} */
1279
1280/*! @name CMD - AES Command register */
1281/*! @{ */
1282#define AES_CMD_COPY_TO_Y_MASK (0x2U)
1283#define AES_CMD_COPY_TO_Y_SHIFT (1U)
1284/*! COPY_TO_Y - Copy output text to GF128Y.
1285 */
1286#define AES_CMD_COPY_TO_Y(x) (((uint32_t)(((uint32_t)(x)) << AES_CMD_COPY_TO_Y_SHIFT)) & AES_CMD_COPY_TO_Y_MASK)
1287#define AES_CMD_SWITCH_MODE_MASK (0x10U)
1288#define AES_CMD_SWITCH_MODE_SHIFT (4U)
1289/*! SWITCH_MODE - When this bit is set the mode switches from forward mode (encryption) to reverse
1290 * mode (decryption) or reverse mode to forward mode.
1291 */
1292#define AES_CMD_SWITCH_MODE(x) (((uint32_t)(((uint32_t)(x)) << AES_CMD_SWITCH_MODE_SHIFT)) & AES_CMD_SWITCH_MODE_MASK)
1293#define AES_CMD_ABORT_MASK (0x100U)
1294#define AES_CMD_ABORT_SHIFT (8U)
1295/*! ABORT - Aborts Encrypt/Decrypt and GF128 Hash operation.
1296 */
1297#define AES_CMD_ABORT(x) (((uint32_t)(((uint32_t)(x)) << AES_CMD_ABORT_SHIFT)) & AES_CMD_ABORT_MASK)
1298#define AES_CMD_WIPE_MASK (0x200U)
1299#define AES_CMD_WIPE_SHIFT (9U)
1300/*! WIPE - When set this bit performs abort, clears KEY and GF128_Y registers and disables cipher.
1301 */
1302#define AES_CMD_WIPE(x) (((uint32_t)(((uint32_t)(x)) << AES_CMD_WIPE_SHIFT)) & AES_CMD_WIPE_MASK)
1303/*! @} */
1304
1305/*! @name STAT - AES Status register */
1306/*! @{ */
1307#define AES_STAT_IDLE_MASK (0x1U)
1308#define AES_STAT_IDLE_SHIFT (0U)
1309/*! IDLE - AES engine Idle.
1310 */
1311#define AES_STAT_IDLE(x) (((uint32_t)(((uint32_t)(x)) << AES_STAT_IDLE_SHIFT)) & AES_STAT_IDLE_MASK)
1312#define AES_STAT_IN_READY_MASK (0x2U)
1313#define AES_STAT_IN_READY_SHIFT (1U)
1314/*! IN_READY - Input text ready.
1315 */
1316#define AES_STAT_IN_READY(x) (((uint32_t)(((uint32_t)(x)) << AES_STAT_IN_READY_SHIFT)) & AES_STAT_IN_READY_MASK)
1317#define AES_STAT_OUT_READY_MASK (0x4U)
1318#define AES_STAT_OUT_READY_SHIFT (2U)
1319/*! OUT_READY - Output text ready.
1320 */
1321#define AES_STAT_OUT_READY(x) (((uint32_t)(((uint32_t)(x)) << AES_STAT_OUT_READY_SHIFT)) & AES_STAT_OUT_READY_MASK)
1322#define AES_STAT_REVERSE_MASK (0x10U)
1323#define AES_STAT_REVERSE_SHIFT (4U)
1324/*! REVERSE - Reverse mode.
1325 */
1326#define AES_STAT_REVERSE(x) (((uint32_t)(((uint32_t)(x)) << AES_STAT_REVERSE_SHIFT)) & AES_STAT_REVERSE_MASK)
1327#define AES_STAT_KEY_VALID_MASK (0x20U)
1328#define AES_STAT_KEY_VALID_SHIFT (5U)
1329/*! KEY_VALID - Key valid.
1330 */
1331#define AES_STAT_KEY_VALID(x) (((uint32_t)(((uint32_t)(x)) << AES_STAT_KEY_VALID_SHIFT)) & AES_STAT_KEY_VALID_MASK)
1332/*! @} */
1333
1334/*! @name CTR_INCR - Counter Increment */
1335/*! @{ */
1336#define AES_CTR_INCR_CTR_INCR_MASK (0xFFFFFFFFU)
1337#define AES_CTR_INCR_CTR_INCR_SHIFT (0U)
1338/*! CTR_INCR - Increment value for HOLDING register when in counter modes.
1339 */
1340#define AES_CTR_INCR_CTR_INCR(x) (((uint32_t)(((uint32_t)(x)) << AES_CTR_INCR_CTR_INCR_SHIFT)) & AES_CTR_INCR_CTR_INCR_MASK)
1341/*! @} */
1342
1343/*! @name KEY - Bits of the AES key */
1344/*! @{ */
1345#define AES_KEY_KEY_MASK (0xFFFFFFFFU)
1346#define AES_KEY_KEY_SHIFT (0U)
1347/*! KEY - Contains the bits of the AES key.
1348 */
1349#define AES_KEY_KEY(x) (((uint32_t)(((uint32_t)(x)) << AES_KEY_KEY_SHIFT)) & AES_KEY_KEY_MASK)
1350/*! @} */
1351
1352/* The count of AES_KEY */
1353#define AES_KEY_COUNT (8U)
1354
1355/*! @name INTEXT - Input text bits */
1356/*! @{ */
1357#define AES_INTEXT_INTEXT_MASK (0xFFFFFFFFU)
1358#define AES_INTEXT_INTEXT_SHIFT (0U)
1359/*! INTEXT - Contains bits of the AES key.
1360 */
1361#define AES_INTEXT_INTEXT(x) (((uint32_t)(((uint32_t)(x)) << AES_INTEXT_INTEXT_SHIFT)) & AES_INTEXT_INTEXT_MASK)
1362/*! @} */
1363
1364/* The count of AES_INTEXT */
1365#define AES_INTEXT_COUNT (4U)
1366
1367/*! @name HOLDING - Holding register bits */
1368/*! @{ */
1369#define AES_HOLDING_HOLDING_MASK (0xFFFFFFFFU)
1370#define AES_HOLDING_HOLDING_SHIFT (0U)
1371/*! HOLDING - Contains the first word (bits 31:0) of the 128 bit Holding value.
1372 */
1373#define AES_HOLDING_HOLDING(x) (((uint32_t)(((uint32_t)(x)) << AES_HOLDING_HOLDING_SHIFT)) & AES_HOLDING_HOLDING_MASK)
1374/*! @} */
1375
1376/* The count of AES_HOLDING */
1377#define AES_HOLDING_COUNT (4U)
1378
1379/*! @name OUTTEXT - Output text bits */
1380/*! @{ */
1381#define AES_OUTTEXT_OUTTEXT_MASK (0xFFFFFFFFU)
1382#define AES_OUTTEXT_OUTTEXT_SHIFT (0U)
1383/*! OUTTEXT - Contains the bits of the 128 bit Output text data.
1384 */
1385#define AES_OUTTEXT_OUTTEXT(x) (((uint32_t)(((uint32_t)(x)) << AES_OUTTEXT_OUTTEXT_SHIFT)) & AES_OUTTEXT_OUTTEXT_MASK)
1386/*! @} */
1387
1388/* The count of AES_OUTTEXT */
1389#define AES_OUTTEXT_COUNT (4U)
1390
1391/*! @name GF128_Y - Y bits input of GF128 hash */
1392/*! @{ */
1393#define AES_GF128_Y_GF128_Y_MASK (0xFFFFFFFFU)
1394#define AES_GF128_Y_GF128_Y_SHIFT (0U)
1395/*! GF128_Y - Contains the bits of the Y input of GF128 hash.
1396 */
1397#define AES_GF128_Y_GF128_Y(x) (((uint32_t)(((uint32_t)(x)) << AES_GF128_Y_GF128_Y_SHIFT)) & AES_GF128_Y_GF128_Y_MASK)
1398/*! @} */
1399
1400/* The count of AES_GF128_Y */
1401#define AES_GF128_Y_COUNT (4U)
1402
1403/*! @name GF128_Z - Result bits of GF128 hash */
1404/*! @{ */
1405#define AES_GF128_Z_GF128_Z_MASK (0xFFFFFFFFU)
1406#define AES_GF128_Z_GF128_Z_SHIFT (0U)
1407/*! GF128_Z - Contains bits of the result of GF128 hash.
1408 */
1409#define AES_GF128_Z_GF128_Z(x) (((uint32_t)(((uint32_t)(x)) << AES_GF128_Z_GF128_Z_SHIFT)) & AES_GF128_Z_GF128_Z_MASK)
1410/*! @} */
1411
1412/* The count of AES_GF128_Z */
1413#define AES_GF128_Z_COUNT (4U)
1414
1415/*! @name GCM_TAG - GCM Tag bits */
1416/*! @{ */
1417#define AES_GCM_TAG_GCM_TAG_MASK (0xFFFFFFFFU)
1418#define AES_GCM_TAG_GCM_TAG_SHIFT (0U)
1419/*! GCM_TAG - Contains bits of the 128 bit GCM tag.
1420 */
1421#define AES_GCM_TAG_GCM_TAG(x) (((uint32_t)(((uint32_t)(x)) << AES_GCM_TAG_GCM_TAG_SHIFT)) & AES_GCM_TAG_GCM_TAG_MASK)
1422/*! @} */
1423
1424/* The count of AES_GCM_TAG */
1425#define AES_GCM_TAG_COUNT (4U)
1426
1427
1428/*!
1429 * @}
1430 */ /* end of group AES_Register_Masks */
1431
1432
1433/* AES - Peripheral instance base addresses */
1434/** Peripheral AES0 base address */
1435#define AES0_BASE (0x400A1000u)
1436/** Peripheral AES0 base pointer */
1437#define AES0 ((AES_Type *)AES0_BASE)
1438/** Array initializer of AES peripheral base addresses */
1439#define AES_BASE_ADDRS { AES0_BASE }
1440/** Array initializer of AES peripheral base pointers */
1441#define AES_BASE_PTRS { AES0 }
1442
1443/*!
1444 * @}
1445 */ /* end of group AES_Peripheral_Access_Layer */
1446
1447
1448/* ----------------------------------------------------------------------------
1449 -- ASYNC_SYSCON Peripheral Access Layer
1450 ---------------------------------------------------------------------------- */
1451
1452/*!
1453 * @addtogroup ASYNC_SYSCON_Peripheral_Access_Layer ASYNC_SYSCON Peripheral Access Layer
1454 * @{
1455 */
1456
1457/** ASYNC_SYSCON - Register Layout Typedef */
1458typedef struct {
1459 __IO uint32_t ASYNCPRESETCTRL; /**< Async peripheral reset control, offset: 0x0 */
1460 __O uint32_t ASYNCPRESETCTRLSET; /**< Set bits in ASYNCPRESETCTRL, offset: 0x4 */
1461 __O uint32_t ASYNCPRESETCTRLCLR; /**< Clear bits in ASYNCPRESETCTRL, offset: 0x8 */
1462 uint8_t RESERVED_0[4];
1463 __IO uint32_t ASYNCAPBCLKCTRL; /**< Async peripheral clock control, offset: 0x10 */
1464 __O uint32_t ASYNCAPBCLKCTRLSET; /**< Set bits in ASYNCAPBCLKCTRL, offset: 0x14 */
1465 __O uint32_t ASYNCAPBCLKCTRLCLR; /**< Clear bits in ASYNCAPBCLKCTRL, offset: 0x18 */
1466 uint8_t RESERVED_1[4];
1467 __IO uint32_t ASYNCAPBCLKSELA; /**< Async APB clock source select A, offset: 0x20 */
1468} ASYNC_SYSCON_Type;
1469
1470/* ----------------------------------------------------------------------------
1471 -- ASYNC_SYSCON Register Masks
1472 ---------------------------------------------------------------------------- */
1473
1474/*!
1475 * @addtogroup ASYNC_SYSCON_Register_Masks ASYNC_SYSCON Register Masks
1476 * @{
1477 */
1478
1479/*! @name ASYNCPRESETCTRL - Async peripheral reset control */
1480/*! @{ */
1481#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER3_MASK (0x2000U)
1482#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER3_SHIFT (13U)
1483/*! CTIMER3 - Standard counter/timer CTIMER3 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.
1484 */
1485#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER3(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER3_SHIFT)) & ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER3_MASK)
1486#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER4_MASK (0x4000U)
1487#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER4_SHIFT (14U)
1488/*! CTIMER4 - Standard counter/timer CTIMER4 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.
1489 */
1490#define ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER4(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER4_SHIFT)) & ASYNC_SYSCON_ASYNCPRESETCTRL_CTIMER4_MASK)
1491/*! @} */
1492
1493/*! @name ASYNCPRESETCTRLSET - Set bits in ASYNCPRESETCTRL */
1494/*! @{ */
1495#define ASYNC_SYSCON_ASYNCPRESETCTRLSET_ARST_SET_MASK (0xFFFFFFFFU)
1496#define ASYNC_SYSCON_ASYNCPRESETCTRLSET_ARST_SET_SHIFT (0U)
1497/*! ARST_SET - Writing ones to this register sets the corresponding bit or bits in the
1498 * ASYNCPRESETCTRL register, if they are implemented. Bits that do not correspond to defined bits in
1499 * ASYNCPRESETCTRL are reserved and only zeroes should be written to them.
1500 */
1501#define ASYNC_SYSCON_ASYNCPRESETCTRLSET_ARST_SET(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCPRESETCTRLSET_ARST_SET_SHIFT)) & ASYNC_SYSCON_ASYNCPRESETCTRLSET_ARST_SET_MASK)
1502/*! @} */
1503
1504/*! @name ASYNCPRESETCTRLCLR - Clear bits in ASYNCPRESETCTRL */
1505/*! @{ */
1506#define ASYNC_SYSCON_ASYNCPRESETCTRLCLR_ARST_CLR_MASK (0xFFFFFFFFU)
1507#define ASYNC_SYSCON_ASYNCPRESETCTRLCLR_ARST_CLR_SHIFT (0U)
1508/*! ARST_CLR - Writing ones to this register clears the corresponding bit or bits in the
1509 * ASYNCPRESETCTRL register, if they are implemented. Bits that do not correspond to defined bits in
1510 * ASYNCPRESETCTRL are reserved and only zeroes should be written to them.
1511 */
1512#define ASYNC_SYSCON_ASYNCPRESETCTRLCLR_ARST_CLR(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCPRESETCTRLCLR_ARST_CLR_SHIFT)) & ASYNC_SYSCON_ASYNCPRESETCTRLCLR_ARST_CLR_MASK)
1513/*! @} */
1514
1515/*! @name ASYNCAPBCLKCTRL - Async peripheral clock control */
1516/*! @{ */
1517#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER3_MASK (0x2000U)
1518#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER3_SHIFT (13U)
1519/*! CTIMER3 - Controls the clock for CTIMER3. 0 = Disable; 1 = Enable.
1520 */
1521#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER3(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER3_SHIFT)) & ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER3_MASK)
1522#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER4_MASK (0x4000U)
1523#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER4_SHIFT (14U)
1524/*! CTIMER4 - Controls the clock for CTIMER4. 0 = Disable; 1 = Enable.
1525 */
1526#define ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER4(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER4_SHIFT)) & ASYNC_SYSCON_ASYNCAPBCLKCTRL_CTIMER4_MASK)
1527/*! @} */
1528
1529/*! @name ASYNCAPBCLKCTRLSET - Set bits in ASYNCAPBCLKCTRL */
1530/*! @{ */
1531#define ASYNC_SYSCON_ASYNCAPBCLKCTRLSET_ACLK_SET_MASK (0xFFFFFFFFU)
1532#define ASYNC_SYSCON_ASYNCAPBCLKCTRLSET_ACLK_SET_SHIFT (0U)
1533/*! ACLK_SET - Writing ones to this register sets the corresponding bit or bits in the
1534 * ASYNCAPBCLKCTRL register, if they are implemented. Bits that do not correspond to defined bits in
1535 * ASYNCPRESETCTRL are reserved and only zeroes should be written to them.
1536 */
1537#define ASYNC_SYSCON_ASYNCAPBCLKCTRLSET_ACLK_SET(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCAPBCLKCTRLSET_ACLK_SET_SHIFT)) & ASYNC_SYSCON_ASYNCAPBCLKCTRLSET_ACLK_SET_MASK)
1538/*! @} */
1539
1540/*! @name ASYNCAPBCLKCTRLCLR - Clear bits in ASYNCAPBCLKCTRL */
1541/*! @{ */
1542#define ASYNC_SYSCON_ASYNCAPBCLKCTRLCLR_ACLK_CLR_MASK (0xFFFFFFFFU)
1543#define ASYNC_SYSCON_ASYNCAPBCLKCTRLCLR_ACLK_CLR_SHIFT (0U)
1544/*! ACLK_CLR - Writing ones to this register clears the corresponding bit or bits in the
1545 * ASYNCAPBCLKCTRL register, if they are implemented. Bits that do not correspond to defined bits in
1546 * ASYNCAPBCLKCTRL are reserved and only zeroes should be written to them.
1547 */
1548#define ASYNC_SYSCON_ASYNCAPBCLKCTRLCLR_ACLK_CLR(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCAPBCLKCTRLCLR_ACLK_CLR_SHIFT)) & ASYNC_SYSCON_ASYNCAPBCLKCTRLCLR_ACLK_CLR_MASK)
1549/*! @} */
1550
1551/*! @name ASYNCAPBCLKSELA - Async APB clock source select A */
1552/*! @{ */
1553#define ASYNC_SYSCON_ASYNCAPBCLKSELA_SEL_MASK (0x3U)
1554#define ASYNC_SYSCON_ASYNCAPBCLKSELA_SEL_SHIFT (0U)
1555/*! SEL - Clock source for asynchronous clock source selector A
1556 * 0b00..Main clock (main_clk)
1557 * 0b01..FRO 12 MHz (fro_12m)
1558 * 0b10..Audio PLL clock.(AUDPLL_BYPASS)
1559 * 0b11..fc6 fclk (fc6_fclk)
1560 */
1561#define ASYNC_SYSCON_ASYNCAPBCLKSELA_SEL(x) (((uint32_t)(((uint32_t)(x)) << ASYNC_SYSCON_ASYNCAPBCLKSELA_SEL_SHIFT)) & ASYNC_SYSCON_ASYNCAPBCLKSELA_SEL_MASK)
1562/*! @} */
1563
1564
1565/*!
1566 * @}
1567 */ /* end of group ASYNC_SYSCON_Register_Masks */
1568
1569
1570/* ASYNC_SYSCON - Peripheral instance base addresses */
1571/** Peripheral ASYNC_SYSCON base address */
1572#define ASYNC_SYSCON_BASE (0x40040000u)
1573/** Peripheral ASYNC_SYSCON base pointer */
1574#define ASYNC_SYSCON ((ASYNC_SYSCON_Type *)ASYNC_SYSCON_BASE)
1575/** Array initializer of ASYNC_SYSCON peripheral base addresses */
1576#define ASYNC_SYSCON_BASE_ADDRS { ASYNC_SYSCON_BASE }
1577/** Array initializer of ASYNC_SYSCON peripheral base pointers */
1578#define ASYNC_SYSCON_BASE_PTRS { ASYNC_SYSCON }
1579
1580/*!
1581 * @}
1582 */ /* end of group ASYNC_SYSCON_Peripheral_Access_Layer */
1583
1584
1585/* ----------------------------------------------------------------------------
1586 -- CAN Peripheral Access Layer
1587 ---------------------------------------------------------------------------- */
1588
1589/*!
1590 * @addtogroup CAN_Peripheral_Access_Layer CAN Peripheral Access Layer
1591 * @{
1592 */
1593
1594/** CAN - Register Layout Typedef */
1595typedef struct {
1596 uint8_t RESERVED_0[12];
1597 __IO uint32_t DBTP; /**< Data Bit Timing Prescaler Register, offset: 0xC */
1598 __IO uint32_t TEST; /**< Test Register, offset: 0x10 */
1599 uint8_t RESERVED_1[4];
1600 __IO uint32_t CCCR; /**< CC Control Register, offset: 0x18 */
1601 __IO uint32_t NBTP; /**< Nominal Bit Timing and Prescaler Register, offset: 0x1C */
1602 __IO uint32_t TSCC; /**< Timestamp Counter Configuration, offset: 0x20 */
1603 __I uint32_t TSCV; /**< Timestamp Counter Value, offset: 0x24 */
1604 __IO uint32_t TOCC; /**< Timeout Counter Configuration, offset: 0x28 */
1605 __I uint32_t TOCV; /**< Timeout Counter Value, offset: 0x2C */
1606 uint8_t RESERVED_2[16];
1607 __I uint32_t ECR; /**< Error Counter Register, offset: 0x40 */
1608 __I uint32_t PSR; /**< Protocol Status Register, offset: 0x44 */
1609 __IO uint32_t TDCR; /**< Transmitter Delay Compensator Register, offset: 0x48 */
1610 uint8_t RESERVED_3[4];
1611 __IO uint32_t IR; /**< Interrupt Register, offset: 0x50 */
1612 __IO uint32_t IE; /**< Interrupt Enable, offset: 0x54 */
1613 __IO uint32_t ILS; /**< Interrupt Line Select, offset: 0x58 */
1614 __IO uint32_t ILE; /**< Interrupt Line Enable, offset: 0x5C */
1615 uint8_t RESERVED_4[32];
1616 __IO uint32_t GFC; /**< Global Filter Configuration, offset: 0x80 */
1617 __IO uint32_t SIDFC; /**< Standard ID Filter Configuration, offset: 0x84 */
1618 __IO uint32_t XIDFC; /**< Extended ID Filter Configuration, offset: 0x88 */
1619 uint8_t RESERVED_5[4];
1620 __IO uint32_t XIDAM; /**< Extended ID AND Mask, offset: 0x90 */
1621 __I uint32_t HPMS; /**< High Priority Message Status, offset: 0x94 */
1622 __IO uint32_t NDAT1; /**< New Data 1, offset: 0x98 */
1623 __IO uint32_t NDAT2; /**< New Data 2, offset: 0x9C */
1624 __IO uint32_t RXF0C; /**< Rx FIFO 0 Configuration, offset: 0xA0 */
1625 __I uint32_t RXF0S; /**< Rx FIFO 0 Status, offset: 0xA4 */
1626 __IO uint32_t RXF0A; /**< Rx FIFO 0 Acknowledge, offset: 0xA8 */
1627 __IO uint32_t RXBC; /**< Rx Buffer Configuration, offset: 0xAC */
1628 __IO uint32_t RXF1C; /**< Rx FIFO 1 Configuration, offset: 0xB0 */
1629 __I uint32_t RXF1S; /**< Rx FIFO 1 Status, offset: 0xB4 */
1630 __IO uint32_t RXF1A; /**< Rx FIFO 1 Acknowledge, offset: 0xB8 */
1631 __IO uint32_t RXESC; /**< Rx Buffer and FIFO Element Size Configuration, offset: 0xBC */
1632 __IO uint32_t TXBC; /**< Tx Buffer Configuration, offset: 0xC0 */
1633 __IO uint32_t TXFQS; /**< Tx FIFO/Queue Status, offset: 0xC4 */
1634 __IO uint32_t TXESC; /**< Tx Buffer Element Size Configuration, offset: 0xC8 */
1635 __I uint32_t TXBRP; /**< Tx Buffer Request Pending, offset: 0xCC */
1636 __IO uint32_t TXBAR; /**< Tx Buffer Add Request, offset: 0xD0 */
1637 __IO uint32_t TXBCR; /**< Tx Buffer Cancellation Request, offset: 0xD4 */
1638 __I uint32_t TXBTO; /**< Tx Buffer Transmission Occurred, offset: 0xD8 */
1639 __I uint32_t TXBCF; /**< Tx Buffer Cancellation Finished, offset: 0xDC */
1640 __IO uint32_t TXBTIE; /**< Tx Buffer Transmission Interrupt Enable, offset: 0xE0 */
1641 __IO uint32_t TXBCIE; /**< Tx Buffer Cancellation Finished Interrupt Enable, offset: 0xE4 */
1642 uint8_t RESERVED_6[8];
1643 __IO uint32_t TXEFC; /**< Tx Event FIFO Configuration, offset: 0xF0 */
1644 __I uint32_t TXEFS; /**< Tx Event FIFO Status, offset: 0xF4 */
1645 __IO uint32_t TXEFA; /**< Tx Event FIFO Acknowledge, offset: 0xF8 */
1646 uint8_t RESERVED_7[260];
1647 __IO uint32_t MRBA; /**< CAN Message RAM Base Address, offset: 0x200 */
1648 uint8_t RESERVED_8[508];
1649 __IO uint32_t ETSCC; /**< External Timestamp Counter Configuration, offset: 0x400 */
1650 uint8_t RESERVED_9[508];
1651 __IO uint32_t ETSCV; /**< External Timestamp Counter Value, offset: 0x600 */
1652} CAN_Type;
1653
1654/* ----------------------------------------------------------------------------
1655 -- CAN Register Masks
1656 ---------------------------------------------------------------------------- */
1657
1658/*!
1659 * @addtogroup CAN_Register_Masks CAN Register Masks
1660 * @{
1661 */
1662
1663/*! @name DBTP - Data Bit Timing Prescaler Register */
1664/*! @{ */
1665#define CAN_DBTP_DSJW_MASK (0xFU)
1666#define CAN_DBTP_DSJW_SHIFT (0U)
1667/*! DSJW - Data (re)synchronization jump width.
1668 */
1669#define CAN_DBTP_DSJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DSJW_SHIFT)) & CAN_DBTP_DSJW_MASK)
1670#define CAN_DBTP_DTSEG2_MASK (0xF0U)
1671#define CAN_DBTP_DTSEG2_SHIFT (4U)
1672/*! DTSEG2 - Data time segment after sample point.
1673 */
1674#define CAN_DBTP_DTSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DTSEG2_SHIFT)) & CAN_DBTP_DTSEG2_MASK)
1675#define CAN_DBTP_DTSEG1_MASK (0x1F00U)
1676#define CAN_DBTP_DTSEG1_SHIFT (8U)
1677/*! DTSEG1 - Data time segment before sample point.
1678 */
1679#define CAN_DBTP_DTSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DTSEG1_SHIFT)) & CAN_DBTP_DTSEG1_MASK)
1680#define CAN_DBTP_DBRP_MASK (0x1F0000U)
1681#define CAN_DBTP_DBRP_SHIFT (16U)
1682/*! DBRP - Data bit rate prescaler.
1683 */
1684#define CAN_DBTP_DBRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DBRP_SHIFT)) & CAN_DBTP_DBRP_MASK)
1685#define CAN_DBTP_TDC_MASK (0x800000U)
1686#define CAN_DBTP_TDC_SHIFT (23U)
1687/*! TDC - Transmitter delay compensation.
1688 */
1689#define CAN_DBTP_TDC(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_TDC_SHIFT)) & CAN_DBTP_TDC_MASK)
1690/*! @} */
1691
1692/*! @name TEST - Test Register */
1693/*! @{ */
1694#define CAN_TEST_LBCK_MASK (0x10U)
1695#define CAN_TEST_LBCK_SHIFT (4U)
1696/*! LBCK - Loop back mode.
1697 */
1698#define CAN_TEST_LBCK(x) (((uint32_t)(((uint32_t)(x)) << CAN_TEST_LBCK_SHIFT)) & CAN_TEST_LBCK_MASK)
1699#define CAN_TEST_TX_MASK (0x60U)
1700#define CAN_TEST_TX_SHIFT (5U)
1701/*! TX - Control of transmit pin.
1702 */
1703#define CAN_TEST_TX(x) (((uint32_t)(((uint32_t)(x)) << CAN_TEST_TX_SHIFT)) & CAN_TEST_TX_MASK)
1704#define CAN_TEST_RX_MASK (0x80U)
1705#define CAN_TEST_RX_SHIFT (7U)
1706/*! RX - Monitors the actual value of the CAN_RXD.
1707 */
1708#define CAN_TEST_RX(x) (((uint32_t)(((uint32_t)(x)) << CAN_TEST_RX_SHIFT)) & CAN_TEST_RX_MASK)
1709/*! @} */
1710
1711/*! @name CCCR - CC Control Register */
1712/*! @{ */
1713#define CAN_CCCR_INIT_MASK (0x1U)
1714#define CAN_CCCR_INIT_SHIFT (0U)
1715/*! INIT - Initialization.
1716 */
1717#define CAN_CCCR_INIT(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_INIT_SHIFT)) & CAN_CCCR_INIT_MASK)
1718#define CAN_CCCR_CCE_MASK (0x2U)
1719#define CAN_CCCR_CCE_SHIFT (1U)
1720/*! CCE - Configuration change enable.
1721 */
1722#define CAN_CCCR_CCE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_CCE_SHIFT)) & CAN_CCCR_CCE_MASK)
1723#define CAN_CCCR_ASM_MASK (0x4U)
1724#define CAN_CCCR_ASM_SHIFT (2U)
1725/*! ASM - Restricted operational mode.
1726 */
1727#define CAN_CCCR_ASM(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_ASM_SHIFT)) & CAN_CCCR_ASM_MASK)
1728#define CAN_CCCR_CSA_MASK (0x8U)
1729#define CAN_CCCR_CSA_SHIFT (3U)
1730/*! CSA - Clock Stop Acknowledge.
1731 */
1732#define CAN_CCCR_CSA(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_CSA_SHIFT)) & CAN_CCCR_CSA_MASK)
1733#define CAN_CCCR_CSR_MASK (0x10U)
1734#define CAN_CCCR_CSR_SHIFT (4U)
1735/*! CSR - Clock Stop Request.
1736 */
1737#define CAN_CCCR_CSR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_CSR_SHIFT)) & CAN_CCCR_CSR_MASK)
1738#define CAN_CCCR_MON_MASK (0x20U)
1739#define CAN_CCCR_MON_SHIFT (5U)
1740/*! MON - Bus monitoring mode.
1741 */
1742#define CAN_CCCR_MON(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_MON_SHIFT)) & CAN_CCCR_MON_MASK)
1743#define CAN_CCCR_DAR_MASK (0x40U)
1744#define CAN_CCCR_DAR_SHIFT (6U)
1745/*! DAR - Disable automatic retransmission.
1746 */
1747#define CAN_CCCR_DAR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_DAR_SHIFT)) & CAN_CCCR_DAR_MASK)
1748#define CAN_CCCR_TEST_MASK (0x80U)
1749#define CAN_CCCR_TEST_SHIFT (7U)
1750/*! TEST - Test mode enable.
1751 */
1752#define CAN_CCCR_TEST(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_TEST_SHIFT)) & CAN_CCCR_TEST_MASK)
1753#define CAN_CCCR_FDOE_MASK (0x100U)
1754#define CAN_CCCR_FDOE_SHIFT (8U)
1755/*! FDOE - CAN FD operation enable.
1756 */
1757#define CAN_CCCR_FDOE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_FDOE_SHIFT)) & CAN_CCCR_FDOE_MASK)
1758#define CAN_CCCR_BRSE_MASK (0x200U)
1759#define CAN_CCCR_BRSE_SHIFT (9U)
1760/*! BRSE - When CAN FD operation is disabled, this bit is not evaluated.
1761 */
1762#define CAN_CCCR_BRSE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_BRSE_SHIFT)) & CAN_CCCR_BRSE_MASK)
1763#define CAN_CCCR_PXHD_MASK (0x1000U)
1764#define CAN_CCCR_PXHD_SHIFT (12U)
1765/*! PXHD - Protocol exception handling disable.
1766 */
1767#define CAN_CCCR_PXHD(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_PXHD_SHIFT)) & CAN_CCCR_PXHD_MASK)
1768#define CAN_CCCR_EFBI_MASK (0x2000U)
1769#define CAN_CCCR_EFBI_SHIFT (13U)
1770/*! EFBI - Edge filtering during bus integration.
1771 */
1772#define CAN_CCCR_EFBI(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_EFBI_SHIFT)) & CAN_CCCR_EFBI_MASK)
1773#define CAN_CCCR_TXP_MASK (0x4000U)
1774#define CAN_CCCR_TXP_SHIFT (14U)
1775/*! TXP - Transmit pause.
1776 */
1777#define CAN_CCCR_TXP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_TXP_SHIFT)) & CAN_CCCR_TXP_MASK)
1778#define CAN_CCCR_NISO_MASK (0x8000U)
1779#define CAN_CCCR_NISO_SHIFT (15U)
1780/*! NISO - Non ISO operation.
1781 */
1782#define CAN_CCCR_NISO(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_NISO_SHIFT)) & CAN_CCCR_NISO_MASK)
1783/*! @} */
1784
1785/*! @name NBTP - Nominal Bit Timing and Prescaler Register */
1786/*! @{ */
1787#define CAN_NBTP_NTSEG2_MASK (0x7FU)
1788#define CAN_NBTP_NTSEG2_SHIFT (0U)
1789/*! NTSEG2 - Nominal time segment after sample point.
1790 */
1791#define CAN_NBTP_NTSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_NBTP_NTSEG2_SHIFT)) & CAN_NBTP_NTSEG2_MASK)
1792#define CAN_NBTP_NTSEG1_MASK (0xFF00U)
1793#define CAN_NBTP_NTSEG1_SHIFT (8U)
1794/*! NTSEG1 - Nominal time segment before sample point.
1795 */
1796#define CAN_NBTP_NTSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_NBTP_NTSEG1_SHIFT)) & CAN_NBTP_NTSEG1_MASK)
1797#define CAN_NBTP_NBRP_MASK (0x1FF0000U)
1798#define CAN_NBTP_NBRP_SHIFT (16U)
1799/*! NBRP - Nominal bit rate prescaler.
1800 */
1801#define CAN_NBTP_NBRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_NBTP_NBRP_SHIFT)) & CAN_NBTP_NBRP_MASK)
1802#define CAN_NBTP_NSJW_MASK (0xFE000000U)
1803#define CAN_NBTP_NSJW_SHIFT (25U)
1804/*! NSJW - Nominal (re)synchronization jump width.
1805 */
1806#define CAN_NBTP_NSJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_NBTP_NSJW_SHIFT)) & CAN_NBTP_NSJW_MASK)
1807/*! @} */
1808
1809/*! @name TSCC - Timestamp Counter Configuration */
1810/*! @{ */
1811#define CAN_TSCC_TSS_MASK (0x3U)
1812#define CAN_TSCC_TSS_SHIFT (0U)
1813/*! TSS - Timestamp select.
1814 */
1815#define CAN_TSCC_TSS(x) (((uint32_t)(((uint32_t)(x)) << CAN_TSCC_TSS_SHIFT)) & CAN_TSCC_TSS_MASK)
1816#define CAN_TSCC_TCP_MASK (0xF0000U)
1817#define CAN_TSCC_TCP_SHIFT (16U)
1818/*! TCP - Timestamp counter prescaler Configures the timestamp and timeout counters time unit in multiple of CAN bit times.
1819 */
1820#define CAN_TSCC_TCP(x) (((uint32_t)(((uint32_t)(x)) << CAN_TSCC_TCP_SHIFT)) & CAN_TSCC_TCP_MASK)
1821/*! @} */
1822
1823/*! @name TSCV - Timestamp Counter Value */
1824/*! @{ */
1825#define CAN_TSCV_TSC_MASK (0xFFFFU)
1826#define CAN_TSCV_TSC_SHIFT (0U)
1827/*! TSC - Timestamp counter.
1828 */
1829#define CAN_TSCV_TSC(x) (((uint32_t)(((uint32_t)(x)) << CAN_TSCV_TSC_SHIFT)) & CAN_TSCV_TSC_MASK)
1830/*! @} */
1831
1832/*! @name TOCC - Timeout Counter Configuration */
1833/*! @{ */
1834#define CAN_TOCC_ETOC_MASK (0x1U)
1835#define CAN_TOCC_ETOC_SHIFT (0U)
1836/*! ETOC - Enable timeout counter.
1837 */
1838#define CAN_TOCC_ETOC(x) (((uint32_t)(((uint32_t)(x)) << CAN_TOCC_ETOC_SHIFT)) & CAN_TOCC_ETOC_MASK)
1839#define CAN_TOCC_TOS_MASK (0x6U)
1840#define CAN_TOCC_TOS_SHIFT (1U)
1841/*! TOS - Timeout select.
1842 */
1843#define CAN_TOCC_TOS(x) (((uint32_t)(((uint32_t)(x)) << CAN_TOCC_TOS_SHIFT)) & CAN_TOCC_TOS_MASK)
1844#define CAN_TOCC_TOP_MASK (0xFFFF0000U)
1845#define CAN_TOCC_TOP_SHIFT (16U)
1846/*! TOP - Timeout period.
1847 */
1848#define CAN_TOCC_TOP(x) (((uint32_t)(((uint32_t)(x)) << CAN_TOCC_TOP_SHIFT)) & CAN_TOCC_TOP_MASK)
1849/*! @} */
1850
1851/*! @name TOCV - Timeout Counter Value */
1852/*! @{ */
1853#define CAN_TOCV_TOC_MASK (0xFFFFU)
1854#define CAN_TOCV_TOC_SHIFT (0U)
1855/*! TOC - Timeout counter.
1856 */
1857#define CAN_TOCV_TOC(x) (((uint32_t)(((uint32_t)(x)) << CAN_TOCV_TOC_SHIFT)) & CAN_TOCV_TOC_MASK)
1858/*! @} */
1859
1860/*! @name ECR - Error Counter Register */
1861/*! @{ */
1862#define CAN_ECR_TEC_MASK (0xFFU)
1863#define CAN_ECR_TEC_SHIFT (0U)
1864/*! TEC - Transmit error counter.
1865 */
1866#define CAN_ECR_TEC(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_TEC_SHIFT)) & CAN_ECR_TEC_MASK)
1867#define CAN_ECR_REC_MASK (0x7F00U)
1868#define CAN_ECR_REC_SHIFT (8U)
1869/*! REC - Receive error counter.
1870 */
1871#define CAN_ECR_REC(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_REC_SHIFT)) & CAN_ECR_REC_MASK)
1872#define CAN_ECR_RP_MASK (0x8000U)
1873#define CAN_ECR_RP_SHIFT (15U)
1874/*! RP - Receive error passive.
1875 */
1876#define CAN_ECR_RP(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_RP_SHIFT)) & CAN_ECR_RP_MASK)
1877#define CAN_ECR_CEL_MASK (0xFF0000U)
1878#define CAN_ECR_CEL_SHIFT (16U)
1879/*! CEL - CAN error logging.
1880 */
1881#define CAN_ECR_CEL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_CEL_SHIFT)) & CAN_ECR_CEL_MASK)
1882/*! @} */
1883
1884/*! @name PSR - Protocol Status Register */
1885/*! @{ */
1886#define CAN_PSR_LEC_MASK (0x7U)
1887#define CAN_PSR_LEC_SHIFT (0U)
1888/*! LEC - Last error code.
1889 */
1890#define CAN_PSR_LEC(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_LEC_SHIFT)) & CAN_PSR_LEC_MASK)
1891#define CAN_PSR_ACT_MASK (0x18U)
1892#define CAN_PSR_ACT_SHIFT (3U)
1893/*! ACT - Activity.
1894 */
1895#define CAN_PSR_ACT(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_ACT_SHIFT)) & CAN_PSR_ACT_MASK)
1896#define CAN_PSR_EP_MASK (0x20U)
1897#define CAN_PSR_EP_SHIFT (5U)
1898/*! EP - Error Passive.
1899 */
1900#define CAN_PSR_EP(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_EP_SHIFT)) & CAN_PSR_EP_MASK)
1901#define CAN_PSR_EW_MASK (0x40U)
1902#define CAN_PSR_EW_SHIFT (6U)
1903/*! EW - Warning status.
1904 */
1905#define CAN_PSR_EW(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_EW_SHIFT)) & CAN_PSR_EW_MASK)
1906#define CAN_PSR_BO_MASK (0x80U)
1907#define CAN_PSR_BO_SHIFT (7U)
1908/*! BO - Bus Off Status.
1909 */
1910#define CAN_PSR_BO(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_BO_SHIFT)) & CAN_PSR_BO_MASK)
1911#define CAN_PSR_DLEC_MASK (0x700U)
1912#define CAN_PSR_DLEC_SHIFT (8U)
1913/*! DLEC - Data phase last error code.
1914 */
1915#define CAN_PSR_DLEC(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_DLEC_SHIFT)) & CAN_PSR_DLEC_MASK)
1916#define CAN_PSR_RESI_MASK (0x800U)
1917#define CAN_PSR_RESI_SHIFT (11U)
1918/*! RESI - ESI flag of the last received CAN FD message.
1919 */
1920#define CAN_PSR_RESI(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RESI_SHIFT)) & CAN_PSR_RESI_MASK)
1921#define CAN_PSR_RBRS_MASK (0x1000U)
1922#define CAN_PSR_RBRS_SHIFT (12U)
1923/*! RBRS - BRS flag of last received CAN FD message.
1924 */
1925#define CAN_PSR_RBRS(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RBRS_SHIFT)) & CAN_PSR_RBRS_MASK)
1926#define CAN_PSR_RFDF_MASK (0x2000U)
1927#define CAN_PSR_RFDF_SHIFT (13U)
1928/*! RFDF - Received a CAN FD message.
1929 */
1930#define CAN_PSR_RFDF(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RFDF_SHIFT)) & CAN_PSR_RFDF_MASK)
1931#define CAN_PSR_PXE_MASK (0x4000U)
1932#define CAN_PSR_PXE_SHIFT (14U)
1933/*! PXE - Protocol exception event.
1934 */
1935#define CAN_PSR_PXE(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_PXE_SHIFT)) & CAN_PSR_PXE_MASK)
1936#define CAN_PSR_TDCV_MASK (0x7F0000U)
1937#define CAN_PSR_TDCV_SHIFT (16U)
1938/*! TDCV - Transmitter delay compensation value.
1939 */
1940#define CAN_PSR_TDCV(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_TDCV_SHIFT)) & CAN_PSR_TDCV_MASK)
1941/*! @} */
1942
1943/*! @name TDCR - Transmitter Delay Compensator Register */
1944/*! @{ */
1945#define CAN_TDCR_TDCF_MASK (0x7FU)
1946#define CAN_TDCR_TDCF_SHIFT (0U)
1947/*! TDCF - Transmitter delay compensation filter window length.
1948 */
1949#define CAN_TDCR_TDCF(x) (((uint32_t)(((uint32_t)(x)) << CAN_TDCR_TDCF_SHIFT)) & CAN_TDCR_TDCF_MASK)
1950#define CAN_TDCR_TDCO_MASK (0x7F00U)
1951#define CAN_TDCR_TDCO_SHIFT (8U)
1952/*! TDCO - Transmitter delay compensation offset.
1953 */
1954#define CAN_TDCR_TDCO(x) (((uint32_t)(((uint32_t)(x)) << CAN_TDCR_TDCO_SHIFT)) & CAN_TDCR_TDCO_MASK)
1955/*! @} */
1956
1957/*! @name IR - Interrupt Register */
1958/*! @{ */
1959#define CAN_IR_RF0N_MASK (0x1U)
1960#define CAN_IR_RF0N_SHIFT (0U)
1961/*! RF0N - Rx FIFO 0 new message.
1962 */
1963#define CAN_IR_RF0N(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF0N_SHIFT)) & CAN_IR_RF0N_MASK)
1964#define CAN_IR_RF0W_MASK (0x2U)
1965#define CAN_IR_RF0W_SHIFT (1U)
1966/*! RF0W - Rx FIFO 0 watermark reached.
1967 */
1968#define CAN_IR_RF0W(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF0W_SHIFT)) & CAN_IR_RF0W_MASK)
1969#define CAN_IR_RF0F_MASK (0x4U)
1970#define CAN_IR_RF0F_SHIFT (2U)
1971/*! RF0F - Rx FIFO 0 full.
1972 */
1973#define CAN_IR_RF0F(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF0F_SHIFT)) & CAN_IR_RF0F_MASK)
1974#define CAN_IR_RF0L_MASK (0x8U)
1975#define CAN_IR_RF0L_SHIFT (3U)
1976/*! RF0L - Rx FIFO 0 message lost.
1977 */
1978#define CAN_IR_RF0L(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF0L_SHIFT)) & CAN_IR_RF0L_MASK)
1979#define CAN_IR_RF1N_MASK (0x10U)
1980#define CAN_IR_RF1N_SHIFT (4U)
1981/*! RF1N - Rx FIFO 1 new message.
1982 */
1983#define CAN_IR_RF1N(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF1N_SHIFT)) & CAN_IR_RF1N_MASK)
1984#define CAN_IR_RF1W_MASK (0x20U)
1985#define CAN_IR_RF1W_SHIFT (5U)
1986/*! RF1W - Rx FIFO 1 watermark reached.
1987 */
1988#define CAN_IR_RF1W(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF1W_SHIFT)) & CAN_IR_RF1W_MASK)
1989#define CAN_IR_RF1F_MASK (0x40U)
1990#define CAN_IR_RF1F_SHIFT (6U)
1991/*! RF1F - Rx FIFO 1 full.
1992 */
1993#define CAN_IR_RF1F(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF1F_SHIFT)) & CAN_IR_RF1F_MASK)
1994#define CAN_IR_RF1L_MASK (0x80U)
1995#define CAN_IR_RF1L_SHIFT (7U)
1996/*! RF1L - Rx FIFO 1 message lost.
1997 */
1998#define CAN_IR_RF1L(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_RF1L_SHIFT)) & CAN_IR_RF1L_MASK)
1999#define CAN_IR_HPM_MASK (0x100U)
2000#define CAN_IR_HPM_SHIFT (8U)
2001/*! HPM - High priority message.
2002 */
2003#define CAN_IR_HPM(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_HPM_SHIFT)) & CAN_IR_HPM_MASK)
2004#define CAN_IR_TC_MASK (0x200U)
2005#define CAN_IR_TC_SHIFT (9U)
2006/*! TC - Transmission completed.
2007 */
2008#define CAN_IR_TC(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TC_SHIFT)) & CAN_IR_TC_MASK)
2009#define CAN_IR_TCF_MASK (0x400U)
2010#define CAN_IR_TCF_SHIFT (10U)
2011/*! TCF - Transmission cancellation finished.
2012 */
2013#define CAN_IR_TCF(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TCF_SHIFT)) & CAN_IR_TCF_MASK)
2014#define CAN_IR_TFE_MASK (0x800U)
2015#define CAN_IR_TFE_SHIFT (11U)
2016/*! TFE - Tx FIFO empty.
2017 */
2018#define CAN_IR_TFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TFE_SHIFT)) & CAN_IR_TFE_MASK)
2019#define CAN_IR_TEFN_MASK (0x1000U)
2020#define CAN_IR_TEFN_SHIFT (12U)
2021/*! TEFN - Tx event FIFO new entry.
2022 */
2023#define CAN_IR_TEFN(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TEFN_SHIFT)) & CAN_IR_TEFN_MASK)
2024#define CAN_IR_TEFW_MASK (0x2000U)
2025#define CAN_IR_TEFW_SHIFT (13U)
2026/*! TEFW - Tx event FIFO watermark reached.
2027 */
2028#define CAN_IR_TEFW(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TEFW_SHIFT)) & CAN_IR_TEFW_MASK)
2029#define CAN_IR_TEFF_MASK (0x4000U)
2030#define CAN_IR_TEFF_SHIFT (14U)
2031/*! TEFF - Tx event FIFO full.
2032 */
2033#define CAN_IR_TEFF(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TEFF_SHIFT)) & CAN_IR_TEFF_MASK)
2034#define CAN_IR_TEFL_MASK (0x8000U)
2035#define CAN_IR_TEFL_SHIFT (15U)
2036/*! TEFL - Tx event FIFO element lost.
2037 */
2038#define CAN_IR_TEFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TEFL_SHIFT)) & CAN_IR_TEFL_MASK)
2039#define CAN_IR_TSW_MASK (0x10000U)
2040#define CAN_IR_TSW_SHIFT (16U)
2041/*! TSW - Timestamp wraparound.
2042 */
2043#define CAN_IR_TSW(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TSW_SHIFT)) & CAN_IR_TSW_MASK)
2044#define CAN_IR_MRAF_MASK (0x20000U)
2045#define CAN_IR_MRAF_SHIFT (17U)
2046/*! MRAF - Message RAM access failure.
2047 */
2048#define CAN_IR_MRAF(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_MRAF_SHIFT)) & CAN_IR_MRAF_MASK)
2049#define CAN_IR_TOO_MASK (0x40000U)
2050#define CAN_IR_TOO_SHIFT (18U)
2051/*! TOO - Timeout occurred.
2052 */
2053#define CAN_IR_TOO(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_TOO_SHIFT)) & CAN_IR_TOO_MASK)
2054#define CAN_IR_DRX_MASK (0x80000U)
2055#define CAN_IR_DRX_SHIFT (19U)
2056/*! DRX - Message stored in dedicated Rx buffer.
2057 */
2058#define CAN_IR_DRX(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_DRX_SHIFT)) & CAN_IR_DRX_MASK)
2059#define CAN_IR_BEC_MASK (0x100000U)
2060#define CAN_IR_BEC_SHIFT (20U)
2061/*! BEC - Bit error corrected.
2062 */
2063#define CAN_IR_BEC(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_BEC_SHIFT)) & CAN_IR_BEC_MASK)
2064#define CAN_IR_BEU_MASK (0x200000U)
2065#define CAN_IR_BEU_SHIFT (21U)
2066/*! BEU - Bit error uncorrected.
2067 */
2068#define CAN_IR_BEU(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_BEU_SHIFT)) & CAN_IR_BEU_MASK)
2069#define CAN_IR_ELO_MASK (0x400000U)
2070#define CAN_IR_ELO_SHIFT (22U)
2071/*! ELO - Error logging overflow.
2072 */
2073#define CAN_IR_ELO(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_ELO_SHIFT)) & CAN_IR_ELO_MASK)
2074#define CAN_IR_EP_MASK (0x800000U)
2075#define CAN_IR_EP_SHIFT (23U)
2076/*! EP - Error passive.
2077 */
2078#define CAN_IR_EP(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_EP_SHIFT)) & CAN_IR_EP_MASK)
2079#define CAN_IR_EW_MASK (0x1000000U)
2080#define CAN_IR_EW_SHIFT (24U)
2081/*! EW - Warning status.
2082 */
2083#define CAN_IR_EW(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_EW_SHIFT)) & CAN_IR_EW_MASK)
2084#define CAN_IR_BO_MASK (0x2000000U)
2085#define CAN_IR_BO_SHIFT (25U)
2086/*! BO - Bus_Off Status.
2087 */
2088#define CAN_IR_BO(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_BO_SHIFT)) & CAN_IR_BO_MASK)
2089#define CAN_IR_WDI_MASK (0x4000000U)
2090#define CAN_IR_WDI_SHIFT (26U)
2091/*! WDI - Watchdog interrupt.
2092 */
2093#define CAN_IR_WDI(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_WDI_SHIFT)) & CAN_IR_WDI_MASK)
2094#define CAN_IR_PEA_MASK (0x8000000U)
2095#define CAN_IR_PEA_SHIFT (27U)
2096/*! PEA - Protocol error in arbitration phase.
2097 */
2098#define CAN_IR_PEA(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_PEA_SHIFT)) & CAN_IR_PEA_MASK)
2099#define CAN_IR_PED_MASK (0x10000000U)
2100#define CAN_IR_PED_SHIFT (28U)
2101/*! PED - Protocol error in data phase.
2102 */
2103#define CAN_IR_PED(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_PED_SHIFT)) & CAN_IR_PED_MASK)
2104#define CAN_IR_ARA_MASK (0x20000000U)
2105#define CAN_IR_ARA_SHIFT (29U)
2106/*! ARA - Access to reserved address.
2107 */
2108#define CAN_IR_ARA(x) (((uint32_t)(((uint32_t)(x)) << CAN_IR_ARA_SHIFT)) & CAN_IR_ARA_MASK)
2109/*! @} */
2110
2111/*! @name IE - Interrupt Enable */
2112/*! @{ */
2113#define CAN_IE_RF0NE_MASK (0x1U)
2114#define CAN_IE_RF0NE_SHIFT (0U)
2115/*! RF0NE - Rx FIFO 0 new message interrupt enable.
2116 */
2117#define CAN_IE_RF0NE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF0NE_SHIFT)) & CAN_IE_RF0NE_MASK)
2118#define CAN_IE_RF0WE_MASK (0x2U)
2119#define CAN_IE_RF0WE_SHIFT (1U)
2120/*! RF0WE - Rx FIFO 0 watermark reached interrupt enable.
2121 */
2122#define CAN_IE_RF0WE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF0WE_SHIFT)) & CAN_IE_RF0WE_MASK)
2123#define CAN_IE_RF0FE_MASK (0x4U)
2124#define CAN_IE_RF0FE_SHIFT (2U)
2125/*! RF0FE - Rx FIFO 0 full interrupt enable.
2126 */
2127#define CAN_IE_RF0FE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF0FE_SHIFT)) & CAN_IE_RF0FE_MASK)
2128#define CAN_IE_RF0LE_MASK (0x8U)
2129#define CAN_IE_RF0LE_SHIFT (3U)
2130/*! RF0LE - Rx FIFO 0 message lost interrupt enable.
2131 */
2132#define CAN_IE_RF0LE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF0LE_SHIFT)) & CAN_IE_RF0LE_MASK)
2133#define CAN_IE_RF1NE_MASK (0x10U)
2134#define CAN_IE_RF1NE_SHIFT (4U)
2135/*! RF1NE - Rx FIFO 1 new message interrupt enable.
2136 */
2137#define CAN_IE_RF1NE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF1NE_SHIFT)) & CAN_IE_RF1NE_MASK)
2138#define CAN_IE_RF1WE_MASK (0x20U)
2139#define CAN_IE_RF1WE_SHIFT (5U)
2140/*! RF1WE - Rx FIFO 1 watermark reached interrupt enable.
2141 */
2142#define CAN_IE_RF1WE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF1WE_SHIFT)) & CAN_IE_RF1WE_MASK)
2143#define CAN_IE_RF1FE_MASK (0x40U)
2144#define CAN_IE_RF1FE_SHIFT (6U)
2145/*! RF1FE - Rx FIFO 1 full interrupt enable.
2146 */
2147#define CAN_IE_RF1FE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF1FE_SHIFT)) & CAN_IE_RF1FE_MASK)
2148#define CAN_IE_RF1LE_MASK (0x80U)
2149#define CAN_IE_RF1LE_SHIFT (7U)
2150/*! RF1LE - Rx FIFO 1 message lost interrupt enable.
2151 */
2152#define CAN_IE_RF1LE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_RF1LE_SHIFT)) & CAN_IE_RF1LE_MASK)
2153#define CAN_IE_HPME_MASK (0x100U)
2154#define CAN_IE_HPME_SHIFT (8U)
2155/*! HPME - High priority message interrupt enable.
2156 */
2157#define CAN_IE_HPME(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_HPME_SHIFT)) & CAN_IE_HPME_MASK)
2158#define CAN_IE_TCE_MASK (0x200U)
2159#define CAN_IE_TCE_SHIFT (9U)
2160/*! TCE - Transmission completed interrupt enable.
2161 */
2162#define CAN_IE_TCE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TCE_SHIFT)) & CAN_IE_TCE_MASK)
2163#define CAN_IE_TCFE_MASK (0x400U)
2164#define CAN_IE_TCFE_SHIFT (10U)
2165/*! TCFE - Transmission cancellation finished interrupt enable.
2166 */
2167#define CAN_IE_TCFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TCFE_SHIFT)) & CAN_IE_TCFE_MASK)
2168#define CAN_IE_TFEE_MASK (0x800U)
2169#define CAN_IE_TFEE_SHIFT (11U)
2170/*! TFEE - Tx FIFO empty interrupt enable.
2171 */
2172#define CAN_IE_TFEE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TFEE_SHIFT)) & CAN_IE_TFEE_MASK)
2173#define CAN_IE_TEFNE_MASK (0x1000U)
2174#define CAN_IE_TEFNE_SHIFT (12U)
2175/*! TEFNE - Tx event FIFO new entry interrupt enable.
2176 */
2177#define CAN_IE_TEFNE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TEFNE_SHIFT)) & CAN_IE_TEFNE_MASK)
2178#define CAN_IE_TEFWE_MASK (0x2000U)
2179#define CAN_IE_TEFWE_SHIFT (13U)
2180/*! TEFWE - Tx event FIFO watermark reached interrupt enable.
2181 */
2182#define CAN_IE_TEFWE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TEFWE_SHIFT)) & CAN_IE_TEFWE_MASK)
2183#define CAN_IE_TEFFE_MASK (0x4000U)
2184#define CAN_IE_TEFFE_SHIFT (14U)
2185/*! TEFFE - Tx event FIFO full interrupt enable.
2186 */
2187#define CAN_IE_TEFFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TEFFE_SHIFT)) & CAN_IE_TEFFE_MASK)
2188#define CAN_IE_TEFLE_MASK (0x8000U)
2189#define CAN_IE_TEFLE_SHIFT (15U)
2190/*! TEFLE - Tx event FIFO element lost interrupt enable.
2191 */
2192#define CAN_IE_TEFLE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TEFLE_SHIFT)) & CAN_IE_TEFLE_MASK)
2193#define CAN_IE_TSWE_MASK (0x10000U)
2194#define CAN_IE_TSWE_SHIFT (16U)
2195/*! TSWE - Timestamp wraparound interrupt enable.
2196 */
2197#define CAN_IE_TSWE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TSWE_SHIFT)) & CAN_IE_TSWE_MASK)
2198#define CAN_IE_MRAFE_MASK (0x20000U)
2199#define CAN_IE_MRAFE_SHIFT (17U)
2200/*! MRAFE - Message RAM access failure interrupt enable.
2201 */
2202#define CAN_IE_MRAFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_MRAFE_SHIFT)) & CAN_IE_MRAFE_MASK)
2203#define CAN_IE_TOOE_MASK (0x40000U)
2204#define CAN_IE_TOOE_SHIFT (18U)
2205/*! TOOE - Timeout occurred interrupt enable.
2206 */
2207#define CAN_IE_TOOE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_TOOE_SHIFT)) & CAN_IE_TOOE_MASK)
2208#define CAN_IE_DRXE_MASK (0x80000U)
2209#define CAN_IE_DRXE_SHIFT (19U)
2210/*! DRXE - Message stored in dedicated Rx buffer interrupt enable.
2211 */
2212#define CAN_IE_DRXE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_DRXE_SHIFT)) & CAN_IE_DRXE_MASK)
2213#define CAN_IE_BECE_MASK (0x100000U)
2214#define CAN_IE_BECE_SHIFT (20U)
2215/*! BECE - Bit error corrected interrupt enable.
2216 */
2217#define CAN_IE_BECE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_BECE_SHIFT)) & CAN_IE_BECE_MASK)
2218#define CAN_IE_BEUE_MASK (0x200000U)
2219#define CAN_IE_BEUE_SHIFT (21U)
2220/*! BEUE - Bit error uncorrected interrupt enable.
2221 */
2222#define CAN_IE_BEUE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_BEUE_SHIFT)) & CAN_IE_BEUE_MASK)
2223#define CAN_IE_ELOE_MASK (0x400000U)
2224#define CAN_IE_ELOE_SHIFT (22U)
2225/*! ELOE - Error logging overflow interrupt enable.
2226 */
2227#define CAN_IE_ELOE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_ELOE_SHIFT)) & CAN_IE_ELOE_MASK)
2228#define CAN_IE_EPE_MASK (0x800000U)
2229#define CAN_IE_EPE_SHIFT (23U)
2230/*! EPE - Error passive interrupt enable.
2231 */
2232#define CAN_IE_EPE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_EPE_SHIFT)) & CAN_IE_EPE_MASK)
2233#define CAN_IE_EWE_MASK (0x1000000U)
2234#define CAN_IE_EWE_SHIFT (24U)
2235/*! EWE - Warning status interrupt enable.
2236 */
2237#define CAN_IE_EWE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_EWE_SHIFT)) & CAN_IE_EWE_MASK)
2238#define CAN_IE_BOE_MASK (0x2000000U)
2239#define CAN_IE_BOE_SHIFT (25U)
2240/*! BOE - Bus_Off Status interrupt enable.
2241 */
2242#define CAN_IE_BOE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_BOE_SHIFT)) & CAN_IE_BOE_MASK)
2243#define CAN_IE_WDIE_MASK (0x4000000U)
2244#define CAN_IE_WDIE_SHIFT (26U)
2245/*! WDIE - Watchdog interrupt enable.
2246 */
2247#define CAN_IE_WDIE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_WDIE_SHIFT)) & CAN_IE_WDIE_MASK)
2248#define CAN_IE_PEAE_MASK (0x8000000U)
2249#define CAN_IE_PEAE_SHIFT (27U)
2250/*! PEAE - Protocol error in arbitration phase interrupt enable.
2251 */
2252#define CAN_IE_PEAE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_PEAE_SHIFT)) & CAN_IE_PEAE_MASK)
2253#define CAN_IE_PEDE_MASK (0x10000000U)
2254#define CAN_IE_PEDE_SHIFT (28U)
2255/*! PEDE - Protocol error in data phase interrupt enable.
2256 */
2257#define CAN_IE_PEDE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_PEDE_SHIFT)) & CAN_IE_PEDE_MASK)
2258#define CAN_IE_ARAE_MASK (0x20000000U)
2259#define CAN_IE_ARAE_SHIFT (29U)
2260/*! ARAE - Access to reserved address interrupt enable.
2261 */
2262#define CAN_IE_ARAE(x) (((uint32_t)(((uint32_t)(x)) << CAN_IE_ARAE_SHIFT)) & CAN_IE_ARAE_MASK)
2263/*! @} */
2264
2265/*! @name ILS - Interrupt Line Select */
2266/*! @{ */
2267#define CAN_ILS_RF0NL_MASK (0x1U)
2268#define CAN_ILS_RF0NL_SHIFT (0U)
2269/*! RF0NL - Rx FIFO 0 new message interrupt line.
2270 */
2271#define CAN_ILS_RF0NL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF0NL_SHIFT)) & CAN_ILS_RF0NL_MASK)
2272#define CAN_ILS_RF0WL_MASK (0x2U)
2273#define CAN_ILS_RF0WL_SHIFT (1U)
2274/*! RF0WL - Rx FIFO 0 watermark reached interrupt line.
2275 */
2276#define CAN_ILS_RF0WL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF0WL_SHIFT)) & CAN_ILS_RF0WL_MASK)
2277#define CAN_ILS_RF0FL_MASK (0x4U)
2278#define CAN_ILS_RF0FL_SHIFT (2U)
2279/*! RF0FL - Rx FIFO 0 full interrupt line.
2280 */
2281#define CAN_ILS_RF0FL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF0FL_SHIFT)) & CAN_ILS_RF0FL_MASK)
2282#define CAN_ILS_RF0LL_MASK (0x8U)
2283#define CAN_ILS_RF0LL_SHIFT (3U)
2284/*! RF0LL - Rx FIFO 0 message lost interrupt line.
2285 */
2286#define CAN_ILS_RF0LL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF0LL_SHIFT)) & CAN_ILS_RF0LL_MASK)
2287#define CAN_ILS_RF1NL_MASK (0x10U)
2288#define CAN_ILS_RF1NL_SHIFT (4U)
2289/*! RF1NL - Rx FIFO 1 new message interrupt line.
2290 */
2291#define CAN_ILS_RF1NL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF1NL_SHIFT)) & CAN_ILS_RF1NL_MASK)
2292#define CAN_ILS_RF1WL_MASK (0x20U)
2293#define CAN_ILS_RF1WL_SHIFT (5U)
2294/*! RF1WL - Rx FIFO 1 watermark reached interrupt line.
2295 */
2296#define CAN_ILS_RF1WL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF1WL_SHIFT)) & CAN_ILS_RF1WL_MASK)
2297#define CAN_ILS_RF1FL_MASK (0x40U)
2298#define CAN_ILS_RF1FL_SHIFT (6U)
2299/*! RF1FL - Rx FIFO 1 full interrupt line.
2300 */
2301#define CAN_ILS_RF1FL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF1FL_SHIFT)) & CAN_ILS_RF1FL_MASK)
2302#define CAN_ILS_RF1LL_MASK (0x80U)
2303#define CAN_ILS_RF1LL_SHIFT (7U)
2304/*! RF1LL - Rx FIFO 1 message lost interrupt line.
2305 */
2306#define CAN_ILS_RF1LL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_RF1LL_SHIFT)) & CAN_ILS_RF1LL_MASK)
2307#define CAN_ILS_HPML_MASK (0x100U)
2308#define CAN_ILS_HPML_SHIFT (8U)
2309/*! HPML - High priority message interrupt line.
2310 */
2311#define CAN_ILS_HPML(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_HPML_SHIFT)) & CAN_ILS_HPML_MASK)
2312#define CAN_ILS_TCL_MASK (0x200U)
2313#define CAN_ILS_TCL_SHIFT (9U)
2314/*! TCL - Transmission completed interrupt line.
2315 */
2316#define CAN_ILS_TCL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TCL_SHIFT)) & CAN_ILS_TCL_MASK)
2317#define CAN_ILS_TCFL_MASK (0x400U)
2318#define CAN_ILS_TCFL_SHIFT (10U)
2319/*! TCFL - Transmission cancellation finished interrupt line.
2320 */
2321#define CAN_ILS_TCFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TCFL_SHIFT)) & CAN_ILS_TCFL_MASK)
2322#define CAN_ILS_TFEL_MASK (0x800U)
2323#define CAN_ILS_TFEL_SHIFT (11U)
2324/*! TFEL - Tx FIFO empty interrupt line.
2325 */
2326#define CAN_ILS_TFEL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TFEL_SHIFT)) & CAN_ILS_TFEL_MASK)
2327#define CAN_ILS_TEFNL_MASK (0x1000U)
2328#define CAN_ILS_TEFNL_SHIFT (12U)
2329/*! TEFNL - Tx event FIFO new entry interrupt line.
2330 */
2331#define CAN_ILS_TEFNL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TEFNL_SHIFT)) & CAN_ILS_TEFNL_MASK)
2332#define CAN_ILS_TEFWL_MASK (0x2000U)
2333#define CAN_ILS_TEFWL_SHIFT (13U)
2334/*! TEFWL - Tx event FIFO watermark reached interrupt line.
2335 */
2336#define CAN_ILS_TEFWL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TEFWL_SHIFT)) & CAN_ILS_TEFWL_MASK)
2337#define CAN_ILS_TEFFL_MASK (0x4000U)
2338#define CAN_ILS_TEFFL_SHIFT (14U)
2339/*! TEFFL - Tx event FIFO full interrupt line.
2340 */
2341#define CAN_ILS_TEFFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TEFFL_SHIFT)) & CAN_ILS_TEFFL_MASK)
2342#define CAN_ILS_TEFLL_MASK (0x8000U)
2343#define CAN_ILS_TEFLL_SHIFT (15U)
2344/*! TEFLL - Tx event FIFO element lost interrupt line.
2345 */
2346#define CAN_ILS_TEFLL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TEFLL_SHIFT)) & CAN_ILS_TEFLL_MASK)
2347#define CAN_ILS_TSWL_MASK (0x10000U)
2348#define CAN_ILS_TSWL_SHIFT (16U)
2349/*! TSWL - Timestamp wraparound interrupt line.
2350 */
2351#define CAN_ILS_TSWL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TSWL_SHIFT)) & CAN_ILS_TSWL_MASK)
2352#define CAN_ILS_MRAFL_MASK (0x20000U)
2353#define CAN_ILS_MRAFL_SHIFT (17U)
2354/*! MRAFL - Message RAM access failure interrupt line.
2355 */
2356#define CAN_ILS_MRAFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_MRAFL_SHIFT)) & CAN_ILS_MRAFL_MASK)
2357#define CAN_ILS_TOOL_MASK (0x40000U)
2358#define CAN_ILS_TOOL_SHIFT (18U)
2359/*! TOOL - Timeout occurred interrupt line.
2360 */
2361#define CAN_ILS_TOOL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_TOOL_SHIFT)) & CAN_ILS_TOOL_MASK)
2362#define CAN_ILS_DRXL_MASK (0x80000U)
2363#define CAN_ILS_DRXL_SHIFT (19U)
2364/*! DRXL - Message stored in dedicated Rx buffer interrupt line.
2365 */
2366#define CAN_ILS_DRXL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_DRXL_SHIFT)) & CAN_ILS_DRXL_MASK)
2367#define CAN_ILS_BECL_MASK (0x100000U)
2368#define CAN_ILS_BECL_SHIFT (20U)
2369/*! BECL - Bit error corrected interrupt line.
2370 */
2371#define CAN_ILS_BECL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_BECL_SHIFT)) & CAN_ILS_BECL_MASK)
2372#define CAN_ILS_BEUL_MASK (0x200000U)
2373#define CAN_ILS_BEUL_SHIFT (21U)
2374/*! BEUL - Bit error uncorrected interrupt line.
2375 */
2376#define CAN_ILS_BEUL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_BEUL_SHIFT)) & CAN_ILS_BEUL_MASK)
2377#define CAN_ILS_ELOL_MASK (0x400000U)
2378#define CAN_ILS_ELOL_SHIFT (22U)
2379/*! ELOL - Error logging overflow interrupt line.
2380 */
2381#define CAN_ILS_ELOL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_ELOL_SHIFT)) & CAN_ILS_ELOL_MASK)
2382#define CAN_ILS_EPL_MASK (0x800000U)
2383#define CAN_ILS_EPL_SHIFT (23U)
2384/*! EPL - Error passive interrupt line.
2385 */
2386#define CAN_ILS_EPL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_EPL_SHIFT)) & CAN_ILS_EPL_MASK)
2387#define CAN_ILS_EWL_MASK (0x1000000U)
2388#define CAN_ILS_EWL_SHIFT (24U)
2389/*! EWL - Warning status interrupt line.
2390 */
2391#define CAN_ILS_EWL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_EWL_SHIFT)) & CAN_ILS_EWL_MASK)
2392#define CAN_ILS_BOL_MASK (0x2000000U)
2393#define CAN_ILS_BOL_SHIFT (25U)
2394/*! BOL - Bus_Off Status interrupt line.
2395 */
2396#define CAN_ILS_BOL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_BOL_SHIFT)) & CAN_ILS_BOL_MASK)
2397#define CAN_ILS_WDIL_MASK (0x4000000U)
2398#define CAN_ILS_WDIL_SHIFT (26U)
2399/*! WDIL - Watchdog interrupt line.
2400 */
2401#define CAN_ILS_WDIL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_WDIL_SHIFT)) & CAN_ILS_WDIL_MASK)
2402#define CAN_ILS_PEAL_MASK (0x8000000U)
2403#define CAN_ILS_PEAL_SHIFT (27U)
2404/*! PEAL - Protocol error in arbitration phase interrupt line.
2405 */
2406#define CAN_ILS_PEAL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_PEAL_SHIFT)) & CAN_ILS_PEAL_MASK)
2407#define CAN_ILS_PEDL_MASK (0x10000000U)
2408#define CAN_ILS_PEDL_SHIFT (28U)
2409/*! PEDL - Protocol error in data phase interrupt line.
2410 */
2411#define CAN_ILS_PEDL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_PEDL_SHIFT)) & CAN_ILS_PEDL_MASK)
2412#define CAN_ILS_ARAL_MASK (0x20000000U)
2413#define CAN_ILS_ARAL_SHIFT (29U)
2414/*! ARAL - Access to reserved address interrupt line.
2415 */
2416#define CAN_ILS_ARAL(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILS_ARAL_SHIFT)) & CAN_ILS_ARAL_MASK)
2417/*! @} */
2418
2419/*! @name ILE - Interrupt Line Enable */
2420/*! @{ */
2421#define CAN_ILE_EINT0_MASK (0x1U)
2422#define CAN_ILE_EINT0_SHIFT (0U)
2423/*! EINT0 - Enable interrupt line 0.
2424 */
2425#define CAN_ILE_EINT0(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILE_EINT0_SHIFT)) & CAN_ILE_EINT0_MASK)
2426#define CAN_ILE_EINT1_MASK (0x2U)
2427#define CAN_ILE_EINT1_SHIFT (1U)
2428/*! EINT1 - Enable interrupt line 1.
2429 */
2430#define CAN_ILE_EINT1(x) (((uint32_t)(((uint32_t)(x)) << CAN_ILE_EINT1_SHIFT)) & CAN_ILE_EINT1_MASK)
2431/*! @} */
2432
2433/*! @name GFC - Global Filter Configuration */
2434/*! @{ */
2435#define CAN_GFC_RRFE_MASK (0x1U)
2436#define CAN_GFC_RRFE_SHIFT (0U)
2437/*! RRFE - Reject remote frames extended.
2438 */
2439#define CAN_GFC_RRFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_GFC_RRFE_SHIFT)) & CAN_GFC_RRFE_MASK)
2440#define CAN_GFC_RRFS_MASK (0x2U)
2441#define CAN_GFC_RRFS_SHIFT (1U)
2442/*! RRFS - Reject remote frames standard.
2443 */
2444#define CAN_GFC_RRFS(x) (((uint32_t)(((uint32_t)(x)) << CAN_GFC_RRFS_SHIFT)) & CAN_GFC_RRFS_MASK)
2445#define CAN_GFC_ANFE_MASK (0xCU)
2446#define CAN_GFC_ANFE_SHIFT (2U)
2447/*! ANFE - Accept non-matching frames extended.
2448 */
2449#define CAN_GFC_ANFE(x) (((uint32_t)(((uint32_t)(x)) << CAN_GFC_ANFE_SHIFT)) & CAN_GFC_ANFE_MASK)
2450#define CAN_GFC_ANFS_MASK (0x30U)
2451#define CAN_GFC_ANFS_SHIFT (4U)
2452/*! ANFS - Accept non-matching frames standard.
2453 */
2454#define CAN_GFC_ANFS(x) (((uint32_t)(((uint32_t)(x)) << CAN_GFC_ANFS_SHIFT)) & CAN_GFC_ANFS_MASK)
2455/*! @} */
2456
2457/*! @name SIDFC - Standard ID Filter Configuration */
2458/*! @{ */
2459#define CAN_SIDFC_FLSSA_MASK (0xFFFCU)
2460#define CAN_SIDFC_FLSSA_SHIFT (2U)
2461/*! FLSSA - Filter list standard start address.
2462 */
2463#define CAN_SIDFC_FLSSA(x) (((uint32_t)(((uint32_t)(x)) << CAN_SIDFC_FLSSA_SHIFT)) & CAN_SIDFC_FLSSA_MASK)
2464#define CAN_SIDFC_LSS_MASK (0xFF0000U)
2465#define CAN_SIDFC_LSS_SHIFT (16U)
2466/*! LSS - List size standard 0 = No standard message ID filter.
2467 */
2468#define CAN_SIDFC_LSS(x) (((uint32_t)(((uint32_t)(x)) << CAN_SIDFC_LSS_SHIFT)) & CAN_SIDFC_LSS_MASK)
2469/*! @} */
2470
2471/*! @name XIDFC - Extended ID Filter Configuration */
2472/*! @{ */
2473#define CAN_XIDFC_FLESA_MASK (0xFFFCU)
2474#define CAN_XIDFC_FLESA_SHIFT (2U)
2475/*! FLESA - Filter list extended start address.
2476 */
2477#define CAN_XIDFC_FLESA(x) (((uint32_t)(((uint32_t)(x)) << CAN_XIDFC_FLESA_SHIFT)) & CAN_XIDFC_FLESA_MASK)
2478#define CAN_XIDFC_LSE_MASK (0xFF0000U)
2479#define CAN_XIDFC_LSE_SHIFT (16U)
2480/*! LSE - List size extended 0 = No extended message ID filter.
2481 */
2482#define CAN_XIDFC_LSE(x) (((uint32_t)(((uint32_t)(x)) << CAN_XIDFC_LSE_SHIFT)) & CAN_XIDFC_LSE_MASK)
2483/*! @} */
2484
2485/*! @name XIDAM - Extended ID AND Mask */
2486/*! @{ */
2487#define CAN_XIDAM_EIDM_MASK (0x1FFFFFFFU)
2488#define CAN_XIDAM_EIDM_SHIFT (0U)
2489/*! EIDM - Extended ID mask.
2490 */
2491#define CAN_XIDAM_EIDM(x) (((uint32_t)(((uint32_t)(x)) << CAN_XIDAM_EIDM_SHIFT)) & CAN_XIDAM_EIDM_MASK)
2492/*! @} */
2493
2494/*! @name HPMS - High Priority Message Status */
2495/*! @{ */
2496#define CAN_HPMS_BIDX_MASK (0x3FU)
2497#define CAN_HPMS_BIDX_SHIFT (0U)
2498/*! BIDX - Buffer index.
2499 */
2500#define CAN_HPMS_BIDX(x) (((uint32_t)(((uint32_t)(x)) << CAN_HPMS_BIDX_SHIFT)) & CAN_HPMS_BIDX_MASK)
2501#define CAN_HPMS_MSI_MASK (0xC0U)
2502#define CAN_HPMS_MSI_SHIFT (6U)
2503/*! MSI - Message storage indicator.
2504 */
2505#define CAN_HPMS_MSI(x) (((uint32_t)(((uint32_t)(x)) << CAN_HPMS_MSI_SHIFT)) & CAN_HPMS_MSI_MASK)
2506#define CAN_HPMS_FIDX_MASK (0x7F00U)
2507#define CAN_HPMS_FIDX_SHIFT (8U)
2508/*! FIDX - Filter index.
2509 */
2510#define CAN_HPMS_FIDX(x) (((uint32_t)(((uint32_t)(x)) << CAN_HPMS_FIDX_SHIFT)) & CAN_HPMS_FIDX_MASK)
2511#define CAN_HPMS_FLST_MASK (0x8000U)
2512#define CAN_HPMS_FLST_SHIFT (15U)
2513/*! FLST - Filter list.
2514 */
2515#define CAN_HPMS_FLST(x) (((uint32_t)(((uint32_t)(x)) << CAN_HPMS_FLST_SHIFT)) & CAN_HPMS_FLST_MASK)
2516/*! @} */
2517
2518/*! @name NDAT1 - New Data 1 */
2519/*! @{ */
2520#define CAN_NDAT1_ND_MASK (0xFFFFFFFFU)
2521#define CAN_NDAT1_ND_SHIFT (0U)
2522/*! ND - New Data.
2523 */
2524#define CAN_NDAT1_ND(x) (((uint32_t)(((uint32_t)(x)) << CAN_NDAT1_ND_SHIFT)) & CAN_NDAT1_ND_MASK)
2525/*! @} */
2526
2527/*! @name NDAT2 - New Data 2 */
2528/*! @{ */
2529#define CAN_NDAT2_ND_MASK (0xFFFFFFFFU)
2530#define CAN_NDAT2_ND_SHIFT (0U)
2531/*! ND - New Data.
2532 */
2533#define CAN_NDAT2_ND(x) (((uint32_t)(((uint32_t)(x)) << CAN_NDAT2_ND_SHIFT)) & CAN_NDAT2_ND_MASK)
2534/*! @} */
2535
2536/*! @name RXF0C - Rx FIFO 0 Configuration */
2537/*! @{ */
2538#define CAN_RXF0C_F0SA_MASK (0xFFFCU)
2539#define CAN_RXF0C_F0SA_SHIFT (2U)
2540/*! F0SA - Rx FIFO 0 start address.
2541 */
2542#define CAN_RXF0C_F0SA(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0C_F0SA_SHIFT)) & CAN_RXF0C_F0SA_MASK)
2543#define CAN_RXF0C_F0S_MASK (0x7F0000U)
2544#define CAN_RXF0C_F0S_SHIFT (16U)
2545/*! F0S - Rx FIFO 0 size.
2546 */
2547#define CAN_RXF0C_F0S(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0C_F0S_SHIFT)) & CAN_RXF0C_F0S_MASK)
2548#define CAN_RXF0C_F0WM_MASK (0x7F000000U)
2549#define CAN_RXF0C_F0WM_SHIFT (24U)
2550/*! F0WM - Rx FIFO 0 watermark 0 = Watermark interrupt disabled.
2551 */
2552#define CAN_RXF0C_F0WM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0C_F0WM_SHIFT)) & CAN_RXF0C_F0WM_MASK)
2553#define CAN_RXF0C_F0OM_MASK (0x80000000U)
2554#define CAN_RXF0C_F0OM_SHIFT (31U)
2555/*! F0OM - FIFO 0 operation mode.
2556 */
2557#define CAN_RXF0C_F0OM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0C_F0OM_SHIFT)) & CAN_RXF0C_F0OM_MASK)
2558/*! @} */
2559
2560/*! @name RXF0S - Rx FIFO 0 Status */
2561/*! @{ */
2562#define CAN_RXF0S_F0FL_MASK (0x7FU)
2563#define CAN_RXF0S_F0FL_SHIFT (0U)
2564/*! F0FL - Rx FIFO 0 fill level.
2565 */
2566#define CAN_RXF0S_F0FL(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0S_F0FL_SHIFT)) & CAN_RXF0S_F0FL_MASK)
2567#define CAN_RXF0S_F0GI_MASK (0x3F00U)
2568#define CAN_RXF0S_F0GI_SHIFT (8U)
2569/*! F0GI - Rx FIFO 0 get index.
2570 */
2571#define CAN_RXF0S_F0GI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0S_F0GI_SHIFT)) & CAN_RXF0S_F0GI_MASK)
2572#define CAN_RXF0S_F0PI_MASK (0x3F0000U)
2573#define CAN_RXF0S_F0PI_SHIFT (16U)
2574/*! F0PI - Rx FIFO 0 put index.
2575 */
2576#define CAN_RXF0S_F0PI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0S_F0PI_SHIFT)) & CAN_RXF0S_F0PI_MASK)
2577#define CAN_RXF0S_F0F_MASK (0x1000000U)
2578#define CAN_RXF0S_F0F_SHIFT (24U)
2579/*! F0F - Rx FIFO 0 full.
2580 */
2581#define CAN_RXF0S_F0F(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0S_F0F_SHIFT)) & CAN_RXF0S_F0F_MASK)
2582#define CAN_RXF0S_RF0L_MASK (0x2000000U)
2583#define CAN_RXF0S_RF0L_SHIFT (25U)
2584/*! RF0L - Rx FIFO 0 message lost.
2585 */
2586#define CAN_RXF0S_RF0L(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0S_RF0L_SHIFT)) & CAN_RXF0S_RF0L_MASK)
2587/*! @} */
2588
2589/*! @name RXF0A - Rx FIFO 0 Acknowledge */
2590/*! @{ */
2591#define CAN_RXF0A_F0AI_MASK (0x3FU)
2592#define CAN_RXF0A_F0AI_SHIFT (0U)
2593/*! F0AI - Rx FIFO 0 acknowledge index.
2594 */
2595#define CAN_RXF0A_F0AI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF0A_F0AI_SHIFT)) & CAN_RXF0A_F0AI_MASK)
2596/*! @} */
2597
2598/*! @name RXBC - Rx Buffer Configuration */
2599/*! @{ */
2600#define CAN_RXBC_RBSA_MASK (0xFFFCU)
2601#define CAN_RXBC_RBSA_SHIFT (2U)
2602/*! RBSA - Rx buffer start address.
2603 */
2604#define CAN_RXBC_RBSA(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXBC_RBSA_SHIFT)) & CAN_RXBC_RBSA_MASK)
2605/*! @} */
2606
2607/*! @name RXF1C - Rx FIFO 1 Configuration */
2608/*! @{ */
2609#define CAN_RXF1C_F1SA_MASK (0xFFFCU)
2610#define CAN_RXF1C_F1SA_SHIFT (2U)
2611/*! F1SA - Rx FIFO 1 start address.
2612 */
2613#define CAN_RXF1C_F1SA(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1C_F1SA_SHIFT)) & CAN_RXF1C_F1SA_MASK)
2614#define CAN_RXF1C_F1S_MASK (0x7F0000U)
2615#define CAN_RXF1C_F1S_SHIFT (16U)
2616/*! F1S - Rx FIFO 1 size 0 = No Rx FIFO 1.
2617 */
2618#define CAN_RXF1C_F1S(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1C_F1S_SHIFT)) & CAN_RXF1C_F1S_MASK)
2619#define CAN_RXF1C_F1WM_MASK (0x7F000000U)
2620#define CAN_RXF1C_F1WM_SHIFT (24U)
2621/*! F1WM - Rx FIFO 1 watermark 0 = Watermark interrupt disabled.
2622 */
2623#define CAN_RXF1C_F1WM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1C_F1WM_SHIFT)) & CAN_RXF1C_F1WM_MASK)
2624#define CAN_RXF1C_F1OM_MASK (0x80000000U)
2625#define CAN_RXF1C_F1OM_SHIFT (31U)
2626/*! F1OM - FIFO 1 operation mode.
2627 */
2628#define CAN_RXF1C_F1OM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1C_F1OM_SHIFT)) & CAN_RXF1C_F1OM_MASK)
2629/*! @} */
2630
2631/*! @name RXF1S - Rx FIFO 1 Status */
2632/*! @{ */
2633#define CAN_RXF1S_F1FL_MASK (0x7FU)
2634#define CAN_RXF1S_F1FL_SHIFT (0U)
2635/*! F1FL - Rx FIFO 1 fill level.
2636 */
2637#define CAN_RXF1S_F1FL(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1S_F1FL_SHIFT)) & CAN_RXF1S_F1FL_MASK)
2638#define CAN_RXF1S_F1GI_MASK (0x3F00U)
2639#define CAN_RXF1S_F1GI_SHIFT (8U)
2640/*! F1GI - Rx FIFO 1 get index.
2641 */
2642#define CAN_RXF1S_F1GI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1S_F1GI_SHIFT)) & CAN_RXF1S_F1GI_MASK)
2643#define CAN_RXF1S_F1PI_MASK (0x3F0000U)
2644#define CAN_RXF1S_F1PI_SHIFT (16U)
2645/*! F1PI - Rx FIFO 1 put index.
2646 */
2647#define CAN_RXF1S_F1PI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1S_F1PI_SHIFT)) & CAN_RXF1S_F1PI_MASK)
2648#define CAN_RXF1S_F1F_MASK (0x1000000U)
2649#define CAN_RXF1S_F1F_SHIFT (24U)
2650/*! F1F - Rx FIFO 1 full.
2651 */
2652#define CAN_RXF1S_F1F(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1S_F1F_SHIFT)) & CAN_RXF1S_F1F_MASK)
2653#define CAN_RXF1S_RF1L_MASK (0x2000000U)
2654#define CAN_RXF1S_RF1L_SHIFT (25U)
2655/*! RF1L - Rx FIFO 1 message lost.
2656 */
2657#define CAN_RXF1S_RF1L(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1S_RF1L_SHIFT)) & CAN_RXF1S_RF1L_MASK)
2658/*! @} */
2659
2660/*! @name RXF1A - Rx FIFO 1 Acknowledge */
2661/*! @{ */
2662#define CAN_RXF1A_F1AI_MASK (0x3FU)
2663#define CAN_RXF1A_F1AI_SHIFT (0U)
2664/*! F1AI - Rx FIFO 1 acknowledge index.
2665 */
2666#define CAN_RXF1A_F1AI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXF1A_F1AI_SHIFT)) & CAN_RXF1A_F1AI_MASK)
2667/*! @} */
2668
2669/*! @name RXESC - Rx Buffer and FIFO Element Size Configuration */
2670/*! @{ */
2671#define CAN_RXESC_F0DS_MASK (0x7U)
2672#define CAN_RXESC_F0DS_SHIFT (0U)
2673/*! F0DS - Rx FIFO 0 data field size.
2674 */
2675#define CAN_RXESC_F0DS(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXESC_F0DS_SHIFT)) & CAN_RXESC_F0DS_MASK)
2676#define CAN_RXESC_F1DS_MASK (0x70U)
2677#define CAN_RXESC_F1DS_SHIFT (4U)
2678/*! F1DS - Rx FIFO 1 data field size.
2679 */
2680#define CAN_RXESC_F1DS(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXESC_F1DS_SHIFT)) & CAN_RXESC_F1DS_MASK)
2681#define CAN_RXESC_RBDS_MASK (0x700U)
2682#define CAN_RXESC_RBDS_SHIFT (8U)
2683/*! RBDS - .
2684 */
2685#define CAN_RXESC_RBDS(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXESC_RBDS_SHIFT)) & CAN_RXESC_RBDS_MASK)
2686/*! @} */
2687
2688/*! @name TXBC - Tx Buffer Configuration */
2689/*! @{ */
2690#define CAN_TXBC_TBSA_MASK (0xFFFCU)
2691#define CAN_TXBC_TBSA_SHIFT (2U)
2692/*! TBSA - Tx buffers start address.
2693 */
2694#define CAN_TXBC_TBSA(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBC_TBSA_SHIFT)) & CAN_TXBC_TBSA_MASK)
2695#define CAN_TXBC_NDTB_MASK (0x3F0000U)
2696#define CAN_TXBC_NDTB_SHIFT (16U)
2697/*! NDTB - Number of dedicated transmit buffers 0 = No dedicated Tx buffers.
2698 */
2699#define CAN_TXBC_NDTB(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBC_NDTB_SHIFT)) & CAN_TXBC_NDTB_MASK)
2700#define CAN_TXBC_TFQS_MASK (0x3F000000U)
2701#define CAN_TXBC_TFQS_SHIFT (24U)
2702/*! TFQS - Transmit FIFO/queue size 0 = No tx FIFO/Queue.
2703 */
2704#define CAN_TXBC_TFQS(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBC_TFQS_SHIFT)) & CAN_TXBC_TFQS_MASK)
2705#define CAN_TXBC_TFQM_MASK (0x40000000U)
2706#define CAN_TXBC_TFQM_SHIFT (30U)
2707/*! TFQM - Tx FIFO/queue mode.
2708 */
2709#define CAN_TXBC_TFQM(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBC_TFQM_SHIFT)) & CAN_TXBC_TFQM_MASK)
2710/*! @} */
2711
2712/*! @name TXFQS - Tx FIFO/Queue Status */
2713/*! @{ */
2714#define CAN_TXFQS_TFGI_MASK (0x1F00U)
2715#define CAN_TXFQS_TFGI_SHIFT (8U)
2716/*! TFGI - Tx FIFO get index.
2717 */
2718#define CAN_TXFQS_TFGI(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXFQS_TFGI_SHIFT)) & CAN_TXFQS_TFGI_MASK)
2719#define CAN_TXFQS_TFQPI_MASK (0x1F0000U)
2720#define CAN_TXFQS_TFQPI_SHIFT (16U)
2721/*! TFQPI - Tx FIFO/queue put index.
2722 */
2723#define CAN_TXFQS_TFQPI(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXFQS_TFQPI_SHIFT)) & CAN_TXFQS_TFQPI_MASK)
2724#define CAN_TXFQS_TFQF_MASK (0x200000U)
2725#define CAN_TXFQS_TFQF_SHIFT (21U)
2726/*! TFQF - Tx FIFO/queue full.
2727 */
2728#define CAN_TXFQS_TFQF(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXFQS_TFQF_SHIFT)) & CAN_TXFQS_TFQF_MASK)
2729/*! @} */
2730
2731/*! @name TXESC - Tx Buffer Element Size Configuration */
2732/*! @{ */
2733#define CAN_TXESC_TBDS_MASK (0x7U)
2734#define CAN_TXESC_TBDS_SHIFT (0U)
2735/*! TBDS - Tx buffer data field size.
2736 */
2737#define CAN_TXESC_TBDS(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXESC_TBDS_SHIFT)) & CAN_TXESC_TBDS_MASK)
2738/*! @} */
2739
2740/*! @name TXBRP - Tx Buffer Request Pending */
2741/*! @{ */
2742#define CAN_TXBRP_TRP_MASK (0xFFFFFFFFU)
2743#define CAN_TXBRP_TRP_SHIFT (0U)
2744/*! TRP - Transmission request pending.
2745 */
2746#define CAN_TXBRP_TRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBRP_TRP_SHIFT)) & CAN_TXBRP_TRP_MASK)
2747/*! @} */
2748
2749/*! @name TXBAR - Tx Buffer Add Request */
2750/*! @{ */
2751#define CAN_TXBAR_AR_MASK (0xFFFFFFFFU)
2752#define CAN_TXBAR_AR_SHIFT (0U)
2753/*! AR - Add request.
2754 */
2755#define CAN_TXBAR_AR(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBAR_AR_SHIFT)) & CAN_TXBAR_AR_MASK)
2756/*! @} */
2757
2758/*! @name TXBCR - Tx Buffer Cancellation Request */
2759/*! @{ */
2760#define CAN_TXBCR_CR_MASK (0xFFFFFFFFU)
2761#define CAN_TXBCR_CR_SHIFT (0U)
2762/*! CR - Cancellation request.
2763 */
2764#define CAN_TXBCR_CR(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBCR_CR_SHIFT)) & CAN_TXBCR_CR_MASK)
2765/*! @} */
2766
2767/*! @name TXBTO - Tx Buffer Transmission Occurred */
2768/*! @{ */
2769#define CAN_TXBTO_TO_MASK (0xFFFFFFFFU)
2770#define CAN_TXBTO_TO_SHIFT (0U)
2771/*! TO - Transmission occurred.
2772 */
2773#define CAN_TXBTO_TO(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBTO_TO_SHIFT)) & CAN_TXBTO_TO_MASK)
2774/*! @} */
2775
2776/*! @name TXBCF - Tx Buffer Cancellation Finished */
2777/*! @{ */
2778#define CAN_TXBCF_TO_MASK (0xFFFFFFFFU)
2779#define CAN_TXBCF_TO_SHIFT (0U)
2780/*! TO - Cancellation finished.
2781 */
2782#define CAN_TXBCF_TO(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBCF_TO_SHIFT)) & CAN_TXBCF_TO_MASK)
2783/*! @} */
2784
2785/*! @name TXBTIE - Tx Buffer Transmission Interrupt Enable */
2786/*! @{ */
2787#define CAN_TXBTIE_TIE_MASK (0xFFFFFFFFU)
2788#define CAN_TXBTIE_TIE_SHIFT (0U)
2789/*! TIE - Transmission interrupt enable.
2790 */
2791#define CAN_TXBTIE_TIE(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBTIE_TIE_SHIFT)) & CAN_TXBTIE_TIE_MASK)
2792/*! @} */
2793
2794/*! @name TXBCIE - Tx Buffer Cancellation Finished Interrupt Enable */
2795/*! @{ */
2796#define CAN_TXBCIE_CFIE_MASK (0xFFFFFFFFU)
2797#define CAN_TXBCIE_CFIE_SHIFT (0U)
2798/*! CFIE - Cancellation finished interrupt enable.
2799 */
2800#define CAN_TXBCIE_CFIE(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXBCIE_CFIE_SHIFT)) & CAN_TXBCIE_CFIE_MASK)
2801/*! @} */
2802
2803/*! @name TXEFC - Tx Event FIFO Configuration */
2804/*! @{ */
2805#define CAN_TXEFC_EFSA_MASK (0xFFFCU)
2806#define CAN_TXEFC_EFSA_SHIFT (2U)
2807/*! EFSA - Event FIFO start address.
2808 */
2809#define CAN_TXEFC_EFSA(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFC_EFSA_SHIFT)) & CAN_TXEFC_EFSA_MASK)
2810#define CAN_TXEFC_EFS_MASK (0x3F0000U)
2811#define CAN_TXEFC_EFS_SHIFT (16U)
2812/*! EFS - Event FIFO size 0 = Tx event FIFO disabled.
2813 */
2814#define CAN_TXEFC_EFS(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFC_EFS_SHIFT)) & CAN_TXEFC_EFS_MASK)
2815#define CAN_TXEFC_EFWM_MASK (0x3F000000U)
2816#define CAN_TXEFC_EFWM_SHIFT (24U)
2817/*! EFWM - Event FIFO watermark 0 = Watermark interrupt disabled.
2818 */
2819#define CAN_TXEFC_EFWM(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFC_EFWM_SHIFT)) & CAN_TXEFC_EFWM_MASK)
2820/*! @} */
2821
2822/*! @name TXEFS - Tx Event FIFO Status */
2823/*! @{ */
2824#define CAN_TXEFS_EFFL_MASK (0x3FU)
2825#define CAN_TXEFS_EFFL_SHIFT (0U)
2826/*! EFFL - Event FIFO fill level.
2827 */
2828#define CAN_TXEFS_EFFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFS_EFFL_SHIFT)) & CAN_TXEFS_EFFL_MASK)
2829#define CAN_TXEFS_EFGI_MASK (0x1F00U)
2830#define CAN_TXEFS_EFGI_SHIFT (8U)
2831/*! EFGI - Event FIFO get index.
2832 */
2833#define CAN_TXEFS_EFGI(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFS_EFGI_SHIFT)) & CAN_TXEFS_EFGI_MASK)
2834#define CAN_TXEFS_EFPI_MASK (0x3F0000U)
2835#define CAN_TXEFS_EFPI_SHIFT (16U)
2836/*! EFPI - Event FIFO put index.
2837 */
2838#define CAN_TXEFS_EFPI(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFS_EFPI_SHIFT)) & CAN_TXEFS_EFPI_MASK)
2839#define CAN_TXEFS_EFF_MASK (0x1000000U)
2840#define CAN_TXEFS_EFF_SHIFT (24U)
2841/*! EFF - Event FIFO full.
2842 */
2843#define CAN_TXEFS_EFF(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFS_EFF_SHIFT)) & CAN_TXEFS_EFF_MASK)
2844#define CAN_TXEFS_TEFL_MASK (0x2000000U)
2845#define CAN_TXEFS_TEFL_SHIFT (25U)
2846/*! TEFL - Tx event FIFO element lost.
2847 */
2848#define CAN_TXEFS_TEFL(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFS_TEFL_SHIFT)) & CAN_TXEFS_TEFL_MASK)
2849/*! @} */
2850
2851/*! @name TXEFA - Tx Event FIFO Acknowledge */
2852/*! @{ */
2853#define CAN_TXEFA_EFAI_MASK (0x1FU)
2854#define CAN_TXEFA_EFAI_SHIFT (0U)
2855/*! EFAI - Event FIFO acknowledge index.
2856 */
2857#define CAN_TXEFA_EFAI(x) (((uint32_t)(((uint32_t)(x)) << CAN_TXEFA_EFAI_SHIFT)) & CAN_TXEFA_EFAI_MASK)
2858/*! @} */
2859
2860/*! @name MRBA - CAN Message RAM Base Address */
2861/*! @{ */
2862#define CAN_MRBA_BA_MASK (0xFFFF0000U)
2863#define CAN_MRBA_BA_SHIFT (16U)
2864/*! BA - Base address for the message RAM in the chip memory map.
2865 */
2866#define CAN_MRBA_BA(x) (((uint32_t)(((uint32_t)(x)) << CAN_MRBA_BA_SHIFT)) & CAN_MRBA_BA_MASK)
2867/*! @} */
2868
2869/*! @name ETSCC - External Timestamp Counter Configuration */
2870/*! @{ */
2871#define CAN_ETSCC_ETCP_MASK (0x7FFU)
2872#define CAN_ETSCC_ETCP_SHIFT (0U)
2873/*! ETCP - External timestamp prescaler value.
2874 */
2875#define CAN_ETSCC_ETCP(x) (((uint32_t)(((uint32_t)(x)) << CAN_ETSCC_ETCP_SHIFT)) & CAN_ETSCC_ETCP_MASK)
2876#define CAN_ETSCC_ETCE_MASK (0x80000000U)
2877#define CAN_ETSCC_ETCE_SHIFT (31U)
2878/*! ETCE - External timestamp counter enable.
2879 */
2880#define CAN_ETSCC_ETCE(x) (((uint32_t)(((uint32_t)(x)) << CAN_ETSCC_ETCE_SHIFT)) & CAN_ETSCC_ETCE_MASK)
2881/*! @} */
2882
2883/*! @name ETSCV - External Timestamp Counter Value */
2884/*! @{ */
2885#define CAN_ETSCV_ETSC_MASK (0xFFFFU)
2886#define CAN_ETSCV_ETSC_SHIFT (0U)
2887/*! ETSC - External timestamp counter.
2888 */
2889#define CAN_ETSCV_ETSC(x) (((uint32_t)(((uint32_t)(x)) << CAN_ETSCV_ETSC_SHIFT)) & CAN_ETSCV_ETSC_MASK)
2890/*! @} */
2891
2892
2893/*!
2894 * @}
2895 */ /* end of group CAN_Register_Masks */
2896
2897
2898/* CAN - Peripheral instance base addresses */
2899/** Peripheral CAN0 base address */
2900#define CAN0_BASE (0x4009D000u)
2901/** Peripheral CAN0 base pointer */
2902#define CAN0 ((CAN_Type *)CAN0_BASE)
2903/** Peripheral CAN1 base address */
2904#define CAN1_BASE (0x4009E000u)
2905/** Peripheral CAN1 base pointer */
2906#define CAN1 ((CAN_Type *)CAN1_BASE)
2907/** Array initializer of CAN peripheral base addresses */
2908#define CAN_BASE_ADDRS { CAN0_BASE, CAN1_BASE }
2909/** Array initializer of CAN peripheral base pointers */
2910#define CAN_BASE_PTRS { CAN0, CAN1 }
2911/** Interrupt vectors for the CAN peripheral type */
2912#define CAN_IRQS { { CAN0_IRQ0_IRQn, CAN0_IRQ1_IRQn }, { CAN1_IRQ0_IRQn, CAN1_IRQ1_IRQn } }
2913
2914/*!
2915 * @}
2916 */ /* end of group CAN_Peripheral_Access_Layer */
2917
2918
2919/* ----------------------------------------------------------------------------
2920 -- CRC Peripheral Access Layer
2921 ---------------------------------------------------------------------------- */
2922
2923/*!
2924 * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
2925 * @{
2926 */
2927
2928/** CRC - Register Layout Typedef */
2929typedef struct {
2930 __IO uint32_t MODE; /**< CRC mode register, offset: 0x0 */
2931 __IO uint32_t SEED; /**< CRC seed register, offset: 0x4 */
2932 union { /* offset: 0x8 */
2933 __I uint32_t SUM; /**< CRC checksum register, offset: 0x8 */
2934 __O uint32_t WR_DATA; /**< CRC data register, offset: 0x8 */
2935 };
2936} CRC_Type;
2937
2938/* ----------------------------------------------------------------------------
2939 -- CRC Register Masks
2940 ---------------------------------------------------------------------------- */
2941
2942/*!
2943 * @addtogroup CRC_Register_Masks CRC Register Masks
2944 * @{
2945 */
2946
2947/*! @name MODE - CRC mode register */
2948/*! @{ */
2949#define CRC_MODE_CRC_POLY_MASK (0x3U)
2950#define CRC_MODE_CRC_POLY_SHIFT (0U)
2951/*! CRC_POLY - CRC polynomial: 1X = CRC-32 polynomial 01 = CRC-16 polynomial 00 = CRC-CCITT polynomial
2952 */
2953#define CRC_MODE_CRC_POLY(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CRC_POLY_SHIFT)) & CRC_MODE_CRC_POLY_MASK)
2954#define CRC_MODE_BIT_RVS_WR_MASK (0x4U)
2955#define CRC_MODE_BIT_RVS_WR_SHIFT (2U)
2956/*! BIT_RVS_WR - Data bit order: 1 = Bit order reverse for CRC_WR_DATA (per byte) 0 = No bit order reverse for CRC_WR_DATA (per byte)
2957 */
2958#define CRC_MODE_BIT_RVS_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_WR_SHIFT)) & CRC_MODE_BIT_RVS_WR_MASK)
2959#define CRC_MODE_CMPL_WR_MASK (0x8U)
2960#define CRC_MODE_CMPL_WR_SHIFT (3U)
2961/*! CMPL_WR - Data complement: 1 = 1's complement for CRC_WR_DATA 0 = No 1's complement for CRC_WR_DATA
2962 */
2963#define CRC_MODE_CMPL_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_WR_SHIFT)) & CRC_MODE_CMPL_WR_MASK)
2964#define CRC_MODE_BIT_RVS_SUM_MASK (0x10U)
2965#define CRC_MODE_BIT_RVS_SUM_SHIFT (4U)
2966/*! BIT_RVS_SUM - CRC sum bit order: 1 = Bit order reverse for CRC_SUM 0 = No bit order reverse for CRC_SUM
2967 */
2968#define CRC_MODE_BIT_RVS_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_SUM_SHIFT)) & CRC_MODE_BIT_RVS_SUM_MASK)
2969#define CRC_MODE_CMPL_SUM_MASK (0x20U)
2970#define CRC_MODE_CMPL_SUM_SHIFT (5U)
2971/*! CMPL_SUM - CRC sum complement: 1 = 1's complement for CRC_SUM 0 = No 1's complement for CRC_SUM
2972 */
2973#define CRC_MODE_CMPL_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_SUM_SHIFT)) & CRC_MODE_CMPL_SUM_MASK)
2974/*! @} */
2975
2976/*! @name SEED - CRC seed register */
2977/*! @{ */
2978#define CRC_SEED_CRC_SEED_MASK (0xFFFFFFFFU)
2979#define CRC_SEED_CRC_SEED_SHIFT (0U)
2980/*! CRC_SEED - A write access to this register will load CRC seed value to CRC_SUM register with
2981 * selected bit order and 1's complement pre-processes. A write access to this register will
2982 * overrule the CRC calculation in progresses.
2983 */
2984#define CRC_SEED_CRC_SEED(x) (((uint32_t)(((uint32_t)(x)) << CRC_SEED_CRC_SEED_SHIFT)) & CRC_SEED_CRC_SEED_MASK)
2985/*! @} */
2986
2987/*! @name SUM - CRC checksum register */
2988/*! @{ */
2989#define CRC_SUM_CRC_SUM_MASK (0xFFFFFFFFU)
2990#define CRC_SUM_CRC_SUM_SHIFT (0U)
2991/*! CRC_SUM - The most recent CRC sum can be read through this register with selected bit order and 1's complement post-processes.
2992 */
2993#define CRC_SUM_CRC_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_SUM_CRC_SUM_SHIFT)) & CRC_SUM_CRC_SUM_MASK)
2994/*! @} */
2995
2996/*! @name WR_DATA - CRC data register */
2997/*! @{ */
2998#define CRC_WR_DATA_CRC_WR_DATA_MASK (0xFFFFFFFFU)
2999#define CRC_WR_DATA_CRC_WR_DATA_SHIFT (0U)
3000/*! CRC_WR_DATA - Data written to this register will be taken to perform CRC calculation with
3001 * selected bit order and 1's complement pre-process. Any write size 8, 16 or 32-bit are allowed and
3002 * accept back-to-back transactions.
3003 */
3004#define CRC_WR_DATA_CRC_WR_DATA(x) (((uint32_t)(((uint32_t)(x)) << CRC_WR_DATA_CRC_WR_DATA_SHIFT)) & CRC_WR_DATA_CRC_WR_DATA_MASK)
3005/*! @} */
3006
3007
3008/*!
3009 * @}
3010 */ /* end of group CRC_Register_Masks */
3011
3012
3013/* CRC - Peripheral instance base addresses */
3014/** Peripheral CRC_ENGINE base address */
3015#define CRC_ENGINE_BASE (0x40095000u)
3016/** Peripheral CRC_ENGINE base pointer */
3017#define CRC_ENGINE ((CRC_Type *)CRC_ENGINE_BASE)
3018/** Array initializer of CRC peripheral base addresses */
3019#define CRC_BASE_ADDRS { CRC_ENGINE_BASE }
3020/** Array initializer of CRC peripheral base pointers */
3021#define CRC_BASE_PTRS { CRC_ENGINE }
3022
3023/*!
3024 * @}
3025 */ /* end of group CRC_Peripheral_Access_Layer */
3026
3027
3028/* ----------------------------------------------------------------------------
3029 -- CTIMER Peripheral Access Layer
3030 ---------------------------------------------------------------------------- */
3031
3032/*!
3033 * @addtogroup CTIMER_Peripheral_Access_Layer CTIMER Peripheral Access Layer
3034 * @{
3035 */
3036
3037/** CTIMER - Register Layout Typedef */
3038typedef struct {
3039 __IO uint32_t IR; /**< Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending., offset: 0x0 */
3040 __IO uint32_t TCR; /**< Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR., offset: 0x4 */
3041 __IO uint32_t TC; /**< Timer Counter, offset: 0x8 */
3042 __IO uint32_t PR; /**< Prescale Register, offset: 0xC */
3043 __IO uint32_t PC; /**< Prescale Counter, offset: 0x10 */
3044 __IO uint32_t MCR; /**< Match Control Register, offset: 0x14 */
3045 __IO uint32_t MR[4]; /**< Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC., array offset: 0x18, array step: 0x4 */
3046 __IO uint32_t CCR; /**< Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place., offset: 0x28 */
3047 __I uint32_t CR[4]; /**< Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input., array offset: 0x2C, array step: 0x4 */
3048 __IO uint32_t EMR; /**< External Match Register. The EMR controls the match function and the external match pins., offset: 0x3C */
3049 uint8_t RESERVED_0[48];
3050 __IO uint32_t CTCR; /**< Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting., offset: 0x70 */
3051 __IO uint32_t PWMC; /**< PWM Control Register. The PWMCON enables PWM mode for the external match pins., offset: 0x74 */
3052 __IO uint32_t MSR[4]; /**< Match Shadow Register, array offset: 0x78, array step: 0x4 */
3053} CTIMER_Type;
3054
3055/* ----------------------------------------------------------------------------
3056 -- CTIMER Register Masks
3057 ---------------------------------------------------------------------------- */
3058
3059/*!
3060 * @addtogroup CTIMER_Register_Masks CTIMER Register Masks
3061 * @{
3062 */
3063
3064/*! @name IR - Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending. */
3065/*! @{ */
3066#define CTIMER_IR_MR0INT_MASK (0x1U)
3067#define CTIMER_IR_MR0INT_SHIFT (0U)
3068/*! MR0INT - Interrupt flag for match channel 0.
3069 */
3070#define CTIMER_IR_MR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR0INT_SHIFT)) & CTIMER_IR_MR0INT_MASK)
3071#define CTIMER_IR_MR1INT_MASK (0x2U)
3072#define CTIMER_IR_MR1INT_SHIFT (1U)
3073/*! MR1INT - Interrupt flag for match channel 1.
3074 */
3075#define CTIMER_IR_MR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR1INT_SHIFT)) & CTIMER_IR_MR1INT_MASK)
3076#define CTIMER_IR_MR2INT_MASK (0x4U)
3077#define CTIMER_IR_MR2INT_SHIFT (2U)
3078/*! MR2INT - Interrupt flag for match channel 2.
3079 */
3080#define CTIMER_IR_MR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR2INT_SHIFT)) & CTIMER_IR_MR2INT_MASK)
3081#define CTIMER_IR_MR3INT_MASK (0x8U)
3082#define CTIMER_IR_MR3INT_SHIFT (3U)
3083/*! MR3INT - Interrupt flag for match channel 3.
3084 */
3085#define CTIMER_IR_MR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR3INT_SHIFT)) & CTIMER_IR_MR3INT_MASK)
3086#define CTIMER_IR_CR0INT_MASK (0x10U)
3087#define CTIMER_IR_CR0INT_SHIFT (4U)
3088/*! CR0INT - Interrupt flag for capture channel 0 event.
3089 */
3090#define CTIMER_IR_CR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR0INT_SHIFT)) & CTIMER_IR_CR0INT_MASK)
3091#define CTIMER_IR_CR1INT_MASK (0x20U)
3092#define CTIMER_IR_CR1INT_SHIFT (5U)
3093/*! CR1INT - Interrupt flag for capture channel 1 event.
3094 */
3095#define CTIMER_IR_CR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR1INT_SHIFT)) & CTIMER_IR_CR1INT_MASK)
3096#define CTIMER_IR_CR2INT_MASK (0x40U)
3097#define CTIMER_IR_CR2INT_SHIFT (6U)
3098/*! CR2INT - Interrupt flag for capture channel 2 event.
3099 */
3100#define CTIMER_IR_CR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR2INT_SHIFT)) & CTIMER_IR_CR2INT_MASK)
3101#define CTIMER_IR_CR3INT_MASK (0x80U)
3102#define CTIMER_IR_CR3INT_SHIFT (7U)
3103/*! CR3INT - Interrupt flag for capture channel 3 event.
3104 */
3105#define CTIMER_IR_CR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR3INT_SHIFT)) & CTIMER_IR_CR3INT_MASK)
3106/*! @} */
3107
3108/*! @name TCR - Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR. */
3109/*! @{ */
3110#define CTIMER_TCR_CEN_MASK (0x1U)
3111#define CTIMER_TCR_CEN_SHIFT (0U)
3112/*! CEN - Counter enable.
3113 * 0b0..Disabled.The counters are disabled.
3114 * 0b1..Enabled. The Timer Counter and Prescale Counter are enabled.
3115 */
3116#define CTIMER_TCR_CEN(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CEN_SHIFT)) & CTIMER_TCR_CEN_MASK)
3117#define CTIMER_TCR_CRST_MASK (0x2U)
3118#define CTIMER_TCR_CRST_SHIFT (1U)
3119/*! CRST - Counter reset.
3120 * 0b0..Disabled. Do nothing.
3121 * 0b1..Enabled. The Timer Counter and the Prescale Counter are synchronously reset on the next positive edge of
3122 * the APB bus clock. The counters remain reset until TCR[1] is returned to zero.
3123 */
3124#define CTIMER_TCR_CRST(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CRST_SHIFT)) & CTIMER_TCR_CRST_MASK)
3125/*! @} */
3126
3127/*! @name TC - Timer Counter */
3128/*! @{ */
3129#define CTIMER_TC_TCVAL_MASK (0xFFFFFFFFU)
3130#define CTIMER_TC_TCVAL_SHIFT (0U)
3131/*! TCVAL - Timer counter value.
3132 */
3133#define CTIMER_TC_TCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TC_TCVAL_SHIFT)) & CTIMER_TC_TCVAL_MASK)
3134/*! @} */
3135
3136/*! @name PR - Prescale Register */
3137/*! @{ */
3138#define CTIMER_PR_PRVAL_MASK (0xFFFFFFFFU)
3139#define CTIMER_PR_PRVAL_SHIFT (0U)
3140/*! PRVAL - Prescale counter value.
3141 */
3142#define CTIMER_PR_PRVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PR_PRVAL_SHIFT)) & CTIMER_PR_PRVAL_MASK)
3143/*! @} */
3144
3145/*! @name PC - Prescale Counter */
3146/*! @{ */
3147#define CTIMER_PC_PCVAL_MASK (0xFFFFFFFFU)
3148#define CTIMER_PC_PCVAL_SHIFT (0U)
3149/*! PCVAL - Prescale counter value.
3150 */
3151#define CTIMER_PC_PCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PC_PCVAL_SHIFT)) & CTIMER_PC_PCVAL_MASK)
3152/*! @} */
3153
3154/*! @name MCR - Match Control Register */
3155/*! @{ */
3156#define CTIMER_MCR_MR0I_MASK (0x1U)
3157#define CTIMER_MCR_MR0I_SHIFT (0U)
3158/*! MR0I - Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC.
3159 */
3160#define CTIMER_MCR_MR0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0I_SHIFT)) & CTIMER_MCR_MR0I_MASK)
3161#define CTIMER_MCR_MR0R_MASK (0x2U)
3162#define CTIMER_MCR_MR0R_SHIFT (1U)
3163/*! MR0R - Reset on MR0: the TC will be reset if MR0 matches it.
3164 */
3165#define CTIMER_MCR_MR0R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0R_SHIFT)) & CTIMER_MCR_MR0R_MASK)
3166#define CTIMER_MCR_MR0S_MASK (0x4U)
3167#define CTIMER_MCR_MR0S_SHIFT (2U)
3168/*! MR0S - Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches the TC.
3169 */
3170#define CTIMER_MCR_MR0S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0S_SHIFT)) & CTIMER_MCR_MR0S_MASK)
3171#define CTIMER_MCR_MR1I_MASK (0x8U)
3172#define CTIMER_MCR_MR1I_SHIFT (3U)
3173/*! MR1I - Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC.
3174 */
3175#define CTIMER_MCR_MR1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1I_SHIFT)) & CTIMER_MCR_MR1I_MASK)
3176#define CTIMER_MCR_MR1R_MASK (0x10U)
3177#define CTIMER_MCR_MR1R_SHIFT (4U)
3178/*! MR1R - Reset on MR1: the TC will be reset if MR1 matches it.
3179 */
3180#define CTIMER_MCR_MR1R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1R_SHIFT)) & CTIMER_MCR_MR1R_MASK)
3181#define CTIMER_MCR_MR1S_MASK (0x20U)
3182#define CTIMER_MCR_MR1S_SHIFT (5U)
3183/*! MR1S - Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches the TC.
3184 */
3185#define CTIMER_MCR_MR1S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1S_SHIFT)) & CTIMER_MCR_MR1S_MASK)
3186#define CTIMER_MCR_MR2I_MASK (0x40U)
3187#define CTIMER_MCR_MR2I_SHIFT (6U)
3188/*! MR2I - Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC.
3189 */
3190#define CTIMER_MCR_MR2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2I_SHIFT)) & CTIMER_MCR_MR2I_MASK)
3191#define CTIMER_MCR_MR2R_MASK (0x80U)
3192#define CTIMER_MCR_MR2R_SHIFT (7U)
3193/*! MR2R - Reset on MR2: the TC will be reset if MR2 matches it.
3194 */
3195#define CTIMER_MCR_MR2R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2R_SHIFT)) & CTIMER_MCR_MR2R_MASK)
3196#define CTIMER_MCR_MR2S_MASK (0x100U)
3197#define CTIMER_MCR_MR2S_SHIFT (8U)
3198/*! MR2S - Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches the TC.
3199 */
3200#define CTIMER_MCR_MR2S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2S_SHIFT)) & CTIMER_MCR_MR2S_MASK)
3201#define CTIMER_MCR_MR3I_MASK (0x200U)
3202#define CTIMER_MCR_MR3I_SHIFT (9U)
3203/*! MR3I - Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC.
3204 */
3205#define CTIMER_MCR_MR3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3I_SHIFT)) & CTIMER_MCR_MR3I_MASK)
3206#define CTIMER_MCR_MR3R_MASK (0x400U)
3207#define CTIMER_MCR_MR3R_SHIFT (10U)
3208/*! MR3R - Reset on MR3: the TC will be reset if MR3 matches it.
3209 */
3210#define CTIMER_MCR_MR3R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3R_SHIFT)) & CTIMER_MCR_MR3R_MASK)
3211#define CTIMER_MCR_MR3S_MASK (0x800U)
3212#define CTIMER_MCR_MR3S_SHIFT (11U)
3213/*! MR3S - Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches the TC.
3214 */
3215#define CTIMER_MCR_MR3S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3S_SHIFT)) & CTIMER_MCR_MR3S_MASK)
3216#define CTIMER_MCR_MR0RL_MASK (0x1000000U)
3217#define CTIMER_MCR_MR0RL_SHIFT (24U)
3218/*! MR0RL - Reload MR0 with the contents of the Match 0 Shadow Register when the TC is reset to zero
3219 * (either via a match event or a write to bit 1 of the TCR).
3220 */
3221#define CTIMER_MCR_MR0RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0RL_SHIFT)) & CTIMER_MCR_MR0RL_MASK)
3222#define CTIMER_MCR_MR1RL_MASK (0x2000000U)
3223#define CTIMER_MCR_MR1RL_SHIFT (25U)
3224/*! MR1RL - Reload MR1 with the contents of the Match 1 Shadow Register when the TC is reset to zero
3225 * (either via a match event or a write to bit 1 of the TCR).
3226 */
3227#define CTIMER_MCR_MR1RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1RL_SHIFT)) & CTIMER_MCR_MR1RL_MASK)
3228#define CTIMER_MCR_MR2RL_MASK (0x4000000U)
3229#define CTIMER_MCR_MR2RL_SHIFT (26U)
3230/*! MR2RL - Reload MR2 with the contents of the Match 2 Shadow Register when the TC is reset to zero
3231 * (either via a match event or a write to bit 1 of the TCR).
3232 */
3233#define CTIMER_MCR_MR2RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2RL_SHIFT)) & CTIMER_MCR_MR2RL_MASK)
3234#define CTIMER_MCR_MR3RL_MASK (0x8000000U)
3235#define CTIMER_MCR_MR3RL_SHIFT (27U)
3236/*! MR3RL - Reload MR3 with the contents of the Match 3 Shadow Register when the TC is reset to zero
3237 * (either via a match event or a write to bit 1 of the TCR).
3238 */
3239#define CTIMER_MCR_MR3RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3RL_SHIFT)) & CTIMER_MCR_MR3RL_MASK)
3240/*! @} */
3241
3242/*! @name MR - Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC. */
3243/*! @{ */
3244#define CTIMER_MR_MATCH_MASK (0xFFFFFFFFU)
3245#define CTIMER_MR_MATCH_SHIFT (0U)
3246/*! MATCH - Timer counter match value.
3247 */
3248#define CTIMER_MR_MATCH(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MR_MATCH_SHIFT)) & CTIMER_MR_MATCH_MASK)
3249/*! @} */
3250
3251/* The count of CTIMER_MR */
3252#define CTIMER_MR_COUNT (4U)
3253
3254/*! @name CCR - Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place. */
3255/*! @{ */
3256#define CTIMER_CCR_CAP0RE_MASK (0x1U)
3257#define CTIMER_CCR_CAP0RE_SHIFT (0U)
3258/*! CAP0RE - Rising edge of capture channel 0: a sequence of 0 then 1 causes CR0 to be loaded with
3259 * the contents of TC. 0 = disabled. 1 = enabled.
3260 */
3261#define CTIMER_CCR_CAP0RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0RE_SHIFT)) & CTIMER_CCR_CAP0RE_MASK)
3262#define CTIMER_CCR_CAP0FE_MASK (0x2U)
3263#define CTIMER_CCR_CAP0FE_SHIFT (1U)
3264/*! CAP0FE - Falling edge of capture channel 0: a sequence of 1 then 0 causes CR0 to be loaded with
3265 * the contents of TC. 0 = disabled. 1 = enabled.
3266 */
3267#define CTIMER_CCR_CAP0FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0FE_SHIFT)) & CTIMER_CCR_CAP0FE_MASK)
3268#define CTIMER_CCR_CAP0I_MASK (0x4U)
3269#define CTIMER_CCR_CAP0I_SHIFT (2U)
3270/*! CAP0I - Generate interrupt on channel 0 capture event: a CR0 load generates an interrupt.
3271 */
3272#define CTIMER_CCR_CAP0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0I_SHIFT)) & CTIMER_CCR_CAP0I_MASK)
3273#define CTIMER_CCR_CAP1RE_MASK (0x8U)
3274#define CTIMER_CCR_CAP1RE_SHIFT (3U)
3275/*! CAP1RE - Rising edge of capture channel 1: a sequence of 0 then 1 causes CR1 to be loaded with
3276 * the contents of TC. 0 = disabled. 1 = enabled.
3277 */
3278#define CTIMER_CCR_CAP1RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1RE_SHIFT)) & CTIMER_CCR_CAP1RE_MASK)
3279#define CTIMER_CCR_CAP1FE_MASK (0x10U)
3280#define CTIMER_CCR_CAP1FE_SHIFT (4U)
3281/*! CAP1FE - Falling edge of capture channel 1: a sequence of 1 then 0 causes CR1 to be loaded with
3282 * the contents of TC. 0 = disabled. 1 = enabled.
3283 */
3284#define CTIMER_CCR_CAP1FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1FE_SHIFT)) & CTIMER_CCR_CAP1FE_MASK)
3285#define CTIMER_CCR_CAP1I_MASK (0x20U)
3286#define CTIMER_CCR_CAP1I_SHIFT (5U)
3287/*! CAP1I - Generate interrupt on channel 1 capture event: a CR1 load generates an interrupt.
3288 */
3289#define CTIMER_CCR_CAP1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1I_SHIFT)) & CTIMER_CCR_CAP1I_MASK)
3290#define CTIMER_CCR_CAP2RE_MASK (0x40U)
3291#define CTIMER_CCR_CAP2RE_SHIFT (6U)
3292/*! CAP2RE - Rising edge of capture channel 2: a sequence of 0 then 1 causes CR2 to be loaded with
3293 * the contents of TC. 0 = disabled. 1 = enabled.
3294 */
3295#define CTIMER_CCR_CAP2RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2RE_SHIFT)) & CTIMER_CCR_CAP2RE_MASK)
3296#define CTIMER_CCR_CAP2FE_MASK (0x80U)
3297#define CTIMER_CCR_CAP2FE_SHIFT (7U)
3298/*! CAP2FE - Falling edge of capture channel 2: a sequence of 1 then 0 causes CR2 to be loaded with
3299 * the contents of TC. 0 = disabled. 1 = enabled.
3300 */
3301#define CTIMER_CCR_CAP2FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2FE_SHIFT)) & CTIMER_CCR_CAP2FE_MASK)
3302#define CTIMER_CCR_CAP2I_MASK (0x100U)
3303#define CTIMER_CCR_CAP2I_SHIFT (8U)
3304/*! CAP2I - Generate interrupt on channel 2 capture event: a CR2 load generates an interrupt.
3305 */
3306#define CTIMER_CCR_CAP2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2I_SHIFT)) & CTIMER_CCR_CAP2I_MASK)
3307#define CTIMER_CCR_CAP3RE_MASK (0x200U)
3308#define CTIMER_CCR_CAP3RE_SHIFT (9U)
3309/*! CAP3RE - Rising edge of capture channel 3: a sequence of 0 then 1 causes CR3 to be loaded with
3310 * the contents of TC. 0 = disabled. 1 = enabled.
3311 */
3312#define CTIMER_CCR_CAP3RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3RE_SHIFT)) & CTIMER_CCR_CAP3RE_MASK)
3313#define CTIMER_CCR_CAP3FE_MASK (0x400U)
3314#define CTIMER_CCR_CAP3FE_SHIFT (10U)
3315/*! CAP3FE - Falling edge of capture channel 3: a sequence of 1 then 0 causes CR3 to be loaded with
3316 * the contents of TC. 0 = disabled. 1 = enabled.
3317 */
3318#define CTIMER_CCR_CAP3FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3FE_SHIFT)) & CTIMER_CCR_CAP3FE_MASK)
3319#define CTIMER_CCR_CAP3I_MASK (0x800U)
3320#define CTIMER_CCR_CAP3I_SHIFT (11U)
3321/*! CAP3I - Generate interrupt on channel 3 capture event: a CR3 load generates an interrupt.
3322 */
3323#define CTIMER_CCR_CAP3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3I_SHIFT)) & CTIMER_CCR_CAP3I_MASK)
3324/*! @} */
3325
3326/*! @name CR - Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input. */
3327/*! @{ */
3328#define CTIMER_CR_CAP_MASK (0xFFFFFFFFU)
3329#define CTIMER_CR_CAP_SHIFT (0U)
3330/*! CAP - Timer counter capture value.
3331 */
3332#define CTIMER_CR_CAP(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CR_CAP_SHIFT)) & CTIMER_CR_CAP_MASK)
3333/*! @} */
3334
3335/* The count of CTIMER_CR */
3336#define CTIMER_CR_COUNT (4U)
3337
3338/*! @name EMR - External Match Register. The EMR controls the match function and the external match pins. */
3339/*! @{ */
3340#define CTIMER_EMR_EM0_MASK (0x1U)
3341#define CTIMER_EMR_EM0_SHIFT (0U)
3342/*! EM0 - External Match 0. This bit reflects the state of output MAT0, whether or not this output
3343 * is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle,
3344 * go LOW, go HIGH, or do nothing, as selected by EMR[5:4]. This bit is driven to the MAT pins if
3345 * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
3346 */
3347#define CTIMER_EMR_EM0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM0_SHIFT)) & CTIMER_EMR_EM0_MASK)
3348#define CTIMER_EMR_EM1_MASK (0x2U)
3349#define CTIMER_EMR_EM1_SHIFT (1U)
3350/*! EM1 - External Match 1. This bit reflects the state of output MAT1, whether or not this output
3351 * is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle,
3352 * go LOW, go HIGH, or do nothing, as selected by EMR[7:6]. This bit is driven to the MAT pins if
3353 * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
3354 */
3355#define CTIMER_EMR_EM1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM1_SHIFT)) & CTIMER_EMR_EM1_MASK)
3356#define CTIMER_EMR_EM2_MASK (0x4U)
3357#define CTIMER_EMR_EM2_SHIFT (2U)
3358/*! EM2 - External Match 2. This bit reflects the state of output MAT2, whether or not this output
3359 * is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle,
3360 * go LOW, go HIGH, or do nothing, as selected by EMR[9:8]. This bit is driven to the MAT pins if
3361 * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
3362 */
3363#define CTIMER_EMR_EM2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM2_SHIFT)) & CTIMER_EMR_EM2_MASK)
3364#define CTIMER_EMR_EM3_MASK (0x8U)
3365#define CTIMER_EMR_EM3_SHIFT (3U)
3366/*! EM3 - External Match 3. This bit reflects the state of output MAT3, whether or not this output
3367 * is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle,
3368 * go LOW, go HIGH, or do nothing, as selected by MR[11:10]. This bit is driven to the MAT pins
3369 * if the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
3370 */
3371#define CTIMER_EMR_EM3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM3_SHIFT)) & CTIMER_EMR_EM3_MASK)
3372#define CTIMER_EMR_EMC0_MASK (0x30U)
3373#define CTIMER_EMR_EMC0_SHIFT (4U)
3374/*! EMC0 - External Match Control 0. Determines the functionality of External Match 0.
3375 * 0b00..Do Nothing.
3376 * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT0 pin is LOW if pinned out).
3377 * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT0 pin is HIGH if pinned out).
3378 * 0b11..Toggle. Toggle the corresponding External Match bit/output.
3379 */
3380#define CTIMER_EMR_EMC0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC0_SHIFT)) & CTIMER_EMR_EMC0_MASK)
3381#define CTIMER_EMR_EMC1_MASK (0xC0U)
3382#define CTIMER_EMR_EMC1_SHIFT (6U)
3383/*! EMC1 - External Match Control 1. Determines the functionality of External Match 1.
3384 * 0b00..Do Nothing.
3385 * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT1 pin is LOW if pinned out).
3386 * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT1 pin is HIGH if pinned out).
3387 * 0b11..Toggle. Toggle the corresponding External Match bit/output.
3388 */
3389#define CTIMER_EMR_EMC1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC1_SHIFT)) & CTIMER_EMR_EMC1_MASK)
3390#define CTIMER_EMR_EMC2_MASK (0x300U)
3391#define CTIMER_EMR_EMC2_SHIFT (8U)
3392/*! EMC2 - External Match Control 2. Determines the functionality of External Match 2.
3393 * 0b00..Do Nothing.
3394 * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT2 pin is LOW if pinned out).
3395 * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT2 pin is HIGH if pinned out).
3396 * 0b11..Toggle. Toggle the corresponding External Match bit/output.
3397 */
3398#define CTIMER_EMR_EMC2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC2_SHIFT)) & CTIMER_EMR_EMC2_MASK)
3399#define CTIMER_EMR_EMC3_MASK (0xC00U)
3400#define CTIMER_EMR_EMC3_SHIFT (10U)
3401/*! EMC3 - External Match Control 3. Determines the functionality of External Match 3.
3402 * 0b00..Do Nothing.
3403 * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT3 pin is LOW if pinned out).
3404 * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT3 pin is HIGH if pinned out).
3405 * 0b11..Toggle. Toggle the corresponding External Match bit/output.
3406 */
3407#define CTIMER_EMR_EMC3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC3_SHIFT)) & CTIMER_EMR_EMC3_MASK)
3408/*! @} */
3409
3410/*! @name CTCR - Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting. */
3411/*! @{ */
3412#define CTIMER_CTCR_CTMODE_MASK (0x3U)
3413#define CTIMER_CTCR_CTMODE_SHIFT (0U)
3414/*! CTMODE - Counter/Timer Mode This field selects which rising APB bus clock edges can increment
3415 * Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). Timer Mode: the TC
3416 * is incremented when the Prescale Counter matches the Prescale Register.
3417 * 0b00..Timer Mode. Incremented every rising APB bus clock edge.
3418 * 0b01..Counter Mode rising edge. TC is incremented on rising edges on the CAP input selected by bits 3:2.
3419 * 0b10..Counter Mode falling edge. TC is incremented on falling edges on the CAP input selected by bits 3:2.
3420 * 0b11..Counter Mode dual edge. TC is incremented on both edges on the CAP input selected by bits 3:2.
3421 */
3422#define CTIMER_CTCR_CTMODE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CTMODE_SHIFT)) & CTIMER_CTCR_CTMODE_MASK)
3423#define CTIMER_CTCR_CINSEL_MASK (0xCU)
3424#define CTIMER_CTCR_CINSEL_SHIFT (2U)
3425/*! CINSEL - Count Input Select When bits 1:0 in this register are not 00, these bits select which
3426 * CAP pin is sampled for clocking. Note: If Counter mode is selected for a particular CAPn input
3427 * in the CTCR, the 3 bits for that input in the Capture Control Register (CCR) must be
3428 * programmed as 000. However, capture and/or interrupt can be selected for the other 3 CAPn inputs in the
3429 * same timer.
3430 * 0b00..Channel 0. CAPn.0 for CTIMERn
3431 * 0b01..Channel 1. CAPn.1 for CTIMERn
3432 * 0b10..Channel 2. CAPn.2 for CTIMERn
3433 * 0b11..Channel 3. CAPn.3 for CTIMERn
3434 */
3435#define CTIMER_CTCR_CINSEL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CINSEL_SHIFT)) & CTIMER_CTCR_CINSEL_MASK)
3436#define CTIMER_CTCR_ENCC_MASK (0x10U)
3437#define CTIMER_CTCR_ENCC_SHIFT (4U)
3438/*! ENCC - Setting this bit to 1 enables clearing of the timer and the prescaler when the
3439 * capture-edge event specified in bits 7:5 occurs.
3440 */
3441#define CTIMER_CTCR_ENCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_ENCC_SHIFT)) & CTIMER_CTCR_ENCC_MASK)
3442#define CTIMER_CTCR_SELCC_MASK (0xE0U)
3443#define CTIMER_CTCR_SELCC_SHIFT (5U)
3444/*! SELCC - Edge select. When bit 4 is 1, these bits select which capture input edge will cause the
3445 * timer and prescaler to be cleared. These bits have no effect when bit 4 is low. Values 0x2 to
3446 * 0x3 and 0x6 to 0x7 are reserved.
3447 * 0b000..Channel 0 Rising Edge. Rising edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
3448 * 0b001..Channel 0 Falling Edge. Falling edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
3449 * 0b010..Channel 1 Rising Edge. Rising edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
3450 * 0b011..Channel 1 Falling Edge. Falling edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
3451 * 0b100..Channel 2 Rising Edge. Rising edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
3452 * 0b101..Channel 2 Falling Edge. Falling edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
3453 */
3454#define CTIMER_CTCR_SELCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_SELCC_SHIFT)) & CTIMER_CTCR_SELCC_MASK)
3455/*! @} */
3456
3457/*! @name PWMC - PWM Control Register. The PWMCON enables PWM mode for the external match pins. */
3458/*! @{ */
3459#define CTIMER_PWMC_PWMEN0_MASK (0x1U)
3460#define CTIMER_PWMC_PWMEN0_SHIFT (0U)
3461/*! PWMEN0 - PWM mode enable for channel0.
3462 * 0b0..Match. CTIMERn_MAT0 is controlled by EM0.
3463 * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT0.
3464 */
3465#define CTIMER_PWMC_PWMEN0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN0_SHIFT)) & CTIMER_PWMC_PWMEN0_MASK)
3466#define CTIMER_PWMC_PWMEN1_MASK (0x2U)
3467#define CTIMER_PWMC_PWMEN1_SHIFT (1U)
3468/*! PWMEN1 - PWM mode enable for channel1.
3469 * 0b0..Match. CTIMERn_MAT01 is controlled by EM1.
3470 * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT1.
3471 */
3472#define CTIMER_PWMC_PWMEN1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN1_SHIFT)) & CTIMER_PWMC_PWMEN1_MASK)
3473#define CTIMER_PWMC_PWMEN2_MASK (0x4U)
3474#define CTIMER_PWMC_PWMEN2_SHIFT (2U)
3475/*! PWMEN2 - PWM mode enable for channel2.
3476 * 0b0..Match. CTIMERn_MAT2 is controlled by EM2.
3477 * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT2.
3478 */
3479#define CTIMER_PWMC_PWMEN2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN2_SHIFT)) & CTIMER_PWMC_PWMEN2_MASK)
3480#define CTIMER_PWMC_PWMEN3_MASK (0x8U)
3481#define CTIMER_PWMC_PWMEN3_SHIFT (3U)
3482/*! PWMEN3 - PWM mode enable for channel3. Note: It is recommended to use match channel 3 to set the PWM cycle.
3483 * 0b0..Match. CTIMERn_MAT3 is controlled by EM3.
3484 * 0b1..PWM. PWM mode is enabled for CT132Bn_MAT3.
3485 */
3486#define CTIMER_PWMC_PWMEN3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN3_SHIFT)) & CTIMER_PWMC_PWMEN3_MASK)
3487/*! @} */
3488
3489/*! @name MSR - Match Shadow Register */
3490/*! @{ */
3491#define CTIMER_MSR_SHADOWW_MASK (0xFFFFFFFFU)
3492#define CTIMER_MSR_SHADOWW_SHIFT (0U)
3493/*! SHADOWW - Timer counter match shadow value.
3494 */
3495#define CTIMER_MSR_SHADOWW(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MSR_SHADOWW_SHIFT)) & CTIMER_MSR_SHADOWW_MASK)
3496/*! @} */
3497
3498/* The count of CTIMER_MSR */
3499#define CTIMER_MSR_COUNT (4U)
3500
3501
3502/*!
3503 * @}
3504 */ /* end of group CTIMER_Register_Masks */
3505
3506
3507/* CTIMER - Peripheral instance base addresses */
3508/** Peripheral CTIMER0 base address */
3509#define CTIMER0_BASE (0x40008000u)
3510/** Peripheral CTIMER0 base pointer */
3511#define CTIMER0 ((CTIMER_Type *)CTIMER0_BASE)
3512/** Peripheral CTIMER1 base address */
3513#define CTIMER1_BASE (0x40009000u)
3514/** Peripheral CTIMER1 base pointer */
3515#define CTIMER1 ((CTIMER_Type *)CTIMER1_BASE)
3516/** Peripheral CTIMER2 base address */
3517#define CTIMER2_BASE (0x40028000u)
3518/** Peripheral CTIMER2 base pointer */
3519#define CTIMER2 ((CTIMER_Type *)CTIMER2_BASE)
3520/** Peripheral CTIMER3 base address */
3521#define CTIMER3_BASE (0x40048000u)
3522/** Peripheral CTIMER3 base pointer */
3523#define CTIMER3 ((CTIMER_Type *)CTIMER3_BASE)
3524/** Peripheral CTIMER4 base address */
3525#define CTIMER4_BASE (0x40049000u)
3526/** Peripheral CTIMER4 base pointer */
3527#define CTIMER4 ((CTIMER_Type *)CTIMER4_BASE)
3528/** Array initializer of CTIMER peripheral base addresses */
3529#define CTIMER_BASE_ADDRS { CTIMER0_BASE, CTIMER1_BASE, CTIMER2_BASE, CTIMER3_BASE, CTIMER4_BASE }
3530/** Array initializer of CTIMER peripheral base pointers */
3531#define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, CTIMER2, CTIMER3, CTIMER4 }
3532/** Interrupt vectors for the CTIMER peripheral type */
3533#define CTIMER_IRQS { CTIMER0_IRQn, CTIMER1_IRQn, CTIMER2_IRQn, CTIMER3_IRQn, CTIMER4_IRQn }
3534
3535/*!
3536 * @}
3537 */ /* end of group CTIMER_Peripheral_Access_Layer */
3538
3539
3540/* ----------------------------------------------------------------------------
3541 -- DMA Peripheral Access Layer
3542 ---------------------------------------------------------------------------- */
3543
3544/*!
3545 * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
3546 * @{
3547 */
3548
3549/** DMA - Register Layout Typedef */
3550typedef struct {
3551 __IO uint32_t CTRL; /**< DMA control., offset: 0x0 */
3552 __I uint32_t INTSTAT; /**< Interrupt status., offset: 0x4 */
3553 __IO uint32_t SRAMBASE; /**< SRAM address of the channel configuration table., offset: 0x8 */
3554 uint8_t RESERVED_0[20];
3555 struct { /* offset: 0x20, array step: 0x5C */
3556 __IO uint32_t ENABLESET; /**< Channel Enable read and Set for all DMA channels., array offset: 0x20, array step: 0x5C */
3557 uint8_t RESERVED_0[4];
3558 __O uint32_t ENABLECLR; /**< Channel Enable Clear for all DMA channels., array offset: 0x28, array step: 0x5C */
3559 uint8_t RESERVED_1[4];
3560 __I uint32_t ACTIVE; /**< Channel Active status for all DMA channels., array offset: 0x30, array step: 0x5C */
3561 uint8_t RESERVED_2[4];
3562 __I uint32_t BUSY; /**< Channel Busy status for all DMA channels., array offset: 0x38, array step: 0x5C */
3563 uint8_t RESERVED_3[4];
3564 __IO uint32_t ERRINT; /**< Error Interrupt status for all DMA channels., array offset: 0x40, array step: 0x5C */
3565 uint8_t RESERVED_4[4];
3566 __IO uint32_t INTENSET; /**< Interrupt Enable read and Set for all DMA channels., array offset: 0x48, array step: 0x5C */
3567 uint8_t RESERVED_5[4];
3568 __O uint32_t INTENCLR; /**< Interrupt Enable Clear for all DMA channels., array offset: 0x50, array step: 0x5C */
3569 uint8_t RESERVED_6[4];
3570 __IO uint32_t INTA; /**< Interrupt A status for all DMA channels., array offset: 0x58, array step: 0x5C */
3571 uint8_t RESERVED_7[4];
3572 __IO uint32_t INTB; /**< Interrupt B status for all DMA channels., array offset: 0x60, array step: 0x5C */
3573 uint8_t RESERVED_8[4];
3574 __O uint32_t SETVALID; /**< Set ValidPending control bits for all DMA channels., array offset: 0x68, array step: 0x5C */
3575 uint8_t RESERVED_9[4];
3576 __O uint32_t SETTRIG; /**< Set Trigger control bits for all DMA channels., array offset: 0x70, array step: 0x5C */
3577 uint8_t RESERVED_10[4];
3578 __O uint32_t ABORT; /**< Channel Abort control for all DMA channels., array offset: 0x78, array step: 0x5C */
3579 } COMMON[1];
3580 uint8_t RESERVED_1[900];
3581 struct { /* offset: 0x400, array step: 0x10 */
3582 __IO uint32_t CFG; /**< Configuration register for DMA channel ., array offset: 0x400, array step: 0x10 */
3583 __I uint32_t CTLSTAT; /**< Control and status register for DMA channel ., array offset: 0x404, array step: 0x10 */
3584 __IO uint32_t XFERCFG; /**< Transfer configuration register for DMA channel ., array offset: 0x408, array step: 0x10 */
3585 uint8_t RESERVED_0[4];
3586 } CHANNEL[32];
3587} DMA_Type;
3588
3589/* ----------------------------------------------------------------------------
3590 -- DMA Register Masks
3591 ---------------------------------------------------------------------------- */
3592
3593/*!
3594 * @addtogroup DMA_Register_Masks DMA Register Masks
3595 * @{
3596 */
3597
3598/*! @name CTRL - DMA control. */
3599/*! @{ */
3600#define DMA_CTRL_ENABLE_MASK (0x1U)
3601#define DMA_CTRL_ENABLE_SHIFT (0U)
3602/*! ENABLE - DMA controller master enable.
3603 * 0b0..Disabled. The DMA controller is disabled. This clears any triggers that were asserted at the point when
3604 * disabled, but does not prevent re-triggering when the DMA controller is re-enabled.
3605 * 0b1..Enabled. The DMA controller is enabled.
3606 */
3607#define DMA_CTRL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CTRL_ENABLE_SHIFT)) & DMA_CTRL_ENABLE_MASK)
3608/*! @} */
3609
3610/*! @name INTSTAT - Interrupt status. */
3611/*! @{ */
3612#define DMA_INTSTAT_ACTIVEINT_MASK (0x2U)
3613#define DMA_INTSTAT_ACTIVEINT_SHIFT (1U)
3614/*! ACTIVEINT - Summarizes whether any enabled interrupts (other than error interrupts) are pending.
3615 * 0b0..Not pending. No enabled interrupts are pending.
3616 * 0b1..Pending. At least one enabled interrupt is pending.
3617 */
3618#define DMA_INTSTAT_ACTIVEINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEINT_SHIFT)) & DMA_INTSTAT_ACTIVEINT_MASK)
3619#define DMA_INTSTAT_ACTIVEERRINT_MASK (0x4U)
3620#define DMA_INTSTAT_ACTIVEERRINT_SHIFT (2U)
3621/*! ACTIVEERRINT - Summarizes whether any error interrupts are pending.
3622 * 0b0..Not pending. No error interrupts are pending.
3623 * 0b1..Pending. At least one error interrupt is pending.
3624 */
3625#define DMA_INTSTAT_ACTIVEERRINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEERRINT_SHIFT)) & DMA_INTSTAT_ACTIVEERRINT_MASK)
3626/*! @} */
3627
3628/*! @name SRAMBASE - SRAM address of the channel configuration table. */
3629/*! @{ */
3630#define DMA_SRAMBASE_OFFSET_MASK (0xFFFFFE00U)
3631#define DMA_SRAMBASE_OFFSET_SHIFT (9U)
3632/*! OFFSET - Address bits 31:9 of the beginning of the DMA descriptor table. For 18 channels, the
3633 * table must begin on a 512 byte boundary.
3634 */
3635#define DMA_SRAMBASE_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << DMA_SRAMBASE_OFFSET_SHIFT)) & DMA_SRAMBASE_OFFSET_MASK)
3636/*! @} */
3637
3638/*! @name COMMON_ENABLESET - Channel Enable read and Set for all DMA channels. */
3639/*! @{ */
3640#define DMA_COMMON_ENABLESET_ENA_MASK (0xFFFFFFFFU)
3641#define DMA_COMMON_ENABLESET_ENA_SHIFT (0U)
3642/*! ENA - Enable for DMA channels. Bit n enables or disables DMA channel n. The number of bits =
3643 * number of DMA channels in this device. Other bits are reserved. 0 = disabled. 1 = enabled.
3644 */
3645#define DMA_COMMON_ENABLESET_ENA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLESET_ENA_SHIFT)) & DMA_COMMON_ENABLESET_ENA_MASK)
3646/*! @} */
3647
3648/* The count of DMA_COMMON_ENABLESET */
3649#define DMA_COMMON_ENABLESET_COUNT (1U)
3650
3651/*! @name COMMON_ENABLECLR - Channel Enable Clear for all DMA channels. */
3652/*! @{ */
3653#define DMA_COMMON_ENABLECLR_CLR_MASK (0xFFFFFFFFU)
3654#define DMA_COMMON_ENABLECLR_CLR_SHIFT (0U)
3655/*! CLR - Writing ones to this register clears the corresponding bits in ENABLESET0. Bit n clears
3656 * the channel enable bit n. The number of bits = number of DMA channels in this device. Other bits
3657 * are reserved.
3658 */
3659#define DMA_COMMON_ENABLECLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLECLR_CLR_SHIFT)) & DMA_COMMON_ENABLECLR_CLR_MASK)
3660/*! @} */
3661
3662/* The count of DMA_COMMON_ENABLECLR */
3663#define DMA_COMMON_ENABLECLR_COUNT (1U)
3664
3665/*! @name COMMON_ACTIVE - Channel Active status for all DMA channels. */
3666/*! @{ */
3667#define DMA_COMMON_ACTIVE_ACT_MASK (0xFFFFFFFFU)
3668#define DMA_COMMON_ACTIVE_ACT_SHIFT (0U)
3669/*! ACT - Active flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
3670 * number of DMA channels in this device. Other bits are reserved. 0 = not active. 1 = active.
3671 */
3672#define DMA_COMMON_ACTIVE_ACT(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ACTIVE_ACT_SHIFT)) & DMA_COMMON_ACTIVE_ACT_MASK)
3673/*! @} */
3674
3675/* The count of DMA_COMMON_ACTIVE */
3676#define DMA_COMMON_ACTIVE_COUNT (1U)
3677
3678/*! @name COMMON_BUSY - Channel Busy status for all DMA channels. */
3679/*! @{ */
3680#define DMA_COMMON_BUSY_BSY_MASK (0xFFFFFFFFU)
3681#define DMA_COMMON_BUSY_BSY_SHIFT (0U)
3682/*! BSY - Busy flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
3683 * number of DMA channels in this device. Other bits are reserved. 0 = not busy. 1 = busy.
3684 */
3685#define DMA_COMMON_BUSY_BSY(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_BUSY_BSY_SHIFT)) & DMA_COMMON_BUSY_BSY_MASK)
3686/*! @} */
3687
3688/* The count of DMA_COMMON_BUSY */
3689#define DMA_COMMON_BUSY_COUNT (1U)
3690
3691/*! @name COMMON_ERRINT - Error Interrupt status for all DMA channels. */
3692/*! @{ */
3693#define DMA_COMMON_ERRINT_ERR_MASK (0xFFFFFFFFU)
3694#define DMA_COMMON_ERRINT_ERR_SHIFT (0U)
3695/*! ERR - Error Interrupt flag for DMA channel n. Bit n corresponds to DMA channel n. The number of
3696 * bits = number of DMA channels in this device. Other bits are reserved. 0 = error interrupt is
3697 * not active. 1 = error interrupt is active.
3698 */
3699#define DMA_COMMON_ERRINT_ERR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ERRINT_ERR_SHIFT)) & DMA_COMMON_ERRINT_ERR_MASK)
3700/*! @} */
3701
3702/* The count of DMA_COMMON_ERRINT */
3703#define DMA_COMMON_ERRINT_COUNT (1U)
3704
3705/*! @name COMMON_INTENSET - Interrupt Enable read and Set for all DMA channels. */
3706/*! @{ */
3707#define DMA_COMMON_INTENSET_INTEN_MASK (0xFFFFFFFFU)
3708#define DMA_COMMON_INTENSET_INTEN_SHIFT (0U)
3709/*! INTEN - Interrupt Enable read and set for DMA channel n. Bit n corresponds to DMA channel n. The
3710 * number of bits = number of DMA channels in this device. Other bits are reserved. 0 =
3711 * interrupt for DMA channel is disabled. 1 = interrupt for DMA channel is enabled.
3712 */
3713#define DMA_COMMON_INTENSET_INTEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENSET_INTEN_SHIFT)) & DMA_COMMON_INTENSET_INTEN_MASK)
3714/*! @} */
3715
3716/* The count of DMA_COMMON_INTENSET */
3717#define DMA_COMMON_INTENSET_COUNT (1U)
3718
3719/*! @name COMMON_INTENCLR - Interrupt Enable Clear for all DMA channels. */
3720/*! @{ */
3721#define DMA_COMMON_INTENCLR_CLR_MASK (0xFFFFFFFFU)
3722#define DMA_COMMON_INTENCLR_CLR_SHIFT (0U)
3723/*! CLR - Writing ones to this register clears corresponding bits in the INTENSET0. Bit n
3724 * corresponds to DMA channel n. The number of bits = number of DMA channels in this device. Other bits are
3725 * reserved.
3726 */
3727#define DMA_COMMON_INTENCLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENCLR_CLR_SHIFT)) & DMA_COMMON_INTENCLR_CLR_MASK)
3728/*! @} */
3729
3730/* The count of DMA_COMMON_INTENCLR */
3731#define DMA_COMMON_INTENCLR_COUNT (1U)
3732
3733/*! @name COMMON_INTA - Interrupt A status for all DMA channels. */
3734/*! @{ */
3735#define DMA_COMMON_INTA_IA_MASK (0xFFFFFFFFU)
3736#define DMA_COMMON_INTA_IA_SHIFT (0U)
3737/*! IA - Interrupt A status for DMA channel n. Bit n corresponds to DMA channel n. The number of
3738 * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
3739 * interrupt A is not active. 1 = the DMA channel interrupt A is active.
3740 */
3741#define DMA_COMMON_INTA_IA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTA_IA_SHIFT)) & DMA_COMMON_INTA_IA_MASK)
3742/*! @} */
3743
3744/* The count of DMA_COMMON_INTA */
3745#define DMA_COMMON_INTA_COUNT (1U)
3746
3747/*! @name COMMON_INTB - Interrupt B status for all DMA channels. */
3748/*! @{ */
3749#define DMA_COMMON_INTB_IB_MASK (0xFFFFFFFFU)
3750#define DMA_COMMON_INTB_IB_SHIFT (0U)
3751/*! IB - Interrupt B status for DMA channel n. Bit n corresponds to DMA channel n. The number of
3752 * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
3753 * interrupt B is not active. 1 = the DMA channel interrupt B is active.
3754 */
3755#define DMA_COMMON_INTB_IB(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTB_IB_SHIFT)) & DMA_COMMON_INTB_IB_MASK)
3756/*! @} */
3757
3758/* The count of DMA_COMMON_INTB */
3759#define DMA_COMMON_INTB_COUNT (1U)
3760
3761/*! @name COMMON_SETVALID - Set ValidPending control bits for all DMA channels. */
3762/*! @{ */
3763#define DMA_COMMON_SETVALID_SV_MASK (0xFFFFFFFFU)
3764#define DMA_COMMON_SETVALID_SV_SHIFT (0U)
3765/*! SV - SETVALID control for DMA channel n. Bit n corresponds to DMA channel n. The number of bits
3766 * = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 = sets the
3767 * VALIDPENDING control bit for DMA channel n
3768 */
3769#define DMA_COMMON_SETVALID_SV(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETVALID_SV_SHIFT)) & DMA_COMMON_SETVALID_SV_MASK)
3770/*! @} */
3771
3772/* The count of DMA_COMMON_SETVALID */
3773#define DMA_COMMON_SETVALID_COUNT (1U)
3774
3775/*! @name COMMON_SETTRIG - Set Trigger control bits for all DMA channels. */
3776/*! @{ */
3777#define DMA_COMMON_SETTRIG_TRIG_MASK (0xFFFFFFFFU)
3778#define DMA_COMMON_SETTRIG_TRIG_SHIFT (0U)
3779/*! TRIG - Set Trigger control bit for DMA channel 0. Bit n corresponds to DMA channel n. The number
3780 * of bits = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 =
3781 * sets the TRIG bit for DMA channel n.
3782 */
3783#define DMA_COMMON_SETTRIG_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETTRIG_TRIG_SHIFT)) & DMA_COMMON_SETTRIG_TRIG_MASK)
3784/*! @} */
3785
3786/* The count of DMA_COMMON_SETTRIG */
3787#define DMA_COMMON_SETTRIG_COUNT (1U)
3788
3789/*! @name COMMON_ABORT - Channel Abort control for all DMA channels. */
3790/*! @{ */
3791#define DMA_COMMON_ABORT_ABORTCTRL_MASK (0xFFFFFFFFU)
3792#define DMA_COMMON_ABORT_ABORTCTRL_SHIFT (0U)
3793/*! ABORTCTRL - Abort control for DMA channel 0. Bit n corresponds to DMA channel n. 0 = no effect.
3794 * 1 = aborts DMA operations on channel n.
3795 */
3796#define DMA_COMMON_ABORT_ABORTCTRL(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ABORT_ABORTCTRL_SHIFT)) & DMA_COMMON_ABORT_ABORTCTRL_MASK)
3797/*! @} */
3798
3799/* The count of DMA_COMMON_ABORT */
3800#define DMA_COMMON_ABORT_COUNT (1U)
3801
3802/*! @name CHANNEL_CFG - Configuration register for DMA channel . */
3803/*! @{ */
3804#define DMA_CHANNEL_CFG_PERIPHREQEN_MASK (0x1U)
3805#define DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT (0U)
3806/*! PERIPHREQEN - Peripheral request Enable. If a DMA channel is used to perform a memory-to-memory
3807 * move, any peripheral DMA request associated with that channel can be disabled to prevent any
3808 * interaction between the peripheral and the DMA controller.
3809 * 0b0..Disabled. Peripheral DMA requests are disabled.
3810 * 0b1..Enabled. Peripheral DMA requests are enabled.
3811 */
3812#define DMA_CHANNEL_CFG_PERIPHREQEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT)) & DMA_CHANNEL_CFG_PERIPHREQEN_MASK)
3813#define DMA_CHANNEL_CFG_HWTRIGEN_MASK (0x2U)
3814#define DMA_CHANNEL_CFG_HWTRIGEN_SHIFT (1U)
3815/*! HWTRIGEN - Hardware Triggering Enable for this channel.
3816 * 0b0..Disabled. Hardware triggering is not used.
3817 * 0b1..Enabled. Use hardware triggering.
3818 */
3819#define DMA_CHANNEL_CFG_HWTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_HWTRIGEN_SHIFT)) & DMA_CHANNEL_CFG_HWTRIGEN_MASK)
3820#define DMA_CHANNEL_CFG_TRIGPOL_MASK (0x10U)
3821#define DMA_CHANNEL_CFG_TRIGPOL_SHIFT (4U)
3822/*! TRIGPOL - Trigger Polarity. Selects the polarity of a hardware trigger for this channel.
3823 * 0b0..Active low - falling edge. Hardware trigger is active low or falling edge triggered, based on TRIGTYPE.
3824 * 0b1..Active high - rising edge. Hardware trigger is active high or rising edge triggered, based on TRIGTYPE.
3825 */
3826#define DMA_CHANNEL_CFG_TRIGPOL(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGPOL_SHIFT)) & DMA_CHANNEL_CFG_TRIGPOL_MASK)
3827#define DMA_CHANNEL_CFG_TRIGTYPE_MASK (0x20U)
3828#define DMA_CHANNEL_CFG_TRIGTYPE_SHIFT (5U)
3829/*! TRIGTYPE - Trigger Type. Selects hardware trigger as edge triggered or level triggered.
3830 * 0b0..Edge. Hardware trigger is edge triggered. Transfers will be initiated and completed, as specified for a single trigger.
3831 * 0b1..Level. Hardware trigger is level triggered. Note that when level triggering without burst (BURSTPOWER =
3832 * 0) is selected, only hardware triggers should be used on that channel. Transfers continue as long as the
3833 * trigger level is asserted. Once the trigger is de-asserted, the transfer will be paused until the trigger
3834 * is, again, asserted. However, the transfer will not be paused until any remaining transfers within the
3835 * current BURSTPOWER length are completed.
3836 */
3837#define DMA_CHANNEL_CFG_TRIGTYPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGTYPE_SHIFT)) & DMA_CHANNEL_CFG_TRIGTYPE_MASK)
3838#define DMA_CHANNEL_CFG_TRIGBURST_MASK (0x40U)
3839#define DMA_CHANNEL_CFG_TRIGBURST_SHIFT (6U)
3840/*! TRIGBURST - Trigger Burst. Selects whether hardware triggers cause a single or burst transfer.
3841 * 0b0..Single transfer. Hardware trigger causes a single transfer.
3842 * 0b1..Burst transfer. When the trigger for this channel is set to edge triggered, a hardware trigger causes a
3843 * burst transfer, as defined by BURSTPOWER. When the trigger for this channel is set to level triggered, a
3844 * hardware trigger causes transfers to continue as long as the trigger is asserted, unless the transfer is
3845 * complete.
3846 */
3847#define DMA_CHANNEL_CFG_TRIGBURST(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGBURST_SHIFT)) & DMA_CHANNEL_CFG_TRIGBURST_MASK)
3848#define DMA_CHANNEL_CFG_BURSTPOWER_MASK (0xF00U)
3849#define DMA_CHANNEL_CFG_BURSTPOWER_SHIFT (8U)
3850/*! BURSTPOWER - Burst Power is used in two ways. It always selects the address wrap size when
3851 * SRCBURSTWRAP and/or DSTBURSTWRAP modes are selected (see descriptions elsewhere in this register).
3852 * When the TRIGBURST field elsewhere in this register = 1, Burst Power selects how many
3853 * transfers are performed for each DMA trigger. This can be used, for example, with peripherals that
3854 * contain a FIFO that can initiate a DMA operation when the FIFO reaches a certain level. 0000:
3855 * Burst size = 1 (20). 0001: Burst size = 2 (21). 0010: Burst size = 4 (22). 1010: Burst size =
3856 * 1024 (210). This corresponds to the maximum supported transfer count. others: not supported. The
3857 * total transfer length as defined in the XFERCOUNT bits in the XFERCFG register must be an even
3858 * multiple of the burst size.
3859 */
3860#define DMA_CHANNEL_CFG_BURSTPOWER(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_BURSTPOWER_SHIFT)) & DMA_CHANNEL_CFG_BURSTPOWER_MASK)
3861#define DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK (0x4000U)
3862#define DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT (14U)
3863/*! SRCBURSTWRAP - Source Burst Wrap. When enabled, the source data address for the DMA is
3864 * 'wrapped', meaning that the source address range for each burst will be the same. As an example, this
3865 * could be used to read several sequential registers from a peripheral for each DMA burst,
3866 * reading the same registers again for each burst.
3867 * 0b0..Disabled. Source burst wrapping is not enabled for this DMA channel.
3868 * 0b1..Enabled. Source burst wrapping is enabled for this DMA channel.
3869 */
3870#define DMA_CHANNEL_CFG_SRCBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK)
3871#define DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK (0x8000U)
3872#define DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT (15U)
3873/*! DSTBURSTWRAP - Destination Burst Wrap. When enabled, the destination data address for the DMA is
3874 * 'wrapped', meaning that the destination address range for each burst will be the same. As an
3875 * example, this could be used to write several sequential registers to a peripheral for each DMA
3876 * burst, writing the same registers again for each burst.
3877 * 0b0..Disabled. Destination burst wrapping is not enabled for this DMA channel.
3878 * 0b1..Enabled. Destination burst wrapping is enabled for this DMA channel.
3879 */
3880#define DMA_CHANNEL_CFG_DSTBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK)
3881#define DMA_CHANNEL_CFG_CHPRIORITY_MASK (0x70000U)
3882#define DMA_CHANNEL_CFG_CHPRIORITY_SHIFT (16U)
3883/*! CHPRIORITY - Priority of this channel when multiple DMA requests are pending. Eight priority
3884 * levels are supported: 0x0 = highest priority. 0x7 = lowest priority.
3885 */
3886#define DMA_CHANNEL_CFG_CHPRIORITY(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_CHPRIORITY_SHIFT)) & DMA_CHANNEL_CFG_CHPRIORITY_MASK)
3887/*! @} */
3888
3889/* The count of DMA_CHANNEL_CFG */
3890#define DMA_CHANNEL_CFG_COUNT (32U)
3891
3892/*! @name CHANNEL_CTLSTAT - Control and status register for DMA channel . */
3893/*! @{ */
3894#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK (0x1U)
3895#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT (0U)
3896/*! VALIDPENDING - Valid pending flag for this channel. This bit is set when a 1 is written to the
3897 * corresponding bit in the related SETVALID register when CFGVALID = 1 for the same channel.
3898 * 0b0..No effect. No effect on DMA operation.
3899 * 0b1..Valid pending.
3900 */
3901#define DMA_CHANNEL_CTLSTAT_VALIDPENDING(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT)) & DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK)
3902#define DMA_CHANNEL_CTLSTAT_TRIG_MASK (0x4U)
3903#define DMA_CHANNEL_CTLSTAT_TRIG_SHIFT (2U)
3904/*! TRIG - Trigger flag. Indicates that the trigger for this channel is currently set. This bit is
3905 * cleared at the end of an entire transfer or upon reload when CLRTRIG = 1.
3906 * 0b0..Not triggered. The trigger for this DMA channel is not set. DMA operations will not be carried out.
3907 * 0b1..Triggered. The trigger for this DMA channel is set. DMA operations will be carried out.
3908 */
3909#define DMA_CHANNEL_CTLSTAT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_TRIG_SHIFT)) & DMA_CHANNEL_CTLSTAT_TRIG_MASK)
3910/*! @} */
3911
3912/* The count of DMA_CHANNEL_CTLSTAT */
3913#define DMA_CHANNEL_CTLSTAT_COUNT (32U)
3914
3915/*! @name CHANNEL_XFERCFG - Transfer configuration register for DMA channel . */
3916/*! @{ */
3917#define DMA_CHANNEL_XFERCFG_CFGVALID_MASK (0x1U)
3918#define DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT (0U)
3919/*! CFGVALID - Configuration Valid flag. This bit indicates whether the current channel descriptor
3920 * is valid and can potentially be acted upon, if all other activation criteria are fulfilled.
3921 * 0b0..Not valid. The channel descriptor is not considered valid until validated by an associated SETVALID0 setting.
3922 * 0b1..Valid. The current channel descriptor is considered valid.
3923 */
3924#define DMA_CHANNEL_XFERCFG_CFGVALID(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT)) & DMA_CHANNEL_XFERCFG_CFGVALID_MASK)
3925#define DMA_CHANNEL_XFERCFG_RELOAD_MASK (0x2U)
3926#define DMA_CHANNEL_XFERCFG_RELOAD_SHIFT (1U)
3927/*! RELOAD - Indicates whether the channel's control structure will be reloaded when the current
3928 * descriptor is exhausted. Reloading allows ping-pong and linked transfers.
3929 * 0b0..Disabled. Do not reload the channels' control structure when the current descriptor is exhausted.
3930 * 0b1..Enabled. Reload the channels' control structure when the current descriptor is exhausted.
3931 */
3932#define DMA_CHANNEL_XFERCFG_RELOAD(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_RELOAD_SHIFT)) & DMA_CHANNEL_XFERCFG_RELOAD_MASK)
3933#define DMA_CHANNEL_XFERCFG_SWTRIG_MASK (0x4U)
3934#define DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT (2U)
3935/*! SWTRIG - Software Trigger.
3936 * 0b0..Not set. When written by software, the trigger for this channel is not set. A new trigger, as defined by
3937 * the HWTRIGEN, TRIGPOL, and TRIGTYPE will be needed to start the channel.
3938 * 0b1..Set. When written by software, the trigger for this channel is set immediately. This feature should not
3939 * be used with level triggering when TRIGBURST = 0.
3940 */
3941#define DMA_CHANNEL_XFERCFG_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_SWTRIG_MASK)
3942#define DMA_CHANNEL_XFERCFG_CLRTRIG_MASK (0x8U)
3943#define DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT (3U)
3944/*! CLRTRIG - Clear Trigger.
3945 * 0b0..Not cleared. The trigger is not cleared when this descriptor is exhausted. If there is a reload, the next descriptor will be started.
3946 * 0b1..Cleared. The trigger is cleared when this descriptor is exhausted
3947 */
3948#define DMA_CHANNEL_XFERCFG_CLRTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_CLRTRIG_MASK)
3949#define DMA_CHANNEL_XFERCFG_SETINTA_MASK (0x10U)
3950#define DMA_CHANNEL_XFERCFG_SETINTA_SHIFT (4U)
3951/*! SETINTA - Set Interrupt flag A for this channel. There is no hardware distinction between
3952 * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
3953 * convention, interrupt A may be used when only one interrupt flag is needed.
3954 * 0b0..No effect.
3955 * 0b1..Set. The INTA flag for this channel will be set when the current descriptor is exhausted.
3956 */
3957#define DMA_CHANNEL_XFERCFG_SETINTA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTA_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTA_MASK)
3958#define DMA_CHANNEL_XFERCFG_SETINTB_MASK (0x20U)
3959#define DMA_CHANNEL_XFERCFG_SETINTB_SHIFT (5U)
3960/*! SETINTB - Set Interrupt flag B for this channel. There is no hardware distinction between
3961 * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
3962 * convention, interrupt A may be used when only one interrupt flag is needed.
3963 * 0b0..No effect.
3964 * 0b1..Set. The INTB flag for this channel will be set when the current descriptor is exhausted.
3965 */
3966#define DMA_CHANNEL_XFERCFG_SETINTB(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTB_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTB_MASK)
3967#define DMA_CHANNEL_XFERCFG_WIDTH_MASK (0x300U)
3968#define DMA_CHANNEL_XFERCFG_WIDTH_SHIFT (8U)
3969/*! WIDTH - Transfer width used for this DMA channel.
3970 * 0b00..8-bit. 8-bit transfers are performed (8-bit source reads and destination writes).
3971 * 0b01..16-bit. 6-bit transfers are performed (16-bit source reads and destination writes).
3972 * 0b10..32-bit. 32-bit transfers are performed (32-bit source reads and destination writes).
3973 * 0b11..Reserved. Reserved setting, do not use.
3974 */
3975#define DMA_CHANNEL_XFERCFG_WIDTH(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_WIDTH_SHIFT)) & DMA_CHANNEL_XFERCFG_WIDTH_MASK)
3976#define DMA_CHANNEL_XFERCFG_SRCINC_MASK (0x3000U)
3977#define DMA_CHANNEL_XFERCFG_SRCINC_SHIFT (12U)
3978/*! SRCINC - Determines whether the source address is incremented for each DMA transfer.
3979 * 0b00..No increment. The source address is not incremented for each transfer. This is the usual case when the source is a peripheral device.
3980 * 0b01..1 x width. The source address is incremented by the amount specified by Width for each transfer. This is
3981 * the usual case when the source is memory.
3982 * 0b10..2 x width. The source address is incremented by 2 times the amount specified by Width for each transfer.
3983 * 0b11..4 x width. The source address is incremented by 4 times the amount specified by Width for each transfer.
3984 */
3985#define DMA_CHANNEL_XFERCFG_SRCINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SRCINC_SHIFT)) & DMA_CHANNEL_XFERCFG_SRCINC_MASK)
3986#define DMA_CHANNEL_XFERCFG_DSTINC_MASK (0xC000U)
3987#define DMA_CHANNEL_XFERCFG_DSTINC_SHIFT (14U)
3988/*! DSTINC - Determines whether the destination address is incremented for each DMA transfer.
3989 * 0b00..No increment. The destination address is not incremented for each transfer. This is the usual case when
3990 * the destination is a peripheral device.
3991 * 0b01..1 x width. The destination address is incremented by the amount specified by Width for each transfer.
3992 * This is the usual case when the destination is memory.
3993 * 0b10..2 x width. The destination address is incremented by 2 times the amount specified by Width for each transfer.
3994 * 0b11..4 x width. The destination address is incremented by 4 times the amount specified by Width for each transfer.
3995 */
3996#define DMA_CHANNEL_XFERCFG_DSTINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_DSTINC_SHIFT)) & DMA_CHANNEL_XFERCFG_DSTINC_MASK)
3997#define DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK (0x3FF0000U)
3998#define DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT (16U)
3999/*! XFERCOUNT - Total number of transfers to be performed, minus 1 encoded. The number of bytes
4000 * transferred is: (XFERCOUNT + 1) x data width (as defined by the WIDTH field). The DMA controller
4001 * uses this bit field during transfer to count down. Hence, it cannot be used by software to read
4002 * back the size of the transfer, for instance, in an interrupt handler. 0x0 = a total of 1
4003 * transfer will be performed. 0x1 = a total of 2 transfers will be performed. 0x3FF = a total of
4004 * 1,024 transfers will be performed.
4005 */
4006#define DMA_CHANNEL_XFERCFG_XFERCOUNT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT)) & DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK)
4007/*! @} */
4008
4009/* The count of DMA_CHANNEL_XFERCFG */
4010#define DMA_CHANNEL_XFERCFG_COUNT (32U)
4011
4012
4013/*!
4014 * @}
4015 */ /* end of group DMA_Register_Masks */
4016
4017
4018/* DMA - Peripheral instance base addresses */
4019/** Peripheral DMA0 base address */
4020#define DMA0_BASE (0x40082000u)
4021/** Peripheral DMA0 base pointer */
4022#define DMA0 ((DMA_Type *)DMA0_BASE)
4023/** Array initializer of DMA peripheral base addresses */
4024#define DMA_BASE_ADDRS { DMA0_BASE }
4025/** Array initializer of DMA peripheral base pointers */
4026#define DMA_BASE_PTRS { DMA0 }
4027/** Interrupt vectors for the DMA peripheral type */
4028#define DMA_IRQS { DMA0_IRQn }
4029
4030/*!
4031 * @}
4032 */ /* end of group DMA_Peripheral_Access_Layer */
4033
4034
4035/* ----------------------------------------------------------------------------
4036 -- DMIC Peripheral Access Layer
4037 ---------------------------------------------------------------------------- */
4038
4039/*!
4040 * @addtogroup DMIC_Peripheral_Access_Layer DMIC Peripheral Access Layer
4041 * @{
4042 */
4043
4044/** DMIC - Register Layout Typedef */
4045typedef struct {
4046 struct { /* offset: 0x0, array step: 0x100 */
4047 __IO uint32_t OSR; /**< Oversample Rate register 0, array offset: 0x0, array step: 0x100 */
4048 __IO uint32_t DIVHFCLK; /**< DMIC Clock Register 0, array offset: 0x4, array step: 0x100 */
4049 __IO uint32_t PREAC2FSCOEF; /**< Pre-Emphasis Filter Coefficient for 2 FS register, array offset: 0x8, array step: 0x100 */
4050 __IO uint32_t PREAC4FSCOEF; /**< Pre-Emphasis Filter Coefficient for 4 FS register, array offset: 0xC, array step: 0x100 */
4051 __IO uint32_t GAINSHIFT; /**< Decimator Gain Shift register, array offset: 0x10, array step: 0x100 */
4052 uint8_t RESERVED_0[108];
4053 __IO uint32_t FIFO_CTRL; /**< FIFO Control register 0, array offset: 0x80, array step: 0x100 */
4054 __IO uint32_t FIFO_STATUS; /**< FIFO Status register 0, array offset: 0x84, array step: 0x100 */
4055 __IO uint32_t FIFO_DATA; /**< FIFO Data Register 0, array offset: 0x88, array step: 0x100 */
4056 __IO uint32_t PHY_CTRL; /**< PDM Source Configuration register 0, array offset: 0x8C, array step: 0x100 */
4057 __IO uint32_t DC_CTRL; /**< DC Control register 0, array offset: 0x90, array step: 0x100 */
4058 uint8_t RESERVED_1[108];
4059 } CHANNEL[2];
4060 uint8_t RESERVED_0[3328];
4061 __IO uint32_t CHANEN; /**< Channel Enable register, offset: 0xF00 */
4062 uint8_t RESERVED_1[8];
4063 __IO uint32_t IOCFG; /**< I/O Configuration register, offset: 0xF0C */
4064 __IO uint32_t USE2FS; /**< Use 2FS register, offset: 0xF10 */
4065 uint8_t RESERVED_2[108];
4066 __IO uint32_t HWVADGAIN; /**< HWVAD input gain register, offset: 0xF80 */
4067 __IO uint32_t HWVADHPFS; /**< HWVAD filter control register, offset: 0xF84 */
4068 __IO uint32_t HWVADST10; /**< HWVAD control register, offset: 0xF88 */
4069 __IO uint32_t HWVADRSTT; /**< HWVAD filter reset register, offset: 0xF8C */
4070 __IO uint32_t HWVADTHGN; /**< HWVAD noise estimator gain register, offset: 0xF90 */
4071 __IO uint32_t HWVADTHGS; /**< HWVAD signal estimator gain register, offset: 0xF94 */
4072 __I uint32_t HWVADLOWZ; /**< HWVAD noise envelope estimator register, offset: 0xF98 */
4073 uint8_t RESERVED_3[96];
4074 __I uint32_t ID; /**< Module Identification register, offset: 0xFFC */
4075} DMIC_Type;
4076
4077/* ----------------------------------------------------------------------------
4078 -- DMIC Register Masks
4079 ---------------------------------------------------------------------------- */
4080
4081/*!
4082 * @addtogroup DMIC_Register_Masks DMIC Register Masks
4083 * @{
4084 */
4085
4086/*! @name CHANNEL_OSR - Oversample Rate register 0 */
4087/*! @{ */
4088#define DMIC_CHANNEL_OSR_OSR_MASK (0xFFU)
4089#define DMIC_CHANNEL_OSR_OSR_SHIFT (0U)
4090/*! OSR - Selects the oversample rate for the related input channel.
4091 */
4092#define DMIC_CHANNEL_OSR_OSR(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_OSR_OSR_SHIFT)) & DMIC_CHANNEL_OSR_OSR_MASK)
4093/*! @} */
4094
4095/* The count of DMIC_CHANNEL_OSR */
4096#define DMIC_CHANNEL_OSR_COUNT (2U)
4097
4098/*! @name CHANNEL_DIVHFCLK - DMIC Clock Register 0 */
4099/*! @{ */
4100#define DMIC_CHANNEL_DIVHFCLK_PDMDIV_MASK (0xFU)
4101#define DMIC_CHANNEL_DIVHFCLK_PDMDIV_SHIFT (0U)
4102/*! PDMDIV - PDM clock divider value. 0 = divide by 1 1 = divide by 2 2 = divide by 3 3 = divide by
4103 * 4 4 = divide by 6 5 = divide by 8 6 = divide by 12 7 = divide by 16 8 = divide by 24 9 =
4104 * divide by 32 10 = divide by 48 11 = divide by 64 12 = divide by 96 13 = divide by 128 others =
4105 * reserved.
4106 */
4107#define DMIC_CHANNEL_DIVHFCLK_PDMDIV(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_DIVHFCLK_PDMDIV_SHIFT)) & DMIC_CHANNEL_DIVHFCLK_PDMDIV_MASK)
4108/*! @} */
4109
4110/* The count of DMIC_CHANNEL_DIVHFCLK */
4111#define DMIC_CHANNEL_DIVHFCLK_COUNT (2U)
4112
4113/*! @name CHANNEL_PREAC2FSCOEF - Pre-Emphasis Filter Coefficient for 2 FS register */
4114/*! @{ */
4115#define DMIC_CHANNEL_PREAC2FSCOEF_COMP_MASK (0x3U)
4116#define DMIC_CHANNEL_PREAC2FSCOEF_COMP_SHIFT (0U)
4117/*! COMP - Pre-emphasis filer coefficient for 2 FS mode. 0 = Compensation = 0 1 = Compensation = 16
4118 * 2 = Compensation = 15 3 = Compensation = 13
4119 */
4120#define DMIC_CHANNEL_PREAC2FSCOEF_COMP(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_PREAC2FSCOEF_COMP_SHIFT)) & DMIC_CHANNEL_PREAC2FSCOEF_COMP_MASK)
4121/*! @} */
4122
4123/* The count of DMIC_CHANNEL_PREAC2FSCOEF */
4124#define DMIC_CHANNEL_PREAC2FSCOEF_COUNT (2U)
4125
4126/*! @name CHANNEL_PREAC4FSCOEF - Pre-Emphasis Filter Coefficient for 4 FS register */
4127/*! @{ */
4128#define DMIC_CHANNEL_PREAC4FSCOEF_COMP_MASK (0x3U)
4129#define DMIC_CHANNEL_PREAC4FSCOEF_COMP_SHIFT (0U)
4130/*! COMP - Pre-emphasis filer coefficient for 4 FS mode. 0 = Compensation = 0 1 = Compensation = 16
4131 * 2 = Compensation = 15 3 = Compensation = 13
4132 */
4133#define DMIC_CHANNEL_PREAC4FSCOEF_COMP(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_PREAC4FSCOEF_COMP_SHIFT)) & DMIC_CHANNEL_PREAC4FSCOEF_COMP_MASK)
4134/*! @} */
4135
4136/* The count of DMIC_CHANNEL_PREAC4FSCOEF */
4137#define DMIC_CHANNEL_PREAC4FSCOEF_COUNT (2U)
4138
4139/*! @name CHANNEL_GAINSHIFT - Decimator Gain Shift register */
4140/*! @{ */
4141#define DMIC_CHANNEL_GAINSHIFT_GAIN_MASK (0x3FU)
4142#define DMIC_CHANNEL_GAINSHIFT_GAIN_SHIFT (0U)
4143/*! GAIN - Gain control, as a positive or negative (two's complement) number of bits to shift.
4144 */
4145#define DMIC_CHANNEL_GAINSHIFT_GAIN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_GAINSHIFT_GAIN_SHIFT)) & DMIC_CHANNEL_GAINSHIFT_GAIN_MASK)
4146/*! @} */
4147
4148/* The count of DMIC_CHANNEL_GAINSHIFT */
4149#define DMIC_CHANNEL_GAINSHIFT_COUNT (2U)
4150
4151/*! @name CHANNEL_FIFO_CTRL - FIFO Control register 0 */
4152/*! @{ */
4153#define DMIC_CHANNEL_FIFO_CTRL_ENABLE_MASK (0x1U)
4154#define DMIC_CHANNEL_FIFO_CTRL_ENABLE_SHIFT (0U)
4155/*! ENABLE - FIFO enable.
4156 * 0b0..FIFO is not enabled. Enabling a DMIC channel with the FIFO disabled could be useful while data is being
4157 * streamed to the I2S, or in order to avoid a filter settling delay when a channel is re-enabled after a
4158 * period when the data was not needed.
4159 * 0b1..FIFO is enabled. The FIFO must be enabled in order for the CPU or DMA to read data from the DMIC via the FIFODATA register.
4160 */
4161#define DMIC_CHANNEL_FIFO_CTRL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_CTRL_ENABLE_SHIFT)) & DMIC_CHANNEL_FIFO_CTRL_ENABLE_MASK)
4162#define DMIC_CHANNEL_FIFO_CTRL_RESETN_MASK (0x2U)
4163#define DMIC_CHANNEL_FIFO_CTRL_RESETN_SHIFT (1U)
4164/*! RESETN - FIFO reset.
4165 * 0b0..Reset the FIFO.
4166 * 0b1..Normal operation
4167 */
4168#define DMIC_CHANNEL_FIFO_CTRL_RESETN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_CTRL_RESETN_SHIFT)) & DMIC_CHANNEL_FIFO_CTRL_RESETN_MASK)
4169#define DMIC_CHANNEL_FIFO_CTRL_INTEN_MASK (0x4U)
4170#define DMIC_CHANNEL_FIFO_CTRL_INTEN_SHIFT (2U)
4171/*! INTEN - Interrupt enable.
4172 * 0b0..FIFO level interrupts are not enabled.
4173 * 0b1..FIFO level interrupts are enabled.
4174 */
4175#define DMIC_CHANNEL_FIFO_CTRL_INTEN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_CTRL_INTEN_SHIFT)) & DMIC_CHANNEL_FIFO_CTRL_INTEN_MASK)
4176#define DMIC_CHANNEL_FIFO_CTRL_DMAEN_MASK (0x8U)
4177#define DMIC_CHANNEL_FIFO_CTRL_DMAEN_SHIFT (3U)
4178/*! DMAEN - DMA enable
4179 * 0b0..DMA requests are not enabled.
4180 * 0b1..DMA requests based on FIFO level are enabled.
4181 */
4182#define DMIC_CHANNEL_FIFO_CTRL_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_CTRL_DMAEN_SHIFT)) & DMIC_CHANNEL_FIFO_CTRL_DMAEN_MASK)
4183#define DMIC_CHANNEL_FIFO_CTRL_TRIGLVL_MASK (0x1F0000U)
4184#define DMIC_CHANNEL_FIFO_CTRL_TRIGLVL_SHIFT (16U)
4185/*! TRIGLVL - FIFO trigger level. Selects the data trigger level for interrupt or DMA operation. If
4186 * enabled to do so, the FIFO level can wake up the device just enough to perform DMA, then
4187 * return to the reduced power mode See Section 4.5.66 'Hardware Wake-up control register'. 0 =
4188 * trigger when the FIFO has received one entry (is no longer empty). 1 = trigger when the FIFO has
4189 * received two entries. 15 = trigger when the FIFO has received 16 entries (has become full).
4190 */
4191#define DMIC_CHANNEL_FIFO_CTRL_TRIGLVL(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_CTRL_TRIGLVL_SHIFT)) & DMIC_CHANNEL_FIFO_CTRL_TRIGLVL_MASK)
4192/*! @} */
4193
4194/* The count of DMIC_CHANNEL_FIFO_CTRL */
4195#define DMIC_CHANNEL_FIFO_CTRL_COUNT (2U)
4196
4197/*! @name CHANNEL_FIFO_STATUS - FIFO Status register 0 */
4198/*! @{ */
4199#define DMIC_CHANNEL_FIFO_STATUS_INT_MASK (0x1U)
4200#define DMIC_CHANNEL_FIFO_STATUS_INT_SHIFT (0U)
4201/*! INT - Interrupt flag. Asserted when FIFO data reaches the level specified in the FIFOCTRL
4202 * register. Writing a one to this bit clears the flag. Remark: note that the bus clock to the DMIC
4203 * subsystem must be running in order for an interrupt to occur.
4204 */
4205#define DMIC_CHANNEL_FIFO_STATUS_INT(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_STATUS_INT_SHIFT)) & DMIC_CHANNEL_FIFO_STATUS_INT_MASK)
4206#define DMIC_CHANNEL_FIFO_STATUS_OVERRUN_MASK (0x2U)
4207#define DMIC_CHANNEL_FIFO_STATUS_OVERRUN_SHIFT (1U)
4208/*! OVERRUN - Overrun flag. Indicates that a FIFO overflow has occurred at some point. Writing a one
4209 * to this bit clears the flag. This flag does not cause an interrupt.
4210 */
4211#define DMIC_CHANNEL_FIFO_STATUS_OVERRUN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_STATUS_OVERRUN_SHIFT)) & DMIC_CHANNEL_FIFO_STATUS_OVERRUN_MASK)
4212#define DMIC_CHANNEL_FIFO_STATUS_UNDERRUN_MASK (0x4U)
4213#define DMIC_CHANNEL_FIFO_STATUS_UNDERRUN_SHIFT (2U)
4214/*! UNDERRUN - Underrun flag. Indicates that a FIFO underflow has occurred at some point. Writing a one to this bit clears the flag.
4215 */
4216#define DMIC_CHANNEL_FIFO_STATUS_UNDERRUN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_STATUS_UNDERRUN_SHIFT)) & DMIC_CHANNEL_FIFO_STATUS_UNDERRUN_MASK)
4217/*! @} */
4218
4219/* The count of DMIC_CHANNEL_FIFO_STATUS */
4220#define DMIC_CHANNEL_FIFO_STATUS_COUNT (2U)
4221
4222/*! @name CHANNEL_FIFO_DATA - FIFO Data Register 0 */
4223/*! @{ */
4224#define DMIC_CHANNEL_FIFO_DATA_DATA_MASK (0xFFFFFFU)
4225#define DMIC_CHANNEL_FIFO_DATA_DATA_SHIFT (0U)
4226/*! DATA - Data from the top of the input filter FIFO.
4227 */
4228#define DMIC_CHANNEL_FIFO_DATA_DATA(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_FIFO_DATA_DATA_SHIFT)) & DMIC_CHANNEL_FIFO_DATA_DATA_MASK)
4229/*! @} */
4230
4231/* The count of DMIC_CHANNEL_FIFO_DATA */
4232#define DMIC_CHANNEL_FIFO_DATA_COUNT (2U)
4233
4234/*! @name CHANNEL_PHY_CTRL - PDM Source Configuration register 0 */
4235/*! @{ */
4236#define DMIC_CHANNEL_PHY_CTRL_PHY_FALL_MASK (0x1U)
4237#define DMIC_CHANNEL_PHY_CTRL_PHY_FALL_SHIFT (0U)
4238/*! PHY_FALL - Capture PDM_DATA
4239 * 0b0..Capture PDM_DATA on the rising edge of PDM_CLK.
4240 * 0b1..Capture PDM_DATA on the falling edge of PDM_CLK.
4241 */
4242#define DMIC_CHANNEL_PHY_CTRL_PHY_FALL(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_PHY_CTRL_PHY_FALL_SHIFT)) & DMIC_CHANNEL_PHY_CTRL_PHY_FALL_MASK)
4243#define DMIC_CHANNEL_PHY_CTRL_PHY_HALF_MASK (0x2U)
4244#define DMIC_CHANNEL_PHY_CTRL_PHY_HALF_SHIFT (1U)
4245/*! PHY_HALF - Half rate sampling
4246 * 0b0..Standard half rate sampling. The clock to the DMIC is sent at the same rate as the decimator is providing.
4247 * 0b1..Use half rate sampling. The clock to the DMIC is sent at half the rate as the decimator is providing.
4248 */
4249#define DMIC_CHANNEL_PHY_CTRL_PHY_HALF(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_PHY_CTRL_PHY_HALF_SHIFT)) & DMIC_CHANNEL_PHY_CTRL_PHY_HALF_MASK)
4250/*! @} */
4251
4252/* The count of DMIC_CHANNEL_PHY_CTRL */
4253#define DMIC_CHANNEL_PHY_CTRL_COUNT (2U)
4254
4255/*! @name CHANNEL_DC_CTRL - DC Control register 0 */
4256/*! @{ */
4257#define DMIC_CHANNEL_DC_CTRL_DCPOLE_MASK (0x3U)
4258#define DMIC_CHANNEL_DC_CTRL_DCPOLE_SHIFT (0U)
4259/*! DCPOLE - DC block filter
4260 * 0b00..Flat response, no filter.
4261 * 0b01..155 Hz.
4262 * 0b10..78 Hz.
4263 * 0b11..39 Hz
4264 */
4265#define DMIC_CHANNEL_DC_CTRL_DCPOLE(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_DC_CTRL_DCPOLE_SHIFT)) & DMIC_CHANNEL_DC_CTRL_DCPOLE_MASK)
4266#define DMIC_CHANNEL_DC_CTRL_DCGAIN_MASK (0xF0U)
4267#define DMIC_CHANNEL_DC_CTRL_DCGAIN_SHIFT (4U)
4268/*! DCGAIN - Fine gain adjustment in the form of a number of bits to downshift.
4269 */
4270#define DMIC_CHANNEL_DC_CTRL_DCGAIN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_DC_CTRL_DCGAIN_SHIFT)) & DMIC_CHANNEL_DC_CTRL_DCGAIN_MASK)
4271#define DMIC_CHANNEL_DC_CTRL_SATURATEAT16BIT_MASK (0x100U)
4272#define DMIC_CHANNEL_DC_CTRL_SATURATEAT16BIT_SHIFT (8U)
4273/*! SATURATEAT16BIT - Selects 16-bit saturation.
4274 * 0b0..Results roll over if out range and do not saturate.
4275 * 0b1..If the result overflows, it saturates at 0xFFFF for positive overflow and 0x8000 for negative overflow.
4276 */
4277#define DMIC_CHANNEL_DC_CTRL_SATURATEAT16BIT(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANNEL_DC_CTRL_SATURATEAT16BIT_SHIFT)) & DMIC_CHANNEL_DC_CTRL_SATURATEAT16BIT_MASK)
4278/*! @} */
4279
4280/* The count of DMIC_CHANNEL_DC_CTRL */
4281#define DMIC_CHANNEL_DC_CTRL_COUNT (2U)
4282
4283/*! @name CHANEN - Channel Enable register */
4284/*! @{ */
4285#define DMIC_CHANEN_EN_CH0_MASK (0x1U)
4286#define DMIC_CHANEN_EN_CH0_SHIFT (0U)
4287/*! EN_CH0 - Enable channel 0. When 1, PDM channel 0 is enabled.
4288 */
4289#define DMIC_CHANEN_EN_CH0(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANEN_EN_CH0_SHIFT)) & DMIC_CHANEN_EN_CH0_MASK)
4290#define DMIC_CHANEN_EN_CH1_MASK (0x2U)
4291#define DMIC_CHANEN_EN_CH1_SHIFT (1U)
4292/*! EN_CH1 - Enable channel 1. When 1, PDM channel 1 is enabled.
4293 */
4294#define DMIC_CHANEN_EN_CH1(x) (((uint32_t)(((uint32_t)(x)) << DMIC_CHANEN_EN_CH1_SHIFT)) & DMIC_CHANEN_EN_CH1_MASK)
4295/*! @} */
4296
4297/*! @name IOCFG - I/O Configuration register */
4298/*! @{ */
4299#define DMIC_IOCFG_CLK_BYPASS0_MASK (0x1U)
4300#define DMIC_IOCFG_CLK_BYPASS0_SHIFT (0U)
4301/*! CLK_BYPASS0 - Bypass CLK0. When 1, PDM_DATA1 becomes the clock for PDM channel 0. This provides
4302 * for the possibility of an external codec taking over the PDM bus.
4303 */
4304#define DMIC_IOCFG_CLK_BYPASS0(x) (((uint32_t)(((uint32_t)(x)) << DMIC_IOCFG_CLK_BYPASS0_SHIFT)) & DMIC_IOCFG_CLK_BYPASS0_MASK)
4305#define DMIC_IOCFG_CLK_BYPASS1_MASK (0x2U)
4306#define DMIC_IOCFG_CLK_BYPASS1_SHIFT (1U)
4307/*! CLK_BYPASS1 - Bypass CLK1. When 1, PDM_DATA1 becomes the clock for PDM channel 1. This provides
4308 * for the possibility of an external codec taking over the PDM bus.
4309 */
4310#define DMIC_IOCFG_CLK_BYPASS1(x) (((uint32_t)(((uint32_t)(x)) << DMIC_IOCFG_CLK_BYPASS1_SHIFT)) & DMIC_IOCFG_CLK_BYPASS1_MASK)
4311#define DMIC_IOCFG_STEREO_DATA0_MASK (0x4U)
4312#define DMIC_IOCFG_STEREO_DATA0_SHIFT (2U)
4313/*! STEREO_DATA0 - Stereo PDM select. When 1, PDM_DATA0 is routed to both PDM channels in a
4314 * configuration that supports a single stereo digital microphone.
4315 */
4316#define DMIC_IOCFG_STEREO_DATA0(x) (((uint32_t)(((uint32_t)(x)) << DMIC_IOCFG_STEREO_DATA0_SHIFT)) & DMIC_IOCFG_STEREO_DATA0_MASK)
4317/*! @} */
4318
4319/*! @name USE2FS - Use 2FS register */
4320/*! @{ */
4321#define DMIC_USE2FS_USE2FS_MASK (0x1U)
4322#define DMIC_USE2FS_USE2FS_SHIFT (0U)
4323/*! USE2FS - Use 2FS register
4324 * 0b0..Use 1FS output for PCM data.
4325 * 0b1..Use 2FS output for PCM data.
4326 */
4327#define DMIC_USE2FS_USE2FS(x) (((uint32_t)(((uint32_t)(x)) << DMIC_USE2FS_USE2FS_SHIFT)) & DMIC_USE2FS_USE2FS_MASK)
4328/*! @} */
4329
4330/*! @name HWVADGAIN - HWVAD input gain register */
4331/*! @{ */
4332#define DMIC_HWVADGAIN_INPUTGAIN_MASK (0xFU)
4333#define DMIC_HWVADGAIN_INPUTGAIN_SHIFT (0U)
4334/*! INPUTGAIN - Shift value for input bits 0x00 -10 bits 0x01 -8 bits 0x02 -6 bits 0x03 -4 bits 0x04
4335 * -2 bits 0x05 0 bits (default) 0x06 +2 bits 0x07 +4 bits 0x08 +6 bits 0x09 +8 bits 0x0A +10
4336 * bits 0x0B +12 bits 0x0C +14 bits 0x0D to 0x0F Reserved.
4337 */
4338#define DMIC_HWVADGAIN_INPUTGAIN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADGAIN_INPUTGAIN_SHIFT)) & DMIC_HWVADGAIN_INPUTGAIN_MASK)
4339/*! @} */
4340
4341/*! @name HWVADHPFS - HWVAD filter control register */
4342/*! @{ */
4343#define DMIC_HWVADHPFS_HPFS_MASK (0x3U)
4344#define DMIC_HWVADHPFS_HPFS_SHIFT (0U)
4345/*! HPFS - High pass filter
4346 * 0b00..First filter by-pass.
4347 * 0b01..High pass filter with -3dB cut-off at 1750Hz.
4348 * 0b10..High pass filter with -3dB cut-off at 215Hz.
4349 * 0b11..Reserved.
4350 */
4351#define DMIC_HWVADHPFS_HPFS(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADHPFS_HPFS_SHIFT)) & DMIC_HWVADHPFS_HPFS_MASK)
4352/*! @} */
4353
4354/*! @name HWVADST10 - HWVAD control register */
4355/*! @{ */
4356#define DMIC_HWVADST10_ST10_MASK (0x1U)
4357#define DMIC_HWVADST10_ST10_SHIFT (0U)
4358/*! ST10 - Stage 0
4359 * 0b0..Normal operation, waiting for HWVAD trigger event (stage 0).
4360 * 0b1..Reset internal interrupt flag by writing a '1' pulse.
4361 */
4362#define DMIC_HWVADST10_ST10(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADST10_ST10_SHIFT)) & DMIC_HWVADST10_ST10_MASK)
4363/*! @} */
4364
4365/*! @name HWVADRSTT - HWVAD filter reset register */
4366/*! @{ */
4367#define DMIC_HWVADRSTT_RSTT_MASK (0x1U)
4368#define DMIC_HWVADRSTT_RSTT_SHIFT (0U)
4369/*! RSTT - Writing a 1 resets all filter values
4370 */
4371#define DMIC_HWVADRSTT_RSTT(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADRSTT_RSTT_SHIFT)) & DMIC_HWVADRSTT_RSTT_MASK)
4372/*! @} */
4373
4374/*! @name HWVADTHGN - HWVAD noise estimator gain register */
4375/*! @{ */
4376#define DMIC_HWVADTHGN_THGN_MASK (0xFU)
4377#define DMIC_HWVADTHGN_THGN_SHIFT (0U)
4378/*! THGN - Gain value for the noise estimator. Values 0 to 14. 0 corresponds to a gain of 1.
4379 */
4380#define DMIC_HWVADTHGN_THGN(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADTHGN_THGN_SHIFT)) & DMIC_HWVADTHGN_THGN_MASK)
4381/*! @} */
4382
4383/*! @name HWVADTHGS - HWVAD signal estimator gain register */
4384/*! @{ */
4385#define DMIC_HWVADTHGS_THGS_MASK (0xFU)
4386#define DMIC_HWVADTHGS_THGS_SHIFT (0U)
4387/*! THGS - Gain value for the signal estimator. Values 0 to 14. 0 corresponds to a gain of 1.
4388 */
4389#define DMIC_HWVADTHGS_THGS(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADTHGS_THGS_SHIFT)) & DMIC_HWVADTHGS_THGS_MASK)
4390/*! @} */
4391
4392/*! @name HWVADLOWZ - HWVAD noise envelope estimator register */
4393/*! @{ */
4394#define DMIC_HWVADLOWZ_LOWZ_MASK (0xFFFFU)
4395#define DMIC_HWVADLOWZ_LOWZ_SHIFT (0U)
4396/*! LOWZ - Noise envelope estimator value.
4397 */
4398#define DMIC_HWVADLOWZ_LOWZ(x) (((uint32_t)(((uint32_t)(x)) << DMIC_HWVADLOWZ_LOWZ_SHIFT)) & DMIC_HWVADLOWZ_LOWZ_MASK)
4399/*! @} */
4400
4401/*! @name ID - Module Identification register */
4402/*! @{ */
4403#define DMIC_ID_ID_MASK (0xFFFFFFFFU)
4404#define DMIC_ID_ID_SHIFT (0U)
4405/*! ID - Indicates module ID and the number of channels in this DMIC interface.
4406 */
4407#define DMIC_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << DMIC_ID_ID_SHIFT)) & DMIC_ID_ID_MASK)
4408/*! @} */
4409
4410
4411/*!
4412 * @}
4413 */ /* end of group DMIC_Register_Masks */
4414
4415
4416/* DMIC - Peripheral instance base addresses */
4417/** Peripheral DMIC0 base address */
4418#define DMIC0_BASE (0x40090000u)
4419/** Peripheral DMIC0 base pointer */
4420#define DMIC0 ((DMIC_Type *)DMIC0_BASE)
4421/** Array initializer of DMIC peripheral base addresses */
4422#define DMIC_BASE_ADDRS { DMIC0_BASE }
4423/** Array initializer of DMIC peripheral base pointers */
4424#define DMIC_BASE_PTRS { DMIC0 }
4425/** Interrupt vectors for the DMIC peripheral type */
4426#define DMIC_IRQS { DMIC0_IRQn }
4427#define DMIC_HWVAD_IRQS { HWVAD0_IRQn }
4428
4429/*!
4430 * @}
4431 */ /* end of group DMIC_Peripheral_Access_Layer */
4432
4433
4434/* ----------------------------------------------------------------------------
4435 -- EMC Peripheral Access Layer
4436 ---------------------------------------------------------------------------- */
4437
4438/*!
4439 * @addtogroup EMC_Peripheral_Access_Layer EMC Peripheral Access Layer
4440 * @{
4441 */
4442
4443/** EMC - Register Layout Typedef */
4444typedef struct {
4445 __IO uint32_t CONTROL; /**< Controls operation of the memory controller, offset: 0x0 */
4446 __I uint32_t STATUS; /**< Provides EMC status information, offset: 0x4 */
4447 __IO uint32_t CONFIG; /**< Configures operation of the memory controller, offset: 0x8 */
4448 uint8_t RESERVED_0[20];
4449 __IO uint32_t DYNAMICCONTROL; /**< Controls dynamic memory operation, offset: 0x20 */
4450 __IO uint32_t DYNAMICREFRESH; /**< Configures dynamic memory refresh, offset: 0x24 */
4451 __IO uint32_t DYNAMICREADCONFIG; /**< Configures dynamic memory read strategy, offset: 0x28 */
4452 uint8_t RESERVED_1[4];
4453 __IO uint32_t DYNAMICRP; /**< Precharge command period, offset: 0x30 */
4454 __IO uint32_t DYNAMICRAS; /**< Active to precharge command period, offset: 0x34 */
4455 __IO uint32_t DYNAMICSREX; /**< Self-refresh exit time, offset: 0x38 */
4456 __IO uint32_t DYNAMICAPR; /**< Last-data-out to active command time, offset: 0x3C */
4457 __IO uint32_t DYNAMICDAL; /**< Data-in to active command time, offset: 0x40 */
4458 __IO uint32_t DYNAMICWR; /**< Write recovery time, offset: 0x44 */
4459 __IO uint32_t DYNAMICRC; /**< Selects the active to active command period, offset: 0x48 */
4460 __IO uint32_t DYNAMICRFC; /**< Selects the auto-refresh period, offset: 0x4C */
4461 __IO uint32_t DYNAMICXSR; /**< Time for exit self-refresh to active command, offset: 0x50 */
4462 __IO uint32_t DYNAMICRRD; /**< Latency for active bank A to active bank B, offset: 0x54 */
4463 __IO uint32_t DYNAMICMRD; /**< Time for load mode register to active command, offset: 0x58 */
4464 uint8_t RESERVED_2[36];
4465 __IO uint32_t STATICEXTENDEDWAIT; /**< Time for long static memory read and write transfers, offset: 0x80 */
4466 uint8_t RESERVED_3[124];
4467 struct { /* offset: 0x100, array step: 0x20 */
4468 __IO uint32_t DYNAMICCONFIG; /**< Configuration information for EMC_DYCSx, array offset: 0x100, array step: 0x20 */
4469 __IO uint32_t DYNAMICRASCAS; /**< RAS and CAS latencies for EMC_DYCSx, array offset: 0x104, array step: 0x20 */
4470 uint8_t RESERVED_0[24];
4471 } DYNAMIC[4];
4472 uint8_t RESERVED_4[128];
4473 struct { /* offset: 0x200, array step: 0x20 */
4474 __IO uint32_t STATICCONFIG; /**< Configuration for EMC_CSx, array offset: 0x200, array step: 0x20 */
4475 __IO uint32_t STATICWAITWEN; /**< Delay from EMC_CSx to write enable, array offset: 0x204, array step: 0x20 */
4476 __IO uint32_t STATICWAITOEN; /**< Delay from EMC_CSx or address change, whichever is later, to output enable, array offset: 0x208, array step: 0x20 */
4477 __IO uint32_t STATICWAITRD; /**< Delay from EMC_CSx to a read access, array offset: 0x20C, array step: 0x20 */
4478 __IO uint32_t STATICWAITPAGE; /**< Delay for asynchronous page mode sequential accesses for EMC_CSx, array offset: 0x210, array step: 0x20 */
4479 __IO uint32_t STATICWAITWR; /**< Delay from EMC_CSx to a write access, array offset: 0x214, array step: 0x20 */
4480 __IO uint32_t STATICWAITTURN; /**< Number of bus turnaround cycles EMC_CSx, array offset: 0x218, array step: 0x20 */
4481 uint8_t RESERVED_0[4];
4482 } STATIC[4];
4483} EMC_Type;
4484
4485/* ----------------------------------------------------------------------------
4486 -- EMC Register Masks
4487 ---------------------------------------------------------------------------- */
4488
4489/*!
4490 * @addtogroup EMC_Register_Masks EMC Register Masks
4491 * @{
4492 */
4493
4494/*! @name CONTROL - Controls operation of the memory controller */
4495/*! @{ */
4496#define EMC_CONTROL_E_MASK (0x1U)
4497#define EMC_CONTROL_E_SHIFT (0U)
4498/*! E - EMC Enable.
4499 */
4500#define EMC_CONTROL_E(x) (((uint32_t)(((uint32_t)(x)) << EMC_CONTROL_E_SHIFT)) & EMC_CONTROL_E_MASK)
4501#define EMC_CONTROL_M_MASK (0x2U)
4502#define EMC_CONTROL_M_SHIFT (1U)
4503/*! M - Address mirror.
4504 */
4505#define EMC_CONTROL_M(x) (((uint32_t)(((uint32_t)(x)) << EMC_CONTROL_M_SHIFT)) & EMC_CONTROL_M_MASK)
4506#define EMC_CONTROL_L_MASK (0x4U)
4507#define EMC_CONTROL_L_SHIFT (2U)
4508/*! L - Low-power mode.
4509 */
4510#define EMC_CONTROL_L(x) (((uint32_t)(((uint32_t)(x)) << EMC_CONTROL_L_SHIFT)) & EMC_CONTROL_L_MASK)
4511/*! @} */
4512
4513/*! @name STATUS - Provides EMC status information */
4514/*! @{ */
4515#define EMC_STATUS_B_MASK (0x1U)
4516#define EMC_STATUS_B_SHIFT (0U)
4517/*! B - Busy.
4518 */
4519#define EMC_STATUS_B(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATUS_B_SHIFT)) & EMC_STATUS_B_MASK)
4520#define EMC_STATUS_S_MASK (0x2U)
4521#define EMC_STATUS_S_SHIFT (1U)
4522/*! S - Write buffer status.
4523 */
4524#define EMC_STATUS_S(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATUS_S_SHIFT)) & EMC_STATUS_S_MASK)
4525#define EMC_STATUS_SA_MASK (0x4U)
4526#define EMC_STATUS_SA_SHIFT (2U)
4527/*! SA - Self-refresh acknowledge.
4528 */
4529#define EMC_STATUS_SA(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATUS_SA_SHIFT)) & EMC_STATUS_SA_MASK)
4530/*! @} */
4531
4532/*! @name CONFIG - Configures operation of the memory controller */
4533/*! @{ */
4534#define EMC_CONFIG_EM_MASK (0x1U)
4535#define EMC_CONFIG_EM_SHIFT (0U)
4536/*! EM - Endian mode.
4537 */
4538#define EMC_CONFIG_EM(x) (((uint32_t)(((uint32_t)(x)) << EMC_CONFIG_EM_SHIFT)) & EMC_CONFIG_EM_MASK)
4539#define EMC_CONFIG_CLKR_MASK (0x100U)
4540#define EMC_CONFIG_CLKR_SHIFT (8U)
4541/*! CLKR - This bit must contain 0 for proper operation of the EMC.
4542 */
4543#define EMC_CONFIG_CLKR(x) (((uint32_t)(((uint32_t)(x)) << EMC_CONFIG_CLKR_SHIFT)) & EMC_CONFIG_CLKR_MASK)
4544/*! @} */
4545
4546/*! @name DYNAMICCONTROL - Controls dynamic memory operation */
4547/*! @{ */
4548#define EMC_DYNAMICCONTROL_CE_MASK (0x1U)
4549#define EMC_DYNAMICCONTROL_CE_SHIFT (0U)
4550/*! CE - Dynamic memory clock enable.
4551 */
4552#define EMC_DYNAMICCONTROL_CE(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICCONTROL_CE_SHIFT)) & EMC_DYNAMICCONTROL_CE_MASK)
4553#define EMC_DYNAMICCONTROL_CS_MASK (0x2U)
4554#define EMC_DYNAMICCONTROL_CS_SHIFT (1U)
4555/*! CS - Dynamic memory clock control.
4556 */
4557#define EMC_DYNAMICCONTROL_CS(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICCONTROL_CS_SHIFT)) & EMC_DYNAMICCONTROL_CS_MASK)
4558#define EMC_DYNAMICCONTROL_SR_MASK (0x4U)
4559#define EMC_DYNAMICCONTROL_SR_SHIFT (2U)
4560/*! SR - Self-refresh request, EMCSREFREQ.
4561 */
4562#define EMC_DYNAMICCONTROL_SR(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICCONTROL_SR_SHIFT)) & EMC_DYNAMICCONTROL_SR_MASK)
4563#define EMC_DYNAMICCONTROL_MMC_MASK (0x20U)
4564#define EMC_DYNAMICCONTROL_MMC_SHIFT (5U)
4565/*! MMC - Memory clock control.
4566 */
4567#define EMC_DYNAMICCONTROL_MMC(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICCONTROL_MMC_SHIFT)) & EMC_DYNAMICCONTROL_MMC_MASK)
4568#define EMC_DYNAMICCONTROL_I_MASK (0x180U)
4569#define EMC_DYNAMICCONTROL_I_SHIFT (7U)
4570/*! I - SDRAM initialization.
4571 */
4572#define EMC_DYNAMICCONTROL_I(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICCONTROL_I_SHIFT)) & EMC_DYNAMICCONTROL_I_MASK)
4573/*! @} */
4574
4575/*! @name DYNAMICREFRESH - Configures dynamic memory refresh */
4576/*! @{ */
4577#define EMC_DYNAMICREFRESH_REFRESH_MASK (0x7FFU)
4578#define EMC_DYNAMICREFRESH_REFRESH_SHIFT (0U)
4579/*! REFRESH - Refresh timer.
4580 */
4581#define EMC_DYNAMICREFRESH_REFRESH(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICREFRESH_REFRESH_SHIFT)) & EMC_DYNAMICREFRESH_REFRESH_MASK)
4582/*! @} */
4583
4584/*! @name DYNAMICREADCONFIG - Configures dynamic memory read strategy */
4585/*! @{ */
4586#define EMC_DYNAMICREADCONFIG_RD_MASK (0x3U)
4587#define EMC_DYNAMICREADCONFIG_RD_SHIFT (0U)
4588/*! RD - Read data strategy.
4589 */
4590#define EMC_DYNAMICREADCONFIG_RD(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICREADCONFIG_RD_SHIFT)) & EMC_DYNAMICREADCONFIG_RD_MASK)
4591/*! @} */
4592
4593/*! @name DYNAMICRP - Precharge command period */
4594/*! @{ */
4595#define EMC_DYNAMICRP_TRP_MASK (0xFU)
4596#define EMC_DYNAMICRP_TRP_SHIFT (0U)
4597/*! TRP - Precharge command period.
4598 */
4599#define EMC_DYNAMICRP_TRP(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICRP_TRP_SHIFT)) & EMC_DYNAMICRP_TRP_MASK)
4600/*! @} */
4601
4602/*! @name DYNAMICRAS - Active to precharge command period */
4603/*! @{ */
4604#define EMC_DYNAMICRAS_TRAS_MASK (0xFU)
4605#define EMC_DYNAMICRAS_TRAS_SHIFT (0U)
4606/*! TRAS - Active to precharge command period.
4607 */
4608#define EMC_DYNAMICRAS_TRAS(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICRAS_TRAS_SHIFT)) & EMC_DYNAMICRAS_TRAS_MASK)
4609/*! @} */
4610
4611/*! @name DYNAMICSREX - Self-refresh exit time */
4612/*! @{ */
4613#define EMC_DYNAMICSREX_TSREX_MASK (0xFU)
4614#define EMC_DYNAMICSREX_TSREX_SHIFT (0U)
4615/*! TSREX - Self-refresh exit time.
4616 */
4617#define EMC_DYNAMICSREX_TSREX(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICSREX_TSREX_SHIFT)) & EMC_DYNAMICSREX_TSREX_MASK)
4618/*! @} */
4619
4620/*! @name DYNAMICAPR - Last-data-out to active command time */
4621/*! @{ */
4622#define EMC_DYNAMICAPR_TAPR_MASK (0xFU)
4623#define EMC_DYNAMICAPR_TAPR_SHIFT (0U)
4624/*! TAPR - Last-data-out to active command time.
4625 */
4626#define EMC_DYNAMICAPR_TAPR(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICAPR_TAPR_SHIFT)) & EMC_DYNAMICAPR_TAPR_MASK)
4627/*! @} */
4628
4629/*! @name DYNAMICDAL - Data-in to active command time */
4630/*! @{ */
4631#define EMC_DYNAMICDAL_TDAL_MASK (0xFU)
4632#define EMC_DYNAMICDAL_TDAL_SHIFT (0U)
4633/*! TDAL - Data-in to active command.
4634 */
4635#define EMC_DYNAMICDAL_TDAL(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICDAL_TDAL_SHIFT)) & EMC_DYNAMICDAL_TDAL_MASK)
4636/*! @} */
4637
4638/*! @name DYNAMICWR - Write recovery time */
4639/*! @{ */
4640#define EMC_DYNAMICWR_TWR_MASK (0xFU)
4641#define EMC_DYNAMICWR_TWR_SHIFT (0U)
4642/*! TWR - Write recovery time.
4643 */
4644#define EMC_DYNAMICWR_TWR(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICWR_TWR_SHIFT)) & EMC_DYNAMICWR_TWR_MASK)
4645/*! @} */
4646
4647/*! @name DYNAMICRC - Selects the active to active command period */
4648/*! @{ */
4649#define EMC_DYNAMICRC_TRC_MASK (0x1FU)
4650#define EMC_DYNAMICRC_TRC_SHIFT (0U)
4651/*! TRC - Active to active command period.
4652 */
4653#define EMC_DYNAMICRC_TRC(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICRC_TRC_SHIFT)) & EMC_DYNAMICRC_TRC_MASK)
4654/*! @} */
4655
4656/*! @name DYNAMICRFC - Selects the auto-refresh period */
4657/*! @{ */
4658#define EMC_DYNAMICRFC_TRFC_MASK (0x1FU)
4659#define EMC_DYNAMICRFC_TRFC_SHIFT (0U)
4660/*! TRFC - Auto-refresh period and auto-refresh to active command period.
4661 */
4662#define EMC_DYNAMICRFC_TRFC(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICRFC_TRFC_SHIFT)) & EMC_DYNAMICRFC_TRFC_MASK)
4663/*! @} */
4664
4665/*! @name DYNAMICXSR - Time for exit self-refresh to active command */
4666/*! @{ */
4667#define EMC_DYNAMICXSR_TXSR_MASK (0x1FU)
4668#define EMC_DYNAMICXSR_TXSR_SHIFT (0U)
4669/*! TXSR - Exit self-refresh to active command time.
4670 */
4671#define EMC_DYNAMICXSR_TXSR(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICXSR_TXSR_SHIFT)) & EMC_DYNAMICXSR_TXSR_MASK)
4672/*! @} */
4673
4674/*! @name DYNAMICRRD - Latency for active bank A to active bank B */
4675/*! @{ */
4676#define EMC_DYNAMICRRD_TRRD_MASK (0xFU)
4677#define EMC_DYNAMICRRD_TRRD_SHIFT (0U)
4678/*! TRRD - Active bank A to active bank B latency 0x0 - 0xE = n + 1 clock cycles.
4679 */
4680#define EMC_DYNAMICRRD_TRRD(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICRRD_TRRD_SHIFT)) & EMC_DYNAMICRRD_TRRD_MASK)
4681/*! @} */
4682
4683/*! @name DYNAMICMRD - Time for load mode register to active command */
4684/*! @{ */
4685#define EMC_DYNAMICMRD_TMRD_MASK (0xFU)
4686#define EMC_DYNAMICMRD_TMRD_SHIFT (0U)
4687/*! TMRD - Load mode register to active command time.
4688 */
4689#define EMC_DYNAMICMRD_TMRD(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMICMRD_TMRD_SHIFT)) & EMC_DYNAMICMRD_TMRD_MASK)
4690/*! @} */
4691
4692/*! @name STATICEXTENDEDWAIT - Time for long static memory read and write transfers */
4693/*! @{ */
4694#define EMC_STATICEXTENDEDWAIT_EXTENDEDWAIT_MASK (0x3FFU)
4695#define EMC_STATICEXTENDEDWAIT_EXTENDEDWAIT_SHIFT (0U)
4696/*! EXTENDEDWAIT - Extended wait time out.
4697 */
4698#define EMC_STATICEXTENDEDWAIT_EXTENDEDWAIT(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATICEXTENDEDWAIT_EXTENDEDWAIT_SHIFT)) & EMC_STATICEXTENDEDWAIT_EXTENDEDWAIT_MASK)
4699/*! @} */
4700
4701/*! @name DYNAMIC_DYNAMICCONFIG - Configuration information for EMC_DYCSx */
4702/*! @{ */
4703#define EMC_DYNAMIC_DYNAMICCONFIG_MD_MASK (0x18U)
4704#define EMC_DYNAMIC_DYNAMICCONFIG_MD_SHIFT (3U)
4705/*! MD - Memory device.
4706 */
4707#define EMC_DYNAMIC_DYNAMICCONFIG_MD(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICCONFIG_MD_SHIFT)) & EMC_DYNAMIC_DYNAMICCONFIG_MD_MASK)
4708#define EMC_DYNAMIC_DYNAMICCONFIG_AM0_MASK (0x1F80U)
4709#define EMC_DYNAMIC_DYNAMICCONFIG_AM0_SHIFT (7U)
4710/*! AM0 - See Table 933.
4711 */
4712#define EMC_DYNAMIC_DYNAMICCONFIG_AM0(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICCONFIG_AM0_SHIFT)) & EMC_DYNAMIC_DYNAMICCONFIG_AM0_MASK)
4713#define EMC_DYNAMIC_DYNAMICCONFIG_AM1_MASK (0x4000U)
4714#define EMC_DYNAMIC_DYNAMICCONFIG_AM1_SHIFT (14U)
4715/*! AM1 - See Table 933.
4716 */
4717#define EMC_DYNAMIC_DYNAMICCONFIG_AM1(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICCONFIG_AM1_SHIFT)) & EMC_DYNAMIC_DYNAMICCONFIG_AM1_MASK)
4718#define EMC_DYNAMIC_DYNAMICCONFIG_B_MASK (0x80000U)
4719#define EMC_DYNAMIC_DYNAMICCONFIG_B_SHIFT (19U)
4720/*! B - Buffer enable.
4721 */
4722#define EMC_DYNAMIC_DYNAMICCONFIG_B(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICCONFIG_B_SHIFT)) & EMC_DYNAMIC_DYNAMICCONFIG_B_MASK)
4723#define EMC_DYNAMIC_DYNAMICCONFIG_P_MASK (0x100000U)
4724#define EMC_DYNAMIC_DYNAMICCONFIG_P_SHIFT (20U)
4725/*! P - Write protect.
4726 */
4727#define EMC_DYNAMIC_DYNAMICCONFIG_P(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICCONFIG_P_SHIFT)) & EMC_DYNAMIC_DYNAMICCONFIG_P_MASK)
4728/*! @} */
4729
4730/* The count of EMC_DYNAMIC_DYNAMICCONFIG */
4731#define EMC_DYNAMIC_DYNAMICCONFIG_COUNT (4U)
4732
4733/*! @name DYNAMIC_DYNAMICRASCAS - RAS and CAS latencies for EMC_DYCSx */
4734/*! @{ */
4735#define EMC_DYNAMIC_DYNAMICRASCAS_RAS_MASK (0x3U)
4736#define EMC_DYNAMIC_DYNAMICRASCAS_RAS_SHIFT (0U)
4737/*! RAS - RAS latency (active to read/write delay).
4738 */
4739#define EMC_DYNAMIC_DYNAMICRASCAS_RAS(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICRASCAS_RAS_SHIFT)) & EMC_DYNAMIC_DYNAMICRASCAS_RAS_MASK)
4740#define EMC_DYNAMIC_DYNAMICRASCAS_CAS_MASK (0x300U)
4741#define EMC_DYNAMIC_DYNAMICRASCAS_CAS_SHIFT (8U)
4742/*! CAS - CAS latency.
4743 */
4744#define EMC_DYNAMIC_DYNAMICRASCAS_CAS(x) (((uint32_t)(((uint32_t)(x)) << EMC_DYNAMIC_DYNAMICRASCAS_CAS_SHIFT)) & EMC_DYNAMIC_DYNAMICRASCAS_CAS_MASK)
4745/*! @} */
4746
4747/* The count of EMC_DYNAMIC_DYNAMICRASCAS */
4748#define EMC_DYNAMIC_DYNAMICRASCAS_COUNT (4U)
4749
4750/*! @name STATIC_STATICCONFIG - Configuration for EMC_CSx */
4751/*! @{ */
4752#define EMC_STATIC_STATICCONFIG_MW_MASK (0x3U)
4753#define EMC_STATIC_STATICCONFIG_MW_SHIFT (0U)
4754/*! MW - Memory width.
4755 */
4756#define EMC_STATIC_STATICCONFIG_MW(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_MW_SHIFT)) & EMC_STATIC_STATICCONFIG_MW_MASK)
4757#define EMC_STATIC_STATICCONFIG_PM_MASK (0x8U)
4758#define EMC_STATIC_STATICCONFIG_PM_SHIFT (3U)
4759/*! PM - Page mode.
4760 */
4761#define EMC_STATIC_STATICCONFIG_PM(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_PM_SHIFT)) & EMC_STATIC_STATICCONFIG_PM_MASK)
4762#define EMC_STATIC_STATICCONFIG_PC_MASK (0x40U)
4763#define EMC_STATIC_STATICCONFIG_PC_SHIFT (6U)
4764/*! PC - Chip select polarity.
4765 */
4766#define EMC_STATIC_STATICCONFIG_PC(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_PC_SHIFT)) & EMC_STATIC_STATICCONFIG_PC_MASK)
4767#define EMC_STATIC_STATICCONFIG_PB_MASK (0x80U)
4768#define EMC_STATIC_STATICCONFIG_PB_SHIFT (7U)
4769/*! PB - Byte lane state.
4770 */
4771#define EMC_STATIC_STATICCONFIG_PB(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_PB_SHIFT)) & EMC_STATIC_STATICCONFIG_PB_MASK)
4772#define EMC_STATIC_STATICCONFIG_EW_MASK (0x100U)
4773#define EMC_STATIC_STATICCONFIG_EW_SHIFT (8U)
4774/*! EW - Extended wait (EW) uses the EMCStaticExtendedWait register to time both the read and write
4775 * transfers rather than the EMCStaticWaitRd and EMCStaticWaitWr registers.
4776 */
4777#define EMC_STATIC_STATICCONFIG_EW(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_EW_SHIFT)) & EMC_STATIC_STATICCONFIG_EW_MASK)
4778#define EMC_STATIC_STATICCONFIG_B_MASK (0x80000U)
4779#define EMC_STATIC_STATICCONFIG_B_SHIFT (19U)
4780/*! B - Buffer enable [2].
4781 */
4782#define EMC_STATIC_STATICCONFIG_B(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_B_SHIFT)) & EMC_STATIC_STATICCONFIG_B_MASK)
4783#define EMC_STATIC_STATICCONFIG_P_MASK (0x100000U)
4784#define EMC_STATIC_STATICCONFIG_P_SHIFT (20U)
4785/*! P - Write protect.
4786 */
4787#define EMC_STATIC_STATICCONFIG_P(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICCONFIG_P_SHIFT)) & EMC_STATIC_STATICCONFIG_P_MASK)
4788/*! @} */
4789
4790/* The count of EMC_STATIC_STATICCONFIG */
4791#define EMC_STATIC_STATICCONFIG_COUNT (4U)
4792
4793/*! @name STATIC_STATICWAITWEN - Delay from EMC_CSx to write enable */
4794/*! @{ */
4795#define EMC_STATIC_STATICWAITWEN_WAITWEN_MASK (0xFU)
4796#define EMC_STATIC_STATICWAITWEN_WAITWEN_SHIFT (0U)
4797/*! WAITWEN - Wait write enable.
4798 */
4799#define EMC_STATIC_STATICWAITWEN_WAITWEN(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITWEN_WAITWEN_SHIFT)) & EMC_STATIC_STATICWAITWEN_WAITWEN_MASK)
4800/*! @} */
4801
4802/* The count of EMC_STATIC_STATICWAITWEN */
4803#define EMC_STATIC_STATICWAITWEN_COUNT (4U)
4804
4805/*! @name STATIC_STATICWAITOEN - Delay from EMC_CSx or address change, whichever is later, to output enable */
4806/*! @{ */
4807#define EMC_STATIC_STATICWAITOEN_WAITOEN_MASK (0xFU)
4808#define EMC_STATIC_STATICWAITOEN_WAITOEN_SHIFT (0U)
4809/*! WAITOEN - Wait output enable.
4810 */
4811#define EMC_STATIC_STATICWAITOEN_WAITOEN(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITOEN_WAITOEN_SHIFT)) & EMC_STATIC_STATICWAITOEN_WAITOEN_MASK)
4812/*! @} */
4813
4814/* The count of EMC_STATIC_STATICWAITOEN */
4815#define EMC_STATIC_STATICWAITOEN_COUNT (4U)
4816
4817/*! @name STATIC_STATICWAITRD - Delay from EMC_CSx to a read access */
4818/*! @{ */
4819#define EMC_STATIC_STATICWAITRD_WAITRD_MASK (0x1FU)
4820#define EMC_STATIC_STATICWAITRD_WAITRD_SHIFT (0U)
4821/*! WAITRD - .
4822 */
4823#define EMC_STATIC_STATICWAITRD_WAITRD(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITRD_WAITRD_SHIFT)) & EMC_STATIC_STATICWAITRD_WAITRD_MASK)
4824/*! @} */
4825
4826/* The count of EMC_STATIC_STATICWAITRD */
4827#define EMC_STATIC_STATICWAITRD_COUNT (4U)
4828
4829/*! @name STATIC_STATICWAITPAGE - Delay for asynchronous page mode sequential accesses for EMC_CSx */
4830/*! @{ */
4831#define EMC_STATIC_STATICWAITPAGE_WAITPAGE_MASK (0x1FU)
4832#define EMC_STATIC_STATICWAITPAGE_WAITPAGE_SHIFT (0U)
4833/*! WAITPAGE - Asynchronous page mode read after the first read wait states.
4834 */
4835#define EMC_STATIC_STATICWAITPAGE_WAITPAGE(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITPAGE_WAITPAGE_SHIFT)) & EMC_STATIC_STATICWAITPAGE_WAITPAGE_MASK)
4836/*! @} */
4837
4838/* The count of EMC_STATIC_STATICWAITPAGE */
4839#define EMC_STATIC_STATICWAITPAGE_COUNT (4U)
4840
4841/*! @name STATIC_STATICWAITWR - Delay from EMC_CSx to a write access */
4842/*! @{ */
4843#define EMC_STATIC_STATICWAITWR_WAITWR_MASK (0x1FU)
4844#define EMC_STATIC_STATICWAITWR_WAITWR_SHIFT (0U)
4845/*! WAITWR - Write wait states.
4846 */
4847#define EMC_STATIC_STATICWAITWR_WAITWR(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITWR_WAITWR_SHIFT)) & EMC_STATIC_STATICWAITWR_WAITWR_MASK)
4848/*! @} */
4849
4850/* The count of EMC_STATIC_STATICWAITWR */
4851#define EMC_STATIC_STATICWAITWR_COUNT (4U)
4852
4853/*! @name STATIC_STATICWAITTURN - Number of bus turnaround cycles EMC_CSx */
4854/*! @{ */
4855#define EMC_STATIC_STATICWAITTURN_WAITTURN_MASK (0xFU)
4856#define EMC_STATIC_STATICWAITTURN_WAITTURN_SHIFT (0U)
4857/*! WAITTURN - Bus turn-around cycles.
4858 */
4859#define EMC_STATIC_STATICWAITTURN_WAITTURN(x) (((uint32_t)(((uint32_t)(x)) << EMC_STATIC_STATICWAITTURN_WAITTURN_SHIFT)) & EMC_STATIC_STATICWAITTURN_WAITTURN_MASK)
4860/*! @} */
4861
4862/* The count of EMC_STATIC_STATICWAITTURN */
4863#define EMC_STATIC_STATICWAITTURN_COUNT (4U)
4864
4865
4866/*!
4867 * @}
4868 */ /* end of group EMC_Register_Masks */
4869
4870
4871/* EMC - Peripheral instance base addresses */
4872/** Peripheral EMC base address */
4873#define EMC_BASE (0x40081000u)
4874/** Peripheral EMC base pointer */
4875#define EMC ((EMC_Type *)EMC_BASE)
4876/** Array initializer of EMC peripheral base addresses */
4877#define EMC_BASE_ADDRS { EMC_BASE }
4878/** Array initializer of EMC peripheral base pointers */
4879#define EMC_BASE_PTRS { EMC }
4880
4881/*!
4882 * @}
4883 */ /* end of group EMC_Peripheral_Access_Layer */
4884
4885
4886/* ----------------------------------------------------------------------------
4887 -- ENET Peripheral Access Layer
4888 ---------------------------------------------------------------------------- */
4889
4890/*!
4891 * @addtogroup ENET_Peripheral_Access_Layer ENET Peripheral Access Layer
4892 * @{
4893 */
4894
4895/** ENET - Register Layout Typedef */
4896typedef struct {
4897 __IO uint32_t MAC_CONFIG; /**< MAC configuration register, offset: 0x0 */
4898 __IO uint32_t MAC_EXT_CONFIG; /**< , offset: 0x4 */
4899 __IO uint32_t MAC_FRAME_FILTER; /**< MAC frame filter register, offset: 0x8 */
4900 __IO uint32_t MAC_WD_TIMEROUT; /**< MAC watchdog Timeout register, offset: 0xC */
4901 uint8_t RESERVED_0[64];
4902 __IO uint32_t MAC_VLAN_TAG; /**< MAC vlan tag register, offset: 0x50 */
4903 uint8_t RESERVED_1[28];
4904 __IO uint32_t MAC_TX_FLOW_CTRL_Q[2]; /**< Transmit flow control register, array offset: 0x70, array step: 0x4 */
4905 uint8_t RESERVED_2[24];
4906 __IO uint32_t MAC_RX_FLOW_CTRL; /**< Receive flow control register, offset: 0x90 */
4907 uint8_t RESERVED_3[4];
4908 __IO uint32_t MAC_TXQ_PRIO_MAP; /**< , offset: 0x98 */
4909 uint8_t RESERVED_4[4];
4910 __IO uint32_t MAC_RXQ_CTRL[3]; /**< Receive Queue Control 0 register 0x0000, array offset: 0xA0, array step: 0x4 */
4911 uint8_t RESERVED_5[4];
4912 __I uint32_t MAC_INTR_STAT; /**< Interrupt status register 0x0000, offset: 0xB0 */
4913 __IO uint32_t MAC_INTR_EN; /**< Interrupt enable register 0x0000, offset: 0xB4 */
4914 __I uint32_t MAC_RXTX_STAT; /**< Receive Transmit Status register, offset: 0xB8 */
4915 uint8_t RESERVED_6[4];
4916 __IO uint32_t MAC_PMT_CRTL_STAT; /**< , offset: 0xC0 */
4917 __IO uint32_t MAC_RWAKE_FRFLT; /**< Remote wake-up frame filter, offset: 0xC4 */
4918 uint8_t RESERVED_7[8];
4919 __IO uint32_t MAC_LPI_CTRL_STAT; /**< LPI Control and Status Register, offset: 0xD0 */
4920 __IO uint32_t MAC_LPI_TIMER_CTRL; /**< LPI Timers Control register, offset: 0xD4 */
4921 __IO uint32_t MAC_LPI_ENTR_TIMR; /**< LPI entry Timer register, offset: 0xD8 */
4922 __IO uint32_t MAC_1US_TIC_COUNTR; /**< , offset: 0xDC */
4923 uint8_t RESERVED_8[48];
4924 __I uint32_t MAC_VERSION; /**< MAC version register, offset: 0x110 */
4925 __I uint32_t MAC_DBG; /**< MAC debug register, offset: 0x114 */
4926 uint8_t RESERVED_9[4];
4927 __I uint32_t MAC_HW_FEAT[3]; /**< MAC hardware feature register 0x0201, array offset: 0x11C, array step: 0x4 */
4928 uint8_t RESERVED_10[216];
4929 __IO uint32_t MAC_MDIO_ADDR; /**< MIDO address Register, offset: 0x200 */
4930 __IO uint32_t MAC_MDIO_DATA; /**< MDIO Data register, offset: 0x204 */
4931 uint8_t RESERVED_11[248];
4932 __IO uint32_t MAC_ADDR_HIGH; /**< MAC address0 high register, offset: 0x300 */
4933 __IO uint32_t MAC_ADDR_LOW; /**< MAC address0 low register, offset: 0x304 */
4934 uint8_t RESERVED_12[2040];
4935 __IO uint32_t MAC_TIMESTAMP_CTRL; /**< Time stamp control register, offset: 0xB00 */
4936 __IO uint32_t MAC_SUB_SCND_INCR; /**< Sub-second increment register, offset: 0xB04 */
4937 __I uint32_t MAC_SYS_TIME_SCND; /**< System time seconds register, offset: 0xB08 */
4938 __I uint32_t MAC_SYS_TIME_NSCND; /**< System time nanoseconds register, offset: 0xB0C */
4939 __IO uint32_t MAC_SYS_TIME_SCND_UPD; /**< , offset: 0xB10 */
4940 __IO uint32_t MAC_SYS_TIME_NSCND_UPD; /**< , offset: 0xB14 */
4941 __IO uint32_t MAC_SYS_TIMESTMP_ADDEND; /**< Time stamp addend register, offset: 0xB18 */
4942 __IO uint32_t MAC_SYS_TIME_HWORD_SCND; /**< , offset: 0xB1C */
4943 __I uint32_t MAC_SYS_TIMESTMP_STAT; /**< Time stamp status register, offset: 0xB20 */
4944 uint8_t RESERVED_13[12];
4945 __I uint32_t MAC_TX_TIMESTAMP_STATUS_NANOSECONDS; /**< Tx timestamp status nanoseconds, offset: 0xB30 */
4946 __I uint32_t MAC_TX_TIMESTAMP_STATUS_SECONDS; /**< Tx timestamp status seconds, offset: 0xB34 */
4947 uint8_t RESERVED_14[32];
4948 __IO uint32_t MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND; /**< Timestamp ingress correction, offset: 0xB58 */
4949 __IO uint32_t MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND; /**< Timestamp egress correction, offset: 0xB5C */
4950 uint8_t RESERVED_15[160];
4951 __IO uint32_t MTL_OP_MODE; /**< MTL Operation Mode Register, offset: 0xC00 */
4952 uint8_t RESERVED_16[28];
4953 __I uint32_t MTL_INTR_STAT; /**< MTL Interrupt Status register, offset: 0xC20 */
4954 uint8_t RESERVED_17[12];
4955 __IO uint32_t MTL_RXQ_DMA_MAP; /**< MTL Receive Queue and DMA Channel Mapping register, offset: 0xC30 */
4956 uint8_t RESERVED_18[204];
4957 struct { /* offset: 0xD00, array step: 0x40 */
4958 __IO uint32_t MTL_TXQX_OP_MODE; /**< MTL TxQx Operation Mode register, array offset: 0xD00, array step: 0x40 */
4959 __I uint32_t MTL_TXQX_UNDRFLW; /**< MTL TxQx Underflow register, array offset: 0xD04, array step: 0x40 */
4960 __I uint32_t MTL_TXQX_DBG; /**< MTL TxQx Debug register, array offset: 0xD08, array step: 0x40 */
4961 uint8_t RESERVED_0[4];
4962 __IO uint32_t MTL_TXQX_ETS_CTRL; /**< MTL TxQx ETS control register, only TxQ1 support, array offset: 0xD10, array step: 0x40 */
4963 __I uint32_t MTL_TXQX_ETS_STAT; /**< MTL TxQx ETS Status register, array offset: 0xD14, array step: 0x40 */
4964 __IO uint32_t MTL_TXQX_QNTM_WGHT; /**< , array offset: 0xD18, array step: 0x40 */
4965 __IO uint32_t MTL_TXQX_SNDSLP_CRDT; /**< MTL TxQx SendSlopCredit register, only TxQ1 support, array offset: 0xD1C, array step: 0x40 */
4966 __IO uint32_t MTL_TXQX_HI_CRDT; /**< MTL TxQx hiCredit register, only TxQ1 support, array offset: 0xD20, array step: 0x40 */
4967 __IO uint32_t MTL_TXQX_LO_CRDT; /**< MTL TxQx loCredit register, only TxQ1 support, array offset: 0xD24, array step: 0x40 */
4968 uint8_t RESERVED_1[4];
4969 __IO uint32_t MTL_TXQX_INTCTRL_STAT; /**< , array offset: 0xD2C, array step: 0x40 */
4970 __IO uint32_t MTL_RXQX_OP_MODE; /**< MTL RxQx Operation Mode register, array offset: 0xD30, array step: 0x40 */
4971 __I uint32_t MTL_RXQX_MISSPKT_OVRFLW_CNT; /**< MTL RxQx Missed Packet Overflow Counter register, array offset: 0xD34, array step: 0x40 */
4972 __I uint32_t MTL_RXQX_DBG; /**< MTL RxQx Debug register, array offset: 0xD38, array step: 0x40 */
4973 __IO uint32_t MTL_RXQX_CTRL; /**< MTL RxQx Control register, array offset: 0xD3C, array step: 0x40 */
4974 } MTL_QUEUE[2];
4975 uint8_t RESERVED_19[640];
4976 __IO uint32_t DMA_MODE; /**< DMA mode register, offset: 0x1000 */
4977 __IO uint32_t DMA_SYSBUS_MODE; /**< DMA System Bus mode, offset: 0x1004 */
4978 __IO uint32_t DMA_INTR_STAT; /**< DMA Interrupt status, offset: 0x1008 */
4979 __I uint32_t DMA_DBG_STAT; /**< DMA Debug Status, offset: 0x100C */
4980 uint8_t RESERVED_20[240];
4981 struct { /* offset: 0x1100, array step: 0x80 */
4982 __IO uint32_t DMA_CHX_CTRL; /**< DMA Channelx Control, array offset: 0x1100, array step: 0x80 */
4983 __IO uint32_t DMA_CHX_TX_CTRL; /**< DMA Channelx Transmit Control, array offset: 0x1104, array step: 0x80 */
4984 __IO uint32_t DMA_CHX_RX_CTRL; /**< DMA Channelx Receive Control, array offset: 0x1108, array step: 0x80 */
4985 uint8_t RESERVED_0[8];
4986 __IO uint32_t DMA_CHX_TXDESC_LIST_ADDR; /**< , array offset: 0x1114, array step: 0x80 */
4987 uint8_t RESERVED_1[4];
4988 __IO uint32_t DMA_CHX_RXDESC_LIST_ADDR; /**< , array offset: 0x111C, array step: 0x80 */
4989 __IO uint32_t DMA_CHX_TXDESC_TAIL_PTR; /**< , array offset: 0x1120, array step: 0x80 */
4990 uint8_t RESERVED_2[4];
4991 __IO uint32_t DMA_CHX_RXDESC_TAIL_PTR; /**< , array offset: 0x1128, array step: 0x80 */
4992 __IO uint32_t DMA_CHX_TXDESC_RING_LENGTH; /**< , array offset: 0x112C, array step: 0x80 */
4993 __IO uint32_t DMA_CHX_RXDESC_RING_LENGTH; /**< Channelx Rx descriptor Ring Length, array offset: 0x1130, array step: 0x80 */
4994 __IO uint32_t DMA_CHX_INT_EN; /**< Channelx Interrupt Enable, array offset: 0x1134, array step: 0x80 */
4995 __IO uint32_t DMA_CHX_RX_INT_WDTIMER; /**< Receive Interrupt Watchdog Timer, array offset: 0x1138, array step: 0x80 */
4996 __IO uint32_t DMA_CHX_SLOT_FUNC_CTRL_STAT; /**< Slot Function Control and Status, array offset: 0x113C, array step: 0x80 */
4997 uint8_t RESERVED_3[4];
4998 __I uint32_t DMA_CHX_CUR_HST_TXDESC; /**< Channelx Current Host Transmit descriptor, array offset: 0x1144, array step: 0x80 */
4999 uint8_t RESERVED_4[4];
5000 __I uint32_t DMA_CHX_CUR_HST_RXDESC; /**< , array offset: 0x114C, array step: 0x80 */
5001 uint8_t RESERVED_5[4];
5002 __I uint32_t DMA_CHX_CUR_HST_TXBUF; /**< , array offset: 0x1154, array step: 0x80 */
5003 uint8_t RESERVED_6[4];
5004 __I uint32_t DMA_CHX_CUR_HST_RXBUF; /**< Channelx Current Application Receive Buffer Address, array offset: 0x115C, array step: 0x80 */
5005 __IO uint32_t DMA_CHX_STAT; /**< Channelx DMA status register, array offset: 0x1160, array step: 0x80 */
5006 uint8_t RESERVED_7[8];
5007 __IO uint32_t DMA_CHX_MISS_FRAME_CNT; /**< Channelx missed frame count., array offset: 0x116C, array step: 0x80 */
5008 uint8_t RESERVED_8[16];
5009 } DMA_CH[2];
5010} ENET_Type;
5011
5012/* ----------------------------------------------------------------------------
5013 -- ENET Register Masks
5014 ---------------------------------------------------------------------------- */
5015
5016/*!
5017 * @addtogroup ENET_Register_Masks ENET Register Masks
5018 * @{
5019 */
5020
5021/*! @name MAC_CONFIG - MAC configuration register */
5022/*! @{ */
5023#define ENET_MAC_CONFIG_RE_MASK (0x1U)
5024#define ENET_MAC_CONFIG_RE_SHIFT (0U)
5025/*! RE - Receiver Enable When this bit is set, the receiver state machine of the MAC is enabled for
5026 * receiving frames from the MII.
5027 */
5028#define ENET_MAC_CONFIG_RE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_RE_SHIFT)) & ENET_MAC_CONFIG_RE_MASK)
5029#define ENET_MAC_CONFIG_TE_MASK (0x2U)
5030#define ENET_MAC_CONFIG_TE_SHIFT (1U)
5031/*! TE - Transmitter Enable When this bit is set, the transmit state machine of the MAC is enabled for transmission on the MII.
5032 */
5033#define ENET_MAC_CONFIG_TE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_TE_SHIFT)) & ENET_MAC_CONFIG_TE_MASK)
5034#define ENET_MAC_CONFIG_PRELEN_MASK (0xCU)
5035#define ENET_MAC_CONFIG_PRELEN_SHIFT (2U)
5036/*! PRELEN - Preamble Length for Transmit packets These bits control the number of preamble bytes
5037 * that are added to the beginning of every Tx packet.
5038 */
5039#define ENET_MAC_CONFIG_PRELEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_PRELEN_SHIFT)) & ENET_MAC_CONFIG_PRELEN_MASK)
5040#define ENET_MAC_CONFIG_DC_MASK (0x10U)
5041#define ENET_MAC_CONFIG_DC_SHIFT (4U)
5042/*! DC - Deferral Check When this bit is set, the deferral check function is enabled in the MAC.
5043 */
5044#define ENET_MAC_CONFIG_DC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_DC_SHIFT)) & ENET_MAC_CONFIG_DC_MASK)
5045#define ENET_MAC_CONFIG_BL_MASK (0x60U)
5046#define ENET_MAC_CONFIG_BL_SHIFT (5U)
5047/*! BL - Back-Off Limit The Back-Off limit determines the random integer number (r) of slot time
5048 * delays (4,096 bit times for 1000 Mbps and 512 bit times for 10/100 Mbps) the MAC waits before
5049 * rescheduling a transmission attempt during retries after a collision.
5050 */
5051#define ENET_MAC_CONFIG_BL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_BL_SHIFT)) & ENET_MAC_CONFIG_BL_MASK)
5052#define ENET_MAC_CONFIG_DR_MASK (0x100U)
5053#define ENET_MAC_CONFIG_DR_SHIFT (8U)
5054/*! DR - Disable Retry When this bit is set, the MAC will attempt only one transmission.
5055 */
5056#define ENET_MAC_CONFIG_DR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_DR_SHIFT)) & ENET_MAC_CONFIG_DR_MASK)
5057#define ENET_MAC_CONFIG_DCRS_MASK (0x200U)
5058#define ENET_MAC_CONFIG_DCRS_SHIFT (9U)
5059/*! DCRS - Disable Carrier Sense During Transmission When this bit is set, the MAC transmitter
5060 * ignores the MII CRS signal during packet transmission in the half-duplex mode.
5061 */
5062#define ENET_MAC_CONFIG_DCRS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_DCRS_SHIFT)) & ENET_MAC_CONFIG_DCRS_MASK)
5063#define ENET_MAC_CONFIG_DO_MASK (0x400U)
5064#define ENET_MAC_CONFIG_DO_SHIFT (10U)
5065/*! DO - Disable Receive Own When this bit is set, the MAC disables the reception of frames when the
5066 * gmii_txen_o is asserted in Half-Duplex mode.
5067 */
5068#define ENET_MAC_CONFIG_DO(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_DO_SHIFT)) & ENET_MAC_CONFIG_DO_MASK)
5069#define ENET_MAC_CONFIG_ECRSFD_MASK (0x800U)
5070#define ENET_MAC_CONFIG_ECRSFD_SHIFT (11U)
5071/*! ECRSFD - Enable Carrier Sense Before Transmission in Full-Duplex Mode When this bit is set, the
5072 * MAC transmitter checks the CRS signal before packet transmission in the full-duplex mode.
5073 */
5074#define ENET_MAC_CONFIG_ECRSFD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_ECRSFD_SHIFT)) & ENET_MAC_CONFIG_ECRSFD_MASK)
5075#define ENET_MAC_CONFIG_LM_MASK (0x1000U)
5076#define ENET_MAC_CONFIG_LM_SHIFT (12U)
5077/*! LM - Loopback Mode When this bit is set, the MAC operates in loopback mode at MII.
5078 */
5079#define ENET_MAC_CONFIG_LM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_LM_SHIFT)) & ENET_MAC_CONFIG_LM_MASK)
5080#define ENET_MAC_CONFIG_DM_MASK (0x2000U)
5081#define ENET_MAC_CONFIG_DM_SHIFT (13U)
5082/*! DM - Duplex Mode When this bit is set, the MAC operates in a Full-Duplex mode where it can
5083 * transmit and receive simultaneously.
5084 */
5085#define ENET_MAC_CONFIG_DM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_DM_SHIFT)) & ENET_MAC_CONFIG_DM_MASK)
5086#define ENET_MAC_CONFIG_FES_MASK (0x4000U)
5087#define ENET_MAC_CONFIG_FES_SHIFT (14U)
5088/*! FES - Speed Indicates the speed in Fast Ethernet (MII) mode: This bit is reserved (RO) by
5089 * default and is enabled only when RMII/SMII is enabled during configuration.
5090 */
5091#define ENET_MAC_CONFIG_FES(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_FES_SHIFT)) & ENET_MAC_CONFIG_FES_MASK)
5092#define ENET_MAC_CONFIG_PS_MASK (0x8000U)
5093#define ENET_MAC_CONFIG_PS_SHIFT (15U)
5094/*! PS - Portselect.
5095 */
5096#define ENET_MAC_CONFIG_PS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_PS_SHIFT)) & ENET_MAC_CONFIG_PS_MASK)
5097#define ENET_MAC_CONFIG_JE_MASK (0x10000U)
5098#define ENET_MAC_CONFIG_JE_SHIFT (16U)
5099/*! JE - Jumbo Frame Enable When this bit is set, MAC allows Jumbo frames of 9,018 bytes (9,022
5100 * bytes for tagged frames) without reporting a giant frame error in the receive frame status.
5101 */
5102#define ENET_MAC_CONFIG_JE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_JE_SHIFT)) & ENET_MAC_CONFIG_JE_MASK)
5103#define ENET_MAC_CONFIG_JD_MASK (0x20000U)
5104#define ENET_MAC_CONFIG_JD_SHIFT (17U)
5105/*! JD - Jabber Disable When this bit is set, the MAC disables the jabber timer on the transmitter,
5106 * and can transfer frames of up to 16,384 bytes.
5107 */
5108#define ENET_MAC_CONFIG_JD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_JD_SHIFT)) & ENET_MAC_CONFIG_JD_MASK)
5109#define ENET_MAC_CONFIG_BE_MASK (0x40000U)
5110#define ENET_MAC_CONFIG_BE_SHIFT (18U)
5111/*! BE - Packet Burst Enable When this bit is set, the MAC allows packet bursting during
5112 * transmission in the MII half-duplex mode.
5113 */
5114#define ENET_MAC_CONFIG_BE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_BE_SHIFT)) & ENET_MAC_CONFIG_BE_MASK)
5115#define ENET_MAC_CONFIG_WD_MASK (0x80000U)
5116#define ENET_MAC_CONFIG_WD_SHIFT (19U)
5117/*! WD - Watchdog Disable When this bit is set, the MAC disables the watchdog timer on the receiver,
5118 * and can receive frames of up to 16,384 bytes.
5119 */
5120#define ENET_MAC_CONFIG_WD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_WD_SHIFT)) & ENET_MAC_CONFIG_WD_MASK)
5121#define ENET_MAC_CONFIG_ACS_MASK (0x100000U)
5122#define ENET_MAC_CONFIG_ACS_SHIFT (20U)
5123/*! ACS - Automatic Pad or CRC Stripping When this bit is set, the MAC strips the Pad or FCS field
5124 * on the incoming packets only if the value of the length field is less than 1,536 bytes.
5125 */
5126#define ENET_MAC_CONFIG_ACS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_ACS_SHIFT)) & ENET_MAC_CONFIG_ACS_MASK)
5127#define ENET_MAC_CONFIG_CST_MASK (0x200000U)
5128#define ENET_MAC_CONFIG_CST_SHIFT (21U)
5129/*! CST - CRC stripping for Type packets When this bit is set, the last four bytes (FCS) of all
5130 * packets of Ether type (type field greater than 1,536) are stripped and dropped before forwarding
5131 * the packet to the application.
5132 */
5133#define ENET_MAC_CONFIG_CST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_CST_SHIFT)) & ENET_MAC_CONFIG_CST_MASK)
5134#define ENET_MAC_CONFIG_S2KP_MASK (0x400000U)
5135#define ENET_MAC_CONFIG_S2KP_SHIFT (22U)
5136/*! S2KP - IEEE 802.
5137 */
5138#define ENET_MAC_CONFIG_S2KP(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_S2KP_SHIFT)) & ENET_MAC_CONFIG_S2KP_MASK)
5139#define ENET_MAC_CONFIG_GPSLCE_MASK (0x800000U)
5140#define ENET_MAC_CONFIG_GPSLCE_SHIFT (23U)
5141/*! GPSLCE - Giant Packet Size Limit Control Enable When this bit is set, the MAC considers the
5142 * value in GPSL field in MAC Ext Configuration register to declare a received packet as Giant packet.
5143 */
5144#define ENET_MAC_CONFIG_GPSLCE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_GPSLCE_SHIFT)) & ENET_MAC_CONFIG_GPSLCE_MASK)
5145#define ENET_MAC_CONFIG_IPG_MASK (0x7000000U)
5146#define ENET_MAC_CONFIG_IPG_SHIFT (24U)
5147/*! IPG - Inter-Packet Gap These bits control the minimum IPG between packets during transmission.
5148 */
5149#define ENET_MAC_CONFIG_IPG(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_IPG_SHIFT)) & ENET_MAC_CONFIG_IPG_MASK)
5150#define ENET_MAC_CONFIG_IPC_MASK (0x8000000U)
5151#define ENET_MAC_CONFIG_IPC_SHIFT (27U)
5152/*! IPC - Checksum Offload When set, this bit enables the IPv4 header checksum checking and IPv4 or
5153 * IPv6 TCP, UDP, or ICMP payload checksum checking.
5154 */
5155#define ENET_MAC_CONFIG_IPC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_CONFIG_IPC_SHIFT)) & ENET_MAC_CONFIG_IPC_MASK)
5156/*! @} */
5157
5158/*! @name MAC_EXT_CONFIG - */
5159/*! @{ */
5160#define ENET_MAC_EXT_CONFIG_GPSL_MASK (0x3FFFU)
5161#define ENET_MAC_EXT_CONFIG_GPSL_SHIFT (0U)
5162/*! GPSL - Giant Packet Size Limit If the received packet size is greater than the value programmed
5163 * in this field in units of bytes, the MAC declares the received packet as Giant packet.
5164 */
5165#define ENET_MAC_EXT_CONFIG_GPSL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_EXT_CONFIG_GPSL_SHIFT)) & ENET_MAC_EXT_CONFIG_GPSL_MASK)
5166#define ENET_MAC_EXT_CONFIG_DCRCC_MASK (0x10000U)
5167#define ENET_MAC_EXT_CONFIG_DCRCC_SHIFT (16U)
5168/*! DCRCC - Disable CRC Checking for Received Packets When this bit is set, the MAC receiver does
5169 * not check the CRC field in the received packets.
5170 */
5171#define ENET_MAC_EXT_CONFIG_DCRCC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_EXT_CONFIG_DCRCC_SHIFT)) & ENET_MAC_EXT_CONFIG_DCRCC_MASK)
5172#define ENET_MAC_EXT_CONFIG_SPEN_MASK (0x20000U)
5173#define ENET_MAC_EXT_CONFIG_SPEN_SHIFT (17U)
5174/*! SPEN - Slow Protocol Detection Enable When this bit is set, MAC processes the Slow Protocol
5175 * packets (Ether Type 0x8809) and provides the Rx status.
5176 */
5177#define ENET_MAC_EXT_CONFIG_SPEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_EXT_CONFIG_SPEN_SHIFT)) & ENET_MAC_EXT_CONFIG_SPEN_MASK)
5178#define ENET_MAC_EXT_CONFIG_USP_MASK (0x40000U)
5179#define ENET_MAC_EXT_CONFIG_USP_SHIFT (18U)
5180/*! USP - Unicast Slow Protocol Packet Detect When this bit is set, the MAC detects the Slow
5181 * Protocol packets with unicast address of the station specified in the MAC Address High Table 747 and
5182 * MAC Address Low Table 748 registers.
5183 */
5184#define ENET_MAC_EXT_CONFIG_USP(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_EXT_CONFIG_USP_SHIFT)) & ENET_MAC_EXT_CONFIG_USP_MASK)
5185/*! @} */
5186
5187/*! @name MAC_FRAME_FILTER - MAC frame filter register */
5188/*! @{ */
5189#define ENET_MAC_FRAME_FILTER_PR_MASK (0x1U)
5190#define ENET_MAC_FRAME_FILTER_PR_SHIFT (0U)
5191/*! PR - Promiscuous Mode When this bit is set, the Address Filter module passes all incoming frames
5192 * regardless of its destination or source address.
5193 */
5194#define ENET_MAC_FRAME_FILTER_PR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_PR_SHIFT)) & ENET_MAC_FRAME_FILTER_PR_MASK)
5195#define ENET_MAC_FRAME_FILTER_DAIF_MASK (0x8U)
5196#define ENET_MAC_FRAME_FILTER_DAIF_SHIFT (3U)
5197/*! DAIF - DA Inverse Filtering When this bit is set, the Address Check block operates in inverse
5198 * filtering mode for the DA address comparison for both unicast and multicast frames.
5199 */
5200#define ENET_MAC_FRAME_FILTER_DAIF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_DAIF_SHIFT)) & ENET_MAC_FRAME_FILTER_DAIF_MASK)
5201#define ENET_MAC_FRAME_FILTER_PM_MASK (0x10U)
5202#define ENET_MAC_FRAME_FILTER_PM_SHIFT (4U)
5203/*! PM - Pass All Multicast When set, this bit indicates that all received frames with a multicast
5204 * destination address (first bit in the destination address field is '1') are passed.
5205 */
5206#define ENET_MAC_FRAME_FILTER_PM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_PM_SHIFT)) & ENET_MAC_FRAME_FILTER_PM_MASK)
5207#define ENET_MAC_FRAME_FILTER_DBF_MASK (0x20U)
5208#define ENET_MAC_FRAME_FILTER_DBF_SHIFT (5U)
5209/*! DBF - Disable Broadcast Frames When this bit is set, the AFM module filters all incoming broadcast frames.
5210 */
5211#define ENET_MAC_FRAME_FILTER_DBF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_DBF_SHIFT)) & ENET_MAC_FRAME_FILTER_DBF_MASK)
5212#define ENET_MAC_FRAME_FILTER_PCF_MASK (0xC0U)
5213#define ENET_MAC_FRAME_FILTER_PCF_SHIFT (6U)
5214/*! PCF - Pass Control Frames These bits control the forwarding of all control frames (including
5215 * unicast and multicast PAUSE frames).
5216 */
5217#define ENET_MAC_FRAME_FILTER_PCF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_PCF_SHIFT)) & ENET_MAC_FRAME_FILTER_PCF_MASK)
5218#define ENET_MAC_FRAME_FILTER_SAIF_MASK (0x100U)
5219#define ENET_MAC_FRAME_FILTER_SAIF_SHIFT (8U)
5220/*! SAIF - SA Inverse Filtering When this bit is set, the Address Check block operates in the
5221 * inverse filtering mode for SA address comparison.
5222 */
5223#define ENET_MAC_FRAME_FILTER_SAIF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_SAIF_SHIFT)) & ENET_MAC_FRAME_FILTER_SAIF_MASK)
5224#define ENET_MAC_FRAME_FILTER_SAF_MASK (0x200U)
5225#define ENET_MAC_FRAME_FILTER_SAF_SHIFT (9U)
5226/*! SAF - Source Address Filter Enable When this bit is set, the MAC compares the SA field of the
5227 * received packets with the values programmed in the enabled SA registers.
5228 */
5229#define ENET_MAC_FRAME_FILTER_SAF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_SAF_SHIFT)) & ENET_MAC_FRAME_FILTER_SAF_MASK)
5230#define ENET_MAC_FRAME_FILTER_RA_MASK (0x80000000U)
5231#define ENET_MAC_FRAME_FILTER_RA_SHIFT (31U)
5232/*! RA - Receive all When this bit is set, the MAC Receiver module passes to the Application all
5233 * frames received irrespective of whether they pass the address filter.
5234 */
5235#define ENET_MAC_FRAME_FILTER_RA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_FRAME_FILTER_RA_SHIFT)) & ENET_MAC_FRAME_FILTER_RA_MASK)
5236/*! @} */
5237
5238/*! @name MAC_WD_TIMEROUT - MAC watchdog Timeout register */
5239/*! @{ */
5240#define ENET_MAC_WD_TIMEROUT_WTO_MASK (0xFU)
5241#define ENET_MAC_WD_TIMEROUT_WTO_SHIFT (0U)
5242/*! WTO - Watchdog Timeout When the PWE bit is set and the WD bit of the MAC Configuration register
5243 * Table 722 is reset, this field is used as watchdog timeout for a received packet.
5244 */
5245#define ENET_MAC_WD_TIMEROUT_WTO(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_WD_TIMEROUT_WTO_SHIFT)) & ENET_MAC_WD_TIMEROUT_WTO_MASK)
5246#define ENET_MAC_WD_TIMEROUT_PWE_MASK (0x100U)
5247#define ENET_MAC_WD_TIMEROUT_PWE_SHIFT (8U)
5248/*! PWE - Programmable Watchdog Enable When this bit is set and the WD bit of the MAC Configuration
5249 * register Table 722 is reset, the WTO field is used as watchdog timeout for a received packet.
5250 */
5251#define ENET_MAC_WD_TIMEROUT_PWE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_WD_TIMEROUT_PWE_SHIFT)) & ENET_MAC_WD_TIMEROUT_PWE_MASK)
5252/*! @} */
5253
5254/*! @name MAC_VLAN_TAG - MAC vlan tag register */
5255/*! @{ */
5256#define ENET_MAC_VLAN_TAG_VL_MASK (0xFFFFU)
5257#define ENET_MAC_VLAN_TAG_VL_SHIFT (0U)
5258/*! VL - VLAN Tag Identifier for Receive Packets.
5259 */
5260#define ENET_MAC_VLAN_TAG_VL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_VL_SHIFT)) & ENET_MAC_VLAN_TAG_VL_MASK)
5261#define ENET_MAC_VLAN_TAG_ETV_MASK (0x10000U)
5262#define ENET_MAC_VLAN_TAG_ETV_SHIFT (16U)
5263/*! ETV - Enable 12-Bit VLAN Tag Comparison.
5264 */
5265#define ENET_MAC_VLAN_TAG_ETV(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_ETV_SHIFT)) & ENET_MAC_VLAN_TAG_ETV_MASK)
5266#define ENET_MAC_VLAN_TAG_VTIM_MASK (0x20000U)
5267#define ENET_MAC_VLAN_TAG_VTIM_SHIFT (17U)
5268/*! VTIM - VLAN Tag Inverse Match Enable.
5269 */
5270#define ENET_MAC_VLAN_TAG_VTIM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_VTIM_SHIFT)) & ENET_MAC_VLAN_TAG_VTIM_MASK)
5271#define ENET_MAC_VLAN_TAG_ESVL_MASK (0x40000U)
5272#define ENET_MAC_VLAN_TAG_ESVL_SHIFT (18U)
5273/*! ESVL - Enable S-VLAN.
5274 */
5275#define ENET_MAC_VLAN_TAG_ESVL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_ESVL_SHIFT)) & ENET_MAC_VLAN_TAG_ESVL_MASK)
5276#define ENET_MAC_VLAN_TAG_ERSVLM_MASK (0x80000U)
5277#define ENET_MAC_VLAN_TAG_ERSVLM_SHIFT (19U)
5278/*! ERSVLM - Enable Receive S-VLAN Match.
5279 */
5280#define ENET_MAC_VLAN_TAG_ERSVLM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_ERSVLM_SHIFT)) & ENET_MAC_VLAN_TAG_ERSVLM_MASK)
5281#define ENET_MAC_VLAN_TAG_DOVLTC_MASK (0x100000U)
5282#define ENET_MAC_VLAN_TAG_DOVLTC_SHIFT (20U)
5283/*! DOVLTC - Disable VLAN Type Check.
5284 */
5285#define ENET_MAC_VLAN_TAG_DOVLTC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_DOVLTC_SHIFT)) & ENET_MAC_VLAN_TAG_DOVLTC_MASK)
5286#define ENET_MAC_VLAN_TAG_EVLS_MASK (0x600000U)
5287#define ENET_MAC_VLAN_TAG_EVLS_SHIFT (21U)
5288/*! EVLS - Enable VLAN Tag Stripping on Receive.
5289 */
5290#define ENET_MAC_VLAN_TAG_EVLS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_EVLS_SHIFT)) & ENET_MAC_VLAN_TAG_EVLS_MASK)
5291#define ENET_MAC_VLAN_TAG_EVLRXS_MASK (0x1000000U)
5292#define ENET_MAC_VLAN_TAG_EVLRXS_SHIFT (24U)
5293/*! EVLRXS - Enable VLAN Tag in Rx status.
5294 */
5295#define ENET_MAC_VLAN_TAG_EVLRXS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_EVLRXS_SHIFT)) & ENET_MAC_VLAN_TAG_EVLRXS_MASK)
5296#define ENET_MAC_VLAN_TAG_VTHM_MASK (0x2000000U)
5297#define ENET_MAC_VLAN_TAG_VTHM_SHIFT (25U)
5298/*! VTHM - Disable VLAN Type Check.
5299 */
5300#define ENET_MAC_VLAN_TAG_VTHM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_VTHM_SHIFT)) & ENET_MAC_VLAN_TAG_VTHM_MASK)
5301#define ENET_MAC_VLAN_TAG_EDVLP_MASK (0x4000000U)
5302#define ENET_MAC_VLAN_TAG_EDVLP_SHIFT (26U)
5303/*! EDVLP - Enable Double VLAN Processing.
5304 */
5305#define ENET_MAC_VLAN_TAG_EDVLP(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_EDVLP_SHIFT)) & ENET_MAC_VLAN_TAG_EDVLP_MASK)
5306#define ENET_MAC_VLAN_TAG_ERIVLT_MASK (0x8000000U)
5307#define ENET_MAC_VLAN_TAG_ERIVLT_SHIFT (27U)
5308/*! ERIVLT - Enable Inner VLAN Tag.
5309 */
5310#define ENET_MAC_VLAN_TAG_ERIVLT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_ERIVLT_SHIFT)) & ENET_MAC_VLAN_TAG_ERIVLT_MASK)
5311#define ENET_MAC_VLAN_TAG_EIVLS_MASK (0x30000000U)
5312#define ENET_MAC_VLAN_TAG_EIVLS_SHIFT (28U)
5313/*! EIVLS - Enable Inner VLAN Tag Stripping on Receive.
5314 */
5315#define ENET_MAC_VLAN_TAG_EIVLS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_EIVLS_SHIFT)) & ENET_MAC_VLAN_TAG_EIVLS_MASK)
5316#define ENET_MAC_VLAN_TAG_EIVLRXS_MASK (0x80000000U)
5317#define ENET_MAC_VLAN_TAG_EIVLRXS_SHIFT (31U)
5318/*! EIVLRXS - Enable Inner VLAN Tag in Rx Status.
5319 */
5320#define ENET_MAC_VLAN_TAG_EIVLRXS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VLAN_TAG_EIVLRXS_SHIFT)) & ENET_MAC_VLAN_TAG_EIVLRXS_MASK)
5321/*! @} */
5322
5323/*! @name MAC_TX_FLOW_CTRL_Q - Transmit flow control register */
5324/*! @{ */
5325#define ENET_MAC_TX_FLOW_CTRL_Q_FCB_MASK (0x1U)
5326#define ENET_MAC_TX_FLOW_CTRL_Q_FCB_SHIFT (0U)
5327/*! FCB - Flow Control Busy/Backpressure Activate This register field can be read by the application
5328 * (Read), can be set to 1 by the application with a register write of 1 (Write Set), and is
5329 * cleared to 0 by the core (Self Clear).
5330 */
5331#define ENET_MAC_TX_FLOW_CTRL_Q_FCB(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_FLOW_CTRL_Q_FCB_SHIFT)) & ENET_MAC_TX_FLOW_CTRL_Q_FCB_MASK)
5332#define ENET_MAC_TX_FLOW_CTRL_Q_TFE_MASK (0x2U)
5333#define ENET_MAC_TX_FLOW_CTRL_Q_TFE_SHIFT (1U)
5334/*! TFE - Transmit Flow Control Enable In Full-Duplex mode, when this bit is set, the MAC enables
5335 * the flow control operation to transmit Pause frames.
5336 */
5337#define ENET_MAC_TX_FLOW_CTRL_Q_TFE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_FLOW_CTRL_Q_TFE_SHIFT)) & ENET_MAC_TX_FLOW_CTRL_Q_TFE_MASK)
5338#define ENET_MAC_TX_FLOW_CTRL_Q_PLT_MASK (0x70U)
5339#define ENET_MAC_TX_FLOW_CTRL_Q_PLT_SHIFT (4U)
5340/*! PLT - Pause Low Threshold This field configures the threshold of the PAUSE timer at which the
5341 * input flow control signal is checked for automatic retransmission of PAUSE Frame.
5342 */
5343#define ENET_MAC_TX_FLOW_CTRL_Q_PLT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_FLOW_CTRL_Q_PLT_SHIFT)) & ENET_MAC_TX_FLOW_CTRL_Q_PLT_MASK)
5344#define ENET_MAC_TX_FLOW_CTRL_Q_DZPQ_MASK (0x80U)
5345#define ENET_MAC_TX_FLOW_CTRL_Q_DZPQ_SHIFT (7U)
5346/*! DZPQ - Disable Zero-Quanta Pause When set, this bit disables the automatic generation of
5347 * Zero-Quanta Pause Control frames on the deassertion of the flow-control signal from the FIFO layer.
5348 */
5349#define ENET_MAC_TX_FLOW_CTRL_Q_DZPQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_FLOW_CTRL_Q_DZPQ_SHIFT)) & ENET_MAC_TX_FLOW_CTRL_Q_DZPQ_MASK)
5350#define ENET_MAC_TX_FLOW_CTRL_Q_PT_MASK (0xFFFF0000U)
5351#define ENET_MAC_TX_FLOW_CTRL_Q_PT_SHIFT (16U)
5352/*! PT - Pause time This field holds the value to be used in the Pause Time field in the transmit control frame.
5353 */
5354#define ENET_MAC_TX_FLOW_CTRL_Q_PT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_FLOW_CTRL_Q_PT_SHIFT)) & ENET_MAC_TX_FLOW_CTRL_Q_PT_MASK)
5355/*! @} */
5356
5357/* The count of ENET_MAC_TX_FLOW_CTRL_Q */
5358#define ENET_MAC_TX_FLOW_CTRL_Q_COUNT (2U)
5359
5360/*! @name MAC_RX_FLOW_CTRL - Receive flow control register */
5361/*! @{ */
5362#define ENET_MAC_RX_FLOW_CTRL_RFE_MASK (0x1U)
5363#define ENET_MAC_RX_FLOW_CTRL_RFE_SHIFT (0U)
5364/*! RFE - Receive Flow Control Enable When this bit is set and the MAC is operating in full-duplex
5365 * mode, the MAC decodes the received Pause packet and disables its transmitter for a specified
5366 * (Pause) time.
5367 */
5368#define ENET_MAC_RX_FLOW_CTRL_RFE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RX_FLOW_CTRL_RFE_SHIFT)) & ENET_MAC_RX_FLOW_CTRL_RFE_MASK)
5369#define ENET_MAC_RX_FLOW_CTRL_UP_MASK (0x2U)
5370#define ENET_MAC_RX_FLOW_CTRL_UP_SHIFT (1U)
5371/*! UP - Unicast Pause Packet Detect A pause packet is processed when it has the unique multicast
5372 * address specified in the IEEE 802.
5373 */
5374#define ENET_MAC_RX_FLOW_CTRL_UP(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RX_FLOW_CTRL_UP_SHIFT)) & ENET_MAC_RX_FLOW_CTRL_UP_MASK)
5375/*! @} */
5376
5377/*! @name MAC_TXQ_PRIO_MAP - */
5378/*! @{ */
5379#define ENET_MAC_TXQ_PRIO_MAP_PSTQ0_MASK (0xFFU)
5380#define ENET_MAC_TXQ_PRIO_MAP_PSTQ0_SHIFT (0U)
5381/*! PSTQ0 - Priorities Selected in Transmit Queue 0 This field holds the priorities assigned to Tx Queue 0 by the software.
5382 */
5383#define ENET_MAC_TXQ_PRIO_MAP_PSTQ0(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TXQ_PRIO_MAP_PSTQ0_SHIFT)) & ENET_MAC_TXQ_PRIO_MAP_PSTQ0_MASK)
5384#define ENET_MAC_TXQ_PRIO_MAP_PSTQ1_MASK (0xFF00U)
5385#define ENET_MAC_TXQ_PRIO_MAP_PSTQ1_SHIFT (8U)
5386/*! PSTQ1 - Priorities Selected in Transmit Queue 1 This bit is similar to the PSTQ0 bit.
5387 */
5388#define ENET_MAC_TXQ_PRIO_MAP_PSTQ1(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TXQ_PRIO_MAP_PSTQ1_SHIFT)) & ENET_MAC_TXQ_PRIO_MAP_PSTQ1_MASK)
5389/*! @} */
5390
5391/*! @name MAC_RXQ_CTRL - Receive Queue Control 0 register 0x0000 */
5392/*! @{ */
5393#define ENET_MAC_RXQ_CTRL_AVCPQ_MASK (0x7U)
5394#define ENET_MAC_RXQ_CTRL_AVCPQ_SHIFT (0U)
5395/*! AVCPQ - AV Untagged Control Packets Queue.
5396 */
5397#define ENET_MAC_RXQ_CTRL_AVCPQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_AVCPQ_SHIFT)) & ENET_MAC_RXQ_CTRL_AVCPQ_MASK)
5398#define ENET_MAC_RXQ_CTRL_PSRQ0_MASK (0xFFU)
5399#define ENET_MAC_RXQ_CTRL_PSRQ0_SHIFT (0U)
5400/*! PSRQ0 - Priorities Selected in the Receive Queue 0.
5401 */
5402#define ENET_MAC_RXQ_CTRL_PSRQ0(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_PSRQ0_SHIFT)) & ENET_MAC_RXQ_CTRL_PSRQ0_MASK)
5403#define ENET_MAC_RXQ_CTRL_RXQ0EN_MASK (0x3U)
5404#define ENET_MAC_RXQ_CTRL_RXQ0EN_SHIFT (0U)
5405/*! RXQ0EN - Receive Queue 0 Enable.
5406 */
5407#define ENET_MAC_RXQ_CTRL_RXQ0EN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_RXQ0EN_SHIFT)) & ENET_MAC_RXQ_CTRL_RXQ0EN_MASK)
5408#define ENET_MAC_RXQ_CTRL_RXQ1EN_MASK (0xCU)
5409#define ENET_MAC_RXQ_CTRL_RXQ1EN_SHIFT (2U)
5410/*! RXQ1EN - Receive Queue 1 Enable.
5411 */
5412#define ENET_MAC_RXQ_CTRL_RXQ1EN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_RXQ1EN_SHIFT)) & ENET_MAC_RXQ_CTRL_RXQ1EN_MASK)
5413#define ENET_MAC_RXQ_CTRL_AVPTPQ_MASK (0x70U)
5414#define ENET_MAC_RXQ_CTRL_AVPTPQ_SHIFT (4U)
5415/*! AVPTPQ - AV PTP Packets Queue.
5416 */
5417#define ENET_MAC_RXQ_CTRL_AVPTPQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_AVPTPQ_SHIFT)) & ENET_MAC_RXQ_CTRL_AVPTPQ_MASK)
5418#define ENET_MAC_RXQ_CTRL_PSRQ1_MASK (0xFF00U)
5419#define ENET_MAC_RXQ_CTRL_PSRQ1_SHIFT (8U)
5420/*! PSRQ1 - Priorities Selected in the Receive Queue 1.
5421 */
5422#define ENET_MAC_RXQ_CTRL_PSRQ1(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_PSRQ1_SHIFT)) & ENET_MAC_RXQ_CTRL_PSRQ1_MASK)
5423#define ENET_MAC_RXQ_CTRL_UPQ_MASK (0x7000U)
5424#define ENET_MAC_RXQ_CTRL_UPQ_SHIFT (12U)
5425/*! UPQ - Untagged Packet Queue.
5426 */
5427#define ENET_MAC_RXQ_CTRL_UPQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_UPQ_SHIFT)) & ENET_MAC_RXQ_CTRL_UPQ_MASK)
5428#define ENET_MAC_RXQ_CTRL_MCBCQ_MASK (0x70000U)
5429#define ENET_MAC_RXQ_CTRL_MCBCQ_SHIFT (16U)
5430/*! MCBCQ - Multicast and Broadcast Queue.
5431 */
5432#define ENET_MAC_RXQ_CTRL_MCBCQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_MCBCQ_SHIFT)) & ENET_MAC_RXQ_CTRL_MCBCQ_MASK)
5433#define ENET_MAC_RXQ_CTRL_PSRQ2_MASK (0xFF0000U)
5434#define ENET_MAC_RXQ_CTRL_PSRQ2_SHIFT (16U)
5435/*! PSRQ2 - Priorities Selected in the Receive Queue 2.
5436 */
5437#define ENET_MAC_RXQ_CTRL_PSRQ2(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_PSRQ2_SHIFT)) & ENET_MAC_RXQ_CTRL_PSRQ2_MASK)
5438#define ENET_MAC_RXQ_CTRL_MCBCQEN_MASK (0x100000U)
5439#define ENET_MAC_RXQ_CTRL_MCBCQEN_SHIFT (20U)
5440/*! MCBCQEN - Multicast and Broadcast Queue Enable.
5441 */
5442#define ENET_MAC_RXQ_CTRL_MCBCQEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_MCBCQEN_SHIFT)) & ENET_MAC_RXQ_CTRL_MCBCQEN_MASK)
5443#define ENET_MAC_RXQ_CTRL_PSRQ3_MASK (0xFF000000U)
5444#define ENET_MAC_RXQ_CTRL_PSRQ3_SHIFT (24U)
5445/*! PSRQ3 - Priorities Selected in the Receive Queue 3.
5446 */
5447#define ENET_MAC_RXQ_CTRL_PSRQ3(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXQ_CTRL_PSRQ3_SHIFT)) & ENET_MAC_RXQ_CTRL_PSRQ3_MASK)
5448/*! @} */
5449
5450/* The count of ENET_MAC_RXQ_CTRL */
5451#define ENET_MAC_RXQ_CTRL_COUNT (3U)
5452
5453/*! @name MAC_INTR_STAT - Interrupt status register 0x0000 */
5454/*! @{ */
5455#define ENET_MAC_INTR_STAT_PHYIS_MASK (0x8U)
5456#define ENET_MAC_INTR_STAT_PHYIS_SHIFT (3U)
5457/*! PHYIS - PHY Interrupt.
5458 */
5459#define ENET_MAC_INTR_STAT_PHYIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_PHYIS_SHIFT)) & ENET_MAC_INTR_STAT_PHYIS_MASK)
5460#define ENET_MAC_INTR_STAT_PMTIS_MASK (0x10U)
5461#define ENET_MAC_INTR_STAT_PMTIS_SHIFT (4U)
5462/*! PMTIS - PMT Interrupt Status.
5463 */
5464#define ENET_MAC_INTR_STAT_PMTIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_PMTIS_SHIFT)) & ENET_MAC_INTR_STAT_PMTIS_MASK)
5465#define ENET_MAC_INTR_STAT_LPIIS_MASK (0x20U)
5466#define ENET_MAC_INTR_STAT_LPIIS_SHIFT (5U)
5467/*! LPIIS - LPI Interrupt Status.
5468 */
5469#define ENET_MAC_INTR_STAT_LPIIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_LPIIS_SHIFT)) & ENET_MAC_INTR_STAT_LPIIS_MASK)
5470#define ENET_MAC_INTR_STAT_TSIS_MASK (0x1000U)
5471#define ENET_MAC_INTR_STAT_TSIS_SHIFT (12U)
5472/*! TSIS - Timestamp interrupt status.
5473 */
5474#define ENET_MAC_INTR_STAT_TSIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_TSIS_SHIFT)) & ENET_MAC_INTR_STAT_TSIS_MASK)
5475#define ENET_MAC_INTR_STAT_TXSTSIS_MASK (0x2000U)
5476#define ENET_MAC_INTR_STAT_TXSTSIS_SHIFT (13U)
5477/*! TXSTSIS - Transmit Status Interrupt.
5478 */
5479#define ENET_MAC_INTR_STAT_TXSTSIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_TXSTSIS_SHIFT)) & ENET_MAC_INTR_STAT_TXSTSIS_MASK)
5480#define ENET_MAC_INTR_STAT_RXSTSIS_MASK (0x4000U)
5481#define ENET_MAC_INTR_STAT_RXSTSIS_SHIFT (14U)
5482/*! RXSTSIS - Receive Status Interrupt.
5483 */
5484#define ENET_MAC_INTR_STAT_RXSTSIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_STAT_RXSTSIS_SHIFT)) & ENET_MAC_INTR_STAT_RXSTSIS_MASK)
5485/*! @} */
5486
5487/*! @name MAC_INTR_EN - Interrupt enable register 0x0000 */
5488/*! @{ */
5489#define ENET_MAC_INTR_EN_PHYIE_MASK (0x8U)
5490#define ENET_MAC_INTR_EN_PHYIE_SHIFT (3U)
5491/*! PHYIE - PHY Interrupt Enable.
5492 */
5493#define ENET_MAC_INTR_EN_PHYIE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_PHYIE_SHIFT)) & ENET_MAC_INTR_EN_PHYIE_MASK)
5494#define ENET_MAC_INTR_EN_PMTIE_MASK (0x10U)
5495#define ENET_MAC_INTR_EN_PMTIE_SHIFT (4U)
5496/*! PMTIE - PMT Interrupt Enable.
5497 */
5498#define ENET_MAC_INTR_EN_PMTIE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_PMTIE_SHIFT)) & ENET_MAC_INTR_EN_PMTIE_MASK)
5499#define ENET_MAC_INTR_EN_LPIIE_MASK (0x20U)
5500#define ENET_MAC_INTR_EN_LPIIE_SHIFT (5U)
5501/*! LPIIE - LPI Interrupt Enable.
5502 */
5503#define ENET_MAC_INTR_EN_LPIIE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_LPIIE_SHIFT)) & ENET_MAC_INTR_EN_LPIIE_MASK)
5504#define ENET_MAC_INTR_EN_TSIE_MASK (0x1000U)
5505#define ENET_MAC_INTR_EN_TSIE_SHIFT (12U)
5506/*! TSIE - Timestamp Interrupt Enable.
5507 */
5508#define ENET_MAC_INTR_EN_TSIE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_TSIE_SHIFT)) & ENET_MAC_INTR_EN_TSIE_MASK)
5509#define ENET_MAC_INTR_EN_TXSTSIE_MASK (0x2000U)
5510#define ENET_MAC_INTR_EN_TXSTSIE_SHIFT (13U)
5511/*! TXSTSIE - Transmit Status Interrupt Enable.
5512 */
5513#define ENET_MAC_INTR_EN_TXSTSIE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_TXSTSIE_SHIFT)) & ENET_MAC_INTR_EN_TXSTSIE_MASK)
5514#define ENET_MAC_INTR_EN_RXSTSIS_MASK (0x4000U)
5515#define ENET_MAC_INTR_EN_RXSTSIS_SHIFT (14U)
5516/*! RXSTSIS - Receive Status Interrupt Enable.
5517 */
5518#define ENET_MAC_INTR_EN_RXSTSIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_INTR_EN_RXSTSIS_SHIFT)) & ENET_MAC_INTR_EN_RXSTSIS_MASK)
5519/*! @} */
5520
5521/*! @name MAC_RXTX_STAT - Receive Transmit Status register */
5522/*! @{ */
5523#define ENET_MAC_RXTX_STAT_TJT_MASK (0x1U)
5524#define ENET_MAC_RXTX_STAT_TJT_SHIFT (0U)
5525/*! TJT - PHY Interrupt Enable When this bit is set, it enables the assertion of the interrupt
5526 * signal because of the setting of PHYIS bit in MAC Interrupt Status register Table 731.
5527 */
5528#define ENET_MAC_RXTX_STAT_TJT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_TJT_SHIFT)) & ENET_MAC_RXTX_STAT_TJT_MASK)
5529#define ENET_MAC_RXTX_STAT_NCARR_MASK (0x2U)
5530#define ENET_MAC_RXTX_STAT_NCARR_SHIFT (1U)
5531/*! NCARR - No Carrier When the DTXSTS bit is set in the MTL Operation Mode register Table 758, this
5532 * bit indicates that the carrier signal from the PHY is not present at the end of preamble
5533 * transmission.
5534 */
5535#define ENET_MAC_RXTX_STAT_NCARR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_NCARR_SHIFT)) & ENET_MAC_RXTX_STAT_NCARR_MASK)
5536#define ENET_MAC_RXTX_STAT_LCARR_MASK (0x4U)
5537#define ENET_MAC_RXTX_STAT_LCARR_SHIFT (2U)
5538/*! LCARR - Loss of Carrier When the DTXSTS bit is set in the MTL Operation Mode register Table 758,
5539 * this bit indicates that the loss of carrier occurred during packet transmission, that is, the
5540 * PHY Carrier signal was inactive for one or more transmission clock periods during packet
5541 * transmission.
5542 */
5543#define ENET_MAC_RXTX_STAT_LCARR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_LCARR_SHIFT)) & ENET_MAC_RXTX_STAT_LCARR_MASK)
5544#define ENET_MAC_RXTX_STAT_EXDEF_MASK (0x8U)
5545#define ENET_MAC_RXTX_STAT_EXDEF_SHIFT (3U)
5546/*! EXDEF - Excessive Deferral When the DTXSTS bit is set in the MTL Operation Mode register Table
5547 * 758 and the DC bit is set in the MAC Configuration register Table 758, this bit indicates that
5548 * the transmission ended because of excessive deferral of over 24,288 bit times (155,680 when
5549 * Jumbo packet is enabled).
5550 */
5551#define ENET_MAC_RXTX_STAT_EXDEF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_EXDEF_SHIFT)) & ENET_MAC_RXTX_STAT_EXDEF_MASK)
5552#define ENET_MAC_RXTX_STAT_LCOL_MASK (0x10U)
5553#define ENET_MAC_RXTX_STAT_LCOL_SHIFT (4U)
5554/*! LCOL - Late Collision When the DTXSTS bit is set in the MTL Operation Mode register Table 758,
5555 * this bit indicates that the packet transmission aborted because a collision occurred after the
5556 * collision window (64 bytes including Preamble in MII mode).
5557 */
5558#define ENET_MAC_RXTX_STAT_LCOL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_LCOL_SHIFT)) & ENET_MAC_RXTX_STAT_LCOL_MASK)
5559#define ENET_MAC_RXTX_STAT_EXCOL_MASK (0x20U)
5560#define ENET_MAC_RXTX_STAT_EXCOL_SHIFT (5U)
5561/*! EXCOL - Excessive Collisions When the DTXSTS bit is set in the MTL Operation Mode register Table
5562 * 758, this bit indicates that the transmission aborted after 16 successive collisions while
5563 * attempting to transmit the current packet.
5564 */
5565#define ENET_MAC_RXTX_STAT_EXCOL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_EXCOL_SHIFT)) & ENET_MAC_RXTX_STAT_EXCOL_MASK)
5566#define ENET_MAC_RXTX_STAT_RWT_MASK (0x100U)
5567#define ENET_MAC_RXTX_STAT_RWT_SHIFT (8U)
5568/*! RWT - Receive Watchdog Timeout This bit is set when a packet with length greater than 2,048
5569 * bytes is received (10,240 bytes when Jumbo Packet mode is enabled) and the WD bit is reset in the
5570 * MAC Configuration register Table 722.
5571 */
5572#define ENET_MAC_RXTX_STAT_RWT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RXTX_STAT_RWT_SHIFT)) & ENET_MAC_RXTX_STAT_RWT_MASK)
5573/*! @} */
5574
5575/*! @name MAC_PMT_CRTL_STAT - */
5576/*! @{ */
5577#define ENET_MAC_PMT_CRTL_STAT_PWRDWN_MASK (0x1U)
5578#define ENET_MAC_PMT_CRTL_STAT_PWRDWN_SHIFT (0U)
5579/*! PWRDWN - Transmit LPI Entry When this bit is set, it indicates that the MAC Transmitter has
5580 * entered the LPI state because of the setting of the LPIEN bit.
5581 */
5582#define ENET_MAC_PMT_CRTL_STAT_PWRDWN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_PWRDWN_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_PWRDWN_MASK)
5583#define ENET_MAC_PMT_CRTL_STAT_MGKPKTEN_MASK (0x2U)
5584#define ENET_MAC_PMT_CRTL_STAT_MGKPKTEN_SHIFT (1U)
5585/*! MGKPKTEN - Magic Packet Enable.
5586 */
5587#define ENET_MAC_PMT_CRTL_STAT_MGKPKTEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_MGKPKTEN_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_MGKPKTEN_MASK)
5588#define ENET_MAC_PMT_CRTL_STAT_RWKPKTEN_MASK (0x4U)
5589#define ENET_MAC_PMT_CRTL_STAT_RWKPKTEN_SHIFT (2U)
5590/*! RWKPKTEN - Remote Wake-Up Packet Enable When this bit is set, a power management event is
5591 * generated when the MAC receives a remote wake-up packet.
5592 */
5593#define ENET_MAC_PMT_CRTL_STAT_RWKPKTEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_RWKPKTEN_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_RWKPKTEN_MASK)
5594#define ENET_MAC_PMT_CRTL_STAT_MGKPRCVD_MASK (0x20U)
5595#define ENET_MAC_PMT_CRTL_STAT_MGKPRCVD_SHIFT (5U)
5596/*! MGKPRCVD - Magic Packet Received.
5597 */
5598#define ENET_MAC_PMT_CRTL_STAT_MGKPRCVD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_MGKPRCVD_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_MGKPRCVD_MASK)
5599#define ENET_MAC_PMT_CRTL_STAT_RWKPRCVD_MASK (0x40U)
5600#define ENET_MAC_PMT_CRTL_STAT_RWKPRCVD_SHIFT (6U)
5601/*! RWKPRCVD - Remote Wake-Up Packet Received.
5602 */
5603#define ENET_MAC_PMT_CRTL_STAT_RWKPRCVD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_RWKPRCVD_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_RWKPRCVD_MASK)
5604#define ENET_MAC_PMT_CRTL_STAT_GLBLUCAST_MASK (0x200U)
5605#define ENET_MAC_PMT_CRTL_STAT_GLBLUCAST_SHIFT (9U)
5606/*! GLBLUCAST - Global Unicast When this bit set, any unicast packet filtered by the MAC (DAF)
5607 * address recognition is detected as a remote wake-up packet.
5608 */
5609#define ENET_MAC_PMT_CRTL_STAT_GLBLUCAST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_GLBLUCAST_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_GLBLUCAST_MASK)
5610#define ENET_MAC_PMT_CRTL_STAT_RWKPFE_MASK (0x400U)
5611#define ENET_MAC_PMT_CRTL_STAT_RWKPFE_SHIFT (10U)
5612/*! RWKPFE - Remote Wake-up Packet Forwarding Enable When this bit is set along with RWKPKTEN, the
5613 * MAC receiver drops all received frames until it receives the expected wake-up frame.
5614 */
5615#define ENET_MAC_PMT_CRTL_STAT_RWKPFE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_RWKPFE_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_RWKPFE_MASK)
5616#define ENET_MAC_PMT_CRTL_STAT_RWKPTR_MASK (0x1F000000U)
5617#define ENET_MAC_PMT_CRTL_STAT_RWKPTR_SHIFT (24U)
5618/*! RWKPTR - Remote Wake-up FIFO Pointer This field gives the current value (0 to 7) of the Remote
5619 * Wake-up Packet Filter register pointer.
5620 */
5621#define ENET_MAC_PMT_CRTL_STAT_RWKPTR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_RWKPTR_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_RWKPTR_MASK)
5622#define ENET_MAC_PMT_CRTL_STAT_RWKFILTRST_MASK (0x80000000U)
5623#define ENET_MAC_PMT_CRTL_STAT_RWKFILTRST_SHIFT (31U)
5624/*! RWKFILTRST - Remote Wake-Up Packet Filter Register Pointer Reset When this bit is set, the
5625 * remote wake-up packet filter register pointer is reset to 3'b000.
5626 */
5627#define ENET_MAC_PMT_CRTL_STAT_RWKFILTRST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_PMT_CRTL_STAT_RWKFILTRST_SHIFT)) & ENET_MAC_PMT_CRTL_STAT_RWKFILTRST_MASK)
5628/*! @} */
5629
5630/*! @name MAC_RWAKE_FRFLT - Remote wake-up frame filter */
5631/*! @{ */
5632#define ENET_MAC_RWAKE_FRFLT_ADDR_MASK (0xFFFFFFFFU)
5633#define ENET_MAC_RWAKE_FRFLT_ADDR_SHIFT (0U)
5634/*! ADDR - WKUPFMFILTER address.
5635 */
5636#define ENET_MAC_RWAKE_FRFLT_ADDR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_RWAKE_FRFLT_ADDR_SHIFT)) & ENET_MAC_RWAKE_FRFLT_ADDR_MASK)
5637/*! @} */
5638
5639/*! @name MAC_LPI_CTRL_STAT - LPI Control and Status Register */
5640/*! @{ */
5641#define ENET_MAC_LPI_CTRL_STAT_TLPIEN_MASK (0x1U)
5642#define ENET_MAC_LPI_CTRL_STAT_TLPIEN_SHIFT (0U)
5643/*! TLPIEN - Transmit LPI Entry When this bit is set, it indicates that the MAC Transmitter has
5644 * entered the LPI state because of the setting of the LPIEN bit.
5645 */
5646#define ENET_MAC_LPI_CTRL_STAT_TLPIEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_TLPIEN_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_TLPIEN_MASK)
5647#define ENET_MAC_LPI_CTRL_STAT_TLPIEX_MASK (0x2U)
5648#define ENET_MAC_LPI_CTRL_STAT_TLPIEX_SHIFT (1U)
5649/*! TLPIEX - Transmit LPI Exit When this bit is set, it indicates that the MAC transmitter exited
5650 * the LPI state after the application cleared the LPIEN bit and the LPI TW Timer has expired.
5651 */
5652#define ENET_MAC_LPI_CTRL_STAT_TLPIEX(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_TLPIEX_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_TLPIEX_MASK)
5653#define ENET_MAC_LPI_CTRL_STAT_RLPIEN_MASK (0x4U)
5654#define ENET_MAC_LPI_CTRL_STAT_RLPIEN_SHIFT (2U)
5655/*! RLPIEN - Receive LPI Entry When this bit is set, it indicates that the MAC Receiver has received
5656 * an LPI pattern and entered the LPI state.
5657 */
5658#define ENET_MAC_LPI_CTRL_STAT_RLPIEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_RLPIEN_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_RLPIEN_MASK)
5659#define ENET_MAC_LPI_CTRL_STAT_RLPIEX_MASK (0x8U)
5660#define ENET_MAC_LPI_CTRL_STAT_RLPIEX_SHIFT (3U)
5661/*! RLPIEX - Receive LPI Exit When this bit is set, it indicates that the MAC Receiver has stopped
5662 * receiving the LPI pattern on the MII interface, exited the LPI state, and resumed the normal
5663 * reception.
5664 */
5665#define ENET_MAC_LPI_CTRL_STAT_RLPIEX(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_RLPIEX_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_RLPIEX_MASK)
5666#define ENET_MAC_LPI_CTRL_STAT_TLPIST_MASK (0x100U)
5667#define ENET_MAC_LPI_CTRL_STAT_TLPIST_SHIFT (8U)
5668/*! TLPIST - Transmit LPI State When this bit is set, it indicates that the MAC is transmitting the LPI pattern on the MII interface.
5669 */
5670#define ENET_MAC_LPI_CTRL_STAT_TLPIST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_TLPIST_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_TLPIST_MASK)
5671#define ENET_MAC_LPI_CTRL_STAT_RLPIST_MASK (0x200U)
5672#define ENET_MAC_LPI_CTRL_STAT_RLPIST_SHIFT (9U)
5673/*! RLPIST - Receive LPI State When this bit is set, it indicates that the MAC is receiving the LPI pattern on the MII interface.
5674 */
5675#define ENET_MAC_LPI_CTRL_STAT_RLPIST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_RLPIST_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_RLPIST_MASK)
5676#define ENET_MAC_LPI_CTRL_STAT_LPIEN_MASK (0x10000U)
5677#define ENET_MAC_LPI_CTRL_STAT_LPIEN_SHIFT (16U)
5678/*! LPIEN - LPI Enable When this bit is set, it instructs the MAC Transmitter to enter the LPI state.
5679 */
5680#define ENET_MAC_LPI_CTRL_STAT_LPIEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_LPIEN_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_LPIEN_MASK)
5681#define ENET_MAC_LPI_CTRL_STAT_PLS_MASK (0x20000U)
5682#define ENET_MAC_LPI_CTRL_STAT_PLS_SHIFT (17U)
5683/*! PLS - PHY Link Status This bit indicates the link status of the PHY.
5684 */
5685#define ENET_MAC_LPI_CTRL_STAT_PLS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_PLS_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_PLS_MASK)
5686#define ENET_MAC_LPI_CTRL_STAT_LPITXA_MASK (0x80000U)
5687#define ENET_MAC_LPI_CTRL_STAT_LPITXA_SHIFT (19U)
5688/*! LPITXA - LPI Tx Automate This bit controls the behavior of the MAC when it is entering or coming
5689 * out of the LPI mode on the Transmit side.
5690 */
5691#define ENET_MAC_LPI_CTRL_STAT_LPITXA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_LPITXA_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_LPITXA_MASK)
5692#define ENET_MAC_LPI_CTRL_STAT_LPIATE_MASK (0x100000U)
5693#define ENET_MAC_LPI_CTRL_STAT_LPIATE_SHIFT (20U)
5694/*! LPIATE - LPI Timer Enable This bit controls the automatic entry of the MAC Transmitter into and exit out of the LPI state.
5695 */
5696#define ENET_MAC_LPI_CTRL_STAT_LPIATE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_LPIATE_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_LPIATE_MASK)
5697#define ENET_MAC_LPI_CTRL_STAT_LPITCSE_MASK (0x200000U)
5698#define ENET_MAC_LPI_CTRL_STAT_LPITCSE_SHIFT (21U)
5699/*! LPITCSE - LPI Tx Clock Stop Enable When this bit is set, the MAC asserts LPI Tx Clock Gating
5700 * Control signal high after it enters Tx LPI mode to indicate that the Tx clock to MAC can be
5701 * stopped.
5702 */
5703#define ENET_MAC_LPI_CTRL_STAT_LPITCSE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_CTRL_STAT_LPITCSE_SHIFT)) & ENET_MAC_LPI_CTRL_STAT_LPITCSE_MASK)
5704/*! @} */
5705
5706/*! @name MAC_LPI_TIMER_CTRL - LPI Timers Control register */
5707/*! @{ */
5708#define ENET_MAC_LPI_TIMER_CTRL_TWT_MASK (0xFFFFU)
5709#define ENET_MAC_LPI_TIMER_CTRL_TWT_SHIFT (0U)
5710/*! TWT - LPI TW Timer This field specifies the minimum time (in microseconds) for which the MAC
5711 * waits after it stops transmitting the LPI pattern to the PHY and before it resumes the normal
5712 * transmission.
5713 */
5714#define ENET_MAC_LPI_TIMER_CTRL_TWT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_TIMER_CTRL_TWT_SHIFT)) & ENET_MAC_LPI_TIMER_CTRL_TWT_MASK)
5715#define ENET_MAC_LPI_TIMER_CTRL_LST_MASK (0x3FF0000U)
5716#define ENET_MAC_LPI_TIMER_CTRL_LST_SHIFT (16U)
5717/*! LST - LPI LS Timer This field specifies the minimum time (in milliseconds) for which the link
5718 * status from the PHY should be up (OKAY) before the LPI pattern can be transmitted to the PHY.
5719 */
5720#define ENET_MAC_LPI_TIMER_CTRL_LST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_TIMER_CTRL_LST_SHIFT)) & ENET_MAC_LPI_TIMER_CTRL_LST_MASK)
5721/*! @} */
5722
5723/*! @name MAC_LPI_ENTR_TIMR - LPI entry Timer register */
5724/*! @{ */
5725#define ENET_MAC_LPI_ENTR_TIMR_LPIET_MASK (0xFFFF8U)
5726#define ENET_MAC_LPI_ENTR_TIMR_LPIET_SHIFT (3U)
5727/*! LPIET - LPI Entry Timer This field specifies the time in microseconds the MAC will wait to enter
5728 * LPI mode, after it has transmitted all the frames.
5729 */
5730#define ENET_MAC_LPI_ENTR_TIMR_LPIET(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_LPI_ENTR_TIMR_LPIET_SHIFT)) & ENET_MAC_LPI_ENTR_TIMR_LPIET_MASK)
5731/*! @} */
5732
5733/*! @name MAC_1US_TIC_COUNTR - */
5734/*! @{ */
5735#define ENET_MAC_1US_TIC_COUNTR_TIC_1US_CNTR_MASK (0xFFFU)
5736#define ENET_MAC_1US_TIC_COUNTR_TIC_1US_CNTR_SHIFT (0U)
5737/*! TIC_1US_CNTR - 1US TIC Counter The application must program this counter so that the number of clock cycles of CSR clock is 1us.
5738 */
5739#define ENET_MAC_1US_TIC_COUNTR_TIC_1US_CNTR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_1US_TIC_COUNTR_TIC_1US_CNTR_SHIFT)) & ENET_MAC_1US_TIC_COUNTR_TIC_1US_CNTR_MASK)
5740/*! @} */
5741
5742/*! @name MAC_VERSION - MAC version register */
5743/*! @{ */
5744#define ENET_MAC_VERSION_SNPVER_MASK (0xFFU)
5745#define ENET_MAC_VERSION_SNPVER_SHIFT (0U)
5746/*! SNPVER - NXP defined version.
5747 */
5748#define ENET_MAC_VERSION_SNPVER(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VERSION_SNPVER_SHIFT)) & ENET_MAC_VERSION_SNPVER_MASK)
5749#define ENET_MAC_VERSION_USERVER_MASK (0xFF00U)
5750#define ENET_MAC_VERSION_USERVER_SHIFT (8U)
5751/*! USERVER - User defined version.
5752 */
5753#define ENET_MAC_VERSION_USERVER(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_VERSION_USERVER_SHIFT)) & ENET_MAC_VERSION_USERVER_MASK)
5754/*! @} */
5755
5756/*! @name MAC_DBG - MAC debug register */
5757/*! @{ */
5758#define ENET_MAC_DBG_REPESTS_MASK (0x1U)
5759#define ENET_MAC_DBG_REPESTS_SHIFT (0U)
5760/*! REPESTS - MAC MII Receive Protocol Engine Status When this bit is set, it indicates that the MAC
5761 * MII receive protocol engine is actively receiving data, and it is not in the Idle state.
5762 */
5763#define ENET_MAC_DBG_REPESTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_DBG_REPESTS_SHIFT)) & ENET_MAC_DBG_REPESTS_MASK)
5764#define ENET_MAC_DBG_RFCFCSTS_MASK (0x6U)
5765#define ENET_MAC_DBG_RFCFCSTS_SHIFT (1U)
5766/*! RFCFCSTS - MAC Receive Packet Controller FIFO Status When this bit is set, this field indicates
5767 * the active state of the small FIFO Read and Write controllers of the MAC Receive Packet
5768 * Controller module.
5769 */
5770#define ENET_MAC_DBG_RFCFCSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_DBG_RFCFCSTS_SHIFT)) & ENET_MAC_DBG_RFCFCSTS_MASK)
5771#define ENET_MAC_DBG_TPESTS_MASK (0x10000U)
5772#define ENET_MAC_DBG_TPESTS_SHIFT (16U)
5773/*! TPESTS - MAC MII Transmit Protocol Engine Status When this bit is set, it indicates that the MAC
5774 * or MII transmit protocol engine is actively transmitting data, and it is not in the Idle
5775 * state.
5776 */
5777#define ENET_MAC_DBG_TPESTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_DBG_TPESTS_SHIFT)) & ENET_MAC_DBG_TPESTS_MASK)
5778#define ENET_MAC_DBG_TFCSTS_MASK (0x60000U)
5779#define ENET_MAC_DBG_TFCSTS_SHIFT (17U)
5780/*! TFCSTS - MAC Transmit Packet Controller Status This field indicates the state of the MAC Transmit Packet Controller module.
5781 */
5782#define ENET_MAC_DBG_TFCSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_DBG_TFCSTS_SHIFT)) & ENET_MAC_DBG_TFCSTS_MASK)
5783/*! @} */
5784
5785/*! @name MAC_HW_FEAT - MAC hardware feature register 0x0201 */
5786/*! @{ */
5787#define ENET_MAC_HW_FEAT_MIISEL_MASK (0x1U)
5788#define ENET_MAC_HW_FEAT_MIISEL_SHIFT (0U)
5789/*! MIISEL - 10 or 100 Mbps Support.
5790 */
5791#define ENET_MAC_HW_FEAT_MIISEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_MIISEL_SHIFT)) & ENET_MAC_HW_FEAT_MIISEL_MASK)
5792#define ENET_MAC_HW_FEAT_RXFIFOSIZE_MASK (0x1FU)
5793#define ENET_MAC_HW_FEAT_RXFIFOSIZE_SHIFT (0U)
5794/*! RXFIFOSIZE - MTL Receive FIFO Size.
5795 */
5796#define ENET_MAC_HW_FEAT_RXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_RXFIFOSIZE_SHIFT)) & ENET_MAC_HW_FEAT_RXFIFOSIZE_MASK)
5797#define ENET_MAC_HW_FEAT_RXQCNT_MASK (0xFU)
5798#define ENET_MAC_HW_FEAT_RXQCNT_SHIFT (0U)
5799/*! RXQCNT - Number of MTL Receive Queues.
5800 */
5801#define ENET_MAC_HW_FEAT_RXQCNT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_RXQCNT_SHIFT)) & ENET_MAC_HW_FEAT_RXQCNT_MASK)
5802#define ENET_MAC_HW_FEAT_HDSEL_MASK (0x4U)
5803#define ENET_MAC_HW_FEAT_HDSEL_SHIFT (2U)
5804/*! HDSEL - Half-duplex Support.
5805 */
5806#define ENET_MAC_HW_FEAT_HDSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_HDSEL_SHIFT)) & ENET_MAC_HW_FEAT_HDSEL_MASK)
5807#define ENET_MAC_HW_FEAT_VLHASH_MASK (0x10U)
5808#define ENET_MAC_HW_FEAT_VLHASH_SHIFT (4U)
5809/*! VLHASH - Hash Table Based Filtering option.
5810 */
5811#define ENET_MAC_HW_FEAT_VLHASH(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_VLHASH_SHIFT)) & ENET_MAC_HW_FEAT_VLHASH_MASK)
5812#define ENET_MAC_HW_FEAT_SMASEL_MASK (0x20U)
5813#define ENET_MAC_HW_FEAT_SMASEL_SHIFT (5U)
5814/*! SMASEL - SMA (MDIO) Interface.
5815 */
5816#define ENET_MAC_HW_FEAT_SMASEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_SMASEL_SHIFT)) & ENET_MAC_HW_FEAT_SMASEL_MASK)
5817#define ENET_MAC_HW_FEAT_RWKSEL_MASK (0x40U)
5818#define ENET_MAC_HW_FEAT_RWKSEL_SHIFT (6U)
5819/*! RWKSEL - PMT Remote Wake-up Packet Detection.
5820 */
5821#define ENET_MAC_HW_FEAT_RWKSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_RWKSEL_SHIFT)) & ENET_MAC_HW_FEAT_RWKSEL_MASK)
5822#define ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK (0x7C0U)
5823#define ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT (6U)
5824/*! TXFIFOSIZE - MTL Transmit FIFO Size.
5825 */
5826#define ENET_MAC_HW_FEAT_TXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT)) & ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK)
5827#define ENET_MAC_HW_FEAT_TXQCNT_MASK (0x3C0U)
5828#define ENET_MAC_HW_FEAT_TXQCNT_SHIFT (6U)
5829/*! TXQCNT - Number of MTL Transmit Queues.
5830 */
5831#define ENET_MAC_HW_FEAT_TXQCNT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TXQCNT_SHIFT)) & ENET_MAC_HW_FEAT_TXQCNT_MASK)
5832#define ENET_MAC_HW_FEAT_MGKSEL_MASK (0x80U)
5833#define ENET_MAC_HW_FEAT_MGKSEL_SHIFT (7U)
5834/*! MGKSEL - PMT magic packet detection.
5835 */
5836#define ENET_MAC_HW_FEAT_MGKSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_MGKSEL_SHIFT)) & ENET_MAC_HW_FEAT_MGKSEL_MASK)
5837#define ENET_MAC_HW_FEAT_MMCSEL_MASK (0x100U)
5838#define ENET_MAC_HW_FEAT_MMCSEL_SHIFT (8U)
5839/*! MMCSEL - RMON Module Enable.
5840 */
5841#define ENET_MAC_HW_FEAT_MMCSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_MMCSEL_SHIFT)) & ENET_MAC_HW_FEAT_MMCSEL_MASK)
5842#define ENET_MAC_HW_FEAT_ARPOFFSEL_MASK (0x200U)
5843#define ENET_MAC_HW_FEAT_ARPOFFSEL_SHIFT (9U)
5844/*! ARPOFFSEL - ARP Offload Enabled.
5845 */
5846#define ENET_MAC_HW_FEAT_ARPOFFSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_ARPOFFSEL_SHIFT)) & ENET_MAC_HW_FEAT_ARPOFFSEL_MASK)
5847#define ENET_MAC_HW_FEAT_OSTEN_MASK (0x800U)
5848#define ENET_MAC_HW_FEAT_OSTEN_SHIFT (11U)
5849/*! OSTEN - One-Step Timestamping Feature.
5850 */
5851#define ENET_MAC_HW_FEAT_OSTEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_OSTEN_SHIFT)) & ENET_MAC_HW_FEAT_OSTEN_MASK)
5852#define ENET_MAC_HW_FEAT_PTOEN_MASK (0x1000U)
5853#define ENET_MAC_HW_FEAT_PTOEN_SHIFT (12U)
5854/*! PTOEN - PTP OffLoad Feature.
5855 */
5856#define ENET_MAC_HW_FEAT_PTOEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_PTOEN_SHIFT)) & ENET_MAC_HW_FEAT_PTOEN_MASK)
5857#define ENET_MAC_HW_FEAT_RXCHCNT_MASK (0xF000U)
5858#define ENET_MAC_HW_FEAT_RXCHCNT_SHIFT (12U)
5859/*! RXCHCNT - Number of DMA Receive Channels.
5860 */
5861#define ENET_MAC_HW_FEAT_RXCHCNT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_RXCHCNT_SHIFT)) & ENET_MAC_HW_FEAT_RXCHCNT_MASK)
5862#define ENET_MAC_HW_FEAT_TSSEL_MASK (0x1000U)
5863#define ENET_MAC_HW_FEAT_TSSEL_SHIFT (12U)
5864/*! TSSEL - IEEE 1588-2008 Timestamp support .
5865 */
5866#define ENET_MAC_HW_FEAT_TSSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TSSEL_SHIFT)) & ENET_MAC_HW_FEAT_TSSEL_MASK)
5867#define ENET_MAC_HW_FEAT_ADVTHWORD_MASK (0x2000U)
5868#define ENET_MAC_HW_FEAT_ADVTHWORD_SHIFT (13U)
5869/*! ADVTHWORD - IEEE 1588 High Word Register Feature.
5870 */
5871#define ENET_MAC_HW_FEAT_ADVTHWORD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_ADVTHWORD_SHIFT)) & ENET_MAC_HW_FEAT_ADVTHWORD_MASK)
5872#define ENET_MAC_HW_FEAT_EEESEL_MASK (0x2000U)
5873#define ENET_MAC_HW_FEAT_EEESEL_SHIFT (13U)
5874/*! EEESEL - Energy Efficient Ethernet Support .
5875 */
5876#define ENET_MAC_HW_FEAT_EEESEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_EEESEL_SHIFT)) & ENET_MAC_HW_FEAT_EEESEL_MASK)
5877#define ENET_MAC_HW_FEAT_ADDR64_MASK (0xC000U)
5878#define ENET_MAC_HW_FEAT_ADDR64_SHIFT (14U)
5879/*! ADDR64 - Address width.
5880 */
5881#define ENET_MAC_HW_FEAT_ADDR64(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_ADDR64_SHIFT)) & ENET_MAC_HW_FEAT_ADDR64_MASK)
5882#define ENET_MAC_HW_FEAT_TXCOESEL_MASK (0x4000U)
5883#define ENET_MAC_HW_FEAT_TXCOESEL_SHIFT (14U)
5884/*! TXCOESEL - Transmit Checksum Offload Support.
5885 */
5886#define ENET_MAC_HW_FEAT_TXCOESEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TXCOESEL_SHIFT)) & ENET_MAC_HW_FEAT_TXCOESEL_MASK)
5887#define ENET_MAC_HW_FEAT_DCBEN_MASK (0x10000U)
5888#define ENET_MAC_HW_FEAT_DCBEN_SHIFT (16U)
5889/*! DCBEN - Data Center Bridging feature.
5890 */
5891#define ENET_MAC_HW_FEAT_DCBEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_DCBEN_SHIFT)) & ENET_MAC_HW_FEAT_DCBEN_MASK)
5892#define ENET_MAC_HW_FEAT_RXCOESEL_MASK (0x10000U)
5893#define ENET_MAC_HW_FEAT_RXCOESEL_SHIFT (16U)
5894/*! RXCOESEL - Receive Checksum Offload Support.
5895 */
5896#define ENET_MAC_HW_FEAT_RXCOESEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_RXCOESEL_SHIFT)) & ENET_MAC_HW_FEAT_RXCOESEL_MASK)
5897#define ENET_MAC_HW_FEAT_SPEN_MASK (0x20000U)
5898#define ENET_MAC_HW_FEAT_SPEN_SHIFT (17U)
5899/*! SPEN - Split Header Structure feature.
5900 */
5901#define ENET_MAC_HW_FEAT_SPEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_SPEN_SHIFT)) & ENET_MAC_HW_FEAT_SPEN_MASK)
5902#define ENET_MAC_HW_FEAT_TSOEN_MASK (0x40000U)
5903#define ENET_MAC_HW_FEAT_TSOEN_SHIFT (18U)
5904/*! TSOEN - TCP Segment Offload Feature.
5905 */
5906#define ENET_MAC_HW_FEAT_TSOEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TSOEN_SHIFT)) & ENET_MAC_HW_FEAT_TSOEN_MASK)
5907#define ENET_MAC_HW_FEAT_TXCHCNT_MASK (0x3C0000U)
5908#define ENET_MAC_HW_FEAT_TXCHCNT_SHIFT (18U)
5909/*! TXCHCNT - Number of DMA Transmit Channels.
5910 */
5911#define ENET_MAC_HW_FEAT_TXCHCNT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TXCHCNT_SHIFT)) & ENET_MAC_HW_FEAT_TXCHCNT_MASK)
5912#define ENET_MAC_HW_FEAT_DBGMEMA_MASK (0x80000U)
5913#define ENET_MAC_HW_FEAT_DBGMEMA_SHIFT (19U)
5914/*! DBGMEMA - DMA Debug Register Feature.
5915 */
5916#define ENET_MAC_HW_FEAT_DBGMEMA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_DBGMEMA_SHIFT)) & ENET_MAC_HW_FEAT_DBGMEMA_MASK)
5917#define ENET_MAC_HW_FEAT_AVSEL_MASK (0x100000U)
5918#define ENET_MAC_HW_FEAT_AVSEL_SHIFT (20U)
5919/*! AVSEL - Audio Video Bridging Feature.
5920 */
5921#define ENET_MAC_HW_FEAT_AVSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_AVSEL_SHIFT)) & ENET_MAC_HW_FEAT_AVSEL_MASK)
5922#define ENET_MAC_HW_FEAT_LPMODEEN_MASK (0x800000U)
5923#define ENET_MAC_HW_FEAT_LPMODEEN_SHIFT (23U)
5924/*! LPMODEEN - Low Power Mode Feature Support .
5925 */
5926#define ENET_MAC_HW_FEAT_LPMODEEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_LPMODEEN_SHIFT)) & ENET_MAC_HW_FEAT_LPMODEEN_MASK)
5927#define ENET_MAC_HW_FEAT_HASHTBLSZ_MASK (0x3000000U)
5928#define ENET_MAC_HW_FEAT_HASHTBLSZ_SHIFT (24U)
5929/*! HASHTBLSZ - Hash Table Size.
5930 */
5931#define ENET_MAC_HW_FEAT_HASHTBLSZ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_HASHTBLSZ_SHIFT)) & ENET_MAC_HW_FEAT_HASHTBLSZ_MASK)
5932#define ENET_MAC_HW_FEAT_PPSOUTNUM_MASK (0x7000000U)
5933#define ENET_MAC_HW_FEAT_PPSOUTNUM_SHIFT (24U)
5934/*! PPSOUTNUM - Number of PPS Outputs.
5935 */
5936#define ENET_MAC_HW_FEAT_PPSOUTNUM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_PPSOUTNUM_SHIFT)) & ENET_MAC_HW_FEAT_PPSOUTNUM_MASK)
5937#define ENET_MAC_HW_FEAT_TSSTSSEL_MASK (0x6000000U)
5938#define ENET_MAC_HW_FEAT_TSSTSSEL_SHIFT (25U)
5939/*! TSSTSSEL - Timestamp System Time Source.
5940 */
5941#define ENET_MAC_HW_FEAT_TSSTSSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_TSSTSSEL_SHIFT)) & ENET_MAC_HW_FEAT_TSSTSSEL_MASK)
5942#define ENET_MAC_HW_FEAT_L3_L4_FILTER_MASK (0x78000000U)
5943#define ENET_MAC_HW_FEAT_L3_L4_FILTER_SHIFT (27U)
5944/*! L3_L4_FILTER - Total Number of L3 and L4 Filters .
5945 */
5946#define ENET_MAC_HW_FEAT_L3_L4_FILTER(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_L3_L4_FILTER_SHIFT)) & ENET_MAC_HW_FEAT_L3_L4_FILTER_MASK)
5947#define ENET_MAC_HW_FEAT_ACTPHYSEL_MASK (0x70000000U)
5948#define ENET_MAC_HW_FEAT_ACTPHYSEL_SHIFT (28U)
5949/*! ACTPHYSEL - Active PHY Selected.
5950 */
5951#define ENET_MAC_HW_FEAT_ACTPHYSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_ACTPHYSEL_SHIFT)) & ENET_MAC_HW_FEAT_ACTPHYSEL_MASK)
5952#define ENET_MAC_HW_FEAT_AUXSNAPNUM_MASK (0x70000000U)
5953#define ENET_MAC_HW_FEAT_AUXSNAPNUM_SHIFT (28U)
5954/*! AUXSNAPNUM - Number of Auxiliary Snapshot Inputs.
5955 */
5956#define ENET_MAC_HW_FEAT_AUXSNAPNUM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_HW_FEAT_AUXSNAPNUM_SHIFT)) & ENET_MAC_HW_FEAT_AUXSNAPNUM_MASK)
5957/*! @} */
5958
5959/* The count of ENET_MAC_HW_FEAT */
5960#define ENET_MAC_HW_FEAT_COUNT (3U)
5961
5962/*! @name MAC_MDIO_ADDR - MIDO address Register */
5963/*! @{ */
5964#define ENET_MAC_MDIO_ADDR_MB_MASK (0x1U)
5965#define ENET_MAC_MDIO_ADDR_MB_SHIFT (0U)
5966/*! MB - MII busy.
5967 */
5968#define ENET_MAC_MDIO_ADDR_MB(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_MB_SHIFT)) & ENET_MAC_MDIO_ADDR_MB_MASK)
5969#define ENET_MAC_MDIO_ADDR_MOC_MASK (0xCU)
5970#define ENET_MAC_MDIO_ADDR_MOC_SHIFT (2U)
5971/*! MOC - MII Operation Command.
5972 */
5973#define ENET_MAC_MDIO_ADDR_MOC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_MOC_SHIFT)) & ENET_MAC_MDIO_ADDR_MOC_MASK)
5974#define ENET_MAC_MDIO_ADDR_CR_MASK (0xF00U)
5975#define ENET_MAC_MDIO_ADDR_CR_SHIFT (8U)
5976/*! CR - CSR Clock Range.
5977 */
5978#define ENET_MAC_MDIO_ADDR_CR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_CR_SHIFT)) & ENET_MAC_MDIO_ADDR_CR_MASK)
5979#define ENET_MAC_MDIO_ADDR_NTC_MASK (0x7000U)
5980#define ENET_MAC_MDIO_ADDR_NTC_SHIFT (12U)
5981/*! NTC - Number of Training Clocks This field controls the number of trailing clock cycles
5982 * generated on MDC after the end of transmission of MDIO frame.
5983 */
5984#define ENET_MAC_MDIO_ADDR_NTC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_NTC_SHIFT)) & ENET_MAC_MDIO_ADDR_NTC_MASK)
5985#define ENET_MAC_MDIO_ADDR_RDA_MASK (0x1F0000U)
5986#define ENET_MAC_MDIO_ADDR_RDA_SHIFT (16U)
5987/*! RDA - Register/Device Address These bits select the PHY register in selected PHY device.
5988 */
5989#define ENET_MAC_MDIO_ADDR_RDA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_RDA_SHIFT)) & ENET_MAC_MDIO_ADDR_RDA_MASK)
5990#define ENET_MAC_MDIO_ADDR_PA_MASK (0x3E00000U)
5991#define ENET_MAC_MDIO_ADDR_PA_SHIFT (21U)
5992/*! PA - Physical Layer Address This field indicates which PHY devices (out of 32 devices) the MAC is accessing.
5993 */
5994#define ENET_MAC_MDIO_ADDR_PA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_PA_SHIFT)) & ENET_MAC_MDIO_ADDR_PA_MASK)
5995#define ENET_MAC_MDIO_ADDR_BTB_MASK (0x4000000U)
5996#define ENET_MAC_MDIO_ADDR_BTB_SHIFT (26U)
5997/*! BTB - Back to Back transactions When this bit is set and the NTC has value greater than 0, then
5998 * the MAC will inform the completion of a read or write command at the end of frame transfer
5999 * (before the trailing clocks are transmitted).
6000 */
6001#define ENET_MAC_MDIO_ADDR_BTB(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_BTB_SHIFT)) & ENET_MAC_MDIO_ADDR_BTB_MASK)
6002#define ENET_MAC_MDIO_ADDR_PSE_MASK (0x8000000U)
6003#define ENET_MAC_MDIO_ADDR_PSE_SHIFT (27U)
6004/*! PSE - Preamble Suppression Enable When this bit is set, the SMA will suppress the 32-bit
6005 * preamble and transmit MDIO frames with only 1 preamble bit.
6006 */
6007#define ENET_MAC_MDIO_ADDR_PSE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_ADDR_PSE_SHIFT)) & ENET_MAC_MDIO_ADDR_PSE_MASK)
6008/*! @} */
6009
6010/*! @name MAC_MDIO_DATA - MDIO Data register */
6011/*! @{ */
6012#define ENET_MAC_MDIO_DATA_MD_MASK (0xFFFFU)
6013#define ENET_MAC_MDIO_DATA_MD_SHIFT (0U)
6014/*! MD - MII Data This field contains the 16-bit data value read from the PHY after a Management
6015 * Read operation or the 16-bit data value to be written to the PHY before a Management Write
6016 * operation.
6017 */
6018#define ENET_MAC_MDIO_DATA_MD(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_MDIO_DATA_MD_SHIFT)) & ENET_MAC_MDIO_DATA_MD_MASK)
6019/*! @} */
6020
6021/*! @name MAC_ADDR_HIGH - MAC address0 high register */
6022/*! @{ */
6023#define ENET_MAC_ADDR_HIGH_A47_32_MASK (0xFFFFU)
6024#define ENET_MAC_ADDR_HIGH_A47_32_SHIFT (0U)
6025/*! A47_32 - MAC Address0 [47:32] This field contains the upper 16 bits (47:32) of the 6-byte first MAC address.
6026 */
6027#define ENET_MAC_ADDR_HIGH_A47_32(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_ADDR_HIGH_A47_32_SHIFT)) & ENET_MAC_ADDR_HIGH_A47_32_MASK)
6028#define ENET_MAC_ADDR_HIGH_DCS_MASK (0x10000U)
6029#define ENET_MAC_ADDR_HIGH_DCS_SHIFT (16U)
6030/*! DCS - DMA Channel Select This field contains the DMA Channel number to which the Rx packet whose
6031 * DA matches the MAC Address content is routed.
6032 */
6033#define ENET_MAC_ADDR_HIGH_DCS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_ADDR_HIGH_DCS_SHIFT)) & ENET_MAC_ADDR_HIGH_DCS_MASK)
6034#define ENET_MAC_ADDR_HIGH_AE_MASK (0x80000000U)
6035#define ENET_MAC_ADDR_HIGH_AE_SHIFT (31U)
6036/*! AE - Address Enable.
6037 */
6038#define ENET_MAC_ADDR_HIGH_AE(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_ADDR_HIGH_AE_SHIFT)) & ENET_MAC_ADDR_HIGH_AE_MASK)
6039/*! @} */
6040
6041/*! @name MAC_ADDR_LOW - MAC address0 low register */
6042/*! @{ */
6043#define ENET_MAC_ADDR_LOW_A31_0_MASK (0xFFFFFFFFU)
6044#define ENET_MAC_ADDR_LOW_A31_0_SHIFT (0U)
6045/*! A31_0 - MAC Address0 [31:0] This field contains the lower 32 bits of the 6-byte first MAC address.
6046 */
6047#define ENET_MAC_ADDR_LOW_A31_0(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_ADDR_LOW_A31_0_SHIFT)) & ENET_MAC_ADDR_LOW_A31_0_MASK)
6048/*! @} */
6049
6050/*! @name MAC_TIMESTAMP_CTRL - Time stamp control register */
6051/*! @{ */
6052#define ENET_MAC_TIMESTAMP_CTRL_TSENA_MASK (0x1U)
6053#define ENET_MAC_TIMESTAMP_CTRL_TSENA_SHIFT (0U)
6054/*! TSENA - Enable Timestamp When this bit is set, the timestamp is added for Transmit and Receive packets.
6055 */
6056#define ENET_MAC_TIMESTAMP_CTRL_TSENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSENA_MASK)
6057#define ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT_MASK (0x2U)
6058#define ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT_SHIFT (1U)
6059/*! TSCFUPDT - Fine or Coarse Timestamp Update When this bit is set, the Fine method is used to update system timestamp.
6060 */
6061#define ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSCFUPDT_MASK)
6062#define ENET_MAC_TIMESTAMP_CTRL_TSINIT_MASK (0x4U)
6063#define ENET_MAC_TIMESTAMP_CTRL_TSINIT_SHIFT (2U)
6064/*! TSINIT - Initialize Timestamp When this bit is set, the system time is initialized (overwritten)
6065 * with the value specified in the MAC Register 80 (System Time Seconds Update.
6066 */
6067#define ENET_MAC_TIMESTAMP_CTRL_TSINIT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSINIT_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSINIT_MASK)
6068#define ENET_MAC_TIMESTAMP_CTRL_TSUPDT_MASK (0x8U)
6069#define ENET_MAC_TIMESTAMP_CTRL_TSUPDT_SHIFT (3U)
6070/*! TSUPDT - Update Timestamp When this bit is set, the system time is updated (added or subtracted)
6071 * with the value specified in MAC System Time Seconds Update Table 753 and MAC System Time
6072 * Nanoseconds Update Table 754.
6073 */
6074#define ENET_MAC_TIMESTAMP_CTRL_TSUPDT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSUPDT_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSUPDT_MASK)
6075#define ENET_MAC_TIMESTAMP_CTRL_TSTRIG_MASK (0x10U)
6076#define ENET_MAC_TIMESTAMP_CTRL_TSTRIG_SHIFT (4U)
6077/*! TSTRIG - Enable Timestamp Interrupt Trigger When this bit is set, the timestamp interrupt is
6078 * generated when the System Time becomes greater than the value written in the Target Time register.
6079 */
6080#define ENET_MAC_TIMESTAMP_CTRL_TSTRIG(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSTRIG_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSTRIG_MASK)
6081#define ENET_MAC_TIMESTAMP_CTRL_TADDREG_MASK (0x20U)
6082#define ENET_MAC_TIMESTAMP_CTRL_TADDREG_SHIFT (5U)
6083/*! TADDREG - Update Addend Register When this bit is set, the content of the Timestamp Addend
6084 * register is updated in the PTP block for fine correction.
6085 */
6086#define ENET_MAC_TIMESTAMP_CTRL_TADDREG(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TADDREG_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TADDREG_MASK)
6087#define ENET_MAC_TIMESTAMP_CTRL_TSENALL_MASK (0x100U)
6088#define ENET_MAC_TIMESTAMP_CTRL_TSENALL_SHIFT (8U)
6089/*! TSENALL - Enable Timestamp for All Packets When this bit is set, the timestamp snapshot is
6090 * enabled for all packets received by the MAC.
6091 */
6092#define ENET_MAC_TIMESTAMP_CTRL_TSENALL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSENALL_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSENALL_MASK)
6093#define ENET_MAC_TIMESTAMP_CTRL_TSCTRLSSR_MASK (0x200U)
6094#define ENET_MAC_TIMESTAMP_CTRL_TSCTRLSSR_SHIFT (9U)
6095/*! TSCTRLSSR - Timestamp Digital or Binary Rollover Control When this bit is set, the Timestamp Low
6096 * register rolls over after 0x3B9AC9FF value (that is, 1 nanosecond accuracy) and increments
6097 * the timestamp (High) seconds.
6098 */
6099#define ENET_MAC_TIMESTAMP_CTRL_TSCTRLSSR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSCTRLSSR_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSCTRLSSR_MASK)
6100#define ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA_MASK (0x400U)
6101#define ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA_SHIFT (10U)
6102/*! TSVER2ENA - Enable PTP Packet Processing for Version 2 Format When this bit is set, the IEEE
6103 * 1588 version 2 format is used to process the PTP packets.
6104 */
6105#define ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSVER2ENA_MASK)
6106#define ENET_MAC_TIMESTAMP_CTRL_TSIPENA_MASK (0x800U)
6107#define ENET_MAC_TIMESTAMP_CTRL_TSIPENA_SHIFT (11U)
6108/*! TSIPENA - Enable Processing of PTP over Ethernet Packets When this bit is set, the MAC receiver
6109 * processes the PTP packets encapsulated directly in the Ethernet packets.
6110 */
6111#define ENET_MAC_TIMESTAMP_CTRL_TSIPENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSIPENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSIPENA_MASK)
6112#define ENET_MAC_TIMESTAMP_CTRL_TSIPV6ENA_MASK (0x1000U)
6113#define ENET_MAC_TIMESTAMP_CTRL_TSIPV6ENA_SHIFT (12U)
6114/*! TSIPV6ENA - Enable Processing of PTP Packets Sent over 1Pv6-UDP When this bit is set, the MAC
6115 * receiver processes the PTP packets encapsulated in IPv6-UDP packets.
6116 */
6117#define ENET_MAC_TIMESTAMP_CTRL_TSIPV6ENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSIPV6ENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSIPV6ENA_MASK)
6118#define ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA_MASK (0x2000U)
6119#define ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA_SHIFT (13U)
6120/*! TSIPV4ENA - Enable Processing of PTP Packets Sent over IPv4-UDP When this bit is set, the MAC
6121 * receiver processes the PTP packets encapsulated in IPv4-UDP packets.
6122 */
6123#define ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSIPV4ENA_MASK)
6124#define ENET_MAC_TIMESTAMP_CTRL_TSEVTENA_MASK (0x4000U)
6125#define ENET_MAC_TIMESTAMP_CTRL_TSEVTENA_SHIFT (14U)
6126/*! TSEVTENA - Enable Timestamp Snapshot for Event Messages When this bit is set, the timestamp
6127 * snapshot is taken only for event messages (SYNC, Delay_Req, Pdelay_Req, or Pdelay_Resp).
6128 */
6129#define ENET_MAC_TIMESTAMP_CTRL_TSEVTENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSEVTENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSEVTENA_MASK)
6130#define ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA_MASK (0x8000U)
6131#define ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA_SHIFT (15U)
6132/*! TSMSTRENA - Enable Snapshot for Messages Relevant to Master When this bit is set, the snapshot
6133 * is taken only for the messages that are relevant to the master node.
6134 */
6135#define ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSMSTRENA_MASK)
6136#define ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL_MASK (0x30000U)
6137#define ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL_SHIFT (16U)
6138/*! SNAPTYPSEL - Select PTP packets for Taking Snapshots These bits, along with Bits 15 and 14,
6139 * decide the set of PTP packet types for which snapshot needs to be taken.
6140 */
6141#define ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_SNAPTYPSEL_MASK)
6142#define ENET_MAC_TIMESTAMP_CTRL_TSENMACADDR_MASK (0x40000U)
6143#define ENET_MAC_TIMESTAMP_CTRL_TSENMACADDR_SHIFT (18U)
6144/*! TSENMACADDR - Enable MAC Address for PTP Packet Filtering When this bit is set, the DA MAC
6145 * address (that matches any MAC Address register) is used to filter the PTP packets when PTP is
6146 * directly sent over Ethernet.
6147 */
6148#define ENET_MAC_TIMESTAMP_CTRL_TSENMACADDR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TSENMACADDR_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TSENMACADDR_MASK)
6149#define ENET_MAC_TIMESTAMP_CTRL_TXTTSSTSM_MASK (0x1000000U)
6150#define ENET_MAC_TIMESTAMP_CTRL_TXTTSSTSM_SHIFT (24U)
6151/*! TXTTSSTSM - Transmit Timestamp Status Mode When this bit is set, the MAC overwrites the earlier
6152 * transmit timestamp status even if it is not read by the software.
6153 */
6154#define ENET_MAC_TIMESTAMP_CTRL_TXTTSSTSM(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_TXTTSSTSM_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_TXTTSSTSM_MASK)
6155#define ENET_MAC_TIMESTAMP_CTRL_AV8021ASMEN_MASK (0x10000000U)
6156#define ENET_MAC_TIMESTAMP_CTRL_AV8021ASMEN_SHIFT (28U)
6157/*! AV8021ASMEN - AV 802.
6158 */
6159#define ENET_MAC_TIMESTAMP_CTRL_AV8021ASMEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_CTRL_AV8021ASMEN_SHIFT)) & ENET_MAC_TIMESTAMP_CTRL_AV8021ASMEN_MASK)
6160/*! @} */
6161
6162/*! @name MAC_SUB_SCND_INCR - Sub-second increment register */
6163/*! @{ */
6164#define ENET_MAC_SUB_SCND_INCR_SSINC_MASK (0xFF0000U)
6165#define ENET_MAC_SUB_SCND_INCR_SSINC_SHIFT (16U)
6166/*! SSINC - Sub-second increment value.
6167 */
6168#define ENET_MAC_SUB_SCND_INCR_SSINC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SUB_SCND_INCR_SSINC_SHIFT)) & ENET_MAC_SUB_SCND_INCR_SSINC_MASK)
6169/*! @} */
6170
6171/*! @name MAC_SYS_TIME_SCND - System time seconds register */
6172/*! @{ */
6173#define ENET_MAC_SYS_TIME_SCND_TSS_MASK (0xFFFFFFFFU)
6174#define ENET_MAC_SYS_TIME_SCND_TSS_SHIFT (0U)
6175/*! TSS - Time stamp second The value in this field indicates the current value in seconds of the
6176 * System Time maintained by the MAC.
6177 */
6178#define ENET_MAC_SYS_TIME_SCND_TSS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_SCND_TSS_SHIFT)) & ENET_MAC_SYS_TIME_SCND_TSS_MASK)
6179/*! @} */
6180
6181/*! @name MAC_SYS_TIME_NSCND - System time nanoseconds register */
6182/*! @{ */
6183#define ENET_MAC_SYS_TIME_NSCND_TSSS_MASK (0x7FFFFFFFU)
6184#define ENET_MAC_SYS_TIME_NSCND_TSSS_SHIFT (0U)
6185/*! TSSS - Time stamp sub seconds The value in this field has the sub second representation of time, with an accuracy of 0.
6186 */
6187#define ENET_MAC_SYS_TIME_NSCND_TSSS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_NSCND_TSSS_SHIFT)) & ENET_MAC_SYS_TIME_NSCND_TSSS_MASK)
6188/*! @} */
6189
6190/*! @name MAC_SYS_TIME_SCND_UPD - */
6191/*! @{ */
6192#define ENET_MAC_SYS_TIME_SCND_UPD_TSS_MASK (0xFFFFFFFFU)
6193#define ENET_MAC_SYS_TIME_SCND_UPD_TSS_SHIFT (0U)
6194/*! TSS - Time stamp second The value in this field indicates the time, in seconds, to be initialized or added to the system time.
6195 */
6196#define ENET_MAC_SYS_TIME_SCND_UPD_TSS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_SCND_UPD_TSS_SHIFT)) & ENET_MAC_SYS_TIME_SCND_UPD_TSS_MASK)
6197/*! @} */
6198
6199/*! @name MAC_SYS_TIME_NSCND_UPD - */
6200/*! @{ */
6201#define ENET_MAC_SYS_TIME_NSCND_UPD_TSSS_MASK (0x7FFFFFFFU)
6202#define ENET_MAC_SYS_TIME_NSCND_UPD_TSSS_SHIFT (0U)
6203/*! TSSS - Time stamp sub seconds The value in this field has the sub second representation of time, with an accuracy of 0.
6204 */
6205#define ENET_MAC_SYS_TIME_NSCND_UPD_TSSS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_NSCND_UPD_TSSS_SHIFT)) & ENET_MAC_SYS_TIME_NSCND_UPD_TSSS_MASK)
6206#define ENET_MAC_SYS_TIME_NSCND_UPD_ADDSUB_MASK (0x80000000U)
6207#define ENET_MAC_SYS_TIME_NSCND_UPD_ADDSUB_SHIFT (31U)
6208/*! ADDSUB - Add or subtract time When this bit is set, the time value is subtracted with the contents of the update register.
6209 */
6210#define ENET_MAC_SYS_TIME_NSCND_UPD_ADDSUB(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_NSCND_UPD_ADDSUB_SHIFT)) & ENET_MAC_SYS_TIME_NSCND_UPD_ADDSUB_MASK)
6211/*! @} */
6212
6213/*! @name MAC_SYS_TIMESTMP_ADDEND - Time stamp addend register */
6214/*! @{ */
6215#define ENET_MAC_SYS_TIMESTMP_ADDEND_TSAR_MASK (0xFFFFFFFFU)
6216#define ENET_MAC_SYS_TIMESTMP_ADDEND_TSAR_SHIFT (0U)
6217/*! TSAR - Time stamp addend This register indicates the 32-bit time value to be added to the
6218 * Accumulator register to achieve time synchronization.
6219 */
6220#define ENET_MAC_SYS_TIMESTMP_ADDEND_TSAR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIMESTMP_ADDEND_TSAR_SHIFT)) & ENET_MAC_SYS_TIMESTMP_ADDEND_TSAR_MASK)
6221/*! @} */
6222
6223/*! @name MAC_SYS_TIME_HWORD_SCND - */
6224/*! @{ */
6225#define ENET_MAC_SYS_TIME_HWORD_SCND_TSHWR_MASK (0xFFFFU)
6226#define ENET_MAC_SYS_TIME_HWORD_SCND_TSHWR_SHIFT (0U)
6227/*! TSHWR - Time stamp higher word Contains the most significant 16-bits of the Time stamp seconds value.
6228 */
6229#define ENET_MAC_SYS_TIME_HWORD_SCND_TSHWR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIME_HWORD_SCND_TSHWR_SHIFT)) & ENET_MAC_SYS_TIME_HWORD_SCND_TSHWR_MASK)
6230/*! @} */
6231
6232/*! @name MAC_SYS_TIMESTMP_STAT - Time stamp status register */
6233/*! @{ */
6234#define ENET_MAC_SYS_TIMESTMP_STAT_TSSOVF_MASK (0x1U)
6235#define ENET_MAC_SYS_TIMESTMP_STAT_TSSOVF_SHIFT (0U)
6236/*! TSSOVF - Time stamp seconds overflow When set, indicates that the seconds value of the Time
6237 * stamp has overflowed beyond 0xFFFF_FFFF.
6238 */
6239#define ENET_MAC_SYS_TIMESTMP_STAT_TSSOVF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_SYS_TIMESTMP_STAT_TSSOVF_SHIFT)) & ENET_MAC_SYS_TIMESTMP_STAT_TSSOVF_MASK)
6240/*! @} */
6241
6242/*! @name MAC_TX_TIMESTAMP_STATUS_NANOSECONDS - Tx timestamp status nanoseconds */
6243/*! @{ */
6244#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSLO_MASK (0x7FFFFFFFU)
6245#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSLO_SHIFT (0U)
6246/*! TXTSSTSLO - Transmit timestamp status low.
6247 */
6248#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSLO(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSLO_SHIFT)) & ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSLO_MASK)
6249#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSMIS_MASK (0x80000000U)
6250#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSMIS_SHIFT (31U)
6251/*! TXTSSTSMIS - Transmit timestamp status missed.
6252 */
6253#define ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSMIS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSMIS_SHIFT)) & ENET_MAC_TX_TIMESTAMP_STATUS_NANOSECONDS_TXTSSTSMIS_MASK)
6254/*! @} */
6255
6256/*! @name MAC_TX_TIMESTAMP_STATUS_SECONDS - Tx timestamp status seconds */
6257/*! @{ */
6258#define ENET_MAC_TX_TIMESTAMP_STATUS_SECONDS_TXTSSTSHI_MASK (0xFFFFFFFFU)
6259#define ENET_MAC_TX_TIMESTAMP_STATUS_SECONDS_TXTSSTSHI_SHIFT (0U)
6260/*! TXTSSTSHI - Transmit timestamp status high.
6261 */
6262#define ENET_MAC_TX_TIMESTAMP_STATUS_SECONDS_TXTSSTSHI(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TX_TIMESTAMP_STATUS_SECONDS_TXTSSTSHI_SHIFT)) & ENET_MAC_TX_TIMESTAMP_STATUS_SECONDS_TXTSSTSHI_MASK)
6263/*! @} */
6264
6265/*! @name MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND - Timestamp ingress correction */
6266/*! @{ */
6267#define ENET_MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND_TSIC_MASK (0xFFFFFFFFU)
6268#define ENET_MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND_TSIC_SHIFT (0U)
6269/*! TSIC - Transmit ingress correction.
6270 */
6271#define ENET_MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND_TSIC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND_TSIC_SHIFT)) & ENET_MAC_TIMESTAMP_INGRESS_CORR_NANOSECOND_TSIC_MASK)
6272/*! @} */
6273
6274/*! @name MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND - Timestamp egress correction */
6275/*! @{ */
6276#define ENET_MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND_TSEC_MASK (0xFFFFFFFFU)
6277#define ENET_MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND_TSEC_SHIFT (0U)
6278/*! TSEC - Transmit egress correction.
6279 */
6280#define ENET_MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND_TSEC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND_TSEC_SHIFT)) & ENET_MAC_TIMESTAMP_EGRESS_CORR_NANOSECOND_TSEC_MASK)
6281/*! @} */
6282
6283/*! @name MTL_OP_MODE - MTL Operation Mode Register */
6284/*! @{ */
6285#define ENET_MTL_OP_MODE_DTXSTS_MASK (0x2U)
6286#define ENET_MTL_OP_MODE_DTXSTS_SHIFT (1U)
6287/*! DTXSTS - Drop Transmit Status When this bit is set, the Tx packet status received from the MAC is dropped in the MTL.
6288 */
6289#define ENET_MTL_OP_MODE_DTXSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_OP_MODE_DTXSTS_SHIFT)) & ENET_MTL_OP_MODE_DTXSTS_MASK)
6290#define ENET_MTL_OP_MODE_RAA_MASK (0x4U)
6291#define ENET_MTL_OP_MODE_RAA_SHIFT (2U)
6292/*! RAA - Receive Arbitration Algorithm This field is used to select the arbitration algorithm for the Rx side.
6293 */
6294#define ENET_MTL_OP_MODE_RAA(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_OP_MODE_RAA_SHIFT)) & ENET_MTL_OP_MODE_RAA_MASK)
6295#define ENET_MTL_OP_MODE_SCHALG_MASK (0x60U)
6296#define ENET_MTL_OP_MODE_SCHALG_SHIFT (5U)
6297/*! SCHALG - Tx Scheduling Algorithm This field indicates the algorithm for Tx scheduling: 0x00: WRR
6298 * algorithm 0x1: Reserved 0x2: Reserved 0x3: Strict priority algorithm.
6299 */
6300#define ENET_MTL_OP_MODE_SCHALG(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_OP_MODE_SCHALG_SHIFT)) & ENET_MTL_OP_MODE_SCHALG_MASK)
6301#define ENET_MTL_OP_MODE_CNTPRST_MASK (0x100U)
6302#define ENET_MTL_OP_MODE_CNTPRST_SHIFT (8U)
6303/*! CNTPRST - Counters Preset When this bit is set, MTL TxQ0 Underflow register (Table 762) and
6304 * MTL_TxQ1_Underflow (Table 762) registers are initialized/preset to 0x7F0.
6305 */
6306#define ENET_MTL_OP_MODE_CNTPRST(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_OP_MODE_CNTPRST_SHIFT)) & ENET_MTL_OP_MODE_CNTPRST_MASK)
6307#define ENET_MTL_OP_MODE_CNTCLR_MASK (0x200U)
6308#define ENET_MTL_OP_MODE_CNTCLR_SHIFT (9U)
6309/*! CNTCLR - Counters Reset When this bit is set, all counters are reset.
6310 */
6311#define ENET_MTL_OP_MODE_CNTCLR(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_OP_MODE_CNTCLR_SHIFT)) & ENET_MTL_OP_MODE_CNTCLR_MASK)
6312/*! @} */
6313
6314/*! @name MTL_INTR_STAT - MTL Interrupt Status register */
6315/*! @{ */
6316#define ENET_MTL_INTR_STAT_Q0IS_MASK (0x1U)
6317#define ENET_MTL_INTR_STAT_Q0IS_SHIFT (0U)
6318/*! Q0IS - Queue 0 Interrupt status This bit indicates that there is an interrupt from Queue 0.
6319 */
6320#define ENET_MTL_INTR_STAT_Q0IS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_INTR_STAT_Q0IS_SHIFT)) & ENET_MTL_INTR_STAT_Q0IS_MASK)
6321#define ENET_MTL_INTR_STAT_Q1IS_MASK (0x2U)
6322#define ENET_MTL_INTR_STAT_Q1IS_SHIFT (1U)
6323/*! Q1IS - Queue 1 Interrupt status This bit indicates that there is an interrupt from Queue 1.
6324 */
6325#define ENET_MTL_INTR_STAT_Q1IS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_INTR_STAT_Q1IS_SHIFT)) & ENET_MTL_INTR_STAT_Q1IS_MASK)
6326/*! @} */
6327
6328/*! @name MTL_RXQ_DMA_MAP - MTL Receive Queue and DMA Channel Mapping register */
6329/*! @{ */
6330#define ENET_MTL_RXQ_DMA_MAP_Q0MDMACH_MASK (0x1U)
6331#define ENET_MTL_RXQ_DMA_MAP_Q0MDMACH_SHIFT (0U)
6332/*! Q0MDMACH - Queue 0 Mapped to DMA Channel This field controls the routing of the packet received
6333 * in Queue 0 to the DMA channel: 0: DMA Channel 0 1: DMA Channel 1 This field is valid when the
6334 * Q0DDMACH field is reset.
6335 */
6336#define ENET_MTL_RXQ_DMA_MAP_Q0MDMACH(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_RXQ_DMA_MAP_Q0MDMACH_SHIFT)) & ENET_MTL_RXQ_DMA_MAP_Q0MDMACH_MASK)
6337#define ENET_MTL_RXQ_DMA_MAP_Q0DDMACH_MASK (0x10U)
6338#define ENET_MTL_RXQ_DMA_MAP_Q0DDMACH_SHIFT (4U)
6339/*! Q0DDMACH - Queue 0 Enabled for DA-based DMA Channel Selection When set, this bit indicates that
6340 * the packets received in Queue 0 are routed to a particular DMA channel as decided in the MAC
6341 * Receiver based on the DMA channel number programmed in the L3-L4 filter registers, or the
6342 * Ethernet DA address.
6343 */
6344#define ENET_MTL_RXQ_DMA_MAP_Q0DDMACH(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_RXQ_DMA_MAP_Q0DDMACH_SHIFT)) & ENET_MTL_RXQ_DMA_MAP_Q0DDMACH_MASK)
6345#define ENET_MTL_RXQ_DMA_MAP_Q1MDMACH_MASK (0x100U)
6346#define ENET_MTL_RXQ_DMA_MAP_Q1MDMACH_SHIFT (8U)
6347/*! Q1MDMACH - Queue 1 Mapped to DMA Channel This field controls the routing of the received packet
6348 * in Queue 1 to the DMA channel: 0: DMA Channel 0 1: DMA Channel 1 This field is valid when the
6349 * Q1DDMACH field is reset.
6350 */
6351#define ENET_MTL_RXQ_DMA_MAP_Q1MDMACH(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_RXQ_DMA_MAP_Q1MDMACH_SHIFT)) & ENET_MTL_RXQ_DMA_MAP_Q1MDMACH_MASK)
6352#define ENET_MTL_RXQ_DMA_MAP_Q1DDMACH_MASK (0x1000U)
6353#define ENET_MTL_RXQ_DMA_MAP_Q1DDMACH_SHIFT (12U)
6354/*! Q1DDMACH - Queue 1 Enabled for DA-based DMA Channel Selection When set, this bit indicates that
6355 * the packets received in Queue 1 are routed to a particular DMA channel as decided in the MAC
6356 * Receiver based on the DMA channel number programmed in the L3-L4 filter registers, or the
6357 * Ethernet DA address.
6358 */
6359#define ENET_MTL_RXQ_DMA_MAP_Q1DDMACH(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_RXQ_DMA_MAP_Q1DDMACH_SHIFT)) & ENET_MTL_RXQ_DMA_MAP_Q1DDMACH_MASK)
6360/*! @} */
6361
6362/*! @name MTL_QUEUE_MTL_TXQX_OP_MODE - MTL TxQx Operation Mode register */
6363/*! @{ */
6364#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_FTQ_MASK (0x1U)
6365#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_FTQ_SHIFT (0U)
6366/*! FTQ - Flush Transmit Queue When this bit is set, the Tx queue controller logic is reset to its default values.
6367 */
6368#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_FTQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_FTQ_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_FTQ_MASK)
6369#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF_MASK (0x2U)
6370#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF_SHIFT (1U)
6371/*! TSF - Transmit Store and Forward When this bit is set, the transmission starts when a full packet resides in the MTL Tx queue.
6372 */
6373#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF_MASK)
6374#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN_MASK (0xCU)
6375#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN_SHIFT (2U)
6376/*! TXQEN - Transmit Queue Enable This field is used to enable/disable the transmit queue 0.
6377 */
6378#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN_MASK)
6379#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TTC_MASK (0x70U)
6380#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TTC_SHIFT (4U)
6381/*! TTC - Transmit Threshold Control These bits control the threshold level of the MTL Tx Queue.
6382 */
6383#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TTC(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TTC_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TTC_MASK)
6384#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS_MASK (0x70000U)
6385#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS_SHIFT (16U)
6386/*! TQS - Transmit Queue Size This field indicates the size of the allocated Transmit queues in blocks of 256 bytes.
6387 */
6388#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS_MASK)
6389/*! @} */
6390
6391/* The count of ENET_MTL_QUEUE_MTL_TXQX_OP_MODE */
6392#define ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_COUNT (2U)
6393
6394/*! @name MTL_QUEUE_MTL_TXQX_UNDRFLW - MTL TxQx Underflow register */
6395/*! @{ */
6396#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFFRMCNT_MASK (0x7FFU)
6397#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFFRMCNT_SHIFT (0U)
6398/*! UFFRMCNT - Underflow Packet Counter This field indicates the number of packets aborted by the
6399 * controller because of Tx Queue Underflow.
6400 */
6401#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFFRMCNT(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFFRMCNT_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFFRMCNT_MASK)
6402#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFCNTOVF_MASK (0x800U)
6403#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFCNTOVF_SHIFT (11U)
6404/*! UFCNTOVF - Overflow Bit for Underflow Packet Counter This bit is set every time the Tx queue
6405 * Underflow Packet Counter field overflows, that is, it has crossed the maximum count.
6406 */
6407#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFCNTOVF(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFCNTOVF_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_UFCNTOVF_MASK)
6408/*! @} */
6409
6410/* The count of ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW */
6411#define ENET_MTL_QUEUE_MTL_TXQX_UNDRFLW_COUNT (2U)
6412
6413/*! @name MTL_QUEUE_MTL_TXQX_DBG - MTL TxQx Debug register */
6414/*! @{ */
6415#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQPAUSED_MASK (0x1U)
6416#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQPAUSED_SHIFT (0U)
6417/*! TXQPAUSED - Transmit Queue in Pause When this bit is high and the Rx flow control is enabled, it
6418 * indicates that the Tx Queue is in the Pause condition (in the full-duplex only mode) because
6419 * of the following: - Reception of the PFC packet for the priorities assigned to the Tx Queue
6420 * when PFC is enabled - Reception of 802.
6421 */
6422#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQPAUSED(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQPAUSED_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQPAUSED_MASK)
6423#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TRCSTS_MASK (0x6U)
6424#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TRCSTS_SHIFT (1U)
6425/*! TRCSTS - MTL Tx Queue Read Controller Status This field indicates the state of the Tx Queue Read
6426 * Controller: 00: Idle state 01: Read state (transferring data to the MAC transmitter) 10:
6427 * Waiting for pending Tx Status from the MAC transmitter 11: Flushing the Tx queue because of the
6428 * Packet Abort request from the MAC.
6429 */
6430#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TRCSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_TRCSTS_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_TRCSTS_MASK)
6431#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TWCSTS_MASK (0x8U)
6432#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TWCSTS_SHIFT (3U)
6433/*! TWCSTS - MTL Tx Queue Write Controller Status When high, this bit indicates that the MTL Tx
6434 * Queue Write Controller is active, and it is transferring the data to the Tx Queue.
6435 */
6436#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TWCSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_TWCSTS_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_TWCSTS_MASK)
6437#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQSTS_MASK (0x10U)
6438#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQSTS_SHIFT (4U)
6439/*! TXQSTS - MTL Tx Queue Not Empty Status When this bit is high, it indicates that the MTL Tx Queue
6440 * is not empty and some data is left for transmission.
6441 */
6442#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQSTS_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_TXQSTS_MASK)
6443#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXSTSFSTS_MASK (0x20U)
6444#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXSTSFSTS_SHIFT (5U)
6445/*! TXSTSFSTS - MTL Tx Status FIFO Full Status When high, this bit indicates that the MTL Tx Status FIFO is full.
6446 */
6447#define ENET_MTL_QUEUE_MTL_TXQX_DBG_TXSTSFSTS(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_TXSTSFSTS_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_TXSTSFSTS_MASK)
6448#define ENET_MTL_QUEUE_MTL_TXQX_DBG_PTXQ_MASK (0x70000U)
6449#define ENET_MTL_QUEUE_MTL_TXQX_DBG_PTXQ_SHIFT (16U)
6450/*! PTXQ - Number of Packets in the Transmit Queue This field indicates the current number of packets in the Tx Queue.
6451 */
6452#define ENET_MTL_QUEUE_MTL_TXQX_DBG_PTXQ(x) (((uint32_t)(((uint32_t)(x)) << ENET_MTL_QUEUE_MTL_TXQX_DBG_PTXQ_SHIFT)) & ENET_MTL_QUEUE_MTL_TXQX_DBG_PTXQ_MASK)
6453#define ENET_MTL_QUEUE_MTL_TXQX_DBG_STSXSTSF_MASK (0x700000U)
6454#define ENET_MTL_QUEUE_MTL_TXQX_DBG_STSXSTSF_SHIFT (20U)
6455/*! STSXSTSF - Number of Status Word