Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

28202 Zeilen
1.4 MiB

  1. /*
  2. ** ###################################################################
  3. ** Processors: MKV56F1M0VLL24
  4. ** MKV56F1M0VLQ24
  5. ** MKV56F1M0VMD24
  6. ** MKV56F512VLL24
  7. ** MKV56F512VLQ24
  8. ** MKV56F512VMD24
  9. **
  10. ** Compilers: Keil ARM C/C++ Compiler
  11. ** Freescale C/C++ for Embedded ARM
  12. ** GNU C Compiler
  13. ** IAR ANSI C/C++ Compiler for ARM
  14. ** MCUXpresso Compiler
  15. **
  16. ** Reference manual: KV5XP144M240RM Rev. 3, 02/2016
  17. ** Version: rev. 0.3, 2016-02-29
  18. ** Build: b180801
  19. **
  20. ** Abstract:
  21. ** CMSIS Peripheral Access Layer for MKV56F24
  22. **
  23. ** Copyright 1997-2016 Freescale Semiconductor, Inc.
  24. ** Copyright 2016-2018 NXP
  25. **
  26. ** SPDX-License-Identifier: BSD-3-Clause
  27. **
  28. ** http: www.nxp.com
  29. ** mail: support@nxp.com
  30. **
  31. ** Revisions:
  32. ** - rev. 0.1 (2015-02-24)
  33. ** Initial version.
  34. ** - rev. 0.2 (2015-10-21)
  35. ** UART0 - removed LON functionality.
  36. ** FMC - corrected base address.
  37. ** - rev. 0.3 (2016-02-29)
  38. ** PORT - removed registers GICLR, GICHR.
  39. **
  40. ** ###################################################################
  41. */
  42. /*!
  43. * @file MKV56F24.h
  44. * @version 0.3
  45. * @date 2016-02-29
  46. * @brief CMSIS Peripheral Access Layer for MKV56F24
  47. *
  48. * CMSIS Peripheral Access Layer for MKV56F24
  49. */
  50. #ifndef _MKV56F24_H_
  51. #define _MKV56F24_H_ /**< Symbol preventing repeated inclusion */
  52. /** Memory map major version (memory maps with equal major version number are
  53. * compatible) */
  54. #define MCU_MEM_MAP_VERSION 0x0000U
  55. /** Memory map minor version */
  56. #define MCU_MEM_MAP_VERSION_MINOR 0x0003U
  57. /**
  58. * @brief Macro to calculate address of an aliased word in the peripheral
  59. * bitband area for a peripheral register and bit (bit band region 0x40000000 to
  60. * 0x400FFFFF).
  61. * @param Reg Register to access.
  62. * @param Bit Bit number to access.
  63. * @return Address of the aliased word in the peripheral bitband area.
  64. */
  65. #define BITBAND_REGADDR(Reg,Bit) (0x42000000u + (32u*((uint32_t)&(Reg) - (uint32_t)0x40000000u)) + (4u*((uint32_t)(Bit))))
  66. /**
  67. * @brief Macro to access a single bit of a peripheral register (bit band region
  68. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  69. * be used for peripherals with 32bit access allowed.
  70. * @param Reg Register to access.
  71. * @param Bit Bit number to access.
  72. * @return Value of the targeted bit in the bit band region.
  73. */
  74. #define BITBAND_REG32(Reg,Bit) (*((uint32_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  75. #define BITBAND_REG(Reg,Bit) (BITBAND_REG32((Reg),(Bit)))
  76. /**
  77. * @brief Macro to access a single bit of a peripheral register (bit band region
  78. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  79. * be used for peripherals with 16bit access allowed.
  80. * @param Reg Register to access.
  81. * @param Bit Bit number to access.
  82. * @return Value of the targeted bit in the bit band region.
  83. */
  84. #define BITBAND_REG16(Reg,Bit) (*((uint16_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  85. /**
  86. * @brief Macro to access a single bit of a peripheral register (bit band region
  87. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  88. * be used for peripherals with 8bit access allowed.
  89. * @param Reg Register to access.
  90. * @param Bit Bit number to access.
  91. * @return Value of the targeted bit in the bit band region.
  92. */
  93. #define BITBAND_REG8(Reg,Bit) (*((uint8_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  94. /* ----------------------------------------------------------------------------
  95. -- Interrupt vector numbers
  96. ---------------------------------------------------------------------------- */
  97. /*!
  98. * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
  99. * @{
  100. */
  101. /** Interrupt Number Definitions */
  102. #define NUMBER_OF_INT_VECTORS 137 /**< Number of interrupts in the Vector table */
  103. typedef enum IRQn {
  104. /* Auxiliary constants */
  105. NotAvail_IRQn = -128, /**< Not available device specific interrupt */
  106. /* Core interrupts */
  107. NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
  108. HardFault_IRQn = -13, /**< Cortex-M7 SV Hard Fault Interrupt */
  109. MemoryManagement_IRQn = -12, /**< Cortex-M7 Memory Management Interrupt */
  110. BusFault_IRQn = -11, /**< Cortex-M7 Bus Fault Interrupt */
  111. UsageFault_IRQn = -10, /**< Cortex-M7 Usage Fault Interrupt */
  112. SVCall_IRQn = -5, /**< Cortex-M7 SV Call Interrupt */
  113. DebugMonitor_IRQn = -4, /**< Cortex-M7 Debug Monitor Interrupt */
  114. PendSV_IRQn = -2, /**< Cortex-M7 Pend SV Interrupt */
  115. SysTick_IRQn = -1, /**< Cortex-M7 System Tick Interrupt */
  116. /* Device specific interrupts */
  117. DMA0_DMA16_IRQn = 0, /**< DMA channel 0/16 transfer complete */
  118. DMA1_DMA17_IRQn = 1, /**< DMA channel 1/17 transfer complete */
  119. DMA2_DMA18_IRQn = 2, /**< DMA channel 2/18 transfer complete */
  120. DMA3_DMA19_IRQn = 3, /**< DMA channel 3/19 transfer complete */
  121. DMA4_DMA20_IRQn = 4, /**< DMA channel 4/20 transfer complete */
  122. DMA5_DMA21_IRQn = 5, /**< DMA channel 5/21 transfer complete */
  123. DMA6_DMA22_IRQn = 6, /**< DMA channel 6/22 transfer complete */
  124. DMA7_DMA23_IRQn = 7, /**< DMA channel 7/23 transfer complete */
  125. DMA8_DMA24_IRQn = 8, /**< DMA channel 8/24 transfer complete */
  126. DMA9_DMA25_IRQn = 9, /**< DMA channel 9/25 transfer complete */
  127. DMA10_DMA26_IRQn = 10, /**< DMA channel 10/26 transfer complete */
  128. DMA11_DMA27_IRQn = 11, /**< DMA channel 11/27 transfer complete */
  129. DMA12_DMA28_IRQn = 12, /**< DMA channel 12/28 transfer complete */
  130. DMA13_DMA29_IRQn = 13, /**< DMA channel 13/29 transfer complete */
  131. DMA14_DMA30_IRQn = 14, /**< DMA channel 14/30 transfer complete */
  132. DMA15_DMA31_IRQn = 15, /**< DMA channel 15/31 transfer complete */
  133. DMA_Error_IRQn = 16, /**< DMA error interrupt channels 0-31 */
  134. MCM_IRQn = 17, /**< MCM normal interrupt */
  135. FTFE_IRQn = 18, /**< FTFL command complete */
  136. Read_Collision_IRQn = 19, /**< FTFL read collision */
  137. PMC_IRQn = 20, /**< PMC controller low-voltage detect, low-voltage warning */
  138. LLWU_IRQn = 21, /**< Low leakage wakeup */
  139. WDOG_EWM_IRQn = 22, /**< Single interrupt vector for WDOG and EWM */
  140. TRNG0_IRQn = 23, /**< True randon number generator */
  141. I2C0_IRQn = 24, /**< Inter-integrated circuit 0 */
  142. I2C1_IRQn = 25, /**< Inter-integrated circuit 1 */
  143. SPI0_IRQn = 26, /**< Serial peripheral Interface 0 */
  144. SPI1_IRQn = 27, /**< Serial peripheral Interface 1 */
  145. UART5_RX_TX_IRQn = 28, /**< UART5 receive/transmit interrupt */
  146. UART5_ERR_IRQn = 29, /**< UART5 error interrupt */
  147. Reserved46_IRQn = 30, /**< Reserved interrupt */
  148. UART0_RX_TX_IRQn = 31, /**< UART0 receive/transmit interrupt */
  149. UART0_ERR_IRQn = 32, /**< UART0 error interrupt */
  150. UART1_RX_TX_IRQn = 33, /**< UART1 receive/transmit interrupt */
  151. UART1_ERR_IRQn = 34, /**< UART1 error interrupt */
  152. UART2_RX_TX_IRQn = 35, /**< UART2 receive/transmit interrupt */
  153. UART2_ERR_IRQn = 36, /**< UART2 error interrupt */
  154. ADC0_IRQn = 37, /**< Analog-to-digital converter 0 */
  155. HSADC_ERR_IRQn = 38, /**< High speed analog-to-digital converter zero cross */
  156. HSADC0_CCA_IRQn = 39, /**< High speed analog-to-digital converter 0 submodule A scan complete */
  157. CMP0_IRQn = 40, /**< Comparator 0 */
  158. CMP1_IRQn = 41, /**< Comparator 1 */
  159. FTM0_IRQn = 42, /**< FlexTimer module 0 fault, overflow and channels interrupt */
  160. FTM1_IRQn = 43, /**< FlexTimer module 1 fault, overflow and channels interrupt */
  161. UART3_RX_TX_IRQn = 44, /**< UART3 receive/transmit interrupt */
  162. UART3_ERR_IRQn = 45, /**< UART3 error interrupt */
  163. UART4_RX_TX_IRQn = 46, /**< UART4 receive/transmit interrupt */
  164. UART4_ERR_IRQn = 47, /**< UART4 error interrupt */
  165. PIT0_IRQn = 48, /**< Periodic interrupt timer channel 0 */
  166. PIT1_IRQn = 49, /**< Periodic interrupt timer channel 1 */
  167. PIT2_IRQn = 50, /**< Periodic interrupt timer channel 2 */
  168. PIT3_IRQn = 51, /**< Periodic interrupt timer channel 3 */
  169. PDB0_IRQn = 52, /**< Programmable delay block 0 */
  170. FTM2_IRQn = 53, /**< FlexTimer module 2 fault, overflow and channels interrupt */
  171. XBARA_IRQn = 54, /**< Inter-peripheral crossbar switch A */
  172. PDB1_IRQn = 55, /**< Programmable delay block 1 */
  173. DAC0_IRQn = 56, /**< Digital-to-analog converter 0 */
  174. MCG_IRQn = 57, /**< Multipurpose clock generator */
  175. LPTMR0_IRQn = 58, /**< Low power timer interrupt */
  176. PORTA_IRQn = 59, /**< Port A interrupt */
  177. PORTB_IRQn = 60, /**< Port B interrupt */
  178. PORTC_IRQn = 61, /**< Port C interrupt */
  179. PORTD_IRQn = 62, /**< Port D interrupt */
  180. PORTE_IRQn = 63, /**< Port E interrupt */
  181. SWI_IRQn = 64, /**< Software interrupt */
  182. SPI2_IRQn = 65, /**< Serial peripheral Interface 2 */
  183. ENC_COMPARE_IRQn = 66, /**< ENC Compare */
  184. ENC_HOME_IRQn = 67, /**< ENC Home */
  185. ENC_WDOG_SAB_IRQn = 68, /**< ENC Wdog/SAB */
  186. ENC_INDEX_IRQn = 69, /**< ENC Index/Roll over/Roll Under */
  187. CMP2_IRQn = 70, /**< Comparator 2 */
  188. FTM3_IRQn = 71, /**< FlexTimer module 3 fault, overflow and channels */
  189. Reserved88_IRQn = 72, /**< Reserved interrupt */
  190. HSADC0_CCB_IRQn = 73, /**< High speed analog-to-digital converter 0 submodule B scan complete */
  191. HSADC1_CCA_IRQn = 74, /**< High speed analog-to-digital converter 1 submodule A scan complete */
  192. CAN0_ORed_Message_buffer_IRQn = 75, /**< Flex controller area network 0 message buffer */
  193. CAN0_Bus_Off_IRQn = 76, /**< Flex controller area network 0 bus off */
  194. CAN0_Error_IRQn = 77, /**< Flex controller area network 0 error */
  195. CAN0_Tx_Warning_IRQn = 78, /**< Flex controller area network 0 transmit */
  196. CAN0_Rx_Warning_IRQn = 79, /**< Flex controller area network 0 receive */
  197. CAN0_Wake_Up_IRQn = 80, /**< Flex controller area network 0 wake up */
  198. PWM0_CMP0_IRQn = 81, /**< Pulse width modulator 0 channel 0 compare */
  199. PWM0_RELOAD0_IRQn = 82, /**< Pulse width modulator 0 channel 0 reload */
  200. PWM0_CMP1_IRQn = 83, /**< Pulse width modulator 0 channel 1 compare */
  201. PWM0_RELOAD1_IRQn = 84, /**< Pulse width modulator 0 channel 1 reload */
  202. PWM0_CMP2_IRQn = 85, /**< Pulse width modulator 0 channel 2 compare */
  203. PWM0_RELOAD2_IRQn = 86, /**< Pulse width modulator 0 channel 2 reload */
  204. PWM0_CMP3_IRQn = 87, /**< Pulse width modulator 0 channel 3 compare */
  205. PWM0_RELOAD3_IRQn = 88, /**< Pulse width modulator 0 channel 3 reload */
  206. PWM0_CAP_IRQn = 89, /**< Pulse width modulator 0 capture */
  207. PWM0_RERR_IRQn = 90, /**< Pulse width modulator 0 reload error */
  208. PWM0_FAULT_IRQn = 91, /**< Pulse width modulator 0 fault */
  209. CMP3_IRQn = 92, /**< Comparator 3 */
  210. HSADC1_CCB_IRQn = 93, /**< High speed analog-to-digital converter 1 submodule B scan complete */
  211. CAN1_ORed_Message_buffer_IRQn = 94, /**< Flex controller area network 1 message buffer */
  212. CAN1_Bus_Off_IRQn = 95, /**< Flex controller area network 1 bus off */
  213. CAN1_Error_IRQn = 96, /**< Flex controller area network 1 error */
  214. CAN1_Tx_Warning_IRQn = 97, /**< Flex controller area network 1 transmit */
  215. CAN1_Rx_Warning_IRQn = 98, /**< Flex controller area network 1 receive */
  216. CAN1_Wake_Up_IRQn = 99, /**< Flex controller area network 1 wake up */
  217. Reserved116_IRQn = 100, /**< Reserved interrupt */
  218. Reserved117_IRQn = 101, /**< Reserved interrupt */
  219. Reserved118_IRQn = 102, /**< Reserved interrupt */
  220. Reserved119_IRQn = 103, /**< Reserved interrupt */
  221. PWM1_CMP0_IRQn = 104, /**< Pulse width modulator 1 channel 0 compare */
  222. PWM1_RELOAD0_IRQn = 105, /**< Pulse width modulator 1 channel 0 reload */
  223. PWM1_CMP1_IRQn = 106, /**< Pulse width modulator 1 channel 1 compare */
  224. PWM1_RELOAD1_IRQn = 107, /**< Pulse width modulator 1 channel 1 reload */
  225. PWM1_CMP2_IRQn = 108, /**< Pulse width modulator 1 channel 2 compare */
  226. PWM1_RELOAD2_IRQn = 109, /**< Pulse width modulator 1 channel 2 reload */
  227. PWM1_CMP3_IRQn = 110, /**< Pulse width modulator 1 channel 3 compare */
  228. PWM1_RELOAD3_IRQn = 111, /**< Pulse width modulator 1 channel 3 reload */
  229. PWM1_CAP_IRQn = 112, /**< Pulse width modulator 1 capture */
  230. PWM1_RERR_IRQn = 113, /**< Pulse width modulator 1 reload error */
  231. PWM1_FAULT_IRQn = 114, /**< Pulse width modulator 1 fault */
  232. Reserved131_IRQn = 115, /**< Reserved interrupt */
  233. Reserved132_IRQn = 116, /**< Reserved interrupt */
  234. Reserved133_IRQn = 117, /**< Reserved interrupt */
  235. Reserved134_IRQn = 118, /**< Reserved interrupt */
  236. Reserved135_IRQn = 119, /**< Reserved interrupt */
  237. Reserved136_IRQn = 120 /**< Reserved interrupt */
  238. } IRQn_Type;
  239. /*!
  240. * @}
  241. */ /* end of group Interrupt_vector_numbers */
  242. /* ----------------------------------------------------------------------------
  243. -- Cortex M7 Core Configuration
  244. ---------------------------------------------------------------------------- */
  245. /*!
  246. * @addtogroup Cortex_Core_Configuration Cortex M7 Core Configuration
  247. * @{
  248. */
  249. #define __MPU_PRESENT 1 /**< Defines if an MPU is present or not */
  250. #define __ICACHE_PRESENT 1 /**< Defines if an ICACHE is present or not */
  251. #define __DCACHE_PRESENT 1 /**< Defines if an DCACHE is present or not */
  252. #define __DTCM_PRESENT 1 /**< Defines if an DTCM is present or not */
  253. #define __NVIC_PRIO_BITS 4 /**< Number of priority bits implemented in the NVIC */
  254. #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
  255. #define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
  256. #include "core_cm7.h" /* Core Peripheral Access Layer */
  257. #include "system_MKV56F24.h" /* Device specific configuration file */
  258. /*!
  259. * @}
  260. */ /* end of group Cortex_Core_Configuration */
  261. /* ----------------------------------------------------------------------------
  262. -- Mapping Information
  263. ---------------------------------------------------------------------------- */
  264. /*!
  265. * @addtogroup Mapping_Information Mapping Information
  266. * @{
  267. */
  268. /** Mapping Information */
  269. /*!
  270. * @addtogroup edma_request
  271. * @{
  272. */
  273. /*******************************************************************************
  274. * Definitions
  275. ******************************************************************************/
  276. /*!
  277. * @brief Structure for the DMA hardware request
  278. *
  279. * Defines the structure for the DMA hardware request collections. The user can configure the
  280. * hardware request into DMAMUX to trigger the DMA transfer accordingly. The index
  281. * of the hardware request varies according to the to SoC.
  282. */
  283. typedef enum _dma_request_source
  284. {
  285. kDmaRequestMux0Disable = 0|0x100U, /**< DMAMUX TriggerDisabled. */
  286. kDmaRequestMux0Reserved1 = 1|0x100U, /**< Reserved1 */
  287. kDmaRequestMux0UART0Rx = 2|0x100U, /**< UART0 Receive. */
  288. kDmaRequestMux0UART0Tx = 3|0x100U, /**< UART0 Transmit. */
  289. kDmaRequestMux0UART1Rx = 4|0x100U, /**< UART1 Receive. */
  290. kDmaRequestMux0UART1Tx = 5|0x100U, /**< UART1 Transmit. */
  291. kDmaRequestMux0PWM0WR0 = 6|0x100U, /**< PWM0 Write Request 0. */
  292. kDmaRequestMux0PWM0WR1 = 7|0x100U, /**< PWM0 Write Request 1. */
  293. kDmaRequestMux0PWM0WR2 = 8|0x100U, /**< PWM0 Write Request 2. */
  294. kDmaRequestMux0PWM0WR3 = 9|0x100U, /**< PWM0 Write Request 3. */
  295. kDmaRequestMux0PWM0CP0 = 10|0x100U, /**< PWM0 Capture 0. */
  296. kDmaRequestMux0PWM0CP1 = 11|0x100U, /**< PWM0 Capture 1. */
  297. kDmaRequestMux0PWM0CP2 = 12|0x100U, /**< PWM0 Capture 2. */
  298. kDmaRequestMux0PWM0CP3 = 13|0x100U, /**< PWM0 Capture 3. */
  299. kDmaRequestMux0CAN0 = 14|0x100U, /**< CAN0. */
  300. kDmaRequestMux0CAN1 = 15|0x100U, /**< CAN1. */
  301. kDmaRequestMux0SPI0Rx = 16|0x100U, /**< SPI0 Receive. */
  302. kDmaRequestMux0SPI0Tx = 17|0x100U, /**< SPI0 Transmit. */
  303. kDmaRequestMux0XBARAOUT0 = 18|0x100U, /**< XBARA Output 0. */
  304. kDmaRequestMux0XBARAOUT1 = 19|0x100U, /**< XBARA Output 1. */
  305. kDmaRequestMux0XBARAOUT2 = 20|0x100U, /**< XBARA Output 2. */
  306. kDmaRequestMux0XBARAOUT3 = 21|0x100U, /**< XBARA Output 3. */
  307. kDmaRequestMux0I2C0 = 22|0x100U, /**< I2C0. */
  308. kDmaRequestMux0Reserved23 = 23|0x100U, /**< Reserved23 */
  309. kDmaRequestMux0FTM0Channel0 = 24|0x100U, /**< FTM0 C0V. */
  310. kDmaRequestMux0FTM0Channel1 = 25|0x100U, /**< FTM0 C1V. */
  311. kDmaRequestMux0FTM0Channel2 = 26|0x100U, /**< FTM0 C2V. */
  312. kDmaRequestMux0FTM0Channel3 = 27|0x100U, /**< FTM0 C3V. */
  313. kDmaRequestMux0FTM0Channel4 = 28|0x100U, /**< FTM0 C4V. */
  314. kDmaRequestMux0FTM0Channel5 = 29|0x100U, /**< FTM0 C5V. */
  315. kDmaRequestMux0FTM0Channel6 = 30|0x100U, /**< FTM0 C6V. */
  316. kDmaRequestMux0FTM0Channel7 = 31|0x100U, /**< FTM0 C7V. */
  317. kDmaRequestMux0FTM1Channel0 = 32|0x100U, /**< FTM1 C0V. */
  318. kDmaRequestMux0FTM1Channel1 = 33|0x100U, /**< FTM1 C1V. */
  319. kDmaRequestMux0CMP3 = 34|0x100U, /**< CMP3. */
  320. kDmaRequestMux0Reserved35 = 35|0x100U, /**< Reserved35 */
  321. kDmaRequestMux0FTM3Channel0 = 36|0x100U, /**< FTM3 C0V. */
  322. kDmaRequestMux0FTM3Channel1 = 37|0x100U, /**< FTM3 C1V. */
  323. kDmaRequestMux0FTM3Channel2 = 38|0x100U, /**< FTM3 C2V. */
  324. kDmaRequestMux0FTM3Channel3 = 39|0x100U, /**< FTM3 C3V. */
  325. kDmaRequestMux0HSADC0A = 40|0x100U, /**< HSADC0. */
  326. kDmaRequestMux0HSADC0B = 41|0x100U, /**< HSADC0. */
  327. kDmaRequestMux0CMP0 = 42|0x100U, /**< CMP0. */
  328. kDmaRequestMux0CMP1 = 43|0x100U, /**< CMP1. */
  329. kDmaRequestMux0CMP2 = 44|0x100U, /**< CMP2. */
  330. kDmaRequestMux0DAC0 = 45|0x100U, /**< DAC0. */
  331. kDmaRequestMux0Reserved46 = 46|0x100U, /**< Reserved46 */
  332. kDmaRequestMux0PDB1 = 47|0x100U, /**< PDB1. */
  333. kDmaRequestMux0PDB0 = 48|0x100U, /**< PDB0. */
  334. kDmaRequestMux0PortA = 49|0x100U, /**< PTA. */
  335. kDmaRequestMux0PortB = 50|0x100U, /**< PTB. */
  336. kDmaRequestMux0PortC = 51|0x100U, /**< PTC. */
  337. kDmaRequestMux0PortD = 52|0x100U, /**< PTD. */
  338. kDmaRequestMux0PortE = 53|0x100U, /**< PTE. */
  339. kDmaRequestMux0FTM3Channel4 = 54|0x100U, /**< FTM3 C4V. */
  340. kDmaRequestMux0FTM3Channel5 = 55|0x100U, /**< FTM3 C5V. */
  341. kDmaRequestMux0FTM3Channel6 = 56|0x100U, /**< FTM3 C6V. */
  342. kDmaRequestMux0FTM3Channel7 = 57|0x100U, /**< FTM3 C7V. */
  343. kDmaRequestMux0Reserved58 = 58|0x100U, /**< Reserved58 */
  344. kDmaRequestMux0Reserved59 = 59|0x100U, /**< Reserved59 */
  345. kDmaRequestMux0AlwaysOn60 = 60|0x100U, /**< DMAMUX Always Enabled slot. */
  346. kDmaRequestMux0AlwaysOn61 = 61|0x100U, /**< DMAMUX Always Enabled slot. */
  347. kDmaRequestMux0AlwaysOn62 = 62|0x100U, /**< DMAMUX Always Enabled slot. */
  348. kDmaRequestMux0AlwaysOn63 = 63|0x100U, /**< DMAMUX Always Enabled slot. */
  349. kDmaRequestMux0Group1Disable = 0|0x200U, /**< DMAMUX TriggerDisabled. */
  350. kDmaRequestMux0Group1Reserved1 = 1|0x200U, /**< Reserved1 */
  351. kDmaRequestMux0Group1UART2Rx = 2|0x200U, /**< UART2 Receive. */
  352. kDmaRequestMux0Group1UART2Tx = 3|0x200U, /**< UART2 Transmit. */
  353. kDmaRequestMux0Group1UART3Rx = 4|0x200U, /**< UART3 Receive. */
  354. kDmaRequestMux0Group1UART3Tx = 5|0x200U, /**< UART3 Transmit. */
  355. kDmaRequestMux0Group1PWM1WR0 = 6|0x200U, /**< PWM1 Write Request 0. */
  356. kDmaRequestMux0Group1PWM1WR1 = 7|0x200U, /**< PWM1 Write Request 1. */
  357. kDmaRequestMux0Group1PWM1WR2 = 8|0x200U, /**< PWM1 Write Request 2. */
  358. kDmaRequestMux0Group1PWM1WR3 = 9|0x200U, /**< PWM1 Write Request 3. */
  359. kDmaRequestMux0Group1PWM1CP0 = 10|0x200U, /**< PWM1 Capture 0. */
  360. kDmaRequestMux0Group1PWM1CP1 = 11|0x200U, /**< PWM1 Capture 1. */
  361. kDmaRequestMux0Group1PWM1CP2 = 12|0x200U, /**< PWM1 Capture 2. */
  362. kDmaRequestMux0Group1PWM1CP3 = 13|0x200U, /**< PWM1 Capture 3. */
  363. kDmaRequestMux0Group1Reserved14 = 14|0x200U, /**< Reserved14 */
  364. kDmaRequestMux0Group1Reserved15 = 15|0x200U, /**< Reserved15 */
  365. kDmaRequestMux0Group1SPI1Rx = 16|0x200U, /**< SPI1 Receive. */
  366. kDmaRequestMux0Group1SPI1Tx = 17|0x200U, /**< SPI1 Transmit. */
  367. kDmaRequestMux0Group1Reserved18 = 18|0x200U, /**< Reserved18 */
  368. kDmaRequestMux0Group1Reserved19 = 19|0x200U, /**< Reserved19 */
  369. kDmaRequestMux0Group1Reserved20 = 20|0x200U, /**< Reserved20 */
  370. kDmaRequestMux0Group1Reserved21 = 21|0x200U, /**< Reserved21 */
  371. kDmaRequestMux0Group1I2C1 = 22|0x200U, /**< I2C1. */
  372. kDmaRequestMux0Group1Reserved23 = 23|0x200U, /**< Reserved23 */
  373. kDmaRequestMux0Group1Reserved24 = 24|0x200U, /**< Reserved24 */
  374. kDmaRequestMux0Group1Reserved25 = 25|0x200U, /**< Reserved25 */
  375. kDmaRequestMux0Group1Reserved26 = 26|0x200U, /**< Reserved26 */
  376. kDmaRequestMux0Group1Reserved27 = 27|0x200U, /**< Reserved27 */
  377. kDmaRequestMux0Group1Reserved28 = 28|0x200U, /**< Reserved28 */
  378. kDmaRequestMux0Group1Reserved29 = 29|0x200U, /**< Reserved29 */
  379. kDmaRequestMux0Group1Reserved30 = 30|0x200U, /**< Reserved30 */
  380. kDmaRequestMux0Group1Reserved31 = 31|0x200U, /**< Reserved31 */
  381. kDmaRequestMux0Group1FTM2Channel0 = 32|0x200U, /**< FTM2 C0V. */
  382. kDmaRequestMux0Group1FTM2Channel1 = 33|0x200U, /**< FTM2 C1V. */
  383. kDmaRequestMux0Group1SPI2Rx = 34|0x200U, /**< SPI2 Receive. */
  384. kDmaRequestMux0Group1SPI2Tx = 35|0x200U, /**< SPI2 Transmit. */
  385. kDmaRequestMux0Group1Reserved36 = 36|0x200U, /**< Reserved36 */
  386. kDmaRequestMux0Group1Reserved37 = 37|0x200U, /**< Reserved37 */
  387. kDmaRequestMux0Group1Reserved38 = 38|0x200U, /**< Reserved38 */
  388. kDmaRequestMux0Group1Reserved39 = 39|0x200U, /**< Reserved39 */
  389. kDmaRequestMux0Group1HSADC1A = 40|0x200U, /**< HSADC1. */
  390. kDmaRequestMux0Group1HSADC1B = 41|0x200U, /**< HSADC1. */
  391. kDmaRequestMux0Group1Reserved42 = 42|0x200U, /**< Reserved42 */
  392. kDmaRequestMux0Group1Reserved43 = 43|0x200U, /**< Reserved43 */
  393. kDmaRequestMux0Group1Reserved44 = 44|0x200U, /**< Reserved44 */
  394. kDmaRequestMux0Group1ADC0 = 45|0x200U, /**< ADC0. */
  395. kDmaRequestMux0Group1Reserved46 = 46|0x200U, /**< Reserved46 */
  396. kDmaRequestMux0Group1Reserved47 = 47|0x200U, /**< Reserved47 */
  397. kDmaRequestMux0Group1Reserved48 = 48|0x200U, /**< Reserved48 */
  398. kDmaRequestMux0Group1Reserved49 = 49|0x200U, /**< Reserved49 */
  399. kDmaRequestMux0Group1Reserved50 = 50|0x200U, /**< Reserved50 */
  400. kDmaRequestMux0Group1Reserved51 = 51|0x200U, /**< Reserved51 */
  401. kDmaRequestMux0Group1Reserved52 = 52|0x200U, /**< Reserved52 */
  402. kDmaRequestMux0Group1Reserved53 = 53|0x200U, /**< Reserved53 */
  403. kDmaRequestMux0Group1UART4Rx = 54|0x200U, /**< UART4 Receive. */
  404. kDmaRequestMux0Group1UART4Tx = 55|0x200U, /**< UART4 Transmit. */
  405. kDmaRequestMux0Group1UART5Rx = 56|0x200U, /**< UART5 Receive. */
  406. kDmaRequestMux0Group1UART5Tx = 57|0x200U, /**< UART5 Transmit. */
  407. kDmaRequestMux0Group1Reserved58 = 58|0x200U, /**< Reserved58 */
  408. kDmaRequestMux0Group1Reserved59 = 59|0x200U, /**< Reserved59 */
  409. kDmaRequestMux0Group1AlwaysOn60 = 60|0x200U, /**< DMAMUX Always Enabled slot. */
  410. kDmaRequestMux0Group1AlwaysOn61 = 61|0x200U, /**< DMAMUX Always Enabled slot. */
  411. kDmaRequestMux0Group1AlwaysOn62 = 62|0x200U, /**< DMAMUX Always Enabled slot. */
  412. kDmaRequestMux0Group1AlwaysOn63 = 63|0x200U, /**< DMAMUX Always Enabled slot. */
  413. } dma_request_source_t;
  414. /* @} */
  415. typedef enum _xbar_input_signal
  416. {
  417. kXBARA_InputVss = 0|0x100U, /**< Logic zero output assigned to XBARA_IN0 input. */
  418. kXBARA_InputVdd = 1|0x100U, /**< Logic one output assigned to XBARA_IN1 input. */
  419. kXBARA_InputXbarIn2 = 2|0x100U, /**< XB_IN2 input pin output assigned to XBARA_IN2 input. */
  420. kXBARA_InputXbarIn3 = 3|0x100U, /**< XB_IN3 input pin output assigned to XBARA_IN3 input. */
  421. kXBARA_InputXbarIn4 = 4|0x100U, /**< XB_IN4 input pin output assigned to XBARA_IN4 input. */
  422. kXBARA_InputXbarIn5 = 5|0x100U, /**< XB_IN5 input pin output assigned to XBARA_IN5 input. */
  423. kXBARA_InputXbarIn6 = 6|0x100U, /**< XB_IN6 input pin output assigned to XBARA_IN6 input. */
  424. kXBARA_InputXbarIn7 = 7|0x100U, /**< XB_IN7 input pin output assigned to XBARA_IN7 input. */
  425. kXBARA_InputXbarIn8 = 8|0x100U, /**< XB_IN8 input pin output assigned to XBARA_IN8 input. */
  426. kXBARA_InputXbarIn9 = 9|0x100U, /**< XB_IN9 input pin output assigned to XBARA_IN9 input. */
  427. kXBARA_InputXbarIn10 = 10|0x100U, /**< XB_IN10 input pin output assigned to XBARA_IN10 input. */
  428. kXBARA_InputXbarIn11 = 11|0x100U, /**< XB_IN11 input pin output assigned to XBARA_IN11 input. */
  429. kXBARA_InputCmp0Output = 12|0x100U, /**< CMP0 Output output assigned to XBARA_IN12 input. */
  430. kXBARA_InputCmp1Output = 13|0x100U, /**< CMP1 Output output assigned to XBARA_IN13 input. */
  431. kXBARA_InputCmp2Output = 14|0x100U, /**< CMP2 Output output assigned to XBARA_IN14 input. */
  432. kXBARA_InputCmp3Output = 15|0x100U, /**< CMP3 Output output assigned to XBARA_IN15 input. */
  433. kXBARA_InputFtm0Match = 16|0x100U, /**< FTM0 all channels match trigger ORed together output assigned to XBARA_IN16 input. */
  434. kXBARA_InputFtm0Extrig = 17|0x100U, /**< FTM0 counter init trigger output assigned to XBARA_IN17 input. */
  435. kXBARA_InputFtm3Match = 18|0x100U, /**< FTM3 all channels match trigger ORed together output assigned to XBARA_IN18 input. */
  436. kXBARA_InputFtm3Extrig = 19|0x100U, /**< FTM3 counter init trigger output assigned to XBARA_IN19 input. */
  437. kXBARA_InputPwm0Ch0Trg0 = 20|0x100U, /**< PWMA channel 0 trigger 0 output assigned to XBARA_IN20 input. */
  438. kXBARA_InputPwm0Ch0Trg1 = 21|0x100U, /**< PWMA channel 0 trigger 1 output assigned to XBARA_IN21 input. */
  439. kXBARA_InputPwm0Ch1Trg0 = 22|0x100U, /**< PWMA channel 1 trigger 0 output assigned to XBARA_IN22 input. */
  440. kXBARA_InputPwm0Ch1Trg1 = 23|0x100U, /**< PWMA channel 1 trigger 1 output assigned to XBARA_IN23 input. */
  441. kXBARA_InputPwm0Ch2Trg0 = 24|0x100U, /**< PWMA channel 2 trigger 0 output assigned to XBARA_IN24 input. */
  442. kXBARA_InputPwm0Ch2Trg1 = 25|0x100U, /**< PWMA channel 2 trigger 1 output assigned to XBARA_IN25 input. */
  443. kXBARA_InputPwm0Ch3Trg0 = 26|0x100U, /**< PWMA channel 3 trigger 0 output assigned to XBARA_IN26 input. */
  444. kXBARA_InputPwm0Ch3Trg1 = 27|0x100U, /**< PWMA channel 3 trigger 1 output assigned to XBARA_IN27 input. */
  445. kXBARA_InputPdb0Ch1Output = 28|0x100U, /**< PDB0 channel 1 output trigger output assigned to XBARA_IN28 input. */
  446. kXBARA_InputPdb0Ch0Output = 29|0x100U, /**< PDB0 channel 0 output trigger output assigned to XBARA_IN29 input. */
  447. kXBARA_InputPdb1Ch1Output = 30|0x100U, /**< PDB1 channel 1 output trigger output assigned to XBARA_IN30 input. */
  448. kXBARA_InputPdb1Ch0Output = 31|0x100U, /**< PDB1 channel 0 output trigger output assigned to XBARA_IN31 input. */
  449. kXBARA_InputHsadc1Cca = 32|0x100U, /**< High Speed Analog-to-Digital Converter 1 conversion A complete output assigned to XBARA_IN32 input. */
  450. kXBARA_InputHsadc0Cca = 33|0x100U, /**< High Speed Analog-to-Digital Converter 0 conversion A complete output assigned to XBARA_IN33 input. */
  451. kXBARA_InputHsadc1Ccb = 34|0x100U, /**< High Speed Analog-to-Digital Converter 1 conversion B complete output assigned to XBARA_IN34 input. */
  452. kXBARA_InputHsadc0Ccb = 35|0x100U, /**< High Speed Analog-to-Digital Converter 0 conversion B complete output assigned to XBARA_IN35 input. */
  453. kXBARA_InputFtm1Match = 36|0x100U, /**< FTM1 all channels match trigger ORed together output assigned to XBARA_IN36 input. */
  454. kXBARA_InputFtm1Extrig = 37|0x100U, /**< FTM1 counter init trigger output assigned to XBARA_IN37 input. */
  455. kXBARA_InputDmaCh0Done = 38|0x100U, /**< DMA channel 0 done output assigned to XBARA_IN38 input. */
  456. kXBARA_InputDmaCh1Done = 39|0x100U, /**< DMA channel 1 done output assigned to XBARA_IN39 input. */
  457. kXBARA_InputDmaCh6Done = 40|0x100U, /**< DMA channel 6 done output assigned to XBARA_IN40 input. */
  458. kXBARA_InputDmaCh7Done = 41|0x100U, /**< DMA channel 7 done output assigned to XBARA_IN41 input. */
  459. kXBARA_InputPitTrigger0 = 42|0x100U, /**< PIT trigger 0 output assigned to XBARA_IN42 input. */
  460. kXBARA_InputPitTrigger1 = 43|0x100U, /**< PIT trigger 1 output assigned to XBARA_IN43 input. */
  461. kXBARA_InputAdc0Coco = 44|0x100U, /**< Analog-to-Digital Converter 0 conversion complete output assigned to XBARA_IN44 input. */
  462. kXBARA_InputEnc0CmpPosMatch = 45|0x100U, /**< ENC compare trigger and position match output assigned to XBARA_IN45 input. */
  463. kXBARA_InputAndOrInvert0 = 46|0x100U, /**< AOI output 0 output assigned to XBARA_IN46 input. */
  464. kXBARA_InputAndOrInvert1 = 47|0x100U, /**< AOI output 1 output assigned to XBARA_IN47 input. */
  465. kXBARA_InputAndOrInvert2 = 48|0x100U, /**< AOI output 2 output assigned to XBARA_IN48 input. */
  466. kXBARA_InputAndOrInvert3 = 49|0x100U, /**< AOI output 3 output assigned to XBARA_IN49 input. */
  467. kXBARA_InputPitTrigger2 = 50|0x100U, /**< PIT trigger 2 output assigned to XBARA_IN50 input. */
  468. kXBARA_InputPitTrigger3 = 51|0x100U, /**< PIT trigger 3 output assigned to XBARA_IN51 input. */
  469. kXBARA_InputPwm1Ch0Trg0OrTrg1 = 52|0x100U, /**< PWMB channel 0 trigger 0 or trigger 1 output assigned to XBARA_IN52 input. */
  470. kXBARA_InputPwm1Ch1Trg0OrTrg1 = 53|0x100U, /**< PWMB channel 1 trigger 0 or trigger 1 output assigned to XBARA_IN53 input. */
  471. kXBARA_InputPwm1Ch2Trg0OrTrg1 = 54|0x100U, /**< PWMB channel 2 trigger 0 or trigger 1 output assigned to XBARA_IN54 input. */
  472. kXBARA_InputPwm1Ch3Trg0OrTrg1 = 55|0x100U, /**< PWMB channel 3 trigger 0 or trigger 1 output assigned to XBARA_IN55 input. */
  473. kXBARA_InputFtm2Match = 56|0x100U, /**< FTM2 all channels match trigger ORed together output assigned to XBARA_IN56 input. */
  474. kXBARA_InputFtm2Extrig = 57|0x100U, /**< FTM2 counter init trigger output assigned to XBARA_IN57 input. */
  475. kXBARB_InputCmp0Output = 0|0x200U, /**< CMP0 Output output assigned to XBARB_IN0 input. */
  476. kXBARB_InputCmp1Output = 1|0x200U, /**< CMP1 Output output assigned to XBARB_IN1 input. */
  477. kXBARB_InputCmp2Output = 2|0x200U, /**< CMP2 Output output assigned to XBARB_IN2 input. */
  478. kXBARB_InputCmp3Output = 3|0x200U, /**< CMP3 Output output assigned to XBARB_IN3 input. */
  479. kXBARB_InputFtm0Match = 4|0x200U, /**< FTM0 all channels match trigger ORed together output assigned to XBARB_IN4 input. */
  480. kXBARB_InputFtm0Extrig = 5|0x200U, /**< FTM0 counter init trigger output assigned to XBARB_IN5 input. */
  481. kXBARB_InputFtm3Match = 6|0x200U, /**< FTM3 all channels match trigger ORed together output assigned to XBARB_IN6 input. */
  482. kXBARB_InputFtm3Extrig = 7|0x200U, /**< FTM3 counter init trigger output assigned to XBARB_IN7 input. */
  483. kXBARB_InputPwm0Ch0Trg0 = 8|0x200U, /**< PWMA channel 0 trigger 0 output assigned to XBARB_IN8 input. */
  484. kXBARB_InputPwm0Ch1Trg0 = 9|0x200U, /**< PWMA channel 1 trigger 0 output assigned to XBARB_IN9 input. */
  485. kXBARB_InputPwm0Ch2Trg0 = 10|0x200U, /**< PWMA channel 2 trigger 0 output assigned to XBARB_IN10 input. */
  486. kXBARB_InputPwm0Ch3Trg0 = 11|0x200U, /**< PWMA channel 3 trigger 0 output assigned to XBARB_IN11 input. */
  487. kXBARB_InputPdb0Ch0Output = 12|0x200U, /**< PDB0 channel 0 output trigger output assigned to XBARB_IN12 input. */
  488. kXBARB_InputHsadc0Cca = 13|0x200U, /**< High Speed Analog-to-Digital Converter 0 conversion A complete output assigned to XBARB_IN13 input. */
  489. kXBARB_InputXbarIn2 = 14|0x200U, /**< XB_IN2 input pin output assigned to XBARB_IN14 input. */
  490. kXBARB_InputXbarIn3 = 15|0x200U, /**< XB_IN3 input pin output assigned to XBARB_IN15 input. */
  491. kXBARB_InputFtm1Match = 16|0x200U, /**< FTM1 all channels match trigger ORed together output assigned to XBARB_IN16 input. */
  492. kXBARB_InputFtm1Extrig = 17|0x200U, /**< FTM1 counter init trigger output assigned to XBARB_IN17 input. */
  493. kXBARB_InputDmaCh0Done = 18|0x200U, /**< DMA channel 0 done output assigned to XBARB_IN18 input. */
  494. kXBARB_InputDmaCh1Done = 19|0x200U, /**< DMA channel 1 done output assigned to XBARB_IN19 input. */
  495. kXBARB_InputXbarIn10 = 20|0x200U, /**< XB_IN10 input pin output assigned to XBARB_IN20 input. */
  496. kXBARB_InputXbarIn11 = 21|0x200U, /**< XB_IN11 input pin output assigned to XBARB_IN21 input. */
  497. kXBARB_InputDmaCh6Done = 22|0x200U, /**< DMA channel 6 done output assigned to XBARB_IN22 input. */
  498. kXBARB_InputDmaCh7Done = 23|0x200U, /**< DMA channel 7 done output assigned to XBARB_IN23 input. */
  499. kXBARB_InputPitTrigger0 = 24|0x200U, /**< PIT trigger 0 output assigned to XBARB_IN24 input. */
  500. kXBARB_InputPitTrigger1 = 25|0x200U, /**< PIT trigger 1 output assigned to XBARB_IN25 input. */
  501. kXBARB_InputPdb1Ch0Output = 26|0x200U, /**< PDB1 channel 0 output trigger output assigned to XBARB_IN26 input. */
  502. kXBARB_InputHsadc0Ccb = 27|0x200U, /**< High Speed Analog-to-Digital Converter 0 conversion B complete output assigned to XBARB_IN27 input. */
  503. kXBARB_InputPwm1Ch0Trg0OrTrg1 = 28|0x200U, /**< PWMB channel 0 trigger 0 or trigger 1 output assigned to XBARB_IN28 input. */
  504. kXBARB_InputPwm1Ch1Trg0OrTrg1 = 29|0x200U, /**< PWMB channel 1 trigger 0 or trigger 1 output assigned to XBARB_IN29 input. */
  505. kXBARB_InputPwm1Ch2Trg0OrTrg1 = 30|0x200U, /**< PWMB channel 2 trigger 0 or trigger 1 output assigned to XBARB_IN30 input. */
  506. kXBARB_InputPwm1Ch3Trg0OrTrg1 = 31|0x200U, /**< PWMB channel 3 trigger 0 or trigger 1 output assigned to XBARB_IN31 input. */
  507. kXBARB_InputFtm2Match = 32|0x200U, /**< FTM2 all channels match trigger ORed together output assigned to XBARB_IN32 input. */
  508. kXBARB_InputFtm2Extrig = 33|0x200U, /**< FTM2 counter init trigger output assigned to XBARB_IN33 input. */
  509. kXBARB_InputPdb0Ch1Output = 34|0x200U, /**< PDB0 channel 1 output trigger output assigned to XBARB_IN34 input. */
  510. kXBARB_InputPdb1Ch1Output = 35|0x200U, /**< PDB1 channel 1 output trigger output assigned to XBARB_IN35 input. */
  511. kXBARB_InputHsadc1Cca = 36|0x200U, /**< High Speed Analog-to-Digital Converter 1 conversion A complete output assigned to XBARB_IN36 input. */
  512. kXBARB_InputHsadc1Ccb = 37|0x200U, /**< High Speed Analog-to-Digital Converter 1 conversion B complete output assigned to XBARB_IN37 input. */
  513. kXBARB_InputAdc0Coco = 38|0x200U, /**< Analog-to-Digital Converter 0 conversion complete output assigned to XBARB_IN38 input. */
  514. } xbar_input_signal_t;
  515. typedef enum _xbar_output_signal
  516. {
  517. kXBARA_OutputDmamux18 = 0|0x100U, /**< XBARA_OUT0 output assigned to DMAMUX slot 18 */
  518. kXBARA_OutputDmamux19 = 1|0x100U, /**< XBARA_OUT1 output assigned to DMAMUX slot 19 */
  519. kXBARA_OutputDmamux20 = 2|0x100U, /**< XBARA_OUT2 output assigned to DMAMUX slot 20 */
  520. kXBARA_OutputDmamux21 = 3|0x100U, /**< XBARA_OUT3 output assigned to DMAMUX slot 21 */
  521. kXBARA_OutputXbOut4 = 4|0x100U, /**< XBARA_OUT4 output assigned to XBAROUT4 output pin */
  522. kXBARA_OutputXbOut5 = 5|0x100U, /**< XBARA_OUT5 output assigned to XBAROUT5 output pin */
  523. kXBARA_OutputXbOut6 = 6|0x100U, /**< XBARA_OUT6 output assigned to XBAROUT6 output pin */
  524. kXBARA_OutputXbOut7 = 7|0x100U, /**< XBARA_OUT7 output assigned to XBAROUT7 output pin */
  525. kXBARA_OutputXbOut8 = 8|0x100U, /**< XBARA_OUT8 output assigned to XBAROUT8 output pin */
  526. kXBARA_OutputXbOut9 = 9|0x100U, /**< XBARA_OUT9 output assigned to XBAROUT9 output pin */
  527. kXBARA_OutputXbOut10 = 10|0x100U, /**< XBARA_OUT10 output assigned to XBAROUT10 output pin */
  528. kXBARA_OutputXbOut11 = 11|0x100U, /**< XBARA_OUT11 output assigned to XBAROUT11 output pin */
  529. kXBARA_OutputHsadc0ATrig = 12|0x100U, /**< XBARA_OUT12 output assigned to HSADC0 converter A trigger */
  530. kXBARA_OutputHsadc0BTrig = 13|0x100U, /**< XBARA_OUT13 output assigned to HSADC0 converter B trigger */
  531. kXBARA_OutputRESERVED14 = 14|0x100U, /**< XBARA_OUT14 output is reserved. */
  532. kXBARA_OutputDac12bSync = 15|0x100U, /**< XBARA_OUT15 output assigned to DAC synchronisation trigger */
  533. kXBARA_OutputCmp0 = 16|0x100U, /**< XBARA_OUT16 output assigned to CMP0 window/sample */
  534. kXBARA_OutputCmp1 = 17|0x100U, /**< XBARA_OUT17 output assigned to CMP1 window/sample */
  535. kXBARA_OutputCmp2 = 18|0x100U, /**< XBARA_OUT18 output assigned to CMP2 window/sample */
  536. kXBARA_OutputCmp3 = 19|0x100U, /**< XBARA_OUT19 output assigned to CMP3 window/sample */
  537. kXBARA_OutputPwmCh0ExtA = 20|0x100U, /**< XBARA_OUT20 output assigned to PWM0 and PWM1 channel 0 external control A */
  538. kXBARA_OutputPwmCh1ExtA = 21|0x100U, /**< XBARA_OUT21 output assigned to PWM0 and PWM1 channel 1 external control A */
  539. kXBARA_OutputPwmCh2ExtA = 22|0x100U, /**< XBARA_OUT22 output assigned to PWM0 and PWM1 channel 2 external control A */
  540. kXBARA_OutputPwmCh3ExtA = 23|0x100U, /**< XBARA_OUT23 output assigned to PWM0 and PWM1 channel 3 external control A */
  541. kXBARA_OutputPwm0Ch0ExtSync = 24|0x100U, /**< XBARA_OUT24 output assigned to PWM0 channel 0 external synchronization */
  542. kXBARA_OutputPwm0Ch1ExtSync = 25|0x100U, /**< XBARA_OUT25 output assigned to PWM0 channel 1 external synchronization */
  543. kXBARA_OutputPwm0Ch2ExtSync = 26|0x100U, /**< XBARA_OUT26 output assigned to PWM0 channel 2 external synchronization */
  544. kXBARA_OutputPwm0Ch3ExtSync = 27|0x100U, /**< XBARA_OUT27 output assigned to PWM0 channel 3 external synchronization */
  545. kXBARA_OutputPwmExtClk = 28|0x100U, /**< XBARA_OUT28 output assigned to PWM0 and PWM1 external clock */
  546. kXBARA_OutputPwm0Fault0 = 29|0x100U, /**< XBARA_OUT29 output assigned to PWM0 and PWM1 fault 0 */
  547. kXBARA_OutputPwm0Fault1 = 30|0x100U, /**< XBARA_OUT30 output assigned to PWM0 and PWM1 fault 1 */
  548. kXBARA_OutputPwm0Fault2 = 31|0x100U, /**< XBARA_OUT31 output assigned to PWM0 and PWM1 fault 2 */
  549. kXBARA_OutputPwm0Fault3 = 32|0x100U, /**< XBARA_OUT32 output assigned to PWM0 and PWM1 fault 3 */
  550. kXBARA_OutputPwm0Force = 33|0x100U, /**< XBARA_OUT33 output assigned to PWM0 external output force */
  551. kXBARA_OutputFtm0Trig2 = 34|0x100U, /**< XBARA_OUT34 output assigned to FTM0 hardware trigger 2 */
  552. kXBARA_OutputFtm1Trig2 = 35|0x100U, /**< XBARA_OUT35 output assigned to FTM1 hardware trigger 2 */
  553. kXBARA_OutputFtm2Trig2 = 36|0x100U, /**< XBARA_OUT36 output assigned to FTM2 hardware trigger 2 */
  554. kXBARA_OutputFtm3Trig2 = 37|0x100U, /**< XBARA_OUT37 output assigned to FTM3 hardware trigger 2 */
  555. kXBARA_OutputPdb0InCh12 = 38|0x100U, /**< XBARA_OUT38 output assigned to PDB0 trigger option 12 */
  556. kXBARA_OutputAdc0Hdwt = 39|0x100U, /**< XBARA_OUT39 output assigned to ADC0 hardware trigger */
  557. kXBARA_OutputRESERVED40 = 40|0x100U, /**< XBARA_OUT40 output is reserved. */
  558. kXBARA_OutputPdb1InCh12 = 41|0x100U, /**< XBARA_OUT41 output assigned to PDB1 trigger option 12 */
  559. kXBARA_OutputHsadc1ATrig = 42|0x100U, /**< XBARA_OUT42 output assigned to HSADC1 converter A trigger and FTM1 channel 1 signal XOR input */
  560. kXBARA_OutputHsadc1BTrig = 43|0x100U, /**< XBARA_OUT43 output assigned to HSADC1 converter B trigger */
  561. kXBARA_OutputEncPhA = 44|0x100U, /**< XBARA_OUT44 output assigned to ENC quadrature waveform phase A */
  562. kXBARA_OutputEncPhB = 45|0x100U, /**< XBARA_OUT45 output assigned to ENC quadrature waveform phase B */
  563. kXBARA_OutputEncIndex = 46|0x100U, /**< XBARA_OUT46 output assigned to ENC refresh/reload */
  564. kXBARA_OutputEncHome = 47|0x100U, /**< XBARA_OUT47 output assigned to ENC home position */
  565. kXBARA_OutputEncCapTrigger = 48|0x100U, /**< XBARA_OUT48 output assigned to ENC clear/snapshot */
  566. kXBARA_OutputFtm0Fault3 = 49|0x100U, /**< XBARA_OUT49 output assigned to FTM0 fault 3 */
  567. kXBARA_OutputFtm1Fault1 = 50|0x100U, /**< XBARA_OUT50 output assigned to FTM1 fault 1 */
  568. kXBARA_OutputFtm2Fault1 = 51|0x100U, /**< XBARA_OUT51 output assigned to FTM2 fault 1 */
  569. kXBARA_OutputFtm3Fault3 = 52|0x100U, /**< XBARA_OUT52 output assigned to FTM3 fault 3 */
  570. kXBARA_OutputPwm1Ch0ExtSync = 53|0x100U, /**< XBARA_OUT53 output assigned to PWM0 and PWM1 channel 0 external synchronization */
  571. kXBARA_OutputPwm1Ch1ExtSync = 54|0x100U, /**< XBARA_OUT54 output assigned to PWM0 and PWM1 channel 1 external synchronization */
  572. kXBARA_OutputPwm1Ch2ExtSync = 55|0x100U, /**< XBARA_OUT55 output assigned to PWM0 and PWM1 channel 2 external synchronization */
  573. kXBARA_OutputPwm1Ch3ExtSync = 56|0x100U, /**< XBARA_OUT56 output assigned to PWM0 and PWM1 channel 3 external synchronization */
  574. kXBARA_OutputPwm1Force = 57|0x100U, /**< XBARA_OUT57 output assigned to PWM1 external output force */
  575. kXBARA_OutputEwmIn = 58|0x100U, /**< XBARA_OUT58 output assigned to EWM input */
  576. kXBARB_OutputAoiIn0 = 0|0x200U, /**< XBARB_OUT0 output assigned to AOI input0 */
  577. kXBARB_OutputAoiIn1 = 1|0x200U, /**< XBARB_OUT1 output assigned to AOI input1 */
  578. kXBARB_OutputAoiIn2 = 2|0x200U, /**< XBARB_OUT2 output assigned to AOI input2 */
  579. kXBARB_OutputAoiIn3 = 3|0x200U, /**< XBARB_OUT3 output assigned to AOI input3 */
  580. kXBARB_OutputAoiIn4 = 4|0x200U, /**< XBARB_OUT4 output assigned to AOI input4 */
  581. kXBARB_OutputAoiIn5 = 5|0x200U, /**< XBARB_OUT5 output assigned to AOI input5 */
  582. kXBARB_OutputAoiIn6 = 6|0x200U, /**< XBARB_OUT6 output assigned to AOI input6 */
  583. kXBARB_OutputAoiIn7 = 7|0x200U, /**< XBARB_OUT7 output assigned to AOI input7 */
  584. kXBARB_OutputAoiIn8 = 8|0x200U, /**< XBARB_OUT8 output assigned to AOI input8 */
  585. kXBARB_OutputAoiIn9 = 9|0x200U, /**< XBARB_OUT9 output assigned to AOI input9 */
  586. kXBARB_OutputAoiIn10 = 10|0x200U, /**< XBARB_OUT10 output assigned to AOI input10 */
  587. kXBARB_OutputAoiIn11 = 11|0x200U, /**< XBARB_OUT11 output assigned to AOI input11 */
  588. kXBARB_OutputAoiIn12 = 12|0x200U, /**< XBARB_OUT12 output assigned to AOI input12 */
  589. kXBARB_OutputAoiIn13 = 13|0x200U, /**< XBARB_OUT13 output assigned to AOI input13 */
  590. kXBARB_OutputAoiIn14 = 14|0x200U, /**< XBARB_OUT14 output assigned to AOI input14 */
  591. kXBARB_OutputAoiIn15 = 15|0x200U, /**< XBARB_OUT15 output assigned to AOI input15 */
  592. } xbar_output_signal_t;
  593. /*!
  594. * @}
  595. */ /* end of group Mapping_Information */
  596. /* ----------------------------------------------------------------------------
  597. -- Device Peripheral Access Layer
  598. ---------------------------------------------------------------------------- */
  599. /*!
  600. * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
  601. * @{
  602. */
  603. /*
  604. ** Start of section using anonymous unions
  605. */
  606. #if defined(__ARMCC_VERSION)
  607. #if (__ARMCC_VERSION >= 6010050)
  608. #pragma clang diagnostic push
  609. #else
  610. #pragma push
  611. #pragma anon_unions
  612. #endif
  613. #elif defined(__CWCC__)
  614. #pragma push
  615. #pragma cpp_extensions on
  616. #elif defined(__GNUC__)
  617. /* anonymous unions are enabled by default */
  618. #elif defined(__IAR_SYSTEMS_ICC__)
  619. #pragma language=extended
  620. #else
  621. #error Not supported compiler type
  622. #endif
  623. /* ----------------------------------------------------------------------------
  624. -- ADC Peripheral Access Layer
  625. ---------------------------------------------------------------------------- */
  626. /*!
  627. * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
  628. * @{
  629. */
  630. /** ADC - Register Layout Typedef */
  631. typedef struct {
  632. __IO uint32_t SC1[2]; /**< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4 */
  633. __IO uint32_t CFG1; /**< ADC Configuration Register 1, offset: 0x8 */
  634. __IO uint32_t CFG2; /**< ADC Configuration Register 2, offset: 0xC */
  635. __I uint32_t R[2]; /**< ADC Data Result Register, array offset: 0x10, array step: 0x4 */
  636. __IO uint32_t CV1; /**< Compare Value Registers, offset: 0x18 */
  637. __IO uint32_t CV2; /**< Compare Value Registers, offset: 0x1C */
  638. __IO uint32_t SC2; /**< Status and Control Register 2, offset: 0x20 */
  639. __IO uint32_t SC3; /**< Status and Control Register 3, offset: 0x24 */
  640. __IO uint32_t OFS; /**< ADC Offset Correction Register, offset: 0x28 */
  641. __IO uint32_t PG; /**< ADC Plus-Side Gain Register, offset: 0x2C */
  642. __IO uint32_t MG; /**< ADC Minus-Side Gain Register, offset: 0x30 */
  643. __IO uint32_t CLPD; /**< ADC Plus-Side General Calibration Value Register, offset: 0x34 */
  644. __IO uint32_t CLPS; /**< ADC Plus-Side General Calibration Value Register, offset: 0x38 */
  645. __IO uint32_t CLP4; /**< ADC Plus-Side General Calibration Value Register, offset: 0x3C */
  646. __IO uint32_t CLP3; /**< ADC Plus-Side General Calibration Value Register, offset: 0x40 */
  647. __IO uint32_t CLP2; /**< ADC Plus-Side General Calibration Value Register, offset: 0x44 */
  648. __IO uint32_t CLP1; /**< ADC Plus-Side General Calibration Value Register, offset: 0x48 */
  649. __IO uint32_t CLP0; /**< ADC Plus-Side General Calibration Value Register, offset: 0x4C */
  650. uint8_t RESERVED_0[4];
  651. __IO uint32_t CLMD; /**< ADC Minus-Side General Calibration Value Register, offset: 0x54 */
  652. __IO uint32_t CLMS; /**< ADC Minus-Side General Calibration Value Register, offset: 0x58 */
  653. __IO uint32_t CLM4; /**< ADC Minus-Side General Calibration Value Register, offset: 0x5C */
  654. __IO uint32_t CLM3; /**< ADC Minus-Side General Calibration Value Register, offset: 0x60 */
  655. __IO uint32_t CLM2; /**< ADC Minus-Side General Calibration Value Register, offset: 0x64 */
  656. __IO uint32_t CLM1; /**< ADC Minus-Side General Calibration Value Register, offset: 0x68 */
  657. __IO uint32_t CLM0; /**< ADC Minus-Side General Calibration Value Register, offset: 0x6C */
  658. } ADC_Type;
  659. /* ----------------------------------------------------------------------------
  660. -- ADC Register Masks
  661. ---------------------------------------------------------------------------- */
  662. /*!
  663. * @addtogroup ADC_Register_Masks ADC Register Masks
  664. * @{
  665. */
  666. /*! @name SC1 - ADC Status and Control Registers 1 */
  667. /*! @{ */
  668. #define ADC_SC1_ADCH_MASK (0x1FU)
  669. #define ADC_SC1_ADCH_SHIFT (0U)
  670. /*! ADCH - Input channel select
  671. * 0b00000..When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input.
  672. * 0b00001..When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input.
  673. * 0b00010..When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input.
  674. * 0b00011..When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input.
  675. * 0b00100..When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved.
  676. * 0b00101..When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved.
  677. * 0b00110..When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved.
  678. * 0b00111..When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved.
  679. * 0b01000..When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved.
  680. * 0b01001..When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved.
  681. * 0b01010..When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved.
  682. * 0b01011..When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved.
  683. * 0b01100..When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved.
  684. * 0b01101..When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved.
  685. * 0b01110..When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved.
  686. * 0b01111..When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved.
  687. * 0b10000..When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved.
  688. * 0b10001..When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved.
  689. * 0b10010..When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved.
  690. * 0b10011..When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved.
  691. * 0b10100..When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved.
  692. * 0b10101..When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved.
  693. * 0b10110..When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved.
  694. * 0b10111..When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved.
  695. * 0b11000..Reserved.
  696. * 0b11001..Reserved.
  697. * 0b11010..When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input.
  698. * 0b11011..When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input.
  699. * 0b11100..Reserved.
  700. * 0b11101..When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2[REFSEL].
  701. * 0b11110..When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2[REFSEL].
  702. * 0b11111..Module is disabled.
  703. */
  704. #define ADC_SC1_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_ADCH_SHIFT)) & ADC_SC1_ADCH_MASK)
  705. #define ADC_SC1_DIFF_MASK (0x20U)
  706. #define ADC_SC1_DIFF_SHIFT (5U)
  707. /*! DIFF - Differential Mode Enable
  708. * 0b0..Single-ended conversions and input channels are selected.
  709. * 0b1..Differential conversions and input channels are selected.
  710. */
  711. #define ADC_SC1_DIFF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_DIFF_SHIFT)) & ADC_SC1_DIFF_MASK)
  712. #define ADC_SC1_AIEN_MASK (0x40U)
  713. #define ADC_SC1_AIEN_SHIFT (6U)
  714. /*! AIEN - Interrupt Enable
  715. * 0b0..Conversion complete interrupt is disabled.
  716. * 0b1..Conversion complete interrupt is enabled.
  717. */
  718. #define ADC_SC1_AIEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_AIEN_SHIFT)) & ADC_SC1_AIEN_MASK)
  719. #define ADC_SC1_COCO_MASK (0x80U)
  720. #define ADC_SC1_COCO_SHIFT (7U)
  721. /*! COCO - Conversion Complete Flag
  722. * 0b0..Conversion is not completed.
  723. * 0b1..Conversion is completed.
  724. */
  725. #define ADC_SC1_COCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_COCO_SHIFT)) & ADC_SC1_COCO_MASK)
  726. /*! @} */
  727. /* The count of ADC_SC1 */
  728. #define ADC_SC1_COUNT (2U)
  729. /*! @name CFG1 - ADC Configuration Register 1 */
  730. /*! @{ */
  731. #define ADC_CFG1_ADICLK_MASK (0x3U)
  732. #define ADC_CFG1_ADICLK_SHIFT (0U)
  733. /*! ADICLK - Input Clock Select
  734. * 0b00..Bus clock
  735. * 0b01..Alternate clock 2 (ALTCLK2)
  736. * 0b10..Alternate clock (ALTCLK)
  737. * 0b11..Asynchronous clock (ADACK)
  738. */
  739. #define ADC_CFG1_ADICLK(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADICLK_SHIFT)) & ADC_CFG1_ADICLK_MASK)
  740. #define ADC_CFG1_MODE_MASK (0xCU)
  741. #define ADC_CFG1_MODE_SHIFT (2U)
  742. /*! MODE - Conversion mode selection
  743. * 0b00..When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output.
  744. * 0b01..When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output.
  745. * 0b10..When DIFF=0:It is single-ended 10-bit conversion. ; when DIFF=1, it is differential 11-bit conversion with 2's complement output
  746. * 0b11..When DIFF=0:It is single-ended 16-bit conversion..; when DIFF=1, it is differential 16-bit conversion with 2's complement output
  747. */
  748. #define ADC_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_MODE_SHIFT)) & ADC_CFG1_MODE_MASK)
  749. #define ADC_CFG1_ADLSMP_MASK (0x10U)
  750. #define ADC_CFG1_ADLSMP_SHIFT (4U)
  751. /*! ADLSMP - Sample Time Configuration
  752. * 0b0..Short sample time.
  753. * 0b1..Long sample time.
  754. */
  755. #define ADC_CFG1_ADLSMP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLSMP_SHIFT)) & ADC_CFG1_ADLSMP_MASK)
  756. #define ADC_CFG1_ADIV_MASK (0x60U)
  757. #define ADC_CFG1_ADIV_SHIFT (5U)
  758. /*! ADIV - Clock Divide Select
  759. * 0b00..The divide ratio is 1 and the clock rate is input clock.
  760. * 0b01..The divide ratio is 2 and the clock rate is (input clock)/2.
  761. * 0b10..The divide ratio is 4 and the clock rate is (input clock)/4.
  762. * 0b11..The divide ratio is 8 and the clock rate is (input clock)/8.
  763. */
  764. #define ADC_CFG1_ADIV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADIV_SHIFT)) & ADC_CFG1_ADIV_MASK)
  765. #define ADC_CFG1_ADLPC_MASK (0x80U)
  766. #define ADC_CFG1_ADLPC_SHIFT (7U)
  767. /*! ADLPC - Low-Power Configuration
  768. * 0b0..Normal power configuration.
  769. * 0b1..Low-power configuration. The power is reduced at the expense of maximum clock speed.
  770. */
  771. #define ADC_CFG1_ADLPC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLPC_SHIFT)) & ADC_CFG1_ADLPC_MASK)
  772. /*! @} */
  773. /*! @name CFG2 - ADC Configuration Register 2 */
  774. /*! @{ */
  775. #define ADC_CFG2_ADLSTS_MASK (0x3U)
  776. #define ADC_CFG2_ADLSTS_SHIFT (0U)
  777. /*! ADLSTS - Long Sample Time Select
  778. * 0b00..Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total.
  779. * 0b01..12 extra ADCK cycles; 16 ADCK cycles total sample time.
  780. * 0b10..6 extra ADCK cycles; 10 ADCK cycles total sample time.
  781. * 0b11..2 extra ADCK cycles; 6 ADCK cycles total sample time.
  782. */
  783. #define ADC_CFG2_ADLSTS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADLSTS_SHIFT)) & ADC_CFG2_ADLSTS_MASK)
  784. #define ADC_CFG2_ADHSC_MASK (0x4U)
  785. #define ADC_CFG2_ADHSC_SHIFT (2U)
  786. /*! ADHSC - High-Speed Configuration
  787. * 0b0..Normal conversion sequence selected.
  788. * 0b1..High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time.
  789. */
  790. #define ADC_CFG2_ADHSC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADHSC_SHIFT)) & ADC_CFG2_ADHSC_MASK)
  791. #define ADC_CFG2_ADACKEN_MASK (0x8U)
  792. #define ADC_CFG2_ADACKEN_SHIFT (3U)
  793. /*! ADACKEN - Asynchronous Clock Output Enable
  794. * 0b0..Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active.
  795. * 0b1..Asynchronous clock and clock output is enabled regardless of the state of the ADC.
  796. */
  797. #define ADC_CFG2_ADACKEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADACKEN_SHIFT)) & ADC_CFG2_ADACKEN_MASK)
  798. #define ADC_CFG2_MUXSEL_MASK (0x10U)
  799. #define ADC_CFG2_MUXSEL_SHIFT (4U)
  800. /*! MUXSEL - ADC Mux Select
  801. * 0b0..ADxxa channels are selected.
  802. * 0b1..ADxxb channels are selected.
  803. */
  804. #define ADC_CFG2_MUXSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_MUXSEL_SHIFT)) & ADC_CFG2_MUXSEL_MASK)
  805. /*! @} */
  806. /*! @name R - ADC Data Result Register */
  807. /*! @{ */
  808. #define ADC_R_D_MASK (0xFFFFU)
  809. #define ADC_R_D_SHIFT (0U)
  810. #define ADC_R_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_R_D_SHIFT)) & ADC_R_D_MASK)
  811. /*! @} */
  812. /* The count of ADC_R */
  813. #define ADC_R_COUNT (2U)
  814. /*! @name CV1 - Compare Value Registers */
  815. /*! @{ */
  816. #define ADC_CV1_CV_MASK (0xFFFFU)
  817. #define ADC_CV1_CV_SHIFT (0U)
  818. #define ADC_CV1_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV1_CV_SHIFT)) & ADC_CV1_CV_MASK)
  819. /*! @} */
  820. /*! @name CV2 - Compare Value Registers */
  821. /*! @{ */
  822. #define ADC_CV2_CV_MASK (0xFFFFU)
  823. #define ADC_CV2_CV_SHIFT (0U)
  824. #define ADC_CV2_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV2_CV_SHIFT)) & ADC_CV2_CV_MASK)
  825. /*! @} */
  826. /*! @name SC2 - Status and Control Register 2 */
  827. /*! @{ */
  828. #define ADC_SC2_REFSEL_MASK (0x3U)
  829. #define ADC_SC2_REFSEL_SHIFT (0U)
  830. /*! REFSEL - Voltage Reference Selection
  831. * 0b00..Default voltage reference pin pair, that is, external pins VREFH and VREFL
  832. * 0b01..Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU
  833. * 0b10..Reserved
  834. * 0b11..Reserved
  835. */
  836. #define ADC_SC2_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_REFSEL_SHIFT)) & ADC_SC2_REFSEL_MASK)
  837. #define ADC_SC2_DMAEN_MASK (0x4U)
  838. #define ADC_SC2_DMAEN_SHIFT (2U)
  839. /*! DMAEN - DMA Enable
  840. * 0b0..DMA is disabled.
  841. * 0b1..DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n[COCO] flags is asserted.
  842. */
  843. #define ADC_SC2_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_DMAEN_SHIFT)) & ADC_SC2_DMAEN_MASK)
  844. #define ADC_SC2_ACREN_MASK (0x8U)
  845. #define ADC_SC2_ACREN_SHIFT (3U)
  846. /*! ACREN - Compare Function Range Enable
  847. * 0b0..Range function disabled. Only CV1 is compared.
  848. * 0b1..Range function enabled. Both CV1 and CV2 are compared.
  849. */
  850. #define ADC_SC2_ACREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACREN_SHIFT)) & ADC_SC2_ACREN_MASK)
  851. #define ADC_SC2_ACFGT_MASK (0x10U)
  852. #define ADC_SC2_ACFGT_SHIFT (4U)
  853. /*! ACFGT - Compare Function Greater Than Enable
  854. * 0b0..Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2.
  855. * 0b1..Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2.
  856. */
  857. #define ADC_SC2_ACFGT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFGT_SHIFT)) & ADC_SC2_ACFGT_MASK)
  858. #define ADC_SC2_ACFE_MASK (0x20U)
  859. #define ADC_SC2_ACFE_SHIFT (5U)
  860. /*! ACFE - Compare Function Enable
  861. * 0b0..Compare function disabled.
  862. * 0b1..Compare function enabled.
  863. */
  864. #define ADC_SC2_ACFE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFE_SHIFT)) & ADC_SC2_ACFE_MASK)
  865. #define ADC_SC2_ADTRG_MASK (0x40U)
  866. #define ADC_SC2_ADTRG_SHIFT (6U)
  867. /*! ADTRG - Conversion Trigger Select
  868. * 0b0..Software trigger selected.
  869. * 0b1..Hardware trigger selected.
  870. */
  871. #define ADC_SC2_ADTRG(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADTRG_SHIFT)) & ADC_SC2_ADTRG_MASK)
  872. #define ADC_SC2_ADACT_MASK (0x80U)
  873. #define ADC_SC2_ADACT_SHIFT (7U)
  874. /*! ADACT - Conversion Active
  875. * 0b0..Conversion not in progress.
  876. * 0b1..Conversion in progress.
  877. */
  878. #define ADC_SC2_ADACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADACT_SHIFT)) & ADC_SC2_ADACT_MASK)
  879. /*! @} */
  880. /*! @name SC3 - Status and Control Register 3 */
  881. /*! @{ */
  882. #define ADC_SC3_AVGS_MASK (0x3U)
  883. #define ADC_SC3_AVGS_SHIFT (0U)
  884. /*! AVGS - Hardware Average Select
  885. * 0b00..4 samples averaged.
  886. * 0b01..8 samples averaged.
  887. * 0b10..16 samples averaged.
  888. * 0b11..32 samples averaged.
  889. */
  890. #define ADC_SC3_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGS_SHIFT)) & ADC_SC3_AVGS_MASK)
  891. #define ADC_SC3_AVGE_MASK (0x4U)
  892. #define ADC_SC3_AVGE_SHIFT (2U)
  893. /*! AVGE - Hardware Average Enable
  894. * 0b0..Hardware average function disabled.
  895. * 0b1..Hardware average function enabled.
  896. */
  897. #define ADC_SC3_AVGE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGE_SHIFT)) & ADC_SC3_AVGE_MASK)
  898. #define ADC_SC3_ADCO_MASK (0x8U)
  899. #define ADC_SC3_ADCO_SHIFT (3U)
  900. /*! ADCO - Continuous Conversion Enable
  901. * 0b0..One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion.
  902. * 0b1..Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion.
  903. */
  904. #define ADC_SC3_ADCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_ADCO_SHIFT)) & ADC_SC3_ADCO_MASK)
  905. #define ADC_SC3_CALF_MASK (0x40U)
  906. #define ADC_SC3_CALF_SHIFT (6U)
  907. /*! CALF - Calibration Failed Flag
  908. * 0b0..Calibration completed normally.
  909. * 0b1..Calibration failed. ADC accuracy specifications are not guaranteed.
  910. */
  911. #define ADC_SC3_CALF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CALF_SHIFT)) & ADC_SC3_CALF_MASK)
  912. #define ADC_SC3_CAL_MASK (0x80U)
  913. #define ADC_SC3_CAL_SHIFT (7U)
  914. #define ADC_SC3_CAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CAL_SHIFT)) & ADC_SC3_CAL_MASK)
  915. /*! @} */
  916. /*! @name OFS - ADC Offset Correction Register */
  917. /*! @{ */
  918. #define ADC_OFS_OFS_MASK (0xFFFFU)
  919. #define ADC_OFS_OFS_SHIFT (0U)
  920. #define ADC_OFS_OFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFS_OFS_SHIFT)) & ADC_OFS_OFS_MASK)
  921. /*! @} */
  922. /*! @name PG - ADC Plus-Side Gain Register */
  923. /*! @{ */
  924. #define ADC_PG_PG_MASK (0xFFFFU)
  925. #define ADC_PG_PG_SHIFT (0U)
  926. #define ADC_PG_PG(x) (((uint32_t)(((uint32_t)(x)) << ADC_PG_PG_SHIFT)) & ADC_PG_PG_MASK)
  927. /*! @} */
  928. /*! @name MG - ADC Minus-Side Gain Register */
  929. /*! @{ */
  930. #define ADC_MG_MG_MASK (0xFFFFU)
  931. #define ADC_MG_MG_SHIFT (0U)
  932. #define ADC_MG_MG(x) (((uint32_t)(((uint32_t)(x)) << ADC_MG_MG_SHIFT)) & ADC_MG_MG_MASK)
  933. /*! @} */
  934. /*! @name CLPD - ADC Plus-Side General Calibration Value Register */
  935. /*! @{ */
  936. #define ADC_CLPD_CLPD_MASK (0x3FU)
  937. #define ADC_CLPD_CLPD_SHIFT (0U)
  938. #define ADC_CLPD_CLPD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPD_CLPD_SHIFT)) & ADC_CLPD_CLPD_MASK)
  939. /*! @} */
  940. /*! @name CLPS - ADC Plus-Side General Calibration Value Register */
  941. /*! @{ */
  942. #define ADC_CLPS_CLPS_MASK (0x3FU)
  943. #define ADC_CLPS_CLPS_SHIFT (0U)
  944. #define ADC_CLPS_CLPS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPS_CLPS_SHIFT)) & ADC_CLPS_CLPS_MASK)
  945. /*! @} */
  946. /*! @name CLP4 - ADC Plus-Side General Calibration Value Register */
  947. /*! @{ */
  948. #define ADC_CLP4_CLP4_MASK (0x3FFU)
  949. #define ADC_CLP4_CLP4_SHIFT (0U)
  950. #define ADC_CLP4_CLP4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP4_CLP4_SHIFT)) & ADC_CLP4_CLP4_MASK)
  951. /*! @} */
  952. /*! @name CLP3 - ADC Plus-Side General Calibration Value Register */
  953. /*! @{ */
  954. #define ADC_CLP3_CLP3_MASK (0x1FFU)
  955. #define ADC_CLP3_CLP3_SHIFT (0U)
  956. #define ADC_CLP3_CLP3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP3_CLP3_SHIFT)) & ADC_CLP3_CLP3_MASK)
  957. /*! @} */
  958. /*! @name CLP2 - ADC Plus-Side General Calibration Value Register */
  959. /*! @{ */
  960. #define ADC_CLP2_CLP2_MASK (0xFFU)
  961. #define ADC_CLP2_CLP2_SHIFT (0U)
  962. #define ADC_CLP2_CLP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP2_CLP2_SHIFT)) & ADC_CLP2_CLP2_MASK)
  963. /*! @} */
  964. /*! @name CLP1 - ADC Plus-Side General Calibration Value Register */
  965. /*! @{ */
  966. #define ADC_CLP1_CLP1_MASK (0x7FU)
  967. #define ADC_CLP1_CLP1_SHIFT (0U)
  968. #define ADC_CLP1_CLP1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP1_CLP1_SHIFT)) & ADC_CLP1_CLP1_MASK)
  969. /*! @} */
  970. /*! @name CLP0 - ADC Plus-Side General Calibration Value Register */
  971. /*! @{ */
  972. #define ADC_CLP0_CLP0_MASK (0x3FU)
  973. #define ADC_CLP0_CLP0_SHIFT (0U)
  974. #define ADC_CLP0_CLP0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP0_CLP0_SHIFT)) & ADC_CLP0_CLP0_MASK)
  975. /*! @} */
  976. /*! @name CLMD - ADC Minus-Side General Calibration Value Register */
  977. /*! @{ */
  978. #define ADC_CLMD_CLMD_MASK (0x3FU)
  979. #define ADC_CLMD_CLMD_SHIFT (0U)
  980. #define ADC_CLMD_CLMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMD_CLMD_SHIFT)) & ADC_CLMD_CLMD_MASK)
  981. /*! @} */
  982. /*! @name CLMS - ADC Minus-Side General Calibration Value Register */
  983. /*! @{ */
  984. #define ADC_CLMS_CLMS_MASK (0x3FU)
  985. #define ADC_CLMS_CLMS_SHIFT (0U)
  986. #define ADC_CLMS_CLMS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMS_CLMS_SHIFT)) & ADC_CLMS_CLMS_MASK)
  987. /*! @} */
  988. /*! @name CLM4 - ADC Minus-Side General Calibration Value Register */
  989. /*! @{ */
  990. #define ADC_CLM4_CLM4_MASK (0x3FFU)
  991. #define ADC_CLM4_CLM4_SHIFT (0U)
  992. #define ADC_CLM4_CLM4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM4_CLM4_SHIFT)) & ADC_CLM4_CLM4_MASK)
  993. /*! @} */
  994. /*! @name CLM3 - ADC Minus-Side General Calibration Value Register */
  995. /*! @{ */
  996. #define ADC_CLM3_CLM3_MASK (0x1FFU)
  997. #define ADC_CLM3_CLM3_SHIFT (0U)
  998. #define ADC_CLM3_CLM3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM3_CLM3_SHIFT)) & ADC_CLM3_CLM3_MASK)
  999. /*! @} */
  1000. /*! @name CLM2 - ADC Minus-Side General Calibration Value Register */
  1001. /*! @{ */
  1002. #define ADC_CLM2_CLM2_MASK (0xFFU)
  1003. #define ADC_CLM2_CLM2_SHIFT (0U)
  1004. #define ADC_CLM2_CLM2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM2_CLM2_SHIFT)) & ADC_CLM2_CLM2_MASK)
  1005. /*! @} */
  1006. /*! @name CLM1 - ADC Minus-Side General Calibration Value Register */
  1007. /*! @{ */
  1008. #define ADC_CLM1_CLM1_MASK (0x7FU)
  1009. #define ADC_CLM1_CLM1_SHIFT (0U)
  1010. #define ADC_CLM1_CLM1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM1_CLM1_SHIFT)) & ADC_CLM1_CLM1_MASK)
  1011. /*! @} */
  1012. /*! @name CLM0 - ADC Minus-Side General Calibration Value Register */
  1013. /*! @{ */
  1014. #define ADC_CLM0_CLM0_MASK (0x3FU)
  1015. #define ADC_CLM0_CLM0_SHIFT (0U)
  1016. #define ADC_CLM0_CLM0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM0_CLM0_SHIFT)) & ADC_CLM0_CLM0_MASK)
  1017. /*! @} */
  1018. /*!
  1019. * @}
  1020. */ /* end of group ADC_Register_Masks */
  1021. /* ADC - Peripheral instance base addresses */
  1022. /** Peripheral ADC0 base address */
  1023. #define ADC0_BASE (0x4003B000u)
  1024. /** Peripheral ADC0 base pointer */
  1025. #define ADC0 ((ADC_Type *)ADC0_BASE)
  1026. /** Array initializer of ADC peripheral base addresses */
  1027. #define ADC_BASE_ADDRS { ADC0_BASE }
  1028. /** Array initializer of ADC peripheral base pointers */
  1029. #define ADC_BASE_PTRS { ADC0 }
  1030. /** Interrupt vectors for the ADC peripheral type */
  1031. #define ADC_IRQS { ADC0_IRQn }
  1032. /*!
  1033. * @}
  1034. */ /* end of group ADC_Peripheral_Access_Layer */
  1035. /* ----------------------------------------------------------------------------
  1036. -- AIPS Peripheral Access Layer
  1037. ---------------------------------------------------------------------------- */
  1038. /*!
  1039. * @addtogroup AIPS_Peripheral_Access_Layer AIPS Peripheral Access Layer
  1040. * @{
  1041. */
  1042. /** AIPS - Register Layout Typedef */
  1043. typedef struct {
  1044. __IO uint32_t MPRA; /**< Master Privilege Register A, offset: 0x0 */
  1045. uint8_t RESERVED_0[28];
  1046. __IO uint32_t PACRA; /**< Peripheral Access Control Register, offset: 0x20 */
  1047. __IO uint32_t PACRB; /**< Peripheral Access Control Register, offset: 0x24 */
  1048. __IO uint32_t PACRC; /**< Peripheral Access Control Register, offset: 0x28 */
  1049. __IO uint32_t PACRD; /**< Peripheral Access Control Register, offset: 0x2C */
  1050. uint8_t RESERVED_1[16];
  1051. __IO uint32_t PACRE; /**< Peripheral Access Control Register, offset: 0x40 */
  1052. __IO uint32_t PACRF; /**< Peripheral Access Control Register, offset: 0x44 */
  1053. __IO uint32_t PACRG; /**< Peripheral Access Control Register, offset: 0x48 */
  1054. __IO uint32_t PACRH; /**< Peripheral Access Control Register, offset: 0x4C */
  1055. __IO uint32_t PACRI; /**< Peripheral Access Control Register, offset: 0x50 */
  1056. __IO uint32_t PACRJ; /**< Peripheral Access Control Register, offset: 0x54 */
  1057. __IO uint32_t PACRK; /**< Peripheral Access Control Register, offset: 0x58 */
  1058. __IO uint32_t PACRL; /**< Peripheral Access Control Register, offset: 0x5C */
  1059. __IO uint32_t PACRM; /**< Peripheral Access Control Register, offset: 0x60 */
  1060. __IO uint32_t PACRN; /**< Peripheral Access Control Register, offset: 0x64 */
  1061. __IO uint32_t PACRO; /**< Peripheral Access Control Register, offset: 0x68 */
  1062. __IO uint32_t PACRP; /**< Peripheral Access Control Register, offset: 0x6C */
  1063. } AIPS_Type;
  1064. /* ----------------------------------------------------------------------------
  1065. -- AIPS Register Masks
  1066. ---------------------------------------------------------------------------- */
  1067. /*!
  1068. * @addtogroup AIPS_Register_Masks AIPS Register Masks
  1069. * @{
  1070. */
  1071. /*! @name MPRA - Master Privilege Register A */
  1072. /*! @{ */
  1073. #define AIPS_MPRA_MPL3_MASK (0x10000U)
  1074. #define AIPS_MPRA_MPL3_SHIFT (16U)
  1075. /*! MPL3 - Master 3 Privilege Level
  1076. * 0b0..Accesses from this master are forced to user-mode.
  1077. * 0b1..Accesses from this master are not forced to user-mode.
  1078. */
  1079. #define AIPS_MPRA_MPL3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL3_SHIFT)) & AIPS_MPRA_MPL3_MASK)
  1080. #define AIPS_MPRA_MTW3_MASK (0x20000U)
  1081. #define AIPS_MPRA_MTW3_SHIFT (17U)
  1082. /*! MTW3 - Master 3 Trusted For Writes
  1083. * 0b0..This master is not trusted for write accesses.
  1084. * 0b1..This master is trusted for write accesses.
  1085. */
  1086. #define AIPS_MPRA_MTW3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW3_SHIFT)) & AIPS_MPRA_MTW3_MASK)
  1087. #define AIPS_MPRA_MTR3_MASK (0x40000U)
  1088. #define AIPS_MPRA_MTR3_SHIFT (18U)
  1089. /*! MTR3 - Master 3 Trusted For Read
  1090. * 0b0..This master is not trusted for read accesses.
  1091. * 0b1..This master is trusted for read accesses.
  1092. */
  1093. #define AIPS_MPRA_MTR3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR3_SHIFT)) & AIPS_MPRA_MTR3_MASK)
  1094. #define AIPS_MPRA_MPL2_MASK (0x100000U)
  1095. #define AIPS_MPRA_MPL2_SHIFT (20U)
  1096. /*! MPL2 - Master 2 Privilege Level
  1097. * 0b0..Accesses from this master are forced to user-mode.
  1098. * 0b1..Accesses from this master are not forced to user-mode.
  1099. */
  1100. #define AIPS_MPRA_MPL2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL2_SHIFT)) & AIPS_MPRA_MPL2_MASK)
  1101. #define AIPS_MPRA_MTW2_MASK (0x200000U)
  1102. #define AIPS_MPRA_MTW2_SHIFT (21U)
  1103. /*! MTW2 - Master 2 Trusted For Writes
  1104. * 0b0..This master is not trusted for write accesses.
  1105. * 0b1..This master is trusted for write accesses.
  1106. */
  1107. #define AIPS_MPRA_MTW2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW2_SHIFT)) & AIPS_MPRA_MTW2_MASK)
  1108. #define AIPS_MPRA_MTR2_MASK (0x400000U)
  1109. #define AIPS_MPRA_MTR2_SHIFT (22U)
  1110. /*! MTR2 - Master 2 Trusted For Read
  1111. * 0b0..This master is not trusted for read accesses.
  1112. * 0b1..This master is trusted for read accesses.
  1113. */
  1114. #define AIPS_MPRA_MTR2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR2_SHIFT)) & AIPS_MPRA_MTR2_MASK)
  1115. #define AIPS_MPRA_MPL1_MASK (0x1000000U)
  1116. #define AIPS_MPRA_MPL1_SHIFT (24U)
  1117. /*! MPL1 - Master 1 Privilege Level
  1118. * 0b0..Accesses from this master are forced to user-mode.
  1119. * 0b1..Accesses from this master are not forced to user-mode.
  1120. */
  1121. #define AIPS_MPRA_MPL1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL1_SHIFT)) & AIPS_MPRA_MPL1_MASK)
  1122. #define AIPS_MPRA_MTW1_MASK (0x2000000U)
  1123. #define AIPS_MPRA_MTW1_SHIFT (25U)
  1124. /*! MTW1 - Master 1 Trusted for Writes
  1125. * 0b0..This master is not trusted for write accesses.
  1126. * 0b1..This master is trusted for write accesses.
  1127. */
  1128. #define AIPS_MPRA_MTW1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW1_SHIFT)) & AIPS_MPRA_MTW1_MASK)
  1129. #define AIPS_MPRA_MTR1_MASK (0x4000000U)
  1130. #define AIPS_MPRA_MTR1_SHIFT (26U)
  1131. /*! MTR1 - Master 1 Trusted for Read
  1132. * 0b0..This master is not trusted for read accesses.
  1133. * 0b1..This master is trusted for read accesses.
  1134. */
  1135. #define AIPS_MPRA_MTR1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR1_SHIFT)) & AIPS_MPRA_MTR1_MASK)
  1136. #define AIPS_MPRA_MPL0_MASK (0x10000000U)
  1137. #define AIPS_MPRA_MPL0_SHIFT (28U)
  1138. /*! MPL0 - Master 0 Privilege Level
  1139. * 0b0..Accesses from this master are forced to user-mode.
  1140. * 0b1..Accesses from this master are not forced to user-mode.
  1141. */
  1142. #define AIPS_MPRA_MPL0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL0_SHIFT)) & AIPS_MPRA_MPL0_MASK)
  1143. #define AIPS_MPRA_MTW0_MASK (0x20000000U)
  1144. #define AIPS_MPRA_MTW0_SHIFT (29U)
  1145. /*! MTW0 - Master 0 Trusted For Writes
  1146. * 0b0..This master is not trusted for write accesses.
  1147. * 0b1..This master is trusted for write accesses.
  1148. */
  1149. #define AIPS_MPRA_MTW0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW0_SHIFT)) & AIPS_MPRA_MTW0_MASK)
  1150. #define AIPS_MPRA_MTR0_MASK (0x40000000U)
  1151. #define AIPS_MPRA_MTR0_SHIFT (30U)
  1152. /*! MTR0 - Master 0 Trusted For Read
  1153. * 0b0..This master is not trusted for read accesses.
  1154. * 0b1..This master is trusted for read accesses.
  1155. */
  1156. #define AIPS_MPRA_MTR0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR0_SHIFT)) & AIPS_MPRA_MTR0_MASK)
  1157. /*! @} */
  1158. /*! @name PACRA - Peripheral Access Control Register */
  1159. /*! @{ */
  1160. #define AIPS_PACRA_TP7_MASK (0x1U)
  1161. #define AIPS_PACRA_TP7_SHIFT (0U)
  1162. /*! TP7 - Trusted Protect
  1163. * 0b0..Accesses from an untrusted master are allowed.
  1164. * 0b1..Accesses from an untrusted master are not allowed.
  1165. */
  1166. #define AIPS_PACRA_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP7_SHIFT)) & AIPS_PACRA_TP7_MASK)
  1167. #define AIPS_PACRA_WP7_MASK (0x2U)
  1168. #define AIPS_PACRA_WP7_SHIFT (1U)
  1169. /*! WP7 - Write Protect
  1170. * 0b0..This peripheral allows write accesses.
  1171. * 0b1..This peripheral is write protected.
  1172. */
  1173. #define AIPS_PACRA_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP7_SHIFT)) & AIPS_PACRA_WP7_MASK)
  1174. #define AIPS_PACRA_SP7_MASK (0x4U)
  1175. #define AIPS_PACRA_SP7_SHIFT (2U)
  1176. /*! SP7 - Supervisor Protect
  1177. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1178. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1179. */
  1180. #define AIPS_PACRA_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP7_SHIFT)) & AIPS_PACRA_SP7_MASK)
  1181. #define AIPS_PACRA_TP6_MASK (0x10U)
  1182. #define AIPS_PACRA_TP6_SHIFT (4U)
  1183. /*! TP6 - Trusted Protect
  1184. * 0b0..Accesses from an untrusted master are allowed.
  1185. * 0b1..Accesses from an untrusted master are not allowed.
  1186. */
  1187. #define AIPS_PACRA_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP6_SHIFT)) & AIPS_PACRA_TP6_MASK)
  1188. #define AIPS_PACRA_WP6_MASK (0x20U)
  1189. #define AIPS_PACRA_WP6_SHIFT (5U)
  1190. /*! WP6 - Write Protect
  1191. * 0b0..This peripheral allows write accesses.
  1192. * 0b1..This peripheral is write protected.
  1193. */
  1194. #define AIPS_PACRA_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP6_SHIFT)) & AIPS_PACRA_WP6_MASK)
  1195. #define AIPS_PACRA_SP6_MASK (0x40U)
  1196. #define AIPS_PACRA_SP6_SHIFT (6U)
  1197. /*! SP6 - Supervisor Protect
  1198. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1199. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1200. */
  1201. #define AIPS_PACRA_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP6_SHIFT)) & AIPS_PACRA_SP6_MASK)
  1202. #define AIPS_PACRA_TP5_MASK (0x100U)
  1203. #define AIPS_PACRA_TP5_SHIFT (8U)
  1204. /*! TP5 - Trusted Protect
  1205. * 0b0..Accesses from an untrusted master are allowed.
  1206. * 0b1..Accesses from an untrusted master are not allowed.
  1207. */
  1208. #define AIPS_PACRA_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP5_SHIFT)) & AIPS_PACRA_TP5_MASK)
  1209. #define AIPS_PACRA_WP5_MASK (0x200U)
  1210. #define AIPS_PACRA_WP5_SHIFT (9U)
  1211. /*! WP5 - Write Protect
  1212. * 0b0..This peripheral allows write accesses.
  1213. * 0b1..This peripheral is write protected.
  1214. */
  1215. #define AIPS_PACRA_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP5_SHIFT)) & AIPS_PACRA_WP5_MASK)
  1216. #define AIPS_PACRA_SP5_MASK (0x400U)
  1217. #define AIPS_PACRA_SP5_SHIFT (10U)
  1218. /*! SP5 - Supervisor Protect
  1219. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1220. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1221. */
  1222. #define AIPS_PACRA_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP5_SHIFT)) & AIPS_PACRA_SP5_MASK)
  1223. #define AIPS_PACRA_TP4_MASK (0x1000U)
  1224. #define AIPS_PACRA_TP4_SHIFT (12U)
  1225. /*! TP4 - Trusted Protect
  1226. * 0b0..Accesses from an untrusted master are allowed.
  1227. * 0b1..Accesses from an untrusted master are not allowed.
  1228. */
  1229. #define AIPS_PACRA_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP4_SHIFT)) & AIPS_PACRA_TP4_MASK)
  1230. #define AIPS_PACRA_WP4_MASK (0x2000U)
  1231. #define AIPS_PACRA_WP4_SHIFT (13U)
  1232. /*! WP4 - Write Protect
  1233. * 0b0..This peripheral allows write accesses.
  1234. * 0b1..This peripheral is write protected.
  1235. */
  1236. #define AIPS_PACRA_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP4_SHIFT)) & AIPS_PACRA_WP4_MASK)
  1237. #define AIPS_PACRA_SP4_MASK (0x4000U)
  1238. #define AIPS_PACRA_SP4_SHIFT (14U)
  1239. /*! SP4 - Supervisor Protect
  1240. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1241. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1242. */
  1243. #define AIPS_PACRA_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP4_SHIFT)) & AIPS_PACRA_SP4_MASK)
  1244. #define AIPS_PACRA_TP3_MASK (0x10000U)
  1245. #define AIPS_PACRA_TP3_SHIFT (16U)
  1246. /*! TP3 - Trusted Protect
  1247. * 0b0..Accesses from an untrusted master are allowed.
  1248. * 0b1..Accesses from an untrusted master are not allowed.
  1249. */
  1250. #define AIPS_PACRA_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP3_SHIFT)) & AIPS_PACRA_TP3_MASK)
  1251. #define AIPS_PACRA_WP3_MASK (0x20000U)
  1252. #define AIPS_PACRA_WP3_SHIFT (17U)
  1253. /*! WP3 - Write Protect
  1254. * 0b0..This peripheral allows write accesses.
  1255. * 0b1..This peripheral is write protected.
  1256. */
  1257. #define AIPS_PACRA_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP3_SHIFT)) & AIPS_PACRA_WP3_MASK)
  1258. #define AIPS_PACRA_SP3_MASK (0x40000U)
  1259. #define AIPS_PACRA_SP3_SHIFT (18U)
  1260. /*! SP3 - Supervisor Protect
  1261. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1262. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1263. */
  1264. #define AIPS_PACRA_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP3_SHIFT)) & AIPS_PACRA_SP3_MASK)
  1265. #define AIPS_PACRA_TP2_MASK (0x100000U)
  1266. #define AIPS_PACRA_TP2_SHIFT (20U)
  1267. /*! TP2 - Trusted Protect
  1268. * 0b0..Accesses from an untrusted master are allowed.
  1269. * 0b1..Accesses from an untrusted master are not allowed.
  1270. */
  1271. #define AIPS_PACRA_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP2_SHIFT)) & AIPS_PACRA_TP2_MASK)
  1272. #define AIPS_PACRA_WP2_MASK (0x200000U)
  1273. #define AIPS_PACRA_WP2_SHIFT (21U)
  1274. /*! WP2 - Write Protect
  1275. * 0b0..This peripheral allows write accesses.
  1276. * 0b1..This peripheral is write protected.
  1277. */
  1278. #define AIPS_PACRA_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP2_SHIFT)) & AIPS_PACRA_WP2_MASK)
  1279. #define AIPS_PACRA_SP2_MASK (0x400000U)
  1280. #define AIPS_PACRA_SP2_SHIFT (22U)
  1281. /*! SP2 - Supervisor Protect
  1282. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1283. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1284. */
  1285. #define AIPS_PACRA_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP2_SHIFT)) & AIPS_PACRA_SP2_MASK)
  1286. #define AIPS_PACRA_TP1_MASK (0x1000000U)
  1287. #define AIPS_PACRA_TP1_SHIFT (24U)
  1288. /*! TP1 - Trusted Protect
  1289. * 0b0..Accesses from an untrusted master are allowed.
  1290. * 0b1..Accesses from an untrusted master are not allowed.
  1291. */
  1292. #define AIPS_PACRA_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP1_SHIFT)) & AIPS_PACRA_TP1_MASK)
  1293. #define AIPS_PACRA_WP1_MASK (0x2000000U)
  1294. #define AIPS_PACRA_WP1_SHIFT (25U)
  1295. /*! WP1 - Write Protect
  1296. * 0b0..This peripheral allows write accesses.
  1297. * 0b1..This peripheral is write protected.
  1298. */
  1299. #define AIPS_PACRA_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP1_SHIFT)) & AIPS_PACRA_WP1_MASK)
  1300. #define AIPS_PACRA_SP1_MASK (0x4000000U)
  1301. #define AIPS_PACRA_SP1_SHIFT (26U)
  1302. /*! SP1 - Supervisor Protect
  1303. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1304. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1305. */
  1306. #define AIPS_PACRA_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP1_SHIFT)) & AIPS_PACRA_SP1_MASK)
  1307. #define AIPS_PACRA_TP0_MASK (0x10000000U)
  1308. #define AIPS_PACRA_TP0_SHIFT (28U)
  1309. /*! TP0 - Trusted Protect
  1310. * 0b0..Accesses from an untrusted master are allowed.
  1311. * 0b1..Accesses from an untrusted master are not allowed.
  1312. */
  1313. #define AIPS_PACRA_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP0_SHIFT)) & AIPS_PACRA_TP0_MASK)
  1314. #define AIPS_PACRA_WP0_MASK (0x20000000U)
  1315. #define AIPS_PACRA_WP0_SHIFT (29U)
  1316. /*! WP0 - Write Protect
  1317. * 0b0..This peripheral allows write accesses.
  1318. * 0b1..This peripheral is write protected.
  1319. */
  1320. #define AIPS_PACRA_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP0_SHIFT)) & AIPS_PACRA_WP0_MASK)
  1321. #define AIPS_PACRA_SP0_MASK (0x40000000U)
  1322. #define AIPS_PACRA_SP0_SHIFT (30U)
  1323. /*! SP0 - Supervisor Protect
  1324. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1325. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1326. */
  1327. #define AIPS_PACRA_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP0_SHIFT)) & AIPS_PACRA_SP0_MASK)
  1328. /*! @} */
  1329. /*! @name PACRB - Peripheral Access Control Register */
  1330. /*! @{ */
  1331. #define AIPS_PACRB_TP7_MASK (0x1U)
  1332. #define AIPS_PACRB_TP7_SHIFT (0U)
  1333. /*! TP7 - Trusted Protect
  1334. * 0b0..Accesses from an untrusted master are allowed.
  1335. * 0b1..Accesses from an untrusted master are not allowed.
  1336. */
  1337. #define AIPS_PACRB_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP7_SHIFT)) & AIPS_PACRB_TP7_MASK)
  1338. #define AIPS_PACRB_WP7_MASK (0x2U)
  1339. #define AIPS_PACRB_WP7_SHIFT (1U)
  1340. /*! WP7 - Write Protect
  1341. * 0b0..This peripheral allows write accesses.
  1342. * 0b1..This peripheral is write protected.
  1343. */
  1344. #define AIPS_PACRB_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP7_SHIFT)) & AIPS_PACRB_WP7_MASK)
  1345. #define AIPS_PACRB_SP7_MASK (0x4U)
  1346. #define AIPS_PACRB_SP7_SHIFT (2U)
  1347. /*! SP7 - Supervisor Protect
  1348. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1349. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1350. */
  1351. #define AIPS_PACRB_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP7_SHIFT)) & AIPS_PACRB_SP7_MASK)
  1352. #define AIPS_PACRB_TP6_MASK (0x10U)
  1353. #define AIPS_PACRB_TP6_SHIFT (4U)
  1354. /*! TP6 - Trusted Protect
  1355. * 0b0..Accesses from an untrusted master are allowed.
  1356. * 0b1..Accesses from an untrusted master are not allowed.
  1357. */
  1358. #define AIPS_PACRB_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP6_SHIFT)) & AIPS_PACRB_TP6_MASK)
  1359. #define AIPS_PACRB_WP6_MASK (0x20U)
  1360. #define AIPS_PACRB_WP6_SHIFT (5U)
  1361. /*! WP6 - Write Protect
  1362. * 0b0..This peripheral allows write accesses.
  1363. * 0b1..This peripheral is write protected.
  1364. */
  1365. #define AIPS_PACRB_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP6_SHIFT)) & AIPS_PACRB_WP6_MASK)
  1366. #define AIPS_PACRB_SP6_MASK (0x40U)
  1367. #define AIPS_PACRB_SP6_SHIFT (6U)
  1368. /*! SP6 - Supervisor Protect
  1369. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1370. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1371. */
  1372. #define AIPS_PACRB_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP6_SHIFT)) & AIPS_PACRB_SP6_MASK)
  1373. #define AIPS_PACRB_TP5_MASK (0x100U)
  1374. #define AIPS_PACRB_TP5_SHIFT (8U)
  1375. /*! TP5 - Trusted Protect
  1376. * 0b0..Accesses from an untrusted master are allowed.
  1377. * 0b1..Accesses from an untrusted master are not allowed.
  1378. */
  1379. #define AIPS_PACRB_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP5_SHIFT)) & AIPS_PACRB_TP5_MASK)
  1380. #define AIPS_PACRB_WP5_MASK (0x200U)
  1381. #define AIPS_PACRB_WP5_SHIFT (9U)
  1382. /*! WP5 - Write Protect
  1383. * 0b0..This peripheral allows write accesses.
  1384. * 0b1..This peripheral is write protected.
  1385. */
  1386. #define AIPS_PACRB_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP5_SHIFT)) & AIPS_PACRB_WP5_MASK)
  1387. #define AIPS_PACRB_SP5_MASK (0x400U)
  1388. #define AIPS_PACRB_SP5_SHIFT (10U)
  1389. /*! SP5 - Supervisor Protect
  1390. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1391. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1392. */
  1393. #define AIPS_PACRB_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP5_SHIFT)) & AIPS_PACRB_SP5_MASK)
  1394. #define AIPS_PACRB_TP4_MASK (0x1000U)
  1395. #define AIPS_PACRB_TP4_SHIFT (12U)
  1396. /*! TP4 - Trusted Protect
  1397. * 0b0..Accesses from an untrusted master are allowed.
  1398. * 0b1..Accesses from an untrusted master are not allowed.
  1399. */
  1400. #define AIPS_PACRB_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP4_SHIFT)) & AIPS_PACRB_TP4_MASK)
  1401. #define AIPS_PACRB_WP4_MASK (0x2000U)
  1402. #define AIPS_PACRB_WP4_SHIFT (13U)
  1403. /*! WP4 - Write Protect
  1404. * 0b0..This peripheral allows write accesses.
  1405. * 0b1..This peripheral is write protected.
  1406. */
  1407. #define AIPS_PACRB_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP4_SHIFT)) & AIPS_PACRB_WP4_MASK)
  1408. #define AIPS_PACRB_SP4_MASK (0x4000U)
  1409. #define AIPS_PACRB_SP4_SHIFT (14U)
  1410. /*! SP4 - Supervisor Protect
  1411. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1412. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1413. */
  1414. #define AIPS_PACRB_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP4_SHIFT)) & AIPS_PACRB_SP4_MASK)
  1415. #define AIPS_PACRB_TP3_MASK (0x10000U)
  1416. #define AIPS_PACRB_TP3_SHIFT (16U)
  1417. /*! TP3 - Trusted Protect
  1418. * 0b0..Accesses from an untrusted master are allowed.
  1419. * 0b1..Accesses from an untrusted master are not allowed.
  1420. */
  1421. #define AIPS_PACRB_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP3_SHIFT)) & AIPS_PACRB_TP3_MASK)
  1422. #define AIPS_PACRB_WP3_MASK (0x20000U)
  1423. #define AIPS_PACRB_WP3_SHIFT (17U)
  1424. /*! WP3 - Write Protect
  1425. * 0b0..This peripheral allows write accesses.
  1426. * 0b1..This peripheral is write protected.
  1427. */
  1428. #define AIPS_PACRB_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP3_SHIFT)) & AIPS_PACRB_WP3_MASK)
  1429. #define AIPS_PACRB_SP3_MASK (0x40000U)
  1430. #define AIPS_PACRB_SP3_SHIFT (18U)
  1431. /*! SP3 - Supervisor Protect
  1432. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1433. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1434. */
  1435. #define AIPS_PACRB_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP3_SHIFT)) & AIPS_PACRB_SP3_MASK)
  1436. #define AIPS_PACRB_TP2_MASK (0x100000U)
  1437. #define AIPS_PACRB_TP2_SHIFT (20U)
  1438. /*! TP2 - Trusted Protect
  1439. * 0b0..Accesses from an untrusted master are allowed.
  1440. * 0b1..Accesses from an untrusted master are not allowed.
  1441. */
  1442. #define AIPS_PACRB_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP2_SHIFT)) & AIPS_PACRB_TP2_MASK)
  1443. #define AIPS_PACRB_WP2_MASK (0x200000U)
  1444. #define AIPS_PACRB_WP2_SHIFT (21U)
  1445. /*! WP2 - Write Protect
  1446. * 0b0..This peripheral allows write accesses.
  1447. * 0b1..This peripheral is write protected.
  1448. */
  1449. #define AIPS_PACRB_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP2_SHIFT)) & AIPS_PACRB_WP2_MASK)
  1450. #define AIPS_PACRB_SP2_MASK (0x400000U)
  1451. #define AIPS_PACRB_SP2_SHIFT (22U)
  1452. /*! SP2 - Supervisor Protect
  1453. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1454. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1455. */
  1456. #define AIPS_PACRB_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP2_SHIFT)) & AIPS_PACRB_SP2_MASK)
  1457. #define AIPS_PACRB_TP1_MASK (0x1000000U)
  1458. #define AIPS_PACRB_TP1_SHIFT (24U)
  1459. /*! TP1 - Trusted Protect
  1460. * 0b0..Accesses from an untrusted master are allowed.
  1461. * 0b1..Accesses from an untrusted master are not allowed.
  1462. */
  1463. #define AIPS_PACRB_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP1_SHIFT)) & AIPS_PACRB_TP1_MASK)
  1464. #define AIPS_PACRB_WP1_MASK (0x2000000U)
  1465. #define AIPS_PACRB_WP1_SHIFT (25U)
  1466. /*! WP1 - Write Protect
  1467. * 0b0..This peripheral allows write accesses.
  1468. * 0b1..This peripheral is write protected.
  1469. */
  1470. #define AIPS_PACRB_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP1_SHIFT)) & AIPS_PACRB_WP1_MASK)
  1471. #define AIPS_PACRB_SP1_MASK (0x4000000U)
  1472. #define AIPS_PACRB_SP1_SHIFT (26U)
  1473. /*! SP1 - Supervisor Protect
  1474. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1475. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1476. */
  1477. #define AIPS_PACRB_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP1_SHIFT)) & AIPS_PACRB_SP1_MASK)
  1478. #define AIPS_PACRB_TP0_MASK (0x10000000U)
  1479. #define AIPS_PACRB_TP0_SHIFT (28U)
  1480. /*! TP0 - Trusted Protect
  1481. * 0b0..Accesses from an untrusted master are allowed.
  1482. * 0b1..Accesses from an untrusted master are not allowed.
  1483. */
  1484. #define AIPS_PACRB_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP0_SHIFT)) & AIPS_PACRB_TP0_MASK)
  1485. #define AIPS_PACRB_WP0_MASK (0x20000000U)
  1486. #define AIPS_PACRB_WP0_SHIFT (29U)
  1487. /*! WP0 - Write Protect
  1488. * 0b0..This peripheral allows write accesses.
  1489. * 0b1..This peripheral is write protected.
  1490. */
  1491. #define AIPS_PACRB_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP0_SHIFT)) & AIPS_PACRB_WP0_MASK)
  1492. #define AIPS_PACRB_SP0_MASK (0x40000000U)
  1493. #define AIPS_PACRB_SP0_SHIFT (30U)
  1494. /*! SP0 - Supervisor Protect
  1495. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1496. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1497. */
  1498. #define AIPS_PACRB_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP0_SHIFT)) & AIPS_PACRB_SP0_MASK)
  1499. /*! @} */
  1500. /*! @name PACRC - Peripheral Access Control Register */
  1501. /*! @{ */
  1502. #define AIPS_PACRC_TP7_MASK (0x1U)
  1503. #define AIPS_PACRC_TP7_SHIFT (0U)
  1504. /*! TP7 - Trusted Protect
  1505. * 0b0..Accesses from an untrusted master are allowed.
  1506. * 0b1..Accesses from an untrusted master are not allowed.
  1507. */
  1508. #define AIPS_PACRC_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP7_SHIFT)) & AIPS_PACRC_TP7_MASK)
  1509. #define AIPS_PACRC_WP7_MASK (0x2U)
  1510. #define AIPS_PACRC_WP7_SHIFT (1U)
  1511. /*! WP7 - Write Protect
  1512. * 0b0..This peripheral allows write accesses.
  1513. * 0b1..This peripheral is write protected.
  1514. */
  1515. #define AIPS_PACRC_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP7_SHIFT)) & AIPS_PACRC_WP7_MASK)
  1516. #define AIPS_PACRC_SP7_MASK (0x4U)
  1517. #define AIPS_PACRC_SP7_SHIFT (2U)
  1518. /*! SP7 - Supervisor Protect
  1519. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1520. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1521. */
  1522. #define AIPS_PACRC_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP7_SHIFT)) & AIPS_PACRC_SP7_MASK)
  1523. #define AIPS_PACRC_TP6_MASK (0x10U)
  1524. #define AIPS_PACRC_TP6_SHIFT (4U)
  1525. /*! TP6 - Trusted Protect
  1526. * 0b0..Accesses from an untrusted master are allowed.
  1527. * 0b1..Accesses from an untrusted master are not allowed.
  1528. */
  1529. #define AIPS_PACRC_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP6_SHIFT)) & AIPS_PACRC_TP6_MASK)
  1530. #define AIPS_PACRC_WP6_MASK (0x20U)
  1531. #define AIPS_PACRC_WP6_SHIFT (5U)
  1532. /*! WP6 - Write Protect
  1533. * 0b0..This peripheral allows write accesses.
  1534. * 0b1..This peripheral is write protected.
  1535. */
  1536. #define AIPS_PACRC_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP6_SHIFT)) & AIPS_PACRC_WP6_MASK)
  1537. #define AIPS_PACRC_SP6_MASK (0x40U)
  1538. #define AIPS_PACRC_SP6_SHIFT (6U)
  1539. /*! SP6 - Supervisor Protect
  1540. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1541. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1542. */
  1543. #define AIPS_PACRC_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP6_SHIFT)) & AIPS_PACRC_SP6_MASK)
  1544. #define AIPS_PACRC_TP5_MASK (0x100U)
  1545. #define AIPS_PACRC_TP5_SHIFT (8U)
  1546. /*! TP5 - Trusted Protect
  1547. * 0b0..Accesses from an untrusted master are allowed.
  1548. * 0b1..Accesses from an untrusted master are not allowed.
  1549. */
  1550. #define AIPS_PACRC_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP5_SHIFT)) & AIPS_PACRC_TP5_MASK)
  1551. #define AIPS_PACRC_WP5_MASK (0x200U)
  1552. #define AIPS_PACRC_WP5_SHIFT (9U)
  1553. /*! WP5 - Write Protect
  1554. * 0b0..This peripheral allows write accesses.
  1555. * 0b1..This peripheral is write protected.
  1556. */
  1557. #define AIPS_PACRC_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP5_SHIFT)) & AIPS_PACRC_WP5_MASK)
  1558. #define AIPS_PACRC_SP5_MASK (0x400U)
  1559. #define AIPS_PACRC_SP5_SHIFT (10U)
  1560. /*! SP5 - Supervisor Protect
  1561. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1562. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1563. */
  1564. #define AIPS_PACRC_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP5_SHIFT)) & AIPS_PACRC_SP5_MASK)
  1565. #define AIPS_PACRC_TP4_MASK (0x1000U)
  1566. #define AIPS_PACRC_TP4_SHIFT (12U)
  1567. /*! TP4 - Trusted Protect
  1568. * 0b0..Accesses from an untrusted master are allowed.
  1569. * 0b1..Accesses from an untrusted master are not allowed.
  1570. */
  1571. #define AIPS_PACRC_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP4_SHIFT)) & AIPS_PACRC_TP4_MASK)
  1572. #define AIPS_PACRC_WP4_MASK (0x2000U)
  1573. #define AIPS_PACRC_WP4_SHIFT (13U)
  1574. /*! WP4 - Write Protect
  1575. * 0b0..This peripheral allows write accesses.
  1576. * 0b1..This peripheral is write protected.
  1577. */
  1578. #define AIPS_PACRC_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP4_SHIFT)) & AIPS_PACRC_WP4_MASK)
  1579. #define AIPS_PACRC_SP4_MASK (0x4000U)
  1580. #define AIPS_PACRC_SP4_SHIFT (14U)
  1581. /*! SP4 - Supervisor Protect
  1582. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1583. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1584. */
  1585. #define AIPS_PACRC_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP4_SHIFT)) & AIPS_PACRC_SP4_MASK)
  1586. #define AIPS_PACRC_TP3_MASK (0x10000U)
  1587. #define AIPS_PACRC_TP3_SHIFT (16U)
  1588. /*! TP3 - Trusted Protect
  1589. * 0b0..Accesses from an untrusted master are allowed.
  1590. * 0b1..Accesses from an untrusted master are not allowed.
  1591. */
  1592. #define AIPS_PACRC_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP3_SHIFT)) & AIPS_PACRC_TP3_MASK)
  1593. #define AIPS_PACRC_WP3_MASK (0x20000U)
  1594. #define AIPS_PACRC_WP3_SHIFT (17U)
  1595. /*! WP3 - Write Protect
  1596. * 0b0..This peripheral allows write accesses.
  1597. * 0b1..This peripheral is write protected.
  1598. */
  1599. #define AIPS_PACRC_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP3_SHIFT)) & AIPS_PACRC_WP3_MASK)
  1600. #define AIPS_PACRC_SP3_MASK (0x40000U)
  1601. #define AIPS_PACRC_SP3_SHIFT (18U)
  1602. /*! SP3 - Supervisor Protect
  1603. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1604. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1605. */
  1606. #define AIPS_PACRC_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP3_SHIFT)) & AIPS_PACRC_SP3_MASK)
  1607. #define AIPS_PACRC_TP2_MASK (0x100000U)
  1608. #define AIPS_PACRC_TP2_SHIFT (20U)
  1609. /*! TP2 - Trusted Protect
  1610. * 0b0..Accesses from an untrusted master are allowed.
  1611. * 0b1..Accesses from an untrusted master are not allowed.
  1612. */
  1613. #define AIPS_PACRC_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP2_SHIFT)) & AIPS_PACRC_TP2_MASK)
  1614. #define AIPS_PACRC_WP2_MASK (0x200000U)
  1615. #define AIPS_PACRC_WP2_SHIFT (21U)
  1616. /*! WP2 - Write Protect
  1617. * 0b0..This peripheral allows write accesses.
  1618. * 0b1..This peripheral is write protected.
  1619. */
  1620. #define AIPS_PACRC_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP2_SHIFT)) & AIPS_PACRC_WP2_MASK)
  1621. #define AIPS_PACRC_SP2_MASK (0x400000U)
  1622. #define AIPS_PACRC_SP2_SHIFT (22U)
  1623. /*! SP2 - Supervisor Protect
  1624. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1625. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1626. */
  1627. #define AIPS_PACRC_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP2_SHIFT)) & AIPS_PACRC_SP2_MASK)
  1628. #define AIPS_PACRC_TP1_MASK (0x1000000U)
  1629. #define AIPS_PACRC_TP1_SHIFT (24U)
  1630. /*! TP1 - Trusted Protect
  1631. * 0b0..Accesses from an untrusted master are allowed.
  1632. * 0b1..Accesses from an untrusted master are not allowed.
  1633. */
  1634. #define AIPS_PACRC_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP1_SHIFT)) & AIPS_PACRC_TP1_MASK)
  1635. #define AIPS_PACRC_WP1_MASK (0x2000000U)
  1636. #define AIPS_PACRC_WP1_SHIFT (25U)
  1637. /*! WP1 - Write Protect
  1638. * 0b0..This peripheral allows write accesses.
  1639. * 0b1..This peripheral is write protected.
  1640. */
  1641. #define AIPS_PACRC_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP1_SHIFT)) & AIPS_PACRC_WP1_MASK)
  1642. #define AIPS_PACRC_SP1_MASK (0x4000000U)
  1643. #define AIPS_PACRC_SP1_SHIFT (26U)
  1644. /*! SP1 - Supervisor Protect
  1645. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1646. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1647. */
  1648. #define AIPS_PACRC_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP1_SHIFT)) & AIPS_PACRC_SP1_MASK)
  1649. #define AIPS_PACRC_TP0_MASK (0x10000000U)
  1650. #define AIPS_PACRC_TP0_SHIFT (28U)
  1651. /*! TP0 - Trusted Protect
  1652. * 0b0..Accesses from an untrusted master are allowed.
  1653. * 0b1..Accesses from an untrusted master are not allowed.
  1654. */
  1655. #define AIPS_PACRC_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP0_SHIFT)) & AIPS_PACRC_TP0_MASK)
  1656. #define AIPS_PACRC_WP0_MASK (0x20000000U)
  1657. #define AIPS_PACRC_WP0_SHIFT (29U)
  1658. /*! WP0 - Write Protect
  1659. * 0b0..This peripheral allows write accesses.
  1660. * 0b1..This peripheral is write protected.
  1661. */
  1662. #define AIPS_PACRC_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP0_SHIFT)) & AIPS_PACRC_WP0_MASK)
  1663. #define AIPS_PACRC_SP0_MASK (0x40000000U)
  1664. #define AIPS_PACRC_SP0_SHIFT (30U)
  1665. /*! SP0 - Supervisor Protect
  1666. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1667. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1668. */
  1669. #define AIPS_PACRC_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP0_SHIFT)) & AIPS_PACRC_SP0_MASK)
  1670. /*! @} */
  1671. /*! @name PACRD - Peripheral Access Control Register */
  1672. /*! @{ */
  1673. #define AIPS_PACRD_TP7_MASK (0x1U)
  1674. #define AIPS_PACRD_TP7_SHIFT (0U)
  1675. /*! TP7 - Trusted Protect
  1676. * 0b0..Accesses from an untrusted master are allowed.
  1677. * 0b1..Accesses from an untrusted master are not allowed.
  1678. */
  1679. #define AIPS_PACRD_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP7_SHIFT)) & AIPS_PACRD_TP7_MASK)
  1680. #define AIPS_PACRD_WP7_MASK (0x2U)
  1681. #define AIPS_PACRD_WP7_SHIFT (1U)
  1682. /*! WP7 - Write Protect
  1683. * 0b0..This peripheral allows write accesses.
  1684. * 0b1..This peripheral is write protected.
  1685. */
  1686. #define AIPS_PACRD_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP7_SHIFT)) & AIPS_PACRD_WP7_MASK)
  1687. #define AIPS_PACRD_SP7_MASK (0x4U)
  1688. #define AIPS_PACRD_SP7_SHIFT (2U)
  1689. /*! SP7 - Supervisor Protect
  1690. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1691. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1692. */
  1693. #define AIPS_PACRD_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP7_SHIFT)) & AIPS_PACRD_SP7_MASK)
  1694. #define AIPS_PACRD_TP6_MASK (0x10U)
  1695. #define AIPS_PACRD_TP6_SHIFT (4U)
  1696. /*! TP6 - Trusted Protect
  1697. * 0b0..Accesses from an untrusted master are allowed.
  1698. * 0b1..Accesses from an untrusted master are not allowed.
  1699. */
  1700. #define AIPS_PACRD_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP6_SHIFT)) & AIPS_PACRD_TP6_MASK)
  1701. #define AIPS_PACRD_WP6_MASK (0x20U)
  1702. #define AIPS_PACRD_WP6_SHIFT (5U)
  1703. /*! WP6 - Write Protect
  1704. * 0b0..This peripheral allows write accesses.
  1705. * 0b1..This peripheral is write protected.
  1706. */
  1707. #define AIPS_PACRD_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP6_SHIFT)) & AIPS_PACRD_WP6_MASK)
  1708. #define AIPS_PACRD_SP6_MASK (0x40U)
  1709. #define AIPS_PACRD_SP6_SHIFT (6U)
  1710. /*! SP6 - Supervisor Protect
  1711. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1712. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1713. */
  1714. #define AIPS_PACRD_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP6_SHIFT)) & AIPS_PACRD_SP6_MASK)
  1715. #define AIPS_PACRD_TP5_MASK (0x100U)
  1716. #define AIPS_PACRD_TP5_SHIFT (8U)
  1717. /*! TP5 - Trusted Protect
  1718. * 0b0..Accesses from an untrusted master are allowed.
  1719. * 0b1..Accesses from an untrusted master are not allowed.
  1720. */
  1721. #define AIPS_PACRD_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP5_SHIFT)) & AIPS_PACRD_TP5_MASK)
  1722. #define AIPS_PACRD_WP5_MASK (0x200U)
  1723. #define AIPS_PACRD_WP5_SHIFT (9U)
  1724. /*! WP5 - Write Protect
  1725. * 0b0..This peripheral allows write accesses.
  1726. * 0b1..This peripheral is write protected.
  1727. */
  1728. #define AIPS_PACRD_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP5_SHIFT)) & AIPS_PACRD_WP5_MASK)
  1729. #define AIPS_PACRD_SP5_MASK (0x400U)
  1730. #define AIPS_PACRD_SP5_SHIFT (10U)
  1731. /*! SP5 - Supervisor Protect
  1732. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1733. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1734. */
  1735. #define AIPS_PACRD_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP5_SHIFT)) & AIPS_PACRD_SP5_MASK)
  1736. #define AIPS_PACRD_TP4_MASK (0x1000U)
  1737. #define AIPS_PACRD_TP4_SHIFT (12U)
  1738. /*! TP4 - Trusted Protect
  1739. * 0b0..Accesses from an untrusted master are allowed.
  1740. * 0b1..Accesses from an untrusted master are not allowed.
  1741. */
  1742. #define AIPS_PACRD_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP4_SHIFT)) & AIPS_PACRD_TP4_MASK)
  1743. #define AIPS_PACRD_WP4_MASK (0x2000U)
  1744. #define AIPS_PACRD_WP4_SHIFT (13U)
  1745. /*! WP4 - Write Protect
  1746. * 0b0..This peripheral allows write accesses.
  1747. * 0b1..This peripheral is write protected.
  1748. */
  1749. #define AIPS_PACRD_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP4_SHIFT)) & AIPS_PACRD_WP4_MASK)
  1750. #define AIPS_PACRD_SP4_MASK (0x4000U)
  1751. #define AIPS_PACRD_SP4_SHIFT (14U)
  1752. /*! SP4 - Supervisor Protect
  1753. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1754. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1755. */
  1756. #define AIPS_PACRD_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP4_SHIFT)) & AIPS_PACRD_SP4_MASK)
  1757. #define AIPS_PACRD_TP3_MASK (0x10000U)
  1758. #define AIPS_PACRD_TP3_SHIFT (16U)
  1759. /*! TP3 - Trusted Protect
  1760. * 0b0..Accesses from an untrusted master are allowed.
  1761. * 0b1..Accesses from an untrusted master are not allowed.
  1762. */
  1763. #define AIPS_PACRD_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP3_SHIFT)) & AIPS_PACRD_TP3_MASK)
  1764. #define AIPS_PACRD_WP3_MASK (0x20000U)
  1765. #define AIPS_PACRD_WP3_SHIFT (17U)
  1766. /*! WP3 - Write Protect
  1767. * 0b0..This peripheral allows write accesses.
  1768. * 0b1..This peripheral is write protected.
  1769. */
  1770. #define AIPS_PACRD_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP3_SHIFT)) & AIPS_PACRD_WP3_MASK)
  1771. #define AIPS_PACRD_SP3_MASK (0x40000U)
  1772. #define AIPS_PACRD_SP3_SHIFT (18U)
  1773. /*! SP3 - Supervisor Protect
  1774. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1775. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1776. */
  1777. #define AIPS_PACRD_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP3_SHIFT)) & AIPS_PACRD_SP3_MASK)
  1778. #define AIPS_PACRD_TP2_MASK (0x100000U)
  1779. #define AIPS_PACRD_TP2_SHIFT (20U)
  1780. /*! TP2 - Trusted Protect
  1781. * 0b0..Accesses from an untrusted master are allowed.
  1782. * 0b1..Accesses from an untrusted master are not allowed.
  1783. */
  1784. #define AIPS_PACRD_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP2_SHIFT)) & AIPS_PACRD_TP2_MASK)
  1785. #define AIPS_PACRD_WP2_MASK (0x200000U)
  1786. #define AIPS_PACRD_WP2_SHIFT (21U)
  1787. /*! WP2 - Write Protect
  1788. * 0b0..This peripheral allows write accesses.
  1789. * 0b1..This peripheral is write protected.
  1790. */
  1791. #define AIPS_PACRD_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP2_SHIFT)) & AIPS_PACRD_WP2_MASK)
  1792. #define AIPS_PACRD_SP2_MASK (0x400000U)
  1793. #define AIPS_PACRD_SP2_SHIFT (22U)
  1794. /*! SP2 - Supervisor Protect
  1795. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1796. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1797. */
  1798. #define AIPS_PACRD_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP2_SHIFT)) & AIPS_PACRD_SP2_MASK)
  1799. #define AIPS_PACRD_TP1_MASK (0x1000000U)
  1800. #define AIPS_PACRD_TP1_SHIFT (24U)
  1801. /*! TP1 - Trusted Protect
  1802. * 0b0..Accesses from an untrusted master are allowed.
  1803. * 0b1..Accesses from an untrusted master are not allowed.
  1804. */
  1805. #define AIPS_PACRD_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP1_SHIFT)) & AIPS_PACRD_TP1_MASK)
  1806. #define AIPS_PACRD_WP1_MASK (0x2000000U)
  1807. #define AIPS_PACRD_WP1_SHIFT (25U)
  1808. /*! WP1 - Write Protect
  1809. * 0b0..This peripheral allows write accesses.
  1810. * 0b1..This peripheral is write protected.
  1811. */
  1812. #define AIPS_PACRD_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP1_SHIFT)) & AIPS_PACRD_WP1_MASK)
  1813. #define AIPS_PACRD_SP1_MASK (0x4000000U)
  1814. #define AIPS_PACRD_SP1_SHIFT (26U)
  1815. /*! SP1 - Supervisor Protect
  1816. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1817. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1818. */
  1819. #define AIPS_PACRD_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP1_SHIFT)) & AIPS_PACRD_SP1_MASK)
  1820. #define AIPS_PACRD_TP0_MASK (0x10000000U)
  1821. #define AIPS_PACRD_TP0_SHIFT (28U)
  1822. /*! TP0 - Trusted Protect
  1823. * 0b0..Accesses from an untrusted master are allowed.
  1824. * 0b1..Accesses from an untrusted master are not allowed.
  1825. */
  1826. #define AIPS_PACRD_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP0_SHIFT)) & AIPS_PACRD_TP0_MASK)
  1827. #define AIPS_PACRD_WP0_MASK (0x20000000U)
  1828. #define AIPS_PACRD_WP0_SHIFT (29U)
  1829. /*! WP0 - Write Protect
  1830. * 0b0..This peripheral allows write accesses.
  1831. * 0b1..This peripheral is write protected.
  1832. */
  1833. #define AIPS_PACRD_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP0_SHIFT)) & AIPS_PACRD_WP0_MASK)
  1834. #define AIPS_PACRD_SP0_MASK (0x40000000U)
  1835. #define AIPS_PACRD_SP0_SHIFT (30U)
  1836. /*! SP0 - Supervisor Protect
  1837. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1838. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1839. */
  1840. #define AIPS_PACRD_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP0_SHIFT)) & AIPS_PACRD_SP0_MASK)
  1841. /*! @} */
  1842. /*! @name PACRE - Peripheral Access Control Register */
  1843. /*! @{ */
  1844. #define AIPS_PACRE_TP7_MASK (0x1U)
  1845. #define AIPS_PACRE_TP7_SHIFT (0U)
  1846. /*! TP7 - Trusted Protect
  1847. * 0b0..Accesses from an untrusted master are allowed.
  1848. * 0b1..Accesses from an untrusted master are not allowed.
  1849. */
  1850. #define AIPS_PACRE_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP7_SHIFT)) & AIPS_PACRE_TP7_MASK)
  1851. #define AIPS_PACRE_WP7_MASK (0x2U)
  1852. #define AIPS_PACRE_WP7_SHIFT (1U)
  1853. /*! WP7 - Write Protect
  1854. * 0b0..This peripheral allows write accesses.
  1855. * 0b1..This peripheral is write protected.
  1856. */
  1857. #define AIPS_PACRE_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP7_SHIFT)) & AIPS_PACRE_WP7_MASK)
  1858. #define AIPS_PACRE_SP7_MASK (0x4U)
  1859. #define AIPS_PACRE_SP7_SHIFT (2U)
  1860. /*! SP7 - Supervisor Protect
  1861. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1862. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1863. */
  1864. #define AIPS_PACRE_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP7_SHIFT)) & AIPS_PACRE_SP7_MASK)
  1865. #define AIPS_PACRE_TP6_MASK (0x10U)
  1866. #define AIPS_PACRE_TP6_SHIFT (4U)
  1867. /*! TP6 - Trusted Protect
  1868. * 0b0..Accesses from an untrusted master are allowed.
  1869. * 0b1..Accesses from an untrusted master are not allowed.
  1870. */
  1871. #define AIPS_PACRE_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP6_SHIFT)) & AIPS_PACRE_TP6_MASK)
  1872. #define AIPS_PACRE_WP6_MASK (0x20U)
  1873. #define AIPS_PACRE_WP6_SHIFT (5U)
  1874. /*! WP6 - Write Protect
  1875. * 0b0..This peripheral allows write accesses.
  1876. * 0b1..This peripheral is write protected.
  1877. */
  1878. #define AIPS_PACRE_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP6_SHIFT)) & AIPS_PACRE_WP6_MASK)
  1879. #define AIPS_PACRE_SP6_MASK (0x40U)
  1880. #define AIPS_PACRE_SP6_SHIFT (6U)
  1881. /*! SP6 - Supervisor Protect
  1882. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1883. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1884. */
  1885. #define AIPS_PACRE_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP6_SHIFT)) & AIPS_PACRE_SP6_MASK)
  1886. #define AIPS_PACRE_TP5_MASK (0x100U)
  1887. #define AIPS_PACRE_TP5_SHIFT (8U)
  1888. /*! TP5 - Trusted Protect
  1889. * 0b0..Accesses from an untrusted master are allowed.
  1890. * 0b1..Accesses from an untrusted master are not allowed.
  1891. */
  1892. #define AIPS_PACRE_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP5_SHIFT)) & AIPS_PACRE_TP5_MASK)
  1893. #define AIPS_PACRE_WP5_MASK (0x200U)
  1894. #define AIPS_PACRE_WP5_SHIFT (9U)
  1895. /*! WP5 - Write Protect
  1896. * 0b0..This peripheral allows write accesses.
  1897. * 0b1..This peripheral is write protected.
  1898. */
  1899. #define AIPS_PACRE_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP5_SHIFT)) & AIPS_PACRE_WP5_MASK)
  1900. #define AIPS_PACRE_SP5_MASK (0x400U)
  1901. #define AIPS_PACRE_SP5_SHIFT (10U)
  1902. /*! SP5 - Supervisor Protect
  1903. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1904. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1905. */
  1906. #define AIPS_PACRE_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP5_SHIFT)) & AIPS_PACRE_SP5_MASK)
  1907. #define AIPS_PACRE_TP4_MASK (0x1000U)
  1908. #define AIPS_PACRE_TP4_SHIFT (12U)
  1909. /*! TP4 - Trusted Protect
  1910. * 0b0..Accesses from an untrusted master are allowed.
  1911. * 0b1..Accesses from an untrusted master are not allowed.
  1912. */
  1913. #define AIPS_PACRE_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP4_SHIFT)) & AIPS_PACRE_TP4_MASK)
  1914. #define AIPS_PACRE_WP4_MASK (0x2000U)
  1915. #define AIPS_PACRE_WP4_SHIFT (13U)
  1916. /*! WP4 - Write Protect
  1917. * 0b0..This peripheral allows write accesses.
  1918. * 0b1..This peripheral is write protected.
  1919. */
  1920. #define AIPS_PACRE_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP4_SHIFT)) & AIPS_PACRE_WP4_MASK)
  1921. #define AIPS_PACRE_SP4_MASK (0x4000U)
  1922. #define AIPS_PACRE_SP4_SHIFT (14U)
  1923. /*! SP4 - Supervisor Protect
  1924. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1925. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1926. */
  1927. #define AIPS_PACRE_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP4_SHIFT)) & AIPS_PACRE_SP4_MASK)
  1928. #define AIPS_PACRE_TP3_MASK (0x10000U)
  1929. #define AIPS_PACRE_TP3_SHIFT (16U)
  1930. /*! TP3 - Trusted Protect
  1931. * 0b0..Accesses from an untrusted master are allowed.
  1932. * 0b1..Accesses from an untrusted master are not allowed.
  1933. */
  1934. #define AIPS_PACRE_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP3_SHIFT)) & AIPS_PACRE_TP3_MASK)
  1935. #define AIPS_PACRE_WP3_MASK (0x20000U)
  1936. #define AIPS_PACRE_WP3_SHIFT (17U)
  1937. /*! WP3 - Write Protect
  1938. * 0b0..This peripheral allows write accesses.
  1939. * 0b1..This peripheral is write protected.
  1940. */
  1941. #define AIPS_PACRE_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP3_SHIFT)) & AIPS_PACRE_WP3_MASK)
  1942. #define AIPS_PACRE_SP3_MASK (0x40000U)
  1943. #define AIPS_PACRE_SP3_SHIFT (18U)
  1944. /*! SP3 - Supervisor Protect
  1945. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1946. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1947. */
  1948. #define AIPS_PACRE_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP3_SHIFT)) & AIPS_PACRE_SP3_MASK)
  1949. #define AIPS_PACRE_TP2_MASK (0x100000U)
  1950. #define AIPS_PACRE_TP2_SHIFT (20U)
  1951. /*! TP2 - Trusted Protect
  1952. * 0b0..Accesses from an untrusted master are allowed.
  1953. * 0b1..Accesses from an untrusted master are not allowed.
  1954. */
  1955. #define AIPS_PACRE_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP2_SHIFT)) & AIPS_PACRE_TP2_MASK)
  1956. #define AIPS_PACRE_WP2_MASK (0x200000U)
  1957. #define AIPS_PACRE_WP2_SHIFT (21U)
  1958. /*! WP2 - Write Protect
  1959. * 0b0..This peripheral allows write accesses.
  1960. * 0b1..This peripheral is write protected.
  1961. */
  1962. #define AIPS_PACRE_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP2_SHIFT)) & AIPS_PACRE_WP2_MASK)
  1963. #define AIPS_PACRE_SP2_MASK (0x400000U)
  1964. #define AIPS_PACRE_SP2_SHIFT (22U)
  1965. /*! SP2 - Supervisor Protect
  1966. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1967. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1968. */
  1969. #define AIPS_PACRE_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP2_SHIFT)) & AIPS_PACRE_SP2_MASK)
  1970. #define AIPS_PACRE_TP1_MASK (0x1000000U)
  1971. #define AIPS_PACRE_TP1_SHIFT (24U)
  1972. /*! TP1 - Trusted Protect
  1973. * 0b0..Accesses from an untrusted master are allowed.
  1974. * 0b1..Accesses from an untrusted master are not allowed.
  1975. */
  1976. #define AIPS_PACRE_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP1_SHIFT)) & AIPS_PACRE_TP1_MASK)
  1977. #define AIPS_PACRE_WP1_MASK (0x2000000U)
  1978. #define AIPS_PACRE_WP1_SHIFT (25U)
  1979. /*! WP1 - Write Protect
  1980. * 0b0..This peripheral allows write accesses.
  1981. * 0b1..This peripheral is write protected.
  1982. */
  1983. #define AIPS_PACRE_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP1_SHIFT)) & AIPS_PACRE_WP1_MASK)
  1984. #define AIPS_PACRE_SP1_MASK (0x4000000U)
  1985. #define AIPS_PACRE_SP1_SHIFT (26U)
  1986. /*! SP1 - Supervisor Protect
  1987. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  1988. * 0b1..This peripheral requires supervisor privilege level for accesses.
  1989. */
  1990. #define AIPS_PACRE_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP1_SHIFT)) & AIPS_PACRE_SP1_MASK)
  1991. #define AIPS_PACRE_TP0_MASK (0x10000000U)
  1992. #define AIPS_PACRE_TP0_SHIFT (28U)
  1993. /*! TP0 - Trusted Protect
  1994. * 0b0..Accesses from an untrusted master are allowed.
  1995. * 0b1..Accesses from an untrusted master are not allowed.
  1996. */
  1997. #define AIPS_PACRE_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP0_SHIFT)) & AIPS_PACRE_TP0_MASK)
  1998. #define AIPS_PACRE_WP0_MASK (0x20000000U)
  1999. #define AIPS_PACRE_WP0_SHIFT (29U)
  2000. /*! WP0 - Write Protect
  2001. * 0b0..This peripheral allows write accesses.
  2002. * 0b1..This peripheral is write protected.
  2003. */
  2004. #define AIPS_PACRE_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP0_SHIFT)) & AIPS_PACRE_WP0_MASK)
  2005. #define AIPS_PACRE_SP0_MASK (0x40000000U)
  2006. #define AIPS_PACRE_SP0_SHIFT (30U)
  2007. /*! SP0 - Supervisor Protect
  2008. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2009. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2010. */
  2011. #define AIPS_PACRE_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP0_SHIFT)) & AIPS_PACRE_SP0_MASK)
  2012. /*! @} */
  2013. /*! @name PACRF - Peripheral Access Control Register */
  2014. /*! @{ */
  2015. #define AIPS_PACRF_TP7_MASK (0x1U)
  2016. #define AIPS_PACRF_TP7_SHIFT (0U)
  2017. /*! TP7 - Trusted Protect
  2018. * 0b0..Accesses from an untrusted master are allowed.
  2019. * 0b1..Accesses from an untrusted master are not allowed.
  2020. */
  2021. #define AIPS_PACRF_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP7_SHIFT)) & AIPS_PACRF_TP7_MASK)
  2022. #define AIPS_PACRF_WP7_MASK (0x2U)
  2023. #define AIPS_PACRF_WP7_SHIFT (1U)
  2024. /*! WP7 - Write Protect
  2025. * 0b0..This peripheral allows write accesses.
  2026. * 0b1..This peripheral is write protected.
  2027. */
  2028. #define AIPS_PACRF_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP7_SHIFT)) & AIPS_PACRF_WP7_MASK)
  2029. #define AIPS_PACRF_SP7_MASK (0x4U)
  2030. #define AIPS_PACRF_SP7_SHIFT (2U)
  2031. /*! SP7 - Supervisor Protect
  2032. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2033. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2034. */
  2035. #define AIPS_PACRF_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP7_SHIFT)) & AIPS_PACRF_SP7_MASK)
  2036. #define AIPS_PACRF_TP6_MASK (0x10U)
  2037. #define AIPS_PACRF_TP6_SHIFT (4U)
  2038. /*! TP6 - Trusted Protect
  2039. * 0b0..Accesses from an untrusted master are allowed.
  2040. * 0b1..Accesses from an untrusted master are not allowed.
  2041. */
  2042. #define AIPS_PACRF_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP6_SHIFT)) & AIPS_PACRF_TP6_MASK)
  2043. #define AIPS_PACRF_WP6_MASK (0x20U)
  2044. #define AIPS_PACRF_WP6_SHIFT (5U)
  2045. /*! WP6 - Write Protect
  2046. * 0b0..This peripheral allows write accesses.
  2047. * 0b1..This peripheral is write protected.
  2048. */
  2049. #define AIPS_PACRF_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP6_SHIFT)) & AIPS_PACRF_WP6_MASK)
  2050. #define AIPS_PACRF_SP6_MASK (0x40U)
  2051. #define AIPS_PACRF_SP6_SHIFT (6U)
  2052. /*! SP6 - Supervisor Protect
  2053. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2054. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2055. */
  2056. #define AIPS_PACRF_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP6_SHIFT)) & AIPS_PACRF_SP6_MASK)
  2057. #define AIPS_PACRF_TP5_MASK (0x100U)
  2058. #define AIPS_PACRF_TP5_SHIFT (8U)
  2059. /*! TP5 - Trusted Protect
  2060. * 0b0..Accesses from an untrusted master are allowed.
  2061. * 0b1..Accesses from an untrusted master are not allowed.
  2062. */
  2063. #define AIPS_PACRF_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP5_SHIFT)) & AIPS_PACRF_TP5_MASK)
  2064. #define AIPS_PACRF_WP5_MASK (0x200U)
  2065. #define AIPS_PACRF_WP5_SHIFT (9U)
  2066. /*! WP5 - Write Protect
  2067. * 0b0..This peripheral allows write accesses.
  2068. * 0b1..This peripheral is write protected.
  2069. */
  2070. #define AIPS_PACRF_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP5_SHIFT)) & AIPS_PACRF_WP5_MASK)
  2071. #define AIPS_PACRF_SP5_MASK (0x400U)
  2072. #define AIPS_PACRF_SP5_SHIFT (10U)
  2073. /*! SP5 - Supervisor Protect
  2074. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2075. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2076. */
  2077. #define AIPS_PACRF_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP5_SHIFT)) & AIPS_PACRF_SP5_MASK)
  2078. #define AIPS_PACRF_TP4_MASK (0x1000U)
  2079. #define AIPS_PACRF_TP4_SHIFT (12U)
  2080. /*! TP4 - Trusted Protect
  2081. * 0b0..Accesses from an untrusted master are allowed.
  2082. * 0b1..Accesses from an untrusted master are not allowed.
  2083. */
  2084. #define AIPS_PACRF_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP4_SHIFT)) & AIPS_PACRF_TP4_MASK)
  2085. #define AIPS_PACRF_WP4_MASK (0x2000U)
  2086. #define AIPS_PACRF_WP4_SHIFT (13U)
  2087. /*! WP4 - Write Protect
  2088. * 0b0..This peripheral allows write accesses.
  2089. * 0b1..This peripheral is write protected.
  2090. */
  2091. #define AIPS_PACRF_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP4_SHIFT)) & AIPS_PACRF_WP4_MASK)
  2092. #define AIPS_PACRF_SP4_MASK (0x4000U)
  2093. #define AIPS_PACRF_SP4_SHIFT (14U)
  2094. /*! SP4 - Supervisor Protect
  2095. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2096. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2097. */
  2098. #define AIPS_PACRF_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP4_SHIFT)) & AIPS_PACRF_SP4_MASK)
  2099. #define AIPS_PACRF_TP3_MASK (0x10000U)
  2100. #define AIPS_PACRF_TP3_SHIFT (16U)
  2101. /*! TP3 - Trusted Protect
  2102. * 0b0..Accesses from an untrusted master are allowed.
  2103. * 0b1..Accesses from an untrusted master are not allowed.
  2104. */
  2105. #define AIPS_PACRF_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP3_SHIFT)) & AIPS_PACRF_TP3_MASK)
  2106. #define AIPS_PACRF_WP3_MASK (0x20000U)
  2107. #define AIPS_PACRF_WP3_SHIFT (17U)
  2108. /*! WP3 - Write Protect
  2109. * 0b0..This peripheral allows write accesses.
  2110. * 0b1..This peripheral is write protected.
  2111. */
  2112. #define AIPS_PACRF_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP3_SHIFT)) & AIPS_PACRF_WP3_MASK)
  2113. #define AIPS_PACRF_SP3_MASK (0x40000U)
  2114. #define AIPS_PACRF_SP3_SHIFT (18U)
  2115. /*! SP3 - Supervisor Protect
  2116. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2117. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2118. */
  2119. #define AIPS_PACRF_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP3_SHIFT)) & AIPS_PACRF_SP3_MASK)
  2120. #define AIPS_PACRF_TP2_MASK (0x100000U)
  2121. #define AIPS_PACRF_TP2_SHIFT (20U)
  2122. /*! TP2 - Trusted Protect
  2123. * 0b0..Accesses from an untrusted master are allowed.
  2124. * 0b1..Accesses from an untrusted master are not allowed.
  2125. */
  2126. #define AIPS_PACRF_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP2_SHIFT)) & AIPS_PACRF_TP2_MASK)
  2127. #define AIPS_PACRF_WP2_MASK (0x200000U)
  2128. #define AIPS_PACRF_WP2_SHIFT (21U)
  2129. /*! WP2 - Write Protect
  2130. * 0b0..This peripheral allows write accesses.
  2131. * 0b1..This peripheral is write protected.
  2132. */
  2133. #define AIPS_PACRF_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP2_SHIFT)) & AIPS_PACRF_WP2_MASK)
  2134. #define AIPS_PACRF_SP2_MASK (0x400000U)
  2135. #define AIPS_PACRF_SP2_SHIFT (22U)
  2136. /*! SP2 - Supervisor Protect
  2137. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2138. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2139. */
  2140. #define AIPS_PACRF_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP2_SHIFT)) & AIPS_PACRF_SP2_MASK)
  2141. #define AIPS_PACRF_TP1_MASK (0x1000000U)
  2142. #define AIPS_PACRF_TP1_SHIFT (24U)
  2143. /*! TP1 - Trusted Protect
  2144. * 0b0..Accesses from an untrusted master are allowed.
  2145. * 0b1..Accesses from an untrusted master are not allowed.
  2146. */
  2147. #define AIPS_PACRF_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP1_SHIFT)) & AIPS_PACRF_TP1_MASK)
  2148. #define AIPS_PACRF_WP1_MASK (0x2000000U)
  2149. #define AIPS_PACRF_WP1_SHIFT (25U)
  2150. /*! WP1 - Write Protect
  2151. * 0b0..This peripheral allows write accesses.
  2152. * 0b1..This peripheral is write protected.
  2153. */
  2154. #define AIPS_PACRF_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP1_SHIFT)) & AIPS_PACRF_WP1_MASK)
  2155. #define AIPS_PACRF_SP1_MASK (0x4000000U)
  2156. #define AIPS_PACRF_SP1_SHIFT (26U)
  2157. /*! SP1 - Supervisor Protect
  2158. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2159. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2160. */
  2161. #define AIPS_PACRF_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP1_SHIFT)) & AIPS_PACRF_SP1_MASK)
  2162. #define AIPS_PACRF_TP0_MASK (0x10000000U)
  2163. #define AIPS_PACRF_TP0_SHIFT (28U)
  2164. /*! TP0 - Trusted Protect
  2165. * 0b0..Accesses from an untrusted master are allowed.
  2166. * 0b1..Accesses from an untrusted master are not allowed.
  2167. */
  2168. #define AIPS_PACRF_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP0_SHIFT)) & AIPS_PACRF_TP0_MASK)
  2169. #define AIPS_PACRF_WP0_MASK (0x20000000U)
  2170. #define AIPS_PACRF_WP0_SHIFT (29U)
  2171. /*! WP0 - Write Protect
  2172. * 0b0..This peripheral allows write accesses.
  2173. * 0b1..This peripheral is write protected.
  2174. */
  2175. #define AIPS_PACRF_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP0_SHIFT)) & AIPS_PACRF_WP0_MASK)
  2176. #define AIPS_PACRF_SP0_MASK (0x40000000U)
  2177. #define AIPS_PACRF_SP0_SHIFT (30U)
  2178. /*! SP0 - Supervisor Protect
  2179. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2180. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2181. */
  2182. #define AIPS_PACRF_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP0_SHIFT)) & AIPS_PACRF_SP0_MASK)
  2183. /*! @} */
  2184. /*! @name PACRG - Peripheral Access Control Register */
  2185. /*! @{ */
  2186. #define AIPS_PACRG_TP7_MASK (0x1U)
  2187. #define AIPS_PACRG_TP7_SHIFT (0U)
  2188. /*! TP7 - Trusted Protect
  2189. * 0b0..Accesses from an untrusted master are allowed.
  2190. * 0b1..Accesses from an untrusted master are not allowed.
  2191. */
  2192. #define AIPS_PACRG_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP7_SHIFT)) & AIPS_PACRG_TP7_MASK)
  2193. #define AIPS_PACRG_WP7_MASK (0x2U)
  2194. #define AIPS_PACRG_WP7_SHIFT (1U)
  2195. /*! WP7 - Write Protect
  2196. * 0b0..This peripheral allows write accesses.
  2197. * 0b1..This peripheral is write protected.
  2198. */
  2199. #define AIPS_PACRG_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP7_SHIFT)) & AIPS_PACRG_WP7_MASK)
  2200. #define AIPS_PACRG_SP7_MASK (0x4U)
  2201. #define AIPS_PACRG_SP7_SHIFT (2U)
  2202. /*! SP7 - Supervisor Protect
  2203. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2204. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2205. */
  2206. #define AIPS_PACRG_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP7_SHIFT)) & AIPS_PACRG_SP7_MASK)
  2207. #define AIPS_PACRG_TP6_MASK (0x10U)
  2208. #define AIPS_PACRG_TP6_SHIFT (4U)
  2209. /*! TP6 - Trusted Protect
  2210. * 0b0..Accesses from an untrusted master are allowed.
  2211. * 0b1..Accesses from an untrusted master are not allowed.
  2212. */
  2213. #define AIPS_PACRG_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP6_SHIFT)) & AIPS_PACRG_TP6_MASK)
  2214. #define AIPS_PACRG_WP6_MASK (0x20U)
  2215. #define AIPS_PACRG_WP6_SHIFT (5U)
  2216. /*! WP6 - Write Protect
  2217. * 0b0..This peripheral allows write accesses.
  2218. * 0b1..This peripheral is write protected.
  2219. */
  2220. #define AIPS_PACRG_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP6_SHIFT)) & AIPS_PACRG_WP6_MASK)
  2221. #define AIPS_PACRG_SP6_MASK (0x40U)
  2222. #define AIPS_PACRG_SP6_SHIFT (6U)
  2223. /*! SP6 - Supervisor Protect
  2224. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2225. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2226. */
  2227. #define AIPS_PACRG_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP6_SHIFT)) & AIPS_PACRG_SP6_MASK)
  2228. #define AIPS_PACRG_TP5_MASK (0x100U)
  2229. #define AIPS_PACRG_TP5_SHIFT (8U)
  2230. /*! TP5 - Trusted Protect
  2231. * 0b0..Accesses from an untrusted master are allowed.
  2232. * 0b1..Accesses from an untrusted master are not allowed.
  2233. */
  2234. #define AIPS_PACRG_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP5_SHIFT)) & AIPS_PACRG_TP5_MASK)
  2235. #define AIPS_PACRG_WP5_MASK (0x200U)
  2236. #define AIPS_PACRG_WP5_SHIFT (9U)
  2237. /*! WP5 - Write Protect
  2238. * 0b0..This peripheral allows write accesses.
  2239. * 0b1..This peripheral is write protected.
  2240. */
  2241. #define AIPS_PACRG_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP5_SHIFT)) & AIPS_PACRG_WP5_MASK)
  2242. #define AIPS_PACRG_SP5_MASK (0x400U)
  2243. #define AIPS_PACRG_SP5_SHIFT (10U)
  2244. /*! SP5 - Supervisor Protect
  2245. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2246. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2247. */
  2248. #define AIPS_PACRG_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP5_SHIFT)) & AIPS_PACRG_SP5_MASK)
  2249. #define AIPS_PACRG_TP4_MASK (0x1000U)
  2250. #define AIPS_PACRG_TP4_SHIFT (12U)
  2251. /*! TP4 - Trusted Protect
  2252. * 0b0..Accesses from an untrusted master are allowed.
  2253. * 0b1..Accesses from an untrusted master are not allowed.
  2254. */
  2255. #define AIPS_PACRG_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP4_SHIFT)) & AIPS_PACRG_TP4_MASK)
  2256. #define AIPS_PACRG_WP4_MASK (0x2000U)
  2257. #define AIPS_PACRG_WP4_SHIFT (13U)
  2258. /*! WP4 - Write Protect
  2259. * 0b0..This peripheral allows write accesses.
  2260. * 0b1..This peripheral is write protected.
  2261. */
  2262. #define AIPS_PACRG_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP4_SHIFT)) & AIPS_PACRG_WP4_MASK)
  2263. #define AIPS_PACRG_SP4_MASK (0x4000U)
  2264. #define AIPS_PACRG_SP4_SHIFT (14U)
  2265. /*! SP4 - Supervisor Protect
  2266. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2267. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2268. */
  2269. #define AIPS_PACRG_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP4_SHIFT)) & AIPS_PACRG_SP4_MASK)
  2270. #define AIPS_PACRG_TP3_MASK (0x10000U)
  2271. #define AIPS_PACRG_TP3_SHIFT (16U)
  2272. /*! TP3 - Trusted Protect
  2273. * 0b0..Accesses from an untrusted master are allowed.
  2274. * 0b1..Accesses from an untrusted master are not allowed.
  2275. */
  2276. #define AIPS_PACRG_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP3_SHIFT)) & AIPS_PACRG_TP3_MASK)
  2277. #define AIPS_PACRG_WP3_MASK (0x20000U)
  2278. #define AIPS_PACRG_WP3_SHIFT (17U)
  2279. /*! WP3 - Write Protect
  2280. * 0b0..This peripheral allows write accesses.
  2281. * 0b1..This peripheral is write protected.
  2282. */
  2283. #define AIPS_PACRG_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP3_SHIFT)) & AIPS_PACRG_WP3_MASK)
  2284. #define AIPS_PACRG_SP3_MASK (0x40000U)
  2285. #define AIPS_PACRG_SP3_SHIFT (18U)
  2286. /*! SP3 - Supervisor Protect
  2287. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2288. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2289. */
  2290. #define AIPS_PACRG_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP3_SHIFT)) & AIPS_PACRG_SP3_MASK)
  2291. #define AIPS_PACRG_TP2_MASK (0x100000U)
  2292. #define AIPS_PACRG_TP2_SHIFT (20U)
  2293. /*! TP2 - Trusted Protect
  2294. * 0b0..Accesses from an untrusted master are allowed.
  2295. * 0b1..Accesses from an untrusted master are not allowed.
  2296. */
  2297. #define AIPS_PACRG_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP2_SHIFT)) & AIPS_PACRG_TP2_MASK)
  2298. #define AIPS_PACRG_WP2_MASK (0x200000U)
  2299. #define AIPS_PACRG_WP2_SHIFT (21U)
  2300. /*! WP2 - Write Protect
  2301. * 0b0..This peripheral allows write accesses.
  2302. * 0b1..This peripheral is write protected.
  2303. */
  2304. #define AIPS_PACRG_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP2_SHIFT)) & AIPS_PACRG_WP2_MASK)
  2305. #define AIPS_PACRG_SP2_MASK (0x400000U)
  2306. #define AIPS_PACRG_SP2_SHIFT (22U)
  2307. /*! SP2 - Supervisor Protect
  2308. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2309. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2310. */
  2311. #define AIPS_PACRG_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP2_SHIFT)) & AIPS_PACRG_SP2_MASK)
  2312. #define AIPS_PACRG_TP1_MASK (0x1000000U)
  2313. #define AIPS_PACRG_TP1_SHIFT (24U)
  2314. /*! TP1 - Trusted Protect
  2315. * 0b0..Accesses from an untrusted master are allowed.
  2316. * 0b1..Accesses from an untrusted master are not allowed.
  2317. */
  2318. #define AIPS_PACRG_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP1_SHIFT)) & AIPS_PACRG_TP1_MASK)
  2319. #define AIPS_PACRG_WP1_MASK (0x2000000U)
  2320. #define AIPS_PACRG_WP1_SHIFT (25U)
  2321. /*! WP1 - Write Protect
  2322. * 0b0..This peripheral allows write accesses.
  2323. * 0b1..This peripheral is write protected.
  2324. */
  2325. #define AIPS_PACRG_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP1_SHIFT)) & AIPS_PACRG_WP1_MASK)
  2326. #define AIPS_PACRG_SP1_MASK (0x4000000U)
  2327. #define AIPS_PACRG_SP1_SHIFT (26U)
  2328. /*! SP1 - Supervisor Protect
  2329. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2330. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2331. */
  2332. #define AIPS_PACRG_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP1_SHIFT)) & AIPS_PACRG_SP1_MASK)
  2333. #define AIPS_PACRG_TP0_MASK (0x10000000U)
  2334. #define AIPS_PACRG_TP0_SHIFT (28U)
  2335. /*! TP0 - Trusted Protect
  2336. * 0b0..Accesses from an untrusted master are allowed.
  2337. * 0b1..Accesses from an untrusted master are not allowed.
  2338. */
  2339. #define AIPS_PACRG_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP0_SHIFT)) & AIPS_PACRG_TP0_MASK)
  2340. #define AIPS_PACRG_WP0_MASK (0x20000000U)
  2341. #define AIPS_PACRG_WP0_SHIFT (29U)
  2342. /*! WP0 - Write Protect
  2343. * 0b0..This peripheral allows write accesses.
  2344. * 0b1..This peripheral is write protected.
  2345. */
  2346. #define AIPS_PACRG_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP0_SHIFT)) & AIPS_PACRG_WP0_MASK)
  2347. #define AIPS_PACRG_SP0_MASK (0x40000000U)
  2348. #define AIPS_PACRG_SP0_SHIFT (30U)
  2349. /*! SP0 - Supervisor Protect
  2350. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2351. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2352. */
  2353. #define AIPS_PACRG_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP0_SHIFT)) & AIPS_PACRG_SP0_MASK)
  2354. /*! @} */
  2355. /*! @name PACRH - Peripheral Access Control Register */
  2356. /*! @{ */
  2357. #define AIPS_PACRH_TP7_MASK (0x1U)
  2358. #define AIPS_PACRH_TP7_SHIFT (0U)
  2359. /*! TP7 - Trusted Protect
  2360. * 0b0..Accesses from an untrusted master are allowed.
  2361. * 0b1..Accesses from an untrusted master are not allowed.
  2362. */
  2363. #define AIPS_PACRH_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP7_SHIFT)) & AIPS_PACRH_TP7_MASK)
  2364. #define AIPS_PACRH_WP7_MASK (0x2U)
  2365. #define AIPS_PACRH_WP7_SHIFT (1U)
  2366. /*! WP7 - Write Protect
  2367. * 0b0..This peripheral allows write accesses.
  2368. * 0b1..This peripheral is write protected.
  2369. */
  2370. #define AIPS_PACRH_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP7_SHIFT)) & AIPS_PACRH_WP7_MASK)
  2371. #define AIPS_PACRH_SP7_MASK (0x4U)
  2372. #define AIPS_PACRH_SP7_SHIFT (2U)
  2373. /*! SP7 - Supervisor Protect
  2374. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2375. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2376. */
  2377. #define AIPS_PACRH_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP7_SHIFT)) & AIPS_PACRH_SP7_MASK)
  2378. #define AIPS_PACRH_TP6_MASK (0x10U)
  2379. #define AIPS_PACRH_TP6_SHIFT (4U)
  2380. /*! TP6 - Trusted Protect
  2381. * 0b0..Accesses from an untrusted master are allowed.
  2382. * 0b1..Accesses from an untrusted master are not allowed.
  2383. */
  2384. #define AIPS_PACRH_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP6_SHIFT)) & AIPS_PACRH_TP6_MASK)
  2385. #define AIPS_PACRH_WP6_MASK (0x20U)
  2386. #define AIPS_PACRH_WP6_SHIFT (5U)
  2387. /*! WP6 - Write Protect
  2388. * 0b0..This peripheral allows write accesses.
  2389. * 0b1..This peripheral is write protected.
  2390. */
  2391. #define AIPS_PACRH_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP6_SHIFT)) & AIPS_PACRH_WP6_MASK)
  2392. #define AIPS_PACRH_SP6_MASK (0x40U)
  2393. #define AIPS_PACRH_SP6_SHIFT (6U)
  2394. /*! SP6 - Supervisor Protect
  2395. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2396. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2397. */
  2398. #define AIPS_PACRH_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP6_SHIFT)) & AIPS_PACRH_SP6_MASK)
  2399. #define AIPS_PACRH_TP5_MASK (0x100U)
  2400. #define AIPS_PACRH_TP5_SHIFT (8U)
  2401. /*! TP5 - Trusted Protect
  2402. * 0b0..Accesses from an untrusted master are allowed.
  2403. * 0b1..Accesses from an untrusted master are not allowed.
  2404. */
  2405. #define AIPS_PACRH_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP5_SHIFT)) & AIPS_PACRH_TP5_MASK)
  2406. #define AIPS_PACRH_WP5_MASK (0x200U)
  2407. #define AIPS_PACRH_WP5_SHIFT (9U)
  2408. /*! WP5 - Write Protect
  2409. * 0b0..This peripheral allows write accesses.
  2410. * 0b1..This peripheral is write protected.
  2411. */
  2412. #define AIPS_PACRH_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP5_SHIFT)) & AIPS_PACRH_WP5_MASK)
  2413. #define AIPS_PACRH_SP5_MASK (0x400U)
  2414. #define AIPS_PACRH_SP5_SHIFT (10U)
  2415. /*! SP5 - Supervisor Protect
  2416. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2417. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2418. */
  2419. #define AIPS_PACRH_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP5_SHIFT)) & AIPS_PACRH_SP5_MASK)
  2420. #define AIPS_PACRH_TP4_MASK (0x1000U)
  2421. #define AIPS_PACRH_TP4_SHIFT (12U)
  2422. /*! TP4 - Trusted Protect
  2423. * 0b0..Accesses from an untrusted master are allowed.
  2424. * 0b1..Accesses from an untrusted master are not allowed.
  2425. */
  2426. #define AIPS_PACRH_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP4_SHIFT)) & AIPS_PACRH_TP4_MASK)
  2427. #define AIPS_PACRH_WP4_MASK (0x2000U)
  2428. #define AIPS_PACRH_WP4_SHIFT (13U)
  2429. /*! WP4 - Write Protect
  2430. * 0b0..This peripheral allows write accesses.
  2431. * 0b1..This peripheral is write protected.
  2432. */
  2433. #define AIPS_PACRH_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP4_SHIFT)) & AIPS_PACRH_WP4_MASK)
  2434. #define AIPS_PACRH_SP4_MASK (0x4000U)
  2435. #define AIPS_PACRH_SP4_SHIFT (14U)
  2436. /*! SP4 - Supervisor Protect
  2437. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2438. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2439. */
  2440. #define AIPS_PACRH_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP4_SHIFT)) & AIPS_PACRH_SP4_MASK)
  2441. #define AIPS_PACRH_TP3_MASK (0x10000U)
  2442. #define AIPS_PACRH_TP3_SHIFT (16U)
  2443. /*! TP3 - Trusted Protect
  2444. * 0b0..Accesses from an untrusted master are allowed.
  2445. * 0b1..Accesses from an untrusted master are not allowed.
  2446. */
  2447. #define AIPS_PACRH_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP3_SHIFT)) & AIPS_PACRH_TP3_MASK)
  2448. #define AIPS_PACRH_WP3_MASK (0x20000U)
  2449. #define AIPS_PACRH_WP3_SHIFT (17U)
  2450. /*! WP3 - Write Protect
  2451. * 0b0..This peripheral allows write accesses.
  2452. * 0b1..This peripheral is write protected.
  2453. */
  2454. #define AIPS_PACRH_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP3_SHIFT)) & AIPS_PACRH_WP3_MASK)
  2455. #define AIPS_PACRH_SP3_MASK (0x40000U)
  2456. #define AIPS_PACRH_SP3_SHIFT (18U)
  2457. /*! SP3 - Supervisor Protect
  2458. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2459. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2460. */
  2461. #define AIPS_PACRH_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP3_SHIFT)) & AIPS_PACRH_SP3_MASK)
  2462. #define AIPS_PACRH_TP2_MASK (0x100000U)
  2463. #define AIPS_PACRH_TP2_SHIFT (20U)
  2464. /*! TP2 - Trusted Protect
  2465. * 0b0..Accesses from an untrusted master are allowed.
  2466. * 0b1..Accesses from an untrusted master are not allowed.
  2467. */
  2468. #define AIPS_PACRH_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP2_SHIFT)) & AIPS_PACRH_TP2_MASK)
  2469. #define AIPS_PACRH_WP2_MASK (0x200000U)
  2470. #define AIPS_PACRH_WP2_SHIFT (21U)
  2471. /*! WP2 - Write Protect
  2472. * 0b0..This peripheral allows write accesses.
  2473. * 0b1..This peripheral is write protected.
  2474. */
  2475. #define AIPS_PACRH_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP2_SHIFT)) & AIPS_PACRH_WP2_MASK)
  2476. #define AIPS_PACRH_SP2_MASK (0x400000U)
  2477. #define AIPS_PACRH_SP2_SHIFT (22U)
  2478. /*! SP2 - Supervisor Protect
  2479. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2480. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2481. */
  2482. #define AIPS_PACRH_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP2_SHIFT)) & AIPS_PACRH_SP2_MASK)
  2483. #define AIPS_PACRH_TP1_MASK (0x1000000U)
  2484. #define AIPS_PACRH_TP1_SHIFT (24U)
  2485. /*! TP1 - Trusted Protect
  2486. * 0b0..Accesses from an untrusted master are allowed.
  2487. * 0b1..Accesses from an untrusted master are not allowed.
  2488. */
  2489. #define AIPS_PACRH_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP1_SHIFT)) & AIPS_PACRH_TP1_MASK)
  2490. #define AIPS_PACRH_WP1_MASK (0x2000000U)
  2491. #define AIPS_PACRH_WP1_SHIFT (25U)
  2492. /*! WP1 - Write Protect
  2493. * 0b0..This peripheral allows write accesses.
  2494. * 0b1..This peripheral is write protected.
  2495. */
  2496. #define AIPS_PACRH_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP1_SHIFT)) & AIPS_PACRH_WP1_MASK)
  2497. #define AIPS_PACRH_SP1_MASK (0x4000000U)
  2498. #define AIPS_PACRH_SP1_SHIFT (26U)
  2499. /*! SP1 - Supervisor Protect
  2500. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2501. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2502. */
  2503. #define AIPS_PACRH_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP1_SHIFT)) & AIPS_PACRH_SP1_MASK)
  2504. #define AIPS_PACRH_TP0_MASK (0x10000000U)
  2505. #define AIPS_PACRH_TP0_SHIFT (28U)
  2506. /*! TP0 - Trusted Protect
  2507. * 0b0..Accesses from an untrusted master are allowed.
  2508. * 0b1..Accesses from an untrusted master are not allowed.
  2509. */
  2510. #define AIPS_PACRH_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP0_SHIFT)) & AIPS_PACRH_TP0_MASK)
  2511. #define AIPS_PACRH_WP0_MASK (0x20000000U)
  2512. #define AIPS_PACRH_WP0_SHIFT (29U)
  2513. /*! WP0 - Write Protect
  2514. * 0b0..This peripheral allows write accesses.
  2515. * 0b1..This peripheral is write protected.
  2516. */
  2517. #define AIPS_PACRH_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP0_SHIFT)) & AIPS_PACRH_WP0_MASK)
  2518. #define AIPS_PACRH_SP0_MASK (0x40000000U)
  2519. #define AIPS_PACRH_SP0_SHIFT (30U)
  2520. /*! SP0 - Supervisor Protect
  2521. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2522. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2523. */
  2524. #define AIPS_PACRH_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP0_SHIFT)) & AIPS_PACRH_SP0_MASK)
  2525. /*! @} */
  2526. /*! @name PACRI - Peripheral Access Control Register */
  2527. /*! @{ */
  2528. #define AIPS_PACRI_TP7_MASK (0x1U)
  2529. #define AIPS_PACRI_TP7_SHIFT (0U)
  2530. /*! TP7 - Trusted Protect
  2531. * 0b0..Accesses from an untrusted master are allowed.
  2532. * 0b1..Accesses from an untrusted master are not allowed.
  2533. */
  2534. #define AIPS_PACRI_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP7_SHIFT)) & AIPS_PACRI_TP7_MASK)
  2535. #define AIPS_PACRI_WP7_MASK (0x2U)
  2536. #define AIPS_PACRI_WP7_SHIFT (1U)
  2537. /*! WP7 - Write Protect
  2538. * 0b0..This peripheral allows write accesses.
  2539. * 0b1..This peripheral is write protected.
  2540. */
  2541. #define AIPS_PACRI_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP7_SHIFT)) & AIPS_PACRI_WP7_MASK)
  2542. #define AIPS_PACRI_SP7_MASK (0x4U)
  2543. #define AIPS_PACRI_SP7_SHIFT (2U)
  2544. /*! SP7 - Supervisor Protect
  2545. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2546. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2547. */
  2548. #define AIPS_PACRI_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP7_SHIFT)) & AIPS_PACRI_SP7_MASK)
  2549. #define AIPS_PACRI_TP6_MASK (0x10U)
  2550. #define AIPS_PACRI_TP6_SHIFT (4U)
  2551. /*! TP6 - Trusted Protect
  2552. * 0b0..Accesses from an untrusted master are allowed.
  2553. * 0b1..Accesses from an untrusted master are not allowed.
  2554. */
  2555. #define AIPS_PACRI_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP6_SHIFT)) & AIPS_PACRI_TP6_MASK)
  2556. #define AIPS_PACRI_WP6_MASK (0x20U)
  2557. #define AIPS_PACRI_WP6_SHIFT (5U)
  2558. /*! WP6 - Write Protect
  2559. * 0b0..This peripheral allows write accesses.
  2560. * 0b1..This peripheral is write protected.
  2561. */
  2562. #define AIPS_PACRI_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP6_SHIFT)) & AIPS_PACRI_WP6_MASK)
  2563. #define AIPS_PACRI_SP6_MASK (0x40U)
  2564. #define AIPS_PACRI_SP6_SHIFT (6U)
  2565. /*! SP6 - Supervisor Protect
  2566. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2567. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2568. */
  2569. #define AIPS_PACRI_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP6_SHIFT)) & AIPS_PACRI_SP6_MASK)
  2570. #define AIPS_PACRI_TP5_MASK (0x100U)
  2571. #define AIPS_PACRI_TP5_SHIFT (8U)
  2572. /*! TP5 - Trusted Protect
  2573. * 0b0..Accesses from an untrusted master are allowed.
  2574. * 0b1..Accesses from an untrusted master are not allowed.
  2575. */
  2576. #define AIPS_PACRI_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP5_SHIFT)) & AIPS_PACRI_TP5_MASK)
  2577. #define AIPS_PACRI_WP5_MASK (0x200U)
  2578. #define AIPS_PACRI_WP5_SHIFT (9U)
  2579. /*! WP5 - Write Protect
  2580. * 0b0..This peripheral allows write accesses.
  2581. * 0b1..This peripheral is write protected.
  2582. */
  2583. #define AIPS_PACRI_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP5_SHIFT)) & AIPS_PACRI_WP5_MASK)
  2584. #define AIPS_PACRI_SP5_MASK (0x400U)
  2585. #define AIPS_PACRI_SP5_SHIFT (10U)
  2586. /*! SP5 - Supervisor Protect
  2587. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2588. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2589. */
  2590. #define AIPS_PACRI_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP5_SHIFT)) & AIPS_PACRI_SP5_MASK)
  2591. #define AIPS_PACRI_TP4_MASK (0x1000U)
  2592. #define AIPS_PACRI_TP4_SHIFT (12U)
  2593. /*! TP4 - Trusted Protect
  2594. * 0b0..Accesses from an untrusted master are allowed.
  2595. * 0b1..Accesses from an untrusted master are not allowed.
  2596. */
  2597. #define AIPS_PACRI_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP4_SHIFT)) & AIPS_PACRI_TP4_MASK)
  2598. #define AIPS_PACRI_WP4_MASK (0x2000U)
  2599. #define AIPS_PACRI_WP4_SHIFT (13U)
  2600. /*! WP4 - Write Protect
  2601. * 0b0..This peripheral allows write accesses.
  2602. * 0b1..This peripheral is write protected.
  2603. */
  2604. #define AIPS_PACRI_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP4_SHIFT)) & AIPS_PACRI_WP4_MASK)
  2605. #define AIPS_PACRI_SP4_MASK (0x4000U)
  2606. #define AIPS_PACRI_SP4_SHIFT (14U)
  2607. /*! SP4 - Supervisor Protect
  2608. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2609. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2610. */
  2611. #define AIPS_PACRI_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP4_SHIFT)) & AIPS_PACRI_SP4_MASK)
  2612. #define AIPS_PACRI_TP3_MASK (0x10000U)
  2613. #define AIPS_PACRI_TP3_SHIFT (16U)
  2614. /*! TP3 - Trusted Protect
  2615. * 0b0..Accesses from an untrusted master are allowed.
  2616. * 0b1..Accesses from an untrusted master are not allowed.
  2617. */
  2618. #define AIPS_PACRI_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP3_SHIFT)) & AIPS_PACRI_TP3_MASK)
  2619. #define AIPS_PACRI_WP3_MASK (0x20000U)
  2620. #define AIPS_PACRI_WP3_SHIFT (17U)
  2621. /*! WP3 - Write Protect
  2622. * 0b0..This peripheral allows write accesses.
  2623. * 0b1..This peripheral is write protected.
  2624. */
  2625. #define AIPS_PACRI_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP3_SHIFT)) & AIPS_PACRI_WP3_MASK)
  2626. #define AIPS_PACRI_SP3_MASK (0x40000U)
  2627. #define AIPS_PACRI_SP3_SHIFT (18U)
  2628. /*! SP3 - Supervisor Protect
  2629. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2630. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2631. */
  2632. #define AIPS_PACRI_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP3_SHIFT)) & AIPS_PACRI_SP3_MASK)
  2633. #define AIPS_PACRI_TP2_MASK (0x100000U)
  2634. #define AIPS_PACRI_TP2_SHIFT (20U)
  2635. /*! TP2 - Trusted Protect
  2636. * 0b0..Accesses from an untrusted master are allowed.
  2637. * 0b1..Accesses from an untrusted master are not allowed.
  2638. */
  2639. #define AIPS_PACRI_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP2_SHIFT)) & AIPS_PACRI_TP2_MASK)
  2640. #define AIPS_PACRI_WP2_MASK (0x200000U)
  2641. #define AIPS_PACRI_WP2_SHIFT (21U)
  2642. /*! WP2 - Write Protect
  2643. * 0b0..This peripheral allows write accesses.
  2644. * 0b1..This peripheral is write protected.
  2645. */
  2646. #define AIPS_PACRI_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP2_SHIFT)) & AIPS_PACRI_WP2_MASK)
  2647. #define AIPS_PACRI_SP2_MASK (0x400000U)
  2648. #define AIPS_PACRI_SP2_SHIFT (22U)
  2649. /*! SP2 - Supervisor Protect
  2650. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2651. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2652. */
  2653. #define AIPS_PACRI_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP2_SHIFT)) & AIPS_PACRI_SP2_MASK)
  2654. #define AIPS_PACRI_TP1_MASK (0x1000000U)
  2655. #define AIPS_PACRI_TP1_SHIFT (24U)
  2656. /*! TP1 - Trusted Protect
  2657. * 0b0..Accesses from an untrusted master are allowed.
  2658. * 0b1..Accesses from an untrusted master are not allowed.
  2659. */
  2660. #define AIPS_PACRI_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP1_SHIFT)) & AIPS_PACRI_TP1_MASK)
  2661. #define AIPS_PACRI_WP1_MASK (0x2000000U)
  2662. #define AIPS_PACRI_WP1_SHIFT (25U)
  2663. /*! WP1 - Write Protect
  2664. * 0b0..This peripheral allows write accesses.
  2665. * 0b1..This peripheral is write protected.
  2666. */
  2667. #define AIPS_PACRI_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP1_SHIFT)) & AIPS_PACRI_WP1_MASK)
  2668. #define AIPS_PACRI_SP1_MASK (0x4000000U)
  2669. #define AIPS_PACRI_SP1_SHIFT (26U)
  2670. /*! SP1 - Supervisor Protect
  2671. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2672. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2673. */
  2674. #define AIPS_PACRI_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP1_SHIFT)) & AIPS_PACRI_SP1_MASK)
  2675. #define AIPS_PACRI_TP0_MASK (0x10000000U)
  2676. #define AIPS_PACRI_TP0_SHIFT (28U)
  2677. /*! TP0 - Trusted Protect
  2678. * 0b0..Accesses from an untrusted master are allowed.
  2679. * 0b1..Accesses from an untrusted master are not allowed.
  2680. */
  2681. #define AIPS_PACRI_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP0_SHIFT)) & AIPS_PACRI_TP0_MASK)
  2682. #define AIPS_PACRI_WP0_MASK (0x20000000U)
  2683. #define AIPS_PACRI_WP0_SHIFT (29U)
  2684. /*! WP0 - Write Protect
  2685. * 0b0..This peripheral allows write accesses.
  2686. * 0b1..This peripheral is write protected.
  2687. */
  2688. #define AIPS_PACRI_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP0_SHIFT)) & AIPS_PACRI_WP0_MASK)
  2689. #define AIPS_PACRI_SP0_MASK (0x40000000U)
  2690. #define AIPS_PACRI_SP0_SHIFT (30U)
  2691. /*! SP0 - Supervisor Protect
  2692. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2693. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2694. */
  2695. #define AIPS_PACRI_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP0_SHIFT)) & AIPS_PACRI_SP0_MASK)
  2696. /*! @} */
  2697. /*! @name PACRJ - Peripheral Access Control Register */
  2698. /*! @{ */
  2699. #define AIPS_PACRJ_TP7_MASK (0x1U)
  2700. #define AIPS_PACRJ_TP7_SHIFT (0U)
  2701. /*! TP7 - Trusted Protect
  2702. * 0b0..Accesses from an untrusted master are allowed.
  2703. * 0b1..Accesses from an untrusted master are not allowed.
  2704. */
  2705. #define AIPS_PACRJ_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP7_SHIFT)) & AIPS_PACRJ_TP7_MASK)
  2706. #define AIPS_PACRJ_WP7_MASK (0x2U)
  2707. #define AIPS_PACRJ_WP7_SHIFT (1U)
  2708. /*! WP7 - Write Protect
  2709. * 0b0..This peripheral allows write accesses.
  2710. * 0b1..This peripheral is write protected.
  2711. */
  2712. #define AIPS_PACRJ_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP7_SHIFT)) & AIPS_PACRJ_WP7_MASK)
  2713. #define AIPS_PACRJ_SP7_MASK (0x4U)
  2714. #define AIPS_PACRJ_SP7_SHIFT (2U)
  2715. /*! SP7 - Supervisor Protect
  2716. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2717. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2718. */
  2719. #define AIPS_PACRJ_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP7_SHIFT)) & AIPS_PACRJ_SP7_MASK)
  2720. #define AIPS_PACRJ_TP6_MASK (0x10U)
  2721. #define AIPS_PACRJ_TP6_SHIFT (4U)
  2722. /*! TP6 - Trusted Protect
  2723. * 0b0..Accesses from an untrusted master are allowed.
  2724. * 0b1..Accesses from an untrusted master are not allowed.
  2725. */
  2726. #define AIPS_PACRJ_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP6_SHIFT)) & AIPS_PACRJ_TP6_MASK)
  2727. #define AIPS_PACRJ_WP6_MASK (0x20U)
  2728. #define AIPS_PACRJ_WP6_SHIFT (5U)
  2729. /*! WP6 - Write Protect
  2730. * 0b0..This peripheral allows write accesses.
  2731. * 0b1..This peripheral is write protected.
  2732. */
  2733. #define AIPS_PACRJ_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP6_SHIFT)) & AIPS_PACRJ_WP6_MASK)
  2734. #define AIPS_PACRJ_SP6_MASK (0x40U)
  2735. #define AIPS_PACRJ_SP6_SHIFT (6U)
  2736. /*! SP6 - Supervisor Protect
  2737. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2738. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2739. */
  2740. #define AIPS_PACRJ_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP6_SHIFT)) & AIPS_PACRJ_SP6_MASK)
  2741. #define AIPS_PACRJ_TP5_MASK (0x100U)
  2742. #define AIPS_PACRJ_TP5_SHIFT (8U)
  2743. /*! TP5 - Trusted Protect
  2744. * 0b0..Accesses from an untrusted master are allowed.
  2745. * 0b1..Accesses from an untrusted master are not allowed.
  2746. */
  2747. #define AIPS_PACRJ_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP5_SHIFT)) & AIPS_PACRJ_TP5_MASK)
  2748. #define AIPS_PACRJ_WP5_MASK (0x200U)
  2749. #define AIPS_PACRJ_WP5_SHIFT (9U)
  2750. /*! WP5 - Write Protect
  2751. * 0b0..This peripheral allows write accesses.
  2752. * 0b1..This peripheral is write protected.
  2753. */
  2754. #define AIPS_PACRJ_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP5_SHIFT)) & AIPS_PACRJ_WP5_MASK)
  2755. #define AIPS_PACRJ_SP5_MASK (0x400U)
  2756. #define AIPS_PACRJ_SP5_SHIFT (10U)
  2757. /*! SP5 - Supervisor Protect
  2758. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2759. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2760. */
  2761. #define AIPS_PACRJ_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP5_SHIFT)) & AIPS_PACRJ_SP5_MASK)
  2762. #define AIPS_PACRJ_TP4_MASK (0x1000U)
  2763. #define AIPS_PACRJ_TP4_SHIFT (12U)
  2764. /*! TP4 - Trusted Protect
  2765. * 0b0..Accesses from an untrusted master are allowed.
  2766. * 0b1..Accesses from an untrusted master are not allowed.
  2767. */
  2768. #define AIPS_PACRJ_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP4_SHIFT)) & AIPS_PACRJ_TP4_MASK)
  2769. #define AIPS_PACRJ_WP4_MASK (0x2000U)
  2770. #define AIPS_PACRJ_WP4_SHIFT (13U)
  2771. /*! WP4 - Write Protect
  2772. * 0b0..This peripheral allows write accesses.
  2773. * 0b1..This peripheral is write protected.
  2774. */
  2775. #define AIPS_PACRJ_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP4_SHIFT)) & AIPS_PACRJ_WP4_MASK)
  2776. #define AIPS_PACRJ_SP4_MASK (0x4000U)
  2777. #define AIPS_PACRJ_SP4_SHIFT (14U)
  2778. /*! SP4 - Supervisor Protect
  2779. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2780. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2781. */
  2782. #define AIPS_PACRJ_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP4_SHIFT)) & AIPS_PACRJ_SP4_MASK)
  2783. #define AIPS_PACRJ_TP3_MASK (0x10000U)
  2784. #define AIPS_PACRJ_TP3_SHIFT (16U)
  2785. /*! TP3 - Trusted Protect
  2786. * 0b0..Accesses from an untrusted master are allowed.
  2787. * 0b1..Accesses from an untrusted master are not allowed.
  2788. */
  2789. #define AIPS_PACRJ_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP3_SHIFT)) & AIPS_PACRJ_TP3_MASK)
  2790. #define AIPS_PACRJ_WP3_MASK (0x20000U)
  2791. #define AIPS_PACRJ_WP3_SHIFT (17U)
  2792. /*! WP3 - Write Protect
  2793. * 0b0..This peripheral allows write accesses.
  2794. * 0b1..This peripheral is write protected.
  2795. */
  2796. #define AIPS_PACRJ_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP3_SHIFT)) & AIPS_PACRJ_WP3_MASK)
  2797. #define AIPS_PACRJ_SP3_MASK (0x40000U)
  2798. #define AIPS_PACRJ_SP3_SHIFT (18U)
  2799. /*! SP3 - Supervisor Protect
  2800. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2801. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2802. */
  2803. #define AIPS_PACRJ_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP3_SHIFT)) & AIPS_PACRJ_SP3_MASK)
  2804. #define AIPS_PACRJ_TP2_MASK (0x100000U)
  2805. #define AIPS_PACRJ_TP2_SHIFT (20U)
  2806. /*! TP2 - Trusted Protect
  2807. * 0b0..Accesses from an untrusted master are allowed.
  2808. * 0b1..Accesses from an untrusted master are not allowed.
  2809. */
  2810. #define AIPS_PACRJ_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP2_SHIFT)) & AIPS_PACRJ_TP2_MASK)
  2811. #define AIPS_PACRJ_WP2_MASK (0x200000U)
  2812. #define AIPS_PACRJ_WP2_SHIFT (21U)
  2813. /*! WP2 - Write Protect
  2814. * 0b0..This peripheral allows write accesses.
  2815. * 0b1..This peripheral is write protected.
  2816. */
  2817. #define AIPS_PACRJ_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP2_SHIFT)) & AIPS_PACRJ_WP2_MASK)
  2818. #define AIPS_PACRJ_SP2_MASK (0x400000U)
  2819. #define AIPS_PACRJ_SP2_SHIFT (22U)
  2820. /*! SP2 - Supervisor Protect
  2821. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2822. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2823. */
  2824. #define AIPS_PACRJ_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP2_SHIFT)) & AIPS_PACRJ_SP2_MASK)
  2825. #define AIPS_PACRJ_TP1_MASK (0x1000000U)
  2826. #define AIPS_PACRJ_TP1_SHIFT (24U)
  2827. /*! TP1 - Trusted Protect
  2828. * 0b0..Accesses from an untrusted master are allowed.
  2829. * 0b1..Accesses from an untrusted master are not allowed.
  2830. */
  2831. #define AIPS_PACRJ_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP1_SHIFT)) & AIPS_PACRJ_TP1_MASK)
  2832. #define AIPS_PACRJ_WP1_MASK (0x2000000U)
  2833. #define AIPS_PACRJ_WP1_SHIFT (25U)
  2834. /*! WP1 - Write Protect
  2835. * 0b0..This peripheral allows write accesses.
  2836. * 0b1..This peripheral is write protected.
  2837. */
  2838. #define AIPS_PACRJ_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP1_SHIFT)) & AIPS_PACRJ_WP1_MASK)
  2839. #define AIPS_PACRJ_SP1_MASK (0x4000000U)
  2840. #define AIPS_PACRJ_SP1_SHIFT (26U)
  2841. /*! SP1 - Supervisor Protect
  2842. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2843. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2844. */
  2845. #define AIPS_PACRJ_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP1_SHIFT)) & AIPS_PACRJ_SP1_MASK)
  2846. #define AIPS_PACRJ_TP0_MASK (0x10000000U)
  2847. #define AIPS_PACRJ_TP0_SHIFT (28U)
  2848. /*! TP0 - Trusted Protect
  2849. * 0b0..Accesses from an untrusted master are allowed.
  2850. * 0b1..Accesses from an untrusted master are not allowed.
  2851. */
  2852. #define AIPS_PACRJ_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP0_SHIFT)) & AIPS_PACRJ_TP0_MASK)
  2853. #define AIPS_PACRJ_WP0_MASK (0x20000000U)
  2854. #define AIPS_PACRJ_WP0_SHIFT (29U)
  2855. /*! WP0 - Write Protect
  2856. * 0b0..This peripheral allows write accesses.
  2857. * 0b1..This peripheral is write protected.
  2858. */
  2859. #define AIPS_PACRJ_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP0_SHIFT)) & AIPS_PACRJ_WP0_MASK)
  2860. #define AIPS_PACRJ_SP0_MASK (0x40000000U)
  2861. #define AIPS_PACRJ_SP0_SHIFT (30U)
  2862. /*! SP0 - Supervisor Protect
  2863. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2864. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2865. */
  2866. #define AIPS_PACRJ_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP0_SHIFT)) & AIPS_PACRJ_SP0_MASK)
  2867. /*! @} */
  2868. /*! @name PACRK - Peripheral Access Control Register */
  2869. /*! @{ */
  2870. #define AIPS_PACRK_TP7_MASK (0x1U)
  2871. #define AIPS_PACRK_TP7_SHIFT (0U)
  2872. /*! TP7 - Trusted Protect
  2873. * 0b0..Accesses from an untrusted master are allowed.
  2874. * 0b1..Accesses from an untrusted master are not allowed.
  2875. */
  2876. #define AIPS_PACRK_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP7_SHIFT)) & AIPS_PACRK_TP7_MASK)
  2877. #define AIPS_PACRK_WP7_MASK (0x2U)
  2878. #define AIPS_PACRK_WP7_SHIFT (1U)
  2879. /*! WP7 - Write Protect
  2880. * 0b0..This peripheral allows write accesses.
  2881. * 0b1..This peripheral is write protected.
  2882. */
  2883. #define AIPS_PACRK_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP7_SHIFT)) & AIPS_PACRK_WP7_MASK)
  2884. #define AIPS_PACRK_SP7_MASK (0x4U)
  2885. #define AIPS_PACRK_SP7_SHIFT (2U)
  2886. /*! SP7 - Supervisor Protect
  2887. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2888. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2889. */
  2890. #define AIPS_PACRK_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP7_SHIFT)) & AIPS_PACRK_SP7_MASK)
  2891. #define AIPS_PACRK_TP6_MASK (0x10U)
  2892. #define AIPS_PACRK_TP6_SHIFT (4U)
  2893. /*! TP6 - Trusted Protect
  2894. * 0b0..Accesses from an untrusted master are allowed.
  2895. * 0b1..Accesses from an untrusted master are not allowed.
  2896. */
  2897. #define AIPS_PACRK_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP6_SHIFT)) & AIPS_PACRK_TP6_MASK)
  2898. #define AIPS_PACRK_WP6_MASK (0x20U)
  2899. #define AIPS_PACRK_WP6_SHIFT (5U)
  2900. /*! WP6 - Write Protect
  2901. * 0b0..This peripheral allows write accesses.
  2902. * 0b1..This peripheral is write protected.
  2903. */
  2904. #define AIPS_PACRK_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP6_SHIFT)) & AIPS_PACRK_WP6_MASK)
  2905. #define AIPS_PACRK_SP6_MASK (0x40U)
  2906. #define AIPS_PACRK_SP6_SHIFT (6U)
  2907. /*! SP6 - Supervisor Protect
  2908. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2909. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2910. */
  2911. #define AIPS_PACRK_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP6_SHIFT)) & AIPS_PACRK_SP6_MASK)
  2912. #define AIPS_PACRK_TP5_MASK (0x100U)
  2913. #define AIPS_PACRK_TP5_SHIFT (8U)
  2914. /*! TP5 - Trusted Protect
  2915. * 0b0..Accesses from an untrusted master are allowed.
  2916. * 0b1..Accesses from an untrusted master are not allowed.
  2917. */
  2918. #define AIPS_PACRK_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP5_SHIFT)) & AIPS_PACRK_TP5_MASK)
  2919. #define AIPS_PACRK_WP5_MASK (0x200U)
  2920. #define AIPS_PACRK_WP5_SHIFT (9U)
  2921. /*! WP5 - Write Protect
  2922. * 0b0..This peripheral allows write accesses.
  2923. * 0b1..This peripheral is write protected.
  2924. */
  2925. #define AIPS_PACRK_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP5_SHIFT)) & AIPS_PACRK_WP5_MASK)
  2926. #define AIPS_PACRK_SP5_MASK (0x400U)
  2927. #define AIPS_PACRK_SP5_SHIFT (10U)
  2928. /*! SP5 - Supervisor Protect
  2929. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2930. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2931. */
  2932. #define AIPS_PACRK_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP5_SHIFT)) & AIPS_PACRK_SP5_MASK)
  2933. #define AIPS_PACRK_TP4_MASK (0x1000U)
  2934. #define AIPS_PACRK_TP4_SHIFT (12U)
  2935. /*! TP4 - Trusted Protect
  2936. * 0b0..Accesses from an untrusted master are allowed.
  2937. * 0b1..Accesses from an untrusted master are not allowed.
  2938. */
  2939. #define AIPS_PACRK_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP4_SHIFT)) & AIPS_PACRK_TP4_MASK)
  2940. #define AIPS_PACRK_WP4_MASK (0x2000U)
  2941. #define AIPS_PACRK_WP4_SHIFT (13U)
  2942. /*! WP4 - Write Protect
  2943. * 0b0..This peripheral allows write accesses.
  2944. * 0b1..This peripheral is write protected.
  2945. */
  2946. #define AIPS_PACRK_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP4_SHIFT)) & AIPS_PACRK_WP4_MASK)
  2947. #define AIPS_PACRK_SP4_MASK (0x4000U)
  2948. #define AIPS_PACRK_SP4_SHIFT (14U)
  2949. /*! SP4 - Supervisor Protect
  2950. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2951. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2952. */
  2953. #define AIPS_PACRK_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP4_SHIFT)) & AIPS_PACRK_SP4_MASK)
  2954. #define AIPS_PACRK_TP3_MASK (0x10000U)
  2955. #define AIPS_PACRK_TP3_SHIFT (16U)
  2956. /*! TP3 - Trusted Protect
  2957. * 0b0..Accesses from an untrusted master are allowed.
  2958. * 0b1..Accesses from an untrusted master are not allowed.
  2959. */
  2960. #define AIPS_PACRK_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP3_SHIFT)) & AIPS_PACRK_TP3_MASK)
  2961. #define AIPS_PACRK_WP3_MASK (0x20000U)
  2962. #define AIPS_PACRK_WP3_SHIFT (17U)
  2963. /*! WP3 - Write Protect
  2964. * 0b0..This peripheral allows write accesses.
  2965. * 0b1..This peripheral is write protected.
  2966. */
  2967. #define AIPS_PACRK_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP3_SHIFT)) & AIPS_PACRK_WP3_MASK)
  2968. #define AIPS_PACRK_SP3_MASK (0x40000U)
  2969. #define AIPS_PACRK_SP3_SHIFT (18U)
  2970. /*! SP3 - Supervisor Protect
  2971. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2972. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2973. */
  2974. #define AIPS_PACRK_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP3_SHIFT)) & AIPS_PACRK_SP3_MASK)
  2975. #define AIPS_PACRK_TP2_MASK (0x100000U)
  2976. #define AIPS_PACRK_TP2_SHIFT (20U)
  2977. /*! TP2 - Trusted Protect
  2978. * 0b0..Accesses from an untrusted master are allowed.
  2979. * 0b1..Accesses from an untrusted master are not allowed.
  2980. */
  2981. #define AIPS_PACRK_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP2_SHIFT)) & AIPS_PACRK_TP2_MASK)
  2982. #define AIPS_PACRK_WP2_MASK (0x200000U)
  2983. #define AIPS_PACRK_WP2_SHIFT (21U)
  2984. /*! WP2 - Write Protect
  2985. * 0b0..This peripheral allows write accesses.
  2986. * 0b1..This peripheral is write protected.
  2987. */
  2988. #define AIPS_PACRK_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP2_SHIFT)) & AIPS_PACRK_WP2_MASK)
  2989. #define AIPS_PACRK_SP2_MASK (0x400000U)
  2990. #define AIPS_PACRK_SP2_SHIFT (22U)
  2991. /*! SP2 - Supervisor Protect
  2992. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  2993. * 0b1..This peripheral requires supervisor privilege level for accesses.
  2994. */
  2995. #define AIPS_PACRK_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP2_SHIFT)) & AIPS_PACRK_SP2_MASK)
  2996. #define AIPS_PACRK_TP1_MASK (0x1000000U)
  2997. #define AIPS_PACRK_TP1_SHIFT (24U)
  2998. /*! TP1 - Trusted Protect
  2999. * 0b0..Accesses from an untrusted master are allowed.
  3000. * 0b1..Accesses from an untrusted master are not allowed.
  3001. */
  3002. #define AIPS_PACRK_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP1_SHIFT)) & AIPS_PACRK_TP1_MASK)
  3003. #define AIPS_PACRK_WP1_MASK (0x2000000U)
  3004. #define AIPS_PACRK_WP1_SHIFT (25U)
  3005. /*! WP1 - Write Protect
  3006. * 0b0..This peripheral allows write accesses.
  3007. * 0b1..This peripheral is write protected.
  3008. */
  3009. #define AIPS_PACRK_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP1_SHIFT)) & AIPS_PACRK_WP1_MASK)
  3010. #define AIPS_PACRK_SP1_MASK (0x4000000U)
  3011. #define AIPS_PACRK_SP1_SHIFT (26U)
  3012. /*! SP1 - Supervisor Protect
  3013. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3014. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3015. */
  3016. #define AIPS_PACRK_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP1_SHIFT)) & AIPS_PACRK_SP1_MASK)
  3017. #define AIPS_PACRK_TP0_MASK (0x10000000U)
  3018. #define AIPS_PACRK_TP0_SHIFT (28U)
  3019. /*! TP0 - Trusted Protect
  3020. * 0b0..Accesses from an untrusted master are allowed.
  3021. * 0b1..Accesses from an untrusted master are not allowed.
  3022. */
  3023. #define AIPS_PACRK_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP0_SHIFT)) & AIPS_PACRK_TP0_MASK)
  3024. #define AIPS_PACRK_WP0_MASK (0x20000000U)
  3025. #define AIPS_PACRK_WP0_SHIFT (29U)
  3026. /*! WP0 - Write Protect
  3027. * 0b0..This peripheral allows write accesses.
  3028. * 0b1..This peripheral is write protected.
  3029. */
  3030. #define AIPS_PACRK_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP0_SHIFT)) & AIPS_PACRK_WP0_MASK)
  3031. #define AIPS_PACRK_SP0_MASK (0x40000000U)
  3032. #define AIPS_PACRK_SP0_SHIFT (30U)
  3033. /*! SP0 - Supervisor Protect
  3034. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3035. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3036. */
  3037. #define AIPS_PACRK_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP0_SHIFT)) & AIPS_PACRK_SP0_MASK)
  3038. /*! @} */
  3039. /*! @name PACRL - Peripheral Access Control Register */
  3040. /*! @{ */
  3041. #define AIPS_PACRL_TP7_MASK (0x1U)
  3042. #define AIPS_PACRL_TP7_SHIFT (0U)
  3043. /*! TP7 - Trusted Protect
  3044. * 0b0..Accesses from an untrusted master are allowed.
  3045. * 0b1..Accesses from an untrusted master are not allowed.
  3046. */
  3047. #define AIPS_PACRL_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP7_SHIFT)) & AIPS_PACRL_TP7_MASK)
  3048. #define AIPS_PACRL_WP7_MASK (0x2U)
  3049. #define AIPS_PACRL_WP7_SHIFT (1U)
  3050. /*! WP7 - Write Protect
  3051. * 0b0..This peripheral allows write accesses.
  3052. * 0b1..This peripheral is write protected.
  3053. */
  3054. #define AIPS_PACRL_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP7_SHIFT)) & AIPS_PACRL_WP7_MASK)
  3055. #define AIPS_PACRL_SP7_MASK (0x4U)
  3056. #define AIPS_PACRL_SP7_SHIFT (2U)
  3057. /*! SP7 - Supervisor Protect
  3058. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3059. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3060. */
  3061. #define AIPS_PACRL_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP7_SHIFT)) & AIPS_PACRL_SP7_MASK)
  3062. #define AIPS_PACRL_TP6_MASK (0x10U)
  3063. #define AIPS_PACRL_TP6_SHIFT (4U)
  3064. /*! TP6 - Trusted Protect
  3065. * 0b0..Accesses from an untrusted master are allowed.
  3066. * 0b1..Accesses from an untrusted master are not allowed.
  3067. */
  3068. #define AIPS_PACRL_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP6_SHIFT)) & AIPS_PACRL_TP6_MASK)
  3069. #define AIPS_PACRL_WP6_MASK (0x20U)
  3070. #define AIPS_PACRL_WP6_SHIFT (5U)
  3071. /*! WP6 - Write Protect
  3072. * 0b0..This peripheral allows write accesses.
  3073. * 0b1..This peripheral is write protected.
  3074. */
  3075. #define AIPS_PACRL_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP6_SHIFT)) & AIPS_PACRL_WP6_MASK)
  3076. #define AIPS_PACRL_SP6_MASK (0x40U)
  3077. #define AIPS_PACRL_SP6_SHIFT (6U)
  3078. /*! SP6 - Supervisor Protect
  3079. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3080. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3081. */
  3082. #define AIPS_PACRL_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP6_SHIFT)) & AIPS_PACRL_SP6_MASK)
  3083. #define AIPS_PACRL_TP5_MASK (0x100U)
  3084. #define AIPS_PACRL_TP5_SHIFT (8U)
  3085. /*! TP5 - Trusted Protect
  3086. * 0b0..Accesses from an untrusted master are allowed.
  3087. * 0b1..Accesses from an untrusted master are not allowed.
  3088. */
  3089. #define AIPS_PACRL_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP5_SHIFT)) & AIPS_PACRL_TP5_MASK)
  3090. #define AIPS_PACRL_WP5_MASK (0x200U)
  3091. #define AIPS_PACRL_WP5_SHIFT (9U)
  3092. /*! WP5 - Write Protect
  3093. * 0b0..This peripheral allows write accesses.
  3094. * 0b1..This peripheral is write protected.
  3095. */
  3096. #define AIPS_PACRL_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP5_SHIFT)) & AIPS_PACRL_WP5_MASK)
  3097. #define AIPS_PACRL_SP5_MASK (0x400U)
  3098. #define AIPS_PACRL_SP5_SHIFT (10U)
  3099. /*! SP5 - Supervisor Protect
  3100. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3101. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3102. */
  3103. #define AIPS_PACRL_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP5_SHIFT)) & AIPS_PACRL_SP5_MASK)
  3104. #define AIPS_PACRL_TP4_MASK (0x1000U)
  3105. #define AIPS_PACRL_TP4_SHIFT (12U)
  3106. /*! TP4 - Trusted Protect
  3107. * 0b0..Accesses from an untrusted master are allowed.
  3108. * 0b1..Accesses from an untrusted master are not allowed.
  3109. */
  3110. #define AIPS_PACRL_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP4_SHIFT)) & AIPS_PACRL_TP4_MASK)
  3111. #define AIPS_PACRL_WP4_MASK (0x2000U)
  3112. #define AIPS_PACRL_WP4_SHIFT (13U)
  3113. /*! WP4 - Write Protect
  3114. * 0b0..This peripheral allows write accesses.
  3115. * 0b1..This peripheral is write protected.
  3116. */
  3117. #define AIPS_PACRL_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP4_SHIFT)) & AIPS_PACRL_WP4_MASK)
  3118. #define AIPS_PACRL_SP4_MASK (0x4000U)
  3119. #define AIPS_PACRL_SP4_SHIFT (14U)
  3120. /*! SP4 - Supervisor Protect
  3121. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3122. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3123. */
  3124. #define AIPS_PACRL_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP4_SHIFT)) & AIPS_PACRL_SP4_MASK)
  3125. #define AIPS_PACRL_TP3_MASK (0x10000U)
  3126. #define AIPS_PACRL_TP3_SHIFT (16U)
  3127. /*! TP3 - Trusted Protect
  3128. * 0b0..Accesses from an untrusted master are allowed.
  3129. * 0b1..Accesses from an untrusted master are not allowed.
  3130. */
  3131. #define AIPS_PACRL_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP3_SHIFT)) & AIPS_PACRL_TP3_MASK)
  3132. #define AIPS_PACRL_WP3_MASK (0x20000U)
  3133. #define AIPS_PACRL_WP3_SHIFT (17U)
  3134. /*! WP3 - Write Protect
  3135. * 0b0..This peripheral allows write accesses.
  3136. * 0b1..This peripheral is write protected.
  3137. */
  3138. #define AIPS_PACRL_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP3_SHIFT)) & AIPS_PACRL_WP3_MASK)
  3139. #define AIPS_PACRL_SP3_MASK (0x40000U)
  3140. #define AIPS_PACRL_SP3_SHIFT (18U)
  3141. /*! SP3 - Supervisor Protect
  3142. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3143. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3144. */
  3145. #define AIPS_PACRL_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP3_SHIFT)) & AIPS_PACRL_SP3_MASK)
  3146. #define AIPS_PACRL_TP2_MASK (0x100000U)
  3147. #define AIPS_PACRL_TP2_SHIFT (20U)
  3148. /*! TP2 - Trusted Protect
  3149. * 0b0..Accesses from an untrusted master are allowed.
  3150. * 0b1..Accesses from an untrusted master are not allowed.
  3151. */
  3152. #define AIPS_PACRL_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP2_SHIFT)) & AIPS_PACRL_TP2_MASK)
  3153. #define AIPS_PACRL_WP2_MASK (0x200000U)
  3154. #define AIPS_PACRL_WP2_SHIFT (21U)
  3155. /*! WP2 - Write Protect
  3156. * 0b0..This peripheral allows write accesses.
  3157. * 0b1..This peripheral is write protected.
  3158. */
  3159. #define AIPS_PACRL_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP2_SHIFT)) & AIPS_PACRL_WP2_MASK)
  3160. #define AIPS_PACRL_SP2_MASK (0x400000U)
  3161. #define AIPS_PACRL_SP2_SHIFT (22U)
  3162. /*! SP2 - Supervisor Protect
  3163. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3164. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3165. */
  3166. #define AIPS_PACRL_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP2_SHIFT)) & AIPS_PACRL_SP2_MASK)
  3167. #define AIPS_PACRL_TP1_MASK (0x1000000U)
  3168. #define AIPS_PACRL_TP1_SHIFT (24U)
  3169. /*! TP1 - Trusted Protect
  3170. * 0b0..Accesses from an untrusted master are allowed.
  3171. * 0b1..Accesses from an untrusted master are not allowed.
  3172. */
  3173. #define AIPS_PACRL_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP1_SHIFT)) & AIPS_PACRL_TP1_MASK)
  3174. #define AIPS_PACRL_WP1_MASK (0x2000000U)
  3175. #define AIPS_PACRL_WP1_SHIFT (25U)
  3176. /*! WP1 - Write Protect
  3177. * 0b0..This peripheral allows write accesses.
  3178. * 0b1..This peripheral is write protected.
  3179. */
  3180. #define AIPS_PACRL_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP1_SHIFT)) & AIPS_PACRL_WP1_MASK)
  3181. #define AIPS_PACRL_SP1_MASK (0x4000000U)
  3182. #define AIPS_PACRL_SP1_SHIFT (26U)
  3183. /*! SP1 - Supervisor Protect
  3184. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3185. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3186. */
  3187. #define AIPS_PACRL_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP1_SHIFT)) & AIPS_PACRL_SP1_MASK)
  3188. #define AIPS_PACRL_TP0_MASK (0x10000000U)
  3189. #define AIPS_PACRL_TP0_SHIFT (28U)
  3190. /*! TP0 - Trusted Protect
  3191. * 0b0..Accesses from an untrusted master are allowed.
  3192. * 0b1..Accesses from an untrusted master are not allowed.
  3193. */
  3194. #define AIPS_PACRL_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP0_SHIFT)) & AIPS_PACRL_TP0_MASK)
  3195. #define AIPS_PACRL_WP0_MASK (0x20000000U)
  3196. #define AIPS_PACRL_WP0_SHIFT (29U)
  3197. /*! WP0 - Write Protect
  3198. * 0b0..This peripheral allows write accesses.
  3199. * 0b1..This peripheral is write protected.
  3200. */
  3201. #define AIPS_PACRL_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP0_SHIFT)) & AIPS_PACRL_WP0_MASK)
  3202. #define AIPS_PACRL_SP0_MASK (0x40000000U)
  3203. #define AIPS_PACRL_SP0_SHIFT (30U)
  3204. /*! SP0 - Supervisor Protect
  3205. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3206. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3207. */
  3208. #define AIPS_PACRL_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP0_SHIFT)) & AIPS_PACRL_SP0_MASK)
  3209. /*! @} */
  3210. /*! @name PACRM - Peripheral Access Control Register */
  3211. /*! @{ */
  3212. #define AIPS_PACRM_TP7_MASK (0x1U)
  3213. #define AIPS_PACRM_TP7_SHIFT (0U)
  3214. /*! TP7 - Trusted Protect
  3215. * 0b0..Accesses from an untrusted master are allowed.
  3216. * 0b1..Accesses from an untrusted master are not allowed.
  3217. */
  3218. #define AIPS_PACRM_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP7_SHIFT)) & AIPS_PACRM_TP7_MASK)
  3219. #define AIPS_PACRM_WP7_MASK (0x2U)
  3220. #define AIPS_PACRM_WP7_SHIFT (1U)
  3221. /*! WP7 - Write Protect
  3222. * 0b0..This peripheral allows write accesses.
  3223. * 0b1..This peripheral is write protected.
  3224. */
  3225. #define AIPS_PACRM_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP7_SHIFT)) & AIPS_PACRM_WP7_MASK)
  3226. #define AIPS_PACRM_SP7_MASK (0x4U)
  3227. #define AIPS_PACRM_SP7_SHIFT (2U)
  3228. /*! SP7 - Supervisor Protect
  3229. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3230. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3231. */
  3232. #define AIPS_PACRM_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP7_SHIFT)) & AIPS_PACRM_SP7_MASK)
  3233. #define AIPS_PACRM_TP6_MASK (0x10U)
  3234. #define AIPS_PACRM_TP6_SHIFT (4U)
  3235. /*! TP6 - Trusted Protect
  3236. * 0b0..Accesses from an untrusted master are allowed.
  3237. * 0b1..Accesses from an untrusted master are not allowed.
  3238. */
  3239. #define AIPS_PACRM_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP6_SHIFT)) & AIPS_PACRM_TP6_MASK)
  3240. #define AIPS_PACRM_WP6_MASK (0x20U)
  3241. #define AIPS_PACRM_WP6_SHIFT (5U)
  3242. /*! WP6 - Write Protect
  3243. * 0b0..This peripheral allows write accesses.
  3244. * 0b1..This peripheral is write protected.
  3245. */
  3246. #define AIPS_PACRM_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP6_SHIFT)) & AIPS_PACRM_WP6_MASK)
  3247. #define AIPS_PACRM_SP6_MASK (0x40U)
  3248. #define AIPS_PACRM_SP6_SHIFT (6U)
  3249. /*! SP6 - Supervisor Protect
  3250. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3251. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3252. */
  3253. #define AIPS_PACRM_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP6_SHIFT)) & AIPS_PACRM_SP6_MASK)
  3254. #define AIPS_PACRM_TP5_MASK (0x100U)
  3255. #define AIPS_PACRM_TP5_SHIFT (8U)
  3256. /*! TP5 - Trusted Protect
  3257. * 0b0..Accesses from an untrusted master are allowed.
  3258. * 0b1..Accesses from an untrusted master are not allowed.
  3259. */
  3260. #define AIPS_PACRM_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP5_SHIFT)) & AIPS_PACRM_TP5_MASK)
  3261. #define AIPS_PACRM_WP5_MASK (0x200U)
  3262. #define AIPS_PACRM_WP5_SHIFT (9U)
  3263. /*! WP5 - Write Protect
  3264. * 0b0..This peripheral allows write accesses.
  3265. * 0b1..This peripheral is write protected.
  3266. */
  3267. #define AIPS_PACRM_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP5_SHIFT)) & AIPS_PACRM_WP5_MASK)
  3268. #define AIPS_PACRM_SP5_MASK (0x400U)
  3269. #define AIPS_PACRM_SP5_SHIFT (10U)
  3270. /*! SP5 - Supervisor Protect
  3271. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3272. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3273. */
  3274. #define AIPS_PACRM_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP5_SHIFT)) & AIPS_PACRM_SP5_MASK)
  3275. #define AIPS_PACRM_TP4_MASK (0x1000U)
  3276. #define AIPS_PACRM_TP4_SHIFT (12U)
  3277. /*! TP4 - Trusted Protect
  3278. * 0b0..Accesses from an untrusted master are allowed.
  3279. * 0b1..Accesses from an untrusted master are not allowed.
  3280. */
  3281. #define AIPS_PACRM_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP4_SHIFT)) & AIPS_PACRM_TP4_MASK)
  3282. #define AIPS_PACRM_WP4_MASK (0x2000U)
  3283. #define AIPS_PACRM_WP4_SHIFT (13U)
  3284. /*! WP4 - Write Protect
  3285. * 0b0..This peripheral allows write accesses.
  3286. * 0b1..This peripheral is write protected.
  3287. */
  3288. #define AIPS_PACRM_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP4_SHIFT)) & AIPS_PACRM_WP4_MASK)
  3289. #define AIPS_PACRM_SP4_MASK (0x4000U)
  3290. #define AIPS_PACRM_SP4_SHIFT (14U)
  3291. /*! SP4 - Supervisor Protect
  3292. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3293. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3294. */
  3295. #define AIPS_PACRM_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP4_SHIFT)) & AIPS_PACRM_SP4_MASK)
  3296. #define AIPS_PACRM_TP3_MASK (0x10000U)
  3297. #define AIPS_PACRM_TP3_SHIFT (16U)
  3298. /*! TP3 - Trusted Protect
  3299. * 0b0..Accesses from an untrusted master are allowed.
  3300. * 0b1..Accesses from an untrusted master are not allowed.
  3301. */
  3302. #define AIPS_PACRM_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP3_SHIFT)) & AIPS_PACRM_TP3_MASK)
  3303. #define AIPS_PACRM_WP3_MASK (0x20000U)
  3304. #define AIPS_PACRM_WP3_SHIFT (17U)
  3305. /*! WP3 - Write Protect
  3306. * 0b0..This peripheral allows write accesses.
  3307. * 0b1..This peripheral is write protected.
  3308. */
  3309. #define AIPS_PACRM_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP3_SHIFT)) & AIPS_PACRM_WP3_MASK)
  3310. #define AIPS_PACRM_SP3_MASK (0x40000U)
  3311. #define AIPS_PACRM_SP3_SHIFT (18U)
  3312. /*! SP3 - Supervisor Protect
  3313. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3314. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3315. */
  3316. #define AIPS_PACRM_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP3_SHIFT)) & AIPS_PACRM_SP3_MASK)
  3317. #define AIPS_PACRM_TP2_MASK (0x100000U)
  3318. #define AIPS_PACRM_TP2_SHIFT (20U)
  3319. /*! TP2 - Trusted Protect
  3320. * 0b0..Accesses from an untrusted master are allowed.
  3321. * 0b1..Accesses from an untrusted master are not allowed.
  3322. */
  3323. #define AIPS_PACRM_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP2_SHIFT)) & AIPS_PACRM_TP2_MASK)
  3324. #define AIPS_PACRM_WP2_MASK (0x200000U)
  3325. #define AIPS_PACRM_WP2_SHIFT (21U)
  3326. /*! WP2 - Write Protect
  3327. * 0b0..This peripheral allows write accesses.
  3328. * 0b1..This peripheral is write protected.
  3329. */
  3330. #define AIPS_PACRM_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP2_SHIFT)) & AIPS_PACRM_WP2_MASK)
  3331. #define AIPS_PACRM_SP2_MASK (0x400000U)
  3332. #define AIPS_PACRM_SP2_SHIFT (22U)
  3333. /*! SP2 - Supervisor Protect
  3334. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3335. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3336. */
  3337. #define AIPS_PACRM_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP2_SHIFT)) & AIPS_PACRM_SP2_MASK)
  3338. #define AIPS_PACRM_TP1_MASK (0x1000000U)
  3339. #define AIPS_PACRM_TP1_SHIFT (24U)
  3340. /*! TP1 - Trusted Protect
  3341. * 0b0..Accesses from an untrusted master are allowed.
  3342. * 0b1..Accesses from an untrusted master are not allowed.
  3343. */
  3344. #define AIPS_PACRM_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP1_SHIFT)) & AIPS_PACRM_TP1_MASK)
  3345. #define AIPS_PACRM_WP1_MASK (0x2000000U)
  3346. #define AIPS_PACRM_WP1_SHIFT (25U)
  3347. /*! WP1 - Write Protect
  3348. * 0b0..This peripheral allows write accesses.
  3349. * 0b1..This peripheral is write protected.
  3350. */
  3351. #define AIPS_PACRM_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP1_SHIFT)) & AIPS_PACRM_WP1_MASK)
  3352. #define AIPS_PACRM_SP1_MASK (0x4000000U)
  3353. #define AIPS_PACRM_SP1_SHIFT (26U)
  3354. /*! SP1 - Supervisor Protect
  3355. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3356. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3357. */
  3358. #define AIPS_PACRM_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP1_SHIFT)) & AIPS_PACRM_SP1_MASK)
  3359. #define AIPS_PACRM_TP0_MASK (0x10000000U)
  3360. #define AIPS_PACRM_TP0_SHIFT (28U)
  3361. /*! TP0 - Trusted Protect
  3362. * 0b0..Accesses from an untrusted master are allowed.
  3363. * 0b1..Accesses from an untrusted master are not allowed.
  3364. */
  3365. #define AIPS_PACRM_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP0_SHIFT)) & AIPS_PACRM_TP0_MASK)
  3366. #define AIPS_PACRM_WP0_MASK (0x20000000U)
  3367. #define AIPS_PACRM_WP0_SHIFT (29U)
  3368. /*! WP0 - Write Protect
  3369. * 0b0..This peripheral allows write accesses.
  3370. * 0b1..This peripheral is write protected.
  3371. */
  3372. #define AIPS_PACRM_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP0_SHIFT)) & AIPS_PACRM_WP0_MASK)
  3373. #define AIPS_PACRM_SP0_MASK (0x40000000U)
  3374. #define AIPS_PACRM_SP0_SHIFT (30U)
  3375. /*! SP0 - Supervisor Protect
  3376. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3377. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3378. */
  3379. #define AIPS_PACRM_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP0_SHIFT)) & AIPS_PACRM_SP0_MASK)
  3380. /*! @} */
  3381. /*! @name PACRN - Peripheral Access Control Register */
  3382. /*! @{ */
  3383. #define AIPS_PACRN_TP7_MASK (0x1U)
  3384. #define AIPS_PACRN_TP7_SHIFT (0U)
  3385. /*! TP7 - Trusted Protect
  3386. * 0b0..Accesses from an untrusted master are allowed.
  3387. * 0b1..Accesses from an untrusted master are not allowed.
  3388. */
  3389. #define AIPS_PACRN_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP7_SHIFT)) & AIPS_PACRN_TP7_MASK)
  3390. #define AIPS_PACRN_WP7_MASK (0x2U)
  3391. #define AIPS_PACRN_WP7_SHIFT (1U)
  3392. /*! WP7 - Write Protect
  3393. * 0b0..This peripheral allows write accesses.
  3394. * 0b1..This peripheral is write protected.
  3395. */
  3396. #define AIPS_PACRN_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP7_SHIFT)) & AIPS_PACRN_WP7_MASK)
  3397. #define AIPS_PACRN_SP7_MASK (0x4U)
  3398. #define AIPS_PACRN_SP7_SHIFT (2U)
  3399. /*! SP7 - Supervisor Protect
  3400. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3401. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3402. */
  3403. #define AIPS_PACRN_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP7_SHIFT)) & AIPS_PACRN_SP7_MASK)
  3404. #define AIPS_PACRN_TP6_MASK (0x10U)
  3405. #define AIPS_PACRN_TP6_SHIFT (4U)
  3406. /*! TP6 - Trusted Protect
  3407. * 0b0..Accesses from an untrusted master are allowed.
  3408. * 0b1..Accesses from an untrusted master are not allowed.
  3409. */
  3410. #define AIPS_PACRN_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP6_SHIFT)) & AIPS_PACRN_TP6_MASK)
  3411. #define AIPS_PACRN_WP6_MASK (0x20U)
  3412. #define AIPS_PACRN_WP6_SHIFT (5U)
  3413. /*! WP6 - Write Protect
  3414. * 0b0..This peripheral allows write accesses.
  3415. * 0b1..This peripheral is write protected.
  3416. */
  3417. #define AIPS_PACRN_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP6_SHIFT)) & AIPS_PACRN_WP6_MASK)
  3418. #define AIPS_PACRN_SP6_MASK (0x40U)
  3419. #define AIPS_PACRN_SP6_SHIFT (6U)
  3420. /*! SP6 - Supervisor Protect
  3421. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3422. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3423. */
  3424. #define AIPS_PACRN_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP6_SHIFT)) & AIPS_PACRN_SP6_MASK)
  3425. #define AIPS_PACRN_TP5_MASK (0x100U)
  3426. #define AIPS_PACRN_TP5_SHIFT (8U)
  3427. /*! TP5 - Trusted Protect
  3428. * 0b0..Accesses from an untrusted master are allowed.
  3429. * 0b1..Accesses from an untrusted master are not allowed.
  3430. */
  3431. #define AIPS_PACRN_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP5_SHIFT)) & AIPS_PACRN_TP5_MASK)
  3432. #define AIPS_PACRN_WP5_MASK (0x200U)
  3433. #define AIPS_PACRN_WP5_SHIFT (9U)
  3434. /*! WP5 - Write Protect
  3435. * 0b0..This peripheral allows write accesses.
  3436. * 0b1..This peripheral is write protected.
  3437. */
  3438. #define AIPS_PACRN_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP5_SHIFT)) & AIPS_PACRN_WP5_MASK)
  3439. #define AIPS_PACRN_SP5_MASK (0x400U)
  3440. #define AIPS_PACRN_SP5_SHIFT (10U)
  3441. /*! SP5 - Supervisor Protect
  3442. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3443. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3444. */
  3445. #define AIPS_PACRN_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP5_SHIFT)) & AIPS_PACRN_SP5_MASK)
  3446. #define AIPS_PACRN_TP4_MASK (0x1000U)
  3447. #define AIPS_PACRN_TP4_SHIFT (12U)
  3448. /*! TP4 - Trusted Protect
  3449. * 0b0..Accesses from an untrusted master are allowed.
  3450. * 0b1..Accesses from an untrusted master are not allowed.
  3451. */
  3452. #define AIPS_PACRN_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP4_SHIFT)) & AIPS_PACRN_TP4_MASK)
  3453. #define AIPS_PACRN_WP4_MASK (0x2000U)
  3454. #define AIPS_PACRN_WP4_SHIFT (13U)
  3455. /*! WP4 - Write Protect
  3456. * 0b0..This peripheral allows write accesses.
  3457. * 0b1..This peripheral is write protected.
  3458. */
  3459. #define AIPS_PACRN_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP4_SHIFT)) & AIPS_PACRN_WP4_MASK)
  3460. #define AIPS_PACRN_SP4_MASK (0x4000U)
  3461. #define AIPS_PACRN_SP4_SHIFT (14U)
  3462. /*! SP4 - Supervisor Protect
  3463. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3464. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3465. */
  3466. #define AIPS_PACRN_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP4_SHIFT)) & AIPS_PACRN_SP4_MASK)
  3467. #define AIPS_PACRN_TP3_MASK (0x10000U)
  3468. #define AIPS_PACRN_TP3_SHIFT (16U)
  3469. /*! TP3 - Trusted Protect
  3470. * 0b0..Accesses from an untrusted master are allowed.
  3471. * 0b1..Accesses from an untrusted master are not allowed.
  3472. */
  3473. #define AIPS_PACRN_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP3_SHIFT)) & AIPS_PACRN_TP3_MASK)
  3474. #define AIPS_PACRN_WP3_MASK (0x20000U)
  3475. #define AIPS_PACRN_WP3_SHIFT (17U)
  3476. /*! WP3 - Write Protect
  3477. * 0b0..This peripheral allows write accesses.
  3478. * 0b1..This peripheral is write protected.
  3479. */
  3480. #define AIPS_PACRN_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP3_SHIFT)) & AIPS_PACRN_WP3_MASK)
  3481. #define AIPS_PACRN_SP3_MASK (0x40000U)
  3482. #define AIPS_PACRN_SP3_SHIFT (18U)
  3483. /*! SP3 - Supervisor Protect
  3484. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3485. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3486. */
  3487. #define AIPS_PACRN_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP3_SHIFT)) & AIPS_PACRN_SP3_MASK)
  3488. #define AIPS_PACRN_TP2_MASK (0x100000U)
  3489. #define AIPS_PACRN_TP2_SHIFT (20U)
  3490. /*! TP2 - Trusted Protect
  3491. * 0b0..Accesses from an untrusted master are allowed.
  3492. * 0b1..Accesses from an untrusted master are not allowed.
  3493. */
  3494. #define AIPS_PACRN_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP2_SHIFT)) & AIPS_PACRN_TP2_MASK)
  3495. #define AIPS_PACRN_WP2_MASK (0x200000U)
  3496. #define AIPS_PACRN_WP2_SHIFT (21U)
  3497. /*! WP2 - Write Protect
  3498. * 0b0..This peripheral allows write accesses.
  3499. * 0b1..This peripheral is write protected.
  3500. */
  3501. #define AIPS_PACRN_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP2_SHIFT)) & AIPS_PACRN_WP2_MASK)
  3502. #define AIPS_PACRN_SP2_MASK (0x400000U)
  3503. #define AIPS_PACRN_SP2_SHIFT (22U)
  3504. /*! SP2 - Supervisor Protect
  3505. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3506. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3507. */
  3508. #define AIPS_PACRN_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP2_SHIFT)) & AIPS_PACRN_SP2_MASK)
  3509. #define AIPS_PACRN_TP1_MASK (0x1000000U)
  3510. #define AIPS_PACRN_TP1_SHIFT (24U)
  3511. /*! TP1 - Trusted Protect
  3512. * 0b0..Accesses from an untrusted master are allowed.
  3513. * 0b1..Accesses from an untrusted master are not allowed.
  3514. */
  3515. #define AIPS_PACRN_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP1_SHIFT)) & AIPS_PACRN_TP1_MASK)
  3516. #define AIPS_PACRN_WP1_MASK (0x2000000U)
  3517. #define AIPS_PACRN_WP1_SHIFT (25U)
  3518. /*! WP1 - Write Protect
  3519. * 0b0..This peripheral allows write accesses.
  3520. * 0b1..This peripheral is write protected.
  3521. */
  3522. #define AIPS_PACRN_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP1_SHIFT)) & AIPS_PACRN_WP1_MASK)
  3523. #define AIPS_PACRN_SP1_MASK (0x4000000U)
  3524. #define AIPS_PACRN_SP1_SHIFT (26U)
  3525. /*! SP1 - Supervisor Protect
  3526. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3527. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3528. */
  3529. #define AIPS_PACRN_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP1_SHIFT)) & AIPS_PACRN_SP1_MASK)
  3530. #define AIPS_PACRN_TP0_MASK (0x10000000U)
  3531. #define AIPS_PACRN_TP0_SHIFT (28U)
  3532. /*! TP0 - Trusted Protect
  3533. * 0b0..Accesses from an untrusted master are allowed.
  3534. * 0b1..Accesses from an untrusted master are not allowed.
  3535. */
  3536. #define AIPS_PACRN_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP0_SHIFT)) & AIPS_PACRN_TP0_MASK)
  3537. #define AIPS_PACRN_WP0_MASK (0x20000000U)
  3538. #define AIPS_PACRN_WP0_SHIFT (29U)
  3539. /*! WP0 - Write Protect
  3540. * 0b0..This peripheral allows write accesses.
  3541. * 0b1..This peripheral is write protected.
  3542. */
  3543. #define AIPS_PACRN_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP0_SHIFT)) & AIPS_PACRN_WP0_MASK)
  3544. #define AIPS_PACRN_SP0_MASK (0x40000000U)
  3545. #define AIPS_PACRN_SP0_SHIFT (30U)
  3546. /*! SP0 - Supervisor Protect
  3547. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3548. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3549. */
  3550. #define AIPS_PACRN_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP0_SHIFT)) & AIPS_PACRN_SP0_MASK)
  3551. /*! @} */
  3552. /*! @name PACRO - Peripheral Access Control Register */
  3553. /*! @{ */
  3554. #define AIPS_PACRO_TP7_MASK (0x1U)
  3555. #define AIPS_PACRO_TP7_SHIFT (0U)
  3556. /*! TP7 - Trusted Protect
  3557. * 0b0..Accesses from an untrusted master are allowed.
  3558. * 0b1..Accesses from an untrusted master are not allowed.
  3559. */
  3560. #define AIPS_PACRO_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP7_SHIFT)) & AIPS_PACRO_TP7_MASK)
  3561. #define AIPS_PACRO_WP7_MASK (0x2U)
  3562. #define AIPS_PACRO_WP7_SHIFT (1U)
  3563. /*! WP7 - Write Protect
  3564. * 0b0..This peripheral allows write accesses.
  3565. * 0b1..This peripheral is write protected.
  3566. */
  3567. #define AIPS_PACRO_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP7_SHIFT)) & AIPS_PACRO_WP7_MASK)
  3568. #define AIPS_PACRO_SP7_MASK (0x4U)
  3569. #define AIPS_PACRO_SP7_SHIFT (2U)
  3570. /*! SP7 - Supervisor Protect
  3571. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3572. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3573. */
  3574. #define AIPS_PACRO_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP7_SHIFT)) & AIPS_PACRO_SP7_MASK)
  3575. #define AIPS_PACRO_TP6_MASK (0x10U)
  3576. #define AIPS_PACRO_TP6_SHIFT (4U)
  3577. /*! TP6 - Trusted Protect
  3578. * 0b0..Accesses from an untrusted master are allowed.
  3579. * 0b1..Accesses from an untrusted master are not allowed.
  3580. */
  3581. #define AIPS_PACRO_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP6_SHIFT)) & AIPS_PACRO_TP6_MASK)
  3582. #define AIPS_PACRO_WP6_MASK (0x20U)
  3583. #define AIPS_PACRO_WP6_SHIFT (5U)
  3584. /*! WP6 - Write Protect
  3585. * 0b0..This peripheral allows write accesses.
  3586. * 0b1..This peripheral is write protected.
  3587. */
  3588. #define AIPS_PACRO_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP6_SHIFT)) & AIPS_PACRO_WP6_MASK)
  3589. #define AIPS_PACRO_SP6_MASK (0x40U)
  3590. #define AIPS_PACRO_SP6_SHIFT (6U)
  3591. /*! SP6 - Supervisor Protect
  3592. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3593. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3594. */
  3595. #define AIPS_PACRO_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP6_SHIFT)) & AIPS_PACRO_SP6_MASK)
  3596. #define AIPS_PACRO_TP5_MASK (0x100U)
  3597. #define AIPS_PACRO_TP5_SHIFT (8U)
  3598. /*! TP5 - Trusted Protect
  3599. * 0b0..Accesses from an untrusted master are allowed.
  3600. * 0b1..Accesses from an untrusted master are not allowed.
  3601. */
  3602. #define AIPS_PACRO_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP5_SHIFT)) & AIPS_PACRO_TP5_MASK)
  3603. #define AIPS_PACRO_WP5_MASK (0x200U)
  3604. #define AIPS_PACRO_WP5_SHIFT (9U)
  3605. /*! WP5 - Write Protect
  3606. * 0b0..This peripheral allows write accesses.
  3607. * 0b1..This peripheral is write protected.
  3608. */
  3609. #define AIPS_PACRO_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP5_SHIFT)) & AIPS_PACRO_WP5_MASK)
  3610. #define AIPS_PACRO_SP5_MASK (0x400U)
  3611. #define AIPS_PACRO_SP5_SHIFT (10U)
  3612. /*! SP5 - Supervisor Protect
  3613. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3614. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3615. */
  3616. #define AIPS_PACRO_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP5_SHIFT)) & AIPS_PACRO_SP5_MASK)
  3617. #define AIPS_PACRO_TP4_MASK (0x1000U)
  3618. #define AIPS_PACRO_TP4_SHIFT (12U)
  3619. /*! TP4 - Trusted Protect
  3620. * 0b0..Accesses from an untrusted master are allowed.
  3621. * 0b1..Accesses from an untrusted master are not allowed.
  3622. */
  3623. #define AIPS_PACRO_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP4_SHIFT)) & AIPS_PACRO_TP4_MASK)
  3624. #define AIPS_PACRO_WP4_MASK (0x2000U)
  3625. #define AIPS_PACRO_WP4_SHIFT (13U)
  3626. /*! WP4 - Write Protect
  3627. * 0b0..This peripheral allows write accesses.
  3628. * 0b1..This peripheral is write protected.
  3629. */
  3630. #define AIPS_PACRO_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP4_SHIFT)) & AIPS_PACRO_WP4_MASK)
  3631. #define AIPS_PACRO_SP4_MASK (0x4000U)
  3632. #define AIPS_PACRO_SP4_SHIFT (14U)
  3633. /*! SP4 - Supervisor Protect
  3634. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3635. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3636. */
  3637. #define AIPS_PACRO_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP4_SHIFT)) & AIPS_PACRO_SP4_MASK)
  3638. #define AIPS_PACRO_TP3_MASK (0x10000U)
  3639. #define AIPS_PACRO_TP3_SHIFT (16U)
  3640. /*! TP3 - Trusted Protect
  3641. * 0b0..Accesses from an untrusted master are allowed.
  3642. * 0b1..Accesses from an untrusted master are not allowed.
  3643. */
  3644. #define AIPS_PACRO_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP3_SHIFT)) & AIPS_PACRO_TP3_MASK)
  3645. #define AIPS_PACRO_WP3_MASK (0x20000U)
  3646. #define AIPS_PACRO_WP3_SHIFT (17U)
  3647. /*! WP3 - Write Protect
  3648. * 0b0..This peripheral allows write accesses.
  3649. * 0b1..This peripheral is write protected.
  3650. */
  3651. #define AIPS_PACRO_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP3_SHIFT)) & AIPS_PACRO_WP3_MASK)
  3652. #define AIPS_PACRO_SP3_MASK (0x40000U)
  3653. #define AIPS_PACRO_SP3_SHIFT (18U)
  3654. /*! SP3 - Supervisor Protect
  3655. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3656. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3657. */
  3658. #define AIPS_PACRO_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP3_SHIFT)) & AIPS_PACRO_SP3_MASK)
  3659. #define AIPS_PACRO_TP2_MASK (0x100000U)
  3660. #define AIPS_PACRO_TP2_SHIFT (20U)
  3661. /*! TP2 - Trusted Protect
  3662. * 0b0..Accesses from an untrusted master are allowed.
  3663. * 0b1..Accesses from an untrusted master are not allowed.
  3664. */
  3665. #define AIPS_PACRO_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP2_SHIFT)) & AIPS_PACRO_TP2_MASK)
  3666. #define AIPS_PACRO_WP2_MASK (0x200000U)
  3667. #define AIPS_PACRO_WP2_SHIFT (21U)
  3668. /*! WP2 - Write Protect
  3669. * 0b0..This peripheral allows write accesses.
  3670. * 0b1..This peripheral is write protected.
  3671. */
  3672. #define AIPS_PACRO_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP2_SHIFT)) & AIPS_PACRO_WP2_MASK)
  3673. #define AIPS_PACRO_SP2_MASK (0x400000U)
  3674. #define AIPS_PACRO_SP2_SHIFT (22U)
  3675. /*! SP2 - Supervisor Protect
  3676. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3677. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3678. */
  3679. #define AIPS_PACRO_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP2_SHIFT)) & AIPS_PACRO_SP2_MASK)
  3680. #define AIPS_PACRO_TP1_MASK (0x1000000U)
  3681. #define AIPS_PACRO_TP1_SHIFT (24U)
  3682. /*! TP1 - Trusted Protect
  3683. * 0b0..Accesses from an untrusted master are allowed.
  3684. * 0b1..Accesses from an untrusted master are not allowed.
  3685. */
  3686. #define AIPS_PACRO_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP1_SHIFT)) & AIPS_PACRO_TP1_MASK)
  3687. #define AIPS_PACRO_WP1_MASK (0x2000000U)
  3688. #define AIPS_PACRO_WP1_SHIFT (25U)
  3689. /*! WP1 - Write Protect
  3690. * 0b0..This peripheral allows write accesses.
  3691. * 0b1..This peripheral is write protected.
  3692. */
  3693. #define AIPS_PACRO_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP1_SHIFT)) & AIPS_PACRO_WP1_MASK)
  3694. #define AIPS_PACRO_SP1_MASK (0x4000000U)
  3695. #define AIPS_PACRO_SP1_SHIFT (26U)
  3696. /*! SP1 - Supervisor Protect
  3697. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3698. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3699. */
  3700. #define AIPS_PACRO_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP1_SHIFT)) & AIPS_PACRO_SP1_MASK)
  3701. #define AIPS_PACRO_TP0_MASK (0x10000000U)
  3702. #define AIPS_PACRO_TP0_SHIFT (28U)
  3703. /*! TP0 - Trusted Protect
  3704. * 0b0..Accesses from an untrusted master are allowed.
  3705. * 0b1..Accesses from an untrusted master are not allowed.
  3706. */
  3707. #define AIPS_PACRO_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP0_SHIFT)) & AIPS_PACRO_TP0_MASK)
  3708. #define AIPS_PACRO_WP0_MASK (0x20000000U)
  3709. #define AIPS_PACRO_WP0_SHIFT (29U)
  3710. /*! WP0 - Write Protect
  3711. * 0b0..This peripheral allows write accesses.
  3712. * 0b1..This peripheral is write protected.
  3713. */
  3714. #define AIPS_PACRO_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP0_SHIFT)) & AIPS_PACRO_WP0_MASK)
  3715. #define AIPS_PACRO_SP0_MASK (0x40000000U)
  3716. #define AIPS_PACRO_SP0_SHIFT (30U)
  3717. /*! SP0 - Supervisor Protect
  3718. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3719. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3720. */
  3721. #define AIPS_PACRO_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP0_SHIFT)) & AIPS_PACRO_SP0_MASK)
  3722. /*! @} */
  3723. /*! @name PACRP - Peripheral Access Control Register */
  3724. /*! @{ */
  3725. #define AIPS_PACRP_TP7_MASK (0x1U)
  3726. #define AIPS_PACRP_TP7_SHIFT (0U)
  3727. /*! TP7 - Trusted Protect
  3728. * 0b0..Accesses from an untrusted master are allowed.
  3729. * 0b1..Accesses from an untrusted master are not allowed.
  3730. */
  3731. #define AIPS_PACRP_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP7_SHIFT)) & AIPS_PACRP_TP7_MASK)
  3732. #define AIPS_PACRP_WP7_MASK (0x2U)
  3733. #define AIPS_PACRP_WP7_SHIFT (1U)
  3734. /*! WP7 - Write Protect
  3735. * 0b0..This peripheral allows write accesses.
  3736. * 0b1..This peripheral is write protected.
  3737. */
  3738. #define AIPS_PACRP_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP7_SHIFT)) & AIPS_PACRP_WP7_MASK)
  3739. #define AIPS_PACRP_SP7_MASK (0x4U)
  3740. #define AIPS_PACRP_SP7_SHIFT (2U)
  3741. /*! SP7 - Supervisor Protect
  3742. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3743. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3744. */
  3745. #define AIPS_PACRP_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP7_SHIFT)) & AIPS_PACRP_SP7_MASK)
  3746. #define AIPS_PACRP_TP6_MASK (0x10U)
  3747. #define AIPS_PACRP_TP6_SHIFT (4U)
  3748. /*! TP6 - Trusted Protect
  3749. * 0b0..Accesses from an untrusted master are allowed.
  3750. * 0b1..Accesses from an untrusted master are not allowed.
  3751. */
  3752. #define AIPS_PACRP_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP6_SHIFT)) & AIPS_PACRP_TP6_MASK)
  3753. #define AIPS_PACRP_WP6_MASK (0x20U)
  3754. #define AIPS_PACRP_WP6_SHIFT (5U)
  3755. /*! WP6 - Write Protect
  3756. * 0b0..This peripheral allows write accesses.
  3757. * 0b1..This peripheral is write protected.
  3758. */
  3759. #define AIPS_PACRP_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP6_SHIFT)) & AIPS_PACRP_WP6_MASK)
  3760. #define AIPS_PACRP_SP6_MASK (0x40U)
  3761. #define AIPS_PACRP_SP6_SHIFT (6U)
  3762. /*! SP6 - Supervisor Protect
  3763. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3764. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3765. */
  3766. #define AIPS_PACRP_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP6_SHIFT)) & AIPS_PACRP_SP6_MASK)
  3767. #define AIPS_PACRP_TP5_MASK (0x100U)
  3768. #define AIPS_PACRP_TP5_SHIFT (8U)
  3769. /*! TP5 - Trusted Protect
  3770. * 0b0..Accesses from an untrusted master are allowed.
  3771. * 0b1..Accesses from an untrusted master are not allowed.
  3772. */
  3773. #define AIPS_PACRP_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP5_SHIFT)) & AIPS_PACRP_TP5_MASK)
  3774. #define AIPS_PACRP_WP5_MASK (0x200U)
  3775. #define AIPS_PACRP_WP5_SHIFT (9U)
  3776. /*! WP5 - Write Protect
  3777. * 0b0..This peripheral allows write accesses.
  3778. * 0b1..This peripheral is write protected.
  3779. */
  3780. #define AIPS_PACRP_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP5_SHIFT)) & AIPS_PACRP_WP5_MASK)
  3781. #define AIPS_PACRP_SP5_MASK (0x400U)
  3782. #define AIPS_PACRP_SP5_SHIFT (10U)
  3783. /*! SP5 - Supervisor Protect
  3784. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3785. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3786. */
  3787. #define AIPS_PACRP_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP5_SHIFT)) & AIPS_PACRP_SP5_MASK)
  3788. #define AIPS_PACRP_TP4_MASK (0x1000U)
  3789. #define AIPS_PACRP_TP4_SHIFT (12U)
  3790. /*! TP4 - Trusted Protect
  3791. * 0b0..Accesses from an untrusted master are allowed.
  3792. * 0b1..Accesses from an untrusted master are not allowed.
  3793. */
  3794. #define AIPS_PACRP_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP4_SHIFT)) & AIPS_PACRP_TP4_MASK)
  3795. #define AIPS_PACRP_WP4_MASK (0x2000U)
  3796. #define AIPS_PACRP_WP4_SHIFT (13U)
  3797. /*! WP4 - Write Protect
  3798. * 0b0..This peripheral allows write accesses.
  3799. * 0b1..This peripheral is write protected.
  3800. */
  3801. #define AIPS_PACRP_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP4_SHIFT)) & AIPS_PACRP_WP4_MASK)
  3802. #define AIPS_PACRP_SP4_MASK (0x4000U)
  3803. #define AIPS_PACRP_SP4_SHIFT (14U)
  3804. /*! SP4 - Supervisor Protect
  3805. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3806. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3807. */
  3808. #define AIPS_PACRP_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP4_SHIFT)) & AIPS_PACRP_SP4_MASK)
  3809. #define AIPS_PACRP_TP3_MASK (0x10000U)
  3810. #define AIPS_PACRP_TP3_SHIFT (16U)
  3811. /*! TP3 - Trusted Protect
  3812. * 0b0..Accesses from an untrusted master are allowed.
  3813. * 0b1..Accesses from an untrusted master are not allowed.
  3814. */
  3815. #define AIPS_PACRP_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP3_SHIFT)) & AIPS_PACRP_TP3_MASK)
  3816. #define AIPS_PACRP_WP3_MASK (0x20000U)
  3817. #define AIPS_PACRP_WP3_SHIFT (17U)
  3818. /*! WP3 - Write Protect
  3819. * 0b0..This peripheral allows write accesses.
  3820. * 0b1..This peripheral is write protected.
  3821. */
  3822. #define AIPS_PACRP_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP3_SHIFT)) & AIPS_PACRP_WP3_MASK)
  3823. #define AIPS_PACRP_SP3_MASK (0x40000U)
  3824. #define AIPS_PACRP_SP3_SHIFT (18U)
  3825. /*! SP3 - Supervisor Protect
  3826. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3827. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3828. */
  3829. #define AIPS_PACRP_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP3_SHIFT)) & AIPS_PACRP_SP3_MASK)
  3830. #define AIPS_PACRP_TP2_MASK (0x100000U)
  3831. #define AIPS_PACRP_TP2_SHIFT (20U)
  3832. /*! TP2 - Trusted Protect
  3833. * 0b0..Accesses from an untrusted master are allowed.
  3834. * 0b1..Accesses from an untrusted master are not allowed.
  3835. */
  3836. #define AIPS_PACRP_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP2_SHIFT)) & AIPS_PACRP_TP2_MASK)
  3837. #define AIPS_PACRP_WP2_MASK (0x200000U)
  3838. #define AIPS_PACRP_WP2_SHIFT (21U)
  3839. /*! WP2 - Write Protect
  3840. * 0b0..This peripheral allows write accesses.
  3841. * 0b1..This peripheral is write protected.
  3842. */
  3843. #define AIPS_PACRP_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP2_SHIFT)) & AIPS_PACRP_WP2_MASK)
  3844. #define AIPS_PACRP_SP2_MASK (0x400000U)
  3845. #define AIPS_PACRP_SP2_SHIFT (22U)
  3846. /*! SP2 - Supervisor Protect
  3847. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3848. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3849. */
  3850. #define AIPS_PACRP_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP2_SHIFT)) & AIPS_PACRP_SP2_MASK)
  3851. #define AIPS_PACRP_TP1_MASK (0x1000000U)
  3852. #define AIPS_PACRP_TP1_SHIFT (24U)
  3853. /*! TP1 - Trusted Protect
  3854. * 0b0..Accesses from an untrusted master are allowed.
  3855. * 0b1..Accesses from an untrusted master are not allowed.
  3856. */
  3857. #define AIPS_PACRP_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP1_SHIFT)) & AIPS_PACRP_TP1_MASK)
  3858. #define AIPS_PACRP_WP1_MASK (0x2000000U)
  3859. #define AIPS_PACRP_WP1_SHIFT (25U)
  3860. /*! WP1 - Write Protect
  3861. * 0b0..This peripheral allows write accesses.
  3862. * 0b1..This peripheral is write protected.
  3863. */
  3864. #define AIPS_PACRP_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP1_SHIFT)) & AIPS_PACRP_WP1_MASK)
  3865. #define AIPS_PACRP_SP1_MASK (0x4000000U)
  3866. #define AIPS_PACRP_SP1_SHIFT (26U)
  3867. /*! SP1 - Supervisor Protect
  3868. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3869. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3870. */
  3871. #define AIPS_PACRP_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP1_SHIFT)) & AIPS_PACRP_SP1_MASK)
  3872. #define AIPS_PACRP_TP0_MASK (0x10000000U)
  3873. #define AIPS_PACRP_TP0_SHIFT (28U)
  3874. /*! TP0 - Trusted Protect
  3875. * 0b0..Accesses from an untrusted master are allowed.
  3876. * 0b1..Accesses from an untrusted master are not allowed.
  3877. */
  3878. #define AIPS_PACRP_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP0_SHIFT)) & AIPS_PACRP_TP0_MASK)
  3879. #define AIPS_PACRP_WP0_MASK (0x20000000U)
  3880. #define AIPS_PACRP_WP0_SHIFT (29U)
  3881. /*! WP0 - Write Protect
  3882. * 0b0..This peripheral allows write accesses.
  3883. * 0b1..This peripheral is write protected.
  3884. */
  3885. #define AIPS_PACRP_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP0_SHIFT)) & AIPS_PACRP_WP0_MASK)
  3886. #define AIPS_PACRP_SP0_MASK (0x40000000U)
  3887. #define AIPS_PACRP_SP0_SHIFT (30U)
  3888. /*! SP0 - Supervisor Protect
  3889. * 0b0..This peripheral does not require supervisor privilege level for accesses.
  3890. * 0b1..This peripheral requires supervisor privilege level for accesses.
  3891. */
  3892. #define AIPS_PACRP_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP0_SHIFT)) & AIPS_PACRP_SP0_MASK)
  3893. /*! @} */
  3894. /*!
  3895. * @}
  3896. */ /* end of group AIPS_Register_Masks */
  3897. /* AIPS - Peripheral instance base addresses */
  3898. /** Peripheral AIPS0 base address */
  3899. #define AIPS0_BASE (0x40000000u)
  3900. /** Peripheral AIPS0 base pointer */
  3901. #define AIPS0 ((AIPS_Type *)AIPS0_BASE)
  3902. /** Peripheral AIPS1 base address */
  3903. #define AIPS1_BASE (0x40080000u)
  3904. /** Peripheral AIPS1 base pointer */
  3905. #define AIPS1 ((AIPS_Type *)AIPS1_BASE)
  3906. /** Array initializer of AIPS peripheral base addresses */
  3907. #define AIPS_BASE_ADDRS { AIPS0_BASE, AIPS1_BASE }
  3908. /** Array initializer of AIPS peripheral base pointers */
  3909. #define AIPS_BASE_PTRS { AIPS0, AIPS1 }
  3910. /*!
  3911. * @}
  3912. */ /* end of group AIPS_Peripheral_Access_Layer */
  3913. /* ----------------------------------------------------------------------------
  3914. -- AOI Peripheral Access Layer
  3915. ---------------------------------------------------------------------------- */
  3916. /*!
  3917. * @addtogroup AOI_Peripheral_Access_Layer AOI Peripheral Access Layer
  3918. * @{
  3919. */
  3920. /** AOI - Register Layout Typedef */
  3921. typedef struct {
  3922. struct { /* offset: 0x0, array step: 0x4 */
  3923. __IO uint16_t BFCRT01; /**< Boolean Function Term 0 and 1 Configuration Register for EVENTn, array offset: 0x0, array step: 0x4 */
  3924. __IO uint16_t BFCRT23; /**< Boolean Function Term 2 and 3 Configuration Register for EVENTn, array offset: 0x2, array step: 0x4 */
  3925. } BFCRT[4];
  3926. } AOI_Type;
  3927. /* ----------------------------------------------------------------------------
  3928. -- AOI Register Masks
  3929. ---------------------------------------------------------------------------- */
  3930. /*!
  3931. * @addtogroup AOI_Register_Masks AOI Register Masks
  3932. * @{
  3933. */
  3934. /*! @name BFCRT01 - Boolean Function Term 0 and 1 Configuration Register for EVENTn */
  3935. /*! @{ */
  3936. #define AOI_BFCRT01_PT1_DC_MASK (0x3U)
  3937. #define AOI_BFCRT01_PT1_DC_SHIFT (0U)
  3938. /*! PT1_DC - Product term 1, D input configuration
  3939. * 0b00..Force the D input in this product term to a logical zero
  3940. * 0b01..Pass the D input in this product term
  3941. * 0b10..Complement the D input in this product term
  3942. * 0b11..Force the D input in this product term to a logical one
  3943. */
  3944. #define AOI_BFCRT01_PT1_DC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT1_DC_SHIFT)) & AOI_BFCRT01_PT1_DC_MASK)
  3945. #define AOI_BFCRT01_PT1_CC_MASK (0xCU)
  3946. #define AOI_BFCRT01_PT1_CC_SHIFT (2U)
  3947. /*! PT1_CC - Product term 1, C input configuration
  3948. * 0b00..Force the C input in this product term to a logical zero
  3949. * 0b01..Pass the C input in this product term
  3950. * 0b10..Complement the C input in this product term
  3951. * 0b11..Force the C input in this product term to a logical one
  3952. */
  3953. #define AOI_BFCRT01_PT1_CC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT1_CC_SHIFT)) & AOI_BFCRT01_PT1_CC_MASK)
  3954. #define AOI_BFCRT01_PT1_BC_MASK (0x30U)
  3955. #define AOI_BFCRT01_PT1_BC_SHIFT (4U)
  3956. /*! PT1_BC - Product term 1, B input configuration
  3957. * 0b00..Force the B input in this product term to a logical zero
  3958. * 0b01..Pass the B input in this product term
  3959. * 0b10..Complement the B input in this product term
  3960. * 0b11..Force the B input in this product term to a logical one
  3961. */
  3962. #define AOI_BFCRT01_PT1_BC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT1_BC_SHIFT)) & AOI_BFCRT01_PT1_BC_MASK)
  3963. #define AOI_BFCRT01_PT1_AC_MASK (0xC0U)
  3964. #define AOI_BFCRT01_PT1_AC_SHIFT (6U)
  3965. /*! PT1_AC - Product term 1, A input configuration
  3966. * 0b00..Force the A input in this product term to a logical zero
  3967. * 0b01..Pass the A input in this product term
  3968. * 0b10..Complement the A input in this product term
  3969. * 0b11..Force the A input in this product term to a logical one
  3970. */
  3971. #define AOI_BFCRT01_PT1_AC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT1_AC_SHIFT)) & AOI_BFCRT01_PT1_AC_MASK)
  3972. #define AOI_BFCRT01_PT0_DC_MASK (0x300U)
  3973. #define AOI_BFCRT01_PT0_DC_SHIFT (8U)
  3974. /*! PT0_DC - Product term 0, D input configuration
  3975. * 0b00..Force the D input in this product term to a logical zero
  3976. * 0b01..Pass the D input in this product term
  3977. * 0b10..Complement the D input in this product term
  3978. * 0b11..Force the D input in this product term to a logical one
  3979. */
  3980. #define AOI_BFCRT01_PT0_DC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT0_DC_SHIFT)) & AOI_BFCRT01_PT0_DC_MASK)
  3981. #define AOI_BFCRT01_PT0_CC_MASK (0xC00U)
  3982. #define AOI_BFCRT01_PT0_CC_SHIFT (10U)
  3983. /*! PT0_CC - Product term 0, C input configuration
  3984. * 0b00..Force the C input in this product term to a logical zero
  3985. * 0b01..Pass the C input in this product term
  3986. * 0b10..Complement the C input in this product term
  3987. * 0b11..Force the C input in this product term to a logical one
  3988. */
  3989. #define AOI_BFCRT01_PT0_CC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT0_CC_SHIFT)) & AOI_BFCRT01_PT0_CC_MASK)
  3990. #define AOI_BFCRT01_PT0_BC_MASK (0x3000U)
  3991. #define AOI_BFCRT01_PT0_BC_SHIFT (12U)
  3992. /*! PT0_BC - Product term 0, B input configuration
  3993. * 0b00..Force the B input in this product term to a logical zero
  3994. * 0b01..Pass the B input in this product term
  3995. * 0b10..Complement the B input in this product term
  3996. * 0b11..Force the B input in this product term to a logical one
  3997. */
  3998. #define AOI_BFCRT01_PT0_BC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT0_BC_SHIFT)) & AOI_BFCRT01_PT0_BC_MASK)
  3999. #define AOI_BFCRT01_PT0_AC_MASK (0xC000U)
  4000. #define AOI_BFCRT01_PT0_AC_SHIFT (14U)
  4001. /*! PT0_AC - Product term 0, A input configuration
  4002. * 0b00..Force the A input in this product term to a logical zero
  4003. * 0b01..Pass the A input in this product term
  4004. * 0b10..Complement the A input in this product term
  4005. * 0b11..Force the A input in this product term to a logical one
  4006. */
  4007. #define AOI_BFCRT01_PT0_AC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT01_PT0_AC_SHIFT)) & AOI_BFCRT01_PT0_AC_MASK)
  4008. /*! @} */
  4009. /* The count of AOI_BFCRT01 */
  4010. #define AOI_BFCRT01_COUNT (4U)
  4011. /*! @name BFCRT23 - Boolean Function Term 2 and 3 Configuration Register for EVENTn */
  4012. /*! @{ */
  4013. #define AOI_BFCRT23_PT3_DC_MASK (0x3U)
  4014. #define AOI_BFCRT23_PT3_DC_SHIFT (0U)
  4015. /*! PT3_DC - Product term 3, D input configuration
  4016. * 0b00..Force the D input in this product term to a logical zero
  4017. * 0b01..Pass the D input in this product term
  4018. * 0b10..Complement the D input in this product term
  4019. * 0b11..Force the D input in this product term to a logical one
  4020. */
  4021. #define AOI_BFCRT23_PT3_DC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT3_DC_SHIFT)) & AOI_BFCRT23_PT3_DC_MASK)
  4022. #define AOI_BFCRT23_PT3_CC_MASK (0xCU)
  4023. #define AOI_BFCRT23_PT3_CC_SHIFT (2U)
  4024. /*! PT3_CC - Product term 3, C input configuration
  4025. * 0b00..Force the C input in this product term to a logical zero
  4026. * 0b01..Pass the C input in this product term
  4027. * 0b10..Complement the C input in this product term
  4028. * 0b11..Force the C input in this product term to a logical one
  4029. */
  4030. #define AOI_BFCRT23_PT3_CC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT3_CC_SHIFT)) & AOI_BFCRT23_PT3_CC_MASK)
  4031. #define AOI_BFCRT23_PT3_BC_MASK (0x30U)
  4032. #define AOI_BFCRT23_PT3_BC_SHIFT (4U)
  4033. /*! PT3_BC - Product term 3, B input configuration
  4034. * 0b00..Force the B input in this product term to a logical zero
  4035. * 0b01..Pass the B input in this product term
  4036. * 0b10..Complement the B input in this product term
  4037. * 0b11..Force the B input in this product term to a logical one
  4038. */
  4039. #define AOI_BFCRT23_PT3_BC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT3_BC_SHIFT)) & AOI_BFCRT23_PT3_BC_MASK)
  4040. #define AOI_BFCRT23_PT3_AC_MASK (0xC0U)
  4041. #define AOI_BFCRT23_PT3_AC_SHIFT (6U)
  4042. /*! PT3_AC - Product term 3, A input configuration
  4043. * 0b00..Force the A input in this product term to a logical zero
  4044. * 0b01..Pass the A input in this product term
  4045. * 0b10..Complement the A input in this product term
  4046. * 0b11..Force the A input in this product term to a logical one
  4047. */
  4048. #define AOI_BFCRT23_PT3_AC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT3_AC_SHIFT)) & AOI_BFCRT23_PT3_AC_MASK)
  4049. #define AOI_BFCRT23_PT2_DC_MASK (0x300U)
  4050. #define AOI_BFCRT23_PT2_DC_SHIFT (8U)
  4051. /*! PT2_DC - Product term 2, D input configuration
  4052. * 0b00..Force the D input in this product term to a logical zero
  4053. * 0b01..Pass the D input in this product term
  4054. * 0b10..Complement the D input in this product term
  4055. * 0b11..Force the D input in this product term to a logical one
  4056. */
  4057. #define AOI_BFCRT23_PT2_DC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT2_DC_SHIFT)) & AOI_BFCRT23_PT2_DC_MASK)
  4058. #define AOI_BFCRT23_PT2_CC_MASK (0xC00U)
  4059. #define AOI_BFCRT23_PT2_CC_SHIFT (10U)
  4060. /*! PT2_CC - Product term 2, C input configuration
  4061. * 0b00..Force the C input in this product term to a logical zero
  4062. * 0b01..Pass the C input in this product term
  4063. * 0b10..Complement the C input in this product term
  4064. * 0b11..Force the C input in this product term to a logical one
  4065. */
  4066. #define AOI_BFCRT23_PT2_CC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT2_CC_SHIFT)) & AOI_BFCRT23_PT2_CC_MASK)
  4067. #define AOI_BFCRT23_PT2_BC_MASK (0x3000U)
  4068. #define AOI_BFCRT23_PT2_BC_SHIFT (12U)
  4069. /*! PT2_BC - Product term 2, B input configuration
  4070. * 0b00..Force the B input in this product term to a logical zero
  4071. * 0b01..Pass the B input in this product term
  4072. * 0b10..Complement the B input in this product term
  4073. * 0b11..Force the B input in this product term to a logical one
  4074. */
  4075. #define AOI_BFCRT23_PT2_BC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT2_BC_SHIFT)) & AOI_BFCRT23_PT2_BC_MASK)
  4076. #define AOI_BFCRT23_PT2_AC_MASK (0xC000U)
  4077. #define AOI_BFCRT23_PT2_AC_SHIFT (14U)
  4078. /*! PT2_AC - Product term 2, A input configuration
  4079. * 0b00..Force the A input in this product term to a logical zero
  4080. * 0b01..Pass the A input in this product term
  4081. * 0b10..Complement the A input in this product term
  4082. * 0b11..Force the A input in this product term to a logical one
  4083. */
  4084. #define AOI_BFCRT23_PT2_AC(x) (((uint16_t)(((uint16_t)(x)) << AOI_BFCRT23_PT2_AC_SHIFT)) & AOI_BFCRT23_PT2_AC_MASK)
  4085. /*! @} */
  4086. /* The count of AOI_BFCRT23 */
  4087. #define AOI_BFCRT23_COUNT (4U)
  4088. /*!
  4089. * @}
  4090. */ /* end of group AOI_Register_Masks */
  4091. /* AOI - Peripheral instance base addresses */
  4092. /** Peripheral AOI0 base address */
  4093. #define AOI0_BASE (0x4005B000u)
  4094. /** Peripheral AOI0 base pointer */
  4095. #define AOI0 ((AOI_Type *)AOI0_BASE)
  4096. /** Array initializer of AOI peripheral base addresses */
  4097. #define AOI_BASE_ADDRS { AOI0_BASE }
  4098. /** Array initializer of AOI peripheral base pointers */
  4099. #define AOI_BASE_PTRS { AOI0 }
  4100. /*!
  4101. * @}
  4102. */ /* end of group AOI_Peripheral_Access_Layer */
  4103. /* ----------------------------------------------------------------------------
  4104. -- AXBS Peripheral Access Layer
  4105. ---------------------------------------------------------------------------- */
  4106. /*!
  4107. * @addtogroup AXBS_Peripheral_Access_Layer AXBS Peripheral Access Layer
  4108. * @{
  4109. */
  4110. /** AXBS - Register Layout Typedef */
  4111. typedef struct {
  4112. struct { /* offset: 0x0, array step: 0x100 */
  4113. __IO uint32_t PRS; /**< Priority Registers Slave, array offset: 0x0, array step: 0x100 */
  4114. uint8_t RESERVED_0[12];
  4115. __IO uint32_t CRS; /**< Control Register, array offset: 0x10, array step: 0x100 */
  4116. uint8_t RESERVED_1[236];
  4117. } SLAVE[7];
  4118. uint8_t RESERVED_0[256];
  4119. __IO uint32_t MGPCR0; /**< Master General Purpose Control Register, offset: 0x800 */
  4120. uint8_t RESERVED_1[252];
  4121. __IO uint32_t MGPCR1; /**< Master General Purpose Control Register, offset: 0x900 */
  4122. uint8_t RESERVED_2[252];
  4123. __IO uint32_t MGPCR2; /**< Master General Purpose Control Register, offset: 0xA00 */
  4124. uint8_t RESERVED_3[252];
  4125. __IO uint32_t MGPCR3; /**< Master General Purpose Control Register, offset: 0xB00 */
  4126. } AXBS_Type;
  4127. /* ----------------------------------------------------------------------------
  4128. -- AXBS Register Masks
  4129. ---------------------------------------------------------------------------- */
  4130. /*!
  4131. * @addtogroup AXBS_Register_Masks AXBS Register Masks
  4132. * @{
  4133. */
  4134. /*! @name PRS - Priority Registers Slave */
  4135. /*! @{ */
  4136. #define AXBS_PRS_M0_MASK (0x7U)
  4137. #define AXBS_PRS_M0_SHIFT (0U)
  4138. /*! M0 - Master 0 Priority. Sets the arbitration priority for this port on the associated slave port.
  4139. * 0b000..This master has level 1, or highest, priority when accessing the slave port.
  4140. * 0b001..This master has level 2 priority when accessing the slave port.
  4141. * 0b010..This master has level 3 priority when accessing the slave port.
  4142. * 0b011..This master has level 4 priority when accessing the slave port.
  4143. * 0b100..This master has level 5 priority when accessing the slave port.
  4144. * 0b101..This master has level 6 priority when accessing the slave port.
  4145. * 0b110..This master has level 7 priority when accessing the slave port.
  4146. * 0b111..This master has level 8, or lowest, priority when accessing the slave port.
  4147. */
  4148. #define AXBS_PRS_M0(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M0_SHIFT)) & AXBS_PRS_M0_MASK)
  4149. #define AXBS_PRS_M1_MASK (0x70U)
  4150. #define AXBS_PRS_M1_SHIFT (4U)
  4151. /*! M1 - Master 1 Priority. Sets the arbitration priority for this port on the associated slave port.
  4152. * 0b000..This master has level 1, or highest, priority when accessing the slave port.
  4153. * 0b001..This master has level 2 priority when accessing the slave port.
  4154. * 0b010..This master has level 3 priority when accessing the slave port.
  4155. * 0b011..This master has level 4 priority when accessing the slave port.
  4156. * 0b100..This master has level 5 priority when accessing the slave port.
  4157. * 0b101..This master has level 6 priority when accessing the slave port.
  4158. * 0b110..This master has level 7 priority when accessing the slave port.
  4159. * 0b111..This master has level 8, or lowest, priority when accessing the slave port.
  4160. */
  4161. #define AXBS_PRS_M1(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M1_SHIFT)) & AXBS_PRS_M1_MASK)
  4162. #define AXBS_PRS_M2_MASK (0x700U)
  4163. #define AXBS_PRS_M2_SHIFT (8U)
  4164. /*! M2 - Master 2 Priority. Sets the arbitration priority for this port on the associated slave port.
  4165. * 0b000..This master has level 1, or highest, priority when accessing the slave port.
  4166. * 0b001..This master has level 2 priority when accessing the slave port.
  4167. * 0b010..This master has level 3 priority when accessing the slave port.
  4168. * 0b011..This master has level 4 priority when accessing the slave port.
  4169. * 0b100..This master has level 5 priority when accessing the slave port.
  4170. * 0b101..This master has level 6 priority when accessing the slave port.
  4171. * 0b110..This master has level 7 priority when accessing the slave port.
  4172. * 0b111..This master has level 8, or lowest, priority when accessing the slave port.
  4173. */
  4174. #define AXBS_PRS_M2(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M2_SHIFT)) & AXBS_PRS_M2_MASK)
  4175. #define AXBS_PRS_M3_MASK (0x7000U)
  4176. #define AXBS_PRS_M3_SHIFT (12U)
  4177. /*! M3 - Master 3 Priority. Sets the arbitration priority for this port on the associated slave port.
  4178. * 0b000..This master has level 1, or highest, priority when accessing the slave port.
  4179. * 0b001..This master has level 2 priority when accessing the slave port.
  4180. * 0b010..This master has level 3 priority when accessing the slave port.
  4181. * 0b011..This master has level 4 priority when accessing the slave port.
  4182. * 0b100..This master has level 5 priority when accessing the slave port.
  4183. * 0b101..This master has level 6 priority when accessing the slave port.
  4184. * 0b110..This master has level 7 priority when accessing the slave port.
  4185. * 0b111..This master has level 8, or lowest, priority when accessing the slave port.
  4186. */
  4187. #define AXBS_PRS_M3(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M3_SHIFT)) & AXBS_PRS_M3_MASK)
  4188. /*! @} */
  4189. /* The count of AXBS_PRS */
  4190. #define AXBS_PRS_COUNT (7U)
  4191. /*! @name CRS - Control Register */
  4192. /*! @{ */
  4193. #define AXBS_CRS_PARK_MASK (0x7U)
  4194. #define AXBS_CRS_PARK_SHIFT (0U)
  4195. /*! PARK - Park
  4196. * 0b000..Park on master port M0
  4197. * 0b001..Park on master port M1
  4198. * 0b010..Park on master port M2
  4199. * 0b011..Park on master port M3
  4200. * 0b100..Park on master port M4
  4201. * 0b101..Park on master port M5
  4202. * 0b110..Park on master port M6
  4203. * 0b111..Park on master port M7
  4204. */
  4205. #define AXBS_CRS_PARK(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PARK_SHIFT)) & AXBS_CRS_PARK_MASK)
  4206. #define AXBS_CRS_PCTL_MASK (0x30U)
  4207. #define AXBS_CRS_PCTL_SHIFT (4U)
  4208. /*! PCTL - Parking Control
  4209. * 0b00..When no master makes a request, the arbiter parks the slave port on the master port defined by the PARK field
  4210. * 0b01..When no master makes a request, the arbiter parks the slave port on the last master to be in control of the slave port
  4211. * 0b10..When no master makes a request, the slave port is not parked on a master and the arbiter drives all outputs to a constant safe state
  4212. * 0b11..Reserved
  4213. */
  4214. #define AXBS_CRS_PCTL(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PCTL_SHIFT)) & AXBS_CRS_PCTL_MASK)
  4215. #define AXBS_CRS_ARB_MASK (0x300U)
  4216. #define AXBS_CRS_ARB_SHIFT (8U)
  4217. /*! ARB - Arbitration Mode
  4218. * 0b00..Fixed priority
  4219. * 0b01..Round-robin, or rotating, priority
  4220. * 0b10..Reserved
  4221. * 0b11..Reserved
  4222. */
  4223. #define AXBS_CRS_ARB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_ARB_SHIFT)) & AXBS_CRS_ARB_MASK)
  4224. #define AXBS_CRS_HLP_MASK (0x40000000U)
  4225. #define AXBS_CRS_HLP_SHIFT (30U)
  4226. /*! HLP - Halt Low Priority
  4227. * 0b0..The low power mode request has the highest priority for arbitration on this slave port
  4228. * 0b1..The low power mode request has the lowest initial priority for arbitration on this slave port
  4229. */
  4230. #define AXBS_CRS_HLP(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_HLP_SHIFT)) & AXBS_CRS_HLP_MASK)
  4231. #define AXBS_CRS_RO_MASK (0x80000000U)
  4232. #define AXBS_CRS_RO_SHIFT (31U)
  4233. /*! RO - Read Only
  4234. * 0b0..The slave port's registers are writeable
  4235. * 0b1..The slave port's registers are read-only and cannot be written. Attempted writes have no effect on the registers and result in a bus error response.
  4236. */
  4237. #define AXBS_CRS_RO(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_RO_SHIFT)) & AXBS_CRS_RO_MASK)
  4238. /*! @} */
  4239. /* The count of AXBS_CRS */
  4240. #define AXBS_CRS_COUNT (7U)
  4241. /*! @name MGPCR0 - Master General Purpose Control Register */
  4242. /*! @{ */
  4243. #define AXBS_MGPCR0_AULB_MASK (0x7U)
  4244. #define AXBS_MGPCR0_AULB_SHIFT (0U)
  4245. /*! AULB - Arbitrates On Undefined Length Bursts
  4246. * 0b000..No arbitration is allowed during an undefined length burst
  4247. * 0b001..Arbitration is allowed at any time during an undefined length burst
  4248. * 0b010..Arbitration is allowed after four beats of an undefined length burst
  4249. * 0b011..Arbitration is allowed after eight beats of an undefined length burst
  4250. * 0b100..Arbitration is allowed after 16 beats of an undefined length burst
  4251. * 0b101..Reserved
  4252. * 0b110..Reserved
  4253. * 0b111..Reserved
  4254. */
  4255. #define AXBS_MGPCR0_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR0_AULB_SHIFT)) & AXBS_MGPCR0_AULB_MASK)
  4256. /*! @} */
  4257. /*! @name MGPCR1 - Master General Purpose Control Register */
  4258. /*! @{ */
  4259. #define AXBS_MGPCR1_AULB_MASK (0x7U)
  4260. #define AXBS_MGPCR1_AULB_SHIFT (0U)
  4261. /*! AULB - Arbitrates On Undefined Length Bursts
  4262. * 0b000..No arbitration is allowed during an undefined length burst
  4263. * 0b001..Arbitration is allowed at any time during an undefined length burst
  4264. * 0b010..Arbitration is allowed after four beats of an undefined length burst
  4265. * 0b011..Arbitration is allowed after eight beats of an undefined length burst
  4266. * 0b100..Arbitration is allowed after 16 beats of an undefined length burst
  4267. * 0b101..Reserved
  4268. * 0b110..Reserved
  4269. * 0b111..Reserved
  4270. */
  4271. #define AXBS_MGPCR1_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR1_AULB_SHIFT)) & AXBS_MGPCR1_AULB_MASK)
  4272. /*! @} */
  4273. /*! @name MGPCR2 - Master General Purpose Control Register */
  4274. /*! @{ */
  4275. #define AXBS_MGPCR2_AULB_MASK (0x7U)
  4276. #define AXBS_MGPCR2_AULB_SHIFT (0U)
  4277. /*! AULB - Arbitrates On Undefined Length Bursts
  4278. * 0b000..No arbitration is allowed during an undefined length burst
  4279. * 0b001..Arbitration is allowed at any time during an undefined length burst
  4280. * 0b010..Arbitration is allowed after four beats of an undefined length burst
  4281. * 0b011..Arbitration is allowed after eight beats of an undefined length burst
  4282. * 0b100..Arbitration is allowed after 16 beats of an undefined length burst
  4283. * 0b101..Reserved
  4284. * 0b110..Reserved
  4285. * 0b111..Reserved
  4286. */
  4287. #define AXBS_MGPCR2_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR2_AULB_SHIFT)) & AXBS_MGPCR2_AULB_MASK)
  4288. /*! @} */
  4289. /*! @name MGPCR3 - Master General Purpose Control Register */
  4290. /*! @{ */
  4291. #define AXBS_MGPCR3_AULB_MASK (0x7U)
  4292. #define AXBS_MGPCR3_AULB_SHIFT (0U)
  4293. /*! AULB - Arbitrates On Undefined Length Bursts
  4294. * 0b000..No arbitration is allowed during an undefined length burst
  4295. * 0b001..Arbitration is allowed at any time during an undefined length burst
  4296. * 0b010..Arbitration is allowed after four beats of an undefined length burst
  4297. * 0b011..Arbitration is allowed after eight beats of an undefined length burst
  4298. * 0b100..Arbitration is allowed after 16 beats of an undefined length burst
  4299. * 0b101..Reserved
  4300. * 0b110..Reserved
  4301. * 0b111..Reserved
  4302. */
  4303. #define AXBS_MGPCR3_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR3_AULB_SHIFT)) & AXBS_MGPCR3_AULB_MASK)
  4304. /*! @} */
  4305. /*!
  4306. * @}
  4307. */ /* end of group AXBS_Register_Masks */
  4308. /* AXBS - Peripheral instance base addresses */
  4309. /** Peripheral AXBS base address */
  4310. #define AXBS_BASE (0x40004000u)
  4311. /** Peripheral AXBS base pointer */
  4312. #define AXBS ((AXBS_Type *)AXBS_BASE)
  4313. /** Array initializer of AXBS peripheral base addresses */
  4314. #define AXBS_BASE_ADDRS { AXBS_BASE }
  4315. /** Array initializer of AXBS peripheral base pointers */
  4316. #define AXBS_BASE_PTRS { AXBS }
  4317. /*!
  4318. * @}
  4319. */ /* end of group AXBS_Peripheral_Access_Layer */
  4320. /* ----------------------------------------------------------------------------
  4321. -- CAN Peripheral Access Layer
  4322. ---------------------------------------------------------------------------- */
  4323. /*!
  4324. * @addtogroup CAN_Peripheral_Access_Layer CAN Peripheral Access Layer
  4325. * @{
  4326. */
  4327. /** CAN - Register Layout Typedef */
  4328. typedef struct {
  4329. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  4330. __IO uint32_t CTRL1; /**< Control 1 register, offset: 0x4 */
  4331. __IO uint32_t TIMER; /**< Free Running Timer, offset: 0x8 */
  4332. uint8_t RESERVED_0[4];
  4333. __IO uint32_t RXMGMASK; /**< Rx Mailboxes Global Mask Register, offset: 0x10 */
  4334. __IO uint32_t RX14MASK; /**< Rx 14 Mask register, offset: 0x14 */
  4335. __IO uint32_t RX15MASK; /**< Rx 15 Mask register, offset: 0x18 */
  4336. __IO uint32_t ECR; /**< Error Counter, offset: 0x1C */
  4337. __IO uint32_t ESR1; /**< Error and Status 1 register, offset: 0x20 */
  4338. uint8_t RESERVED_1[4];
  4339. __IO uint32_t IMASK1; /**< Interrupt Masks 1 register, offset: 0x28 */
  4340. uint8_t RESERVED_2[4];
  4341. __IO uint32_t IFLAG1; /**< Interrupt Flags 1 register, offset: 0x30 */
  4342. __IO uint32_t CTRL2; /**< Control 2 register, offset: 0x34 */
  4343. __I uint32_t ESR2; /**< Error and Status 2 register, offset: 0x38 */
  4344. uint8_t RESERVED_3[8];
  4345. __I uint32_t CRCR; /**< CRC Register, offset: 0x44 */
  4346. __IO uint32_t RXFGMASK; /**< Rx FIFO Global Mask register, offset: 0x48 */
  4347. __I uint32_t RXFIR; /**< Rx FIFO Information Register, offset: 0x4C */
  4348. __IO uint32_t CBT; /**< CAN Bit Timing Register, offset: 0x50 */
  4349. uint8_t RESERVED_4[44];
  4350. struct { /* offset: 0x80, array step: 0x10 */
  4351. __IO uint32_t CS; /**< Message Buffer 0 CS Register..Message Buffer 15 CS Register, array offset: 0x80, array step: 0x10 */
  4352. __IO uint32_t ID; /**< Message Buffer 0 ID Register..Message Buffer 15 ID Register, array offset: 0x84, array step: 0x10 */
  4353. __IO uint32_t WORD0; /**< Message Buffer 0 WORD0 Register..Message Buffer 15 WORD0 Register, array offset: 0x88, array step: 0x10 */
  4354. __IO uint32_t WORD1; /**< Message Buffer 0 WORD1 Register..Message Buffer 15 WORD1 Register, array offset: 0x8C, array step: 0x10 */
  4355. } MB[16];
  4356. uint8_t RESERVED_5[1792];
  4357. __IO uint32_t RXIMR[16]; /**< Rx Individual Mask Registers, array offset: 0x880, array step: 0x4 */
  4358. } CAN_Type;
  4359. /* ----------------------------------------------------------------------------
  4360. -- CAN Register Masks
  4361. ---------------------------------------------------------------------------- */
  4362. /*!
  4363. * @addtogroup CAN_Register_Masks CAN Register Masks
  4364. * @{
  4365. */
  4366. /*! @name MCR - Module Configuration Register */
  4367. /*! @{ */
  4368. #define CAN_MCR_MAXMB_MASK (0x7FU)
  4369. #define CAN_MCR_MAXMB_SHIFT (0U)
  4370. #define CAN_MCR_MAXMB(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_MAXMB_SHIFT)) & CAN_MCR_MAXMB_MASK)
  4371. #define CAN_MCR_IDAM_MASK (0x300U)
  4372. #define CAN_MCR_IDAM_SHIFT (8U)
  4373. /*! IDAM - ID Acceptance Mode
  4374. * 0b00..Format A: One full ID (standard and extended) per ID Filter Table element.
  4375. * 0b01..Format B: Two full standard IDs or two partial 14-bit (standard and extended) IDs per ID Filter Table element.
  4376. * 0b10..Format C: Four partial 8-bit Standard IDs per ID Filter Table element.
  4377. * 0b11..Format D: All frames rejected.
  4378. */
  4379. #define CAN_MCR_IDAM(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_IDAM_SHIFT)) & CAN_MCR_IDAM_MASK)
  4380. #define CAN_MCR_AEN_MASK (0x1000U)
  4381. #define CAN_MCR_AEN_SHIFT (12U)
  4382. /*! AEN - Abort Enable
  4383. * 0b0..Abort disabled.
  4384. * 0b1..Abort enabled.
  4385. */
  4386. #define CAN_MCR_AEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_AEN_SHIFT)) & CAN_MCR_AEN_MASK)
  4387. #define CAN_MCR_LPRIOEN_MASK (0x2000U)
  4388. #define CAN_MCR_LPRIOEN_SHIFT (13U)
  4389. /*! LPRIOEN - Local Priority Enable
  4390. * 0b0..Local Priority disabled.
  4391. * 0b1..Local Priority enabled.
  4392. */
  4393. #define CAN_MCR_LPRIOEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_LPRIOEN_SHIFT)) & CAN_MCR_LPRIOEN_MASK)
  4394. #define CAN_MCR_DMA_MASK (0x8000U)
  4395. #define CAN_MCR_DMA_SHIFT (15U)
  4396. /*! DMA - DMA Enable
  4397. * 0b0..DMA feature for RX FIFO disabled.
  4398. * 0b1..DMA feature for RX FIFO enabled.
  4399. */
  4400. #define CAN_MCR_DMA(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_DMA_SHIFT)) & CAN_MCR_DMA_MASK)
  4401. #define CAN_MCR_IRMQ_MASK (0x10000U)
  4402. #define CAN_MCR_IRMQ_SHIFT (16U)
  4403. /*! IRMQ - Individual Rx Masking And Queue Enable
  4404. * 0b0..Individual Rx masking and queue feature are disabled. For backward compatibility with legacy applications, the reading of C/S word locks the MB even if it is EMPTY.
  4405. * 0b1..Individual Rx masking and queue feature are enabled.
  4406. */
  4407. #define CAN_MCR_IRMQ(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_IRMQ_SHIFT)) & CAN_MCR_IRMQ_MASK)
  4408. #define CAN_MCR_SRXDIS_MASK (0x20000U)
  4409. #define CAN_MCR_SRXDIS_SHIFT (17U)
  4410. /*! SRXDIS - Self Reception Disable
  4411. * 0b0..Self reception enabled.
  4412. * 0b1..Self reception disabled.
  4413. */
  4414. #define CAN_MCR_SRXDIS(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SRXDIS_SHIFT)) & CAN_MCR_SRXDIS_MASK)
  4415. #define CAN_MCR_DOZE_MASK (0x40000U)
  4416. #define CAN_MCR_DOZE_SHIFT (18U)
  4417. /*! DOZE - Doze Mode Enable
  4418. * 0b0..FlexCAN is not enabled to enter low-power mode when Doze mode is requested.
  4419. * 0b1..FlexCAN is enabled to enter low-power mode when Doze mode is requested.
  4420. */
  4421. #define CAN_MCR_DOZE(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_DOZE_SHIFT)) & CAN_MCR_DOZE_MASK)
  4422. #define CAN_MCR_WAKSRC_MASK (0x80000U)
  4423. #define CAN_MCR_WAKSRC_SHIFT (19U)
  4424. /*! WAKSRC - Wake Up Source
  4425. * 0b0..FlexCAN uses the unfiltered Rx input to detect recessive to dominant edges on the CAN bus.
  4426. * 0b1..FlexCAN uses the filtered Rx input to detect recessive to dominant edges on the CAN bus.
  4427. */
  4428. #define CAN_MCR_WAKSRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WAKSRC_SHIFT)) & CAN_MCR_WAKSRC_MASK)
  4429. #define CAN_MCR_LPMACK_MASK (0x100000U)
  4430. #define CAN_MCR_LPMACK_SHIFT (20U)
  4431. /*! LPMACK - Low-Power Mode Acknowledge
  4432. * 0b0..FlexCAN is not in a low-power mode.
  4433. * 0b1..FlexCAN is in a low-power mode.
  4434. */
  4435. #define CAN_MCR_LPMACK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_LPMACK_SHIFT)) & CAN_MCR_LPMACK_MASK)
  4436. #define CAN_MCR_WRNEN_MASK (0x200000U)
  4437. #define CAN_MCR_WRNEN_SHIFT (21U)
  4438. /*! WRNEN - Warning Interrupt Enable
  4439. * 0b0..TWRNINT and RWRNINT bits are zero, independent of the values in the error counters.
  4440. * 0b1..TWRNINT and RWRNINT bits are set when the respective error counter transitions from less than 96 to greater than or equal to 96.
  4441. */
  4442. #define CAN_MCR_WRNEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WRNEN_SHIFT)) & CAN_MCR_WRNEN_MASK)
  4443. #define CAN_MCR_SLFWAK_MASK (0x400000U)
  4444. #define CAN_MCR_SLFWAK_SHIFT (22U)
  4445. /*! SLFWAK - Self Wake Up
  4446. * 0b0..FlexCAN Self Wake Up feature is disabled.
  4447. * 0b1..FlexCAN Self Wake Up feature is enabled.
  4448. */
  4449. #define CAN_MCR_SLFWAK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SLFWAK_SHIFT)) & CAN_MCR_SLFWAK_MASK)
  4450. #define CAN_MCR_SUPV_MASK (0x800000U)
  4451. #define CAN_MCR_SUPV_SHIFT (23U)
  4452. /*! SUPV - Supervisor Mode
  4453. * 0b0..FlexCAN is in User mode. Affected registers allow both Supervisor and Unrestricted accesses.
  4454. * 0b1..FlexCAN is in Supervisor mode. Affected registers allow only Supervisor access. Unrestricted access behaves as though the access was done to an unimplemented register location.
  4455. */
  4456. #define CAN_MCR_SUPV(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SUPV_SHIFT)) & CAN_MCR_SUPV_MASK)
  4457. #define CAN_MCR_FRZACK_MASK (0x1000000U)
  4458. #define CAN_MCR_FRZACK_SHIFT (24U)
  4459. /*! FRZACK - Freeze Mode Acknowledge
  4460. * 0b0..FlexCAN not in Freeze mode, prescaler running.
  4461. * 0b1..FlexCAN in Freeze mode, prescaler stopped.
  4462. */
  4463. #define CAN_MCR_FRZACK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_FRZACK_SHIFT)) & CAN_MCR_FRZACK_MASK)
  4464. #define CAN_MCR_SOFTRST_MASK (0x2000000U)
  4465. #define CAN_MCR_SOFTRST_SHIFT (25U)
  4466. /*! SOFTRST - Soft Reset
  4467. * 0b0..No reset request.
  4468. * 0b1..Resets the registers affected by soft reset.
  4469. */
  4470. #define CAN_MCR_SOFTRST(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SOFTRST_SHIFT)) & CAN_MCR_SOFTRST_MASK)
  4471. #define CAN_MCR_WAKMSK_MASK (0x4000000U)
  4472. #define CAN_MCR_WAKMSK_SHIFT (26U)
  4473. /*! WAKMSK - Wake Up Interrupt Mask
  4474. * 0b0..Wake Up Interrupt is disabled.
  4475. * 0b1..Wake Up Interrupt is enabled.
  4476. */
  4477. #define CAN_MCR_WAKMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WAKMSK_SHIFT)) & CAN_MCR_WAKMSK_MASK)
  4478. #define CAN_MCR_NOTRDY_MASK (0x8000000U)
  4479. #define CAN_MCR_NOTRDY_SHIFT (27U)
  4480. /*! NOTRDY - FlexCAN Not Ready
  4481. * 0b0..FlexCAN module is either in Normal mode, Listen-Only mode or Loop-Back mode.
  4482. * 0b1..FlexCAN module is either in Disable mode, Doze mode , Stop mode or Freeze mode.
  4483. */
  4484. #define CAN_MCR_NOTRDY(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_NOTRDY_SHIFT)) & CAN_MCR_NOTRDY_MASK)
  4485. #define CAN_MCR_HALT_MASK (0x10000000U)
  4486. #define CAN_MCR_HALT_SHIFT (28U)
  4487. /*! HALT - Halt FlexCAN
  4488. * 0b0..No Freeze mode request.
  4489. * 0b1..Enters Freeze mode if the FRZ bit is asserted.
  4490. */
  4491. #define CAN_MCR_HALT(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_HALT_SHIFT)) & CAN_MCR_HALT_MASK)
  4492. #define CAN_MCR_RFEN_MASK (0x20000000U)
  4493. #define CAN_MCR_RFEN_SHIFT (29U)
  4494. /*! RFEN - Rx FIFO Enable
  4495. * 0b0..Rx FIFO not enabled.
  4496. * 0b1..Rx FIFO enabled.
  4497. */
  4498. #define CAN_MCR_RFEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_RFEN_SHIFT)) & CAN_MCR_RFEN_MASK)
  4499. #define CAN_MCR_FRZ_MASK (0x40000000U)
  4500. #define CAN_MCR_FRZ_SHIFT (30U)
  4501. /*! FRZ - Freeze Enable
  4502. * 0b0..Not enabled to enter Freeze mode.
  4503. * 0b1..Enabled to enter Freeze mode.
  4504. */
  4505. #define CAN_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_FRZ_SHIFT)) & CAN_MCR_FRZ_MASK)
  4506. #define CAN_MCR_MDIS_MASK (0x80000000U)
  4507. #define CAN_MCR_MDIS_SHIFT (31U)
  4508. /*! MDIS - Module Disable
  4509. * 0b0..Enable the FlexCAN module.
  4510. * 0b1..Disable the FlexCAN module.
  4511. */
  4512. #define CAN_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_MDIS_SHIFT)) & CAN_MCR_MDIS_MASK)
  4513. /*! @} */
  4514. /*! @name CTRL1 - Control 1 register */
  4515. /*! @{ */
  4516. #define CAN_CTRL1_PROPSEG_MASK (0x7U)
  4517. #define CAN_CTRL1_PROPSEG_SHIFT (0U)
  4518. #define CAN_CTRL1_PROPSEG(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PROPSEG_SHIFT)) & CAN_CTRL1_PROPSEG_MASK)
  4519. #define CAN_CTRL1_LOM_MASK (0x8U)
  4520. #define CAN_CTRL1_LOM_SHIFT (3U)
  4521. /*! LOM - Listen-Only Mode
  4522. * 0b0..Listen-Only mode is deactivated.
  4523. * 0b1..FlexCAN module operates in Listen-Only mode.
  4524. */
  4525. #define CAN_CTRL1_LOM(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LOM_SHIFT)) & CAN_CTRL1_LOM_MASK)
  4526. #define CAN_CTRL1_LBUF_MASK (0x10U)
  4527. #define CAN_CTRL1_LBUF_SHIFT (4U)
  4528. /*! LBUF - Lowest Buffer Transmitted First
  4529. * 0b0..Buffer with highest priority is transmitted first.
  4530. * 0b1..Lowest number buffer is transmitted first.
  4531. */
  4532. #define CAN_CTRL1_LBUF(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LBUF_SHIFT)) & CAN_CTRL1_LBUF_MASK)
  4533. #define CAN_CTRL1_TSYN_MASK (0x20U)
  4534. #define CAN_CTRL1_TSYN_SHIFT (5U)
  4535. /*! TSYN - Timer Sync
  4536. * 0b0..Timer Sync feature disabled
  4537. * 0b1..Timer Sync feature enabled
  4538. */
  4539. #define CAN_CTRL1_TSYN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_TSYN_SHIFT)) & CAN_CTRL1_TSYN_MASK)
  4540. #define CAN_CTRL1_BOFFREC_MASK (0x40U)
  4541. #define CAN_CTRL1_BOFFREC_SHIFT (6U)
  4542. /*! BOFFREC - Bus Off Recovery
  4543. * 0b0..Automatic recovering from Bus Off state enabled.
  4544. * 0b1..Automatic recovering from Bus Off state disabled.
  4545. */
  4546. #define CAN_CTRL1_BOFFREC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_BOFFREC_SHIFT)) & CAN_CTRL1_BOFFREC_MASK)
  4547. #define CAN_CTRL1_SMP_MASK (0x80U)
  4548. #define CAN_CTRL1_SMP_SHIFT (7U)
  4549. /*! SMP - CAN Bit Sampling
  4550. * 0b0..Just one sample is used to determine the bit value.
  4551. * 0b1..Three samples are used to determine the value of the received bit: the regular one (sample point) and 2 preceding samples; a majority rule is used.
  4552. */
  4553. #define CAN_CTRL1_SMP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_SMP_SHIFT)) & CAN_CTRL1_SMP_MASK)
  4554. #define CAN_CTRL1_RWRNMSK_MASK (0x400U)
  4555. #define CAN_CTRL1_RWRNMSK_SHIFT (10U)
  4556. /*! RWRNMSK - Rx Warning Interrupt Mask
  4557. * 0b0..Rx Warning Interrupt disabled.
  4558. * 0b1..Rx Warning Interrupt enabled.
  4559. */
  4560. #define CAN_CTRL1_RWRNMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_RWRNMSK_SHIFT)) & CAN_CTRL1_RWRNMSK_MASK)
  4561. #define CAN_CTRL1_TWRNMSK_MASK (0x800U)
  4562. #define CAN_CTRL1_TWRNMSK_SHIFT (11U)
  4563. /*! TWRNMSK - Tx Warning Interrupt Mask
  4564. * 0b0..Tx Warning Interrupt disabled.
  4565. * 0b1..Tx Warning Interrupt enabled.
  4566. */
  4567. #define CAN_CTRL1_TWRNMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_TWRNMSK_SHIFT)) & CAN_CTRL1_TWRNMSK_MASK)
  4568. #define CAN_CTRL1_LPB_MASK (0x1000U)
  4569. #define CAN_CTRL1_LPB_SHIFT (12U)
  4570. /*! LPB - Loop Back Mode
  4571. * 0b0..Loop Back disabled.
  4572. * 0b1..Loop Back enabled.
  4573. */
  4574. #define CAN_CTRL1_LPB(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LPB_SHIFT)) & CAN_CTRL1_LPB_MASK)
  4575. #define CAN_CTRL1_CLKSRC_MASK (0x2000U)
  4576. #define CAN_CTRL1_CLKSRC_SHIFT (13U)
  4577. /*! CLKSRC - CAN Engine Clock Source
  4578. * 0b0..The CAN engine clock source is the oscillator clock. Under this condition, the oscillator clock frequency must be lower than the bus clock.
  4579. * 0b1..The CAN engine clock source is the peripheral clock.
  4580. */
  4581. #define CAN_CTRL1_CLKSRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_CLKSRC_SHIFT)) & CAN_CTRL1_CLKSRC_MASK)
  4582. #define CAN_CTRL1_ERRMSK_MASK (0x4000U)
  4583. #define CAN_CTRL1_ERRMSK_SHIFT (14U)
  4584. /*! ERRMSK - Error Interrupt Mask
  4585. * 0b0..Error interrupt disabled.
  4586. * 0b1..Error interrupt enabled.
  4587. */
  4588. #define CAN_CTRL1_ERRMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_ERRMSK_SHIFT)) & CAN_CTRL1_ERRMSK_MASK)
  4589. #define CAN_CTRL1_BOFFMSK_MASK (0x8000U)
  4590. #define CAN_CTRL1_BOFFMSK_SHIFT (15U)
  4591. /*! BOFFMSK - Bus Off Interrupt Mask
  4592. * 0b0..Bus Off interrupt disabled.
  4593. * 0b1..Bus Off interrupt enabled.
  4594. */
  4595. #define CAN_CTRL1_BOFFMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_BOFFMSK_SHIFT)) & CAN_CTRL1_BOFFMSK_MASK)
  4596. #define CAN_CTRL1_PSEG2_MASK (0x70000U)
  4597. #define CAN_CTRL1_PSEG2_SHIFT (16U)
  4598. #define CAN_CTRL1_PSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PSEG2_SHIFT)) & CAN_CTRL1_PSEG2_MASK)
  4599. #define CAN_CTRL1_PSEG1_MASK (0x380000U)
  4600. #define CAN_CTRL1_PSEG1_SHIFT (19U)
  4601. #define CAN_CTRL1_PSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PSEG1_SHIFT)) & CAN_CTRL1_PSEG1_MASK)
  4602. #define CAN_CTRL1_RJW_MASK (0xC00000U)
  4603. #define CAN_CTRL1_RJW_SHIFT (22U)
  4604. #define CAN_CTRL1_RJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_RJW_SHIFT)) & CAN_CTRL1_RJW_MASK)
  4605. #define CAN_CTRL1_PRESDIV_MASK (0xFF000000U)
  4606. #define CAN_CTRL1_PRESDIV_SHIFT (24U)
  4607. #define CAN_CTRL1_PRESDIV(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PRESDIV_SHIFT)) & CAN_CTRL1_PRESDIV_MASK)
  4608. /*! @} */
  4609. /*! @name TIMER - Free Running Timer */
  4610. /*! @{ */
  4611. #define CAN_TIMER_TIMER_MASK (0xFFFFU)
  4612. #define CAN_TIMER_TIMER_SHIFT (0U)
  4613. #define CAN_TIMER_TIMER(x) (((uint32_t)(((uint32_t)(x)) << CAN_TIMER_TIMER_SHIFT)) & CAN_TIMER_TIMER_MASK)
  4614. /*! @} */
  4615. /*! @name RXMGMASK - Rx Mailboxes Global Mask Register */
  4616. /*! @{ */
  4617. #define CAN_RXMGMASK_MG_MASK (0xFFFFFFFFU)
  4618. #define CAN_RXMGMASK_MG_SHIFT (0U)
  4619. /*! MG - Rx Mailboxes Global Mask Bits
  4620. * 0b00000000000000000000000000000000..The corresponding bit in the filter is "don't care."
  4621. * 0b00000000000000000000000000000001..The corresponding bit in the filter is checked.
  4622. */
  4623. #define CAN_RXMGMASK_MG(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXMGMASK_MG_SHIFT)) & CAN_RXMGMASK_MG_MASK)
  4624. /*! @} */
  4625. /*! @name RX14MASK - Rx 14 Mask register */
  4626. /*! @{ */
  4627. #define CAN_RX14MASK_RX14M_MASK (0xFFFFFFFFU)
  4628. #define CAN_RX14MASK_RX14M_SHIFT (0U)
  4629. /*! RX14M - Rx Buffer 14 Mask Bits
  4630. * 0b00000000000000000000000000000000..The corresponding bit in the filter is "don't care."
  4631. * 0b00000000000000000000000000000001..The corresponding bit in the filter is checked.
  4632. */
  4633. #define CAN_RX14MASK_RX14M(x) (((uint32_t)(((uint32_t)(x)) << CAN_RX14MASK_RX14M_SHIFT)) & CAN_RX14MASK_RX14M_MASK)
  4634. /*! @} */
  4635. /*! @name RX15MASK - Rx 15 Mask register */
  4636. /*! @{ */
  4637. #define CAN_RX15MASK_RX15M_MASK (0xFFFFFFFFU)
  4638. #define CAN_RX15MASK_RX15M_SHIFT (0U)
  4639. /*! RX15M - Rx Buffer 15 Mask Bits
  4640. * 0b00000000000000000000000000000000..The corresponding bit in the filter is "don't care."
  4641. * 0b00000000000000000000000000000001..The corresponding bit in the filter is checked.
  4642. */
  4643. #define CAN_RX15MASK_RX15M(x) (((uint32_t)(((uint32_t)(x)) << CAN_RX15MASK_RX15M_SHIFT)) & CAN_RX15MASK_RX15M_MASK)
  4644. /*! @} */
  4645. /*! @name ECR - Error Counter */
  4646. /*! @{ */
  4647. #define CAN_ECR_TXERRCNT_MASK (0xFFU)
  4648. #define CAN_ECR_TXERRCNT_SHIFT (0U)
  4649. #define CAN_ECR_TXERRCNT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_TXERRCNT_SHIFT)) & CAN_ECR_TXERRCNT_MASK)
  4650. #define CAN_ECR_RXERRCNT_MASK (0xFF00U)
  4651. #define CAN_ECR_RXERRCNT_SHIFT (8U)
  4652. #define CAN_ECR_RXERRCNT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_RXERRCNT_SHIFT)) & CAN_ECR_RXERRCNT_MASK)
  4653. /*! @} */
  4654. /*! @name ESR1 - Error and Status 1 register */
  4655. /*! @{ */
  4656. #define CAN_ESR1_WAKINT_MASK (0x1U)
  4657. #define CAN_ESR1_WAKINT_SHIFT (0U)
  4658. /*! WAKINT - Wake-Up Interrupt
  4659. * 0b0..No such occurrence.
  4660. * 0b1..Indicates a recessive to dominant transition was received on the CAN bus.
  4661. */
  4662. #define CAN_ESR1_WAKINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_WAKINT_SHIFT)) & CAN_ESR1_WAKINT_MASK)
  4663. #define CAN_ESR1_ERRINT_MASK (0x2U)
  4664. #define CAN_ESR1_ERRINT_SHIFT (1U)
  4665. /*! ERRINT - Error Interrupt
  4666. * 0b0..No such occurrence.
  4667. * 0b1..Indicates setting of any Error Bit in the Error and Status Register.
  4668. */
  4669. #define CAN_ESR1_ERRINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_ERRINT_SHIFT)) & CAN_ESR1_ERRINT_MASK)
  4670. #define CAN_ESR1_BOFFINT_MASK (0x4U)
  4671. #define CAN_ESR1_BOFFINT_SHIFT (2U)
  4672. /*! BOFFINT - Bus Off Interrupt
  4673. * 0b0..No such occurrence.
  4674. * 0b1..FlexCAN module entered Bus Off state.
  4675. */
  4676. #define CAN_ESR1_BOFFINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BOFFINT_SHIFT)) & CAN_ESR1_BOFFINT_MASK)
  4677. #define CAN_ESR1_RX_MASK (0x8U)
  4678. #define CAN_ESR1_RX_SHIFT (3U)
  4679. /*! RX - FlexCAN In Reception
  4680. * 0b0..FlexCAN is not receiving a message.
  4681. * 0b1..FlexCAN is receiving a message.
  4682. */
  4683. #define CAN_ESR1_RX(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RX_SHIFT)) & CAN_ESR1_RX_MASK)
  4684. #define CAN_ESR1_FLTCONF_MASK (0x30U)
  4685. #define CAN_ESR1_FLTCONF_SHIFT (4U)
  4686. /*! FLTCONF - Fault Confinement State
  4687. * 0b00..Error Active
  4688. * 0b01..Error Passive
  4689. * 0b1x..Bus Off
  4690. */
  4691. #define CAN_ESR1_FLTCONF(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_FLTCONF_SHIFT)) & CAN_ESR1_FLTCONF_MASK)
  4692. #define CAN_ESR1_TX_MASK (0x40U)
  4693. #define CAN_ESR1_TX_SHIFT (6U)
  4694. /*! TX - FlexCAN In Transmission
  4695. * 0b0..FlexCAN is not transmitting a message.
  4696. * 0b1..FlexCAN is transmitting a message.
  4697. */
  4698. #define CAN_ESR1_TX(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TX_SHIFT)) & CAN_ESR1_TX_MASK)
  4699. #define CAN_ESR1_IDLE_MASK (0x80U)
  4700. #define CAN_ESR1_IDLE_SHIFT (7U)
  4701. /*! IDLE
  4702. * 0b0..No such occurrence.
  4703. * 0b1..CAN bus is now IDLE.
  4704. */
  4705. #define CAN_ESR1_IDLE(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_IDLE_SHIFT)) & CAN_ESR1_IDLE_MASK)
  4706. #define CAN_ESR1_RXWRN_MASK (0x100U)
  4707. #define CAN_ESR1_RXWRN_SHIFT (8U)
  4708. /*! RXWRN - Rx Error Warning
  4709. * 0b0..No such occurrence.
  4710. * 0b1..RXERRCNT is greater than or equal to 96.
  4711. */
  4712. #define CAN_ESR1_RXWRN(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RXWRN_SHIFT)) & CAN_ESR1_RXWRN_MASK)
  4713. #define CAN_ESR1_TXWRN_MASK (0x200U)
  4714. #define CAN_ESR1_TXWRN_SHIFT (9U)
  4715. /*! TXWRN - TX Error Warning
  4716. * 0b0..No such occurrence.
  4717. * 0b1..TXERRCNT is greater than or equal to 96.
  4718. */
  4719. #define CAN_ESR1_TXWRN(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TXWRN_SHIFT)) & CAN_ESR1_TXWRN_MASK)
  4720. #define CAN_ESR1_STFERR_MASK (0x400U)
  4721. #define CAN_ESR1_STFERR_SHIFT (10U)
  4722. /*! STFERR - Stuffing Error
  4723. * 0b0..No such occurrence.
  4724. * 0b1..A Stuffing Error occurred since last read of this register.
  4725. */
  4726. #define CAN_ESR1_STFERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_STFERR_SHIFT)) & CAN_ESR1_STFERR_MASK)
  4727. #define CAN_ESR1_FRMERR_MASK (0x800U)
  4728. #define CAN_ESR1_FRMERR_SHIFT (11U)
  4729. /*! FRMERR - Form Error
  4730. * 0b0..No such occurrence.
  4731. * 0b1..A Form Error occurred since last read of this register.
  4732. */
  4733. #define CAN_ESR1_FRMERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_FRMERR_SHIFT)) & CAN_ESR1_FRMERR_MASK)
  4734. #define CAN_ESR1_CRCERR_MASK (0x1000U)
  4735. #define CAN_ESR1_CRCERR_SHIFT (12U)
  4736. /*! CRCERR - Cyclic Redundancy Check Error
  4737. * 0b0..No such occurrence.
  4738. * 0b1..A CRC error occurred since last read of this register.
  4739. */
  4740. #define CAN_ESR1_CRCERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_CRCERR_SHIFT)) & CAN_ESR1_CRCERR_MASK)
  4741. #define CAN_ESR1_ACKERR_MASK (0x2000U)
  4742. #define CAN_ESR1_ACKERR_SHIFT (13U)
  4743. /*! ACKERR - Acknowledge Error
  4744. * 0b0..No such occurrence.
  4745. * 0b1..An ACK error occurred since last read of this register.
  4746. */
  4747. #define CAN_ESR1_ACKERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_ACKERR_SHIFT)) & CAN_ESR1_ACKERR_MASK)
  4748. #define CAN_ESR1_BIT0ERR_MASK (0x4000U)
  4749. #define CAN_ESR1_BIT0ERR_SHIFT (14U)
  4750. /*! BIT0ERR - Bit0 Error
  4751. * 0b0..No such occurrence.
  4752. * 0b1..At least one bit sent as dominant is received as recessive.
  4753. */
  4754. #define CAN_ESR1_BIT0ERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BIT0ERR_SHIFT)) & CAN_ESR1_BIT0ERR_MASK)
  4755. #define CAN_ESR1_BIT1ERR_MASK (0x8000U)
  4756. #define CAN_ESR1_BIT1ERR_SHIFT (15U)
  4757. /*! BIT1ERR - Bit1 Error
  4758. * 0b0..No such occurrence.
  4759. * 0b1..At least one bit sent as recessive is received as dominant.
  4760. */
  4761. #define CAN_ESR1_BIT1ERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BIT1ERR_SHIFT)) & CAN_ESR1_BIT1ERR_MASK)
  4762. #define CAN_ESR1_RWRNINT_MASK (0x10000U)
  4763. #define CAN_ESR1_RWRNINT_SHIFT (16U)
  4764. /*! RWRNINT - Rx Warning Interrupt Flag
  4765. * 0b0..No such occurrence.
  4766. * 0b1..The Rx error counter transitioned from less than 96 to greater than or equal to 96.
  4767. */
  4768. #define CAN_ESR1_RWRNINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RWRNINT_SHIFT)) & CAN_ESR1_RWRNINT_MASK)
  4769. #define CAN_ESR1_TWRNINT_MASK (0x20000U)
  4770. #define CAN_ESR1_TWRNINT_SHIFT (17U)
  4771. /*! TWRNINT - Tx Warning Interrupt Flag
  4772. * 0b0..No such occurrence.
  4773. * 0b1..The Tx error counter transitioned from less than 96 to greater than or equal to 96.
  4774. */
  4775. #define CAN_ESR1_TWRNINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TWRNINT_SHIFT)) & CAN_ESR1_TWRNINT_MASK)
  4776. #define CAN_ESR1_SYNCH_MASK (0x40000U)
  4777. #define CAN_ESR1_SYNCH_SHIFT (18U)
  4778. /*! SYNCH - CAN Synchronization Status
  4779. * 0b0..FlexCAN is not synchronized to the CAN bus.
  4780. * 0b1..FlexCAN is synchronized to the CAN bus.
  4781. */
  4782. #define CAN_ESR1_SYNCH(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_SYNCH_SHIFT)) & CAN_ESR1_SYNCH_MASK)
  4783. #define CAN_ESR1_BOFFDONEINT_MASK (0x80000U)
  4784. #define CAN_ESR1_BOFFDONEINT_SHIFT (19U)
  4785. /*! BOFFDONEINT - Bus Off Done Interrupt
  4786. * 0b0..No such occurrence.
  4787. * 0b1..FlexCAN module has completed Bus Off process.
  4788. */
  4789. #define CAN_ESR1_BOFFDONEINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BOFFDONEINT_SHIFT)) & CAN_ESR1_BOFFDONEINT_MASK)
  4790. #define CAN_ESR1_ERROVR_MASK (0x200000U)
  4791. #define CAN_ESR1_ERROVR_SHIFT (21U)
  4792. /*! ERROVR - Error Overrun bit
  4793. * 0b0..Overrun has not occurred.
  4794. * 0b1..Overrun has occured.
  4795. */
  4796. #define CAN_ESR1_ERROVR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_ERROVR_SHIFT)) & CAN_ESR1_ERROVR_MASK)
  4797. /*! @} */
  4798. /*! @name IMASK1 - Interrupt Masks 1 register */
  4799. /*! @{ */
  4800. #define CAN_IMASK1_BUF31TO0M_MASK (0xFFFFFFFFU)
  4801. #define CAN_IMASK1_BUF31TO0M_SHIFT (0U)
  4802. /*! BUF31TO0M - Buffer MB i Mask
  4803. * 0b00000000000000000000000000000000..The corresponding buffer Interrupt is disabled.
  4804. * 0b00000000000000000000000000000001..The corresponding buffer Interrupt is enabled.
  4805. */
  4806. #define CAN_IMASK1_BUF31TO0M(x) (((uint32_t)(((uint32_t)(x)) << CAN_IMASK1_BUF31TO0M_SHIFT)) & CAN_IMASK1_BUF31TO0M_MASK)
  4807. /*! @} */
  4808. /*! @name IFLAG1 - Interrupt Flags 1 register */
  4809. /*! @{ */
  4810. #define CAN_IFLAG1_BUF0I_MASK (0x1U)
  4811. #define CAN_IFLAG1_BUF0I_SHIFT (0U)
  4812. /*! BUF0I - Buffer MB0 Interrupt Or Clear FIFO bit
  4813. * 0b0..The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR[RFEN]=0.
  4814. * 0b1..The corresponding buffer has successfully completed transmission or reception when MCR[RFEN]=0.
  4815. */
  4816. #define CAN_IFLAG1_BUF0I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF0I_SHIFT)) & CAN_IFLAG1_BUF0I_MASK)
  4817. #define CAN_IFLAG1_BUF4TO1I_MASK (0x1EU)
  4818. #define CAN_IFLAG1_BUF4TO1I_SHIFT (1U)
  4819. /*! BUF4TO1I - Buffer MB i Interrupt Or "reserved"
  4820. * 0b0000..The corresponding buffer has no occurrence of successfully completed transmission or reception when MCR[RFEN]=0.
  4821. * 0b0001..The corresponding buffer has successfully completed transmission or reception when MCR[RFEN]=0.
  4822. */
  4823. #define CAN_IFLAG1_BUF4TO1I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF4TO1I_SHIFT)) & CAN_IFLAG1_BUF4TO1I_MASK)
  4824. #define CAN_IFLAG1_BUF5I_MASK (0x20U)
  4825. #define CAN_IFLAG1_BUF5I_SHIFT (5U)
  4826. /*! BUF5I - Buffer MB5 Interrupt Or "Frames available in Rx FIFO"
  4827. * 0b0..No occurrence of MB5 completing transmission/reception when MCR[RFEN]=0, or of frame(s) available in the FIFO, when MCR[RFEN]=1
  4828. * 0b1..MB5 completed transmission/reception when MCR[RFEN]=0, or frame(s) available in the Rx FIFO when MCR[RFEN]=1. It generates a DMA request in case of MCR[RFEN] and MCR[DMA] are enabled.
  4829. */
  4830. #define CAN_IFLAG1_BUF5I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF5I_SHIFT)) & CAN_IFLAG1_BUF5I_MASK)
  4831. #define CAN_IFLAG1_BUF6I_MASK (0x40U)
  4832. #define CAN_IFLAG1_BUF6I_SHIFT (6U)
  4833. /*! BUF6I - Buffer MB6 Interrupt Or "Rx FIFO Warning"
  4834. * 0b0..No occurrence of MB6 completing transmission/reception when MCR[RFEN]=0, or of Rx FIFO almost full when MCR[RFEN]=1
  4835. * 0b1..MB6 completed transmission/reception when MCR[RFEN]=0, or Rx FIFO almost full when MCR[RFEN]=1
  4836. */
  4837. #define CAN_IFLAG1_BUF6I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF6I_SHIFT)) & CAN_IFLAG1_BUF6I_MASK)
  4838. #define CAN_IFLAG1_BUF7I_MASK (0x80U)
  4839. #define CAN_IFLAG1_BUF7I_SHIFT (7U)
  4840. /*! BUF7I - Buffer MB7 Interrupt Or "Rx FIFO Overflow"
  4841. * 0b0..No occurrence of MB7 completing transmission/reception when MCR[RFEN]=0, or of Rx FIFO overflow when MCR[RFEN]=1
  4842. * 0b1..MB7 completed transmission/reception when MCR[RFEN]=0, or Rx FIFO overflow when MCR[RFEN]=1
  4843. */
  4844. #define CAN_IFLAG1_BUF7I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF7I_SHIFT)) & CAN_IFLAG1_BUF7I_MASK)
  4845. #define CAN_IFLAG1_BUF31TO8I_MASK (0xFFFFFF00U)
  4846. #define CAN_IFLAG1_BUF31TO8I_SHIFT (8U)
  4847. /*! BUF31TO8I - Buffer MBi Interrupt
  4848. * 0b000000000000000000000000..The corresponding buffer has no occurrence of successfully completed transmission or reception.
  4849. * 0b000000000000000000000001..The corresponding buffer has successfully completed transmission or reception.
  4850. */
  4851. #define CAN_IFLAG1_BUF31TO8I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF31TO8I_SHIFT)) & CAN_IFLAG1_BUF31TO8I_MASK)
  4852. /*! @} */
  4853. /*! @name CTRL2 - Control 2 register */
  4854. /*! @{ */
  4855. #define CAN_CTRL2_EACEN_MASK (0x10000U)
  4856. #define CAN_CTRL2_EACEN_SHIFT (16U)
  4857. /*! EACEN - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes
  4858. * 0b0..Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits.
  4859. * 0b1..Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply.
  4860. */
  4861. #define CAN_CTRL2_EACEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_EACEN_SHIFT)) & CAN_CTRL2_EACEN_MASK)
  4862. #define CAN_CTRL2_RRS_MASK (0x20000U)
  4863. #define CAN_CTRL2_RRS_SHIFT (17U)
  4864. /*! RRS - Remote Request Storing
  4865. * 0b0..Remote Response Frame is generated.
  4866. * 0b1..Remote Request Frame is stored.
  4867. */
  4868. #define CAN_CTRL2_RRS(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_RRS_SHIFT)) & CAN_CTRL2_RRS_MASK)
  4869. #define CAN_CTRL2_MRP_MASK (0x40000U)
  4870. #define CAN_CTRL2_MRP_SHIFT (18U)
  4871. /*! MRP - Mailboxes Reception Priority
  4872. * 0b0..Matching starts from Rx FIFO and continues on Mailboxes.
  4873. * 0b1..Matching starts from Mailboxes and continues on Rx FIFO.
  4874. */
  4875. #define CAN_CTRL2_MRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_MRP_SHIFT)) & CAN_CTRL2_MRP_MASK)
  4876. #define CAN_CTRL2_TASD_MASK (0xF80000U)
  4877. #define CAN_CTRL2_TASD_SHIFT (19U)
  4878. #define CAN_CTRL2_TASD(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_TASD_SHIFT)) & CAN_CTRL2_TASD_MASK)
  4879. #define CAN_CTRL2_RFFN_MASK (0xF000000U)
  4880. #define CAN_CTRL2_RFFN_SHIFT (24U)
  4881. #define CAN_CTRL2_RFFN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_RFFN_SHIFT)) & CAN_CTRL2_RFFN_MASK)
  4882. #define CAN_CTRL2_BOFFDONEMSK_MASK (0x40000000U)
  4883. #define CAN_CTRL2_BOFFDONEMSK_SHIFT (30U)
  4884. /*! BOFFDONEMSK - Bus Off Done Interrupt Mask
  4885. * 0b0..Bus Off Done interrupt disabled.
  4886. * 0b1..Bus Off Done interrupt enabled.
  4887. */
  4888. #define CAN_CTRL2_BOFFDONEMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_BOFFDONEMSK_SHIFT)) & CAN_CTRL2_BOFFDONEMSK_MASK)
  4889. /*! @} */
  4890. /*! @name ESR2 - Error and Status 2 register */
  4891. /*! @{ */
  4892. #define CAN_ESR2_IMB_MASK (0x2000U)
  4893. #define CAN_ESR2_IMB_SHIFT (13U)
  4894. /*! IMB - Inactive Mailbox
  4895. * 0b0..If ESR2[VPS] is asserted, the ESR2[LPTM] is not an inactive Mailbox.
  4896. * 0b1..If ESR2[VPS] is asserted, there is at least one inactive Mailbox. LPTM content is the number of the first one.
  4897. */
  4898. #define CAN_ESR2_IMB(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_IMB_SHIFT)) & CAN_ESR2_IMB_MASK)
  4899. #define CAN_ESR2_VPS_MASK (0x4000U)
  4900. #define CAN_ESR2_VPS_SHIFT (14U)
  4901. /*! VPS - Valid Priority Status
  4902. * 0b0..Contents of IMB and LPTM are invalid.
  4903. * 0b1..Contents of IMB and LPTM are valid.
  4904. */
  4905. #define CAN_ESR2_VPS(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_VPS_SHIFT)) & CAN_ESR2_VPS_MASK)
  4906. #define CAN_ESR2_LPTM_MASK (0x7F0000U)
  4907. #define CAN_ESR2_LPTM_SHIFT (16U)
  4908. #define CAN_ESR2_LPTM(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_LPTM_SHIFT)) & CAN_ESR2_LPTM_MASK)
  4909. /*! @} */
  4910. /*! @name CRCR - CRC Register */
  4911. /*! @{ */
  4912. #define CAN_CRCR_TXCRC_MASK (0x7FFFU)
  4913. #define CAN_CRCR_TXCRC_SHIFT (0U)
  4914. #define CAN_CRCR_TXCRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CRCR_TXCRC_SHIFT)) & CAN_CRCR_TXCRC_MASK)
  4915. #define CAN_CRCR_MBCRC_MASK (0x7F0000U)
  4916. #define CAN_CRCR_MBCRC_SHIFT (16U)
  4917. #define CAN_CRCR_MBCRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CRCR_MBCRC_SHIFT)) & CAN_CRCR_MBCRC_MASK)
  4918. /*! @} */
  4919. /*! @name RXFGMASK - Rx FIFO Global Mask register */
  4920. /*! @{ */
  4921. #define CAN_RXFGMASK_FGM_MASK (0xFFFFFFFFU)
  4922. #define CAN_RXFGMASK_FGM_SHIFT (0U)
  4923. /*! FGM - Rx FIFO Global Mask Bits
  4924. * 0b00000000000000000000000000000000..The corresponding bit in the filter is "don't care."
  4925. * 0b00000000000000000000000000000001..The corresponding bit in the filter is checked.
  4926. */
  4927. #define CAN_RXFGMASK_FGM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXFGMASK_FGM_SHIFT)) & CAN_RXFGMASK_FGM_MASK)
  4928. /*! @} */
  4929. /*! @name RXFIR - Rx FIFO Information Register */
  4930. /*! @{ */
  4931. #define CAN_RXFIR_IDHIT_MASK (0x1FFU)
  4932. #define CAN_RXFIR_IDHIT_SHIFT (0U)
  4933. #define CAN_RXFIR_IDHIT(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXFIR_IDHIT_SHIFT)) & CAN_RXFIR_IDHIT_MASK)
  4934. /*! @} */
  4935. /*! @name CBT - CAN Bit Timing Register */
  4936. /*! @{ */
  4937. #define CAN_CBT_EPSEG2_MASK (0x1FU)
  4938. #define CAN_CBT_EPSEG2_SHIFT (0U)
  4939. #define CAN_CBT_EPSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_EPSEG2_SHIFT)) & CAN_CBT_EPSEG2_MASK)
  4940. #define CAN_CBT_EPSEG1_MASK (0x3E0U)
  4941. #define CAN_CBT_EPSEG1_SHIFT (5U)
  4942. #define CAN_CBT_EPSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_EPSEG1_SHIFT)) & CAN_CBT_EPSEG1_MASK)
  4943. #define CAN_CBT_EPROPSEG_MASK (0xFC00U)
  4944. #define CAN_CBT_EPROPSEG_SHIFT (10U)
  4945. #define CAN_CBT_EPROPSEG(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_EPROPSEG_SHIFT)) & CAN_CBT_EPROPSEG_MASK)
  4946. #define CAN_CBT_ERJW_MASK (0xF0000U)
  4947. #define CAN_CBT_ERJW_SHIFT (16U)
  4948. #define CAN_CBT_ERJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_ERJW_SHIFT)) & CAN_CBT_ERJW_MASK)
  4949. #define CAN_CBT_EPRESDIV_MASK (0x7FE00000U)
  4950. #define CAN_CBT_EPRESDIV_SHIFT (21U)
  4951. #define CAN_CBT_EPRESDIV(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_EPRESDIV_SHIFT)) & CAN_CBT_EPRESDIV_MASK)
  4952. #define CAN_CBT_BTF_MASK (0x80000000U)
  4953. #define CAN_CBT_BTF_SHIFT (31U)
  4954. /*! BTF - Bit Timing Format Enable
  4955. * 0b0..Extended bit time definitions disabled.
  4956. * 0b1..Extended bit time definitions enabled.
  4957. */
  4958. #define CAN_CBT_BTF(x) (((uint32_t)(((uint32_t)(x)) << CAN_CBT_BTF_SHIFT)) & CAN_CBT_BTF_MASK)
  4959. /*! @} */
  4960. /*! @name CS - Message Buffer 0 CS Register..Message Buffer 15 CS Register */
  4961. /*! @{ */
  4962. #define CAN_CS_TIME_STAMP_MASK (0xFFFFU)
  4963. #define CAN_CS_TIME_STAMP_SHIFT (0U)
  4964. #define CAN_CS_TIME_STAMP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_TIME_STAMP_SHIFT)) & CAN_CS_TIME_STAMP_MASK)
  4965. #define CAN_CS_DLC_MASK (0xF0000U)
  4966. #define CAN_CS_DLC_SHIFT (16U)
  4967. #define CAN_CS_DLC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_DLC_SHIFT)) & CAN_CS_DLC_MASK)
  4968. #define CAN_CS_RTR_MASK (0x100000U)
  4969. #define CAN_CS_RTR_SHIFT (20U)
  4970. #define CAN_CS_RTR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_RTR_SHIFT)) & CAN_CS_RTR_MASK)
  4971. #define CAN_CS_IDE_MASK (0x200000U)
  4972. #define CAN_CS_IDE_SHIFT (21U)
  4973. #define CAN_CS_IDE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_IDE_SHIFT)) & CAN_CS_IDE_MASK)
  4974. #define CAN_CS_SRR_MASK (0x400000U)
  4975. #define CAN_CS_SRR_SHIFT (22U)
  4976. #define CAN_CS_SRR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_SRR_SHIFT)) & CAN_CS_SRR_MASK)
  4977. #define CAN_CS_CODE_MASK (0xF000000U)
  4978. #define CAN_CS_CODE_SHIFT (24U)
  4979. #define CAN_CS_CODE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_CODE_SHIFT)) & CAN_CS_CODE_MASK)
  4980. #define CAN_CS_ESI_MASK (0x20000000U)
  4981. #define CAN_CS_ESI_SHIFT (29U)
  4982. #define CAN_CS_ESI(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_ESI_SHIFT)) & CAN_CS_ESI_MASK)
  4983. #define CAN_CS_BRS_MASK (0x40000000U)
  4984. #define CAN_CS_BRS_SHIFT (30U)
  4985. #define CAN_CS_BRS(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_BRS_SHIFT)) & CAN_CS_BRS_MASK)
  4986. #define CAN_CS_EDL_MASK (0x80000000U)
  4987. #define CAN_CS_EDL_SHIFT (31U)
  4988. #define CAN_CS_EDL(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_EDL_SHIFT)) & CAN_CS_EDL_MASK)
  4989. /*! @} */
  4990. /* The count of CAN_CS */
  4991. #define CAN_CS_COUNT (16U)
  4992. /*! @name ID - Message Buffer 0 ID Register..Message Buffer 15 ID Register */
  4993. /*! @{ */
  4994. #define CAN_ID_EXT_MASK (0x3FFFFU)
  4995. #define CAN_ID_EXT_SHIFT (0U)
  4996. #define CAN_ID_EXT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_EXT_SHIFT)) & CAN_ID_EXT_MASK)
  4997. #define CAN_ID_STD_MASK (0x1FFC0000U)
  4998. #define CAN_ID_STD_SHIFT (18U)
  4999. #define CAN_ID_STD(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_STD_SHIFT)) & CAN_ID_STD_MASK)
  5000. #define CAN_ID_PRIO_MASK (0xE0000000U)
  5001. #define CAN_ID_PRIO_SHIFT (29U)
  5002. #define CAN_ID_PRIO(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_PRIO_SHIFT)) & CAN_ID_PRIO_MASK)
  5003. /*! @} */
  5004. /* The count of CAN_ID */
  5005. #define CAN_ID_COUNT (16U)
  5006. /*! @name WORD0 - Message Buffer 0 WORD0 Register..Message Buffer 15 WORD0 Register */
  5007. /*! @{ */
  5008. #define CAN_WORD0_DATA_BYTE_3_MASK (0xFFU)
  5009. #define CAN_WORD0_DATA_BYTE_3_SHIFT (0U)
  5010. #define CAN_WORD0_DATA_BYTE_3(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_3_SHIFT)) & CAN_WORD0_DATA_BYTE_3_MASK)
  5011. #define CAN_WORD0_DATA_BYTE_2_MASK (0xFF00U)
  5012. #define CAN_WORD0_DATA_BYTE_2_SHIFT (8U)
  5013. #define CAN_WORD0_DATA_BYTE_2(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_2_SHIFT)) & CAN_WORD0_DATA_BYTE_2_MASK)
  5014. #define CAN_WORD0_DATA_BYTE_1_MASK (0xFF0000U)
  5015. #define CAN_WORD0_DATA_BYTE_1_SHIFT (16U)
  5016. #define CAN_WORD0_DATA_BYTE_1(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_1_SHIFT)) & CAN_WORD0_DATA_BYTE_1_MASK)
  5017. #define CAN_WORD0_DATA_BYTE_0_MASK (0xFF000000U)
  5018. #define CAN_WORD0_DATA_BYTE_0_SHIFT (24U)
  5019. #define CAN_WORD0_DATA_BYTE_0(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_0_SHIFT)) & CAN_WORD0_DATA_BYTE_0_MASK)
  5020. /*! @} */
  5021. /* The count of CAN_WORD0 */
  5022. #define CAN_WORD0_COUNT (16U)
  5023. /*! @name WORD1 - Message Buffer 0 WORD1 Register..Message Buffer 15 WORD1 Register */
  5024. /*! @{ */
  5025. #define CAN_WORD1_DATA_BYTE_7_MASK (0xFFU)
  5026. #define CAN_WORD1_DATA_BYTE_7_SHIFT (0U)
  5027. #define CAN_WORD1_DATA_BYTE_7(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_7_SHIFT)) & CAN_WORD1_DATA_BYTE_7_MASK)
  5028. #define CAN_WORD1_DATA_BYTE_6_MASK (0xFF00U)
  5029. #define CAN_WORD1_DATA_BYTE_6_SHIFT (8U)
  5030. #define CAN_WORD1_DATA_BYTE_6(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_6_SHIFT)) & CAN_WORD1_DATA_BYTE_6_MASK)
  5031. #define CAN_WORD1_DATA_BYTE_5_MASK (0xFF0000U)
  5032. #define CAN_WORD1_DATA_BYTE_5_SHIFT (16U)
  5033. #define CAN_WORD1_DATA_BYTE_5(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_5_SHIFT)) & CAN_WORD1_DATA_BYTE_5_MASK)
  5034. #define CAN_WORD1_DATA_BYTE_4_MASK (0xFF000000U)
  5035. #define CAN_WORD1_DATA_BYTE_4_SHIFT (24U)
  5036. #define CAN_WORD1_DATA_BYTE_4(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_4_SHIFT)) & CAN_WORD1_DATA_BYTE_4_MASK)
  5037. /*! @} */
  5038. /* The count of CAN_WORD1 */
  5039. #define CAN_WORD1_COUNT (16U)
  5040. /*! @name RXIMR - Rx Individual Mask Registers */
  5041. /*! @{ */
  5042. #define CAN_RXIMR_MI_MASK (0xFFFFFFFFU)
  5043. #define CAN_RXIMR_MI_SHIFT (0U)
  5044. /*! MI - Individual Mask Bits
  5045. * 0b00000000000000000000000000000000..The corresponding bit in the filter is "don't care."
  5046. * 0b00000000000000000000000000000001..The corresponding bit in the filter is checked.
  5047. */
  5048. #define CAN_RXIMR_MI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXIMR_MI_SHIFT)) & CAN_RXIMR_MI_MASK)
  5049. /*! @} */
  5050. /* The count of CAN_RXIMR */
  5051. #define CAN_RXIMR_COUNT (16U)
  5052. /*!
  5053. * @}
  5054. */ /* end of group CAN_Register_Masks */
  5055. /* CAN - Peripheral instance base addresses */
  5056. /** Peripheral CAN0 base address */
  5057. #define CAN0_BASE (0x40024000u)
  5058. /** Peripheral CAN0 base pointer */
  5059. #define CAN0 ((CAN_Type *)CAN0_BASE)
  5060. /** Peripheral CAN1 base address */
  5061. #define CAN1_BASE (0x40025000u)
  5062. /** Peripheral CAN1 base pointer */
  5063. #define CAN1 ((CAN_Type *)CAN1_BASE)
  5064. /** Array initializer of CAN peripheral base addresses */
  5065. #define CAN_BASE_ADDRS { CAN0_BASE, CAN1_BASE }
  5066. /** Array initializer of CAN peripheral base pointers */
  5067. #define CAN_BASE_PTRS { CAN0, CAN1 }
  5068. /** Interrupt vectors for the CAN peripheral type */
  5069. #define CAN_Rx_Warning_IRQS { CAN0_Rx_Warning_IRQn, CAN1_Rx_Warning_IRQn }
  5070. #define CAN_Tx_Warning_IRQS { CAN0_Tx_Warning_IRQn, CAN1_Tx_Warning_IRQn }
  5071. #define CAN_Wake_Up_IRQS { CAN0_Wake_Up_IRQn, CAN1_Wake_Up_IRQn }
  5072. #define CAN_Error_IRQS { CAN0_Error_IRQn, CAN1_Error_IRQn }
  5073. #define CAN_Bus_Off_IRQS { CAN0_Bus_Off_IRQn, CAN1_Bus_Off_IRQn }
  5074. #define CAN_ORed_Message_buffer_IRQS { CAN0_ORed_Message_buffer_IRQn, CAN1_ORed_Message_buffer_IRQn }
  5075. #define CAN_IMASK1_BUFLM_MASK CAN_IMASK1_BUF31TO0M_MASK
  5076. #define CAN_IMASK1_BUFLM_SHIFT CAN_IMASK1_BUF31TO0M_SHIFT
  5077. #define CAN_IMASK1_BUFLM_WIDTH CAN_IMASK1_BUF31TO0M_WIDTH
  5078. #define CAN_IMASK1_BUFLM(x) CAN_IMASK1_BUF31TO0M(x)
  5079. /*!
  5080. * @}
  5081. */ /* end of group CAN_Peripheral_Access_Layer */
  5082. /* ----------------------------------------------------------------------------
  5083. -- CAU Peripheral Access Layer
  5084. ---------------------------------------------------------------------------- */
  5085. /*!
  5086. * @addtogroup CAU_Peripheral_Access_Layer CAU Peripheral Access Layer
  5087. * @{
  5088. */
  5089. /** CAU - Register Layout Typedef */
  5090. typedef struct {
  5091. __O uint32_t DIRECT[16]; /**< Direct access register 0..Direct access register 15, array offset: 0x0, array step: 0x4 */
  5092. uint8_t RESERVED_0[2048];
  5093. __O uint32_t LDR_CASR; /**< Status register - Load Register command, offset: 0x840 */
  5094. __O uint32_t LDR_CAA; /**< Accumulator register - Load Register command, offset: 0x844 */
  5095. __O uint32_t LDR_CA[9]; /**< General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command, array offset: 0x848, array step: 0x4 */
  5096. uint8_t RESERVED_1[20];
  5097. __I uint32_t STR_CASR; /**< Status register - Store Register command, offset: 0x880 */
  5098. __I uint32_t STR_CAA; /**< Accumulator register - Store Register command, offset: 0x884 */
  5099. __I uint32_t STR_CA[9]; /**< General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command, array offset: 0x888, array step: 0x4 */
  5100. uint8_t RESERVED_2[20];
  5101. __O uint32_t ADR_CASR; /**< Status register - Add Register command, offset: 0x8C0 */
  5102. __O uint32_t ADR_CAA; /**< Accumulator register - Add to register command, offset: 0x8C4 */
  5103. __O uint32_t ADR_CA[9]; /**< General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command, array offset: 0x8C8, array step: 0x4 */
  5104. uint8_t RESERVED_3[20];
  5105. __O uint32_t RADR_CASR; /**< Status register - Reverse and Add to Register command, offset: 0x900 */
  5106. __O uint32_t RADR_CAA; /**< Accumulator register - Reverse and Add to Register command, offset: 0x904 */
  5107. __O uint32_t RADR_CA[9]; /**< General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command, array offset: 0x908, array step: 0x4 */
  5108. uint8_t RESERVED_4[84];
  5109. __O uint32_t XOR_CASR; /**< Status register - Exclusive Or command, offset: 0x980 */
  5110. __O uint32_t XOR_CAA; /**< Accumulator register - Exclusive Or command, offset: 0x984 */
  5111. __O uint32_t XOR_CA[9]; /**< General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command, array offset: 0x988, array step: 0x4 */
  5112. uint8_t RESERVED_5[20];
  5113. __O uint32_t ROTL_CASR; /**< Status register - Rotate Left command, offset: 0x9C0 */
  5114. __O uint32_t ROTL_CAA; /**< Accumulator register - Rotate Left command, offset: 0x9C4 */
  5115. __O uint32_t ROTL_CA[9]; /**< General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command, array offset: 0x9C8, array step: 0x4 */
  5116. uint8_t RESERVED_6[276];
  5117. __O uint32_t AESC_CASR; /**< Status register - AES Column Operation command, offset: 0xB00 */
  5118. __O uint32_t AESC_CAA; /**< Accumulator register - AES Column Operation command, offset: 0xB04 */
  5119. __O uint32_t AESC_CA[9]; /**< General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command, array offset: 0xB08, array step: 0x4 */
  5120. uint8_t RESERVED_7[20];
  5121. __O uint32_t AESIC_CASR; /**< Status register - AES Inverse Column Operation command, offset: 0xB40 */
  5122. __O uint32_t AESIC_CAA; /**< Accumulator register - AES Inverse Column Operation command, offset: 0xB44 */
  5123. __O uint32_t AESIC_CA[9]; /**< General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command, array offset: 0xB48, array step: 0x4 */
  5124. } CAU_Type;
  5125. /* ----------------------------------------------------------------------------
  5126. -- CAU Register Masks
  5127. ---------------------------------------------------------------------------- */
  5128. /*!
  5129. * @addtogroup CAU_Register_Masks CAU Register Masks
  5130. * @{
  5131. */
  5132. /*! @name DIRECT - Direct access register 0..Direct access register 15 */
  5133. /*! @{ */
  5134. #define CAU_DIRECT_CAU_DIRECT0_MASK (0xFFFFFFFFU)
  5135. #define CAU_DIRECT_CAU_DIRECT0_SHIFT (0U)
  5136. #define CAU_DIRECT_CAU_DIRECT0(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT0_SHIFT)) & CAU_DIRECT_CAU_DIRECT0_MASK)
  5137. #define CAU_DIRECT_CAU_DIRECT1_MASK (0xFFFFFFFFU)
  5138. #define CAU_DIRECT_CAU_DIRECT1_SHIFT (0U)
  5139. #define CAU_DIRECT_CAU_DIRECT1(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT1_SHIFT)) & CAU_DIRECT_CAU_DIRECT1_MASK)
  5140. #define CAU_DIRECT_CAU_DIRECT2_MASK (0xFFFFFFFFU)
  5141. #define CAU_DIRECT_CAU_DIRECT2_SHIFT (0U)
  5142. #define CAU_DIRECT_CAU_DIRECT2(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT2_SHIFT)) & CAU_DIRECT_CAU_DIRECT2_MASK)
  5143. #define CAU_DIRECT_CAU_DIRECT3_MASK (0xFFFFFFFFU)
  5144. #define CAU_DIRECT_CAU_DIRECT3_SHIFT (0U)
  5145. #define CAU_DIRECT_CAU_DIRECT3(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT3_SHIFT)) & CAU_DIRECT_CAU_DIRECT3_MASK)
  5146. #define CAU_DIRECT_CAU_DIRECT4_MASK (0xFFFFFFFFU)
  5147. #define CAU_DIRECT_CAU_DIRECT4_SHIFT (0U)
  5148. #define CAU_DIRECT_CAU_DIRECT4(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT4_SHIFT)) & CAU_DIRECT_CAU_DIRECT4_MASK)
  5149. #define CAU_DIRECT_CAU_DIRECT5_MASK (0xFFFFFFFFU)
  5150. #define CAU_DIRECT_CAU_DIRECT5_SHIFT (0U)
  5151. #define CAU_DIRECT_CAU_DIRECT5(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT5_SHIFT)) & CAU_DIRECT_CAU_DIRECT5_MASK)
  5152. #define CAU_DIRECT_CAU_DIRECT6_MASK (0xFFFFFFFFU)
  5153. #define CAU_DIRECT_CAU_DIRECT6_SHIFT (0U)
  5154. #define CAU_DIRECT_CAU_DIRECT6(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT6_SHIFT)) & CAU_DIRECT_CAU_DIRECT6_MASK)
  5155. #define CAU_DIRECT_CAU_DIRECT7_MASK (0xFFFFFFFFU)
  5156. #define CAU_DIRECT_CAU_DIRECT7_SHIFT (0U)
  5157. #define CAU_DIRECT_CAU_DIRECT7(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT7_SHIFT)) & CAU_DIRECT_CAU_DIRECT7_MASK)
  5158. #define CAU_DIRECT_CAU_DIRECT8_MASK (0xFFFFFFFFU)
  5159. #define CAU_DIRECT_CAU_DIRECT8_SHIFT (0U)
  5160. #define CAU_DIRECT_CAU_DIRECT8(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT8_SHIFT)) & CAU_DIRECT_CAU_DIRECT8_MASK)
  5161. #define CAU_DIRECT_CAU_DIRECT9_MASK (0xFFFFFFFFU)
  5162. #define CAU_DIRECT_CAU_DIRECT9_SHIFT (0U)
  5163. #define CAU_DIRECT_CAU_DIRECT9(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT9_SHIFT)) & CAU_DIRECT_CAU_DIRECT9_MASK)
  5164. #define CAU_DIRECT_CAU_DIRECT10_MASK (0xFFFFFFFFU)
  5165. #define CAU_DIRECT_CAU_DIRECT10_SHIFT (0U)
  5166. #define CAU_DIRECT_CAU_DIRECT10(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT10_SHIFT)) & CAU_DIRECT_CAU_DIRECT10_MASK)
  5167. #define CAU_DIRECT_CAU_DIRECT11_MASK (0xFFFFFFFFU)
  5168. #define CAU_DIRECT_CAU_DIRECT11_SHIFT (0U)
  5169. #define CAU_DIRECT_CAU_DIRECT11(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT11_SHIFT)) & CAU_DIRECT_CAU_DIRECT11_MASK)
  5170. #define CAU_DIRECT_CAU_DIRECT12_MASK (0xFFFFFFFFU)
  5171. #define CAU_DIRECT_CAU_DIRECT12_SHIFT (0U)
  5172. #define CAU_DIRECT_CAU_DIRECT12(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT12_SHIFT)) & CAU_DIRECT_CAU_DIRECT12_MASK)
  5173. #define CAU_DIRECT_CAU_DIRECT13_MASK (0xFFFFFFFFU)
  5174. #define CAU_DIRECT_CAU_DIRECT13_SHIFT (0U)
  5175. #define CAU_DIRECT_CAU_DIRECT13(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT13_SHIFT)) & CAU_DIRECT_CAU_DIRECT13_MASK)
  5176. #define CAU_DIRECT_CAU_DIRECT14_MASK (0xFFFFFFFFU)
  5177. #define CAU_DIRECT_CAU_DIRECT14_SHIFT (0U)
  5178. #define CAU_DIRECT_CAU_DIRECT14(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT14_SHIFT)) & CAU_DIRECT_CAU_DIRECT14_MASK)
  5179. #define CAU_DIRECT_CAU_DIRECT15_MASK (0xFFFFFFFFU)
  5180. #define CAU_DIRECT_CAU_DIRECT15_SHIFT (0U)
  5181. #define CAU_DIRECT_CAU_DIRECT15(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT15_SHIFT)) & CAU_DIRECT_CAU_DIRECT15_MASK)
  5182. /*! @} */
  5183. /* The count of CAU_DIRECT */
  5184. #define CAU_DIRECT_COUNT (16U)
  5185. /*! @name LDR_CASR - Status register - Load Register command */
  5186. /*! @{ */
  5187. #define CAU_LDR_CASR_IC_MASK (0x1U)
  5188. #define CAU_LDR_CASR_IC_SHIFT (0U)
  5189. /*! IC
  5190. * 0b0..No illegal commands issued
  5191. * 0b1..Illegal command issued
  5192. */
  5193. #define CAU_LDR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_IC_SHIFT)) & CAU_LDR_CASR_IC_MASK)
  5194. #define CAU_LDR_CASR_DPE_MASK (0x2U)
  5195. #define CAU_LDR_CASR_DPE_SHIFT (1U)
  5196. /*! DPE
  5197. * 0b0..No error detected
  5198. * 0b1..DES key parity error detected
  5199. */
  5200. #define CAU_LDR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_DPE_SHIFT)) & CAU_LDR_CASR_DPE_MASK)
  5201. #define CAU_LDR_CASR_VER_MASK (0xF0000000U)
  5202. #define CAU_LDR_CASR_VER_SHIFT (28U)
  5203. /*! VER - CAU version
  5204. * 0b0001..Initial CAU version
  5205. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5206. */
  5207. #define CAU_LDR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_VER_SHIFT)) & CAU_LDR_CASR_VER_MASK)
  5208. /*! @} */
  5209. /*! @name LDR_CAA - Accumulator register - Load Register command */
  5210. /*! @{ */
  5211. #define CAU_LDR_CAA_ACC_MASK (0xFFFFFFFFU)
  5212. #define CAU_LDR_CAA_ACC_SHIFT (0U)
  5213. #define CAU_LDR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CAA_ACC_SHIFT)) & CAU_LDR_CAA_ACC_MASK)
  5214. /*! @} */
  5215. /*! @name LDR_CA - General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command */
  5216. /*! @{ */
  5217. #define CAU_LDR_CA_CA0_MASK (0xFFFFFFFFU)
  5218. #define CAU_LDR_CA_CA0_SHIFT (0U)
  5219. #define CAU_LDR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA0_SHIFT)) & CAU_LDR_CA_CA0_MASK)
  5220. #define CAU_LDR_CA_CA1_MASK (0xFFFFFFFFU)
  5221. #define CAU_LDR_CA_CA1_SHIFT (0U)
  5222. #define CAU_LDR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA1_SHIFT)) & CAU_LDR_CA_CA1_MASK)
  5223. #define CAU_LDR_CA_CA2_MASK (0xFFFFFFFFU)
  5224. #define CAU_LDR_CA_CA2_SHIFT (0U)
  5225. #define CAU_LDR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA2_SHIFT)) & CAU_LDR_CA_CA2_MASK)
  5226. #define CAU_LDR_CA_CA3_MASK (0xFFFFFFFFU)
  5227. #define CAU_LDR_CA_CA3_SHIFT (0U)
  5228. #define CAU_LDR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA3_SHIFT)) & CAU_LDR_CA_CA3_MASK)
  5229. #define CAU_LDR_CA_CA4_MASK (0xFFFFFFFFU)
  5230. #define CAU_LDR_CA_CA4_SHIFT (0U)
  5231. #define CAU_LDR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA4_SHIFT)) & CAU_LDR_CA_CA4_MASK)
  5232. #define CAU_LDR_CA_CA5_MASK (0xFFFFFFFFU)
  5233. #define CAU_LDR_CA_CA5_SHIFT (0U)
  5234. #define CAU_LDR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA5_SHIFT)) & CAU_LDR_CA_CA5_MASK)
  5235. #define CAU_LDR_CA_CA6_MASK (0xFFFFFFFFU)
  5236. #define CAU_LDR_CA_CA6_SHIFT (0U)
  5237. #define CAU_LDR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA6_SHIFT)) & CAU_LDR_CA_CA6_MASK)
  5238. #define CAU_LDR_CA_CA7_MASK (0xFFFFFFFFU)
  5239. #define CAU_LDR_CA_CA7_SHIFT (0U)
  5240. #define CAU_LDR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA7_SHIFT)) & CAU_LDR_CA_CA7_MASK)
  5241. #define CAU_LDR_CA_CA8_MASK (0xFFFFFFFFU)
  5242. #define CAU_LDR_CA_CA8_SHIFT (0U)
  5243. #define CAU_LDR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA8_SHIFT)) & CAU_LDR_CA_CA8_MASK)
  5244. /*! @} */
  5245. /* The count of CAU_LDR_CA */
  5246. #define CAU_LDR_CA_COUNT (9U)
  5247. /*! @name STR_CASR - Status register - Store Register command */
  5248. /*! @{ */
  5249. #define CAU_STR_CASR_IC_MASK (0x1U)
  5250. #define CAU_STR_CASR_IC_SHIFT (0U)
  5251. /*! IC
  5252. * 0b0..No illegal commands issued
  5253. * 0b1..Illegal command issued
  5254. */
  5255. #define CAU_STR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_IC_SHIFT)) & CAU_STR_CASR_IC_MASK)
  5256. #define CAU_STR_CASR_DPE_MASK (0x2U)
  5257. #define CAU_STR_CASR_DPE_SHIFT (1U)
  5258. /*! DPE
  5259. * 0b0..No error detected
  5260. * 0b1..DES key parity error detected
  5261. */
  5262. #define CAU_STR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_DPE_SHIFT)) & CAU_STR_CASR_DPE_MASK)
  5263. #define CAU_STR_CASR_VER_MASK (0xF0000000U)
  5264. #define CAU_STR_CASR_VER_SHIFT (28U)
  5265. /*! VER - CAU version
  5266. * 0b0001..Initial CAU version
  5267. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5268. */
  5269. #define CAU_STR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_VER_SHIFT)) & CAU_STR_CASR_VER_MASK)
  5270. /*! @} */
  5271. /*! @name STR_CAA - Accumulator register - Store Register command */
  5272. /*! @{ */
  5273. #define CAU_STR_CAA_ACC_MASK (0xFFFFFFFFU)
  5274. #define CAU_STR_CAA_ACC_SHIFT (0U)
  5275. #define CAU_STR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CAA_ACC_SHIFT)) & CAU_STR_CAA_ACC_MASK)
  5276. /*! @} */
  5277. /*! @name STR_CA - General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command */
  5278. /*! @{ */
  5279. #define CAU_STR_CA_CA0_MASK (0xFFFFFFFFU)
  5280. #define CAU_STR_CA_CA0_SHIFT (0U)
  5281. #define CAU_STR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA0_SHIFT)) & CAU_STR_CA_CA0_MASK)
  5282. #define CAU_STR_CA_CA1_MASK (0xFFFFFFFFU)
  5283. #define CAU_STR_CA_CA1_SHIFT (0U)
  5284. #define CAU_STR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA1_SHIFT)) & CAU_STR_CA_CA1_MASK)
  5285. #define CAU_STR_CA_CA2_MASK (0xFFFFFFFFU)
  5286. #define CAU_STR_CA_CA2_SHIFT (0U)
  5287. #define CAU_STR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA2_SHIFT)) & CAU_STR_CA_CA2_MASK)
  5288. #define CAU_STR_CA_CA3_MASK (0xFFFFFFFFU)
  5289. #define CAU_STR_CA_CA3_SHIFT (0U)
  5290. #define CAU_STR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA3_SHIFT)) & CAU_STR_CA_CA3_MASK)
  5291. #define CAU_STR_CA_CA4_MASK (0xFFFFFFFFU)
  5292. #define CAU_STR_CA_CA4_SHIFT (0U)
  5293. #define CAU_STR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA4_SHIFT)) & CAU_STR_CA_CA4_MASK)
  5294. #define CAU_STR_CA_CA5_MASK (0xFFFFFFFFU)
  5295. #define CAU_STR_CA_CA5_SHIFT (0U)
  5296. #define CAU_STR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA5_SHIFT)) & CAU_STR_CA_CA5_MASK)
  5297. #define CAU_STR_CA_CA6_MASK (0xFFFFFFFFU)
  5298. #define CAU_STR_CA_CA6_SHIFT (0U)
  5299. #define CAU_STR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA6_SHIFT)) & CAU_STR_CA_CA6_MASK)
  5300. #define CAU_STR_CA_CA7_MASK (0xFFFFFFFFU)
  5301. #define CAU_STR_CA_CA7_SHIFT (0U)
  5302. #define CAU_STR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA7_SHIFT)) & CAU_STR_CA_CA7_MASK)
  5303. #define CAU_STR_CA_CA8_MASK (0xFFFFFFFFU)
  5304. #define CAU_STR_CA_CA8_SHIFT (0U)
  5305. #define CAU_STR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA8_SHIFT)) & CAU_STR_CA_CA8_MASK)
  5306. /*! @} */
  5307. /* The count of CAU_STR_CA */
  5308. #define CAU_STR_CA_COUNT (9U)
  5309. /*! @name ADR_CASR - Status register - Add Register command */
  5310. /*! @{ */
  5311. #define CAU_ADR_CASR_IC_MASK (0x1U)
  5312. #define CAU_ADR_CASR_IC_SHIFT (0U)
  5313. /*! IC
  5314. * 0b0..No illegal commands issued
  5315. * 0b1..Illegal command issued
  5316. */
  5317. #define CAU_ADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_IC_SHIFT)) & CAU_ADR_CASR_IC_MASK)
  5318. #define CAU_ADR_CASR_DPE_MASK (0x2U)
  5319. #define CAU_ADR_CASR_DPE_SHIFT (1U)
  5320. /*! DPE
  5321. * 0b0..No error detected
  5322. * 0b1..DES key parity error detected
  5323. */
  5324. #define CAU_ADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_DPE_SHIFT)) & CAU_ADR_CASR_DPE_MASK)
  5325. #define CAU_ADR_CASR_VER_MASK (0xF0000000U)
  5326. #define CAU_ADR_CASR_VER_SHIFT (28U)
  5327. /*! VER - CAU version
  5328. * 0b0001..Initial CAU version
  5329. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5330. */
  5331. #define CAU_ADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_VER_SHIFT)) & CAU_ADR_CASR_VER_MASK)
  5332. /*! @} */
  5333. /*! @name ADR_CAA - Accumulator register - Add to register command */
  5334. /*! @{ */
  5335. #define CAU_ADR_CAA_ACC_MASK (0xFFFFFFFFU)
  5336. #define CAU_ADR_CAA_ACC_SHIFT (0U)
  5337. #define CAU_ADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CAA_ACC_SHIFT)) & CAU_ADR_CAA_ACC_MASK)
  5338. /*! @} */
  5339. /*! @name ADR_CA - General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command */
  5340. /*! @{ */
  5341. #define CAU_ADR_CA_CA0_MASK (0xFFFFFFFFU)
  5342. #define CAU_ADR_CA_CA0_SHIFT (0U)
  5343. #define CAU_ADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA0_SHIFT)) & CAU_ADR_CA_CA0_MASK)
  5344. #define CAU_ADR_CA_CA1_MASK (0xFFFFFFFFU)
  5345. #define CAU_ADR_CA_CA1_SHIFT (0U)
  5346. #define CAU_ADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA1_SHIFT)) & CAU_ADR_CA_CA1_MASK)
  5347. #define CAU_ADR_CA_CA2_MASK (0xFFFFFFFFU)
  5348. #define CAU_ADR_CA_CA2_SHIFT (0U)
  5349. #define CAU_ADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA2_SHIFT)) & CAU_ADR_CA_CA2_MASK)
  5350. #define CAU_ADR_CA_CA3_MASK (0xFFFFFFFFU)
  5351. #define CAU_ADR_CA_CA3_SHIFT (0U)
  5352. #define CAU_ADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA3_SHIFT)) & CAU_ADR_CA_CA3_MASK)
  5353. #define CAU_ADR_CA_CA4_MASK (0xFFFFFFFFU)
  5354. #define CAU_ADR_CA_CA4_SHIFT (0U)
  5355. #define CAU_ADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA4_SHIFT)) & CAU_ADR_CA_CA4_MASK)
  5356. #define CAU_ADR_CA_CA5_MASK (0xFFFFFFFFU)
  5357. #define CAU_ADR_CA_CA5_SHIFT (0U)
  5358. #define CAU_ADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA5_SHIFT)) & CAU_ADR_CA_CA5_MASK)
  5359. #define CAU_ADR_CA_CA6_MASK (0xFFFFFFFFU)
  5360. #define CAU_ADR_CA_CA6_SHIFT (0U)
  5361. #define CAU_ADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA6_SHIFT)) & CAU_ADR_CA_CA6_MASK)
  5362. #define CAU_ADR_CA_CA7_MASK (0xFFFFFFFFU)
  5363. #define CAU_ADR_CA_CA7_SHIFT (0U)
  5364. #define CAU_ADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA7_SHIFT)) & CAU_ADR_CA_CA7_MASK)
  5365. #define CAU_ADR_CA_CA8_MASK (0xFFFFFFFFU)
  5366. #define CAU_ADR_CA_CA8_SHIFT (0U)
  5367. #define CAU_ADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA8_SHIFT)) & CAU_ADR_CA_CA8_MASK)
  5368. /*! @} */
  5369. /* The count of CAU_ADR_CA */
  5370. #define CAU_ADR_CA_COUNT (9U)
  5371. /*! @name RADR_CASR - Status register - Reverse and Add to Register command */
  5372. /*! @{ */
  5373. #define CAU_RADR_CASR_IC_MASK (0x1U)
  5374. #define CAU_RADR_CASR_IC_SHIFT (0U)
  5375. /*! IC
  5376. * 0b0..No illegal commands issued
  5377. * 0b1..Illegal command issued
  5378. */
  5379. #define CAU_RADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_IC_SHIFT)) & CAU_RADR_CASR_IC_MASK)
  5380. #define CAU_RADR_CASR_DPE_MASK (0x2U)
  5381. #define CAU_RADR_CASR_DPE_SHIFT (1U)
  5382. /*! DPE
  5383. * 0b0..No error detected
  5384. * 0b1..DES key parity error detected
  5385. */
  5386. #define CAU_RADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_DPE_SHIFT)) & CAU_RADR_CASR_DPE_MASK)
  5387. #define CAU_RADR_CASR_VER_MASK (0xF0000000U)
  5388. #define CAU_RADR_CASR_VER_SHIFT (28U)
  5389. /*! VER - CAU version
  5390. * 0b0001..Initial CAU version
  5391. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5392. */
  5393. #define CAU_RADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_VER_SHIFT)) & CAU_RADR_CASR_VER_MASK)
  5394. /*! @} */
  5395. /*! @name RADR_CAA - Accumulator register - Reverse and Add to Register command */
  5396. /*! @{ */
  5397. #define CAU_RADR_CAA_ACC_MASK (0xFFFFFFFFU)
  5398. #define CAU_RADR_CAA_ACC_SHIFT (0U)
  5399. #define CAU_RADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CAA_ACC_SHIFT)) & CAU_RADR_CAA_ACC_MASK)
  5400. /*! @} */
  5401. /*! @name RADR_CA - General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command */
  5402. /*! @{ */
  5403. #define CAU_RADR_CA_CA0_MASK (0xFFFFFFFFU)
  5404. #define CAU_RADR_CA_CA0_SHIFT (0U)
  5405. #define CAU_RADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA0_SHIFT)) & CAU_RADR_CA_CA0_MASK)
  5406. #define CAU_RADR_CA_CA1_MASK (0xFFFFFFFFU)
  5407. #define CAU_RADR_CA_CA1_SHIFT (0U)
  5408. #define CAU_RADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA1_SHIFT)) & CAU_RADR_CA_CA1_MASK)
  5409. #define CAU_RADR_CA_CA2_MASK (0xFFFFFFFFU)
  5410. #define CAU_RADR_CA_CA2_SHIFT (0U)
  5411. #define CAU_RADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA2_SHIFT)) & CAU_RADR_CA_CA2_MASK)
  5412. #define CAU_RADR_CA_CA3_MASK (0xFFFFFFFFU)
  5413. #define CAU_RADR_CA_CA3_SHIFT (0U)
  5414. #define CAU_RADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA3_SHIFT)) & CAU_RADR_CA_CA3_MASK)
  5415. #define CAU_RADR_CA_CA4_MASK (0xFFFFFFFFU)
  5416. #define CAU_RADR_CA_CA4_SHIFT (0U)
  5417. #define CAU_RADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA4_SHIFT)) & CAU_RADR_CA_CA4_MASK)
  5418. #define CAU_RADR_CA_CA5_MASK (0xFFFFFFFFU)
  5419. #define CAU_RADR_CA_CA5_SHIFT (0U)
  5420. #define CAU_RADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA5_SHIFT)) & CAU_RADR_CA_CA5_MASK)
  5421. #define CAU_RADR_CA_CA6_MASK (0xFFFFFFFFU)
  5422. #define CAU_RADR_CA_CA6_SHIFT (0U)
  5423. #define CAU_RADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA6_SHIFT)) & CAU_RADR_CA_CA6_MASK)
  5424. #define CAU_RADR_CA_CA7_MASK (0xFFFFFFFFU)
  5425. #define CAU_RADR_CA_CA7_SHIFT (0U)
  5426. #define CAU_RADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA7_SHIFT)) & CAU_RADR_CA_CA7_MASK)
  5427. #define CAU_RADR_CA_CA8_MASK (0xFFFFFFFFU)
  5428. #define CAU_RADR_CA_CA8_SHIFT (0U)
  5429. #define CAU_RADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA8_SHIFT)) & CAU_RADR_CA_CA8_MASK)
  5430. /*! @} */
  5431. /* The count of CAU_RADR_CA */
  5432. #define CAU_RADR_CA_COUNT (9U)
  5433. /*! @name XOR_CASR - Status register - Exclusive Or command */
  5434. /*! @{ */
  5435. #define CAU_XOR_CASR_IC_MASK (0x1U)
  5436. #define CAU_XOR_CASR_IC_SHIFT (0U)
  5437. /*! IC
  5438. * 0b0..No illegal commands issued
  5439. * 0b1..Illegal command issued
  5440. */
  5441. #define CAU_XOR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_IC_SHIFT)) & CAU_XOR_CASR_IC_MASK)
  5442. #define CAU_XOR_CASR_DPE_MASK (0x2U)
  5443. #define CAU_XOR_CASR_DPE_SHIFT (1U)
  5444. /*! DPE
  5445. * 0b0..No error detected
  5446. * 0b1..DES key parity error detected
  5447. */
  5448. #define CAU_XOR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_DPE_SHIFT)) & CAU_XOR_CASR_DPE_MASK)
  5449. #define CAU_XOR_CASR_VER_MASK (0xF0000000U)
  5450. #define CAU_XOR_CASR_VER_SHIFT (28U)
  5451. /*! VER - CAU version
  5452. * 0b0001..Initial CAU version
  5453. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5454. */
  5455. #define CAU_XOR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_VER_SHIFT)) & CAU_XOR_CASR_VER_MASK)
  5456. /*! @} */
  5457. /*! @name XOR_CAA - Accumulator register - Exclusive Or command */
  5458. /*! @{ */
  5459. #define CAU_XOR_CAA_ACC_MASK (0xFFFFFFFFU)
  5460. #define CAU_XOR_CAA_ACC_SHIFT (0U)
  5461. #define CAU_XOR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CAA_ACC_SHIFT)) & CAU_XOR_CAA_ACC_MASK)
  5462. /*! @} */
  5463. /*! @name XOR_CA - General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command */
  5464. /*! @{ */
  5465. #define CAU_XOR_CA_CA0_MASK (0xFFFFFFFFU)
  5466. #define CAU_XOR_CA_CA0_SHIFT (0U)
  5467. #define CAU_XOR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA0_SHIFT)) & CAU_XOR_CA_CA0_MASK)
  5468. #define CAU_XOR_CA_CA1_MASK (0xFFFFFFFFU)
  5469. #define CAU_XOR_CA_CA1_SHIFT (0U)
  5470. #define CAU_XOR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA1_SHIFT)) & CAU_XOR_CA_CA1_MASK)
  5471. #define CAU_XOR_CA_CA2_MASK (0xFFFFFFFFU)
  5472. #define CAU_XOR_CA_CA2_SHIFT (0U)
  5473. #define CAU_XOR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA2_SHIFT)) & CAU_XOR_CA_CA2_MASK)
  5474. #define CAU_XOR_CA_CA3_MASK (0xFFFFFFFFU)
  5475. #define CAU_XOR_CA_CA3_SHIFT (0U)
  5476. #define CAU_XOR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA3_SHIFT)) & CAU_XOR_CA_CA3_MASK)
  5477. #define CAU_XOR_CA_CA4_MASK (0xFFFFFFFFU)
  5478. #define CAU_XOR_CA_CA4_SHIFT (0U)
  5479. #define CAU_XOR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA4_SHIFT)) & CAU_XOR_CA_CA4_MASK)
  5480. #define CAU_XOR_CA_CA5_MASK (0xFFFFFFFFU)
  5481. #define CAU_XOR_CA_CA5_SHIFT (0U)
  5482. #define CAU_XOR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA5_SHIFT)) & CAU_XOR_CA_CA5_MASK)
  5483. #define CAU_XOR_CA_CA6_MASK (0xFFFFFFFFU)
  5484. #define CAU_XOR_CA_CA6_SHIFT (0U)
  5485. #define CAU_XOR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA6_SHIFT)) & CAU_XOR_CA_CA6_MASK)
  5486. #define CAU_XOR_CA_CA7_MASK (0xFFFFFFFFU)
  5487. #define CAU_XOR_CA_CA7_SHIFT (0U)
  5488. #define CAU_XOR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA7_SHIFT)) & CAU_XOR_CA_CA7_MASK)
  5489. #define CAU_XOR_CA_CA8_MASK (0xFFFFFFFFU)
  5490. #define CAU_XOR_CA_CA8_SHIFT (0U)
  5491. #define CAU_XOR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA8_SHIFT)) & CAU_XOR_CA_CA8_MASK)
  5492. /*! @} */
  5493. /* The count of CAU_XOR_CA */
  5494. #define CAU_XOR_CA_COUNT (9U)
  5495. /*! @name ROTL_CASR - Status register - Rotate Left command */
  5496. /*! @{ */
  5497. #define CAU_ROTL_CASR_IC_MASK (0x1U)
  5498. #define CAU_ROTL_CASR_IC_SHIFT (0U)
  5499. /*! IC
  5500. * 0b0..No illegal commands issued
  5501. * 0b1..Illegal command issued
  5502. */
  5503. #define CAU_ROTL_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_IC_SHIFT)) & CAU_ROTL_CASR_IC_MASK)
  5504. #define CAU_ROTL_CASR_DPE_MASK (0x2U)
  5505. #define CAU_ROTL_CASR_DPE_SHIFT (1U)
  5506. /*! DPE
  5507. * 0b0..No error detected
  5508. * 0b1..DES key parity error detected
  5509. */
  5510. #define CAU_ROTL_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_DPE_SHIFT)) & CAU_ROTL_CASR_DPE_MASK)
  5511. #define CAU_ROTL_CASR_VER_MASK (0xF0000000U)
  5512. #define CAU_ROTL_CASR_VER_SHIFT (28U)
  5513. /*! VER - CAU version
  5514. * 0b0001..Initial CAU version
  5515. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5516. */
  5517. #define CAU_ROTL_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_VER_SHIFT)) & CAU_ROTL_CASR_VER_MASK)
  5518. /*! @} */
  5519. /*! @name ROTL_CAA - Accumulator register - Rotate Left command */
  5520. /*! @{ */
  5521. #define CAU_ROTL_CAA_ACC_MASK (0xFFFFFFFFU)
  5522. #define CAU_ROTL_CAA_ACC_SHIFT (0U)
  5523. #define CAU_ROTL_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CAA_ACC_SHIFT)) & CAU_ROTL_CAA_ACC_MASK)
  5524. /*! @} */
  5525. /*! @name ROTL_CA - General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command */
  5526. /*! @{ */
  5527. #define CAU_ROTL_CA_CA0_MASK (0xFFFFFFFFU)
  5528. #define CAU_ROTL_CA_CA0_SHIFT (0U)
  5529. #define CAU_ROTL_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA0_SHIFT)) & CAU_ROTL_CA_CA0_MASK)
  5530. #define CAU_ROTL_CA_CA1_MASK (0xFFFFFFFFU)
  5531. #define CAU_ROTL_CA_CA1_SHIFT (0U)
  5532. #define CAU_ROTL_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA1_SHIFT)) & CAU_ROTL_CA_CA1_MASK)
  5533. #define CAU_ROTL_CA_CA2_MASK (0xFFFFFFFFU)
  5534. #define CAU_ROTL_CA_CA2_SHIFT (0U)
  5535. #define CAU_ROTL_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA2_SHIFT)) & CAU_ROTL_CA_CA2_MASK)
  5536. #define CAU_ROTL_CA_CA3_MASK (0xFFFFFFFFU)
  5537. #define CAU_ROTL_CA_CA3_SHIFT (0U)
  5538. #define CAU_ROTL_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA3_SHIFT)) & CAU_ROTL_CA_CA3_MASK)
  5539. #define CAU_ROTL_CA_CA4_MASK (0xFFFFFFFFU)
  5540. #define CAU_ROTL_CA_CA4_SHIFT (0U)
  5541. #define CAU_ROTL_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA4_SHIFT)) & CAU_ROTL_CA_CA4_MASK)
  5542. #define CAU_ROTL_CA_CA5_MASK (0xFFFFFFFFU)
  5543. #define CAU_ROTL_CA_CA5_SHIFT (0U)
  5544. #define CAU_ROTL_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA5_SHIFT)) & CAU_ROTL_CA_CA5_MASK)
  5545. #define CAU_ROTL_CA_CA6_MASK (0xFFFFFFFFU)
  5546. #define CAU_ROTL_CA_CA6_SHIFT (0U)
  5547. #define CAU_ROTL_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA6_SHIFT)) & CAU_ROTL_CA_CA6_MASK)
  5548. #define CAU_ROTL_CA_CA7_MASK (0xFFFFFFFFU)
  5549. #define CAU_ROTL_CA_CA7_SHIFT (0U)
  5550. #define CAU_ROTL_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA7_SHIFT)) & CAU_ROTL_CA_CA7_MASK)
  5551. #define CAU_ROTL_CA_CA8_MASK (0xFFFFFFFFU)
  5552. #define CAU_ROTL_CA_CA8_SHIFT (0U)
  5553. #define CAU_ROTL_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA8_SHIFT)) & CAU_ROTL_CA_CA8_MASK)
  5554. /*! @} */
  5555. /* The count of CAU_ROTL_CA */
  5556. #define CAU_ROTL_CA_COUNT (9U)
  5557. /*! @name AESC_CASR - Status register - AES Column Operation command */
  5558. /*! @{ */
  5559. #define CAU_AESC_CASR_IC_MASK (0x1U)
  5560. #define CAU_AESC_CASR_IC_SHIFT (0U)
  5561. /*! IC
  5562. * 0b0..No illegal commands issued
  5563. * 0b1..Illegal command issued
  5564. */
  5565. #define CAU_AESC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_IC_SHIFT)) & CAU_AESC_CASR_IC_MASK)
  5566. #define CAU_AESC_CASR_DPE_MASK (0x2U)
  5567. #define CAU_AESC_CASR_DPE_SHIFT (1U)
  5568. /*! DPE
  5569. * 0b0..No error detected
  5570. * 0b1..DES key parity error detected
  5571. */
  5572. #define CAU_AESC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_DPE_SHIFT)) & CAU_AESC_CASR_DPE_MASK)
  5573. #define CAU_AESC_CASR_VER_MASK (0xF0000000U)
  5574. #define CAU_AESC_CASR_VER_SHIFT (28U)
  5575. /*! VER - CAU version
  5576. * 0b0001..Initial CAU version
  5577. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5578. */
  5579. #define CAU_AESC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_VER_SHIFT)) & CAU_AESC_CASR_VER_MASK)
  5580. /*! @} */
  5581. /*! @name AESC_CAA - Accumulator register - AES Column Operation command */
  5582. /*! @{ */
  5583. #define CAU_AESC_CAA_ACC_MASK (0xFFFFFFFFU)
  5584. #define CAU_AESC_CAA_ACC_SHIFT (0U)
  5585. #define CAU_AESC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CAA_ACC_SHIFT)) & CAU_AESC_CAA_ACC_MASK)
  5586. /*! @} */
  5587. /*! @name AESC_CA - General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command */
  5588. /*! @{ */
  5589. #define CAU_AESC_CA_CA0_MASK (0xFFFFFFFFU)
  5590. #define CAU_AESC_CA_CA0_SHIFT (0U)
  5591. #define CAU_AESC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA0_SHIFT)) & CAU_AESC_CA_CA0_MASK)
  5592. #define CAU_AESC_CA_CA1_MASK (0xFFFFFFFFU)
  5593. #define CAU_AESC_CA_CA1_SHIFT (0U)
  5594. #define CAU_AESC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA1_SHIFT)) & CAU_AESC_CA_CA1_MASK)
  5595. #define CAU_AESC_CA_CA2_MASK (0xFFFFFFFFU)
  5596. #define CAU_AESC_CA_CA2_SHIFT (0U)
  5597. #define CAU_AESC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA2_SHIFT)) & CAU_AESC_CA_CA2_MASK)
  5598. #define CAU_AESC_CA_CA3_MASK (0xFFFFFFFFU)
  5599. #define CAU_AESC_CA_CA3_SHIFT (0U)
  5600. #define CAU_AESC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA3_SHIFT)) & CAU_AESC_CA_CA3_MASK)
  5601. #define CAU_AESC_CA_CA4_MASK (0xFFFFFFFFU)
  5602. #define CAU_AESC_CA_CA4_SHIFT (0U)
  5603. #define CAU_AESC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA4_SHIFT)) & CAU_AESC_CA_CA4_MASK)
  5604. #define CAU_AESC_CA_CA5_MASK (0xFFFFFFFFU)
  5605. #define CAU_AESC_CA_CA5_SHIFT (0U)
  5606. #define CAU_AESC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA5_SHIFT)) & CAU_AESC_CA_CA5_MASK)
  5607. #define CAU_AESC_CA_CA6_MASK (0xFFFFFFFFU)
  5608. #define CAU_AESC_CA_CA6_SHIFT (0U)
  5609. #define CAU_AESC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA6_SHIFT)) & CAU_AESC_CA_CA6_MASK)
  5610. #define CAU_AESC_CA_CA7_MASK (0xFFFFFFFFU)
  5611. #define CAU_AESC_CA_CA7_SHIFT (0U)
  5612. #define CAU_AESC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA7_SHIFT)) & CAU_AESC_CA_CA7_MASK)
  5613. #define CAU_AESC_CA_CA8_MASK (0xFFFFFFFFU)
  5614. #define CAU_AESC_CA_CA8_SHIFT (0U)
  5615. #define CAU_AESC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA8_SHIFT)) & CAU_AESC_CA_CA8_MASK)
  5616. /*! @} */
  5617. /* The count of CAU_AESC_CA */
  5618. #define CAU_AESC_CA_COUNT (9U)
  5619. /*! @name AESIC_CASR - Status register - AES Inverse Column Operation command */
  5620. /*! @{ */
  5621. #define CAU_AESIC_CASR_IC_MASK (0x1U)
  5622. #define CAU_AESIC_CASR_IC_SHIFT (0U)
  5623. /*! IC
  5624. * 0b0..No illegal commands issued
  5625. * 0b1..Illegal command issued
  5626. */
  5627. #define CAU_AESIC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_IC_SHIFT)) & CAU_AESIC_CASR_IC_MASK)
  5628. #define CAU_AESIC_CASR_DPE_MASK (0x2U)
  5629. #define CAU_AESIC_CASR_DPE_SHIFT (1U)
  5630. /*! DPE
  5631. * 0b0..No error detected
  5632. * 0b1..DES key parity error detected
  5633. */
  5634. #define CAU_AESIC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_DPE_SHIFT)) & CAU_AESIC_CASR_DPE_MASK)
  5635. #define CAU_AESIC_CASR_VER_MASK (0xF0000000U)
  5636. #define CAU_AESIC_CASR_VER_SHIFT (28U)
  5637. /*! VER - CAU version
  5638. * 0b0001..Initial CAU version
  5639. * 0b0010..Second version, added support for SHA-256 algorithm.(This is the value on this device)
  5640. */
  5641. #define CAU_AESIC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_VER_SHIFT)) & CAU_AESIC_CASR_VER_MASK)
  5642. /*! @} */
  5643. /*! @name AESIC_CAA - Accumulator register - AES Inverse Column Operation command */
  5644. /*! @{ */
  5645. #define CAU_AESIC_CAA_ACC_MASK (0xFFFFFFFFU)
  5646. #define CAU_AESIC_CAA_ACC_SHIFT (0U)
  5647. #define CAU_AESIC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CAA_ACC_SHIFT)) & CAU_AESIC_CAA_ACC_MASK)
  5648. /*! @} */
  5649. /*! @name AESIC_CA - General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command */
  5650. /*! @{ */
  5651. #define CAU_AESIC_CA_CA0_MASK (0xFFFFFFFFU)
  5652. #define CAU_AESIC_CA_CA0_SHIFT (0U)
  5653. #define CAU_AESIC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA0_SHIFT)) & CAU_AESIC_CA_CA0_MASK)
  5654. #define CAU_AESIC_CA_CA1_MASK (0xFFFFFFFFU)
  5655. #define CAU_AESIC_CA_CA1_SHIFT (0U)
  5656. #define CAU_AESIC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA1_SHIFT)) & CAU_AESIC_CA_CA1_MASK)
  5657. #define CAU_AESIC_CA_CA2_MASK (0xFFFFFFFFU)
  5658. #define CAU_AESIC_CA_CA2_SHIFT (0U)
  5659. #define CAU_AESIC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA2_SHIFT)) & CAU_AESIC_CA_CA2_MASK)
  5660. #define CAU_AESIC_CA_CA3_MASK (0xFFFFFFFFU)
  5661. #define CAU_AESIC_CA_CA3_SHIFT (0U)
  5662. #define CAU_AESIC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA3_SHIFT)) & CAU_AESIC_CA_CA3_MASK)
  5663. #define CAU_AESIC_CA_CA4_MASK (0xFFFFFFFFU)
  5664. #define CAU_AESIC_CA_CA4_SHIFT (0U)
  5665. #define CAU_AESIC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA4_SHIFT)) & CAU_AESIC_CA_CA4_MASK)
  5666. #define CAU_AESIC_CA_CA5_MASK (0xFFFFFFFFU)
  5667. #define CAU_AESIC_CA_CA5_SHIFT (0U)
  5668. #define CAU_AESIC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA5_SHIFT)) & CAU_AESIC_CA_CA5_MASK)
  5669. #define CAU_AESIC_CA_CA6_MASK (0xFFFFFFFFU)
  5670. #define CAU_AESIC_CA_CA6_SHIFT (0U)
  5671. #define CAU_AESIC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA6_SHIFT)) & CAU_AESIC_CA_CA6_MASK)
  5672. #define CAU_AESIC_CA_CA7_MASK (0xFFFFFFFFU)
  5673. #define CAU_AESIC_CA_CA7_SHIFT (0U)
  5674. #define CAU_AESIC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA7_SHIFT)) & CAU_AESIC_CA_CA7_MASK)
  5675. #define CAU_AESIC_CA_CA8_MASK (0xFFFFFFFFU)
  5676. #define CAU_AESIC_CA_CA8_SHIFT (0U)
  5677. #define CAU_AESIC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA8_SHIFT)) & CAU_AESIC_CA_CA8_MASK)
  5678. /*! @} */
  5679. /* The count of CAU_AESIC_CA */
  5680. #define CAU_AESIC_CA_COUNT (9U)
  5681. /*!
  5682. * @}
  5683. */ /* end of group CAU_Register_Masks */
  5684. /* CAU - Peripheral instance base addresses */
  5685. /** Peripheral CAU base address */
  5686. #define CAU_BASE (0xE0081000u)
  5687. /** Peripheral CAU base pointer */
  5688. #define CAU ((CAU_Type *)CAU_BASE)
  5689. /** Array initializer of CAU peripheral base addresses */
  5690. #define CAU_BASE_ADDRS { CAU_BASE }
  5691. /** Array initializer of CAU peripheral base pointers */
  5692. #define CAU_BASE_PTRS { CAU }
  5693. /*!
  5694. * @}
  5695. */ /* end of group CAU_Peripheral_Access_Layer */
  5696. /* ----------------------------------------------------------------------------
  5697. -- CMP Peripheral Access Layer
  5698. ---------------------------------------------------------------------------- */
  5699. /*!
  5700. * @addtogroup CMP_Peripheral_Access_Layer CMP Peripheral Access Layer
  5701. * @{
  5702. */
  5703. /** CMP - Register Layout Typedef */
  5704. typedef struct {
  5705. __IO uint8_t CR0; /**< CMP Control Register 0, offset: 0x0 */
  5706. __IO uint8_t CR1; /**< CMP Control Register 1, offset: 0x1 */
  5707. __IO uint8_t FPR; /**< CMP Filter Period Register, offset: 0x2 */
  5708. __IO uint8_t SCR; /**< CMP Status and Control Register, offset: 0x3 */
  5709. __IO uint8_t DACCR; /**< DAC Control Register, offset: 0x4 */
  5710. __IO uint8_t MUXCR; /**< MUX Control Register, offset: 0x5 */
  5711. } CMP_Type;
  5712. /* ----------------------------------------------------------------------------
  5713. -- CMP Register Masks
  5714. ---------------------------------------------------------------------------- */
  5715. /*!
  5716. * @addtogroup CMP_Register_Masks CMP Register Masks
  5717. * @{
  5718. */
  5719. /*! @name CR0 - CMP Control Register 0 */
  5720. /*! @{ */
  5721. #define CMP_CR0_HYSTCTR_MASK (0x3U)
  5722. #define CMP_CR0_HYSTCTR_SHIFT (0U)
  5723. /*! HYSTCTR - Comparator hard block hysteresis control
  5724. * 0b00..Level 0
  5725. * 0b01..Level 1
  5726. * 0b10..Level 2
  5727. * 0b11..Level 3
  5728. */
  5729. #define CMP_CR0_HYSTCTR(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_HYSTCTR_SHIFT)) & CMP_CR0_HYSTCTR_MASK)
  5730. #define CMP_CR0_FILTER_CNT_MASK (0x70U)
  5731. #define CMP_CR0_FILTER_CNT_SHIFT (4U)
  5732. /*! FILTER_CNT - Filter Sample Count
  5733. * 0b000..Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA.
  5734. * 0b001..One sample must agree. The comparator output is simply sampled.
  5735. * 0b010..2 consecutive samples must agree.
  5736. * 0b011..3 consecutive samples must agree.
  5737. * 0b100..4 consecutive samples must agree.
  5738. * 0b101..5 consecutive samples must agree.
  5739. * 0b110..6 consecutive samples must agree.
  5740. * 0b111..7 consecutive samples must agree.
  5741. */
  5742. #define CMP_CR0_FILTER_CNT(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_FILTER_CNT_SHIFT)) & CMP_CR0_FILTER_CNT_MASK)
  5743. /*! @} */
  5744. /*! @name CR1 - CMP Control Register 1 */
  5745. /*! @{ */
  5746. #define CMP_CR1_EN_MASK (0x1U)
  5747. #define CMP_CR1_EN_SHIFT (0U)
  5748. /*! EN - Comparator Module Enable
  5749. * 0b0..Analog Comparator is disabled.
  5750. * 0b1..Analog Comparator is enabled.
  5751. */
  5752. #define CMP_CR1_EN(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_EN_SHIFT)) & CMP_CR1_EN_MASK)
  5753. #define CMP_CR1_OPE_MASK (0x2U)
  5754. #define CMP_CR1_OPE_SHIFT (1U)
  5755. /*! OPE - Comparator Output Pin Enable
  5756. * 0b0..CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect.
  5757. * 0b1..CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect.
  5758. */
  5759. #define CMP_CR1_OPE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_OPE_SHIFT)) & CMP_CR1_OPE_MASK)
  5760. #define CMP_CR1_COS_MASK (0x4U)
  5761. #define CMP_CR1_COS_SHIFT (2U)
  5762. /*! COS - Comparator Output Select
  5763. * 0b0..Set the filtered comparator output (CMPO) to equal COUT.
  5764. * 0b1..Set the unfiltered comparator output (CMPO) to equal COUTA.
  5765. */
  5766. #define CMP_CR1_COS(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_COS_SHIFT)) & CMP_CR1_COS_MASK)
  5767. #define CMP_CR1_INV_MASK (0x8U)
  5768. #define CMP_CR1_INV_SHIFT (3U)
  5769. /*! INV - Comparator INVERT
  5770. * 0b0..Does not invert the comparator output.
  5771. * 0b1..Inverts the comparator output.
  5772. */
  5773. #define CMP_CR1_INV(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_INV_SHIFT)) & CMP_CR1_INV_MASK)
  5774. #define CMP_CR1_PMODE_MASK (0x10U)
  5775. #define CMP_CR1_PMODE_SHIFT (4U)
  5776. /*! PMODE - Power Mode Select
  5777. * 0b0..Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption.
  5778. * 0b1..High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption.
  5779. */
  5780. #define CMP_CR1_PMODE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_PMODE_SHIFT)) & CMP_CR1_PMODE_MASK)
  5781. #define CMP_CR1_TRIGM_MASK (0x20U)
  5782. #define CMP_CR1_TRIGM_SHIFT (5U)
  5783. /*! TRIGM - Trigger Mode Enable
  5784. * 0b0..Trigger mode is disabled.
  5785. * 0b1..Trigger mode is enabled.
  5786. */
  5787. #define CMP_CR1_TRIGM(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_TRIGM_SHIFT)) & CMP_CR1_TRIGM_MASK)
  5788. #define CMP_CR1_WE_MASK (0x40U)
  5789. #define CMP_CR1_WE_SHIFT (6U)
  5790. /*! WE - Windowing Enable
  5791. * 0b0..Windowing mode is not selected.
  5792. * 0b1..Windowing mode is selected.
  5793. */
  5794. #define CMP_CR1_WE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_WE_SHIFT)) & CMP_CR1_WE_MASK)
  5795. #define CMP_CR1_SE_MASK (0x80U)
  5796. #define CMP_CR1_SE_SHIFT (7U)
  5797. /*! SE - Sample Enable
  5798. * 0b0..Sampling mode is not selected.
  5799. * 0b1..Sampling mode is selected.
  5800. */
  5801. #define CMP_CR1_SE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_SE_SHIFT)) & CMP_CR1_SE_MASK)
  5802. /*! @} */
  5803. /*! @name FPR - CMP Filter Period Register */
  5804. /*! @{ */
  5805. #define CMP_FPR_FILT_PER_MASK (0xFFU)
  5806. #define CMP_FPR_FILT_PER_SHIFT (0U)
  5807. #define CMP_FPR_FILT_PER(x) (((uint8_t)(((uint8_t)(x)) << CMP_FPR_FILT_PER_SHIFT)) & CMP_FPR_FILT_PER_MASK)
  5808. /*! @} */
  5809. /*! @name SCR - CMP Status and Control Register */
  5810. /*! @{ */
  5811. #define CMP_SCR_COUT_MASK (0x1U)
  5812. #define CMP_SCR_COUT_SHIFT (0U)
  5813. #define CMP_SCR_COUT(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_COUT_SHIFT)) & CMP_SCR_COUT_MASK)
  5814. #define CMP_SCR_CFF_MASK (0x2U)
  5815. #define CMP_SCR_CFF_SHIFT (1U)
  5816. /*! CFF - Analog Comparator Flag Falling
  5817. * 0b0..Falling-edge on COUT has not been detected.
  5818. * 0b1..Falling-edge on COUT has occurred.
  5819. */
  5820. #define CMP_SCR_CFF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFF_SHIFT)) & CMP_SCR_CFF_MASK)
  5821. #define CMP_SCR_CFR_MASK (0x4U)
  5822. #define CMP_SCR_CFR_SHIFT (2U)
  5823. /*! CFR - Analog Comparator Flag Rising
  5824. * 0b0..Rising-edge on COUT has not been detected.
  5825. * 0b1..Rising-edge on COUT has occurred.
  5826. */
  5827. #define CMP_SCR_CFR(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFR_SHIFT)) & CMP_SCR_CFR_MASK)
  5828. #define CMP_SCR_IEF_MASK (0x8U)
  5829. #define CMP_SCR_IEF_SHIFT (3U)
  5830. /*! IEF - Comparator Interrupt Enable Falling
  5831. * 0b0..Interrupt is disabled.
  5832. * 0b1..Interrupt is enabled.
  5833. */
  5834. #define CMP_SCR_IEF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IEF_SHIFT)) & CMP_SCR_IEF_MASK)
  5835. #define CMP_SCR_IER_MASK (0x10U)
  5836. #define CMP_SCR_IER_SHIFT (4U)
  5837. /*! IER - Comparator Interrupt Enable Rising
  5838. * 0b0..Interrupt is disabled.
  5839. * 0b1..Interrupt is enabled.
  5840. */
  5841. #define CMP_SCR_IER(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IER_SHIFT)) & CMP_SCR_IER_MASK)
  5842. #define CMP_SCR_DMAEN_MASK (0x40U)
  5843. #define CMP_SCR_DMAEN_SHIFT (6U)
  5844. /*! DMAEN - DMA Enable Control
  5845. * 0b0..DMA is disabled.
  5846. * 0b1..DMA is enabled.
  5847. */
  5848. #define CMP_SCR_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_DMAEN_SHIFT)) & CMP_SCR_DMAEN_MASK)
  5849. /*! @} */
  5850. /*! @name DACCR - DAC Control Register */
  5851. /*! @{ */
  5852. #define CMP_DACCR_VOSEL_MASK (0x3FU)
  5853. #define CMP_DACCR_VOSEL_SHIFT (0U)
  5854. #define CMP_DACCR_VOSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VOSEL_SHIFT)) & CMP_DACCR_VOSEL_MASK)
  5855. #define CMP_DACCR_VRSEL_MASK (0x40U)
  5856. #define CMP_DACCR_VRSEL_SHIFT (6U)
  5857. /*! VRSEL - Supply Voltage Reference Source Select
  5858. * 0b0..Vin1 is selected as resistor ladder network supply reference.
  5859. * 0b1..Vin2 is selected as resistor ladder network supply reference.
  5860. */
  5861. #define CMP_DACCR_VRSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VRSEL_SHIFT)) & CMP_DACCR_VRSEL_MASK)
  5862. #define CMP_DACCR_DACEN_MASK (0x80U)
  5863. #define CMP_DACCR_DACEN_SHIFT (7U)
  5864. /*! DACEN - DAC Enable
  5865. * 0b0..DAC is disabled.
  5866. * 0b1..DAC is enabled.
  5867. */
  5868. #define CMP_DACCR_DACEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_DACEN_SHIFT)) & CMP_DACCR_DACEN_MASK)
  5869. /*! @} */
  5870. /*! @name MUXCR - MUX Control Register */
  5871. /*! @{ */
  5872. #define CMP_MUXCR_MSEL_MASK (0x7U)
  5873. #define CMP_MUXCR_MSEL_SHIFT (0U)
  5874. /*! MSEL - Minus Input Mux Control
  5875. * 0b000..IN0
  5876. * 0b001..IN1
  5877. * 0b010..IN2
  5878. * 0b011..IN3
  5879. * 0b100..IN4
  5880. * 0b101..IN5
  5881. * 0b110..IN6
  5882. * 0b111..IN7
  5883. */
  5884. #define CMP_MUXCR_MSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_MSEL_SHIFT)) & CMP_MUXCR_MSEL_MASK)
  5885. #define CMP_MUXCR_PSEL_MASK (0x38U)
  5886. #define CMP_MUXCR_PSEL_SHIFT (3U)
  5887. /*! PSEL - Plus Input Mux Control
  5888. * 0b000..IN0
  5889. * 0b001..IN1
  5890. * 0b010..IN2
  5891. * 0b011..IN3
  5892. * 0b100..IN4
  5893. * 0b101..IN5
  5894. * 0b110..IN6
  5895. * 0b111..IN7
  5896. */
  5897. #define CMP_MUXCR_PSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_PSEL_SHIFT)) & CMP_MUXCR_PSEL_MASK)
  5898. /*! @} */
  5899. /*!
  5900. * @}
  5901. */ /* end of group CMP_Register_Masks */
  5902. /* CMP - Peripheral instance base addresses */
  5903. /** Peripheral CMP0 base address */
  5904. #define CMP0_BASE (0x40073000u)
  5905. /** Peripheral CMP0 base pointer */
  5906. #define CMP0 ((CMP_Type *)CMP0_BASE)
  5907. /** Peripheral CMP1 base address */
  5908. #define CMP1_BASE (0x40073008u)
  5909. /** Peripheral CMP1 base pointer */
  5910. #define CMP1 ((CMP_Type *)CMP1_BASE)
  5911. /** Peripheral CMP2 base address */
  5912. #define CMP2_BASE (0x40073010u)
  5913. /** Peripheral CMP2 base pointer */
  5914. #define CMP2 ((CMP_Type *)CMP2_BASE)
  5915. /** Peripheral CMP3 base address */
  5916. #define CMP3_BASE (0x40073018u)
  5917. /** Peripheral CMP3 base pointer */
  5918. #define CMP3 ((CMP_Type *)CMP3_BASE)
  5919. /** Array initializer of CMP peripheral base addresses */
  5920. #define CMP_BASE_ADDRS { CMP0_BASE, CMP1_BASE, CMP2_BASE, CMP3_BASE }
  5921. /** Array initializer of CMP peripheral base pointers */
  5922. #define CMP_BASE_PTRS { CMP0, CMP1, CMP2, CMP3 }
  5923. /** Interrupt vectors for the CMP peripheral type */
  5924. #define CMP_IRQS { CMP0_IRQn, CMP1_IRQn, CMP2_IRQn, CMP3_IRQn }
  5925. /*!
  5926. * @}
  5927. */ /* end of group CMP_Peripheral_Access_Layer */
  5928. /* ----------------------------------------------------------------------------
  5929. -- CRC Peripheral Access Layer
  5930. ---------------------------------------------------------------------------- */
  5931. /*!
  5932. * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
  5933. * @{
  5934. */
  5935. /** CRC - Register Layout Typedef */
  5936. typedef struct {
  5937. union { /* offset: 0x0 */
  5938. struct { /* offset: 0x0 */
  5939. __IO uint16_t DATAL; /**< CRC_DATAL register., offset: 0x0 */
  5940. __IO uint16_t DATAH; /**< CRC_DATAH register., offset: 0x2 */
  5941. } ACCESS16BIT;
  5942. __IO uint32_t DATA; /**< CRC Data register, offset: 0x0 */
  5943. struct { /* offset: 0x0 */
  5944. __IO uint8_t DATALL; /**< CRC_DATALL register., offset: 0x0 */
  5945. __IO uint8_t DATALU; /**< CRC_DATALU register., offset: 0x1 */
  5946. __IO uint8_t DATAHL; /**< CRC_DATAHL register., offset: 0x2 */
  5947. __IO uint8_t DATAHU; /**< CRC_DATAHU register., offset: 0x3 */
  5948. } ACCESS8BIT;
  5949. };
  5950. union { /* offset: 0x4 */
  5951. struct { /* offset: 0x4 */
  5952. __IO uint16_t GPOLYL; /**< CRC_GPOLYL register., offset: 0x4 */
  5953. __IO uint16_t GPOLYH; /**< CRC_GPOLYH register., offset: 0x6 */
  5954. } GPOLY_ACCESS16BIT;
  5955. __IO uint32_t GPOLY; /**< CRC Polynomial register, offset: 0x4 */
  5956. struct { /* offset: 0x4 */
  5957. __IO uint8_t GPOLYLL; /**< CRC_GPOLYLL register., offset: 0x4 */
  5958. __IO uint8_t GPOLYLU; /**< CRC_GPOLYLU register., offset: 0x5 */
  5959. __IO uint8_t GPOLYHL; /**< CRC_GPOLYHL register., offset: 0x6 */
  5960. __IO uint8_t GPOLYHU; /**< CRC_GPOLYHU register., offset: 0x7 */
  5961. } GPOLY_ACCESS8BIT;
  5962. };
  5963. union { /* offset: 0x8 */
  5964. __IO uint32_t CTRL; /**< CRC Control register, offset: 0x8 */
  5965. struct { /* offset: 0x8 */
  5966. uint8_t RESERVED_0[3];
  5967. __IO uint8_t CTRLHU; /**< CRC_CTRLHU register., offset: 0xB */
  5968. } CTRL_ACCESS8BIT;
  5969. };
  5970. } CRC_Type;
  5971. /* ----------------------------------------------------------------------------
  5972. -- CRC Register Masks
  5973. ---------------------------------------------------------------------------- */
  5974. /*!
  5975. * @addtogroup CRC_Register_Masks CRC Register Masks
  5976. * @{
  5977. */
  5978. /*! @name DATAL - CRC_DATAL register. */
  5979. /*! @{ */
  5980. #define CRC_DATAL_DATAL_MASK (0xFFFFU)
  5981. #define CRC_DATAL_DATAL_SHIFT (0U)
  5982. #define CRC_DATAL_DATAL(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAL_DATAL_SHIFT)) & CRC_DATAL_DATAL_MASK)
  5983. /*! @} */
  5984. /*! @name DATAH - CRC_DATAH register. */
  5985. /*! @{ */
  5986. #define CRC_DATAH_DATAH_MASK (0xFFFFU)
  5987. #define CRC_DATAH_DATAH_SHIFT (0U)
  5988. #define CRC_DATAH_DATAH(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAH_DATAH_SHIFT)) & CRC_DATAH_DATAH_MASK)
  5989. /*! @} */
  5990. /*! @name DATA - CRC Data register */
  5991. /*! @{ */
  5992. #define CRC_DATA_LL_MASK (0xFFU)
  5993. #define CRC_DATA_LL_SHIFT (0U)
  5994. #define CRC_DATA_LL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LL_SHIFT)) & CRC_DATA_LL_MASK)
  5995. #define CRC_DATA_LU_MASK (0xFF00U)
  5996. #define CRC_DATA_LU_SHIFT (8U)
  5997. #define CRC_DATA_LU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LU_SHIFT)) & CRC_DATA_LU_MASK)
  5998. #define CRC_DATA_HL_MASK (0xFF0000U)
  5999. #define CRC_DATA_HL_SHIFT (16U)
  6000. #define CRC_DATA_HL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HL_SHIFT)) & CRC_DATA_HL_MASK)
  6001. #define CRC_DATA_HU_MASK (0xFF000000U)
  6002. #define CRC_DATA_HU_SHIFT (24U)
  6003. #define CRC_DATA_HU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HU_SHIFT)) & CRC_DATA_HU_MASK)
  6004. /*! @} */
  6005. /*! @name DATALL - CRC_DATALL register. */
  6006. /*! @{ */
  6007. #define CRC_DATALL_DATALL_MASK (0xFFU)
  6008. #define CRC_DATALL_DATALL_SHIFT (0U)
  6009. #define CRC_DATALL_DATALL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALL_DATALL_SHIFT)) & CRC_DATALL_DATALL_MASK)
  6010. /*! @} */
  6011. /*! @name DATALU - CRC_DATALU register. */
  6012. /*! @{ */
  6013. #define CRC_DATALU_DATALU_MASK (0xFFU)
  6014. #define CRC_DATALU_DATALU_SHIFT (0U)
  6015. #define CRC_DATALU_DATALU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALU_DATALU_SHIFT)) & CRC_DATALU_DATALU_MASK)
  6016. /*! @} */
  6017. /*! @name DATAHL - CRC_DATAHL register. */
  6018. /*! @{ */
  6019. #define CRC_DATAHL_DATAHL_MASK (0xFFU)
  6020. #define CRC_DATAHL_DATAHL_SHIFT (0U)
  6021. #define CRC_DATAHL_DATAHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHL_DATAHL_SHIFT)) & CRC_DATAHL_DATAHL_MASK)
  6022. /*! @} */
  6023. /*! @name DATAHU - CRC_DATAHU register. */
  6024. /*! @{ */
  6025. #define CRC_DATAHU_DATAHU_MASK (0xFFU)
  6026. #define CRC_DATAHU_DATAHU_SHIFT (0U)
  6027. #define CRC_DATAHU_DATAHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHU_DATAHU_SHIFT)) & CRC_DATAHU_DATAHU_MASK)
  6028. /*! @} */
  6029. /*! @name GPOLYL - CRC_GPOLYL register. */
  6030. /*! @{ */
  6031. #define CRC_GPOLYL_GPOLYL_MASK (0xFFFFU)
  6032. #define CRC_GPOLYL_GPOLYL_SHIFT (0U)
  6033. #define CRC_GPOLYL_GPOLYL(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYL_GPOLYL_SHIFT)) & CRC_GPOLYL_GPOLYL_MASK)
  6034. /*! @} */
  6035. /*! @name GPOLYH - CRC_GPOLYH register. */
  6036. /*! @{ */
  6037. #define CRC_GPOLYH_GPOLYH_MASK (0xFFFFU)
  6038. #define CRC_GPOLYH_GPOLYH_SHIFT (0U)
  6039. #define CRC_GPOLYH_GPOLYH(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYH_GPOLYH_SHIFT)) & CRC_GPOLYH_GPOLYH_MASK)
  6040. /*! @} */
  6041. /*! @name GPOLY - CRC Polynomial register */
  6042. /*! @{ */
  6043. #define CRC_GPOLY_LOW_MASK (0xFFFFU)
  6044. #define CRC_GPOLY_LOW_SHIFT (0U)
  6045. #define CRC_GPOLY_LOW(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_LOW_SHIFT)) & CRC_GPOLY_LOW_MASK)
  6046. #define CRC_GPOLY_HIGH_MASK (0xFFFF0000U)
  6047. #define CRC_GPOLY_HIGH_SHIFT (16U)
  6048. #define CRC_GPOLY_HIGH(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_HIGH_SHIFT)) & CRC_GPOLY_HIGH_MASK)
  6049. /*! @} */
  6050. /*! @name GPOLYLL - CRC_GPOLYLL register. */
  6051. /*! @{ */
  6052. #define CRC_GPOLYLL_GPOLYLL_MASK (0xFFU)
  6053. #define CRC_GPOLYLL_GPOLYLL_SHIFT (0U)
  6054. #define CRC_GPOLYLL_GPOLYLL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLL_GPOLYLL_SHIFT)) & CRC_GPOLYLL_GPOLYLL_MASK)
  6055. /*! @} */
  6056. /*! @name GPOLYLU - CRC_GPOLYLU register. */
  6057. /*! @{ */
  6058. #define CRC_GPOLYLU_GPOLYLU_MASK (0xFFU)
  6059. #define CRC_GPOLYLU_GPOLYLU_SHIFT (0U)
  6060. #define CRC_GPOLYLU_GPOLYLU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLU_GPOLYLU_SHIFT)) & CRC_GPOLYLU_GPOLYLU_MASK)
  6061. /*! @} */
  6062. /*! @name GPOLYHL - CRC_GPOLYHL register. */
  6063. /*! @{ */
  6064. #define CRC_GPOLYHL_GPOLYHL_MASK (0xFFU)
  6065. #define CRC_GPOLYHL_GPOLYHL_SHIFT (0U)
  6066. #define CRC_GPOLYHL_GPOLYHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHL_GPOLYHL_SHIFT)) & CRC_GPOLYHL_GPOLYHL_MASK)
  6067. /*! @} */
  6068. /*! @name GPOLYHU - CRC_GPOLYHU register. */
  6069. /*! @{ */
  6070. #define CRC_GPOLYHU_GPOLYHU_MASK (0xFFU)
  6071. #define CRC_GPOLYHU_GPOLYHU_SHIFT (0U)
  6072. #define CRC_GPOLYHU_GPOLYHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHU_GPOLYHU_SHIFT)) & CRC_GPOLYHU_GPOLYHU_MASK)
  6073. /*! @} */
  6074. /*! @name CTRL - CRC Control register */
  6075. /*! @{ */
  6076. #define CRC_CTRL_TCRC_MASK (0x1000000U)
  6077. #define CRC_CTRL_TCRC_SHIFT (24U)
  6078. /*! TCRC
  6079. * 0b0..16-bit CRC protocol.
  6080. * 0b1..32-bit CRC protocol.
  6081. */
  6082. #define CRC_CTRL_TCRC(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TCRC_SHIFT)) & CRC_CTRL_TCRC_MASK)
  6083. #define CRC_CTRL_WAS_MASK (0x2000000U)
  6084. #define CRC_CTRL_WAS_SHIFT (25U)
  6085. /*! WAS - Write CRC Data Register As Seed
  6086. * 0b0..Writes to the CRC data register are data values.
  6087. * 0b1..Writes to the CRC data register are seed values.
  6088. */
  6089. #define CRC_CTRL_WAS(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_WAS_SHIFT)) & CRC_CTRL_WAS_MASK)
  6090. #define CRC_CTRL_FXOR_MASK (0x4000000U)
  6091. #define CRC_CTRL_FXOR_SHIFT (26U)
  6092. /*! FXOR - Complement Read Of CRC Data Register
  6093. * 0b0..No XOR on reading.
  6094. * 0b1..Invert or complement the read value of the CRC Data register.
  6095. */
  6096. #define CRC_CTRL_FXOR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_FXOR_SHIFT)) & CRC_CTRL_FXOR_MASK)
  6097. #define CRC_CTRL_TOTR_MASK (0x30000000U)
  6098. #define CRC_CTRL_TOTR_SHIFT (28U)
  6099. /*! TOTR - Type Of Transpose For Read
  6100. * 0b00..No transposition.
  6101. * 0b01..Bits in bytes are transposed; bytes are not transposed.
  6102. * 0b10..Both bits in bytes and bytes are transposed.
  6103. * 0b11..Only bytes are transposed; no bits in a byte are transposed.
  6104. */
  6105. #define CRC_CTRL_TOTR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOTR_SHIFT)) & CRC_CTRL_TOTR_MASK)
  6106. #define CRC_CTRL_TOT_MASK (0xC0000000U)
  6107. #define CRC_CTRL_TOT_SHIFT (30U)
  6108. /*! TOT - Type Of Transpose For Writes
  6109. * 0b00..No transposition.
  6110. * 0b01..Bits in bytes are transposed; bytes are not transposed.
  6111. * 0b10..Both bits in bytes and bytes are transposed.
  6112. * 0b11..Only bytes are transposed; no bits in a byte are transposed.
  6113. */
  6114. #define CRC_CTRL_TOT(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOT_SHIFT)) & CRC_CTRL_TOT_MASK)
  6115. /*! @} */
  6116. /*! @name CTRLHU - CRC_CTRLHU register. */
  6117. /*! @{ */
  6118. #define CRC_CTRLHU_TCRC_MASK (0x1U)
  6119. #define CRC_CTRLHU_TCRC_SHIFT (0U)
  6120. /*! TCRC
  6121. * 0b0..16-bit CRC protocol.
  6122. * 0b1..32-bit CRC protocol.
  6123. */
  6124. #define CRC_CTRLHU_TCRC(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TCRC_SHIFT)) & CRC_CTRLHU_TCRC_MASK)
  6125. #define CRC_CTRLHU_WAS_MASK (0x2U)
  6126. #define CRC_CTRLHU_WAS_SHIFT (1U)
  6127. /*! WAS
  6128. * 0b0..Writes to CRC data register are data values.
  6129. * 0b1..Writes to CRC data reguster are seed values.
  6130. */
  6131. #define CRC_CTRLHU_WAS(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_WAS_SHIFT)) & CRC_CTRLHU_WAS_MASK)
  6132. #define CRC_CTRLHU_FXOR_MASK (0x4U)
  6133. #define CRC_CTRLHU_FXOR_SHIFT (2U)
  6134. /*! FXOR
  6135. * 0b0..No XOR on reading.
  6136. * 0b1..Invert or complement the read value of CRC data register.
  6137. */
  6138. #define CRC_CTRLHU_FXOR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_FXOR_SHIFT)) & CRC_CTRLHU_FXOR_MASK)
  6139. #define CRC_CTRLHU_TOTR_MASK (0x30U)
  6140. #define CRC_CTRLHU_TOTR_SHIFT (4U)
  6141. /*! TOTR
  6142. * 0b00..No Transposition.
  6143. * 0b01..Bits in bytes are transposed, bytes are not transposed.
  6144. * 0b10..Both bits in bytes and bytes are transposed.
  6145. * 0b11..Only bytes are transposed; no bits in a byte are transposed.
  6146. */
  6147. #define CRC_CTRLHU_TOTR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOTR_SHIFT)) & CRC_CTRLHU_TOTR_MASK)
  6148. #define CRC_CTRLHU_TOT_MASK (0xC0U)
  6149. #define CRC_CTRLHU_TOT_SHIFT (6U)
  6150. /*! TOT
  6151. * 0b00..No Transposition.
  6152. * 0b01..Bits in bytes are transposed, bytes are not transposed.
  6153. * 0b10..Both bits in bytes and bytes are transposed.
  6154. * 0b11..Only bytes are transposed; no bits in a byte are transposed.
  6155. */
  6156. #define CRC_CTRLHU_TOT(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOT_SHIFT)) & CRC_CTRLHU_TOT_MASK)
  6157. /*! @} */
  6158. /*!
  6159. * @}
  6160. */ /* end of group CRC_Register_Masks */
  6161. /* CRC - Peripheral instance base addresses */
  6162. /** Peripheral CRC base address */
  6163. #define CRC_BASE (0x40032000u)
  6164. /** Peripheral CRC base pointer */
  6165. #define CRC0 ((CRC_Type *)CRC_BASE)
  6166. /** Array initializer of CRC peripheral base addresses */
  6167. #define CRC_BASE_ADDRS { CRC_BASE }
  6168. /** Array initializer of CRC peripheral base pointers */
  6169. #define CRC_BASE_PTRS { CRC0 }
  6170. /*!
  6171. * @}
  6172. */ /* end of group CRC_Peripheral_Access_Layer */
  6173. /* ----------------------------------------------------------------------------
  6174. -- DAC Peripheral Access Layer
  6175. ---------------------------------------------------------------------------- */
  6176. /*!
  6177. * @addtogroup DAC_Peripheral_Access_Layer DAC Peripheral Access Layer
  6178. * @{
  6179. */
  6180. /** DAC - Register Layout Typedef */
  6181. typedef struct {
  6182. struct { /* offset: 0x0, array step: 0x2 */
  6183. __IO uint8_t DATL; /**< DAC Data Low Register, array offset: 0x0, array step: 0x2 */
  6184. __IO uint8_t DATH; /**< DAC Data High Register, array offset: 0x1, array step: 0x2 */
  6185. } DAT[16];
  6186. __IO uint8_t SR; /**< DAC Status Register, offset: 0x20 */
  6187. __IO uint8_t C0; /**< DAC Control Register, offset: 0x21 */
  6188. __IO uint8_t C1; /**< DAC Control Register 1, offset: 0x22 */
  6189. __IO uint8_t C2; /**< DAC Control Register 2, offset: 0x23 */
  6190. } DAC_Type;
  6191. /* ----------------------------------------------------------------------------
  6192. -- DAC Register Masks
  6193. ---------------------------------------------------------------------------- */
  6194. /*!
  6195. * @addtogroup DAC_Register_Masks DAC Register Masks
  6196. * @{
  6197. */
  6198. /*! @name DATL - DAC Data Low Register */
  6199. /*! @{ */
  6200. #define DAC_DATL_DATA0_MASK (0xFFU)
  6201. #define DAC_DATL_DATA0_SHIFT (0U)
  6202. #define DAC_DATL_DATA0(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATL_DATA0_SHIFT)) & DAC_DATL_DATA0_MASK)
  6203. /*! @} */
  6204. /* The count of DAC_DATL */
  6205. #define DAC_DATL_COUNT (16U)
  6206. /*! @name DATH - DAC Data High Register */
  6207. /*! @{ */
  6208. #define DAC_DATH_DATA1_MASK (0xFU)
  6209. #define DAC_DATH_DATA1_SHIFT (0U)
  6210. #define DAC_DATH_DATA1(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATH_DATA1_SHIFT)) & DAC_DATH_DATA1_MASK)
  6211. /*! @} */
  6212. /* The count of DAC_DATH */
  6213. #define DAC_DATH_COUNT (16U)
  6214. /*! @name SR - DAC Status Register */
  6215. /*! @{ */
  6216. #define DAC_SR_DACBFRPBF_MASK (0x1U)
  6217. #define DAC_SR_DACBFRPBF_SHIFT (0U)
  6218. /*! DACBFRPBF - DAC Buffer Read Pointer Bottom Position Flag
  6219. * 0b0..The DAC buffer read pointer is not equal to C2[DACBFUP].
  6220. * 0b1..The DAC buffer read pointer is equal to C2[DACBFUP].
  6221. */
  6222. #define DAC_SR_DACBFRPBF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPBF_SHIFT)) & DAC_SR_DACBFRPBF_MASK)
  6223. #define DAC_SR_DACBFRPTF_MASK (0x2U)
  6224. #define DAC_SR_DACBFRPTF_SHIFT (1U)
  6225. /*! DACBFRPTF - DAC Buffer Read Pointer Top Position Flag
  6226. * 0b0..The DAC buffer read pointer is not zero.
  6227. * 0b1..The DAC buffer read pointer is zero.
  6228. */
  6229. #define DAC_SR_DACBFRPTF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPTF_SHIFT)) & DAC_SR_DACBFRPTF_MASK)
  6230. #define DAC_SR_DACBFWMF_MASK (0x4U)
  6231. #define DAC_SR_DACBFWMF_SHIFT (2U)
  6232. /*! DACBFWMF - DAC Buffer Watermark Flag
  6233. * 0b0..The DAC buffer read pointer has not reached the watermark level.
  6234. * 0b1..The DAC buffer read pointer has reached the watermark level.
  6235. */
  6236. #define DAC_SR_DACBFWMF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFWMF_SHIFT)) & DAC_SR_DACBFWMF_MASK)
  6237. /*! @} */
  6238. /*! @name C0 - DAC Control Register */
  6239. /*! @{ */
  6240. #define DAC_C0_DACBBIEN_MASK (0x1U)
  6241. #define DAC_C0_DACBBIEN_SHIFT (0U)
  6242. /*! DACBBIEN - DAC Buffer Read Pointer Bottom Flag Interrupt Enable
  6243. * 0b0..The DAC buffer read pointer bottom flag interrupt is disabled.
  6244. * 0b1..The DAC buffer read pointer bottom flag interrupt is enabled.
  6245. */
  6246. #define DAC_C0_DACBBIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBBIEN_SHIFT)) & DAC_C0_DACBBIEN_MASK)
  6247. #define DAC_C0_DACBTIEN_MASK (0x2U)
  6248. #define DAC_C0_DACBTIEN_SHIFT (1U)
  6249. /*! DACBTIEN - DAC Buffer Read Pointer Top Flag Interrupt Enable
  6250. * 0b0..The DAC buffer read pointer top flag interrupt is disabled.
  6251. * 0b1..The DAC buffer read pointer top flag interrupt is enabled.
  6252. */
  6253. #define DAC_C0_DACBTIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBTIEN_SHIFT)) & DAC_C0_DACBTIEN_MASK)
  6254. #define DAC_C0_DACBWIEN_MASK (0x4U)
  6255. #define DAC_C0_DACBWIEN_SHIFT (2U)
  6256. /*! DACBWIEN - DAC Buffer Watermark Interrupt Enable
  6257. * 0b0..The DAC buffer watermark interrupt is disabled.
  6258. * 0b1..The DAC buffer watermark interrupt is enabled.
  6259. */
  6260. #define DAC_C0_DACBWIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBWIEN_SHIFT)) & DAC_C0_DACBWIEN_MASK)
  6261. #define DAC_C0_LPEN_MASK (0x8U)
  6262. #define DAC_C0_LPEN_SHIFT (3U)
  6263. /*! LPEN - DAC Low Power Control
  6264. * 0b0..High-Power mode
  6265. * 0b1..Low-Power mode
  6266. */
  6267. #define DAC_C0_LPEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_LPEN_SHIFT)) & DAC_C0_LPEN_MASK)
  6268. #define DAC_C0_DACSWTRG_MASK (0x10U)
  6269. #define DAC_C0_DACSWTRG_SHIFT (4U)
  6270. /*! DACSWTRG - DAC Software Trigger
  6271. * 0b0..The DAC soft trigger is not valid.
  6272. * 0b1..The DAC soft trigger is valid.
  6273. */
  6274. #define DAC_C0_DACSWTRG(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACSWTRG_SHIFT)) & DAC_C0_DACSWTRG_MASK)
  6275. #define DAC_C0_DACTRGSEL_MASK (0x20U)
  6276. #define DAC_C0_DACTRGSEL_SHIFT (5U)
  6277. /*! DACTRGSEL - DAC Trigger Select
  6278. * 0b0..The DAC hardware trigger is selected.
  6279. * 0b1..The DAC software trigger is selected.
  6280. */
  6281. #define DAC_C0_DACTRGSEL(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACTRGSEL_SHIFT)) & DAC_C0_DACTRGSEL_MASK)
  6282. #define DAC_C0_DACRFS_MASK (0x40U)
  6283. #define DAC_C0_DACRFS_SHIFT (6U)
  6284. /*! DACRFS - DAC Reference Select
  6285. * 0b0..The DAC selects DACREF_1 as the reference voltage.
  6286. * 0b1..The DAC selects DACREF_2 as the reference voltage.
  6287. */
  6288. #define DAC_C0_DACRFS(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACRFS_SHIFT)) & DAC_C0_DACRFS_MASK)
  6289. #define DAC_C0_DACEN_MASK (0x80U)
  6290. #define DAC_C0_DACEN_SHIFT (7U)
  6291. /*! DACEN - DAC Enable
  6292. * 0b0..The DAC system is disabled.
  6293. * 0b1..The DAC system is enabled.
  6294. */
  6295. #define DAC_C0_DACEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACEN_SHIFT)) & DAC_C0_DACEN_MASK)
  6296. /*! @} */
  6297. /*! @name C1 - DAC Control Register 1 */
  6298. /*! @{ */
  6299. #define DAC_C1_DACBFEN_MASK (0x1U)
  6300. #define DAC_C1_DACBFEN_SHIFT (0U)
  6301. /*! DACBFEN - DAC Buffer Enable
  6302. * 0b0..Buffer read pointer is disabled. The converted data is always the first word of the buffer.
  6303. * 0b1..Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer.
  6304. */
  6305. #define DAC_C1_DACBFEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFEN_SHIFT)) & DAC_C1_DACBFEN_MASK)
  6306. #define DAC_C1_DACBFMD_MASK (0x6U)
  6307. #define DAC_C1_DACBFMD_SHIFT (1U)
  6308. /*! DACBFMD - DAC Buffer Work Mode Select
  6309. * 0b00..Normal mode
  6310. * 0b01..Swing mode
  6311. * 0b10..One-Time Scan mode
  6312. * 0b11..FIFO mode
  6313. */
  6314. #define DAC_C1_DACBFMD(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFMD_SHIFT)) & DAC_C1_DACBFMD_MASK)
  6315. #define DAC_C1_DACBFWM_MASK (0x18U)
  6316. #define DAC_C1_DACBFWM_SHIFT (3U)
  6317. /*! DACBFWM - DAC Buffer Watermark Select
  6318. * 0b00..In normal mode, 1 word . In FIFO mode, 2 or less than 2 data remaining in FIFO will set watermark status bit.
  6319. * 0b01..In normal mode, 2 words . In FIFO mode, Max/4 or less than Max/4 data remaining in FIFO will set watermark status bit.
  6320. * 0b10..In normal mode, 3 words . In FIFO mode, Max/2 or less than Max/2 data remaining in FIFO will set watermark status bit.
  6321. * 0b11..In normal mode, 4 words . In FIFO mode, Max-2 or less than Max-2 data remaining in FIFO will set watermark status bit.
  6322. */
  6323. #define DAC_C1_DACBFWM(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFWM_SHIFT)) & DAC_C1_DACBFWM_MASK)
  6324. #define DAC_C1_DMAEN_MASK (0x80U)
  6325. #define DAC_C1_DMAEN_SHIFT (7U)
  6326. /*! DMAEN - DMA Enable Select
  6327. * 0b0..DMA is disabled.
  6328. * 0b1..DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time.
  6329. */
  6330. #define DAC_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DMAEN_SHIFT)) & DAC_C1_DMAEN_MASK)
  6331. /*! @} */
  6332. /*! @name C2 - DAC Control Register 2 */
  6333. /*! @{ */
  6334. #define DAC_C2_DACBFUP_MASK (0xFU)
  6335. #define DAC_C2_DACBFUP_SHIFT (0U)
  6336. #define DAC_C2_DACBFUP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFUP_SHIFT)) & DAC_C2_DACBFUP_MASK)
  6337. #define DAC_C2_DACBFRP_MASK (0xF0U)
  6338. #define DAC_C2_DACBFRP_SHIFT (4U)
  6339. #define DAC_C2_DACBFRP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFRP_SHIFT)) & DAC_C2_DACBFRP_MASK)
  6340. /*! @} */
  6341. /*!
  6342. * @}
  6343. */ /* end of group DAC_Register_Masks */
  6344. /* DAC - Peripheral instance base addresses */
  6345. /** Peripheral DAC0 base address */
  6346. #define DAC0_BASE (0x4003F000u)
  6347. /** Peripheral DAC0 base pointer */
  6348. #define DAC0 ((DAC_Type *)DAC0_BASE)
  6349. /** Array initializer of DAC peripheral base addresses */
  6350. #define DAC_BASE_ADDRS { DAC0_BASE }
  6351. /** Array initializer of DAC peripheral base pointers */
  6352. #define DAC_BASE_PTRS { DAC0 }
  6353. /** Interrupt vectors for the DAC peripheral type */
  6354. #define DAC_IRQS { DAC0_IRQn }
  6355. /*!
  6356. * @}
  6357. */ /* end of group DAC_Peripheral_Access_Layer */
  6358. /* ----------------------------------------------------------------------------
  6359. -- DMA Peripheral Access Layer
  6360. ---------------------------------------------------------------------------- */
  6361. /*!
  6362. * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
  6363. * @{
  6364. */
  6365. /** DMA - Register Layout Typedef */
  6366. typedef struct {
  6367. __IO uint32_t CR; /**< Control Register, offset: 0x0 */
  6368. __I uint32_t ES; /**< Error Status Register, offset: 0x4 */
  6369. uint8_t RESERVED_0[4];
  6370. __IO uint32_t ERQ; /**< Enable Request Register, offset: 0xC */
  6371. uint8_t RESERVED_1[4];
  6372. __IO uint32_t EEI; /**< Enable Error Interrupt Register, offset: 0x14 */
  6373. __O uint8_t CEEI; /**< Clear Enable Error Interrupt Register, offset: 0x18 */
  6374. __O uint8_t SEEI; /**< Set Enable Error Interrupt Register, offset: 0x19 */
  6375. __O uint8_t CERQ; /**< Clear Enable Request Register, offset: 0x1A */
  6376. __O uint8_t SERQ; /**< Set Enable Request Register, offset: 0x1B */
  6377. __O uint8_t CDNE; /**< Clear DONE Status Bit Register, offset: 0x1C */
  6378. __O uint8_t SSRT; /**< Set START Bit Register, offset: 0x1D */
  6379. __O uint8_t CERR; /**< Clear Error Register, offset: 0x1E */
  6380. __O uint8_t CINT; /**< Clear Interrupt Request Register, offset: 0x1F */
  6381. uint8_t RESERVED_2[4];
  6382. __IO uint32_t INT; /**< Interrupt Request Register, offset: 0x24 */
  6383. uint8_t RESERVED_3[4];
  6384. __IO uint32_t ERR; /**< Error Register, offset: 0x2C */
  6385. uint8_t RESERVED_4[4];
  6386. __I uint32_t HRS; /**< Hardware Request Status Register, offset: 0x34 */
  6387. uint8_t RESERVED_5[12];
  6388. __IO uint32_t EARS; /**< Enable Asynchronous Request in Stop Register, offset: 0x44 */
  6389. uint8_t RESERVED_6[184];
  6390. __IO uint8_t DCHPRI3; /**< Channel n Priority Register, offset: 0x100 */
  6391. __IO uint8_t DCHPRI2; /**< Channel n Priority Register, offset: 0x101 */
  6392. __IO uint8_t DCHPRI1; /**< Channel n Priority Register, offset: 0x102 */
  6393. __IO uint8_t DCHPRI0; /**< Channel n Priority Register, offset: 0x103 */
  6394. __IO uint8_t DCHPRI7; /**< Channel n Priority Register, offset: 0x104 */
  6395. __IO uint8_t DCHPRI6; /**< Channel n Priority Register, offset: 0x105 */
  6396. __IO uint8_t DCHPRI5; /**< Channel n Priority Register, offset: 0x106 */
  6397. __IO uint8_t DCHPRI4; /**< Channel n Priority Register, offset: 0x107 */
  6398. __IO uint8_t DCHPRI11; /**< Channel n Priority Register, offset: 0x108 */
  6399. __IO uint8_t DCHPRI10; /**< Channel n Priority Register, offset: 0x109 */
  6400. __IO uint8_t DCHPRI9; /**< Channel n Priority Register, offset: 0x10A */
  6401. __IO uint8_t DCHPRI8; /**< Channel n Priority Register, offset: 0x10B */
  6402. __IO uint8_t DCHPRI15; /**< Channel n Priority Register, offset: 0x10C */
  6403. __IO uint8_t DCHPRI14; /**< Channel n Priority Register, offset: 0x10D */
  6404. __IO uint8_t DCHPRI13; /**< Channel n Priority Register, offset: 0x10E */
  6405. __IO uint8_t DCHPRI12; /**< Channel n Priority Register, offset: 0x10F */
  6406. __IO uint8_t DCHPRI19; /**< Channel n Priority Register, offset: 0x110 */
  6407. __IO uint8_t DCHPRI18; /**< Channel n Priority Register, offset: 0x111 */
  6408. __IO uint8_t DCHPRI17; /**< Channel n Priority Register, offset: 0x112 */
  6409. __IO uint8_t DCHPRI16; /**< Channel n Priority Register, offset: 0x113 */
  6410. __IO uint8_t DCHPRI23; /**< Channel n Priority Register, offset: 0x114 */
  6411. __IO uint8_t DCHPRI22; /**< Channel n Priority Register, offset: 0x115 */
  6412. __IO uint8_t DCHPRI21; /**< Channel n Priority Register, offset: 0x116 */
  6413. __IO uint8_t DCHPRI20; /**< Channel n Priority Register, offset: 0x117 */
  6414. __IO uint8_t DCHPRI27; /**< Channel n Priority Register, offset: 0x118 */
  6415. __IO uint8_t DCHPRI26; /**< Channel n Priority Register, offset: 0x119 */
  6416. __IO uint8_t DCHPRI25; /**< Channel n Priority Register, offset: 0x11A */
  6417. __IO uint8_t DCHPRI24; /**< Channel n Priority Register, offset: 0x11B */
  6418. __IO uint8_t DCHPRI31; /**< Channel n Priority Register, offset: 0x11C */
  6419. __IO uint8_t DCHPRI30; /**< Channel n Priority Register, offset: 0x11D */
  6420. __IO uint8_t DCHPRI29; /**< Channel n Priority Register, offset: 0x11E */
  6421. __IO uint8_t DCHPRI28; /**< Channel n Priority Register, offset: 0x11F */
  6422. uint8_t RESERVED_7[3808];
  6423. struct { /* offset: 0x1000, array step: 0x20 */
  6424. __IO uint32_t SADDR; /**< TCD Source Address, array offset: 0x1000, array step: 0x20 */
  6425. __IO uint16_t SOFF; /**< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20 */
  6426. __IO uint16_t ATTR; /**< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20 */
  6427. union { /* offset: 0x1008, array step: 0x20 */
  6428. __IO uint32_t NBYTES_MLNO; /**< TCD Minor Byte Count (Minor Loop Mapping Disabled), array offset: 0x1008, array step: 0x20 */
  6429. __IO uint32_t NBYTES_MLOFFNO; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled), array offset: 0x1008, array step: 0x20 */
  6430. __IO uint32_t NBYTES_MLOFFYES; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled), array offset: 0x1008, array step: 0x20 */
  6431. };
  6432. __IO uint32_t SLAST; /**< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20 */
  6433. __IO uint32_t DADDR; /**< TCD Destination Address, array offset: 0x1010, array step: 0x20 */
  6434. __IO uint16_t DOFF; /**< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20 */
  6435. union { /* offset: 0x1016, array step: 0x20 */
  6436. __IO uint16_t CITER_ELINKNO; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20 */
  6437. __IO uint16_t CITER_ELINKYES; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x1016, array step: 0x20 */
  6438. };
  6439. __IO uint32_t DLAST_SGA; /**< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20 */
  6440. __IO uint16_t CSR; /**< TCD Control and Status, array offset: 0x101C, array step: 0x20 */
  6441. union { /* offset: 0x101E, array step: 0x20 */
  6442. __IO uint16_t BITER_ELINKNO; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20 */
  6443. __IO uint16_t BITER_ELINKYES; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x101E, array step: 0x20 */
  6444. };
  6445. } TCD[32];
  6446. } DMA_Type;
  6447. /* ----------------------------------------------------------------------------
  6448. -- DMA Register Masks
  6449. ---------------------------------------------------------------------------- */
  6450. /*!
  6451. * @addtogroup DMA_Register_Masks DMA Register Masks
  6452. * @{
  6453. */
  6454. /*! @name CR - Control Register */
  6455. /*! @{ */
  6456. #define DMA_CR_EDBG_MASK (0x2U)
  6457. #define DMA_CR_EDBG_SHIFT (1U)
  6458. /*! EDBG - Enable Debug
  6459. * 0b0..When in debug mode, the DMA continues to operate.
  6460. * 0b1..When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to complete. Channel execution resumes when the system exits debug mode or the EDBG bit is cleared.
  6461. */
  6462. #define DMA_CR_EDBG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EDBG_SHIFT)) & DMA_CR_EDBG_MASK)
  6463. #define DMA_CR_ERCA_MASK (0x4U)
  6464. #define DMA_CR_ERCA_SHIFT (2U)
  6465. /*! ERCA - Enable Round Robin Channel Arbitration
  6466. * 0b0..Fixed priority arbitration is used for channel selection within each group.
  6467. * 0b1..Round robin arbitration is used for channel selection within each group.
  6468. */
  6469. #define DMA_CR_ERCA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERCA_SHIFT)) & DMA_CR_ERCA_MASK)
  6470. #define DMA_CR_ERGA_MASK (0x8U)
  6471. #define DMA_CR_ERGA_SHIFT (3U)
  6472. /*! ERGA - Enable Round Robin Group Arbitration
  6473. * 0b0..Fixed priority arbitration is used for selection among the groups.
  6474. * 0b1..Round robin arbitration is used for selection among the groups.
  6475. */
  6476. #define DMA_CR_ERGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERGA_SHIFT)) & DMA_CR_ERGA_MASK)
  6477. #define DMA_CR_HOE_MASK (0x10U)
  6478. #define DMA_CR_HOE_SHIFT (4U)
  6479. /*! HOE - Halt On Error
  6480. * 0b0..Normal operation
  6481. * 0b1..Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared.
  6482. */
  6483. #define DMA_CR_HOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HOE_SHIFT)) & DMA_CR_HOE_MASK)
  6484. #define DMA_CR_HALT_MASK (0x20U)
  6485. #define DMA_CR_HALT_SHIFT (5U)
  6486. /*! HALT - Halt DMA Operations
  6487. * 0b0..Normal operation
  6488. * 0b1..Stall the start of any new channels. Executing channels are allowed to complete. Channel execution resumes when this bit is cleared.
  6489. */
  6490. #define DMA_CR_HALT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HALT_SHIFT)) & DMA_CR_HALT_MASK)
  6491. #define DMA_CR_CLM_MASK (0x40U)
  6492. #define DMA_CR_CLM_SHIFT (6U)
  6493. /*! CLM - Continuous Link Mode
  6494. * 0b0..A minor loop channel link made to itself goes through channel arbitration before being activated again.
  6495. * 0b1..A minor loop channel link made to itself does not go through channel arbitration before being activated again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel link enabled and the link channel is itself. This effectively applies the minor loop offsets and restarts the next minor loop.
  6496. */
  6497. #define DMA_CR_CLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CLM_SHIFT)) & DMA_CR_CLM_MASK)
  6498. #define DMA_CR_EMLM_MASK (0x80U)
  6499. #define DMA_CR_EMLM_SHIFT (7U)
  6500. /*! EMLM - Enable Minor Loop Mapping
  6501. * 0b0..Disabled. TCDn.word2 is defined as a 32-bit NBYTES field.
  6502. * 0b1..Enabled. TCDn.word2 is redefined to include individual enable fields, an offset field, and the NBYTES field. The individual enable fields allow the minor loop offset to be applied to the source address, the destination address, or both. The NBYTES field is reduced when either offset is enabled.
  6503. */
  6504. #define DMA_CR_EMLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EMLM_SHIFT)) & DMA_CR_EMLM_MASK)
  6505. #define DMA_CR_GRP0PRI_MASK (0x100U)
  6506. #define DMA_CR_GRP0PRI_SHIFT (8U)
  6507. #define DMA_CR_GRP0PRI(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_GRP0PRI_SHIFT)) & DMA_CR_GRP0PRI_MASK)
  6508. #define DMA_CR_GRP1PRI_MASK (0x400U)
  6509. #define DMA_CR_GRP1PRI_SHIFT (10U)
  6510. #define DMA_CR_GRP1PRI(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_GRP1PRI_SHIFT)) & DMA_CR_GRP1PRI_MASK)
  6511. #define DMA_CR_ECX_MASK (0x10000U)
  6512. #define DMA_CR_ECX_SHIFT (16U)
  6513. /*! ECX - Error Cancel Transfer
  6514. * 0b0..Normal operation
  6515. * 0b1..Cancel the remaining data transfer in the same fashion as the CX bit. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX treats the cancel as an error condition, thus updating the Error Status register (DMAx_ES) and generating an optional error interrupt.
  6516. */
  6517. #define DMA_CR_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ECX_SHIFT)) & DMA_CR_ECX_MASK)
  6518. #define DMA_CR_CX_MASK (0x20000U)
  6519. #define DMA_CR_CX_SHIFT (17U)
  6520. /*! CX - Cancel Transfer
  6521. * 0b0..Normal operation
  6522. * 0b1..Cancel the remaining data transfer. Stop the executing channel and force the minor loop to finish. The cancel takes effect after the last write of the current read/write sequence. The CX bit clears itself after the cancel has been honored. This cancel retires the channel normally as if the minor loop was completed.
  6523. */
  6524. #define DMA_CR_CX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CX_SHIFT)) & DMA_CR_CX_MASK)
  6525. /*! @} */
  6526. /*! @name ES - Error Status Register */
  6527. /*! @{ */
  6528. #define DMA_ES_DBE_MASK (0x1U)
  6529. #define DMA_ES_DBE_SHIFT (0U)
  6530. /*! DBE - Destination Bus Error
  6531. * 0b0..No destination bus error
  6532. * 0b1..The last recorded error was a bus error on a destination write
  6533. */
  6534. #define DMA_ES_DBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DBE_SHIFT)) & DMA_ES_DBE_MASK)
  6535. #define DMA_ES_SBE_MASK (0x2U)
  6536. #define DMA_ES_SBE_SHIFT (1U)
  6537. /*! SBE - Source Bus Error
  6538. * 0b0..No source bus error
  6539. * 0b1..The last recorded error was a bus error on a source read
  6540. */
  6541. #define DMA_ES_SBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SBE_SHIFT)) & DMA_ES_SBE_MASK)
  6542. #define DMA_ES_SGE_MASK (0x4U)
  6543. #define DMA_ES_SGE_SHIFT (2U)
  6544. /*! SGE - Scatter/Gather Configuration Error
  6545. * 0b0..No scatter/gather configuration error
  6546. * 0b1..The last recorded error was a configuration error detected in the TCDn_DLASTSGA field. This field is checked at the beginning of a scatter/gather operation after major loop completion if TCDn_CSR[ESG] is enabled. TCDn_DLASTSGA is not on a 32 byte boundary.
  6547. */
  6548. #define DMA_ES_SGE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SGE_SHIFT)) & DMA_ES_SGE_MASK)
  6549. #define DMA_ES_NCE_MASK (0x8U)
  6550. #define DMA_ES_NCE_SHIFT (3U)
  6551. /*! NCE - NBYTES/CITER Configuration Error
  6552. * 0b0..No NBYTES/CITER configuration error
  6553. * 0b1..The last recorded error was a configuration error detected in the TCDn_NBYTES or TCDn_CITER fields. TCDn_NBYTES is not a multiple of TCDn_ATTR[SSIZE] and TCDn_ATTR[DSIZE], or TCDn_CITER[CITER] is equal to zero, or TCDn_CITER[ELINK] is not equal to TCDn_BITER[ELINK]
  6554. */
  6555. #define DMA_ES_NCE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_NCE_SHIFT)) & DMA_ES_NCE_MASK)
  6556. #define DMA_ES_DOE_MASK (0x10U)
  6557. #define DMA_ES_DOE_SHIFT (4U)
  6558. /*! DOE - Destination Offset Error
  6559. * 0b0..No destination offset configuration error
  6560. * 0b1..The last recorded error was a configuration error detected in the TCDn_DOFF field. TCDn_DOFF is inconsistent with TCDn_ATTR[DSIZE].
  6561. */
  6562. #define DMA_ES_DOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DOE_SHIFT)) & DMA_ES_DOE_MASK)
  6563. #define DMA_ES_DAE_MASK (0x20U)
  6564. #define DMA_ES_DAE_SHIFT (5U)
  6565. /*! DAE - Destination Address Error
  6566. * 0b0..No destination address configuration error
  6567. * 0b1..The last recorded error was a configuration error detected in the TCDn_DADDR field. TCDn_DADDR is inconsistent with TCDn_ATTR[DSIZE].
  6568. */
  6569. #define DMA_ES_DAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DAE_SHIFT)) & DMA_ES_DAE_MASK)
  6570. #define DMA_ES_SOE_MASK (0x40U)
  6571. #define DMA_ES_SOE_SHIFT (6U)
  6572. /*! SOE - Source Offset Error
  6573. * 0b0..No source offset configuration error
  6574. * 0b1..The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR[SSIZE].
  6575. */
  6576. #define DMA_ES_SOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SOE_SHIFT)) & DMA_ES_SOE_MASK)
  6577. #define DMA_ES_SAE_MASK (0x80U)
  6578. #define DMA_ES_SAE_SHIFT (7U)
  6579. /*! SAE - Source Address Error
  6580. * 0b0..No source address configuration error.
  6581. * 0b1..The last recorded error was a configuration error detected in the TCDn_SADDR field. TCDn_SADDR is inconsistent with TCDn_ATTR[SSIZE].
  6582. */
  6583. #define DMA_ES_SAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SAE_SHIFT)) & DMA_ES_SAE_MASK)
  6584. #define DMA_ES_ERRCHN_MASK (0x1F00U)
  6585. #define DMA_ES_ERRCHN_SHIFT (8U)
  6586. #define DMA_ES_ERRCHN(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ERRCHN_SHIFT)) & DMA_ES_ERRCHN_MASK)
  6587. #define DMA_ES_CPE_MASK (0x4000U)
  6588. #define DMA_ES_CPE_SHIFT (14U)
  6589. /*! CPE - Channel Priority Error
  6590. * 0b0..No channel priority error
  6591. * 0b1..The last recorded error was a configuration error in the channel priorities within a group. Channel priorities within a group are not unique.
  6592. */
  6593. #define DMA_ES_CPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_CPE_SHIFT)) & DMA_ES_CPE_MASK)
  6594. #define DMA_ES_GPE_MASK (0x8000U)
  6595. #define DMA_ES_GPE_SHIFT (15U)
  6596. /*! GPE - Group Priority Error
  6597. * 0b0..No group priority error
  6598. * 0b1..The last recorded error was a configuration error among the group priorities. All group priorities are not unique.
  6599. */
  6600. #define DMA_ES_GPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_GPE_SHIFT)) & DMA_ES_GPE_MASK)
  6601. #define DMA_ES_ECX_MASK (0x10000U)
  6602. #define DMA_ES_ECX_SHIFT (16U)
  6603. /*! ECX - Transfer Canceled
  6604. * 0b0..No canceled transfers
  6605. * 0b1..The last recorded entry was a canceled transfer by the error cancel transfer input
  6606. */
  6607. #define DMA_ES_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ECX_SHIFT)) & DMA_ES_ECX_MASK)
  6608. #define DMA_ES_VLD_MASK (0x80000000U)
  6609. #define DMA_ES_VLD_SHIFT (31U)
  6610. /*! VLD
  6611. * 0b0..No ERR bits are set.
  6612. * 0b1..At least one ERR bit is set indicating a valid error exists that has not been cleared.
  6613. */
  6614. #define DMA_ES_VLD(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_VLD_SHIFT)) & DMA_ES_VLD_MASK)
  6615. /*! @} */
  6616. /*! @name ERQ - Enable Request Register */
  6617. /*! @{ */
  6618. #define DMA_ERQ_ERQ0_MASK (0x1U)
  6619. #define DMA_ERQ_ERQ0_SHIFT (0U)
  6620. /*! ERQ0 - Enable DMA Request 0
  6621. * 0b0..The DMA request signal for the corresponding channel is disabled
  6622. * 0b1..The DMA request signal for the corresponding channel is enabled
  6623. */
  6624. #define DMA_ERQ_ERQ0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ0_SHIFT)) & DMA_ERQ_ERQ0_MASK)
  6625. #define DMA_ERQ_ERQ1_MASK (0x2U)
  6626. #define DMA_ERQ_ERQ1_SHIFT (1U)
  6627. /*! ERQ1 - Enable DMA Request 1
  6628. * 0b0..The DMA request signal for the corresponding channel is disabled
  6629. * 0b1..The DMA request signal for the corresponding channel is enabled
  6630. */
  6631. #define DMA_ERQ_ERQ1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ1_SHIFT)) & DMA_ERQ_ERQ1_MASK)
  6632. #define DMA_ERQ_ERQ2_MASK (0x4U)
  6633. #define DMA_ERQ_ERQ2_SHIFT (2U)
  6634. /*! ERQ2 - Enable DMA Request 2
  6635. * 0b0..The DMA request signal for the corresponding channel is disabled
  6636. * 0b1..The DMA request signal for the corresponding channel is enabled
  6637. */
  6638. #define DMA_ERQ_ERQ2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ2_SHIFT)) & DMA_ERQ_ERQ2_MASK)
  6639. #define DMA_ERQ_ERQ3_MASK (0x8U)
  6640. #define DMA_ERQ_ERQ3_SHIFT (3U)
  6641. /*! ERQ3 - Enable DMA Request 3
  6642. * 0b0..The DMA request signal for the corresponding channel is disabled
  6643. * 0b1..The DMA request signal for the corresponding channel is enabled
  6644. */
  6645. #define DMA_ERQ_ERQ3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ3_SHIFT)) & DMA_ERQ_ERQ3_MASK)
  6646. #define DMA_ERQ_ERQ4_MASK (0x10U)
  6647. #define DMA_ERQ_ERQ4_SHIFT (4U)
  6648. /*! ERQ4 - Enable DMA Request 4
  6649. * 0b0..The DMA request signal for the corresponding channel is disabled
  6650. * 0b1..The DMA request signal for the corresponding channel is enabled
  6651. */
  6652. #define DMA_ERQ_ERQ4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ4_SHIFT)) & DMA_ERQ_ERQ4_MASK)
  6653. #define DMA_ERQ_ERQ5_MASK (0x20U)
  6654. #define DMA_ERQ_ERQ5_SHIFT (5U)
  6655. /*! ERQ5 - Enable DMA Request 5
  6656. * 0b0..The DMA request signal for the corresponding channel is disabled
  6657. * 0b1..The DMA request signal for the corresponding channel is enabled
  6658. */
  6659. #define DMA_ERQ_ERQ5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ5_SHIFT)) & DMA_ERQ_ERQ5_MASK)
  6660. #define DMA_ERQ_ERQ6_MASK (0x40U)
  6661. #define DMA_ERQ_ERQ6_SHIFT (6U)
  6662. /*! ERQ6 - Enable DMA Request 6
  6663. * 0b0..The DMA request signal for the corresponding channel is disabled
  6664. * 0b1..The DMA request signal for the corresponding channel is enabled
  6665. */
  6666. #define DMA_ERQ_ERQ6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ6_SHIFT)) & DMA_ERQ_ERQ6_MASK)
  6667. #define DMA_ERQ_ERQ7_MASK (0x80U)
  6668. #define DMA_ERQ_ERQ7_SHIFT (7U)
  6669. /*! ERQ7 - Enable DMA Request 7
  6670. * 0b0..The DMA request signal for the corresponding channel is disabled
  6671. * 0b1..The DMA request signal for the corresponding channel is enabled
  6672. */
  6673. #define DMA_ERQ_ERQ7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ7_SHIFT)) & DMA_ERQ_ERQ7_MASK)
  6674. #define DMA_ERQ_ERQ8_MASK (0x100U)
  6675. #define DMA_ERQ_ERQ8_SHIFT (8U)
  6676. /*! ERQ8 - Enable DMA Request 8
  6677. * 0b0..The DMA request signal for the corresponding channel is disabled
  6678. * 0b1..The DMA request signal for the corresponding channel is enabled
  6679. */
  6680. #define DMA_ERQ_ERQ8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ8_SHIFT)) & DMA_ERQ_ERQ8_MASK)
  6681. #define DMA_ERQ_ERQ9_MASK (0x200U)
  6682. #define DMA_ERQ_ERQ9_SHIFT (9U)
  6683. /*! ERQ9 - Enable DMA Request 9
  6684. * 0b0..The DMA request signal for the corresponding channel is disabled
  6685. * 0b1..The DMA request signal for the corresponding channel is enabled
  6686. */
  6687. #define DMA_ERQ_ERQ9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ9_SHIFT)) & DMA_ERQ_ERQ9_MASK)
  6688. #define DMA_ERQ_ERQ10_MASK (0x400U)
  6689. #define DMA_ERQ_ERQ10_SHIFT (10U)
  6690. /*! ERQ10 - Enable DMA Request 10
  6691. * 0b0..The DMA request signal for the corresponding channel is disabled
  6692. * 0b1..The DMA request signal for the corresponding channel is enabled
  6693. */
  6694. #define DMA_ERQ_ERQ10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ10_SHIFT)) & DMA_ERQ_ERQ10_MASK)
  6695. #define DMA_ERQ_ERQ11_MASK (0x800U)
  6696. #define DMA_ERQ_ERQ11_SHIFT (11U)
  6697. /*! ERQ11 - Enable DMA Request 11
  6698. * 0b0..The DMA request signal for the corresponding channel is disabled
  6699. * 0b1..The DMA request signal for the corresponding channel is enabled
  6700. */
  6701. #define DMA_ERQ_ERQ11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ11_SHIFT)) & DMA_ERQ_ERQ11_MASK)
  6702. #define DMA_ERQ_ERQ12_MASK (0x1000U)
  6703. #define DMA_ERQ_ERQ12_SHIFT (12U)
  6704. /*! ERQ12 - Enable DMA Request 12
  6705. * 0b0..The DMA request signal for the corresponding channel is disabled
  6706. * 0b1..The DMA request signal for the corresponding channel is enabled
  6707. */
  6708. #define DMA_ERQ_ERQ12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ12_SHIFT)) & DMA_ERQ_ERQ12_MASK)
  6709. #define DMA_ERQ_ERQ13_MASK (0x2000U)
  6710. #define DMA_ERQ_ERQ13_SHIFT (13U)
  6711. /*! ERQ13 - Enable DMA Request 13
  6712. * 0b0..The DMA request signal for the corresponding channel is disabled
  6713. * 0b1..The DMA request signal for the corresponding channel is enabled
  6714. */
  6715. #define DMA_ERQ_ERQ13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ13_SHIFT)) & DMA_ERQ_ERQ13_MASK)
  6716. #define DMA_ERQ_ERQ14_MASK (0x4000U)
  6717. #define DMA_ERQ_ERQ14_SHIFT (14U)
  6718. /*! ERQ14 - Enable DMA Request 14
  6719. * 0b0..The DMA request signal for the corresponding channel is disabled
  6720. * 0b1..The DMA request signal for the corresponding channel is enabled
  6721. */
  6722. #define DMA_ERQ_ERQ14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ14_SHIFT)) & DMA_ERQ_ERQ14_MASK)
  6723. #define DMA_ERQ_ERQ15_MASK (0x8000U)
  6724. #define DMA_ERQ_ERQ15_SHIFT (15U)
  6725. /*! ERQ15 - Enable DMA Request 15
  6726. * 0b0..The DMA request signal for the corresponding channel is disabled
  6727. * 0b1..The DMA request signal for the corresponding channel is enabled
  6728. */
  6729. #define DMA_ERQ_ERQ15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ15_SHIFT)) & DMA_ERQ_ERQ15_MASK)
  6730. #define DMA_ERQ_ERQ16_MASK (0x10000U)
  6731. #define DMA_ERQ_ERQ16_SHIFT (16U)
  6732. /*! ERQ16 - Enable DMA Request 16
  6733. * 0b0..The DMA request signal for the corresponding channel is disabled
  6734. * 0b1..The DMA request signal for the corresponding channel is enabled
  6735. */
  6736. #define DMA_ERQ_ERQ16(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ16_SHIFT)) & DMA_ERQ_ERQ16_MASK)
  6737. #define DMA_ERQ_ERQ17_MASK (0x20000U)
  6738. #define DMA_ERQ_ERQ17_SHIFT (17U)
  6739. /*! ERQ17 - Enable DMA Request 17
  6740. * 0b0..The DMA request signal for the corresponding channel is disabled
  6741. * 0b1..The DMA request signal for the corresponding channel is enabled
  6742. */
  6743. #define DMA_ERQ_ERQ17(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ17_SHIFT)) & DMA_ERQ_ERQ17_MASK)
  6744. #define DMA_ERQ_ERQ18_MASK (0x40000U)
  6745. #define DMA_ERQ_ERQ18_SHIFT (18U)
  6746. /*! ERQ18 - Enable DMA Request 18
  6747. * 0b0..The DMA request signal for the corresponding channel is disabled
  6748. * 0b1..The DMA request signal for the corresponding channel is enabled
  6749. */
  6750. #define DMA_ERQ_ERQ18(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ18_SHIFT)) & DMA_ERQ_ERQ18_MASK)
  6751. #define DMA_ERQ_ERQ19_MASK (0x80000U)
  6752. #define DMA_ERQ_ERQ19_SHIFT (19U)
  6753. /*! ERQ19 - Enable DMA Request 19
  6754. * 0b0..The DMA request signal for the corresponding channel is disabled
  6755. * 0b1..The DMA request signal for the corresponding channel is enabled
  6756. */
  6757. #define DMA_ERQ_ERQ19(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ19_SHIFT)) & DMA_ERQ_ERQ19_MASK)
  6758. #define DMA_ERQ_ERQ20_MASK (0x100000U)
  6759. #define DMA_ERQ_ERQ20_SHIFT (20U)
  6760. /*! ERQ20 - Enable DMA Request 20
  6761. * 0b0..The DMA request signal for the corresponding channel is disabled
  6762. * 0b1..The DMA request signal for the corresponding channel is enabled
  6763. */
  6764. #define DMA_ERQ_ERQ20(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ20_SHIFT)) & DMA_ERQ_ERQ20_MASK)
  6765. #define DMA_ERQ_ERQ21_MASK (0x200000U)
  6766. #define DMA_ERQ_ERQ21_SHIFT (21U)
  6767. /*! ERQ21 - Enable DMA Request 21
  6768. * 0b0..The DMA request signal for the corresponding channel is disabled
  6769. * 0b1..The DMA request signal for the corresponding channel is enabled
  6770. */
  6771. #define DMA_ERQ_ERQ21(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ21_SHIFT)) & DMA_ERQ_ERQ21_MASK)
  6772. #define DMA_ERQ_ERQ22_MASK (0x400000U)
  6773. #define DMA_ERQ_ERQ22_SHIFT (22U)
  6774. /*! ERQ22 - Enable DMA Request 22
  6775. * 0b0..The DMA request signal for the corresponding channel is disabled
  6776. * 0b1..The DMA request signal for the corresponding channel is enabled
  6777. */
  6778. #define DMA_ERQ_ERQ22(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ22_SHIFT)) & DMA_ERQ_ERQ22_MASK)
  6779. #define DMA_ERQ_ERQ23_MASK (0x800000U)
  6780. #define DMA_ERQ_ERQ23_SHIFT (23U)
  6781. /*! ERQ23 - Enable DMA Request 23
  6782. * 0b0..The DMA request signal for the corresponding channel is disabled
  6783. * 0b1..The DMA request signal for the corresponding channel is enabled
  6784. */
  6785. #define DMA_ERQ_ERQ23(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ23_SHIFT)) & DMA_ERQ_ERQ23_MASK)
  6786. #define DMA_ERQ_ERQ24_MASK (0x1000000U)
  6787. #define DMA_ERQ_ERQ24_SHIFT (24U)
  6788. /*! ERQ24 - Enable DMA Request 24
  6789. * 0b0..The DMA request signal for the corresponding channel is disabled
  6790. * 0b1..The DMA request signal for the corresponding channel is enabled
  6791. */
  6792. #define DMA_ERQ_ERQ24(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ24_SHIFT)) & DMA_ERQ_ERQ24_MASK)
  6793. #define DMA_ERQ_ERQ25_MASK (0x2000000U)
  6794. #define DMA_ERQ_ERQ25_SHIFT (25U)
  6795. /*! ERQ25 - Enable DMA Request 25
  6796. * 0b0..The DMA request signal for the corresponding channel is disabled
  6797. * 0b1..The DMA request signal for the corresponding channel is enabled
  6798. */
  6799. #define DMA_ERQ_ERQ25(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ25_SHIFT)) & DMA_ERQ_ERQ25_MASK)
  6800. #define DMA_ERQ_ERQ26_MASK (0x4000000U)
  6801. #define DMA_ERQ_ERQ26_SHIFT (26U)
  6802. /*! ERQ26 - Enable DMA Request 26
  6803. * 0b0..The DMA request signal for the corresponding channel is disabled
  6804. * 0b1..The DMA request signal for the corresponding channel is enabled
  6805. */
  6806. #define DMA_ERQ_ERQ26(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ26_SHIFT)) & DMA_ERQ_ERQ26_MASK)
  6807. #define DMA_ERQ_ERQ27_MASK (0x8000000U)
  6808. #define DMA_ERQ_ERQ27_SHIFT (27U)
  6809. /*! ERQ27 - Enable DMA Request 27
  6810. * 0b0..The DMA request signal for the corresponding channel is disabled
  6811. * 0b1..The DMA request signal for the corresponding channel is enabled
  6812. */
  6813. #define DMA_ERQ_ERQ27(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ27_SHIFT)) & DMA_ERQ_ERQ27_MASK)
  6814. #define DMA_ERQ_ERQ28_MASK (0x10000000U)
  6815. #define DMA_ERQ_ERQ28_SHIFT (28U)
  6816. /*! ERQ28 - Enable DMA Request 28
  6817. * 0b0..The DMA request signal for the corresponding channel is disabled
  6818. * 0b1..The DMA request signal for the corresponding channel is enabled
  6819. */
  6820. #define DMA_ERQ_ERQ28(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ28_SHIFT)) & DMA_ERQ_ERQ28_MASK)
  6821. #define DMA_ERQ_ERQ29_MASK (0x20000000U)
  6822. #define DMA_ERQ_ERQ29_SHIFT (29U)
  6823. /*! ERQ29 - Enable DMA Request 29
  6824. * 0b0..The DMA request signal for the corresponding channel is disabled
  6825. * 0b1..The DMA request signal for the corresponding channel is enabled
  6826. */
  6827. #define DMA_ERQ_ERQ29(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ29_SHIFT)) & DMA_ERQ_ERQ29_MASK)
  6828. #define DMA_ERQ_ERQ30_MASK (0x40000000U)
  6829. #define DMA_ERQ_ERQ30_SHIFT (30U)
  6830. /*! ERQ30 - Enable DMA Request 30
  6831. * 0b0..The DMA request signal for the corresponding channel is disabled
  6832. * 0b1..The DMA request signal for the corresponding channel is enabled
  6833. */
  6834. #define DMA_ERQ_ERQ30(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ30_SHIFT)) & DMA_ERQ_ERQ30_MASK)
  6835. #define DMA_ERQ_ERQ31_MASK (0x80000000U)
  6836. #define DMA_ERQ_ERQ31_SHIFT (31U)
  6837. /*! ERQ31 - Enable DMA Request 31
  6838. * 0b0..The DMA request signal for the corresponding channel is disabled
  6839. * 0b1..The DMA request signal for the corresponding channel is enabled
  6840. */
  6841. #define DMA_ERQ_ERQ31(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ31_SHIFT)) & DMA_ERQ_ERQ31_MASK)
  6842. /*! @} */
  6843. /*! @name EEI - Enable Error Interrupt Register */
  6844. /*! @{ */
  6845. #define DMA_EEI_EEI0_MASK (0x1U)
  6846. #define DMA_EEI_EEI0_SHIFT (0U)
  6847. /*! EEI0 - Enable Error Interrupt 0
  6848. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6849. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6850. */
  6851. #define DMA_EEI_EEI0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI0_SHIFT)) & DMA_EEI_EEI0_MASK)
  6852. #define DMA_EEI_EEI1_MASK (0x2U)
  6853. #define DMA_EEI_EEI1_SHIFT (1U)
  6854. /*! EEI1 - Enable Error Interrupt 1
  6855. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6856. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6857. */
  6858. #define DMA_EEI_EEI1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI1_SHIFT)) & DMA_EEI_EEI1_MASK)
  6859. #define DMA_EEI_EEI2_MASK (0x4U)
  6860. #define DMA_EEI_EEI2_SHIFT (2U)
  6861. /*! EEI2 - Enable Error Interrupt 2
  6862. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6863. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6864. */
  6865. #define DMA_EEI_EEI2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI2_SHIFT)) & DMA_EEI_EEI2_MASK)
  6866. #define DMA_EEI_EEI3_MASK (0x8U)
  6867. #define DMA_EEI_EEI3_SHIFT (3U)
  6868. /*! EEI3 - Enable Error Interrupt 3
  6869. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6870. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6871. */
  6872. #define DMA_EEI_EEI3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI3_SHIFT)) & DMA_EEI_EEI3_MASK)
  6873. #define DMA_EEI_EEI4_MASK (0x10U)
  6874. #define DMA_EEI_EEI4_SHIFT (4U)
  6875. /*! EEI4 - Enable Error Interrupt 4
  6876. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6877. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6878. */
  6879. #define DMA_EEI_EEI4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI4_SHIFT)) & DMA_EEI_EEI4_MASK)
  6880. #define DMA_EEI_EEI5_MASK (0x20U)
  6881. #define DMA_EEI_EEI5_SHIFT (5U)
  6882. /*! EEI5 - Enable Error Interrupt 5
  6883. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6884. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6885. */
  6886. #define DMA_EEI_EEI5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI5_SHIFT)) & DMA_EEI_EEI5_MASK)
  6887. #define DMA_EEI_EEI6_MASK (0x40U)
  6888. #define DMA_EEI_EEI6_SHIFT (6U)
  6889. /*! EEI6 - Enable Error Interrupt 6
  6890. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6891. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6892. */
  6893. #define DMA_EEI_EEI6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI6_SHIFT)) & DMA_EEI_EEI6_MASK)
  6894. #define DMA_EEI_EEI7_MASK (0x80U)
  6895. #define DMA_EEI_EEI7_SHIFT (7U)
  6896. /*! EEI7 - Enable Error Interrupt 7
  6897. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6898. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6899. */
  6900. #define DMA_EEI_EEI7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI7_SHIFT)) & DMA_EEI_EEI7_MASK)
  6901. #define DMA_EEI_EEI8_MASK (0x100U)
  6902. #define DMA_EEI_EEI8_SHIFT (8U)
  6903. /*! EEI8 - Enable Error Interrupt 8
  6904. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6905. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6906. */
  6907. #define DMA_EEI_EEI8(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI8_SHIFT)) & DMA_EEI_EEI8_MASK)
  6908. #define DMA_EEI_EEI9_MASK (0x200U)
  6909. #define DMA_EEI_EEI9_SHIFT (9U)
  6910. /*! EEI9 - Enable Error Interrupt 9
  6911. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6912. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6913. */
  6914. #define DMA_EEI_EEI9(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI9_SHIFT)) & DMA_EEI_EEI9_MASK)
  6915. #define DMA_EEI_EEI10_MASK (0x400U)
  6916. #define DMA_EEI_EEI10_SHIFT (10U)
  6917. /*! EEI10 - Enable Error Interrupt 10
  6918. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6919. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6920. */
  6921. #define DMA_EEI_EEI10(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI10_SHIFT)) & DMA_EEI_EEI10_MASK)
  6922. #define DMA_EEI_EEI11_MASK (0x800U)
  6923. #define DMA_EEI_EEI11_SHIFT (11U)
  6924. /*! EEI11 - Enable Error Interrupt 11
  6925. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6926. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6927. */
  6928. #define DMA_EEI_EEI11(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI11_SHIFT)) & DMA_EEI_EEI11_MASK)
  6929. #define DMA_EEI_EEI12_MASK (0x1000U)
  6930. #define DMA_EEI_EEI12_SHIFT (12U)
  6931. /*! EEI12 - Enable Error Interrupt 12
  6932. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6933. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6934. */
  6935. #define DMA_EEI_EEI12(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI12_SHIFT)) & DMA_EEI_EEI12_MASK)
  6936. #define DMA_EEI_EEI13_MASK (0x2000U)
  6937. #define DMA_EEI_EEI13_SHIFT (13U)
  6938. /*! EEI13 - Enable Error Interrupt 13
  6939. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6940. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6941. */
  6942. #define DMA_EEI_EEI13(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI13_SHIFT)) & DMA_EEI_EEI13_MASK)
  6943. #define DMA_EEI_EEI14_MASK (0x4000U)
  6944. #define DMA_EEI_EEI14_SHIFT (14U)
  6945. /*! EEI14 - Enable Error Interrupt 14
  6946. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6947. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6948. */
  6949. #define DMA_EEI_EEI14(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI14_SHIFT)) & DMA_EEI_EEI14_MASK)
  6950. #define DMA_EEI_EEI15_MASK (0x8000U)
  6951. #define DMA_EEI_EEI15_SHIFT (15U)
  6952. /*! EEI15 - Enable Error Interrupt 15
  6953. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6954. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6955. */
  6956. #define DMA_EEI_EEI15(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI15_SHIFT)) & DMA_EEI_EEI15_MASK)
  6957. #define DMA_EEI_EEI16_MASK (0x10000U)
  6958. #define DMA_EEI_EEI16_SHIFT (16U)
  6959. /*! EEI16 - Enable Error Interrupt 16
  6960. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6961. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6962. */
  6963. #define DMA_EEI_EEI16(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI16_SHIFT)) & DMA_EEI_EEI16_MASK)
  6964. #define DMA_EEI_EEI17_MASK (0x20000U)
  6965. #define DMA_EEI_EEI17_SHIFT (17U)
  6966. /*! EEI17 - Enable Error Interrupt 17
  6967. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6968. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6969. */
  6970. #define DMA_EEI_EEI17(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI17_SHIFT)) & DMA_EEI_EEI17_MASK)
  6971. #define DMA_EEI_EEI18_MASK (0x40000U)
  6972. #define DMA_EEI_EEI18_SHIFT (18U)
  6973. /*! EEI18 - Enable Error Interrupt 18
  6974. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6975. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6976. */
  6977. #define DMA_EEI_EEI18(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI18_SHIFT)) & DMA_EEI_EEI18_MASK)
  6978. #define DMA_EEI_EEI19_MASK (0x80000U)
  6979. #define DMA_EEI_EEI19_SHIFT (19U)
  6980. /*! EEI19 - Enable Error Interrupt 19
  6981. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6982. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6983. */
  6984. #define DMA_EEI_EEI19(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI19_SHIFT)) & DMA_EEI_EEI19_MASK)
  6985. #define DMA_EEI_EEI20_MASK (0x100000U)
  6986. #define DMA_EEI_EEI20_SHIFT (20U)
  6987. /*! EEI20 - Enable Error Interrupt 20
  6988. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6989. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6990. */
  6991. #define DMA_EEI_EEI20(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI20_SHIFT)) & DMA_EEI_EEI20_MASK)
  6992. #define DMA_EEI_EEI21_MASK (0x200000U)
  6993. #define DMA_EEI_EEI21_SHIFT (21U)
  6994. /*! EEI21 - Enable Error Interrupt 21
  6995. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  6996. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  6997. */
  6998. #define DMA_EEI_EEI21(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI21_SHIFT)) & DMA_EEI_EEI21_MASK)
  6999. #define DMA_EEI_EEI22_MASK (0x400000U)
  7000. #define DMA_EEI_EEI22_SHIFT (22U)
  7001. /*! EEI22 - Enable Error Interrupt 22
  7002. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7003. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7004. */
  7005. #define DMA_EEI_EEI22(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI22_SHIFT)) & DMA_EEI_EEI22_MASK)
  7006. #define DMA_EEI_EEI23_MASK (0x800000U)
  7007. #define DMA_EEI_EEI23_SHIFT (23U)
  7008. /*! EEI23 - Enable Error Interrupt 23
  7009. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7010. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7011. */
  7012. #define DMA_EEI_EEI23(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI23_SHIFT)) & DMA_EEI_EEI23_MASK)
  7013. #define DMA_EEI_EEI24_MASK (0x1000000U)
  7014. #define DMA_EEI_EEI24_SHIFT (24U)
  7015. /*! EEI24 - Enable Error Interrupt 24
  7016. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7017. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7018. */
  7019. #define DMA_EEI_EEI24(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI24_SHIFT)) & DMA_EEI_EEI24_MASK)
  7020. #define DMA_EEI_EEI25_MASK (0x2000000U)
  7021. #define DMA_EEI_EEI25_SHIFT (25U)
  7022. /*! EEI25 - Enable Error Interrupt 25
  7023. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7024. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7025. */
  7026. #define DMA_EEI_EEI25(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI25_SHIFT)) & DMA_EEI_EEI25_MASK)
  7027. #define DMA_EEI_EEI26_MASK (0x4000000U)
  7028. #define DMA_EEI_EEI26_SHIFT (26U)
  7029. /*! EEI26 - Enable Error Interrupt 26
  7030. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7031. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7032. */
  7033. #define DMA_EEI_EEI26(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI26_SHIFT)) & DMA_EEI_EEI26_MASK)
  7034. #define DMA_EEI_EEI27_MASK (0x8000000U)
  7035. #define DMA_EEI_EEI27_SHIFT (27U)
  7036. /*! EEI27 - Enable Error Interrupt 27
  7037. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7038. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7039. */
  7040. #define DMA_EEI_EEI27(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI27_SHIFT)) & DMA_EEI_EEI27_MASK)
  7041. #define DMA_EEI_EEI28_MASK (0x10000000U)
  7042. #define DMA_EEI_EEI28_SHIFT (28U)
  7043. /*! EEI28 - Enable Error Interrupt 28
  7044. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7045. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7046. */
  7047. #define DMA_EEI_EEI28(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI28_SHIFT)) & DMA_EEI_EEI28_MASK)
  7048. #define DMA_EEI_EEI29_MASK (0x20000000U)
  7049. #define DMA_EEI_EEI29_SHIFT (29U)
  7050. /*! EEI29 - Enable Error Interrupt 29
  7051. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7052. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7053. */
  7054. #define DMA_EEI_EEI29(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI29_SHIFT)) & DMA_EEI_EEI29_MASK)
  7055. #define DMA_EEI_EEI30_MASK (0x40000000U)
  7056. #define DMA_EEI_EEI30_SHIFT (30U)
  7057. /*! EEI30 - Enable Error Interrupt 30
  7058. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7059. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7060. */
  7061. #define DMA_EEI_EEI30(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI30_SHIFT)) & DMA_EEI_EEI30_MASK)
  7062. #define DMA_EEI_EEI31_MASK (0x80000000U)
  7063. #define DMA_EEI_EEI31_SHIFT (31U)
  7064. /*! EEI31 - Enable Error Interrupt 31
  7065. * 0b0..The error signal for corresponding channel does not generate an error interrupt
  7066. * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request
  7067. */
  7068. #define DMA_EEI_EEI31(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI31_SHIFT)) & DMA_EEI_EEI31_MASK)
  7069. /*! @} */
  7070. /*! @name CEEI - Clear Enable Error Interrupt Register */
  7071. /*! @{ */
  7072. #define DMA_CEEI_CEEI_MASK (0x1FU)
  7073. #define DMA_CEEI_CEEI_SHIFT (0U)
  7074. #define DMA_CEEI_CEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CEEI_SHIFT)) & DMA_CEEI_CEEI_MASK)
  7075. #define DMA_CEEI_CAEE_MASK (0x40U)
  7076. #define DMA_CEEI_CAEE_SHIFT (6U)
  7077. /*! CAEE - Clear All Enable Error Interrupts
  7078. * 0b0..Clear only the EEI bit specified in the CEEI field
  7079. * 0b1..Clear all bits in EEI
  7080. */
  7081. #define DMA_CEEI_CAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CAEE_SHIFT)) & DMA_CEEI_CAEE_MASK)
  7082. #define DMA_CEEI_NOP_MASK (0x80U)
  7083. #define DMA_CEEI_NOP_SHIFT (7U)
  7084. /*! NOP - No Op enable
  7085. * 0b0..Normal operation
  7086. * 0b1..No operation, ignore the other bits in this register
  7087. */
  7088. #define DMA_CEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_NOP_SHIFT)) & DMA_CEEI_NOP_MASK)
  7089. /*! @} */
  7090. /*! @name SEEI - Set Enable Error Interrupt Register */
  7091. /*! @{ */
  7092. #define DMA_SEEI_SEEI_MASK (0x1FU)
  7093. #define DMA_SEEI_SEEI_SHIFT (0U)
  7094. #define DMA_SEEI_SEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SEEI_SHIFT)) & DMA_SEEI_SEEI_MASK)
  7095. #define DMA_SEEI_SAEE_MASK (0x40U)
  7096. #define DMA_SEEI_SAEE_SHIFT (6U)
  7097. /*! SAEE - Sets All Enable Error Interrupts
  7098. * 0b0..Set only the EEI bit specified in the SEEI field.
  7099. * 0b1..Sets all bits in EEI
  7100. */
  7101. #define DMA_SEEI_SAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SAEE_SHIFT)) & DMA_SEEI_SAEE_MASK)
  7102. #define DMA_SEEI_NOP_MASK (0x80U)
  7103. #define DMA_SEEI_NOP_SHIFT (7U)
  7104. /*! NOP - No Op enable
  7105. * 0b0..Normal operation
  7106. * 0b1..No operation, ignore the other bits in this register
  7107. */
  7108. #define DMA_SEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_NOP_SHIFT)) & DMA_SEEI_NOP_MASK)
  7109. /*! @} */
  7110. /*! @name CERQ - Clear Enable Request Register */
  7111. /*! @{ */
  7112. #define DMA_CERQ_CERQ_MASK (0x1FU)
  7113. #define DMA_CERQ_CERQ_SHIFT (0U)
  7114. #define DMA_CERQ_CERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CERQ_SHIFT)) & DMA_CERQ_CERQ_MASK)
  7115. #define DMA_CERQ_CAER_MASK (0x40U)
  7116. #define DMA_CERQ_CAER_SHIFT (6U)
  7117. /*! CAER - Clear All Enable Requests
  7118. * 0b0..Clear only the ERQ bit specified in the CERQ field
  7119. * 0b1..Clear all bits in ERQ
  7120. */
  7121. #define DMA_CERQ_CAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CAER_SHIFT)) & DMA_CERQ_CAER_MASK)
  7122. #define DMA_CERQ_NOP_MASK (0x80U)
  7123. #define DMA_CERQ_NOP_SHIFT (7U)
  7124. /*! NOP - No Op enable
  7125. * 0b0..Normal operation
  7126. * 0b1..No operation, ignore the other bits in this register
  7127. */
  7128. #define DMA_CERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_NOP_SHIFT)) & DMA_CERQ_NOP_MASK)
  7129. /*! @} */
  7130. /*! @name SERQ - Set Enable Request Register */
  7131. /*! @{ */
  7132. #define DMA_SERQ_SERQ_MASK (0x1FU)
  7133. #define DMA_SERQ_SERQ_SHIFT (0U)
  7134. #define DMA_SERQ_SERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SERQ_SHIFT)) & DMA_SERQ_SERQ_MASK)
  7135. #define DMA_SERQ_SAER_MASK (0x40U)
  7136. #define DMA_SERQ_SAER_SHIFT (6U)
  7137. /*! SAER - Set All Enable Requests
  7138. * 0b0..Set only the ERQ bit specified in the SERQ field
  7139. * 0b1..Set all bits in ERQ
  7140. */
  7141. #define DMA_SERQ_SAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SAER_SHIFT)) & DMA_SERQ_SAER_MASK)
  7142. #define DMA_SERQ_NOP_MASK (0x80U)
  7143. #define DMA_SERQ_NOP_SHIFT (7U)
  7144. /*! NOP - No Op enable
  7145. * 0b0..Normal operation
  7146. * 0b1..No operation, ignore the other bits in this register
  7147. */
  7148. #define DMA_SERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_NOP_SHIFT)) & DMA_SERQ_NOP_MASK)
  7149. /*! @} */
  7150. /*! @name CDNE - Clear DONE Status Bit Register */
  7151. /*! @{ */
  7152. #define DMA_CDNE_CDNE_MASK (0x1FU)
  7153. #define DMA_CDNE_CDNE_SHIFT (0U)
  7154. #define DMA_CDNE_CDNE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CDNE_SHIFT)) & DMA_CDNE_CDNE_MASK)
  7155. #define DMA_CDNE_CADN_MASK (0x40U)
  7156. #define DMA_CDNE_CADN_SHIFT (6U)
  7157. /*! CADN - Clears All DONE Bits
  7158. * 0b0..Clears only the TCDn_CSR[DONE] bit specified in the CDNE field
  7159. * 0b1..Clears all bits in TCDn_CSR[DONE]
  7160. */
  7161. #define DMA_CDNE_CADN(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CADN_SHIFT)) & DMA_CDNE_CADN_MASK)
  7162. #define DMA_CDNE_NOP_MASK (0x80U)
  7163. #define DMA_CDNE_NOP_SHIFT (7U)
  7164. /*! NOP - No Op enable
  7165. * 0b0..Normal operation
  7166. * 0b1..No operation, ignore the other bits in this register
  7167. */
  7168. #define DMA_CDNE_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_NOP_SHIFT)) & DMA_CDNE_NOP_MASK)
  7169. /*! @} */
  7170. /*! @name SSRT - Set START Bit Register */
  7171. /*! @{ */
  7172. #define DMA_SSRT_SSRT_MASK (0x1FU)
  7173. #define DMA_SSRT_SSRT_SHIFT (0U)
  7174. #define DMA_SSRT_SSRT(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SSRT_SHIFT)) & DMA_SSRT_SSRT_MASK)
  7175. #define DMA_SSRT_SAST_MASK (0x40U)
  7176. #define DMA_SSRT_SAST_SHIFT (6U)
  7177. /*! SAST - Set All START Bits (activates all channels)
  7178. * 0b0..Set only the TCDn_CSR[START] bit specified in the SSRT field
  7179. * 0b1..Set all bits in TCDn_CSR[START]
  7180. */
  7181. #define DMA_SSRT_SAST(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SAST_SHIFT)) & DMA_SSRT_SAST_MASK)
  7182. #define DMA_SSRT_NOP_MASK (0x80U)
  7183. #define DMA_SSRT_NOP_SHIFT (7U)
  7184. /*! NOP - No Op enable
  7185. * 0b0..Normal operation
  7186. * 0b1..No operation, ignore the other bits in this register
  7187. */
  7188. #define DMA_SSRT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_NOP_SHIFT)) & DMA_SSRT_NOP_MASK)
  7189. /*! @} */
  7190. /*! @name CERR - Clear Error Register */
  7191. /*! @{ */
  7192. #define DMA_CERR_CERR_MASK (0x1FU)
  7193. #define DMA_CERR_CERR_SHIFT (0U)
  7194. #define DMA_CERR_CERR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CERR_SHIFT)) & DMA_CERR_CERR_MASK)
  7195. #define DMA_CERR_CAEI_MASK (0x40U)
  7196. #define DMA_CERR_CAEI_SHIFT (6U)
  7197. /*! CAEI - Clear All Error Indicators
  7198. * 0b0..Clear only the ERR bit specified in the CERR field
  7199. * 0b1..Clear all bits in ERR
  7200. */
  7201. #define DMA_CERR_CAEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CAEI_SHIFT)) & DMA_CERR_CAEI_MASK)
  7202. #define DMA_CERR_NOP_MASK (0x80U)
  7203. #define DMA_CERR_NOP_SHIFT (7U)
  7204. /*! NOP - No Op enable
  7205. * 0b0..Normal operation
  7206. * 0b1..No operation, ignore the other bits in this register
  7207. */
  7208. #define DMA_CERR_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_NOP_SHIFT)) & DMA_CERR_NOP_MASK)
  7209. /*! @} */
  7210. /*! @name CINT - Clear Interrupt Request Register */
  7211. /*! @{ */
  7212. #define DMA_CINT_CINT_MASK (0x1FU)
  7213. #define DMA_CINT_CINT_SHIFT (0U)
  7214. #define DMA_CINT_CINT(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CINT_SHIFT)) & DMA_CINT_CINT_MASK)
  7215. #define DMA_CINT_CAIR_MASK (0x40U)
  7216. #define DMA_CINT_CAIR_SHIFT (6U)
  7217. /*! CAIR - Clear All Interrupt Requests
  7218. * 0b0..Clear only the INT bit specified in the CINT field
  7219. * 0b1..Clear all bits in INT
  7220. */
  7221. #define DMA_CINT_CAIR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CAIR_SHIFT)) & DMA_CINT_CAIR_MASK)
  7222. #define DMA_CINT_NOP_MASK (0x80U)
  7223. #define DMA_CINT_NOP_SHIFT (7U)
  7224. /*! NOP - No Op enable
  7225. * 0b0..Normal operation
  7226. * 0b1..No operation, ignore the other bits in this register
  7227. */
  7228. #define DMA_CINT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_NOP_SHIFT)) & DMA_CINT_NOP_MASK)
  7229. /*! @} */
  7230. /*! @name INT - Interrupt Request Register */
  7231. /*! @{ */
  7232. #define DMA_INT_INT0_MASK (0x1U)
  7233. #define DMA_INT_INT0_SHIFT (0U)
  7234. /*! INT0 - Interrupt Request 0
  7235. * 0b0..The interrupt request for corresponding channel is cleared
  7236. * 0b1..The interrupt request for corresponding channel is active
  7237. */
  7238. #define DMA_INT_INT0(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT0_SHIFT)) & DMA_INT_INT0_MASK)
  7239. #define DMA_INT_INT1_MASK (0x2U)
  7240. #define DMA_INT_INT1_SHIFT (1U)
  7241. /*! INT1 - Interrupt Request 1
  7242. * 0b0..The interrupt request for corresponding channel is cleared
  7243. * 0b1..The interrupt request for corresponding channel is active
  7244. */
  7245. #define DMA_INT_INT1(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT1_SHIFT)) & DMA_INT_INT1_MASK)
  7246. #define DMA_INT_INT2_MASK (0x4U)
  7247. #define DMA_INT_INT2_SHIFT (2U)
  7248. /*! INT2 - Interrupt Request 2
  7249. * 0b0..The interrupt request for corresponding channel is cleared
  7250. * 0b1..The interrupt request for corresponding channel is active
  7251. */
  7252. #define DMA_INT_INT2(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT2_SHIFT)) & DMA_INT_INT2_MASK)
  7253. #define DMA_INT_INT3_MASK (0x8U)
  7254. #define DMA_INT_INT3_SHIFT (3U)
  7255. /*! INT3 - Interrupt Request 3
  7256. * 0b0..The interrupt request for corresponding channel is cleared
  7257. * 0b1..The interrupt request for corresponding channel is active
  7258. */
  7259. #define DMA_INT_INT3(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT3_SHIFT)) & DMA_INT_INT3_MASK)
  7260. #define DMA_INT_INT4_MASK (0x10U)
  7261. #define DMA_INT_INT4_SHIFT (4U)
  7262. /*! INT4 - Interrupt Request 4
  7263. * 0b0..The interrupt request for corresponding channel is cleared
  7264. * 0b1..The interrupt request for corresponding channel is active
  7265. */
  7266. #define DMA_INT_INT4(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT4_SHIFT)) & DMA_INT_INT4_MASK)
  7267. #define DMA_INT_INT5_MASK (0x20U)
  7268. #define DMA_INT_INT5_SHIFT (5U)
  7269. /*! INT5 - Interrupt Request 5
  7270. * 0b0..The interrupt request for corresponding channel is cleared
  7271. * 0b1..The interrupt request for corresponding channel is active
  7272. */
  7273. #define DMA_INT_INT5(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT5_SHIFT)) & DMA_INT_INT5_MASK)
  7274. #define DMA_INT_INT6_MASK (0x40U)
  7275. #define DMA_INT_INT6_SHIFT (6U)
  7276. /*! INT6 - Interrupt Request 6
  7277. * 0b0..The interrupt request for corresponding channel is cleared
  7278. * 0b1..The interrupt request for corresponding channel is active
  7279. */
  7280. #define DMA_INT_INT6(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT6_SHIFT)) & DMA_INT_INT6_MASK)
  7281. #define DMA_INT_INT7_MASK (0x80U)
  7282. #define DMA_INT_INT7_SHIFT (7U)
  7283. /*! INT7 - Interrupt Request 7
  7284. * 0b0..The interrupt request for corresponding channel is cleared
  7285. * 0b1..The interrupt request for corresponding channel is active
  7286. */
  7287. #define DMA_INT_INT7(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT7_SHIFT)) & DMA_INT_INT7_MASK)
  7288. #define DMA_INT_INT8_MASK (0x100U)
  7289. #define DMA_INT_INT8_SHIFT (8U)
  7290. /*! INT8 - Interrupt Request 8
  7291. * 0b0..The interrupt request for corresponding channel is cleared
  7292. * 0b1..The interrupt request for corresponding channel is active
  7293. */
  7294. #define DMA_INT_INT8(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT8_SHIFT)) & DMA_INT_INT8_MASK)
  7295. #define DMA_INT_INT9_MASK (0x200U)
  7296. #define DMA_INT_INT9_SHIFT (9U)
  7297. /*! INT9 - Interrupt Request 9
  7298. * 0b0..The interrupt request for corresponding channel is cleared
  7299. * 0b1..The interrupt request for corresponding channel is active
  7300. */
  7301. #define DMA_INT_INT9(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT9_SHIFT)) & DMA_INT_INT9_MASK)
  7302. #define DMA_INT_INT10_MASK (0x400U)
  7303. #define DMA_INT_INT10_SHIFT (10U)
  7304. /*! INT10 - Interrupt Request 10
  7305. * 0b0..The interrupt request for corresponding channel is cleared
  7306. * 0b1..The interrupt request for corresponding channel is active
  7307. */
  7308. #define DMA_INT_INT10(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT10_SHIFT)) & DMA_INT_INT10_MASK)
  7309. #define DMA_INT_INT11_MASK (0x800U)
  7310. #define DMA_INT_INT11_SHIFT (11U)
  7311. /*! INT11 - Interrupt Request 11
  7312. * 0b0..The interrupt request for corresponding channel is cleared
  7313. * 0b1..The interrupt request for corresponding channel is active
  7314. */
  7315. #define DMA_INT_INT11(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT11_SHIFT)) & DMA_INT_INT11_MASK)
  7316. #define DMA_INT_INT12_MASK (0x1000U)
  7317. #define DMA_INT_INT12_SHIFT (12U)
  7318. /*! INT12 - Interrupt Request 12
  7319. * 0b0..The interrupt request for corresponding channel is cleared
  7320. * 0b1..The interrupt request for corresponding channel is active
  7321. */
  7322. #define DMA_INT_INT12(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT12_SHIFT)) & DMA_INT_INT12_MASK)
  7323. #define DMA_INT_INT13_MASK (0x2000U)
  7324. #define DMA_INT_INT13_SHIFT (13U)
  7325. /*! INT13 - Interrupt Request 13
  7326. * 0b0..The interrupt request for corresponding channel is cleared
  7327. * 0b1..The interrupt request for corresponding channel is active
  7328. */
  7329. #define DMA_INT_INT13(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT13_SHIFT)) & DMA_INT_INT13_MASK)
  7330. #define DMA_INT_INT14_MASK (0x4000U)
  7331. #define DMA_INT_INT14_SHIFT (14U)
  7332. /*! INT14 - Interrupt Request 14
  7333. * 0b0..The interrupt request for corresponding channel is cleared
  7334. * 0b1..The interrupt request for corresponding channel is active
  7335. */
  7336. #define DMA_INT_INT14(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT14_SHIFT)) & DMA_INT_INT14_MASK)
  7337. #define DMA_INT_INT15_MASK (0x8000U)
  7338. #define DMA_INT_INT15_SHIFT (15U)
  7339. /*! INT15 - Interrupt Request 15
  7340. * 0b0..The interrupt request for corresponding channel is cleared
  7341. * 0b1..The interrupt request for corresponding channel is active
  7342. */
  7343. #define DMA_INT_INT15(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT15_SHIFT)) & DMA_INT_INT15_MASK)
  7344. #define DMA_INT_INT16_MASK (0x10000U)
  7345. #define DMA_INT_INT16_SHIFT (16U)
  7346. /*! INT16 - Interrupt Request 16
  7347. * 0b0..The interrupt request for corresponding channel is cleared
  7348. * 0b1..The interrupt request for corresponding channel is active
  7349. */
  7350. #define DMA_INT_INT16(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT16_SHIFT)) & DMA_INT_INT16_MASK)
  7351. #define DMA_INT_INT17_MASK (0x20000U)
  7352. #define DMA_INT_INT17_SHIFT (17U)
  7353. /*! INT17 - Interrupt Request 17
  7354. * 0b0..The interrupt request for corresponding channel is cleared
  7355. * 0b1..The interrupt request for corresponding channel is active
  7356. */
  7357. #define DMA_INT_INT17(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT17_SHIFT)) & DMA_INT_INT17_MASK)
  7358. #define DMA_INT_INT18_MASK (0x40000U)
  7359. #define DMA_INT_INT18_SHIFT (18U)
  7360. /*! INT18 - Interrupt Request 18
  7361. * 0b0..The interrupt request for corresponding channel is cleared
  7362. * 0b1..The interrupt request for corresponding channel is active
  7363. */
  7364. #define DMA_INT_INT18(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT18_SHIFT)) & DMA_INT_INT18_MASK)
  7365. #define DMA_INT_INT19_MASK (0x80000U)
  7366. #define DMA_INT_INT19_SHIFT (19U)
  7367. /*! INT19 - Interrupt Request 19
  7368. * 0b0..The interrupt request for corresponding channel is cleared
  7369. * 0b1..The interrupt request for corresponding channel is active
  7370. */
  7371. #define DMA_INT_INT19(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT19_SHIFT)) & DMA_INT_INT19_MASK)
  7372. #define DMA_INT_INT20_MASK (0x100000U)
  7373. #define DMA_INT_INT20_SHIFT (20U)
  7374. /*! INT20 - Interrupt Request 20
  7375. * 0b0..The interrupt request for corresponding channel is cleared
  7376. * 0b1..The interrupt request for corresponding channel is active
  7377. */
  7378. #define DMA_INT_INT20(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT20_SHIFT)) & DMA_INT_INT20_MASK)
  7379. #define DMA_INT_INT21_MASK (0x200000U)
  7380. #define DMA_INT_INT21_SHIFT (21U)
  7381. /*! INT21 - Interrupt Request 21
  7382. * 0b0..The interrupt request for corresponding channel is cleared
  7383. * 0b1..The interrupt request for corresponding channel is active
  7384. */
  7385. #define DMA_INT_INT21(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT21_SHIFT)) & DMA_INT_INT21_MASK)
  7386. #define DMA_INT_INT22_MASK (0x400000U)
  7387. #define DMA_INT_INT22_SHIFT (22U)
  7388. /*! INT22 - Interrupt Request 22
  7389. * 0b0..The interrupt request for corresponding channel is cleared
  7390. * 0b1..The interrupt request for corresponding channel is active
  7391. */
  7392. #define DMA_INT_INT22(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT22_SHIFT)) & DMA_INT_INT22_MASK)
  7393. #define DMA_INT_INT23_MASK (0x800000U)
  7394. #define DMA_INT_INT23_SHIFT (23U)
  7395. /*! INT23 - Interrupt Request 23
  7396. * 0b0..The interrupt request for corresponding channel is cleared
  7397. * 0b1..The interrupt request for corresponding channel is active
  7398. */
  7399. #define DMA_INT_INT23(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT23_SHIFT)) & DMA_INT_INT23_MASK)
  7400. #define DMA_INT_INT24_MASK (0x1000000U)
  7401. #define DMA_INT_INT24_SHIFT (24U)
  7402. /*! INT24 - Interrupt Request 24
  7403. * 0b0..The interrupt request for corresponding channel is cleared
  7404. * 0b1..The interrupt request for corresponding channel is active
  7405. */
  7406. #define DMA_INT_INT24(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT24_SHIFT)) & DMA_INT_INT24_MASK)
  7407. #define DMA_INT_INT25_MASK (0x2000000U)
  7408. #define DMA_INT_INT25_SHIFT (25U)
  7409. /*! INT25 - Interrupt Request 25
  7410. * 0b0..The interrupt request for corresponding channel is cleared
  7411. * 0b1..The interrupt request for corresponding channel is active
  7412. */
  7413. #define DMA_INT_INT25(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT25_SHIFT)) & DMA_INT_INT25_MASK)
  7414. #define DMA_INT_INT26_MASK (0x4000000U)
  7415. #define DMA_INT_INT26_SHIFT (26U)
  7416. /*! INT26 - Interrupt Request 26
  7417. * 0b0..The interrupt request for corresponding channel is cleared
  7418. * 0b1..The interrupt request for corresponding channel is active
  7419. */
  7420. #define DMA_INT_INT26(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT26_SHIFT)) & DMA_INT_INT26_MASK)
  7421. #define DMA_INT_INT27_MASK (0x8000000U)
  7422. #define DMA_INT_INT27_SHIFT (27U)
  7423. /*! INT27 - Interrupt Request 27
  7424. * 0b0..The interrupt request for corresponding channel is cleared
  7425. * 0b1..The interrupt request for corresponding channel is active
  7426. */
  7427. #define DMA_INT_INT27(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT27_SHIFT)) & DMA_INT_INT27_MASK)
  7428. #define DMA_INT_INT28_MASK (0x10000000U)
  7429. #define DMA_INT_INT28_SHIFT (28U)
  7430. /*! INT28 - Interrupt Request 28
  7431. * 0b0..The interrupt request for corresponding channel is cleared
  7432. * 0b1..The interrupt request for corresponding channel is active
  7433. */
  7434. #define DMA_INT_INT28(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT28_SHIFT)) & DMA_INT_INT28_MASK)
  7435. #define DMA_INT_INT29_MASK (0x20000000U)
  7436. #define DMA_INT_INT29_SHIFT (29U)
  7437. /*! INT29 - Interrupt Request 29
  7438. * 0b0..The interrupt request for corresponding channel is cleared
  7439. * 0b1..The interrupt request for corresponding channel is active
  7440. */
  7441. #define DMA_INT_INT29(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT29_SHIFT)) & DMA_INT_INT29_MASK)
  7442. #define DMA_INT_INT30_MASK (0x40000000U)
  7443. #define DMA_INT_INT30_SHIFT (30U)
  7444. /*! INT30 - Interrupt Request 30
  7445. * 0b0..The interrupt request for corresponding channel is cleared
  7446. * 0b1..The interrupt request for corresponding channel is active
  7447. */
  7448. #define DMA_INT_INT30(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT30_SHIFT)) & DMA_INT_INT30_MASK)
  7449. #define DMA_INT_INT31_MASK (0x80000000U)
  7450. #define DMA_INT_INT31_SHIFT (31U)
  7451. /*! INT31 - Interrupt Request 31
  7452. * 0b0..The interrupt request for corresponding channel is cleared
  7453. * 0b1..The interrupt request for corresponding channel is active
  7454. */
  7455. #define DMA_INT_INT31(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT31_SHIFT)) & DMA_INT_INT31_MASK)
  7456. /*! @} */
  7457. /*! @name ERR - Error Register */
  7458. /*! @{ */
  7459. #define DMA_ERR_ERR0_MASK (0x1U)
  7460. #define DMA_ERR_ERR0_SHIFT (0U)
  7461. /*! ERR0 - Error In Channel 0
  7462. * 0b0..An error in this channel has not occurred
  7463. * 0b1..An error in this channel has occurred
  7464. */
  7465. #define DMA_ERR_ERR0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR0_SHIFT)) & DMA_ERR_ERR0_MASK)
  7466. #define DMA_ERR_ERR1_MASK (0x2U)
  7467. #define DMA_ERR_ERR1_SHIFT (1U)
  7468. /*! ERR1 - Error In Channel 1
  7469. * 0b0..An error in this channel has not occurred
  7470. * 0b1..An error in this channel has occurred
  7471. */
  7472. #define DMA_ERR_ERR1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR1_SHIFT)) & DMA_ERR_ERR1_MASK)
  7473. #define DMA_ERR_ERR2_MASK (0x4U)
  7474. #define DMA_ERR_ERR2_SHIFT (2U)
  7475. /*! ERR2 - Error In Channel 2
  7476. * 0b0..An error in this channel has not occurred
  7477. * 0b1..An error in this channel has occurred
  7478. */
  7479. #define DMA_ERR_ERR2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR2_SHIFT)) & DMA_ERR_ERR2_MASK)
  7480. #define DMA_ERR_ERR3_MASK (0x8U)
  7481. #define DMA_ERR_ERR3_SHIFT (3U)
  7482. /*! ERR3 - Error In Channel 3
  7483. * 0b0..An error in this channel has not occurred
  7484. * 0b1..An error in this channel has occurred
  7485. */
  7486. #define DMA_ERR_ERR3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR3_SHIFT)) & DMA_ERR_ERR3_MASK)
  7487. #define DMA_ERR_ERR4_MASK (0x10U)
  7488. #define DMA_ERR_ERR4_SHIFT (4U)
  7489. /*! ERR4 - Error In Channel 4
  7490. * 0b0..An error in this channel has not occurred
  7491. * 0b1..An error in this channel has occurred
  7492. */
  7493. #define DMA_ERR_ERR4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR4_SHIFT)) & DMA_ERR_ERR4_MASK)
  7494. #define DMA_ERR_ERR5_MASK (0x20U)
  7495. #define DMA_ERR_ERR5_SHIFT (5U)
  7496. /*! ERR5 - Error In Channel 5
  7497. * 0b0..An error in this channel has not occurred
  7498. * 0b1..An error in this channel has occurred
  7499. */
  7500. #define DMA_ERR_ERR5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR5_SHIFT)) & DMA_ERR_ERR5_MASK)
  7501. #define DMA_ERR_ERR6_MASK (0x40U)
  7502. #define DMA_ERR_ERR6_SHIFT (6U)
  7503. /*! ERR6 - Error In Channel 6
  7504. * 0b0..An error in this channel has not occurred
  7505. * 0b1..An error in this channel has occurred
  7506. */
  7507. #define DMA_ERR_ERR6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR6_SHIFT)) & DMA_ERR_ERR6_MASK)
  7508. #define DMA_ERR_ERR7_MASK (0x80U)
  7509. #define DMA_ERR_ERR7_SHIFT (7U)
  7510. /*! ERR7 - Error In Channel 7
  7511. * 0b0..An error in this channel has not occurred
  7512. * 0b1..An error in this channel has occurred
  7513. */
  7514. #define DMA_ERR_ERR7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR7_SHIFT)) & DMA_ERR_ERR7_MASK)
  7515. #define DMA_ERR_ERR8_MASK (0x100U)
  7516. #define DMA_ERR_ERR8_SHIFT (8U)
  7517. /*! ERR8 - Error In Channel 8
  7518. * 0b0..An error in this channel has not occurred
  7519. * 0b1..An error in this channel has occurred
  7520. */
  7521. #define DMA_ERR_ERR8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR8_SHIFT)) & DMA_ERR_ERR8_MASK)
  7522. #define DMA_ERR_ERR9_MASK (0x200U)
  7523. #define DMA_ERR_ERR9_SHIFT (9U)
  7524. /*! ERR9 - Error In Channel 9
  7525. * 0b0..An error in this channel has not occurred
  7526. * 0b1..An error in this channel has occurred
  7527. */
  7528. #define DMA_ERR_ERR9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR9_SHIFT)) & DMA_ERR_ERR9_MASK)
  7529. #define DMA_ERR_ERR10_MASK (0x400U)
  7530. #define DMA_ERR_ERR10_SHIFT (10U)
  7531. /*! ERR10 - Error In Channel 10
  7532. * 0b0..An error in this channel has not occurred
  7533. * 0b1..An error in this channel has occurred
  7534. */
  7535. #define DMA_ERR_ERR10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR10_SHIFT)) & DMA_ERR_ERR10_MASK)
  7536. #define DMA_ERR_ERR11_MASK (0x800U)
  7537. #define DMA_ERR_ERR11_SHIFT (11U)
  7538. /*! ERR11 - Error In Channel 11
  7539. * 0b0..An error in this channel has not occurred
  7540. * 0b1..An error in this channel has occurred
  7541. */
  7542. #define DMA_ERR_ERR11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR11_SHIFT)) & DMA_ERR_ERR11_MASK)
  7543. #define DMA_ERR_ERR12_MASK (0x1000U)
  7544. #define DMA_ERR_ERR12_SHIFT (12U)
  7545. /*! ERR12 - Error In Channel 12
  7546. * 0b0..An error in this channel has not occurred
  7547. * 0b1..An error in this channel has occurred
  7548. */
  7549. #define DMA_ERR_ERR12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR12_SHIFT)) & DMA_ERR_ERR12_MASK)
  7550. #define DMA_ERR_ERR13_MASK (0x2000U)
  7551. #define DMA_ERR_ERR13_SHIFT (13U)
  7552. /*! ERR13 - Error In Channel 13
  7553. * 0b0..An error in this channel has not occurred
  7554. * 0b1..An error in this channel has occurred
  7555. */
  7556. #define DMA_ERR_ERR13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR13_SHIFT)) & DMA_ERR_ERR13_MASK)
  7557. #define DMA_ERR_ERR14_MASK (0x4000U)
  7558. #define DMA_ERR_ERR14_SHIFT (14U)
  7559. /*! ERR14 - Error In Channel 14
  7560. * 0b0..An error in this channel has not occurred
  7561. * 0b1..An error in this channel has occurred
  7562. */
  7563. #define DMA_ERR_ERR14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR14_SHIFT)) & DMA_ERR_ERR14_MASK)
  7564. #define DMA_ERR_ERR15_MASK (0x8000U)
  7565. #define DMA_ERR_ERR15_SHIFT (15U)
  7566. /*! ERR15 - Error In Channel 15
  7567. * 0b0..An error in this channel has not occurred
  7568. * 0b1..An error in this channel has occurred
  7569. */
  7570. #define DMA_ERR_ERR15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR15_SHIFT)) & DMA_ERR_ERR15_MASK)
  7571. #define DMA_ERR_ERR16_MASK (0x10000U)
  7572. #define DMA_ERR_ERR16_SHIFT (16U)
  7573. /*! ERR16 - Error In Channel 16
  7574. * 0b0..An error in this channel has not occurred
  7575. * 0b1..An error in this channel has occurred
  7576. */
  7577. #define DMA_ERR_ERR16(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR16_SHIFT)) & DMA_ERR_ERR16_MASK)
  7578. #define DMA_ERR_ERR17_MASK (0x20000U)
  7579. #define DMA_ERR_ERR17_SHIFT (17U)
  7580. /*! ERR17 - Error In Channel 17
  7581. * 0b0..An error in this channel has not occurred
  7582. * 0b1..An error in this channel has occurred
  7583. */
  7584. #define DMA_ERR_ERR17(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR17_SHIFT)) & DMA_ERR_ERR17_MASK)
  7585. #define DMA_ERR_ERR18_MASK (0x40000U)
  7586. #define DMA_ERR_ERR18_SHIFT (18U)
  7587. /*! ERR18 - Error In Channel 18
  7588. * 0b0..An error in this channel has not occurred
  7589. * 0b1..An error in this channel has occurred
  7590. */
  7591. #define DMA_ERR_ERR18(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR18_SHIFT)) & DMA_ERR_ERR18_MASK)
  7592. #define DMA_ERR_ERR19_MASK (0x80000U)
  7593. #define DMA_ERR_ERR19_SHIFT (19U)
  7594. /*! ERR19 - Error In Channel 19
  7595. * 0b0..An error in this channel has not occurred
  7596. * 0b1..An error in this channel has occurred
  7597. */
  7598. #define DMA_ERR_ERR19(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR19_SHIFT)) & DMA_ERR_ERR19_MASK)
  7599. #define DMA_ERR_ERR20_MASK (0x100000U)
  7600. #define DMA_ERR_ERR20_SHIFT (20U)
  7601. /*! ERR20 - Error In Channel 20
  7602. * 0b0..An error in this channel has not occurred
  7603. * 0b1..An error in this channel has occurred
  7604. */
  7605. #define DMA_ERR_ERR20(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR20_SHIFT)) & DMA_ERR_ERR20_MASK)
  7606. #define DMA_ERR_ERR21_MASK (0x200000U)
  7607. #define DMA_ERR_ERR21_SHIFT (21U)
  7608. /*! ERR21 - Error In Channel 21
  7609. * 0b0..An error in this channel has not occurred
  7610. * 0b1..An error in this channel has occurred
  7611. */
  7612. #define DMA_ERR_ERR21(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR21_SHIFT)) & DMA_ERR_ERR21_MASK)
  7613. #define DMA_ERR_ERR22_MASK (0x400000U)
  7614. #define DMA_ERR_ERR22_SHIFT (22U)
  7615. /*! ERR22 - Error In Channel 22
  7616. * 0b0..An error in this channel has not occurred
  7617. * 0b1..An error in this channel has occurred
  7618. */
  7619. #define DMA_ERR_ERR22(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR22_SHIFT)) & DMA_ERR_ERR22_MASK)
  7620. #define DMA_ERR_ERR23_MASK (0x800000U)
  7621. #define DMA_ERR_ERR23_SHIFT (23U)
  7622. /*! ERR23 - Error In Channel 23
  7623. * 0b0..An error in this channel has not occurred
  7624. * 0b1..An error in this channel has occurred
  7625. */
  7626. #define DMA_ERR_ERR23(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR23_SHIFT)) & DMA_ERR_ERR23_MASK)
  7627. #define DMA_ERR_ERR24_MASK (0x1000000U)
  7628. #define DMA_ERR_ERR24_SHIFT (24U)
  7629. /*! ERR24 - Error In Channel 24
  7630. * 0b0..An error in this channel has not occurred
  7631. * 0b1..An error in this channel has occurred
  7632. */
  7633. #define DMA_ERR_ERR24(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR24_SHIFT)) & DMA_ERR_ERR24_MASK)
  7634. #define DMA_ERR_ERR25_MASK (0x2000000U)
  7635. #define DMA_ERR_ERR25_SHIFT (25U)
  7636. /*! ERR25 - Error In Channel 25
  7637. * 0b0..An error in this channel has not occurred
  7638. * 0b1..An error in this channel has occurred
  7639. */
  7640. #define DMA_ERR_ERR25(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR25_SHIFT)) & DMA_ERR_ERR25_MASK)
  7641. #define DMA_ERR_ERR26_MASK (0x4000000U)
  7642. #define DMA_ERR_ERR26_SHIFT (26U)
  7643. /*! ERR26 - Error In Channel 26
  7644. * 0b0..An error in this channel has not occurred
  7645. * 0b1..An error in this channel has occurred
  7646. */
  7647. #define DMA_ERR_ERR26(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR26_SHIFT)) & DMA_ERR_ERR26_MASK)
  7648. #define DMA_ERR_ERR27_MASK (0x8000000U)
  7649. #define DMA_ERR_ERR27_SHIFT (27U)
  7650. /*! ERR27 - Error In Channel 27
  7651. * 0b0..An error in this channel has not occurred
  7652. * 0b1..An error in this channel has occurred
  7653. */
  7654. #define DMA_ERR_ERR27(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR27_SHIFT)) & DMA_ERR_ERR27_MASK)
  7655. #define DMA_ERR_ERR28_MASK (0x10000000U)
  7656. #define DMA_ERR_ERR28_SHIFT (28U)
  7657. /*! ERR28 - Error In Channel 28
  7658. * 0b0..An error in this channel has not occurred
  7659. * 0b1..An error in this channel has occurred
  7660. */
  7661. #define DMA_ERR_ERR28(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR28_SHIFT)) & DMA_ERR_ERR28_MASK)
  7662. #define DMA_ERR_ERR29_MASK (0x20000000U)
  7663. #define DMA_ERR_ERR29_SHIFT (29U)
  7664. /*! ERR29 - Error In Channel 29
  7665. * 0b0..An error in this channel has not occurred
  7666. * 0b1..An error in this channel has occurred
  7667. */
  7668. #define DMA_ERR_ERR29(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR29_SHIFT)) & DMA_ERR_ERR29_MASK)
  7669. #define DMA_ERR_ERR30_MASK (0x40000000U)
  7670. #define DMA_ERR_ERR30_SHIFT (30U)
  7671. /*! ERR30 - Error In Channel 30
  7672. * 0b0..An error in this channel has not occurred
  7673. * 0b1..An error in this channel has occurred
  7674. */
  7675. #define DMA_ERR_ERR30(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR30_SHIFT)) & DMA_ERR_ERR30_MASK)
  7676. #define DMA_ERR_ERR31_MASK (0x80000000U)
  7677. #define DMA_ERR_ERR31_SHIFT (31U)
  7678. /*! ERR31 - Error In Channel 31
  7679. * 0b0..An error in this channel has not occurred
  7680. * 0b1..An error in this channel has occurred
  7681. */
  7682. #define DMA_ERR_ERR31(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR31_SHIFT)) & DMA_ERR_ERR31_MASK)
  7683. /*! @} */
  7684. /*! @name HRS - Hardware Request Status Register */
  7685. /*! @{ */
  7686. #define DMA_HRS_HRS0_MASK (0x1U)
  7687. #define DMA_HRS_HRS0_SHIFT (0U)
  7688. /*! HRS0 - Hardware Request Status Channel 0
  7689. * 0b0..A hardware service request for channel 0 is not present
  7690. * 0b1..A hardware service request for channel 0 is present
  7691. */
  7692. #define DMA_HRS_HRS0(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS0_SHIFT)) & DMA_HRS_HRS0_MASK)
  7693. #define DMA_HRS_HRS1_MASK (0x2U)
  7694. #define DMA_HRS_HRS1_SHIFT (1U)
  7695. /*! HRS1 - Hardware Request Status Channel 1
  7696. * 0b0..A hardware service request for channel 1 is not present
  7697. * 0b1..A hardware service request for channel 1 is present
  7698. */
  7699. #define DMA_HRS_HRS1(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS1_SHIFT)) & DMA_HRS_HRS1_MASK)
  7700. #define DMA_HRS_HRS2_MASK (0x4U)
  7701. #define DMA_HRS_HRS2_SHIFT (2U)
  7702. /*! HRS2 - Hardware Request Status Channel 2
  7703. * 0b0..A hardware service request for channel 2 is not present
  7704. * 0b1..A hardware service request for channel 2 is present
  7705. */
  7706. #define DMA_HRS_HRS2(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS2_SHIFT)) & DMA_HRS_HRS2_MASK)
  7707. #define DMA_HRS_HRS3_MASK (0x8U)
  7708. #define DMA_HRS_HRS3_SHIFT (3U)
  7709. /*! HRS3 - Hardware Request Status Channel 3
  7710. * 0b0..A hardware service request for channel 3 is not present
  7711. * 0b1..A hardware service request for channel 3 is present
  7712. */
  7713. #define DMA_HRS_HRS3(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS3_SHIFT)) & DMA_HRS_HRS3_MASK)
  7714. #define DMA_HRS_HRS4_MASK (0x10U)
  7715. #define DMA_HRS_HRS4_SHIFT (4U)
  7716. /*! HRS4 - Hardware Request Status Channel 4
  7717. * 0b0..A hardware service request for channel 4 is not present
  7718. * 0b1..A hardware service request for channel 4 is present
  7719. */
  7720. #define DMA_HRS_HRS4(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS4_SHIFT)) & DMA_HRS_HRS4_MASK)
  7721. #define DMA_HRS_HRS5_MASK (0x20U)
  7722. #define DMA_HRS_HRS5_SHIFT (5U)
  7723. /*! HRS5 - Hardware Request Status Channel 5
  7724. * 0b0..A hardware service request for channel 5 is not present
  7725. * 0b1..A hardware service request for channel 5 is present
  7726. */
  7727. #define DMA_HRS_HRS5(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS5_SHIFT)) & DMA_HRS_HRS5_MASK)
  7728. #define DMA_HRS_HRS6_MASK (0x40U)
  7729. #define DMA_HRS_HRS6_SHIFT (6U)
  7730. /*! HRS6 - Hardware Request Status Channel 6
  7731. * 0b0..A hardware service request for channel 6 is not present
  7732. * 0b1..A hardware service request for channel 6 is present
  7733. */
  7734. #define DMA_HRS_HRS6(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS6_SHIFT)) & DMA_HRS_HRS6_MASK)
  7735. #define DMA_HRS_HRS7_MASK (0x80U)
  7736. #define DMA_HRS_HRS7_SHIFT (7U)
  7737. /*! HRS7 - Hardware Request Status Channel 7
  7738. * 0b0..A hardware service request for channel 7 is not present
  7739. * 0b1..A hardware service request for channel 7 is present
  7740. */
  7741. #define DMA_HRS_HRS7(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS7_SHIFT)) & DMA_HRS_HRS7_MASK)
  7742. #define DMA_HRS_HRS8_MASK (0x100U)
  7743. #define DMA_HRS_HRS8_SHIFT (8U)
  7744. /*! HRS8 - Hardware Request Status Channel 8
  7745. * 0b0..A hardware service request for channel 8 is not present
  7746. * 0b1..A hardware service request for channel 8 is present
  7747. */
  7748. #define DMA_HRS_HRS8(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS8_SHIFT)) & DMA_HRS_HRS8_MASK)
  7749. #define DMA_HRS_HRS9_MASK (0x200U)
  7750. #define DMA_HRS_HRS9_SHIFT (9U)
  7751. /*! HRS9 - Hardware Request Status Channel 9
  7752. * 0b0..A hardware service request for channel 9 is not present
  7753. * 0b1..A hardware service request for channel 9 is present
  7754. */
  7755. #define DMA_HRS_HRS9(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS9_SHIFT)) & DMA_HRS_HRS9_MASK)
  7756. #define DMA_HRS_HRS10_MASK (0x400U)
  7757. #define DMA_HRS_HRS10_SHIFT (10U)
  7758. /*! HRS10 - Hardware Request Status Channel 10
  7759. * 0b0..A hardware service request for channel 10 is not present
  7760. * 0b1..A hardware service request for channel 10 is present
  7761. */
  7762. #define DMA_HRS_HRS10(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS10_SHIFT)) & DMA_HRS_HRS10_MASK)
  7763. #define DMA_HRS_HRS11_MASK (0x800U)
  7764. #define DMA_HRS_HRS11_SHIFT (11U)
  7765. /*! HRS11 - Hardware Request Status Channel 11
  7766. * 0b0..A hardware service request for channel 11 is not present
  7767. * 0b1..A hardware service request for channel 11 is present
  7768. */
  7769. #define DMA_HRS_HRS11(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS11_SHIFT)) & DMA_HRS_HRS11_MASK)
  7770. #define DMA_HRS_HRS12_MASK (0x1000U)
  7771. #define DMA_HRS_HRS12_SHIFT (12U)
  7772. /*! HRS12 - Hardware Request Status Channel 12
  7773. * 0b0..A hardware service request for channel 12 is not present
  7774. * 0b1..A hardware service request for channel 12 is present
  7775. */
  7776. #define DMA_HRS_HRS12(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS12_SHIFT)) & DMA_HRS_HRS12_MASK)
  7777. #define DMA_HRS_HRS13_MASK (0x2000U)
  7778. #define DMA_HRS_HRS13_SHIFT (13U)
  7779. /*! HRS13 - Hardware Request Status Channel 13
  7780. * 0b0..A hardware service request for channel 13 is not present
  7781. * 0b1..A hardware service request for channel 13 is present
  7782. */
  7783. #define DMA_HRS_HRS13(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS13_SHIFT)) & DMA_HRS_HRS13_MASK)
  7784. #define DMA_HRS_HRS14_MASK (0x4000U)
  7785. #define DMA_HRS_HRS14_SHIFT (14U)
  7786. /*! HRS14 - Hardware Request Status Channel 14
  7787. * 0b0..A hardware service request for channel 14 is not present
  7788. * 0b1..A hardware service request for channel 14 is present
  7789. */
  7790. #define DMA_HRS_HRS14(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS14_SHIFT)) & DMA_HRS_HRS14_MASK)
  7791. #define DMA_HRS_HRS15_MASK (0x8000U)
  7792. #define DMA_HRS_HRS15_SHIFT (15U)
  7793. /*! HRS15 - Hardware Request Status Channel 15
  7794. * 0b0..A hardware service request for channel 15 is not present
  7795. * 0b1..A hardware service request for channel 15 is present
  7796. */
  7797. #define DMA_HRS_HRS15(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS15_SHIFT)) & DMA_HRS_HRS15_MASK)
  7798. #define DMA_HRS_HRS16_MASK (0x10000U)
  7799. #define DMA_HRS_HRS16_SHIFT (16U)
  7800. /*! HRS16 - Hardware Request Status Channel 16
  7801. * 0b0..A hardware service request for channel 16 is not present
  7802. * 0b1..A hardware service request for channel 16 is present
  7803. */
  7804. #define DMA_HRS_HRS16(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS16_SHIFT)) & DMA_HRS_HRS16_MASK)
  7805. #define DMA_HRS_HRS17_MASK (0x20000U)
  7806. #define DMA_HRS_HRS17_SHIFT (17U)
  7807. /*! HRS17 - Hardware Request Status Channel 17
  7808. * 0b0..A hardware service request for channel 17 is not present
  7809. * 0b1..A hardware service request for channel 17 is present
  7810. */
  7811. #define DMA_HRS_HRS17(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS17_SHIFT)) & DMA_HRS_HRS17_MASK)
  7812. #define DMA_HRS_HRS18_MASK (0x40000U)
  7813. #define DMA_HRS_HRS18_SHIFT (18U)
  7814. /*! HRS18 - Hardware Request Status Channel 18
  7815. * 0b0..A hardware service request for channel 18 is not present
  7816. * 0b1..A hardware service request for channel 18 is present
  7817. */
  7818. #define DMA_HRS_HRS18(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS18_SHIFT)) & DMA_HRS_HRS18_MASK)
  7819. #define DMA_HRS_HRS19_MASK (0x80000U)
  7820. #define DMA_HRS_HRS19_SHIFT (19U)
  7821. /*! HRS19 - Hardware Request Status Channel 19
  7822. * 0b0..A hardware service request for channel 19 is not present
  7823. * 0b1..A hardware service request for channel 19 is present
  7824. */
  7825. #define DMA_HRS_HRS19(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS19_SHIFT)) & DMA_HRS_HRS19_MASK)
  7826. #define DMA_HRS_HRS20_MASK (0x100000U)
  7827. #define DMA_HRS_HRS20_SHIFT (20U)
  7828. /*! HRS20 - Hardware Request Status Channel 20
  7829. * 0b0..A hardware service request for channel 20 is not present
  7830. * 0b1..A hardware service request for channel 20 is present
  7831. */
  7832. #define DMA_HRS_HRS20(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS20_SHIFT)) & DMA_HRS_HRS20_MASK)
  7833. #define DMA_HRS_HRS21_MASK (0x200000U)
  7834. #define DMA_HRS_HRS21_SHIFT (21U)
  7835. /*! HRS21 - Hardware Request Status Channel 21
  7836. * 0b0..A hardware service request for channel 21 is not present
  7837. * 0b1..A hardware service request for channel 21 is present
  7838. */
  7839. #define DMA_HRS_HRS21(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS21_SHIFT)) & DMA_HRS_HRS21_MASK)
  7840. #define DMA_HRS_HRS22_MASK (0x400000U)
  7841. #define DMA_HRS_HRS22_SHIFT (22U)
  7842. /*! HRS22 - Hardware Request Status Channel 22
  7843. * 0b0..A hardware service request for channel 22 is not present
  7844. * 0b1..A hardware service request for channel 22 is present
  7845. */
  7846. #define DMA_HRS_HRS22(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS22_SHIFT)) & DMA_HRS_HRS22_MASK)
  7847. #define DMA_HRS_HRS23_MASK (0x800000U)
  7848. #define DMA_HRS_HRS23_SHIFT (23U)
  7849. /*! HRS23 - Hardware Request Status Channel 23
  7850. * 0b0..A hardware service request for channel 23 is not present
  7851. * 0b1..A hardware service request for channel 23 is present
  7852. */
  7853. #define DMA_HRS_HRS23(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS23_SHIFT)) & DMA_HRS_HRS23_MASK)
  7854. #define DMA_HRS_HRS24_MASK (0x1000000U)
  7855. #define DMA_HRS_HRS24_SHIFT (24U)
  7856. /*! HRS24 - Hardware Request Status Channel 24
  7857. * 0b0..A hardware service request for channel 24 is not present
  7858. * 0b1..A hardware service request for channel 24 is present
  7859. */
  7860. #define DMA_HRS_HRS24(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS24_SHIFT)) & DMA_HRS_HRS24_MASK)
  7861. #define DMA_HRS_HRS25_MASK (0x2000000U)
  7862. #define DMA_HRS_HRS25_SHIFT (25U)
  7863. /*! HRS25 - Hardware Request Status Channel 25
  7864. * 0b0..A hardware service request for channel 25 is not present
  7865. * 0b1..A hardware service request for channel 25 is present
  7866. */
  7867. #define DMA_HRS_HRS25(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS25_SHIFT)) & DMA_HRS_HRS25_MASK)
  7868. #define DMA_HRS_HRS26_MASK (0x4000000U)
  7869. #define DMA_HRS_HRS26_SHIFT (26U)
  7870. /*! HRS26 - Hardware Request Status Channel 26
  7871. * 0b0..A hardware service request for channel 26 is not present
  7872. * 0b1..A hardware service request for channel 26 is present
  7873. */
  7874. #define DMA_HRS_HRS26(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS26_SHIFT)) & DMA_HRS_HRS26_MASK)
  7875. #define DMA_HRS_HRS27_MASK (0x8000000U)
  7876. #define DMA_HRS_HRS27_SHIFT (27U)
  7877. /*! HRS27 - Hardware Request Status Channel 27
  7878. * 0b0..A hardware service request for channel 27 is not present
  7879. * 0b1..A hardware service request for channel 27 is present
  7880. */
  7881. #define DMA_HRS_HRS27(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS27_SHIFT)) & DMA_HRS_HRS27_MASK)
  7882. #define DMA_HRS_HRS28_MASK (0x10000000U)
  7883. #define DMA_HRS_HRS28_SHIFT (28U)
  7884. /*! HRS28 - Hardware Request Status Channel 28
  7885. * 0b0..A hardware service request for channel 28 is not present
  7886. * 0b1..A hardware service request for channel 28 is present
  7887. */
  7888. #define DMA_HRS_HRS28(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS28_SHIFT)) & DMA_HRS_HRS28_MASK)
  7889. #define DMA_HRS_HRS29_MASK (0x20000000U)
  7890. #define DMA_HRS_HRS29_SHIFT (29U)
  7891. /*! HRS29 - Hardware Request Status Channel 29
  7892. * 0b0..A hardware service request for channel 29 is not preset
  7893. * 0b1..A hardware service request for channel 29 is present
  7894. */
  7895. #define DMA_HRS_HRS29(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS29_SHIFT)) & DMA_HRS_HRS29_MASK)
  7896. #define DMA_HRS_HRS30_MASK (0x40000000U)
  7897. #define DMA_HRS_HRS30_SHIFT (30U)
  7898. /*! HRS30 - Hardware Request Status Channel 30
  7899. * 0b0..A hardware service request for channel 30 is not present
  7900. * 0b1..A hardware service request for for channel 30 is present
  7901. */
  7902. #define DMA_HRS_HRS30(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS30_SHIFT)) & DMA_HRS_HRS30_MASK)
  7903. #define DMA_HRS_HRS31_MASK (0x80000000U)
  7904. #define DMA_HRS_HRS31_SHIFT (31U)
  7905. /*! HRS31 - Hardware Request Status Channel 31
  7906. * 0b0..A hardware service request for channel 31 is not present
  7907. * 0b1..A hardware service request for channel 31 is present
  7908. */
  7909. #define DMA_HRS_HRS31(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS31_SHIFT)) & DMA_HRS_HRS31_MASK)
  7910. /*! @} */
  7911. /*! @name EARS - Enable Asynchronous Request in Stop Register */
  7912. /*! @{ */
  7913. #define DMA_EARS_EDREQ_0_MASK (0x1U)
  7914. #define DMA_EARS_EDREQ_0_SHIFT (0U)
  7915. /*! EDREQ_0 - Enable asynchronous DMA request in stop mode for channel 0.
  7916. * 0b0..Disable asynchronous DMA request for channel 0.
  7917. * 0b1..Enable asynchronous DMA request for channel 0.
  7918. */
  7919. #define DMA_EARS_EDREQ_0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_0_SHIFT)) & DMA_EARS_EDREQ_0_MASK)
  7920. #define DMA_EARS_EDREQ_1_MASK (0x2U)
  7921. #define DMA_EARS_EDREQ_1_SHIFT (1U)
  7922. /*! EDREQ_1 - Enable asynchronous DMA request in stop mode for channel 1.
  7923. * 0b0..Disable asynchronous DMA request for channel 1
  7924. * 0b1..Enable asynchronous DMA request for channel 1.
  7925. */
  7926. #define DMA_EARS_EDREQ_1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_1_SHIFT)) & DMA_EARS_EDREQ_1_MASK)
  7927. #define DMA_EARS_EDREQ_2_MASK (0x4U)
  7928. #define DMA_EARS_EDREQ_2_SHIFT (2U)
  7929. /*! EDREQ_2 - Enable asynchronous DMA request in stop mode for channel 2.
  7930. * 0b0..Disable asynchronous DMA request for channel 2.
  7931. * 0b1..Enable asynchronous DMA request for channel 2.
  7932. */
  7933. #define DMA_EARS_EDREQ_2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_2_SHIFT)) & DMA_EARS_EDREQ_2_MASK)
  7934. #define DMA_EARS_EDREQ_3_MASK (0x8U)
  7935. #define DMA_EARS_EDREQ_3_SHIFT (3U)
  7936. /*! EDREQ_3 - Enable asynchronous DMA request in stop mode for channel 3.
  7937. * 0b0..Disable asynchronous DMA request for channel 3.
  7938. * 0b1..Enable asynchronous DMA request for channel 3.
  7939. */
  7940. #define DMA_EARS_EDREQ_3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_3_SHIFT)) & DMA_EARS_EDREQ_3_MASK)
  7941. #define DMA_EARS_EDREQ_4_MASK (0x10U)
  7942. #define DMA_EARS_EDREQ_4_SHIFT (4U)
  7943. /*! EDREQ_4 - Enable asynchronous DMA request in stop mode for channel 4
  7944. * 0b0..Disable asynchronous DMA request for channel 4.
  7945. * 0b1..Enable asynchronous DMA request for channel 4.
  7946. */
  7947. #define DMA_EARS_EDREQ_4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_4_SHIFT)) & DMA_EARS_EDREQ_4_MASK)
  7948. #define DMA_EARS_EDREQ_5_MASK (0x20U)
  7949. #define DMA_EARS_EDREQ_5_SHIFT (5U)
  7950. /*! EDREQ_5 - Enable asynchronous DMA request in stop mode for channel 5
  7951. * 0b0..Disable asynchronous DMA request for channel 5.
  7952. * 0b1..Enable asynchronous DMA request for channel 5.
  7953. */
  7954. #define DMA_EARS_EDREQ_5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_5_SHIFT)) & DMA_EARS_EDREQ_5_MASK)
  7955. #define DMA_EARS_EDREQ_6_MASK (0x40U)
  7956. #define DMA_EARS_EDREQ_6_SHIFT (6U)
  7957. /*! EDREQ_6 - Enable asynchronous DMA request in stop mode for channel 6
  7958. * 0b0..Disable asynchronous DMA request for channel 6.
  7959. * 0b1..Enable asynchronous DMA request for channel 6.
  7960. */
  7961. #define DMA_EARS_EDREQ_6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_6_SHIFT)) & DMA_EARS_EDREQ_6_MASK)
  7962. #define DMA_EARS_EDREQ_7_MASK (0x80U)
  7963. #define DMA_EARS_EDREQ_7_SHIFT (7U)
  7964. /*! EDREQ_7 - Enable asynchronous DMA request in stop mode for channel 7
  7965. * 0b0..Disable asynchronous DMA request for channel 7.
  7966. * 0b1..Enable asynchronous DMA request for channel 7.
  7967. */
  7968. #define DMA_EARS_EDREQ_7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_7_SHIFT)) & DMA_EARS_EDREQ_7_MASK)
  7969. #define DMA_EARS_EDREQ_8_MASK (0x100U)
  7970. #define DMA_EARS_EDREQ_8_SHIFT (8U)
  7971. /*! EDREQ_8 - Enable asynchronous DMA request in stop mode for channel 8
  7972. * 0b0..Disable asynchronous DMA request for channel 8.
  7973. * 0b1..Enable asynchronous DMA request for channel 8.
  7974. */
  7975. #define DMA_EARS_EDREQ_8(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_8_SHIFT)) & DMA_EARS_EDREQ_8_MASK)
  7976. #define DMA_EARS_EDREQ_9_MASK (0x200U)
  7977. #define DMA_EARS_EDREQ_9_SHIFT (9U)
  7978. /*! EDREQ_9 - Enable asynchronous DMA request in stop mode for channel 9
  7979. * 0b0..Disable asynchronous DMA request for channel 9.
  7980. * 0b1..Enable asynchronous DMA request for channel 9.
  7981. */
  7982. #define DMA_EARS_EDREQ_9(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_9_SHIFT)) & DMA_EARS_EDREQ_9_MASK)
  7983. #define DMA_EARS_EDREQ_10_MASK (0x400U)
  7984. #define DMA_EARS_EDREQ_10_SHIFT (10U)
  7985. /*! EDREQ_10 - Enable asynchronous DMA request in stop mode for channel 10
  7986. * 0b0..Disable asynchronous DMA request for channel 10.
  7987. * 0b1..Enable asynchronous DMA request for channel 10.
  7988. */
  7989. #define DMA_EARS_EDREQ_10(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_10_SHIFT)) & DMA_EARS_EDREQ_10_MASK)
  7990. #define DMA_EARS_EDREQ_11_MASK (0x800U)
  7991. #define DMA_EARS_EDREQ_11_SHIFT (11U)
  7992. /*! EDREQ_11 - Enable asynchronous DMA request in stop mode for channel 11
  7993. * 0b0..Disable asynchronous DMA request for channel 11.
  7994. * 0b1..Enable asynchronous DMA request for channel 11.
  7995. */
  7996. #define DMA_EARS_EDREQ_11(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_11_SHIFT)) & DMA_EARS_EDREQ_11_MASK)
  7997. #define DMA_EARS_EDREQ_12_MASK (0x1000U)
  7998. #define DMA_EARS_EDREQ_12_SHIFT (12U)
  7999. /*! EDREQ_12 - Enable asynchronous DMA request in stop mode for channel 12
  8000. * 0b0..Disable asynchronous DMA request for channel 12.
  8001. * 0b1..Enable asynchronous DMA request for channel 12.
  8002. */
  8003. #define DMA_EARS_EDREQ_12(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_12_SHIFT)) & DMA_EARS_EDREQ_12_MASK)
  8004. #define DMA_EARS_EDREQ_13_MASK (0x2000U)
  8005. #define DMA_EARS_EDREQ_13_SHIFT (13U)
  8006. /*! EDREQ_13 - Enable asynchronous DMA request in stop mode for channel 13
  8007. * 0b0..Disable asynchronous DMA request for channel 13.
  8008. * 0b1..Enable asynchronous DMA request for channel 13.
  8009. */
  8010. #define DMA_EARS_EDREQ_13(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_13_SHIFT)) & DMA_EARS_EDREQ_13_MASK)
  8011. #define DMA_EARS_EDREQ_14_MASK (0x4000U)
  8012. #define DMA_EARS_EDREQ_14_SHIFT (14U)
  8013. /*! EDREQ_14 - Enable asynchronous DMA request in stop mode for channel 14
  8014. * 0b0..Disable asynchronous DMA request for channel 14.
  8015. * 0b1..Enable asynchronous DMA request for channel 14.
  8016. */
  8017. #define DMA_EARS_EDREQ_14(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_14_SHIFT)) & DMA_EARS_EDREQ_14_MASK)
  8018. #define DMA_EARS_EDREQ_15_MASK (0x8000U)
  8019. #define DMA_EARS_EDREQ_15_SHIFT (15U)
  8020. /*! EDREQ_15 - Enable asynchronous DMA request in stop mode for channel 15
  8021. * 0b0..Disable asynchronous DMA request for channel 15.
  8022. * 0b1..Enable asynchronous DMA request for channel 15.
  8023. */
  8024. #define DMA_EARS_EDREQ_15(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_15_SHIFT)) & DMA_EARS_EDREQ_15_MASK)
  8025. #define DMA_EARS_EDREQ_16_MASK (0x10000U)
  8026. #define DMA_EARS_EDREQ_16_SHIFT (16U)
  8027. /*! EDREQ_16 - Enable asynchronous DMA request in stop mode for channel 16
  8028. * 0b0..Disable asynchronous DMA request for channel 16
  8029. * 0b1..Enable asynchronous DMA request for channel 16
  8030. */
  8031. #define DMA_EARS_EDREQ_16(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_16_SHIFT)) & DMA_EARS_EDREQ_16_MASK)
  8032. #define DMA_EARS_EDREQ_17_MASK (0x20000U)
  8033. #define DMA_EARS_EDREQ_17_SHIFT (17U)
  8034. /*! EDREQ_17 - Enable asynchronous DMA request in stop mode for channel 17
  8035. * 0b0..Disable asynchronous DMA request for channel 17
  8036. * 0b1..Enable asynchronous DMA request for channel 17
  8037. */
  8038. #define DMA_EARS_EDREQ_17(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_17_SHIFT)) & DMA_EARS_EDREQ_17_MASK)
  8039. #define DMA_EARS_EDREQ_18_MASK (0x40000U)
  8040. #define DMA_EARS_EDREQ_18_SHIFT (18U)
  8041. /*! EDREQ_18 - Enable asynchronous DMA request in stop mode for channel 18
  8042. * 0b0..Disable asynchronous DMA request for channel 18
  8043. * 0b1..Enable asynchronous DMA request for channel 18
  8044. */
  8045. #define DMA_EARS_EDREQ_18(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_18_SHIFT)) & DMA_EARS_EDREQ_18_MASK)
  8046. #define DMA_EARS_EDREQ_19_MASK (0x80000U)
  8047. #define DMA_EARS_EDREQ_19_SHIFT (19U)
  8048. /*! EDREQ_19 - Enable asynchronous DMA request in stop mode for channel 19
  8049. * 0b0..Disable asynchronous DMA request for channel 19
  8050. * 0b1..Enable asynchronous DMA request for channel 19
  8051. */
  8052. #define DMA_EARS_EDREQ_19(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_19_SHIFT)) & DMA_EARS_EDREQ_19_MASK)
  8053. #define DMA_EARS_EDREQ_20_MASK (0x100000U)
  8054. #define DMA_EARS_EDREQ_20_SHIFT (20U)
  8055. /*! EDREQ_20 - Enable asynchronous DMA request in stop mode for channel 20
  8056. * 0b0..Disable asynchronous DMA request for channel 20
  8057. * 0b1..Enable asynchronous DMA request for channel 20
  8058. */
  8059. #define DMA_EARS_EDREQ_20(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_20_SHIFT)) & DMA_EARS_EDREQ_20_MASK)
  8060. #define DMA_EARS_EDREQ_21_MASK (0x200000U)
  8061. #define DMA_EARS_EDREQ_21_SHIFT (21U)
  8062. /*! EDREQ_21 - Enable asynchronous DMA request in stop mode for channel 21
  8063. * 0b0..Disable asynchronous DMA request for channel 21
  8064. * 0b1..Enable asynchronous DMA request for channel 21
  8065. */
  8066. #define DMA_EARS_EDREQ_21(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_21_SHIFT)) & DMA_EARS_EDREQ_21_MASK)
  8067. #define DMA_EARS_EDREQ_22_MASK (0x400000U)
  8068. #define DMA_EARS_EDREQ_22_SHIFT (22U)
  8069. /*! EDREQ_22 - Enable asynchronous DMA request in stop mode for channel 22
  8070. * 0b0..Disable asynchronous DMA request for channel 22
  8071. * 0b1..Enable asynchronous DMA request for channel 22
  8072. */
  8073. #define DMA_EARS_EDREQ_22(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_22_SHIFT)) & DMA_EARS_EDREQ_22_MASK)
  8074. #define DMA_EARS_EDREQ_23_MASK (0x800000U)
  8075. #define DMA_EARS_EDREQ_23_SHIFT (23U)
  8076. /*! EDREQ_23 - Enable asynchronous DMA request in stop mode for channel 23
  8077. * 0b0..Disable asynchronous DMA request for channel 23
  8078. * 0b1..Enable asynchronous DMA request for channel 23
  8079. */
  8080. #define DMA_EARS_EDREQ_23(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_23_SHIFT)) & DMA_EARS_EDREQ_23_MASK)
  8081. #define DMA_EARS_EDREQ_24_MASK (0x1000000U)
  8082. #define DMA_EARS_EDREQ_24_SHIFT (24U)
  8083. /*! EDREQ_24 - Enable asynchronous DMA request in stop mode for channel 24
  8084. * 0b0..Disable asynchronous DMA request for channel 24
  8085. * 0b1..Enable asynchronous DMA request for channel 24
  8086. */
  8087. #define DMA_EARS_EDREQ_24(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_24_SHIFT)) & DMA_EARS_EDREQ_24_MASK)
  8088. #define DMA_EARS_EDREQ_25_MASK (0x2000000U)
  8089. #define DMA_EARS_EDREQ_25_SHIFT (25U)
  8090. /*! EDREQ_25 - Enable asynchronous DMA request in stop mode for channel 25
  8091. * 0b0..Disable asynchronous DMA request for channel 25
  8092. * 0b1..Enable asynchronous DMA request for channel 25
  8093. */
  8094. #define DMA_EARS_EDREQ_25(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_25_SHIFT)) & DMA_EARS_EDREQ_25_MASK)
  8095. #define DMA_EARS_EDREQ_26_MASK (0x4000000U)
  8096. #define DMA_EARS_EDREQ_26_SHIFT (26U)
  8097. /*! EDREQ_26 - Enable asynchronous DMA request in stop mode for channel 26
  8098. * 0b0..Disable asynchronous DMA request for channel 26
  8099. * 0b1..Enable asynchronous DMA request for channel 26
  8100. */
  8101. #define DMA_EARS_EDREQ_26(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_26_SHIFT)) & DMA_EARS_EDREQ_26_MASK)
  8102. #define DMA_EARS_EDREQ_27_MASK (0x8000000U)
  8103. #define DMA_EARS_EDREQ_27_SHIFT (27U)
  8104. /*! EDREQ_27 - Enable asynchronous DMA request in stop mode for channel 27
  8105. * 0b0..Disable asynchronous DMA request for channel 27
  8106. * 0b1..Enable asynchronous DMA request for channel 27
  8107. */
  8108. #define DMA_EARS_EDREQ_27(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_27_SHIFT)) & DMA_EARS_EDREQ_27_MASK)
  8109. #define DMA_EARS_EDREQ_28_MASK (0x10000000U)
  8110. #define DMA_EARS_EDREQ_28_SHIFT (28U)
  8111. /*! EDREQ_28 - Enable asynchronous DMA request in stop mode for channel 28
  8112. * 0b0..Disable asynchronous DMA request for channel 28
  8113. * 0b1..Enable asynchronous DMA request for channel 28
  8114. */
  8115. #define DMA_EARS_EDREQ_28(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_28_SHIFT)) & DMA_EARS_EDREQ_28_MASK)
  8116. #define DMA_EARS_EDREQ_29_MASK (0x20000000U)
  8117. #define DMA_EARS_EDREQ_29_SHIFT (29U)
  8118. /*! EDREQ_29 - Enable asynchronous DMA request in stop mode for channel 29
  8119. * 0b0..Disable asynchronous DMA request for channel 29
  8120. * 0b1..Enable asynchronous DMA request for channel 29
  8121. */
  8122. #define DMA_EARS_EDREQ_29(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_29_SHIFT)) & DMA_EARS_EDREQ_29_MASK)
  8123. #define DMA_EARS_EDREQ_30_MASK (0x40000000U)
  8124. #define DMA_EARS_EDREQ_30_SHIFT (30U)
  8125. /*! EDREQ_30 - Enable asynchronous DMA request in stop mode for channel 30
  8126. * 0b0..Disable asynchronous DMA request for channel 30
  8127. * 0b1..Enable asynchronous DMA request for channel 30
  8128. */
  8129. #define DMA_EARS_EDREQ_30(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_30_SHIFT)) & DMA_EARS_EDREQ_30_MASK)
  8130. #define DMA_EARS_EDREQ_31_MASK (0x80000000U)
  8131. #define DMA_EARS_EDREQ_31_SHIFT (31U)
  8132. /*! EDREQ_31 - Enable asynchronous DMA request in stop mode for channel 31
  8133. * 0b0..Disable asynchronous DMA request for channel 31
  8134. * 0b1..Enable asynchronous DMA request for channel 31
  8135. */
  8136. #define DMA_EARS_EDREQ_31(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_31_SHIFT)) & DMA_EARS_EDREQ_31_MASK)
  8137. /*! @} */
  8138. /*! @name DCHPRI3 - Channel n Priority Register */
  8139. /*! @{ */
  8140. #define DMA_DCHPRI3_CHPRI_MASK (0xFU)
  8141. #define DMA_DCHPRI3_CHPRI_SHIFT (0U)
  8142. #define DMA_DCHPRI3_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_CHPRI_SHIFT)) & DMA_DCHPRI3_CHPRI_MASK)
  8143. #define DMA_DCHPRI3_GRPPRI_MASK (0x30U)
  8144. #define DMA_DCHPRI3_GRPPRI_SHIFT (4U)
  8145. #define DMA_DCHPRI3_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_GRPPRI_SHIFT)) & DMA_DCHPRI3_GRPPRI_MASK)
  8146. #define DMA_DCHPRI3_DPA_MASK (0x40U)
  8147. #define DMA_DCHPRI3_DPA_SHIFT (6U)
  8148. /*! DPA - Disable Preempt Ability.
  8149. * 0b0..Channel n can suspend a lower priority channel.
  8150. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8151. */
  8152. #define DMA_DCHPRI3_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_DPA_SHIFT)) & DMA_DCHPRI3_DPA_MASK)
  8153. #define DMA_DCHPRI3_ECP_MASK (0x80U)
  8154. #define DMA_DCHPRI3_ECP_SHIFT (7U)
  8155. /*! ECP - Enable Channel Preemption.
  8156. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8157. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8158. */
  8159. #define DMA_DCHPRI3_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_ECP_SHIFT)) & DMA_DCHPRI3_ECP_MASK)
  8160. /*! @} */
  8161. /*! @name DCHPRI2 - Channel n Priority Register */
  8162. /*! @{ */
  8163. #define DMA_DCHPRI2_CHPRI_MASK (0xFU)
  8164. #define DMA_DCHPRI2_CHPRI_SHIFT (0U)
  8165. #define DMA_DCHPRI2_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_CHPRI_SHIFT)) & DMA_DCHPRI2_CHPRI_MASK)
  8166. #define DMA_DCHPRI2_GRPPRI_MASK (0x30U)
  8167. #define DMA_DCHPRI2_GRPPRI_SHIFT (4U)
  8168. #define DMA_DCHPRI2_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_GRPPRI_SHIFT)) & DMA_DCHPRI2_GRPPRI_MASK)
  8169. #define DMA_DCHPRI2_DPA_MASK (0x40U)
  8170. #define DMA_DCHPRI2_DPA_SHIFT (6U)
  8171. /*! DPA - Disable Preempt Ability.
  8172. * 0b0..Channel n can suspend a lower priority channel.
  8173. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8174. */
  8175. #define DMA_DCHPRI2_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_DPA_SHIFT)) & DMA_DCHPRI2_DPA_MASK)
  8176. #define DMA_DCHPRI2_ECP_MASK (0x80U)
  8177. #define DMA_DCHPRI2_ECP_SHIFT (7U)
  8178. /*! ECP - Enable Channel Preemption.
  8179. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8180. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8181. */
  8182. #define DMA_DCHPRI2_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_ECP_SHIFT)) & DMA_DCHPRI2_ECP_MASK)
  8183. /*! @} */
  8184. /*! @name DCHPRI1 - Channel n Priority Register */
  8185. /*! @{ */
  8186. #define DMA_DCHPRI1_CHPRI_MASK (0xFU)
  8187. #define DMA_DCHPRI1_CHPRI_SHIFT (0U)
  8188. #define DMA_DCHPRI1_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_CHPRI_SHIFT)) & DMA_DCHPRI1_CHPRI_MASK)
  8189. #define DMA_DCHPRI1_GRPPRI_MASK (0x30U)
  8190. #define DMA_DCHPRI1_GRPPRI_SHIFT (4U)
  8191. #define DMA_DCHPRI1_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_GRPPRI_SHIFT)) & DMA_DCHPRI1_GRPPRI_MASK)
  8192. #define DMA_DCHPRI1_DPA_MASK (0x40U)
  8193. #define DMA_DCHPRI1_DPA_SHIFT (6U)
  8194. /*! DPA - Disable Preempt Ability.
  8195. * 0b0..Channel n can suspend a lower priority channel.
  8196. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8197. */
  8198. #define DMA_DCHPRI1_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_DPA_SHIFT)) & DMA_DCHPRI1_DPA_MASK)
  8199. #define DMA_DCHPRI1_ECP_MASK (0x80U)
  8200. #define DMA_DCHPRI1_ECP_SHIFT (7U)
  8201. /*! ECP - Enable Channel Preemption.
  8202. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8203. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8204. */
  8205. #define DMA_DCHPRI1_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_ECP_SHIFT)) & DMA_DCHPRI1_ECP_MASK)
  8206. /*! @} */
  8207. /*! @name DCHPRI0 - Channel n Priority Register */
  8208. /*! @{ */
  8209. #define DMA_DCHPRI0_CHPRI_MASK (0xFU)
  8210. #define DMA_DCHPRI0_CHPRI_SHIFT (0U)
  8211. #define DMA_DCHPRI0_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_CHPRI_SHIFT)) & DMA_DCHPRI0_CHPRI_MASK)
  8212. #define DMA_DCHPRI0_GRPPRI_MASK (0x30U)
  8213. #define DMA_DCHPRI0_GRPPRI_SHIFT (4U)
  8214. #define DMA_DCHPRI0_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_GRPPRI_SHIFT)) & DMA_DCHPRI0_GRPPRI_MASK)
  8215. #define DMA_DCHPRI0_DPA_MASK (0x40U)
  8216. #define DMA_DCHPRI0_DPA_SHIFT (6U)
  8217. /*! DPA - Disable Preempt Ability.
  8218. * 0b0..Channel n can suspend a lower priority channel.
  8219. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8220. */
  8221. #define DMA_DCHPRI0_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_DPA_SHIFT)) & DMA_DCHPRI0_DPA_MASK)
  8222. #define DMA_DCHPRI0_ECP_MASK (0x80U)
  8223. #define DMA_DCHPRI0_ECP_SHIFT (7U)
  8224. /*! ECP - Enable Channel Preemption.
  8225. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8226. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8227. */
  8228. #define DMA_DCHPRI0_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_ECP_SHIFT)) & DMA_DCHPRI0_ECP_MASK)
  8229. /*! @} */
  8230. /*! @name DCHPRI7 - Channel n Priority Register */
  8231. /*! @{ */
  8232. #define DMA_DCHPRI7_CHPRI_MASK (0xFU)
  8233. #define DMA_DCHPRI7_CHPRI_SHIFT (0U)
  8234. #define DMA_DCHPRI7_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_CHPRI_SHIFT)) & DMA_DCHPRI7_CHPRI_MASK)
  8235. #define DMA_DCHPRI7_GRPPRI_MASK (0x30U)
  8236. #define DMA_DCHPRI7_GRPPRI_SHIFT (4U)
  8237. #define DMA_DCHPRI7_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_GRPPRI_SHIFT)) & DMA_DCHPRI7_GRPPRI_MASK)
  8238. #define DMA_DCHPRI7_DPA_MASK (0x40U)
  8239. #define DMA_DCHPRI7_DPA_SHIFT (6U)
  8240. /*! DPA - Disable Preempt Ability.
  8241. * 0b0..Channel n can suspend a lower priority channel.
  8242. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8243. */
  8244. #define DMA_DCHPRI7_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_DPA_SHIFT)) & DMA_DCHPRI7_DPA_MASK)
  8245. #define DMA_DCHPRI7_ECP_MASK (0x80U)
  8246. #define DMA_DCHPRI7_ECP_SHIFT (7U)
  8247. /*! ECP - Enable Channel Preemption.
  8248. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8249. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8250. */
  8251. #define DMA_DCHPRI7_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_ECP_SHIFT)) & DMA_DCHPRI7_ECP_MASK)
  8252. /*! @} */
  8253. /*! @name DCHPRI6 - Channel n Priority Register */
  8254. /*! @{ */
  8255. #define DMA_DCHPRI6_CHPRI_MASK (0xFU)
  8256. #define DMA_DCHPRI6_CHPRI_SHIFT (0U)
  8257. #define DMA_DCHPRI6_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_CHPRI_SHIFT)) & DMA_DCHPRI6_CHPRI_MASK)
  8258. #define DMA_DCHPRI6_GRPPRI_MASK (0x30U)
  8259. #define DMA_DCHPRI6_GRPPRI_SHIFT (4U)
  8260. #define DMA_DCHPRI6_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_GRPPRI_SHIFT)) & DMA_DCHPRI6_GRPPRI_MASK)
  8261. #define DMA_DCHPRI6_DPA_MASK (0x40U)
  8262. #define DMA_DCHPRI6_DPA_SHIFT (6U)
  8263. /*! DPA - Disable Preempt Ability.
  8264. * 0b0..Channel n can suspend a lower priority channel.
  8265. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8266. */
  8267. #define DMA_DCHPRI6_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_DPA_SHIFT)) & DMA_DCHPRI6_DPA_MASK)
  8268. #define DMA_DCHPRI6_ECP_MASK (0x80U)
  8269. #define DMA_DCHPRI6_ECP_SHIFT (7U)
  8270. /*! ECP - Enable Channel Preemption.
  8271. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8272. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8273. */
  8274. #define DMA_DCHPRI6_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_ECP_SHIFT)) & DMA_DCHPRI6_ECP_MASK)
  8275. /*! @} */
  8276. /*! @name DCHPRI5 - Channel n Priority Register */
  8277. /*! @{ */
  8278. #define DMA_DCHPRI5_CHPRI_MASK (0xFU)
  8279. #define DMA_DCHPRI5_CHPRI_SHIFT (0U)
  8280. #define DMA_DCHPRI5_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_CHPRI_SHIFT)) & DMA_DCHPRI5_CHPRI_MASK)
  8281. #define DMA_DCHPRI5_GRPPRI_MASK (0x30U)
  8282. #define DMA_DCHPRI5_GRPPRI_SHIFT (4U)
  8283. #define DMA_DCHPRI5_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_GRPPRI_SHIFT)) & DMA_DCHPRI5_GRPPRI_MASK)
  8284. #define DMA_DCHPRI5_DPA_MASK (0x40U)
  8285. #define DMA_DCHPRI5_DPA_SHIFT (6U)
  8286. /*! DPA - Disable Preempt Ability.
  8287. * 0b0..Channel n can suspend a lower priority channel.
  8288. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8289. */
  8290. #define DMA_DCHPRI5_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_DPA_SHIFT)) & DMA_DCHPRI5_DPA_MASK)
  8291. #define DMA_DCHPRI5_ECP_MASK (0x80U)
  8292. #define DMA_DCHPRI5_ECP_SHIFT (7U)
  8293. /*! ECP - Enable Channel Preemption.
  8294. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8295. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8296. */
  8297. #define DMA_DCHPRI5_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_ECP_SHIFT)) & DMA_DCHPRI5_ECP_MASK)
  8298. /*! @} */
  8299. /*! @name DCHPRI4 - Channel n Priority Register */
  8300. /*! @{ */
  8301. #define DMA_DCHPRI4_CHPRI_MASK (0xFU)
  8302. #define DMA_DCHPRI4_CHPRI_SHIFT (0U)
  8303. #define DMA_DCHPRI4_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_CHPRI_SHIFT)) & DMA_DCHPRI4_CHPRI_MASK)
  8304. #define DMA_DCHPRI4_GRPPRI_MASK (0x30U)
  8305. #define DMA_DCHPRI4_GRPPRI_SHIFT (4U)
  8306. #define DMA_DCHPRI4_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_GRPPRI_SHIFT)) & DMA_DCHPRI4_GRPPRI_MASK)
  8307. #define DMA_DCHPRI4_DPA_MASK (0x40U)
  8308. #define DMA_DCHPRI4_DPA_SHIFT (6U)
  8309. /*! DPA - Disable Preempt Ability.
  8310. * 0b0..Channel n can suspend a lower priority channel.
  8311. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8312. */
  8313. #define DMA_DCHPRI4_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_DPA_SHIFT)) & DMA_DCHPRI4_DPA_MASK)
  8314. #define DMA_DCHPRI4_ECP_MASK (0x80U)
  8315. #define DMA_DCHPRI4_ECP_SHIFT (7U)
  8316. /*! ECP - Enable Channel Preemption.
  8317. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8318. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8319. */
  8320. #define DMA_DCHPRI4_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_ECP_SHIFT)) & DMA_DCHPRI4_ECP_MASK)
  8321. /*! @} */
  8322. /*! @name DCHPRI11 - Channel n Priority Register */
  8323. /*! @{ */
  8324. #define DMA_DCHPRI11_CHPRI_MASK (0xFU)
  8325. #define DMA_DCHPRI11_CHPRI_SHIFT (0U)
  8326. #define DMA_DCHPRI11_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_CHPRI_SHIFT)) & DMA_DCHPRI11_CHPRI_MASK)
  8327. #define DMA_DCHPRI11_GRPPRI_MASK (0x30U)
  8328. #define DMA_DCHPRI11_GRPPRI_SHIFT (4U)
  8329. #define DMA_DCHPRI11_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_GRPPRI_SHIFT)) & DMA_DCHPRI11_GRPPRI_MASK)
  8330. #define DMA_DCHPRI11_DPA_MASK (0x40U)
  8331. #define DMA_DCHPRI11_DPA_SHIFT (6U)
  8332. /*! DPA - Disable Preempt Ability.
  8333. * 0b0..Channel n can suspend a lower priority channel.
  8334. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8335. */
  8336. #define DMA_DCHPRI11_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_DPA_SHIFT)) & DMA_DCHPRI11_DPA_MASK)
  8337. #define DMA_DCHPRI11_ECP_MASK (0x80U)
  8338. #define DMA_DCHPRI11_ECP_SHIFT (7U)
  8339. /*! ECP - Enable Channel Preemption.
  8340. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8341. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8342. */
  8343. #define DMA_DCHPRI11_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_ECP_SHIFT)) & DMA_DCHPRI11_ECP_MASK)
  8344. /*! @} */
  8345. /*! @name DCHPRI10 - Channel n Priority Register */
  8346. /*! @{ */
  8347. #define DMA_DCHPRI10_CHPRI_MASK (0xFU)
  8348. #define DMA_DCHPRI10_CHPRI_SHIFT (0U)
  8349. #define DMA_DCHPRI10_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_CHPRI_SHIFT)) & DMA_DCHPRI10_CHPRI_MASK)
  8350. #define DMA_DCHPRI10_GRPPRI_MASK (0x30U)
  8351. #define DMA_DCHPRI10_GRPPRI_SHIFT (4U)
  8352. #define DMA_DCHPRI10_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_GRPPRI_SHIFT)) & DMA_DCHPRI10_GRPPRI_MASK)
  8353. #define DMA_DCHPRI10_DPA_MASK (0x40U)
  8354. #define DMA_DCHPRI10_DPA_SHIFT (6U)
  8355. /*! DPA - Disable Preempt Ability.
  8356. * 0b0..Channel n can suspend a lower priority channel.
  8357. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8358. */
  8359. #define DMA_DCHPRI10_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_DPA_SHIFT)) & DMA_DCHPRI10_DPA_MASK)
  8360. #define DMA_DCHPRI10_ECP_MASK (0x80U)
  8361. #define DMA_DCHPRI10_ECP_SHIFT (7U)
  8362. /*! ECP - Enable Channel Preemption.
  8363. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8364. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8365. */
  8366. #define DMA_DCHPRI10_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_ECP_SHIFT)) & DMA_DCHPRI10_ECP_MASK)
  8367. /*! @} */
  8368. /*! @name DCHPRI9 - Channel n Priority Register */
  8369. /*! @{ */
  8370. #define DMA_DCHPRI9_CHPRI_MASK (0xFU)
  8371. #define DMA_DCHPRI9_CHPRI_SHIFT (0U)
  8372. #define DMA_DCHPRI9_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_CHPRI_SHIFT)) & DMA_DCHPRI9_CHPRI_MASK)
  8373. #define DMA_DCHPRI9_GRPPRI_MASK (0x30U)
  8374. #define DMA_DCHPRI9_GRPPRI_SHIFT (4U)
  8375. #define DMA_DCHPRI9_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_GRPPRI_SHIFT)) & DMA_DCHPRI9_GRPPRI_MASK)
  8376. #define DMA_DCHPRI9_DPA_MASK (0x40U)
  8377. #define DMA_DCHPRI9_DPA_SHIFT (6U)
  8378. /*! DPA - Disable Preempt Ability.
  8379. * 0b0..Channel n can suspend a lower priority channel.
  8380. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8381. */
  8382. #define DMA_DCHPRI9_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_DPA_SHIFT)) & DMA_DCHPRI9_DPA_MASK)
  8383. #define DMA_DCHPRI9_ECP_MASK (0x80U)
  8384. #define DMA_DCHPRI9_ECP_SHIFT (7U)
  8385. /*! ECP - Enable Channel Preemption.
  8386. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8387. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8388. */
  8389. #define DMA_DCHPRI9_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_ECP_SHIFT)) & DMA_DCHPRI9_ECP_MASK)
  8390. /*! @} */
  8391. /*! @name DCHPRI8 - Channel n Priority Register */
  8392. /*! @{ */
  8393. #define DMA_DCHPRI8_CHPRI_MASK (0xFU)
  8394. #define DMA_DCHPRI8_CHPRI_SHIFT (0U)
  8395. #define DMA_DCHPRI8_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_CHPRI_SHIFT)) & DMA_DCHPRI8_CHPRI_MASK)
  8396. #define DMA_DCHPRI8_GRPPRI_MASK (0x30U)
  8397. #define DMA_DCHPRI8_GRPPRI_SHIFT (4U)
  8398. #define DMA_DCHPRI8_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_GRPPRI_SHIFT)) & DMA_DCHPRI8_GRPPRI_MASK)
  8399. #define DMA_DCHPRI8_DPA_MASK (0x40U)
  8400. #define DMA_DCHPRI8_DPA_SHIFT (6U)
  8401. /*! DPA - Disable Preempt Ability.
  8402. * 0b0..Channel n can suspend a lower priority channel.
  8403. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8404. */
  8405. #define DMA_DCHPRI8_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_DPA_SHIFT)) & DMA_DCHPRI8_DPA_MASK)
  8406. #define DMA_DCHPRI8_ECP_MASK (0x80U)
  8407. #define DMA_DCHPRI8_ECP_SHIFT (7U)
  8408. /*! ECP - Enable Channel Preemption.
  8409. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8410. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8411. */
  8412. #define DMA_DCHPRI8_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_ECP_SHIFT)) & DMA_DCHPRI8_ECP_MASK)
  8413. /*! @} */
  8414. /*! @name DCHPRI15 - Channel n Priority Register */
  8415. /*! @{ */
  8416. #define DMA_DCHPRI15_CHPRI_MASK (0xFU)
  8417. #define DMA_DCHPRI15_CHPRI_SHIFT (0U)
  8418. #define DMA_DCHPRI15_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_CHPRI_SHIFT)) & DMA_DCHPRI15_CHPRI_MASK)
  8419. #define DMA_DCHPRI15_GRPPRI_MASK (0x30U)
  8420. #define DMA_DCHPRI15_GRPPRI_SHIFT (4U)
  8421. #define DMA_DCHPRI15_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_GRPPRI_SHIFT)) & DMA_DCHPRI15_GRPPRI_MASK)
  8422. #define DMA_DCHPRI15_DPA_MASK (0x40U)
  8423. #define DMA_DCHPRI15_DPA_SHIFT (6U)
  8424. /*! DPA - Disable Preempt Ability.
  8425. * 0b0..Channel n can suspend a lower priority channel.
  8426. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8427. */
  8428. #define DMA_DCHPRI15_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_DPA_SHIFT)) & DMA_DCHPRI15_DPA_MASK)
  8429. #define DMA_DCHPRI15_ECP_MASK (0x80U)
  8430. #define DMA_DCHPRI15_ECP_SHIFT (7U)
  8431. /*! ECP - Enable Channel Preemption.
  8432. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8433. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8434. */
  8435. #define DMA_DCHPRI15_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_ECP_SHIFT)) & DMA_DCHPRI15_ECP_MASK)
  8436. /*! @} */
  8437. /*! @name DCHPRI14 - Channel n Priority Register */
  8438. /*! @{ */
  8439. #define DMA_DCHPRI14_CHPRI_MASK (0xFU)
  8440. #define DMA_DCHPRI14_CHPRI_SHIFT (0U)
  8441. #define DMA_DCHPRI14_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_CHPRI_SHIFT)) & DMA_DCHPRI14_CHPRI_MASK)
  8442. #define DMA_DCHPRI14_GRPPRI_MASK (0x30U)
  8443. #define DMA_DCHPRI14_GRPPRI_SHIFT (4U)
  8444. #define DMA_DCHPRI14_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_GRPPRI_SHIFT)) & DMA_DCHPRI14_GRPPRI_MASK)
  8445. #define DMA_DCHPRI14_DPA_MASK (0x40U)
  8446. #define DMA_DCHPRI14_DPA_SHIFT (6U)
  8447. /*! DPA - Disable Preempt Ability.
  8448. * 0b0..Channel n can suspend a lower priority channel.
  8449. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8450. */
  8451. #define DMA_DCHPRI14_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_DPA_SHIFT)) & DMA_DCHPRI14_DPA_MASK)
  8452. #define DMA_DCHPRI14_ECP_MASK (0x80U)
  8453. #define DMA_DCHPRI14_ECP_SHIFT (7U)
  8454. /*! ECP - Enable Channel Preemption.
  8455. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8456. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8457. */
  8458. #define DMA_DCHPRI14_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_ECP_SHIFT)) & DMA_DCHPRI14_ECP_MASK)
  8459. /*! @} */
  8460. /*! @name DCHPRI13 - Channel n Priority Register */
  8461. /*! @{ */
  8462. #define DMA_DCHPRI13_CHPRI_MASK (0xFU)
  8463. #define DMA_DCHPRI13_CHPRI_SHIFT (0U)
  8464. #define DMA_DCHPRI13_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_CHPRI_SHIFT)) & DMA_DCHPRI13_CHPRI_MASK)
  8465. #define DMA_DCHPRI13_GRPPRI_MASK (0x30U)
  8466. #define DMA_DCHPRI13_GRPPRI_SHIFT (4U)
  8467. #define DMA_DCHPRI13_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_GRPPRI_SHIFT)) & DMA_DCHPRI13_GRPPRI_MASK)
  8468. #define DMA_DCHPRI13_DPA_MASK (0x40U)
  8469. #define DMA_DCHPRI13_DPA_SHIFT (6U)
  8470. /*! DPA - Disable Preempt Ability.
  8471. * 0b0..Channel n can suspend a lower priority channel.
  8472. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8473. */
  8474. #define DMA_DCHPRI13_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_DPA_SHIFT)) & DMA_DCHPRI13_DPA_MASK)
  8475. #define DMA_DCHPRI13_ECP_MASK (0x80U)
  8476. #define DMA_DCHPRI13_ECP_SHIFT (7U)
  8477. /*! ECP - Enable Channel Preemption.
  8478. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8479. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8480. */
  8481. #define DMA_DCHPRI13_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_ECP_SHIFT)) & DMA_DCHPRI13_ECP_MASK)
  8482. /*! @} */
  8483. /*! @name DCHPRI12 - Channel n Priority Register */
  8484. /*! @{ */
  8485. #define DMA_DCHPRI12_CHPRI_MASK (0xFU)
  8486. #define DMA_DCHPRI12_CHPRI_SHIFT (0U)
  8487. #define DMA_DCHPRI12_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_CHPRI_SHIFT)) & DMA_DCHPRI12_CHPRI_MASK)
  8488. #define DMA_DCHPRI12_GRPPRI_MASK (0x30U)
  8489. #define DMA_DCHPRI12_GRPPRI_SHIFT (4U)
  8490. #define DMA_DCHPRI12_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_GRPPRI_SHIFT)) & DMA_DCHPRI12_GRPPRI_MASK)
  8491. #define DMA_DCHPRI12_DPA_MASK (0x40U)
  8492. #define DMA_DCHPRI12_DPA_SHIFT (6U)
  8493. /*! DPA - Disable Preempt Ability.
  8494. * 0b0..Channel n can suspend a lower priority channel.
  8495. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8496. */
  8497. #define DMA_DCHPRI12_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_DPA_SHIFT)) & DMA_DCHPRI12_DPA_MASK)
  8498. #define DMA_DCHPRI12_ECP_MASK (0x80U)
  8499. #define DMA_DCHPRI12_ECP_SHIFT (7U)
  8500. /*! ECP - Enable Channel Preemption.
  8501. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8502. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8503. */
  8504. #define DMA_DCHPRI12_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_ECP_SHIFT)) & DMA_DCHPRI12_ECP_MASK)
  8505. /*! @} */
  8506. /*! @name DCHPRI19 - Channel n Priority Register */
  8507. /*! @{ */
  8508. #define DMA_DCHPRI19_CHPRI_MASK (0xFU)
  8509. #define DMA_DCHPRI19_CHPRI_SHIFT (0U)
  8510. #define DMA_DCHPRI19_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_CHPRI_SHIFT)) & DMA_DCHPRI19_CHPRI_MASK)
  8511. #define DMA_DCHPRI19_GRPPRI_MASK (0x30U)
  8512. #define DMA_DCHPRI19_GRPPRI_SHIFT (4U)
  8513. #define DMA_DCHPRI19_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_GRPPRI_SHIFT)) & DMA_DCHPRI19_GRPPRI_MASK)
  8514. #define DMA_DCHPRI19_DPA_MASK (0x40U)
  8515. #define DMA_DCHPRI19_DPA_SHIFT (6U)
  8516. /*! DPA - Disable Preempt Ability.
  8517. * 0b0..Channel n can suspend a lower priority channel.
  8518. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8519. */
  8520. #define DMA_DCHPRI19_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_DPA_SHIFT)) & DMA_DCHPRI19_DPA_MASK)
  8521. #define DMA_DCHPRI19_ECP_MASK (0x80U)
  8522. #define DMA_DCHPRI19_ECP_SHIFT (7U)
  8523. /*! ECP - Enable Channel Preemption.
  8524. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8525. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8526. */
  8527. #define DMA_DCHPRI19_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_ECP_SHIFT)) & DMA_DCHPRI19_ECP_MASK)
  8528. /*! @} */
  8529. /*! @name DCHPRI18 - Channel n Priority Register */
  8530. /*! @{ */
  8531. #define DMA_DCHPRI18_CHPRI_MASK (0xFU)
  8532. #define DMA_DCHPRI18_CHPRI_SHIFT (0U)
  8533. #define DMA_DCHPRI18_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_CHPRI_SHIFT)) & DMA_DCHPRI18_CHPRI_MASK)
  8534. #define DMA_DCHPRI18_GRPPRI_MASK (0x30U)
  8535. #define DMA_DCHPRI18_GRPPRI_SHIFT (4U)
  8536. #define DMA_DCHPRI18_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_GRPPRI_SHIFT)) & DMA_DCHPRI18_GRPPRI_MASK)
  8537. #define DMA_DCHPRI18_DPA_MASK (0x40U)
  8538. #define DMA_DCHPRI18_DPA_SHIFT (6U)
  8539. /*! DPA - Disable Preempt Ability.
  8540. * 0b0..Channel n can suspend a lower priority channel.
  8541. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8542. */
  8543. #define DMA_DCHPRI18_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_DPA_SHIFT)) & DMA_DCHPRI18_DPA_MASK)
  8544. #define DMA_DCHPRI18_ECP_MASK (0x80U)
  8545. #define DMA_DCHPRI18_ECP_SHIFT (7U)
  8546. /*! ECP - Enable Channel Preemption.
  8547. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8548. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8549. */
  8550. #define DMA_DCHPRI18_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_ECP_SHIFT)) & DMA_DCHPRI18_ECP_MASK)
  8551. /*! @} */
  8552. /*! @name DCHPRI17 - Channel n Priority Register */
  8553. /*! @{ */
  8554. #define DMA_DCHPRI17_CHPRI_MASK (0xFU)
  8555. #define DMA_DCHPRI17_CHPRI_SHIFT (0U)
  8556. #define DMA_DCHPRI17_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_CHPRI_SHIFT)) & DMA_DCHPRI17_CHPRI_MASK)
  8557. #define DMA_DCHPRI17_GRPPRI_MASK (0x30U)
  8558. #define DMA_DCHPRI17_GRPPRI_SHIFT (4U)
  8559. #define DMA_DCHPRI17_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_GRPPRI_SHIFT)) & DMA_DCHPRI17_GRPPRI_MASK)
  8560. #define DMA_DCHPRI17_DPA_MASK (0x40U)
  8561. #define DMA_DCHPRI17_DPA_SHIFT (6U)
  8562. /*! DPA - Disable Preempt Ability.
  8563. * 0b0..Channel n can suspend a lower priority channel.
  8564. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8565. */
  8566. #define DMA_DCHPRI17_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_DPA_SHIFT)) & DMA_DCHPRI17_DPA_MASK)
  8567. #define DMA_DCHPRI17_ECP_MASK (0x80U)
  8568. #define DMA_DCHPRI17_ECP_SHIFT (7U)
  8569. /*! ECP - Enable Channel Preemption.
  8570. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8571. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8572. */
  8573. #define DMA_DCHPRI17_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_ECP_SHIFT)) & DMA_DCHPRI17_ECP_MASK)
  8574. /*! @} */
  8575. /*! @name DCHPRI16 - Channel n Priority Register */
  8576. /*! @{ */
  8577. #define DMA_DCHPRI16_CHPRI_MASK (0xFU)
  8578. #define DMA_DCHPRI16_CHPRI_SHIFT (0U)
  8579. #define DMA_DCHPRI16_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_CHPRI_SHIFT)) & DMA_DCHPRI16_CHPRI_MASK)
  8580. #define DMA_DCHPRI16_GRPPRI_MASK (0x30U)
  8581. #define DMA_DCHPRI16_GRPPRI_SHIFT (4U)
  8582. #define DMA_DCHPRI16_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_GRPPRI_SHIFT)) & DMA_DCHPRI16_GRPPRI_MASK)
  8583. #define DMA_DCHPRI16_DPA_MASK (0x40U)
  8584. #define DMA_DCHPRI16_DPA_SHIFT (6U)
  8585. /*! DPA - Disable Preempt Ability.
  8586. * 0b0..Channel n can suspend a lower priority channel.
  8587. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8588. */
  8589. #define DMA_DCHPRI16_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_DPA_SHIFT)) & DMA_DCHPRI16_DPA_MASK)
  8590. #define DMA_DCHPRI16_ECP_MASK (0x80U)
  8591. #define DMA_DCHPRI16_ECP_SHIFT (7U)
  8592. /*! ECP - Enable Channel Preemption.
  8593. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8594. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8595. */
  8596. #define DMA_DCHPRI16_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_ECP_SHIFT)) & DMA_DCHPRI16_ECP_MASK)
  8597. /*! @} */
  8598. /*! @name DCHPRI23 - Channel n Priority Register */
  8599. /*! @{ */
  8600. #define DMA_DCHPRI23_CHPRI_MASK (0xFU)
  8601. #define DMA_DCHPRI23_CHPRI_SHIFT (0U)
  8602. #define DMA_DCHPRI23_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_CHPRI_SHIFT)) & DMA_DCHPRI23_CHPRI_MASK)
  8603. #define DMA_DCHPRI23_GRPPRI_MASK (0x30U)
  8604. #define DMA_DCHPRI23_GRPPRI_SHIFT (4U)
  8605. #define DMA_DCHPRI23_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_GRPPRI_SHIFT)) & DMA_DCHPRI23_GRPPRI_MASK)
  8606. #define DMA_DCHPRI23_DPA_MASK (0x40U)
  8607. #define DMA_DCHPRI23_DPA_SHIFT (6U)
  8608. /*! DPA - Disable Preempt Ability.
  8609. * 0b0..Channel n can suspend a lower priority channel.
  8610. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8611. */
  8612. #define DMA_DCHPRI23_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_DPA_SHIFT)) & DMA_DCHPRI23_DPA_MASK)
  8613. #define DMA_DCHPRI23_ECP_MASK (0x80U)
  8614. #define DMA_DCHPRI23_ECP_SHIFT (7U)
  8615. /*! ECP - Enable Channel Preemption.
  8616. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8617. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8618. */
  8619. #define DMA_DCHPRI23_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_ECP_SHIFT)) & DMA_DCHPRI23_ECP_MASK)
  8620. /*! @} */
  8621. /*! @name DCHPRI22 - Channel n Priority Register */
  8622. /*! @{ */
  8623. #define DMA_DCHPRI22_CHPRI_MASK (0xFU)
  8624. #define DMA_DCHPRI22_CHPRI_SHIFT (0U)
  8625. #define DMA_DCHPRI22_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_CHPRI_SHIFT)) & DMA_DCHPRI22_CHPRI_MASK)
  8626. #define DMA_DCHPRI22_GRPPRI_MASK (0x30U)
  8627. #define DMA_DCHPRI22_GRPPRI_SHIFT (4U)
  8628. #define DMA_DCHPRI22_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_GRPPRI_SHIFT)) & DMA_DCHPRI22_GRPPRI_MASK)
  8629. #define DMA_DCHPRI22_DPA_MASK (0x40U)
  8630. #define DMA_DCHPRI22_DPA_SHIFT (6U)
  8631. /*! DPA - Disable Preempt Ability.
  8632. * 0b0..Channel n can suspend a lower priority channel.
  8633. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8634. */
  8635. #define DMA_DCHPRI22_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_DPA_SHIFT)) & DMA_DCHPRI22_DPA_MASK)
  8636. #define DMA_DCHPRI22_ECP_MASK (0x80U)
  8637. #define DMA_DCHPRI22_ECP_SHIFT (7U)
  8638. /*! ECP - Enable Channel Preemption.
  8639. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8640. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8641. */
  8642. #define DMA_DCHPRI22_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_ECP_SHIFT)) & DMA_DCHPRI22_ECP_MASK)
  8643. /*! @} */
  8644. /*! @name DCHPRI21 - Channel n Priority Register */
  8645. /*! @{ */
  8646. #define DMA_DCHPRI21_CHPRI_MASK (0xFU)
  8647. #define DMA_DCHPRI21_CHPRI_SHIFT (0U)
  8648. #define DMA_DCHPRI21_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_CHPRI_SHIFT)) & DMA_DCHPRI21_CHPRI_MASK)
  8649. #define DMA_DCHPRI21_GRPPRI_MASK (0x30U)
  8650. #define DMA_DCHPRI21_GRPPRI_SHIFT (4U)
  8651. #define DMA_DCHPRI21_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_GRPPRI_SHIFT)) & DMA_DCHPRI21_GRPPRI_MASK)
  8652. #define DMA_DCHPRI21_DPA_MASK (0x40U)
  8653. #define DMA_DCHPRI21_DPA_SHIFT (6U)
  8654. /*! DPA - Disable Preempt Ability.
  8655. * 0b0..Channel n can suspend a lower priority channel.
  8656. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8657. */
  8658. #define DMA_DCHPRI21_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_DPA_SHIFT)) & DMA_DCHPRI21_DPA_MASK)
  8659. #define DMA_DCHPRI21_ECP_MASK (0x80U)
  8660. #define DMA_DCHPRI21_ECP_SHIFT (7U)
  8661. /*! ECP - Enable Channel Preemption.
  8662. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8663. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8664. */
  8665. #define DMA_DCHPRI21_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_ECP_SHIFT)) & DMA_DCHPRI21_ECP_MASK)
  8666. /*! @} */
  8667. /*! @name DCHPRI20 - Channel n Priority Register */
  8668. /*! @{ */
  8669. #define DMA_DCHPRI20_CHPRI_MASK (0xFU)
  8670. #define DMA_DCHPRI20_CHPRI_SHIFT (0U)
  8671. #define DMA_DCHPRI20_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_CHPRI_SHIFT)) & DMA_DCHPRI20_CHPRI_MASK)
  8672. #define DMA_DCHPRI20_GRPPRI_MASK (0x30U)
  8673. #define DMA_DCHPRI20_GRPPRI_SHIFT (4U)
  8674. #define DMA_DCHPRI20_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_GRPPRI_SHIFT)) & DMA_DCHPRI20_GRPPRI_MASK)
  8675. #define DMA_DCHPRI20_DPA_MASK (0x40U)
  8676. #define DMA_DCHPRI20_DPA_SHIFT (6U)
  8677. /*! DPA - Disable Preempt Ability.
  8678. * 0b0..Channel n can suspend a lower priority channel.
  8679. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8680. */
  8681. #define DMA_DCHPRI20_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_DPA_SHIFT)) & DMA_DCHPRI20_DPA_MASK)
  8682. #define DMA_DCHPRI20_ECP_MASK (0x80U)
  8683. #define DMA_DCHPRI20_ECP_SHIFT (7U)
  8684. /*! ECP - Enable Channel Preemption.
  8685. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8686. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8687. */
  8688. #define DMA_DCHPRI20_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_ECP_SHIFT)) & DMA_DCHPRI20_ECP_MASK)
  8689. /*! @} */
  8690. /*! @name DCHPRI27 - Channel n Priority Register */
  8691. /*! @{ */
  8692. #define DMA_DCHPRI27_CHPRI_MASK (0xFU)
  8693. #define DMA_DCHPRI27_CHPRI_SHIFT (0U)
  8694. #define DMA_DCHPRI27_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_CHPRI_SHIFT)) & DMA_DCHPRI27_CHPRI_MASK)
  8695. #define DMA_DCHPRI27_GRPPRI_MASK (0x30U)
  8696. #define DMA_DCHPRI27_GRPPRI_SHIFT (4U)
  8697. #define DMA_DCHPRI27_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_GRPPRI_SHIFT)) & DMA_DCHPRI27_GRPPRI_MASK)
  8698. #define DMA_DCHPRI27_DPA_MASK (0x40U)
  8699. #define DMA_DCHPRI27_DPA_SHIFT (6U)
  8700. /*! DPA - Disable Preempt Ability.
  8701. * 0b0..Channel n can suspend a lower priority channel.
  8702. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8703. */
  8704. #define DMA_DCHPRI27_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_DPA_SHIFT)) & DMA_DCHPRI27_DPA_MASK)
  8705. #define DMA_DCHPRI27_ECP_MASK (0x80U)
  8706. #define DMA_DCHPRI27_ECP_SHIFT (7U)
  8707. /*! ECP - Enable Channel Preemption.
  8708. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8709. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8710. */
  8711. #define DMA_DCHPRI27_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_ECP_SHIFT)) & DMA_DCHPRI27_ECP_MASK)
  8712. /*! @} */
  8713. /*! @name DCHPRI26 - Channel n Priority Register */
  8714. /*! @{ */
  8715. #define DMA_DCHPRI26_CHPRI_MASK (0xFU)
  8716. #define DMA_DCHPRI26_CHPRI_SHIFT (0U)
  8717. #define DMA_DCHPRI26_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_CHPRI_SHIFT)) & DMA_DCHPRI26_CHPRI_MASK)
  8718. #define DMA_DCHPRI26_GRPPRI_MASK (0x30U)
  8719. #define DMA_DCHPRI26_GRPPRI_SHIFT (4U)
  8720. #define DMA_DCHPRI26_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_GRPPRI_SHIFT)) & DMA_DCHPRI26_GRPPRI_MASK)
  8721. #define DMA_DCHPRI26_DPA_MASK (0x40U)
  8722. #define DMA_DCHPRI26_DPA_SHIFT (6U)
  8723. /*! DPA - Disable Preempt Ability.
  8724. * 0b0..Channel n can suspend a lower priority channel.
  8725. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8726. */
  8727. #define DMA_DCHPRI26_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_DPA_SHIFT)) & DMA_DCHPRI26_DPA_MASK)
  8728. #define DMA_DCHPRI26_ECP_MASK (0x80U)
  8729. #define DMA_DCHPRI26_ECP_SHIFT (7U)
  8730. /*! ECP - Enable Channel Preemption.
  8731. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8732. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8733. */
  8734. #define DMA_DCHPRI26_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_ECP_SHIFT)) & DMA_DCHPRI26_ECP_MASK)
  8735. /*! @} */
  8736. /*! @name DCHPRI25 - Channel n Priority Register */
  8737. /*! @{ */
  8738. #define DMA_DCHPRI25_CHPRI_MASK (0xFU)
  8739. #define DMA_DCHPRI25_CHPRI_SHIFT (0U)
  8740. #define DMA_DCHPRI25_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_CHPRI_SHIFT)) & DMA_DCHPRI25_CHPRI_MASK)
  8741. #define DMA_DCHPRI25_GRPPRI_MASK (0x30U)
  8742. #define DMA_DCHPRI25_GRPPRI_SHIFT (4U)
  8743. #define DMA_DCHPRI25_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_GRPPRI_SHIFT)) & DMA_DCHPRI25_GRPPRI_MASK)
  8744. #define DMA_DCHPRI25_DPA_MASK (0x40U)
  8745. #define DMA_DCHPRI25_DPA_SHIFT (6U)
  8746. /*! DPA - Disable Preempt Ability.
  8747. * 0b0..Channel n can suspend a lower priority channel.
  8748. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8749. */
  8750. #define DMA_DCHPRI25_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_DPA_SHIFT)) & DMA_DCHPRI25_DPA_MASK)
  8751. #define DMA_DCHPRI25_ECP_MASK (0x80U)
  8752. #define DMA_DCHPRI25_ECP_SHIFT (7U)
  8753. /*! ECP - Enable Channel Preemption.
  8754. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8755. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8756. */
  8757. #define DMA_DCHPRI25_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_ECP_SHIFT)) & DMA_DCHPRI25_ECP_MASK)
  8758. /*! @} */
  8759. /*! @name DCHPRI24 - Channel n Priority Register */
  8760. /*! @{ */
  8761. #define DMA_DCHPRI24_CHPRI_MASK (0xFU)
  8762. #define DMA_DCHPRI24_CHPRI_SHIFT (0U)
  8763. #define DMA_DCHPRI24_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_CHPRI_SHIFT)) & DMA_DCHPRI24_CHPRI_MASK)
  8764. #define DMA_DCHPRI24_GRPPRI_MASK (0x30U)
  8765. #define DMA_DCHPRI24_GRPPRI_SHIFT (4U)
  8766. #define DMA_DCHPRI24_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_GRPPRI_SHIFT)) & DMA_DCHPRI24_GRPPRI_MASK)
  8767. #define DMA_DCHPRI24_DPA_MASK (0x40U)
  8768. #define DMA_DCHPRI24_DPA_SHIFT (6U)
  8769. /*! DPA - Disable Preempt Ability.
  8770. * 0b0..Channel n can suspend a lower priority channel.
  8771. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8772. */
  8773. #define DMA_DCHPRI24_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_DPA_SHIFT)) & DMA_DCHPRI24_DPA_MASK)
  8774. #define DMA_DCHPRI24_ECP_MASK (0x80U)
  8775. #define DMA_DCHPRI24_ECP_SHIFT (7U)
  8776. /*! ECP - Enable Channel Preemption.
  8777. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8778. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8779. */
  8780. #define DMA_DCHPRI24_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_ECP_SHIFT)) & DMA_DCHPRI24_ECP_MASK)
  8781. /*! @} */
  8782. /*! @name DCHPRI31 - Channel n Priority Register */
  8783. /*! @{ */
  8784. #define DMA_DCHPRI31_CHPRI_MASK (0xFU)
  8785. #define DMA_DCHPRI31_CHPRI_SHIFT (0U)
  8786. #define DMA_DCHPRI31_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_CHPRI_SHIFT)) & DMA_DCHPRI31_CHPRI_MASK)
  8787. #define DMA_DCHPRI31_GRPPRI_MASK (0x30U)
  8788. #define DMA_DCHPRI31_GRPPRI_SHIFT (4U)
  8789. #define DMA_DCHPRI31_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_GRPPRI_SHIFT)) & DMA_DCHPRI31_GRPPRI_MASK)
  8790. #define DMA_DCHPRI31_DPA_MASK (0x40U)
  8791. #define DMA_DCHPRI31_DPA_SHIFT (6U)
  8792. /*! DPA - Disable Preempt Ability.
  8793. * 0b0..Channel n can suspend a lower priority channel.
  8794. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8795. */
  8796. #define DMA_DCHPRI31_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_DPA_SHIFT)) & DMA_DCHPRI31_DPA_MASK)
  8797. #define DMA_DCHPRI31_ECP_MASK (0x80U)
  8798. #define DMA_DCHPRI31_ECP_SHIFT (7U)
  8799. /*! ECP - Enable Channel Preemption.
  8800. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8801. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8802. */
  8803. #define DMA_DCHPRI31_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_ECP_SHIFT)) & DMA_DCHPRI31_ECP_MASK)
  8804. /*! @} */
  8805. /*! @name DCHPRI30 - Channel n Priority Register */
  8806. /*! @{ */
  8807. #define DMA_DCHPRI30_CHPRI_MASK (0xFU)
  8808. #define DMA_DCHPRI30_CHPRI_SHIFT (0U)
  8809. #define DMA_DCHPRI30_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_CHPRI_SHIFT)) & DMA_DCHPRI30_CHPRI_MASK)
  8810. #define DMA_DCHPRI30_GRPPRI_MASK (0x30U)
  8811. #define DMA_DCHPRI30_GRPPRI_SHIFT (4U)
  8812. #define DMA_DCHPRI30_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_GRPPRI_SHIFT)) & DMA_DCHPRI30_GRPPRI_MASK)
  8813. #define DMA_DCHPRI30_DPA_MASK (0x40U)
  8814. #define DMA_DCHPRI30_DPA_SHIFT (6U)
  8815. /*! DPA - Disable Preempt Ability.
  8816. * 0b0..Channel n can suspend a lower priority channel.
  8817. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8818. */
  8819. #define DMA_DCHPRI30_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_DPA_SHIFT)) & DMA_DCHPRI30_DPA_MASK)
  8820. #define DMA_DCHPRI30_ECP_MASK (0x80U)
  8821. #define DMA_DCHPRI30_ECP_SHIFT (7U)
  8822. /*! ECP - Enable Channel Preemption.
  8823. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8824. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8825. */
  8826. #define DMA_DCHPRI30_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_ECP_SHIFT)) & DMA_DCHPRI30_ECP_MASK)
  8827. /*! @} */
  8828. /*! @name DCHPRI29 - Channel n Priority Register */
  8829. /*! @{ */
  8830. #define DMA_DCHPRI29_CHPRI_MASK (0xFU)
  8831. #define DMA_DCHPRI29_CHPRI_SHIFT (0U)
  8832. #define DMA_DCHPRI29_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_CHPRI_SHIFT)) & DMA_DCHPRI29_CHPRI_MASK)
  8833. #define DMA_DCHPRI29_GRPPRI_MASK (0x30U)
  8834. #define DMA_DCHPRI29_GRPPRI_SHIFT (4U)
  8835. #define DMA_DCHPRI29_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_GRPPRI_SHIFT)) & DMA_DCHPRI29_GRPPRI_MASK)
  8836. #define DMA_DCHPRI29_DPA_MASK (0x40U)
  8837. #define DMA_DCHPRI29_DPA_SHIFT (6U)
  8838. /*! DPA - Disable Preempt Ability.
  8839. * 0b0..Channel n can suspend a lower priority channel.
  8840. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8841. */
  8842. #define DMA_DCHPRI29_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_DPA_SHIFT)) & DMA_DCHPRI29_DPA_MASK)
  8843. #define DMA_DCHPRI29_ECP_MASK (0x80U)
  8844. #define DMA_DCHPRI29_ECP_SHIFT (7U)
  8845. /*! ECP - Enable Channel Preemption.
  8846. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8847. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8848. */
  8849. #define DMA_DCHPRI29_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_ECP_SHIFT)) & DMA_DCHPRI29_ECP_MASK)
  8850. /*! @} */
  8851. /*! @name DCHPRI28 - Channel n Priority Register */
  8852. /*! @{ */
  8853. #define DMA_DCHPRI28_CHPRI_MASK (0xFU)
  8854. #define DMA_DCHPRI28_CHPRI_SHIFT (0U)
  8855. #define DMA_DCHPRI28_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_CHPRI_SHIFT)) & DMA_DCHPRI28_CHPRI_MASK)
  8856. #define DMA_DCHPRI28_GRPPRI_MASK (0x30U)
  8857. #define DMA_DCHPRI28_GRPPRI_SHIFT (4U)
  8858. #define DMA_DCHPRI28_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_GRPPRI_SHIFT)) & DMA_DCHPRI28_GRPPRI_MASK)
  8859. #define DMA_DCHPRI28_DPA_MASK (0x40U)
  8860. #define DMA_DCHPRI28_DPA_SHIFT (6U)
  8861. /*! DPA - Disable Preempt Ability.
  8862. * 0b0..Channel n can suspend a lower priority channel.
  8863. * 0b1..Channel n cannot suspend any channel, regardless of channel priority.
  8864. */
  8865. #define DMA_DCHPRI28_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_DPA_SHIFT)) & DMA_DCHPRI28_DPA_MASK)
  8866. #define DMA_DCHPRI28_ECP_MASK (0x80U)
  8867. #define DMA_DCHPRI28_ECP_SHIFT (7U)
  8868. /*! ECP - Enable Channel Preemption.
  8869. * 0b0..Channel n cannot be suspended by a higher priority channel's service request.
  8870. * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel.
  8871. */
  8872. #define DMA_DCHPRI28_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_ECP_SHIFT)) & DMA_DCHPRI28_ECP_MASK)
  8873. /*! @} */
  8874. /*! @name SADDR - TCD Source Address */
  8875. /*! @{ */
  8876. #define DMA_SADDR_SADDR_MASK (0xFFFFFFFFU)
  8877. #define DMA_SADDR_SADDR_SHIFT (0U)
  8878. #define DMA_SADDR_SADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_SADDR_SADDR_SHIFT)) & DMA_SADDR_SADDR_MASK)
  8879. /*! @} */
  8880. /* The count of DMA_SADDR */
  8881. #define DMA_SADDR_COUNT (32U)
  8882. /*! @name SOFF - TCD Signed Source Address Offset */
  8883. /*! @{ */
  8884. #define DMA_SOFF_SOFF_MASK (0xFFFFU)
  8885. #define DMA_SOFF_SOFF_SHIFT (0U)
  8886. #define DMA_SOFF_SOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_SOFF_SOFF_SHIFT)) & DMA_SOFF_SOFF_MASK)
  8887. /*! @} */
  8888. /* The count of DMA_SOFF */
  8889. #define DMA_SOFF_COUNT (32U)
  8890. /*! @name ATTR - TCD Transfer Attributes */
  8891. /*! @{ */
  8892. #define DMA_ATTR_DSIZE_MASK (0x7U)
  8893. #define DMA_ATTR_DSIZE_SHIFT (0U)
  8894. #define DMA_ATTR_DSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DSIZE_SHIFT)) & DMA_ATTR_DSIZE_MASK)
  8895. #define DMA_ATTR_DMOD_MASK (0xF8U)
  8896. #define DMA_ATTR_DMOD_SHIFT (3U)
  8897. #define DMA_ATTR_DMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DMOD_SHIFT)) & DMA_ATTR_DMOD_MASK)
  8898. #define DMA_ATTR_SSIZE_MASK (0x700U)
  8899. #define DMA_ATTR_SSIZE_SHIFT (8U)
  8900. /*! SSIZE - Source data transfer size
  8901. * 0b000..8-bit
  8902. * 0b001..16-bit
  8903. * 0b010..32-bit
  8904. * 0b011..Reserved
  8905. * 0b100..16-byte burst
  8906. * 0b101..32-byte burst
  8907. * 0b110..Reserved
  8908. * 0b111..Reserved
  8909. */
  8910. #define DMA_ATTR_SSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SSIZE_SHIFT)) & DMA_ATTR_SSIZE_MASK)
  8911. #define DMA_ATTR_SMOD_MASK (0xF800U)
  8912. #define DMA_ATTR_SMOD_SHIFT (11U)
  8913. /*! SMOD - Source Address Modulo
  8914. * 0b00000..Source address modulo feature is disabled
  8915. */
  8916. #define DMA_ATTR_SMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SMOD_SHIFT)) & DMA_ATTR_SMOD_MASK)
  8917. /*! @} */
  8918. /* The count of DMA_ATTR */
  8919. #define DMA_ATTR_COUNT (32U)
  8920. /*! @name NBYTES_MLNO - TCD Minor Byte Count (Minor Loop Mapping Disabled) */
  8921. /*! @{ */
  8922. #define DMA_NBYTES_MLNO_NBYTES_MASK (0xFFFFFFFFU)
  8923. #define DMA_NBYTES_MLNO_NBYTES_SHIFT (0U)
  8924. #define DMA_NBYTES_MLNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLNO_NBYTES_SHIFT)) & DMA_NBYTES_MLNO_NBYTES_MASK)
  8925. /*! @} */
  8926. /* The count of DMA_NBYTES_MLNO */
  8927. #define DMA_NBYTES_MLNO_COUNT (32U)
  8928. /*! @name NBYTES_MLOFFNO - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled) */
  8929. /*! @{ */
  8930. #define DMA_NBYTES_MLOFFNO_NBYTES_MASK (0x3FFFFFFFU)
  8931. #define DMA_NBYTES_MLOFFNO_NBYTES_SHIFT (0U)
  8932. #define DMA_NBYTES_MLOFFNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFNO_NBYTES_MASK)
  8933. #define DMA_NBYTES_MLOFFNO_DMLOE_MASK (0x40000000U)
  8934. #define DMA_NBYTES_MLOFFNO_DMLOE_SHIFT (30U)
  8935. /*! DMLOE - Destination Minor Loop Offset enable
  8936. * 0b0..The minor loop offset is not applied to the DADDR
  8937. * 0b1..The minor loop offset is applied to the DADDR
  8938. */
  8939. #define DMA_NBYTES_MLOFFNO_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_DMLOE_MASK)
  8940. #define DMA_NBYTES_MLOFFNO_SMLOE_MASK (0x80000000U)
  8941. #define DMA_NBYTES_MLOFFNO_SMLOE_SHIFT (31U)
  8942. /*! SMLOE - Source Minor Loop Offset Enable
  8943. * 0b0..The minor loop offset is not applied to the SADDR
  8944. * 0b1..The minor loop offset is applied to the SADDR
  8945. */
  8946. #define DMA_NBYTES_MLOFFNO_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_SMLOE_MASK)
  8947. /*! @} */
  8948. /* The count of DMA_NBYTES_MLOFFNO */
  8949. #define DMA_NBYTES_MLOFFNO_COUNT (32U)
  8950. /*! @name NBYTES_MLOFFYES - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled) */
  8951. /*! @{ */
  8952. #define DMA_NBYTES_MLOFFYES_NBYTES_MASK (0x3FFU)
  8953. #define DMA_NBYTES_MLOFFYES_NBYTES_SHIFT (0U)
  8954. #define DMA_NBYTES_MLOFFYES_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFYES_NBYTES_MASK)
  8955. #define DMA_NBYTES_MLOFFYES_MLOFF_MASK (0x3FFFFC00U)
  8956. #define DMA_NBYTES_MLOFFYES_MLOFF_SHIFT (10U)
  8957. #define DMA_NBYTES_MLOFFYES_MLOFF(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_MLOFF_SHIFT)) & DMA_NBYTES_MLOFFYES_MLOFF_MASK)
  8958. #define DMA_NBYTES_MLOFFYES_DMLOE_MASK (0x40000000U)
  8959. #define DMA_NBYTES_MLOFFYES_DMLOE_SHIFT (30U)
  8960. /*! DMLOE - Destination Minor Loop Offset enable
  8961. * 0b0..The minor loop offset is not applied to the DADDR
  8962. * 0b1..The minor loop offset is applied to the DADDR
  8963. */
  8964. #define DMA_NBYTES_MLOFFYES_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_DMLOE_MASK)
  8965. #define DMA_NBYTES_MLOFFYES_SMLOE_MASK (0x80000000U)
  8966. #define DMA_NBYTES_MLOFFYES_SMLOE_SHIFT (31U)
  8967. /*! SMLOE - Source Minor Loop Offset Enable
  8968. * 0b0..The minor loop offset is not applied to the SADDR
  8969. * 0b1..The minor loop offset is applied to the SADDR
  8970. */
  8971. #define DMA_NBYTES_MLOFFYES_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_SMLOE_MASK)
  8972. /*! @} */
  8973. /* The count of DMA_NBYTES_MLOFFYES */
  8974. #define DMA_NBYTES_MLOFFYES_COUNT (32U)
  8975. /*! @name SLAST - TCD Last Source Address Adjustment */
  8976. /*! @{ */
  8977. #define DMA_SLAST_SLAST_MASK (0xFFFFFFFFU)
  8978. #define DMA_SLAST_SLAST_SHIFT (0U)
  8979. #define DMA_SLAST_SLAST(x) (((uint32_t)(((uint32_t)(x)) << DMA_SLAST_SLAST_SHIFT)) & DMA_SLAST_SLAST_MASK)
  8980. /*! @} */
  8981. /* The count of DMA_SLAST */
  8982. #define DMA_SLAST_COUNT (32U)
  8983. /*! @name DADDR - TCD Destination Address */
  8984. /*! @{ */
  8985. #define DMA_DADDR_DADDR_MASK (0xFFFFFFFFU)
  8986. #define DMA_DADDR_DADDR_SHIFT (0U)
  8987. #define DMA_DADDR_DADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_DADDR_DADDR_SHIFT)) & DMA_DADDR_DADDR_MASK)
  8988. /*! @} */
  8989. /* The count of DMA_DADDR */
  8990. #define DMA_DADDR_COUNT (32U)
  8991. /*! @name DOFF - TCD Signed Destination Address Offset */
  8992. /*! @{ */
  8993. #define DMA_DOFF_DOFF_MASK (0xFFFFU)
  8994. #define DMA_DOFF_DOFF_SHIFT (0U)
  8995. #define DMA_DOFF_DOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_DOFF_DOFF_SHIFT)) & DMA_DOFF_DOFF_MASK)
  8996. /*! @} */
  8997. /* The count of DMA_DOFF */
  8998. #define DMA_DOFF_COUNT (32U)
  8999. /*! @name CITER_ELINKNO - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  9000. /*! @{ */
  9001. #define DMA_CITER_ELINKNO_CITER_MASK (0x7FFFU)
  9002. #define DMA_CITER_ELINKNO_CITER_SHIFT (0U)
  9003. #define DMA_CITER_ELINKNO_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_CITER_SHIFT)) & DMA_CITER_ELINKNO_CITER_MASK)
  9004. #define DMA_CITER_ELINKNO_ELINK_MASK (0x8000U)
  9005. #define DMA_CITER_ELINKNO_ELINK_SHIFT (15U)
  9006. /*! ELINK - Enable channel-to-channel linking on minor-loop complete
  9007. * 0b0..The channel-to-channel linking is disabled
  9008. * 0b1..The channel-to-channel linking is enabled
  9009. */
  9010. #define DMA_CITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_ELINK_SHIFT)) & DMA_CITER_ELINKNO_ELINK_MASK)
  9011. /*! @} */
  9012. /* The count of DMA_CITER_ELINKNO */
  9013. #define DMA_CITER_ELINKNO_COUNT (32U)
  9014. /*! @name CITER_ELINKYES - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  9015. /*! @{ */
  9016. #define DMA_CITER_ELINKYES_CITER_MASK (0x1FFU)
  9017. #define DMA_CITER_ELINKYES_CITER_SHIFT (0U)
  9018. #define DMA_CITER_ELINKYES_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_CITER_SHIFT)) & DMA_CITER_ELINKYES_CITER_MASK)
  9019. #define DMA_CITER_ELINKYES_LINKCH_MASK (0x3E00U)
  9020. #define DMA_CITER_ELINKYES_LINKCH_SHIFT (9U)
  9021. #define DMA_CITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_LINKCH_SHIFT)) & DMA_CITER_ELINKYES_LINKCH_MASK)
  9022. #define DMA_CITER_ELINKYES_ELINK_MASK (0x8000U)
  9023. #define DMA_CITER_ELINKYES_ELINK_SHIFT (15U)
  9024. /*! ELINK - Enable channel-to-channel linking on minor-loop complete
  9025. * 0b0..The channel-to-channel linking is disabled
  9026. * 0b1..The channel-to-channel linking is enabled
  9027. */
  9028. #define DMA_CITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_ELINK_SHIFT)) & DMA_CITER_ELINKYES_ELINK_MASK)
  9029. /*! @} */
  9030. /* The count of DMA_CITER_ELINKYES */
  9031. #define DMA_CITER_ELINKYES_COUNT (32U)
  9032. /*! @name DLAST_SGA - TCD Last Destination Address Adjustment/Scatter Gather Address */
  9033. /*! @{ */
  9034. #define DMA_DLAST_SGA_DLASTSGA_MASK (0xFFFFFFFFU)
  9035. #define DMA_DLAST_SGA_DLASTSGA_SHIFT (0U)
  9036. #define DMA_DLAST_SGA_DLASTSGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_DLAST_SGA_DLASTSGA_SHIFT)) & DMA_DLAST_SGA_DLASTSGA_MASK)
  9037. /*! @} */
  9038. /* The count of DMA_DLAST_SGA */
  9039. #define DMA_DLAST_SGA_COUNT (32U)
  9040. /*! @name CSR - TCD Control and Status */
  9041. /*! @{ */
  9042. #define DMA_CSR_START_MASK (0x1U)
  9043. #define DMA_CSR_START_SHIFT (0U)
  9044. /*! START - Channel Start
  9045. * 0b0..The channel is not explicitly started.
  9046. * 0b1..The channel is explicitly started via a software initiated service request.
  9047. */
  9048. #define DMA_CSR_START(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_START_SHIFT)) & DMA_CSR_START_MASK)
  9049. #define DMA_CSR_INTMAJOR_MASK (0x2U)
  9050. #define DMA_CSR_INTMAJOR_SHIFT (1U)
  9051. /*! INTMAJOR - Enable an interrupt when major iteration count completes.
  9052. * 0b0..The end-of-major loop interrupt is disabled.
  9053. * 0b1..The end-of-major loop interrupt is enabled.
  9054. */
  9055. #define DMA_CSR_INTMAJOR(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTMAJOR_SHIFT)) & DMA_CSR_INTMAJOR_MASK)
  9056. #define DMA_CSR_INTHALF_MASK (0x4U)
  9057. #define DMA_CSR_INTHALF_SHIFT (2U)
  9058. /*! INTHALF - Enable an interrupt when major counter is half complete.
  9059. * 0b0..The half-point interrupt is disabled.
  9060. * 0b1..The half-point interrupt is enabled.
  9061. */
  9062. #define DMA_CSR_INTHALF(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTHALF_SHIFT)) & DMA_CSR_INTHALF_MASK)
  9063. #define DMA_CSR_DREQ_MASK (0x8U)
  9064. #define DMA_CSR_DREQ_SHIFT (3U)
  9065. /*! DREQ - Disable Request
  9066. * 0b0..The channel's ERQ bit is not affected.
  9067. * 0b1..The channel's ERQ bit is cleared when the major loop is complete.
  9068. */
  9069. #define DMA_CSR_DREQ(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DREQ_SHIFT)) & DMA_CSR_DREQ_MASK)
  9070. #define DMA_CSR_ESG_MASK (0x10U)
  9071. #define DMA_CSR_ESG_SHIFT (4U)
  9072. /*! ESG - Enable Scatter/Gather Processing
  9073. * 0b0..The current channel's TCD is normal format.
  9074. * 0b1..The current channel's TCD specifies a scatter gather format. The DLASTSGA field provides a memory pointer to the next TCD to be loaded into this channel after the major loop completes its execution.
  9075. */
  9076. #define DMA_CSR_ESG(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ESG_SHIFT)) & DMA_CSR_ESG_MASK)
  9077. #define DMA_CSR_MAJORELINK_MASK (0x20U)
  9078. #define DMA_CSR_MAJORELINK_SHIFT (5U)
  9079. /*! MAJORELINK - Enable channel-to-channel linking on major loop complete
  9080. * 0b0..The channel-to-channel linking is disabled.
  9081. * 0b1..The channel-to-channel linking is enabled.
  9082. */
  9083. #define DMA_CSR_MAJORELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORELINK_SHIFT)) & DMA_CSR_MAJORELINK_MASK)
  9084. #define DMA_CSR_ACTIVE_MASK (0x40U)
  9085. #define DMA_CSR_ACTIVE_SHIFT (6U)
  9086. #define DMA_CSR_ACTIVE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ACTIVE_SHIFT)) & DMA_CSR_ACTIVE_MASK)
  9087. #define DMA_CSR_DONE_MASK (0x80U)
  9088. #define DMA_CSR_DONE_SHIFT (7U)
  9089. #define DMA_CSR_DONE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DONE_SHIFT)) & DMA_CSR_DONE_MASK)
  9090. #define DMA_CSR_MAJORLINKCH_MASK (0x1F00U)
  9091. #define DMA_CSR_MAJORLINKCH_SHIFT (8U)
  9092. #define DMA_CSR_MAJORLINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORLINKCH_SHIFT)) & DMA_CSR_MAJORLINKCH_MASK)
  9093. #define DMA_CSR_BWC_MASK (0xC000U)
  9094. #define DMA_CSR_BWC_SHIFT (14U)
  9095. /*! BWC - Bandwidth Control
  9096. * 0b00..No eDMA engine stalls.
  9097. * 0b01..Reserved
  9098. * 0b10..eDMA engine stalls for 4 cycles after each R/W.
  9099. * 0b11..eDMA engine stalls for 8 cycles after each R/W.
  9100. */
  9101. #define DMA_CSR_BWC(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_BWC_SHIFT)) & DMA_CSR_BWC_MASK)
  9102. /*! @} */
  9103. /* The count of DMA_CSR */
  9104. #define DMA_CSR_COUNT (32U)
  9105. /*! @name BITER_ELINKNO - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  9106. /*! @{ */
  9107. #define DMA_BITER_ELINKNO_BITER_MASK (0x7FFFU)
  9108. #define DMA_BITER_ELINKNO_BITER_SHIFT (0U)
  9109. #define DMA_BITER_ELINKNO_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_BITER_SHIFT)) & DMA_BITER_ELINKNO_BITER_MASK)
  9110. #define DMA_BITER_ELINKNO_ELINK_MASK (0x8000U)
  9111. #define DMA_BITER_ELINKNO_ELINK_SHIFT (15U)
  9112. /*! ELINK - Enables channel-to-channel linking on minor loop complete
  9113. * 0b0..The channel-to-channel linking is disabled
  9114. * 0b1..The channel-to-channel linking is enabled
  9115. */
  9116. #define DMA_BITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_ELINK_SHIFT)) & DMA_BITER_ELINKNO_ELINK_MASK)
  9117. /*! @} */
  9118. /* The count of DMA_BITER_ELINKNO */
  9119. #define DMA_BITER_ELINKNO_COUNT (32U)
  9120. /*! @name BITER_ELINKYES - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  9121. /*! @{ */
  9122. #define DMA_BITER_ELINKYES_BITER_MASK (0x1FFU)
  9123. #define DMA_BITER_ELINKYES_BITER_SHIFT (0U)
  9124. #define DMA_BITER_ELINKYES_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_BITER_SHIFT)) & DMA_BITER_ELINKYES_BITER_MASK)
  9125. #define DMA_BITER_ELINKYES_LINKCH_MASK (0x3E00U)
  9126. #define DMA_BITER_ELINKYES_LINKCH_SHIFT (9U)
  9127. #define DMA_BITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_LINKCH_SHIFT)) & DMA_BITER_ELINKYES_LINKCH_MASK)
  9128. #define DMA_BITER_ELINKYES_ELINK_MASK (0x8000U)
  9129. #define DMA_BITER_ELINKYES_ELINK_SHIFT (15U)
  9130. /*! ELINK - Enables channel-to-channel linking on minor loop complete
  9131. * 0b0..The channel-to-channel linking is disabled
  9132. * 0b1..The channel-to-channel linking is enabled
  9133. */
  9134. #define DMA_BITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_ELINK_SHIFT)) & DMA_BITER_ELINKYES_ELINK_MASK)
  9135. /*! @} */
  9136. /* The count of DMA_BITER_ELINKYES */
  9137. #define DMA_BITER_ELINKYES_COUNT (32U)
  9138. /*!
  9139. * @}
  9140. */ /* end of group DMA_Register_Masks */
  9141. /* DMA - Peripheral instance base addresses */
  9142. /** Peripheral DMA base address */
  9143. #define DMA_BASE (0x40008000u)
  9144. /** Peripheral DMA base pointer */
  9145. #define DMA0 ((DMA_Type *)DMA_BASE)
  9146. /** Array initializer of DMA peripheral base addresses */
  9147. #define DMA_BASE_ADDRS { DMA_BASE }
  9148. /** Array initializer of DMA peripheral base pointers */
  9149. #define DMA_BASE_PTRS { DMA0 }
  9150. /** Interrupt vectors for the DMA peripheral type */
  9151. #define DMA_CHN_IRQS { { DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn, DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn } }
  9152. #define DMA_ERROR_IRQS { DMA_Error_IRQn }
  9153. /*!
  9154. * @}
  9155. */ /* end of group DMA_Peripheral_Access_Layer */
  9156. /* ----------------------------------------------------------------------------
  9157. -- DMAMUX Peripheral Access Layer
  9158. ---------------------------------------------------------------------------- */
  9159. /*!
  9160. * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer
  9161. * @{
  9162. */
  9163. /** DMAMUX - Register Layout Typedef */
  9164. typedef struct {
  9165. __IO uint8_t CHCFG[32]; /**< Channel Configuration register, array offset: 0x0, array step: 0x1 */
  9166. } DMAMUX_Type;
  9167. /* ----------------------------------------------------------------------------
  9168. -- DMAMUX Register Masks
  9169. ---------------------------------------------------------------------------- */
  9170. /*!
  9171. * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks
  9172. * @{
  9173. */
  9174. /*! @name CHCFG - Channel Configuration register */
  9175. /*! @{ */
  9176. #define DMAMUX_CHCFG_SOURCE_MASK (0x3FU)
  9177. #define DMAMUX_CHCFG_SOURCE_SHIFT (0U)
  9178. /*! SOURCE - DMA Channel Source (Slot)
  9179. * 0b000000..Disable_Signal
  9180. * 0b000010..UART0_Rx_Signal
  9181. * 0b000011..UART0_Tx_Signal
  9182. * 0b000100..UART1_Rx_Signal
  9183. * 0b000101..UART1_Tx_Signal
  9184. * 0b000110..PWM0_WR0_Signal
  9185. * 0b000111..PWM0_WR1_Signal
  9186. * 0b001000..PWM0_WR2_Signal
  9187. * 0b001001..PWM0_WR3_Signal
  9188. * 0b001010..PWM0_CP0_Signal
  9189. * 0b001011..PWM0_CP1_Signal
  9190. * 0b001100..PWM0_CP2_Signal
  9191. * 0b001101..PWM0_CP3_Signal
  9192. * 0b001110..CAN0_Signal
  9193. * 0b001111..CAN1_Signal
  9194. * 0b010000..SPI0_Rx_Signal
  9195. * 0b010001..SPI0_Tx_Signal
  9196. * 0b010010..XBARA_OUT_0_Signal
  9197. * 0b010011..XBARA_OUT_1_Signal
  9198. * 0b010100..XBARA_OUT_2_Signal
  9199. * 0b010101..XBARA_OUT_3_Signal
  9200. * 0b010110..I2C0_Signal
  9201. * 0b011000..FTM0_Channel0_Signal
  9202. * 0b011001..FTM0_Channel1_Signal
  9203. * 0b011010..FTM0_Channel2_Signal
  9204. * 0b011011..FTM0_Channel3_Signal
  9205. * 0b011100..FTM0_Channel4_Signal
  9206. * 0b011101..FTM0_Channel5_Signal
  9207. * 0b011110..FTM0_Channel6_Signal
  9208. * 0b011111..FTM0_Channel7_Signal
  9209. * 0b100000..FTM1_Channel0_Signal
  9210. * 0b100001..FTM1_Channel1_Signal
  9211. * 0b100010..CMP3_Signal
  9212. * 0b100100..FTM3_Channel0_Signal
  9213. * 0b100101..FTM3_Channel1_Signal
  9214. * 0b100110..FTM3_Channel2_Signal
  9215. * 0b100111..FTM3_Channel3_Signal
  9216. * 0b101000..HSADC0A_Signal
  9217. * 0b101001..HSADC0B_Signal
  9218. * 0b101010..CMP0_Signal
  9219. * 0b101011..CMP1_Signal
  9220. * 0b101100..CMP2_Signal
  9221. * 0b101101..DAC0_Signal
  9222. * 0b101111..PDB1_Signal
  9223. * 0b110000..PDB0_Signal
  9224. * 0b110001..PortA_Signal
  9225. * 0b110010..PortB_Signal
  9226. * 0b110011..PortC_Signal
  9227. * 0b110100..PortD_Signal
  9228. * 0b110101..PortE_Signal
  9229. * 0b110110..FTM3_Channel4_Signal
  9230. * 0b110111..FTM3_Channel5_Signal
  9231. * 0b111000..FTM3_Channel6_Signal
  9232. * 0b111001..FTM3_Channel7_Signal
  9233. * 0b111100..AlwaysOn60_Signal
  9234. * 0b111101..AlwaysOn61_Signal
  9235. * 0b111110..AlwaysOn62_Signal
  9236. * 0b111111..AlwaysOn63_Signal
  9237. */
  9238. #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK)
  9239. #define DMAMUX_CHCFG_TRIG_MASK (0x40U)
  9240. #define DMAMUX_CHCFG_TRIG_SHIFT (6U)
  9241. /*! TRIG - DMA Channel Trigger Enable
  9242. * 0b0..Triggering is disabled. If triggering is disabled and ENBL is set, the DMA Channel will simply route the specified source to the DMA channel. (Normal mode)
  9243. * 0b1..Triggering is enabled. If triggering is enabled and ENBL is set, the DMAMUX is in Periodic Trigger mode.
  9244. */
  9245. #define DMAMUX_CHCFG_TRIG(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK)
  9246. #define DMAMUX_CHCFG_ENBL_MASK (0x80U)
  9247. #define DMAMUX_CHCFG_ENBL_SHIFT (7U)
  9248. /*! ENBL - DMA Channel Enable
  9249. * 0b0..DMA channel is disabled. This mode is primarily used during configuration of the DMAMux. The DMA has separate channel enables/disables, which should be used to disable or reconfigure a DMA channel.
  9250. * 0b1..DMA channel is enabled
  9251. */
  9252. #define DMAMUX_CHCFG_ENBL(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK)
  9253. /*! @} */
  9254. /* The count of DMAMUX_CHCFG */
  9255. #define DMAMUX_CHCFG_COUNT (32U)
  9256. /*!
  9257. * @}
  9258. */ /* end of group DMAMUX_Register_Masks */
  9259. /* DMAMUX - Peripheral instance base addresses */
  9260. /** Peripheral DMAMUX base address */
  9261. #define DMAMUX_BASE (0x40021000u)
  9262. /** Peripheral DMAMUX base pointer */
  9263. #define DMAMUX ((DMAMUX_Type *)DMAMUX_BASE)
  9264. /** Array initializer of DMAMUX peripheral base addresses */
  9265. #define DMAMUX_BASE_ADDRS { DMAMUX_BASE }
  9266. /** Array initializer of DMAMUX peripheral base pointers */
  9267. #define DMAMUX_BASE_PTRS { DMAMUX }
  9268. /*!
  9269. * @}
  9270. */ /* end of group DMAMUX_Peripheral_Access_Layer */
  9271. /* ----------------------------------------------------------------------------
  9272. -- ENC Peripheral Access Layer
  9273. ---------------------------------------------------------------------------- */
  9274. /*!
  9275. * @addtogroup ENC_Peripheral_Access_Layer ENC Peripheral Access Layer
  9276. * @{
  9277. */
  9278. /** ENC - Register Layout Typedef */
  9279. typedef struct {
  9280. __IO uint16_t CTRL; /**< Control Register, offset: 0x0 */
  9281. __IO uint16_t FILT; /**< Input Filter Register, offset: 0x2 */
  9282. __IO uint16_t WTR; /**< Watchdog Timeout Register, offset: 0x4 */
  9283. __IO uint16_t POSD; /**< Position Difference Counter Register, offset: 0x6 */
  9284. __I uint16_t POSDH; /**< Position Difference Hold Register, offset: 0x8 */
  9285. __IO uint16_t REV; /**< Revolution Counter Register, offset: 0xA */
  9286. __I uint16_t REVH; /**< Revolution Hold Register, offset: 0xC */
  9287. __IO uint16_t UPOS; /**< Upper Position Counter Register, offset: 0xE */
  9288. __IO uint16_t LPOS; /**< Lower Position Counter Register, offset: 0x10 */
  9289. __I uint16_t UPOSH; /**< Upper Position Hold Register, offset: 0x12 */
  9290. __I uint16_t LPOSH; /**< Lower Position Hold Register, offset: 0x14 */
  9291. __IO uint16_t UINIT; /**< Upper Initialization Register, offset: 0x16 */
  9292. __IO uint16_t LINIT; /**< Lower Initialization Register, offset: 0x18 */
  9293. __I uint16_t IMR; /**< Input Monitor Register, offset: 0x1A */
  9294. __IO uint16_t TST; /**< Test Register, offset: 0x1C */
  9295. __IO uint16_t CTRL2; /**< Control 2 Register, offset: 0x1E */
  9296. __IO uint16_t UMOD; /**< Upper Modulus Register, offset: 0x20 */
  9297. __IO uint16_t LMOD; /**< Lower Modulus Register, offset: 0x22 */
  9298. __IO uint16_t UCOMP; /**< Upper Position Compare Register, offset: 0x24 */
  9299. __IO uint16_t LCOMP; /**< Lower Position Compare Register, offset: 0x26 */
  9300. } ENC_Type;
  9301. /* ----------------------------------------------------------------------------
  9302. -- ENC Register Masks
  9303. ---------------------------------------------------------------------------- */
  9304. /*!
  9305. * @addtogroup ENC_Register_Masks ENC Register Masks
  9306. * @{
  9307. */
  9308. /*! @name CTRL - Control Register */
  9309. /*! @{ */
  9310. #define ENC_CTRL_CMPIE_MASK (0x1U)
  9311. #define ENC_CTRL_CMPIE_SHIFT (0U)
  9312. /*! CMPIE - Compare Interrupt Enable
  9313. * 0b0..Compare interrupt is disabled
  9314. * 0b1..Compare interrupt is enabled
  9315. */
  9316. #define ENC_CTRL_CMPIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_CMPIE_SHIFT)) & ENC_CTRL_CMPIE_MASK)
  9317. #define ENC_CTRL_CMPIRQ_MASK (0x2U)
  9318. #define ENC_CTRL_CMPIRQ_SHIFT (1U)
  9319. /*! CMPIRQ - Compare Interrupt Request
  9320. * 0b0..No match has occurred
  9321. * 0b1..COMP match has occurred
  9322. */
  9323. #define ENC_CTRL_CMPIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_CMPIRQ_SHIFT)) & ENC_CTRL_CMPIRQ_MASK)
  9324. #define ENC_CTRL_WDE_MASK (0x4U)
  9325. #define ENC_CTRL_WDE_SHIFT (2U)
  9326. /*! WDE - Watchdog Enable
  9327. * 0b0..Watchdog timer is disabled
  9328. * 0b1..Watchdog timer is enabled
  9329. */
  9330. #define ENC_CTRL_WDE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_WDE_SHIFT)) & ENC_CTRL_WDE_MASK)
  9331. #define ENC_CTRL_DIE_MASK (0x8U)
  9332. #define ENC_CTRL_DIE_SHIFT (3U)
  9333. /*! DIE - Watchdog Timeout Interrupt Enable
  9334. * 0b0..Watchdog timer interrupt is disabled
  9335. * 0b1..Watchdog timer interrupt is enabled
  9336. */
  9337. #define ENC_CTRL_DIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_DIE_SHIFT)) & ENC_CTRL_DIE_MASK)
  9338. #define ENC_CTRL_DIRQ_MASK (0x10U)
  9339. #define ENC_CTRL_DIRQ_SHIFT (4U)
  9340. /*! DIRQ - Watchdog Timeout Interrupt Request
  9341. * 0b0..No interrupt has occurred
  9342. * 0b1..Watchdog timeout interrupt has occurred
  9343. */
  9344. #define ENC_CTRL_DIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_DIRQ_SHIFT)) & ENC_CTRL_DIRQ_MASK)
  9345. #define ENC_CTRL_XNE_MASK (0x20U)
  9346. #define ENC_CTRL_XNE_SHIFT (5U)
  9347. /*! XNE - Use Negative Edge of INDEX Pulse
  9348. * 0b0..Use positive transition edge of INDEX pulse
  9349. * 0b1..Use negative transition edge of INDEX pulse
  9350. */
  9351. #define ENC_CTRL_XNE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_XNE_SHIFT)) & ENC_CTRL_XNE_MASK)
  9352. #define ENC_CTRL_XIP_MASK (0x40U)
  9353. #define ENC_CTRL_XIP_SHIFT (6U)
  9354. /*! XIP - INDEX Triggered Initialization of Position Counters UPOS and LPOS
  9355. * 0b0..No action
  9356. * 0b1..INDEX pulse initializes the position counter
  9357. */
  9358. #define ENC_CTRL_XIP(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_XIP_SHIFT)) & ENC_CTRL_XIP_MASK)
  9359. #define ENC_CTRL_XIE_MASK (0x80U)
  9360. #define ENC_CTRL_XIE_SHIFT (7U)
  9361. /*! XIE - INDEX Pulse Interrupt Enable
  9362. * 0b0..INDEX pulse interrupt is disabled
  9363. * 0b1..INDEX pulse interrupt is enabled
  9364. */
  9365. #define ENC_CTRL_XIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_XIE_SHIFT)) & ENC_CTRL_XIE_MASK)
  9366. #define ENC_CTRL_XIRQ_MASK (0x100U)
  9367. #define ENC_CTRL_XIRQ_SHIFT (8U)
  9368. /*! XIRQ - INDEX Pulse Interrupt Request
  9369. * 0b0..No interrupt has occurred
  9370. * 0b1..INDEX pulse interrupt has occurred
  9371. */
  9372. #define ENC_CTRL_XIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_XIRQ_SHIFT)) & ENC_CTRL_XIRQ_MASK)
  9373. #define ENC_CTRL_PH1_MASK (0x200U)
  9374. #define ENC_CTRL_PH1_SHIFT (9U)
  9375. /*! PH1 - Enable Signal Phase Count Mode
  9376. * 0b0..Use standard quadrature decoder where PHASEA and PHASEB represent a two phase quadrature signal.
  9377. * 0b1..Bypass the quadrature decoder. A positive transition of the PHASEA input generates a count signal. The PHASEB input and the REV bit control the counter direction. If CTRL[REV] = 0, PHASEB = 0, then count up If CTRL[REV] = 0, PHASEB = 1, then count down If CTRL[REV] = 1, PHASEB = 0, then count down If CTRL[REV] = 1, PHASEB = 1, then count up
  9378. */
  9379. #define ENC_CTRL_PH1(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_PH1_SHIFT)) & ENC_CTRL_PH1_MASK)
  9380. #define ENC_CTRL_REV_MASK (0x400U)
  9381. #define ENC_CTRL_REV_SHIFT (10U)
  9382. /*! REV - Enable Reverse Direction Counting
  9383. * 0b0..Count normally
  9384. * 0b1..Count in the reverse direction
  9385. */
  9386. #define ENC_CTRL_REV(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_REV_SHIFT)) & ENC_CTRL_REV_MASK)
  9387. #define ENC_CTRL_SWIP_MASK (0x800U)
  9388. #define ENC_CTRL_SWIP_SHIFT (11U)
  9389. /*! SWIP - Software Triggered Initialization of Position Counters UPOS and LPOS
  9390. * 0b0..No action
  9391. * 0b1..Initialize position counter
  9392. */
  9393. #define ENC_CTRL_SWIP(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_SWIP_SHIFT)) & ENC_CTRL_SWIP_MASK)
  9394. #define ENC_CTRL_HNE_MASK (0x1000U)
  9395. #define ENC_CTRL_HNE_SHIFT (12U)
  9396. /*! HNE - Use Negative Edge of HOME Input
  9397. * 0b0..Use positive going edge-to-trigger initialization of position counters UPOS and LPOS
  9398. * 0b1..Use negative going edge-to-trigger initialization of position counters UPOS and LPOS
  9399. */
  9400. #define ENC_CTRL_HNE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_HNE_SHIFT)) & ENC_CTRL_HNE_MASK)
  9401. #define ENC_CTRL_HIP_MASK (0x2000U)
  9402. #define ENC_CTRL_HIP_SHIFT (13U)
  9403. /*! HIP - Enable HOME to Initialize Position Counters UPOS and LPOS
  9404. * 0b0..No action
  9405. * 0b1..HOME signal initializes the position counter
  9406. */
  9407. #define ENC_CTRL_HIP(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_HIP_SHIFT)) & ENC_CTRL_HIP_MASK)
  9408. #define ENC_CTRL_HIE_MASK (0x4000U)
  9409. #define ENC_CTRL_HIE_SHIFT (14U)
  9410. /*! HIE - HOME Interrupt Enable
  9411. * 0b0..Disable HOME interrupts
  9412. * 0b1..Enable HOME interrupts
  9413. */
  9414. #define ENC_CTRL_HIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_HIE_SHIFT)) & ENC_CTRL_HIE_MASK)
  9415. #define ENC_CTRL_HIRQ_MASK (0x8000U)
  9416. #define ENC_CTRL_HIRQ_SHIFT (15U)
  9417. /*! HIRQ - HOME Signal Transition Interrupt Request
  9418. * 0b0..No interrupt
  9419. * 0b1..HOME signal transition interrupt request
  9420. */
  9421. #define ENC_CTRL_HIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL_HIRQ_SHIFT)) & ENC_CTRL_HIRQ_MASK)
  9422. /*! @} */
  9423. /*! @name FILT - Input Filter Register */
  9424. /*! @{ */
  9425. #define ENC_FILT_FILT_PER_MASK (0xFFU)
  9426. #define ENC_FILT_FILT_PER_SHIFT (0U)
  9427. #define ENC_FILT_FILT_PER(x) (((uint16_t)(((uint16_t)(x)) << ENC_FILT_FILT_PER_SHIFT)) & ENC_FILT_FILT_PER_MASK)
  9428. #define ENC_FILT_FILT_CNT_MASK (0x700U)
  9429. #define ENC_FILT_FILT_CNT_SHIFT (8U)
  9430. #define ENC_FILT_FILT_CNT(x) (((uint16_t)(((uint16_t)(x)) << ENC_FILT_FILT_CNT_SHIFT)) & ENC_FILT_FILT_CNT_MASK)
  9431. /*! @} */
  9432. /*! @name WTR - Watchdog Timeout Register */
  9433. /*! @{ */
  9434. #define ENC_WTR_WDOG_MASK (0xFFFFU)
  9435. #define ENC_WTR_WDOG_SHIFT (0U)
  9436. #define ENC_WTR_WDOG(x) (((uint16_t)(((uint16_t)(x)) << ENC_WTR_WDOG_SHIFT)) & ENC_WTR_WDOG_MASK)
  9437. /*! @} */
  9438. /*! @name POSD - Position Difference Counter Register */
  9439. /*! @{ */
  9440. #define ENC_POSD_POSD_MASK (0xFFFFU)
  9441. #define ENC_POSD_POSD_SHIFT (0U)
  9442. #define ENC_POSD_POSD(x) (((uint16_t)(((uint16_t)(x)) << ENC_POSD_POSD_SHIFT)) & ENC_POSD_POSD_MASK)
  9443. /*! @} */
  9444. /*! @name POSDH - Position Difference Hold Register */
  9445. /*! @{ */
  9446. #define ENC_POSDH_POSDH_MASK (0xFFFFU)
  9447. #define ENC_POSDH_POSDH_SHIFT (0U)
  9448. #define ENC_POSDH_POSDH(x) (((uint16_t)(((uint16_t)(x)) << ENC_POSDH_POSDH_SHIFT)) & ENC_POSDH_POSDH_MASK)
  9449. /*! @} */
  9450. /*! @name REV - Revolution Counter Register */
  9451. /*! @{ */
  9452. #define ENC_REV_REV_MASK (0xFFFFU)
  9453. #define ENC_REV_REV_SHIFT (0U)
  9454. #define ENC_REV_REV(x) (((uint16_t)(((uint16_t)(x)) << ENC_REV_REV_SHIFT)) & ENC_REV_REV_MASK)
  9455. /*! @} */
  9456. /*! @name REVH - Revolution Hold Register */
  9457. /*! @{ */
  9458. #define ENC_REVH_REVH_MASK (0xFFFFU)
  9459. #define ENC_REVH_REVH_SHIFT (0U)
  9460. #define ENC_REVH_REVH(x) (((uint16_t)(((uint16_t)(x)) << ENC_REVH_REVH_SHIFT)) & ENC_REVH_REVH_MASK)
  9461. /*! @} */
  9462. /*! @name UPOS - Upper Position Counter Register */
  9463. /*! @{ */
  9464. #define ENC_UPOS_POS_MASK (0xFFFFU)
  9465. #define ENC_UPOS_POS_SHIFT (0U)
  9466. #define ENC_UPOS_POS(x) (((uint16_t)(((uint16_t)(x)) << ENC_UPOS_POS_SHIFT)) & ENC_UPOS_POS_MASK)
  9467. /*! @} */
  9468. /*! @name LPOS - Lower Position Counter Register */
  9469. /*! @{ */
  9470. #define ENC_LPOS_POS_MASK (0xFFFFU)
  9471. #define ENC_LPOS_POS_SHIFT (0U)
  9472. #define ENC_LPOS_POS(x) (((uint16_t)(((uint16_t)(x)) << ENC_LPOS_POS_SHIFT)) & ENC_LPOS_POS_MASK)
  9473. /*! @} */
  9474. /*! @name UPOSH - Upper Position Hold Register */
  9475. /*! @{ */
  9476. #define ENC_UPOSH_POSH_MASK (0xFFFFU)
  9477. #define ENC_UPOSH_POSH_SHIFT (0U)
  9478. #define ENC_UPOSH_POSH(x) (((uint16_t)(((uint16_t)(x)) << ENC_UPOSH_POSH_SHIFT)) & ENC_UPOSH_POSH_MASK)
  9479. /*! @} */
  9480. /*! @name LPOSH - Lower Position Hold Register */
  9481. /*! @{ */
  9482. #define ENC_LPOSH_POSH_MASK (0xFFFFU)
  9483. #define ENC_LPOSH_POSH_SHIFT (0U)
  9484. #define ENC_LPOSH_POSH(x) (((uint16_t)(((uint16_t)(x)) << ENC_LPOSH_POSH_SHIFT)) & ENC_LPOSH_POSH_MASK)
  9485. /*! @} */
  9486. /*! @name UINIT - Upper Initialization Register */
  9487. /*! @{ */
  9488. #define ENC_UINIT_INIT_MASK (0xFFFFU)
  9489. #define ENC_UINIT_INIT_SHIFT (0U)
  9490. #define ENC_UINIT_INIT(x) (((uint16_t)(((uint16_t)(x)) << ENC_UINIT_INIT_SHIFT)) & ENC_UINIT_INIT_MASK)
  9491. /*! @} */
  9492. /*! @name LINIT - Lower Initialization Register */
  9493. /*! @{ */
  9494. #define ENC_LINIT_INIT_MASK (0xFFFFU)
  9495. #define ENC_LINIT_INIT_SHIFT (0U)
  9496. #define ENC_LINIT_INIT(x) (((uint16_t)(((uint16_t)(x)) << ENC_LINIT_INIT_SHIFT)) & ENC_LINIT_INIT_MASK)
  9497. /*! @} */
  9498. /*! @name IMR - Input Monitor Register */
  9499. /*! @{ */
  9500. #define ENC_IMR_HOME_MASK (0x1U)
  9501. #define ENC_IMR_HOME_SHIFT (0U)
  9502. #define ENC_IMR_HOME(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_HOME_SHIFT)) & ENC_IMR_HOME_MASK)
  9503. #define ENC_IMR_INDEX_MASK (0x2U)
  9504. #define ENC_IMR_INDEX_SHIFT (1U)
  9505. #define ENC_IMR_INDEX(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_INDEX_SHIFT)) & ENC_IMR_INDEX_MASK)
  9506. #define ENC_IMR_PHB_MASK (0x4U)
  9507. #define ENC_IMR_PHB_SHIFT (2U)
  9508. #define ENC_IMR_PHB(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_PHB_SHIFT)) & ENC_IMR_PHB_MASK)
  9509. #define ENC_IMR_PHA_MASK (0x8U)
  9510. #define ENC_IMR_PHA_SHIFT (3U)
  9511. #define ENC_IMR_PHA(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_PHA_SHIFT)) & ENC_IMR_PHA_MASK)
  9512. #define ENC_IMR_FHOM_MASK (0x10U)
  9513. #define ENC_IMR_FHOM_SHIFT (4U)
  9514. #define ENC_IMR_FHOM(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_FHOM_SHIFT)) & ENC_IMR_FHOM_MASK)
  9515. #define ENC_IMR_FIND_MASK (0x20U)
  9516. #define ENC_IMR_FIND_SHIFT (5U)
  9517. #define ENC_IMR_FIND(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_FIND_SHIFT)) & ENC_IMR_FIND_MASK)
  9518. #define ENC_IMR_FPHB_MASK (0x40U)
  9519. #define ENC_IMR_FPHB_SHIFT (6U)
  9520. #define ENC_IMR_FPHB(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_FPHB_SHIFT)) & ENC_IMR_FPHB_MASK)
  9521. #define ENC_IMR_FPHA_MASK (0x80U)
  9522. #define ENC_IMR_FPHA_SHIFT (7U)
  9523. #define ENC_IMR_FPHA(x) (((uint16_t)(((uint16_t)(x)) << ENC_IMR_FPHA_SHIFT)) & ENC_IMR_FPHA_MASK)
  9524. /*! @} */
  9525. /*! @name TST - Test Register */
  9526. /*! @{ */
  9527. #define ENC_TST_TEST_COUNT_MASK (0xFFU)
  9528. #define ENC_TST_TEST_COUNT_SHIFT (0U)
  9529. #define ENC_TST_TEST_COUNT(x) (((uint16_t)(((uint16_t)(x)) << ENC_TST_TEST_COUNT_SHIFT)) & ENC_TST_TEST_COUNT_MASK)
  9530. #define ENC_TST_TEST_PERIOD_MASK (0x1F00U)
  9531. #define ENC_TST_TEST_PERIOD_SHIFT (8U)
  9532. #define ENC_TST_TEST_PERIOD(x) (((uint16_t)(((uint16_t)(x)) << ENC_TST_TEST_PERIOD_SHIFT)) & ENC_TST_TEST_PERIOD_MASK)
  9533. #define ENC_TST_QDN_MASK (0x2000U)
  9534. #define ENC_TST_QDN_SHIFT (13U)
  9535. /*! QDN - Quadrature Decoder Negative Signal
  9536. * 0b0..Leaves quadrature decoder signal in a positive direction
  9537. * 0b1..Generates a negative quadrature decoder signal
  9538. */
  9539. #define ENC_TST_QDN(x) (((uint16_t)(((uint16_t)(x)) << ENC_TST_QDN_SHIFT)) & ENC_TST_QDN_MASK)
  9540. #define ENC_TST_TCE_MASK (0x4000U)
  9541. #define ENC_TST_TCE_SHIFT (14U)
  9542. /*! TCE - Test Counter Enable
  9543. * 0b0..Test count is not enabled
  9544. * 0b1..Test count is enabled
  9545. */
  9546. #define ENC_TST_TCE(x) (((uint16_t)(((uint16_t)(x)) << ENC_TST_TCE_SHIFT)) & ENC_TST_TCE_MASK)
  9547. #define ENC_TST_TEN_MASK (0x8000U)
  9548. #define ENC_TST_TEN_SHIFT (15U)
  9549. /*! TEN - Test Mode Enable
  9550. * 0b0..Test module is not enabled
  9551. * 0b1..Test module is enabled
  9552. */
  9553. #define ENC_TST_TEN(x) (((uint16_t)(((uint16_t)(x)) << ENC_TST_TEN_SHIFT)) & ENC_TST_TEN_MASK)
  9554. /*! @} */
  9555. /*! @name CTRL2 - Control 2 Register */
  9556. /*! @{ */
  9557. #define ENC_CTRL2_UPDHLD_MASK (0x1U)
  9558. #define ENC_CTRL2_UPDHLD_SHIFT (0U)
  9559. /*! UPDHLD - Update Hold Registers
  9560. * 0b0..Disable updates of hold registers on rising edge of TRIGGER
  9561. * 0b1..Enable updates of hold registers on rising edge of TRIGGER
  9562. */
  9563. #define ENC_CTRL2_UPDHLD(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_UPDHLD_SHIFT)) & ENC_CTRL2_UPDHLD_MASK)
  9564. #define ENC_CTRL2_UPDPOS_MASK (0x2U)
  9565. #define ENC_CTRL2_UPDPOS_SHIFT (1U)
  9566. /*! UPDPOS - Update Position Registers
  9567. * 0b0..No action for POSD, REV, UPOS and LPOS on rising edge of TRIGGER
  9568. * 0b1..Clear POSD, REV, UPOS and LPOS on rising edge of TRIGGER
  9569. */
  9570. #define ENC_CTRL2_UPDPOS(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_UPDPOS_SHIFT)) & ENC_CTRL2_UPDPOS_MASK)
  9571. #define ENC_CTRL2_MOD_MASK (0x4U)
  9572. #define ENC_CTRL2_MOD_SHIFT (2U)
  9573. /*! MOD - Enable Modulo Counting
  9574. * 0b0..Disable modulo counting
  9575. * 0b1..Enable modulo counting
  9576. */
  9577. #define ENC_CTRL2_MOD(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_MOD_SHIFT)) & ENC_CTRL2_MOD_MASK)
  9578. #define ENC_CTRL2_DIR_MASK (0x8U)
  9579. #define ENC_CTRL2_DIR_SHIFT (3U)
  9580. /*! DIR - Count Direction Flag
  9581. * 0b0..Last count was in the down direction
  9582. * 0b1..Last count was in the up direction
  9583. */
  9584. #define ENC_CTRL2_DIR(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_DIR_SHIFT)) & ENC_CTRL2_DIR_MASK)
  9585. #define ENC_CTRL2_RUIE_MASK (0x10U)
  9586. #define ENC_CTRL2_RUIE_SHIFT (4U)
  9587. /*! RUIE - Roll-under Interrupt Enable
  9588. * 0b0..Roll-under interrupt is disabled
  9589. * 0b1..Roll-under interrupt is enabled
  9590. */
  9591. #define ENC_CTRL2_RUIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_RUIE_SHIFT)) & ENC_CTRL2_RUIE_MASK)
  9592. #define ENC_CTRL2_RUIRQ_MASK (0x20U)
  9593. #define ENC_CTRL2_RUIRQ_SHIFT (5U)
  9594. /*! RUIRQ - Roll-under Interrupt Request
  9595. * 0b0..No roll-under has occurred
  9596. * 0b1..Roll-under has occurred
  9597. */
  9598. #define ENC_CTRL2_RUIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_RUIRQ_SHIFT)) & ENC_CTRL2_RUIRQ_MASK)
  9599. #define ENC_CTRL2_ROIE_MASK (0x40U)
  9600. #define ENC_CTRL2_ROIE_SHIFT (6U)
  9601. /*! ROIE - Roll-over Interrupt Enable
  9602. * 0b0..Roll-over interrupt is disabled
  9603. * 0b1..Roll-over interrupt is enabled
  9604. */
  9605. #define ENC_CTRL2_ROIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_ROIE_SHIFT)) & ENC_CTRL2_ROIE_MASK)
  9606. #define ENC_CTRL2_ROIRQ_MASK (0x80U)
  9607. #define ENC_CTRL2_ROIRQ_SHIFT (7U)
  9608. /*! ROIRQ - Roll-over Interrupt Request
  9609. * 0b0..No roll-over has occurred
  9610. * 0b1..Roll-over has occurred
  9611. */
  9612. #define ENC_CTRL2_ROIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_ROIRQ_SHIFT)) & ENC_CTRL2_ROIRQ_MASK)
  9613. #define ENC_CTRL2_REVMOD_MASK (0x100U)
  9614. #define ENC_CTRL2_REVMOD_SHIFT (8U)
  9615. /*! REVMOD - Revolution Counter Modulus Enable
  9616. * 0b0..Use INDEX pulse to increment/decrement revolution counter (REV).
  9617. * 0b1..Use modulus counting roll-over/under to increment/decrement revolution counter (REV).
  9618. */
  9619. #define ENC_CTRL2_REVMOD(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_REVMOD_SHIFT)) & ENC_CTRL2_REVMOD_MASK)
  9620. #define ENC_CTRL2_OUTCTL_MASK (0x200U)
  9621. #define ENC_CTRL2_OUTCTL_SHIFT (9U)
  9622. /*! OUTCTL - Output Control
  9623. * 0b0..POSMATCH pulses when a match occurs between the position counters (POS) and the compare value (COMP).
  9624. * 0b1..POSMATCH pulses when the UPOS, LPOS, REV, or POSD registers are read.
  9625. */
  9626. #define ENC_CTRL2_OUTCTL(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_OUTCTL_SHIFT)) & ENC_CTRL2_OUTCTL_MASK)
  9627. #define ENC_CTRL2_SABIE_MASK (0x400U)
  9628. #define ENC_CTRL2_SABIE_SHIFT (10U)
  9629. /*! SABIE - Simultaneous PHASEA and PHASEB Change Interrupt Enable
  9630. * 0b0..Simultaneous PHASEA and PHASEB change interrupt disabled.
  9631. * 0b1..Simultaneous PHASEA and PHASEB change interrupt enabled.
  9632. */
  9633. #define ENC_CTRL2_SABIE(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_SABIE_SHIFT)) & ENC_CTRL2_SABIE_MASK)
  9634. #define ENC_CTRL2_SABIRQ_MASK (0x800U)
  9635. #define ENC_CTRL2_SABIRQ_SHIFT (11U)
  9636. /*! SABIRQ - Simultaneous PHASEA and PHASEB Change Interrupt Request
  9637. * 0b0..No simultaneous change of PHASEA and PHASEB has occurred.
  9638. * 0b1..A simultaneous change of PHASEA and PHASEB has occurred.
  9639. */
  9640. #define ENC_CTRL2_SABIRQ(x) (((uint16_t)(((uint16_t)(x)) << ENC_CTRL2_SABIRQ_SHIFT)) & ENC_CTRL2_SABIRQ_MASK)
  9641. /*! @} */
  9642. /*! @name UMOD - Upper Modulus Register */
  9643. /*! @{ */
  9644. #define ENC_UMOD_MOD_MASK (0xFFFFU)
  9645. #define ENC_UMOD_MOD_SHIFT (0U)
  9646. #define ENC_UMOD_MOD(x) (((uint16_t)(((uint16_t)(x)) << ENC_UMOD_MOD_SHIFT)) & ENC_UMOD_MOD_MASK)
  9647. /*! @} */
  9648. /*! @name LMOD - Lower Modulus Register */
  9649. /*! @{ */
  9650. #define ENC_LMOD_MOD_MASK (0xFFFFU)
  9651. #define ENC_LMOD_MOD_SHIFT (0U)
  9652. #define ENC_LMOD_MOD(x) (((uint16_t)(((uint16_t)(x)) << ENC_LMOD_MOD_SHIFT)) & ENC_LMOD_MOD_MASK)
  9653. /*! @} */
  9654. /*! @name UCOMP - Upper Position Compare Register */
  9655. /*! @{ */
  9656. #define ENC_UCOMP_COMP_MASK (0xFFFFU)
  9657. #define ENC_UCOMP_COMP_SHIFT (0U)
  9658. #define ENC_UCOMP_COMP(x) (((uint16_t)(((uint16_t)(x)) << ENC_UCOMP_COMP_SHIFT)) & ENC_UCOMP_COMP_MASK)
  9659. /*! @} */
  9660. /*! @name LCOMP - Lower Position Compare Register */
  9661. /*! @{ */
  9662. #define ENC_LCOMP_COMP_MASK (0xFFFFU)
  9663. #define ENC_LCOMP_COMP_SHIFT (0U)
  9664. #define ENC_LCOMP_COMP(x) (((uint16_t)(((uint16_t)(x)) << ENC_LCOMP_COMP_SHIFT)) & ENC_LCOMP_COMP_MASK)
  9665. /*! @} */
  9666. /*!
  9667. * @}
  9668. */ /* end of group ENC_Register_Masks */
  9669. /* ENC - Peripheral instance base addresses */
  9670. /** Peripheral ENC base address */
  9671. #define ENC_BASE (0x40055000u)
  9672. /** Peripheral ENC base pointer */
  9673. #define ENC ((ENC_Type *)ENC_BASE)
  9674. /** Array initializer of ENC peripheral base addresses */
  9675. #define ENC_BASE_ADDRS { ENC_BASE }
  9676. /** Array initializer of ENC peripheral base pointers */
  9677. #define ENC_BASE_PTRS { ENC }
  9678. /** Interrupt vectors for the ENC peripheral type */
  9679. #define ENC_COMPARE_IRQS { ENC_COMPARE_IRQn }
  9680. #define ENC_HOME_IRQS { ENC_HOME_IRQn }
  9681. #define ENC_WDOG_IRQS { ENC_WDOG_SAB_IRQn }
  9682. #define ENC_INDEX_IRQS { ENC_INDEX_IRQn }
  9683. /*!
  9684. * @}
  9685. */ /* end of group ENC_Peripheral_Access_Layer */
  9686. /* ----------------------------------------------------------------------------
  9687. -- EWM Peripheral Access Layer
  9688. ---------------------------------------------------------------------------- */
  9689. /*!
  9690. * @addtogroup EWM_Peripheral_Access_Layer EWM Peripheral Access Layer
  9691. * @{
  9692. */
  9693. /** EWM - Register Layout Typedef */
  9694. typedef struct {
  9695. __IO uint8_t CTRL; /**< Control Register, offset: 0x0 */
  9696. __O uint8_t SERV; /**< Service Register, offset: 0x1 */
  9697. __IO uint8_t CMPL; /**< Compare Low Register, offset: 0x2 */
  9698. __IO uint8_t CMPH; /**< Compare High Register, offset: 0x3 */
  9699. __IO uint8_t CLKCTRL; /**< Clock Control Register, offset: 0x4 */
  9700. __IO uint8_t CLKPRESCALER; /**< Clock Prescaler Register, offset: 0x5 */
  9701. } EWM_Type;
  9702. /* ----------------------------------------------------------------------------
  9703. -- EWM Register Masks
  9704. ---------------------------------------------------------------------------- */
  9705. /*!
  9706. * @addtogroup EWM_Register_Masks EWM Register Masks
  9707. * @{
  9708. */
  9709. /*! @name CTRL - Control Register */
  9710. /*! @{ */
  9711. #define EWM_CTRL_EWMEN_MASK (0x1U)
  9712. #define EWM_CTRL_EWMEN_SHIFT (0U)
  9713. #define EWM_CTRL_EWMEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_EWMEN_SHIFT)) & EWM_CTRL_EWMEN_MASK)
  9714. #define EWM_CTRL_ASSIN_MASK (0x2U)
  9715. #define EWM_CTRL_ASSIN_SHIFT (1U)
  9716. #define EWM_CTRL_ASSIN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_ASSIN_SHIFT)) & EWM_CTRL_ASSIN_MASK)
  9717. #define EWM_CTRL_INEN_MASK (0x4U)
  9718. #define EWM_CTRL_INEN_SHIFT (2U)
  9719. #define EWM_CTRL_INEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INEN_SHIFT)) & EWM_CTRL_INEN_MASK)
  9720. #define EWM_CTRL_INTEN_MASK (0x8U)
  9721. #define EWM_CTRL_INTEN_SHIFT (3U)
  9722. #define EWM_CTRL_INTEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INTEN_SHIFT)) & EWM_CTRL_INTEN_MASK)
  9723. /*! @} */
  9724. /*! @name SERV - Service Register */
  9725. /*! @{ */
  9726. #define EWM_SERV_SERVICE_MASK (0xFFU)
  9727. #define EWM_SERV_SERVICE_SHIFT (0U)
  9728. #define EWM_SERV_SERVICE(x) (((uint8_t)(((uint8_t)(x)) << EWM_SERV_SERVICE_SHIFT)) & EWM_SERV_SERVICE_MASK)
  9729. /*! @} */
  9730. /*! @name CMPL - Compare Low Register */
  9731. /*! @{ */
  9732. #define EWM_CMPL_COMPAREL_MASK (0xFFU)
  9733. #define EWM_CMPL_COMPAREL_SHIFT (0U)
  9734. #define EWM_CMPL_COMPAREL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPL_COMPAREL_SHIFT)) & EWM_CMPL_COMPAREL_MASK)
  9735. /*! @} */
  9736. /*! @name CMPH - Compare High Register */
  9737. /*! @{ */
  9738. #define EWM_CMPH_COMPAREH_MASK (0xFFU)
  9739. #define EWM_CMPH_COMPAREH_SHIFT (0U)
  9740. #define EWM_CMPH_COMPAREH(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPH_COMPAREH_SHIFT)) & EWM_CMPH_COMPAREH_MASK)
  9741. /*! @} */
  9742. /*! @name CLKCTRL - Clock Control Register */
  9743. /*! @{ */
  9744. #define EWM_CLKCTRL_CLKSEL_MASK (0x3U)
  9745. #define EWM_CLKCTRL_CLKSEL_SHIFT (0U)
  9746. #define EWM_CLKCTRL_CLKSEL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CLKCTRL_CLKSEL_SHIFT)) & EWM_CLKCTRL_CLKSEL_MASK)
  9747. /*! @} */
  9748. /*! @name CLKPRESCALER - Clock Prescaler Register */
  9749. /*! @{ */
  9750. #define EWM_CLKPRESCALER_CLK_DIV_MASK (0xFFU)
  9751. #define EWM_CLKPRESCALER_CLK_DIV_SHIFT (0U)
  9752. #define EWM_CLKPRESCALER_CLK_DIV(x) (((uint8_t)(((uint8_t)(x)) << EWM_CLKPRESCALER_CLK_DIV_SHIFT)) & EWM_CLKPRESCALER_CLK_DIV_MASK)
  9753. /*! @} */
  9754. /*!
  9755. * @}
  9756. */ /* end of group EWM_Register_Masks */
  9757. /* EWM - Peripheral instance base addresses */
  9758. /** Peripheral EWM base address */
  9759. #define EWM_BASE (0x40061000u)
  9760. /** Peripheral EWM base pointer */
  9761. #define EWM ((EWM_Type *)EWM_BASE)
  9762. /** Array initializer of EWM peripheral base addresses */
  9763. #define EWM_BASE_ADDRS { EWM_BASE }
  9764. /** Array initializer of EWM peripheral base pointers */
  9765. #define EWM_BASE_PTRS { EWM }
  9766. /** Interrupt vectors for the EWM peripheral type */
  9767. #define EWM_IRQS { WDOG_EWM_IRQn }
  9768. /*!
  9769. * @}
  9770. */ /* end of group EWM_Peripheral_Access_Layer */
  9771. /* ----------------------------------------------------------------------------
  9772. -- FB Peripheral Access Layer
  9773. ---------------------------------------------------------------------------- */
  9774. /*!
  9775. * @addtogroup FB_Peripheral_Access_Layer FB Peripheral Access Layer
  9776. * @{
  9777. */
  9778. /** FB - Register Layout Typedef */
  9779. typedef struct {
  9780. struct { /* offset: 0x0, array step: 0xC */
  9781. __IO uint32_t CSAR; /**< Chip Select Address Register, array offset: 0x0, array step: 0xC */
  9782. __IO uint32_t CSMR; /**< Chip Select Mask Register, array offset: 0x4, array step: 0xC */
  9783. __IO uint32_t CSCR; /**< Chip Select Control Register, array offset: 0x8, array step: 0xC */
  9784. } CS[6];
  9785. uint8_t RESERVED_0[24];
  9786. __IO uint32_t CSPMCR; /**< Chip Select port Multiplexing Control Register, offset: 0x60 */
  9787. } FB_Type;
  9788. /* ----------------------------------------------------------------------------
  9789. -- FB Register Masks
  9790. ---------------------------------------------------------------------------- */
  9791. /*!
  9792. * @addtogroup FB_Register_Masks FB Register Masks
  9793. * @{
  9794. */
  9795. /*! @name CSAR - Chip Select Address Register */
  9796. /*! @{ */
  9797. #define FB_CSAR_BA_MASK (0xFFFF0000U)
  9798. #define FB_CSAR_BA_SHIFT (16U)
  9799. #define FB_CSAR_BA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSAR_BA_SHIFT)) & FB_CSAR_BA_MASK)
  9800. /*! @} */
  9801. /* The count of FB_CSAR */
  9802. #define FB_CSAR_COUNT (6U)
  9803. /*! @name CSMR - Chip Select Mask Register */
  9804. /*! @{ */
  9805. #define FB_CSMR_V_MASK (0x1U)
  9806. #define FB_CSMR_V_SHIFT (0U)
  9807. /*! V - Valid
  9808. * 0b0..Chip-select is invalid.
  9809. * 0b1..Chip-select is valid.
  9810. */
  9811. #define FB_CSMR_V(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_V_SHIFT)) & FB_CSMR_V_MASK)
  9812. #define FB_CSMR_WP_MASK (0x100U)
  9813. #define FB_CSMR_WP_SHIFT (8U)
  9814. /*! WP - Write Protect
  9815. * 0b0..Write accesses are allowed.
  9816. * 0b1..Write accesses are not allowed. Attempting to write to the range of addresses for which the WP bit is set results in a bus error termination of the internal cycle and no external cycle.
  9817. */
  9818. #define FB_CSMR_WP(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_WP_SHIFT)) & FB_CSMR_WP_MASK)
  9819. #define FB_CSMR_BAM_MASK (0xFFFF0000U)
  9820. #define FB_CSMR_BAM_SHIFT (16U)
  9821. /*! BAM - Base Address Mask
  9822. * 0b0000000000000000..The corresponding address bit in CSAR is used in the chip-select decode.
  9823. * 0b0000000000000001..The corresponding address bit in CSAR is a don't care in the chip-select decode.
  9824. */
  9825. #define FB_CSMR_BAM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_BAM_SHIFT)) & FB_CSMR_BAM_MASK)
  9826. /*! @} */
  9827. /* The count of FB_CSMR */
  9828. #define FB_CSMR_COUNT (6U)
  9829. /*! @name CSCR - Chip Select Control Register */
  9830. /*! @{ */
  9831. #define FB_CSCR_BSTW_MASK (0x8U)
  9832. #define FB_CSCR_BSTW_SHIFT (3U)
  9833. /*! BSTW - Burst-Write Enable
  9834. * 0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst writes. For example, a 32-bit write to an 8-bit port takes four byte writes.
  9835. * 0b1..Enabled. Enables burst write of data larger than the specified port size, including 32-bit writes to 8- and 16-bit ports, 16-bit writes to 8-bit ports, and line writes to 8-, 16-, and 32-bit ports.
  9836. */
  9837. #define FB_CSCR_BSTW(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTW_SHIFT)) & FB_CSCR_BSTW_MASK)
  9838. #define FB_CSCR_BSTR_MASK (0x10U)
  9839. #define FB_CSCR_BSTR_SHIFT (4U)
  9840. /*! BSTR - Burst-Read Enable
  9841. * 0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst reads. For example, a 32-bit read from an 8-bit port is broken into four 8-bit reads.
  9842. * 0b1..Enabled. Enables data burst reads larger than the specified port size, including 32-bit reads from 8- and 16-bit ports, 16-bit reads from 8-bit ports, and line reads from 8-, 16-, and 32-bit ports.
  9843. */
  9844. #define FB_CSCR_BSTR(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTR_SHIFT)) & FB_CSCR_BSTR_MASK)
  9845. #define FB_CSCR_BEM_MASK (0x20U)
  9846. #define FB_CSCR_BEM_SHIFT (5U)
  9847. /*! BEM - Byte-Enable Mode
  9848. * 0b0..FB_BE is asserted for data write only.
  9849. * 0b1..FB_BE is asserted for data read and write accesses.
  9850. */
  9851. #define FB_CSCR_BEM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BEM_SHIFT)) & FB_CSCR_BEM_MASK)
  9852. #define FB_CSCR_PS_MASK (0xC0U)
  9853. #define FB_CSCR_PS_SHIFT (6U)
  9854. /*! PS - Port Size
  9855. * 0b00..32-bit port size. Valid data is sampled and driven on FB_D[31:0].
  9856. * 0b01..8-bit port size. Valid data is sampled and driven on FB_D[31:24] when BLS is 0b, or FB_D[7:0] when BLS is 1b.
  9857. * 0b1x..16-bit port size. Valid data is sampled and driven on FB_D[31:16] when BLS is 0b, or FB_D[15:0] when BLS is 1b.
  9858. */
  9859. #define FB_CSCR_PS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_PS_SHIFT)) & FB_CSCR_PS_MASK)
  9860. #define FB_CSCR_AA_MASK (0x100U)
  9861. #define FB_CSCR_AA_SHIFT (8U)
  9862. /*! AA - Auto-Acknowledge Enable
  9863. * 0b0..Disabled. No internal transfer acknowledge is asserted and the cycle is terminated externally.
  9864. * 0b1..Enabled. Internal transfer acknowledge is asserted as specified by WS.
  9865. */
  9866. #define FB_CSCR_AA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_AA_SHIFT)) & FB_CSCR_AA_MASK)
  9867. #define FB_CSCR_BLS_MASK (0x200U)
  9868. #define FB_CSCR_BLS_SHIFT (9U)
  9869. /*! BLS - Byte-Lane Shift
  9870. * 0b0..Not shifted. Data is left-aligned on FB_AD.
  9871. * 0b1..Shifted. Data is right-aligned on FB_AD.
  9872. */
  9873. #define FB_CSCR_BLS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BLS_SHIFT)) & FB_CSCR_BLS_MASK)
  9874. #define FB_CSCR_WS_MASK (0xFC00U)
  9875. #define FB_CSCR_WS_SHIFT (10U)
  9876. #define FB_CSCR_WS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WS_SHIFT)) & FB_CSCR_WS_MASK)
  9877. #define FB_CSCR_WRAH_MASK (0x30000U)
  9878. #define FB_CSCR_WRAH_SHIFT (16U)
  9879. /*! WRAH - Write Address Hold or Deselect
  9880. * 0b00..1 cycle (default for all but FB_CS0 )
  9881. * 0b01..2 cycles
  9882. * 0b10..3 cycles
  9883. * 0b11..4 cycles (default for FB_CS0 )
  9884. */
  9885. #define FB_CSCR_WRAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WRAH_SHIFT)) & FB_CSCR_WRAH_MASK)
  9886. #define FB_CSCR_RDAH_MASK (0xC0000U)
  9887. #define FB_CSCR_RDAH_SHIFT (18U)
  9888. /*! RDAH - Read Address Hold or Deselect
  9889. * 0b00..When AA is 1b, 1 cycle. When AA is 0b, 0 cycles.
  9890. * 0b01..When AA is 1b, 2 cycles. When AA is 0b, 1 cycle.
  9891. * 0b10..When AA is 1b, 3 cycles. When AA is 0b, 2 cycles.
  9892. * 0b11..When AA is 1b, 4 cycles. When AA is 0b, 3 cycles.
  9893. */
  9894. #define FB_CSCR_RDAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_RDAH_SHIFT)) & FB_CSCR_RDAH_MASK)
  9895. #define FB_CSCR_ASET_MASK (0x300000U)
  9896. #define FB_CSCR_ASET_SHIFT (20U)
  9897. /*! ASET - Address Setup
  9898. * 0b00..Assert FB_CSn on the first rising clock edge after the address is asserted (default for all but FB_CS0 ).
  9899. * 0b01..Assert FB_CSn on the second rising clock edge after the address is asserted.
  9900. * 0b10..Assert FB_CSn on the third rising clock edge after the address is asserted.
  9901. * 0b11..Assert FB_CSn on the fourth rising clock edge after the address is asserted (default for FB_CS0 ).
  9902. */
  9903. #define FB_CSCR_ASET(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_ASET_SHIFT)) & FB_CSCR_ASET_MASK)
  9904. #define FB_CSCR_EXTS_MASK (0x400000U)
  9905. #define FB_CSCR_EXTS_SHIFT (22U)
  9906. /*! EXTS
  9907. * 0b0..Disabled. FB_TS /FB_ALE asserts for one bus clock cycle.
  9908. * 0b1..Enabled. FB_TS /FB_ALE remains asserted until the first positive clock edge after FB_CSn asserts.
  9909. */
  9910. #define FB_CSCR_EXTS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_EXTS_SHIFT)) & FB_CSCR_EXTS_MASK)
  9911. #define FB_CSCR_SWSEN_MASK (0x800000U)
  9912. #define FB_CSCR_SWSEN_SHIFT (23U)
  9913. /*! SWSEN - Secondary Wait State Enable
  9914. * 0b0..Disabled. A number of wait states (specified by WS) are inserted before an internal transfer acknowledge is generated for all transfers.
  9915. * 0b1..Enabled. A number of wait states (specified by SWS) are inserted before an internal transfer acknowledge is generated for burst transfer secondary terminations.
  9916. */
  9917. #define FB_CSCR_SWSEN(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWSEN_SHIFT)) & FB_CSCR_SWSEN_MASK)
  9918. #define FB_CSCR_SWS_MASK (0xFC000000U)
  9919. #define FB_CSCR_SWS_SHIFT (26U)
  9920. #define FB_CSCR_SWS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWS_SHIFT)) & FB_CSCR_SWS_MASK)
  9921. /*! @} */
  9922. /* The count of FB_CSCR */
  9923. #define FB_CSCR_COUNT (6U)
  9924. /*! @name CSPMCR - Chip Select port Multiplexing Control Register */
  9925. /*! @{ */
  9926. #define FB_CSPMCR_GROUP5_MASK (0xF000U)
  9927. #define FB_CSPMCR_GROUP5_SHIFT (12U)
  9928. /*! GROUP5 - FlexBus Signal Group 5 Multiplex control
  9929. * 0b0000..FB_TA
  9930. * 0b0001..FB_CS3 . You must also write 1b to CSCR[AA].
  9931. * 0b0010..FB_BE_7_0 . You must also write 1b to CSCR[AA].
  9932. */
  9933. #define FB_CSPMCR_GROUP5(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP5_SHIFT)) & FB_CSPMCR_GROUP5_MASK)
  9934. #define FB_CSPMCR_GROUP4_MASK (0xF0000U)
  9935. #define FB_CSPMCR_GROUP4_SHIFT (16U)
  9936. /*! GROUP4 - FlexBus Signal Group 4 Multiplex control
  9937. * 0b0000..FB_TBST
  9938. * 0b0001..FB_CS2
  9939. * 0b0010..FB_BE_15_8
  9940. */
  9941. #define FB_CSPMCR_GROUP4(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP4_SHIFT)) & FB_CSPMCR_GROUP4_MASK)
  9942. #define FB_CSPMCR_GROUP3_MASK (0xF00000U)
  9943. #define FB_CSPMCR_GROUP3_SHIFT (20U)
  9944. /*! GROUP3 - FlexBus Signal Group 3 Multiplex control
  9945. * 0b0000..FB_CS5
  9946. * 0b0001..FB_TSIZ1
  9947. * 0b0010..FB_BE_23_16
  9948. */
  9949. #define FB_CSPMCR_GROUP3(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP3_SHIFT)) & FB_CSPMCR_GROUP3_MASK)
  9950. #define FB_CSPMCR_GROUP2_MASK (0xF000000U)
  9951. #define FB_CSPMCR_GROUP2_SHIFT (24U)
  9952. /*! GROUP2 - FlexBus Signal Group 2 Multiplex control
  9953. * 0b0000..FB_CS4
  9954. * 0b0001..FB_TSIZ0
  9955. * 0b0010..FB_BE_31_24
  9956. */
  9957. #define FB_CSPMCR_GROUP2(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP2_SHIFT)) & FB_CSPMCR_GROUP2_MASK)
  9958. #define FB_CSPMCR_GROUP1_MASK (0xF0000000U)
  9959. #define FB_CSPMCR_GROUP1_SHIFT (28U)
  9960. /*! GROUP1 - FlexBus Signal Group 1 Multiplex control
  9961. * 0b0000..FB_ALE
  9962. * 0b0001..FB_CS1
  9963. * 0b0010..FB_TS
  9964. */
  9965. #define FB_CSPMCR_GROUP1(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP1_SHIFT)) & FB_CSPMCR_GROUP1_MASK)
  9966. /*! @} */
  9967. /*!
  9968. * @}
  9969. */ /* end of group FB_Register_Masks */
  9970. /* FB - Peripheral instance base addresses */
  9971. /** Peripheral FB base address */
  9972. #define FB_BASE (0x4000C000u)
  9973. /** Peripheral FB base pointer */
  9974. #define FB ((FB_Type *)FB_BASE)
  9975. /** Array initializer of FB peripheral base addresses */
  9976. #define FB_BASE_ADDRS { FB_BASE }
  9977. /** Array initializer of FB peripheral base pointers */
  9978. #define FB_BASE_PTRS { FB }
  9979. /*!
  9980. * @}
  9981. */ /* end of group FB_Peripheral_Access_Layer */
  9982. /* ----------------------------------------------------------------------------
  9983. -- FMC Peripheral Access Layer
  9984. ---------------------------------------------------------------------------- */
  9985. /*!
  9986. * @addtogroup FMC_Peripheral_Access_Layer FMC Peripheral Access Layer
  9987. * @{
  9988. */
  9989. /** FMC - Register Layout Typedef */
  9990. typedef struct {
  9991. __IO uint32_t PFAPR; /**< Flash Access Protection Register, offset: 0x0 */
  9992. __IO uint32_t PFB0CR; /**< Flash Bank 0 Control Register, offset: 0x4 */
  9993. } FMC_Type;
  9994. /* ----------------------------------------------------------------------------
  9995. -- FMC Register Masks
  9996. ---------------------------------------------------------------------------- */
  9997. /*!
  9998. * @addtogroup FMC_Register_Masks FMC Register Masks
  9999. * @{
  10000. */
  10001. /*! @name PFAPR - Flash Access Protection Register */
  10002. /*! @{ */
  10003. #define FMC_PFAPR_M0AP_MASK (0x3U)
  10004. #define FMC_PFAPR_M0AP_SHIFT (0U)
  10005. /*! M0AP - Master 0 Access Protection
  10006. * 0b00..No access may be performed by this master
  10007. * 0b01..Only read accesses may be performed by this master
  10008. * 0b10..Only write accesses may be performed by this master
  10009. * 0b11..Both read and write accesses may be performed by this master
  10010. */
  10011. #define FMC_PFAPR_M0AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0AP_SHIFT)) & FMC_PFAPR_M0AP_MASK)
  10012. #define FMC_PFAPR_M1AP_MASK (0xCU)
  10013. #define FMC_PFAPR_M1AP_SHIFT (2U)
  10014. /*! M1AP - Master 1 Access Protection
  10015. * 0b00..No access may be performed by this master
  10016. * 0b01..Only read accesses may be performed by this master
  10017. * 0b10..Only write accesses may be performed by this master
  10018. * 0b11..Both read and write accesses may be performed by this master
  10019. */
  10020. #define FMC_PFAPR_M1AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1AP_SHIFT)) & FMC_PFAPR_M1AP_MASK)
  10021. #define FMC_PFAPR_M2AP_MASK (0x30U)
  10022. #define FMC_PFAPR_M2AP_SHIFT (4U)
  10023. /*! M2AP - Master 2 Access Protection
  10024. * 0b00..No access may be performed by this master
  10025. * 0b01..Only read accesses may be performed by this master
  10026. * 0b10..Only write accesses may be performed by this master
  10027. * 0b11..Both read and write accesses may be performed by this master
  10028. */
  10029. #define FMC_PFAPR_M2AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2AP_SHIFT)) & FMC_PFAPR_M2AP_MASK)
  10030. #define FMC_PFAPR_M3AP_MASK (0xC0U)
  10031. #define FMC_PFAPR_M3AP_SHIFT (6U)
  10032. /*! M3AP - Master 3 Access Protection
  10033. * 0b00..No access may be performed by this master
  10034. * 0b01..Only read accesses may be performed by this master
  10035. * 0b10..Only write accesses may be performed by this master
  10036. * 0b11..Both read and write accesses may be performed by this master
  10037. */
  10038. #define FMC_PFAPR_M3AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3AP_SHIFT)) & FMC_PFAPR_M3AP_MASK)
  10039. #define FMC_PFAPR_M0PFD_MASK (0x10000U)
  10040. #define FMC_PFAPR_M0PFD_SHIFT (16U)
  10041. /*! M0PFD - Master 0 Prefetch Disable
  10042. * 0b0..Prefetching for this master is enabled.
  10043. * 0b1..Prefetching for this master is disabled.
  10044. */
  10045. #define FMC_PFAPR_M0PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0PFD_SHIFT)) & FMC_PFAPR_M0PFD_MASK)
  10046. #define FMC_PFAPR_M1PFD_MASK (0x20000U)
  10047. #define FMC_PFAPR_M1PFD_SHIFT (17U)
  10048. /*! M1PFD - Master 1 Prefetch Disable
  10049. * 0b0..Prefetching for this master is enabled.
  10050. * 0b1..Prefetching for this master is disabled.
  10051. */
  10052. #define FMC_PFAPR_M1PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1PFD_SHIFT)) & FMC_PFAPR_M1PFD_MASK)
  10053. #define FMC_PFAPR_M2PFD_MASK (0x40000U)
  10054. #define FMC_PFAPR_M2PFD_SHIFT (18U)
  10055. /*! M2PFD - Master 2 Prefetch Disable
  10056. * 0b0..Prefetching for this master is enabled.
  10057. * 0b1..Prefetching for this master is disabled.
  10058. */
  10059. #define FMC_PFAPR_M2PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2PFD_SHIFT)) & FMC_PFAPR_M2PFD_MASK)
  10060. #define FMC_PFAPR_M3PFD_MASK (0x80000U)
  10061. #define FMC_PFAPR_M3PFD_SHIFT (19U)
  10062. /*! M3PFD - Master 3 Prefetch Disable
  10063. * 0b0..Prefetching for this master is enabled.
  10064. * 0b1..Prefetching for this master is disabled.
  10065. */
  10066. #define FMC_PFAPR_M3PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3PFD_SHIFT)) & FMC_PFAPR_M3PFD_MASK)
  10067. /*! @} */
  10068. /*! @name PFB0CR - Flash Bank 0 Control Register */
  10069. /*! @{ */
  10070. #define FMC_PFB0CR_B0IPE_MASK (0x2U)
  10071. #define FMC_PFB0CR_B0IPE_SHIFT (1U)
  10072. /*! B0IPE - Bank 0 Instruction Prefetch Enable
  10073. * 0b0..Do not prefetch in response to instruction fetches.
  10074. * 0b1..Enable prefetches in response to instruction fetches.
  10075. */
  10076. #define FMC_PFB0CR_B0IPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0IPE_SHIFT)) & FMC_PFB0CR_B0IPE_MASK)
  10077. #define FMC_PFB0CR_B0DPE_MASK (0x4U)
  10078. #define FMC_PFB0CR_B0DPE_SHIFT (2U)
  10079. /*! B0DPE - Bank 0 Data Prefetch Enable
  10080. * 0b0..Do not prefetch in response to data references.
  10081. * 0b1..Enable prefetches in response to data references.
  10082. */
  10083. #define FMC_PFB0CR_B0DPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0DPE_SHIFT)) & FMC_PFB0CR_B0DPE_MASK)
  10084. #define FMC_PFB0CR_B0MW_MASK (0x60000U)
  10085. #define FMC_PFB0CR_B0MW_SHIFT (17U)
  10086. /*! B0MW - Bank 0 Memory Width
  10087. * 0b00..32 bits
  10088. * 0b01..64 bits
  10089. * 0b10..128 bits
  10090. * 0b11..256 bits
  10091. */
  10092. #define FMC_PFB0CR_B0MW(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0MW_SHIFT)) & FMC_PFB0CR_B0MW_MASK)
  10093. #define FMC_PFB0CR_S_INV_MASK (0x80000U)
  10094. #define FMC_PFB0CR_S_INV_SHIFT (19U)
  10095. /*! S_INV - Invalidate Prefetch Speculation Buffer
  10096. * 0b0..Speculation buffer is not affected.
  10097. * 0b1..Invalidate (clear) the speculation buffer.
  10098. */
  10099. #define FMC_PFB0CR_S_INV(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_S_INV_SHIFT)) & FMC_PFB0CR_S_INV_MASK)
  10100. #define FMC_PFB0CR_B0RWSC_MASK (0xF0000000U)
  10101. #define FMC_PFB0CR_B0RWSC_SHIFT (28U)
  10102. #define FMC_PFB0CR_B0RWSC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0RWSC_SHIFT)) & FMC_PFB0CR_B0RWSC_MASK)
  10103. /*! @} */
  10104. /*!
  10105. * @}
  10106. */ /* end of group FMC_Register_Masks */
  10107. /* FMC - Peripheral instance base addresses */
  10108. /** Peripheral FMC base address */
  10109. #define FMC_BASE (0x4001F000u)
  10110. /** Peripheral FMC base pointer */
  10111. #define FMC ((FMC_Type *)FMC_BASE)
  10112. /** Array initializer of FMC peripheral base addresses */
  10113. #define FMC_BASE_ADDRS { FMC_BASE }
  10114. /** Array initializer of FMC peripheral base pointers */
  10115. #define FMC_BASE_PTRS { FMC }
  10116. /*!
  10117. * @}
  10118. */ /* end of group FMC_Peripheral_Access_Layer */
  10119. /* ----------------------------------------------------------------------------
  10120. -- FTFE Peripheral Access Layer
  10121. ---------------------------------------------------------------------------- */
  10122. /*!
  10123. * @addtogroup FTFE_Peripheral_Access_Layer FTFE Peripheral Access Layer
  10124. * @{
  10125. */
  10126. /** FTFE - Register Layout Typedef */
  10127. typedef struct {
  10128. __IO uint8_t FSTAT; /**< Flash Status Register, offset: 0x0 */
  10129. __IO uint8_t FCNFG; /**< Flash Configuration Register, offset: 0x1 */
  10130. __I uint8_t FSEC; /**< Flash Security Register, offset: 0x2 */
  10131. __I uint8_t FOPT; /**< Flash Option Register, offset: 0x3 */
  10132. __IO uint8_t FCCOB3; /**< Flash Common Command Object Registers, offset: 0x4 */
  10133. __IO uint8_t FCCOB2; /**< Flash Common Command Object Registers, offset: 0x5 */
  10134. __IO uint8_t FCCOB1; /**< Flash Common Command Object Registers, offset: 0x6 */
  10135. __IO uint8_t FCCOB0; /**< Flash Common Command Object Registers, offset: 0x7 */
  10136. __IO uint8_t FCCOB7; /**< Flash Common Command Object Registers, offset: 0x8 */
  10137. __IO uint8_t FCCOB6; /**< Flash Common Command Object Registers, offset: 0x9 */
  10138. __IO uint8_t FCCOB5; /**< Flash Common Command Object Registers, offset: 0xA */
  10139. __IO uint8_t FCCOB4; /**< Flash Common Command Object Registers, offset: 0xB */
  10140. __IO uint8_t FCCOBB; /**< Flash Common Command Object Registers, offset: 0xC */
  10141. __IO uint8_t FCCOBA; /**< Flash Common Command Object Registers, offset: 0xD */
  10142. __IO uint8_t FCCOB9; /**< Flash Common Command Object Registers, offset: 0xE */
  10143. __IO uint8_t FCCOB8; /**< Flash Common Command Object Registers, offset: 0xF */
  10144. __IO uint8_t FPROT3; /**< Program Flash Protection Registers, offset: 0x10 */
  10145. __IO uint8_t FPROT2; /**< Program Flash Protection Registers, offset: 0x11 */
  10146. __IO uint8_t FPROT1; /**< Program Flash Protection Registers, offset: 0x12 */
  10147. __IO uint8_t FPROT0; /**< Program Flash Protection Registers, offset: 0x13 */
  10148. } FTFE_Type;
  10149. /* ----------------------------------------------------------------------------
  10150. -- FTFE Register Masks
  10151. ---------------------------------------------------------------------------- */
  10152. /*!
  10153. * @addtogroup FTFE_Register_Masks FTFE Register Masks
  10154. * @{
  10155. */
  10156. /*! @name FSTAT - Flash Status Register */
  10157. /*! @{ */
  10158. #define FTFE_FSTAT_MGSTAT0_MASK (0x1U)
  10159. #define FTFE_FSTAT_MGSTAT0_SHIFT (0U)
  10160. #define FTFE_FSTAT_MGSTAT0(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_MGSTAT0_SHIFT)) & FTFE_FSTAT_MGSTAT0_MASK)
  10161. #define FTFE_FSTAT_FPVIOL_MASK (0x10U)
  10162. #define FTFE_FSTAT_FPVIOL_SHIFT (4U)
  10163. /*! FPVIOL - Flash Protection Violation Flag
  10164. * 0b0..No protection violation detected
  10165. * 0b1..Protection violation detected
  10166. */
  10167. #define FTFE_FSTAT_FPVIOL(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_FPVIOL_SHIFT)) & FTFE_FSTAT_FPVIOL_MASK)
  10168. #define FTFE_FSTAT_ACCERR_MASK (0x20U)
  10169. #define FTFE_FSTAT_ACCERR_SHIFT (5U)
  10170. /*! ACCERR - Flash Access Error Flag
  10171. * 0b0..No access error detected
  10172. * 0b1..Access error detected
  10173. */
  10174. #define FTFE_FSTAT_ACCERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_ACCERR_SHIFT)) & FTFE_FSTAT_ACCERR_MASK)
  10175. #define FTFE_FSTAT_RDCOLERR_MASK (0x40U)
  10176. #define FTFE_FSTAT_RDCOLERR_SHIFT (6U)
  10177. /*! RDCOLERR - FTFE Read Collision Error Flag
  10178. * 0b0..No collision error detected
  10179. * 0b1..Collision error detected
  10180. */
  10181. #define FTFE_FSTAT_RDCOLERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_RDCOLERR_SHIFT)) & FTFE_FSTAT_RDCOLERR_MASK)
  10182. #define FTFE_FSTAT_CCIF_MASK (0x80U)
  10183. #define FTFE_FSTAT_CCIF_SHIFT (7U)
  10184. /*! CCIF - Command Complete Interrupt Flag
  10185. * 0b0..FTFE command in progress
  10186. * 0b1..FTFE command has completed
  10187. */
  10188. #define FTFE_FSTAT_CCIF(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_CCIF_SHIFT)) & FTFE_FSTAT_CCIF_MASK)
  10189. /*! @} */
  10190. /*! @name FCNFG - Flash Configuration Register */
  10191. /*! @{ */
  10192. #define FTFE_FCNFG_EEERDY_MASK (0x1U)
  10193. #define FTFE_FCNFG_EEERDY_SHIFT (0U)
  10194. /*! EEERDY
  10195. * 0b0..See RAMRDY for availability of programming acceleration RAM
  10196. * 0b1..Reserved
  10197. */
  10198. #define FTFE_FCNFG_EEERDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_EEERDY_SHIFT)) & FTFE_FCNFG_EEERDY_MASK)
  10199. #define FTFE_FCNFG_RAMRDY_MASK (0x2U)
  10200. #define FTFE_FCNFG_RAMRDY_SHIFT (1U)
  10201. /*! RAMRDY - RAM Ready
  10202. * 0b0..Programming acceleration RAM is not available
  10203. * 0b1..Programming acceleration RAM is available
  10204. */
  10205. #define FTFE_FCNFG_RAMRDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RAMRDY_SHIFT)) & FTFE_FCNFG_RAMRDY_MASK)
  10206. #define FTFE_FCNFG_PFLSH_MASK (0x4U)
  10207. #define FTFE_FCNFG_PFLSH_SHIFT (2U)
  10208. #define FTFE_FCNFG_PFLSH(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_PFLSH_SHIFT)) & FTFE_FCNFG_PFLSH_MASK)
  10209. #define FTFE_FCNFG_ERSSUSP_MASK (0x10U)
  10210. #define FTFE_FCNFG_ERSSUSP_SHIFT (4U)
  10211. /*! ERSSUSP - Erase Suspend
  10212. * 0b0..No suspend requested
  10213. * 0b1..Suspend the current Erase Flash Sector command execution
  10214. */
  10215. #define FTFE_FCNFG_ERSSUSP(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSSUSP_SHIFT)) & FTFE_FCNFG_ERSSUSP_MASK)
  10216. #define FTFE_FCNFG_ERSAREQ_MASK (0x20U)
  10217. #define FTFE_FCNFG_ERSAREQ_SHIFT (5U)
  10218. /*! ERSAREQ - Erase All Request
  10219. * 0b0..No request or request complete
  10220. * 0b1..Request to: run the Erase All Blocks command, verify the erased state, program the security byte in the Flash Configuration Field to the unsecure state, and release MCU security by setting the FSEC[SEC] field to the unsecure state
  10221. */
  10222. #define FTFE_FCNFG_ERSAREQ(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSAREQ_SHIFT)) & FTFE_FCNFG_ERSAREQ_MASK)
  10223. #define FTFE_FCNFG_RDCOLLIE_MASK (0x40U)
  10224. #define FTFE_FCNFG_RDCOLLIE_SHIFT (6U)
  10225. /*! RDCOLLIE - Read Collision Error Interrupt Enable
  10226. * 0b0..Read collision error interrupt disabled
  10227. * 0b1..Read collision error interrupt enabled. An interrupt request is generated whenever an FTFE read collision error is detected (see the description of FSTAT[RDCOLERR]).
  10228. */
  10229. #define FTFE_FCNFG_RDCOLLIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RDCOLLIE_SHIFT)) & FTFE_FCNFG_RDCOLLIE_MASK)
  10230. #define FTFE_FCNFG_CCIE_MASK (0x80U)
  10231. #define FTFE_FCNFG_CCIE_SHIFT (7U)
  10232. /*! CCIE - Command Complete Interrupt Enable
  10233. * 0b0..Command complete interrupt disabled
  10234. * 0b1..Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT[CCIF] flag is set.
  10235. */
  10236. #define FTFE_FCNFG_CCIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CCIE_SHIFT)) & FTFE_FCNFG_CCIE_MASK)
  10237. /*! @} */
  10238. /*! @name FSEC - Flash Security Register */
  10239. /*! @{ */
  10240. #define FTFE_FSEC_SEC_MASK (0x3U)
  10241. #define FTFE_FSEC_SEC_SHIFT (0U)
  10242. /*! SEC - Flash Security
  10243. * 0b00..MCU security status is secure
  10244. * 0b01..MCU security status is secure
  10245. * 0b10..MCU security status is unsecure (The standard shipping condition of the FTFE is unsecure.)
  10246. * 0b11..MCU security status is secure
  10247. */
  10248. #define FTFE_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_SEC_SHIFT)) & FTFE_FSEC_SEC_MASK)
  10249. #define FTFE_FSEC_FSLACC_MASK (0xCU)
  10250. #define FTFE_FSEC_FSLACC_SHIFT (2U)
  10251. /*! FSLACC - Factory Security Level Access Code
  10252. * 0b00..Factory access granted
  10253. * 0b01..Factory access denied
  10254. * 0b10..Factory access denied
  10255. * 0b11..Factory access granted
  10256. */
  10257. #define FTFE_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_FSLACC_SHIFT)) & FTFE_FSEC_FSLACC_MASK)
  10258. #define FTFE_FSEC_MEEN_MASK (0x30U)
  10259. #define FTFE_FSEC_MEEN_SHIFT (4U)
  10260. /*! MEEN - Mass Erase Enable Bits
  10261. * 0b00..Mass erase is enabled
  10262. * 0b01..Mass erase is enabled
  10263. * 0b10..Mass erase is disabled
  10264. * 0b11..Mass erase is enabled
  10265. */
  10266. #define FTFE_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_MEEN_SHIFT)) & FTFE_FSEC_MEEN_MASK)
  10267. #define FTFE_FSEC_KEYEN_MASK (0xC0U)
  10268. #define FTFE_FSEC_KEYEN_SHIFT (6U)
  10269. /*! KEYEN - Backdoor Key Security Enable
  10270. * 0b00..Backdoor key access disabled
  10271. * 0b01..Backdoor key access disabled (preferred KEYEN state to disable backdoor key access)
  10272. * 0b10..Backdoor key access enabled
  10273. * 0b11..Backdoor key access disabled
  10274. */
  10275. #define FTFE_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_KEYEN_SHIFT)) & FTFE_FSEC_KEYEN_MASK)
  10276. /*! @} */
  10277. /*! @name FOPT - Flash Option Register */
  10278. /*! @{ */
  10279. #define FTFE_FOPT_OPT_MASK (0xFFU)
  10280. #define FTFE_FOPT_OPT_SHIFT (0U)
  10281. #define FTFE_FOPT_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT_OPT_SHIFT)) & FTFE_FOPT_OPT_MASK)
  10282. /*! @} */
  10283. /*! @name FCCOB3 - Flash Common Command Object Registers */
  10284. /*! @{ */
  10285. #define FTFE_FCCOB3_CCOBn_MASK (0xFFU)
  10286. #define FTFE_FCCOB3_CCOBn_SHIFT (0U)
  10287. #define FTFE_FCCOB3_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB3_CCOBn_SHIFT)) & FTFE_FCCOB3_CCOBn_MASK)
  10288. /*! @} */
  10289. /*! @name FCCOB2 - Flash Common Command Object Registers */
  10290. /*! @{ */
  10291. #define FTFE_FCCOB2_CCOBn_MASK (0xFFU)
  10292. #define FTFE_FCCOB2_CCOBn_SHIFT (0U)
  10293. #define FTFE_FCCOB2_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB2_CCOBn_SHIFT)) & FTFE_FCCOB2_CCOBn_MASK)
  10294. /*! @} */
  10295. /*! @name FCCOB1 - Flash Common Command Object Registers */
  10296. /*! @{ */
  10297. #define FTFE_FCCOB1_CCOBn_MASK (0xFFU)
  10298. #define FTFE_FCCOB1_CCOBn_SHIFT (0U)
  10299. #define FTFE_FCCOB1_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB1_CCOBn_SHIFT)) & FTFE_FCCOB1_CCOBn_MASK)
  10300. /*! @} */
  10301. /*! @name FCCOB0 - Flash Common Command Object Registers */
  10302. /*! @{ */
  10303. #define FTFE_FCCOB0_CCOBn_MASK (0xFFU)
  10304. #define FTFE_FCCOB0_CCOBn_SHIFT (0U)
  10305. #define FTFE_FCCOB0_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB0_CCOBn_SHIFT)) & FTFE_FCCOB0_CCOBn_MASK)
  10306. /*! @} */
  10307. /*! @name FCCOB7 - Flash Common Command Object Registers */
  10308. /*! @{ */
  10309. #define FTFE_FCCOB7_CCOBn_MASK (0xFFU)
  10310. #define FTFE_FCCOB7_CCOBn_SHIFT (0U)
  10311. #define FTFE_FCCOB7_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB7_CCOBn_SHIFT)) & FTFE_FCCOB7_CCOBn_MASK)
  10312. /*! @} */
  10313. /*! @name FCCOB6 - Flash Common Command Object Registers */
  10314. /*! @{ */
  10315. #define FTFE_FCCOB6_CCOBn_MASK (0xFFU)
  10316. #define FTFE_FCCOB6_CCOBn_SHIFT (0U)
  10317. #define FTFE_FCCOB6_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB6_CCOBn_SHIFT)) & FTFE_FCCOB6_CCOBn_MASK)
  10318. /*! @} */
  10319. /*! @name FCCOB5 - Flash Common Command Object Registers */
  10320. /*! @{ */
  10321. #define FTFE_FCCOB5_CCOBn_MASK (0xFFU)
  10322. #define FTFE_FCCOB5_CCOBn_SHIFT (0U)
  10323. #define FTFE_FCCOB5_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB5_CCOBn_SHIFT)) & FTFE_FCCOB5_CCOBn_MASK)
  10324. /*! @} */
  10325. /*! @name FCCOB4 - Flash Common Command Object Registers */
  10326. /*! @{ */
  10327. #define FTFE_FCCOB4_CCOBn_MASK (0xFFU)
  10328. #define FTFE_FCCOB4_CCOBn_SHIFT (0U)
  10329. #define FTFE_FCCOB4_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB4_CCOBn_SHIFT)) & FTFE_FCCOB4_CCOBn_MASK)
  10330. /*! @} */
  10331. /*! @name FCCOBB - Flash Common Command Object Registers */
  10332. /*! @{ */
  10333. #define FTFE_FCCOBB_CCOBn_MASK (0xFFU)
  10334. #define FTFE_FCCOBB_CCOBn_SHIFT (0U)
  10335. #define FTFE_FCCOBB_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBB_CCOBn_SHIFT)) & FTFE_FCCOBB_CCOBn_MASK)
  10336. /*! @} */
  10337. /*! @name FCCOBA - Flash Common Command Object Registers */
  10338. /*! @{ */
  10339. #define FTFE_FCCOBA_CCOBn_MASK (0xFFU)
  10340. #define FTFE_FCCOBA_CCOBn_SHIFT (0U)
  10341. #define FTFE_FCCOBA_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBA_CCOBn_SHIFT)) & FTFE_FCCOBA_CCOBn_MASK)
  10342. /*! @} */
  10343. /*! @name FCCOB9 - Flash Common Command Object Registers */
  10344. /*! @{ */
  10345. #define FTFE_FCCOB9_CCOBn_MASK (0xFFU)
  10346. #define FTFE_FCCOB9_CCOBn_SHIFT (0U)
  10347. #define FTFE_FCCOB9_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB9_CCOBn_SHIFT)) & FTFE_FCCOB9_CCOBn_MASK)
  10348. /*! @} */
  10349. /*! @name FCCOB8 - Flash Common Command Object Registers */
  10350. /*! @{ */
  10351. #define FTFE_FCCOB8_CCOBn_MASK (0xFFU)
  10352. #define FTFE_FCCOB8_CCOBn_SHIFT (0U)
  10353. #define FTFE_FCCOB8_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB8_CCOBn_SHIFT)) & FTFE_FCCOB8_CCOBn_MASK)
  10354. /*! @} */
  10355. /*! @name FPROT3 - Program Flash Protection Registers */
  10356. /*! @{ */
  10357. #define FTFE_FPROT3_PROT_MASK (0xFFU)
  10358. #define FTFE_FPROT3_PROT_SHIFT (0U)
  10359. /*! PROT - Program Flash Region Protect
  10360. * 0b00000000..Program flash region is protected.
  10361. * 0b00000001..Program flash region is not protected
  10362. */
  10363. #define FTFE_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT3_PROT_SHIFT)) & FTFE_FPROT3_PROT_MASK)
  10364. /*! @} */
  10365. /*! @name FPROT2 - Program Flash Protection Registers */
  10366. /*! @{ */
  10367. #define FTFE_FPROT2_PROT_MASK (0xFFU)
  10368. #define FTFE_FPROT2_PROT_SHIFT (0U)
  10369. /*! PROT - Program Flash Region Protect
  10370. * 0b00000000..Program flash region is protected.
  10371. * 0b00000001..Program flash region is not protected
  10372. */
  10373. #define FTFE_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT2_PROT_SHIFT)) & FTFE_FPROT2_PROT_MASK)
  10374. /*! @} */
  10375. /*! @name FPROT1 - Program Flash Protection Registers */
  10376. /*! @{ */
  10377. #define FTFE_FPROT1_PROT_MASK (0xFFU)
  10378. #define FTFE_FPROT1_PROT_SHIFT (0U)
  10379. /*! PROT - Program Flash Region Protect
  10380. * 0b00000000..Program flash region is protected.
  10381. * 0b00000001..Program flash region is not protected
  10382. */
  10383. #define FTFE_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT1_PROT_SHIFT)) & FTFE_FPROT1_PROT_MASK)
  10384. /*! @} */
  10385. /*! @name FPROT0 - Program Flash Protection Registers */
  10386. /*! @{ */
  10387. #define FTFE_FPROT0_PROT_MASK (0xFFU)
  10388. #define FTFE_FPROT0_PROT_SHIFT (0U)
  10389. /*! PROT - Program Flash Region Protect
  10390. * 0b00000000..Program flash region is protected.
  10391. * 0b00000001..Program flash region is not protected
  10392. */
  10393. #define FTFE_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT0_PROT_SHIFT)) & FTFE_FPROT0_PROT_MASK)
  10394. /*! @} */
  10395. /*!
  10396. * @}
  10397. */ /* end of group FTFE_Register_Masks */
  10398. /* FTFE - Peripheral instance base addresses */
  10399. /** Peripheral FTFE base address */
  10400. #define FTFE_BASE (0x40020000u)
  10401. /** Peripheral FTFE base pointer */
  10402. #define FTFE ((FTFE_Type *)FTFE_BASE)
  10403. /** Array initializer of FTFE peripheral base addresses */
  10404. #define FTFE_BASE_ADDRS { FTFE_BASE }
  10405. /** Array initializer of FTFE peripheral base pointers */
  10406. #define FTFE_BASE_PTRS { FTFE }
  10407. /** Interrupt vectors for the FTFE peripheral type */
  10408. #define FTFE_COMMAND_COMPLETE_IRQS { FTFE_IRQn }
  10409. #define FTFE_READ_COLLISION_IRQS { Read_Collision_IRQn }
  10410. /*!
  10411. * @}
  10412. */ /* end of group FTFE_Peripheral_Access_Layer */
  10413. /* ----------------------------------------------------------------------------
  10414. -- FTM Peripheral Access Layer
  10415. ---------------------------------------------------------------------------- */
  10416. /*!
  10417. * @addtogroup FTM_Peripheral_Access_Layer FTM Peripheral Access Layer
  10418. * @{
  10419. */
  10420. /** FTM - Register Layout Typedef */
  10421. typedef struct {
  10422. __IO uint32_t SC; /**< Status And Control, offset: 0x0 */
  10423. __IO uint32_t CNT; /**< Counter, offset: 0x4 */
  10424. __IO uint32_t MOD; /**< Modulo, offset: 0x8 */
  10425. struct { /* offset: 0xC, array step: 0x8 */
  10426. __IO uint32_t CnSC; /**< Channel (n) Status And Control, array offset: 0xC, array step: 0x8 */
  10427. __IO uint32_t CnV; /**< Channel (n) Value, array offset: 0x10, array step: 0x8 */
  10428. } CONTROLS[8];
  10429. __IO uint32_t CNTIN; /**< Counter Initial Value, offset: 0x4C */
  10430. __IO uint32_t STATUS; /**< Capture And Compare Status, offset: 0x50 */
  10431. __IO uint32_t MODE; /**< Features Mode Selection, offset: 0x54 */
  10432. __IO uint32_t SYNC; /**< Synchronization, offset: 0x58 */
  10433. __IO uint32_t OUTINIT; /**< Initial State For Channels Output, offset: 0x5C */
  10434. __IO uint32_t OUTMASK; /**< Output Mask, offset: 0x60 */
  10435. __IO uint32_t COMBINE; /**< Function For Linked Channels, offset: 0x64 */
  10436. __IO uint32_t DEADTIME; /**< Deadtime Insertion Control, offset: 0x68 */
  10437. __IO uint32_t EXTTRIG; /**< FTM External Trigger, offset: 0x6C */
  10438. __IO uint32_t POL; /**< Channels Polarity, offset: 0x70 */
  10439. __IO uint32_t FMS; /**< Fault Mode Status, offset: 0x74 */
  10440. __IO uint32_t FILTER; /**< Input Capture Filter Control, offset: 0x78 */
  10441. __IO uint32_t FLTCTRL; /**< Fault Control, offset: 0x7C */
  10442. __IO uint32_t QDCTRL; /**< Quadrature Decoder Control And Status, offset: 0x80 */
  10443. __IO uint32_t CONF; /**< Configuration, offset: 0x84 */
  10444. __IO uint32_t FLTPOL; /**< FTM Fault Input Polarity, offset: 0x88 */
  10445. __IO uint32_t SYNCONF; /**< Synchronization Configuration, offset: 0x8C */
  10446. __IO uint32_t INVCTRL; /**< FTM Inverting Control, offset: 0x90 */
  10447. __IO uint32_t SWOCTRL; /**< FTM Software Output Control, offset: 0x94 */
  10448. __IO uint32_t PWMLOAD; /**< FTM PWM Load, offset: 0x98 */
  10449. } FTM_Type;
  10450. /* ----------------------------------------------------------------------------
  10451. -- FTM Register Masks
  10452. ---------------------------------------------------------------------------- */
  10453. /*!
  10454. * @addtogroup FTM_Register_Masks FTM Register Masks
  10455. * @{
  10456. */
  10457. /*! @name SC - Status And Control */
  10458. /*! @{ */
  10459. #define FTM_SC_PS_MASK (0x7U)
  10460. #define FTM_SC_PS_SHIFT (0U)
  10461. /*! PS - Prescale Factor Selection
  10462. * 0b000..Divide by 1
  10463. * 0b001..Divide by 2
  10464. * 0b010..Divide by 4
  10465. * 0b011..Divide by 8
  10466. * 0b100..Divide by 16
  10467. * 0b101..Divide by 32
  10468. * 0b110..Divide by 64
  10469. * 0b111..Divide by 128
  10470. */
  10471. #define FTM_SC_PS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_PS_SHIFT)) & FTM_SC_PS_MASK)
  10472. #define FTM_SC_CLKS_MASK (0x18U)
  10473. #define FTM_SC_CLKS_SHIFT (3U)
  10474. /*! CLKS - Clock Source Selection
  10475. * 0b00..No clock selected. This in effect disables the FTM counter.
  10476. * 0b01..System clock
  10477. * 0b10..Fixed frequency clock
  10478. * 0b11..External clock
  10479. */
  10480. #define FTM_SC_CLKS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CLKS_SHIFT)) & FTM_SC_CLKS_MASK)
  10481. #define FTM_SC_CPWMS_MASK (0x20U)
  10482. #define FTM_SC_CPWMS_SHIFT (5U)
  10483. /*! CPWMS - Center-Aligned PWM Select
  10484. * 0b0..FTM counter operates in Up Counting mode.
  10485. * 0b1..FTM counter operates in Up-Down Counting mode.
  10486. */
  10487. #define FTM_SC_CPWMS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CPWMS_SHIFT)) & FTM_SC_CPWMS_MASK)
  10488. #define FTM_SC_TOIE_MASK (0x40U)
  10489. #define FTM_SC_TOIE_SHIFT (6U)
  10490. /*! TOIE - Timer Overflow Interrupt Enable
  10491. * 0b0..Disable TOF interrupts. Use software polling.
  10492. * 0b1..Enable TOF interrupts. An interrupt is generated when TOF equals one.
  10493. */
  10494. #define FTM_SC_TOIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOIE_SHIFT)) & FTM_SC_TOIE_MASK)
  10495. #define FTM_SC_TOF_MASK (0x80U)
  10496. #define FTM_SC_TOF_SHIFT (7U)
  10497. /*! TOF - Timer Overflow Flag
  10498. * 0b0..FTM counter has not overflowed.
  10499. * 0b1..FTM counter has overflowed.
  10500. */
  10501. #define FTM_SC_TOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOF_SHIFT)) & FTM_SC_TOF_MASK)
  10502. /*! @} */
  10503. /*! @name CNT - Counter */
  10504. /*! @{ */
  10505. #define FTM_CNT_COUNT_MASK (0xFFFFU)
  10506. #define FTM_CNT_COUNT_SHIFT (0U)
  10507. #define FTM_CNT_COUNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNT_COUNT_SHIFT)) & FTM_CNT_COUNT_MASK)
  10508. /*! @} */
  10509. /*! @name MOD - Modulo */
  10510. /*! @{ */
  10511. #define FTM_MOD_MOD_MASK (0xFFFFU)
  10512. #define FTM_MOD_MOD_SHIFT (0U)
  10513. #define FTM_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << FTM_MOD_MOD_SHIFT)) & FTM_MOD_MOD_MASK)
  10514. /*! @} */
  10515. /*! @name CnSC - Channel (n) Status And Control */
  10516. /*! @{ */
  10517. #define FTM_CnSC_DMA_MASK (0x1U)
  10518. #define FTM_CnSC_DMA_SHIFT (0U)
  10519. /*! DMA - DMA Enable
  10520. * 0b0..Disable DMA transfers.
  10521. * 0b1..Enable DMA transfers.
  10522. */
  10523. #define FTM_CnSC_DMA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_DMA_SHIFT)) & FTM_CnSC_DMA_MASK)
  10524. #define FTM_CnSC_ICRST_MASK (0x2U)
  10525. #define FTM_CnSC_ICRST_SHIFT (1U)
  10526. /*! ICRST - FTM counter reset by the selected input capture event.
  10527. * 0b0..FTM counter is not reset when the selected channel (n) input event is detected.
  10528. * 0b1..FTM counter is reset when the selected channel (n) input event is detected.
  10529. */
  10530. #define FTM_CnSC_ICRST(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ICRST_SHIFT)) & FTM_CnSC_ICRST_MASK)
  10531. #define FTM_CnSC_ELSA_MASK (0x4U)
  10532. #define FTM_CnSC_ELSA_SHIFT (2U)
  10533. #define FTM_CnSC_ELSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSA_SHIFT)) & FTM_CnSC_ELSA_MASK)
  10534. #define FTM_CnSC_ELSB_MASK (0x8U)
  10535. #define FTM_CnSC_ELSB_SHIFT (3U)
  10536. #define FTM_CnSC_ELSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSB_SHIFT)) & FTM_CnSC_ELSB_MASK)
  10537. #define FTM_CnSC_MSA_MASK (0x10U)
  10538. #define FTM_CnSC_MSA_SHIFT (4U)
  10539. #define FTM_CnSC_MSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSA_SHIFT)) & FTM_CnSC_MSA_MASK)
  10540. #define FTM_CnSC_MSB_MASK (0x20U)
  10541. #define FTM_CnSC_MSB_SHIFT (5U)
  10542. #define FTM_CnSC_MSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSB_SHIFT)) & FTM_CnSC_MSB_MASK)
  10543. #define FTM_CnSC_CHIE_MASK (0x40U)
  10544. #define FTM_CnSC_CHIE_SHIFT (6U)
  10545. /*! CHIE - Channel Interrupt Enable
  10546. * 0b0..Disable channel interrupts. Use software polling.
  10547. * 0b1..Enable channel interrupts.
  10548. */
  10549. #define FTM_CnSC_CHIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHIE_SHIFT)) & FTM_CnSC_CHIE_MASK)
  10550. #define FTM_CnSC_CHF_MASK (0x80U)
  10551. #define FTM_CnSC_CHF_SHIFT (7U)
  10552. /*! CHF - Channel Flag
  10553. * 0b0..No channel event has occurred.
  10554. * 0b1..A channel event has occurred.
  10555. */
  10556. #define FTM_CnSC_CHF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHF_SHIFT)) & FTM_CnSC_CHF_MASK)
  10557. /*! @} */
  10558. /* The count of FTM_CnSC */
  10559. #define FTM_CnSC_COUNT (8U)
  10560. /*! @name CnV - Channel (n) Value */
  10561. /*! @{ */
  10562. #define FTM_CnV_VAL_MASK (0xFFFFU)
  10563. #define FTM_CnV_VAL_SHIFT (0U)
  10564. #define FTM_CnV_VAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnV_VAL_SHIFT)) & FTM_CnV_VAL_MASK)
  10565. /*! @} */
  10566. /* The count of FTM_CnV */
  10567. #define FTM_CnV_COUNT (8U)
  10568. /*! @name CNTIN - Counter Initial Value */
  10569. /*! @{ */
  10570. #define FTM_CNTIN_INIT_MASK (0xFFFFU)
  10571. #define FTM_CNTIN_INIT_SHIFT (0U)
  10572. #define FTM_CNTIN_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNTIN_INIT_SHIFT)) & FTM_CNTIN_INIT_MASK)
  10573. /*! @} */
  10574. /*! @name STATUS - Capture And Compare Status */
  10575. /*! @{ */
  10576. #define FTM_STATUS_CH0F_MASK (0x1U)
  10577. #define FTM_STATUS_CH0F_SHIFT (0U)
  10578. /*! CH0F - Channel 0 Flag
  10579. * 0b0..No channel event has occurred.
  10580. * 0b1..A channel event has occurred.
  10581. */
  10582. #define FTM_STATUS_CH0F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH0F_SHIFT)) & FTM_STATUS_CH0F_MASK)
  10583. #define FTM_STATUS_CH1F_MASK (0x2U)
  10584. #define FTM_STATUS_CH1F_SHIFT (1U)
  10585. /*! CH1F - Channel 1 Flag
  10586. * 0b0..No channel event has occurred.
  10587. * 0b1..A channel event has occurred.
  10588. */
  10589. #define FTM_STATUS_CH1F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH1F_SHIFT)) & FTM_STATUS_CH1F_MASK)
  10590. #define FTM_STATUS_CH2F_MASK (0x4U)
  10591. #define FTM_STATUS_CH2F_SHIFT (2U)
  10592. /*! CH2F - Channel 2 Flag
  10593. * 0b0..No channel event has occurred.
  10594. * 0b1..A channel event has occurred.
  10595. */
  10596. #define FTM_STATUS_CH2F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH2F_SHIFT)) & FTM_STATUS_CH2F_MASK)
  10597. #define FTM_STATUS_CH3F_MASK (0x8U)
  10598. #define FTM_STATUS_CH3F_SHIFT (3U)
  10599. /*! CH3F - Channel 3 Flag
  10600. * 0b0..No channel event has occurred.
  10601. * 0b1..A channel event has occurred.
  10602. */
  10603. #define FTM_STATUS_CH3F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH3F_SHIFT)) & FTM_STATUS_CH3F_MASK)
  10604. #define FTM_STATUS_CH4F_MASK (0x10U)
  10605. #define FTM_STATUS_CH4F_SHIFT (4U)
  10606. /*! CH4F - Channel 4 Flag
  10607. * 0b0..No channel event has occurred.
  10608. * 0b1..A channel event has occurred.
  10609. */
  10610. #define FTM_STATUS_CH4F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH4F_SHIFT)) & FTM_STATUS_CH4F_MASK)
  10611. #define FTM_STATUS_CH5F_MASK (0x20U)
  10612. #define FTM_STATUS_CH5F_SHIFT (5U)
  10613. /*! CH5F - Channel 5 Flag
  10614. * 0b0..No channel event has occurred.
  10615. * 0b1..A channel event has occurred.
  10616. */
  10617. #define FTM_STATUS_CH5F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH5F_SHIFT)) & FTM_STATUS_CH5F_MASK)
  10618. #define FTM_STATUS_CH6F_MASK (0x40U)
  10619. #define FTM_STATUS_CH6F_SHIFT (6U)
  10620. /*! CH6F - Channel 6 Flag
  10621. * 0b0..No channel event has occurred.
  10622. * 0b1..A channel event has occurred.
  10623. */
  10624. #define FTM_STATUS_CH6F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH6F_SHIFT)) & FTM_STATUS_CH6F_MASK)
  10625. #define FTM_STATUS_CH7F_MASK (0x80U)
  10626. #define FTM_STATUS_CH7F_SHIFT (7U)
  10627. /*! CH7F - Channel 7 Flag
  10628. * 0b0..No channel event has occurred.
  10629. * 0b1..A channel event has occurred.
  10630. */
  10631. #define FTM_STATUS_CH7F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH7F_SHIFT)) & FTM_STATUS_CH7F_MASK)
  10632. /*! @} */
  10633. /*! @name MODE - Features Mode Selection */
  10634. /*! @{ */
  10635. #define FTM_MODE_FTMEN_MASK (0x1U)
  10636. #define FTM_MODE_FTMEN_SHIFT (0U)
  10637. /*! FTMEN - FTM Enable
  10638. * 0b0..TPM compatibility. Free running counter and synchronization compatible with TPM.
  10639. * 0b1..Free running counter and synchronization are different from TPM behavior.
  10640. */
  10641. #define FTM_MODE_FTMEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FTMEN_SHIFT)) & FTM_MODE_FTMEN_MASK)
  10642. #define FTM_MODE_INIT_MASK (0x2U)
  10643. #define FTM_MODE_INIT_SHIFT (1U)
  10644. #define FTM_MODE_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_INIT_SHIFT)) & FTM_MODE_INIT_MASK)
  10645. #define FTM_MODE_WPDIS_MASK (0x4U)
  10646. #define FTM_MODE_WPDIS_SHIFT (2U)
  10647. /*! WPDIS - Write Protection Disable
  10648. * 0b0..Write protection is enabled.
  10649. * 0b1..Write protection is disabled.
  10650. */
  10651. #define FTM_MODE_WPDIS(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_WPDIS_SHIFT)) & FTM_MODE_WPDIS_MASK)
  10652. #define FTM_MODE_PWMSYNC_MASK (0x8U)
  10653. #define FTM_MODE_PWMSYNC_SHIFT (3U)
  10654. /*! PWMSYNC - PWM Synchronization Mode
  10655. * 0b0..No restrictions. Software and hardware triggers can be used by MOD, CnV, OUTMASK, and FTM counter synchronization.
  10656. * 0b1..Software trigger can only be used by MOD and CnV synchronization, and hardware triggers can only be used by OUTMASK and FTM counter synchronization.
  10657. */
  10658. #define FTM_MODE_PWMSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_PWMSYNC_SHIFT)) & FTM_MODE_PWMSYNC_MASK)
  10659. #define FTM_MODE_CAPTEST_MASK (0x10U)
  10660. #define FTM_MODE_CAPTEST_SHIFT (4U)
  10661. /*! CAPTEST - Capture Test Mode Enable
  10662. * 0b0..Capture test mode is disabled.
  10663. * 0b1..Capture test mode is enabled.
  10664. */
  10665. #define FTM_MODE_CAPTEST(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_CAPTEST_SHIFT)) & FTM_MODE_CAPTEST_MASK)
  10666. #define FTM_MODE_FAULTM_MASK (0x60U)
  10667. #define FTM_MODE_FAULTM_SHIFT (5U)
  10668. /*! FAULTM - Fault Control Mode
  10669. * 0b00..Fault control is disabled for all channels.
  10670. * 0b01..Fault control is enabled for even channels only (channels 0, 2, 4, and 6), and the selected mode is the manual fault clearing.
  10671. * 0b10..Fault control is enabled for all channels, and the selected mode is the manual fault clearing.
  10672. * 0b11..Fault control is enabled for all channels, and the selected mode is the automatic fault clearing.
  10673. */
  10674. #define FTM_MODE_FAULTM(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTM_SHIFT)) & FTM_MODE_FAULTM_MASK)
  10675. #define FTM_MODE_FAULTIE_MASK (0x80U)
  10676. #define FTM_MODE_FAULTIE_SHIFT (7U)
  10677. /*! FAULTIE - Fault Interrupt Enable
  10678. * 0b0..Fault control interrupt is disabled.
  10679. * 0b1..Fault control interrupt is enabled.
  10680. */
  10681. #define FTM_MODE_FAULTIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTIE_SHIFT)) & FTM_MODE_FAULTIE_MASK)
  10682. /*! @} */
  10683. /*! @name SYNC - Synchronization */
  10684. /*! @{ */
  10685. #define FTM_SYNC_CNTMIN_MASK (0x1U)
  10686. #define FTM_SYNC_CNTMIN_SHIFT (0U)
  10687. /*! CNTMIN - Minimum Loading Point Enable
  10688. * 0b0..The minimum loading point is disabled.
  10689. * 0b1..The minimum loading point is enabled.
  10690. */
  10691. #define FTM_SYNC_CNTMIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMIN_SHIFT)) & FTM_SYNC_CNTMIN_MASK)
  10692. #define FTM_SYNC_CNTMAX_MASK (0x2U)
  10693. #define FTM_SYNC_CNTMAX_SHIFT (1U)
  10694. /*! CNTMAX - Maximum Loading Point Enable
  10695. * 0b0..The maximum loading point is disabled.
  10696. * 0b1..The maximum loading point is enabled.
  10697. */
  10698. #define FTM_SYNC_CNTMAX(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMAX_SHIFT)) & FTM_SYNC_CNTMAX_MASK)
  10699. #define FTM_SYNC_REINIT_MASK (0x4U)
  10700. #define FTM_SYNC_REINIT_SHIFT (2U)
  10701. /*! REINIT - FTM Counter Reinitialization By Synchronization (FTM counter synchronization)
  10702. * 0b0..FTM counter continues to count normally.
  10703. * 0b1..FTM counter is updated with its initial value when the selected trigger is detected.
  10704. */
  10705. #define FTM_SYNC_REINIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_REINIT_SHIFT)) & FTM_SYNC_REINIT_MASK)
  10706. #define FTM_SYNC_SYNCHOM_MASK (0x8U)
  10707. #define FTM_SYNC_SYNCHOM_SHIFT (3U)
  10708. /*! SYNCHOM - Output Mask Synchronization
  10709. * 0b0..OUTMASK register is updated with the value of its buffer in all rising edges of the system clock.
  10710. * 0b1..OUTMASK register is updated with the value of its buffer only by the PWM synchronization.
  10711. */
  10712. #define FTM_SYNC_SYNCHOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SYNCHOM_SHIFT)) & FTM_SYNC_SYNCHOM_MASK)
  10713. #define FTM_SYNC_TRIG0_MASK (0x10U)
  10714. #define FTM_SYNC_TRIG0_SHIFT (4U)
  10715. /*! TRIG0 - PWM Synchronization Hardware Trigger 0
  10716. * 0b0..Trigger is disabled.
  10717. * 0b1..Trigger is enabled.
  10718. */
  10719. #define FTM_SYNC_TRIG0(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG0_SHIFT)) & FTM_SYNC_TRIG0_MASK)
  10720. #define FTM_SYNC_TRIG1_MASK (0x20U)
  10721. #define FTM_SYNC_TRIG1_SHIFT (5U)
  10722. /*! TRIG1 - PWM Synchronization Hardware Trigger 1
  10723. * 0b0..Trigger is disabled.
  10724. * 0b1..Trigger is enabled.
  10725. */
  10726. #define FTM_SYNC_TRIG1(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG1_SHIFT)) & FTM_SYNC_TRIG1_MASK)
  10727. #define FTM_SYNC_TRIG2_MASK (0x40U)
  10728. #define FTM_SYNC_TRIG2_SHIFT (6U)
  10729. /*! TRIG2 - PWM Synchronization Hardware Trigger 2
  10730. * 0b0..Trigger is disabled.
  10731. * 0b1..Trigger is enabled.
  10732. */
  10733. #define FTM_SYNC_TRIG2(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG2_SHIFT)) & FTM_SYNC_TRIG2_MASK)
  10734. #define FTM_SYNC_SWSYNC_MASK (0x80U)
  10735. #define FTM_SYNC_SWSYNC_SHIFT (7U)
  10736. /*! SWSYNC - PWM Synchronization Software Trigger
  10737. * 0b0..Software trigger is not selected.
  10738. * 0b1..Software trigger is selected.
  10739. */
  10740. #define FTM_SYNC_SWSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SWSYNC_SHIFT)) & FTM_SYNC_SWSYNC_MASK)
  10741. /*! @} */
  10742. /*! @name OUTINIT - Initial State For Channels Output */
  10743. /*! @{ */
  10744. #define FTM_OUTINIT_CH0OI_MASK (0x1U)
  10745. #define FTM_OUTINIT_CH0OI_SHIFT (0U)
  10746. /*! CH0OI - Channel 0 Output Initialization Value
  10747. * 0b0..The initialization value is 0.
  10748. * 0b1..The initialization value is 1.
  10749. */
  10750. #define FTM_OUTINIT_CH0OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH0OI_SHIFT)) & FTM_OUTINIT_CH0OI_MASK)
  10751. #define FTM_OUTINIT_CH1OI_MASK (0x2U)
  10752. #define FTM_OUTINIT_CH1OI_SHIFT (1U)
  10753. /*! CH1OI - Channel 1 Output Initialization Value
  10754. * 0b0..The initialization value is 0.
  10755. * 0b1..The initialization value is 1.
  10756. */
  10757. #define FTM_OUTINIT_CH1OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH1OI_SHIFT)) & FTM_OUTINIT_CH1OI_MASK)
  10758. #define FTM_OUTINIT_CH2OI_MASK (0x4U)
  10759. #define FTM_OUTINIT_CH2OI_SHIFT (2U)
  10760. /*! CH2OI - Channel 2 Output Initialization Value
  10761. * 0b0..The initialization value is 0.
  10762. * 0b1..The initialization value is 1.
  10763. */
  10764. #define FTM_OUTINIT_CH2OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH2OI_SHIFT)) & FTM_OUTINIT_CH2OI_MASK)
  10765. #define FTM_OUTINIT_CH3OI_MASK (0x8U)
  10766. #define FTM_OUTINIT_CH3OI_SHIFT (3U)
  10767. /*! CH3OI - Channel 3 Output Initialization Value
  10768. * 0b0..The initialization value is 0.
  10769. * 0b1..The initialization value is 1.
  10770. */
  10771. #define FTM_OUTINIT_CH3OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH3OI_SHIFT)) & FTM_OUTINIT_CH3OI_MASK)
  10772. #define FTM_OUTINIT_CH4OI_MASK (0x10U)
  10773. #define FTM_OUTINIT_CH4OI_SHIFT (4U)
  10774. /*! CH4OI - Channel 4 Output Initialization Value
  10775. * 0b0..The initialization value is 0.
  10776. * 0b1..The initialization value is 1.
  10777. */
  10778. #define FTM_OUTINIT_CH4OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH4OI_SHIFT)) & FTM_OUTINIT_CH4OI_MASK)
  10779. #define FTM_OUTINIT_CH5OI_MASK (0x20U)
  10780. #define FTM_OUTINIT_CH5OI_SHIFT (5U)
  10781. /*! CH5OI - Channel 5 Output Initialization Value
  10782. * 0b0..The initialization value is 0.
  10783. * 0b1..The initialization value is 1.
  10784. */
  10785. #define FTM_OUTINIT_CH5OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH5OI_SHIFT)) & FTM_OUTINIT_CH5OI_MASK)
  10786. #define FTM_OUTINIT_CH6OI_MASK (0x40U)
  10787. #define FTM_OUTINIT_CH6OI_SHIFT (6U)
  10788. /*! CH6OI - Channel 6 Output Initialization Value
  10789. * 0b0..The initialization value is 0.
  10790. * 0b1..The initialization value is 1.
  10791. */
  10792. #define FTM_OUTINIT_CH6OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH6OI_SHIFT)) & FTM_OUTINIT_CH6OI_MASK)
  10793. #define FTM_OUTINIT_CH7OI_MASK (0x80U)
  10794. #define FTM_OUTINIT_CH7OI_SHIFT (7U)
  10795. /*! CH7OI - Channel 7 Output Initialization Value
  10796. * 0b0..The initialization value is 0.
  10797. * 0b1..The initialization value is 1.
  10798. */
  10799. #define FTM_OUTINIT_CH7OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH7OI_SHIFT)) & FTM_OUTINIT_CH7OI_MASK)
  10800. /*! @} */
  10801. /*! @name OUTMASK - Output Mask */
  10802. /*! @{ */
  10803. #define FTM_OUTMASK_CH0OM_MASK (0x1U)
  10804. #define FTM_OUTMASK_CH0OM_SHIFT (0U)
  10805. /*! CH0OM - Channel 0 Output Mask
  10806. * 0b0..Channel output is not masked. It continues to operate normally.
  10807. * 0b1..Channel output is masked. It is forced to its inactive state.
  10808. */
  10809. #define FTM_OUTMASK_CH0OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH0OM_SHIFT)) & FTM_OUTMASK_CH0OM_MASK)
  10810. #define FTM_OUTMASK_CH1OM_MASK (0x2U)
  10811. #define FTM_OUTMASK_CH1OM_SHIFT (1U)
  10812. /*! CH1OM - Channel 1 Output Mask
  10813. * 0b0..Channel output is not masked. It continues to operate normally.
  10814. * 0b1..Channel output is masked. It is forced to its inactive state.
  10815. */
  10816. #define FTM_OUTMASK_CH1OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH1OM_SHIFT)) & FTM_OUTMASK_CH1OM_MASK)
  10817. #define FTM_OUTMASK_CH2OM_MASK (0x4U)
  10818. #define FTM_OUTMASK_CH2OM_SHIFT (2U)
  10819. /*! CH2OM - Channel 2 Output Mask
  10820. * 0b0..Channel output is not masked. It continues to operate normally.
  10821. * 0b1..Channel output is masked. It is forced to its inactive state.
  10822. */
  10823. #define FTM_OUTMASK_CH2OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH2OM_SHIFT)) & FTM_OUTMASK_CH2OM_MASK)
  10824. #define FTM_OUTMASK_CH3OM_MASK (0x8U)
  10825. #define FTM_OUTMASK_CH3OM_SHIFT (3U)
  10826. /*! CH3OM - Channel 3 Output Mask
  10827. * 0b0..Channel output is not masked. It continues to operate normally.
  10828. * 0b1..Channel output is masked. It is forced to its inactive state.
  10829. */
  10830. #define FTM_OUTMASK_CH3OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH3OM_SHIFT)) & FTM_OUTMASK_CH3OM_MASK)
  10831. #define FTM_OUTMASK_CH4OM_MASK (0x10U)
  10832. #define FTM_OUTMASK_CH4OM_SHIFT (4U)
  10833. /*! CH4OM - Channel 4 Output Mask
  10834. * 0b0..Channel output is not masked. It continues to operate normally.
  10835. * 0b1..Channel output is masked. It is forced to its inactive state.
  10836. */
  10837. #define FTM_OUTMASK_CH4OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH4OM_SHIFT)) & FTM_OUTMASK_CH4OM_MASK)
  10838. #define FTM_OUTMASK_CH5OM_MASK (0x20U)
  10839. #define FTM_OUTMASK_CH5OM_SHIFT (5U)
  10840. /*! CH5OM - Channel 5 Output Mask
  10841. * 0b0..Channel output is not masked. It continues to operate normally.
  10842. * 0b1..Channel output is masked. It is forced to its inactive state.
  10843. */
  10844. #define FTM_OUTMASK_CH5OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH5OM_SHIFT)) & FTM_OUTMASK_CH5OM_MASK)
  10845. #define FTM_OUTMASK_CH6OM_MASK (0x40U)
  10846. #define FTM_OUTMASK_CH6OM_SHIFT (6U)
  10847. /*! CH6OM - Channel 6 Output Mask
  10848. * 0b0..Channel output is not masked. It continues to operate normally.
  10849. * 0b1..Channel output is masked. It is forced to its inactive state.
  10850. */
  10851. #define FTM_OUTMASK_CH6OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH6OM_SHIFT)) & FTM_OUTMASK_CH6OM_MASK)
  10852. #define FTM_OUTMASK_CH7OM_MASK (0x80U)
  10853. #define FTM_OUTMASK_CH7OM_SHIFT (7U)
  10854. /*! CH7OM - Channel 7 Output Mask
  10855. * 0b0..Channel output is not masked. It continues to operate normally.
  10856. * 0b1..Channel output is masked. It is forced to its inactive state.
  10857. */
  10858. #define FTM_OUTMASK_CH7OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH7OM_SHIFT)) & FTM_OUTMASK_CH7OM_MASK)
  10859. /*! @} */
  10860. /*! @name COMBINE - Function For Linked Channels */
  10861. /*! @{ */
  10862. #define FTM_COMBINE_COMBINE0_MASK (0x1U)
  10863. #define FTM_COMBINE_COMBINE0_SHIFT (0U)
  10864. /*! COMBINE0 - Combine Channels For n = 0
  10865. * 0b0..Channels (n) and (n+1) are independent.
  10866. * 0b1..Channels (n) and (n+1) are combined.
  10867. */
  10868. #define FTM_COMBINE_COMBINE0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE0_SHIFT)) & FTM_COMBINE_COMBINE0_MASK)
  10869. #define FTM_COMBINE_COMP0_MASK (0x2U)
  10870. #define FTM_COMBINE_COMP0_SHIFT (1U)
  10871. /*! COMP0 - Complement Of Channel (n) For n = 0
  10872. * 0b0..The channel (n+1) output is the same as the channel (n) output.
  10873. * 0b1..The channel (n+1) output is the complement of the channel (n) output.
  10874. */
  10875. #define FTM_COMBINE_COMP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP0_SHIFT)) & FTM_COMBINE_COMP0_MASK)
  10876. #define FTM_COMBINE_DECAPEN0_MASK (0x4U)
  10877. #define FTM_COMBINE_DECAPEN0_SHIFT (2U)
  10878. /*! DECAPEN0 - Dual Edge Capture Mode Enable For n = 0
  10879. * 0b0..The Dual Edge Capture mode in this pair of channels is disabled.
  10880. * 0b1..The Dual Edge Capture mode in this pair of channels is enabled.
  10881. */
  10882. #define FTM_COMBINE_DECAPEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN0_SHIFT)) & FTM_COMBINE_DECAPEN0_MASK)
  10883. #define FTM_COMBINE_DECAP0_MASK (0x8U)
  10884. #define FTM_COMBINE_DECAP0_SHIFT (3U)
  10885. /*! DECAP0 - Dual Edge Capture Mode Captures For n = 0
  10886. * 0b0..The dual edge captures are inactive.
  10887. * 0b1..The dual edge captures are active.
  10888. */
  10889. #define FTM_COMBINE_DECAP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP0_SHIFT)) & FTM_COMBINE_DECAP0_MASK)
  10890. #define FTM_COMBINE_DTEN0_MASK (0x10U)
  10891. #define FTM_COMBINE_DTEN0_SHIFT (4U)
  10892. /*! DTEN0 - Deadtime Enable For n = 0
  10893. * 0b0..The deadtime insertion in this pair of channels is disabled.
  10894. * 0b1..The deadtime insertion in this pair of channels is enabled.
  10895. */
  10896. #define FTM_COMBINE_DTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN0_SHIFT)) & FTM_COMBINE_DTEN0_MASK)
  10897. #define FTM_COMBINE_SYNCEN0_MASK (0x20U)
  10898. #define FTM_COMBINE_SYNCEN0_SHIFT (5U)
  10899. /*! SYNCEN0 - Synchronization Enable For n = 0
  10900. * 0b0..The PWM synchronization in this pair of channels is disabled.
  10901. * 0b1..The PWM synchronization in this pair of channels is enabled.
  10902. */
  10903. #define FTM_COMBINE_SYNCEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN0_SHIFT)) & FTM_COMBINE_SYNCEN0_MASK)
  10904. #define FTM_COMBINE_FAULTEN0_MASK (0x40U)
  10905. #define FTM_COMBINE_FAULTEN0_SHIFT (6U)
  10906. /*! FAULTEN0 - Fault Control Enable For n = 0
  10907. * 0b0..The fault control in this pair of channels is disabled.
  10908. * 0b1..The fault control in this pair of channels is enabled.
  10909. */
  10910. #define FTM_COMBINE_FAULTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN0_SHIFT)) & FTM_COMBINE_FAULTEN0_MASK)
  10911. #define FTM_COMBINE_COMBINE1_MASK (0x100U)
  10912. #define FTM_COMBINE_COMBINE1_SHIFT (8U)
  10913. /*! COMBINE1 - Combine Channels For n = 2
  10914. * 0b0..Channels (n) and (n+1) are independent.
  10915. * 0b1..Channels (n) and (n+1) are combined.
  10916. */
  10917. #define FTM_COMBINE_COMBINE1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE1_SHIFT)) & FTM_COMBINE_COMBINE1_MASK)
  10918. #define FTM_COMBINE_COMP1_MASK (0x200U)
  10919. #define FTM_COMBINE_COMP1_SHIFT (9U)
  10920. /*! COMP1 - Complement Of Channel (n) For n = 2
  10921. * 0b0..The channel (n+1) output is the same as the channel (n) output.
  10922. * 0b1..The channel (n+1) output is the complement of the channel (n) output.
  10923. */
  10924. #define FTM_COMBINE_COMP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP1_SHIFT)) & FTM_COMBINE_COMP1_MASK)
  10925. #define FTM_COMBINE_DECAPEN1_MASK (0x400U)
  10926. #define FTM_COMBINE_DECAPEN1_SHIFT (10U)
  10927. /*! DECAPEN1 - Dual Edge Capture Mode Enable For n = 2
  10928. * 0b0..The Dual Edge Capture mode in this pair of channels is disabled.
  10929. * 0b1..The Dual Edge Capture mode in this pair of channels is enabled.
  10930. */
  10931. #define FTM_COMBINE_DECAPEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN1_SHIFT)) & FTM_COMBINE_DECAPEN1_MASK)
  10932. #define FTM_COMBINE_DECAP1_MASK (0x800U)
  10933. #define FTM_COMBINE_DECAP1_SHIFT (11U)
  10934. /*! DECAP1 - Dual Edge Capture Mode Captures For n = 2
  10935. * 0b0..The dual edge captures are inactive.
  10936. * 0b1..The dual edge captures are active.
  10937. */
  10938. #define FTM_COMBINE_DECAP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP1_SHIFT)) & FTM_COMBINE_DECAP1_MASK)
  10939. #define FTM_COMBINE_DTEN1_MASK (0x1000U)
  10940. #define FTM_COMBINE_DTEN1_SHIFT (12U)
  10941. /*! DTEN1 - Deadtime Enable For n = 2
  10942. * 0b0..The deadtime insertion in this pair of channels is disabled.
  10943. * 0b1..The deadtime insertion in this pair of channels is enabled.
  10944. */
  10945. #define FTM_COMBINE_DTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN1_SHIFT)) & FTM_COMBINE_DTEN1_MASK)
  10946. #define FTM_COMBINE_SYNCEN1_MASK (0x2000U)
  10947. #define FTM_COMBINE_SYNCEN1_SHIFT (13U)
  10948. /*! SYNCEN1 - Synchronization Enable For n = 2
  10949. * 0b0..The PWM synchronization in this pair of channels is disabled.
  10950. * 0b1..The PWM synchronization in this pair of channels is enabled.
  10951. */
  10952. #define FTM_COMBINE_SYNCEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN1_SHIFT)) & FTM_COMBINE_SYNCEN1_MASK)
  10953. #define FTM_COMBINE_FAULTEN1_MASK (0x4000U)
  10954. #define FTM_COMBINE_FAULTEN1_SHIFT (14U)
  10955. /*! FAULTEN1 - Fault Control Enable For n = 2
  10956. * 0b0..The fault control in this pair of channels is disabled.
  10957. * 0b1..The fault control in this pair of channels is enabled.
  10958. */
  10959. #define FTM_COMBINE_FAULTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN1_SHIFT)) & FTM_COMBINE_FAULTEN1_MASK)
  10960. #define FTM_COMBINE_COMBINE2_MASK (0x10000U)
  10961. #define FTM_COMBINE_COMBINE2_SHIFT (16U)
  10962. /*! COMBINE2 - Combine Channels For n = 4
  10963. * 0b0..Channels (n) and (n+1) are independent.
  10964. * 0b1..Channels (n) and (n+1) are combined.
  10965. */
  10966. #define FTM_COMBINE_COMBINE2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE2_SHIFT)) & FTM_COMBINE_COMBINE2_MASK)
  10967. #define FTM_COMBINE_COMP2_MASK (0x20000U)
  10968. #define FTM_COMBINE_COMP2_SHIFT (17U)
  10969. /*! COMP2 - Complement Of Channel (n) For n = 4
  10970. * 0b0..The channel (n+1) output is the same as the channel (n) output.
  10971. * 0b1..The channel (n+1) output is the complement of the channel (n) output.
  10972. */
  10973. #define FTM_COMBINE_COMP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP2_SHIFT)) & FTM_COMBINE_COMP2_MASK)
  10974. #define FTM_COMBINE_DECAPEN2_MASK (0x40000U)
  10975. #define FTM_COMBINE_DECAPEN2_SHIFT (18U)
  10976. /*! DECAPEN2 - Dual Edge Capture Mode Enable For n = 4
  10977. * 0b0..The Dual Edge Capture mode in this pair of channels is disabled.
  10978. * 0b1..The Dual Edge Capture mode in this pair of channels is enabled.
  10979. */
  10980. #define FTM_COMBINE_DECAPEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN2_SHIFT)) & FTM_COMBINE_DECAPEN2_MASK)
  10981. #define FTM_COMBINE_DECAP2_MASK (0x80000U)
  10982. #define FTM_COMBINE_DECAP2_SHIFT (19U)
  10983. /*! DECAP2 - Dual Edge Capture Mode Captures For n = 4
  10984. * 0b0..The dual edge captures are inactive.
  10985. * 0b1..The dual edge captures are active.
  10986. */
  10987. #define FTM_COMBINE_DECAP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP2_SHIFT)) & FTM_COMBINE_DECAP2_MASK)
  10988. #define FTM_COMBINE_DTEN2_MASK (0x100000U)
  10989. #define FTM_COMBINE_DTEN2_SHIFT (20U)
  10990. /*! DTEN2 - Deadtime Enable For n = 4
  10991. * 0b0..The deadtime insertion in this pair of channels is disabled.
  10992. * 0b1..The deadtime insertion in this pair of channels is enabled.
  10993. */
  10994. #define FTM_COMBINE_DTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN2_SHIFT)) & FTM_COMBINE_DTEN2_MASK)
  10995. #define FTM_COMBINE_SYNCEN2_MASK (0x200000U)
  10996. #define FTM_COMBINE_SYNCEN2_SHIFT (21U)
  10997. /*! SYNCEN2 - Synchronization Enable For n = 4
  10998. * 0b0..The PWM synchronization in this pair of channels is disabled.
  10999. * 0b1..The PWM synchronization in this pair of channels is enabled.
  11000. */
  11001. #define FTM_COMBINE_SYNCEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN2_SHIFT)) & FTM_COMBINE_SYNCEN2_MASK)
  11002. #define FTM_COMBINE_FAULTEN2_MASK (0x400000U)
  11003. #define FTM_COMBINE_FAULTEN2_SHIFT (22U)
  11004. /*! FAULTEN2 - Fault Control Enable For n = 4
  11005. * 0b0..The fault control in this pair of channels is disabled.
  11006. * 0b1..The fault control in this pair of channels is enabled.
  11007. */
  11008. #define FTM_COMBINE_FAULTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN2_SHIFT)) & FTM_COMBINE_FAULTEN2_MASK)
  11009. #define FTM_COMBINE_COMBINE3_MASK (0x1000000U)
  11010. #define FTM_COMBINE_COMBINE3_SHIFT (24U)
  11011. /*! COMBINE3 - Combine Channels For n = 6
  11012. * 0b0..Channels (n) and (n+1) are independent.
  11013. * 0b1..Channels (n) and (n+1) are combined.
  11014. */
  11015. #define FTM_COMBINE_COMBINE3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE3_SHIFT)) & FTM_COMBINE_COMBINE3_MASK)
  11016. #define FTM_COMBINE_COMP3_MASK (0x2000000U)
  11017. #define FTM_COMBINE_COMP3_SHIFT (25U)
  11018. /*! COMP3 - Complement Of Channel (n) for n = 6
  11019. * 0b0..The channel (n+1) output is the same as the channel (n) output.
  11020. * 0b1..The channel (n+1) output is the complement of the channel (n) output.
  11021. */
  11022. #define FTM_COMBINE_COMP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP3_SHIFT)) & FTM_COMBINE_COMP3_MASK)
  11023. #define FTM_COMBINE_DECAPEN3_MASK (0x4000000U)
  11024. #define FTM_COMBINE_DECAPEN3_SHIFT (26U)
  11025. /*! DECAPEN3 - Dual Edge Capture Mode Enable For n = 6
  11026. * 0b0..The Dual Edge Capture mode in this pair of channels is disabled.
  11027. * 0b1..The Dual Edge Capture mode in this pair of channels is enabled.
  11028. */
  11029. #define FTM_COMBINE_DECAPEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN3_SHIFT)) & FTM_COMBINE_DECAPEN3_MASK)
  11030. #define FTM_COMBINE_DECAP3_MASK (0x8000000U)
  11031. #define FTM_COMBINE_DECAP3_SHIFT (27U)
  11032. /*! DECAP3 - Dual Edge Capture Mode Captures For n = 6
  11033. * 0b0..The dual edge captures are inactive.
  11034. * 0b1..The dual edge captures are active.
  11035. */
  11036. #define FTM_COMBINE_DECAP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP3_SHIFT)) & FTM_COMBINE_DECAP3_MASK)
  11037. #define FTM_COMBINE_DTEN3_MASK (0x10000000U)
  11038. #define FTM_COMBINE_DTEN3_SHIFT (28U)
  11039. /*! DTEN3 - Deadtime Enable For n = 6
  11040. * 0b0..The deadtime insertion in this pair of channels is disabled.
  11041. * 0b1..The deadtime insertion in this pair of channels is enabled.
  11042. */
  11043. #define FTM_COMBINE_DTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN3_SHIFT)) & FTM_COMBINE_DTEN3_MASK)
  11044. #define FTM_COMBINE_SYNCEN3_MASK (0x20000000U)
  11045. #define FTM_COMBINE_SYNCEN3_SHIFT (29U)
  11046. /*! SYNCEN3 - Synchronization Enable For n = 6
  11047. * 0b0..The PWM synchronization in this pair of channels is disabled.
  11048. * 0b1..The PWM synchronization in this pair of channels is enabled.
  11049. */
  11050. #define FTM_COMBINE_SYNCEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN3_SHIFT)) & FTM_COMBINE_SYNCEN3_MASK)
  11051. #define FTM_COMBINE_FAULTEN3_MASK (0x40000000U)
  11052. #define FTM_COMBINE_FAULTEN3_SHIFT (30U)
  11053. /*! FAULTEN3 - Fault Control Enable For n = 6
  11054. * 0b0..The fault control in this pair of channels is disabled.
  11055. * 0b1..The fault control in this pair of channels is enabled.
  11056. */
  11057. #define FTM_COMBINE_FAULTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN3_SHIFT)) & FTM_COMBINE_FAULTEN3_MASK)
  11058. /*! @} */
  11059. /*! @name DEADTIME - Deadtime Insertion Control */
  11060. /*! @{ */
  11061. #define FTM_DEADTIME_DTVAL_MASK (0x3FU)
  11062. #define FTM_DEADTIME_DTVAL_SHIFT (0U)
  11063. #define FTM_DEADTIME_DTVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTVAL_SHIFT)) & FTM_DEADTIME_DTVAL_MASK)
  11064. #define FTM_DEADTIME_DTPS_MASK (0xC0U)
  11065. #define FTM_DEADTIME_DTPS_SHIFT (6U)
  11066. /*! DTPS - Deadtime Prescaler Value
  11067. * 0b0x..Divide the system clock by 1.
  11068. * 0b10..Divide the system clock by 4.
  11069. * 0b11..Divide the system clock by 16.
  11070. */
  11071. #define FTM_DEADTIME_DTPS(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTPS_SHIFT)) & FTM_DEADTIME_DTPS_MASK)
  11072. /*! @} */
  11073. /*! @name EXTTRIG - FTM External Trigger */
  11074. /*! @{ */
  11075. #define FTM_EXTTRIG_CH2TRIG_MASK (0x1U)
  11076. #define FTM_EXTTRIG_CH2TRIG_SHIFT (0U)
  11077. /*! CH2TRIG - Channel 2 Trigger Enable
  11078. * 0b0..The generation of the channel trigger is disabled.
  11079. * 0b1..The generation of the channel trigger is enabled.
  11080. */
  11081. #define FTM_EXTTRIG_CH2TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH2TRIG_SHIFT)) & FTM_EXTTRIG_CH2TRIG_MASK)
  11082. #define FTM_EXTTRIG_CH3TRIG_MASK (0x2U)
  11083. #define FTM_EXTTRIG_CH3TRIG_SHIFT (1U)
  11084. /*! CH3TRIG - Channel 3 Trigger Enable
  11085. * 0b0..The generation of the channel trigger is disabled.
  11086. * 0b1..The generation of the channel trigger is enabled.
  11087. */
  11088. #define FTM_EXTTRIG_CH3TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH3TRIG_SHIFT)) & FTM_EXTTRIG_CH3TRIG_MASK)
  11089. #define FTM_EXTTRIG_CH4TRIG_MASK (0x4U)
  11090. #define FTM_EXTTRIG_CH4TRIG_SHIFT (2U)
  11091. /*! CH4TRIG - Channel 4 Trigger Enable
  11092. * 0b0..The generation of the channel trigger is disabled.
  11093. * 0b1..The generation of the channel trigger is enabled.
  11094. */
  11095. #define FTM_EXTTRIG_CH4TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH4TRIG_SHIFT)) & FTM_EXTTRIG_CH4TRIG_MASK)
  11096. #define FTM_EXTTRIG_CH5TRIG_MASK (0x8U)
  11097. #define FTM_EXTTRIG_CH5TRIG_SHIFT (3U)
  11098. /*! CH5TRIG - Channel 5 Trigger Enable
  11099. * 0b0..The generation of the channel trigger is disabled.
  11100. * 0b1..The generation of the channel trigger is enabled.
  11101. */
  11102. #define FTM_EXTTRIG_CH5TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH5TRIG_SHIFT)) & FTM_EXTTRIG_CH5TRIG_MASK)
  11103. #define FTM_EXTTRIG_CH0TRIG_MASK (0x10U)
  11104. #define FTM_EXTTRIG_CH0TRIG_SHIFT (4U)
  11105. /*! CH0TRIG - Channel 0 Trigger Enable
  11106. * 0b0..The generation of the channel trigger is disabled.
  11107. * 0b1..The generation of the channel trigger is enabled.
  11108. */
  11109. #define FTM_EXTTRIG_CH0TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH0TRIG_SHIFT)) & FTM_EXTTRIG_CH0TRIG_MASK)
  11110. #define FTM_EXTTRIG_CH1TRIG_MASK (0x20U)
  11111. #define FTM_EXTTRIG_CH1TRIG_SHIFT (5U)
  11112. /*! CH1TRIG - Channel 1 Trigger Enable
  11113. * 0b0..The generation of the channel trigger is disabled.
  11114. * 0b1..The generation of the channel trigger is enabled.
  11115. */
  11116. #define FTM_EXTTRIG_CH1TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH1TRIG_SHIFT)) & FTM_EXTTRIG_CH1TRIG_MASK)
  11117. #define FTM_EXTTRIG_INITTRIGEN_MASK (0x40U)
  11118. #define FTM_EXTTRIG_INITTRIGEN_SHIFT (6U)
  11119. /*! INITTRIGEN - Initialization Trigger Enable
  11120. * 0b0..The generation of initialization trigger is disabled.
  11121. * 0b1..The generation of initialization trigger is enabled.
  11122. */
  11123. #define FTM_EXTTRIG_INITTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_INITTRIGEN_SHIFT)) & FTM_EXTTRIG_INITTRIGEN_MASK)
  11124. #define FTM_EXTTRIG_TRIGF_MASK (0x80U)
  11125. #define FTM_EXTTRIG_TRIGF_SHIFT (7U)
  11126. /*! TRIGF - Channel Trigger Flag
  11127. * 0b0..No channel trigger was generated.
  11128. * 0b1..A channel trigger was generated.
  11129. */
  11130. #define FTM_EXTTRIG_TRIGF(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_TRIGF_SHIFT)) & FTM_EXTTRIG_TRIGF_MASK)
  11131. /*! @} */
  11132. /*! @name POL - Channels Polarity */
  11133. /*! @{ */
  11134. #define FTM_POL_POL0_MASK (0x1U)
  11135. #define FTM_POL_POL0_SHIFT (0U)
  11136. /*! POL0 - Channel 0 Polarity
  11137. * 0b0..The channel polarity is active high.
  11138. * 0b1..The channel polarity is active low.
  11139. */
  11140. #define FTM_POL_POL0(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL0_SHIFT)) & FTM_POL_POL0_MASK)
  11141. #define FTM_POL_POL1_MASK (0x2U)
  11142. #define FTM_POL_POL1_SHIFT (1U)
  11143. /*! POL1 - Channel 1 Polarity
  11144. * 0b0..The channel polarity is active high.
  11145. * 0b1..The channel polarity is active low.
  11146. */
  11147. #define FTM_POL_POL1(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL1_SHIFT)) & FTM_POL_POL1_MASK)
  11148. #define FTM_POL_POL2_MASK (0x4U)
  11149. #define FTM_POL_POL2_SHIFT (2U)
  11150. /*! POL2 - Channel 2 Polarity
  11151. * 0b0..The channel polarity is active high.
  11152. * 0b1..The channel polarity is active low.
  11153. */
  11154. #define FTM_POL_POL2(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL2_SHIFT)) & FTM_POL_POL2_MASK)
  11155. #define FTM_POL_POL3_MASK (0x8U)
  11156. #define FTM_POL_POL3_SHIFT (3U)
  11157. /*! POL3 - Channel 3 Polarity
  11158. * 0b0..The channel polarity is active high.
  11159. * 0b1..The channel polarity is active low.
  11160. */
  11161. #define FTM_POL_POL3(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL3_SHIFT)) & FTM_POL_POL3_MASK)
  11162. #define FTM_POL_POL4_MASK (0x10U)
  11163. #define FTM_POL_POL4_SHIFT (4U)
  11164. /*! POL4 - Channel 4 Polarity
  11165. * 0b0..The channel polarity is active high.
  11166. * 0b1..The channel polarity is active low.
  11167. */
  11168. #define FTM_POL_POL4(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL4_SHIFT)) & FTM_POL_POL4_MASK)
  11169. #define FTM_POL_POL5_MASK (0x20U)
  11170. #define FTM_POL_POL5_SHIFT (5U)
  11171. /*! POL5 - Channel 5 Polarity
  11172. * 0b0..The channel polarity is active high.
  11173. * 0b1..The channel polarity is active low.
  11174. */
  11175. #define FTM_POL_POL5(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL5_SHIFT)) & FTM_POL_POL5_MASK)
  11176. #define FTM_POL_POL6_MASK (0x40U)
  11177. #define FTM_POL_POL6_SHIFT (6U)
  11178. /*! POL6 - Channel 6 Polarity
  11179. * 0b0..The channel polarity is active high.
  11180. * 0b1..The channel polarity is active low.
  11181. */
  11182. #define FTM_POL_POL6(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL6_SHIFT)) & FTM_POL_POL6_MASK)
  11183. #define FTM_POL_POL7_MASK (0x80U)
  11184. #define FTM_POL_POL7_SHIFT (7U)
  11185. /*! POL7 - Channel 7 Polarity
  11186. * 0b0..The channel polarity is active high.
  11187. * 0b1..The channel polarity is active low.
  11188. */
  11189. #define FTM_POL_POL7(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL7_SHIFT)) & FTM_POL_POL7_MASK)
  11190. /*! @} */
  11191. /*! @name FMS - Fault Mode Status */
  11192. /*! @{ */
  11193. #define FTM_FMS_FAULTF0_MASK (0x1U)
  11194. #define FTM_FMS_FAULTF0_SHIFT (0U)
  11195. /*! FAULTF0 - Fault Detection Flag 0
  11196. * 0b0..No fault condition was detected at the fault input.
  11197. * 0b1..A fault condition was detected at the fault input.
  11198. */
  11199. #define FTM_FMS_FAULTF0(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF0_SHIFT)) & FTM_FMS_FAULTF0_MASK)
  11200. #define FTM_FMS_FAULTF1_MASK (0x2U)
  11201. #define FTM_FMS_FAULTF1_SHIFT (1U)
  11202. /*! FAULTF1 - Fault Detection Flag 1
  11203. * 0b0..No fault condition was detected at the fault input.
  11204. * 0b1..A fault condition was detected at the fault input.
  11205. */
  11206. #define FTM_FMS_FAULTF1(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF1_SHIFT)) & FTM_FMS_FAULTF1_MASK)
  11207. #define FTM_FMS_FAULTF2_MASK (0x4U)
  11208. #define FTM_FMS_FAULTF2_SHIFT (2U)
  11209. /*! FAULTF2 - Fault Detection Flag 2
  11210. * 0b0..No fault condition was detected at the fault input.
  11211. * 0b1..A fault condition was detected at the fault input.
  11212. */
  11213. #define FTM_FMS_FAULTF2(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF2_SHIFT)) & FTM_FMS_FAULTF2_MASK)
  11214. #define FTM_FMS_FAULTF3_MASK (0x8U)
  11215. #define FTM_FMS_FAULTF3_SHIFT (3U)
  11216. /*! FAULTF3 - Fault Detection Flag 3
  11217. * 0b0..No fault condition was detected at the fault input.
  11218. * 0b1..A fault condition was detected at the fault input.
  11219. */
  11220. #define FTM_FMS_FAULTF3(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF3_SHIFT)) & FTM_FMS_FAULTF3_MASK)
  11221. #define FTM_FMS_FAULTIN_MASK (0x20U)
  11222. #define FTM_FMS_FAULTIN_SHIFT (5U)
  11223. /*! FAULTIN - Fault Inputs
  11224. * 0b0..The logic OR of the enabled fault inputs is 0.
  11225. * 0b1..The logic OR of the enabled fault inputs is 1.
  11226. */
  11227. #define FTM_FMS_FAULTIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTIN_SHIFT)) & FTM_FMS_FAULTIN_MASK)
  11228. #define FTM_FMS_WPEN_MASK (0x40U)
  11229. #define FTM_FMS_WPEN_SHIFT (6U)
  11230. /*! WPEN - Write Protection Enable
  11231. * 0b0..Write protection is disabled. Write protected bits can be written.
  11232. * 0b1..Write protection is enabled. Write protected bits cannot be written.
  11233. */
  11234. #define FTM_FMS_WPEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_WPEN_SHIFT)) & FTM_FMS_WPEN_MASK)
  11235. #define FTM_FMS_FAULTF_MASK (0x80U)
  11236. #define FTM_FMS_FAULTF_SHIFT (7U)
  11237. /*! FAULTF - Fault Detection Flag
  11238. * 0b0..No fault condition was detected.
  11239. * 0b1..A fault condition was detected.
  11240. */
  11241. #define FTM_FMS_FAULTF(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF_SHIFT)) & FTM_FMS_FAULTF_MASK)
  11242. /*! @} */
  11243. /*! @name FILTER - Input Capture Filter Control */
  11244. /*! @{ */
  11245. #define FTM_FILTER_CH0FVAL_MASK (0xFU)
  11246. #define FTM_FILTER_CH0FVAL_SHIFT (0U)
  11247. #define FTM_FILTER_CH0FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH0FVAL_SHIFT)) & FTM_FILTER_CH0FVAL_MASK)
  11248. #define FTM_FILTER_CH1FVAL_MASK (0xF0U)
  11249. #define FTM_FILTER_CH1FVAL_SHIFT (4U)
  11250. #define FTM_FILTER_CH1FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH1FVAL_SHIFT)) & FTM_FILTER_CH1FVAL_MASK)
  11251. #define FTM_FILTER_CH2FVAL_MASK (0xF00U)
  11252. #define FTM_FILTER_CH2FVAL_SHIFT (8U)
  11253. #define FTM_FILTER_CH2FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH2FVAL_SHIFT)) & FTM_FILTER_CH2FVAL_MASK)
  11254. #define FTM_FILTER_CH3FVAL_MASK (0xF000U)
  11255. #define FTM_FILTER_CH3FVAL_SHIFT (12U)
  11256. #define FTM_FILTER_CH3FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH3FVAL_SHIFT)) & FTM_FILTER_CH3FVAL_MASK)
  11257. /*! @} */
  11258. /*! @name FLTCTRL - Fault Control */
  11259. /*! @{ */
  11260. #define FTM_FLTCTRL_FAULT0EN_MASK (0x1U)
  11261. #define FTM_FLTCTRL_FAULT0EN_SHIFT (0U)
  11262. /*! FAULT0EN - Fault Input 0 Enable
  11263. * 0b0..Fault input is disabled.
  11264. * 0b1..Fault input is enabled.
  11265. */
  11266. #define FTM_FLTCTRL_FAULT0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT0EN_SHIFT)) & FTM_FLTCTRL_FAULT0EN_MASK)
  11267. #define FTM_FLTCTRL_FAULT1EN_MASK (0x2U)
  11268. #define FTM_FLTCTRL_FAULT1EN_SHIFT (1U)
  11269. /*! FAULT1EN - Fault Input 1 Enable
  11270. * 0b0..Fault input is disabled.
  11271. * 0b1..Fault input is enabled.
  11272. */
  11273. #define FTM_FLTCTRL_FAULT1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT1EN_SHIFT)) & FTM_FLTCTRL_FAULT1EN_MASK)
  11274. #define FTM_FLTCTRL_FAULT2EN_MASK (0x4U)
  11275. #define FTM_FLTCTRL_FAULT2EN_SHIFT (2U)
  11276. /*! FAULT2EN - Fault Input 2 Enable
  11277. * 0b0..Fault input is disabled.
  11278. * 0b1..Fault input is enabled.
  11279. */
  11280. #define FTM_FLTCTRL_FAULT2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT2EN_SHIFT)) & FTM_FLTCTRL_FAULT2EN_MASK)
  11281. #define FTM_FLTCTRL_FAULT3EN_MASK (0x8U)
  11282. #define FTM_FLTCTRL_FAULT3EN_SHIFT (3U)
  11283. /*! FAULT3EN - Fault Input 3 Enable
  11284. * 0b0..Fault input is disabled.
  11285. * 0b1..Fault input is enabled.
  11286. */
  11287. #define FTM_FLTCTRL_FAULT3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT3EN_SHIFT)) & FTM_FLTCTRL_FAULT3EN_MASK)
  11288. #define FTM_FLTCTRL_FFLTR0EN_MASK (0x10U)
  11289. #define FTM_FLTCTRL_FFLTR0EN_SHIFT (4U)
  11290. /*! FFLTR0EN - Fault Input 0 Filter Enable
  11291. * 0b0..Fault input filter is disabled.
  11292. * 0b1..Fault input filter is enabled.
  11293. */
  11294. #define FTM_FLTCTRL_FFLTR0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR0EN_SHIFT)) & FTM_FLTCTRL_FFLTR0EN_MASK)
  11295. #define FTM_FLTCTRL_FFLTR1EN_MASK (0x20U)
  11296. #define FTM_FLTCTRL_FFLTR1EN_SHIFT (5U)
  11297. /*! FFLTR1EN - Fault Input 1 Filter Enable
  11298. * 0b0..Fault input filter is disabled.
  11299. * 0b1..Fault input filter is enabled.
  11300. */
  11301. #define FTM_FLTCTRL_FFLTR1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR1EN_SHIFT)) & FTM_FLTCTRL_FFLTR1EN_MASK)
  11302. #define FTM_FLTCTRL_FFLTR2EN_MASK (0x40U)
  11303. #define FTM_FLTCTRL_FFLTR2EN_SHIFT (6U)
  11304. /*! FFLTR2EN - Fault Input 2 Filter Enable
  11305. * 0b0..Fault input filter is disabled.
  11306. * 0b1..Fault input filter is enabled.
  11307. */
  11308. #define FTM_FLTCTRL_FFLTR2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR2EN_SHIFT)) & FTM_FLTCTRL_FFLTR2EN_MASK)
  11309. #define FTM_FLTCTRL_FFLTR3EN_MASK (0x80U)
  11310. #define FTM_FLTCTRL_FFLTR3EN_SHIFT (7U)
  11311. /*! FFLTR3EN - Fault Input 3 Filter Enable
  11312. * 0b0..Fault input filter is disabled.
  11313. * 0b1..Fault input filter is enabled.
  11314. */
  11315. #define FTM_FLTCTRL_FFLTR3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR3EN_SHIFT)) & FTM_FLTCTRL_FFLTR3EN_MASK)
  11316. #define FTM_FLTCTRL_FFVAL_MASK (0xF00U)
  11317. #define FTM_FLTCTRL_FFVAL_SHIFT (8U)
  11318. #define FTM_FLTCTRL_FFVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFVAL_SHIFT)) & FTM_FLTCTRL_FFVAL_MASK)
  11319. /*! @} */
  11320. /*! @name QDCTRL - Quadrature Decoder Control And Status */
  11321. /*! @{ */
  11322. #define FTM_QDCTRL_QUADEN_MASK (0x1U)
  11323. #define FTM_QDCTRL_QUADEN_SHIFT (0U)
  11324. /*! QUADEN - Quadrature Decoder Mode Enable
  11325. * 0b0..Quadrature Decoder mode is disabled.
  11326. * 0b1..Quadrature Decoder mode is enabled.
  11327. */
  11328. #define FTM_QDCTRL_QUADEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADEN_SHIFT)) & FTM_QDCTRL_QUADEN_MASK)
  11329. #define FTM_QDCTRL_TOFDIR_MASK (0x2U)
  11330. #define FTM_QDCTRL_TOFDIR_SHIFT (1U)
  11331. /*! TOFDIR - Timer Overflow Direction In Quadrature Decoder Mode
  11332. * 0b0..TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes from its minimum value (CNTIN register) to its maximum value (MOD register).
  11333. * 0b1..TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from its maximum value (MOD register) to its minimum value (CNTIN register).
  11334. */
  11335. #define FTM_QDCTRL_TOFDIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_TOFDIR_SHIFT)) & FTM_QDCTRL_TOFDIR_MASK)
  11336. #define FTM_QDCTRL_QUADIR_MASK (0x4U)
  11337. #define FTM_QDCTRL_QUADIR_SHIFT (2U)
  11338. /*! QUADIR - FTM Counter Direction In Quadrature Decoder Mode
  11339. * 0b0..Counting direction is decreasing (FTM counter decrement).
  11340. * 0b1..Counting direction is increasing (FTM counter increment).
  11341. */
  11342. #define FTM_QDCTRL_QUADIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADIR_SHIFT)) & FTM_QDCTRL_QUADIR_MASK)
  11343. #define FTM_QDCTRL_QUADMODE_MASK (0x8U)
  11344. #define FTM_QDCTRL_QUADMODE_SHIFT (3U)
  11345. /*! QUADMODE - Quadrature Decoder Mode
  11346. * 0b0..Phase A and phase B encoding mode.
  11347. * 0b1..Count and direction encoding mode.
  11348. */
  11349. #define FTM_QDCTRL_QUADMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADMODE_SHIFT)) & FTM_QDCTRL_QUADMODE_MASK)
  11350. #define FTM_QDCTRL_PHBPOL_MASK (0x10U)
  11351. #define FTM_QDCTRL_PHBPOL_SHIFT (4U)
  11352. /*! PHBPOL - Phase B Input Polarity
  11353. * 0b0..Normal polarity. Phase B input signal is not inverted before identifying the rising and falling edges of this signal.
  11354. * 0b1..Inverted polarity. Phase B input signal is inverted before identifying the rising and falling edges of this signal.
  11355. */
  11356. #define FTM_QDCTRL_PHBPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBPOL_SHIFT)) & FTM_QDCTRL_PHBPOL_MASK)
  11357. #define FTM_QDCTRL_PHAPOL_MASK (0x20U)
  11358. #define FTM_QDCTRL_PHAPOL_SHIFT (5U)
  11359. /*! PHAPOL - Phase A Input Polarity
  11360. * 0b0..Normal polarity. Phase A input signal is not inverted before identifying the rising and falling edges of this signal.
  11361. * 0b1..Inverted polarity. Phase A input signal is inverted before identifying the rising and falling edges of this signal.
  11362. */
  11363. #define FTM_QDCTRL_PHAPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAPOL_SHIFT)) & FTM_QDCTRL_PHAPOL_MASK)
  11364. #define FTM_QDCTRL_PHBFLTREN_MASK (0x40U)
  11365. #define FTM_QDCTRL_PHBFLTREN_SHIFT (6U)
  11366. /*! PHBFLTREN - Phase B Input Filter Enable
  11367. * 0b0..Phase B input filter is disabled.
  11368. * 0b1..Phase B input filter is enabled.
  11369. */
  11370. #define FTM_QDCTRL_PHBFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBFLTREN_SHIFT)) & FTM_QDCTRL_PHBFLTREN_MASK)
  11371. #define FTM_QDCTRL_PHAFLTREN_MASK (0x80U)
  11372. #define FTM_QDCTRL_PHAFLTREN_SHIFT (7U)
  11373. /*! PHAFLTREN - Phase A Input Filter Enable
  11374. * 0b0..Phase A input filter is disabled.
  11375. * 0b1..Phase A input filter is enabled.
  11376. */
  11377. #define FTM_QDCTRL_PHAFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAFLTREN_SHIFT)) & FTM_QDCTRL_PHAFLTREN_MASK)
  11378. /*! @} */
  11379. /*! @name CONF - Configuration */
  11380. /*! @{ */
  11381. #define FTM_CONF_NUMTOF_MASK (0x1FU)
  11382. #define FTM_CONF_NUMTOF_SHIFT (0U)
  11383. #define FTM_CONF_NUMTOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_NUMTOF_SHIFT)) & FTM_CONF_NUMTOF_MASK)
  11384. #define FTM_CONF_BDMMODE_MASK (0xC0U)
  11385. #define FTM_CONF_BDMMODE_SHIFT (6U)
  11386. #define FTM_CONF_BDMMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_BDMMODE_SHIFT)) & FTM_CONF_BDMMODE_MASK)
  11387. #define FTM_CONF_GTBEEN_MASK (0x200U)
  11388. #define FTM_CONF_GTBEEN_SHIFT (9U)
  11389. /*! GTBEEN - Global Time Base Enable
  11390. * 0b0..Use of an external global time base is disabled.
  11391. * 0b1..Use of an external global time base is enabled.
  11392. */
  11393. #define FTM_CONF_GTBEEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEEN_SHIFT)) & FTM_CONF_GTBEEN_MASK)
  11394. #define FTM_CONF_GTBEOUT_MASK (0x400U)
  11395. #define FTM_CONF_GTBEOUT_SHIFT (10U)
  11396. /*! GTBEOUT - Global Time Base Output
  11397. * 0b0..A global time base signal generation is disabled.
  11398. * 0b1..A global time base signal generation is enabled.
  11399. */
  11400. #define FTM_CONF_GTBEOUT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEOUT_SHIFT)) & FTM_CONF_GTBEOUT_MASK)
  11401. /*! @} */
  11402. /*! @name FLTPOL - FTM Fault Input Polarity */
  11403. /*! @{ */
  11404. #define FTM_FLTPOL_FLT0POL_MASK (0x1U)
  11405. #define FTM_FLTPOL_FLT0POL_SHIFT (0U)
  11406. /*! FLT0POL - Fault Input 0 Polarity
  11407. * 0b0..The fault input polarity is active high. A 1 at the fault input indicates a fault.
  11408. * 0b1..The fault input polarity is active low. A 0 at the fault input indicates a fault.
  11409. */
  11410. #define FTM_FLTPOL_FLT0POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT0POL_SHIFT)) & FTM_FLTPOL_FLT0POL_MASK)
  11411. #define FTM_FLTPOL_FLT1POL_MASK (0x2U)
  11412. #define FTM_FLTPOL_FLT1POL_SHIFT (1U)
  11413. /*! FLT1POL - Fault Input 1 Polarity
  11414. * 0b0..The fault input polarity is active high. A 1 at the fault input indicates a fault.
  11415. * 0b1..The fault input polarity is active low. A 0 at the fault input indicates a fault.
  11416. */
  11417. #define FTM_FLTPOL_FLT1POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT1POL_SHIFT)) & FTM_FLTPOL_FLT1POL_MASK)
  11418. #define FTM_FLTPOL_FLT2POL_MASK (0x4U)
  11419. #define FTM_FLTPOL_FLT2POL_SHIFT (2U)
  11420. /*! FLT2POL - Fault Input 2 Polarity
  11421. * 0b0..The fault input polarity is active high. A 1 at the fault input indicates a fault.
  11422. * 0b1..The fault input polarity is active low. A 0 at the fault input indicates a fault.
  11423. */
  11424. #define FTM_FLTPOL_FLT2POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT2POL_SHIFT)) & FTM_FLTPOL_FLT2POL_MASK)
  11425. #define FTM_FLTPOL_FLT3POL_MASK (0x8U)
  11426. #define FTM_FLTPOL_FLT3POL_SHIFT (3U)
  11427. /*! FLT3POL - Fault Input 3 Polarity
  11428. * 0b0..The fault input polarity is active high. A 1 at the fault input indicates a fault.
  11429. * 0b1..The fault input polarity is active low. A 0 at the fault input indicates a fault.
  11430. */
  11431. #define FTM_FLTPOL_FLT3POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT3POL_SHIFT)) & FTM_FLTPOL_FLT3POL_MASK)
  11432. /*! @} */
  11433. /*! @name SYNCONF - Synchronization Configuration */
  11434. /*! @{ */
  11435. #define FTM_SYNCONF_HWTRIGMODE_MASK (0x1U)
  11436. #define FTM_SYNCONF_HWTRIGMODE_SHIFT (0U)
  11437. /*! HWTRIGMODE - Hardware Trigger Mode
  11438. * 0b0..FTM clears the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2.
  11439. * 0b1..FTM does not clear the TRIGj bit when the hardware trigger j is detected, where j = 0, 1,2.
  11440. */
  11441. #define FTM_SYNCONF_HWTRIGMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWTRIGMODE_SHIFT)) & FTM_SYNCONF_HWTRIGMODE_MASK)
  11442. #define FTM_SYNCONF_CNTINC_MASK (0x4U)
  11443. #define FTM_SYNCONF_CNTINC_SHIFT (2U)
  11444. /*! CNTINC - CNTIN Register Synchronization
  11445. * 0b0..CNTIN register is updated with its buffer value at all rising edges of system clock.
  11446. * 0b1..CNTIN register is updated with its buffer value by the PWM synchronization.
  11447. */
  11448. #define FTM_SYNCONF_CNTINC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_CNTINC_SHIFT)) & FTM_SYNCONF_CNTINC_MASK)
  11449. #define FTM_SYNCONF_INVC_MASK (0x10U)
  11450. #define FTM_SYNCONF_INVC_SHIFT (4U)
  11451. /*! INVC - INVCTRL Register Synchronization
  11452. * 0b0..INVCTRL register is updated with its buffer value at all rising edges of system clock.
  11453. * 0b1..INVCTRL register is updated with its buffer value by the PWM synchronization.
  11454. */
  11455. #define FTM_SYNCONF_INVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_INVC_SHIFT)) & FTM_SYNCONF_INVC_MASK)
  11456. #define FTM_SYNCONF_SWOC_MASK (0x20U)
  11457. #define FTM_SYNCONF_SWOC_SHIFT (5U)
  11458. /*! SWOC - SWOCTRL Register Synchronization
  11459. * 0b0..SWOCTRL register is updated with its buffer value at all rising edges of system clock.
  11460. * 0b1..SWOCTRL register is updated with its buffer value by the PWM synchronization.
  11461. */
  11462. #define FTM_SYNCONF_SWOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOC_SHIFT)) & FTM_SYNCONF_SWOC_MASK)
  11463. #define FTM_SYNCONF_SYNCMODE_MASK (0x80U)
  11464. #define FTM_SYNCONF_SYNCMODE_SHIFT (7U)
  11465. /*! SYNCMODE - Synchronization Mode
  11466. * 0b0..Legacy PWM synchronization is selected.
  11467. * 0b1..Enhanced PWM synchronization is selected.
  11468. */
  11469. #define FTM_SYNCONF_SYNCMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SYNCMODE_SHIFT)) & FTM_SYNCONF_SYNCMODE_MASK)
  11470. #define FTM_SYNCONF_SWRSTCNT_MASK (0x100U)
  11471. #define FTM_SYNCONF_SWRSTCNT_SHIFT (8U)
  11472. /*! SWRSTCNT
  11473. * 0b0..The software trigger does not activate the FTM counter synchronization.
  11474. * 0b1..The software trigger activates the FTM counter synchronization.
  11475. */
  11476. #define FTM_SYNCONF_SWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWRSTCNT_SHIFT)) & FTM_SYNCONF_SWRSTCNT_MASK)
  11477. #define FTM_SYNCONF_SWWRBUF_MASK (0x200U)
  11478. #define FTM_SYNCONF_SWWRBUF_SHIFT (9U)
  11479. /*! SWWRBUF
  11480. * 0b0..The software trigger does not activate MOD, CNTIN, and CV registers synchronization.
  11481. * 0b1..The software trigger activates MOD, CNTIN, and CV registers synchronization.
  11482. */
  11483. #define FTM_SYNCONF_SWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWWRBUF_SHIFT)) & FTM_SYNCONF_SWWRBUF_MASK)
  11484. #define FTM_SYNCONF_SWOM_MASK (0x400U)
  11485. #define FTM_SYNCONF_SWOM_SHIFT (10U)
  11486. /*! SWOM
  11487. * 0b0..The software trigger does not activate the OUTMASK register synchronization.
  11488. * 0b1..The software trigger activates the OUTMASK register synchronization.
  11489. */
  11490. #define FTM_SYNCONF_SWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOM_SHIFT)) & FTM_SYNCONF_SWOM_MASK)
  11491. #define FTM_SYNCONF_SWINVC_MASK (0x800U)
  11492. #define FTM_SYNCONF_SWINVC_SHIFT (11U)
  11493. /*! SWINVC
  11494. * 0b0..The software trigger does not activate the INVCTRL register synchronization.
  11495. * 0b1..The software trigger activates the INVCTRL register synchronization.
  11496. */
  11497. #define FTM_SYNCONF_SWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWINVC_SHIFT)) & FTM_SYNCONF_SWINVC_MASK)
  11498. #define FTM_SYNCONF_SWSOC_MASK (0x1000U)
  11499. #define FTM_SYNCONF_SWSOC_SHIFT (12U)
  11500. /*! SWSOC
  11501. * 0b0..The software trigger does not activate the SWOCTRL register synchronization.
  11502. * 0b1..The software trigger activates the SWOCTRL register synchronization.
  11503. */
  11504. #define FTM_SYNCONF_SWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWSOC_SHIFT)) & FTM_SYNCONF_SWSOC_MASK)
  11505. #define FTM_SYNCONF_HWRSTCNT_MASK (0x10000U)
  11506. #define FTM_SYNCONF_HWRSTCNT_SHIFT (16U)
  11507. /*! HWRSTCNT
  11508. * 0b0..A hardware trigger does not activate the FTM counter synchronization.
  11509. * 0b1..A hardware trigger activates the FTM counter synchronization.
  11510. */
  11511. #define FTM_SYNCONF_HWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWRSTCNT_SHIFT)) & FTM_SYNCONF_HWRSTCNT_MASK)
  11512. #define FTM_SYNCONF_HWWRBUF_MASK (0x20000U)
  11513. #define FTM_SYNCONF_HWWRBUF_SHIFT (17U)
  11514. /*! HWWRBUF
  11515. * 0b0..A hardware trigger does not activate MOD, CNTIN, and CV registers synchronization.
  11516. * 0b1..A hardware trigger activates MOD, CNTIN, and CV registers synchronization.
  11517. */
  11518. #define FTM_SYNCONF_HWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWWRBUF_SHIFT)) & FTM_SYNCONF_HWWRBUF_MASK)
  11519. #define FTM_SYNCONF_HWOM_MASK (0x40000U)
  11520. #define FTM_SYNCONF_HWOM_SHIFT (18U)
  11521. /*! HWOM
  11522. * 0b0..A hardware trigger does not activate the OUTMASK register synchronization.
  11523. * 0b1..A hardware trigger activates the OUTMASK register synchronization.
  11524. */
  11525. #define FTM_SYNCONF_HWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWOM_SHIFT)) & FTM_SYNCONF_HWOM_MASK)
  11526. #define FTM_SYNCONF_HWINVC_MASK (0x80000U)
  11527. #define FTM_SYNCONF_HWINVC_SHIFT (19U)
  11528. /*! HWINVC
  11529. * 0b0..A hardware trigger does not activate the INVCTRL register synchronization.
  11530. * 0b1..A hardware trigger activates the INVCTRL register synchronization.
  11531. */
  11532. #define FTM_SYNCONF_HWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWINVC_SHIFT)) & FTM_SYNCONF_HWINVC_MASK)
  11533. #define FTM_SYNCONF_HWSOC_MASK (0x100000U)
  11534. #define FTM_SYNCONF_HWSOC_SHIFT (20U)
  11535. /*! HWSOC
  11536. * 0b0..A hardware trigger does not activate the SWOCTRL register synchronization.
  11537. * 0b1..A hardware trigger activates the SWOCTRL register synchronization.
  11538. */
  11539. #define FTM_SYNCONF_HWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWSOC_SHIFT)) & FTM_SYNCONF_HWSOC_MASK)
  11540. /*! @} */
  11541. /*! @name INVCTRL - FTM Inverting Control */
  11542. /*! @{ */
  11543. #define FTM_INVCTRL_INV0EN_MASK (0x1U)
  11544. #define FTM_INVCTRL_INV0EN_SHIFT (0U)
  11545. /*! INV0EN - Pair Channels 0 Inverting Enable
  11546. * 0b0..Inverting is disabled.
  11547. * 0b1..Inverting is enabled.
  11548. */
  11549. #define FTM_INVCTRL_INV0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV0EN_SHIFT)) & FTM_INVCTRL_INV0EN_MASK)
  11550. #define FTM_INVCTRL_INV1EN_MASK (0x2U)
  11551. #define FTM_INVCTRL_INV1EN_SHIFT (1U)
  11552. /*! INV1EN - Pair Channels 1 Inverting Enable
  11553. * 0b0..Inverting is disabled.
  11554. * 0b1..Inverting is enabled.
  11555. */
  11556. #define FTM_INVCTRL_INV1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV1EN_SHIFT)) & FTM_INVCTRL_INV1EN_MASK)
  11557. #define FTM_INVCTRL_INV2EN_MASK (0x4U)
  11558. #define FTM_INVCTRL_INV2EN_SHIFT (2U)
  11559. /*! INV2EN - Pair Channels 2 Inverting Enable
  11560. * 0b0..Inverting is disabled.
  11561. * 0b1..Inverting is enabled.
  11562. */
  11563. #define FTM_INVCTRL_INV2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV2EN_SHIFT)) & FTM_INVCTRL_INV2EN_MASK)
  11564. #define FTM_INVCTRL_INV3EN_MASK (0x8U)
  11565. #define FTM_INVCTRL_INV3EN_SHIFT (3U)
  11566. /*! INV3EN - Pair Channels 3 Inverting Enable
  11567. * 0b0..Inverting is disabled.
  11568. * 0b1..Inverting is enabled.
  11569. */
  11570. #define FTM_INVCTRL_INV3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV3EN_SHIFT)) & FTM_INVCTRL_INV3EN_MASK)
  11571. /*! @} */
  11572. /*! @name SWOCTRL - FTM Software Output Control */
  11573. /*! @{ */
  11574. #define FTM_SWOCTRL_CH0OC_MASK (0x1U)
  11575. #define FTM_SWOCTRL_CH0OC_SHIFT (0U)
  11576. /*! CH0OC - Channel 0 Software Output Control Enable
  11577. * 0b0..The channel output is not affected by software output control.
  11578. * 0b1..The channel output is affected by software output control.
  11579. */
  11580. #define FTM_SWOCTRL_CH0OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OC_SHIFT)) & FTM_SWOCTRL_CH0OC_MASK)
  11581. #define FTM_SWOCTRL_CH1OC_MASK (0x2U)
  11582. #define FTM_SWOCTRL_CH1OC_SHIFT (1U)
  11583. /*! CH1OC - Channel 1 Software Output Control Enable
  11584. * 0b0..The channel output is not affected by software output control.
  11585. * 0b1..The channel output is affected by software output control.
  11586. */
  11587. #define FTM_SWOCTRL_CH1OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OC_SHIFT)) & FTM_SWOCTRL_CH1OC_MASK)
  11588. #define FTM_SWOCTRL_CH2OC_MASK (0x4U)
  11589. #define FTM_SWOCTRL_CH2OC_SHIFT (2U)
  11590. /*! CH2OC - Channel 2 Software Output Control Enable
  11591. * 0b0..The channel output is not affected by software output control.
  11592. * 0b1..The channel output is affected by software output control.
  11593. */
  11594. #define FTM_SWOCTRL_CH2OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OC_SHIFT)) & FTM_SWOCTRL_CH2OC_MASK)
  11595. #define FTM_SWOCTRL_CH3OC_MASK (0x8U)
  11596. #define FTM_SWOCTRL_CH3OC_SHIFT (3U)
  11597. /*! CH3OC - Channel 3 Software Output Control Enable
  11598. * 0b0..The channel output is not affected by software output control.
  11599. * 0b1..The channel output is affected by software output control.
  11600. */
  11601. #define FTM_SWOCTRL_CH3OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OC_SHIFT)) & FTM_SWOCTRL_CH3OC_MASK)
  11602. #define FTM_SWOCTRL_CH4OC_MASK (0x10U)
  11603. #define FTM_SWOCTRL_CH4OC_SHIFT (4U)
  11604. /*! CH4OC - Channel 4 Software Output Control Enable
  11605. * 0b0..The channel output is not affected by software output control.
  11606. * 0b1..The channel output is affected by software output control.
  11607. */
  11608. #define FTM_SWOCTRL_CH4OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OC_SHIFT)) & FTM_SWOCTRL_CH4OC_MASK)
  11609. #define FTM_SWOCTRL_CH5OC_MASK (0x20U)
  11610. #define FTM_SWOCTRL_CH5OC_SHIFT (5U)
  11611. /*! CH5OC - Channel 5 Software Output Control Enable
  11612. * 0b0..The channel output is not affected by software output control.
  11613. * 0b1..The channel output is affected by software output control.
  11614. */
  11615. #define FTM_SWOCTRL_CH5OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OC_SHIFT)) & FTM_SWOCTRL_CH5OC_MASK)
  11616. #define FTM_SWOCTRL_CH6OC_MASK (0x40U)
  11617. #define FTM_SWOCTRL_CH6OC_SHIFT (6U)
  11618. /*! CH6OC - Channel 6 Software Output Control Enable
  11619. * 0b0..The channel output is not affected by software output control.
  11620. * 0b1..The channel output is affected by software output control.
  11621. */
  11622. #define FTM_SWOCTRL_CH6OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OC_SHIFT)) & FTM_SWOCTRL_CH6OC_MASK)
  11623. #define FTM_SWOCTRL_CH7OC_MASK (0x80U)
  11624. #define FTM_SWOCTRL_CH7OC_SHIFT (7U)
  11625. /*! CH7OC - Channel 7 Software Output Control Enable
  11626. * 0b0..The channel output is not affected by software output control.
  11627. * 0b1..The channel output is affected by software output control.
  11628. */
  11629. #define FTM_SWOCTRL_CH7OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OC_SHIFT)) & FTM_SWOCTRL_CH7OC_MASK)
  11630. #define FTM_SWOCTRL_CH0OCV_MASK (0x100U)
  11631. #define FTM_SWOCTRL_CH0OCV_SHIFT (8U)
  11632. /*! CH0OCV - Channel 0 Software Output Control Value
  11633. * 0b0..The software output control forces 0 to the channel output.
  11634. * 0b1..The software output control forces 1 to the channel output.
  11635. */
  11636. #define FTM_SWOCTRL_CH0OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OCV_SHIFT)) & FTM_SWOCTRL_CH0OCV_MASK)
  11637. #define FTM_SWOCTRL_CH1OCV_MASK (0x200U)
  11638. #define FTM_SWOCTRL_CH1OCV_SHIFT (9U)
  11639. /*! CH1OCV - Channel 1 Software Output Control Value
  11640. * 0b0..The software output control forces 0 to the channel output.
  11641. * 0b1..The software output control forces 1 to the channel output.
  11642. */
  11643. #define FTM_SWOCTRL_CH1OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OCV_SHIFT)) & FTM_SWOCTRL_CH1OCV_MASK)
  11644. #define FTM_SWOCTRL_CH2OCV_MASK (0x400U)
  11645. #define FTM_SWOCTRL_CH2OCV_SHIFT (10U)
  11646. /*! CH2OCV - Channel 2 Software Output Control Value
  11647. * 0b0..The software output control forces 0 to the channel output.
  11648. * 0b1..The software output control forces 1 to the channel output.
  11649. */
  11650. #define FTM_SWOCTRL_CH2OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OCV_SHIFT)) & FTM_SWOCTRL_CH2OCV_MASK)
  11651. #define FTM_SWOCTRL_CH3OCV_MASK (0x800U)
  11652. #define FTM_SWOCTRL_CH3OCV_SHIFT (11U)
  11653. /*! CH3OCV - Channel 3 Software Output Control Value
  11654. * 0b0..The software output control forces 0 to the channel output.
  11655. * 0b1..The software output control forces 1 to the channel output.
  11656. */
  11657. #define FTM_SWOCTRL_CH3OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OCV_SHIFT)) & FTM_SWOCTRL_CH3OCV_MASK)
  11658. #define FTM_SWOCTRL_CH4OCV_MASK (0x1000U)
  11659. #define FTM_SWOCTRL_CH4OCV_SHIFT (12U)
  11660. /*! CH4OCV - Channel 4 Software Output Control Value
  11661. * 0b0..The software output control forces 0 to the channel output.
  11662. * 0b1..The software output control forces 1 to the channel output.
  11663. */
  11664. #define FTM_SWOCTRL_CH4OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OCV_SHIFT)) & FTM_SWOCTRL_CH4OCV_MASK)
  11665. #define FTM_SWOCTRL_CH5OCV_MASK (0x2000U)
  11666. #define FTM_SWOCTRL_CH5OCV_SHIFT (13U)
  11667. /*! CH5OCV - Channel 5 Software Output Control Value
  11668. * 0b0..The software output control forces 0 to the channel output.
  11669. * 0b1..The software output control forces 1 to the channel output.
  11670. */
  11671. #define FTM_SWOCTRL_CH5OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OCV_SHIFT)) & FTM_SWOCTRL_CH5OCV_MASK)
  11672. #define FTM_SWOCTRL_CH6OCV_MASK (0x4000U)
  11673. #define FTM_SWOCTRL_CH6OCV_SHIFT (14U)
  11674. /*! CH6OCV - Channel 6 Software Output Control Value
  11675. * 0b0..The software output control forces 0 to the channel output.
  11676. * 0b1..The software output control forces 1 to the channel output.
  11677. */
  11678. #define FTM_SWOCTRL_CH6OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OCV_SHIFT)) & FTM_SWOCTRL_CH6OCV_MASK)
  11679. #define FTM_SWOCTRL_CH7OCV_MASK (0x8000U)
  11680. #define FTM_SWOCTRL_CH7OCV_SHIFT (15U)
  11681. /*! CH7OCV - Channel 7 Software Output Control Value
  11682. * 0b0..The software output control forces 0 to the channel output.
  11683. * 0b1..The software output control forces 1 to the channel output.
  11684. */
  11685. #define FTM_SWOCTRL_CH7OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OCV_SHIFT)) & FTM_SWOCTRL_CH7OCV_MASK)
  11686. /*! @} */
  11687. /*! @name PWMLOAD - FTM PWM Load */
  11688. /*! @{ */
  11689. #define FTM_PWMLOAD_CH0SEL_MASK (0x1U)
  11690. #define FTM_PWMLOAD_CH0SEL_SHIFT (0U)
  11691. /*! CH0SEL - Channel 0 Select
  11692. * 0b0..Do not include the channel in the matching process.
  11693. * 0b1..Include the channel in the matching process.
  11694. */
  11695. #define FTM_PWMLOAD_CH0SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH0SEL_SHIFT)) & FTM_PWMLOAD_CH0SEL_MASK)
  11696. #define FTM_PWMLOAD_CH1SEL_MASK (0x2U)
  11697. #define FTM_PWMLOAD_CH1SEL_SHIFT (1U)
  11698. /*! CH1SEL - Channel 1 Select
  11699. * 0b0..Do not include the channel in the matching process.
  11700. * 0b1..Include the channel in the matching process.
  11701. */
  11702. #define FTM_PWMLOAD_CH1SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH1SEL_SHIFT)) & FTM_PWMLOAD_CH1SEL_MASK)
  11703. #define FTM_PWMLOAD_CH2SEL_MASK (0x4U)
  11704. #define FTM_PWMLOAD_CH2SEL_SHIFT (2U)
  11705. /*! CH2SEL - Channel 2 Select
  11706. * 0b0..Do not include the channel in the matching process.
  11707. * 0b1..Include the channel in the matching process.
  11708. */
  11709. #define FTM_PWMLOAD_CH2SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH2SEL_SHIFT)) & FTM_PWMLOAD_CH2SEL_MASK)
  11710. #define FTM_PWMLOAD_CH3SEL_MASK (0x8U)
  11711. #define FTM_PWMLOAD_CH3SEL_SHIFT (3U)
  11712. /*! CH3SEL - Channel 3 Select
  11713. * 0b0..Do not include the channel in the matching process.
  11714. * 0b1..Include the channel in the matching process.
  11715. */
  11716. #define FTM_PWMLOAD_CH3SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH3SEL_SHIFT)) & FTM_PWMLOAD_CH3SEL_MASK)
  11717. #define FTM_PWMLOAD_CH4SEL_MASK (0x10U)
  11718. #define FTM_PWMLOAD_CH4SEL_SHIFT (4U)
  11719. /*! CH4SEL - Channel 4 Select
  11720. * 0b0..Do not include the channel in the matching process.
  11721. * 0b1..Include the channel in the matching process.
  11722. */
  11723. #define FTM_PWMLOAD_CH4SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH4SEL_SHIFT)) & FTM_PWMLOAD_CH4SEL_MASK)
  11724. #define FTM_PWMLOAD_CH5SEL_MASK (0x20U)
  11725. #define FTM_PWMLOAD_CH5SEL_SHIFT (5U)
  11726. /*! CH5SEL - Channel 5 Select
  11727. * 0b0..Do not include the channel in the matching process.
  11728. * 0b1..Include the channel in the matching process.
  11729. */
  11730. #define FTM_PWMLOAD_CH5SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH5SEL_SHIFT)) & FTM_PWMLOAD_CH5SEL_MASK)
  11731. #define FTM_PWMLOAD_CH6SEL_MASK (0x40U)
  11732. #define FTM_PWMLOAD_CH6SEL_SHIFT (6U)
  11733. /*! CH6SEL - Channel 6 Select
  11734. * 0b0..Do not include the channel in the matching process.
  11735. * 0b1..Include the channel in the matching process.
  11736. */
  11737. #define FTM_PWMLOAD_CH6SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH6SEL_SHIFT)) & FTM_PWMLOAD_CH6SEL_MASK)
  11738. #define FTM_PWMLOAD_CH7SEL_MASK (0x80U)
  11739. #define FTM_PWMLOAD_CH7SEL_SHIFT (7U)
  11740. /*! CH7SEL - Channel 7 Select
  11741. * 0b0..Do not include the channel in the matching process.
  11742. * 0b1..Include the channel in the matching process.
  11743. */
  11744. #define FTM_PWMLOAD_CH7SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH7SEL_SHIFT)) & FTM_PWMLOAD_CH7SEL_MASK)
  11745. #define FTM_PWMLOAD_LDOK_MASK (0x200U)
  11746. #define FTM_PWMLOAD_LDOK_SHIFT (9U)
  11747. /*! LDOK - Load Enable
  11748. * 0b0..Loading updated values is disabled.
  11749. * 0b1..Loading updated values is enabled.
  11750. */
  11751. #define FTM_PWMLOAD_LDOK(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_LDOK_SHIFT)) & FTM_PWMLOAD_LDOK_MASK)
  11752. /*! @} */
  11753. /*!
  11754. * @}
  11755. */ /* end of group FTM_Register_Masks */
  11756. /* FTM - Peripheral instance base addresses */
  11757. /** Peripheral FTM0 base address */
  11758. #define FTM0_BASE (0x40038000u)
  11759. /** Peripheral FTM0 base pointer */
  11760. #define FTM0 ((FTM_Type *)FTM0_BASE)
  11761. /** Peripheral FTM1 base address */
  11762. #define FTM1_BASE (0x40039000u)
  11763. /** Peripheral FTM1 base pointer */
  11764. #define FTM1 ((FTM_Type *)FTM1_BASE)
  11765. /** Peripheral FTM2 base address */
  11766. #define FTM2_BASE (0x4003A000u)
  11767. /** Peripheral FTM2 base pointer */
  11768. #define FTM2 ((FTM_Type *)FTM2_BASE)
  11769. /** Peripheral FTM3 base address */
  11770. #define FTM3_BASE (0x40026000u)
  11771. /** Peripheral FTM3 base pointer */
  11772. #define FTM3 ((FTM_Type *)FTM3_BASE)
  11773. /** Array initializer of FTM peripheral base addresses */
  11774. #define FTM_BASE_ADDRS { FTM0_BASE, FTM1_BASE, FTM2_BASE, FTM3_BASE }
  11775. /** Array initializer of FTM peripheral base pointers */
  11776. #define FTM_BASE_PTRS { FTM0, FTM1, FTM2, FTM3 }
  11777. /** Interrupt vectors for the FTM peripheral type */
  11778. #define FTM_IRQS { FTM0_IRQn, FTM1_IRQn, FTM2_IRQn, FTM3_IRQn }
  11779. /*!
  11780. * @}
  11781. */ /* end of group FTM_Peripheral_Access_Layer */
  11782. /* ----------------------------------------------------------------------------
  11783. -- GPIO Peripheral Access Layer
  11784. ---------------------------------------------------------------------------- */
  11785. /*!
  11786. * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
  11787. * @{
  11788. */
  11789. /** GPIO - Register Layout Typedef */
  11790. typedef struct {
  11791. __IO uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */
  11792. __O uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */
  11793. __O uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */
  11794. __O uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */
  11795. __I uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */
  11796. __IO uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */
  11797. } GPIO_Type;
  11798. /* ----------------------------------------------------------------------------
  11799. -- GPIO Register Masks
  11800. ---------------------------------------------------------------------------- */
  11801. /*!
  11802. * @addtogroup GPIO_Register_Masks GPIO Register Masks
  11803. * @{
  11804. */
  11805. /*! @name PDOR - Port Data Output Register */
  11806. /*! @{ */
  11807. #define GPIO_PDOR_PDO_MASK (0xFFFFFFFFU)
  11808. #define GPIO_PDOR_PDO_SHIFT (0U)
  11809. /*! PDO - Port Data Output
  11810. * 0b00000000000000000000000000000000..Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
  11811. * 0b00000000000000000000000000000001..Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
  11812. */
  11813. #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDOR_PDO_SHIFT)) & GPIO_PDOR_PDO_MASK)
  11814. /*! @} */
  11815. /*! @name PSOR - Port Set Output Register */
  11816. /*! @{ */
  11817. #define GPIO_PSOR_PTSO_MASK (0xFFFFFFFFU)
  11818. #define GPIO_PSOR_PTSO_SHIFT (0U)
  11819. /*! PTSO - Port Set Output
  11820. * 0b00000000000000000000000000000000..Corresponding bit in PDORn does not change.
  11821. * 0b00000000000000000000000000000001..Corresponding bit in PDORn is set to logic 1.
  11822. */
  11823. #define GPIO_PSOR_PTSO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PSOR_PTSO_SHIFT)) & GPIO_PSOR_PTSO_MASK)
  11824. /*! @} */
  11825. /*! @name PCOR - Port Clear Output Register */
  11826. /*! @{ */
  11827. #define GPIO_PCOR_PTCO_MASK (0xFFFFFFFFU)
  11828. #define GPIO_PCOR_PTCO_SHIFT (0U)
  11829. /*! PTCO - Port Clear Output
  11830. * 0b00000000000000000000000000000000..Corresponding bit in PDORn does not change.
  11831. * 0b00000000000000000000000000000001..Corresponding bit in PDORn is cleared to logic 0.
  11832. */
  11833. #define GPIO_PCOR_PTCO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PCOR_PTCO_SHIFT)) & GPIO_PCOR_PTCO_MASK)
  11834. /*! @} */
  11835. /*! @name PTOR - Port Toggle Output Register */
  11836. /*! @{ */
  11837. #define GPIO_PTOR_PTTO_MASK (0xFFFFFFFFU)
  11838. #define GPIO_PTOR_PTTO_SHIFT (0U)
  11839. /*! PTTO - Port Toggle Output
  11840. * 0b00000000000000000000000000000000..Corresponding bit in PDORn does not change.
  11841. * 0b00000000000000000000000000000001..Corresponding bit in PDORn is set to the inverse of its existing logic state.
  11842. */
  11843. #define GPIO_PTOR_PTTO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PTOR_PTTO_SHIFT)) & GPIO_PTOR_PTTO_MASK)
  11844. /*! @} */
  11845. /*! @name PDIR - Port Data Input Register */
  11846. /*! @{ */
  11847. #define GPIO_PDIR_PDI_MASK (0xFFFFFFFFU)
  11848. #define GPIO_PDIR_PDI_SHIFT (0U)
  11849. /*! PDI - Port Data Input
  11850. * 0b00000000000000000000000000000000..Pin logic level is logic 0, or is not configured for use by digital function.
  11851. * 0b00000000000000000000000000000001..Pin logic level is logic 1.
  11852. */
  11853. #define GPIO_PDIR_PDI(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDIR_PDI_SHIFT)) & GPIO_PDIR_PDI_MASK)
  11854. /*! @} */
  11855. /*! @name PDDR - Port Data Direction Register */
  11856. /*! @{ */
  11857. #define GPIO_PDDR_PDD_MASK (0xFFFFFFFFU)
  11858. #define GPIO_PDDR_PDD_SHIFT (0U)
  11859. /*! PDD - Port Data Direction
  11860. * 0b00000000000000000000000000000000..Pin is configured as general-purpose input, for the GPIO function.
  11861. * 0b00000000000000000000000000000001..Pin is configured as general-purpose output, for the GPIO function.
  11862. */
  11863. #define GPIO_PDDR_PDD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDDR_PDD_SHIFT)) & GPIO_PDDR_PDD_MASK)
  11864. /*! @} */
  11865. /*!
  11866. * @}
  11867. */ /* end of group GPIO_Register_Masks */
  11868. /* GPIO - Peripheral instance base addresses */
  11869. /** Peripheral GPIOA base address */
  11870. #define GPIOA_BASE (0x400FF000u)
  11871. /** Peripheral GPIOA base pointer */
  11872. #define GPIOA ((GPIO_Type *)GPIOA_BASE)
  11873. /** Peripheral GPIOB base address */
  11874. #define GPIOB_BASE (0x400FF040u)
  11875. /** Peripheral GPIOB base pointer */
  11876. #define GPIOB ((GPIO_Type *)GPIOB_BASE)
  11877. /** Peripheral GPIOC base address */
  11878. #define GPIOC_BASE (0x400FF080u)
  11879. /** Peripheral GPIOC base pointer */
  11880. #define GPIOC ((GPIO_Type *)GPIOC_BASE)
  11881. /** Peripheral GPIOD base address */
  11882. #define GPIOD_BASE (0x400FF0C0u)
  11883. /** Peripheral GPIOD base pointer */
  11884. #define GPIOD ((GPIO_Type *)GPIOD_BASE)
  11885. /** Peripheral GPIOE base address */
  11886. #define GPIOE_BASE (0x400FF100u)
  11887. /** Peripheral GPIOE base pointer */
  11888. #define GPIOE ((GPIO_Type *)GPIOE_BASE)
  11889. /** Array initializer of GPIO peripheral base addresses */
  11890. #define GPIO_BASE_ADDRS { GPIOA_BASE, GPIOB_BASE, GPIOC_BASE, GPIOD_BASE, GPIOE_BASE }
  11891. /** Array initializer of GPIO peripheral base pointers */
  11892. #define GPIO_BASE_PTRS { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE }
  11893. /*!
  11894. * @}
  11895. */ /* end of group GPIO_Peripheral_Access_Layer */
  11896. /* ----------------------------------------------------------------------------
  11897. -- HSADC Peripheral Access Layer
  11898. ---------------------------------------------------------------------------- */
  11899. /*!
  11900. * @addtogroup HSADC_Peripheral_Access_Layer HSADC Peripheral Access Layer
  11901. * @{
  11902. */
  11903. /** HSADC - Register Layout Typedef */
  11904. typedef struct {
  11905. __IO uint16_t CTRL1; /**< HSADC Control Register 1, offset: 0x0 */
  11906. __IO uint16_t CTRL2; /**< HSADC Control Register 2, offset: 0x2 */
  11907. __IO uint16_t ZXCTRL1; /**< HSADC Zero Crossing Control 1 Register, offset: 0x4 */
  11908. __IO uint16_t ZXCTRL2; /**< HSADC Zero Crossing Control 2 Register, offset: 0x6 */
  11909. __IO uint16_t CLIST1; /**< HSADC Channel List Register 1, offset: 0x8 */
  11910. __IO uint16_t CLIST2; /**< HSADC Channel List Register 2, offset: 0xA */
  11911. __IO uint16_t CLIST3; /**< HSADC Channel List Register 3, offset: 0xC */
  11912. __IO uint16_t CLIST4; /**< HSADC Channel List Register 4, offset: 0xE */
  11913. __IO uint16_t SDIS; /**< HSADC Sample Disable Register, offset: 0x10 */
  11914. __IO uint16_t STAT; /**< HSADC Status Register, offset: 0x12 */
  11915. __I uint16_t RDY; /**< HSADC Ready Register, offset: 0x14 */
  11916. __IO uint16_t LOLIMSTAT; /**< HSADC Low Limit Status Register, offset: 0x16 */
  11917. __IO uint16_t HILIMSTAT; /**< HSADC High Limit Status Register, offset: 0x18 */
  11918. __IO uint16_t ZXSTAT; /**< HSADC Zero Crossing Status Register, offset: 0x1A */
  11919. __IO uint16_t RSLT[16]; /**< HSADC Result Registers with sign extension, array offset: 0x1C, array step: 0x2 */
  11920. __IO uint16_t LOLIM[16]; /**< HSADC Low Limit Registers, array offset: 0x3C, array step: 0x2 */
  11921. __IO uint16_t HILIM[16]; /**< HSADC High Limit Registers, array offset: 0x5C, array step: 0x2 */
  11922. __IO uint16_t OFFST[16]; /**< HSADC Offset Register, array offset: 0x7C, array step: 0x2 */
  11923. __IO uint16_t PWR; /**< HSADC Power Control Register, offset: 0x9C */
  11924. uint8_t RESERVED_0[6];
  11925. __IO uint16_t SCTRL; /**< HSADC Scan Control Register, offset: 0xA4 */
  11926. __IO uint16_t PWR2; /**< HSADC Power Control Register 2, offset: 0xA6 */
  11927. __IO uint16_t CTRL3; /**< HSADC Control Register 3, offset: 0xA8 */
  11928. __IO uint16_t SCINTEN; /**< HSADC Scan Interrupt Enable Register, offset: 0xAA */
  11929. __IO uint16_t SAMPTIM; /**< HSADC Sampling Time Configuration Register, offset: 0xAC */
  11930. __IO uint16_t CALIB; /**< HSADCs Calibration Configuration, offset: 0xAE */
  11931. __IO uint16_t CALVAL_A; /**< Calibration Values for ADCA Register, offset: 0xB0 */
  11932. __IO uint16_t CALVAL_B; /**< Calibration Values for ADCB Register, offset: 0xB2 */
  11933. uint8_t RESERVED_1[6];
  11934. __IO uint16_t MUX67_SEL; /**< MUX6_7 Selection Controls Register, offset: 0xBA */
  11935. } HSADC_Type;
  11936. /* ----------------------------------------------------------------------------
  11937. -- HSADC Register Masks
  11938. ---------------------------------------------------------------------------- */
  11939. /*!
  11940. * @addtogroup HSADC_Register_Masks HSADC Register Masks
  11941. * @{
  11942. */
  11943. /*! @name CTRL1 - HSADC Control Register 1 */
  11944. /*! @{ */
  11945. #define HSADC_CTRL1_SMODE_MASK (0x7U)
  11946. #define HSADC_CTRL1_SMODE_SHIFT (0U)
  11947. /*! SMODE - HSADC Scan Mode Control
  11948. * 0b000..Once (single) sequential
  11949. * 0b001..Once parallel
  11950. * 0b010..Loop sequential
  11951. * 0b011..Loop parallel
  11952. * 0b100..Triggered sequential
  11953. * 0b101..Triggered parallel (default)
  11954. * 0b11x..Reserved value
  11955. */
  11956. #define HSADC_CTRL1_SMODE(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_SMODE_SHIFT)) & HSADC_CTRL1_SMODE_MASK)
  11957. #define HSADC_CTRL1_CHNCFG_L_MASK (0xF0U)
  11958. #define HSADC_CTRL1_CHNCFG_L_SHIFT (4U)
  11959. /*! CHNCFG_L - CHCNF (Channel Configure Low) bits
  11960. * 0bxxx1..Inputs = ANA0-ANA1
  11961. * 0bxxx0..Inputs = ANA0-ANA1
  11962. * 0bxx1x..Inputs = ANA2-ANA3
  11963. * 0bxx0x..Inputs = ANA2-ANA3
  11964. * 0bx1xx..Inputs = ANB0-ANB1
  11965. * 0bx0xx..Inputs = ANB0-ANB1
  11966. * 0b1xxx..Inputs = ANB2-ANB3
  11967. */
  11968. #define HSADC_CTRL1_CHNCFG_L(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_CHNCFG_L_SHIFT)) & HSADC_CTRL1_CHNCFG_L_MASK)
  11969. #define HSADC_CTRL1_HLMTIE_MASK (0x100U)
  11970. #define HSADC_CTRL1_HLMTIE_SHIFT (8U)
  11971. /*! HLMTIE - High Limit Interrupt Enable
  11972. * 0b0..Interrupt disabled
  11973. * 0b1..Interrupt enabled
  11974. */
  11975. #define HSADC_CTRL1_HLMTIE(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_HLMTIE_SHIFT)) & HSADC_CTRL1_HLMTIE_MASK)
  11976. #define HSADC_CTRL1_LLMTIE_MASK (0x200U)
  11977. #define HSADC_CTRL1_LLMTIE_SHIFT (9U)
  11978. /*! LLMTIE - Low Limit Interrupt Enable
  11979. * 0b0..Interrupt disabled
  11980. * 0b1..Interrupt enabled
  11981. */
  11982. #define HSADC_CTRL1_LLMTIE(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_LLMTIE_SHIFT)) & HSADC_CTRL1_LLMTIE_MASK)
  11983. #define HSADC_CTRL1_ZCIE_MASK (0x400U)
  11984. #define HSADC_CTRL1_ZCIE_SHIFT (10U)
  11985. /*! ZCIE - Zero Crossing Interrupt Enable
  11986. * 0b0..Interrupt disabled
  11987. * 0b1..Interrupt enabled
  11988. */
  11989. #define HSADC_CTRL1_ZCIE(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_ZCIE_SHIFT)) & HSADC_CTRL1_ZCIE_MASK)
  11990. #define HSADC_CTRL1_EOSIEA_MASK (0x800U)
  11991. #define HSADC_CTRL1_EOSIEA_SHIFT (11U)
  11992. /*! EOSIEA - End Of Scan Interrupt Enable
  11993. * 0b0..Interrupt disabled
  11994. * 0b1..Interrupt enabled
  11995. */
  11996. #define HSADC_CTRL1_EOSIEA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_EOSIEA_SHIFT)) & HSADC_CTRL1_EOSIEA_MASK)
  11997. #define HSADC_CTRL1_SYNCA_MASK (0x1000U)
  11998. #define HSADC_CTRL1_SYNCA_SHIFT (12U)
  11999. /*! SYNCA - SYNCA Enable
  12000. * 0b0..Scan is initiated by a write to CTRL1[STARTA] only
  12001. * 0b1..Use a SYNCA input pulse or CTRL1[STARTA] to initiate a scan
  12002. */
  12003. #define HSADC_CTRL1_SYNCA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_SYNCA_SHIFT)) & HSADC_CTRL1_SYNCA_MASK)
  12004. #define HSADC_CTRL1_STARTA_MASK (0x2000U)
  12005. #define HSADC_CTRL1_STARTA_SHIFT (13U)
  12006. /*! STARTA - STARTA Conversion
  12007. * 0b0..No action
  12008. * 0b1..Start command is issued
  12009. */
  12010. #define HSADC_CTRL1_STARTA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_STARTA_SHIFT)) & HSADC_CTRL1_STARTA_MASK)
  12011. #define HSADC_CTRL1_STOPA_MASK (0x4000U)
  12012. #define HSADC_CTRL1_STOPA_SHIFT (14U)
  12013. /*! STOPA - Stop
  12014. * 0b0..Normal operation
  12015. * 0b1..Stop mode
  12016. */
  12017. #define HSADC_CTRL1_STOPA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_STOPA_SHIFT)) & HSADC_CTRL1_STOPA_MASK)
  12018. #define HSADC_CTRL1_DMAENA_MASK (0x8000U)
  12019. #define HSADC_CTRL1_DMAENA_SHIFT (15U)
  12020. /*! DMAENA - DMA enable
  12021. * 0b0..DMA is not enabled.
  12022. * 0b1..DMA is enabled.
  12023. */
  12024. #define HSADC_CTRL1_DMAENA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL1_DMAENA_SHIFT)) & HSADC_CTRL1_DMAENA_MASK)
  12025. /*! @} */
  12026. /*! @name CTRL2 - HSADC Control Register 2 */
  12027. /*! @{ */
  12028. #define HSADC_CTRL2_DIVA_MASK (0x3FU)
  12029. #define HSADC_CTRL2_DIVA_SHIFT (0U)
  12030. #define HSADC_CTRL2_DIVA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_DIVA_SHIFT)) & HSADC_CTRL2_DIVA_MASK)
  12031. #define HSADC_CTRL2_SIMULT_MASK (0x40U)
  12032. #define HSADC_CTRL2_SIMULT_SHIFT (6U)
  12033. /*! SIMULT - Simultaneous mode
  12034. * 0b0..Parallel scans done independently
  12035. * 0b1..Parallel scans done simultaneously (default)
  12036. */
  12037. #define HSADC_CTRL2_SIMULT(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_SIMULT_SHIFT)) & HSADC_CTRL2_SIMULT_MASK)
  12038. #define HSADC_CTRL2_CHNCFG_H_MASK (0x780U)
  12039. #define HSADC_CTRL2_CHNCFG_H_SHIFT (7U)
  12040. /*! CHNCFG_H - CHNCFG_H (Channel Configure High) bits
  12041. * 0bxxx1..Inputs = ANA4-ANA5
  12042. * 0bxxx0..Inputs = ANA4-ANA5
  12043. * 0bxx1x..Inputs = ANA6-ANA7
  12044. * 0bxx0x..Inputs = ANA6-ANA7
  12045. * 0bx1xx..Inputs = ANB4-ANB5
  12046. * 0bx0xx..Inputs = ANB4-ANB5
  12047. * 0b1xxx..Inputs = ANB6-ANB7
  12048. */
  12049. #define HSADC_CTRL2_CHNCFG_H(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_CHNCFG_H_SHIFT)) & HSADC_CTRL2_CHNCFG_H_MASK)
  12050. #define HSADC_CTRL2_EOSIEB_MASK (0x800U)
  12051. #define HSADC_CTRL2_EOSIEB_SHIFT (11U)
  12052. /*! EOSIEB - End Of Scan Interrupt Enable
  12053. * 0b0..Interrupt disabled
  12054. * 0b1..Interrupt enabled
  12055. */
  12056. #define HSADC_CTRL2_EOSIEB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_EOSIEB_SHIFT)) & HSADC_CTRL2_EOSIEB_MASK)
  12057. #define HSADC_CTRL2_SYNCB_MASK (0x1000U)
  12058. #define HSADC_CTRL2_SYNCB_SHIFT (12U)
  12059. /*! SYNCB - SYNCB Enable
  12060. * 0b0..B converter parallel scan is initiated by a write to CTRL2[STARTB] only
  12061. * 0b1..Use a SYNCB input pulse or CTRL2[STARTB] to initiate a B converter parallel scan
  12062. */
  12063. #define HSADC_CTRL2_SYNCB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_SYNCB_SHIFT)) & HSADC_CTRL2_SYNCB_MASK)
  12064. #define HSADC_CTRL2_STARTB_MASK (0x2000U)
  12065. #define HSADC_CTRL2_STARTB_SHIFT (13U)
  12066. /*! STARTB - STARTB Conversion
  12067. * 0b0..No action
  12068. * 0b1..Start command is issued
  12069. */
  12070. #define HSADC_CTRL2_STARTB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_STARTB_SHIFT)) & HSADC_CTRL2_STARTB_MASK)
  12071. #define HSADC_CTRL2_STOPB_MASK (0x4000U)
  12072. #define HSADC_CTRL2_STOPB_SHIFT (14U)
  12073. /*! STOPB - Stop
  12074. * 0b0..Normal operation
  12075. * 0b1..Stop mode
  12076. */
  12077. #define HSADC_CTRL2_STOPB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_STOPB_SHIFT)) & HSADC_CTRL2_STOPB_MASK)
  12078. #define HSADC_CTRL2_DMAENB_MASK (0x8000U)
  12079. #define HSADC_CTRL2_DMAENB_SHIFT (15U)
  12080. /*! DMAENB - DMA enable
  12081. * 0b0..DMA is not enabled.
  12082. * 0b1..DMA is enabled.
  12083. */
  12084. #define HSADC_CTRL2_DMAENB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL2_DMAENB_SHIFT)) & HSADC_CTRL2_DMAENB_MASK)
  12085. /*! @} */
  12086. /*! @name ZXCTRL1 - HSADC Zero Crossing Control 1 Register */
  12087. /*! @{ */
  12088. #define HSADC_ZXCTRL1_ZCE0_MASK (0x3U)
  12089. #define HSADC_ZXCTRL1_ZCE0_SHIFT (0U)
  12090. /*! ZCE0 - Zero crossing enable 0
  12091. * 0b00..Zero Crossing disabled
  12092. * 0b01..Zero Crossing enabled for positive to negative sign change
  12093. * 0b10..Zero Crossing enabled for negative to positive sign change
  12094. * 0b11..Zero Crossing enabled for any sign change
  12095. */
  12096. #define HSADC_ZXCTRL1_ZCE0(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE0_SHIFT)) & HSADC_ZXCTRL1_ZCE0_MASK)
  12097. #define HSADC_ZXCTRL1_ZCE1_MASK (0xCU)
  12098. #define HSADC_ZXCTRL1_ZCE1_SHIFT (2U)
  12099. /*! ZCE1 - Zero crossing enable 1
  12100. * 0b00..Zero Crossing disabled
  12101. * 0b01..Zero Crossing enabled for positive to negative sign change
  12102. * 0b10..Zero Crossing enabled for negative to positive sign change
  12103. * 0b11..Zero Crossing enabled for any sign change
  12104. */
  12105. #define HSADC_ZXCTRL1_ZCE1(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE1_SHIFT)) & HSADC_ZXCTRL1_ZCE1_MASK)
  12106. #define HSADC_ZXCTRL1_ZCE2_MASK (0x30U)
  12107. #define HSADC_ZXCTRL1_ZCE2_SHIFT (4U)
  12108. /*! ZCE2 - Zero crossing enable 2
  12109. * 0b00..Zero Crossing disabled
  12110. * 0b01..Zero Crossing enabled for positive to negative sign change
  12111. * 0b10..Zero Crossing enabled for negative to positive sign change
  12112. * 0b11..Zero Crossing enabled for any sign change
  12113. */
  12114. #define HSADC_ZXCTRL1_ZCE2(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE2_SHIFT)) & HSADC_ZXCTRL1_ZCE2_MASK)
  12115. #define HSADC_ZXCTRL1_ZCE3_MASK (0xC0U)
  12116. #define HSADC_ZXCTRL1_ZCE3_SHIFT (6U)
  12117. /*! ZCE3 - Zero crossing enable 3
  12118. * 0b00..Zero Crossing disabled
  12119. * 0b01..Zero Crossing enabled for positive to negative sign change
  12120. * 0b10..Zero Crossing enabled for negative to positive sign change
  12121. * 0b11..Zero Crossing enabled for any sign change
  12122. */
  12123. #define HSADC_ZXCTRL1_ZCE3(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE3_SHIFT)) & HSADC_ZXCTRL1_ZCE3_MASK)
  12124. #define HSADC_ZXCTRL1_ZCE4_MASK (0x300U)
  12125. #define HSADC_ZXCTRL1_ZCE4_SHIFT (8U)
  12126. /*! ZCE4 - Zero crossing enable 4
  12127. * 0b00..Zero Crossing disabled
  12128. * 0b01..Zero Crossing enabled for positive to negative sign change
  12129. * 0b10..Zero Crossing enabled for negative to positive sign change
  12130. * 0b11..Zero Crossing enabled for any sign change
  12131. */
  12132. #define HSADC_ZXCTRL1_ZCE4(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE4_SHIFT)) & HSADC_ZXCTRL1_ZCE4_MASK)
  12133. #define HSADC_ZXCTRL1_ZCE5_MASK (0xC00U)
  12134. #define HSADC_ZXCTRL1_ZCE5_SHIFT (10U)
  12135. /*! ZCE5 - Zero crossing enable 5
  12136. * 0b00..Zero Crossing disabled
  12137. * 0b01..Zero Crossing enabled for positive to negative sign change
  12138. * 0b10..Zero Crossing enabled for negative to positive sign change
  12139. * 0b11..Zero Crossing enabled for any sign change
  12140. */
  12141. #define HSADC_ZXCTRL1_ZCE5(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE5_SHIFT)) & HSADC_ZXCTRL1_ZCE5_MASK)
  12142. #define HSADC_ZXCTRL1_ZCE6_MASK (0x3000U)
  12143. #define HSADC_ZXCTRL1_ZCE6_SHIFT (12U)
  12144. /*! ZCE6 - Zero crossing enable 6
  12145. * 0b00..Zero Crossing disabled
  12146. * 0b01..Zero Crossing enabled for positive to negative sign change
  12147. * 0b10..Zero Crossing enabled for negative to positive sign change
  12148. * 0b11..Zero Crossing enabled for any sign change
  12149. */
  12150. #define HSADC_ZXCTRL1_ZCE6(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE6_SHIFT)) & HSADC_ZXCTRL1_ZCE6_MASK)
  12151. #define HSADC_ZXCTRL1_ZCE7_MASK (0xC000U)
  12152. #define HSADC_ZXCTRL1_ZCE7_SHIFT (14U)
  12153. /*! ZCE7 - Zero crossing enable 7
  12154. * 0b00..Zero Crossing disabled
  12155. * 0b01..Zero Crossing enabled for positive to negative sign change
  12156. * 0b10..Zero Crossing enabled for negative to positive sign change
  12157. * 0b11..Zero Crossing enabled for any sign change
  12158. */
  12159. #define HSADC_ZXCTRL1_ZCE7(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL1_ZCE7_SHIFT)) & HSADC_ZXCTRL1_ZCE7_MASK)
  12160. /*! @} */
  12161. /*! @name ZXCTRL2 - HSADC Zero Crossing Control 2 Register */
  12162. /*! @{ */
  12163. #define HSADC_ZXCTRL2_ZCE8_MASK (0x3U)
  12164. #define HSADC_ZXCTRL2_ZCE8_SHIFT (0U)
  12165. /*! ZCE8 - Zero crossing enable 8
  12166. * 0b00..Zero Crossing disabled
  12167. * 0b01..Zero Crossing enabled for positive to negative sign change
  12168. * 0b10..Zero Crossing enabled for negative to positive sign change
  12169. * 0b11..Zero Crossing enabled for any sign change
  12170. */
  12171. #define HSADC_ZXCTRL2_ZCE8(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE8_SHIFT)) & HSADC_ZXCTRL2_ZCE8_MASK)
  12172. #define HSADC_ZXCTRL2_ZCE9_MASK (0xCU)
  12173. #define HSADC_ZXCTRL2_ZCE9_SHIFT (2U)
  12174. /*! ZCE9 - Zero crossing enable 9
  12175. * 0b00..Zero Crossing disabled
  12176. * 0b01..Zero Crossing enabled for positive to negative sign change
  12177. * 0b10..Zero Crossing enabled for negative to positive sign change
  12178. * 0b11..Zero Crossing enabled for any sign change
  12179. */
  12180. #define HSADC_ZXCTRL2_ZCE9(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE9_SHIFT)) & HSADC_ZXCTRL2_ZCE9_MASK)
  12181. #define HSADC_ZXCTRL2_ZCE10_MASK (0x30U)
  12182. #define HSADC_ZXCTRL2_ZCE10_SHIFT (4U)
  12183. /*! ZCE10 - Zero crossing enable 10
  12184. * 0b00..Zero Crossing disabled
  12185. * 0b01..Zero Crossing enabled for positive to negative sign change
  12186. * 0b10..Zero Crossing enabled for negative to positive sign change
  12187. * 0b11..Zero Crossing enabled for any sign change
  12188. */
  12189. #define HSADC_ZXCTRL2_ZCE10(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE10_SHIFT)) & HSADC_ZXCTRL2_ZCE10_MASK)
  12190. #define HSADC_ZXCTRL2_ZCE11_MASK (0xC0U)
  12191. #define HSADC_ZXCTRL2_ZCE11_SHIFT (6U)
  12192. /*! ZCE11 - Zero crossing enable 11
  12193. * 0b00..Zero Crossing disabled
  12194. * 0b01..Zero Crossing enabled for positive to negative sign change
  12195. * 0b10..Zero Crossing enabled for negative to positive sign change
  12196. * 0b11..Zero Crossing enabled for any sign change
  12197. */
  12198. #define HSADC_ZXCTRL2_ZCE11(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE11_SHIFT)) & HSADC_ZXCTRL2_ZCE11_MASK)
  12199. #define HSADC_ZXCTRL2_ZCE12_MASK (0x300U)
  12200. #define HSADC_ZXCTRL2_ZCE12_SHIFT (8U)
  12201. /*! ZCE12 - Zero crossing enable 12
  12202. * 0b00..Zero Crossing disabled
  12203. * 0b01..Zero Crossing enabled for positive to negative sign change
  12204. * 0b10..Zero Crossing enabled for negative to positive sign change
  12205. * 0b11..Zero Crossing enabled for any sign change
  12206. */
  12207. #define HSADC_ZXCTRL2_ZCE12(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE12_SHIFT)) & HSADC_ZXCTRL2_ZCE12_MASK)
  12208. #define HSADC_ZXCTRL2_ZCE13_MASK (0xC00U)
  12209. #define HSADC_ZXCTRL2_ZCE13_SHIFT (10U)
  12210. /*! ZCE13 - Zero crossing enable 13
  12211. * 0b00..Zero Crossing disabled
  12212. * 0b01..Zero Crossing enabled for positive to negative sign change
  12213. * 0b10..Zero Crossing enabled for negative to positive sign change
  12214. * 0b11..Zero Crossing enabled for any sign change
  12215. */
  12216. #define HSADC_ZXCTRL2_ZCE13(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE13_SHIFT)) & HSADC_ZXCTRL2_ZCE13_MASK)
  12217. #define HSADC_ZXCTRL2_ZCE14_MASK (0x3000U)
  12218. #define HSADC_ZXCTRL2_ZCE14_SHIFT (12U)
  12219. /*! ZCE14 - Zero crossing enable 14
  12220. * 0b00..Zero Crossing disabled
  12221. * 0b01..Zero Crossing enabled for positive to negative sign change
  12222. * 0b10..Zero Crossing enabled for negative to positive sign change
  12223. * 0b11..Zero Crossing enabled for any sign change
  12224. */
  12225. #define HSADC_ZXCTRL2_ZCE14(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE14_SHIFT)) & HSADC_ZXCTRL2_ZCE14_MASK)
  12226. #define HSADC_ZXCTRL2_ZCE15_MASK (0xC000U)
  12227. #define HSADC_ZXCTRL2_ZCE15_SHIFT (14U)
  12228. /*! ZCE15 - Zero crossing enable 15
  12229. * 0b00..Zero Crossing disabled
  12230. * 0b01..Zero Crossing enabled for positive to negative sign change
  12231. * 0b10..Zero Crossing enabled for negative to positive sign change
  12232. * 0b11..Zero Crossing enabled for any sign change
  12233. */
  12234. #define HSADC_ZXCTRL2_ZCE15(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXCTRL2_ZCE15_SHIFT)) & HSADC_ZXCTRL2_ZCE15_MASK)
  12235. /*! @} */
  12236. /*! @name CLIST1 - HSADC Channel List Register 1 */
  12237. /*! @{ */
  12238. #define HSADC_CLIST1_SAMPLE0_MASK (0xFU)
  12239. #define HSADC_CLIST1_SAMPLE0_SHIFT (0U)
  12240. /*! SAMPLE0 - Sample Field 0
  12241. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12242. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12243. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12244. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12245. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12246. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12247. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12248. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12249. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12250. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12251. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12252. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12253. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12254. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12255. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12256. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12257. */
  12258. #define HSADC_CLIST1_SAMPLE0(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST1_SAMPLE0_SHIFT)) & HSADC_CLIST1_SAMPLE0_MASK)
  12259. #define HSADC_CLIST1_SAMPLE1_MASK (0xF0U)
  12260. #define HSADC_CLIST1_SAMPLE1_SHIFT (4U)
  12261. /*! SAMPLE1 - Sample Field 1
  12262. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12263. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12264. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12265. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12266. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12267. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12268. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12269. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12270. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12271. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12272. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12273. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12274. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12275. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12276. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12277. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12278. */
  12279. #define HSADC_CLIST1_SAMPLE1(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST1_SAMPLE1_SHIFT)) & HSADC_CLIST1_SAMPLE1_MASK)
  12280. #define HSADC_CLIST1_SAMPLE2_MASK (0xF00U)
  12281. #define HSADC_CLIST1_SAMPLE2_SHIFT (8U)
  12282. /*! SAMPLE2 - Sample Field 2
  12283. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12284. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12285. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12286. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12287. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12288. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12289. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12290. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12291. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12292. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12293. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12294. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12295. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12296. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12297. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12298. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12299. */
  12300. #define HSADC_CLIST1_SAMPLE2(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST1_SAMPLE2_SHIFT)) & HSADC_CLIST1_SAMPLE2_MASK)
  12301. #define HSADC_CLIST1_SAMPLE3_MASK (0xF000U)
  12302. #define HSADC_CLIST1_SAMPLE3_SHIFT (12U)
  12303. /*! SAMPLE3 - Sample Field 3
  12304. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12305. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12306. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12307. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12308. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12309. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12310. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12311. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12312. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12313. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12314. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12315. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12316. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12317. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12318. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12319. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12320. */
  12321. #define HSADC_CLIST1_SAMPLE3(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST1_SAMPLE3_SHIFT)) & HSADC_CLIST1_SAMPLE3_MASK)
  12322. /*! @} */
  12323. /*! @name CLIST2 - HSADC Channel List Register 2 */
  12324. /*! @{ */
  12325. #define HSADC_CLIST2_SAMPLE4_MASK (0xFU)
  12326. #define HSADC_CLIST2_SAMPLE4_SHIFT (0U)
  12327. /*! SAMPLE4 - Sample Field 4
  12328. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12329. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12330. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12331. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12332. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12333. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12334. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12335. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12336. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12337. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12338. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12339. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12340. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12341. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12342. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12343. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12344. */
  12345. #define HSADC_CLIST2_SAMPLE4(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST2_SAMPLE4_SHIFT)) & HSADC_CLIST2_SAMPLE4_MASK)
  12346. #define HSADC_CLIST2_SAMPLE5_MASK (0xF0U)
  12347. #define HSADC_CLIST2_SAMPLE5_SHIFT (4U)
  12348. /*! SAMPLE5 - Sample Field 5
  12349. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12350. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12351. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12352. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12353. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12354. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12355. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12356. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12357. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12358. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12359. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12360. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12361. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12362. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12363. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12364. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12365. */
  12366. #define HSADC_CLIST2_SAMPLE5(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST2_SAMPLE5_SHIFT)) & HSADC_CLIST2_SAMPLE5_MASK)
  12367. #define HSADC_CLIST2_SAMPLE6_MASK (0xF00U)
  12368. #define HSADC_CLIST2_SAMPLE6_SHIFT (8U)
  12369. /*! SAMPLE6 - Sample Field 6
  12370. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12371. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12372. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12373. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12374. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12375. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12376. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12377. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12378. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12379. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12380. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12381. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12382. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12383. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12384. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12385. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12386. */
  12387. #define HSADC_CLIST2_SAMPLE6(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST2_SAMPLE6_SHIFT)) & HSADC_CLIST2_SAMPLE6_MASK)
  12388. #define HSADC_CLIST2_SAMPLE7_MASK (0xF000U)
  12389. #define HSADC_CLIST2_SAMPLE7_SHIFT (12U)
  12390. /*! SAMPLE7 - Sample Field 7
  12391. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12392. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12393. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12394. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12395. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12396. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12397. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12398. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12399. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12400. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12401. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12402. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12403. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12404. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12405. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12406. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12407. */
  12408. #define HSADC_CLIST2_SAMPLE7(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST2_SAMPLE7_SHIFT)) & HSADC_CLIST2_SAMPLE7_MASK)
  12409. /*! @} */
  12410. /*! @name CLIST3 - HSADC Channel List Register 3 */
  12411. /*! @{ */
  12412. #define HSADC_CLIST3_SAMPLE8_MASK (0xFU)
  12413. #define HSADC_CLIST3_SAMPLE8_SHIFT (0U)
  12414. /*! SAMPLE8 - Sample Field 8
  12415. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12416. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12417. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12418. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12419. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12420. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12421. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12422. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12423. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12424. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12425. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12426. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12427. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12428. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12429. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12430. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12431. */
  12432. #define HSADC_CLIST3_SAMPLE8(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST3_SAMPLE8_SHIFT)) & HSADC_CLIST3_SAMPLE8_MASK)
  12433. #define HSADC_CLIST3_SAMPLE9_MASK (0xF0U)
  12434. #define HSADC_CLIST3_SAMPLE9_SHIFT (4U)
  12435. /*! SAMPLE9 - Sample Field 9
  12436. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12437. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12438. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12439. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12440. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12441. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12442. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12443. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12444. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12445. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12446. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12447. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12448. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12449. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12450. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12451. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12452. */
  12453. #define HSADC_CLIST3_SAMPLE9(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST3_SAMPLE9_SHIFT)) & HSADC_CLIST3_SAMPLE9_MASK)
  12454. #define HSADC_CLIST3_SAMPLE10_MASK (0xF00U)
  12455. #define HSADC_CLIST3_SAMPLE10_SHIFT (8U)
  12456. /*! SAMPLE10 - Sample Field 10
  12457. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12458. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12459. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12460. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12461. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12462. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12463. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12464. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12465. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12466. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12467. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12468. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12469. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12470. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12471. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12472. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12473. */
  12474. #define HSADC_CLIST3_SAMPLE10(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST3_SAMPLE10_SHIFT)) & HSADC_CLIST3_SAMPLE10_MASK)
  12475. #define HSADC_CLIST3_SAMPLE11_MASK (0xF000U)
  12476. #define HSADC_CLIST3_SAMPLE11_SHIFT (12U)
  12477. /*! SAMPLE11 - Sample Field 11
  12478. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12479. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12480. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12481. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12482. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12483. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12484. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12485. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12486. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12487. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12488. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12489. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12490. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12491. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12492. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12493. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12494. */
  12495. #define HSADC_CLIST3_SAMPLE11(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST3_SAMPLE11_SHIFT)) & HSADC_CLIST3_SAMPLE11_MASK)
  12496. /*! @} */
  12497. /*! @name CLIST4 - HSADC Channel List Register 4 */
  12498. /*! @{ */
  12499. #define HSADC_CLIST4_SAMPLE12_MASK (0xFU)
  12500. #define HSADC_CLIST4_SAMPLE12_SHIFT (0U)
  12501. /*! SAMPLE12 - Sample Field 12
  12502. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12503. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12504. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12505. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12506. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12507. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12508. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12509. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12510. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12511. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12512. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12513. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12514. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12515. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12516. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12517. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12518. */
  12519. #define HSADC_CLIST4_SAMPLE12(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST4_SAMPLE12_SHIFT)) & HSADC_CLIST4_SAMPLE12_MASK)
  12520. #define HSADC_CLIST4_SAMPLE13_MASK (0xF0U)
  12521. #define HSADC_CLIST4_SAMPLE13_SHIFT (4U)
  12522. /*! SAMPLE13 - Sample Field 13
  12523. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12524. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12525. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12526. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12527. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12528. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12529. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12530. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12531. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12532. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12533. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12534. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12535. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12536. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12537. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12538. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12539. */
  12540. #define HSADC_CLIST4_SAMPLE13(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST4_SAMPLE13_SHIFT)) & HSADC_CLIST4_SAMPLE13_MASK)
  12541. #define HSADC_CLIST4_SAMPLE14_MASK (0xF00U)
  12542. #define HSADC_CLIST4_SAMPLE14_SHIFT (8U)
  12543. /*! SAMPLE14 - Sample Field 14
  12544. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12545. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12546. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12547. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12548. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12549. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12550. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12551. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12552. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12553. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12554. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12555. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12556. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12557. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12558. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-
  12559. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12560. */
  12561. #define HSADC_CLIST4_SAMPLE14(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST4_SAMPLE14_SHIFT)) & HSADC_CLIST4_SAMPLE14_MASK)
  12562. #define HSADC_CLIST4_SAMPLE15_MASK (0xF000U)
  12563. #define HSADC_CLIST4_SAMPLE15_SHIFT (12U)
  12564. /*! SAMPLE15 - Sample Field 15
  12565. * 0b0000..Single Ended: ANA0, Differential: ANA0+, ANA1-
  12566. * 0b0001..Single Ended: ANA1, Differential: ANA0+, ANA1-
  12567. * 0b0010..Single Ended: ANA2, Differential: ANA2+, ANA3-
  12568. * 0b0011..Single Ended: ANA3, Differential: ANA2+, ANA3-
  12569. * 0b0100..Single Ended: ANA4, Differential: ANA4+, ANA5-
  12570. * 0b0101..Single Ended: ANA5, Differential: ANA4+, ANA5-
  12571. * 0b0110..Single Ended: ANA6, Differential: ANA6+, ANA7-
  12572. * 0b0111..Single Ended: ANA7, Differential: ANA6+, ANA7-
  12573. * 0b1000..Single Ended: ANB0, Differential: ANB0+, ANB1-
  12574. * 0b1001..Single Ended: ANB1, Differential: ANB0+, ANB1-
  12575. * 0b1010..Single Ended: ANB2, Differential: ANB2+, ANB3-
  12576. * 0b1011..Single Ended: ANB3, Differential: ANB2+, ANB3-
  12577. * 0b1100..Single Ended: ANB4, Differential: ANB4+, ANB5-
  12578. * 0b1101..Single Ended: ANB5, Differential: ANB4+, ANB5-
  12579. * 0b1110..Single Ended: ANB6, Differential: ANB6+, ANB7-. See Input Multiplex Function section for more details.
  12580. * 0b1111..Single Ended: ANB7, Differential: ANB6+, ANB7-
  12581. */
  12582. #define HSADC_CLIST4_SAMPLE15(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CLIST4_SAMPLE15_SHIFT)) & HSADC_CLIST4_SAMPLE15_MASK)
  12583. /*! @} */
  12584. /*! @name SDIS - HSADC Sample Disable Register */
  12585. /*! @{ */
  12586. #define HSADC_SDIS_DS_MASK (0xFFFFU)
  12587. #define HSADC_SDIS_DS_SHIFT (0U)
  12588. /*! DS - Disable Sample Bits
  12589. * 0b0000000000000000..SAMPLEx channel is enabled for HSADC scan.
  12590. * 0b0000000000000001..SAMPLEx channel is disabled for HSADC scan and corresponding channels after SAMPLEx will also not occur in an HSADC scan.
  12591. */
  12592. #define HSADC_SDIS_DS(x) (((uint16_t)(((uint16_t)(x)) << HSADC_SDIS_DS_SHIFT)) & HSADC_SDIS_DS_MASK)
  12593. /*! @} */
  12594. /*! @name STAT - HSADC Status Register */
  12595. /*! @{ */
  12596. #define HSADC_STAT_CALONA_MASK (0x1U)
  12597. #define HSADC_STAT_CALONA_SHIFT (0U)
  12598. /*! CALONA - HSADCA Calibration execution status
  12599. * 0b0..Calibration is not running
  12600. * 0b1..ADCA is running calibration conversions
  12601. */
  12602. #define HSADC_STAT_CALONA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_CALONA_SHIFT)) & HSADC_STAT_CALONA_MASK)
  12603. #define HSADC_STAT_CALONB_MASK (0x2U)
  12604. #define HSADC_STAT_CALONB_SHIFT (1U)
  12605. /*! CALONB - HSADCB Calibration execution status
  12606. * 0b0..Calibration is not running
  12607. * 0b1..ADCB is running calibration conversions
  12608. */
  12609. #define HSADC_STAT_CALONB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_CALONB_SHIFT)) & HSADC_STAT_CALONB_MASK)
  12610. #define HSADC_STAT_DUMMYA_MASK (0x4U)
  12611. #define HSADC_STAT_DUMMYA_SHIFT (2U)
  12612. /*! DUMMYA - Dummy conversion running on HSADCA
  12613. * 0b0..Dummy conversion is not running
  12614. * 0b1..Dummy conversion is running on ADCA
  12615. */
  12616. #define HSADC_STAT_DUMMYA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_DUMMYA_SHIFT)) & HSADC_STAT_DUMMYA_MASK)
  12617. #define HSADC_STAT_DUMMYB_MASK (0x8U)
  12618. #define HSADC_STAT_DUMMYB_SHIFT (3U)
  12619. /*! DUMMYB - Dummy conversion running on HSADCB
  12620. * 0b0..Dummy conversion is not running
  12621. * 0b1..Dummy conversion is running on ADCB
  12622. */
  12623. #define HSADC_STAT_DUMMYB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_DUMMYB_SHIFT)) & HSADC_STAT_DUMMYB_MASK)
  12624. #define HSADC_STAT_EOCALIA_MASK (0x10U)
  12625. #define HSADC_STAT_EOCALIA_SHIFT (4U)
  12626. /*! EOCALIA - End of Calibration on ADCA Interrupt
  12627. * 0b0..Calibration is not finished.
  12628. * 0b1..Calibration is finished on ADCA. The IRQ occurs if CALIB[EOCALIEA] is asserted.
  12629. */
  12630. #define HSADC_STAT_EOCALIA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_EOCALIA_SHIFT)) & HSADC_STAT_EOCALIA_MASK)
  12631. #define HSADC_STAT_EOCALIB_MASK (0x20U)
  12632. #define HSADC_STAT_EOCALIB_SHIFT (5U)
  12633. /*! EOCALIB - End of Calibration on ADCB Interrupt
  12634. * 0b0..Calibration is not finished.
  12635. * 0b1..Calibration is finished on ADCB. The IRQ occurs if CALIB[EOCALIEB] is asserted.
  12636. */
  12637. #define HSADC_STAT_EOCALIB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_EOCALIB_SHIFT)) & HSADC_STAT_EOCALIB_MASK)
  12638. #define HSADC_STAT_HLMTI_MASK (0x100U)
  12639. #define HSADC_STAT_HLMTI_SHIFT (8U)
  12640. /*! HLMTI - High Limit Interrupt
  12641. * 0b0..No high limit interrupt request
  12642. * 0b1..High limit exceeded, IRQ pending if CTRL1[HLMTIE] is set
  12643. */
  12644. #define HSADC_STAT_HLMTI(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_HLMTI_SHIFT)) & HSADC_STAT_HLMTI_MASK)
  12645. #define HSADC_STAT_LLMTI_MASK (0x200U)
  12646. #define HSADC_STAT_LLMTI_SHIFT (9U)
  12647. /*! LLMTI - Low Limit Interrupt
  12648. * 0b0..No low limit interrupt request
  12649. * 0b1..Low limit exceeded, IRQ pending if CTRL1[LLMTIE] is set
  12650. */
  12651. #define HSADC_STAT_LLMTI(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_LLMTI_SHIFT)) & HSADC_STAT_LLMTI_MASK)
  12652. #define HSADC_STAT_ZCI_MASK (0x400U)
  12653. #define HSADC_STAT_ZCI_SHIFT (10U)
  12654. /*! ZCI - Zero Crossing Interrupt
  12655. * 0b0..No zero crossing interrupt request
  12656. * 0b1..Zero crossing encountered, IRQ pending if CTRL1[ZCIE] is set
  12657. */
  12658. #define HSADC_STAT_ZCI(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_ZCI_SHIFT)) & HSADC_STAT_ZCI_MASK)
  12659. #define HSADC_STAT_EOSIA_MASK (0x800U)
  12660. #define HSADC_STAT_EOSIA_SHIFT (11U)
  12661. /*! EOSIA - End of Scan Interrupt
  12662. * 0b0..A scan cycle has not been completed, no end of scan IRQ pending
  12663. * 0b1..A scan cycle has been completed, end of scan IRQ pending
  12664. */
  12665. #define HSADC_STAT_EOSIA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_EOSIA_SHIFT)) & HSADC_STAT_EOSIA_MASK)
  12666. #define HSADC_STAT_EOSIB_MASK (0x1000U)
  12667. #define HSADC_STAT_EOSIB_SHIFT (12U)
  12668. /*! EOSIB - End of Scan Interrupt
  12669. * 0b0..A scan cycle has not been completed, no end of scan IRQ pending
  12670. * 0b1..A scan cycle has been completed, end of scan IRQ pending
  12671. */
  12672. #define HSADC_STAT_EOSIB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_EOSIB_SHIFT)) & HSADC_STAT_EOSIB_MASK)
  12673. #define HSADC_STAT_CIPB_MASK (0x4000U)
  12674. #define HSADC_STAT_CIPB_SHIFT (14U)
  12675. /*! CIPB - Conversion in Progress
  12676. * 0b0..Idle state
  12677. * 0b1..A scan cycle is in progress. The HSADC will ignore all sync pulses or start commands
  12678. */
  12679. #define HSADC_STAT_CIPB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_CIPB_SHIFT)) & HSADC_STAT_CIPB_MASK)
  12680. #define HSADC_STAT_CIPA_MASK (0x8000U)
  12681. #define HSADC_STAT_CIPA_SHIFT (15U)
  12682. /*! CIPA - Conversion in Progress
  12683. * 0b0..Idle state
  12684. * 0b1..A scan cycle is in progress. The HSADC will ignore all sync pulses or start commands
  12685. */
  12686. #define HSADC_STAT_CIPA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_STAT_CIPA_SHIFT)) & HSADC_STAT_CIPA_MASK)
  12687. /*! @} */
  12688. /*! @name RDY - HSADC Ready Register */
  12689. /*! @{ */
  12690. #define HSADC_RDY_RDY_MASK (0xFFFFU)
  12691. #define HSADC_RDY_RDY_SHIFT (0U)
  12692. /*! RDY - Ready Sample
  12693. * 0b0000000000000000..Sample not ready or has been read
  12694. * 0b0000000000000001..Sample ready to be read
  12695. */
  12696. #define HSADC_RDY_RDY(x) (((uint16_t)(((uint16_t)(x)) << HSADC_RDY_RDY_SHIFT)) & HSADC_RDY_RDY_MASK)
  12697. /*! @} */
  12698. /*! @name LOLIMSTAT - HSADC Low Limit Status Register */
  12699. /*! @{ */
  12700. #define HSADC_LOLIMSTAT_LLS_MASK (0xFFFFU)
  12701. #define HSADC_LOLIMSTAT_LLS_SHIFT (0U)
  12702. #define HSADC_LOLIMSTAT_LLS(x) (((uint16_t)(((uint16_t)(x)) << HSADC_LOLIMSTAT_LLS_SHIFT)) & HSADC_LOLIMSTAT_LLS_MASK)
  12703. /*! @} */
  12704. /*! @name HILIMSTAT - HSADC High Limit Status Register */
  12705. /*! @{ */
  12706. #define HSADC_HILIMSTAT_HLS_MASK (0xFFFFU)
  12707. #define HSADC_HILIMSTAT_HLS_SHIFT (0U)
  12708. #define HSADC_HILIMSTAT_HLS(x) (((uint16_t)(((uint16_t)(x)) << HSADC_HILIMSTAT_HLS_SHIFT)) & HSADC_HILIMSTAT_HLS_MASK)
  12709. /*! @} */
  12710. /*! @name ZXSTAT - HSADC Zero Crossing Status Register */
  12711. /*! @{ */
  12712. #define HSADC_ZXSTAT_ZCS_MASK (0xFFFFU)
  12713. #define HSADC_ZXSTAT_ZCS_SHIFT (0U)
  12714. /*! ZCS - Zero Crossing Status
  12715. * 0b0000000000000000..Either: A sign change did not occur in a comparison between the current channelx result and the previous channelx result, or Zero crossing control is disabled for channelx in the zero crossing control register, ZXCTRL
  12716. * 0b0000000000000001..In a comparison between the current channelx result and the previous channelx result, a sign change condition occurred as defined in the zero crossing control register (ZXCTRL)
  12717. */
  12718. #define HSADC_ZXSTAT_ZCS(x) (((uint16_t)(((uint16_t)(x)) << HSADC_ZXSTAT_ZCS_SHIFT)) & HSADC_ZXSTAT_ZCS_MASK)
  12719. /*! @} */
  12720. /*! @name RSLT - HSADC Result Registers with sign extension */
  12721. /*! @{ */
  12722. #define HSADC_RSLT_RSLT_MASK (0x7FF8U)
  12723. #define HSADC_RSLT_RSLT_SHIFT (3U)
  12724. #define HSADC_RSLT_RSLT(x) (((uint16_t)(((uint16_t)(x)) << HSADC_RSLT_RSLT_SHIFT)) & HSADC_RSLT_RSLT_MASK)
  12725. #define HSADC_RSLT_SEXT_MASK (0x8000U)
  12726. #define HSADC_RSLT_SEXT_SHIFT (15U)
  12727. #define HSADC_RSLT_SEXT(x) (((uint16_t)(((uint16_t)(x)) << HSADC_RSLT_SEXT_SHIFT)) & HSADC_RSLT_SEXT_MASK)
  12728. /*! @} */
  12729. /* The count of HSADC_RSLT */
  12730. #define HSADC_RSLT_COUNT (16U)
  12731. /*! @name LOLIM - HSADC Low Limit Registers */
  12732. /*! @{ */
  12733. #define HSADC_LOLIM_LLMT_MASK (0x7FF8U)
  12734. #define HSADC_LOLIM_LLMT_SHIFT (3U)
  12735. #define HSADC_LOLIM_LLMT(x) (((uint16_t)(((uint16_t)(x)) << HSADC_LOLIM_LLMT_SHIFT)) & HSADC_LOLIM_LLMT_MASK)
  12736. /*! @} */
  12737. /* The count of HSADC_LOLIM */
  12738. #define HSADC_LOLIM_COUNT (16U)
  12739. /*! @name HILIM - HSADC High Limit Registers */
  12740. /*! @{ */
  12741. #define HSADC_HILIM_HLMT_MASK (0x7FF8U)
  12742. #define HSADC_HILIM_HLMT_SHIFT (3U)
  12743. #define HSADC_HILIM_HLMT(x) (((uint16_t)(((uint16_t)(x)) << HSADC_HILIM_HLMT_SHIFT)) & HSADC_HILIM_HLMT_MASK)
  12744. /*! @} */
  12745. /* The count of HSADC_HILIM */
  12746. #define HSADC_HILIM_COUNT (16U)
  12747. /*! @name OFFST - HSADC Offset Register */
  12748. /*! @{ */
  12749. #define HSADC_OFFST_OFFSET_MASK (0x7FF8U)
  12750. #define HSADC_OFFST_OFFSET_SHIFT (3U)
  12751. #define HSADC_OFFST_OFFSET(x) (((uint16_t)(((uint16_t)(x)) << HSADC_OFFST_OFFSET_SHIFT)) & HSADC_OFFST_OFFSET_MASK)
  12752. /*! @} */
  12753. /* The count of HSADC_OFFST */
  12754. #define HSADC_OFFST_COUNT (16U)
  12755. /*! @name PWR - HSADC Power Control Register */
  12756. /*! @{ */
  12757. #define HSADC_PWR_PDA_MASK (0x1U)
  12758. #define HSADC_PWR_PDA_SHIFT (0U)
  12759. /*! PDA - Manual Power Down for Converter A
  12760. * 0b0..Power Up ADC converter A
  12761. * 0b1..Power Down ADC converter A
  12762. */
  12763. #define HSADC_PWR_PDA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_PDA_SHIFT)) & HSADC_PWR_PDA_MASK)
  12764. #define HSADC_PWR_PDB_MASK (0x2U)
  12765. #define HSADC_PWR_PDB_SHIFT (1U)
  12766. /*! PDB - Manual Power Down for Converter B
  12767. * 0b0..Power Up ADC converter B
  12768. * 0b1..Power Down ADC converter B
  12769. */
  12770. #define HSADC_PWR_PDB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_PDB_SHIFT)) & HSADC_PWR_PDB_MASK)
  12771. #define HSADC_PWR_APD_MASK (0x8U)
  12772. #define HSADC_PWR_APD_SHIFT (3U)
  12773. /*! APD - Auto Powerdown
  12774. * 0b0..Auto Powerdown Mode is not active
  12775. * 0b1..Auto Powerdown Mode is active
  12776. */
  12777. #define HSADC_PWR_APD(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_APD_SHIFT)) & HSADC_PWR_APD_MASK)
  12778. #define HSADC_PWR_PUDELAY_MASK (0x3F0U)
  12779. #define HSADC_PWR_PUDELAY_SHIFT (4U)
  12780. #define HSADC_PWR_PUDELAY(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_PUDELAY_SHIFT)) & HSADC_PWR_PUDELAY_MASK)
  12781. #define HSADC_PWR_PSTSA_MASK (0x400U)
  12782. #define HSADC_PWR_PSTSA_SHIFT (10U)
  12783. /*! PSTSA - ADC Converter A Power Status
  12784. * 0b0..ADC Converter A is currently powered up
  12785. * 0b1..ADC Converter A is currently powered down
  12786. */
  12787. #define HSADC_PWR_PSTSA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_PSTSA_SHIFT)) & HSADC_PWR_PSTSA_MASK)
  12788. #define HSADC_PWR_PSTSB_MASK (0x800U)
  12789. #define HSADC_PWR_PSTSB_SHIFT (11U)
  12790. /*! PSTSB - ADC Converter B Power Status
  12791. * 0b0..ADC Converter B is currently powered up
  12792. * 0b1..ADC Converter B is currently powered down
  12793. */
  12794. #define HSADC_PWR_PSTSB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_PSTSB_SHIFT)) & HSADC_PWR_PSTSB_MASK)
  12795. #define HSADC_PWR_ASB_MASK (0x8000U)
  12796. #define HSADC_PWR_ASB_SHIFT (15U)
  12797. /*! ASB - Auto Standby
  12798. * 0b0..Auto standby mode disabled
  12799. * 0b1..Auto standby mode enabled
  12800. */
  12801. #define HSADC_PWR_ASB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR_ASB_SHIFT)) & HSADC_PWR_ASB_MASK)
  12802. /*! @} */
  12803. /*! @name SCTRL - HSADC Scan Control Register */
  12804. /*! @{ */
  12805. #define HSADC_SCTRL_SC_MASK (0xFFFFU)
  12806. #define HSADC_SCTRL_SC_SHIFT (0U)
  12807. /*! SC - Scan Control Bits
  12808. * 0b0000000000000000..Perform sample immediately after the completion of the current sample.
  12809. * 0b0000000000000001..Delay sample until a new sync input occurs.
  12810. */
  12811. #define HSADC_SCTRL_SC(x) (((uint16_t)(((uint16_t)(x)) << HSADC_SCTRL_SC_SHIFT)) & HSADC_SCTRL_SC_MASK)
  12812. /*! @} */
  12813. /*! @name PWR2 - HSADC Power Control Register 2 */
  12814. /*! @{ */
  12815. #define HSADC_PWR2_DIVB_MASK (0x3F00U)
  12816. #define HSADC_PWR2_DIVB_SHIFT (8U)
  12817. #define HSADC_PWR2_DIVB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_PWR2_DIVB_SHIFT)) & HSADC_PWR2_DIVB_MASK)
  12818. /*! @} */
  12819. /*! @name CTRL3 - HSADC Control Register 3 */
  12820. /*! @{ */
  12821. #define HSADC_CTRL3_DMASRC_MASK (0x40U)
  12822. #define HSADC_CTRL3_DMASRC_SHIFT (6U)
  12823. /*! DMASRC - DMA Trigger Source
  12824. * 0b0..DMA trigger source is end of scan interrupt
  12825. * 0b1..DMA trigger source is RDY bits
  12826. */
  12827. #define HSADC_CTRL3_DMASRC(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL3_DMASRC_SHIFT)) & HSADC_CTRL3_DMASRC_MASK)
  12828. #define HSADC_CTRL3_ADCRES_MASK (0x300U)
  12829. #define HSADC_CTRL3_ADCRES_SHIFT (8U)
  12830. /*! ADCRES - ADCA/B Conversion Resolution
  12831. * 0b00..6-bit mode
  12832. * 0b01..8-bit mode
  12833. * 0b10..10-bit mode
  12834. * 0b11..12-bit mode
  12835. */
  12836. #define HSADC_CTRL3_ADCRES(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CTRL3_ADCRES_SHIFT)) & HSADC_CTRL3_ADCRES_MASK)
  12837. /*! @} */
  12838. /*! @name SCINTEN - HSADC Scan Interrupt Enable Register */
  12839. /*! @{ */
  12840. #define HSADC_SCINTEN_SCINTEN_MASK (0xFFFFU)
  12841. #define HSADC_SCINTEN_SCINTEN_SHIFT (0U)
  12842. /*! SCINTEN - Scan Interrupt Enable
  12843. * 0b0000000000000000..Scan interrupt is not enabled for this sample.
  12844. * 0b0000000000000001..Scan interrupt is enabled for this sample.
  12845. */
  12846. #define HSADC_SCINTEN_SCINTEN(x) (((uint16_t)(((uint16_t)(x)) << HSADC_SCINTEN_SCINTEN_SHIFT)) & HSADC_SCINTEN_SCINTEN_MASK)
  12847. /*! @} */
  12848. /*! @name SAMPTIM - HSADC Sampling Time Configuration Register */
  12849. /*! @{ */
  12850. #define HSADC_SAMPTIM_SAMPT_A_MASK (0xFFU)
  12851. #define HSADC_SAMPTIM_SAMPT_A_SHIFT (0U)
  12852. #define HSADC_SAMPTIM_SAMPT_A(x) (((uint16_t)(((uint16_t)(x)) << HSADC_SAMPTIM_SAMPT_A_SHIFT)) & HSADC_SAMPTIM_SAMPT_A_MASK)
  12853. #define HSADC_SAMPTIM_SAMPT_B_MASK (0xFF00U)
  12854. #define HSADC_SAMPTIM_SAMPT_B_SHIFT (8U)
  12855. #define HSADC_SAMPTIM_SAMPT_B(x) (((uint16_t)(((uint16_t)(x)) << HSADC_SAMPTIM_SAMPT_B_SHIFT)) & HSADC_SAMPTIM_SAMPT_B_MASK)
  12856. /*! @} */
  12857. /*! @name CALIB - HSADCs Calibration Configuration */
  12858. /*! @{ */
  12859. #define HSADC_CALIB_REQSINGA_MASK (0x1U)
  12860. #define HSADC_CALIB_REQSINGA_SHIFT (0U)
  12861. /*! REQSINGA - ADCA Calibration request for single ended mode
  12862. * 0b0..Calibration value calculation is not requested to be run on ADCA.
  12863. * 0b1..Calibration value calculation for single-ended input mode is requested to be run on ADCA.
  12864. */
  12865. #define HSADC_CALIB_REQSINGA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_REQSINGA_SHIFT)) & HSADC_CALIB_REQSINGA_MASK)
  12866. #define HSADC_CALIB_REQDIFA_MASK (0x2U)
  12867. #define HSADC_CALIB_REQDIFA_SHIFT (1U)
  12868. /*! REQDIFA - ADCA Calibration request for differential mode
  12869. * 0b0..Calibration value calculation is not requested to ADCA.
  12870. * 0b1..Calibration value calculation for differential input mode is requested to be run on ADCA.
  12871. */
  12872. #define HSADC_CALIB_REQDIFA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_REQDIFA_SHIFT)) & HSADC_CALIB_REQDIFA_MASK)
  12873. #define HSADC_CALIB_BYPA_MASK (0x4U)
  12874. #define HSADC_CALIB_BYPA_SHIFT (2U)
  12875. /*! BYPA - ADCA calibration bypass
  12876. * 0b0..ADCA block uses the calibration values to obtain the final conversion result (differential or single-ended mode)
  12877. * 0b1..Calibration operation is bypassed on ADCA.
  12878. */
  12879. #define HSADC_CALIB_BYPA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_BYPA_SHIFT)) & HSADC_CALIB_BYPA_MASK)
  12880. #define HSADC_CALIB_CAL_REQA_MASK (0x8U)
  12881. #define HSADC_CALIB_CAL_REQA_SHIFT (3U)
  12882. /*! CAL_REQA - Calibration Request for ADCA
  12883. * 0b0..None.
  12884. * 0b1..Calibration request for ADCA.
  12885. */
  12886. #define HSADC_CALIB_CAL_REQA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_CAL_REQA_SHIFT)) & HSADC_CALIB_CAL_REQA_MASK)
  12887. #define HSADC_CALIB_REQSINGB_MASK (0x10U)
  12888. #define HSADC_CALIB_REQSINGB_SHIFT (4U)
  12889. /*! REQSINGB - ADCB Calibration request for single ended mode
  12890. * 0b0..Calibration value calculation is not requested to be run on ADCB.
  12891. * 0b1..Calibration value calculation for single-ended input mode is requested to be run on ADCB.
  12892. */
  12893. #define HSADC_CALIB_REQSINGB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_REQSINGB_SHIFT)) & HSADC_CALIB_REQSINGB_MASK)
  12894. #define HSADC_CALIB_REQDIFB_MASK (0x20U)
  12895. #define HSADC_CALIB_REQDIFB_SHIFT (5U)
  12896. /*! REQDIFB - ADCB Calibration request for differential mode
  12897. * 0b0..Calibration value calculation is not requested to be run on ADCB.
  12898. * 0b1..Calibration value calculation for differential input mode is requested to be run onr ADCB
  12899. */
  12900. #define HSADC_CALIB_REQDIFB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_REQDIFB_SHIFT)) & HSADC_CALIB_REQDIFB_MASK)
  12901. #define HSADC_CALIB_BYPB_MASK (0x40U)
  12902. #define HSADC_CALIB_BYPB_SHIFT (6U)
  12903. /*! BYPB - ADCB calibration bypass
  12904. * 0b0..ADCB block uses the calibration values to obtain the final conversion result (differential or single-ended mode)
  12905. * 0b1..Calibration operation is bypassed on ADCB.
  12906. */
  12907. #define HSADC_CALIB_BYPB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_BYPB_SHIFT)) & HSADC_CALIB_BYPB_MASK)
  12908. #define HSADC_CALIB_CAL_REQB_MASK (0x80U)
  12909. #define HSADC_CALIB_CAL_REQB_SHIFT (7U)
  12910. /*! CAL_REQB - Calibration Request for ADCB
  12911. * 0b0..Calibration is not requested.
  12912. * 0b1..Calibration is requested for ADCB.
  12913. */
  12914. #define HSADC_CALIB_CAL_REQB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_CAL_REQB_SHIFT)) & HSADC_CALIB_CAL_REQB_MASK)
  12915. #define HSADC_CALIB_EOCALIEA_MASK (0x100U)
  12916. #define HSADC_CALIB_EOCALIEA_SHIFT (8U)
  12917. /*! EOCALIEA - Interrupt Enable for End of Calibration on ADCA
  12918. * 0b0..Interrupt is not enabled.
  12919. * 0b1..Interrupt is enabled.
  12920. */
  12921. #define HSADC_CALIB_EOCALIEA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_EOCALIEA_SHIFT)) & HSADC_CALIB_EOCALIEA_MASK)
  12922. #define HSADC_CALIB_EOCALIEB_MASK (0x200U)
  12923. #define HSADC_CALIB_EOCALIEB_SHIFT (9U)
  12924. /*! EOCALIEB - Interrupt Enable for End of Calibration on ADCB
  12925. * 0b0..Interrupt is not enabled.
  12926. * 0b1..Interrupt is enabled.
  12927. */
  12928. #define HSADC_CALIB_EOCALIEB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALIB_EOCALIEB_SHIFT)) & HSADC_CALIB_EOCALIEB_MASK)
  12929. /*! @} */
  12930. /*! @name CALVAL_A - Calibration Values for ADCA Register */
  12931. /*! @{ */
  12932. #define HSADC_CALVAL_A_CALVSING_MASK (0x7FU)
  12933. #define HSADC_CALVAL_A_CALVSING_SHIFT (0U)
  12934. #define HSADC_CALVAL_A_CALVSING(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALVAL_A_CALVSING_SHIFT)) & HSADC_CALVAL_A_CALVSING_MASK)
  12935. #define HSADC_CALVAL_A_CALVDIF_MASK (0x7F00U)
  12936. #define HSADC_CALVAL_A_CALVDIF_SHIFT (8U)
  12937. #define HSADC_CALVAL_A_CALVDIF(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALVAL_A_CALVDIF_SHIFT)) & HSADC_CALVAL_A_CALVDIF_MASK)
  12938. /*! @} */
  12939. /*! @name CALVAL_B - Calibration Values for ADCB Register */
  12940. /*! @{ */
  12941. #define HSADC_CALVAL_B_CALVSING_MASK (0x7FU)
  12942. #define HSADC_CALVAL_B_CALVSING_SHIFT (0U)
  12943. #define HSADC_CALVAL_B_CALVSING(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALVAL_B_CALVSING_SHIFT)) & HSADC_CALVAL_B_CALVSING_MASK)
  12944. #define HSADC_CALVAL_B_CALVDIF_MASK (0x7F00U)
  12945. #define HSADC_CALVAL_B_CALVDIF_SHIFT (8U)
  12946. #define HSADC_CALVAL_B_CALVDIF(x) (((uint16_t)(((uint16_t)(x)) << HSADC_CALVAL_B_CALVDIF_SHIFT)) & HSADC_CALVAL_B_CALVDIF_MASK)
  12947. /*! @} */
  12948. /*! @name MUX67_SEL - MUX6_7 Selection Controls Register */
  12949. /*! @{ */
  12950. #define HSADC_MUX67_SEL_CH6_SELA_MASK (0x7U)
  12951. #define HSADC_MUX67_SEL_CH6_SELA_SHIFT (0U)
  12952. #define HSADC_MUX67_SEL_CH6_SELA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_MUX67_SEL_CH6_SELA_SHIFT)) & HSADC_MUX67_SEL_CH6_SELA_MASK)
  12953. #define HSADC_MUX67_SEL_CH7_SELA_MASK (0x70U)
  12954. #define HSADC_MUX67_SEL_CH7_SELA_SHIFT (4U)
  12955. #define HSADC_MUX67_SEL_CH7_SELA(x) (((uint16_t)(((uint16_t)(x)) << HSADC_MUX67_SEL_CH7_SELA_SHIFT)) & HSADC_MUX67_SEL_CH7_SELA_MASK)
  12956. #define HSADC_MUX67_SEL_CH6_SELB_MASK (0x700U)
  12957. #define HSADC_MUX67_SEL_CH6_SELB_SHIFT (8U)
  12958. #define HSADC_MUX67_SEL_CH6_SELB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_MUX67_SEL_CH6_SELB_SHIFT)) & HSADC_MUX67_SEL_CH6_SELB_MASK)
  12959. #define HSADC_MUX67_SEL_CH7_SELB_MASK (0x7000U)
  12960. #define HSADC_MUX67_SEL_CH7_SELB_SHIFT (12U)
  12961. #define HSADC_MUX67_SEL_CH7_SELB(x) (((uint16_t)(((uint16_t)(x)) << HSADC_MUX67_SEL_CH7_SELB_SHIFT)) & HSADC_MUX67_SEL_CH7_SELB_MASK)
  12962. /*! @} */
  12963. /*!
  12964. * @}
  12965. */ /* end of group HSADC_Register_Masks */
  12966. /* HSADC - Peripheral instance base addresses */
  12967. /** Peripheral HSADC0 base address */
  12968. #define HSADC0_BASE (0x4005C000u)
  12969. /** Peripheral HSADC0 base pointer */
  12970. #define HSADC0 ((HSADC_Type *)HSADC0_BASE)
  12971. /** Peripheral HSADC1 base address */
  12972. #define HSADC1_BASE (0x400DC000u)
  12973. /** Peripheral HSADC1 base pointer */
  12974. #define HSADC1 ((HSADC_Type *)HSADC1_BASE)
  12975. /** Array initializer of HSADC peripheral base addresses */
  12976. #define HSADC_BASE_ADDRS { HSADC0_BASE, HSADC1_BASE }
  12977. /** Array initializer of HSADC peripheral base pointers */
  12978. #define HSADC_BASE_PTRS { HSADC0, HSADC1 }
  12979. /** Interrupt vectors for the HSADC peripheral type */
  12980. #define HSADC_IRQS { { HSADC0_CCA_IRQn, HSADC0_CCB_IRQn }, { HSADC1_CCA_IRQn, HSADC1_CCB_IRQn } }
  12981. #define HSADC_ERR_IRQS { HSADC_ERR_IRQn, HSADC_ERR_IRQn }
  12982. /*!
  12983. * @}
  12984. */ /* end of group HSADC_Peripheral_Access_Layer */
  12985. /* ----------------------------------------------------------------------------
  12986. -- I2C Peripheral Access Layer
  12987. ---------------------------------------------------------------------------- */
  12988. /*!
  12989. * @addtogroup I2C_Peripheral_Access_Layer I2C Peripheral Access Layer
  12990. * @{
  12991. */
  12992. /** I2C - Register Layout Typedef */
  12993. typedef struct {
  12994. __IO uint8_t A1; /**< I2C Address Register 1, offset: 0x0 */
  12995. __IO uint8_t F; /**< I2C Frequency Divider register, offset: 0x1 */
  12996. __IO uint8_t C1; /**< I2C Control Register 1, offset: 0x2 */
  12997. __IO uint8_t S; /**< I2C Status register, offset: 0x3 */
  12998. __IO uint8_t D; /**< I2C Data I/O register, offset: 0x4 */
  12999. __IO uint8_t C2; /**< I2C Control Register 2, offset: 0x5 */
  13000. __IO uint8_t FLT; /**< I2C Programmable Input Glitch Filter Register, offset: 0x6 */
  13001. __IO uint8_t RA; /**< I2C Range Address register, offset: 0x7 */
  13002. __IO uint8_t SMB; /**< I2C SMBus Control and Status register, offset: 0x8 */
  13003. __IO uint8_t A2; /**< I2C Address Register 2, offset: 0x9 */
  13004. __IO uint8_t SLTH; /**< I2C SCL Low Timeout Register High, offset: 0xA */
  13005. __IO uint8_t SLTL; /**< I2C SCL Low Timeout Register Low, offset: 0xB */
  13006. } I2C_Type;
  13007. /* ----------------------------------------------------------------------------
  13008. -- I2C Register Masks
  13009. ---------------------------------------------------------------------------- */
  13010. /*!
  13011. * @addtogroup I2C_Register_Masks I2C Register Masks
  13012. * @{
  13013. */
  13014. /*! @name A1 - I2C Address Register 1 */
  13015. /*! @{ */
  13016. #define I2C_A1_AD_MASK (0xFEU)
  13017. #define I2C_A1_AD_SHIFT (1U)
  13018. #define I2C_A1_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A1_AD_SHIFT)) & I2C_A1_AD_MASK)
  13019. /*! @} */
  13020. /*! @name F - I2C Frequency Divider register */
  13021. /*! @{ */
  13022. #define I2C_F_ICR_MASK (0x3FU)
  13023. #define I2C_F_ICR_SHIFT (0U)
  13024. #define I2C_F_ICR(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_ICR_SHIFT)) & I2C_F_ICR_MASK)
  13025. #define I2C_F_MULT_MASK (0xC0U)
  13026. #define I2C_F_MULT_SHIFT (6U)
  13027. /*! MULT - Multiplier Factor
  13028. * 0b00..mul = 1
  13029. * 0b01..mul = 2
  13030. * 0b10..mul = 4
  13031. * 0b11..Reserved
  13032. */
  13033. #define I2C_F_MULT(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_MULT_SHIFT)) & I2C_F_MULT_MASK)
  13034. /*! @} */
  13035. /*! @name C1 - I2C Control Register 1 */
  13036. /*! @{ */
  13037. #define I2C_C1_DMAEN_MASK (0x1U)
  13038. #define I2C_C1_DMAEN_SHIFT (0U)
  13039. /*! DMAEN - DMA Enable
  13040. * 0b0..All DMA signalling disabled.
  13041. * 0b1..DMA transfer is enabled. While SMB[FACK] = 0, the following conditions trigger the DMA request: a data byte is received, and either address or data is transmitted. (ACK/NACK is automatic) the first byte received matches the A1 register or is a general call address. If any address matching occurs, S[IAAS] and S[TCF] are set. If the direction of transfer is known from master to slave, then it is not required to check S[SRW]. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted.
  13042. */
  13043. #define I2C_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_DMAEN_SHIFT)) & I2C_C1_DMAEN_MASK)
  13044. #define I2C_C1_WUEN_MASK (0x2U)
  13045. #define I2C_C1_WUEN_SHIFT (1U)
  13046. /*! WUEN - Wakeup Enable
  13047. * 0b0..Normal operation. No interrupt generated when address matching in low power mode.
  13048. * 0b1..Enables the wakeup function in low power mode.
  13049. */
  13050. #define I2C_C1_WUEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_WUEN_SHIFT)) & I2C_C1_WUEN_MASK)
  13051. #define I2C_C1_RSTA_MASK (0x4U)
  13052. #define I2C_C1_RSTA_SHIFT (2U)
  13053. #define I2C_C1_RSTA(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_RSTA_SHIFT)) & I2C_C1_RSTA_MASK)
  13054. #define I2C_C1_TXAK_MASK (0x8U)
  13055. #define I2C_C1_TXAK_SHIFT (3U)
  13056. /*! TXAK - Transmit Acknowledge Enable
  13057. * 0b0..An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set).
  13058. * 0b1..No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set).
  13059. */
  13060. #define I2C_C1_TXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TXAK_SHIFT)) & I2C_C1_TXAK_MASK)
  13061. #define I2C_C1_TX_MASK (0x10U)
  13062. #define I2C_C1_TX_SHIFT (4U)
  13063. /*! TX - Transmit Mode Select
  13064. * 0b0..Receive
  13065. * 0b1..Transmit
  13066. */
  13067. #define I2C_C1_TX(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TX_SHIFT)) & I2C_C1_TX_MASK)
  13068. #define I2C_C1_MST_MASK (0x20U)
  13069. #define I2C_C1_MST_SHIFT (5U)
  13070. /*! MST - Master Mode Select
  13071. * 0b0..Slave mode
  13072. * 0b1..Master mode
  13073. */
  13074. #define I2C_C1_MST(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_MST_SHIFT)) & I2C_C1_MST_MASK)
  13075. #define I2C_C1_IICIE_MASK (0x40U)
  13076. #define I2C_C1_IICIE_SHIFT (6U)
  13077. /*! IICIE - I2C Interrupt Enable
  13078. * 0b0..Disabled
  13079. * 0b1..Enabled
  13080. */
  13081. #define I2C_C1_IICIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICIE_SHIFT)) & I2C_C1_IICIE_MASK)
  13082. #define I2C_C1_IICEN_MASK (0x80U)
  13083. #define I2C_C1_IICEN_SHIFT (7U)
  13084. /*! IICEN - I2C Enable
  13085. * 0b0..Disabled
  13086. * 0b1..Enabled
  13087. */
  13088. #define I2C_C1_IICEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICEN_SHIFT)) & I2C_C1_IICEN_MASK)
  13089. /*! @} */
  13090. /*! @name S - I2C Status register */
  13091. /*! @{ */
  13092. #define I2C_S_RXAK_MASK (0x1U)
  13093. #define I2C_S_RXAK_SHIFT (0U)
  13094. /*! RXAK - Receive Acknowledge
  13095. * 0b0..Acknowledge signal was received after the completion of one byte of data transmission on the bus
  13096. * 0b1..No acknowledge signal detected
  13097. */
  13098. #define I2C_S_RXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RXAK_SHIFT)) & I2C_S_RXAK_MASK)
  13099. #define I2C_S_IICIF_MASK (0x2U)
  13100. #define I2C_S_IICIF_SHIFT (1U)
  13101. /*! IICIF - Interrupt Flag
  13102. * 0b0..No interrupt pending
  13103. * 0b1..Interrupt pending
  13104. */
  13105. #define I2C_S_IICIF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IICIF_SHIFT)) & I2C_S_IICIF_MASK)
  13106. #define I2C_S_SRW_MASK (0x4U)
  13107. #define I2C_S_SRW_SHIFT (2U)
  13108. /*! SRW - Slave Read/Write
  13109. * 0b0..Slave receive, master writing to slave
  13110. * 0b1..Slave transmit, master reading from slave
  13111. */
  13112. #define I2C_S_SRW(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_SRW_SHIFT)) & I2C_S_SRW_MASK)
  13113. #define I2C_S_RAM_MASK (0x8U)
  13114. #define I2C_S_RAM_SHIFT (3U)
  13115. /*! RAM - Range Address Match
  13116. * 0b0..Not addressed
  13117. * 0b1..Addressed as a slave
  13118. */
  13119. #define I2C_S_RAM(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RAM_SHIFT)) & I2C_S_RAM_MASK)
  13120. #define I2C_S_ARBL_MASK (0x10U)
  13121. #define I2C_S_ARBL_SHIFT (4U)
  13122. /*! ARBL - Arbitration Lost
  13123. * 0b0..Standard bus operation.
  13124. * 0b1..Loss of arbitration.
  13125. */
  13126. #define I2C_S_ARBL(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_ARBL_SHIFT)) & I2C_S_ARBL_MASK)
  13127. #define I2C_S_BUSY_MASK (0x20U)
  13128. #define I2C_S_BUSY_SHIFT (5U)
  13129. /*! BUSY - Bus Busy
  13130. * 0b0..Bus is idle
  13131. * 0b1..Bus is busy
  13132. */
  13133. #define I2C_S_BUSY(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_BUSY_SHIFT)) & I2C_S_BUSY_MASK)
  13134. #define I2C_S_IAAS_MASK (0x40U)
  13135. #define I2C_S_IAAS_SHIFT (6U)
  13136. /*! IAAS - Addressed As A Slave
  13137. * 0b0..Not addressed
  13138. * 0b1..Addressed as a slave
  13139. */
  13140. #define I2C_S_IAAS(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IAAS_SHIFT)) & I2C_S_IAAS_MASK)
  13141. #define I2C_S_TCF_MASK (0x80U)
  13142. #define I2C_S_TCF_SHIFT (7U)
  13143. /*! TCF - Transfer Complete Flag
  13144. * 0b0..Transfer in progress
  13145. * 0b1..Transfer complete
  13146. */
  13147. #define I2C_S_TCF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_TCF_SHIFT)) & I2C_S_TCF_MASK)
  13148. /*! @} */
  13149. /*! @name D - I2C Data I/O register */
  13150. /*! @{ */
  13151. #define I2C_D_DATA_MASK (0xFFU)
  13152. #define I2C_D_DATA_SHIFT (0U)
  13153. #define I2C_D_DATA(x) (((uint8_t)(((uint8_t)(x)) << I2C_D_DATA_SHIFT)) & I2C_D_DATA_MASK)
  13154. /*! @} */
  13155. /*! @name C2 - I2C Control Register 2 */
  13156. /*! @{ */
  13157. #define I2C_C2_AD_MASK (0x7U)
  13158. #define I2C_C2_AD_SHIFT (0U)
  13159. #define I2C_C2_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_AD_SHIFT)) & I2C_C2_AD_MASK)
  13160. #define I2C_C2_RMEN_MASK (0x8U)
  13161. #define I2C_C2_RMEN_SHIFT (3U)
  13162. /*! RMEN - Range Address Matching Enable
  13163. * 0b0..Range mode disabled. No address matching occurs for an address within the range of values of the A1 and RA registers.
  13164. * 0b1..Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers.
  13165. */
  13166. #define I2C_C2_RMEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_RMEN_SHIFT)) & I2C_C2_RMEN_MASK)
  13167. #define I2C_C2_SBRC_MASK (0x10U)
  13168. #define I2C_C2_SBRC_SHIFT (4U)
  13169. /*! SBRC - Slave Baud Rate Control
  13170. * 0b0..The slave baud rate follows the master baud rate and clock stretching may occur
  13171. * 0b1..Slave baud rate is independent of the master baud rate
  13172. */
  13173. #define I2C_C2_SBRC(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_SBRC_SHIFT)) & I2C_C2_SBRC_MASK)
  13174. #define I2C_C2_HDRS_MASK (0x20U)
  13175. #define I2C_C2_HDRS_SHIFT (5U)
  13176. /*! HDRS - High Drive Select
  13177. * 0b0..Normal drive mode
  13178. * 0b1..High drive mode
  13179. */
  13180. #define I2C_C2_HDRS(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_HDRS_SHIFT)) & I2C_C2_HDRS_MASK)
  13181. #define I2C_C2_ADEXT_MASK (0x40U)
  13182. #define I2C_C2_ADEXT_SHIFT (6U)
  13183. /*! ADEXT - Address Extension
  13184. * 0b0..7-bit address scheme
  13185. * 0b1..10-bit address scheme
  13186. */
  13187. #define I2C_C2_ADEXT(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_ADEXT_SHIFT)) & I2C_C2_ADEXT_MASK)
  13188. #define I2C_C2_GCAEN_MASK (0x80U)
  13189. #define I2C_C2_GCAEN_SHIFT (7U)
  13190. /*! GCAEN - General Call Address Enable
  13191. * 0b0..Disabled
  13192. * 0b1..Enabled
  13193. */
  13194. #define I2C_C2_GCAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_GCAEN_SHIFT)) & I2C_C2_GCAEN_MASK)
  13195. /*! @} */
  13196. /*! @name FLT - I2C Programmable Input Glitch Filter Register */
  13197. /*! @{ */
  13198. #define I2C_FLT_FLT_MASK (0xFU)
  13199. #define I2C_FLT_FLT_SHIFT (0U)
  13200. /*! FLT - I2C Programmable Filter Factor
  13201. * 0b0000..No filter/bypass
  13202. */
  13203. #define I2C_FLT_FLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_FLT_SHIFT)) & I2C_FLT_FLT_MASK)
  13204. #define I2C_FLT_STARTF_MASK (0x10U)
  13205. #define I2C_FLT_STARTF_SHIFT (4U)
  13206. /*! STARTF - I2C Bus Start Detect Flag
  13207. * 0b0..No start happens on I2C bus
  13208. * 0b1..Start detected on I2C bus
  13209. */
  13210. #define I2C_FLT_STARTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STARTF_SHIFT)) & I2C_FLT_STARTF_MASK)
  13211. #define I2C_FLT_SSIE_MASK (0x20U)
  13212. #define I2C_FLT_SSIE_SHIFT (5U)
  13213. /*! SSIE - I2C Bus Stop or Start Interrupt Enable
  13214. * 0b0..Stop or start detection interrupt is disabled
  13215. * 0b1..Stop or start detection interrupt is enabled
  13216. */
  13217. #define I2C_FLT_SSIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SSIE_SHIFT)) & I2C_FLT_SSIE_MASK)
  13218. #define I2C_FLT_STOPF_MASK (0x40U)
  13219. #define I2C_FLT_STOPF_SHIFT (6U)
  13220. /*! STOPF - I2C Bus Stop Detect Flag
  13221. * 0b0..No stop happens on I2C bus
  13222. * 0b1..Stop detected on I2C bus
  13223. */
  13224. #define I2C_FLT_STOPF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STOPF_SHIFT)) & I2C_FLT_STOPF_MASK)
  13225. #define I2C_FLT_SHEN_MASK (0x80U)
  13226. #define I2C_FLT_SHEN_SHIFT (7U)
  13227. /*! SHEN - Stop Hold Enable
  13228. * 0b0..Stop holdoff is disabled. The MCU's entry to stop mode is not gated.
  13229. * 0b1..Stop holdoff is enabled.
  13230. */
  13231. #define I2C_FLT_SHEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SHEN_SHIFT)) & I2C_FLT_SHEN_MASK)
  13232. /*! @} */
  13233. /*! @name RA - I2C Range Address register */
  13234. /*! @{ */
  13235. #define I2C_RA_RAD_MASK (0xFEU)
  13236. #define I2C_RA_RAD_SHIFT (1U)
  13237. #define I2C_RA_RAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_RA_RAD_SHIFT)) & I2C_RA_RAD_MASK)
  13238. /*! @} */
  13239. /*! @name SMB - I2C SMBus Control and Status register */
  13240. /*! @{ */
  13241. #define I2C_SMB_SHTF2IE_MASK (0x1U)
  13242. #define I2C_SMB_SHTF2IE_SHIFT (0U)
  13243. /*! SHTF2IE - SHTF2 Interrupt Enable
  13244. * 0b0..SHTF2 interrupt is disabled
  13245. * 0b1..SHTF2 interrupt is enabled
  13246. */
  13247. #define I2C_SMB_SHTF2IE(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2IE_SHIFT)) & I2C_SMB_SHTF2IE_MASK)
  13248. #define I2C_SMB_SHTF2_MASK (0x2U)
  13249. #define I2C_SMB_SHTF2_SHIFT (1U)
  13250. /*! SHTF2 - SCL High Timeout Flag 2
  13251. * 0b0..No SCL high and SDA low timeout occurs
  13252. * 0b1..SCL high and SDA low timeout occurs
  13253. */
  13254. #define I2C_SMB_SHTF2(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2_SHIFT)) & I2C_SMB_SHTF2_MASK)
  13255. #define I2C_SMB_SHTF1_MASK (0x4U)
  13256. #define I2C_SMB_SHTF1_SHIFT (2U)
  13257. /*! SHTF1 - SCL High Timeout Flag 1
  13258. * 0b0..No SCL high and SDA high timeout occurs
  13259. * 0b1..SCL high and SDA high timeout occurs
  13260. */
  13261. #define I2C_SMB_SHTF1(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF1_SHIFT)) & I2C_SMB_SHTF1_MASK)
  13262. #define I2C_SMB_SLTF_MASK (0x8U)
  13263. #define I2C_SMB_SLTF_SHIFT (3U)
  13264. /*! SLTF - SCL Low Timeout Flag
  13265. * 0b0..No low timeout occurs
  13266. * 0b1..Low timeout occurs
  13267. */
  13268. #define I2C_SMB_SLTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SLTF_SHIFT)) & I2C_SMB_SLTF_MASK)
  13269. #define I2C_SMB_TCKSEL_MASK (0x10U)
  13270. #define I2C_SMB_TCKSEL_SHIFT (4U)
  13271. /*! TCKSEL - Timeout Counter Clock Select
  13272. * 0b0..Timeout counter counts at the frequency of the I2C module clock / 64
  13273. * 0b1..Timeout counter counts at the frequency of the I2C module clock
  13274. */
  13275. #define I2C_SMB_TCKSEL(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_TCKSEL_SHIFT)) & I2C_SMB_TCKSEL_MASK)
  13276. #define I2C_SMB_SIICAEN_MASK (0x20U)
  13277. #define I2C_SMB_SIICAEN_SHIFT (5U)
  13278. /*! SIICAEN - Second I2C Address Enable
  13279. * 0b0..I2C address register 2 matching is disabled
  13280. * 0b1..I2C address register 2 matching is enabled
  13281. */
  13282. #define I2C_SMB_SIICAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SIICAEN_SHIFT)) & I2C_SMB_SIICAEN_MASK)
  13283. #define I2C_SMB_ALERTEN_MASK (0x40U)
  13284. #define I2C_SMB_ALERTEN_SHIFT (6U)
  13285. /*! ALERTEN - SMBus Alert Response Address Enable
  13286. * 0b0..SMBus alert response address matching is disabled
  13287. * 0b1..SMBus alert response address matching is enabled
  13288. */
  13289. #define I2C_SMB_ALERTEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_ALERTEN_SHIFT)) & I2C_SMB_ALERTEN_MASK)
  13290. #define I2C_SMB_FACK_MASK (0x80U)
  13291. #define I2C_SMB_FACK_SHIFT (7U)
  13292. /*! FACK - Fast NACK/ACK Enable
  13293. * 0b0..An ACK or NACK is sent on the following receiving data byte
  13294. * 0b1..Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK.
  13295. */
  13296. #define I2C_SMB_FACK(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_FACK_SHIFT)) & I2C_SMB_FACK_MASK)
  13297. /*! @} */
  13298. /*! @name A2 - I2C Address Register 2 */
  13299. /*! @{ */
  13300. #define I2C_A2_SAD_MASK (0xFEU)
  13301. #define I2C_A2_SAD_SHIFT (1U)
  13302. #define I2C_A2_SAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A2_SAD_SHIFT)) & I2C_A2_SAD_MASK)
  13303. /*! @} */
  13304. /*! @name SLTH - I2C SCL Low Timeout Register High */
  13305. /*! @{ */
  13306. #define I2C_SLTH_SSLT_MASK (0xFFU)
  13307. #define I2C_SLTH_SSLT_SHIFT (0U)
  13308. #define I2C_SLTH_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTH_SSLT_SHIFT)) & I2C_SLTH_SSLT_MASK)
  13309. /*! @} */
  13310. /*! @name SLTL - I2C SCL Low Timeout Register Low */
  13311. /*! @{ */
  13312. #define I2C_SLTL_SSLT_MASK (0xFFU)
  13313. #define I2C_SLTL_SSLT_SHIFT (0U)
  13314. #define I2C_SLTL_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTL_SSLT_SHIFT)) & I2C_SLTL_SSLT_MASK)
  13315. /*! @} */
  13316. /*!
  13317. * @}
  13318. */ /* end of group I2C_Register_Masks */
  13319. /* I2C - Peripheral instance base addresses */
  13320. /** Peripheral I2C0 base address */
  13321. #define I2C0_BASE (0x40066000u)
  13322. /** Peripheral I2C0 base pointer */
  13323. #define I2C0 ((I2C_Type *)I2C0_BASE)
  13324. /** Peripheral I2C1 base address */
  13325. #define I2C1_BASE (0x40067000u)
  13326. /** Peripheral I2C1 base pointer */
  13327. #define I2C1 ((I2C_Type *)I2C1_BASE)
  13328. /** Array initializer of I2C peripheral base addresses */
  13329. #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE }
  13330. /** Array initializer of I2C peripheral base pointers */
  13331. #define I2C_BASE_PTRS { I2C0, I2C1 }
  13332. /** Interrupt vectors for the I2C peripheral type */
  13333. #define I2C_IRQS { I2C0_IRQn, I2C1_IRQn }
  13334. /*!
  13335. * @}
  13336. */ /* end of group I2C_Peripheral_Access_Layer */
  13337. /* ----------------------------------------------------------------------------
  13338. -- LLWU Peripheral Access Layer
  13339. ---------------------------------------------------------------------------- */
  13340. /*!
  13341. * @addtogroup LLWU_Peripheral_Access_Layer LLWU Peripheral Access Layer
  13342. * @{
  13343. */
  13344. /** LLWU - Register Layout Typedef */
  13345. typedef struct {
  13346. __IO uint8_t PE1; /**< LLWU Pin Enable 1 register, offset: 0x0 */
  13347. __IO uint8_t PE2; /**< LLWU Pin Enable 2 register, offset: 0x1 */
  13348. __IO uint8_t PE3; /**< LLWU Pin Enable 3 register, offset: 0x2 */
  13349. __IO uint8_t PE4; /**< LLWU Pin Enable 4 register, offset: 0x3 */
  13350. __IO uint8_t PE5; /**< LLWU Pin Enable 5 register, offset: 0x4 */
  13351. __IO uint8_t PE6; /**< LLWU Pin Enable 6 register, offset: 0x5 */
  13352. __IO uint8_t PE7; /**< LLWU Pin Enable 7 register, offset: 0x6 */
  13353. __IO uint8_t PE8; /**< LLWU Pin Enable 8 register, offset: 0x7 */
  13354. __IO uint8_t ME; /**< LLWU Module Enable register, offset: 0x8 */
  13355. __IO uint8_t PF1; /**< LLWU Pin Flag 1 register, offset: 0x9 */
  13356. __IO uint8_t PF2; /**< LLWU Pin Flag 2 register, offset: 0xA */
  13357. __IO uint8_t PF3; /**< LLWU Pin Flag 3 register, offset: 0xB */
  13358. __IO uint8_t PF4; /**< LLWU Pin Flag 4 register, offset: 0xC */
  13359. __I uint8_t MF5; /**< LLWU Module Flag 5 register, offset: 0xD */
  13360. __IO uint8_t FILT1; /**< LLWU Pin Filter 1 register, offset: 0xE */
  13361. __IO uint8_t FILT2; /**< LLWU Pin Filter 2 register, offset: 0xF */
  13362. } LLWU_Type;
  13363. /* ----------------------------------------------------------------------------
  13364. -- LLWU Register Masks
  13365. ---------------------------------------------------------------------------- */
  13366. /*!
  13367. * @addtogroup LLWU_Register_Masks LLWU Register Masks
  13368. * @{
  13369. */
  13370. /*! @name PE1 - LLWU Pin Enable 1 register */
  13371. /*! @{ */
  13372. #define LLWU_PE1_WUPE0_MASK (0x3U)
  13373. #define LLWU_PE1_WUPE0_SHIFT (0U)
  13374. /*! WUPE0 - Wakeup Pin Enable For LLWU_P0
  13375. * 0b00..External input pin disabled as wakeup input
  13376. * 0b01..External input pin enabled with rising edge detection
  13377. * 0b10..External input pin enabled with falling edge detection
  13378. * 0b11..External input pin enabled with any change detection
  13379. */
  13380. #define LLWU_PE1_WUPE0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE0_SHIFT)) & LLWU_PE1_WUPE0_MASK)
  13381. #define LLWU_PE1_WUPE1_MASK (0xCU)
  13382. #define LLWU_PE1_WUPE1_SHIFT (2U)
  13383. /*! WUPE1 - Wakeup Pin Enable For LLWU_P1
  13384. * 0b00..External input pin disabled as wakeup input
  13385. * 0b01..External input pin enabled with rising edge detection
  13386. * 0b10..External input pin enabled with falling edge detection
  13387. * 0b11..External input pin enabled with any change detection
  13388. */
  13389. #define LLWU_PE1_WUPE1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE1_SHIFT)) & LLWU_PE1_WUPE1_MASK)
  13390. #define LLWU_PE1_WUPE2_MASK (0x30U)
  13391. #define LLWU_PE1_WUPE2_SHIFT (4U)
  13392. /*! WUPE2 - Wakeup Pin Enable For LLWU_P2
  13393. * 0b00..External input pin disabled as wakeup input
  13394. * 0b01..External input pin enabled with rising edge detection
  13395. * 0b10..External input pin enabled with falling edge detection
  13396. * 0b11..External input pin enabled with any change detection
  13397. */
  13398. #define LLWU_PE1_WUPE2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE2_SHIFT)) & LLWU_PE1_WUPE2_MASK)
  13399. #define LLWU_PE1_WUPE3_MASK (0xC0U)
  13400. #define LLWU_PE1_WUPE3_SHIFT (6U)
  13401. /*! WUPE3 - Wakeup Pin Enable For LLWU_P3
  13402. * 0b00..External input pin disabled as wakeup input
  13403. * 0b01..External input pin enabled with rising edge detection
  13404. * 0b10..External input pin enabled with falling edge detection
  13405. * 0b11..External input pin enabled with any change detection
  13406. */
  13407. #define LLWU_PE1_WUPE3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE3_SHIFT)) & LLWU_PE1_WUPE3_MASK)
  13408. /*! @} */
  13409. /*! @name PE2 - LLWU Pin Enable 2 register */
  13410. /*! @{ */
  13411. #define LLWU_PE2_WUPE4_MASK (0x3U)
  13412. #define LLWU_PE2_WUPE4_SHIFT (0U)
  13413. /*! WUPE4 - Wakeup Pin Enable For LLWU_P4
  13414. * 0b00..External input pin disabled as wakeup input
  13415. * 0b01..External input pin enabled with rising edge detection
  13416. * 0b10..External input pin enabled with falling edge detection
  13417. * 0b11..External input pin enabled with any change detection
  13418. */
  13419. #define LLWU_PE2_WUPE4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE4_SHIFT)) & LLWU_PE2_WUPE4_MASK)
  13420. #define LLWU_PE2_WUPE5_MASK (0xCU)
  13421. #define LLWU_PE2_WUPE5_SHIFT (2U)
  13422. /*! WUPE5 - Wakeup Pin Enable For LLWU_P5
  13423. * 0b00..External input pin disabled as wakeup input
  13424. * 0b01..External input pin enabled with rising edge detection
  13425. * 0b10..External input pin enabled with falling edge detection
  13426. * 0b11..External input pin enabled with any change detection
  13427. */
  13428. #define LLWU_PE2_WUPE5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE5_SHIFT)) & LLWU_PE2_WUPE5_MASK)
  13429. #define LLWU_PE2_WUPE6_MASK (0x30U)
  13430. #define LLWU_PE2_WUPE6_SHIFT (4U)
  13431. /*! WUPE6 - Wakeup Pin Enable For LLWU_P6
  13432. * 0b00..External input pin disabled as wakeup input
  13433. * 0b01..External input pin enabled with rising edge detection
  13434. * 0b10..External input pin enabled with falling edge detection
  13435. * 0b11..External input pin enabled with any change detection
  13436. */
  13437. #define LLWU_PE2_WUPE6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE6_SHIFT)) & LLWU_PE2_WUPE6_MASK)
  13438. #define LLWU_PE2_WUPE7_MASK (0xC0U)
  13439. #define LLWU_PE2_WUPE7_SHIFT (6U)
  13440. /*! WUPE7 - Wakeup Pin Enable For LLWU_P7
  13441. * 0b00..External input pin disabled as wakeup input
  13442. * 0b01..External input pin enabled with rising edge detection
  13443. * 0b10..External input pin enabled with falling edge detection
  13444. * 0b11..External input pin enabled with any change detection
  13445. */
  13446. #define LLWU_PE2_WUPE7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE7_SHIFT)) & LLWU_PE2_WUPE7_MASK)
  13447. /*! @} */
  13448. /*! @name PE3 - LLWU Pin Enable 3 register */
  13449. /*! @{ */
  13450. #define LLWU_PE3_WUPE8_MASK (0x3U)
  13451. #define LLWU_PE3_WUPE8_SHIFT (0U)
  13452. /*! WUPE8 - Wakeup Pin Enable For LLWU_P8
  13453. * 0b00..External input pin disabled as wakeup input
  13454. * 0b01..External input pin enabled with rising edge detection
  13455. * 0b10..External input pin enabled with falling edge detection
  13456. * 0b11..External input pin enabled with any change detection
  13457. */
  13458. #define LLWU_PE3_WUPE8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE8_SHIFT)) & LLWU_PE3_WUPE8_MASK)
  13459. #define LLWU_PE3_WUPE9_MASK (0xCU)
  13460. #define LLWU_PE3_WUPE9_SHIFT (2U)
  13461. /*! WUPE9 - Wakeup Pin Enable For LLWU_P9
  13462. * 0b00..External input pin disabled as wakeup input
  13463. * 0b01..External input pin enabled with rising edge detection
  13464. * 0b10..External input pin enabled with falling edge detection
  13465. * 0b11..External input pin enabled with any change detection
  13466. */
  13467. #define LLWU_PE3_WUPE9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE9_SHIFT)) & LLWU_PE3_WUPE9_MASK)
  13468. #define LLWU_PE3_WUPE10_MASK (0x30U)
  13469. #define LLWU_PE3_WUPE10_SHIFT (4U)
  13470. /*! WUPE10 - Wakeup Pin Enable For LLWU_P10
  13471. * 0b00..External input pin disabled as wakeup input
  13472. * 0b01..External input pin enabled with rising edge detection
  13473. * 0b10..External input pin enabled with falling edge detection
  13474. * 0b11..External input pin enabled with any change detection
  13475. */
  13476. #define LLWU_PE3_WUPE10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE10_SHIFT)) & LLWU_PE3_WUPE10_MASK)
  13477. #define LLWU_PE3_WUPE11_MASK (0xC0U)
  13478. #define LLWU_PE3_WUPE11_SHIFT (6U)
  13479. /*! WUPE11 - Wakeup Pin Enable For LLWU_P11
  13480. * 0b00..External input pin disabled as wakeup input
  13481. * 0b01..External input pin enabled with rising edge detection
  13482. * 0b10..External input pin enabled with falling edge detection
  13483. * 0b11..External input pin enabled with any change detection
  13484. */
  13485. #define LLWU_PE3_WUPE11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE11_SHIFT)) & LLWU_PE3_WUPE11_MASK)
  13486. /*! @} */
  13487. /*! @name PE4 - LLWU Pin Enable 4 register */
  13488. /*! @{ */
  13489. #define LLWU_PE4_WUPE12_MASK (0x3U)
  13490. #define LLWU_PE4_WUPE12_SHIFT (0U)
  13491. /*! WUPE12 - Wakeup Pin Enable For LLWU_P12
  13492. * 0b00..External input pin disabled as wakeup input
  13493. * 0b01..External input pin enabled with rising edge detection
  13494. * 0b10..External input pin enabled with falling edge detection
  13495. * 0b11..External input pin enabled with any change detection
  13496. */
  13497. #define LLWU_PE4_WUPE12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE12_SHIFT)) & LLWU_PE4_WUPE12_MASK)
  13498. #define LLWU_PE4_WUPE13_MASK (0xCU)
  13499. #define LLWU_PE4_WUPE13_SHIFT (2U)
  13500. /*! WUPE13 - Wakeup Pin Enable For LLWU_P13
  13501. * 0b00..External input pin disabled as wakeup input
  13502. * 0b01..External input pin enabled with rising edge detection
  13503. * 0b10..External input pin enabled with falling edge detection
  13504. * 0b11..External input pin enabled with any change detection
  13505. */
  13506. #define LLWU_PE4_WUPE13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE13_SHIFT)) & LLWU_PE4_WUPE13_MASK)
  13507. #define LLWU_PE4_WUPE14_MASK (0x30U)
  13508. #define LLWU_PE4_WUPE14_SHIFT (4U)
  13509. /*! WUPE14 - Wakeup Pin Enable For LLWU_P14
  13510. * 0b00..External input pin disabled as wakeup input
  13511. * 0b01..External input pin enabled with rising edge detection
  13512. * 0b10..External input pin enabled with falling edge detection
  13513. * 0b11..External input pin enabled with any change detection
  13514. */
  13515. #define LLWU_PE4_WUPE14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE14_SHIFT)) & LLWU_PE4_WUPE14_MASK)
  13516. #define LLWU_PE4_WUPE15_MASK (0xC0U)
  13517. #define LLWU_PE4_WUPE15_SHIFT (6U)
  13518. /*! WUPE15 - Wakeup Pin Enable For LLWU_P15
  13519. * 0b00..External input pin disabled as wakeup input
  13520. * 0b01..External input pin enabled with rising edge detection
  13521. * 0b10..External input pin enabled with falling edge detection
  13522. * 0b11..External input pin enabled with any change detection
  13523. */
  13524. #define LLWU_PE4_WUPE15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE15_SHIFT)) & LLWU_PE4_WUPE15_MASK)
  13525. /*! @} */
  13526. /*! @name PE5 - LLWU Pin Enable 5 register */
  13527. /*! @{ */
  13528. #define LLWU_PE5_WUPE16_MASK (0x3U)
  13529. #define LLWU_PE5_WUPE16_SHIFT (0U)
  13530. /*! WUPE16 - Wakeup Pin Enable For LLWU_P16
  13531. * 0b00..External input pin disabled as wakeup input
  13532. * 0b01..External input pin enabled with rising edge detection
  13533. * 0b10..External input pin enabled with falling edge detection
  13534. * 0b11..External input pin enabled with any change detection
  13535. */
  13536. #define LLWU_PE5_WUPE16(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE16_SHIFT)) & LLWU_PE5_WUPE16_MASK)
  13537. #define LLWU_PE5_WUPE17_MASK (0xCU)
  13538. #define LLWU_PE5_WUPE17_SHIFT (2U)
  13539. /*! WUPE17 - Wakeup Pin Enable For LLWU_P17
  13540. * 0b00..External input pin disabled as wakeup input
  13541. * 0b01..External input pin enabled with rising edge detection
  13542. * 0b10..External input pin enabled with falling edge detection
  13543. * 0b11..External input pin enabled with any change detection
  13544. */
  13545. #define LLWU_PE5_WUPE17(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE17_SHIFT)) & LLWU_PE5_WUPE17_MASK)
  13546. #define LLWU_PE5_WUPE18_MASK (0x30U)
  13547. #define LLWU_PE5_WUPE18_SHIFT (4U)
  13548. /*! WUPE18 - Wakeup Pin Enable For LLWU_P18
  13549. * 0b00..External input pin disabled as wakeup input
  13550. * 0b01..External input pin enabled with rising edge detection
  13551. * 0b10..External input pin enabled with falling edge detection
  13552. * 0b11..External input pin enabled with any change detection
  13553. */
  13554. #define LLWU_PE5_WUPE18(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE18_SHIFT)) & LLWU_PE5_WUPE18_MASK)
  13555. #define LLWU_PE5_WUPE19_MASK (0xC0U)
  13556. #define LLWU_PE5_WUPE19_SHIFT (6U)
  13557. /*! WUPE19 - Wakeup Pin Enable For LLWU_P19
  13558. * 0b00..External input pin disabled as wakeup input
  13559. * 0b01..External input pin enabled with rising edge detection
  13560. * 0b10..External input pin enabled with falling edge detection
  13561. * 0b11..External input pin enabled with any change detection
  13562. */
  13563. #define LLWU_PE5_WUPE19(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE19_SHIFT)) & LLWU_PE5_WUPE19_MASK)
  13564. /*! @} */
  13565. /*! @name PE6 - LLWU Pin Enable 6 register */
  13566. /*! @{ */
  13567. #define LLWU_PE6_WUPE20_MASK (0x3U)
  13568. #define LLWU_PE6_WUPE20_SHIFT (0U)
  13569. /*! WUPE20 - Wakeup Pin Enable For LLWU_P20
  13570. * 0b00..External input pin disabled as wakeup input
  13571. * 0b01..External input pin enabled with rising edge detection
  13572. * 0b10..External input pin enabled with falling edge detection
  13573. * 0b11..External input pin enabled with any change detection
  13574. */
  13575. #define LLWU_PE6_WUPE20(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE20_SHIFT)) & LLWU_PE6_WUPE20_MASK)
  13576. #define LLWU_PE6_WUPE21_MASK (0xCU)
  13577. #define LLWU_PE6_WUPE21_SHIFT (2U)
  13578. /*! WUPE21 - Wakeup Pin Enable For LLWU_P21
  13579. * 0b00..External input pin disabled as wakeup input
  13580. * 0b01..External input pin enabled with rising edge detection
  13581. * 0b10..External input pin enabled with falling edge detection
  13582. * 0b11..External input pin enabled with any change detection
  13583. */
  13584. #define LLWU_PE6_WUPE21(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE21_SHIFT)) & LLWU_PE6_WUPE21_MASK)
  13585. #define LLWU_PE6_WUPE22_MASK (0x30U)
  13586. #define LLWU_PE6_WUPE22_SHIFT (4U)
  13587. /*! WUPE22 - Wakeup Pin Enable For LLWU_P22
  13588. * 0b00..External input pin disabled as wakeup input
  13589. * 0b01..External input pin enabled with rising edge detection
  13590. * 0b10..External input pin enabled with falling edge detection
  13591. * 0b11..External input pin enabled with any change detection
  13592. */
  13593. #define LLWU_PE6_WUPE22(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE22_SHIFT)) & LLWU_PE6_WUPE22_MASK)
  13594. #define LLWU_PE6_WUPE23_MASK (0xC0U)
  13595. #define LLWU_PE6_WUPE23_SHIFT (6U)
  13596. /*! WUPE23 - Wakeup Pin Enable For LLWU_P23
  13597. * 0b00..External input pin disabled as wakeup input
  13598. * 0b01..External input pin enabled with rising edge detection
  13599. * 0b10..External input pin enabled with falling edge detection
  13600. * 0b11..External input pin enabled with any change detection
  13601. */
  13602. #define LLWU_PE6_WUPE23(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE23_SHIFT)) & LLWU_PE6_WUPE23_MASK)
  13603. /*! @} */
  13604. /*! @name PE7 - LLWU Pin Enable 7 register */
  13605. /*! @{ */
  13606. #define LLWU_PE7_WUPE24_MASK (0x3U)
  13607. #define LLWU_PE7_WUPE24_SHIFT (0U)
  13608. /*! WUPE24 - Wakeup Pin Enable For LLWU_P24
  13609. * 0b00..External input pin disabled as wakeup input
  13610. * 0b01..External input pin enabled with rising edge detection
  13611. * 0b10..External input pin enabled with falling edge detection
  13612. * 0b11..External input pin enabled with any change detection
  13613. */
  13614. #define LLWU_PE7_WUPE24(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE24_SHIFT)) & LLWU_PE7_WUPE24_MASK)
  13615. #define LLWU_PE7_WUPE25_MASK (0xCU)
  13616. #define LLWU_PE7_WUPE25_SHIFT (2U)
  13617. /*! WUPE25 - Wakeup Pin Enable For LLWU_P25
  13618. * 0b00..External input pin disabled as wakeup input
  13619. * 0b01..External input pin enabled with rising edge detection
  13620. * 0b10..External input pin enabled with falling edge detection
  13621. * 0b11..External input pin enabled with any change detection
  13622. */
  13623. #define LLWU_PE7_WUPE25(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE25_SHIFT)) & LLWU_PE7_WUPE25_MASK)
  13624. #define LLWU_PE7_WUPE26_MASK (0x30U)
  13625. #define LLWU_PE7_WUPE26_SHIFT (4U)
  13626. /*! WUPE26 - Wakeup Pin Enable For LLWU_P26
  13627. * 0b00..External input pin disabled as wakeup input
  13628. * 0b01..External input pin enabled with rising edge detection
  13629. * 0b10..External input pin enabled with falling edge detection
  13630. * 0b11..External input pin enabled with any change detection
  13631. */
  13632. #define LLWU_PE7_WUPE26(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE26_SHIFT)) & LLWU_PE7_WUPE26_MASK)
  13633. #define LLWU_PE7_WUPE27_MASK (0xC0U)
  13634. #define LLWU_PE7_WUPE27_SHIFT (6U)
  13635. /*! WUPE27 - Wakeup Pin Enable For LLWU_P27
  13636. * 0b00..External input pin disabled as wakeup input
  13637. * 0b01..External input pin enabled with rising edge detection
  13638. * 0b10..External input pin enabled with falling edge detection
  13639. * 0b11..External input pin enabled with any change detection
  13640. */
  13641. #define LLWU_PE7_WUPE27(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE27_SHIFT)) & LLWU_PE7_WUPE27_MASK)
  13642. /*! @} */
  13643. /*! @name PE8 - LLWU Pin Enable 8 register */
  13644. /*! @{ */
  13645. #define LLWU_PE8_WUPE28_MASK (0x3U)
  13646. #define LLWU_PE8_WUPE28_SHIFT (0U)
  13647. /*! WUPE28 - Wakeup Pin Enable For LLWU_P28
  13648. * 0b00..External input pin disabled as wakeup input
  13649. * 0b01..External input pin enabled with rising edge detection
  13650. * 0b10..External input pin enabled with falling edge detection
  13651. * 0b11..External input pin enabled with any change detection
  13652. */
  13653. #define LLWU_PE8_WUPE28(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE28_SHIFT)) & LLWU_PE8_WUPE28_MASK)
  13654. #define LLWU_PE8_WUPE29_MASK (0xCU)
  13655. #define LLWU_PE8_WUPE29_SHIFT (2U)
  13656. /*! WUPE29 - Wakeup Pin Enable For LLWU_P29
  13657. * 0b00..External input pin disabled as wakeup input
  13658. * 0b01..External input pin enabled with rising edge detection
  13659. * 0b10..External input pin enabled with falling edge detection
  13660. * 0b11..External input pin enabled with any change detection
  13661. */
  13662. #define LLWU_PE8_WUPE29(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE29_SHIFT)) & LLWU_PE8_WUPE29_MASK)
  13663. #define LLWU_PE8_WUPE30_MASK (0x30U)
  13664. #define LLWU_PE8_WUPE30_SHIFT (4U)
  13665. /*! WUPE30 - Wakeup Pin Enable For LLWU_P30
  13666. * 0b00..External input pin disabled as wakeup input
  13667. * 0b01..External input pin enabled with rising edge detection
  13668. * 0b10..External input pin enabled with falling edge detection
  13669. * 0b11..External input pin enabled with any change detection
  13670. */
  13671. #define LLWU_PE8_WUPE30(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE30_SHIFT)) & LLWU_PE8_WUPE30_MASK)
  13672. #define LLWU_PE8_WUPE31_MASK (0xC0U)
  13673. #define LLWU_PE8_WUPE31_SHIFT (6U)
  13674. /*! WUPE31 - Wakeup Pin Enable For LLWU_P31
  13675. * 0b00..External input pin disabled as wakeup input
  13676. * 0b01..External input pin enabled with rising edge detection
  13677. * 0b10..External input pin enabled with falling edge detection
  13678. * 0b11..External input pin enabled with any change detection
  13679. */
  13680. #define LLWU_PE8_WUPE31(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE31_SHIFT)) & LLWU_PE8_WUPE31_MASK)
  13681. /*! @} */
  13682. /*! @name ME - LLWU Module Enable register */
  13683. /*! @{ */
  13684. #define LLWU_ME_WUME0_MASK (0x1U)
  13685. #define LLWU_ME_WUME0_SHIFT (0U)
  13686. /*! WUME0 - Wakeup Module Enable For Module 0
  13687. * 0b0..Internal module flag not used as wakeup source
  13688. * 0b1..Internal module flag used as wakeup source
  13689. */
  13690. #define LLWU_ME_WUME0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME0_SHIFT)) & LLWU_ME_WUME0_MASK)
  13691. #define LLWU_ME_WUME1_MASK (0x2U)
  13692. #define LLWU_ME_WUME1_SHIFT (1U)
  13693. /*! WUME1 - Wakeup Module Enable for Module 1
  13694. * 0b0..Internal module flag not used as wakeup source
  13695. * 0b1..Internal module flag used as wakeup source
  13696. */
  13697. #define LLWU_ME_WUME1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME1_SHIFT)) & LLWU_ME_WUME1_MASK)
  13698. #define LLWU_ME_WUME2_MASK (0x4U)
  13699. #define LLWU_ME_WUME2_SHIFT (2U)
  13700. /*! WUME2 - Wakeup Module Enable For Module 2
  13701. * 0b0..Internal module flag not used as wakeup source
  13702. * 0b1..Internal module flag used as wakeup source
  13703. */
  13704. #define LLWU_ME_WUME2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME2_SHIFT)) & LLWU_ME_WUME2_MASK)
  13705. #define LLWU_ME_WUME3_MASK (0x8U)
  13706. #define LLWU_ME_WUME3_SHIFT (3U)
  13707. /*! WUME3 - Wakeup Module Enable For Module 3
  13708. * 0b0..Internal module flag not used as wakeup source
  13709. * 0b1..Internal module flag used as wakeup source
  13710. */
  13711. #define LLWU_ME_WUME3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME3_SHIFT)) & LLWU_ME_WUME3_MASK)
  13712. #define LLWU_ME_WUME4_MASK (0x10U)
  13713. #define LLWU_ME_WUME4_SHIFT (4U)
  13714. /*! WUME4 - Wakeup Module Enable For Module 4
  13715. * 0b0..Internal module flag not used as wakeup source
  13716. * 0b1..Internal module flag used as wakeup source
  13717. */
  13718. #define LLWU_ME_WUME4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME4_SHIFT)) & LLWU_ME_WUME4_MASK)
  13719. #define LLWU_ME_WUME5_MASK (0x20U)
  13720. #define LLWU_ME_WUME5_SHIFT (5U)
  13721. /*! WUME5 - Wakeup Module Enable For Module 5
  13722. * 0b0..Internal module flag not used as wakeup source
  13723. * 0b1..Internal module flag used as wakeup source
  13724. */
  13725. #define LLWU_ME_WUME5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME5_SHIFT)) & LLWU_ME_WUME5_MASK)
  13726. #define LLWU_ME_WUME6_MASK (0x40U)
  13727. #define LLWU_ME_WUME6_SHIFT (6U)
  13728. /*! WUME6 - Wakeup Module Enable For Module 6
  13729. * 0b0..Internal module flag not used as wakeup source
  13730. * 0b1..Internal module flag used as wakeup source
  13731. */
  13732. #define LLWU_ME_WUME6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME6_SHIFT)) & LLWU_ME_WUME6_MASK)
  13733. #define LLWU_ME_WUME7_MASK (0x80U)
  13734. #define LLWU_ME_WUME7_SHIFT (7U)
  13735. /*! WUME7 - Wakeup Module Enable For Module 7
  13736. * 0b0..Internal module flag not used as wakeup source
  13737. * 0b1..Internal module flag used as wakeup source
  13738. */
  13739. #define LLWU_ME_WUME7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME7_SHIFT)) & LLWU_ME_WUME7_MASK)
  13740. /*! @} */
  13741. /*! @name PF1 - LLWU Pin Flag 1 register */
  13742. /*! @{ */
  13743. #define LLWU_PF1_WUF0_MASK (0x1U)
  13744. #define LLWU_PF1_WUF0_SHIFT (0U)
  13745. /*! WUF0 - Wakeup Flag For LLWU_P0
  13746. * 0b0..LLWU_P0 input was not a wakeup source
  13747. * 0b1..LLWU_P0 input was a wakeup source
  13748. */
  13749. #define LLWU_PF1_WUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF0_SHIFT)) & LLWU_PF1_WUF0_MASK)
  13750. #define LLWU_PF1_WUF1_MASK (0x2U)
  13751. #define LLWU_PF1_WUF1_SHIFT (1U)
  13752. /*! WUF1 - Wakeup Flag For LLWU_P1
  13753. * 0b0..LLWU_P1 input was not a wakeup source
  13754. * 0b1..LLWU_P1 input was a wakeup source
  13755. */
  13756. #define LLWU_PF1_WUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF1_SHIFT)) & LLWU_PF1_WUF1_MASK)
  13757. #define LLWU_PF1_WUF2_MASK (0x4U)
  13758. #define LLWU_PF1_WUF2_SHIFT (2U)
  13759. /*! WUF2 - Wakeup Flag For LLWU_P2
  13760. * 0b0..LLWU_P2 input was not a wakeup source
  13761. * 0b1..LLWU_P2 input was a wakeup source
  13762. */
  13763. #define LLWU_PF1_WUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF2_SHIFT)) & LLWU_PF1_WUF2_MASK)
  13764. #define LLWU_PF1_WUF3_MASK (0x8U)
  13765. #define LLWU_PF1_WUF3_SHIFT (3U)
  13766. /*! WUF3 - Wakeup Flag For LLWU_P3
  13767. * 0b0..LLWU_P3 input was not a wakeup source
  13768. * 0b1..LLWU_P3 input was a wakeup source
  13769. */
  13770. #define LLWU_PF1_WUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF3_SHIFT)) & LLWU_PF1_WUF3_MASK)
  13771. #define LLWU_PF1_WUF4_MASK (0x10U)
  13772. #define LLWU_PF1_WUF4_SHIFT (4U)
  13773. /*! WUF4 - Wakeup Flag For LLWU_P4
  13774. * 0b0..LLWU_P4 input was not a wakeup source
  13775. * 0b1..LLWU_P4 input was a wakeup source
  13776. */
  13777. #define LLWU_PF1_WUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF4_SHIFT)) & LLWU_PF1_WUF4_MASK)
  13778. #define LLWU_PF1_WUF5_MASK (0x20U)
  13779. #define LLWU_PF1_WUF5_SHIFT (5U)
  13780. /*! WUF5 - Wakeup Flag For LLWU_P5
  13781. * 0b0..LLWU_P5 input was not a wakeup source
  13782. * 0b1..LLWU_P5 input was a wakeup source
  13783. */
  13784. #define LLWU_PF1_WUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF5_SHIFT)) & LLWU_PF1_WUF5_MASK)
  13785. #define LLWU_PF1_WUF6_MASK (0x40U)
  13786. #define LLWU_PF1_WUF6_SHIFT (6U)
  13787. /*! WUF6 - Wakeup Flag For LLWU_P6
  13788. * 0b0..LLWU_P6 input was not a wakeup source
  13789. * 0b1..LLWU_P6 input was a wakeup source
  13790. */
  13791. #define LLWU_PF1_WUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF6_SHIFT)) & LLWU_PF1_WUF6_MASK)
  13792. #define LLWU_PF1_WUF7_MASK (0x80U)
  13793. #define LLWU_PF1_WUF7_SHIFT (7U)
  13794. /*! WUF7 - Wakeup Flag For LLWU_P7
  13795. * 0b0..LLWU_P7 input was not a wakeup source
  13796. * 0b1..LLWU_P7 input was a wakeup source
  13797. */
  13798. #define LLWU_PF1_WUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF7_SHIFT)) & LLWU_PF1_WUF7_MASK)
  13799. /*! @} */
  13800. /*! @name PF2 - LLWU Pin Flag 2 register */
  13801. /*! @{ */
  13802. #define LLWU_PF2_WUF8_MASK (0x1U)
  13803. #define LLWU_PF2_WUF8_SHIFT (0U)
  13804. /*! WUF8 - Wakeup Flag For LLWU_P8
  13805. * 0b0..LLWU_P8 input was not a wakeup source
  13806. * 0b1..LLWU_P8 input was a wakeup source
  13807. */
  13808. #define LLWU_PF2_WUF8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF8_SHIFT)) & LLWU_PF2_WUF8_MASK)
  13809. #define LLWU_PF2_WUF9_MASK (0x2U)
  13810. #define LLWU_PF2_WUF9_SHIFT (1U)
  13811. /*! WUF9 - Wakeup Flag For LLWU_P9
  13812. * 0b0..LLWU_P9 input was not a wakeup source
  13813. * 0b1..LLWU_P9 input was a wakeup source
  13814. */
  13815. #define LLWU_PF2_WUF9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF9_SHIFT)) & LLWU_PF2_WUF9_MASK)
  13816. #define LLWU_PF2_WUF10_MASK (0x4U)
  13817. #define LLWU_PF2_WUF10_SHIFT (2U)
  13818. /*! WUF10 - Wakeup Flag For LLWU_P10
  13819. * 0b0..LLWU_P10 input was not a wakeup source
  13820. * 0b1..LLWU_P10 input was a wakeup source
  13821. */
  13822. #define LLWU_PF2_WUF10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF10_SHIFT)) & LLWU_PF2_WUF10_MASK)
  13823. #define LLWU_PF2_WUF11_MASK (0x8U)
  13824. #define LLWU_PF2_WUF11_SHIFT (3U)
  13825. /*! WUF11 - Wakeup Flag For LLWU_P11
  13826. * 0b0..LLWU_P11 input was not a wakeup source
  13827. * 0b1..LLWU_P11 input was a wakeup source
  13828. */
  13829. #define LLWU_PF2_WUF11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF11_SHIFT)) & LLWU_PF2_WUF11_MASK)
  13830. #define LLWU_PF2_WUF12_MASK (0x10U)
  13831. #define LLWU_PF2_WUF12_SHIFT (4U)
  13832. /*! WUF12 - Wakeup Flag For LLWU_P12
  13833. * 0b0..LLWU_P12 input was not a wakeup source
  13834. * 0b1..LLWU_P12 input was a wakeup source
  13835. */
  13836. #define LLWU_PF2_WUF12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF12_SHIFT)) & LLWU_PF2_WUF12_MASK)
  13837. #define LLWU_PF2_WUF13_MASK (0x20U)
  13838. #define LLWU_PF2_WUF13_SHIFT (5U)
  13839. /*! WUF13 - Wakeup Flag For LLWU_P13
  13840. * 0b0..LLWU_P13 input was not a wakeup source
  13841. * 0b1..LLWU_P13 input was a wakeup source
  13842. */
  13843. #define LLWU_PF2_WUF13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF13_SHIFT)) & LLWU_PF2_WUF13_MASK)
  13844. #define LLWU_PF2_WUF14_MASK (0x40U)
  13845. #define LLWU_PF2_WUF14_SHIFT (6U)
  13846. /*! WUF14 - Wakeup Flag For LLWU_P14
  13847. * 0b0..LLWU_P14 input was not a wakeup source
  13848. * 0b1..LLWU_P14 input was a wakeup source
  13849. */
  13850. #define LLWU_PF2_WUF14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF14_SHIFT)) & LLWU_PF2_WUF14_MASK)
  13851. #define LLWU_PF2_WUF15_MASK (0x80U)
  13852. #define LLWU_PF2_WUF15_SHIFT (7U)
  13853. /*! WUF15 - Wakeup Flag For LLWU_P15
  13854. * 0b0..LLWU_P15 input was not a wakeup source
  13855. * 0b1..LLWU_P15 input was a wakeup source
  13856. */
  13857. #define LLWU_PF2_WUF15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF15_SHIFT)) & LLWU_PF2_WUF15_MASK)
  13858. /*! @} */
  13859. /*! @name PF3 - LLWU Pin Flag 3 register */
  13860. /*! @{ */
  13861. #define LLWU_PF3_WUF16_MASK (0x1U)
  13862. #define LLWU_PF3_WUF16_SHIFT (0U)
  13863. /*! WUF16 - Wakeup Flag For LLWU_P16
  13864. * 0b0..LLWU_P16 input was not a wakeup source
  13865. * 0b1..LLWU_P16 input was a wakeup source
  13866. */
  13867. #define LLWU_PF3_WUF16(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF16_SHIFT)) & LLWU_PF3_WUF16_MASK)
  13868. #define LLWU_PF3_WUF17_MASK (0x2U)
  13869. #define LLWU_PF3_WUF17_SHIFT (1U)
  13870. /*! WUF17 - Wakeup Flag For LLWU_P17
  13871. * 0b0..LLWU_P17 input was not a wakeup source
  13872. * 0b1..LLWU_P17 input was a wakeup source
  13873. */
  13874. #define LLWU_PF3_WUF17(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF17_SHIFT)) & LLWU_PF3_WUF17_MASK)
  13875. #define LLWU_PF3_WUF18_MASK (0x4U)
  13876. #define LLWU_PF3_WUF18_SHIFT (2U)
  13877. /*! WUF18 - Wakeup Flag For LLWU_P18
  13878. * 0b0..LLWU_P18 input was not a wakeup source
  13879. * 0b1..LLWU_P18 input was a wakeup source
  13880. */
  13881. #define LLWU_PF3_WUF18(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF18_SHIFT)) & LLWU_PF3_WUF18_MASK)
  13882. #define LLWU_PF3_WUF19_MASK (0x8U)
  13883. #define LLWU_PF3_WUF19_SHIFT (3U)
  13884. /*! WUF19 - Wakeup Flag For LLWU_P19
  13885. * 0b0..LLWU_P19 input was not a wakeup source
  13886. * 0b1..LLWU_P19 input was a wakeup source
  13887. */
  13888. #define LLWU_PF3_WUF19(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF19_SHIFT)) & LLWU_PF3_WUF19_MASK)
  13889. #define LLWU_PF3_WUF20_MASK (0x10U)
  13890. #define LLWU_PF3_WUF20_SHIFT (4U)
  13891. /*! WUF20 - Wakeup Flag For LLWU_P20
  13892. * 0b0..LLWU_P20 input was not a wakeup source
  13893. * 0b1..LLWU_P20 input was a wakeup source
  13894. */
  13895. #define LLWU_PF3_WUF20(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF20_SHIFT)) & LLWU_PF3_WUF20_MASK)
  13896. #define LLWU_PF3_WUF21_MASK (0x20U)
  13897. #define LLWU_PF3_WUF21_SHIFT (5U)
  13898. /*! WUF21 - Wakeup Flag For LLWU_P21
  13899. * 0b0..LLWU_P21 input was not a wakeup source
  13900. * 0b1..LLWU_P21 input was a wakeup source
  13901. */
  13902. #define LLWU_PF3_WUF21(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF21_SHIFT)) & LLWU_PF3_WUF21_MASK)
  13903. #define LLWU_PF3_WUF22_MASK (0x40U)
  13904. #define LLWU_PF3_WUF22_SHIFT (6U)
  13905. /*! WUF22 - Wakeup Flag For LLWU_P22
  13906. * 0b0..LLWU_P22 input was not a wakeup source
  13907. * 0b1..LLWU_P22 input was a wakeup source
  13908. */
  13909. #define LLWU_PF3_WUF22(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF22_SHIFT)) & LLWU_PF3_WUF22_MASK)
  13910. #define LLWU_PF3_WUF23_MASK (0x80U)
  13911. #define LLWU_PF3_WUF23_SHIFT (7U)
  13912. /*! WUF23 - Wakeup Flag For LLWU_P23
  13913. * 0b0..LLWU_P23 input was not a wakeup source
  13914. * 0b1..LLWU_P23 input was a wakeup source
  13915. */
  13916. #define LLWU_PF3_WUF23(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF23_SHIFT)) & LLWU_PF3_WUF23_MASK)
  13917. /*! @} */
  13918. /*! @name PF4 - LLWU Pin Flag 4 register */
  13919. /*! @{ */
  13920. #define LLWU_PF4_WUF24_MASK (0x1U)
  13921. #define LLWU_PF4_WUF24_SHIFT (0U)
  13922. /*! WUF24 - Wakeup Flag For LLWU_P24
  13923. * 0b0..LLWU_P24 input was not a wakeup source
  13924. * 0b1..LLWU_P24 input was a wakeup source
  13925. */
  13926. #define LLWU_PF4_WUF24(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF24_SHIFT)) & LLWU_PF4_WUF24_MASK)
  13927. #define LLWU_PF4_WUF25_MASK (0x2U)
  13928. #define LLWU_PF4_WUF25_SHIFT (1U)
  13929. /*! WUF25 - Wakeup Flag For LLWU_P25
  13930. * 0b0..LLWU_P25 input was not a wakeup source
  13931. * 0b1..LLWU_P25 input was a wakeup source
  13932. */
  13933. #define LLWU_PF4_WUF25(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF25_SHIFT)) & LLWU_PF4_WUF25_MASK)
  13934. #define LLWU_PF4_WUF26_MASK (0x4U)
  13935. #define LLWU_PF4_WUF26_SHIFT (2U)
  13936. /*! WUF26 - Wakeup Flag For LLWU_P26
  13937. * 0b0..LLWU_P26 input was not a wakeup source
  13938. * 0b1..LLWU_P26 input was a wakeup source
  13939. */
  13940. #define LLWU_PF4_WUF26(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF26_SHIFT)) & LLWU_PF4_WUF26_MASK)
  13941. #define LLWU_PF4_WUF27_MASK (0x8U)
  13942. #define LLWU_PF4_WUF27_SHIFT (3U)
  13943. /*! WUF27 - Wakeup Flag For LLWU_P27
  13944. * 0b0..LLWU_P27 input was not a wakeup source
  13945. * 0b1..LLWU_P27 input was a wakeup source
  13946. */
  13947. #define LLWU_PF4_WUF27(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF27_SHIFT)) & LLWU_PF4_WUF27_MASK)
  13948. #define LLWU_PF4_WUF28_MASK (0x10U)
  13949. #define LLWU_PF4_WUF28_SHIFT (4U)
  13950. /*! WUF28 - Wakeup Flag For LLWU_P28
  13951. * 0b0..LLWU_P28 input was not a wakeup source
  13952. * 0b1..LLWU_P28 input was a wakeup source
  13953. */
  13954. #define LLWU_PF4_WUF28(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF28_SHIFT)) & LLWU_PF4_WUF28_MASK)
  13955. #define LLWU_PF4_WUF29_MASK (0x20U)
  13956. #define LLWU_PF4_WUF29_SHIFT (5U)
  13957. /*! WUF29 - Wakeup Flag For LLWU_P29
  13958. * 0b0..LLWU_P29 input was not a wakeup source
  13959. * 0b1..LLWU_P29 input was a wakeup source
  13960. */
  13961. #define LLWU_PF4_WUF29(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF29_SHIFT)) & LLWU_PF4_WUF29_MASK)
  13962. #define LLWU_PF4_WUF30_MASK (0x40U)
  13963. #define LLWU_PF4_WUF30_SHIFT (6U)
  13964. /*! WUF30 - Wakeup Flag For LLWU_P30
  13965. * 0b0..LLWU_P30 input was not a wakeup source
  13966. * 0b1..LLWU_P30 input was a wakeup source
  13967. */
  13968. #define LLWU_PF4_WUF30(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF30_SHIFT)) & LLWU_PF4_WUF30_MASK)
  13969. #define LLWU_PF4_WUF31_MASK (0x80U)
  13970. #define LLWU_PF4_WUF31_SHIFT (7U)
  13971. /*! WUF31 - Wakeup Flag For LLWU_P31
  13972. * 0b0..LLWU_P31 input was not a wakeup source
  13973. * 0b1..LLWU_P31 input was a wakeup source
  13974. */
  13975. #define LLWU_PF4_WUF31(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF31_SHIFT)) & LLWU_PF4_WUF31_MASK)
  13976. /*! @} */
  13977. /*! @name MF5 - LLWU Module Flag 5 register */
  13978. /*! @{ */
  13979. #define LLWU_MF5_MWUF0_MASK (0x1U)
  13980. #define LLWU_MF5_MWUF0_SHIFT (0U)
  13981. /*! MWUF0 - Wakeup flag For module 0
  13982. * 0b0..Module 0 input was not a wakeup source
  13983. * 0b1..Module 0 input was a wakeup source
  13984. */
  13985. #define LLWU_MF5_MWUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF0_SHIFT)) & LLWU_MF5_MWUF0_MASK)
  13986. #define LLWU_MF5_MWUF1_MASK (0x2U)
  13987. #define LLWU_MF5_MWUF1_SHIFT (1U)
  13988. /*! MWUF1 - Wakeup flag For module 1
  13989. * 0b0..Module 1 input was not a wakeup source
  13990. * 0b1..Module 1 input was a wakeup source
  13991. */
  13992. #define LLWU_MF5_MWUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF1_SHIFT)) & LLWU_MF5_MWUF1_MASK)
  13993. #define LLWU_MF5_MWUF2_MASK (0x4U)
  13994. #define LLWU_MF5_MWUF2_SHIFT (2U)
  13995. /*! MWUF2 - Wakeup flag For module 2
  13996. * 0b0..Module 2 input was not a wakeup source
  13997. * 0b1..Module 2 input was a wakeup source
  13998. */
  13999. #define LLWU_MF5_MWUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF2_SHIFT)) & LLWU_MF5_MWUF2_MASK)
  14000. #define LLWU_MF5_MWUF3_MASK (0x8U)
  14001. #define LLWU_MF5_MWUF3_SHIFT (3U)
  14002. /*! MWUF3 - Wakeup flag For module 3
  14003. * 0b0..Module 3 input was not a wakeup source
  14004. * 0b1..Module 3 input was a wakeup source
  14005. */
  14006. #define LLWU_MF5_MWUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF3_SHIFT)) & LLWU_MF5_MWUF3_MASK)
  14007. #define LLWU_MF5_MWUF4_MASK (0x10U)
  14008. #define LLWU_MF5_MWUF4_SHIFT (4U)
  14009. /*! MWUF4 - Wakeup flag For module 4
  14010. * 0b0..Module 4 input was not a wakeup source
  14011. * 0b1..Module 4 input was a wakeup source
  14012. */
  14013. #define LLWU_MF5_MWUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF4_SHIFT)) & LLWU_MF5_MWUF4_MASK)
  14014. #define LLWU_MF5_MWUF5_MASK (0x20U)
  14015. #define LLWU_MF5_MWUF5_SHIFT (5U)
  14016. /*! MWUF5 - Wakeup flag For module 5
  14017. * 0b0..Module 5 input was not a wakeup source
  14018. * 0b1..Module 5 input was a wakeup source
  14019. */
  14020. #define LLWU_MF5_MWUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF5_SHIFT)) & LLWU_MF5_MWUF5_MASK)
  14021. #define LLWU_MF5_MWUF6_MASK (0x40U)
  14022. #define LLWU_MF5_MWUF6_SHIFT (6U)
  14023. /*! MWUF6 - Wakeup flag For module 6
  14024. * 0b0..Module 6 input was not a wakeup source
  14025. * 0b1..Module 6 input was a wakeup source
  14026. */
  14027. #define LLWU_MF5_MWUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF6_SHIFT)) & LLWU_MF5_MWUF6_MASK)
  14028. #define LLWU_MF5_MWUF7_MASK (0x80U)
  14029. #define LLWU_MF5_MWUF7_SHIFT (7U)
  14030. /*! MWUF7 - Wakeup flag For module 7
  14031. * 0b0..Module 7 input was not a wakeup source
  14032. * 0b1..Module 7 input was a wakeup source
  14033. */
  14034. #define LLWU_MF5_MWUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF7_SHIFT)) & LLWU_MF5_MWUF7_MASK)
  14035. /*! @} */
  14036. /*! @name FILT1 - LLWU Pin Filter 1 register */
  14037. /*! @{ */
  14038. #define LLWU_FILT1_FILTSEL_MASK (0x1FU)
  14039. #define LLWU_FILT1_FILTSEL_SHIFT (0U)
  14040. /*! FILTSEL - Filter Pin Select
  14041. * 0b00000..Select LLWU_P0 for filter
  14042. * 0b11111..Select LLWU_P31 for filter
  14043. */
  14044. #define LLWU_FILT1_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTSEL_SHIFT)) & LLWU_FILT1_FILTSEL_MASK)
  14045. #define LLWU_FILT1_FILTE_MASK (0x60U)
  14046. #define LLWU_FILT1_FILTE_SHIFT (5U)
  14047. /*! FILTE - Digital Filter On External Pin
  14048. * 0b00..Filter disabled
  14049. * 0b01..Filter posedge detect enabled
  14050. * 0b10..Filter negedge detect enabled
  14051. * 0b11..Filter any edge detect enabled
  14052. */
  14053. #define LLWU_FILT1_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTE_SHIFT)) & LLWU_FILT1_FILTE_MASK)
  14054. #define LLWU_FILT1_FILTF_MASK (0x80U)
  14055. #define LLWU_FILT1_FILTF_SHIFT (7U)
  14056. /*! FILTF - Filter Detect Flag
  14057. * 0b0..Pin Filter 1 was not a wakeup source
  14058. * 0b1..Pin Filter 1 was a wakeup source
  14059. */
  14060. #define LLWU_FILT1_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTF_SHIFT)) & LLWU_FILT1_FILTF_MASK)
  14061. /*! @} */
  14062. /*! @name FILT2 - LLWU Pin Filter 2 register */
  14063. /*! @{ */
  14064. #define LLWU_FILT2_FILTSEL_MASK (0x1FU)
  14065. #define LLWU_FILT2_FILTSEL_SHIFT (0U)
  14066. /*! FILTSEL - Filter Pin Select
  14067. * 0b00000..Select LLWU_P0 for filter
  14068. * 0b11111..Select LLWU_P31 for filter
  14069. */
  14070. #define LLWU_FILT2_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTSEL_SHIFT)) & LLWU_FILT2_FILTSEL_MASK)
  14071. #define LLWU_FILT2_FILTE_MASK (0x60U)
  14072. #define LLWU_FILT2_FILTE_SHIFT (5U)
  14073. /*! FILTE - Digital Filter On External Pin
  14074. * 0b00..Filter disabled
  14075. * 0b01..Filter posedge detect enabled
  14076. * 0b10..Filter negedge detect enabled
  14077. * 0b11..Filter any edge detect enabled
  14078. */
  14079. #define LLWU_FILT2_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTE_SHIFT)) & LLWU_FILT2_FILTE_MASK)
  14080. #define LLWU_FILT2_FILTF_MASK (0x80U)
  14081. #define LLWU_FILT2_FILTF_SHIFT (7U)
  14082. /*! FILTF - Filter Detect Flag
  14083. * 0b0..Pin Filter 2 was not a wakeup source
  14084. * 0b1..Pin Filter 2 was a wakeup source
  14085. */
  14086. #define LLWU_FILT2_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTF_SHIFT)) & LLWU_FILT2_FILTF_MASK)
  14087. /*! @} */
  14088. /*!
  14089. * @}
  14090. */ /* end of group LLWU_Register_Masks */
  14091. /* LLWU - Peripheral instance base addresses */
  14092. /** Peripheral LLWU base address */
  14093. #define LLWU_BASE (0x4007C000u)
  14094. /** Peripheral LLWU base pointer */
  14095. #define LLWU ((LLWU_Type *)LLWU_BASE)
  14096. /** Array initializer of LLWU peripheral base addresses */
  14097. #define LLWU_BASE_ADDRS { LLWU_BASE }
  14098. /** Array initializer of LLWU peripheral base pointers */
  14099. #define LLWU_BASE_PTRS { LLWU }
  14100. /** Interrupt vectors for the LLWU peripheral type */
  14101. #define LLWU_IRQS { LLWU_IRQn }
  14102. /*!
  14103. * @}
  14104. */ /* end of group LLWU_Peripheral_Access_Layer */
  14105. /* ----------------------------------------------------------------------------
  14106. -- LPTMR Peripheral Access Layer
  14107. ---------------------------------------------------------------------------- */
  14108. /*!
  14109. * @addtogroup LPTMR_Peripheral_Access_Layer LPTMR Peripheral Access Layer
  14110. * @{
  14111. */
  14112. /** LPTMR - Register Layout Typedef */
  14113. typedef struct {
  14114. __IO uint32_t CSR; /**< Low Power Timer Control Status Register, offset: 0x0 */
  14115. __IO uint32_t PSR; /**< Low Power Timer Prescale Register, offset: 0x4 */
  14116. __IO uint32_t CMR; /**< Low Power Timer Compare Register, offset: 0x8 */
  14117. __IO uint32_t CNR; /**< Low Power Timer Counter Register, offset: 0xC */
  14118. } LPTMR_Type;
  14119. /* ----------------------------------------------------------------------------
  14120. -- LPTMR Register Masks
  14121. ---------------------------------------------------------------------------- */
  14122. /*!
  14123. * @addtogroup LPTMR_Register_Masks LPTMR Register Masks
  14124. * @{
  14125. */
  14126. /*! @name CSR - Low Power Timer Control Status Register */
  14127. /*! @{ */
  14128. #define LPTMR_CSR_TEN_MASK (0x1U)
  14129. #define LPTMR_CSR_TEN_SHIFT (0U)
  14130. /*! TEN - Timer Enable
  14131. * 0b0..LPTMR is disabled and internal logic is reset.
  14132. * 0b1..LPTMR is enabled.
  14133. */
  14134. #define LPTMR_CSR_TEN(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TEN_SHIFT)) & LPTMR_CSR_TEN_MASK)
  14135. #define LPTMR_CSR_TMS_MASK (0x2U)
  14136. #define LPTMR_CSR_TMS_SHIFT (1U)
  14137. /*! TMS - Timer Mode Select
  14138. * 0b0..Time Counter mode.
  14139. * 0b1..Pulse Counter mode.
  14140. */
  14141. #define LPTMR_CSR_TMS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TMS_SHIFT)) & LPTMR_CSR_TMS_MASK)
  14142. #define LPTMR_CSR_TFC_MASK (0x4U)
  14143. #define LPTMR_CSR_TFC_SHIFT (2U)
  14144. /*! TFC - Timer Free-Running Counter
  14145. * 0b0..CNR is reset whenever TCF is set.
  14146. * 0b1..CNR is reset on overflow.
  14147. */
  14148. #define LPTMR_CSR_TFC(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TFC_SHIFT)) & LPTMR_CSR_TFC_MASK)
  14149. #define LPTMR_CSR_TPP_MASK (0x8U)
  14150. #define LPTMR_CSR_TPP_SHIFT (3U)
  14151. /*! TPP - Timer Pin Polarity
  14152. * 0b0..Pulse Counter input source is active-high, and the CNR will increment on the rising-edge.
  14153. * 0b1..Pulse Counter input source is active-low, and the CNR will increment on the falling-edge.
  14154. */
  14155. #define LPTMR_CSR_TPP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPP_SHIFT)) & LPTMR_CSR_TPP_MASK)
  14156. #define LPTMR_CSR_TPS_MASK (0x30U)
  14157. #define LPTMR_CSR_TPS_SHIFT (4U)
  14158. /*! TPS - Timer Pin Select
  14159. * 0b00..Pulse counter input 0 is selected.
  14160. * 0b01..Pulse counter input 1 is selected.
  14161. * 0b10..Pulse counter input 2 is selected.
  14162. * 0b11..Pulse counter input 3 is selected.
  14163. */
  14164. #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPS_SHIFT)) & LPTMR_CSR_TPS_MASK)
  14165. #define LPTMR_CSR_TIE_MASK (0x40U)
  14166. #define LPTMR_CSR_TIE_SHIFT (6U)
  14167. /*! TIE - Timer Interrupt Enable
  14168. * 0b0..Timer interrupt disabled.
  14169. * 0b1..Timer interrupt enabled.
  14170. */
  14171. #define LPTMR_CSR_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TIE_SHIFT)) & LPTMR_CSR_TIE_MASK)
  14172. #define LPTMR_CSR_TCF_MASK (0x80U)
  14173. #define LPTMR_CSR_TCF_SHIFT (7U)
  14174. /*! TCF - Timer Compare Flag
  14175. * 0b0..The value of CNR is not equal to CMR and increments.
  14176. * 0b1..The value of CNR is equal to CMR and increments.
  14177. */
  14178. #define LPTMR_CSR_TCF(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TCF_SHIFT)) & LPTMR_CSR_TCF_MASK)
  14179. /*! @} */
  14180. /*! @name PSR - Low Power Timer Prescale Register */
  14181. /*! @{ */
  14182. #define LPTMR_PSR_PCS_MASK (0x3U)
  14183. #define LPTMR_PSR_PCS_SHIFT (0U)
  14184. /*! PCS - Prescaler Clock Select
  14185. * 0b00..Prescaler/glitch filter clock 0 selected.
  14186. * 0b01..Prescaler/glitch filter clock 1 selected.
  14187. * 0b10..Prescaler/glitch filter clock 2 selected.
  14188. * 0b11..Prescaler/glitch filter clock 3 selected.
  14189. */
  14190. #define LPTMR_PSR_PCS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PCS_SHIFT)) & LPTMR_PSR_PCS_MASK)
  14191. #define LPTMR_PSR_PBYP_MASK (0x4U)
  14192. #define LPTMR_PSR_PBYP_SHIFT (2U)
  14193. /*! PBYP - Prescaler Bypass
  14194. * 0b0..Prescaler/glitch filter is enabled.
  14195. * 0b1..Prescaler/glitch filter is bypassed.
  14196. */
  14197. #define LPTMR_PSR_PBYP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PBYP_SHIFT)) & LPTMR_PSR_PBYP_MASK)
  14198. #define LPTMR_PSR_PRESCALE_MASK (0x78U)
  14199. #define LPTMR_PSR_PRESCALE_SHIFT (3U)
  14200. /*! PRESCALE - Prescale Value
  14201. * 0b0000..Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration.
  14202. * 0b0001..Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges.
  14203. * 0b0010..Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges.
  14204. * 0b0011..Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges.
  14205. * 0b0100..Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges.
  14206. * 0b0101..Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges.
  14207. * 0b0110..Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges.
  14208. * 0b0111..Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges.
  14209. * 0b1000..Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges.
  14210. * 0b1001..Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges.
  14211. * 0b1010..Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges.
  14212. * 0b1011..Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges.
  14213. * 0b1100..Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges.
  14214. * 0b1101..Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges.
  14215. * 0b1110..Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges.
  14216. * 0b1111..Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges.
  14217. */
  14218. #define LPTMR_PSR_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PRESCALE_SHIFT)) & LPTMR_PSR_PRESCALE_MASK)
  14219. /*! @} */
  14220. /*! @name CMR - Low Power Timer Compare Register */
  14221. /*! @{ */
  14222. #define LPTMR_CMR_COMPARE_MASK (0xFFFFU)
  14223. #define LPTMR_CMR_COMPARE_SHIFT (0U)
  14224. #define LPTMR_CMR_COMPARE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CMR_COMPARE_SHIFT)) & LPTMR_CMR_COMPARE_MASK)
  14225. /*! @} */
  14226. /*! @name CNR - Low Power Timer Counter Register */
  14227. /*! @{ */
  14228. #define LPTMR_CNR_COUNTER_MASK (0xFFFFU)
  14229. #define LPTMR_CNR_COUNTER_SHIFT (0U)
  14230. #define LPTMR_CNR_COUNTER(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CNR_COUNTER_SHIFT)) & LPTMR_CNR_COUNTER_MASK)
  14231. /*! @} */
  14232. /*!
  14233. * @}
  14234. */ /* end of group LPTMR_Register_Masks */
  14235. /* LPTMR - Peripheral instance base addresses */
  14236. /** Peripheral LPTMR0 base address */
  14237. #define LPTMR0_BASE (0x40040000u)
  14238. /** Peripheral LPTMR0 base pointer */
  14239. #define LPTMR0 ((LPTMR_Type *)LPTMR0_BASE)
  14240. /** Array initializer of LPTMR peripheral base addresses */
  14241. #define LPTMR_BASE_ADDRS { LPTMR0_BASE }
  14242. /** Array initializer of LPTMR peripheral base pointers */
  14243. #define LPTMR_BASE_PTRS { LPTMR0 }
  14244. /** Interrupt vectors for the LPTMR peripheral type */
  14245. #define LPTMR_IRQS { LPTMR0_IRQn }
  14246. /*!
  14247. * @}
  14248. */ /* end of group LPTMR_Peripheral_Access_Layer */
  14249. /* ----------------------------------------------------------------------------
  14250. -- MCG Peripheral Access Layer
  14251. ---------------------------------------------------------------------------- */
  14252. /*!
  14253. * @addtogroup MCG_Peripheral_Access_Layer MCG Peripheral Access Layer
  14254. * @{
  14255. */
  14256. /** MCG - Register Layout Typedef */
  14257. typedef struct {
  14258. __IO uint8_t C1; /**< MCG Control 1 Register, offset: 0x0 */
  14259. __IO uint8_t C2; /**< MCG Control 2 Register, offset: 0x1 */
  14260. __IO uint8_t C3; /**< MCG Control 3 Register, offset: 0x2 */
  14261. __IO uint8_t C4; /**< MCG Control 4 Register, offset: 0x3 */
  14262. __IO uint8_t C5; /**< MCG Control 5 Register, offset: 0x4 */
  14263. __IO uint8_t C6; /**< MCG Control 6 Register, offset: 0x5 */
  14264. __IO uint8_t S; /**< MCG Status Register, offset: 0x6 */
  14265. uint8_t RESERVED_0[1];
  14266. __IO uint8_t SC; /**< MCG Status and Control Register, offset: 0x8 */
  14267. uint8_t RESERVED_1[1];
  14268. __IO uint8_t ATCVH; /**< MCG Auto Trim Compare Value High Register, offset: 0xA */
  14269. __IO uint8_t ATCVL; /**< MCG Auto Trim Compare Value Low Register, offset: 0xB */
  14270. uint8_t RESERVED_2[1];
  14271. __IO uint8_t C8; /**< MCG Control 8 Register, offset: 0xD */
  14272. } MCG_Type;
  14273. /* ----------------------------------------------------------------------------
  14274. -- MCG Register Masks
  14275. ---------------------------------------------------------------------------- */
  14276. /*!
  14277. * @addtogroup MCG_Register_Masks MCG Register Masks
  14278. * @{
  14279. */
  14280. /*! @name C1 - MCG Control 1 Register */
  14281. /*! @{ */
  14282. #define MCG_C1_IREFSTEN_MASK (0x1U)
  14283. #define MCG_C1_IREFSTEN_SHIFT (0U)
  14284. /*! IREFSTEN - Internal Reference Stop Enable
  14285. * 0b0..Internal reference clock is disabled in Stop mode.
  14286. * 0b1..Internal reference clock is enabled in Stop mode if IRCLKEN is set or if MCG is in FEI, FBI, or BLPI modes before entering Stop mode.
  14287. */
  14288. #define MCG_C1_IREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFSTEN_SHIFT)) & MCG_C1_IREFSTEN_MASK)
  14289. #define MCG_C1_IRCLKEN_MASK (0x2U)
  14290. #define MCG_C1_IRCLKEN_SHIFT (1U)
  14291. /*! IRCLKEN - Internal Reference Clock Enable
  14292. * 0b0..MCGIRCLK inactive.
  14293. * 0b1..MCGIRCLK active.
  14294. */
  14295. #define MCG_C1_IRCLKEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IRCLKEN_SHIFT)) & MCG_C1_IRCLKEN_MASK)
  14296. #define MCG_C1_IREFS_MASK (0x4U)
  14297. #define MCG_C1_IREFS_SHIFT (2U)
  14298. /*! IREFS - Internal Reference Select
  14299. * 0b0..External reference clock is selected.
  14300. * 0b1..The slow internal reference clock is selected.
  14301. */
  14302. #define MCG_C1_IREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFS_SHIFT)) & MCG_C1_IREFS_MASK)
  14303. #define MCG_C1_FRDIV_MASK (0x38U)
  14304. #define MCG_C1_FRDIV_SHIFT (3U)
  14305. /*! FRDIV - FLL External Reference Divider
  14306. * 0b000..If RANGE = 0 , Divide Factor is 1; for all other RANGE values, Divide Factor is 32.
  14307. * 0b001..If RANGE = 0 , Divide Factor is 2; for all other RANGE values, Divide Factor is 64.
  14308. * 0b010..If RANGE = 0 , Divide Factor is 4; for all other RANGE values, Divide Factor is 128.
  14309. * 0b011..If RANGE = 0 , Divide Factor is 8; for all other RANGE values, Divide Factor is 256.
  14310. * 0b100..If RANGE = 0 , Divide Factor is 16; for all other RANGE values, Divide Factor is 512.
  14311. * 0b101..If RANGE = 0 , Divide Factor is 32; for all other RANGE values, Divide Factor is 1024.
  14312. * 0b110..If RANGE = 0 , Divide Factor is 64; for all other RANGE values, Divide Factor is 1280 .
  14313. * 0b111..If RANGE = 0 , Divide Factor is 128; for all other RANGE values, Divide Factor is 1536 .
  14314. */
  14315. #define MCG_C1_FRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_FRDIV_SHIFT)) & MCG_C1_FRDIV_MASK)
  14316. #define MCG_C1_CLKS_MASK (0xC0U)
  14317. #define MCG_C1_CLKS_SHIFT (6U)
  14318. /*! CLKS - Clock Source Select
  14319. * 0b00..Encoding 0 - Output of FLL or PLL is selected (depends on PLLS control bit).
  14320. * 0b01..Encoding 1 - Internal reference clock is selected.
  14321. * 0b10..Encoding 2 - External reference clock is selected.
  14322. * 0b11..Encoding 3 - Reserved.
  14323. */
  14324. #define MCG_C1_CLKS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_CLKS_SHIFT)) & MCG_C1_CLKS_MASK)
  14325. /*! @} */
  14326. /*! @name C2 - MCG Control 2 Register */
  14327. /*! @{ */
  14328. #define MCG_C2_IRCS_MASK (0x1U)
  14329. #define MCG_C2_IRCS_SHIFT (0U)
  14330. /*! IRCS - Internal Reference Clock Select
  14331. * 0b0..Slow internal reference clock selected.
  14332. * 0b1..Fast internal reference clock selected.
  14333. */
  14334. #define MCG_C2_IRCS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_IRCS_SHIFT)) & MCG_C2_IRCS_MASK)
  14335. #define MCG_C2_LP_MASK (0x2U)
  14336. #define MCG_C2_LP_SHIFT (1U)
  14337. /*! LP - Low Power Select
  14338. * 0b0..FLL or PLL is not disabled in bypass modes.
  14339. * 0b1..FLL or PLL is disabled in bypass modes (lower power)
  14340. */
  14341. #define MCG_C2_LP(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LP_SHIFT)) & MCG_C2_LP_MASK)
  14342. #define MCG_C2_EREFS_MASK (0x4U)
  14343. #define MCG_C2_EREFS_SHIFT (2U)
  14344. /*! EREFS - External Reference Select
  14345. * 0b0..External reference clock requested.
  14346. * 0b1..Oscillator requested.
  14347. */
  14348. #define MCG_C2_EREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_EREFS_SHIFT)) & MCG_C2_EREFS_MASK)
  14349. #define MCG_C2_HGO_MASK (0x8U)
  14350. #define MCG_C2_HGO_SHIFT (3U)
  14351. /*! HGO - High Gain Oscillator Select
  14352. * 0b0..Configure crystal oscillator for low-power operation.
  14353. * 0b1..Configure crystal oscillator for high-gain operation.
  14354. */
  14355. #define MCG_C2_HGO(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_HGO_SHIFT)) & MCG_C2_HGO_MASK)
  14356. #define MCG_C2_RANGE_MASK (0x30U)
  14357. #define MCG_C2_RANGE_SHIFT (4U)
  14358. /*! RANGE - Frequency Range Select
  14359. * 0b00..Encoding 0 - Low frequency range selected for the crystal oscillator .
  14360. * 0b01..Encoding 1 - High frequency range selected for the crystal oscillator .
  14361. * 0b1x..Encoding 2 - Very high frequency range selected for the crystal oscillator .
  14362. */
  14363. #define MCG_C2_RANGE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_RANGE_SHIFT)) & MCG_C2_RANGE_MASK)
  14364. #define MCG_C2_FCFTRIM_MASK (0x40U)
  14365. #define MCG_C2_FCFTRIM_SHIFT (6U)
  14366. #define MCG_C2_FCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_FCFTRIM_SHIFT)) & MCG_C2_FCFTRIM_MASK)
  14367. #define MCG_C2_LOCRE0_MASK (0x80U)
  14368. #define MCG_C2_LOCRE0_SHIFT (7U)
  14369. /*! LOCRE0 - Loss of Clock Reset Enable
  14370. * 0b0..Interrupt request is generated on a loss of OSC0 external reference clock.
  14371. * 0b1..Generate a reset request on a loss of OSC0 external reference clock.
  14372. */
  14373. #define MCG_C2_LOCRE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LOCRE0_SHIFT)) & MCG_C2_LOCRE0_MASK)
  14374. /*! @} */
  14375. /*! @name C3 - MCG Control 3 Register */
  14376. /*! @{ */
  14377. #define MCG_C3_SCTRIM_MASK (0xFFU)
  14378. #define MCG_C3_SCTRIM_SHIFT (0U)
  14379. #define MCG_C3_SCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C3_SCTRIM_SHIFT)) & MCG_C3_SCTRIM_MASK)
  14380. /*! @} */
  14381. /*! @name C4 - MCG Control 4 Register */
  14382. /*! @{ */
  14383. #define MCG_C4_SCFTRIM_MASK (0x1U)
  14384. #define MCG_C4_SCFTRIM_SHIFT (0U)
  14385. #define MCG_C4_SCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_SCFTRIM_SHIFT)) & MCG_C4_SCFTRIM_MASK)
  14386. #define MCG_C4_FCTRIM_MASK (0x1EU)
  14387. #define MCG_C4_FCTRIM_SHIFT (1U)
  14388. #define MCG_C4_FCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_FCTRIM_SHIFT)) & MCG_C4_FCTRIM_MASK)
  14389. #define MCG_C4_DRST_DRS_MASK (0x60U)
  14390. #define MCG_C4_DRST_DRS_SHIFT (5U)
  14391. /*! DRST_DRS - DCO Range Select
  14392. * 0b00..Encoding 0 - Low range (reset default).
  14393. * 0b01..Encoding 1 - Mid range.
  14394. * 0b10..Encoding 2 - Mid-high range.
  14395. * 0b11..Encoding 3 - High range.
  14396. */
  14397. #define MCG_C4_DRST_DRS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DRST_DRS_SHIFT)) & MCG_C4_DRST_DRS_MASK)
  14398. #define MCG_C4_DMX32_MASK (0x80U)
  14399. #define MCG_C4_DMX32_SHIFT (7U)
  14400. /*! DMX32 - DCO Maximum Frequency with 32.768 kHz Reference
  14401. * 0b0..DCO has a default range of 25%.
  14402. * 0b1..DCO is fine-tuned for maximum frequency with 32.768 kHz reference.
  14403. */
  14404. #define MCG_C4_DMX32(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DMX32_SHIFT)) & MCG_C4_DMX32_MASK)
  14405. /*! @} */
  14406. /*! @name C5 - MCG Control 5 Register */
  14407. /*! @{ */
  14408. #define MCG_C5_PRDIV_MASK (0x7U)
  14409. #define MCG_C5_PRDIV_SHIFT (0U)
  14410. /*! PRDIV - PLL External Reference Divider
  14411. * 0b000..Divide Factor is 1
  14412. * 0b001..Divide Factor is 2
  14413. * 0b010..Divide Factor is 3
  14414. * 0b011..Divide Factor is 4
  14415. * 0b100..Divide Factor is 5
  14416. * 0b101..Divide Factor is 6
  14417. * 0b110..Divide Factor is 7
  14418. * 0b111..Divide Factor is 8
  14419. */
  14420. #define MCG_C5_PRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PRDIV_SHIFT)) & MCG_C5_PRDIV_MASK)
  14421. #define MCG_C5_PLLSTEN_MASK (0x20U)
  14422. #define MCG_C5_PLLSTEN_SHIFT (5U)
  14423. /*! PLLSTEN - PLL Stop Enable
  14424. * 0b0..MCGPLLCLK and MCGPLLCLK2X are disabled in any of the Stop modes.
  14425. * 0b1..MCGPLLCLK and MCGPLLCLK2X are enabled if system is in Normal Stop mode.
  14426. */
  14427. #define MCG_C5_PLLSTEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLSTEN_SHIFT)) & MCG_C5_PLLSTEN_MASK)
  14428. #define MCG_C5_PLLCLKEN_MASK (0x40U)
  14429. #define MCG_C5_PLLCLKEN_SHIFT (6U)
  14430. /*! PLLCLKEN - PLL Clock Enable
  14431. * 0b0..MCGPLLCLK is inactive.
  14432. * 0b1..MCGPLLCLK is active.
  14433. */
  14434. #define MCG_C5_PLLCLKEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLCLKEN_SHIFT)) & MCG_C5_PLLCLKEN_MASK)
  14435. /*! @} */
  14436. /*! @name C6 - MCG Control 6 Register */
  14437. /*! @{ */
  14438. #define MCG_C6_VDIV_MASK (0x1FU)
  14439. #define MCG_C6_VDIV_SHIFT (0U)
  14440. /*! VDIV - VCO Divider
  14441. * 0b00000..Multiply Factor is 16
  14442. * 0b00001..Multiply Factor is 17
  14443. * 0b00010..Multiply Factor is 18
  14444. * 0b00011..Multiply Factor is 19
  14445. * 0b00100..Multiply Factor is 20
  14446. * 0b00101..Multiply Factor is 21
  14447. * 0b00110..Multiply Factor is 22
  14448. * 0b00111..Multiply Factor is 23
  14449. * 0b01000..Multiply Factor is 24
  14450. * 0b01001..Multiply Factor is 25
  14451. * 0b01010..Multiply Factor is 26
  14452. * 0b01011..Multiply Factor is 27
  14453. * 0b01100..Multiply Factor is 28
  14454. * 0b01101..Multiply Factor is 29
  14455. * 0b01110..Multiply Factor is 30
  14456. * 0b01111..Multiply Factor is 31
  14457. * 0b10000..Multiply Factor is 32
  14458. * 0b10001..Multiply Factor is 33
  14459. * 0b10010..Multiply Factor is 34
  14460. * 0b10011..Multiply Factor is 35
  14461. * 0b10100..Multiply Factor is 36
  14462. * 0b10101..Multiply Factor is 37
  14463. * 0b10110..Multiply Factor is 38
  14464. * 0b10111..Multiply Factor is 39
  14465. * 0b11000..Multiply Factor is 40
  14466. * 0b11001..Multiply Factor is 41
  14467. * 0b11010..Multiply Factor is 42
  14468. * 0b11011..Multiply Factor is 43
  14469. * 0b11100..Multiply Factor is 44
  14470. * 0b11101..Multiply Factor is 45
  14471. * 0b11110..Multiply Factor is 46
  14472. * 0b11111..Multiply Factor is 47
  14473. */
  14474. #define MCG_C6_VDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_VDIV_SHIFT)) & MCG_C6_VDIV_MASK)
  14475. #define MCG_C6_CME0_MASK (0x20U)
  14476. #define MCG_C6_CME0_SHIFT (5U)
  14477. /*! CME0 - Clock Monitor Enable
  14478. * 0b0..External clock monitor is disabled for OSC0.
  14479. * 0b1..External clock monitor is enabled for OSC0.
  14480. */
  14481. #define MCG_C6_CME0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_CME0_SHIFT)) & MCG_C6_CME0_MASK)
  14482. #define MCG_C6_PLLS_MASK (0x40U)
  14483. #define MCG_C6_PLLS_SHIFT (6U)
  14484. /*! PLLS - PLL Select
  14485. * 0b0..FLL is selected.
  14486. * 0b1..PLL is selected (PRDIV 0 need to be programmed to the correct divider to generate a PLL reference clock in the range of 8-16 MHz prior to setting the PLLS bit).
  14487. */
  14488. #define MCG_C6_PLLS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_PLLS_SHIFT)) & MCG_C6_PLLS_MASK)
  14489. #define MCG_C6_LOLIE0_MASK (0x80U)
  14490. #define MCG_C6_LOLIE0_SHIFT (7U)
  14491. /*! LOLIE0 - Loss of Lock Interrrupt Enable
  14492. * 0b0..No interrupt request is generated on loss of lock.
  14493. * 0b1..Generate an interrupt request on loss of lock.
  14494. */
  14495. #define MCG_C6_LOLIE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_LOLIE0_SHIFT)) & MCG_C6_LOLIE0_MASK)
  14496. /*! @} */
  14497. /*! @name S - MCG Status Register */
  14498. /*! @{ */
  14499. #define MCG_S_IRCST_MASK (0x1U)
  14500. #define MCG_S_IRCST_SHIFT (0U)
  14501. /*! IRCST - Internal Reference Clock Status
  14502. * 0b0..Source of internal reference clock is the slow clock (32 kHz IRC).
  14503. * 0b1..Source of internal reference clock is the fast clock (4 MHz IRC).
  14504. */
  14505. #define MCG_S_IRCST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IRCST_SHIFT)) & MCG_S_IRCST_MASK)
  14506. #define MCG_S_OSCINIT0_MASK (0x2U)
  14507. #define MCG_S_OSCINIT0_SHIFT (1U)
  14508. #define MCG_S_OSCINIT0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_OSCINIT0_SHIFT)) & MCG_S_OSCINIT0_MASK)
  14509. #define MCG_S_CLKST_MASK (0xCU)
  14510. #define MCG_S_CLKST_SHIFT (2U)
  14511. /*! CLKST - Clock Mode Status
  14512. * 0b00..Encoding 0 - Output of the FLL is selected (reset default).
  14513. * 0b01..Encoding 1 - Internal reference clock is selected.
  14514. * 0b10..Encoding 2 - External reference clock is selected.
  14515. * 0b11..Encoding 3 - Output of the PLL is selected.
  14516. */
  14517. #define MCG_S_CLKST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_CLKST_SHIFT)) & MCG_S_CLKST_MASK)
  14518. #define MCG_S_IREFST_MASK (0x10U)
  14519. #define MCG_S_IREFST_SHIFT (4U)
  14520. /*! IREFST - Internal Reference Status
  14521. * 0b0..Source of FLL reference clock is the external reference clock.
  14522. * 0b1..Source of FLL reference clock is the internal reference clock.
  14523. */
  14524. #define MCG_S_IREFST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IREFST_SHIFT)) & MCG_S_IREFST_MASK)
  14525. #define MCG_S_PLLST_MASK (0x20U)
  14526. #define MCG_S_PLLST_SHIFT (5U)
  14527. /*! PLLST - PLL Select Status
  14528. * 0b0..Source of PLLS clock is FLL clock.
  14529. * 0b1..Source of PLLS clock is PLL output clock.
  14530. */
  14531. #define MCG_S_PLLST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_PLLST_SHIFT)) & MCG_S_PLLST_MASK)
  14532. #define MCG_S_LOCK0_MASK (0x40U)
  14533. #define MCG_S_LOCK0_SHIFT (6U)
  14534. /*! LOCK0 - Lock Status
  14535. * 0b0..PLL is currently unlocked.
  14536. * 0b1..PLL is currently locked.
  14537. */
  14538. #define MCG_S_LOCK0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOCK0_SHIFT)) & MCG_S_LOCK0_MASK)
  14539. #define MCG_S_LOLS0_MASK (0x80U)
  14540. #define MCG_S_LOLS0_SHIFT (7U)
  14541. /*! LOLS0 - Loss of Lock Status
  14542. * 0b0..PLL has not lost lock since LOLS 0 was last cleared.
  14543. * 0b1..PLL has lost lock since LOLS 0 was last cleared.
  14544. */
  14545. #define MCG_S_LOLS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOLS0_SHIFT)) & MCG_S_LOLS0_MASK)
  14546. /*! @} */
  14547. /*! @name SC - MCG Status and Control Register */
  14548. /*! @{ */
  14549. #define MCG_SC_LOCS0_MASK (0x1U)
  14550. #define MCG_SC_LOCS0_SHIFT (0U)
  14551. /*! LOCS0 - OSC0 Loss of Clock Status
  14552. * 0b0..Loss of OSC0 has not occurred.
  14553. * 0b1..Loss of OSC0 has occurred.
  14554. */
  14555. #define MCG_SC_LOCS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_LOCS0_SHIFT)) & MCG_SC_LOCS0_MASK)
  14556. #define MCG_SC_FCRDIV_MASK (0xEU)
  14557. #define MCG_SC_FCRDIV_SHIFT (1U)
  14558. /*! FCRDIV - Fast Clock Internal Reference Divider
  14559. * 0b000..Divide Factor is 1
  14560. * 0b001..Divide Factor is 2.
  14561. * 0b010..Divide Factor is 4.
  14562. * 0b011..Divide Factor is 8.
  14563. * 0b100..Divide Factor is 16
  14564. * 0b101..Divide Factor is 32
  14565. * 0b110..Divide Factor is 64
  14566. * 0b111..Divide Factor is 128.
  14567. */
  14568. #define MCG_SC_FCRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FCRDIV_SHIFT)) & MCG_SC_FCRDIV_MASK)
  14569. #define MCG_SC_FLTPRSRV_MASK (0x10U)
  14570. #define MCG_SC_FLTPRSRV_SHIFT (4U)
  14571. /*! FLTPRSRV - FLL Filter Preserve Enable
  14572. * 0b0..FLL filter and FLL frequency will reset on changes to currect clock mode.
  14573. * 0b1..Fll filter and FLL frequency retain their previous values during new clock mode change.
  14574. */
  14575. #define MCG_SC_FLTPRSRV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FLTPRSRV_SHIFT)) & MCG_SC_FLTPRSRV_MASK)
  14576. #define MCG_SC_ATMF_MASK (0x20U)
  14577. #define MCG_SC_ATMF_SHIFT (5U)
  14578. /*! ATMF - Automatic Trim Machine Fail Flag
  14579. * 0b0..Automatic Trim Machine completed normally.
  14580. * 0b1..Automatic Trim Machine failed.
  14581. */
  14582. #define MCG_SC_ATMF(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMF_SHIFT)) & MCG_SC_ATMF_MASK)
  14583. #define MCG_SC_ATMS_MASK (0x40U)
  14584. #define MCG_SC_ATMS_SHIFT (6U)
  14585. /*! ATMS - Automatic Trim Machine Select
  14586. * 0b0..32 kHz Internal Reference Clock selected.
  14587. * 0b1..4 MHz Internal Reference Clock selected.
  14588. */
  14589. #define MCG_SC_ATMS(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMS_SHIFT)) & MCG_SC_ATMS_MASK)
  14590. #define MCG_SC_ATME_MASK (0x80U)
  14591. #define MCG_SC_ATME_SHIFT (7U)
  14592. /*! ATME - Automatic Trim Machine Enable
  14593. * 0b0..Auto Trim Machine disabled.
  14594. * 0b1..Auto Trim Machine enabled.
  14595. */
  14596. #define MCG_SC_ATME(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATME_SHIFT)) & MCG_SC_ATME_MASK)
  14597. /*! @} */
  14598. /*! @name ATCVH - MCG Auto Trim Compare Value High Register */
  14599. /*! @{ */
  14600. #define MCG_ATCVH_ATCVH_MASK (0xFFU)
  14601. #define MCG_ATCVH_ATCVH_SHIFT (0U)
  14602. #define MCG_ATCVH_ATCVH(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVH_ATCVH_SHIFT)) & MCG_ATCVH_ATCVH_MASK)
  14603. /*! @} */
  14604. /*! @name ATCVL - MCG Auto Trim Compare Value Low Register */
  14605. /*! @{ */
  14606. #define MCG_ATCVL_ATCVL_MASK (0xFFU)
  14607. #define MCG_ATCVL_ATCVL_SHIFT (0U)
  14608. #define MCG_ATCVL_ATCVL(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVL_ATCVL_SHIFT)) & MCG_ATCVL_ATCVL_MASK)
  14609. /*! @} */
  14610. /*! @name C8 - MCG Control 8 Register */
  14611. /*! @{ */
  14612. #define MCG_C8_LOLRE_MASK (0x40U)
  14613. #define MCG_C8_LOLRE_SHIFT (6U)
  14614. /*! LOLRE - PLL Loss of Lock Reset Enable
  14615. * 0b0..Interrupt request is generated on a PLL loss of lock indication. The PLL loss of lock interrupt enable bit must also be set to generate the interrupt request.
  14616. * 0b1..Generate a reset request on a PLL loss of lock indication.
  14617. */
  14618. #define MCG_C8_LOLRE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOLRE_SHIFT)) & MCG_C8_LOLRE_MASK)
  14619. /*! @} */
  14620. /*!
  14621. * @}
  14622. */ /* end of group MCG_Register_Masks */
  14623. /* MCG - Peripheral instance base addresses */
  14624. /** Peripheral MCG base address */
  14625. #define MCG_BASE (0x40064000u)
  14626. /** Peripheral MCG base pointer */
  14627. #define MCG ((MCG_Type *)MCG_BASE)
  14628. /** Array initializer of MCG peripheral base addresses */
  14629. #define MCG_BASE_ADDRS { MCG_BASE }
  14630. /** Array initializer of MCG peripheral base pointers */
  14631. #define MCG_BASE_PTRS { MCG }
  14632. /** Interrupt vectors for the MCG peripheral type */
  14633. #define MCG_IRQS { MCG_IRQn }
  14634. /* MCG C5[PLLCLKEN0] backward compatibility */
  14635. #define MCG_C5_PLLCLKEN0_MASK (MCG_C5_PLLCLKEN_MASK)
  14636. #define MCG_C5_PLLCLKEN0_SHIFT (MCG_C5_PLLCLKEN_SHIFT)
  14637. #define MCG_C5_PLLCLKEN0_WIDTH (MCG_C5_PLLCLKEN_WIDTH)
  14638. #define MCG_C5_PLLCLKEN0(x) (MCG_C5_PLLCLKEN(x))
  14639. /* MCG C5[PLLSTEN0] backward compatibility */
  14640. #define MCG_C5_PLLSTEN0_MASK (MCG_C5_PLLSTEN_MASK)
  14641. #define MCG_C5_PLLSTEN0_SHIFT (MCG_C5_PLLSTEN_SHIFT)
  14642. #define MCG_C5_PLLSTEN0_WIDTH (MCG_C5_PLLSTEN_WIDTH)
  14643. #define MCG_C5_PLLSTEN0(x) (MCG_C5_PLLSTEN(x))
  14644. /* MCG C5[PRDIV0] backward compatibility */
  14645. #define MCG_C5_PRDIV0_MASK (MCG_C5_PRDIV_MASK)
  14646. #define MCG_C5_PRDIV0_SHIFT (MCG_C5_PRDIV_SHIFT)
  14647. #define MCG_C5_PRDIV0_WIDTH (MCG_C5_PRDIV_WIDTH)
  14648. #define MCG_C5_PRDIV0(x) (MCG_C5_PRDIV(x))
  14649. /* MCG C6[VDIV0] backward compatibility */
  14650. #define MCG_C6_VDIV0_MASK (MCG_C6_VDIV_MASK)
  14651. #define MCG_C6_VDIV0_SHIFT (MCG_C6_VDIV_SHIFT)
  14652. #define MCG_C6_VDIV0_WIDTH (MCG_C6_VDIV_WIDTH)
  14653. #define MCG_C6_VDIV0(x) (MCG_C6_VDIV(x))
  14654. /*!
  14655. * @}
  14656. */ /* end of group MCG_Peripheral_Access_Layer */
  14657. /* ----------------------------------------------------------------------------
  14658. -- MCM Peripheral Access Layer
  14659. ---------------------------------------------------------------------------- */
  14660. /*!
  14661. * @addtogroup MCM_Peripheral_Access_Layer MCM Peripheral Access Layer
  14662. * @{
  14663. */
  14664. /** MCM - Register Layout Typedef */
  14665. typedef struct {
  14666. __I uint32_t PCT; /**< Processor core type, offset: 0x0 */
  14667. uint8_t RESERVED_0[8];
  14668. __IO uint32_t CR; /**< Control Register, offset: 0xC */
  14669. __IO uint32_t ISCR; /**< Interrupt Status and Control Register, offset: 0x10 */
  14670. uint8_t RESERVED_1[32];
  14671. __IO uint32_t CPO; /**< Compute Only Operation Control Register, offset: 0x34 */
  14672. uint8_t RESERVED_2[968];
  14673. __I uint32_t LMEM[5]; /**< Local Memory General Descriptor Register, array offset: 0x400, array step: 0x4 */
  14674. } MCM_Type;
  14675. /* ----------------------------------------------------------------------------
  14676. -- MCM Register Masks
  14677. ---------------------------------------------------------------------------- */
  14678. /*!
  14679. * @addtogroup MCM_Register_Masks MCM Register Masks
  14680. * @{
  14681. */
  14682. /*! @name PCT - Processor core type */
  14683. /*! @{ */
  14684. #define MCM_PCT_PLREV_MASK (0xFFFFU)
  14685. #define MCM_PCT_PLREV_SHIFT (0U)
  14686. #define MCM_PCT_PLREV(x) (((uint32_t)(((uint32_t)(x)) << MCM_PCT_PLREV_SHIFT)) & MCM_PCT_PLREV_MASK)
  14687. #define MCM_PCT_PCT_MASK (0xFFFF0000U)
  14688. #define MCM_PCT_PCT_SHIFT (16U)
  14689. #define MCM_PCT_PCT(x) (((uint32_t)(((uint32_t)(x)) << MCM_PCT_PCT_SHIFT)) & MCM_PCT_PCT_MASK)
  14690. /*! @} */
  14691. /*! @name CR - Control Register */
  14692. /*! @{ */
  14693. #define MCM_CR_AHBSPRI_MASK (0x8000000U)
  14694. #define MCM_CR_AHBSPRI_SHIFT (27U)
  14695. /*! AHBSPRI - AHB Slave Interface Priority
  14696. * 0b0..SW accesses take priority over AHBS accesses
  14697. * 0b1..AHBS accesses take priority over SW accesses
  14698. */
  14699. #define MCM_CR_AHBSPRI(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_AHBSPRI_SHIFT)) & MCM_CR_AHBSPRI_MASK)
  14700. /*! @} */
  14701. /*! @name ISCR - Interrupt Status and Control Register */
  14702. /*! @{ */
  14703. #define MCM_ISCR_FIOC_MASK (0x100U)
  14704. #define MCM_ISCR_FIOC_SHIFT (8U)
  14705. /*! FIOC - FPU invalid operation interrupt status
  14706. * 0b0..No interrupt
  14707. * 0b1..Interrupt has occurred
  14708. */
  14709. #define MCM_ISCR_FIOC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOC_SHIFT)) & MCM_ISCR_FIOC_MASK)
  14710. #define MCM_ISCR_FDZC_MASK (0x200U)
  14711. #define MCM_ISCR_FDZC_SHIFT (9U)
  14712. /*! FDZC - FPU divide-by-zero interrupt status
  14713. * 0b0..No interrupt
  14714. * 0b1..Interrupt has occurred
  14715. */
  14716. #define MCM_ISCR_FDZC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZC_SHIFT)) & MCM_ISCR_FDZC_MASK)
  14717. #define MCM_ISCR_FOFC_MASK (0x400U)
  14718. #define MCM_ISCR_FOFC_SHIFT (10U)
  14719. /*! FOFC - FPU overflow interrupt status
  14720. * 0b0..No interrupt
  14721. * 0b1..Interrupt has occurred
  14722. */
  14723. #define MCM_ISCR_FOFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFC_SHIFT)) & MCM_ISCR_FOFC_MASK)
  14724. #define MCM_ISCR_FUFC_MASK (0x800U)
  14725. #define MCM_ISCR_FUFC_SHIFT (11U)
  14726. /*! FUFC - FPU underflow interrupt status
  14727. * 0b0..No interrupt
  14728. * 0b1..Interrupt has occurred
  14729. */
  14730. #define MCM_ISCR_FUFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFC_SHIFT)) & MCM_ISCR_FUFC_MASK)
  14731. #define MCM_ISCR_FIXC_MASK (0x1000U)
  14732. #define MCM_ISCR_FIXC_SHIFT (12U)
  14733. /*! FIXC - FPU inexact interrupt status
  14734. * 0b0..No interrupt
  14735. * 0b1..Interrupt has occured
  14736. */
  14737. #define MCM_ISCR_FIXC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXC_SHIFT)) & MCM_ISCR_FIXC_MASK)
  14738. #define MCM_ISCR_FIDC_MASK (0x8000U)
  14739. #define MCM_ISCR_FIDC_SHIFT (15U)
  14740. /*! FIDC - FPU input denormal interrupt status
  14741. * 0b0..No interrupt
  14742. * 0b1..Interrupt has occured
  14743. */
  14744. #define MCM_ISCR_FIDC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDC_SHIFT)) & MCM_ISCR_FIDC_MASK)
  14745. #define MCM_ISCR_FIOCE_MASK (0x1000000U)
  14746. #define MCM_ISCR_FIOCE_SHIFT (24U)
  14747. /*! FIOCE - FPU invalid operation interrupt enable
  14748. * 0b0..Disable interrupt
  14749. * 0b1..Enable interrupt
  14750. */
  14751. #define MCM_ISCR_FIOCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOCE_SHIFT)) & MCM_ISCR_FIOCE_MASK)
  14752. #define MCM_ISCR_FDZCE_MASK (0x2000000U)
  14753. #define MCM_ISCR_FDZCE_SHIFT (25U)
  14754. /*! FDZCE - FPU divide-by-zero interrupt enable
  14755. * 0b0..Disable interrupt
  14756. * 0b1..Enable interrupt
  14757. */
  14758. #define MCM_ISCR_FDZCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZCE_SHIFT)) & MCM_ISCR_FDZCE_MASK)
  14759. #define MCM_ISCR_FOFCE_MASK (0x4000000U)
  14760. #define MCM_ISCR_FOFCE_SHIFT (26U)
  14761. /*! FOFCE - FPU overflow interrupt enable
  14762. * 0b0..Disable interrupt
  14763. * 0b1..Enable interrupt
  14764. */
  14765. #define MCM_ISCR_FOFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFCE_SHIFT)) & MCM_ISCR_FOFCE_MASK)
  14766. #define MCM_ISCR_FUFCE_MASK (0x8000000U)
  14767. #define MCM_ISCR_FUFCE_SHIFT (27U)
  14768. /*! FUFCE - FPU underflow interrupt enable
  14769. * 0b0..Disable interrupt
  14770. * 0b1..Enable interrupt
  14771. */
  14772. #define MCM_ISCR_FUFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFCE_SHIFT)) & MCM_ISCR_FUFCE_MASK)
  14773. #define MCM_ISCR_FIXCE_MASK (0x10000000U)
  14774. #define MCM_ISCR_FIXCE_SHIFT (28U)
  14775. /*! FIXCE - FPU inexact interrupt enable
  14776. * 0b0..Disable interrupt
  14777. * 0b1..Enable interrupt
  14778. */
  14779. #define MCM_ISCR_FIXCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXCE_SHIFT)) & MCM_ISCR_FIXCE_MASK)
  14780. #define MCM_ISCR_FIDCE_MASK (0x80000000U)
  14781. #define MCM_ISCR_FIDCE_SHIFT (31U)
  14782. /*! FIDCE - FPU input denormal interrupt enable
  14783. * 0b0..Disable interrupt
  14784. * 0b1..Enable interrupt
  14785. */
  14786. #define MCM_ISCR_FIDCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDCE_SHIFT)) & MCM_ISCR_FIDCE_MASK)
  14787. /*! @} */
  14788. /*! @name CPO - Compute Only Operation Control Register */
  14789. /*! @{ */
  14790. #define MCM_CPO_CPOREQ_MASK (0x1U)
  14791. #define MCM_CPO_CPOREQ_SHIFT (0U)
  14792. /*! CPOREQ - Compute Only Operation request
  14793. * 0b0..Request is cleared.
  14794. * 0b1..Request Compute Only Operation.
  14795. */
  14796. #define MCM_CPO_CPOREQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOREQ_SHIFT)) & MCM_CPO_CPOREQ_MASK)
  14797. #define MCM_CPO_CPOACK_MASK (0x2U)
  14798. #define MCM_CPO_CPOACK_SHIFT (1U)
  14799. /*! CPOACK - Compute Only Operation acknowledge
  14800. * 0b0..Compute only operation entry has not completed or compute only operation exit has completed.
  14801. * 0b1..Compute only operation entry has completed or compute only operation exit has not completed.
  14802. */
  14803. #define MCM_CPO_CPOACK(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOACK_SHIFT)) & MCM_CPO_CPOACK_MASK)
  14804. /*! @} */
  14805. /*! @name LMEM - Local Memory General Descriptor Register */
  14806. /*! @{ */
  14807. #define MCM_LMEM_LMEM_Type_MASK (0xE000U)
  14808. #define MCM_LMEM_LMEM_Type_SHIFT (13U)
  14809. /*! LMEM_Type
  14810. * 0b000..ITCM (Instruction Tightly Coupled Memory)
  14811. * 0b001..DTCM (Data Tightly Coupled Memory)
  14812. * 0b010..Instruction Cache
  14813. * 0b011..Data Cache
  14814. */
  14815. #define MCM_LMEM_LMEM_Type(x) (((uint32_t)(((uint32_t)(x)) << MCM_LMEM_LMEM_Type_SHIFT)) & MCM_LMEM_LMEM_Type_MASK)
  14816. #define MCM_LMEM_LMEM_Width_MASK (0xE0000U)
  14817. #define MCM_LMEM_LMEM_Width_SHIFT (17U)
  14818. /*! LMEM_Width
  14819. * 0b010..32-bits
  14820. * 0b011..64-bits
  14821. */
  14822. #define MCM_LMEM_LMEM_Width(x) (((uint32_t)(((uint32_t)(x)) << MCM_LMEM_LMEM_Width_SHIFT)) & MCM_LMEM_LMEM_Width_MASK)
  14823. #define MCM_LMEM_LMEM_Ways_MASK (0xF00000U)
  14824. #define MCM_LMEM_LMEM_Ways_SHIFT (20U)
  14825. /*! LMEM_Ways
  14826. * 0b0000..Reserved (not applicable)
  14827. * 0b0010..2-way set associative
  14828. * 0b0100..4-way set associative
  14829. */
  14830. #define MCM_LMEM_LMEM_Ways(x) (((uint32_t)(((uint32_t)(x)) << MCM_LMEM_LMEM_Ways_SHIFT)) & MCM_LMEM_LMEM_Ways_MASK)
  14831. #define MCM_LMEM_LMEM_Size_MASK (0xF000000U)
  14832. #define MCM_LMEM_LMEM_Size_SHIFT (24U)
  14833. /*! LMEM_Size
  14834. * 0b0100..8KB
  14835. * 0b0101..16KB
  14836. * 0b0111..64KB
  14837. */
  14838. #define MCM_LMEM_LMEM_Size(x) (((uint32_t)(((uint32_t)(x)) << MCM_LMEM_LMEM_Size_SHIFT)) & MCM_LMEM_LMEM_Size_MASK)
  14839. #define MCM_LMEM_LMEM_Valid_MASK (0x80000000U)
  14840. #define MCM_LMEM_LMEM_Valid_SHIFT (31U)
  14841. /*! LMEM_Valid
  14842. * 0b0..Local memory not present
  14843. * 0b1..Local memory present
  14844. */
  14845. #define MCM_LMEM_LMEM_Valid(x) (((uint32_t)(((uint32_t)(x)) << MCM_LMEM_LMEM_Valid_SHIFT)) & MCM_LMEM_LMEM_Valid_MASK)
  14846. /*! @} */
  14847. /* The count of MCM_LMEM */
  14848. #define MCM_LMEM_COUNT (5U)
  14849. /*!
  14850. * @}
  14851. */ /* end of group MCM_Register_Masks */
  14852. /* MCM - Peripheral instance base addresses */
  14853. /** Peripheral MCM base address */
  14854. #define MCM_BASE (0xE0080000u)
  14855. /** Peripheral MCM base pointer */
  14856. #define MCM ((MCM_Type *)MCM_BASE)
  14857. /** Array initializer of MCM peripheral base addresses */
  14858. #define MCM_BASE_ADDRS { MCM_BASE }
  14859. /** Array initializer of MCM peripheral base pointers */
  14860. #define MCM_BASE_PTRS { MCM }
  14861. /** Interrupt vectors for the MCM peripheral type */
  14862. #define MCM_IRQS { MCM_IRQn }
  14863. /*!
  14864. * @}
  14865. */ /* end of group MCM_Peripheral_Access_Layer */
  14866. /* ----------------------------------------------------------------------------
  14867. -- MSCM Peripheral Access Layer
  14868. ---------------------------------------------------------------------------- */
  14869. /*!
  14870. * @addtogroup MSCM_Peripheral_Access_Layer MSCM Peripheral Access Layer
  14871. * @{
  14872. */
  14873. /** MSCM - Register Layout Typedef */
  14874. typedef struct {
  14875. __I uint32_t CPxTYPE; /**< Processor X Type Register, offset: 0x0 */
  14876. __I uint32_t CPxNUM; /**< Processor X Number Register, offset: 0x4 */
  14877. __I uint32_t CPxMASTER; /**< Processor X Master Register, offset: 0x8 */
  14878. __I uint32_t CPxCOUNT; /**< Processor X Count Register, offset: 0xC */
  14879. uint8_t RESERVED_0[4];
  14880. __I uint32_t CPxCFG1; /**< Processor X Configuration 1 Register, offset: 0x14 */
  14881. uint8_t RESERVED_1[4];
  14882. __I uint32_t CPxCFG3; /**< Processor X Configuration 3 Register, offset: 0x1C */
  14883. struct { /* offset: 0x20, array step: 0x20 */
  14884. __I uint32_t TYPE; /**< Processor 0 Type Register..Processor 1 Type Register, array offset: 0x20, array step: 0x20 */
  14885. __I uint32_t NUM; /**< Processor 0 Number Register..Processor 1 Number Register, array offset: 0x24, array step: 0x20 */
  14886. __I uint32_t MASTER; /**< Processor 0 Master Register..Processor 1 Master Register, array offset: 0x28, array step: 0x20 */
  14887. __I uint32_t COUNT; /**< Processor 0 Count Register..Processor 1 Count Register, array offset: 0x2C, array step: 0x20 */
  14888. uint8_t RESERVED_0[4];
  14889. __I uint32_t CFG1; /**< Processor 0 Configuration 1 Register..Processor 1 Configuration 1 Register, array offset: 0x34, array step: 0x20 */
  14890. uint8_t RESERVED_1[4];
  14891. __I uint32_t CFG3; /**< Processor 0 Configuration 3 Register..Processor 1 Configuration 3 Register, array offset: 0x3C, array step: 0x20 */
  14892. } CP[2];
  14893. uint8_t RESERVED_2[928];
  14894. __I uint32_t OCMDR[3]; /**< On-Chip Memory Descriptor Register, array offset: 0x400, array step: 0x4 */
  14895. } MSCM_Type;
  14896. /* ----------------------------------------------------------------------------
  14897. -- MSCM Register Masks
  14898. ---------------------------------------------------------------------------- */
  14899. /*!
  14900. * @addtogroup MSCM_Register_Masks MSCM Register Masks
  14901. * @{
  14902. */
  14903. /*! @name CPxTYPE - Processor X Type Register */
  14904. /*! @{ */
  14905. #define MSCM_CPxTYPE_RYPZ_MASK (0xFFU)
  14906. #define MSCM_CPxTYPE_RYPZ_SHIFT (0U)
  14907. #define MSCM_CPxTYPE_RYPZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxTYPE_RYPZ_SHIFT)) & MSCM_CPxTYPE_RYPZ_MASK)
  14908. #define MSCM_CPxTYPE_PERSONALITY_MASK (0xFFFFFF00U)
  14909. #define MSCM_CPxTYPE_PERSONALITY_SHIFT (8U)
  14910. #define MSCM_CPxTYPE_PERSONALITY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxTYPE_PERSONALITY_SHIFT)) & MSCM_CPxTYPE_PERSONALITY_MASK)
  14911. /*! @} */
  14912. /*! @name CPxNUM - Processor X Number Register */
  14913. /*! @{ */
  14914. #define MSCM_CPxNUM_CPN_MASK (0x1U)
  14915. #define MSCM_CPxNUM_CPN_SHIFT (0U)
  14916. #define MSCM_CPxNUM_CPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxNUM_CPN_SHIFT)) & MSCM_CPxNUM_CPN_MASK)
  14917. /*! @} */
  14918. /*! @name CPxMASTER - Processor X Master Register */
  14919. /*! @{ */
  14920. #define MSCM_CPxMASTER_PPN_MASK (0x3FU)
  14921. #define MSCM_CPxMASTER_PPN_SHIFT (0U)
  14922. #define MSCM_CPxMASTER_PPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxMASTER_PPN_SHIFT)) & MSCM_CPxMASTER_PPN_MASK)
  14923. /*! @} */
  14924. /*! @name CPxCOUNT - Processor X Count Register */
  14925. /*! @{ */
  14926. #define MSCM_CPxCOUNT_PCNT_MASK (0x3U)
  14927. #define MSCM_CPxCOUNT_PCNT_SHIFT (0U)
  14928. #define MSCM_CPxCOUNT_PCNT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCOUNT_PCNT_SHIFT)) & MSCM_CPxCOUNT_PCNT_MASK)
  14929. /*! @} */
  14930. /*! @name CPxCFG1 - Processor X Configuration 1 Register */
  14931. /*! @{ */
  14932. #define MSCM_CPxCFG1_L2WY_MASK (0xFF0000U)
  14933. #define MSCM_CPxCFG1_L2WY_SHIFT (16U)
  14934. #define MSCM_CPxCFG1_L2WY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG1_L2WY_SHIFT)) & MSCM_CPxCFG1_L2WY_MASK)
  14935. #define MSCM_CPxCFG1_L2SZ_MASK (0xFF000000U)
  14936. #define MSCM_CPxCFG1_L2SZ_SHIFT (24U)
  14937. #define MSCM_CPxCFG1_L2SZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG1_L2SZ_SHIFT)) & MSCM_CPxCFG1_L2SZ_MASK)
  14938. /*! @} */
  14939. /*! @name CPxCFG3 - Processor X Configuration 3 Register */
  14940. /*! @{ */
  14941. #define MSCM_CPxCFG3_FPU_MASK (0x1U)
  14942. #define MSCM_CPxCFG3_FPU_SHIFT (0U)
  14943. #define MSCM_CPxCFG3_FPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_FPU_SHIFT)) & MSCM_CPxCFG3_FPU_MASK)
  14944. #define MSCM_CPxCFG3_SIMD_MASK (0x2U)
  14945. #define MSCM_CPxCFG3_SIMD_SHIFT (1U)
  14946. #define MSCM_CPxCFG3_SIMD(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_SIMD_SHIFT)) & MSCM_CPxCFG3_SIMD_MASK)
  14947. #define MSCM_CPxCFG3_JAZ_MASK (0x4U)
  14948. #define MSCM_CPxCFG3_JAZ_SHIFT (2U)
  14949. #define MSCM_CPxCFG3_JAZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_JAZ_SHIFT)) & MSCM_CPxCFG3_JAZ_MASK)
  14950. #define MSCM_CPxCFG3_MMU_MASK (0x8U)
  14951. #define MSCM_CPxCFG3_MMU_SHIFT (3U)
  14952. #define MSCM_CPxCFG3_MMU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_MMU_SHIFT)) & MSCM_CPxCFG3_MMU_MASK)
  14953. #define MSCM_CPxCFG3_TZ_MASK (0x10U)
  14954. #define MSCM_CPxCFG3_TZ_SHIFT (4U)
  14955. #define MSCM_CPxCFG3_TZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_TZ_SHIFT)) & MSCM_CPxCFG3_TZ_MASK)
  14956. #define MSCM_CPxCFG3_CMP_MASK (0x20U)
  14957. #define MSCM_CPxCFG3_CMP_SHIFT (5U)
  14958. #define MSCM_CPxCFG3_CMP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_CMP_SHIFT)) & MSCM_CPxCFG3_CMP_MASK)
  14959. #define MSCM_CPxCFG3_BB_MASK (0x40U)
  14960. #define MSCM_CPxCFG3_BB_SHIFT (6U)
  14961. #define MSCM_CPxCFG3_BB(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_BB_SHIFT)) & MSCM_CPxCFG3_BB_MASK)
  14962. #define MSCM_CPxCFG3_SBP_MASK (0x300U)
  14963. #define MSCM_CPxCFG3_SBP_SHIFT (8U)
  14964. #define MSCM_CPxCFG3_SBP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPxCFG3_SBP_SHIFT)) & MSCM_CPxCFG3_SBP_MASK)
  14965. /*! @} */
  14966. /*! @name TYPE - Processor 0 Type Register..Processor 1 Type Register */
  14967. /*! @{ */
  14968. #define MSCM_TYPE_RYPZ_MASK (0xFFU)
  14969. #define MSCM_TYPE_RYPZ_SHIFT (0U)
  14970. #define MSCM_TYPE_RYPZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_RYPZ_SHIFT)) & MSCM_TYPE_RYPZ_MASK)
  14971. #define MSCM_TYPE_PERSONALITY_MASK (0xFFFFFF00U)
  14972. #define MSCM_TYPE_PERSONALITY_SHIFT (8U)
  14973. #define MSCM_TYPE_PERSONALITY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_PERSONALITY_SHIFT)) & MSCM_TYPE_PERSONALITY_MASK)
  14974. /*! @} */
  14975. /* The count of MSCM_TYPE */
  14976. #define MSCM_TYPE_COUNT (2U)
  14977. /*! @name NUM - Processor 0 Number Register..Processor 1 Number Register */
  14978. /*! @{ */
  14979. #define MSCM_NUM_CPN_MASK (0x1U)
  14980. #define MSCM_NUM_CPN_SHIFT (0U)
  14981. #define MSCM_NUM_CPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_NUM_CPN_SHIFT)) & MSCM_NUM_CPN_MASK)
  14982. /*! @} */
  14983. /* The count of MSCM_NUM */
  14984. #define MSCM_NUM_COUNT (2U)
  14985. /*! @name MASTER - Processor 0 Master Register..Processor 1 Master Register */
  14986. /*! @{ */
  14987. #define MSCM_MASTER_PPN_MASK (0x3FU)
  14988. #define MSCM_MASTER_PPN_SHIFT (0U)
  14989. #define MSCM_MASTER_PPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_MASTER_PPN_SHIFT)) & MSCM_MASTER_PPN_MASK)
  14990. /*! @} */
  14991. /* The count of MSCM_MASTER */
  14992. #define MSCM_MASTER_COUNT (2U)
  14993. /*! @name COUNT - Processor 0 Count Register..Processor 1 Count Register */
  14994. /*! @{ */
  14995. #define MSCM_COUNT_PCNT_MASK (0x3U)
  14996. #define MSCM_COUNT_PCNT_SHIFT (0U)
  14997. #define MSCM_COUNT_PCNT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_COUNT_PCNT_SHIFT)) & MSCM_COUNT_PCNT_MASK)
  14998. /*! @} */
  14999. /* The count of MSCM_COUNT */
  15000. #define MSCM_COUNT_COUNT (2U)
  15001. /*! @name CFG1 - Processor 0 Configuration 1 Register..Processor 1 Configuration 1 Register */
  15002. /*! @{ */
  15003. #define MSCM_CFG1_L2WY_MASK (0xFF0000U)
  15004. #define MSCM_CFG1_L2WY_SHIFT (16U)
  15005. #define MSCM_CFG1_L2WY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2WY_SHIFT)) & MSCM_CFG1_L2WY_MASK)
  15006. #define MSCM_CFG1_L2SZ_MASK (0xFF000000U)
  15007. #define MSCM_CFG1_L2SZ_SHIFT (24U)
  15008. #define MSCM_CFG1_L2SZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2SZ_SHIFT)) & MSCM_CFG1_L2SZ_MASK)
  15009. /*! @} */
  15010. /* The count of MSCM_CFG1 */
  15011. #define MSCM_CFG1_COUNT (2U)
  15012. /*! @name CFG3 - Processor 0 Configuration 3 Register..Processor 1 Configuration 3 Register */
  15013. /*! @{ */
  15014. #define MSCM_CFG3_FPU_MASK (0x1U)
  15015. #define MSCM_CFG3_FPU_SHIFT (0U)
  15016. #define MSCM_CFG3_FPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_FPU_SHIFT)) & MSCM_CFG3_FPU_MASK)
  15017. #define MSCM_CFG3_SIMD_MASK (0x2U)
  15018. #define MSCM_CFG3_SIMD_SHIFT (1U)
  15019. #define MSCM_CFG3_SIMD(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SIMD_SHIFT)) & MSCM_CFG3_SIMD_MASK)
  15020. #define MSCM_CFG3_JAZ_MASK (0x4U)
  15021. #define MSCM_CFG3_JAZ_SHIFT (2U)
  15022. #define MSCM_CFG3_JAZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_JAZ_SHIFT)) & MSCM_CFG3_JAZ_MASK)
  15023. #define MSCM_CFG3_MMU_MASK (0x8U)
  15024. #define MSCM_CFG3_MMU_SHIFT (3U)
  15025. #define MSCM_CFG3_MMU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_MMU_SHIFT)) & MSCM_CFG3_MMU_MASK)
  15026. #define MSCM_CFG3_TZ_MASK (0x10U)
  15027. #define MSCM_CFG3_TZ_SHIFT (4U)
  15028. #define MSCM_CFG3_TZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_TZ_SHIFT)) & MSCM_CFG3_TZ_MASK)
  15029. #define MSCM_CFG3_CMP_MASK (0x20U)
  15030. #define MSCM_CFG3_CMP_SHIFT (5U)
  15031. #define MSCM_CFG3_CMP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_CMP_SHIFT)) & MSCM_CFG3_CMP_MASK)
  15032. #define MSCM_CFG3_BB_MASK (0x40U)
  15033. #define MSCM_CFG3_BB_SHIFT (6U)
  15034. #define MSCM_CFG3_BB(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_BB_SHIFT)) & MSCM_CFG3_BB_MASK)
  15035. #define MSCM_CFG3_SBP_MASK (0x300U)
  15036. #define MSCM_CFG3_SBP_SHIFT (8U)
  15037. #define MSCM_CFG3_SBP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SBP_SHIFT)) & MSCM_CFG3_SBP_MASK)
  15038. /*! @} */
  15039. /* The count of MSCM_CFG3 */
  15040. #define MSCM_CFG3_COUNT (2U)
  15041. /*! @name OCMDR - On-Chip Memory Descriptor Register */
  15042. /*! @{ */
  15043. #define MSCM_OCMDR_OCMPU_MASK (0x1000U)
  15044. #define MSCM_OCMDR_OCMPU_SHIFT (12U)
  15045. /*! OCMPU - OCMEM Memory Protection Unit
  15046. * 0b0..OCMEMn is not protected by an MPU.
  15047. * 0b1..OCMEMn is protected by an MPU.
  15048. */
  15049. #define MSCM_OCMDR_OCMPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_OCMPU_SHIFT)) & MSCM_OCMDR_OCMPU_MASK)
  15050. #define MSCM_OCMDR_OCMT_MASK (0xE000U)
  15051. #define MSCM_OCMDR_OCMT_SHIFT (13U)
  15052. /*! OCMT
  15053. * 0b000..OCMEMn is a system RAM.
  15054. * 0b001..OCMEMn is a graphics RAM.
  15055. * 0b010..Reserved
  15056. * 0b011..OCMEMn is a ROM.
  15057. * 0b100..OCMEMn is a program flash.
  15058. * 0b101..OCMEMn is a data flash.
  15059. * 0b110..OCMEMn is an EEE.
  15060. * 0b111..Reserved
  15061. */
  15062. #define MSCM_OCMDR_OCMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_OCMT_SHIFT)) & MSCM_OCMDR_OCMT_MASK)
  15063. #define MSCM_OCMDR_OCMW_MASK (0xE0000U)
  15064. #define MSCM_OCMDR_OCMW_SHIFT (17U)
  15065. /*! OCMW - OCMEM Datapath Width
  15066. * 0b010..OCMEMn 32-bits wide
  15067. * 0b011..OCMEMn 64-bits wide
  15068. * 0b100..OCMEMn 128-bits wide
  15069. * 0b101..OCMEMn 256-bits wide
  15070. */
  15071. #define MSCM_OCMDR_OCMW(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_OCMW_SHIFT)) & MSCM_OCMDR_OCMW_MASK)
  15072. #define MSCM_OCMDR_OCMSZ_MASK (0xF000000U)
  15073. #define MSCM_OCMDR_OCMSZ_SHIFT (24U)
  15074. /*! OCMSZ - OCMEM Size
  15075. * 0b0000..no OCMEMn
  15076. * 0b0011..4KB OCMEMn
  15077. * 0b0100..8KB OCMEMn
  15078. * 0b0101..16KB OCMEMn
  15079. * 0b0110..32KB OCMEMn
  15080. * 0b0111..64KB OCMEMn
  15081. * 0b1000..128KB OCMEMn
  15082. * 0b1001..256KB OCMEMn
  15083. * 0b1010..512KB OCMEMn
  15084. * 0b1011..1024KB OCMEMn
  15085. * 0b1100..2048KB OCMEMn
  15086. * 0b1101..4096KB OCMEMn
  15087. * 0b1110..8192KB OCMEMn
  15088. * 0b1111..16384KB OCMEMn
  15089. */
  15090. #define MSCM_OCMDR_OCMSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_OCMSZ_SHIFT)) & MSCM_OCMDR_OCMSZ_MASK)
  15091. #define MSCM_OCMDR_OCMSZH_MASK (0x10000000U)
  15092. #define MSCM_OCMDR_OCMSZH_SHIFT (28U)
  15093. /*! OCMSZH
  15094. * 0b0..OCMEMn is a power-of-2 capacity.
  15095. * 0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ.
  15096. */
  15097. #define MSCM_OCMDR_OCMSZH(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_OCMSZH_SHIFT)) & MSCM_OCMDR_OCMSZH_MASK)
  15098. #define MSCM_OCMDR_FMT_MASK (0x40000000U)
  15099. #define MSCM_OCMDR_FMT_SHIFT (30U)
  15100. /*! FMT - Format
  15101. * 0b0..Local
  15102. * 0b1..Global
  15103. */
  15104. #define MSCM_OCMDR_FMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_FMT_SHIFT)) & MSCM_OCMDR_FMT_MASK)
  15105. #define MSCM_OCMDR_V_MASK (0x80000000U)
  15106. #define MSCM_OCMDR_V_SHIFT (31U)
  15107. /*! V - OCMEM Valid Bit
  15108. * 0b0..OCMEMn is not present.
  15109. * 0b1..OCMEMn is present.
  15110. */
  15111. #define MSCM_OCMDR_V(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR_V_SHIFT)) & MSCM_OCMDR_V_MASK)
  15112. /*! @} */
  15113. /* The count of MSCM_OCMDR */
  15114. #define MSCM_OCMDR_COUNT (3U)
  15115. /*!
  15116. * @}
  15117. */ /* end of group MSCM_Register_Masks */
  15118. /* MSCM - Peripheral instance base addresses */
  15119. /** Peripheral MSCM base address */
  15120. #define MSCM_BASE (0x40001000u)
  15121. /** Peripheral MSCM base pointer */
  15122. #define MSCM ((MSCM_Type *)MSCM_BASE)
  15123. /** Array initializer of MSCM peripheral base addresses */
  15124. #define MSCM_BASE_ADDRS { MSCM_BASE }
  15125. /** Array initializer of MSCM peripheral base pointers */
  15126. #define MSCM_BASE_PTRS { MSCM }
  15127. /*!
  15128. * @}
  15129. */ /* end of group MSCM_Peripheral_Access_Layer */
  15130. /* ----------------------------------------------------------------------------
  15131. -- NV Peripheral Access Layer
  15132. ---------------------------------------------------------------------------- */
  15133. /*!
  15134. * @addtogroup NV_Peripheral_Access_Layer NV Peripheral Access Layer
  15135. * @{
  15136. */
  15137. /** NV - Register Layout Typedef */
  15138. typedef struct {
  15139. __I uint8_t BACKKEY3; /**< Backdoor Comparison Key 3., offset: 0x0 */
  15140. __I uint8_t BACKKEY2; /**< Backdoor Comparison Key 2., offset: 0x1 */
  15141. __I uint8_t BACKKEY1; /**< Backdoor Comparison Key 1., offset: 0x2 */
  15142. __I uint8_t BACKKEY0; /**< Backdoor Comparison Key 0., offset: 0x3 */
  15143. __I uint8_t BACKKEY7; /**< Backdoor Comparison Key 7., offset: 0x4 */
  15144. __I uint8_t BACKKEY6; /**< Backdoor Comparison Key 6., offset: 0x5 */
  15145. __I uint8_t BACKKEY5; /**< Backdoor Comparison Key 5., offset: 0x6 */
  15146. __I uint8_t BACKKEY4; /**< Backdoor Comparison Key 4., offset: 0x7 */
  15147. __I uint8_t FPROT3; /**< Non-volatile P-Flash Protection 1 - Low Register, offset: 0x8 */
  15148. __I uint8_t FPROT2; /**< Non-volatile P-Flash Protection 1 - High Register, offset: 0x9 */
  15149. __I uint8_t FPROT1; /**< Non-volatile P-Flash Protection 0 - Low Register, offset: 0xA */
  15150. __I uint8_t FPROT0; /**< Non-volatile P-Flash Protection 0 - High Register, offset: 0xB */
  15151. __I uint8_t FSEC; /**< Non-volatile Flash Security Register, offset: 0xC */
  15152. __I uint8_t FOPT; /**< Non-volatile Flash Option Register, offset: 0xD */
  15153. } NV_Type;
  15154. /* ----------------------------------------------------------------------------
  15155. -- NV Register Masks
  15156. ---------------------------------------------------------------------------- */
  15157. /*!
  15158. * @addtogroup NV_Register_Masks NV Register Masks
  15159. * @{
  15160. */
  15161. /*! @name BACKKEY3 - Backdoor Comparison Key 3. */
  15162. /*! @{ */
  15163. #define NV_BACKKEY3_KEY_MASK (0xFFU)
  15164. #define NV_BACKKEY3_KEY_SHIFT (0U)
  15165. #define NV_BACKKEY3_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY3_KEY_SHIFT)) & NV_BACKKEY3_KEY_MASK)
  15166. /*! @} */
  15167. /*! @name BACKKEY2 - Backdoor Comparison Key 2. */
  15168. /*! @{ */
  15169. #define NV_BACKKEY2_KEY_MASK (0xFFU)
  15170. #define NV_BACKKEY2_KEY_SHIFT (0U)
  15171. #define NV_BACKKEY2_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY2_KEY_SHIFT)) & NV_BACKKEY2_KEY_MASK)
  15172. /*! @} */
  15173. /*! @name BACKKEY1 - Backdoor Comparison Key 1. */
  15174. /*! @{ */
  15175. #define NV_BACKKEY1_KEY_MASK (0xFFU)
  15176. #define NV_BACKKEY1_KEY_SHIFT (0U)
  15177. #define NV_BACKKEY1_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY1_KEY_SHIFT)) & NV_BACKKEY1_KEY_MASK)
  15178. /*! @} */
  15179. /*! @name BACKKEY0 - Backdoor Comparison Key 0. */
  15180. /*! @{ */
  15181. #define NV_BACKKEY0_KEY_MASK (0xFFU)
  15182. #define NV_BACKKEY0_KEY_SHIFT (0U)
  15183. #define NV_BACKKEY0_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY0_KEY_SHIFT)) & NV_BACKKEY0_KEY_MASK)
  15184. /*! @} */
  15185. /*! @name BACKKEY7 - Backdoor Comparison Key 7. */
  15186. /*! @{ */
  15187. #define NV_BACKKEY7_KEY_MASK (0xFFU)
  15188. #define NV_BACKKEY7_KEY_SHIFT (0U)
  15189. #define NV_BACKKEY7_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY7_KEY_SHIFT)) & NV_BACKKEY7_KEY_MASK)
  15190. /*! @} */
  15191. /*! @name BACKKEY6 - Backdoor Comparison Key 6. */
  15192. /*! @{ */
  15193. #define NV_BACKKEY6_KEY_MASK (0xFFU)
  15194. #define NV_BACKKEY6_KEY_SHIFT (0U)
  15195. #define NV_BACKKEY6_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY6_KEY_SHIFT)) & NV_BACKKEY6_KEY_MASK)
  15196. /*! @} */
  15197. /*! @name BACKKEY5 - Backdoor Comparison Key 5. */
  15198. /*! @{ */
  15199. #define NV_BACKKEY5_KEY_MASK (0xFFU)
  15200. #define NV_BACKKEY5_KEY_SHIFT (0U)
  15201. #define NV_BACKKEY5_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY5_KEY_SHIFT)) & NV_BACKKEY5_KEY_MASK)
  15202. /*! @} */
  15203. /*! @name BACKKEY4 - Backdoor Comparison Key 4. */
  15204. /*! @{ */
  15205. #define NV_BACKKEY4_KEY_MASK (0xFFU)
  15206. #define NV_BACKKEY4_KEY_SHIFT (0U)
  15207. #define NV_BACKKEY4_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY4_KEY_SHIFT)) & NV_BACKKEY4_KEY_MASK)
  15208. /*! @} */
  15209. /*! @name FPROT3 - Non-volatile P-Flash Protection 1 - Low Register */
  15210. /*! @{ */
  15211. #define NV_FPROT3_PROT_MASK (0xFFU)
  15212. #define NV_FPROT3_PROT_SHIFT (0U)
  15213. #define NV_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT3_PROT_SHIFT)) & NV_FPROT3_PROT_MASK)
  15214. /*! @} */
  15215. /*! @name FPROT2 - Non-volatile P-Flash Protection 1 - High Register */
  15216. /*! @{ */
  15217. #define NV_FPROT2_PROT_MASK (0xFFU)
  15218. #define NV_FPROT2_PROT_SHIFT (0U)
  15219. #define NV_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT2_PROT_SHIFT)) & NV_FPROT2_PROT_MASK)
  15220. /*! @} */
  15221. /*! @name FPROT1 - Non-volatile P-Flash Protection 0 - Low Register */
  15222. /*! @{ */
  15223. #define NV_FPROT1_PROT_MASK (0xFFU)
  15224. #define NV_FPROT1_PROT_SHIFT (0U)
  15225. #define NV_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT1_PROT_SHIFT)) & NV_FPROT1_PROT_MASK)
  15226. /*! @} */
  15227. /*! @name FPROT0 - Non-volatile P-Flash Protection 0 - High Register */
  15228. /*! @{ */
  15229. #define NV_FPROT0_PROT_MASK (0xFFU)
  15230. #define NV_FPROT0_PROT_SHIFT (0U)
  15231. #define NV_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT0_PROT_SHIFT)) & NV_FPROT0_PROT_MASK)
  15232. /*! @} */
  15233. /*! @name FSEC - Non-volatile Flash Security Register */
  15234. /*! @{ */
  15235. #define NV_FSEC_SEC_MASK (0x3U)
  15236. #define NV_FSEC_SEC_SHIFT (0U)
  15237. /*! SEC - Flash Security
  15238. * 0b10..MCU security status is unsecure
  15239. * 0b11..MCU security status is secure
  15240. */
  15241. #define NV_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_SEC_SHIFT)) & NV_FSEC_SEC_MASK)
  15242. #define NV_FSEC_FSLACC_MASK (0xCU)
  15243. #define NV_FSEC_FSLACC_SHIFT (2U)
  15244. /*! FSLACC - Freescale Failure Analysis Access Code
  15245. * 0b10..Freescale factory access denied
  15246. * 0b11..Freescale factory access granted
  15247. */
  15248. #define NV_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_FSLACC_SHIFT)) & NV_FSEC_FSLACC_MASK)
  15249. #define NV_FSEC_MEEN_MASK (0x30U)
  15250. #define NV_FSEC_MEEN_SHIFT (4U)
  15251. /*! MEEN
  15252. * 0b10..Mass erase is disabled
  15253. * 0b11..Mass erase is enabled
  15254. */
  15255. #define NV_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_MEEN_SHIFT)) & NV_FSEC_MEEN_MASK)
  15256. #define NV_FSEC_KEYEN_MASK (0xC0U)
  15257. #define NV_FSEC_KEYEN_SHIFT (6U)
  15258. /*! KEYEN - Backdoor Key Security Enable
  15259. * 0b10..Backdoor key access enabled
  15260. * 0b11..Backdoor key access disabled
  15261. */
  15262. #define NV_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_KEYEN_SHIFT)) & NV_FSEC_KEYEN_MASK)
  15263. /*! @} */
  15264. /*! @name FOPT - Non-volatile Flash Option Register */
  15265. /*! @{ */
  15266. #define NV_FOPT_LPBOOT_MASK (0x1U)
  15267. #define NV_FOPT_LPBOOT_SHIFT (0U)
  15268. /*! LPBOOT
  15269. * 0b0..Low-power boot
  15270. * 0b1..Normal boot
  15271. */
  15272. #define NV_FOPT_LPBOOT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_LPBOOT_SHIFT)) & NV_FOPT_LPBOOT_MASK)
  15273. #define NV_FOPT_NMI_DIS_MASK (0x4U)
  15274. #define NV_FOPT_NMI_DIS_SHIFT (2U)
  15275. /*! NMI_DIS
  15276. * 0b0..NMI interrupts are always blocked
  15277. * 0b1..NMI_b pin/interrupts reset default to enabled
  15278. */
  15279. #define NV_FOPT_NMI_DIS(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_NMI_DIS_SHIFT)) & NV_FOPT_NMI_DIS_MASK)
  15280. #define NV_FOPT_FAST_INIT_MASK (0x20U)
  15281. #define NV_FOPT_FAST_INIT_SHIFT (5U)
  15282. /*! FAST_INIT
  15283. * 0b0..Slower initialization
  15284. * 0b1..Fast Initialization
  15285. */
  15286. #define NV_FOPT_FAST_INIT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_FAST_INIT_SHIFT)) & NV_FOPT_FAST_INIT_MASK)
  15287. /*! @} */
  15288. /*!
  15289. * @}
  15290. */ /* end of group NV_Register_Masks */
  15291. /* NV - Peripheral instance base addresses */
  15292. /** Peripheral FTFL_FlashConfig base address */
  15293. #define FTFL_FlashConfig_BASE (0x400u)
  15294. /** Peripheral FTFL_FlashConfig base pointer */
  15295. #define FTFL_FlashConfig ((NV_Type *)FTFL_FlashConfig_BASE)
  15296. /** Array initializer of NV peripheral base addresses */
  15297. #define NV_BASE_ADDRS { FTFL_FlashConfig_BASE }
  15298. /** Array initializer of NV peripheral base pointers */
  15299. #define NV_BASE_PTRS { FTFL_FlashConfig }
  15300. /*!
  15301. * @}
  15302. */ /* end of group NV_Peripheral_Access_Layer */
  15303. /* ----------------------------------------------------------------------------
  15304. -- OSC Peripheral Access Layer
  15305. ---------------------------------------------------------------------------- */
  15306. /*!
  15307. * @addtogroup OSC_Peripheral_Access_Layer OSC Peripheral Access Layer
  15308. * @{
  15309. */
  15310. /** OSC - Register Layout Typedef */
  15311. typedef struct {
  15312. __IO uint8_t CR; /**< OSC Control Register, offset: 0x0 */
  15313. uint8_t RESERVED_0[1];
  15314. __IO uint8_t DIV; /**< OSC_DIV, offset: 0x2 */
  15315. } OSC_Type;
  15316. /* ----------------------------------------------------------------------------
  15317. -- OSC Register Masks
  15318. ---------------------------------------------------------------------------- */
  15319. /*!
  15320. * @addtogroup OSC_Register_Masks OSC Register Masks
  15321. * @{
  15322. */
  15323. /*! @name CR - OSC Control Register */
  15324. /*! @{ */
  15325. #define OSC_CR_SC16P_MASK (0x1U)
  15326. #define OSC_CR_SC16P_SHIFT (0U)
  15327. /*! SC16P - Oscillator 16 pF Capacitor Load Configure
  15328. * 0b0..Disable the selection.
  15329. * 0b1..Add 16 pF capacitor to the oscillator load.
  15330. */
  15331. #define OSC_CR_SC16P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC16P_SHIFT)) & OSC_CR_SC16P_MASK)
  15332. #define OSC_CR_SC8P_MASK (0x2U)
  15333. #define OSC_CR_SC8P_SHIFT (1U)
  15334. /*! SC8P - Oscillator 8 pF Capacitor Load Configure
  15335. * 0b0..Disable the selection.
  15336. * 0b1..Add 8 pF capacitor to the oscillator load.
  15337. */
  15338. #define OSC_CR_SC8P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC8P_SHIFT)) & OSC_CR_SC8P_MASK)
  15339. #define OSC_CR_SC4P_MASK (0x4U)
  15340. #define OSC_CR_SC4P_SHIFT (2U)
  15341. /*! SC4P - Oscillator 4 pF Capacitor Load Configure
  15342. * 0b0..Disable the selection.
  15343. * 0b1..Add 4 pF capacitor to the oscillator load.
  15344. */
  15345. #define OSC_CR_SC4P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC4P_SHIFT)) & OSC_CR_SC4P_MASK)
  15346. #define OSC_CR_SC2P_MASK (0x8U)
  15347. #define OSC_CR_SC2P_SHIFT (3U)
  15348. /*! SC2P - Oscillator 2 pF Capacitor Load Configure
  15349. * 0b0..Disable the selection.
  15350. * 0b1..Add 2 pF capacitor to the oscillator load.
  15351. */
  15352. #define OSC_CR_SC2P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC2P_SHIFT)) & OSC_CR_SC2P_MASK)
  15353. #define OSC_CR_EREFSTEN_MASK (0x20U)
  15354. #define OSC_CR_EREFSTEN_SHIFT (5U)
  15355. /*! EREFSTEN - External Reference Stop Enable
  15356. * 0b0..External reference clock is disabled in Stop mode.
  15357. * 0b1..External reference clock stays enabled in Stop mode if ERCLKEN is set before entering Stop mode.
  15358. */
  15359. #define OSC_CR_EREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_EREFSTEN_SHIFT)) & OSC_CR_EREFSTEN_MASK)
  15360. #define OSC_CR_ERCLKEN_MASK (0x80U)
  15361. #define OSC_CR_ERCLKEN_SHIFT (7U)
  15362. /*! ERCLKEN - External Reference Enable
  15363. * 0b0..External reference clock is inactive.
  15364. * 0b1..External reference clock is enabled.
  15365. */
  15366. #define OSC_CR_ERCLKEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_ERCLKEN_SHIFT)) & OSC_CR_ERCLKEN_MASK)
  15367. /*! @} */
  15368. /*! @name DIV - OSC_DIV */
  15369. /*! @{ */
  15370. #define OSC_DIV_ERPS_MASK (0xC0U)
  15371. #define OSC_DIV_ERPS_SHIFT (6U)
  15372. /*! ERPS
  15373. * 0b00..The divisor ratio is 1.
  15374. * 0b01..The divisor ratio is 2.
  15375. * 0b10..The divisor ratio is 4.
  15376. * 0b11..The divisor ratio is 8.
  15377. */
  15378. #define OSC_DIV_ERPS(x) (((uint8_t)(((uint8_t)(x)) << OSC_DIV_ERPS_SHIFT)) & OSC_DIV_ERPS_MASK)
  15379. /*! @} */
  15380. /*!
  15381. * @}
  15382. */ /* end of group OSC_Register_Masks */
  15383. /* OSC - Peripheral instance base addresses */
  15384. /** Peripheral OSC0 base address */
  15385. #define OSC0_BASE (0x40065000u)
  15386. /** Peripheral OSC0 base pointer */
  15387. #define OSC0 ((OSC_Type *)OSC0_BASE)
  15388. /** Array initializer of OSC peripheral base addresses */
  15389. #define OSC_BASE_ADDRS { OSC0_BASE }
  15390. /** Array initializer of OSC peripheral base pointers */
  15391. #define OSC_BASE_PTRS { OSC0 }
  15392. /*!
  15393. * @}
  15394. */ /* end of group OSC_Peripheral_Access_Layer */
  15395. /* ----------------------------------------------------------------------------
  15396. -- PDB Peripheral Access Layer
  15397. ---------------------------------------------------------------------------- */
  15398. /*!
  15399. * @addtogroup PDB_Peripheral_Access_Layer PDB Peripheral Access Layer
  15400. * @{
  15401. */
  15402. /** PDB - Register Layout Typedef */
  15403. typedef struct {
  15404. __IO uint32_t SC; /**< Status and Control register, offset: 0x0 */
  15405. __IO uint32_t MOD; /**< Modulus register, offset: 0x4 */
  15406. __I uint32_t CNT; /**< Counter register, offset: 0x8 */
  15407. __IO uint32_t IDLY; /**< Interrupt Delay register, offset: 0xC */
  15408. struct { /* offset: 0x10, array step: 0x28 */
  15409. __IO uint32_t C1; /**< Channel n Control register 1, array offset: 0x10, array step: 0x28 */
  15410. __IO uint32_t S; /**< Channel n Status register, array offset: 0x14, array step: 0x28 */
  15411. __IO uint32_t DLY[2]; /**< Channel n Delay 0 register..Channel n Delay 1 register, array offset: 0x18, array step: index*0x28, index2*0x4 */
  15412. uint8_t RESERVED_0[24];
  15413. } CH[2];
  15414. uint8_t RESERVED_0[240];
  15415. struct { /* offset: 0x150, array step: 0x8 */
  15416. __IO uint32_t INTC; /**< DAC Interval Trigger n Control register, array offset: 0x150, array step: 0x8 */
  15417. __IO uint32_t INT; /**< DAC Interval n register, array offset: 0x154, array step: 0x8 */
  15418. } DAC[1];
  15419. uint8_t RESERVED_1[56];
  15420. __IO uint32_t POEN; /**< Pulse-Out n Enable register, offset: 0x190 */
  15421. __IO uint32_t PODLY[2]; /**< Pulse-Out n Delay register, array offset: 0x194, array step: 0x4 */
  15422. } PDB_Type;
  15423. /* ----------------------------------------------------------------------------
  15424. -- PDB Register Masks
  15425. ---------------------------------------------------------------------------- */
  15426. /*!
  15427. * @addtogroup PDB_Register_Masks PDB Register Masks
  15428. * @{
  15429. */
  15430. /*! @name SC - Status and Control register */
  15431. /*! @{ */
  15432. #define PDB_SC_LDOK_MASK (0x1U)
  15433. #define PDB_SC_LDOK_SHIFT (0U)
  15434. #define PDB_SC_LDOK(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDOK_SHIFT)) & PDB_SC_LDOK_MASK)
  15435. #define PDB_SC_CONT_MASK (0x2U)
  15436. #define PDB_SC_CONT_SHIFT (1U)
  15437. /*! CONT - Continuous Mode Enable
  15438. * 0b0..PDB operation in One-Shot mode
  15439. * 0b1..PDB operation in Continuous mode
  15440. */
  15441. #define PDB_SC_CONT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_CONT_SHIFT)) & PDB_SC_CONT_MASK)
  15442. #define PDB_SC_MULT_MASK (0xCU)
  15443. #define PDB_SC_MULT_SHIFT (2U)
  15444. /*! MULT - Multiplication Factor Select for Prescaler
  15445. * 0b00..Multiplication factor is 1.
  15446. * 0b01..Multiplication factor is 10.
  15447. * 0b10..Multiplication factor is 20.
  15448. * 0b11..Multiplication factor is 40.
  15449. */
  15450. #define PDB_SC_MULT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_MULT_SHIFT)) & PDB_SC_MULT_MASK)
  15451. #define PDB_SC_PDBIE_MASK (0x20U)
  15452. #define PDB_SC_PDBIE_SHIFT (5U)
  15453. /*! PDBIE - PDB Interrupt Enable
  15454. * 0b0..PDB interrupt disabled.
  15455. * 0b1..PDB interrupt enabled.
  15456. */
  15457. #define PDB_SC_PDBIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIE_SHIFT)) & PDB_SC_PDBIE_MASK)
  15458. #define PDB_SC_PDBIF_MASK (0x40U)
  15459. #define PDB_SC_PDBIF_SHIFT (6U)
  15460. #define PDB_SC_PDBIF(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIF_SHIFT)) & PDB_SC_PDBIF_MASK)
  15461. #define PDB_SC_PDBEN_MASK (0x80U)
  15462. #define PDB_SC_PDBEN_SHIFT (7U)
  15463. /*! PDBEN - PDB Enable
  15464. * 0b0..PDB disabled. Counter is off.
  15465. * 0b1..PDB enabled.
  15466. */
  15467. #define PDB_SC_PDBEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEN_SHIFT)) & PDB_SC_PDBEN_MASK)
  15468. #define PDB_SC_TRGSEL_MASK (0xF00U)
  15469. #define PDB_SC_TRGSEL_SHIFT (8U)
  15470. /*! TRGSEL - Trigger Input Source Select
  15471. * 0b0000..Trigger-In 0 is selected.
  15472. * 0b0001..Trigger-In 1 is selected.
  15473. * 0b0010..Trigger-In 2 is selected.
  15474. * 0b0011..Trigger-In 3 is selected.
  15475. * 0b0100..Trigger-In 4 is selected.
  15476. * 0b0101..Trigger-In 5 is selected.
  15477. * 0b0110..Trigger-In 6 is selected.
  15478. * 0b0111..Trigger-In 7 is selected.
  15479. * 0b1000..Trigger-In 8 is selected.
  15480. * 0b1001..Trigger-In 9 is selected.
  15481. * 0b1010..Trigger-In 10 is selected.
  15482. * 0b1011..Trigger-In 11 is selected.
  15483. * 0b1100..Trigger-In 12 is selected.
  15484. * 0b1101..Trigger-In 13 is selected.
  15485. * 0b1110..Trigger-In 14 is selected.
  15486. * 0b1111..Software trigger is selected.
  15487. */
  15488. #define PDB_SC_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_TRGSEL_SHIFT)) & PDB_SC_TRGSEL_MASK)
  15489. #define PDB_SC_PRESCALER_MASK (0x7000U)
  15490. #define PDB_SC_PRESCALER_SHIFT (12U)
  15491. /*! PRESCALER - Prescaler Divider Select
  15492. * 0b000..Counting uses the peripheral clock divided by multiplication factor selected by MULT.
  15493. * 0b001..Counting uses the peripheral clock divided by twice of the multiplication factor selected by MULT.
  15494. * 0b010..Counting uses the peripheral clock divided by four times of the multiplication factor selected by MULT.
  15495. * 0b011..Counting uses the peripheral clock divided by eight times of the multiplication factor selected by MULT.
  15496. * 0b100..Counting uses the peripheral clock divided by 16 times of the multiplication factor selected by MULT.
  15497. * 0b101..Counting uses the peripheral clock divided by 32 times of the multiplication factor selected by MULT.
  15498. * 0b110..Counting uses the peripheral clock divided by 64 times of the multiplication factor selected by MULT.
  15499. * 0b111..Counting uses the peripheral clock divided by 128 times of the multiplication factor selected by MULT.
  15500. */
  15501. #define PDB_SC_PRESCALER(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PRESCALER_SHIFT)) & PDB_SC_PRESCALER_MASK)
  15502. #define PDB_SC_DMAEN_MASK (0x8000U)
  15503. #define PDB_SC_DMAEN_SHIFT (15U)
  15504. /*! DMAEN - DMA Enable
  15505. * 0b0..DMA disabled.
  15506. * 0b1..DMA enabled.
  15507. */
  15508. #define PDB_SC_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_DMAEN_SHIFT)) & PDB_SC_DMAEN_MASK)
  15509. #define PDB_SC_SWTRIG_MASK (0x10000U)
  15510. #define PDB_SC_SWTRIG_SHIFT (16U)
  15511. #define PDB_SC_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_SWTRIG_SHIFT)) & PDB_SC_SWTRIG_MASK)
  15512. #define PDB_SC_PDBEIE_MASK (0x20000U)
  15513. #define PDB_SC_PDBEIE_SHIFT (17U)
  15514. /*! PDBEIE - PDB Sequence Error Interrupt Enable
  15515. * 0b0..PDB sequence error interrupt disabled.
  15516. * 0b1..PDB sequence error interrupt enabled.
  15517. */
  15518. #define PDB_SC_PDBEIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEIE_SHIFT)) & PDB_SC_PDBEIE_MASK)
  15519. #define PDB_SC_LDMOD_MASK (0xC0000U)
  15520. #define PDB_SC_LDMOD_SHIFT (18U)
  15521. /*! LDMOD - Load Mode Select
  15522. * 0b00..The internal registers are loaded with the values from their buffers immediately after 1 is written to LDOK.
  15523. * 0b01..The internal registers are loaded with the values from their buffers when the PDB counter reaches the MOD register value after 1 is written to LDOK.
  15524. * 0b10..The internal registers are loaded with the values from their buffers when a trigger input event is detected after 1 is written to LDOK.
  15525. * 0b11..The internal registers are loaded with the values from their buffers when either the PDB counter reaches the MOD register value or a trigger input event is detected, after 1 is written to LDOK.
  15526. */
  15527. #define PDB_SC_LDMOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDMOD_SHIFT)) & PDB_SC_LDMOD_MASK)
  15528. /*! @} */
  15529. /*! @name MOD - Modulus register */
  15530. /*! @{ */
  15531. #define PDB_MOD_MOD_MASK (0xFFFFU)
  15532. #define PDB_MOD_MOD_SHIFT (0U)
  15533. #define PDB_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_MOD_MOD_SHIFT)) & PDB_MOD_MOD_MASK)
  15534. /*! @} */
  15535. /*! @name CNT - Counter register */
  15536. /*! @{ */
  15537. #define PDB_CNT_CNT_MASK (0xFFFFU)
  15538. #define PDB_CNT_CNT_SHIFT (0U)
  15539. #define PDB_CNT_CNT(x) (((uint32_t)(((uint32_t)(x)) << PDB_CNT_CNT_SHIFT)) & PDB_CNT_CNT_MASK)
  15540. /*! @} */
  15541. /*! @name IDLY - Interrupt Delay register */
  15542. /*! @{ */
  15543. #define PDB_IDLY_IDLY_MASK (0xFFFFU)
  15544. #define PDB_IDLY_IDLY_SHIFT (0U)
  15545. #define PDB_IDLY_IDLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_IDLY_IDLY_SHIFT)) & PDB_IDLY_IDLY_MASK)
  15546. /*! @} */
  15547. /*! @name C1 - Channel n Control register 1 */
  15548. /*! @{ */
  15549. #define PDB_C1_EN_MASK (0xFFU)
  15550. #define PDB_C1_EN_SHIFT (0U)
  15551. /*! EN - PDB Channel Pre-Trigger Enable
  15552. * 0b00000000..PDB channel's corresponding pre-trigger disabled.
  15553. * 0b00000001..PDB channel's corresponding pre-trigger enabled.
  15554. */
  15555. #define PDB_C1_EN(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_EN_SHIFT)) & PDB_C1_EN_MASK)
  15556. #define PDB_C1_TOS_MASK (0xFF00U)
  15557. #define PDB_C1_TOS_SHIFT (8U)
  15558. /*! TOS - PDB Channel Pre-Trigger Output Select
  15559. * 0b00000000..PDB channel's corresponding pre-trigger is in bypassed mode. The pre-trigger asserts one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1.
  15560. * 0b00000001..PDB channel's corresponding pre-trigger asserts when the counter reaches the channel delay register and one peripheral clock cycle after a rising edge is detected on selected trigger input source or software trigger is selected and SETRIG is written with 1.
  15561. */
  15562. #define PDB_C1_TOS(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_TOS_SHIFT)) & PDB_C1_TOS_MASK)
  15563. #define PDB_C1_BB_MASK (0xFF0000U)
  15564. #define PDB_C1_BB_SHIFT (16U)
  15565. /*! BB - PDB Channel Pre-Trigger Back-to-Back Operation Enable
  15566. * 0b00000000..PDB channel's corresponding pre-trigger back-to-back operation disabled.
  15567. * 0b00000001..PDB channel's corresponding pre-trigger back-to-back operation enabled.
  15568. */
  15569. #define PDB_C1_BB(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_BB_SHIFT)) & PDB_C1_BB_MASK)
  15570. /*! @} */
  15571. /* The count of PDB_C1 */
  15572. #define PDB_C1_COUNT (2U)
  15573. /*! @name S - Channel n Status register */
  15574. /*! @{ */
  15575. #define PDB_S_ERR_MASK (0xFFU)
  15576. #define PDB_S_ERR_SHIFT (0U)
  15577. /*! ERR - PDB Channel Sequence Error Flags
  15578. * 0b00000000..Sequence error not detected on PDB channel's corresponding pre-trigger.
  15579. * 0b00000001..Sequence error detected on PDB channel's corresponding pre-trigger. ADCn block can be triggered for a conversion by one pre-trigger from PDB channel n. When one conversion, which is triggered by one of the pre-triggers from PDB channel n, is in progress, new trigger from PDB channel's corresponding pre-trigger m cannot be accepted by ADCn, and ERR[m] is set. Writing 0's to clear the sequence error flags.
  15580. */
  15581. #define PDB_S_ERR(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_ERR_SHIFT)) & PDB_S_ERR_MASK)
  15582. #define PDB_S_CF_MASK (0xFF0000U)
  15583. #define PDB_S_CF_SHIFT (16U)
  15584. #define PDB_S_CF(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_CF_SHIFT)) & PDB_S_CF_MASK)
  15585. /*! @} */
  15586. /* The count of PDB_S */
  15587. #define PDB_S_COUNT (2U)
  15588. /*! @name DLY - Channel n Delay 0 register..Channel n Delay 1 register */
  15589. /*! @{ */
  15590. #define PDB_DLY_DLY_MASK (0xFFFFU)
  15591. #define PDB_DLY_DLY_SHIFT (0U)
  15592. #define PDB_DLY_DLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_DLY_DLY_SHIFT)) & PDB_DLY_DLY_MASK)
  15593. /*! @} */
  15594. /* The count of PDB_DLY */
  15595. #define PDB_DLY_COUNT (2U)
  15596. /* The count of PDB_DLY */
  15597. #define PDB_DLY_COUNT2 (2U)
  15598. /*! @name INTC - DAC Interval Trigger n Control register */
  15599. /*! @{ */
  15600. #define PDB_INTC_TOE_MASK (0x1U)
  15601. #define PDB_INTC_TOE_SHIFT (0U)
  15602. /*! TOE - DAC Interval Trigger Enable
  15603. * 0b0..DAC interval trigger disabled.
  15604. * 0b1..DAC interval trigger enabled.
  15605. */
  15606. #define PDB_INTC_TOE(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_TOE_SHIFT)) & PDB_INTC_TOE_MASK)
  15607. #define PDB_INTC_EXT_MASK (0x2U)
  15608. #define PDB_INTC_EXT_SHIFT (1U)
  15609. /*! EXT - DAC External Trigger Input Enable
  15610. * 0b0..DAC external trigger input disabled. DAC interval counter is reset and started counting when a rising edge is detected on selected trigger input source or software trigger is selected and SWTRIG is written with 1.
  15611. * 0b1..DAC external trigger input enabled. DAC interval counter is bypassed and DAC external trigger input triggers the DAC interval trigger.
  15612. */
  15613. #define PDB_INTC_EXT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_EXT_SHIFT)) & PDB_INTC_EXT_MASK)
  15614. /*! @} */
  15615. /* The count of PDB_INTC */
  15616. #define PDB_INTC_COUNT (1U)
  15617. /*! @name INT - DAC Interval n register */
  15618. /*! @{ */
  15619. #define PDB_INT_INT_MASK (0xFFFFU)
  15620. #define PDB_INT_INT_SHIFT (0U)
  15621. #define PDB_INT_INT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INT_INT_SHIFT)) & PDB_INT_INT_MASK)
  15622. /*! @} */
  15623. /* The count of PDB_INT */
  15624. #define PDB_INT_COUNT (1U)
  15625. /*! @name POEN - Pulse-Out n Enable register */
  15626. /*! @{ */
  15627. #define PDB_POEN_POEN_MASK (0xFFU)
  15628. #define PDB_POEN_POEN_SHIFT (0U)
  15629. /*! POEN - PDB Pulse-Out Enable
  15630. * 0b00000000..PDB Pulse-Out disabled
  15631. * 0b00000001..PDB Pulse-Out enabled
  15632. */
  15633. #define PDB_POEN_POEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_POEN_POEN_SHIFT)) & PDB_POEN_POEN_MASK)
  15634. /*! @} */
  15635. /*! @name PODLY - Pulse-Out n Delay register */
  15636. /*! @{ */
  15637. #define PDB_PODLY_DLY2_MASK (0xFFFFU)
  15638. #define PDB_PODLY_DLY2_SHIFT (0U)
  15639. #define PDB_PODLY_DLY2(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY2_SHIFT)) & PDB_PODLY_DLY2_MASK)
  15640. #define PDB_PODLY_DLY1_MASK (0xFFFF0000U)
  15641. #define PDB_PODLY_DLY1_SHIFT (16U)
  15642. #define PDB_PODLY_DLY1(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY1_SHIFT)) & PDB_PODLY_DLY1_MASK)
  15643. /*! @} */
  15644. /* The count of PDB_PODLY */
  15645. #define PDB_PODLY_COUNT (2U)
  15646. /*!
  15647. * @}
  15648. */ /* end of group PDB_Register_Masks */
  15649. /* PDB - Peripheral instance base addresses */
  15650. /** Peripheral PDB0 base address */
  15651. #define PDB0_BASE (0x40036000u)
  15652. /** Peripheral PDB0 base pointer */
  15653. #define PDB0 ((PDB_Type *)PDB0_BASE)
  15654. /** Peripheral PDB1 base address */
  15655. #define PDB1_BASE (0x40031000u)
  15656. /** Peripheral PDB1 base pointer */
  15657. #define PDB1 ((PDB_Type *)PDB1_BASE)
  15658. /** Array initializer of PDB peripheral base addresses */
  15659. #define PDB_BASE_ADDRS { PDB0_BASE, PDB1_BASE }
  15660. /** Array initializer of PDB peripheral base pointers */
  15661. #define PDB_BASE_PTRS { PDB0, PDB1 }
  15662. /** Interrupt vectors for the PDB peripheral type */
  15663. #define PDB_IRQS { PDB0_IRQn, PDB1_IRQn }
  15664. /*!
  15665. * @}
  15666. */ /* end of group PDB_Peripheral_Access_Layer */
  15667. /* ----------------------------------------------------------------------------
  15668. -- PIT Peripheral Access Layer
  15669. ---------------------------------------------------------------------------- */
  15670. /*!
  15671. * @addtogroup PIT_Peripheral_Access_Layer PIT Peripheral Access Layer
  15672. * @{
  15673. */
  15674. /** PIT - Register Layout Typedef */
  15675. typedef struct {
  15676. __IO uint32_t MCR; /**< PIT Module Control Register, offset: 0x0 */
  15677. uint8_t RESERVED_0[220];
  15678. __I uint32_t LTMR64H; /**< PIT Upper Lifetime Timer Register, offset: 0xE0 */
  15679. __I uint32_t LTMR64L; /**< PIT Lower Lifetime Timer Register, offset: 0xE4 */
  15680. uint8_t RESERVED_1[24];
  15681. struct { /* offset: 0x100, array step: 0x10 */
  15682. __IO uint32_t LDVAL; /**< Timer Load Value Register, array offset: 0x100, array step: 0x10 */
  15683. __I uint32_t CVAL; /**< Current Timer Value Register, array offset: 0x104, array step: 0x10 */
  15684. __IO uint32_t TCTRL; /**< Timer Control Register, array offset: 0x108, array step: 0x10 */
  15685. __IO uint32_t TFLG; /**< Timer Flag Register, array offset: 0x10C, array step: 0x10 */
  15686. } CHANNEL[4];
  15687. } PIT_Type;
  15688. /* ----------------------------------------------------------------------------
  15689. -- PIT Register Masks
  15690. ---------------------------------------------------------------------------- */
  15691. /*!
  15692. * @addtogroup PIT_Register_Masks PIT Register Masks
  15693. * @{
  15694. */
  15695. /*! @name MCR - PIT Module Control Register */
  15696. /*! @{ */
  15697. #define PIT_MCR_FRZ_MASK (0x1U)
  15698. #define PIT_MCR_FRZ_SHIFT (0U)
  15699. /*! FRZ - Freeze
  15700. * 0b0..Timers continue to run in Debug mode.
  15701. * 0b1..Timers are stopped in Debug mode.
  15702. */
  15703. #define PIT_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_FRZ_SHIFT)) & PIT_MCR_FRZ_MASK)
  15704. #define PIT_MCR_MDIS_MASK (0x2U)
  15705. #define PIT_MCR_MDIS_SHIFT (1U)
  15706. /*! MDIS - Module Disable - (PIT section)
  15707. * 0b0..Clock for standard PIT timers is enabled.
  15708. * 0b1..Clock for standard PIT timers is disabled.
  15709. */
  15710. #define PIT_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_MDIS_SHIFT)) & PIT_MCR_MDIS_MASK)
  15711. /*! @} */
  15712. /*! @name LTMR64H - PIT Upper Lifetime Timer Register */
  15713. /*! @{ */
  15714. #define PIT_LTMR64H_LTH_MASK (0xFFFFFFFFU)
  15715. #define PIT_LTMR64H_LTH_SHIFT (0U)
  15716. #define PIT_LTMR64H_LTH(x) (((uint32_t)(((uint32_t)(x)) << PIT_LTMR64H_LTH_SHIFT)) & PIT_LTMR64H_LTH_MASK)
  15717. /*! @} */
  15718. /*! @name LTMR64L - PIT Lower Lifetime Timer Register */
  15719. /*! @{ */
  15720. #define PIT_LTMR64L_LTL_MASK (0xFFFFFFFFU)
  15721. #define PIT_LTMR64L_LTL_SHIFT (0U)
  15722. #define PIT_LTMR64L_LTL(x) (((uint32_t)(((uint32_t)(x)) << PIT_LTMR64L_LTL_SHIFT)) & PIT_LTMR64L_LTL_MASK)
  15723. /*! @} */
  15724. /*! @name LDVAL - Timer Load Value Register */
  15725. /*! @{ */
  15726. #define PIT_LDVAL_TSV_MASK (0xFFFFFFFFU)
  15727. #define PIT_LDVAL_TSV_SHIFT (0U)
  15728. #define PIT_LDVAL_TSV(x) (((uint32_t)(((uint32_t)(x)) << PIT_LDVAL_TSV_SHIFT)) & PIT_LDVAL_TSV_MASK)
  15729. /*! @} */
  15730. /* The count of PIT_LDVAL */
  15731. #define PIT_LDVAL_COUNT (4U)
  15732. /*! @name CVAL - Current Timer Value Register */
  15733. /*! @{ */
  15734. #define PIT_CVAL_TVL_MASK (0xFFFFFFFFU)
  15735. #define PIT_CVAL_TVL_SHIFT (0U)
  15736. #define PIT_CVAL_TVL(x) (((uint32_t)(((uint32_t)(x)) << PIT_CVAL_TVL_SHIFT)) & PIT_CVAL_TVL_MASK)
  15737. /*! @} */
  15738. /* The count of PIT_CVAL */
  15739. #define PIT_CVAL_COUNT (4U)
  15740. /*! @name TCTRL - Timer Control Register */
  15741. /*! @{ */
  15742. #define PIT_TCTRL_TEN_MASK (0x1U)
  15743. #define PIT_TCTRL_TEN_SHIFT (0U)
  15744. /*! TEN - Timer Enable
  15745. * 0b0..Timer n is disabled.
  15746. * 0b1..Timer n is enabled.
  15747. */
  15748. #define PIT_TCTRL_TEN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TEN_SHIFT)) & PIT_TCTRL_TEN_MASK)
  15749. #define PIT_TCTRL_TIE_MASK (0x2U)
  15750. #define PIT_TCTRL_TIE_SHIFT (1U)
  15751. /*! TIE - Timer Interrupt Enable
  15752. * 0b0..Interrupt requests from Timer n are disabled.
  15753. * 0b1..Interrupt will be requested whenever TIF is set.
  15754. */
  15755. #define PIT_TCTRL_TIE(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TIE_SHIFT)) & PIT_TCTRL_TIE_MASK)
  15756. #define PIT_TCTRL_CHN_MASK (0x4U)
  15757. #define PIT_TCTRL_CHN_SHIFT (2U)
  15758. /*! CHN - Chain Mode
  15759. * 0b0..Timer is not chained.
  15760. * 0b1..Timer is chained to previous timer. For example, for Channel 2, if this field is set, Timer 2 is chained to Timer 1.
  15761. */
  15762. #define PIT_TCTRL_CHN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_CHN_SHIFT)) & PIT_TCTRL_CHN_MASK)
  15763. /*! @} */
  15764. /* The count of PIT_TCTRL */
  15765. #define PIT_TCTRL_COUNT (4U)
  15766. /*! @name TFLG - Timer Flag Register */
  15767. /*! @{ */
  15768. #define PIT_TFLG_TIF_MASK (0x1U)
  15769. #define PIT_TFLG_TIF_SHIFT (0U)
  15770. /*! TIF - Timer Interrupt Flag
  15771. * 0b0..Timeout has not yet occurred.
  15772. * 0b1..Timeout has occurred.
  15773. */
  15774. #define PIT_TFLG_TIF(x) (((uint32_t)(((uint32_t)(x)) << PIT_TFLG_TIF_SHIFT)) & PIT_TFLG_TIF_MASK)
  15775. /*! @} */
  15776. /* The count of PIT_TFLG */
  15777. #define PIT_TFLG_COUNT (4U)
  15778. /*!
  15779. * @}
  15780. */ /* end of group PIT_Register_Masks */
  15781. /* PIT - Peripheral instance base addresses */
  15782. /** Peripheral PIT base address */
  15783. #define PIT_BASE (0x40037000u)
  15784. /** Peripheral PIT base pointer */
  15785. #define PIT ((PIT_Type *)PIT_BASE)
  15786. /** Array initializer of PIT peripheral base addresses */
  15787. #define PIT_BASE_ADDRS { PIT_BASE }
  15788. /** Array initializer of PIT peripheral base pointers */
  15789. #define PIT_BASE_PTRS { PIT }
  15790. /** Interrupt vectors for the PIT peripheral type */
  15791. #define PIT_IRQS { { PIT0_IRQn, PIT1_IRQn, PIT2_IRQn, PIT3_IRQn } }
  15792. /*!
  15793. * @}
  15794. */ /* end of group PIT_Peripheral_Access_Layer */
  15795. /* ----------------------------------------------------------------------------
  15796. -- PMC Peripheral Access Layer
  15797. ---------------------------------------------------------------------------- */
  15798. /*!
  15799. * @addtogroup PMC_Peripheral_Access_Layer PMC Peripheral Access Layer
  15800. * @{
  15801. */
  15802. /** PMC - Register Layout Typedef */
  15803. typedef struct {
  15804. __IO uint8_t LVDSC1; /**< Low Voltage Detect Status And Control 1 register, offset: 0x0 */
  15805. __IO uint8_t LVDSC2; /**< Low Voltage Detect Status And Control 2 register, offset: 0x1 */
  15806. __IO uint8_t REGSC; /**< Regulator Status And Control register, offset: 0x2 */
  15807. uint8_t RESERVED_0[8];
  15808. __IO uint8_t HVDSC1; /**< High Voltage Detect Status And Control 1 register, offset: 0xB */
  15809. } PMC_Type;
  15810. /* ----------------------------------------------------------------------------
  15811. -- PMC Register Masks
  15812. ---------------------------------------------------------------------------- */
  15813. /*!
  15814. * @addtogroup PMC_Register_Masks PMC Register Masks
  15815. * @{
  15816. */
  15817. /*! @name LVDSC1 - Low Voltage Detect Status And Control 1 register */
  15818. /*! @{ */
  15819. #define PMC_LVDSC1_LVDV_MASK (0x3U)
  15820. #define PMC_LVDSC1_LVDV_SHIFT (0U)
  15821. /*! LVDV - Low-Voltage Detect Voltage Select
  15822. * 0b00..Low trip point selected (V LVD = V LVDL )
  15823. * 0b01..High trip point selected (V LVD = V LVDH )
  15824. * 0b10..Reserved
  15825. * 0b11..Reserved
  15826. */
  15827. #define PMC_LVDSC1_LVDV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDV_SHIFT)) & PMC_LVDSC1_LVDV_MASK)
  15828. #define PMC_LVDSC1_LVDRE_MASK (0x10U)
  15829. #define PMC_LVDSC1_LVDRE_SHIFT (4U)
  15830. /*! LVDRE - Low-Voltage Detect Reset Enable
  15831. * 0b0..LVDF does not generate hardware resets
  15832. * 0b1..Force an MCU reset when LVDF = 1
  15833. */
  15834. #define PMC_LVDSC1_LVDRE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDRE_SHIFT)) & PMC_LVDSC1_LVDRE_MASK)
  15835. #define PMC_LVDSC1_LVDIE_MASK (0x20U)
  15836. #define PMC_LVDSC1_LVDIE_SHIFT (5U)
  15837. /*! LVDIE - Low-Voltage Detect Interrupt Enable
  15838. * 0b0..Hardware interrupt disabled (use polling)
  15839. * 0b1..Request a hardware interrupt when LVDF = 1
  15840. */
  15841. #define PMC_LVDSC1_LVDIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDIE_SHIFT)) & PMC_LVDSC1_LVDIE_MASK)
  15842. #define PMC_LVDSC1_LVDACK_MASK (0x40U)
  15843. #define PMC_LVDSC1_LVDACK_SHIFT (6U)
  15844. #define PMC_LVDSC1_LVDACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDACK_SHIFT)) & PMC_LVDSC1_LVDACK_MASK)
  15845. #define PMC_LVDSC1_LVDF_MASK (0x80U)
  15846. #define PMC_LVDSC1_LVDF_SHIFT (7U)
  15847. /*! LVDF - Low-Voltage Detect Flag
  15848. * 0b0..Low-voltage event not detected
  15849. * 0b1..Low-voltage event detected
  15850. */
  15851. #define PMC_LVDSC1_LVDF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDF_SHIFT)) & PMC_LVDSC1_LVDF_MASK)
  15852. /*! @} */
  15853. /*! @name LVDSC2 - Low Voltage Detect Status And Control 2 register */
  15854. /*! @{ */
  15855. #define PMC_LVDSC2_LVWV_MASK (0x3U)
  15856. #define PMC_LVDSC2_LVWV_SHIFT (0U)
  15857. /*! LVWV - Low-Voltage Warning Voltage Select
  15858. * 0b00..Low trip point selected (VLVW = VLVW1)
  15859. * 0b01..Mid 1 trip point selected (VLVW = VLVW2)
  15860. * 0b10..Mid 2 trip point selected (VLVW = VLVW3)
  15861. * 0b11..High trip point selected (VLVW = VLVW4)
  15862. */
  15863. #define PMC_LVDSC2_LVWV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWV_SHIFT)) & PMC_LVDSC2_LVWV_MASK)
  15864. #define PMC_LVDSC2_LVWIE_MASK (0x20U)
  15865. #define PMC_LVDSC2_LVWIE_SHIFT (5U)
  15866. /*! LVWIE - Low-Voltage Warning Interrupt Enable
  15867. * 0b0..Hardware interrupt disabled (use polling)
  15868. * 0b1..Request a hardware interrupt when LVWF = 1
  15869. */
  15870. #define PMC_LVDSC2_LVWIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWIE_SHIFT)) & PMC_LVDSC2_LVWIE_MASK)
  15871. #define PMC_LVDSC2_LVWACK_MASK (0x40U)
  15872. #define PMC_LVDSC2_LVWACK_SHIFT (6U)
  15873. #define PMC_LVDSC2_LVWACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWACK_SHIFT)) & PMC_LVDSC2_LVWACK_MASK)
  15874. #define PMC_LVDSC2_LVWF_MASK (0x80U)
  15875. #define PMC_LVDSC2_LVWF_SHIFT (7U)
  15876. /*! LVWF - Low-Voltage Warning Flag
  15877. * 0b0..Low-voltage warning event not detected
  15878. * 0b1..Low-voltage warning event detected
  15879. */
  15880. #define PMC_LVDSC2_LVWF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWF_SHIFT)) & PMC_LVDSC2_LVWF_MASK)
  15881. /*! @} */
  15882. /*! @name REGSC - Regulator Status And Control register */
  15883. /*! @{ */
  15884. #define PMC_REGSC_BGBE_MASK (0x1U)
  15885. #define PMC_REGSC_BGBE_SHIFT (0U)
  15886. /*! BGBE - Bandgap Buffer Enable
  15887. * 0b0..Bandgap buffer not enabled
  15888. * 0b1..Bandgap buffer enabled
  15889. */
  15890. #define PMC_REGSC_BGBE(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGBE_SHIFT)) & PMC_REGSC_BGBE_MASK)
  15891. #define PMC_REGSC_REGONS_MASK (0x4U)
  15892. #define PMC_REGSC_REGONS_SHIFT (2U)
  15893. /*! REGONS - Regulator In Run Regulation Status
  15894. * 0b0..Regulator is in stop regulation or in transition to/from it
  15895. * 0b1..Regulator is in run regulation
  15896. */
  15897. #define PMC_REGSC_REGONS(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_REGONS_SHIFT)) & PMC_REGSC_REGONS_MASK)
  15898. #define PMC_REGSC_ACKISO_MASK (0x8U)
  15899. #define PMC_REGSC_ACKISO_SHIFT (3U)
  15900. /*! ACKISO - Acknowledge Isolation
  15901. * 0b0..Peripherals and I/O pads are in normal run state.
  15902. * 0b1..Certain peripherals and I/O pads are in an isolated and latched state.
  15903. */
  15904. #define PMC_REGSC_ACKISO(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_ACKISO_SHIFT)) & PMC_REGSC_ACKISO_MASK)
  15905. #define PMC_REGSC_BGEN_MASK (0x10U)
  15906. #define PMC_REGSC_BGEN_SHIFT (4U)
  15907. /*! BGEN - Bandgap Enable In VLPx Operation
  15908. * 0b0..Bandgap voltage reference is disabled in VLPx , and VLLSx modes.
  15909. * 0b1..Bandgap voltage reference is enabled in VLPx , and VLLSx modes.
  15910. */
  15911. #define PMC_REGSC_BGEN(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGEN_SHIFT)) & PMC_REGSC_BGEN_MASK)
  15912. /*! @} */
  15913. /*! @name HVDSC1 - High Voltage Detect Status And Control 1 register */
  15914. /*! @{ */
  15915. #define PMC_HVDSC1_HVDV_MASK (0x1U)
  15916. #define PMC_HVDSC1_HVDV_SHIFT (0U)
  15917. /*! HVDV - High-Voltage Detect Voltage Select
  15918. * 0b0..Low trip point selected (V HVD = V HVDL )
  15919. * 0b1..High trip point selected (V HVD = V HVDH )
  15920. */
  15921. #define PMC_HVDSC1_HVDV(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDV_SHIFT)) & PMC_HVDSC1_HVDV_MASK)
  15922. #define PMC_HVDSC1_HVDRE_MASK (0x10U)
  15923. #define PMC_HVDSC1_HVDRE_SHIFT (4U)
  15924. /*! HVDRE - High-Voltage Detect Reset Enable
  15925. * 0b0..HVDF does not generate hardware resets
  15926. * 0b1..Force an MCU reset when HVDF = 1
  15927. */
  15928. #define PMC_HVDSC1_HVDRE(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDRE_SHIFT)) & PMC_HVDSC1_HVDRE_MASK)
  15929. #define PMC_HVDSC1_HVDIE_MASK (0x20U)
  15930. #define PMC_HVDSC1_HVDIE_SHIFT (5U)
  15931. /*! HVDIE - High-Voltage Detect Interrupt Enable
  15932. * 0b0..Hardware interrupt disabled (use polling)
  15933. * 0b1..Request a hardware interrupt when HVDF = 1
  15934. */
  15935. #define PMC_HVDSC1_HVDIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDIE_SHIFT)) & PMC_HVDSC1_HVDIE_MASK)
  15936. #define PMC_HVDSC1_HVDACK_MASK (0x40U)
  15937. #define PMC_HVDSC1_HVDACK_SHIFT (6U)
  15938. #define PMC_HVDSC1_HVDACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDACK_SHIFT)) & PMC_HVDSC1_HVDACK_MASK)
  15939. #define PMC_HVDSC1_HVDF_MASK (0x80U)
  15940. #define PMC_HVDSC1_HVDF_SHIFT (7U)
  15941. /*! HVDF - High-Voltage Detect Flag
  15942. * 0b0..High-voltage event not detected
  15943. * 0b1..High-voltage event detected
  15944. */
  15945. #define PMC_HVDSC1_HVDF(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDF_SHIFT)) & PMC_HVDSC1_HVDF_MASK)
  15946. /*! @} */
  15947. /*!
  15948. * @}
  15949. */ /* end of group PMC_Register_Masks */
  15950. /* PMC - Peripheral instance base addresses */
  15951. /** Peripheral PMC base address */
  15952. #define PMC_BASE (0x4007D000u)
  15953. /** Peripheral PMC base pointer */
  15954. #define PMC ((PMC_Type *)PMC_BASE)
  15955. /** Array initializer of PMC peripheral base addresses */
  15956. #define PMC_BASE_ADDRS { PMC_BASE }
  15957. /** Array initializer of PMC peripheral base pointers */
  15958. #define PMC_BASE_PTRS { PMC }
  15959. /** Interrupt vectors for the PMC peripheral type */
  15960. #define PMC_IRQS { PMC_IRQn }
  15961. /*!
  15962. * @}
  15963. */ /* end of group PMC_Peripheral_Access_Layer */
  15964. /* ----------------------------------------------------------------------------
  15965. -- PORT Peripheral Access Layer
  15966. ---------------------------------------------------------------------------- */
  15967. /*!
  15968. * @addtogroup PORT_Peripheral_Access_Layer PORT Peripheral Access Layer
  15969. * @{
  15970. */
  15971. /** PORT - Register Layout Typedef */
  15972. typedef struct {
  15973. __IO uint32_t PCR[32]; /**< Pin Control Register n, array offset: 0x0, array step: 0x4 */
  15974. __O uint32_t GPCLR; /**< Global Pin Control Low Register, offset: 0x80 */
  15975. __O uint32_t GPCHR; /**< Global Pin Control High Register, offset: 0x84 */
  15976. uint8_t RESERVED_0[24];
  15977. __IO uint32_t ISFR; /**< Interrupt Status Flag Register, offset: 0xA0 */
  15978. uint8_t RESERVED_1[28];
  15979. __IO uint32_t DFER; /**< Digital Filter Enable Register, offset: 0xC0 */
  15980. __IO uint32_t DFCR; /**< Digital Filter Clock Register, offset: 0xC4 */
  15981. __IO uint32_t DFWR; /**< Digital Filter Width Register, offset: 0xC8 */
  15982. } PORT_Type;
  15983. /* ----------------------------------------------------------------------------
  15984. -- PORT Register Masks
  15985. ---------------------------------------------------------------------------- */
  15986. /*!
  15987. * @addtogroup PORT_Register_Masks PORT Register Masks
  15988. * @{
  15989. */
  15990. /*! @name PCR - Pin Control Register n */
  15991. /*! @{ */
  15992. #define PORT_PCR_PS_MASK (0x1U)
  15993. #define PORT_PCR_PS_SHIFT (0U)
  15994. /*! PS - Pull Select
  15995. * 0b0..Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set.
  15996. * 0b1..Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set.
  15997. */
  15998. #define PORT_PCR_PS(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PS_SHIFT)) & PORT_PCR_PS_MASK)
  15999. #define PORT_PCR_PE_MASK (0x2U)
  16000. #define PORT_PCR_PE_SHIFT (1U)
  16001. /*! PE - Pull Enable
  16002. * 0b0..Internal pullup or pulldown resistor is not enabled on the corresponding pin.
  16003. * 0b1..Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
  16004. */
  16005. #define PORT_PCR_PE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PE_SHIFT)) & PORT_PCR_PE_MASK)
  16006. #define PORT_PCR_SRE_MASK (0x4U)
  16007. #define PORT_PCR_SRE_SHIFT (2U)
  16008. /*! SRE - Slew Rate Enable
  16009. * 0b0..Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
  16010. * 0b1..Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
  16011. */
  16012. #define PORT_PCR_SRE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_SRE_SHIFT)) & PORT_PCR_SRE_MASK)
  16013. #define PORT_PCR_PFE_MASK (0x10U)
  16014. #define PORT_PCR_PFE_SHIFT (4U)
  16015. /*! PFE - Passive Filter Enable
  16016. * 0b0..Passive input filter is disabled on the corresponding pin.
  16017. * 0b1..Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
  16018. */
  16019. #define PORT_PCR_PFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PFE_SHIFT)) & PORT_PCR_PFE_MASK)
  16020. #define PORT_PCR_ODE_MASK (0x20U)
  16021. #define PORT_PCR_ODE_SHIFT (5U)
  16022. /*! ODE - Open Drain Enable
  16023. * 0b0..Open drain output is disabled on the corresponding pin.
  16024. * 0b1..Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output.
  16025. */
  16026. #define PORT_PCR_ODE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ODE_SHIFT)) & PORT_PCR_ODE_MASK)
  16027. #define PORT_PCR_DSE_MASK (0x40U)
  16028. #define PORT_PCR_DSE_SHIFT (6U)
  16029. /*! DSE - Drive Strength Enable
  16030. * 0b0..Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
  16031. * 0b1..High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
  16032. */
  16033. #define PORT_PCR_DSE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_DSE_SHIFT)) & PORT_PCR_DSE_MASK)
  16034. #define PORT_PCR_MUX_MASK (0xF00U)
  16035. #define PORT_PCR_MUX_SHIFT (8U)
  16036. /*! MUX - Pin Mux Control
  16037. * 0b0000..Pin disabled.
  16038. * 0b0001..Alternative 1 (GPIO).
  16039. * 0b0010..Alternative 2 (chip-specific).
  16040. * 0b0011..Alternative 3 (chip-specific).
  16041. * 0b0100..Alternative 4 (chip-specific).
  16042. * 0b0101..Alternative 5 (chip-specific).
  16043. * 0b0110..Alternative 6 (chip-specific).
  16044. * 0b0111..Alternative 7 (chip-specific).
  16045. * 0b1000..Alternative 8 (chip-specific).
  16046. * 0b1001..Alternative 9 (chip-specific).
  16047. * 0b1010..Alternative 10 (chip-specific).
  16048. * 0b1011..Alternative 11 (chip-specific).
  16049. * 0b1100..Alternative 12 (chip-specific).
  16050. * 0b1101..Alternative 13 (chip-specific).
  16051. * 0b1110..Alternative 14 (chip-specific).
  16052. * 0b1111..Alternative 15 (chip-specific).
  16053. */
  16054. #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_MUX_SHIFT)) & PORT_PCR_MUX_MASK)
  16055. #define PORT_PCR_LK_MASK (0x8000U)
  16056. #define PORT_PCR_LK_SHIFT (15U)
  16057. /*! LK - Lock Register
  16058. * 0b0..Pin Control Register fields [15:0] are not locked.
  16059. * 0b1..Pin Control Register fields [15:0] are locked and cannot be updated until the next system reset.
  16060. */
  16061. #define PORT_PCR_LK(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_LK_SHIFT)) & PORT_PCR_LK_MASK)
  16062. #define PORT_PCR_IRQC_MASK (0xF0000U)
  16063. #define PORT_PCR_IRQC_SHIFT (16U)
  16064. /*! IRQC - Interrupt Configuration
  16065. * 0b0000..Interrupt Status Flag (ISF) is disabled.
  16066. * 0b0001..ISF flag and DMA request on rising edge.
  16067. * 0b0010..ISF flag and DMA request on falling edge.
  16068. * 0b0011..ISF flag and DMA request on either edge.
  16069. * 0b0100..Reserved.
  16070. * 0b0101..Reserved.
  16071. * 0b0110..Reserved.
  16072. * 0b0111..Reserved.
  16073. * 0b1000..ISF flag and Interrupt when logic 0.
  16074. * 0b1001..ISF flag and Interrupt on rising-edge.
  16075. * 0b1010..ISF flag and Interrupt on falling-edge.
  16076. * 0b1011..ISF flag and Interrupt on either edge.
  16077. * 0b1100..ISF flag and Interrupt when logic 1.
  16078. * 0b1101..Reserved.
  16079. * 0b1110..Reserved.
  16080. * 0b1111..Reserved.
  16081. */
  16082. #define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK)
  16083. #define PORT_PCR_ISF_MASK (0x1000000U)
  16084. #define PORT_PCR_ISF_SHIFT (24U)
  16085. /*! ISF - Interrupt Status Flag
  16086. * 0b0..Configured interrupt is not detected.
  16087. * 0b1..Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
  16088. */
  16089. #define PORT_PCR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ISF_SHIFT)) & PORT_PCR_ISF_MASK)
  16090. /*! @} */
  16091. /* The count of PORT_PCR */
  16092. #define PORT_PCR_COUNT (32U)
  16093. /*! @name GPCLR - Global Pin Control Low Register */
  16094. /*! @{ */
  16095. #define PORT_GPCLR_GPWD_MASK (0xFFFFU)
  16096. #define PORT_GPCLR_GPWD_SHIFT (0U)
  16097. #define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWD_SHIFT)) & PORT_GPCLR_GPWD_MASK)
  16098. #define PORT_GPCLR_GPWE_MASK (0xFFFF0000U)
  16099. #define PORT_GPCLR_GPWE_SHIFT (16U)
  16100. /*! GPWE - Global Pin Write Enable
  16101. * 0b0000000000000000..Corresponding Pin Control Register is not updated with the value in GPWD.
  16102. * 0b0000000000000001..Corresponding Pin Control Register is updated with the value in GPWD.
  16103. */
  16104. #define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWE_SHIFT)) & PORT_GPCLR_GPWE_MASK)
  16105. /*! @} */
  16106. /*! @name GPCHR - Global Pin Control High Register */
  16107. /*! @{ */
  16108. #define PORT_GPCHR_GPWD_MASK (0xFFFFU)
  16109. #define PORT_GPCHR_GPWD_SHIFT (0U)
  16110. #define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWD_SHIFT)) & PORT_GPCHR_GPWD_MASK)
  16111. #define PORT_GPCHR_GPWE_MASK (0xFFFF0000U)
  16112. #define PORT_GPCHR_GPWE_SHIFT (16U)
  16113. /*! GPWE - Global Pin Write Enable
  16114. * 0b0000000000000000..Corresponding Pin Control Register is not updated with the value in GPWD.
  16115. * 0b0000000000000001..Corresponding Pin Control Register is updated with the value in GPWD.
  16116. */
  16117. #define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWE_SHIFT)) & PORT_GPCHR_GPWE_MASK)
  16118. /*! @} */
  16119. /*! @name ISFR - Interrupt Status Flag Register */
  16120. /*! @{ */
  16121. #define PORT_ISFR_ISF_MASK (0xFFFFFFFFU)
  16122. #define PORT_ISFR_ISF_SHIFT (0U)
  16123. /*! ISF - Interrupt Status Flag
  16124. * 0b00000000000000000000000000000000..Configured interrupt is not detected.
  16125. * 0b00000000000000000000000000000001..Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
  16126. */
  16127. #define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_ISFR_ISF_SHIFT)) & PORT_ISFR_ISF_MASK)
  16128. /*! @} */
  16129. /*! @name DFER - Digital Filter Enable Register */
  16130. /*! @{ */
  16131. #define PORT_DFER_DFE_MASK (0xFFFFFFFFU)
  16132. #define PORT_DFER_DFE_SHIFT (0U)
  16133. /*! DFE - Digital Filter Enable
  16134. * 0b00000000000000000000000000000000..Digital filter is disabled on the corresponding pin and output of the digital filter is reset to zero.
  16135. * 0b00000000000000000000000000000001..Digital filter is enabled on the corresponding pin, if the pin is configured as a digital input.
  16136. */
  16137. #define PORT_DFER_DFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFER_DFE_SHIFT)) & PORT_DFER_DFE_MASK)
  16138. /*! @} */
  16139. /*! @name DFCR - Digital Filter Clock Register */
  16140. /*! @{ */
  16141. #define PORT_DFCR_CS_MASK (0x1U)
  16142. #define PORT_DFCR_CS_SHIFT (0U)
  16143. /*! CS - Clock Source
  16144. * 0b0..Digital filters are clocked by the bus clock.
  16145. * 0b1..Digital filters are clocked by the LPO clock.
  16146. */
  16147. #define PORT_DFCR_CS(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFCR_CS_SHIFT)) & PORT_DFCR_CS_MASK)
  16148. /*! @} */
  16149. /*! @name DFWR - Digital Filter Width Register */
  16150. /*! @{ */
  16151. #define PORT_DFWR_FILT_MASK (0x1FU)
  16152. #define PORT_DFWR_FILT_SHIFT (0U)
  16153. #define PORT_DFWR_FILT(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFWR_FILT_SHIFT)) & PORT_DFWR_FILT_MASK)
  16154. /*! @} */
  16155. /*!
  16156. * @}
  16157. */ /* end of group PORT_Register_Masks */
  16158. /* PORT - Peripheral instance base addresses */
  16159. /** Peripheral PORTA base address */
  16160. #define PORTA_BASE (0x40049000u)
  16161. /** Peripheral PORTA base pointer */
  16162. #define PORTA ((PORT_Type *)PORTA_BASE)
  16163. /** Peripheral PORTB base address */
  16164. #define PORTB_BASE (0x4004A000u)
  16165. /** Peripheral PORTB base pointer */
  16166. #define PORTB ((PORT_Type *)PORTB_BASE)
  16167. /** Peripheral PORTC base address */
  16168. #define PORTC_BASE (0x4004B000u)
  16169. /** Peripheral PORTC base pointer */
  16170. #define PORTC ((PORT_Type *)PORTC_BASE)
  16171. /** Peripheral PORTD base address */
  16172. #define PORTD_BASE (0x4004C000u)
  16173. /** Peripheral PORTD base pointer */
  16174. #define PORTD ((PORT_Type *)PORTD_BASE)
  16175. /** Peripheral PORTE base address */
  16176. #define PORTE_BASE (0x4004D000u)
  16177. /** Peripheral PORTE base pointer */
  16178. #define PORTE ((PORT_Type *)PORTE_BASE)
  16179. /** Array initializer of PORT peripheral base addresses */
  16180. #define PORT_BASE_ADDRS { PORTA_BASE, PORTB_BASE, PORTC_BASE, PORTD_BASE, PORTE_BASE }
  16181. /** Array initializer of PORT peripheral base pointers */
  16182. #define PORT_BASE_PTRS { PORTA, PORTB, PORTC, PORTD, PORTE }
  16183. /** Interrupt vectors for the PORT peripheral type */
  16184. #define PORT_IRQS { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn }
  16185. /*!
  16186. * @}
  16187. */ /* end of group PORT_Peripheral_Access_Layer */
  16188. /* ----------------------------------------------------------------------------
  16189. -- PWM Peripheral Access Layer
  16190. ---------------------------------------------------------------------------- */
  16191. /*!
  16192. * @addtogroup PWM_Peripheral_Access_Layer PWM Peripheral Access Layer
  16193. * @{
  16194. */
  16195. /** PWM - Register Layout Typedef */
  16196. typedef struct {
  16197. struct { /* offset: 0x0, array step: 0x60 */
  16198. __I uint16_t CNT; /**< Counter Register, array offset: 0x0, array step: 0x60 */
  16199. __IO uint16_t INIT; /**< Initial Count Register, array offset: 0x2, array step: 0x60 */
  16200. __IO uint16_t CTRL2; /**< Control 2 Register, array offset: 0x4, array step: 0x60 */
  16201. __IO uint16_t CTRL; /**< Control Register, array offset: 0x6, array step: 0x60 */
  16202. uint8_t RESERVED_0[2];
  16203. __IO uint16_t VAL0; /**< Value Register 0, array offset: 0xA, array step: 0x60 */
  16204. __IO uint16_t FRACVAL1; /**< Fractional Value Register 1, array offset: 0xC, array step: 0x60 */
  16205. __IO uint16_t VAL1; /**< Value Register 1, array offset: 0xE, array step: 0x60 */
  16206. __IO uint16_t FRACVAL2; /**< Fractional Value Register 2, array offset: 0x10, array step: 0x60 */
  16207. __IO uint16_t VAL2; /**< Value Register 2, array offset: 0x12, array step: 0x60 */
  16208. __IO uint16_t FRACVAL3; /**< Fractional Value Register 3, array offset: 0x14, array step: 0x60 */
  16209. __IO uint16_t VAL3; /**< Value Register 3, array offset: 0x16, array step: 0x60 */
  16210. __IO uint16_t FRACVAL4; /**< Fractional Value Register 4, array offset: 0x18, array step: 0x60 */
  16211. __IO uint16_t VAL4; /**< Value Register 4, array offset: 0x1A, array step: 0x60 */
  16212. __IO uint16_t FRACVAL5; /**< Fractional Value Register 5, array offset: 0x1C, array step: 0x60 */
  16213. __IO uint16_t VAL5; /**< Value Register 5, array offset: 0x1E, array step: 0x60 */
  16214. __IO uint16_t FRCTRL; /**< Fractional Control Register, array offset: 0x20, array step: 0x60 */
  16215. __IO uint16_t OCTRL; /**< Output Control Register, array offset: 0x22, array step: 0x60 */
  16216. __IO uint16_t STS; /**< Status Register, array offset: 0x24, array step: 0x60 */
  16217. __IO uint16_t INTEN; /**< Interrupt Enable Register, array offset: 0x26, array step: 0x60 */
  16218. __IO uint16_t DMAEN; /**< DMA Enable Register, array offset: 0x28, array step: 0x60 */
  16219. __IO uint16_t TCTRL; /**< Output Trigger Control Register, array offset: 0x2A, array step: 0x60 */
  16220. __IO uint16_t DISMAP[1]; /**< Fault Disable Mapping Register 0, array offset: 0x2C, array step: index*0x60, index2*0x2 */
  16221. uint8_t RESERVED_1[2];
  16222. __IO uint16_t DTCNT0; /**< Deadtime Count Register 0, array offset: 0x30, array step: 0x60 */
  16223. __IO uint16_t DTCNT1; /**< Deadtime Count Register 1, array offset: 0x32, array step: 0x60 */
  16224. __IO uint16_t CAPTCTRLA; /**< Capture Control A Register, array offset: 0x34, array step: 0x60 */
  16225. __IO uint16_t CAPTCOMPA; /**< Capture Compare A Register, array offset: 0x36, array step: 0x60 */
  16226. __IO uint16_t CAPTCTRLB; /**< Capture Control B Register, array offset: 0x38, array step: 0x60 */
  16227. __IO uint16_t CAPTCOMPB; /**< Capture Compare B Register, array offset: 0x3A, array step: 0x60 */
  16228. __IO uint16_t CAPTCTRLX; /**< Capture Control X Register, array offset: 0x3C, array step: 0x60 */
  16229. __IO uint16_t CAPTCOMPX; /**< Capture Compare X Register, array offset: 0x3E, array step: 0x60 */
  16230. __I uint16_t CVAL0; /**< Capture Value 0 Register, array offset: 0x40, array step: 0x60 */
  16231. __I uint16_t CVAL0CYC; /**< Capture Value 0 Cycle Register, array offset: 0x42, array step: 0x60 */
  16232. __I uint16_t CVAL1; /**< Capture Value 1 Register, array offset: 0x44, array step: 0x60 */
  16233. __I uint16_t CVAL1CYC; /**< Capture Value 1 Cycle Register, array offset: 0x46, array step: 0x60 */
  16234. __I uint16_t CVAL2; /**< Capture Value 2 Register, array offset: 0x48, array step: 0x60 */
  16235. __I uint16_t CVAL2CYC; /**< Capture Value 2 Cycle Register, array offset: 0x4A, array step: 0x60 */
  16236. __I uint16_t CVAL3; /**< Capture Value 3 Register, array offset: 0x4C, array step: 0x60 */
  16237. __I uint16_t CVAL3CYC; /**< Capture Value 3 Cycle Register, array offset: 0x4E, array step: 0x60 */
  16238. __I uint16_t CVAL4; /**< Capture Value 4 Register, array offset: 0x50, array step: 0x60 */
  16239. __I uint16_t CVAL4CYC; /**< Capture Value 4 Cycle Register, array offset: 0x52, array step: 0x60 */
  16240. __I uint16_t CVAL5; /**< Capture Value 5 Register, array offset: 0x54, array step: 0x60 */
  16241. __I uint16_t CVAL5CYC; /**< Capture Value 5 Cycle Register, array offset: 0x56, array step: 0x60 */
  16242. uint8_t RESERVED_2[8];
  16243. } SM[4];
  16244. __IO uint16_t OUTEN; /**< Output Enable Register, offset: 0x180 */
  16245. __IO uint16_t MASK; /**< Mask Register, offset: 0x182 */
  16246. __IO uint16_t SWCOUT; /**< Software Controlled Output Register, offset: 0x184 */
  16247. __IO uint16_t DTSRCSEL; /**< PWM Source Select Register, offset: 0x186 */
  16248. __IO uint16_t MCTRL; /**< Master Control Register 0, offset: 0x188 */
  16249. __IO uint16_t MCTRL2; /**< Master Control Register 1, offset: 0x18A */
  16250. __IO uint16_t FCTRL; /**< Fault Control Register, offset: 0x18C */
  16251. __IO uint16_t FSTS; /**< Fault Status Register, offset: 0x18E */
  16252. __IO uint16_t FFILT; /**< Fault Filter Register, offset: 0x190 */
  16253. __IO uint16_t FTST; /**< Fault Test Register, offset: 0x192 */
  16254. __IO uint16_t FCTRL2; /**< Fault Control 2 Register, offset: 0x194 */
  16255. } PWM_Type;
  16256. /* ----------------------------------------------------------------------------
  16257. -- PWM Register Masks
  16258. ---------------------------------------------------------------------------- */
  16259. /*!
  16260. * @addtogroup PWM_Register_Masks PWM Register Masks
  16261. * @{
  16262. */
  16263. /*! @name CNT - Counter Register */
  16264. /*! @{ */
  16265. #define PWM_CNT_CNT_MASK (0xFFFFU)
  16266. #define PWM_CNT_CNT_SHIFT (0U)
  16267. #define PWM_CNT_CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CNT_CNT_SHIFT)) & PWM_CNT_CNT_MASK)
  16268. /*! @} */
  16269. /* The count of PWM_CNT */
  16270. #define PWM_CNT_COUNT (4U)
  16271. /*! @name INIT - Initial Count Register */
  16272. /*! @{ */
  16273. #define PWM_INIT_INIT_MASK (0xFFFFU)
  16274. #define PWM_INIT_INIT_SHIFT (0U)
  16275. #define PWM_INIT_INIT(x) (((uint16_t)(((uint16_t)(x)) << PWM_INIT_INIT_SHIFT)) & PWM_INIT_INIT_MASK)
  16276. /*! @} */
  16277. /* The count of PWM_INIT */
  16278. #define PWM_INIT_COUNT (4U)
  16279. /*! @name CTRL2 - Control 2 Register */
  16280. /*! @{ */
  16281. #define PWM_CTRL2_CLK_SEL_MASK (0x3U)
  16282. #define PWM_CTRL2_CLK_SEL_SHIFT (0U)
  16283. /*! CLK_SEL - Clock Source Select
  16284. * 0b00..The IPBus clock is used as the clock for the local prescaler and counter.
  16285. * 0b01..EXT_CLK is used as the clock for the local prescaler and counter.
  16286. * 0b10..Submodule 0's clock (AUX_CLK) is used as the source clock for the local prescaler and counter. This setting should not be used in submodule 0 as it will force the clock to logic 0.
  16287. * 0b11..reserved
  16288. */
  16289. #define PWM_CTRL2_CLK_SEL(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_CLK_SEL_SHIFT)) & PWM_CTRL2_CLK_SEL_MASK)
  16290. #define PWM_CTRL2_RELOAD_SEL_MASK (0x4U)
  16291. #define PWM_CTRL2_RELOAD_SEL_SHIFT (2U)
  16292. /*! RELOAD_SEL - Reload Source Select
  16293. * 0b0..The local RELOAD signal is used to reload registers.
  16294. * 0b1..The master RELOAD signal (from submodule 0) is used to reload registers. This setting should not be used in submodule 0 as it will force the RELOAD signal to logic 0.
  16295. */
  16296. #define PWM_CTRL2_RELOAD_SEL(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_RELOAD_SEL_SHIFT)) & PWM_CTRL2_RELOAD_SEL_MASK)
  16297. #define PWM_CTRL2_FORCE_SEL_MASK (0x38U)
  16298. #define PWM_CTRL2_FORCE_SEL_SHIFT (3U)
  16299. /*! FORCE_SEL - This read/write bit determines the source of the FORCE OUTPUT signal for this submodule.
  16300. * 0b000..The local force signal, CTRL2[FORCE], from this submodule is used to force updates.
  16301. * 0b001..The master force signal from submodule 0 is used to force updates. This setting should not be used in submodule 0 as it will hold the FORCE OUTPUT signal to logic 0.
  16302. * 0b010..The local reload signal from this submodule is used to force updates without regard to the state of LDOK.
  16303. * 0b011..The master reload signal from submodule0 is used to force updates if LDOK is set. This setting should not be used in submodule0 as it will hold the FORCE OUTPUT signal to logic 0.
  16304. * 0b100..The local sync signal from this submodule is used to force updates.
  16305. * 0b101..The master sync signal from submodule0 is used to force updates. This setting should not be used in submodule0 as it will hold the FORCE OUTPUT signal to logic 0.
  16306. * 0b110..The external force signal, EXT_FORCE, from outside the PWM module causes updates.
  16307. * 0b111..The external sync signal, EXT_SYNC, from outside the PWM module causes updates.
  16308. */
  16309. #define PWM_CTRL2_FORCE_SEL(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_FORCE_SEL_SHIFT)) & PWM_CTRL2_FORCE_SEL_MASK)
  16310. #define PWM_CTRL2_FORCE_MASK (0x40U)
  16311. #define PWM_CTRL2_FORCE_SHIFT (6U)
  16312. #define PWM_CTRL2_FORCE(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_FORCE_SHIFT)) & PWM_CTRL2_FORCE_MASK)
  16313. #define PWM_CTRL2_FRCEN_MASK (0x80U)
  16314. #define PWM_CTRL2_FRCEN_SHIFT (7U)
  16315. /*! FRCEN
  16316. * 0b0..Initialization from a FORCE_OUT is disabled.
  16317. * 0b1..Initialization from a FORCE_OUT is enabled.
  16318. */
  16319. #define PWM_CTRL2_FRCEN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_FRCEN_SHIFT)) & PWM_CTRL2_FRCEN_MASK)
  16320. #define PWM_CTRL2_INIT_SEL_MASK (0x300U)
  16321. #define PWM_CTRL2_INIT_SEL_SHIFT (8U)
  16322. /*! INIT_SEL - Initialization Control Select
  16323. * 0b00..Local sync (PWM_X) causes initialization.
  16324. * 0b01..Master reload from submodule 0 causes initialization. This setting should not be used in submodule 0 as it will force the INIT signal to logic 0. The submodule counter will only reinitialize when a master reload occurs.
  16325. * 0b10..Master sync from submodule 0 causes initialization. This setting should not be used in submodule 0 as it will force the INIT signal to logic 0.
  16326. * 0b11..EXT_SYNC causes initialization.
  16327. */
  16328. #define PWM_CTRL2_INIT_SEL(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_INIT_SEL_SHIFT)) & PWM_CTRL2_INIT_SEL_MASK)
  16329. #define PWM_CTRL2_PWMX_INIT_MASK (0x400U)
  16330. #define PWM_CTRL2_PWMX_INIT_SHIFT (10U)
  16331. #define PWM_CTRL2_PWMX_INIT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_PWMX_INIT_SHIFT)) & PWM_CTRL2_PWMX_INIT_MASK)
  16332. #define PWM_CTRL2_PWM45_INIT_MASK (0x800U)
  16333. #define PWM_CTRL2_PWM45_INIT_SHIFT (11U)
  16334. #define PWM_CTRL2_PWM45_INIT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_PWM45_INIT_SHIFT)) & PWM_CTRL2_PWM45_INIT_MASK)
  16335. #define PWM_CTRL2_PWM23_INIT_MASK (0x1000U)
  16336. #define PWM_CTRL2_PWM23_INIT_SHIFT (12U)
  16337. #define PWM_CTRL2_PWM23_INIT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_PWM23_INIT_SHIFT)) & PWM_CTRL2_PWM23_INIT_MASK)
  16338. #define PWM_CTRL2_INDEP_MASK (0x2000U)
  16339. #define PWM_CTRL2_INDEP_SHIFT (13U)
  16340. /*! INDEP - Independent or Complementary Pair Operation
  16341. * 0b0..PWM_A and PWM_B form a complementary PWM pair.
  16342. * 0b1..PWM_A and PWM_B outputs are independent PWMs.
  16343. */
  16344. #define PWM_CTRL2_INDEP(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_INDEP_SHIFT)) & PWM_CTRL2_INDEP_MASK)
  16345. #define PWM_CTRL2_WAITEN_MASK (0x4000U)
  16346. #define PWM_CTRL2_WAITEN_SHIFT (14U)
  16347. #define PWM_CTRL2_WAITEN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_WAITEN_SHIFT)) & PWM_CTRL2_WAITEN_MASK)
  16348. #define PWM_CTRL2_DBGEN_MASK (0x8000U)
  16349. #define PWM_CTRL2_DBGEN_SHIFT (15U)
  16350. #define PWM_CTRL2_DBGEN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL2_DBGEN_SHIFT)) & PWM_CTRL2_DBGEN_MASK)
  16351. /*! @} */
  16352. /* The count of PWM_CTRL2 */
  16353. #define PWM_CTRL2_COUNT (4U)
  16354. /*! @name CTRL - Control Register */
  16355. /*! @{ */
  16356. #define PWM_CTRL_DBLEN_MASK (0x1U)
  16357. #define PWM_CTRL_DBLEN_SHIFT (0U)
  16358. /*! DBLEN - Double Switching Enable
  16359. * 0b0..Double switching disabled.
  16360. * 0b1..Double switching enabled.
  16361. */
  16362. #define PWM_CTRL_DBLEN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_DBLEN_SHIFT)) & PWM_CTRL_DBLEN_MASK)
  16363. #define PWM_CTRL_DBLX_MASK (0x2U)
  16364. #define PWM_CTRL_DBLX_SHIFT (1U)
  16365. /*! DBLX - PWMX Double Switching Enable
  16366. * 0b0..PWMX double pulse disabled.
  16367. * 0b1..PWMX double pulse enabled.
  16368. */
  16369. #define PWM_CTRL_DBLX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_DBLX_SHIFT)) & PWM_CTRL_DBLX_MASK)
  16370. #define PWM_CTRL_LDMOD_MASK (0x4U)
  16371. #define PWM_CTRL_LDMOD_SHIFT (2U)
  16372. /*! LDMOD - Load Mode Select
  16373. * 0b0..Buffered registers of this submodule are loaded and take effect at the next PWM reload if MCTRL0[LDOK] is set.
  16374. * 0b1..Buffered registers of this submodule are loaded and take effect immediately upon MCTRL0[LDOK] being set. In this case it is not necessary to set CTRL[FULL] or CTRL[HALF].
  16375. */
  16376. #define PWM_CTRL_LDMOD(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_LDMOD_SHIFT)) & PWM_CTRL_LDMOD_MASK)
  16377. #define PWM_CTRL_PRSC_MASK (0x70U)
  16378. #define PWM_CTRL_PRSC_SHIFT (4U)
  16379. /*! PRSC - Prescaler
  16380. * 0b000..PWM clock frequency = fclk
  16381. * 0b001..PWM clock frequency = fclk/2
  16382. * 0b010..PWM clock frequency = fclk/4
  16383. * 0b011..PWM clock frequency = fclk/8
  16384. * 0b100..PWM clock frequency = fclk/16
  16385. * 0b101..PWM clock frequency = fclk/32
  16386. * 0b110..PWM clock frequency = fclk/64
  16387. * 0b111..PWM clock frequency = fclk/128
  16388. */
  16389. #define PWM_CTRL_PRSC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_PRSC_SHIFT)) & PWM_CTRL_PRSC_MASK)
  16390. #define PWM_CTRL_DT_MASK (0x300U)
  16391. #define PWM_CTRL_DT_SHIFT (8U)
  16392. #define PWM_CTRL_DT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_DT_SHIFT)) & PWM_CTRL_DT_MASK)
  16393. #define PWM_CTRL_FULL_MASK (0x400U)
  16394. #define PWM_CTRL_FULL_SHIFT (10U)
  16395. /*! FULL - Full Cycle Reload
  16396. * 0b0..Full-cycle reloads disabled.
  16397. * 0b1..Full-cycle reloads enabled.
  16398. */
  16399. #define PWM_CTRL_FULL(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_FULL_SHIFT)) & PWM_CTRL_FULL_MASK)
  16400. #define PWM_CTRL_HALF_MASK (0x800U)
  16401. #define PWM_CTRL_HALF_SHIFT (11U)
  16402. /*! HALF - Half Cycle Reload
  16403. * 0b0..Half-cycle reloads disabled.
  16404. * 0b1..Half-cycle reloads enabled.
  16405. */
  16406. #define PWM_CTRL_HALF(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_HALF_SHIFT)) & PWM_CTRL_HALF_MASK)
  16407. #define PWM_CTRL_LDFQ_MASK (0xF000U)
  16408. #define PWM_CTRL_LDFQ_SHIFT (12U)
  16409. /*! LDFQ - Load Frequency
  16410. * 0b0000..Every PWM opportunity
  16411. * 0b0001..Every 2 PWM opportunities
  16412. * 0b0010..Every 3 PWM opportunities
  16413. * 0b0011..Every 4 PWM opportunities
  16414. * 0b0100..Every 5 PWM opportunities
  16415. * 0b0101..Every 6 PWM opportunities
  16416. * 0b0110..Every 7 PWM opportunities
  16417. * 0b0111..Every 8 PWM opportunities
  16418. * 0b1000..Every 9 PWM opportunities
  16419. * 0b1001..Every 10 PWM opportunities
  16420. * 0b1010..Every 11 PWM opportunities
  16421. * 0b1011..Every 12 PWM opportunities
  16422. * 0b1100..Every 13 PWM opportunities
  16423. * 0b1101..Every 14 PWM opportunities
  16424. * 0b1110..Every 15 PWM opportunities
  16425. * 0b1111..Every 16 PWM opportunities
  16426. */
  16427. #define PWM_CTRL_LDFQ(x) (((uint16_t)(((uint16_t)(x)) << PWM_CTRL_LDFQ_SHIFT)) & PWM_CTRL_LDFQ_MASK)
  16428. /*! @} */
  16429. /* The count of PWM_CTRL */
  16430. #define PWM_CTRL_COUNT (4U)
  16431. /*! @name VAL0 - Value Register 0 */
  16432. /*! @{ */
  16433. #define PWM_VAL0_VAL0_MASK (0xFFFFU)
  16434. #define PWM_VAL0_VAL0_SHIFT (0U)
  16435. #define PWM_VAL0_VAL0(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL0_VAL0_SHIFT)) & PWM_VAL0_VAL0_MASK)
  16436. /*! @} */
  16437. /* The count of PWM_VAL0 */
  16438. #define PWM_VAL0_COUNT (4U)
  16439. /*! @name FRACVAL1 - Fractional Value Register 1 */
  16440. /*! @{ */
  16441. #define PWM_FRACVAL1_FRACVAL1_MASK (0xF800U)
  16442. #define PWM_FRACVAL1_FRACVAL1_SHIFT (11U)
  16443. #define PWM_FRACVAL1_FRACVAL1(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRACVAL1_FRACVAL1_SHIFT)) & PWM_FRACVAL1_FRACVAL1_MASK)
  16444. /*! @} */
  16445. /* The count of PWM_FRACVAL1 */
  16446. #define PWM_FRACVAL1_COUNT (4U)
  16447. /*! @name VAL1 - Value Register 1 */
  16448. /*! @{ */
  16449. #define PWM_VAL1_VAL1_MASK (0xFFFFU)
  16450. #define PWM_VAL1_VAL1_SHIFT (0U)
  16451. #define PWM_VAL1_VAL1(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL1_VAL1_SHIFT)) & PWM_VAL1_VAL1_MASK)
  16452. /*! @} */
  16453. /* The count of PWM_VAL1 */
  16454. #define PWM_VAL1_COUNT (4U)
  16455. /*! @name FRACVAL2 - Fractional Value Register 2 */
  16456. /*! @{ */
  16457. #define PWM_FRACVAL2_FRACVAL2_MASK (0xF800U)
  16458. #define PWM_FRACVAL2_FRACVAL2_SHIFT (11U)
  16459. #define PWM_FRACVAL2_FRACVAL2(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRACVAL2_FRACVAL2_SHIFT)) & PWM_FRACVAL2_FRACVAL2_MASK)
  16460. /*! @} */
  16461. /* The count of PWM_FRACVAL2 */
  16462. #define PWM_FRACVAL2_COUNT (4U)
  16463. /*! @name VAL2 - Value Register 2 */
  16464. /*! @{ */
  16465. #define PWM_VAL2_VAL2_MASK (0xFFFFU)
  16466. #define PWM_VAL2_VAL2_SHIFT (0U)
  16467. #define PWM_VAL2_VAL2(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL2_VAL2_SHIFT)) & PWM_VAL2_VAL2_MASK)
  16468. /*! @} */
  16469. /* The count of PWM_VAL2 */
  16470. #define PWM_VAL2_COUNT (4U)
  16471. /*! @name FRACVAL3 - Fractional Value Register 3 */
  16472. /*! @{ */
  16473. #define PWM_FRACVAL3_FRACVAL3_MASK (0xF800U)
  16474. #define PWM_FRACVAL3_FRACVAL3_SHIFT (11U)
  16475. #define PWM_FRACVAL3_FRACVAL3(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRACVAL3_FRACVAL3_SHIFT)) & PWM_FRACVAL3_FRACVAL3_MASK)
  16476. /*! @} */
  16477. /* The count of PWM_FRACVAL3 */
  16478. #define PWM_FRACVAL3_COUNT (4U)
  16479. /*! @name VAL3 - Value Register 3 */
  16480. /*! @{ */
  16481. #define PWM_VAL3_VAL3_MASK (0xFFFFU)
  16482. #define PWM_VAL3_VAL3_SHIFT (0U)
  16483. #define PWM_VAL3_VAL3(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL3_VAL3_SHIFT)) & PWM_VAL3_VAL3_MASK)
  16484. /*! @} */
  16485. /* The count of PWM_VAL3 */
  16486. #define PWM_VAL3_COUNT (4U)
  16487. /*! @name FRACVAL4 - Fractional Value Register 4 */
  16488. /*! @{ */
  16489. #define PWM_FRACVAL4_FRACVAL4_MASK (0xF800U)
  16490. #define PWM_FRACVAL4_FRACVAL4_SHIFT (11U)
  16491. #define PWM_FRACVAL4_FRACVAL4(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRACVAL4_FRACVAL4_SHIFT)) & PWM_FRACVAL4_FRACVAL4_MASK)
  16492. /*! @} */
  16493. /* The count of PWM_FRACVAL4 */
  16494. #define PWM_FRACVAL4_COUNT (4U)
  16495. /*! @name VAL4 - Value Register 4 */
  16496. /*! @{ */
  16497. #define PWM_VAL4_VAL4_MASK (0xFFFFU)
  16498. #define PWM_VAL4_VAL4_SHIFT (0U)
  16499. #define PWM_VAL4_VAL4(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL4_VAL4_SHIFT)) & PWM_VAL4_VAL4_MASK)
  16500. /*! @} */
  16501. /* The count of PWM_VAL4 */
  16502. #define PWM_VAL4_COUNT (4U)
  16503. /*! @name FRACVAL5 - Fractional Value Register 5 */
  16504. /*! @{ */
  16505. #define PWM_FRACVAL5_FRACVAL5_MASK (0xF800U)
  16506. #define PWM_FRACVAL5_FRACVAL5_SHIFT (11U)
  16507. #define PWM_FRACVAL5_FRACVAL5(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRACVAL5_FRACVAL5_SHIFT)) & PWM_FRACVAL5_FRACVAL5_MASK)
  16508. /*! @} */
  16509. /* The count of PWM_FRACVAL5 */
  16510. #define PWM_FRACVAL5_COUNT (4U)
  16511. /*! @name VAL5 - Value Register 5 */
  16512. /*! @{ */
  16513. #define PWM_VAL5_VAL5_MASK (0xFFFFU)
  16514. #define PWM_VAL5_VAL5_SHIFT (0U)
  16515. #define PWM_VAL5_VAL5(x) (((uint16_t)(((uint16_t)(x)) << PWM_VAL5_VAL5_SHIFT)) & PWM_VAL5_VAL5_MASK)
  16516. /*! @} */
  16517. /* The count of PWM_VAL5 */
  16518. #define PWM_VAL5_COUNT (4U)
  16519. /*! @name FRCTRL - Fractional Control Register */
  16520. /*! @{ */
  16521. #define PWM_FRCTRL_FRAC1_EN_MASK (0x2U)
  16522. #define PWM_FRCTRL_FRAC1_EN_SHIFT (1U)
  16523. /*! FRAC1_EN - Fractional Cycle PWM Period Enable
  16524. * 0b0..Disable fractional cycle length for the PWM period.
  16525. * 0b1..Enable fractional cycle length for the PWM period.
  16526. */
  16527. #define PWM_FRCTRL_FRAC1_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRCTRL_FRAC1_EN_SHIFT)) & PWM_FRCTRL_FRAC1_EN_MASK)
  16528. #define PWM_FRCTRL_FRAC23_EN_MASK (0x4U)
  16529. #define PWM_FRCTRL_FRAC23_EN_SHIFT (2U)
  16530. /*! FRAC23_EN - Fractional Cycle Placement Enable for PWM_A
  16531. * 0b0..Disable fractional cycle placement for PWM_A.
  16532. * 0b1..Enable fractional cycle placement for PWM_A.
  16533. */
  16534. #define PWM_FRCTRL_FRAC23_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRCTRL_FRAC23_EN_SHIFT)) & PWM_FRCTRL_FRAC23_EN_MASK)
  16535. #define PWM_FRCTRL_FRAC45_EN_MASK (0x10U)
  16536. #define PWM_FRCTRL_FRAC45_EN_SHIFT (4U)
  16537. /*! FRAC45_EN - Fractional Cycle Placement Enable for PWM_B
  16538. * 0b0..Disable fractional cycle placement for PWM_B.
  16539. * 0b1..Enable fractional cycle placement for PWM_B.
  16540. */
  16541. #define PWM_FRCTRL_FRAC45_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRCTRL_FRAC45_EN_SHIFT)) & PWM_FRCTRL_FRAC45_EN_MASK)
  16542. #define PWM_FRCTRL_FRAC_PU_MASK (0x100U)
  16543. #define PWM_FRCTRL_FRAC_PU_SHIFT (8U)
  16544. /*! FRAC_PU - Fractional Delay Circuit Power Up
  16545. * 0b0..Turn off fractional delay logic.
  16546. * 0b1..Power up fractional delay logic.
  16547. */
  16548. #define PWM_FRCTRL_FRAC_PU(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRCTRL_FRAC_PU_SHIFT)) & PWM_FRCTRL_FRAC_PU_MASK)
  16549. #define PWM_FRCTRL_TEST_MASK (0x8000U)
  16550. #define PWM_FRCTRL_TEST_SHIFT (15U)
  16551. #define PWM_FRCTRL_TEST(x) (((uint16_t)(((uint16_t)(x)) << PWM_FRCTRL_TEST_SHIFT)) & PWM_FRCTRL_TEST_MASK)
  16552. /*! @} */
  16553. /* The count of PWM_FRCTRL */
  16554. #define PWM_FRCTRL_COUNT (4U)
  16555. /*! @name OCTRL - Output Control Register */
  16556. /*! @{ */
  16557. #define PWM_OCTRL_PWMXFS_MASK (0x3U)
  16558. #define PWM_OCTRL_PWMXFS_SHIFT (0U)
  16559. /*! PWMXFS - PWM_X Fault State
  16560. * 0b00..Output is forced to logic 0 state prior to consideration of output polarity control.
  16561. * 0b01..Output is forced to logic 1 state prior to consideration of output polarity control.
  16562. * 0b10..Output is tristated.
  16563. * 0b11..Output is tristated.
  16564. */
  16565. #define PWM_OCTRL_PWMXFS(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMXFS_SHIFT)) & PWM_OCTRL_PWMXFS_MASK)
  16566. #define PWM_OCTRL_PWMBFS_MASK (0xCU)
  16567. #define PWM_OCTRL_PWMBFS_SHIFT (2U)
  16568. /*! PWMBFS - PWM_B Fault State
  16569. * 0b00..Output is forced to logic 0 state prior to consideration of output polarity control.
  16570. * 0b01..Output is forced to logic 1 state prior to consideration of output polarity control.
  16571. * 0b10..Output is tristated.
  16572. * 0b11..Output is tristated.
  16573. */
  16574. #define PWM_OCTRL_PWMBFS(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMBFS_SHIFT)) & PWM_OCTRL_PWMBFS_MASK)
  16575. #define PWM_OCTRL_PWMAFS_MASK (0x30U)
  16576. #define PWM_OCTRL_PWMAFS_SHIFT (4U)
  16577. /*! PWMAFS - PWM_A Fault State
  16578. * 0b00..Output is forced to logic 0 state prior to consideration of output polarity control.
  16579. * 0b01..Output is forced to logic 1 state prior to consideration of output polarity control.
  16580. * 0b10..Output is tristated.
  16581. * 0b11..Output is tristated.
  16582. */
  16583. #define PWM_OCTRL_PWMAFS(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMAFS_SHIFT)) & PWM_OCTRL_PWMAFS_MASK)
  16584. #define PWM_OCTRL_POLX_MASK (0x100U)
  16585. #define PWM_OCTRL_POLX_SHIFT (8U)
  16586. /*! POLX - PWM_X Output Polarity
  16587. * 0b0..PWM_X output not inverted. A high level on the PWM_X pin represents the "on" or "active" state.
  16588. * 0b1..PWM_X output inverted. A low level on the PWM_X pin represents the "on" or "active" state.
  16589. */
  16590. #define PWM_OCTRL_POLX(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_POLX_SHIFT)) & PWM_OCTRL_POLX_MASK)
  16591. #define PWM_OCTRL_POLB_MASK (0x200U)
  16592. #define PWM_OCTRL_POLB_SHIFT (9U)
  16593. /*! POLB - PWM_B Output Polarity
  16594. * 0b0..PWM_B output not inverted. A high level on the PWM_B pin represents the "on" or "active" state.
  16595. * 0b1..PWM_B output inverted. A low level on the PWM_B pin represents the "on" or "active" state.
  16596. */
  16597. #define PWM_OCTRL_POLB(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_POLB_SHIFT)) & PWM_OCTRL_POLB_MASK)
  16598. #define PWM_OCTRL_POLA_MASK (0x400U)
  16599. #define PWM_OCTRL_POLA_SHIFT (10U)
  16600. /*! POLA - PWM_A Output Polarity
  16601. * 0b0..PWM_A output not inverted. A high level on the PWM_A pin represents the "on" or "active" state.
  16602. * 0b1..PWM_A output inverted. A low level on the PWM_A pin represents the "on" or "active" state.
  16603. */
  16604. #define PWM_OCTRL_POLA(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_POLA_SHIFT)) & PWM_OCTRL_POLA_MASK)
  16605. #define PWM_OCTRL_PWMX_IN_MASK (0x2000U)
  16606. #define PWM_OCTRL_PWMX_IN_SHIFT (13U)
  16607. #define PWM_OCTRL_PWMX_IN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMX_IN_SHIFT)) & PWM_OCTRL_PWMX_IN_MASK)
  16608. #define PWM_OCTRL_PWMB_IN_MASK (0x4000U)
  16609. #define PWM_OCTRL_PWMB_IN_SHIFT (14U)
  16610. #define PWM_OCTRL_PWMB_IN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMB_IN_SHIFT)) & PWM_OCTRL_PWMB_IN_MASK)
  16611. #define PWM_OCTRL_PWMA_IN_MASK (0x8000U)
  16612. #define PWM_OCTRL_PWMA_IN_SHIFT (15U)
  16613. #define PWM_OCTRL_PWMA_IN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OCTRL_PWMA_IN_SHIFT)) & PWM_OCTRL_PWMA_IN_MASK)
  16614. /*! @} */
  16615. /* The count of PWM_OCTRL */
  16616. #define PWM_OCTRL_COUNT (4U)
  16617. /*! @name STS - Status Register */
  16618. /*! @{ */
  16619. #define PWM_STS_CMPF_MASK (0x3FU)
  16620. #define PWM_STS_CMPF_SHIFT (0U)
  16621. /*! CMPF - Compare Flags
  16622. * 0b000000..No compare event has occurred for a particular VALx value.
  16623. * 0b000001..A compare event has occurred for a particular VALx value.
  16624. */
  16625. #define PWM_STS_CMPF(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CMPF_SHIFT)) & PWM_STS_CMPF_MASK)
  16626. #define PWM_STS_CFX0_MASK (0x40U)
  16627. #define PWM_STS_CFX0_SHIFT (6U)
  16628. #define PWM_STS_CFX0(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFX0_SHIFT)) & PWM_STS_CFX0_MASK)
  16629. #define PWM_STS_CFX1_MASK (0x80U)
  16630. #define PWM_STS_CFX1_SHIFT (7U)
  16631. #define PWM_STS_CFX1(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFX1_SHIFT)) & PWM_STS_CFX1_MASK)
  16632. #define PWM_STS_CFB0_MASK (0x100U)
  16633. #define PWM_STS_CFB0_SHIFT (8U)
  16634. #define PWM_STS_CFB0(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFB0_SHIFT)) & PWM_STS_CFB0_MASK)
  16635. #define PWM_STS_CFB1_MASK (0x200U)
  16636. #define PWM_STS_CFB1_SHIFT (9U)
  16637. #define PWM_STS_CFB1(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFB1_SHIFT)) & PWM_STS_CFB1_MASK)
  16638. #define PWM_STS_CFA0_MASK (0x400U)
  16639. #define PWM_STS_CFA0_SHIFT (10U)
  16640. #define PWM_STS_CFA0(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFA0_SHIFT)) & PWM_STS_CFA0_MASK)
  16641. #define PWM_STS_CFA1_MASK (0x800U)
  16642. #define PWM_STS_CFA1_SHIFT (11U)
  16643. #define PWM_STS_CFA1(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_CFA1_SHIFT)) & PWM_STS_CFA1_MASK)
  16644. #define PWM_STS_RF_MASK (0x1000U)
  16645. #define PWM_STS_RF_SHIFT (12U)
  16646. /*! RF - Reload Flag
  16647. * 0b0..No new reload cycle since last STS[RF] clearing
  16648. * 0b1..New reload cycle since last STS[RF] clearing
  16649. */
  16650. #define PWM_STS_RF(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_RF_SHIFT)) & PWM_STS_RF_MASK)
  16651. #define PWM_STS_REF_MASK (0x2000U)
  16652. #define PWM_STS_REF_SHIFT (13U)
  16653. /*! REF - Reload Error Flag
  16654. * 0b0..No reload error occurred.
  16655. * 0b1..Reload signal occurred with non-coherent data and MCTRL0[LDOK] = 0.
  16656. */
  16657. #define PWM_STS_REF(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_REF_SHIFT)) & PWM_STS_REF_MASK)
  16658. #define PWM_STS_RUF_MASK (0x4000U)
  16659. #define PWM_STS_RUF_SHIFT (14U)
  16660. /*! RUF - Registers Updated Flag
  16661. * 0b0..No register update has occurred since last reload.
  16662. * 0b1..At least one of the double buffered registers has been updated since the last reload.
  16663. */
  16664. #define PWM_STS_RUF(x) (((uint16_t)(((uint16_t)(x)) << PWM_STS_RUF_SHIFT)) & PWM_STS_RUF_MASK)
  16665. /*! @} */
  16666. /* The count of PWM_STS */
  16667. #define PWM_STS_COUNT (4U)
  16668. /*! @name INTEN - Interrupt Enable Register */
  16669. /*! @{ */
  16670. #define PWM_INTEN_CMPIE_MASK (0x3FU)
  16671. #define PWM_INTEN_CMPIE_SHIFT (0U)
  16672. /*! CMPIE - Compare Interrupt Enables
  16673. * 0b000000..The corresponding STS[CMPF] bit will not cause an interrupt request.
  16674. * 0b000001..The corresponding STS[CMPF] bit will cause an interrupt request.
  16675. */
  16676. #define PWM_INTEN_CMPIE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CMPIE_SHIFT)) & PWM_INTEN_CMPIE_MASK)
  16677. #define PWM_INTEN_CX0IE_MASK (0x40U)
  16678. #define PWM_INTEN_CX0IE_SHIFT (6U)
  16679. /*! CX0IE - Capture X 0 Interrupt Enable
  16680. * 0b0..Interrupt request disabled for STS[CFX0].
  16681. * 0b1..Interrupt request enabled for STS[CFX0].
  16682. */
  16683. #define PWM_INTEN_CX0IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CX0IE_SHIFT)) & PWM_INTEN_CX0IE_MASK)
  16684. #define PWM_INTEN_CX1IE_MASK (0x80U)
  16685. #define PWM_INTEN_CX1IE_SHIFT (7U)
  16686. /*! CX1IE - Capture X 1 Interrupt Enable
  16687. * 0b0..Interrupt request disabled for STS[CFX1].
  16688. * 0b1..Interrupt request enabled for STS[CFX1].
  16689. */
  16690. #define PWM_INTEN_CX1IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CX1IE_SHIFT)) & PWM_INTEN_CX1IE_MASK)
  16691. #define PWM_INTEN_CB0IE_MASK (0x100U)
  16692. #define PWM_INTEN_CB0IE_SHIFT (8U)
  16693. /*! CB0IE - Capture B 0 Interrupt Enable
  16694. * 0b0..Interrupt request disabled for STS[CFB0].
  16695. * 0b1..Interrupt request enabled for STS[CFB0].
  16696. */
  16697. #define PWM_INTEN_CB0IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CB0IE_SHIFT)) & PWM_INTEN_CB0IE_MASK)
  16698. #define PWM_INTEN_CB1IE_MASK (0x200U)
  16699. #define PWM_INTEN_CB1IE_SHIFT (9U)
  16700. /*! CB1IE - Capture B 1 Interrupt Enable
  16701. * 0b0..Interrupt request disabled for STS[CFB1].
  16702. * 0b1..Interrupt request enabled for STS[CFB1].
  16703. */
  16704. #define PWM_INTEN_CB1IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CB1IE_SHIFT)) & PWM_INTEN_CB1IE_MASK)
  16705. #define PWM_INTEN_CA0IE_MASK (0x400U)
  16706. #define PWM_INTEN_CA0IE_SHIFT (10U)
  16707. /*! CA0IE - Capture A 0 Interrupt Enable
  16708. * 0b0..Interrupt request disabled for STS[CFA0].
  16709. * 0b1..Interrupt request enabled for STS[CFA0].
  16710. */
  16711. #define PWM_INTEN_CA0IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CA0IE_SHIFT)) & PWM_INTEN_CA0IE_MASK)
  16712. #define PWM_INTEN_CA1IE_MASK (0x800U)
  16713. #define PWM_INTEN_CA1IE_SHIFT (11U)
  16714. /*! CA1IE - Capture A 1 Interrupt Enable
  16715. * 0b0..Interrupt request disabled for STS[CFA1].
  16716. * 0b1..Interrupt request enabled for STS[CFA1].
  16717. */
  16718. #define PWM_INTEN_CA1IE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_CA1IE_SHIFT)) & PWM_INTEN_CA1IE_MASK)
  16719. #define PWM_INTEN_RIE_MASK (0x1000U)
  16720. #define PWM_INTEN_RIE_SHIFT (12U)
  16721. /*! RIE - Reload Interrupt Enable
  16722. * 0b0..STS[RF] CPU interrupt requests disabled
  16723. * 0b1..STS[RF] CPU interrupt requests enabled
  16724. */
  16725. #define PWM_INTEN_RIE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_RIE_SHIFT)) & PWM_INTEN_RIE_MASK)
  16726. #define PWM_INTEN_REIE_MASK (0x2000U)
  16727. #define PWM_INTEN_REIE_SHIFT (13U)
  16728. /*! REIE - Reload Error Interrupt Enable
  16729. * 0b0..STS[REF] CPU interrupt requests disabled
  16730. * 0b1..STS[REF] CPU interrupt requests enabled
  16731. */
  16732. #define PWM_INTEN_REIE(x) (((uint16_t)(((uint16_t)(x)) << PWM_INTEN_REIE_SHIFT)) & PWM_INTEN_REIE_MASK)
  16733. /*! @} */
  16734. /* The count of PWM_INTEN */
  16735. #define PWM_INTEN_COUNT (4U)
  16736. /*! @name DMAEN - DMA Enable Register */
  16737. /*! @{ */
  16738. #define PWM_DMAEN_CX0DE_MASK (0x1U)
  16739. #define PWM_DMAEN_CX0DE_SHIFT (0U)
  16740. #define PWM_DMAEN_CX0DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CX0DE_SHIFT)) & PWM_DMAEN_CX0DE_MASK)
  16741. #define PWM_DMAEN_CX1DE_MASK (0x2U)
  16742. #define PWM_DMAEN_CX1DE_SHIFT (1U)
  16743. #define PWM_DMAEN_CX1DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CX1DE_SHIFT)) & PWM_DMAEN_CX1DE_MASK)
  16744. #define PWM_DMAEN_CB0DE_MASK (0x4U)
  16745. #define PWM_DMAEN_CB0DE_SHIFT (2U)
  16746. #define PWM_DMAEN_CB0DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CB0DE_SHIFT)) & PWM_DMAEN_CB0DE_MASK)
  16747. #define PWM_DMAEN_CB1DE_MASK (0x8U)
  16748. #define PWM_DMAEN_CB1DE_SHIFT (3U)
  16749. #define PWM_DMAEN_CB1DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CB1DE_SHIFT)) & PWM_DMAEN_CB1DE_MASK)
  16750. #define PWM_DMAEN_CA0DE_MASK (0x10U)
  16751. #define PWM_DMAEN_CA0DE_SHIFT (4U)
  16752. #define PWM_DMAEN_CA0DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CA0DE_SHIFT)) & PWM_DMAEN_CA0DE_MASK)
  16753. #define PWM_DMAEN_CA1DE_MASK (0x20U)
  16754. #define PWM_DMAEN_CA1DE_SHIFT (5U)
  16755. #define PWM_DMAEN_CA1DE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CA1DE_SHIFT)) & PWM_DMAEN_CA1DE_MASK)
  16756. #define PWM_DMAEN_CAPTDE_MASK (0xC0U)
  16757. #define PWM_DMAEN_CAPTDE_SHIFT (6U)
  16758. /*! CAPTDE - Capture DMA Enable Source Select
  16759. * 0b00..Read DMA requests disabled.
  16760. * 0b01..Exceeding a FIFO watermark sets the DMA read request. This requires at least one of DMAEN[CA1DE], DMAEN[CA0DE], DMAEN[CB1DE], DMAEN[CB0DE], DMAEN[CX1DE], or DMAEN[CX0DE] to also be set in order to determine to which watermark(s) the DMA request is sensitive.
  16761. * 0b10..A local sync (VAL1 matches counter) sets the read DMA request.
  16762. * 0b11..A local reload (STS[RF] being set) sets the read DMA request.
  16763. */
  16764. #define PWM_DMAEN_CAPTDE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_CAPTDE_SHIFT)) & PWM_DMAEN_CAPTDE_MASK)
  16765. #define PWM_DMAEN_FAND_MASK (0x100U)
  16766. #define PWM_DMAEN_FAND_SHIFT (8U)
  16767. /*! FAND - FIFO Watermark AND Control
  16768. * 0b0..Selected FIFO watermarks are OR'ed together.
  16769. * 0b1..Selected FIFO watermarks are AND'ed together.
  16770. */
  16771. #define PWM_DMAEN_FAND(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_FAND_SHIFT)) & PWM_DMAEN_FAND_MASK)
  16772. #define PWM_DMAEN_VALDE_MASK (0x200U)
  16773. #define PWM_DMAEN_VALDE_SHIFT (9U)
  16774. /*! VALDE - Value Registers DMA Enable
  16775. * 0b0..DMA write requests disabled
  16776. * 0b1..DMA write requests for the VALx and FRACVALx registers enabled
  16777. */
  16778. #define PWM_DMAEN_VALDE(x) (((uint16_t)(((uint16_t)(x)) << PWM_DMAEN_VALDE_SHIFT)) & PWM_DMAEN_VALDE_MASK)
  16779. /*! @} */
  16780. /* The count of PWM_DMAEN */
  16781. #define PWM_DMAEN_COUNT (4U)
  16782. /*! @name TCTRL - Output Trigger Control Register */
  16783. /*! @{ */
  16784. #define PWM_TCTRL_OUT_TRIG_EN_MASK (0x3FU)
  16785. #define PWM_TCTRL_OUT_TRIG_EN_SHIFT (0U)
  16786. /*! OUT_TRIG_EN - Output Trigger Enables
  16787. * 0b000000..PWM_OUT_TRIGx will not set when the counter value matches the VALx value.
  16788. * 0b000001..PWM_OUT_TRIGx will set when the counter value matches the VALx value.
  16789. */
  16790. #define PWM_TCTRL_OUT_TRIG_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_TCTRL_OUT_TRIG_EN_SHIFT)) & PWM_TCTRL_OUT_TRIG_EN_MASK)
  16791. #define PWM_TCTRL_TRGFRQ_MASK (0x1000U)
  16792. #define PWM_TCTRL_TRGFRQ_SHIFT (12U)
  16793. /*! TRGFRQ - Trigger frequency
  16794. * 0b0..Trigger outputs are generated during every PWM period even if the PWM is not reloaded every period due to CTRL[LDFQ] being non-zero.
  16795. * 0b1..Trigger outputs are generated only during the final PWM period prior to a reload opportunity when the PWM is not reloaded every period due to CTRL[LDFQ] being non-zero.
  16796. */
  16797. #define PWM_TCTRL_TRGFRQ(x) (((uint16_t)(((uint16_t)(x)) << PWM_TCTRL_TRGFRQ_SHIFT)) & PWM_TCTRL_TRGFRQ_MASK)
  16798. #define PWM_TCTRL_PWBOT1_MASK (0x4000U)
  16799. #define PWM_TCTRL_PWBOT1_SHIFT (14U)
  16800. /*! PWBOT1 - Output Trigger 1 Source Select
  16801. * 0b0..Route the PWM_OUT_TRIG1 signal to PWM_OUT_TRIG1 port.
  16802. * 0b1..Route the PWM1 output to the PWM_OUT_TRIG1 port.
  16803. */
  16804. #define PWM_TCTRL_PWBOT1(x) (((uint16_t)(((uint16_t)(x)) << PWM_TCTRL_PWBOT1_SHIFT)) & PWM_TCTRL_PWBOT1_MASK)
  16805. #define PWM_TCTRL_PWAOT0_MASK (0x8000U)
  16806. #define PWM_TCTRL_PWAOT0_SHIFT (15U)
  16807. /*! PWAOT0 - Output Trigger 0 Source Select
  16808. * 0b0..Route the PWM_OUT_TRIG0 signal to PWM_OUT_TRIG0 port.
  16809. * 0b1..Route the PWM0 output to the PWM_OUT_TRIG0 port.
  16810. */
  16811. #define PWM_TCTRL_PWAOT0(x) (((uint16_t)(((uint16_t)(x)) << PWM_TCTRL_PWAOT0_SHIFT)) & PWM_TCTRL_PWAOT0_MASK)
  16812. /*! @} */
  16813. /* The count of PWM_TCTRL */
  16814. #define PWM_TCTRL_COUNT (4U)
  16815. /*! @name DISMAP - Fault Disable Mapping Register 0 */
  16816. /*! @{ */
  16817. #define PWM_DISMAP_DIS0A_MASK (0xFU)
  16818. #define PWM_DISMAP_DIS0A_SHIFT (0U)
  16819. #define PWM_DISMAP_DIS0A(x) (((uint16_t)(((uint16_t)(x)) << PWM_DISMAP_DIS0A_SHIFT)) & PWM_DISMAP_DIS0A_MASK)
  16820. #define PWM_DISMAP_DIS0B_MASK (0xF0U)
  16821. #define PWM_DISMAP_DIS0B_SHIFT (4U)
  16822. #define PWM_DISMAP_DIS0B(x) (((uint16_t)(((uint16_t)(x)) << PWM_DISMAP_DIS0B_SHIFT)) & PWM_DISMAP_DIS0B_MASK)
  16823. #define PWM_DISMAP_DIS0X_MASK (0xF00U)
  16824. #define PWM_DISMAP_DIS0X_SHIFT (8U)
  16825. #define PWM_DISMAP_DIS0X(x) (((uint16_t)(((uint16_t)(x)) << PWM_DISMAP_DIS0X_SHIFT)) & PWM_DISMAP_DIS0X_MASK)
  16826. /*! @} */
  16827. /* The count of PWM_DISMAP */
  16828. #define PWM_DISMAP_COUNT (4U)
  16829. /* The count of PWM_DISMAP */
  16830. #define PWM_DISMAP_COUNT2 (1U)
  16831. /*! @name DTCNT0 - Deadtime Count Register 0 */
  16832. /*! @{ */
  16833. #define PWM_DTCNT0_DTCNT0_MASK (0xFFFFU)
  16834. #define PWM_DTCNT0_DTCNT0_SHIFT (0U)
  16835. #define PWM_DTCNT0_DTCNT0(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTCNT0_DTCNT0_SHIFT)) & PWM_DTCNT0_DTCNT0_MASK)
  16836. /*! @} */
  16837. /* The count of PWM_DTCNT0 */
  16838. #define PWM_DTCNT0_COUNT (4U)
  16839. /*! @name DTCNT1 - Deadtime Count Register 1 */
  16840. /*! @{ */
  16841. #define PWM_DTCNT1_DTCNT1_MASK (0xFFFFU)
  16842. #define PWM_DTCNT1_DTCNT1_SHIFT (0U)
  16843. #define PWM_DTCNT1_DTCNT1(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTCNT1_DTCNT1_SHIFT)) & PWM_DTCNT1_DTCNT1_MASK)
  16844. /*! @} */
  16845. /* The count of PWM_DTCNT1 */
  16846. #define PWM_DTCNT1_COUNT (4U)
  16847. /*! @name CAPTCTRLA - Capture Control A Register */
  16848. /*! @{ */
  16849. #define PWM_CAPTCTRLA_ARMA_MASK (0x1U)
  16850. #define PWM_CAPTCTRLA_ARMA_SHIFT (0U)
  16851. /*! ARMA - Arm A
  16852. * 0b0..Input capture operation is disabled.
  16853. * 0b1..Input capture operation as specified by CAPTCTRLA[EDGAx] is enabled.
  16854. */
  16855. #define PWM_CAPTCTRLA_ARMA(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_ARMA_SHIFT)) & PWM_CAPTCTRLA_ARMA_MASK)
  16856. #define PWM_CAPTCTRLA_ONESHOTA_MASK (0x2U)
  16857. #define PWM_CAPTCTRLA_ONESHOTA_SHIFT (1U)
  16858. /*! ONESHOTA - One Shot Mode A
  16859. * 0b0..Free running mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after CAPTCTRLA[ARMA] is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and capture circuit 0 is re-armed. The process continues indefinitely. If only one of the capture circuits is enabled, then captures continue indefinitely on the enabled capture circuit.
  16860. * 0b1..One shot mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after CAPTCTRLA[ARMA] is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and CAPTCTRLA[ARMA] is cleared. No further captures will be performed until CAPTCTRLA[ARMA] is set again. If only one of the capture circuits is enabled, then a single capture will occur on the enabled capture circuit and CAPTCTRLA[ARMA] is then cleared.
  16861. */
  16862. #define PWM_CAPTCTRLA_ONESHOTA(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_ONESHOTA_SHIFT)) & PWM_CAPTCTRLA_ONESHOTA_MASK)
  16863. #define PWM_CAPTCTRLA_EDGA0_MASK (0xCU)
  16864. #define PWM_CAPTCTRLA_EDGA0_SHIFT (2U)
  16865. /*! EDGA0 - Edge A 0
  16866. * 0b00..Disabled
  16867. * 0b01..Capture falling edges
  16868. * 0b10..Capture rising edges
  16869. * 0b11..Capture any edge
  16870. */
  16871. #define PWM_CAPTCTRLA_EDGA0(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_EDGA0_SHIFT)) & PWM_CAPTCTRLA_EDGA0_MASK)
  16872. #define PWM_CAPTCTRLA_EDGA1_MASK (0x30U)
  16873. #define PWM_CAPTCTRLA_EDGA1_SHIFT (4U)
  16874. /*! EDGA1 - Edge A 1
  16875. * 0b00..Disabled
  16876. * 0b01..Capture falling edges
  16877. * 0b10..Capture rising edges
  16878. * 0b11..Capture any edge
  16879. */
  16880. #define PWM_CAPTCTRLA_EDGA1(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_EDGA1_SHIFT)) & PWM_CAPTCTRLA_EDGA1_MASK)
  16881. #define PWM_CAPTCTRLA_INP_SELA_MASK (0x40U)
  16882. #define PWM_CAPTCTRLA_INP_SELA_SHIFT (6U)
  16883. /*! INP_SELA - Input Select A
  16884. * 0b0..Raw PWM_A input signal selected as source.
  16885. * 0b1..Output of edge counter/compare selected as source. When this bitfield is set to 1, the internal edge counter is enabled and the rising and/or falling edges specified by the CAPTCTRLA[EDGA0] and CAPTCTRLA[EDGA1] fields are ignored. The software must still place a value other than 00 in either or both of the CAPTCTLRA[EDGA0] and/or CAPTCTRLA[EDGA1] fields in order to enable one or both of the capture registers.
  16886. */
  16887. #define PWM_CAPTCTRLA_INP_SELA(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_INP_SELA_SHIFT)) & PWM_CAPTCTRLA_INP_SELA_MASK)
  16888. #define PWM_CAPTCTRLA_EDGCNTA_EN_MASK (0x80U)
  16889. #define PWM_CAPTCTRLA_EDGCNTA_EN_SHIFT (7U)
  16890. /*! EDGCNTA_EN - Edge Counter A Enable
  16891. * 0b0..Edge counter disabled and held in reset
  16892. * 0b1..Edge counter enabled
  16893. */
  16894. #define PWM_CAPTCTRLA_EDGCNTA_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_EDGCNTA_EN_SHIFT)) & PWM_CAPTCTRLA_EDGCNTA_EN_MASK)
  16895. #define PWM_CAPTCTRLA_CFAWM_MASK (0x300U)
  16896. #define PWM_CAPTCTRLA_CFAWM_SHIFT (8U)
  16897. #define PWM_CAPTCTRLA_CFAWM(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_CFAWM_SHIFT)) & PWM_CAPTCTRLA_CFAWM_MASK)
  16898. #define PWM_CAPTCTRLA_CA0CNT_MASK (0x1C00U)
  16899. #define PWM_CAPTCTRLA_CA0CNT_SHIFT (10U)
  16900. #define PWM_CAPTCTRLA_CA0CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_CA0CNT_SHIFT)) & PWM_CAPTCTRLA_CA0CNT_MASK)
  16901. #define PWM_CAPTCTRLA_CA1CNT_MASK (0xE000U)
  16902. #define PWM_CAPTCTRLA_CA1CNT_SHIFT (13U)
  16903. #define PWM_CAPTCTRLA_CA1CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLA_CA1CNT_SHIFT)) & PWM_CAPTCTRLA_CA1CNT_MASK)
  16904. /*! @} */
  16905. /* The count of PWM_CAPTCTRLA */
  16906. #define PWM_CAPTCTRLA_COUNT (4U)
  16907. /*! @name CAPTCOMPA - Capture Compare A Register */
  16908. /*! @{ */
  16909. #define PWM_CAPTCOMPA_EDGCMPA_MASK (0xFFU)
  16910. #define PWM_CAPTCOMPA_EDGCMPA_SHIFT (0U)
  16911. #define PWM_CAPTCOMPA_EDGCMPA(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPA_EDGCMPA_SHIFT)) & PWM_CAPTCOMPA_EDGCMPA_MASK)
  16912. #define PWM_CAPTCOMPA_EDGCNTA_MASK (0xFF00U)
  16913. #define PWM_CAPTCOMPA_EDGCNTA_SHIFT (8U)
  16914. #define PWM_CAPTCOMPA_EDGCNTA(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPA_EDGCNTA_SHIFT)) & PWM_CAPTCOMPA_EDGCNTA_MASK)
  16915. /*! @} */
  16916. /* The count of PWM_CAPTCOMPA */
  16917. #define PWM_CAPTCOMPA_COUNT (4U)
  16918. /*! @name CAPTCTRLB - Capture Control B Register */
  16919. /*! @{ */
  16920. #define PWM_CAPTCTRLB_ARMB_MASK (0x1U)
  16921. #define PWM_CAPTCTRLB_ARMB_SHIFT (0U)
  16922. /*! ARMB - Arm B
  16923. * 0b0..Input capture operation is disabled.
  16924. * 0b1..Input capture operation as specified by CAPTCTRLB[EDGBx] is enabled.
  16925. */
  16926. #define PWM_CAPTCTRLB_ARMB(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_ARMB_SHIFT)) & PWM_CAPTCTRLB_ARMB_MASK)
  16927. #define PWM_CAPTCTRLB_ONESHOTB_MASK (0x2U)
  16928. #define PWM_CAPTCTRLB_ONESHOTB_SHIFT (1U)
  16929. /*! ONESHOTB - One Shot Mode B
  16930. * 0b0..Free running mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after CAPTCTRLB[ARMB] is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and capture circuit 0 is re-armed. The process continues indefinitely. If only one of the capture circuits is enabled, then captures continue indefinitely on the enabled capture circuit.
  16931. * 0b1..One shot mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after CAPTCTRLB[ARMB] is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and CAPTCTRLB[ARMB] is cleared. No further captures will be performed until CAPTCTRLB[ARMB] is set again. If only one of the capture circuits is enabled, then a single capture will occur on the enabled capture circuit and CAPTCTRLB[ARMB] is then cleared.
  16932. */
  16933. #define PWM_CAPTCTRLB_ONESHOTB(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_ONESHOTB_SHIFT)) & PWM_CAPTCTRLB_ONESHOTB_MASK)
  16934. #define PWM_CAPTCTRLB_EDGB0_MASK (0xCU)
  16935. #define PWM_CAPTCTRLB_EDGB0_SHIFT (2U)
  16936. /*! EDGB0 - Edge B 0
  16937. * 0b00..Disabled
  16938. * 0b01..Capture falling edges
  16939. * 0b10..Capture rising edges
  16940. * 0b11..Capture any edge
  16941. */
  16942. #define PWM_CAPTCTRLB_EDGB0(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_EDGB0_SHIFT)) & PWM_CAPTCTRLB_EDGB0_MASK)
  16943. #define PWM_CAPTCTRLB_EDGB1_MASK (0x30U)
  16944. #define PWM_CAPTCTRLB_EDGB1_SHIFT (4U)
  16945. /*! EDGB1 - Edge B 1
  16946. * 0b00..Disabled
  16947. * 0b01..Capture falling edges
  16948. * 0b10..Capture rising edges
  16949. * 0b11..Capture any edge
  16950. */
  16951. #define PWM_CAPTCTRLB_EDGB1(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_EDGB1_SHIFT)) & PWM_CAPTCTRLB_EDGB1_MASK)
  16952. #define PWM_CAPTCTRLB_INP_SELB_MASK (0x40U)
  16953. #define PWM_CAPTCTRLB_INP_SELB_SHIFT (6U)
  16954. /*! INP_SELB - Input Select B
  16955. * 0b0..Raw PWM_B input signal selected as source.
  16956. * 0b1..Output of edge counter/compare selected as source. When this bitfield is set to 1, the internal edge counter is enabled and the rising and/or falling edges specified by the CAPTCTRLB[EDGB0] and CAPTCTRLB[EDGB1] fields are ignored. The software must still place a value other than 00 in either or both of the CAPTCTLRB[EDGB0] and/or CAPTCTRLB[EDGB1] fields in order to enable one or both of the capture registers.
  16957. */
  16958. #define PWM_CAPTCTRLB_INP_SELB(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_INP_SELB_SHIFT)) & PWM_CAPTCTRLB_INP_SELB_MASK)
  16959. #define PWM_CAPTCTRLB_EDGCNTB_EN_MASK (0x80U)
  16960. #define PWM_CAPTCTRLB_EDGCNTB_EN_SHIFT (7U)
  16961. /*! EDGCNTB_EN - Edge Counter B Enable
  16962. * 0b0..Edge counter disabled and held in reset
  16963. * 0b1..Edge counter enabled
  16964. */
  16965. #define PWM_CAPTCTRLB_EDGCNTB_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_EDGCNTB_EN_SHIFT)) & PWM_CAPTCTRLB_EDGCNTB_EN_MASK)
  16966. #define PWM_CAPTCTRLB_CFBWM_MASK (0x300U)
  16967. #define PWM_CAPTCTRLB_CFBWM_SHIFT (8U)
  16968. #define PWM_CAPTCTRLB_CFBWM(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_CFBWM_SHIFT)) & PWM_CAPTCTRLB_CFBWM_MASK)
  16969. #define PWM_CAPTCTRLB_CB0CNT_MASK (0x1C00U)
  16970. #define PWM_CAPTCTRLB_CB0CNT_SHIFT (10U)
  16971. #define PWM_CAPTCTRLB_CB0CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_CB0CNT_SHIFT)) & PWM_CAPTCTRLB_CB0CNT_MASK)
  16972. #define PWM_CAPTCTRLB_CB1CNT_MASK (0xE000U)
  16973. #define PWM_CAPTCTRLB_CB1CNT_SHIFT (13U)
  16974. #define PWM_CAPTCTRLB_CB1CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLB_CB1CNT_SHIFT)) & PWM_CAPTCTRLB_CB1CNT_MASK)
  16975. /*! @} */
  16976. /* The count of PWM_CAPTCTRLB */
  16977. #define PWM_CAPTCTRLB_COUNT (4U)
  16978. /*! @name CAPTCOMPB - Capture Compare B Register */
  16979. /*! @{ */
  16980. #define PWM_CAPTCOMPB_EDGCMPB_MASK (0xFFU)
  16981. #define PWM_CAPTCOMPB_EDGCMPB_SHIFT (0U)
  16982. #define PWM_CAPTCOMPB_EDGCMPB(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPB_EDGCMPB_SHIFT)) & PWM_CAPTCOMPB_EDGCMPB_MASK)
  16983. #define PWM_CAPTCOMPB_EDGCNTB_MASK (0xFF00U)
  16984. #define PWM_CAPTCOMPB_EDGCNTB_SHIFT (8U)
  16985. #define PWM_CAPTCOMPB_EDGCNTB(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPB_EDGCNTB_SHIFT)) & PWM_CAPTCOMPB_EDGCNTB_MASK)
  16986. /*! @} */
  16987. /* The count of PWM_CAPTCOMPB */
  16988. #define PWM_CAPTCOMPB_COUNT (4U)
  16989. /*! @name CAPTCTRLX - Capture Control X Register */
  16990. /*! @{ */
  16991. #define PWM_CAPTCTRLX_ARMX_MASK (0x1U)
  16992. #define PWM_CAPTCTRLX_ARMX_SHIFT (0U)
  16993. /*! ARMX - Arm X
  16994. * 0b0..Input capture operation is disabled.
  16995. * 0b1..Input capture operation as specified by CAPTCTRLX[EDGXx] is enabled.
  16996. */
  16997. #define PWM_CAPTCTRLX_ARMX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_ARMX_SHIFT)) & PWM_CAPTCTRLX_ARMX_MASK)
  16998. #define PWM_CAPTCTRLX_ONESHOTX_MASK (0x2U)
  16999. #define PWM_CAPTCTRLX_ONESHOTX_SHIFT (1U)
  17000. /*! ONESHOTX - One Shot Mode Aux
  17001. * 0b0..Free running mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after the ARMX bit is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and capture circuit 0 is re-armed. The process continues indefinitely. If only one of the capture circuits is enabled, then captures continue indefinitely on the enabled capture circuit.
  17002. * 0b1..One shot mode is selected. If both capture circuits are enabled, then capture circuit 0 is armed first after the ARMX bit is set. Once a capture occurs, capture circuit 0 is disarmed and capture circuit 1 is armed. After capture circuit 1 performs a capture, it is disarmed and the ARMX bit is cleared. No further captures will be performed until the ARMX bit is set again. If only one of the capture circuits is enabled, then a single capture will occur on the enabled capture circuit and the ARMX bit is then cleared.
  17003. */
  17004. #define PWM_CAPTCTRLX_ONESHOTX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_ONESHOTX_SHIFT)) & PWM_CAPTCTRLX_ONESHOTX_MASK)
  17005. #define PWM_CAPTCTRLX_EDGX0_MASK (0xCU)
  17006. #define PWM_CAPTCTRLX_EDGX0_SHIFT (2U)
  17007. /*! EDGX0 - Edge X 0
  17008. * 0b00..Disabled
  17009. * 0b01..Capture falling edges
  17010. * 0b10..Capture rising edges
  17011. * 0b11..Capture any edge
  17012. */
  17013. #define PWM_CAPTCTRLX_EDGX0(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_EDGX0_SHIFT)) & PWM_CAPTCTRLX_EDGX0_MASK)
  17014. #define PWM_CAPTCTRLX_EDGX1_MASK (0x30U)
  17015. #define PWM_CAPTCTRLX_EDGX1_SHIFT (4U)
  17016. /*! EDGX1 - Edge X 1
  17017. * 0b00..Disabled
  17018. * 0b01..Capture falling edges
  17019. * 0b10..Capture rising edges
  17020. * 0b11..Capture any edge
  17021. */
  17022. #define PWM_CAPTCTRLX_EDGX1(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_EDGX1_SHIFT)) & PWM_CAPTCTRLX_EDGX1_MASK)
  17023. #define PWM_CAPTCTRLX_INP_SELX_MASK (0x40U)
  17024. #define PWM_CAPTCTRLX_INP_SELX_SHIFT (6U)
  17025. /*! INP_SELX - Input Select X
  17026. * 0b0..Raw PWM_X input signal selected as source.
  17027. * 0b1..Output of edge counter/compare selected as source. When this bitfield is set to 1, the internal edge counter is enabled and the rising and/or falling edges specified by the CAPTCTRLX[EDGX0] and CAPTCTRLX[EDGX1] fields are ignored. The software must still place a value other than 00 in either or both of the CAPTCTLRX[EDGX0] and/or CAPTCTRLX[EDGX1] fields in order to enable one or both of the capture registers.
  17028. */
  17029. #define PWM_CAPTCTRLX_INP_SELX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_INP_SELX_SHIFT)) & PWM_CAPTCTRLX_INP_SELX_MASK)
  17030. #define PWM_CAPTCTRLX_EDGCNTX_EN_MASK (0x80U)
  17031. #define PWM_CAPTCTRLX_EDGCNTX_EN_SHIFT (7U)
  17032. /*! EDGCNTX_EN - Edge Counter X Enable
  17033. * 0b0..Edge counter disabled and held in reset
  17034. * 0b1..Edge counter enabled
  17035. */
  17036. #define PWM_CAPTCTRLX_EDGCNTX_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_EDGCNTX_EN_SHIFT)) & PWM_CAPTCTRLX_EDGCNTX_EN_MASK)
  17037. #define PWM_CAPTCTRLX_CFXWM_MASK (0x300U)
  17038. #define PWM_CAPTCTRLX_CFXWM_SHIFT (8U)
  17039. #define PWM_CAPTCTRLX_CFXWM(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_CFXWM_SHIFT)) & PWM_CAPTCTRLX_CFXWM_MASK)
  17040. #define PWM_CAPTCTRLX_CX0CNT_MASK (0x1C00U)
  17041. #define PWM_CAPTCTRLX_CX0CNT_SHIFT (10U)
  17042. #define PWM_CAPTCTRLX_CX0CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_CX0CNT_SHIFT)) & PWM_CAPTCTRLX_CX0CNT_MASK)
  17043. #define PWM_CAPTCTRLX_CX1CNT_MASK (0xE000U)
  17044. #define PWM_CAPTCTRLX_CX1CNT_SHIFT (13U)
  17045. #define PWM_CAPTCTRLX_CX1CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCTRLX_CX1CNT_SHIFT)) & PWM_CAPTCTRLX_CX1CNT_MASK)
  17046. /*! @} */
  17047. /* The count of PWM_CAPTCTRLX */
  17048. #define PWM_CAPTCTRLX_COUNT (4U)
  17049. /*! @name CAPTCOMPX - Capture Compare X Register */
  17050. /*! @{ */
  17051. #define PWM_CAPTCOMPX_EDGCMPX_MASK (0xFFU)
  17052. #define PWM_CAPTCOMPX_EDGCMPX_SHIFT (0U)
  17053. #define PWM_CAPTCOMPX_EDGCMPX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPX_EDGCMPX_SHIFT)) & PWM_CAPTCOMPX_EDGCMPX_MASK)
  17054. #define PWM_CAPTCOMPX_EDGCNTX_MASK (0xFF00U)
  17055. #define PWM_CAPTCOMPX_EDGCNTX_SHIFT (8U)
  17056. #define PWM_CAPTCOMPX_EDGCNTX(x) (((uint16_t)(((uint16_t)(x)) << PWM_CAPTCOMPX_EDGCNTX_SHIFT)) & PWM_CAPTCOMPX_EDGCNTX_MASK)
  17057. /*! @} */
  17058. /* The count of PWM_CAPTCOMPX */
  17059. #define PWM_CAPTCOMPX_COUNT (4U)
  17060. /*! @name CVAL0 - Capture Value 0 Register */
  17061. /*! @{ */
  17062. #define PWM_CVAL0_CAPTVAL0_MASK (0xFFFFU)
  17063. #define PWM_CVAL0_CAPTVAL0_SHIFT (0U)
  17064. #define PWM_CVAL0_CAPTVAL0(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL0_CAPTVAL0_SHIFT)) & PWM_CVAL0_CAPTVAL0_MASK)
  17065. /*! @} */
  17066. /* The count of PWM_CVAL0 */
  17067. #define PWM_CVAL0_COUNT (4U)
  17068. /*! @name CVAL0CYC - Capture Value 0 Cycle Register */
  17069. /*! @{ */
  17070. #define PWM_CVAL0CYC_CVAL0CYC_MASK (0xFU)
  17071. #define PWM_CVAL0CYC_CVAL0CYC_SHIFT (0U)
  17072. #define PWM_CVAL0CYC_CVAL0CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL0CYC_CVAL0CYC_SHIFT)) & PWM_CVAL0CYC_CVAL0CYC_MASK)
  17073. /*! @} */
  17074. /* The count of PWM_CVAL0CYC */
  17075. #define PWM_CVAL0CYC_COUNT (4U)
  17076. /*! @name CVAL1 - Capture Value 1 Register */
  17077. /*! @{ */
  17078. #define PWM_CVAL1_CAPTVAL1_MASK (0xFFFFU)
  17079. #define PWM_CVAL1_CAPTVAL1_SHIFT (0U)
  17080. #define PWM_CVAL1_CAPTVAL1(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL1_CAPTVAL1_SHIFT)) & PWM_CVAL1_CAPTVAL1_MASK)
  17081. /*! @} */
  17082. /* The count of PWM_CVAL1 */
  17083. #define PWM_CVAL1_COUNT (4U)
  17084. /*! @name CVAL1CYC - Capture Value 1 Cycle Register */
  17085. /*! @{ */
  17086. #define PWM_CVAL1CYC_CVAL1CYC_MASK (0xFU)
  17087. #define PWM_CVAL1CYC_CVAL1CYC_SHIFT (0U)
  17088. #define PWM_CVAL1CYC_CVAL1CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL1CYC_CVAL1CYC_SHIFT)) & PWM_CVAL1CYC_CVAL1CYC_MASK)
  17089. /*! @} */
  17090. /* The count of PWM_CVAL1CYC */
  17091. #define PWM_CVAL1CYC_COUNT (4U)
  17092. /*! @name CVAL2 - Capture Value 2 Register */
  17093. /*! @{ */
  17094. #define PWM_CVAL2_CAPTVAL2_MASK (0xFFFFU)
  17095. #define PWM_CVAL2_CAPTVAL2_SHIFT (0U)
  17096. #define PWM_CVAL2_CAPTVAL2(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL2_CAPTVAL2_SHIFT)) & PWM_CVAL2_CAPTVAL2_MASK)
  17097. /*! @} */
  17098. /* The count of PWM_CVAL2 */
  17099. #define PWM_CVAL2_COUNT (4U)
  17100. /*! @name CVAL2CYC - Capture Value 2 Cycle Register */
  17101. /*! @{ */
  17102. #define PWM_CVAL2CYC_CVAL2CYC_MASK (0xFU)
  17103. #define PWM_CVAL2CYC_CVAL2CYC_SHIFT (0U)
  17104. #define PWM_CVAL2CYC_CVAL2CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL2CYC_CVAL2CYC_SHIFT)) & PWM_CVAL2CYC_CVAL2CYC_MASK)
  17105. /*! @} */
  17106. /* The count of PWM_CVAL2CYC */
  17107. #define PWM_CVAL2CYC_COUNT (4U)
  17108. /*! @name CVAL3 - Capture Value 3 Register */
  17109. /*! @{ */
  17110. #define PWM_CVAL3_CAPTVAL3_MASK (0xFFFFU)
  17111. #define PWM_CVAL3_CAPTVAL3_SHIFT (0U)
  17112. #define PWM_CVAL3_CAPTVAL3(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL3_CAPTVAL3_SHIFT)) & PWM_CVAL3_CAPTVAL3_MASK)
  17113. /*! @} */
  17114. /* The count of PWM_CVAL3 */
  17115. #define PWM_CVAL3_COUNT (4U)
  17116. /*! @name CVAL3CYC - Capture Value 3 Cycle Register */
  17117. /*! @{ */
  17118. #define PWM_CVAL3CYC_CVAL3CYC_MASK (0xFU)
  17119. #define PWM_CVAL3CYC_CVAL3CYC_SHIFT (0U)
  17120. #define PWM_CVAL3CYC_CVAL3CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL3CYC_CVAL3CYC_SHIFT)) & PWM_CVAL3CYC_CVAL3CYC_MASK)
  17121. /*! @} */
  17122. /* The count of PWM_CVAL3CYC */
  17123. #define PWM_CVAL3CYC_COUNT (4U)
  17124. /*! @name CVAL4 - Capture Value 4 Register */
  17125. /*! @{ */
  17126. #define PWM_CVAL4_CAPTVAL4_MASK (0xFFFFU)
  17127. #define PWM_CVAL4_CAPTVAL4_SHIFT (0U)
  17128. #define PWM_CVAL4_CAPTVAL4(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL4_CAPTVAL4_SHIFT)) & PWM_CVAL4_CAPTVAL4_MASK)
  17129. /*! @} */
  17130. /* The count of PWM_CVAL4 */
  17131. #define PWM_CVAL4_COUNT (4U)
  17132. /*! @name CVAL4CYC - Capture Value 4 Cycle Register */
  17133. /*! @{ */
  17134. #define PWM_CVAL4CYC_CVAL4CYC_MASK (0xFU)
  17135. #define PWM_CVAL4CYC_CVAL4CYC_SHIFT (0U)
  17136. #define PWM_CVAL4CYC_CVAL4CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL4CYC_CVAL4CYC_SHIFT)) & PWM_CVAL4CYC_CVAL4CYC_MASK)
  17137. /*! @} */
  17138. /* The count of PWM_CVAL4CYC */
  17139. #define PWM_CVAL4CYC_COUNT (4U)
  17140. /*! @name CVAL5 - Capture Value 5 Register */
  17141. /*! @{ */
  17142. #define PWM_CVAL5_CAPTVAL5_MASK (0xFFFFU)
  17143. #define PWM_CVAL5_CAPTVAL5_SHIFT (0U)
  17144. #define PWM_CVAL5_CAPTVAL5(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL5_CAPTVAL5_SHIFT)) & PWM_CVAL5_CAPTVAL5_MASK)
  17145. /*! @} */
  17146. /* The count of PWM_CVAL5 */
  17147. #define PWM_CVAL5_COUNT (4U)
  17148. /*! @name CVAL5CYC - Capture Value 5 Cycle Register */
  17149. /*! @{ */
  17150. #define PWM_CVAL5CYC_CVAL5CYC_MASK (0xFU)
  17151. #define PWM_CVAL5CYC_CVAL5CYC_SHIFT (0U)
  17152. #define PWM_CVAL5CYC_CVAL5CYC(x) (((uint16_t)(((uint16_t)(x)) << PWM_CVAL5CYC_CVAL5CYC_SHIFT)) & PWM_CVAL5CYC_CVAL5CYC_MASK)
  17153. /*! @} */
  17154. /* The count of PWM_CVAL5CYC */
  17155. #define PWM_CVAL5CYC_COUNT (4U)
  17156. /*! @name OUTEN - Output Enable Register */
  17157. /*! @{ */
  17158. #define PWM_OUTEN_PWMX_EN_MASK (0xFU)
  17159. #define PWM_OUTEN_PWMX_EN_SHIFT (0U)
  17160. /*! PWMX_EN - PWM_X Output Enables
  17161. * 0b0000..PWM_X output disabled.
  17162. * 0b0001..PWM_X output enabled.
  17163. */
  17164. #define PWM_OUTEN_PWMX_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OUTEN_PWMX_EN_SHIFT)) & PWM_OUTEN_PWMX_EN_MASK)
  17165. #define PWM_OUTEN_PWMB_EN_MASK (0xF0U)
  17166. #define PWM_OUTEN_PWMB_EN_SHIFT (4U)
  17167. /*! PWMB_EN - PWM_B Output Enables
  17168. * 0b0000..PWM_B output disabled.
  17169. * 0b0001..PWM_B output enabled.
  17170. */
  17171. #define PWM_OUTEN_PWMB_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OUTEN_PWMB_EN_SHIFT)) & PWM_OUTEN_PWMB_EN_MASK)
  17172. #define PWM_OUTEN_PWMA_EN_MASK (0xF00U)
  17173. #define PWM_OUTEN_PWMA_EN_SHIFT (8U)
  17174. /*! PWMA_EN - PWM_A Output Enables
  17175. * 0b0000..PWM_A output disabled.
  17176. * 0b0001..PWM_A output enabled.
  17177. */
  17178. #define PWM_OUTEN_PWMA_EN(x) (((uint16_t)(((uint16_t)(x)) << PWM_OUTEN_PWMA_EN_SHIFT)) & PWM_OUTEN_PWMA_EN_MASK)
  17179. /*! @} */
  17180. /*! @name MASK - Mask Register */
  17181. /*! @{ */
  17182. #define PWM_MASK_MASKX_MASK (0xFU)
  17183. #define PWM_MASK_MASKX_SHIFT (0U)
  17184. /*! MASKX - PWM_X Masks
  17185. * 0b0000..PWM_X output normal.
  17186. * 0b0001..PWM_X output masked.
  17187. */
  17188. #define PWM_MASK_MASKX(x) (((uint16_t)(((uint16_t)(x)) << PWM_MASK_MASKX_SHIFT)) & PWM_MASK_MASKX_MASK)
  17189. #define PWM_MASK_MASKB_MASK (0xF0U)
  17190. #define PWM_MASK_MASKB_SHIFT (4U)
  17191. /*! MASKB - PWM_B Masks
  17192. * 0b0000..PWM_B output normal.
  17193. * 0b0001..PWM_B output masked.
  17194. */
  17195. #define PWM_MASK_MASKB(x) (((uint16_t)(((uint16_t)(x)) << PWM_MASK_MASKB_SHIFT)) & PWM_MASK_MASKB_MASK)
  17196. #define PWM_MASK_MASKA_MASK (0xF00U)
  17197. #define PWM_MASK_MASKA_SHIFT (8U)
  17198. /*! MASKA - PWM_A Masks
  17199. * 0b0000..PWM_A output normal.
  17200. * 0b0001..PWM_A output masked.
  17201. */
  17202. #define PWM_MASK_MASKA(x) (((uint16_t)(((uint16_t)(x)) << PWM_MASK_MASKA_SHIFT)) & PWM_MASK_MASKA_MASK)
  17203. #define PWM_MASK_UPDATE_MASK_MASK (0xF000U)
  17204. #define PWM_MASK_UPDATE_MASK_SHIFT (12U)
  17205. /*! UPDATE_MASK - Update Mask Bits Immediately
  17206. * 0b0000..Normal operation. MASK* bits within the corresponding submodule are not updated until a FORCE_OUT event occurs within the submodule.
  17207. * 0b0001..Immediate operation. MASK* bits within the corresponding submodule are updated on the following clock edge after setting this bit.
  17208. */
  17209. #define PWM_MASK_UPDATE_MASK(x) (((uint16_t)(((uint16_t)(x)) << PWM_MASK_UPDATE_MASK_SHIFT)) & PWM_MASK_UPDATE_MASK_MASK)
  17210. /*! @} */
  17211. /*! @name SWCOUT - Software Controlled Output Register */
  17212. /*! @{ */
  17213. #define PWM_SWCOUT_SM0OUT45_MASK (0x1U)
  17214. #define PWM_SWCOUT_SM0OUT45_SHIFT (0U)
  17215. /*! SM0OUT45 - Submodule 0 Software Controlled Output 45
  17216. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 0 instead of PWM45.
  17217. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 0 instead of PWM45.
  17218. */
  17219. #define PWM_SWCOUT_SM0OUT45(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM0OUT45_SHIFT)) & PWM_SWCOUT_SM0OUT45_MASK)
  17220. #define PWM_SWCOUT_SM0OUT23_MASK (0x2U)
  17221. #define PWM_SWCOUT_SM0OUT23_SHIFT (1U)
  17222. /*! SM0OUT23 - Submodule 0 Software Controlled Output 23
  17223. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 0 instead of PWM23.
  17224. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 0 instead of PWM23.
  17225. */
  17226. #define PWM_SWCOUT_SM0OUT23(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM0OUT23_SHIFT)) & PWM_SWCOUT_SM0OUT23_MASK)
  17227. #define PWM_SWCOUT_SM1OUT45_MASK (0x4U)
  17228. #define PWM_SWCOUT_SM1OUT45_SHIFT (2U)
  17229. /*! SM1OUT45 - Submodule 1 Software Controlled Output 45
  17230. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 1 instead of PWM45.
  17231. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 1 instead of PWM45.
  17232. */
  17233. #define PWM_SWCOUT_SM1OUT45(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM1OUT45_SHIFT)) & PWM_SWCOUT_SM1OUT45_MASK)
  17234. #define PWM_SWCOUT_SM1OUT23_MASK (0x8U)
  17235. #define PWM_SWCOUT_SM1OUT23_SHIFT (3U)
  17236. /*! SM1OUT23 - Submodule 1 Software Controlled Output 23
  17237. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 1 instead of PWM23.
  17238. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 1 instead of PWM23.
  17239. */
  17240. #define PWM_SWCOUT_SM1OUT23(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM1OUT23_SHIFT)) & PWM_SWCOUT_SM1OUT23_MASK)
  17241. #define PWM_SWCOUT_SM2OUT45_MASK (0x10U)
  17242. #define PWM_SWCOUT_SM2OUT45_SHIFT (4U)
  17243. /*! SM2OUT45 - Submodule 2 Software Controlled Output 45
  17244. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 2 instead of PWM45.
  17245. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 2 instead of PWM45.
  17246. */
  17247. #define PWM_SWCOUT_SM2OUT45(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM2OUT45_SHIFT)) & PWM_SWCOUT_SM2OUT45_MASK)
  17248. #define PWM_SWCOUT_SM2OUT23_MASK (0x20U)
  17249. #define PWM_SWCOUT_SM2OUT23_SHIFT (5U)
  17250. /*! SM2OUT23 - Submodule 2 Software Controlled Output 23
  17251. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 2 instead of PWM23.
  17252. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 2 instead of PWM23.
  17253. */
  17254. #define PWM_SWCOUT_SM2OUT23(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM2OUT23_SHIFT)) & PWM_SWCOUT_SM2OUT23_MASK)
  17255. #define PWM_SWCOUT_SM3OUT45_MASK (0x40U)
  17256. #define PWM_SWCOUT_SM3OUT45_SHIFT (6U)
  17257. /*! SM3OUT45 - Submodule 3 Software Controlled Output 45
  17258. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 3 instead of PWM45.
  17259. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 3 instead of PWM45.
  17260. */
  17261. #define PWM_SWCOUT_SM3OUT45(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM3OUT45_SHIFT)) & PWM_SWCOUT_SM3OUT45_MASK)
  17262. #define PWM_SWCOUT_SM3OUT23_MASK (0x80U)
  17263. #define PWM_SWCOUT_SM3OUT23_SHIFT (7U)
  17264. /*! SM3OUT23 - Submodule 3 Software Controlled Output 23
  17265. * 0b0..A logic 0 is supplied to the deadtime generator of submodule 3 instead of PWM23.
  17266. * 0b1..A logic 1 is supplied to the deadtime generator of submodule 3 instead of PWM23.
  17267. */
  17268. #define PWM_SWCOUT_SM3OUT23(x) (((uint16_t)(((uint16_t)(x)) << PWM_SWCOUT_SM3OUT23_SHIFT)) & PWM_SWCOUT_SM3OUT23_MASK)
  17269. /*! @} */
  17270. /*! @name DTSRCSEL - PWM Source Select Register */
  17271. /*! @{ */
  17272. #define PWM_DTSRCSEL_SM0SEL45_MASK (0x3U)
  17273. #define PWM_DTSRCSEL_SM0SEL45_SHIFT (0U)
  17274. /*! SM0SEL45 - Submodule 0 PWM45 Control Select
  17275. * 0b00..Generated SM0PWM45 signal is used by the deadtime logic.
  17276. * 0b01..Inverted generated SM0PWM45 signal is used by the deadtime logic.
  17277. * 0b10..SWCOUT[SM0OUT45] is used by the deadtime logic.
  17278. * 0b11..PWMx_EXTB0 signal is used by the deadtime logic.
  17279. */
  17280. #define PWM_DTSRCSEL_SM0SEL45(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM0SEL45_SHIFT)) & PWM_DTSRCSEL_SM0SEL45_MASK)
  17281. #define PWM_DTSRCSEL_SM0SEL23_MASK (0xCU)
  17282. #define PWM_DTSRCSEL_SM0SEL23_SHIFT (2U)
  17283. /*! SM0SEL23 - Submodule 0 PWM23 Control Select
  17284. * 0b00..Generated SM0PWM23 signal is used by the deadtime logic.
  17285. * 0b01..Inverted generated SM0PWM23 signal is used by the deadtime logic.
  17286. * 0b10..SWCOUT[SM0OUT23] is used by the deadtime logic.
  17287. * 0b11..PWMx_EXTA0 signal is used by the deadtime logic.
  17288. */
  17289. #define PWM_DTSRCSEL_SM0SEL23(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM0SEL23_SHIFT)) & PWM_DTSRCSEL_SM0SEL23_MASK)
  17290. #define PWM_DTSRCSEL_SM1SEL45_MASK (0x30U)
  17291. #define PWM_DTSRCSEL_SM1SEL45_SHIFT (4U)
  17292. /*! SM1SEL45 - Submodule 1 PWM45 Control Select
  17293. * 0b00..Generated SM1PWM45 signal is used by the deadtime logic.
  17294. * 0b01..Inverted generated SM1PWM45 signal is used by the deadtime logic.
  17295. * 0b10..SWCOUT[SM1OUT45] is used by the deadtime logic.
  17296. * 0b11..PWMx_EXTB1 signal is used by the deadtime logic.
  17297. */
  17298. #define PWM_DTSRCSEL_SM1SEL45(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM1SEL45_SHIFT)) & PWM_DTSRCSEL_SM1SEL45_MASK)
  17299. #define PWM_DTSRCSEL_SM1SEL23_MASK (0xC0U)
  17300. #define PWM_DTSRCSEL_SM1SEL23_SHIFT (6U)
  17301. /*! SM1SEL23 - Submodule 1 PWM23 Control Select
  17302. * 0b00..Generated SM1PWM23 signal is used by the deadtime logic.
  17303. * 0b01..Inverted generated SM1PWM23 signal is used by the deadtime logic.
  17304. * 0b10..SWCOUT[SM1OUT23] is used by the deadtime logic.
  17305. * 0b11..PWMx_EXTA1 signal is used by the deadtime logic.
  17306. */
  17307. #define PWM_DTSRCSEL_SM1SEL23(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM1SEL23_SHIFT)) & PWM_DTSRCSEL_SM1SEL23_MASK)
  17308. #define PWM_DTSRCSEL_SM2SEL45_MASK (0x300U)
  17309. #define PWM_DTSRCSEL_SM2SEL45_SHIFT (8U)
  17310. /*! SM2SEL45 - Submodule 2 PWM45 Control Select
  17311. * 0b00..Generated SM2PWM45 signal is used by the deadtime logic.
  17312. * 0b01..Inverted generated SM2PWM45 signal is used by the deadtime logic.
  17313. * 0b10..SWCOUT[SM2OUT45] is used by the deadtime logic.
  17314. * 0b11..PWMx_EXTB2 signal is used by the deadtime logic.
  17315. */
  17316. #define PWM_DTSRCSEL_SM2SEL45(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM2SEL45_SHIFT)) & PWM_DTSRCSEL_SM2SEL45_MASK)
  17317. #define PWM_DTSRCSEL_SM2SEL23_MASK (0xC00U)
  17318. #define PWM_DTSRCSEL_SM2SEL23_SHIFT (10U)
  17319. /*! SM2SEL23 - Submodule 2 PWM23 Control Select
  17320. * 0b00..Generated SM2PWM23 signal is used by the deadtime logic.
  17321. * 0b01..Inverted generated SM2PWM23 signal is used by the deadtime logic.
  17322. * 0b10..SWCOUT[SM2OUT23] is used by the deadtime logic.
  17323. * 0b11..PWMx_EXTA2 signal is used by the deadtime logic.
  17324. */
  17325. #define PWM_DTSRCSEL_SM2SEL23(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM2SEL23_SHIFT)) & PWM_DTSRCSEL_SM2SEL23_MASK)
  17326. #define PWM_DTSRCSEL_SM3SEL45_MASK (0x3000U)
  17327. #define PWM_DTSRCSEL_SM3SEL45_SHIFT (12U)
  17328. /*! SM3SEL45 - Submodule 3 PWM45 Control Select
  17329. * 0b00..Generated SM3PWM45 signal is used by the deadtime logic.
  17330. * 0b01..Inverted generated SM3PWM45 signal is used by the deadtime logic.
  17331. * 0b10..SWCOUT[SM3OUT45] is used by the deadtime logic.
  17332. * 0b11..PWMx_EXTB3 signal is used by the deadtime logic.
  17333. */
  17334. #define PWM_DTSRCSEL_SM3SEL45(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM3SEL45_SHIFT)) & PWM_DTSRCSEL_SM3SEL45_MASK)
  17335. #define PWM_DTSRCSEL_SM3SEL23_MASK (0xC000U)
  17336. #define PWM_DTSRCSEL_SM3SEL23_SHIFT (14U)
  17337. /*! SM3SEL23 - Submodule 3 PWM23 Control Select
  17338. * 0b00..Generated SM3PWM23 signal is used by the deadtime logic.
  17339. * 0b01..Inverted generated SM3PWM23 signal is used by the deadtime logic.
  17340. * 0b10..SWCOUT[SM3OUT23] is used by the deadtime logic.
  17341. * 0b11..PWMx_EXTA3 signal is used by the deadtime logic.
  17342. */
  17343. #define PWM_DTSRCSEL_SM3SEL23(x) (((uint16_t)(((uint16_t)(x)) << PWM_DTSRCSEL_SM3SEL23_SHIFT)) & PWM_DTSRCSEL_SM3SEL23_MASK)
  17344. /*! @} */
  17345. /*! @name MCTRL - Master Control Register 0 */
  17346. /*! @{ */
  17347. #define PWM_MCTRL_LDOK_MASK (0xFU)
  17348. #define PWM_MCTRL_LDOK_SHIFT (0U)
  17349. /*! LDOK - Load Okay
  17350. * 0b0000..Do not load new values.
  17351. * 0b0001..Load prescaler, modulus, and PWM values of the corresponding submodule.
  17352. */
  17353. #define PWM_MCTRL_LDOK(x) (((uint16_t)(((uint16_t)(x)) << PWM_MCTRL_LDOK_SHIFT)) & PWM_MCTRL_LDOK_MASK)
  17354. #define PWM_MCTRL_CLDOK_MASK (0xF0U)
  17355. #define PWM_MCTRL_CLDOK_SHIFT (4U)
  17356. #define PWM_MCTRL_CLDOK(x) (((uint16_t)(((uint16_t)(x)) << PWM_MCTRL_CLDOK_SHIFT)) & PWM_MCTRL_CLDOK_MASK)
  17357. #define PWM_MCTRL_RUN_MASK (0xF00U)
  17358. #define PWM_MCTRL_RUN_SHIFT (8U)
  17359. /*! RUN - Run
  17360. * 0b0000..PWM generator is disabled in the corresponding submodule.
  17361. * 0b0001..PWM generator is enabled in the corresponding submodule.
  17362. */
  17363. #define PWM_MCTRL_RUN(x) (((uint16_t)(((uint16_t)(x)) << PWM_MCTRL_RUN_SHIFT)) & PWM_MCTRL_RUN_MASK)
  17364. #define PWM_MCTRL_IPOL_MASK (0xF000U)
  17365. #define PWM_MCTRL_IPOL_SHIFT (12U)
  17366. /*! IPOL - Current Polarity
  17367. * 0b0000..PWM23 is used to generate complementary PWM pair in the corresponding submodule.
  17368. * 0b0001..PWM45 is used to generate complementary PWM pair in the corresponding submodule.
  17369. */
  17370. #define PWM_MCTRL_IPOL(x) (((uint16_t)(((uint16_t)(x)) << PWM_MCTRL_IPOL_SHIFT)) & PWM_MCTRL_IPOL_MASK)
  17371. /*! @} */
  17372. /*! @name MCTRL2 - Master Control Register 1 */
  17373. /*! @{ */
  17374. #define PWM_MCTRL2_MONPLL_MASK (0x3U)
  17375. #define PWM_MCTRL2_MONPLL_SHIFT (0U)
  17376. /*! MONPLL - Monitor PLL State
  17377. * 0b00..Not locked. Do not monitor PLL operation. Resetting of the fractional delay block in case of PLL losing lock will be controlled by software.
  17378. * 0b01..Not locked. Monitor PLL operation to automatically disable the fractional delay block when the PLL encounters problems.
  17379. * 0b10..Locked. Do not monitor PLL operation. Resetting of the fractional delay block in case of PLL losing lock will be controlled by software. These bits are write protected until the next reset.
  17380. * 0b11..Locked. Monitor PLL operation to automatically disable the fractional delay block when the PLL encounters problems. These bits are write protected until the next reset.
  17381. */
  17382. #define PWM_MCTRL2_MONPLL(x) (((uint16_t)(((uint16_t)(x)) << PWM_MCTRL2_MONPLL_SHIFT)) & PWM_MCTRL2_MONPLL_MASK)
  17383. /*! @} */
  17384. /*! @name FCTRL - Fault Control Register */
  17385. /*! @{ */
  17386. #define PWM_FCTRL_FIE_MASK (0xFU)
  17387. #define PWM_FCTRL_FIE_SHIFT (0U)
  17388. /*! FIE - Fault Interrupt Enables
  17389. * 0b0000..FAULTx CPU interrupt requests disabled.
  17390. * 0b0001..FAULTx CPU interrupt requests enabled.
  17391. */
  17392. #define PWM_FCTRL_FIE(x) (((uint16_t)(((uint16_t)(x)) << PWM_FCTRL_FIE_SHIFT)) & PWM_FCTRL_FIE_MASK)
  17393. #define PWM_FCTRL_FSAFE_MASK (0xF0U)
  17394. #define PWM_FCTRL_FSAFE_SHIFT (4U)
  17395. /*! FSAFE - Fault Safety Mode
  17396. * 0b0000..Normal mode. PWM outputs disabled by this fault are not enabled until FSTS[FFLAGx] is clear at the start of a half cycle or full cycle depending on the state of FSTS[FFULL] without regard to the state of FSTS[FFPINx]. The PWM outputs disabled by this fault input will not be re-enabled until the actual FAULTx input signal de-asserts since the fault input will combinationally disable the PWM outputs (as programmed in DISMAPn).
  17397. * 0b0001..Safe mode. PWM outputs disabled by this fault are not enabled until FSTS[FFLAGx] is clear and FSTS[FFPINx] is clear at the start of a half cycle or full cycle depending on the state of FSTS[FFULL].
  17398. */
  17399. #define PWM_FCTRL_FSAFE(x) (((uint16_t)(((uint16_t)(x)) << PWM_FCTRL_FSAFE_SHIFT)) & PWM_FCTRL_FSAFE_MASK)
  17400. #define PWM_FCTRL_FAUTO_MASK (0xF00U)
  17401. #define PWM_FCTRL_FAUTO_SHIFT (8U)
  17402. /*! FAUTO - Automatic Fault Clearing
  17403. * 0b0000..Manual fault clearing. PWM outputs disabled by this fault are not enabled until FSTS[FFLAGx] is clear at the start of a half cycle or full cycle depending the state of FSTS[FFULL]. This is further controlled by FCTRL[FSAFE].
  17404. * 0b0001..Automatic fault clearing. PWM outputs disabled by this fault are enabled when FSTS[FFPINx] is clear at the start of a half cycle or full cycle depending on the state of FSTS[FFULL] without regard to the state of FSTS[FFLAGx].
  17405. */
  17406. #define PWM_FCTRL_FAUTO(x) (((uint16_t)(((uint16_t)(x)) << PWM_FCTRL_FAUTO_SHIFT)) & PWM_FCTRL_FAUTO_MASK)
  17407. #define PWM_FCTRL_FLVL_MASK (0xF000U)
  17408. #define PWM_FCTRL_FLVL_SHIFT (12U)
  17409. /*! FLVL - Fault Level
  17410. * 0b0000..A logic 0 on the fault input indicates a fault condition.
  17411. * 0b0001..A logic 1 on the fault input indicates a fault condition.
  17412. */
  17413. #define PWM_FCTRL_FLVL(x) (((uint16_t)(((uint16_t)(x)) << PWM_FCTRL_FLVL_SHIFT)) & PWM_FCTRL_FLVL_MASK)
  17414. /*! @} */
  17415. /*! @name FSTS - Fault Status Register */
  17416. /*! @{ */
  17417. #define PWM_FSTS_FFLAG_MASK (0xFU)
  17418. #define PWM_FSTS_FFLAG_SHIFT (0U)
  17419. /*! FFLAG - Fault Flags
  17420. * 0b0000..No fault on the FAULTx pin.
  17421. * 0b0001..Fault on the FAULTx pin.
  17422. */
  17423. #define PWM_FSTS_FFLAG(x) (((uint16_t)(((uint16_t)(x)) << PWM_FSTS_FFLAG_SHIFT)) & PWM_FSTS_FFLAG_MASK)
  17424. #define PWM_FSTS_FFULL_MASK (0xF0U)
  17425. #define PWM_FSTS_FFULL_SHIFT (4U)
  17426. /*! FFULL - Full Cycle
  17427. * 0b0000..PWM outputs are not re-enabled at the start of a full cycle
  17428. * 0b0001..PWM outputs are re-enabled at the start of a full cycle
  17429. */
  17430. #define PWM_FSTS_FFULL(x) (((uint16_t)(((uint16_t)(x)) << PWM_FSTS_FFULL_SHIFT)) & PWM_FSTS_FFULL_MASK)
  17431. #define PWM_FSTS_FFPIN_MASK (0xF00U)
  17432. #define PWM_FSTS_FFPIN_SHIFT (8U)
  17433. #define PWM_FSTS_FFPIN(x) (((uint16_t)(((uint16_t)(x)) << PWM_FSTS_FFPIN_SHIFT)) & PWM_FSTS_FFPIN_MASK)
  17434. #define PWM_FSTS_FHALF_MASK (0xF000U)
  17435. #define PWM_FSTS_FHALF_SHIFT (12U)
  17436. /*! FHALF - Half Cycle Fault Recovery
  17437. * 0b0000..PWM outputs are not re-enabled at the start of a half cycle.
  17438. * 0b0001..PWM outputs are re-enabled at the start of a half cycle (as defined by VAL0).
  17439. */
  17440. #define PWM_FSTS_FHALF(x) (((uint16_t)(((uint16_t)(x)) << PWM_FSTS_FHALF_SHIFT)) & PWM_FSTS_FHALF_MASK)
  17441. /*! @} */
  17442. /*! @name FFILT - Fault Filter Register */
  17443. /*! @{ */
  17444. #define PWM_FFILT_FILT_PER_MASK (0xFFU)
  17445. #define PWM_FFILT_FILT_PER_SHIFT (0U)
  17446. #define PWM_FFILT_FILT_PER(x) (((uint16_t)(((uint16_t)(x)) << PWM_FFILT_FILT_PER_SHIFT)) & PWM_FFILT_FILT_PER_MASK)
  17447. #define PWM_FFILT_FILT_CNT_MASK (0x700U)
  17448. #define PWM_FFILT_FILT_CNT_SHIFT (8U)
  17449. #define PWM_FFILT_FILT_CNT(x) (((uint16_t)(((uint16_t)(x)) << PWM_FFILT_FILT_CNT_SHIFT)) & PWM_FFILT_FILT_CNT_MASK)
  17450. #define PWM_FFILT_GSTR_MASK (0x8000U)
  17451. #define PWM_FFILT_GSTR_SHIFT (15U)
  17452. /*! GSTR - Fault Glitch Stretch Enable
  17453. * 0b0..Fault input glitch stretching is disabled.
  17454. * 0b1..Input fault signals will be stretched to at least 2 IPBus clock cycles.
  17455. */
  17456. #define PWM_FFILT_GSTR(x) (((uint16_t)(((uint16_t)(x)) << PWM_FFILT_GSTR_SHIFT)) & PWM_FFILT_GSTR_MASK)
  17457. /*! @} */
  17458. /*! @name FTST - Fault Test Register */
  17459. /*! @{ */
  17460. #define PWM_FTST_FTEST_MASK (0x1U)
  17461. #define PWM_FTST_FTEST_SHIFT (0U)
  17462. /*! FTEST - Fault Test
  17463. * 0b0..No fault
  17464. * 0b1..Cause a simulated fault
  17465. */
  17466. #define PWM_FTST_FTEST(x) (((uint16_t)(((uint16_t)(x)) << PWM_FTST_FTEST_SHIFT)) & PWM_FTST_FTEST_MASK)
  17467. /*! @} */
  17468. /*! @name FCTRL2 - Fault Control 2 Register */
  17469. /*! @{ */
  17470. #define PWM_FCTRL2_NOCOMB_MASK (0xFU)
  17471. #define PWM_FCTRL2_NOCOMB_SHIFT (0U)
  17472. /*! NOCOMB - No Combinational Path From Fault Input To PWM Output
  17473. * 0b0000..There is a combinational link from the fault inputs to the PWM outputs. The fault inputs are combined with the filtered and latched fault signals to disable the PWM outputs.
  17474. * 0b0001..The direct combinational path from the fault inputs to the PWM outputs is disabled and the filtered and latched fault signals are used to disable the PWM outputs.
  17475. */
  17476. #define PWM_FCTRL2_NOCOMB(x) (((uint16_t)(((uint16_t)(x)) << PWM_FCTRL2_NOCOMB_SHIFT)) & PWM_FCTRL2_NOCOMB_MASK)
  17477. /*! @} */
  17478. /*!
  17479. * @}
  17480. */ /* end of group PWM_Register_Masks */
  17481. /* PWM - Peripheral instance base addresses */
  17482. /** Peripheral PWM0 base address */
  17483. #define PWM0_BASE (0x40033000u)
  17484. /** Peripheral PWM0 base pointer */
  17485. #define PWM0 ((PWM_Type *)PWM0_BASE)
  17486. /** Peripheral PWM1 base address */
  17487. #define PWM1_BASE (0x400B3000u)
  17488. /** Peripheral PWM1 base pointer */
  17489. #define PWM1 ((PWM_Type *)PWM1_BASE)
  17490. /** Array initializer of PWM peripheral base addresses */
  17491. #define PWM_BASE_ADDRS { PWM0_BASE, PWM1_BASE }
  17492. /** Array initializer of PWM peripheral base pointers */
  17493. #define PWM_BASE_PTRS { PWM0, PWM1 }
  17494. /** Interrupt vectors for the PWM peripheral type */
  17495. #define PWM_CMP_IRQS { { PWM0_CMP0_IRQn, PWM0_CMP1_IRQn, PWM0_CMP2_IRQn, PWM0_CMP3_IRQn }, { PWM1_CMP0_IRQn, PWM1_CMP1_IRQn, PWM1_CMP2_IRQn, PWM1_CMP3_IRQn } }
  17496. #define PWM_RELOAD_IRQS { { PWM0_RELOAD0_IRQn, PWM0_RELOAD1_IRQn, PWM0_RELOAD2_IRQn, PWM0_RELOAD3_IRQn }, { PWM1_RELOAD0_IRQn, PWM1_RELOAD1_IRQn, PWM1_RELOAD2_IRQn, PWM1_RELOAD3_IRQn } }
  17497. #define PWM_CAP_IRQS { PWM0_CAP_IRQn, PWM1_CAP_IRQn }
  17498. #define PWM_RERR_IRQS { PWM0_RERR_IRQn, PWM1_RERR_IRQn }
  17499. #define PWM_FAULT_IRQS { PWM0_FAULT_IRQn, PWM1_FAULT_IRQn }
  17500. /*!
  17501. * @}
  17502. */ /* end of group PWM_Peripheral_Access_Layer */
  17503. /* ----------------------------------------------------------------------------
  17504. -- RCM Peripheral Access Layer
  17505. ---------------------------------------------------------------------------- */
  17506. /*!
  17507. * @addtogroup RCM_Peripheral_Access_Layer RCM Peripheral Access Layer
  17508. * @{
  17509. */
  17510. /** RCM - Register Layout Typedef */
  17511. typedef struct {
  17512. __I uint8_t SRS0; /**< System Reset Status Register 0, offset: 0x0 */
  17513. __I uint8_t SRS1; /**< System Reset Status Register 1, offset: 0x1 */
  17514. uint8_t RESERVED_0[2];
  17515. __IO uint8_t RPFC; /**< Reset Pin Filter Control register, offset: 0x4 */
  17516. __IO uint8_t RPFW; /**< Reset Pin Filter Width register, offset: 0x5 */
  17517. uint8_t RESERVED_1[2];
  17518. __IO uint8_t SSRS0; /**< Sticky System Reset Status Register 0, offset: 0x8 */
  17519. __IO uint8_t SSRS1; /**< Sticky System Reset Status Register 1, offset: 0x9 */
  17520. } RCM_Type;
  17521. /* ----------------------------------------------------------------------------
  17522. -- RCM Register Masks
  17523. ---------------------------------------------------------------------------- */
  17524. /*!
  17525. * @addtogroup RCM_Register_Masks RCM Register Masks
  17526. * @{
  17527. */
  17528. /*! @name SRS0 - System Reset Status Register 0 */
  17529. /*! @{ */
  17530. #define RCM_SRS0_WAKEUP_MASK (0x1U)
  17531. #define RCM_SRS0_WAKEUP_SHIFT (0U)
  17532. /*! WAKEUP - Low Leakage Wakeup Reset
  17533. * 0b0..Reset not caused by LLWU module wakeup source
  17534. * 0b1..Reset caused by LLWU module wakeup source
  17535. */
  17536. #define RCM_SRS0_WAKEUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WAKEUP_SHIFT)) & RCM_SRS0_WAKEUP_MASK)
  17537. #define RCM_SRS0_LVD_MASK (0x2U)
  17538. #define RCM_SRS0_LVD_SHIFT (1U)
  17539. /*! LVD - Low-Voltage Detect Reset
  17540. * 0b0..Reset not caused by LVD trip or POR
  17541. * 0b1..Reset caused by LVD trip or POR
  17542. */
  17543. #define RCM_SRS0_LVD(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LVD_SHIFT)) & RCM_SRS0_LVD_MASK)
  17544. #define RCM_SRS0_LOC_MASK (0x4U)
  17545. #define RCM_SRS0_LOC_SHIFT (2U)
  17546. /*! LOC - Loss-of-Clock Reset
  17547. * 0b0..Reset not caused by a loss of external clock.
  17548. * 0b1..Reset caused by a loss of external clock.
  17549. */
  17550. #define RCM_SRS0_LOC(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOC_SHIFT)) & RCM_SRS0_LOC_MASK)
  17551. #define RCM_SRS0_LOL_MASK (0x8U)
  17552. #define RCM_SRS0_LOL_SHIFT (3U)
  17553. /*! LOL - Loss-of-Lock Reset
  17554. * 0b0..Reset not caused by a loss of lock in the PLL
  17555. * 0b1..Reset caused by a loss of lock in the PLL
  17556. */
  17557. #define RCM_SRS0_LOL(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOL_SHIFT)) & RCM_SRS0_LOL_MASK)
  17558. #define RCM_SRS0_WDOG_MASK (0x20U)
  17559. #define RCM_SRS0_WDOG_SHIFT (5U)
  17560. /*! WDOG - Watchdog
  17561. * 0b0..Reset not caused by watchdog timeout
  17562. * 0b1..Reset caused by watchdog timeout
  17563. */
  17564. #define RCM_SRS0_WDOG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WDOG_SHIFT)) & RCM_SRS0_WDOG_MASK)
  17565. #define RCM_SRS0_PIN_MASK (0x40U)
  17566. #define RCM_SRS0_PIN_SHIFT (6U)
  17567. /*! PIN - External Reset Pin
  17568. * 0b0..Reset not caused by external reset pin
  17569. * 0b1..Reset caused by external reset pin
  17570. */
  17571. #define RCM_SRS0_PIN(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_PIN_SHIFT)) & RCM_SRS0_PIN_MASK)
  17572. #define RCM_SRS0_POR_MASK (0x80U)
  17573. #define RCM_SRS0_POR_SHIFT (7U)
  17574. /*! POR - Power-On Reset
  17575. * 0b0..Reset not caused by POR
  17576. * 0b1..Reset caused by POR
  17577. */
  17578. #define RCM_SRS0_POR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_POR_SHIFT)) & RCM_SRS0_POR_MASK)
  17579. /*! @} */
  17580. /*! @name SRS1 - System Reset Status Register 1 */
  17581. /*! @{ */
  17582. #define RCM_SRS1_JTAG_MASK (0x1U)
  17583. #define RCM_SRS1_JTAG_SHIFT (0U)
  17584. /*! JTAG - JTAG Generated Reset
  17585. * 0b0..Reset not caused by JTAG
  17586. * 0b1..Reset caused by JTAG
  17587. */
  17588. #define RCM_SRS1_JTAG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_JTAG_SHIFT)) & RCM_SRS1_JTAG_MASK)
  17589. #define RCM_SRS1_LOCKUP_MASK (0x2U)
  17590. #define RCM_SRS1_LOCKUP_SHIFT (1U)
  17591. /*! LOCKUP - Core Lockup
  17592. * 0b0..Reset not caused by core LOCKUP event
  17593. * 0b1..Reset caused by core LOCKUP event
  17594. */
  17595. #define RCM_SRS1_LOCKUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_LOCKUP_SHIFT)) & RCM_SRS1_LOCKUP_MASK)
  17596. #define RCM_SRS1_SW_MASK (0x4U)
  17597. #define RCM_SRS1_SW_SHIFT (2U)
  17598. /*! SW - Software
  17599. * 0b0..Reset not caused by software setting of SYSRESETREQ bit
  17600. * 0b1..Reset caused by software setting of SYSRESETREQ bit
  17601. */
  17602. #define RCM_SRS1_SW(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SW_SHIFT)) & RCM_SRS1_SW_MASK)
  17603. #define RCM_SRS1_MDM_AP_MASK (0x8U)
  17604. #define RCM_SRS1_MDM_AP_SHIFT (3U)
  17605. /*! MDM_AP - MDM-AP System Reset Request
  17606. * 0b0..Reset not caused by host debugger system setting of the System Reset Request bit
  17607. * 0b1..Reset caused by host debugger system setting of the System Reset Request bit
  17608. */
  17609. #define RCM_SRS1_MDM_AP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_MDM_AP_SHIFT)) & RCM_SRS1_MDM_AP_MASK)
  17610. #define RCM_SRS1_SACKERR_MASK (0x20U)
  17611. #define RCM_SRS1_SACKERR_SHIFT (5U)
  17612. /*! SACKERR - Stop Mode Acknowledge Error Reset
  17613. * 0b0..Reset not caused by peripheral failure to acknowledge attempt to enter stop mode
  17614. * 0b1..Reset caused by peripheral failure to acknowledge attempt to enter stop mode
  17615. */
  17616. #define RCM_SRS1_SACKERR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SACKERR_SHIFT)) & RCM_SRS1_SACKERR_MASK)
  17617. /*! @} */
  17618. /*! @name RPFC - Reset Pin Filter Control register */
  17619. /*! @{ */
  17620. #define RCM_RPFC_RSTFLTSRW_MASK (0x3U)
  17621. #define RCM_RPFC_RSTFLTSRW_SHIFT (0U)
  17622. /*! RSTFLTSRW - Reset Pin Filter Select in Run and Wait Modes
  17623. * 0b00..All filtering disabled
  17624. * 0b01..Bus clock filter enabled for normal operation
  17625. * 0b10..LPO clock filter enabled for normal operation
  17626. * 0b11..Reserved
  17627. */
  17628. #define RCM_RPFC_RSTFLTSRW(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSRW_SHIFT)) & RCM_RPFC_RSTFLTSRW_MASK)
  17629. #define RCM_RPFC_RSTFLTSS_MASK (0x4U)
  17630. #define RCM_RPFC_RSTFLTSS_SHIFT (2U)
  17631. /*! RSTFLTSS - Reset Pin Filter Select in Stop Mode
  17632. * 0b0..All filtering disabled
  17633. * 0b1..LPO clock filter enabled
  17634. */
  17635. #define RCM_RPFC_RSTFLTSS(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSS_SHIFT)) & RCM_RPFC_RSTFLTSS_MASK)
  17636. /*! @} */
  17637. /*! @name RPFW - Reset Pin Filter Width register */
  17638. /*! @{ */
  17639. #define RCM_RPFW_RSTFLTSEL_MASK (0x1FU)
  17640. #define RCM_RPFW_RSTFLTSEL_SHIFT (0U)
  17641. /*! RSTFLTSEL - Reset Pin Filter Bus Clock Select
  17642. * 0b00000..Bus clock filter count is 1
  17643. * 0b00001..Bus clock filter count is 2
  17644. * 0b00010..Bus clock filter count is 3
  17645. * 0b00011..Bus clock filter count is 4
  17646. * 0b00100..Bus clock filter count is 5
  17647. * 0b00101..Bus clock filter count is 6
  17648. * 0b00110..Bus clock filter count is 7
  17649. * 0b00111..Bus clock filter count is 8
  17650. * 0b01000..Bus clock filter count is 9
  17651. * 0b01001..Bus clock filter count is 10
  17652. * 0b01010..Bus clock filter count is 11
  17653. * 0b01011..Bus clock filter count is 12
  17654. * 0b01100..Bus clock filter count is 13
  17655. * 0b01101..Bus clock filter count is 14
  17656. * 0b01110..Bus clock filter count is 15
  17657. * 0b01111..Bus clock filter count is 16
  17658. * 0b10000..Bus clock filter count is 17
  17659. * 0b10001..Bus clock filter count is 18
  17660. * 0b10010..Bus clock filter count is 19
  17661. * 0b10011..Bus clock filter count is 20
  17662. * 0b10100..Bus clock filter count is 21
  17663. * 0b10101..Bus clock filter count is 22
  17664. * 0b10110..Bus clock filter count is 23
  17665. * 0b10111..Bus clock filter count is 24
  17666. * 0b11000..Bus clock filter count is 25
  17667. * 0b11001..Bus clock filter count is 26
  17668. * 0b11010..Bus clock filter count is 27
  17669. * 0b11011..Bus clock filter count is 28
  17670. * 0b11100..Bus clock filter count is 29
  17671. * 0b11101..Bus clock filter count is 30
  17672. * 0b11110..Bus clock filter count is 31
  17673. * 0b11111..Bus clock filter count is 32
  17674. */
  17675. #define RCM_RPFW_RSTFLTSEL(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFW_RSTFLTSEL_SHIFT)) & RCM_RPFW_RSTFLTSEL_MASK)
  17676. /*! @} */
  17677. /*! @name SSRS0 - Sticky System Reset Status Register 0 */
  17678. /*! @{ */
  17679. #define RCM_SSRS0_SWAKEUP_MASK (0x1U)
  17680. #define RCM_SSRS0_SWAKEUP_SHIFT (0U)
  17681. /*! SWAKEUP - Sticky Low Leakage Wakeup Reset
  17682. * 0b0..Reset not caused by LLWU module wakeup source
  17683. * 0b1..Reset caused by LLWU module wakeup source
  17684. */
  17685. #define RCM_SSRS0_SWAKEUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SWAKEUP_SHIFT)) & RCM_SSRS0_SWAKEUP_MASK)
  17686. #define RCM_SSRS0_SLVD_MASK (0x2U)
  17687. #define RCM_SSRS0_SLVD_SHIFT (1U)
  17688. /*! SLVD - Sticky Low-Voltage Detect Reset
  17689. * 0b0..Reset not caused by LVD trip or POR
  17690. * 0b1..Reset caused by LVD trip or POR
  17691. */
  17692. #define RCM_SSRS0_SLVD(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLVD_SHIFT)) & RCM_SSRS0_SLVD_MASK)
  17693. #define RCM_SSRS0_SLOC_MASK (0x4U)
  17694. #define RCM_SSRS0_SLOC_SHIFT (2U)
  17695. /*! SLOC - Sticky Loss-of-Clock Reset
  17696. * 0b0..Reset not caused by a loss of external clock.
  17697. * 0b1..Reset caused by a loss of external clock.
  17698. */
  17699. #define RCM_SSRS0_SLOC(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLOC_SHIFT)) & RCM_SSRS0_SLOC_MASK)
  17700. #define RCM_SSRS0_SLOL_MASK (0x8U)
  17701. #define RCM_SSRS0_SLOL_SHIFT (3U)
  17702. /*! SLOL - Sticky Loss-of-Lock Reset
  17703. * 0b0..Reset not caused by a loss of lock in the PLL
  17704. * 0b1..Reset caused by a loss of lock in the PLL
  17705. */
  17706. #define RCM_SSRS0_SLOL(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLOL_SHIFT)) & RCM_SSRS0_SLOL_MASK)
  17707. #define RCM_SSRS0_SWDOG_MASK (0x20U)
  17708. #define RCM_SSRS0_SWDOG_SHIFT (5U)
  17709. /*! SWDOG - Sticky Watchdog
  17710. * 0b0..Reset not caused by watchdog timeout
  17711. * 0b1..Reset caused by watchdog timeout
  17712. */
  17713. #define RCM_SSRS0_SWDOG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SWDOG_SHIFT)) & RCM_SSRS0_SWDOG_MASK)
  17714. #define RCM_SSRS0_SPIN_MASK (0x40U)
  17715. #define RCM_SSRS0_SPIN_SHIFT (6U)
  17716. /*! SPIN - Sticky External Reset Pin
  17717. * 0b0..Reset not caused by external reset pin
  17718. * 0b1..Reset caused by external reset pin
  17719. */
  17720. #define RCM_SSRS0_SPIN(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SPIN_SHIFT)) & RCM_SSRS0_SPIN_MASK)
  17721. #define RCM_SSRS0_SPOR_MASK (0x80U)
  17722. #define RCM_SSRS0_SPOR_SHIFT (7U)
  17723. /*! SPOR - Sticky Power-On Reset
  17724. * 0b0..Reset not caused by POR
  17725. * 0b1..Reset caused by POR
  17726. */
  17727. #define RCM_SSRS0_SPOR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SPOR_SHIFT)) & RCM_SSRS0_SPOR_MASK)
  17728. /*! @} */
  17729. /*! @name SSRS1 - Sticky System Reset Status Register 1 */
  17730. /*! @{ */
  17731. #define RCM_SSRS1_SJTAG_MASK (0x1U)
  17732. #define RCM_SSRS1_SJTAG_SHIFT (0U)
  17733. /*! SJTAG - Sticky JTAG Generated Reset
  17734. * 0b0..Reset not caused by JTAG
  17735. * 0b1..Reset caused by JTAG
  17736. */
  17737. #define RCM_SSRS1_SJTAG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SJTAG_SHIFT)) & RCM_SSRS1_SJTAG_MASK)
  17738. #define RCM_SSRS1_SLOCKUP_MASK (0x2U)
  17739. #define RCM_SSRS1_SLOCKUP_SHIFT (1U)
  17740. /*! SLOCKUP - Sticky Core Lockup
  17741. * 0b0..Reset not caused by core LOCKUP event
  17742. * 0b1..Reset caused by core LOCKUP event
  17743. */
  17744. #define RCM_SSRS1_SLOCKUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SLOCKUP_SHIFT)) & RCM_SSRS1_SLOCKUP_MASK)
  17745. #define RCM_SSRS1_SSW_MASK (0x4U)
  17746. #define RCM_SSRS1_SSW_SHIFT (2U)
  17747. /*! SSW - Sticky Software
  17748. * 0b0..Reset not caused by software setting of SYSRESETREQ bit
  17749. * 0b1..Reset caused by software setting of SYSRESETREQ bit
  17750. */
  17751. #define RCM_SSRS1_SSW(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SSW_SHIFT)) & RCM_SSRS1_SSW_MASK)
  17752. #define RCM_SSRS1_SMDM_AP_MASK (0x8U)
  17753. #define RCM_SSRS1_SMDM_AP_SHIFT (3U)
  17754. /*! SMDM_AP - Sticky MDM-AP System Reset Request
  17755. * 0b0..Reset not caused by host debugger system setting of the System Reset Request bit
  17756. * 0b1..Reset caused by host debugger system setting of the System Reset Request bit
  17757. */
  17758. #define RCM_SSRS1_SMDM_AP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SMDM_AP_SHIFT)) & RCM_SSRS1_SMDM_AP_MASK)
  17759. #define RCM_SSRS1_SSACKERR_MASK (0x20U)
  17760. #define RCM_SSRS1_SSACKERR_SHIFT (5U)
  17761. /*! SSACKERR - Sticky Stop Mode Acknowledge Error Reset
  17762. * 0b0..Reset not caused by peripheral failure to acknowledge attempt to enter stop mode
  17763. * 0b1..Reset caused by peripheral failure to acknowledge attempt to enter stop mode
  17764. */
  17765. #define RCM_SSRS1_SSACKERR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SSACKERR_SHIFT)) & RCM_SSRS1_SSACKERR_MASK)
  17766. /*! @} */
  17767. /*!
  17768. * @}
  17769. */ /* end of group RCM_Register_Masks */
  17770. /* RCM - Peripheral instance base addresses */
  17771. /** Peripheral RCM base address */
  17772. #define RCM_BASE (0x4007F000u)
  17773. /** Peripheral RCM base pointer */
  17774. #define RCM ((RCM_Type *)RCM_BASE)
  17775. /** Array initializer of RCM peripheral base addresses */
  17776. #define RCM_BASE_ADDRS { RCM_BASE }
  17777. /** Array initializer of RCM peripheral base pointers */
  17778. #define RCM_BASE_PTRS { RCM }
  17779. /*!
  17780. * @}
  17781. */ /* end of group RCM_Peripheral_Access_Layer */
  17782. /* ----------------------------------------------------------------------------
  17783. -- RFSYS Peripheral Access Layer
  17784. ---------------------------------------------------------------------------- */
  17785. /*!
  17786. * @addtogroup RFSYS_Peripheral_Access_Layer RFSYS Peripheral Access Layer
  17787. * @{
  17788. */
  17789. /** RFSYS - Register Layout Typedef */
  17790. typedef struct {
  17791. __IO uint32_t REG[8]; /**< Register file register, array offset: 0x0, array step: 0x4 */
  17792. } RFSYS_Type;
  17793. /* ----------------------------------------------------------------------------
  17794. -- RFSYS Register Masks
  17795. ---------------------------------------------------------------------------- */
  17796. /*!
  17797. * @addtogroup RFSYS_Register_Masks RFSYS Register Masks
  17798. * @{
  17799. */
  17800. /*! @name REG - Register file register */
  17801. /*! @{ */
  17802. #define RFSYS_REG_LL_MASK (0xFFU)
  17803. #define RFSYS_REG_LL_SHIFT (0U)
  17804. #define RFSYS_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LL_SHIFT)) & RFSYS_REG_LL_MASK)
  17805. #define RFSYS_REG_LH_MASK (0xFF00U)
  17806. #define RFSYS_REG_LH_SHIFT (8U)
  17807. #define RFSYS_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LH_SHIFT)) & RFSYS_REG_LH_MASK)
  17808. #define RFSYS_REG_HL_MASK (0xFF0000U)
  17809. #define RFSYS_REG_HL_SHIFT (16U)
  17810. #define RFSYS_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HL_SHIFT)) & RFSYS_REG_HL_MASK)
  17811. #define RFSYS_REG_HH_MASK (0xFF000000U)
  17812. #define RFSYS_REG_HH_SHIFT (24U)
  17813. #define RFSYS_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HH_SHIFT)) & RFSYS_REG_HH_MASK)
  17814. /*! @} */
  17815. /* The count of RFSYS_REG */
  17816. #define RFSYS_REG_COUNT (8U)
  17817. /*!
  17818. * @}
  17819. */ /* end of group RFSYS_Register_Masks */
  17820. /* RFSYS - Peripheral instance base addresses */
  17821. /** Peripheral RFSYS base address */
  17822. #define RFSYS_BASE (0x40041000u)
  17823. /** Peripheral RFSYS base pointer */
  17824. #define RFSYS ((RFSYS_Type *)RFSYS_BASE)
  17825. /** Array initializer of RFSYS peripheral base addresses */
  17826. #define RFSYS_BASE_ADDRS { RFSYS_BASE }
  17827. /** Array initializer of RFSYS peripheral base pointers */
  17828. #define RFSYS_BASE_PTRS { RFSYS }
  17829. /*!
  17830. * @}
  17831. */ /* end of group RFSYS_Peripheral_Access_Layer */
  17832. /* ----------------------------------------------------------------------------
  17833. -- RFVBAT Peripheral Access Layer
  17834. ---------------------------------------------------------------------------- */
  17835. /*!
  17836. * @addtogroup RFVBAT_Peripheral_Access_Layer RFVBAT Peripheral Access Layer
  17837. * @{
  17838. */
  17839. /** RFVBAT - Register Layout Typedef */
  17840. typedef struct {
  17841. __IO uint32_t REG[8]; /**< VBAT register file register, array offset: 0x0, array step: 0x4 */
  17842. } RFVBAT_Type;
  17843. /* ----------------------------------------------------------------------------
  17844. -- RFVBAT Register Masks
  17845. ---------------------------------------------------------------------------- */
  17846. /*!
  17847. * @addtogroup RFVBAT_Register_Masks RFVBAT Register Masks
  17848. * @{
  17849. */
  17850. /*! @name REG - VBAT register file register */
  17851. /*! @{ */
  17852. #define RFVBAT_REG_LL_MASK (0xFFU)
  17853. #define RFVBAT_REG_LL_SHIFT (0U)
  17854. #define RFVBAT_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LL_SHIFT)) & RFVBAT_REG_LL_MASK)
  17855. #define RFVBAT_REG_LH_MASK (0xFF00U)
  17856. #define RFVBAT_REG_LH_SHIFT (8U)
  17857. #define RFVBAT_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LH_SHIFT)) & RFVBAT_REG_LH_MASK)
  17858. #define RFVBAT_REG_HL_MASK (0xFF0000U)
  17859. #define RFVBAT_REG_HL_SHIFT (16U)
  17860. #define RFVBAT_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HL_SHIFT)) & RFVBAT_REG_HL_MASK)
  17861. #define RFVBAT_REG_HH_MASK (0xFF000000U)
  17862. #define RFVBAT_REG_HH_SHIFT (24U)
  17863. #define RFVBAT_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HH_SHIFT)) & RFVBAT_REG_HH_MASK)
  17864. /*! @} */
  17865. /* The count of RFVBAT_REG */
  17866. #define RFVBAT_REG_COUNT (8U)
  17867. /*!
  17868. * @}
  17869. */ /* end of group RFVBAT_Register_Masks */
  17870. /* RFVBAT - Peripheral instance base addresses */
  17871. /** Peripheral RFVBAT base address */
  17872. #define RFVBAT_BASE (0x4003E000u)
  17873. /** Peripheral RFVBAT base pointer */
  17874. #define RFVBAT ((RFVBAT_Type *)RFVBAT_BASE)
  17875. /** Array initializer of RFVBAT peripheral base addresses */
  17876. #define RFVBAT_BASE_ADDRS { RFVBAT_BASE }
  17877. /** Array initializer of RFVBAT peripheral base pointers */
  17878. #define RFVBAT_BASE_PTRS { RFVBAT }
  17879. /*!
  17880. * @}
  17881. */ /* end of group RFVBAT_Peripheral_Access_Layer */
  17882. /* ----------------------------------------------------------------------------
  17883. -- SIM Peripheral Access Layer
  17884. ---------------------------------------------------------------------------- */
  17885. /*!
  17886. * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer
  17887. * @{
  17888. */
  17889. /** SIM - Register Layout Typedef */
  17890. typedef struct {
  17891. __IO uint32_t SOPT1; /**< System Options Register 1, offset: 0x0 */
  17892. uint8_t RESERVED_0[4096];
  17893. __IO uint32_t SOPT2; /**< System Options Register 2, offset: 0x1004 */
  17894. uint8_t RESERVED_1[4];
  17895. __IO uint32_t SOPT4; /**< System Options Register 4, offset: 0x100C */
  17896. __IO uint32_t SOPT5; /**< System Options Register 5, offset: 0x1010 */
  17897. uint8_t RESERVED_2[4];
  17898. __IO uint32_t SOPT7; /**< System Options Register 7, offset: 0x1018 */
  17899. __IO uint32_t SOPT8; /**< System Options Register 8, offset: 0x101C */
  17900. __IO uint32_t SOPT9; /**< System Options Register 9, offset: 0x1020 */
  17901. __I uint32_t SDID; /**< System Device Identification Register, offset: 0x1024 */
  17902. __IO uint32_t SCGC1; /**< System Clock Gating Control Register 1, offset: 0x1028 */
  17903. __IO uint32_t SCGC2; /**< System Clock Gating Control Register 2, offset: 0x102C */
  17904. __IO uint32_t SCGC3; /**< System Clock Gating Control Register 3, offset: 0x1030 */
  17905. __IO uint32_t SCGC4; /**< System Clock Gating Control Register 4, offset: 0x1034 */
  17906. __IO uint32_t SCGC5; /**< System Clock Gating Control Register 5, offset: 0x1038 */
  17907. __IO uint32_t SCGC6; /**< System Clock Gating Control Register 6, offset: 0x103C */
  17908. __IO uint32_t SCGC7; /**< System Clock Gating Control Register 7, offset: 0x1040 */
  17909. __IO uint32_t CLKDIV1; /**< System Clock Divider Register 1, offset: 0x1044 */
  17910. uint8_t RESERVED_3[4];
  17911. __IO uint32_t FCFG1; /**< Flash Configuration Register 1, offset: 0x104C */
  17912. __I uint32_t FCFG2; /**< Flash Configuration Register 2, offset: 0x1050 */
  17913. __I uint32_t UIDH; /**< Unique Identification Register High, offset: 0x1054 */
  17914. __I uint32_t UIDMH; /**< Unique Identification Register Mid-High, offset: 0x1058 */
  17915. __I uint32_t UIDML; /**< Unique Identification Register Mid Low, offset: 0x105C */
  17916. __I uint32_t UIDL; /**< Unique Identification Register Low, offset: 0x1060 */
  17917. uint8_t RESERVED_4[4];
  17918. __IO uint32_t CLKDIV4; /**< System Clock Divider Register 4, offset: 0x1068 */
  17919. __IO uint32_t MISCTRL0; /**< Miscellaneous Control Register 0, offset: 0x106C */
  17920. __IO uint32_t MISCTRL1; /**< Miscellaneous Control Register 1, offset: 0x1070 */
  17921. uint8_t RESERVED_5[140];
  17922. __IO uint32_t WDOGC; /**< WDOG Control Register, offset: 0x1100 */
  17923. __IO uint32_t PWRC; /**< Power Control Register, offset: 0x1104 */
  17924. __IO uint32_t ADCOPT; /**< ADC Additional Option Register, offset: 0x1108 */
  17925. } SIM_Type;
  17926. /* ----------------------------------------------------------------------------
  17927. -- SIM Register Masks
  17928. ---------------------------------------------------------------------------- */
  17929. /*!
  17930. * @addtogroup SIM_Register_Masks SIM Register Masks
  17931. * @{
  17932. */
  17933. /*! @name SOPT1 - System Options Register 1 */
  17934. /*! @{ */
  17935. #define SIM_SOPT1_RAMSIZE_MASK (0xF000U)
  17936. #define SIM_SOPT1_RAMSIZE_SHIFT (12U)
  17937. /*! RAMSIZE - RAM size
  17938. * 0b0001..Reserved
  17939. * 0b0011..Reserved
  17940. * 0b0100..Reserved
  17941. * 0b0101..Reserved
  17942. * 0b0110..Reserved
  17943. * 0b0111..Reserved
  17944. * 0b1000..Reserved
  17945. * 0b1001..128 KB
  17946. * 0b1011..256 KB
  17947. */
  17948. #define SIM_SOPT1_RAMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_RAMSIZE_SHIFT)) & SIM_SOPT1_RAMSIZE_MASK)
  17949. #define SIM_SOPT1_OSC32KSEL_MASK (0xC0000U)
  17950. #define SIM_SOPT1_OSC32KSEL_SHIFT (18U)
  17951. /*! OSC32KSEL - 32K oscillator clock select
  17952. * 0b00..System oscillator (OSC32KCLK)
  17953. * 0b01..Reserved
  17954. * 0b10..Reserved
  17955. * 0b11..LPO 1 kHz
  17956. */
  17957. #define SIM_SOPT1_OSC32KSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_OSC32KSEL_SHIFT)) & SIM_SOPT1_OSC32KSEL_MASK)
  17958. /*! @} */
  17959. /*! @name SOPT2 - System Options Register 2 */
  17960. /*! @{ */
  17961. #define SIM_SOPT2_CLKOUTSEL_MASK (0xE0U)
  17962. #define SIM_SOPT2_CLKOUTSEL_SHIFT (5U)
  17963. /*! CLKOUTSEL - CLKOUT select
  17964. * 0b000..FlexBus CLKOUT
  17965. * 0b001..Reserved
  17966. * 0b010..Flash clock
  17967. * 0b011..LPO clock (1 kHz)
  17968. * 0b100..MCGIRCLK
  17969. * 0b101..OSCERCLK_UNDIV
  17970. * 0b110..OSCERCLK
  17971. * 0b111..Reserved
  17972. */
  17973. #define SIM_SOPT2_CLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_CLKOUTSEL_SHIFT)) & SIM_SOPT2_CLKOUTSEL_MASK)
  17974. #define SIM_SOPT2_FBSL_MASK (0x300U)
  17975. #define SIM_SOPT2_FBSL_SHIFT (8U)
  17976. /*! FBSL - FlexBus security level
  17977. * 0b00..All off-chip accesses (instruction and data) via the FlexBus are disallowed.
  17978. * 0b01..All off-chip accesses (instruction and data) via the FlexBus are disallowed.
  17979. * 0b10..Off-chip instruction accesses are disallowed. Data accesses are allowed.
  17980. * 0b11..Off-chip instruction accesses and data accesses are allowed.
  17981. */
  17982. #define SIM_SOPT2_FBSL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_FBSL_SHIFT)) & SIM_SOPT2_FBSL_MASK)
  17983. #define SIM_SOPT2_TRACECLKSEL_MASK (0x1000U)
  17984. #define SIM_SOPT2_TRACECLKSEL_SHIFT (12U)
  17985. /*! TRACECLKSEL - Debug trace clock select
  17986. * 0b0..MCGOUTCLK
  17987. * 0b1..Core/system clock
  17988. */
  17989. #define SIM_SOPT2_TRACECLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_TRACECLKSEL_SHIFT)) & SIM_SOPT2_TRACECLKSEL_MASK)
  17990. #define SIM_SOPT2_PLLFLLSEL_MASK (0x30000U)
  17991. #define SIM_SOPT2_PLLFLLSEL_SHIFT (16U)
  17992. /*! PLLFLLSEL - PLL/FLL clock select
  17993. * 0b00..MCGFLLCLK clock
  17994. * 0b01..MCGPLLCLK clock
  17995. * 0b10..Reserved
  17996. * 0b11..Reserved
  17997. */
  17998. #define SIM_SOPT2_PLLFLLSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_PLLFLLSEL_SHIFT)) & SIM_SOPT2_PLLFLLSEL_MASK)
  17999. #define SIM_SOPT2_RMIISRC_MASK (0x80000U)
  18000. #define SIM_SOPT2_RMIISRC_SHIFT (19U)
  18001. /*! RMIISRC - RMII clock source select
  18002. * 0b0..EXTAL clock
  18003. * 0b1..External bypass clock (ENET_1588_CLKIN).
  18004. */
  18005. #define SIM_SOPT2_RMIISRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_RMIISRC_SHIFT)) & SIM_SOPT2_RMIISRC_MASK)
  18006. #define SIM_SOPT2_TIMESRC_MASK (0x300000U)
  18007. #define SIM_SOPT2_TIMESRC_SHIFT (20U)
  18008. /*! TIMESRC - IEEE 1588 timestamp clock source select
  18009. * 0b00..Core/system clock
  18010. * 0b01..MCGFLLCLK , or MCGPLLCLK as selected by SOPT2[PLLFLLSEL].
  18011. * 0b10..OSCERCLK clock
  18012. * 0b11..External bypass clock (ENET_1588_CLKIN)
  18013. */
  18014. #define SIM_SOPT2_TIMESRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_TIMESRC_SHIFT)) & SIM_SOPT2_TIMESRC_MASK)
  18015. /*! @} */
  18016. /*! @name SOPT4 - System Options Register 4 */
  18017. /*! @{ */
  18018. #define SIM_SOPT4_FTM0FLT0_MASK (0x1U)
  18019. #define SIM_SOPT4_FTM0FLT0_SHIFT (0U)
  18020. /*! FTM0FLT0 - FTM0 Fault 0 Select
  18021. * 0b0..FTM0_FLT0 pin
  18022. * 0b1..CMP0 out
  18023. */
  18024. #define SIM_SOPT4_FTM0FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT0_SHIFT)) & SIM_SOPT4_FTM0FLT0_MASK)
  18025. #define SIM_SOPT4_FTM0FLT1_MASK (0x2U)
  18026. #define SIM_SOPT4_FTM0FLT1_SHIFT (1U)
  18027. /*! FTM0FLT1 - FTM0 Fault 1 Select
  18028. * 0b0..FTM0_FLT1 pin
  18029. * 0b1..CMP1 out
  18030. */
  18031. #define SIM_SOPT4_FTM0FLT1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT1_SHIFT)) & SIM_SOPT4_FTM0FLT1_MASK)
  18032. #define SIM_SOPT4_FTM0FLT2_MASK (0x4U)
  18033. #define SIM_SOPT4_FTM0FLT2_SHIFT (2U)
  18034. /*! FTM0FLT2 - FTM0 Fault 2 Select
  18035. * 0b0..FTM0_FLT2 pin
  18036. * 0b1..CMP2 out
  18037. */
  18038. #define SIM_SOPT4_FTM0FLT2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT2_SHIFT)) & SIM_SOPT4_FTM0FLT2_MASK)
  18039. #define SIM_SOPT4_FTM0FLT3_MASK (0x8U)
  18040. #define SIM_SOPT4_FTM0FLT3_SHIFT (3U)
  18041. /*! FTM0FLT3
  18042. * 0b0..FTM0_FLT3 pin
  18043. * 0b1..XBARA output 49
  18044. */
  18045. #define SIM_SOPT4_FTM0FLT3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT3_SHIFT)) & SIM_SOPT4_FTM0FLT3_MASK)
  18046. #define SIM_SOPT4_FTM1FLT0_MASK (0x10U)
  18047. #define SIM_SOPT4_FTM1FLT0_SHIFT (4U)
  18048. /*! FTM1FLT0 - FTM1 Fault 0 Select
  18049. * 0b0..FTM1_FLT0 pin
  18050. * 0b1..CMP0 out
  18051. */
  18052. #define SIM_SOPT4_FTM1FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1FLT0_SHIFT)) & SIM_SOPT4_FTM1FLT0_MASK)
  18053. #define SIM_SOPT4_FTM2FLT0_MASK (0x100U)
  18054. #define SIM_SOPT4_FTM2FLT0_SHIFT (8U)
  18055. /*! FTM2FLT0 - FTM2 Fault 0 Select
  18056. * 0b0..FTM2_FLT0 pin
  18057. * 0b1..CMP0 out
  18058. */
  18059. #define SIM_SOPT4_FTM2FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2FLT0_SHIFT)) & SIM_SOPT4_FTM2FLT0_MASK)
  18060. #define SIM_SOPT4_FTM3FLT0_MASK (0x1000U)
  18061. #define SIM_SOPT4_FTM3FLT0_SHIFT (12U)
  18062. /*! FTM3FLT0 - FTM3 Fault 0 Select
  18063. * 0b0..FTM3_FLT0 pin
  18064. * 0b1..CMP0 out
  18065. */
  18066. #define SIM_SOPT4_FTM3FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3FLT0_SHIFT)) & SIM_SOPT4_FTM3FLT0_MASK)
  18067. #define SIM_SOPT4_FTM0TRG0SRC_MASK (0x10000U)
  18068. #define SIM_SOPT4_FTM0TRG0SRC_SHIFT (16U)
  18069. /*! FTM0TRG0SRC - FlexTimer 0 Hardware Trigger 0 Source Select
  18070. * 0b0..CMP0 output drives FTM0 hardware trigger 0
  18071. * 0b1..FTM1 channel match drives FTM0 hardware trigger 0
  18072. */
  18073. #define SIM_SOPT4_FTM0TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG0SRC_SHIFT)) & SIM_SOPT4_FTM0TRG0SRC_MASK)
  18074. #define SIM_SOPT4_FTM0TRG1SRC_MASK (0x20000U)
  18075. #define SIM_SOPT4_FTM0TRG1SRC_SHIFT (17U)
  18076. /*! FTM0TRG1SRC - FlexTimer 0 Hardware Trigger 1 Source Select
  18077. * 0b0..PDB0 channel 1 output trigger drives FTM0 hardware trigger 1
  18078. * 0b1..FTM1 channel match drives FTM0 hardware trigger 1
  18079. */
  18080. #define SIM_SOPT4_FTM0TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG1SRC_SHIFT)) & SIM_SOPT4_FTM0TRG1SRC_MASK)
  18081. #define SIM_SOPT4_FTM0TRG2SRC_MASK (0x40000U)
  18082. #define SIM_SOPT4_FTM0TRG2SRC_SHIFT (18U)
  18083. /*! FTM0TRG2SRC - FlexTimer 0 Hardware Trigger 2 Source Select
  18084. * 0b0..FTM0_FLT0 pin drives FTM0 hardware trigger 2
  18085. * 0b1..XBARA output 34 drives FTM0 hardware trigger 2
  18086. */
  18087. #define SIM_SOPT4_FTM0TRG2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG2SRC_SHIFT)) & SIM_SOPT4_FTM0TRG2SRC_MASK)
  18088. #define SIM_SOPT4_FTM1TRG0SRC_MASK (0x100000U)
  18089. #define SIM_SOPT4_FTM1TRG0SRC_SHIFT (20U)
  18090. /*! FTM1TRG0SRC - FlexTimer 1 Hardware Trigger 0 Source Select
  18091. * 0b0..CMP0 output drives FTM1 hardware trigger 0
  18092. * 0b1..FTM0 channel match drives FTM1 hardware trigger 0
  18093. */
  18094. #define SIM_SOPT4_FTM1TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1TRG0SRC_SHIFT)) & SIM_SOPT4_FTM1TRG0SRC_MASK)
  18095. #define SIM_SOPT4_FTM1TRG2SRC_MASK (0x400000U)
  18096. #define SIM_SOPT4_FTM1TRG2SRC_SHIFT (22U)
  18097. /*! FTM1TRG2SRC - FlexTimer 1 Hardware Trigger 2 Source Select
  18098. * 0b0..FTM1_FLT0 pin drives FTM1 hardware trigger 2
  18099. * 0b1..XBARA output 35 drives FTM1 hardware trigger 2
  18100. */
  18101. #define SIM_SOPT4_FTM1TRG2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1TRG2SRC_SHIFT)) & SIM_SOPT4_FTM1TRG2SRC_MASK)
  18102. #define SIM_SOPT4_FTM2TRG0SRC_MASK (0x1000000U)
  18103. #define SIM_SOPT4_FTM2TRG0SRC_SHIFT (24U)
  18104. /*! FTM2TRG0SRC - FlexTimer 2 Hardware Trigger 0 Source Select
  18105. * 0b0..CMP0 output drives FTM2 hardware trigger 0
  18106. * 0b1..FTM0 channel match drives FTM2 hardware trigger 0
  18107. */
  18108. #define SIM_SOPT4_FTM2TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2TRG0SRC_SHIFT)) & SIM_SOPT4_FTM2TRG0SRC_MASK)
  18109. #define SIM_SOPT4_FTM2TRG2SRC_MASK (0x4000000U)
  18110. #define SIM_SOPT4_FTM2TRG2SRC_SHIFT (26U)
  18111. /*! FTM2TRG2SRC - FlexTimer 2 Hardware Trigger 2 Source Select
  18112. * 0b0..FTM2_FLT0 pin drives FTM2 hardware trigger 2
  18113. * 0b1..XBARA output 36 drives FTM2 hardware trigger 2
  18114. */
  18115. #define SIM_SOPT4_FTM2TRG2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2TRG2SRC_SHIFT)) & SIM_SOPT4_FTM2TRG2SRC_MASK)
  18116. #define SIM_SOPT4_FTM3TRG0SRC_MASK (0x10000000U)
  18117. #define SIM_SOPT4_FTM3TRG0SRC_SHIFT (28U)
  18118. /*! FTM3TRG0SRC - FlexTimer 3 Hardware Trigger 0 Source Select
  18119. * 0b0..CMP0 output drives FTM3 hardware trigger 0
  18120. * 0b1..FTM1 channel match drives FTM3 hardware trigger 0
  18121. */
  18122. #define SIM_SOPT4_FTM3TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG0SRC_SHIFT)) & SIM_SOPT4_FTM3TRG0SRC_MASK)
  18123. #define SIM_SOPT4_FTM3TRG1SRC_MASK (0x20000000U)
  18124. #define SIM_SOPT4_FTM3TRG1SRC_SHIFT (29U)
  18125. /*! FTM3TRG1SRC - FlexTimer 3 Hardware Trigger 1 Source Select
  18126. * 0b0..PDB1 channel 1 output trigger drives FTM3 hardware trigger 1
  18127. * 0b1..FTM1 channel match drives FTM3 hardware trigger 1
  18128. */
  18129. #define SIM_SOPT4_FTM3TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG1SRC_SHIFT)) & SIM_SOPT4_FTM3TRG1SRC_MASK)
  18130. #define SIM_SOPT4_FTM3TRG2SRC_MASK (0x40000000U)
  18131. #define SIM_SOPT4_FTM3TRG2SRC_SHIFT (30U)
  18132. /*! FTM3TRG2SRC - FlexTimer 3 Hardware Trigger 2 Source Select
  18133. * 0b0..FTM3_FLT0 pin drives FTM3 hardware trigger 2
  18134. * 0b1..XBARA output 37 drives FTM3 hardware trigger 2
  18135. */
  18136. #define SIM_SOPT4_FTM3TRG2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG2SRC_SHIFT)) & SIM_SOPT4_FTM3TRG2SRC_MASK)
  18137. /*! @} */
  18138. /*! @name SOPT5 - System Options Register 5 */
  18139. /*! @{ */
  18140. #define SIM_SOPT5_UART0TXSRC_MASK (0x3U)
  18141. #define SIM_SOPT5_UART0TXSRC_SHIFT (0U)
  18142. /*! UART0TXSRC - UART 0 transmit data source select
  18143. * 0b00..UART0_TX pin
  18144. * 0b01..UART0_TX pin modulated with FTM1 channel 0 output
  18145. * 0b10..UART0_TX pin modulated with FTM2 channel 0 output
  18146. * 0b11..Reserved
  18147. */
  18148. #define SIM_SOPT5_UART0TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART0TXSRC_SHIFT)) & SIM_SOPT5_UART0TXSRC_MASK)
  18149. #define SIM_SOPT5_UART0RXSRC_MASK (0xCU)
  18150. #define SIM_SOPT5_UART0RXSRC_SHIFT (2U)
  18151. /*! UART0RXSRC - UART 0 receive data source select
  18152. * 0b00..UART0_RX pin
  18153. * 0b01..CMP0
  18154. * 0b10..CMP1
  18155. * 0b11..Reserved
  18156. */
  18157. #define SIM_SOPT5_UART0RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART0RXSRC_SHIFT)) & SIM_SOPT5_UART0RXSRC_MASK)
  18158. #define SIM_SOPT5_UART1TXSRC_MASK (0x30U)
  18159. #define SIM_SOPT5_UART1TXSRC_SHIFT (4U)
  18160. /*! UART1TXSRC - UART 1 transmit data source select
  18161. * 0b00..UART1_TX pin
  18162. * 0b01..UART1_TX pin modulated with FTM1 channel 0 output
  18163. * 0b10..UART1_TX pin modulated with FTM2 channel 0 output
  18164. * 0b11..Reserved
  18165. */
  18166. #define SIM_SOPT5_UART1TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART1TXSRC_SHIFT)) & SIM_SOPT5_UART1TXSRC_MASK)
  18167. #define SIM_SOPT5_UART1RXSRC_MASK (0xC0U)
  18168. #define SIM_SOPT5_UART1RXSRC_SHIFT (6U)
  18169. /*! UART1RXSRC - UART 1 receive data source select
  18170. * 0b00..UART1_RX pin
  18171. * 0b01..CMP0
  18172. * 0b10..CMP1
  18173. * 0b11..Reserved
  18174. */
  18175. #define SIM_SOPT5_UART1RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART1RXSRC_SHIFT)) & SIM_SOPT5_UART1RXSRC_MASK)
  18176. /*! @} */
  18177. /*! @name SOPT7 - System Options Register 7 */
  18178. /*! @{ */
  18179. #define SIM_SOPT7_HSADC0ATRGSEL_MASK (0xFU)
  18180. #define SIM_SOPT7_HSADC0ATRGSEL_SHIFT (0U)
  18181. /*! HSADC0ATRGSEL - HSADC0A trigger select
  18182. * 0b0000..PDB external trigger pin input (PDB0_EXTRG)
  18183. * 0b0001..High speed comparator 0 output
  18184. * 0b0010..High speed comparator 1 output
  18185. * 0b0011..High speed comparator 2 output
  18186. * 0b0100..PIT trigger 0
  18187. * 0b0101..PIT trigger 1
  18188. * 0b0110..PIT trigger 2
  18189. * 0b0111..PIT trigger 3
  18190. * 0b1000..FTM0 trigger
  18191. * 0b1001..FTM1 trigger
  18192. * 0b1010..FTM2 trigger
  18193. * 0b1011..FTM3 trigger
  18194. * 0b1100..XBARA output 38
  18195. * 0b1101..Reserved
  18196. * 0b1110..Low-power timer trigger
  18197. * 0b1111..Reserved
  18198. */
  18199. #define SIM_SOPT7_HSADC0ATRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC0ATRGSEL_SHIFT)) & SIM_SOPT7_HSADC0ATRGSEL_MASK)
  18200. #define SIM_SOPT7_HSADC0AALTTRGEN_MASK (0xC0U)
  18201. #define SIM_SOPT7_HSADC0AALTTRGEN_SHIFT (6U)
  18202. /*! HSADC0AALTTRGEN - HSADC0A alternate trigger enable
  18203. * 0b00..XBARA output 12.
  18204. * 0b01..PDB0 channel0 trigger selected for HSADC0A.
  18205. */
  18206. #define SIM_SOPT7_HSADC0AALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC0AALTTRGEN_SHIFT)) & SIM_SOPT7_HSADC0AALTTRGEN_MASK)
  18207. #define SIM_SOPT7_HSADC0BTRGSEL_MASK (0xF00U)
  18208. #define SIM_SOPT7_HSADC0BTRGSEL_SHIFT (8U)
  18209. /*! HSADC0BTRGSEL - HSADC0B trigger select
  18210. * 0b0000..Reserved
  18211. * 0b0001..High speed comparator 0 output
  18212. * 0b0010..High speed comparator 1 output
  18213. * 0b0011..High speed comparator 2 output
  18214. * 0b0100..PIT trigger 0
  18215. * 0b0101..PIT trigger 1
  18216. * 0b0110..PIT trigger 2
  18217. * 0b0111..PIT trigger 3
  18218. * 0b1000..FTM0 trigger
  18219. * 0b1001..FTM1 trigger
  18220. * 0b1010..FTM2 trigger
  18221. * 0b1011..FTM3 trigger
  18222. * 0b1100..XBARA output 41
  18223. * 0b1101..Reserved
  18224. * 0b1110..Low-power timer trigger
  18225. * 0b1111..Reserved
  18226. */
  18227. #define SIM_SOPT7_HSADC0BTRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC0BTRGSEL_SHIFT)) & SIM_SOPT7_HSADC0BTRGSEL_MASK)
  18228. #define SIM_SOPT7_HSADC0BALTTRGEN_MASK (0xC000U)
  18229. #define SIM_SOPT7_HSADC0BALTTRGEN_SHIFT (14U)
  18230. /*! HSADC0BALTTRGEN - HSADC0B alternate trigger enable
  18231. * 0b00..XBARA output 13.
  18232. * 0b01..PDB1 channel0 trigger selected for HSADC0B
  18233. */
  18234. #define SIM_SOPT7_HSADC0BALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC0BALTTRGEN_SHIFT)) & SIM_SOPT7_HSADC0BALTTRGEN_MASK)
  18235. #define SIM_SOPT7_HSADC1ATRGSEL_MASK (0xF0000U)
  18236. #define SIM_SOPT7_HSADC1ATRGSEL_SHIFT (16U)
  18237. /*! HSADC1ATRGSEL - HSADC1A trigger select
  18238. * 0b0000..Reserved
  18239. * 0b0001..High speed comparator 0 output
  18240. * 0b0010..High speed comparator 1 output
  18241. * 0b0011..High speed comparator 2 output
  18242. * 0b0100..PIT trigger 0
  18243. * 0b0101..PIT trigger 1
  18244. * 0b0110..PIT trigger 2
  18245. * 0b0111..PIT trigger 3
  18246. * 0b1000..FTM0 trigger
  18247. * 0b1001..FTM1 trigger
  18248. * 0b1010..FTM2 trigger
  18249. * 0b1011..FTM3 trigger
  18250. * 0b1100..XBARA output 41
  18251. * 0b1101..Reserved
  18252. * 0b1110..Low-power timer trigger
  18253. * 0b1111..Reserved
  18254. */
  18255. #define SIM_SOPT7_HSADC1ATRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC1ATRGSEL_SHIFT)) & SIM_SOPT7_HSADC1ATRGSEL_MASK)
  18256. #define SIM_SOPT7_HSADC1AALTTRGEN_MASK (0xC00000U)
  18257. #define SIM_SOPT7_HSADC1AALTTRGEN_SHIFT (22U)
  18258. /*! HSADC1AALTTRGEN - HSADC1A alternate trigger enable
  18259. * 0b00..XBARA output 42.
  18260. * 0b01..PDB1 channel 1 trigger selected for HSADC1A.
  18261. */
  18262. #define SIM_SOPT7_HSADC1AALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC1AALTTRGEN_SHIFT)) & SIM_SOPT7_HSADC1AALTTRGEN_MASK)
  18263. #define SIM_SOPT7_HSADC1BTRGSEL_MASK (0xF000000U)
  18264. #define SIM_SOPT7_HSADC1BTRGSEL_SHIFT (24U)
  18265. /*! HSADC1BTRGSEL - HSADC1B trigger select
  18266. * 0b0000..PDB external trigger pin input (PDB0_EXTRG)
  18267. * 0b0001..High speed comparator 0 output
  18268. * 0b0010..High speed comparator 1 output
  18269. * 0b0011..High speed comparator 2 output
  18270. * 0b0100..PIT trigger 0
  18271. * 0b0101..PIT trigger 1
  18272. * 0b0110..PIT trigger 2
  18273. * 0b0111..PIT trigger 3
  18274. * 0b1000..FTM0 trigger
  18275. * 0b1001..FTM1 trigger
  18276. * 0b1010..FTM2 trigger
  18277. * 0b1011..FTM3 trigger
  18278. * 0b1100..XBARA output 38
  18279. * 0b1101..Reserved
  18280. * 0b1110..Low-power timer trigger
  18281. * 0b1111..Reserved
  18282. */
  18283. #define SIM_SOPT7_HSADC1BTRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC1BTRGSEL_SHIFT)) & SIM_SOPT7_HSADC1BTRGSEL_MASK)
  18284. #define SIM_SOPT7_HSADC1BALTTRGEN_MASK (0xC0000000U)
  18285. #define SIM_SOPT7_HSADC1BALTTRGEN_SHIFT (30U)
  18286. /*! HSADC1BALTTRGEN - HSADC1B alternate trigger enable
  18287. * 0b00..XBARA output 43.
  18288. * 0b01..PDB0 channel 1 trigger selected for HSADC1B
  18289. */
  18290. #define SIM_SOPT7_HSADC1BALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_HSADC1BALTTRGEN_SHIFT)) & SIM_SOPT7_HSADC1BALTTRGEN_MASK)
  18291. /*! @} */
  18292. /*! @name SOPT8 - System Options Register 8 */
  18293. /*! @{ */
  18294. #define SIM_SOPT8_FTM0SYNCBIT_MASK (0x1U)
  18295. #define SIM_SOPT8_FTM0SYNCBIT_SHIFT (0U)
  18296. /*! FTM0SYNCBIT - FTM0 Hardware Trigger 0 Software Synchronization
  18297. * 0b0..No effect
  18298. * 0b1..Write 1 to assert the TRIG0 input to FTM0, software must clear this bit to allow other trigger sources to assert.
  18299. */
  18300. #define SIM_SOPT8_FTM0SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0SYNCBIT_SHIFT)) & SIM_SOPT8_FTM0SYNCBIT_MASK)
  18301. #define SIM_SOPT8_FTM1SYNCBIT_MASK (0x2U)
  18302. #define SIM_SOPT8_FTM1SYNCBIT_SHIFT (1U)
  18303. /*! FTM1SYNCBIT - FTM1 Hardware Trigger 0 Software Synchronization
  18304. * 0b0..No effect.
  18305. * 0b1..Write 1 to assert the TRIG0 input to FTM1, software must clear this bit to allow other trigger sources to assert.
  18306. */
  18307. #define SIM_SOPT8_FTM1SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM1SYNCBIT_SHIFT)) & SIM_SOPT8_FTM1SYNCBIT_MASK)
  18308. #define SIM_SOPT8_FTM2SYNCBIT_MASK (0x4U)
  18309. #define SIM_SOPT8_FTM2SYNCBIT_SHIFT (2U)
  18310. /*! FTM2SYNCBIT - FTM2 Hardware Trigger 0 Software Synchronization
  18311. * 0b0..No effect.
  18312. * 0b1..Write 1 to assert the TRIG0 input to FTM2, software must clear this bit to allow other trigger sources to assert.
  18313. */
  18314. #define SIM_SOPT8_FTM2SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM2SYNCBIT_SHIFT)) & SIM_SOPT8_FTM2SYNCBIT_MASK)
  18315. #define SIM_SOPT8_FTM3SYNCBIT_MASK (0x8U)
  18316. #define SIM_SOPT8_FTM3SYNCBIT_SHIFT (3U)
  18317. /*! FTM3SYNCBIT - FTM3 Hardware Trigger 0 Software Synchronization
  18318. * 0b0..No effect.
  18319. * 0b1..Write 1 to assert the TRIG0 input to FTM3, software must clear this bit to allow other trigger sources to assert.
  18320. */
  18321. #define SIM_SOPT8_FTM3SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3SYNCBIT_SHIFT)) & SIM_SOPT8_FTM3SYNCBIT_MASK)
  18322. #define SIM_SOPT8_FTM0CFSEL_MASK (0x100U)
  18323. #define SIM_SOPT8_FTM0CFSEL_SHIFT (8U)
  18324. /*! FTM0CFSEL - Carrier frequency selection for FTM0 output channel
  18325. * 0b0..FTM1 channel 1 output provides the carrier signal for FTM0 Timer Modulation mode.
  18326. * 0b1..LPTMR0 prescaler output provides the carrier signal for FTM0 Timer Modulation mode.
  18327. */
  18328. #define SIM_SOPT8_FTM0CFSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0CFSEL_SHIFT)) & SIM_SOPT8_FTM0CFSEL_MASK)
  18329. #define SIM_SOPT8_FTM3CFSEL_MASK (0x200U)
  18330. #define SIM_SOPT8_FTM3CFSEL_SHIFT (9U)
  18331. /*! FTM3CFSEL - Carrier frequency selection for FTM3 output channel
  18332. * 0b0..FTM1 channel 1 output provides the carrier signal for FTM3 Timer Modulation mode.
  18333. * 0b1..LPTMR0 prescaler output provides the carrier signal for FTM3 Timer Modulation mode.
  18334. */
  18335. #define SIM_SOPT8_FTM3CFSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3CFSEL_SHIFT)) & SIM_SOPT8_FTM3CFSEL_MASK)
  18336. #define SIM_SOPT8_FTM0OCH0SRC_MASK (0x10000U)
  18337. #define SIM_SOPT8_FTM0OCH0SRC_SHIFT (16U)
  18338. /*! FTM0OCH0SRC - FTM0 channel 0 output source
  18339. * 0b0..FTM0_CH0 pin is output of FTM0 channel 0 output
  18340. * 0b1..FTM0_CH0 pin is output of FTM0 channel 0 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18341. */
  18342. #define SIM_SOPT8_FTM0OCH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH0SRC_SHIFT)) & SIM_SOPT8_FTM0OCH0SRC_MASK)
  18343. #define SIM_SOPT8_FTM0OCH1SRC_MASK (0x20000U)
  18344. #define SIM_SOPT8_FTM0OCH1SRC_SHIFT (17U)
  18345. /*! FTM0OCH1SRC - FTM0 channel 1 output source
  18346. * 0b0..FTM0_CH1 pin is output of FTM0 channel 1 output
  18347. * 0b1..FTM0_CH1 pin is output of FTM0 channel 1 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18348. */
  18349. #define SIM_SOPT8_FTM0OCH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH1SRC_SHIFT)) & SIM_SOPT8_FTM0OCH1SRC_MASK)
  18350. #define SIM_SOPT8_FTM0OCH2SRC_MASK (0x40000U)
  18351. #define SIM_SOPT8_FTM0OCH2SRC_SHIFT (18U)
  18352. /*! FTM0OCH2SRC - FTM0 channel 2 output source
  18353. * 0b0..FTM0_CH2 pin is output of FTM0 channel 2 output
  18354. * 0b1..FTM0_CH2 pin is output of FTM0 channel 2 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18355. */
  18356. #define SIM_SOPT8_FTM0OCH2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH2SRC_SHIFT)) & SIM_SOPT8_FTM0OCH2SRC_MASK)
  18357. #define SIM_SOPT8_FTM0OCH3SRC_MASK (0x80000U)
  18358. #define SIM_SOPT8_FTM0OCH3SRC_SHIFT (19U)
  18359. /*! FTM0OCH3SRC - FTM0 channel 3 output source
  18360. * 0b0..FTM0_CH3 pin is output of FTM0 channel 3 output
  18361. * 0b1..FTM0_CH3 pin is output of FTM0 channel 3 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18362. */
  18363. #define SIM_SOPT8_FTM0OCH3SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH3SRC_SHIFT)) & SIM_SOPT8_FTM0OCH3SRC_MASK)
  18364. #define SIM_SOPT8_FTM0OCH4SRC_MASK (0x100000U)
  18365. #define SIM_SOPT8_FTM0OCH4SRC_SHIFT (20U)
  18366. /*! FTM0OCH4SRC - FTM0 channel 4 output source
  18367. * 0b0..FTM0_CH4 pin is output of FTM0 channel 4 output
  18368. * 0b1..FTM0_CH4 pin is output of FTM0 channel 4 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18369. */
  18370. #define SIM_SOPT8_FTM0OCH4SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH4SRC_SHIFT)) & SIM_SOPT8_FTM0OCH4SRC_MASK)
  18371. #define SIM_SOPT8_FTM0OCH5SRC_MASK (0x200000U)
  18372. #define SIM_SOPT8_FTM0OCH5SRC_SHIFT (21U)
  18373. /*! FTM0OCH5SRC - FTM0 channel 5 output source
  18374. * 0b0..FTM0_CH5 pin is output of FTM0 channel 5 output
  18375. * 0b1..FTM0_CH5 pin is output of FTM0 channel 5 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18376. */
  18377. #define SIM_SOPT8_FTM0OCH5SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH5SRC_SHIFT)) & SIM_SOPT8_FTM0OCH5SRC_MASK)
  18378. #define SIM_SOPT8_FTM0OCH6SRC_MASK (0x400000U)
  18379. #define SIM_SOPT8_FTM0OCH6SRC_SHIFT (22U)
  18380. /*! FTM0OCH6SRC - FTM0 channel 6 output source
  18381. * 0b0..FTM0_CH6 pin is output of FTM0 channel 6 output
  18382. * 0b1..FTM0_CH6 pin is output of FTM0 channel 6 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18383. */
  18384. #define SIM_SOPT8_FTM0OCH6SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH6SRC_SHIFT)) & SIM_SOPT8_FTM0OCH6SRC_MASK)
  18385. #define SIM_SOPT8_FTM0OCH7SRC_MASK (0x800000U)
  18386. #define SIM_SOPT8_FTM0OCH7SRC_SHIFT (23U)
  18387. /*! FTM0OCH7SRC - FTM0 channel 7 output source
  18388. * 0b0..FTM0_CH7 pin is output of FTM0 channel 7 output
  18389. * 0b1..FTM0_CH7 pin is output of FTM0 channel 7 output, modulated by carrier frequency clock, as per FTM0CFSEL
  18390. */
  18391. #define SIM_SOPT8_FTM0OCH7SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH7SRC_SHIFT)) & SIM_SOPT8_FTM0OCH7SRC_MASK)
  18392. #define SIM_SOPT8_FTM3OCH0SRC_MASK (0x1000000U)
  18393. #define SIM_SOPT8_FTM3OCH0SRC_SHIFT (24U)
  18394. /*! FTM3OCH0SRC - FTM3 channel 0 output source
  18395. * 0b0..FTM3_CH0 pin is output of FTM3 channel 0 output
  18396. * 0b1..FTM3_CH0 pin is output of FTM3 channel 0 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18397. */
  18398. #define SIM_SOPT8_FTM3OCH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH0SRC_SHIFT)) & SIM_SOPT8_FTM3OCH0SRC_MASK)
  18399. #define SIM_SOPT8_FTM3OCH1SRC_MASK (0x2000000U)
  18400. #define SIM_SOPT8_FTM3OCH1SRC_SHIFT (25U)
  18401. /*! FTM3OCH1SRC - FTM3 channel 1 output source
  18402. * 0b0..FTM3_CH1 pin is output of FTM3 channel 1 output
  18403. * 0b1..FTM3_CH1 pin is output of FTM3 channel 1 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18404. */
  18405. #define SIM_SOPT8_FTM3OCH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH1SRC_SHIFT)) & SIM_SOPT8_FTM3OCH1SRC_MASK)
  18406. #define SIM_SOPT8_FTM3OCH2SRC_MASK (0x4000000U)
  18407. #define SIM_SOPT8_FTM3OCH2SRC_SHIFT (26U)
  18408. /*! FTM3OCH2SRC - FTM3 channel 2 output source
  18409. * 0b0..FTM3_CH2 pin is output of FTM3 channel 2 output
  18410. * 0b1..FTM3_CH2 pin is output of FTM3 channel 2 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18411. */
  18412. #define SIM_SOPT8_FTM3OCH2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH2SRC_SHIFT)) & SIM_SOPT8_FTM3OCH2SRC_MASK)
  18413. #define SIM_SOPT8_FTM3OCH3SRC_MASK (0x8000000U)
  18414. #define SIM_SOPT8_FTM3OCH3SRC_SHIFT (27U)
  18415. /*! FTM3OCH3SRC - FTM3 channel 3 output source
  18416. * 0b0..FTM3_CH3 pin is output of FTM3 channel 3 output
  18417. * 0b1..FTM3_CH3 pin is output of FTM3 channel 3 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18418. */
  18419. #define SIM_SOPT8_FTM3OCH3SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH3SRC_SHIFT)) & SIM_SOPT8_FTM3OCH3SRC_MASK)
  18420. #define SIM_SOPT8_FTM3OCH4SRC_MASK (0x10000000U)
  18421. #define SIM_SOPT8_FTM3OCH4SRC_SHIFT (28U)
  18422. /*! FTM3OCH4SRC - FTM3 channel 4 output source
  18423. * 0b0..FTM3_CH4 pin is output of FTM3 channel 4 output
  18424. * 0b1..FTM3_CH4 pin is output of FTM3 channel 4 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18425. */
  18426. #define SIM_SOPT8_FTM3OCH4SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH4SRC_SHIFT)) & SIM_SOPT8_FTM3OCH4SRC_MASK)
  18427. #define SIM_SOPT8_FTM3OCH5SRC_MASK (0x20000000U)
  18428. #define SIM_SOPT8_FTM3OCH5SRC_SHIFT (29U)
  18429. /*! FTM3OCH5SRC - FTM3 channel 5 output source
  18430. * 0b0..FTM3_CH5 pin is output of FTM3 channel 5 output
  18431. * 0b1..FTM3_CH5 pin is output of FTM3 channel 5 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18432. */
  18433. #define SIM_SOPT8_FTM3OCH5SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH5SRC_SHIFT)) & SIM_SOPT8_FTM3OCH5SRC_MASK)
  18434. #define SIM_SOPT8_FTM3OCH6SRC_MASK (0x40000000U)
  18435. #define SIM_SOPT8_FTM3OCH6SRC_SHIFT (30U)
  18436. /*! FTM3OCH6SRC - FTM3 channel 6 output source
  18437. * 0b0..FTM3_CH6 pin is output of FTM3 channel 6 output
  18438. * 0b1..FTM3_CH6 pin is output of FTM3 channel 6 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18439. */
  18440. #define SIM_SOPT8_FTM3OCH6SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH6SRC_SHIFT)) & SIM_SOPT8_FTM3OCH6SRC_MASK)
  18441. #define SIM_SOPT8_FTM3OCH7SRC_MASK (0x80000000U)
  18442. #define SIM_SOPT8_FTM3OCH7SRC_SHIFT (31U)
  18443. /*! FTM3OCH7SRC - FTM3 channel 7 output source
  18444. * 0b0..FTM3_CH7 pin is output of FTM3 channel 7 output
  18445. * 0b1..FTM3_CH7 pin is output of FTM3 channel 7 output modulated by carrier frequency clock, as per FTM3CFSEL.
  18446. */
  18447. #define SIM_SOPT8_FTM3OCH7SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH7SRC_SHIFT)) & SIM_SOPT8_FTM3OCH7SRC_MASK)
  18448. /*! @} */
  18449. /*! @name SOPT9 - System Options Register 9 */
  18450. /*! @{ */
  18451. #define SIM_SOPT9_FTM1ICH0SRC_MASK (0x30U)
  18452. #define SIM_SOPT9_FTM1ICH0SRC_SHIFT (4U)
  18453. /*! FTM1ICH0SRC - FTM1 channel 0 input capture source select
  18454. * 0b00..FTM1_CH0 signal
  18455. * 0b01..CMP0 output
  18456. * 0b10..CMP1 output
  18457. * 0b11..Reserved
  18458. */
  18459. #define SIM_SOPT9_FTM1ICH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM1ICH0SRC_SHIFT)) & SIM_SOPT9_FTM1ICH0SRC_MASK)
  18460. #define SIM_SOPT9_FTM1ICH1SRC_MASK (0x40U)
  18461. #define SIM_SOPT9_FTM1ICH1SRC_SHIFT (6U)
  18462. /*! FTM1ICH1SRC - FTM1 channel 0 input capture source select
  18463. * 0b0..FTM1_CH1 signal
  18464. * 0b1..Exclusive OR of FTM1_CH1, FTM1_CH0, and XBARA output 42 (XBARA output 42 can also trigger HSADC1A sync0)
  18465. */
  18466. #define SIM_SOPT9_FTM1ICH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM1ICH1SRC_SHIFT)) & SIM_SOPT9_FTM1ICH1SRC_MASK)
  18467. #define SIM_SOPT9_FTM2ICH0SRC_MASK (0x300U)
  18468. #define SIM_SOPT9_FTM2ICH0SRC_SHIFT (8U)
  18469. /*! FTM2ICH0SRC - FTM2 channel 0 input capture source select
  18470. * 0b00..FTM2_CH0 signal
  18471. * 0b01..CMP0 output
  18472. * 0b10..CMP1 output
  18473. * 0b11..Reserved
  18474. */
  18475. #define SIM_SOPT9_FTM2ICH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM2ICH0SRC_SHIFT)) & SIM_SOPT9_FTM2ICH0SRC_MASK)
  18476. #define SIM_SOPT9_FTM2ICH1SRC_MASK (0x400U)
  18477. #define SIM_SOPT9_FTM2ICH1SRC_SHIFT (10U)
  18478. /*! FTM2ICH1SRC - FTM2 channel 1 input capture source select
  18479. * 0b0..FTM2_CH1 signal
  18480. * 0b1..Exclusive OR of FTM2_CH1, FTM2_CH0 and FTM1_CH1
  18481. */
  18482. #define SIM_SOPT9_FTM2ICH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM2ICH1SRC_SHIFT)) & SIM_SOPT9_FTM2ICH1SRC_MASK)
  18483. #define SIM_SOPT9_FTM0CLKSEL_MASK (0x3000000U)
  18484. #define SIM_SOPT9_FTM0CLKSEL_SHIFT (24U)
  18485. /*! FTM0CLKSEL - FlexTimer 0 External Clock Pin Select
  18486. * 0b00..FTM0 external clock driven by FTM_CLK0 pin
  18487. * 0b01..FTM0 external clock driven by FTM_CLK1 pin
  18488. * 0b10..FTM0 external clock driven by FTM_CLK2 pin
  18489. * 0b11..Reserved
  18490. */
  18491. #define SIM_SOPT9_FTM0CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM0CLKSEL_SHIFT)) & SIM_SOPT9_FTM0CLKSEL_MASK)
  18492. #define SIM_SOPT9_FTM1CLKSEL_MASK (0xC000000U)
  18493. #define SIM_SOPT9_FTM1CLKSEL_SHIFT (26U)
  18494. /*! FTM1CLKSEL - FlexTimer 1 External Clock Pin Select
  18495. * 0b00..FTM1 external clock driven by FTM_CLK0 pin
  18496. * 0b01..FTM1 external clock driven by FTM_CLK1 pin
  18497. * 0b10..FTM1 external clock driven by FTM_CLK2 pin
  18498. * 0b11..Reserved
  18499. */
  18500. #define SIM_SOPT9_FTM1CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM1CLKSEL_SHIFT)) & SIM_SOPT9_FTM1CLKSEL_MASK)
  18501. #define SIM_SOPT9_FTM2CLKSEL_MASK (0x30000000U)
  18502. #define SIM_SOPT9_FTM2CLKSEL_SHIFT (28U)
  18503. /*! FTM2CLKSEL - FlexTimer 2 External Clock Pin Select
  18504. * 0b00..FTM2 external clock driven by FTM_CLK0 pin
  18505. * 0b01..FTM2 external clock driven by FTM_CLK1 pin
  18506. * 0b10..FTM2 external clock driven by FTM_CLK2 pin
  18507. * 0b11..Reserved
  18508. */
  18509. #define SIM_SOPT9_FTM2CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM2CLKSEL_SHIFT)) & SIM_SOPT9_FTM2CLKSEL_MASK)
  18510. #define SIM_SOPT9_FTM3CLKSEL_MASK (0xC0000000U)
  18511. #define SIM_SOPT9_FTM3CLKSEL_SHIFT (30U)
  18512. /*! FTM3CLKSEL - FlexTimer 3 External Clock Pin Select
  18513. * 0b00..FTM3 external clock driven by FTM_CLK0 pin
  18514. * 0b01..FTM3 external clock driven by FTM_CLK1 pin
  18515. * 0b10..FTM3 external clock driven by FTM_CLK2 pin
  18516. * 0b11..Reserved
  18517. */
  18518. #define SIM_SOPT9_FTM3CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_FTM3CLKSEL_SHIFT)) & SIM_SOPT9_FTM3CLKSEL_MASK)
  18519. /*! @} */
  18520. /*! @name SDID - System Device Identification Register */
  18521. /*! @{ */
  18522. #define SIM_SDID_PINID_MASK (0xFU)
  18523. #define SIM_SDID_PINID_SHIFT (0U)
  18524. /*! PINID - Pincount identification
  18525. * 0b1000..100-pin
  18526. * 0b1001..Reserved
  18527. * 0b1010..144-pin
  18528. */
  18529. #define SIM_SDID_PINID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PINID_SHIFT)) & SIM_SDID_PINID_MASK)
  18530. #define SIM_SDID_DIEID_MASK (0xF80U)
  18531. #define SIM_SDID_DIEID_SHIFT (7U)
  18532. /*! DIEID - Device die number
  18533. * 0b00011..KV5x
  18534. */
  18535. #define SIM_SDID_DIEID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DIEID_SHIFT)) & SIM_SDID_DIEID_MASK)
  18536. #define SIM_SDID_REVID_MASK (0xF000U)
  18537. #define SIM_SDID_REVID_SHIFT (12U)
  18538. #define SIM_SDID_REVID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK)
  18539. #define SIM_SDID_SERIESID_MASK (0xF00000U)
  18540. #define SIM_SDID_SERIESID_SHIFT (20U)
  18541. /*! SERIESID - Kinetis Series ID
  18542. * 0b0110..Kinetis V series
  18543. */
  18544. #define SIM_SDID_SERIESID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SERIESID_SHIFT)) & SIM_SDID_SERIESID_MASK)
  18545. #define SIM_SDID_SUBFAMID_MASK (0xF000000U)
  18546. #define SIM_SDID_SUBFAMID_SHIFT (24U)
  18547. /*! SUBFAMID - Kinetis Sub-Family ID
  18548. * 0b0110..KVx6 Subfamily (eFlexPWM with FlexTimer and HSADC)
  18549. * 0b0111..Reserved
  18550. * 0b1000..KVx8 Subfamily (eFlexPWM with FlexTimer, HSADC, and Ethernet)
  18551. */
  18552. #define SIM_SDID_SUBFAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBFAMID_SHIFT)) & SIM_SDID_SUBFAMID_MASK)
  18553. #define SIM_SDID_FAMILYID_MASK (0xF0000000U)
  18554. #define SIM_SDID_FAMILYID_SHIFT (28U)
  18555. /*! FAMILYID - Kinetis Family ID
  18556. * 0b0101..This is the KV5x series
  18557. */
  18558. #define SIM_SDID_FAMILYID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMILYID_SHIFT)) & SIM_SDID_FAMILYID_MASK)
  18559. /*! @} */
  18560. /*! @name SCGC1 - System Clock Gating Control Register 1 */
  18561. /*! @{ */
  18562. #define SIM_SCGC1_UART4_MASK (0x400U)
  18563. #define SIM_SCGC1_UART4_SHIFT (10U)
  18564. /*! UART4 - UART4 Clock Gate Control
  18565. * 0b0..Clock disabled
  18566. * 0b1..Clock enabled
  18567. */
  18568. #define SIM_SCGC1_UART4(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_UART4_SHIFT)) & SIM_SCGC1_UART4_MASK)
  18569. #define SIM_SCGC1_UART5_MASK (0x800U)
  18570. #define SIM_SCGC1_UART5_SHIFT (11U)
  18571. /*! UART5 - UART5 Clock Gate Control
  18572. * 0b0..Clock disabled
  18573. * 0b1..Clock enabled
  18574. */
  18575. #define SIM_SCGC1_UART5(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_UART5_SHIFT)) & SIM_SCGC1_UART5_MASK)
  18576. #define SIM_SCGC1_PWM1_SM0_MASK (0x1000000U)
  18577. #define SIM_SCGC1_PWM1_SM0_SHIFT (24U)
  18578. /*! PWM1_SM0 - PWM1 submodule 0 Clock Gate Control
  18579. * 0b0..Clock disabled
  18580. * 0b1..Clock enabled
  18581. */
  18582. #define SIM_SCGC1_PWM1_SM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_PWM1_SM0_SHIFT)) & SIM_SCGC1_PWM1_SM0_MASK)
  18583. #define SIM_SCGC1_PWM1_SM1_MASK (0x2000000U)
  18584. #define SIM_SCGC1_PWM1_SM1_SHIFT (25U)
  18585. /*! PWM1_SM1 - PWM1 submodule 1 Clock Gate Control
  18586. * 0b0..Clock disabled
  18587. * 0b1..Clock enabled
  18588. */
  18589. #define SIM_SCGC1_PWM1_SM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_PWM1_SM1_SHIFT)) & SIM_SCGC1_PWM1_SM1_MASK)
  18590. #define SIM_SCGC1_PWM1_SM2_MASK (0x4000000U)
  18591. #define SIM_SCGC1_PWM1_SM2_SHIFT (26U)
  18592. /*! PWM1_SM2 - PWM1 submodule 2 Clock Gate Control
  18593. * 0b0..Clock disabled
  18594. * 0b1..Clock enabled
  18595. */
  18596. #define SIM_SCGC1_PWM1_SM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_PWM1_SM2_SHIFT)) & SIM_SCGC1_PWM1_SM2_MASK)
  18597. #define SIM_SCGC1_PWM1_SM3_MASK (0x8000000U)
  18598. #define SIM_SCGC1_PWM1_SM3_SHIFT (27U)
  18599. /*! PWM1_SM3 - PWM1 submodule 3 Clock Gate Control
  18600. * 0b0..Clock disabled
  18601. * 0b1..Clock enabled
  18602. */
  18603. #define SIM_SCGC1_PWM1_SM3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_PWM1_SM3_SHIFT)) & SIM_SCGC1_PWM1_SM3_MASK)
  18604. /*! @} */
  18605. /*! @name SCGC2 - System Clock Gating Control Register 2 */
  18606. /*! @{ */
  18607. #define SIM_SCGC2_ENET_MASK (0x1U)
  18608. #define SIM_SCGC2_ENET_SHIFT (0U)
  18609. /*! ENET - ENET Clock Gate Control
  18610. * 0b0..Clock disabled
  18611. * 0b1..Clock enabled
  18612. */
  18613. #define SIM_SCGC2_ENET(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_ENET_SHIFT)) & SIM_SCGC2_ENET_MASK)
  18614. #define SIM_SCGC2_HSADC1_MASK (0x10000000U)
  18615. #define SIM_SCGC2_HSADC1_SHIFT (28U)
  18616. /*! HSADC1 - HSADC1 Clock Gate Control
  18617. * 0b0..Clock disabled
  18618. * 0b1..Clock enabled
  18619. */
  18620. #define SIM_SCGC2_HSADC1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_HSADC1_SHIFT)) & SIM_SCGC2_HSADC1_MASK)
  18621. /*! @} */
  18622. /*! @name SCGC3 - System Clock Gating Control Register 3 */
  18623. /*! @{ */
  18624. #define SIM_SCGC3_TRNG_MASK (0x1U)
  18625. #define SIM_SCGC3_TRNG_SHIFT (0U)
  18626. /*! TRNG - TRNG Clock Gate Control
  18627. * 0b0..Clock disabled
  18628. * 0b1..Clock enabled
  18629. */
  18630. #define SIM_SCGC3_TRNG(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_TRNG_SHIFT)) & SIM_SCGC3_TRNG_MASK)
  18631. #define SIM_SCGC3_FLEXCAN2_MASK (0x10U)
  18632. #define SIM_SCGC3_FLEXCAN2_SHIFT (4U)
  18633. /*! FLEXCAN2 - FlexCAN2 Clock Gate Control
  18634. * 0b0..Clock disabled
  18635. * 0b1..Clock enabled
  18636. */
  18637. #define SIM_SCGC3_FLEXCAN2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_FLEXCAN2_SHIFT)) & SIM_SCGC3_FLEXCAN2_MASK)
  18638. #define SIM_SCGC3_SPI2_MASK (0x1000U)
  18639. #define SIM_SCGC3_SPI2_SHIFT (12U)
  18640. /*! SPI2 - SPI2 Clock Gate Control
  18641. * 0b0..Clock disabled
  18642. * 0b1..Clock enabled
  18643. */
  18644. #define SIM_SCGC3_SPI2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_SPI2_SHIFT)) & SIM_SCGC3_SPI2_MASK)
  18645. /*! @} */
  18646. /*! @name SCGC4 - System Clock Gating Control Register 4 */
  18647. /*! @{ */
  18648. #define SIM_SCGC4_EWM_MASK (0x2U)
  18649. #define SIM_SCGC4_EWM_SHIFT (1U)
  18650. /*! EWM - EWM Clock Gate Control
  18651. * 0b0..Clock disabled
  18652. * 0b1..Clock enabled
  18653. */
  18654. #define SIM_SCGC4_EWM(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_EWM_SHIFT)) & SIM_SCGC4_EWM_MASK)
  18655. #define SIM_SCGC4_I2C0_MASK (0x40U)
  18656. #define SIM_SCGC4_I2C0_SHIFT (6U)
  18657. /*! I2C0 - I2C0 Clock Gate Control
  18658. * 0b0..Clock disabled
  18659. * 0b1..Clock enabled
  18660. */
  18661. #define SIM_SCGC4_I2C0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C0_SHIFT)) & SIM_SCGC4_I2C0_MASK)
  18662. #define SIM_SCGC4_I2C1_MASK (0x80U)
  18663. #define SIM_SCGC4_I2C1_SHIFT (7U)
  18664. #define SIM_SCGC4_I2C1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C1_SHIFT)) & SIM_SCGC4_I2C1_MASK)
  18665. #define SIM_SCGC4_UART0_MASK (0x400U)
  18666. #define SIM_SCGC4_UART0_SHIFT (10U)
  18667. /*! UART0 - UART0 Clock Gate Control
  18668. * 0b0..Clock disabled
  18669. * 0b1..Clock enabled
  18670. */
  18671. #define SIM_SCGC4_UART0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART0_SHIFT)) & SIM_SCGC4_UART0_MASK)
  18672. #define SIM_SCGC4_UART1_MASK (0x800U)
  18673. #define SIM_SCGC4_UART1_SHIFT (11U)
  18674. /*! UART1 - UART1 Clock Gate Control
  18675. * 0b0..Clock disabled
  18676. * 0b1..Clock enabled
  18677. */
  18678. #define SIM_SCGC4_UART1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART1_SHIFT)) & SIM_SCGC4_UART1_MASK)
  18679. #define SIM_SCGC4_UART2_MASK (0x1000U)
  18680. #define SIM_SCGC4_UART2_SHIFT (12U)
  18681. /*! UART2 - UART2 Clock Gate Control
  18682. * 0b0..Clock disabled
  18683. * 0b1..Clock enabled
  18684. */
  18685. #define SIM_SCGC4_UART2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART2_SHIFT)) & SIM_SCGC4_UART2_MASK)
  18686. #define SIM_SCGC4_UART3_MASK (0x2000U)
  18687. #define SIM_SCGC4_UART3_SHIFT (13U)
  18688. /*! UART3 - UART3 Clock Gate Control
  18689. * 0b0..Clock disabled
  18690. * 0b1..Clock enabled
  18691. */
  18692. #define SIM_SCGC4_UART3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART3_SHIFT)) & SIM_SCGC4_UART3_MASK)
  18693. #define SIM_SCGC4_CMP_MASK (0x80000U)
  18694. #define SIM_SCGC4_CMP_SHIFT (19U)
  18695. /*! CMP - Comparators Clock Gate Control
  18696. * 0b0..Clock disabled
  18697. * 0b1..Clock enabled
  18698. */
  18699. #define SIM_SCGC4_CMP(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_CMP_SHIFT)) & SIM_SCGC4_CMP_MASK)
  18700. #define SIM_SCGC4_PWM0_SM0_MASK (0x1000000U)
  18701. #define SIM_SCGC4_PWM0_SM0_SHIFT (24U)
  18702. /*! PWM0_SM0 - PWM0 submodule 0 Clock Gate Control
  18703. * 0b0..Clock disabled
  18704. * 0b1..Clock enabled
  18705. */
  18706. #define SIM_SCGC4_PWM0_SM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_PWM0_SM0_SHIFT)) & SIM_SCGC4_PWM0_SM0_MASK)
  18707. #define SIM_SCGC4_PWM0_SM1_MASK (0x2000000U)
  18708. #define SIM_SCGC4_PWM0_SM1_SHIFT (25U)
  18709. /*! PWM0_SM1 - PWM0 submodule 1 Clock Gate Control
  18710. * 0b0..Clock disabled
  18711. * 0b1..Clock enabled
  18712. */
  18713. #define SIM_SCGC4_PWM0_SM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_PWM0_SM1_SHIFT)) & SIM_SCGC4_PWM0_SM1_MASK)
  18714. #define SIM_SCGC4_PWM0_SM2_MASK (0x4000000U)
  18715. #define SIM_SCGC4_PWM0_SM2_SHIFT (26U)
  18716. /*! PWM0_SM2 - PWM0 submodule 2 Clock Gate Control
  18717. * 0b0..Clock disabled
  18718. * 0b1..Clock enabled
  18719. */
  18720. #define SIM_SCGC4_PWM0_SM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_PWM0_SM2_SHIFT)) & SIM_SCGC4_PWM0_SM2_MASK)
  18721. #define SIM_SCGC4_PWM0_SM3_MASK (0x8000000U)
  18722. #define SIM_SCGC4_PWM0_SM3_SHIFT (27U)
  18723. /*! PWM0_SM3 - PWM0 submodule 3 Clock Gate Control
  18724. * 0b0..Clock disabled
  18725. * 0b1..Clock enabled
  18726. */
  18727. #define SIM_SCGC4_PWM0_SM3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_PWM0_SM3_SHIFT)) & SIM_SCGC4_PWM0_SM3_MASK)
  18728. /*! @} */
  18729. /*! @name SCGC5 - System Clock Gating Control Register 5 */
  18730. /*! @{ */
  18731. #define SIM_SCGC5_LPTMR_MASK (0x1U)
  18732. #define SIM_SCGC5_LPTMR_SHIFT (0U)
  18733. /*! LPTMR - Low Power Timer Access Control
  18734. * 0b0..Access disabled
  18735. * 0b1..Access enabled
  18736. */
  18737. #define SIM_SCGC5_LPTMR(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_LPTMR_SHIFT)) & SIM_SCGC5_LPTMR_MASK)
  18738. #define SIM_SCGC5_PORTA_MASK (0x200U)
  18739. #define SIM_SCGC5_PORTA_SHIFT (9U)
  18740. /*! PORTA - Port A Clock Gate Control
  18741. * 0b0..Clock disabled
  18742. * 0b1..Clock enabled
  18743. */
  18744. #define SIM_SCGC5_PORTA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTA_SHIFT)) & SIM_SCGC5_PORTA_MASK)
  18745. #define SIM_SCGC5_PORTB_MASK (0x400U)
  18746. #define SIM_SCGC5_PORTB_SHIFT (10U)
  18747. /*! PORTB - Port B Clock Gate Control
  18748. * 0b0..Clock disabled
  18749. * 0b1..Clock enabled
  18750. */
  18751. #define SIM_SCGC5_PORTB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTB_SHIFT)) & SIM_SCGC5_PORTB_MASK)
  18752. #define SIM_SCGC5_PORTC_MASK (0x800U)
  18753. #define SIM_SCGC5_PORTC_SHIFT (11U)
  18754. /*! PORTC - Port C Clock Gate Control
  18755. * 0b0..Clock disabled
  18756. * 0b1..Clock enabled
  18757. */
  18758. #define SIM_SCGC5_PORTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTC_SHIFT)) & SIM_SCGC5_PORTC_MASK)
  18759. #define SIM_SCGC5_PORTD_MASK (0x1000U)
  18760. #define SIM_SCGC5_PORTD_SHIFT (12U)
  18761. /*! PORTD - Port D Clock Gate Control
  18762. * 0b0..Clock disabled
  18763. * 0b1..Clock enabled
  18764. */
  18765. #define SIM_SCGC5_PORTD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTD_SHIFT)) & SIM_SCGC5_PORTD_MASK)
  18766. #define SIM_SCGC5_PORTE_MASK (0x2000U)
  18767. #define SIM_SCGC5_PORTE_SHIFT (13U)
  18768. /*! PORTE - Port E Clock Gate Control
  18769. * 0b0..Clock disabled
  18770. * 0b1..Clock enabled
  18771. */
  18772. #define SIM_SCGC5_PORTE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTE_SHIFT)) & SIM_SCGC5_PORTE_MASK)
  18773. #define SIM_SCGC5_ENC_MASK (0x200000U)
  18774. #define SIM_SCGC5_ENC_SHIFT (21U)
  18775. /*! ENC
  18776. * 0b0..Clock disabled
  18777. * 0b1..Clock enabled
  18778. */
  18779. #define SIM_SCGC5_ENC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_ENC_SHIFT)) & SIM_SCGC5_ENC_MASK)
  18780. #define SIM_SCGC5_XBARA_MASK (0x2000000U)
  18781. #define SIM_SCGC5_XBARA_SHIFT (25U)
  18782. /*! XBARA - XBARA Clock Gate Control
  18783. * 0b0..Clock disabled
  18784. * 0b1..Clock enabled
  18785. */
  18786. #define SIM_SCGC5_XBARA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_XBARA_SHIFT)) & SIM_SCGC5_XBARA_MASK)
  18787. #define SIM_SCGC5_XBARB_MASK (0x4000000U)
  18788. #define SIM_SCGC5_XBARB_SHIFT (26U)
  18789. /*! XBARB - XBARB Clock Gate Control
  18790. * 0b0..Clock disabled
  18791. * 0b1..Clock enabled
  18792. */
  18793. #define SIM_SCGC5_XBARB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_XBARB_SHIFT)) & SIM_SCGC5_XBARB_MASK)
  18794. #define SIM_SCGC5_AOI_MASK (0x8000000U)
  18795. #define SIM_SCGC5_AOI_SHIFT (27U)
  18796. /*! AOI - AOI Clock Gate Control
  18797. * 0b0..Clock disabled
  18798. * 0b1..Clock enabled
  18799. */
  18800. #define SIM_SCGC5_AOI(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_AOI_SHIFT)) & SIM_SCGC5_AOI_MASK)
  18801. #define SIM_SCGC5_HSADC0_MASK (0x10000000U)
  18802. #define SIM_SCGC5_HSADC0_SHIFT (28U)
  18803. /*! HSADC0 - HSADC0 Clock Gate Control
  18804. * 0b0..Clock disabled
  18805. * 0b1..Clock enabled
  18806. */
  18807. #define SIM_SCGC5_HSADC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_HSADC0_SHIFT)) & SIM_SCGC5_HSADC0_MASK)
  18808. /*! @} */
  18809. /*! @name SCGC6 - System Clock Gating Control Register 6 */
  18810. /*! @{ */
  18811. #define SIM_SCGC6_FTF_MASK (0x1U)
  18812. #define SIM_SCGC6_FTF_SHIFT (0U)
  18813. /*! FTF - Flash Memory Clock Gate Control
  18814. * 0b0..Clock disabled
  18815. * 0b1..Clock enabled
  18816. */
  18817. #define SIM_SCGC6_FTF(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTF_SHIFT)) & SIM_SCGC6_FTF_MASK)
  18818. #define SIM_SCGC6_DMAMUX_MASK (0x2U)
  18819. #define SIM_SCGC6_DMAMUX_SHIFT (1U)
  18820. /*! DMAMUX - DMA Mux Clock Gate Control
  18821. * 0b0..Clock disabled
  18822. * 0b1..Clock enabled
  18823. */
  18824. #define SIM_SCGC6_DMAMUX(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DMAMUX_SHIFT)) & SIM_SCGC6_DMAMUX_MASK)
  18825. #define SIM_SCGC6_FLEXCAN0_MASK (0x10U)
  18826. #define SIM_SCGC6_FLEXCAN0_SHIFT (4U)
  18827. /*! FLEXCAN0 - FlexCAN0 Clock Gate Control
  18828. * 0b0..Clock disabled
  18829. * 0b1..Clock enabled
  18830. */
  18831. #define SIM_SCGC6_FLEXCAN0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FLEXCAN0_SHIFT)) & SIM_SCGC6_FLEXCAN0_MASK)
  18832. #define SIM_SCGC6_FLEXCAN1_MASK (0x20U)
  18833. #define SIM_SCGC6_FLEXCAN1_SHIFT (5U)
  18834. /*! FLEXCAN1 - FlexCAN1 Clock Gate Control
  18835. * 0b0..Clock disabled
  18836. * 0b1..Clock enabled
  18837. */
  18838. #define SIM_SCGC6_FLEXCAN1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FLEXCAN1_SHIFT)) & SIM_SCGC6_FLEXCAN1_MASK)
  18839. #define SIM_SCGC6_FTM3_MASK (0x40U)
  18840. #define SIM_SCGC6_FTM3_SHIFT (6U)
  18841. /*! FTM3 - FTM3 Clock Gate Control
  18842. * 0b0..Clock disabled
  18843. * 0b1..Clock enabled
  18844. */
  18845. #define SIM_SCGC6_FTM3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM3_SHIFT)) & SIM_SCGC6_FTM3_MASK)
  18846. #define SIM_SCGC6_SPI0_MASK (0x1000U)
  18847. #define SIM_SCGC6_SPI0_SHIFT (12U)
  18848. /*! SPI0 - SPI0 Clock Gate Control
  18849. * 0b0..Clock disabled
  18850. * 0b1..Clock enabled
  18851. */
  18852. #define SIM_SCGC6_SPI0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI0_SHIFT)) & SIM_SCGC6_SPI0_MASK)
  18853. #define SIM_SCGC6_SPI1_MASK (0x2000U)
  18854. #define SIM_SCGC6_SPI1_SHIFT (13U)
  18855. /*! SPI1 - SPI1 Clock Gate Control
  18856. * 0b0..Clock disabled
  18857. * 0b1..Clock enabled
  18858. */
  18859. #define SIM_SCGC6_SPI1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI1_SHIFT)) & SIM_SCGC6_SPI1_MASK)
  18860. #define SIM_SCGC6_PDB1_MASK (0x20000U)
  18861. #define SIM_SCGC6_PDB1_SHIFT (17U)
  18862. /*! PDB1 - PDB1 Clock Gate Control
  18863. * 0b0..Clock disabled
  18864. * 0b1..Clock enabled
  18865. */
  18866. #define SIM_SCGC6_PDB1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PDB1_SHIFT)) & SIM_SCGC6_PDB1_MASK)
  18867. #define SIM_SCGC6_CRC_MASK (0x40000U)
  18868. #define SIM_SCGC6_CRC_SHIFT (18U)
  18869. /*! CRC - CRC Clock Gate Control
  18870. * 0b0..Clock disabled
  18871. * 0b1..Clock enabled
  18872. */
  18873. #define SIM_SCGC6_CRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_CRC_SHIFT)) & SIM_SCGC6_CRC_MASK)
  18874. #define SIM_SCGC6_PDB0_MASK (0x400000U)
  18875. #define SIM_SCGC6_PDB0_SHIFT (22U)
  18876. /*! PDB0 - PDB0 Clock Gate Control
  18877. * 0b0..Clock disabled
  18878. * 0b1..Clock enabled
  18879. */
  18880. #define SIM_SCGC6_PDB0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PDB0_SHIFT)) & SIM_SCGC6_PDB0_MASK)
  18881. #define SIM_SCGC6_PIT_MASK (0x800000U)
  18882. #define SIM_SCGC6_PIT_SHIFT (23U)
  18883. /*! PIT - PIT Clock Gate Control
  18884. * 0b0..Clock disabled
  18885. * 0b1..Clock enabled
  18886. */
  18887. #define SIM_SCGC6_PIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PIT_SHIFT)) & SIM_SCGC6_PIT_MASK)
  18888. #define SIM_SCGC6_FTM0_MASK (0x1000000U)
  18889. #define SIM_SCGC6_FTM0_SHIFT (24U)
  18890. /*! FTM0 - FTM0 Clock Gate Control
  18891. * 0b0..Clock disabled
  18892. * 0b1..Clock enabled
  18893. */
  18894. #define SIM_SCGC6_FTM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM0_SHIFT)) & SIM_SCGC6_FTM0_MASK)
  18895. #define SIM_SCGC6_FTM1_MASK (0x2000000U)
  18896. #define SIM_SCGC6_FTM1_SHIFT (25U)
  18897. /*! FTM1 - FTM1 Clock Gate Control
  18898. * 0b0..Clock disabled
  18899. * 0b1..Clock enabled
  18900. */
  18901. #define SIM_SCGC6_FTM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM1_SHIFT)) & SIM_SCGC6_FTM1_MASK)
  18902. #define SIM_SCGC6_FTM2_MASK (0x4000000U)
  18903. #define SIM_SCGC6_FTM2_SHIFT (26U)
  18904. /*! FTM2 - FTM2 Clock Gate Control
  18905. * 0b0..Clock disabled
  18906. * 0b1..Clock enabled
  18907. */
  18908. #define SIM_SCGC6_FTM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM2_SHIFT)) & SIM_SCGC6_FTM2_MASK)
  18909. #define SIM_SCGC6_ADC0_MASK (0x8000000U)
  18910. #define SIM_SCGC6_ADC0_SHIFT (27U)
  18911. /*! ADC0 - ADC0 Clock Gate Control
  18912. * 0b0..Clock disabled
  18913. * 0b1..Clock enabled
  18914. */
  18915. #define SIM_SCGC6_ADC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_ADC0_SHIFT)) & SIM_SCGC6_ADC0_MASK)
  18916. #define SIM_SCGC6_DAC0_MASK (0x80000000U)
  18917. #define SIM_SCGC6_DAC0_SHIFT (31U)
  18918. /*! DAC0 - DAC0 Clock Gate Control
  18919. * 0b0..Clock disabled
  18920. * 0b1..Clock enabled
  18921. */
  18922. #define SIM_SCGC6_DAC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DAC0_SHIFT)) & SIM_SCGC6_DAC0_MASK)
  18923. /*! @} */
  18924. /*! @name SCGC7 - System Clock Gating Control Register 7 */
  18925. /*! @{ */
  18926. #define SIM_SCGC7_FLEXBUS_MASK (0x1U)
  18927. #define SIM_SCGC7_FLEXBUS_SHIFT (0U)
  18928. /*! FLEXBUS - FlexBus Clock Gate Control
  18929. * 0b0..Clock disabled
  18930. * 0b1..Clock enabled
  18931. */
  18932. #define SIM_SCGC7_FLEXBUS(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_FLEXBUS_SHIFT)) & SIM_SCGC7_FLEXBUS_MASK)
  18933. #define SIM_SCGC7_SMPU_MASK (0x4U)
  18934. #define SIM_SCGC7_SMPU_SHIFT (2U)
  18935. /*! SMPU - SMPU Clock Gate Control
  18936. * 0b0..Clock disabled
  18937. * 0b1..Clock enabled
  18938. */
  18939. #define SIM_SCGC7_SMPU(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_SMPU_SHIFT)) & SIM_SCGC7_SMPU_MASK)
  18940. #define SIM_SCGC7_DMA_MASK (0x100U)
  18941. #define SIM_SCGC7_DMA_SHIFT (8U)
  18942. /*! DMA - DMA Clock Gate Control
  18943. * 0b0..Clock disabled
  18944. * 0b1..Clock enabled
  18945. */
  18946. #define SIM_SCGC7_DMA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_DMA_SHIFT)) & SIM_SCGC7_DMA_MASK)
  18947. /*! @} */
  18948. /*! @name CLKDIV1 - System Clock Divider Register 1 */
  18949. /*! @{ */
  18950. #define SIM_CLKDIV1_OUTDIV4_MASK (0xF0000U)
  18951. #define SIM_CLKDIV1_OUTDIV4_SHIFT (16U)
  18952. /*! OUTDIV4 - Clock 4 output divider value
  18953. * 0b0000..Divide-by-1.
  18954. * 0b0001..Divide-by-2.
  18955. * 0b0010..Divide-by-3.
  18956. * 0b0011..Divide-by-4.
  18957. * 0b0100..Divide-by-5.
  18958. * 0b0101..Divide-by-6.
  18959. * 0b0110..Divide-by-7.
  18960. * 0b0111..Divide-by-8.
  18961. * 0b1000..Divide-by-9.
  18962. * 0b1001..Divide-by-10.
  18963. * 0b1010..Divide-by-11.
  18964. * 0b1011..Divide-by-12.
  18965. * 0b1100..Divide-by-13.
  18966. * 0b1101..Divide-by-14.
  18967. * 0b1110..Divide-by-15.
  18968. * 0b1111..Divide-by-16.
  18969. */
  18970. #define SIM_CLKDIV1_OUTDIV4(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV4_SHIFT)) & SIM_CLKDIV1_OUTDIV4_MASK)
  18971. #define SIM_CLKDIV1_OUTDIV3_MASK (0xF00000U)
  18972. #define SIM_CLKDIV1_OUTDIV3_SHIFT (20U)
  18973. /*! OUTDIV3 - Clock 3 output divider value
  18974. * 0b0000..Divide-by-1.
  18975. * 0b0001..Divide-by-2.
  18976. * 0b0010..Divide-by-3.
  18977. * 0b0011..Divide-by-4.
  18978. * 0b0100..Divide-by-5.
  18979. * 0b0101..Divide-by-6.
  18980. * 0b0110..Divide-by-7.
  18981. * 0b0111..Divide-by-8.
  18982. * 0b1000..Divide-by-9.
  18983. * 0b1001..Divide-by-10.
  18984. * 0b1010..Divide-by-11.
  18985. * 0b1011..Divide-by-12.
  18986. * 0b1100..Divide-by-13.
  18987. * 0b1101..Divide-by-14.
  18988. * 0b1110..Divide-by-15.
  18989. * 0b1111..Divide-by-16.
  18990. */
  18991. #define SIM_CLKDIV1_OUTDIV3(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV3_SHIFT)) & SIM_CLKDIV1_OUTDIV3_MASK)
  18992. #define SIM_CLKDIV1_OUTDIV2_MASK (0xF000000U)
  18993. #define SIM_CLKDIV1_OUTDIV2_SHIFT (24U)
  18994. /*! OUTDIV2 - Clock 2 output divider value
  18995. * 0b0000..Divide-by-1.
  18996. * 0b0001..Divide-by-2.
  18997. * 0b0010..Divide-by-3.
  18998. * 0b0011..Divide-by-4.
  18999. * 0b0100..Divide-by-5.
  19000. * 0b0101..Divide-by-6.
  19001. * 0b0110..Divide-by-7.
  19002. * 0b0111..Divide-by-8.
  19003. * 0b1000..Divide-by-9.
  19004. * 0b1001..Divide-by-10.
  19005. * 0b1010..Divide-by-11.
  19006. * 0b1011..Divide-by-12.
  19007. * 0b1100..Divide-by-13.
  19008. * 0b1101..Divide-by-14.
  19009. * 0b1110..Divide-by-15.
  19010. * 0b1111..Divide-by-16.
  19011. */
  19012. #define SIM_CLKDIV1_OUTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV2_SHIFT)) & SIM_CLKDIV1_OUTDIV2_MASK)
  19013. #define SIM_CLKDIV1_OUTDIV1_MASK (0xF0000000U)
  19014. #define SIM_CLKDIV1_OUTDIV1_SHIFT (28U)
  19015. /*! OUTDIV1 - Clock 1 output divider value
  19016. * 0b0000..Divide-by-1.
  19017. * 0b0001..Divide-by-2.
  19018. * 0b0010..Divide-by-3.
  19019. * 0b0011..Divide-by-4.
  19020. * 0b0100..Divide-by-5.
  19021. * 0b0101..Divide-by-6.
  19022. * 0b0110..Divide-by-7.
  19023. * 0b0111..Divide-by-8.
  19024. * 0b1000..Divide-by-9.
  19025. * 0b1001..Divide-by-10.
  19026. * 0b1010..Divide-by-11.
  19027. * 0b1011..Divide-by-12.
  19028. * 0b1100..Divide-by-13.
  19029. * 0b1101..Divide-by-14.
  19030. * 0b1110..Divide-by-15.
  19031. * 0b1111..Divide-by-16.
  19032. */
  19033. #define SIM_CLKDIV1_OUTDIV1(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV1_SHIFT)) & SIM_CLKDIV1_OUTDIV1_MASK)
  19034. /*! @} */
  19035. /*! @name FCFG1 - Flash Configuration Register 1 */
  19036. /*! @{ */
  19037. #define SIM_FCFG1_FLASHDIS_MASK (0x1U)
  19038. #define SIM_FCFG1_FLASHDIS_SHIFT (0U)
  19039. /*! FLASHDIS - Flash Disable
  19040. * 0b0..Flash is enabled
  19041. * 0b1..Flash is disabled
  19042. */
  19043. #define SIM_FCFG1_FLASHDIS(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDIS_SHIFT)) & SIM_FCFG1_FLASHDIS_MASK)
  19044. #define SIM_FCFG1_FLASHDOZE_MASK (0x2U)
  19045. #define SIM_FCFG1_FLASHDOZE_SHIFT (1U)
  19046. /*! FLASHDOZE - Flash Doze
  19047. * 0b0..Flash remains enabled during Wait mode
  19048. * 0b1..Flash is disabled for the duration of Wait mode
  19049. */
  19050. #define SIM_FCFG1_FLASHDOZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDOZE_SHIFT)) & SIM_FCFG1_FLASHDOZE_MASK)
  19051. #define SIM_FCFG1_PFSIZE_MASK (0xF000000U)
  19052. #define SIM_FCFG1_PFSIZE_SHIFT (24U)
  19053. /*! PFSIZE - Program flash size
  19054. * 0b1011..512 KB of program flash memory
  19055. * 0b1101..1024 KB of program flash memory
  19056. */
  19057. #define SIM_FCFG1_PFSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_PFSIZE_SHIFT)) & SIM_FCFG1_PFSIZE_MASK)
  19058. /*! @} */
  19059. /*! @name FCFG2 - Flash Configuration Register 2 */
  19060. /*! @{ */
  19061. #define SIM_FCFG2_MAXADDR0_MASK (0x7F000000U)
  19062. #define SIM_FCFG2_MAXADDR0_SHIFT (24U)
  19063. #define SIM_FCFG2_MAXADDR0(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR0_SHIFT)) & SIM_FCFG2_MAXADDR0_MASK)
  19064. /*! @} */
  19065. /*! @name UIDH - Unique Identification Register High */
  19066. /*! @{ */
  19067. #define SIM_UIDH_UID_MASK (0xFFFFFFFFU)
  19068. #define SIM_UIDH_UID_SHIFT (0U)
  19069. #define SIM_UIDH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID_SHIFT)) & SIM_UIDH_UID_MASK)
  19070. /*! @} */
  19071. /*! @name UIDMH - Unique Identification Register Mid-High */
  19072. /*! @{ */
  19073. #define SIM_UIDMH_UID_MASK (0xFFFFFFFFU)
  19074. #define SIM_UIDMH_UID_SHIFT (0U)
  19075. #define SIM_UIDMH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDMH_UID_SHIFT)) & SIM_UIDMH_UID_MASK)
  19076. /*! @} */
  19077. /*! @name UIDML - Unique Identification Register Mid Low */
  19078. /*! @{ */
  19079. #define SIM_UIDML_UID_MASK (0xFFFFFFFFU)
  19080. #define SIM_UIDML_UID_SHIFT (0U)
  19081. #define SIM_UIDML_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDML_UID_SHIFT)) & SIM_UIDML_UID_MASK)
  19082. /*! @} */
  19083. /*! @name UIDL - Unique Identification Register Low */
  19084. /*! @{ */
  19085. #define SIM_UIDL_UID_MASK (0xFFFFFFFFU)
  19086. #define SIM_UIDL_UID_SHIFT (0U)
  19087. #define SIM_UIDL_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID_SHIFT)) & SIM_UIDL_UID_MASK)
  19088. /*! @} */
  19089. /*! @name CLKDIV4 - System Clock Divider Register 4 */
  19090. /*! @{ */
  19091. #define SIM_CLKDIV4_TRACEFRAC_MASK (0x1U)
  19092. #define SIM_CLKDIV4_TRACEFRAC_SHIFT (0U)
  19093. #define SIM_CLKDIV4_TRACEFRAC(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEFRAC_SHIFT)) & SIM_CLKDIV4_TRACEFRAC_MASK)
  19094. #define SIM_CLKDIV4_TRACEDIV_MASK (0xEU)
  19095. #define SIM_CLKDIV4_TRACEDIV_SHIFT (1U)
  19096. #define SIM_CLKDIV4_TRACEDIV(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEDIV_SHIFT)) & SIM_CLKDIV4_TRACEDIV_MASK)
  19097. #define SIM_CLKDIV4_TRACEDIVEN_MASK (0x10000000U)
  19098. #define SIM_CLKDIV4_TRACEDIVEN_SHIFT (28U)
  19099. /*! TRACEDIVEN - Debug Trace Divider Control
  19100. * 0b0..Debug trace divider disabled
  19101. * 0b1..Debug trace divider enabled
  19102. */
  19103. #define SIM_CLKDIV4_TRACEDIVEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEDIVEN_SHIFT)) & SIM_CLKDIV4_TRACEDIVEN_MASK)
  19104. /*! @} */
  19105. /*! @name MISCTRL0 - Miscellaneous Control Register 0 */
  19106. /*! @{ */
  19107. #define SIM_MISCTRL0_CMPWIN0SRC_MASK (0x300U)
  19108. #define SIM_MISCTRL0_CMPWIN0SRC_SHIFT (8U)
  19109. /*! CMPWIN0SRC - CMP Sample/Window Input 0 Source
  19110. * 0b00..XBARA output 16.
  19111. * 0b01..CMP0 Sample/Window input is driven by both PDB0 and PDB1 pluse-out channel 0.
  19112. * 0b10..PDB0 pluse-out channel 0.
  19113. * 0b11..PDB1 pluse-out channel 0.
  19114. */
  19115. #define SIM_MISCTRL0_CMPWIN0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_CMPWIN0SRC_SHIFT)) & SIM_MISCTRL0_CMPWIN0SRC_MASK)
  19116. #define SIM_MISCTRL0_CMPWIN1SRC_MASK (0xC00U)
  19117. #define SIM_MISCTRL0_CMPWIN1SRC_SHIFT (10U)
  19118. /*! CMPWIN1SRC - CMP Sample/Window Input 1 Source
  19119. * 0b00..XBARA output 17.
  19120. * 0b01..CMP1 Sample/Window input is driven by both PDB0 and PDB1 pluse-out channel 1.
  19121. * 0b10..PDB0 pluse-out channel 1.
  19122. * 0b11..PDB1 pluse-out channel 1.
  19123. */
  19124. #define SIM_MISCTRL0_CMPWIN1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_CMPWIN1SRC_SHIFT)) & SIM_MISCTRL0_CMPWIN1SRC_MASK)
  19125. #define SIM_MISCTRL0_CMPWIN2SRC_MASK (0x3000U)
  19126. #define SIM_MISCTRL0_CMPWIN2SRC_SHIFT (12U)
  19127. /*! CMPWIN2SRC - CMP Sample/Window Input 2 Source
  19128. * 0b00..XBARA output 18.
  19129. * 0b01..CMP2 Sample/Window input is driven by both PDB0 and PDB1 pluse-out channel 2.
  19130. * 0b10..PDB0 pluse-out channel 2.
  19131. * 0b11..PDB1 pluse-out channel 2.
  19132. */
  19133. #define SIM_MISCTRL0_CMPWIN2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_CMPWIN2SRC_SHIFT)) & SIM_MISCTRL0_CMPWIN2SRC_MASK)
  19134. #define SIM_MISCTRL0_CMPWIN3SRC_MASK (0xC000U)
  19135. #define SIM_MISCTRL0_CMPWIN3SRC_SHIFT (14U)
  19136. /*! CMPWIN3SRC - CMP Sample/Window Input 3 Source
  19137. * 0b00..XBARA output 19.
  19138. * 0b01..CMP3 Sample/Window input is driven by both PDB0 and PDB1 pluse-out channel 3.
  19139. * 0b10..PDB0 pluse-out channel 3.
  19140. * 0b11..PDB1 pluse-out channel 3.
  19141. */
  19142. #define SIM_MISCTRL0_CMPWIN3SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_CMPWIN3SRC_SHIFT)) & SIM_MISCTRL0_CMPWIN3SRC_MASK)
  19143. #define SIM_MISCTRL0_EWMINSRC_MASK (0x10000U)
  19144. #define SIM_MISCTRL0_EWMINSRC_SHIFT (16U)
  19145. /*! EWMINSRC - EWM_IN Source
  19146. * 0b0..XBARA output 58.
  19147. * 0b1..EWM_IN pin
  19148. */
  19149. #define SIM_MISCTRL0_EWMINSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_EWMINSRC_SHIFT)) & SIM_MISCTRL0_EWMINSRC_MASK)
  19150. #define SIM_MISCTRL0_DACTRIGSRC_MASK (0xC0000U)
  19151. #define SIM_MISCTRL0_DACTRIGSRC_SHIFT (18U)
  19152. /*! DACTRIGSRC - DAC0 Hardware Trigger Input Source
  19153. * 0b00..XBARA output 15.
  19154. * 0b01..DAC0 can be triggered by both PDB0 interval trigger 0 and PDB1 interval trigger 0.
  19155. * 0b10..PDB0 interval trigger 0
  19156. * 0b11..PDB1 interval trigger 0
  19157. */
  19158. #define SIM_MISCTRL0_DACTRIGSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL0_DACTRIGSRC_SHIFT)) & SIM_MISCTRL0_DACTRIGSRC_MASK)
  19159. /*! @} */
  19160. /*! @name MISCTRL1 - Miscellaneous Control Register 1 */
  19161. /*! @{ */
  19162. #define SIM_MISCTRL1_SYNCXBARAPITTRIG0_MASK (0x100U)
  19163. #define SIM_MISCTRL1_SYNCXBARAPITTRIG0_SHIFT (8U)
  19164. /*! SYNCXBARAPITTRIG0 - Synchronize XBARA's Input PIT Trigger 0 with fast clock
  19165. * 0b0..Disable, bypass synchronizer.
  19166. * 0b1..Enable.
  19167. */
  19168. #define SIM_MISCTRL1_SYNCXBARAPITTRIG0(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARAPITTRIG0_SHIFT)) & SIM_MISCTRL1_SYNCXBARAPITTRIG0_MASK)
  19169. #define SIM_MISCTRL1_SYNCXBARAPITTRIG1_MASK (0x200U)
  19170. #define SIM_MISCTRL1_SYNCXBARAPITTRIG1_SHIFT (9U)
  19171. /*! SYNCXBARAPITTRIG1 - Synchronize XBARA's Input PIT Trigger 1 with fast clock
  19172. * 0b0..Disable, bypass synchronizer.
  19173. * 0b1..Enable.
  19174. */
  19175. #define SIM_MISCTRL1_SYNCXBARAPITTRIG1(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARAPITTRIG1_SHIFT)) & SIM_MISCTRL1_SYNCXBARAPITTRIG1_MASK)
  19176. #define SIM_MISCTRL1_SYNCXBARAPITTRIG2_MASK (0x400U)
  19177. #define SIM_MISCTRL1_SYNCXBARAPITTRIG2_SHIFT (10U)
  19178. /*! SYNCXBARAPITTRIG2 - Synchronize XBARA's Input PIT Trigger 2 with fast clock
  19179. * 0b0..Disable, bypass synchronizer.
  19180. * 0b1..Enable.
  19181. */
  19182. #define SIM_MISCTRL1_SYNCXBARAPITTRIG2(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARAPITTRIG2_SHIFT)) & SIM_MISCTRL1_SYNCXBARAPITTRIG2_MASK)
  19183. #define SIM_MISCTRL1_SYNCXBARAPITTRIG3_MASK (0x800U)
  19184. #define SIM_MISCTRL1_SYNCXBARAPITTRIG3_SHIFT (11U)
  19185. /*! SYNCXBARAPITTRIG3 - Synchronize XBARA's Input PIT Trigger 3 with fast clock
  19186. * 0b0..Disable, bypass synchronizer.
  19187. * 0b1..Enable.
  19188. */
  19189. #define SIM_MISCTRL1_SYNCXBARAPITTRIG3(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARAPITTRIG3_SHIFT)) & SIM_MISCTRL1_SYNCXBARAPITTRIG3_MASK)
  19190. #define SIM_MISCTRL1_SYNCXBARBPITTRIG0_MASK (0x1000U)
  19191. #define SIM_MISCTRL1_SYNCXBARBPITTRIG0_SHIFT (12U)
  19192. /*! SYNCXBARBPITTRIG0 - Synchronize XBARB's Input PIT Trigger 0 with fast clock
  19193. * 0b0..Disable, bypass synchronizer.
  19194. * 0b1..Enable.
  19195. */
  19196. #define SIM_MISCTRL1_SYNCXBARBPITTRIG0(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARBPITTRIG0_SHIFT)) & SIM_MISCTRL1_SYNCXBARBPITTRIG0_MASK)
  19197. #define SIM_MISCTRL1_SYNCXBARBPITTRIG1_MASK (0x2000U)
  19198. #define SIM_MISCTRL1_SYNCXBARBPITTRIG1_SHIFT (13U)
  19199. /*! SYNCXBARBPITTRIG1 - Synchronize XBARB's Input PIT Trigger 1 with fast clock
  19200. * 0b0..Disable, bypass synchronizer.
  19201. * 0b1..Enable.
  19202. */
  19203. #define SIM_MISCTRL1_SYNCXBARBPITTRIG1(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCXBARBPITTRIG1_SHIFT)) & SIM_MISCTRL1_SYNCXBARBPITTRIG1_MASK)
  19204. #define SIM_MISCTRL1_SYNCDACHWTRIG_MASK (0x10000U)
  19205. #define SIM_MISCTRL1_SYNCDACHWTRIG_SHIFT (16U)
  19206. /*! SYNCDACHWTRIG - Synchronize XBARA's output for DAC Hardware Trigger with flash/slow clock
  19207. * 0b0..Disable, bypass synchronizer.
  19208. * 0b1..Enable.
  19209. */
  19210. #define SIM_MISCTRL1_SYNCDACHWTRIG(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCDACHWTRIG_SHIFT)) & SIM_MISCTRL1_SYNCDACHWTRIG_MASK)
  19211. #define SIM_MISCTRL1_SYNCEWMIN_MASK (0x20000U)
  19212. #define SIM_MISCTRL1_SYNCEWMIN_SHIFT (17U)
  19213. /*! SYNCEWMIN - Synchronize XBARA's output for EWM's ewm_in with flash/slow clock
  19214. * 0b0..Disable, bypass synchronizer.
  19215. * 0b1..Enable.
  19216. */
  19217. #define SIM_MISCTRL1_SYNCEWMIN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCEWMIN_SHIFT)) & SIM_MISCTRL1_SYNCEWMIN_MASK)
  19218. #define SIM_MISCTRL1_SYNCCMP0SAMPLEWIN_MASK (0x100000U)
  19219. #define SIM_MISCTRL1_SYNCCMP0SAMPLEWIN_SHIFT (20U)
  19220. /*! SYNCCMP0SAMPLEWIN - Synchronize XBARA's output for CMP0's Sample/Window Input with flash/slow clock
  19221. * 0b0..Disable, bypass synchronizer.
  19222. * 0b1..Enable.
  19223. */
  19224. #define SIM_MISCTRL1_SYNCCMP0SAMPLEWIN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCCMP0SAMPLEWIN_SHIFT)) & SIM_MISCTRL1_SYNCCMP0SAMPLEWIN_MASK)
  19225. #define SIM_MISCTRL1_SYNCCMP1SAMPLEWIN_MASK (0x200000U)
  19226. #define SIM_MISCTRL1_SYNCCMP1SAMPLEWIN_SHIFT (21U)
  19227. /*! SYNCCMP1SAMPLEWIN - Synchronize XBARA's output for CMP1's Sample/Window Input with flash/slow clock
  19228. * 0b0..Disable, bypass synchronizer.
  19229. * 0b1..Enable.
  19230. */
  19231. #define SIM_MISCTRL1_SYNCCMP1SAMPLEWIN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCCMP1SAMPLEWIN_SHIFT)) & SIM_MISCTRL1_SYNCCMP1SAMPLEWIN_MASK)
  19232. #define SIM_MISCTRL1_SYNCCMP2SAMPLEWIN_MASK (0x400000U)
  19233. #define SIM_MISCTRL1_SYNCCMP2SAMPLEWIN_SHIFT (22U)
  19234. /*! SYNCCMP2SAMPLEWIN - Synchronize XBARA's output for CMP2's Sample/Window Input with flash/slow clock
  19235. * 0b0..Disable, bypass synchronizer.
  19236. * 0b1..Enable.
  19237. */
  19238. #define SIM_MISCTRL1_SYNCCMP2SAMPLEWIN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCCMP2SAMPLEWIN_SHIFT)) & SIM_MISCTRL1_SYNCCMP2SAMPLEWIN_MASK)
  19239. #define SIM_MISCTRL1_SYNCCMP3SAMPLEWIN_MASK (0x800000U)
  19240. #define SIM_MISCTRL1_SYNCCMP3SAMPLEWIN_SHIFT (23U)
  19241. /*! SYNCCMP3SAMPLEWIN - Synchronize XBARA's output for CMP3's Sample/Window Input with flash/slow clock
  19242. * 0b0..Disable, bypass synchronizer.
  19243. * 0b1..Enable.
  19244. */
  19245. #define SIM_MISCTRL1_SYNCCMP3SAMPLEWIN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISCTRL1_SYNCCMP3SAMPLEWIN_SHIFT)) & SIM_MISCTRL1_SYNCCMP3SAMPLEWIN_MASK)
  19246. /*! @} */
  19247. /*! @name WDOGC - WDOG Control Register */
  19248. /*! @{ */
  19249. #define SIM_WDOGC_WDOGCLKS_MASK (0x2U)
  19250. #define SIM_WDOGC_WDOGCLKS_SHIFT (1U)
  19251. /*! WDOGCLKS - WDOG Clock Select
  19252. * 0b0..1 kHz LPO clock is source to WDOG
  19253. * 0b1..MCGIRCLK is source to WDOG
  19254. */
  19255. #define SIM_WDOGC_WDOGCLKS(x) (((uint32_t)(((uint32_t)(x)) << SIM_WDOGC_WDOGCLKS_SHIFT)) & SIM_WDOGC_WDOGCLKS_MASK)
  19256. /*! @} */
  19257. /*! @name PWRC - Power Control Register */
  19258. /*! @{ */
  19259. #define SIM_PWRC_SRPDN_MASK (0x3U)
  19260. #define SIM_PWRC_SRPDN_SHIFT (0U)
  19261. /*! SRPDN - Nanoedge Regulator 2.7V and 1.2V Supply Powerdown Control
  19262. * 0b00..Nanoedge regulator placed in normal mode.
  19263. * 0b01..Nanoedge regulator placed in powerdown mode.
  19264. * 0b10..Nanoedge regulator placed in normal mode and SRPDN is write protected until chip reset.
  19265. * 0b11..Nanoedge regulator placed in powerdown mode and SRPDN is write protected until chip reset.
  19266. */
  19267. #define SIM_PWRC_SRPDN(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SRPDN_SHIFT)) & SIM_PWRC_SRPDN_MASK)
  19268. #define SIM_PWRC_SR27STDBY_MASK (0xCU)
  19269. #define SIM_PWRC_SR27STDBY_SHIFT (2U)
  19270. /*! SR27STDBY - Nanoedge Regulator 2.7 V Supply Standby Control
  19271. * 0b00..Nanoedge regulator 2.7 V placed in normal mode.
  19272. * 0b01..Nanoedge regulator 2.7 V placed in standby mode.
  19273. * 0b10..Nanoedge regulator 2.7 V supply placed in normal mode and SR27STDBY is write protected until chip reset.
  19274. * 0b11..Nanoedge regulator 2.7 V supply placed in standby mode and SR27STDBY is write protected until chip reset.
  19275. */
  19276. #define SIM_PWRC_SR27STDBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SR27STDBY_SHIFT)) & SIM_PWRC_SR27STDBY_MASK)
  19277. #define SIM_PWRC_SR12STDBY_MASK (0xC0U)
  19278. #define SIM_PWRC_SR12STDBY_SHIFT (6U)
  19279. /*! SR12STDBY - Nanoedge Regulator 1.2 V Supply Standby Control
  19280. * 0b00..Nanoedge regulator 1.2 V supply placed in normal mode
  19281. * 0b01..Nanoedge regulator 1.2 V supply placed in standby mode.
  19282. * 0b10..Nanoedge regulator 1.2 V supply placed in normal mode and SR12STDBY is write protected until chip reset.
  19283. * 0b11..Nanoedge regulator 1.2 V supply placed in standby mode and SR12STDBY is write protected until chip reset.
  19284. */
  19285. #define SIM_PWRC_SR12STDBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SR12STDBY_SHIFT)) & SIM_PWRC_SR12STDBY_MASK)
  19286. #define SIM_PWRC_SRPWRDETEN_MASK (0x100U)
  19287. #define SIM_PWRC_SRPWRDETEN_SHIFT (8U)
  19288. /*! SRPWRDETEN - Nanoedge PMC POWER Dectect Enable
  19289. * 0b0..Disable
  19290. * 0b1..Enable
  19291. */
  19292. #define SIM_PWRC_SRPWRDETEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SRPWRDETEN_SHIFT)) & SIM_PWRC_SRPWRDETEN_MASK)
  19293. #define SIM_PWRC_SRPWRRDY_MASK (0x200U)
  19294. #define SIM_PWRC_SRPWRRDY_SHIFT (9U)
  19295. /*! SRPWRRDY - Nanoedge PMC POWER Ready
  19296. * 0b0..Not ready
  19297. * 0b1..Assert PMC power output ready
  19298. */
  19299. #define SIM_PWRC_SRPWRRDY(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SRPWRRDY_SHIFT)) & SIM_PWRC_SRPWRRDY_MASK)
  19300. #define SIM_PWRC_SRPWROK_MASK (0x10000U)
  19301. #define SIM_PWRC_SRPWROK_SHIFT (16U)
  19302. /*! SRPWROK - Nanoedge PMC Status
  19303. * 0b0..Power supply for nanoedge isn't ready.
  19304. * 0b1..Power supply for nanoedge is OK.
  19305. */
  19306. #define SIM_PWRC_SRPWROK(x) (((uint32_t)(((uint32_t)(x)) << SIM_PWRC_SRPWROK_SHIFT)) & SIM_PWRC_SRPWROK_MASK)
  19307. /*! @} */
  19308. /*! @name ADCOPT - ADC Additional Option Register */
  19309. /*! @{ */
  19310. #define SIM_ADCOPT_ADC0TRGSEL_MASK (0xF0000U)
  19311. #define SIM_ADCOPT_ADC0TRGSEL_SHIFT (16U)
  19312. /*! ADC0TRGSEL - ADC0 trigger select
  19313. * 0b0000..PDB0 external trigger pin input (PDB0_EXTRG)
  19314. * 0b0001..High speed comparator 0 output
  19315. * 0b0010..High speed comparator 1 output
  19316. * 0b0011..High speed comparator 2 output
  19317. * 0b0100..PIT trigger 0
  19318. * 0b0101..PIT trigger 1
  19319. * 0b0110..PIT trigger 2
  19320. * 0b0111..PIT trigger 3
  19321. * 0b1000..FTM0 trigger
  19322. * 0b1001..FTM1 trigger
  19323. * 0b1010..FTM2 trigger
  19324. * 0b1011..FTM3 trigger
  19325. * 0b1100..XBARA output 38
  19326. * 0b1101..Reserved
  19327. * 0b1110..Low-power timer (LPTMR) trigger
  19328. * 0b1111..Reserved
  19329. */
  19330. #define SIM_ADCOPT_ADC0TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0TRGSEL_SHIFT)) & SIM_ADCOPT_ADC0TRGSEL_MASK)
  19331. #define SIM_ADCOPT_ADC0PRETRGSEL_MASK (0x100000U)
  19332. #define SIM_ADCOPT_ADC0PRETRGSEL_SHIFT (20U)
  19333. /*! ADC0PRETRGSEL - ADC0 pretrigger select
  19334. * 0b0..Pre-trigger A
  19335. * 0b1..Pre-trigger B
  19336. */
  19337. #define SIM_ADCOPT_ADC0PRETRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0PRETRGSEL_SHIFT)) & SIM_ADCOPT_ADC0PRETRGSEL_MASK)
  19338. #define SIM_ADCOPT_ADC0ALTTRGEN_MASK (0xC00000U)
  19339. #define SIM_ADCOPT_ADC0ALTTRGEN_SHIFT (22U)
  19340. /*! ADC0ALTTRGEN - ADC0 alternate trigger enable
  19341. * 0b00..XBARA output 39.
  19342. * 0b01..PDB0 channel1 trigger selected for ADC0
  19343. * 0b10..PDB1 channel0 trigger selected for ADC0
  19344. * 0b11..Alternate trigger selected for ADC0 as defined by ADC0TRGSEL.
  19345. */
  19346. #define SIM_ADCOPT_ADC0ALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_ADC0ALTTRGEN_SHIFT)) & SIM_ADCOPT_ADC0ALTTRGEN_MASK)
  19347. #define SIM_ADCOPT_HSADCIRCLK_MASK (0x2000000U)
  19348. #define SIM_ADCOPT_HSADCIRCLK_SHIFT (25U)
  19349. /*! HSADCIRCLK - HSADC Clock Status
  19350. * 0b0..HSADC clock is Core/System clock.
  19351. * 0b1..HSADC clock is MCGIRCLK.
  19352. */
  19353. #define SIM_ADCOPT_HSADCIRCLK(x) (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_HSADCIRCLK_SHIFT)) & SIM_ADCOPT_HSADCIRCLK_MASK)
  19354. #define SIM_ADCOPT_HSADCSTOPEN_MASK (0x4000000U)
  19355. #define SIM_ADCOPT_HSADCSTOPEN_SHIFT (26U)
  19356. /*! HSADCSTOPEN - Enable HSADCs in STOP mode
  19357. * 0b0..HSADCs stopsin system STOP modes
  19358. * 0b1..HSADCs can be enabled in system STOP modes
  19359. */
  19360. #define SIM_ADCOPT_HSADCSTOPEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_ADCOPT_HSADCSTOPEN_SHIFT)) & SIM_ADCOPT_HSADCSTOPEN_MASK)
  19361. /*! @} */
  19362. /*!
  19363. * @}
  19364. */ /* end of group SIM_Register_Masks */
  19365. /* SIM - Peripheral instance base addresses */
  19366. /** Peripheral SIM base address */
  19367. #define SIM_BASE (0x40047000u)
  19368. /** Peripheral SIM base pointer */
  19369. #define SIM ((SIM_Type *)SIM_BASE)
  19370. /** Array initializer of SIM peripheral base addresses */
  19371. #define SIM_BASE_ADDRS { SIM_BASE }
  19372. /** Array initializer of SIM peripheral base pointers */
  19373. #define SIM_BASE_PTRS { SIM }
  19374. /*!
  19375. * @}
  19376. */ /* end of group SIM_Peripheral_Access_Layer */
  19377. /* ----------------------------------------------------------------------------
  19378. -- SMC Peripheral Access Layer
  19379. ---------------------------------------------------------------------------- */
  19380. /*!
  19381. * @addtogroup SMC_Peripheral_Access_Layer SMC Peripheral Access Layer
  19382. * @{
  19383. */
  19384. /** SMC - Register Layout Typedef */
  19385. typedef struct {
  19386. __IO uint8_t PMPROT; /**< Power Mode Protection register, offset: 0x0 */
  19387. __IO uint8_t PMCTRL; /**< Power Mode Control register, offset: 0x1 */
  19388. __IO uint8_t STOPCTRL; /**< Stop Control Register, offset: 0x2 */
  19389. __I uint8_t PMSTAT; /**< Power Mode Status register, offset: 0x3 */
  19390. } SMC_Type;
  19391. /* ----------------------------------------------------------------------------
  19392. -- SMC Register Masks
  19393. ---------------------------------------------------------------------------- */
  19394. /*!
  19395. * @addtogroup SMC_Register_Masks SMC Register Masks
  19396. * @{
  19397. */
  19398. /*! @name PMPROT - Power Mode Protection register */
  19399. /*! @{ */
  19400. #define SMC_PMPROT_AVLLS_MASK (0x2U)
  19401. #define SMC_PMPROT_AVLLS_SHIFT (1U)
  19402. /*! AVLLS - Allow Very-Low-Leakage Stop Mode
  19403. * 0b0..Any VLLSx mode is not allowed
  19404. * 0b1..Any VLLSx mode is allowed
  19405. */
  19406. #define SMC_PMPROT_AVLLS(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLLS_SHIFT)) & SMC_PMPROT_AVLLS_MASK)
  19407. #define SMC_PMPROT_AVLP_MASK (0x20U)
  19408. #define SMC_PMPROT_AVLP_SHIFT (5U)
  19409. /*! AVLP - Allow Very-Low-Power Modes
  19410. * 0b0..VLPR, VLPW, and VLPS are not allowed.
  19411. * 0b1..VLPR, VLPW, and VLPS are allowed.
  19412. */
  19413. #define SMC_PMPROT_AVLP(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLP_SHIFT)) & SMC_PMPROT_AVLP_MASK)
  19414. #define SMC_PMPROT_AHSRUN_MASK (0x80U)
  19415. #define SMC_PMPROT_AHSRUN_SHIFT (7U)
  19416. /*! AHSRUN - Allow High Speed Run mode
  19417. * 0b0..HSRUN is not allowed
  19418. * 0b1..HSRUN is allowed
  19419. */
  19420. #define SMC_PMPROT_AHSRUN(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AHSRUN_SHIFT)) & SMC_PMPROT_AHSRUN_MASK)
  19421. /*! @} */
  19422. /*! @name PMCTRL - Power Mode Control register */
  19423. /*! @{ */
  19424. #define SMC_PMCTRL_STOPM_MASK (0x7U)
  19425. #define SMC_PMCTRL_STOPM_SHIFT (0U)
  19426. /*! STOPM - Stop Mode Control
  19427. * 0b000..Normal Stop (STOP)
  19428. * 0b001..Reserved
  19429. * 0b010..Very-Low-Power Stop (VLPS)
  19430. * 0b011..Reserved
  19431. * 0b100..Very-Low-Leakage Stop (VLLSx)
  19432. * 0b101..Reserved
  19433. * 0b110..Reseved
  19434. * 0b111..Reserved
  19435. */
  19436. #define SMC_PMCTRL_STOPM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPM_SHIFT)) & SMC_PMCTRL_STOPM_MASK)
  19437. #define SMC_PMCTRL_STOPA_MASK (0x8U)
  19438. #define SMC_PMCTRL_STOPA_SHIFT (3U)
  19439. /*! STOPA - Stop Aborted
  19440. * 0b0..The previous stop mode entry was successful.
  19441. * 0b1..The previous stop mode entry was aborted.
  19442. */
  19443. #define SMC_PMCTRL_STOPA(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPA_SHIFT)) & SMC_PMCTRL_STOPA_MASK)
  19444. #define SMC_PMCTRL_RUNM_MASK (0x60U)
  19445. #define SMC_PMCTRL_RUNM_SHIFT (5U)
  19446. /*! RUNM - Run Mode Control
  19447. * 0b00..Normal Run mode (RUN)
  19448. * 0b01..Reserved
  19449. * 0b10..Very-Low-Power Run mode (VLPR)
  19450. * 0b11..High Speed Run mode (HSRUN)
  19451. */
  19452. #define SMC_PMCTRL_RUNM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_RUNM_SHIFT)) & SMC_PMCTRL_RUNM_MASK)
  19453. /*! @} */
  19454. /*! @name STOPCTRL - Stop Control Register */
  19455. /*! @{ */
  19456. #define SMC_STOPCTRL_VLLSM_MASK (0x7U)
  19457. #define SMC_STOPCTRL_VLLSM_SHIFT (0U)
  19458. /*! VLLSM - VLLS Mode Control
  19459. * 0b000..VLLS0
  19460. * 0b001..VLLS1
  19461. * 0b010..VLLS2
  19462. * 0b011..VLLS3
  19463. * 0b100..Reserved
  19464. * 0b101..Reserved
  19465. * 0b110..Reserved
  19466. * 0b111..Reserved
  19467. */
  19468. #define SMC_STOPCTRL_VLLSM(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_VLLSM_SHIFT)) & SMC_STOPCTRL_VLLSM_MASK)
  19469. #define SMC_STOPCTRL_LPOPO_MASK (0x8U)
  19470. #define SMC_STOPCTRL_LPOPO_SHIFT (3U)
  19471. /*! LPOPO - LPO Power Option
  19472. * 0b0..LPO clock is enabled in VLLSx
  19473. * 0b1..LPO clock is disabled in VLLSx
  19474. */
  19475. #define SMC_STOPCTRL_LPOPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_LPOPO_SHIFT)) & SMC_STOPCTRL_LPOPO_MASK)
  19476. #define SMC_STOPCTRL_RAM2PO_MASK (0x10U)
  19477. #define SMC_STOPCTRL_RAM2PO_SHIFT (4U)
  19478. /*! RAM2PO - RAM2 Power Option
  19479. * 0b0..RAM2 not powered in VLLS2
  19480. * 0b1..RAM2 powered in VLLS2
  19481. */
  19482. #define SMC_STOPCTRL_RAM2PO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_RAM2PO_SHIFT)) & SMC_STOPCTRL_RAM2PO_MASK)
  19483. #define SMC_STOPCTRL_PORPO_MASK (0x20U)
  19484. #define SMC_STOPCTRL_PORPO_SHIFT (5U)
  19485. /*! PORPO - POR Power Option
  19486. * 0b0..POR detect circuit is enabled in VLLS0
  19487. * 0b1..POR detect circuit is disabled in VLLS0
  19488. */
  19489. #define SMC_STOPCTRL_PORPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_PORPO_SHIFT)) & SMC_STOPCTRL_PORPO_MASK)
  19490. #define SMC_STOPCTRL_PSTOPO_MASK (0xC0U)
  19491. #define SMC_STOPCTRL_PSTOPO_SHIFT (6U)
  19492. /*! PSTOPO - Partial Stop Option
  19493. * 0b00..STOP - Normal Stop mode
  19494. * 0b01..PSTOP1 - Partial Stop with both system and bus clocks disabled
  19495. * 0b10..PSTOP2 - Partial Stop with system clock disabled and bus clock enabled
  19496. * 0b11..Reserved
  19497. */
  19498. #define SMC_STOPCTRL_PSTOPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_PSTOPO_SHIFT)) & SMC_STOPCTRL_PSTOPO_MASK)
  19499. /*! @} */
  19500. /*! @name PMSTAT - Power Mode Status register */
  19501. /*! @{ */
  19502. #define SMC_PMSTAT_PMSTAT_MASK (0xFFU)
  19503. #define SMC_PMSTAT_PMSTAT_SHIFT (0U)
  19504. #define SMC_PMSTAT_PMSTAT(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMSTAT_PMSTAT_SHIFT)) & SMC_PMSTAT_PMSTAT_MASK)
  19505. /*! @} */
  19506. /*!
  19507. * @}
  19508. */ /* end of group SMC_Register_Masks */
  19509. /* SMC - Peripheral instance base addresses */
  19510. /** Peripheral SMC base address */
  19511. #define SMC_BASE (0x4007E000u)
  19512. /** Peripheral SMC base pointer */
  19513. #define SMC ((SMC_Type *)SMC_BASE)
  19514. /** Array initializer of SMC peripheral base addresses */
  19515. #define SMC_BASE_ADDRS { SMC_BASE }
  19516. /** Array initializer of SMC peripheral base pointers */
  19517. #define SMC_BASE_PTRS { SMC }
  19518. /*!
  19519. * @}
  19520. */ /* end of group SMC_Peripheral_Access_Layer */
  19521. /* ----------------------------------------------------------------------------
  19522. -- SPI Peripheral Access Layer
  19523. ---------------------------------------------------------------------------- */
  19524. /*!
  19525. * @addtogroup SPI_Peripheral_Access_Layer SPI Peripheral Access Layer
  19526. * @{
  19527. */
  19528. /** SPI - Register Layout Typedef */
  19529. typedef struct {
  19530. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  19531. uint8_t RESERVED_0[4];
  19532. __IO uint32_t TCR; /**< Transfer Count Register, offset: 0x8 */
  19533. union { /* offset: 0xC */
  19534. __IO uint32_t CTAR[2]; /**< Clock and Transfer Attributes Register (In Master Mode), array offset: 0xC, array step: 0x4 */
  19535. __IO uint32_t CTAR_SLAVE[1]; /**< Clock and Transfer Attributes Register (In Slave Mode), array offset: 0xC, array step: 0x4 */
  19536. };
  19537. uint8_t RESERVED_1[24];
  19538. __IO uint32_t SR; /**< Status Register, offset: 0x2C */
  19539. __IO uint32_t RSER; /**< DMA/Interrupt Request Select and Enable Register, offset: 0x30 */
  19540. union { /* offset: 0x34 */
  19541. __IO uint32_t PUSHR; /**< PUSH TX FIFO Register In Master Mode, offset: 0x34 */
  19542. __IO uint32_t PUSHR_SLAVE; /**< PUSH TX FIFO Register In Slave Mode, offset: 0x34 */
  19543. };
  19544. __I uint32_t POPR; /**< POP RX FIFO Register, offset: 0x38 */
  19545. __I uint32_t TXFR0; /**< Transmit FIFO Registers, offset: 0x3C */
  19546. __I uint32_t TXFR1; /**< Transmit FIFO Registers, offset: 0x40 */
  19547. __I uint32_t TXFR2; /**< Transmit FIFO Registers, offset: 0x44 */
  19548. __I uint32_t TXFR3; /**< Transmit FIFO Registers, offset: 0x48 */
  19549. uint8_t RESERVED_2[48];
  19550. __I uint32_t RXFR0; /**< Receive FIFO Registers, offset: 0x7C */
  19551. __I uint32_t RXFR1; /**< Receive FIFO Registers, offset: 0x80 */
  19552. __I uint32_t RXFR2; /**< Receive FIFO Registers, offset: 0x84 */
  19553. __I uint32_t RXFR3; /**< Receive FIFO Registers, offset: 0x88 */
  19554. } SPI_Type;
  19555. /* ----------------------------------------------------------------------------
  19556. -- SPI Register Masks
  19557. ---------------------------------------------------------------------------- */
  19558. /*!
  19559. * @addtogroup SPI_Register_Masks SPI Register Masks
  19560. * @{
  19561. */
  19562. /*! @name MCR - Module Configuration Register */
  19563. /*! @{ */
  19564. #define SPI_MCR_HALT_MASK (0x1U)
  19565. #define SPI_MCR_HALT_SHIFT (0U)
  19566. /*! HALT - Halt
  19567. * 0b0..Start transfers.
  19568. * 0b1..Stop transfers.
  19569. */
  19570. #define SPI_MCR_HALT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_HALT_SHIFT)) & SPI_MCR_HALT_MASK)
  19571. #define SPI_MCR_SMPL_PT_MASK (0x300U)
  19572. #define SPI_MCR_SMPL_PT_SHIFT (8U)
  19573. /*! SMPL_PT - Sample Point
  19574. * 0b00..0 protocol clock cycles between SCK edge and SIN sample
  19575. * 0b01..1 protocol clock cycle between SCK edge and SIN sample
  19576. * 0b10..2 protocol clock cycles between SCK edge and SIN sample
  19577. * 0b11..Reserved
  19578. */
  19579. #define SPI_MCR_SMPL_PT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_SMPL_PT_SHIFT)) & SPI_MCR_SMPL_PT_MASK)
  19580. #define SPI_MCR_CLR_RXF_MASK (0x400U)
  19581. #define SPI_MCR_CLR_RXF_SHIFT (10U)
  19582. /*! CLR_RXF - CLR_RXF
  19583. * 0b0..Do not clear the RX FIFO counter.
  19584. * 0b1..Clear the RX FIFO counter.
  19585. */
  19586. #define SPI_MCR_CLR_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_RXF_SHIFT)) & SPI_MCR_CLR_RXF_MASK)
  19587. #define SPI_MCR_CLR_TXF_MASK (0x800U)
  19588. #define SPI_MCR_CLR_TXF_SHIFT (11U)
  19589. /*! CLR_TXF - Clear TX FIFO
  19590. * 0b0..Do not clear the TX FIFO counter.
  19591. * 0b1..Clear the TX FIFO counter.
  19592. */
  19593. #define SPI_MCR_CLR_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_TXF_SHIFT)) & SPI_MCR_CLR_TXF_MASK)
  19594. #define SPI_MCR_DIS_RXF_MASK (0x1000U)
  19595. #define SPI_MCR_DIS_RXF_SHIFT (12U)
  19596. /*! DIS_RXF - Disable Receive FIFO
  19597. * 0b0..RX FIFO is enabled.
  19598. * 0b1..RX FIFO is disabled.
  19599. */
  19600. #define SPI_MCR_DIS_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_RXF_SHIFT)) & SPI_MCR_DIS_RXF_MASK)
  19601. #define SPI_MCR_DIS_TXF_MASK (0x2000U)
  19602. #define SPI_MCR_DIS_TXF_SHIFT (13U)
  19603. /*! DIS_TXF - Disable Transmit FIFO
  19604. * 0b0..TX FIFO is enabled.
  19605. * 0b1..TX FIFO is disabled.
  19606. */
  19607. #define SPI_MCR_DIS_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_TXF_SHIFT)) & SPI_MCR_DIS_TXF_MASK)
  19608. #define SPI_MCR_MDIS_MASK (0x4000U)
  19609. #define SPI_MCR_MDIS_SHIFT (14U)
  19610. /*! MDIS - Module Disable
  19611. * 0b0..Enables the module clocks.
  19612. * 0b1..Allows external logic to disable the module clocks.
  19613. */
  19614. #define SPI_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MDIS_SHIFT)) & SPI_MCR_MDIS_MASK)
  19615. #define SPI_MCR_DOZE_MASK (0x8000U)
  19616. #define SPI_MCR_DOZE_SHIFT (15U)
  19617. /*! DOZE - Doze Enable
  19618. * 0b0..Doze mode has no effect on the module.
  19619. * 0b1..Doze mode disables the module.
  19620. */
  19621. #define SPI_MCR_DOZE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DOZE_SHIFT)) & SPI_MCR_DOZE_MASK)
  19622. #define SPI_MCR_PCSIS_MASK (0x3F0000U)
  19623. #define SPI_MCR_PCSIS_SHIFT (16U)
  19624. /*! PCSIS - Peripheral Chip Select x Inactive State
  19625. * 0b000000..The inactive state of PCSx is low.
  19626. * 0b000001..The inactive state of PCSx is high.
  19627. */
  19628. #define SPI_MCR_PCSIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSIS_SHIFT)) & SPI_MCR_PCSIS_MASK)
  19629. #define SPI_MCR_ROOE_MASK (0x1000000U)
  19630. #define SPI_MCR_ROOE_SHIFT (24U)
  19631. /*! ROOE - Receive FIFO Overflow Overwrite Enable
  19632. * 0b0..Incoming data is ignored.
  19633. * 0b1..Incoming data is shifted into the shift register.
  19634. */
  19635. #define SPI_MCR_ROOE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_ROOE_SHIFT)) & SPI_MCR_ROOE_MASK)
  19636. #define SPI_MCR_PCSSE_MASK (0x2000000U)
  19637. #define SPI_MCR_PCSSE_SHIFT (25U)
  19638. /*! PCSSE - Peripheral Chip Select Strobe Enable
  19639. * 0b0..PCS5/ PCSS is used as the Peripheral Chip Select[5] signal.
  19640. * 0b1..PCS5/ PCSS is used as an active-low PCS Strobe signal.
  19641. */
  19642. #define SPI_MCR_PCSSE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSSE_SHIFT)) & SPI_MCR_PCSSE_MASK)
  19643. #define SPI_MCR_MTFE_MASK (0x4000000U)
  19644. #define SPI_MCR_MTFE_SHIFT (26U)
  19645. /*! MTFE - Modified Transfer Format Enable
  19646. * 0b0..Modified SPI transfer format disabled.
  19647. * 0b1..Modified SPI transfer format enabled.
  19648. */
  19649. #define SPI_MCR_MTFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MTFE_SHIFT)) & SPI_MCR_MTFE_MASK)
  19650. #define SPI_MCR_FRZ_MASK (0x8000000U)
  19651. #define SPI_MCR_FRZ_SHIFT (27U)
  19652. /*! FRZ - Freeze
  19653. * 0b0..Do not halt serial transfers in Debug mode.
  19654. * 0b1..Halt serial transfers in Debug mode.
  19655. */
  19656. #define SPI_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_FRZ_SHIFT)) & SPI_MCR_FRZ_MASK)
  19657. #define SPI_MCR_DCONF_MASK (0x30000000U)
  19658. #define SPI_MCR_DCONF_SHIFT (28U)
  19659. /*! DCONF - SPI Configuration.
  19660. * 0b00..SPI
  19661. * 0b01..Reserved
  19662. * 0b10..Reserved
  19663. * 0b11..Reserved
  19664. */
  19665. #define SPI_MCR_DCONF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DCONF_SHIFT)) & SPI_MCR_DCONF_MASK)
  19666. #define SPI_MCR_CONT_SCKE_MASK (0x40000000U)
  19667. #define SPI_MCR_CONT_SCKE_SHIFT (30U)
  19668. /*! CONT_SCKE - Continuous SCK Enable
  19669. * 0b0..Continuous SCK disabled.
  19670. * 0b1..Continuous SCK enabled.
  19671. */
  19672. #define SPI_MCR_CONT_SCKE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CONT_SCKE_SHIFT)) & SPI_MCR_CONT_SCKE_MASK)
  19673. #define SPI_MCR_MSTR_MASK (0x80000000U)
  19674. #define SPI_MCR_MSTR_SHIFT (31U)
  19675. /*! MSTR - Master/Slave Mode Select
  19676. * 0b0..Enables Slave mode
  19677. * 0b1..Enables Master mode
  19678. */
  19679. #define SPI_MCR_MSTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MSTR_SHIFT)) & SPI_MCR_MSTR_MASK)
  19680. /*! @} */
  19681. /*! @name TCR - Transfer Count Register */
  19682. /*! @{ */
  19683. #define SPI_TCR_SPI_TCNT_MASK (0xFFFF0000U)
  19684. #define SPI_TCR_SPI_TCNT_SHIFT (16U)
  19685. #define SPI_TCR_SPI_TCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_TCR_SPI_TCNT_SHIFT)) & SPI_TCR_SPI_TCNT_MASK)
  19686. /*! @} */
  19687. /*! @name CTAR - Clock and Transfer Attributes Register (In Master Mode) */
  19688. /*! @{ */
  19689. #define SPI_CTAR_BR_MASK (0xFU)
  19690. #define SPI_CTAR_BR_SHIFT (0U)
  19691. #define SPI_CTAR_BR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_BR_SHIFT)) & SPI_CTAR_BR_MASK)
  19692. #define SPI_CTAR_DT_MASK (0xF0U)
  19693. #define SPI_CTAR_DT_SHIFT (4U)
  19694. #define SPI_CTAR_DT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DT_SHIFT)) & SPI_CTAR_DT_MASK)
  19695. #define SPI_CTAR_ASC_MASK (0xF00U)
  19696. #define SPI_CTAR_ASC_SHIFT (8U)
  19697. #define SPI_CTAR_ASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_ASC_SHIFT)) & SPI_CTAR_ASC_MASK)
  19698. #define SPI_CTAR_CSSCK_MASK (0xF000U)
  19699. #define SPI_CTAR_CSSCK_SHIFT (12U)
  19700. #define SPI_CTAR_CSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CSSCK_SHIFT)) & SPI_CTAR_CSSCK_MASK)
  19701. #define SPI_CTAR_PBR_MASK (0x30000U)
  19702. #define SPI_CTAR_PBR_SHIFT (16U)
  19703. /*! PBR - Baud Rate Prescaler
  19704. * 0b00..Baud Rate Prescaler value is 2.
  19705. * 0b01..Baud Rate Prescaler value is 3.
  19706. * 0b10..Baud Rate Prescaler value is 5.
  19707. * 0b11..Baud Rate Prescaler value is 7.
  19708. */
  19709. #define SPI_CTAR_PBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PBR_SHIFT)) & SPI_CTAR_PBR_MASK)
  19710. #define SPI_CTAR_PDT_MASK (0xC0000U)
  19711. #define SPI_CTAR_PDT_SHIFT (18U)
  19712. /*! PDT - Delay after Transfer Prescaler
  19713. * 0b00..Delay after Transfer Prescaler value is 1.
  19714. * 0b01..Delay after Transfer Prescaler value is 3.
  19715. * 0b10..Delay after Transfer Prescaler value is 5.
  19716. * 0b11..Delay after Transfer Prescaler value is 7.
  19717. */
  19718. #define SPI_CTAR_PDT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PDT_SHIFT)) & SPI_CTAR_PDT_MASK)
  19719. #define SPI_CTAR_PASC_MASK (0x300000U)
  19720. #define SPI_CTAR_PASC_SHIFT (20U)
  19721. /*! PASC - After SCK Delay Prescaler
  19722. * 0b00..Delay after Transfer Prescaler value is 1.
  19723. * 0b01..Delay after Transfer Prescaler value is 3.
  19724. * 0b10..Delay after Transfer Prescaler value is 5.
  19725. * 0b11..Delay after Transfer Prescaler value is 7.
  19726. */
  19727. #define SPI_CTAR_PASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PASC_SHIFT)) & SPI_CTAR_PASC_MASK)
  19728. #define SPI_CTAR_PCSSCK_MASK (0xC00000U)
  19729. #define SPI_CTAR_PCSSCK_SHIFT (22U)
  19730. /*! PCSSCK - PCS to SCK Delay Prescaler
  19731. * 0b00..PCS to SCK Prescaler value is 1.
  19732. * 0b01..PCS to SCK Prescaler value is 3.
  19733. * 0b10..PCS to SCK Prescaler value is 5.
  19734. * 0b11..PCS to SCK Prescaler value is 7.
  19735. */
  19736. #define SPI_CTAR_PCSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PCSSCK_SHIFT)) & SPI_CTAR_PCSSCK_MASK)
  19737. #define SPI_CTAR_LSBFE_MASK (0x1000000U)
  19738. #define SPI_CTAR_LSBFE_SHIFT (24U)
  19739. /*! LSBFE - LSB First
  19740. * 0b0..Data is transferred MSB first.
  19741. * 0b1..Data is transferred LSB first.
  19742. */
  19743. #define SPI_CTAR_LSBFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_LSBFE_SHIFT)) & SPI_CTAR_LSBFE_MASK)
  19744. #define SPI_CTAR_CPHA_MASK (0x2000000U)
  19745. #define SPI_CTAR_CPHA_SHIFT (25U)
  19746. /*! CPHA - Clock Phase
  19747. * 0b0..Data is captured on the leading edge of SCK and changed on the following edge.
  19748. * 0b1..Data is changed on the leading edge of SCK and captured on the following edge.
  19749. */
  19750. #define SPI_CTAR_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPHA_SHIFT)) & SPI_CTAR_CPHA_MASK)
  19751. #define SPI_CTAR_CPOL_MASK (0x4000000U)
  19752. #define SPI_CTAR_CPOL_SHIFT (26U)
  19753. /*! CPOL - Clock Polarity
  19754. * 0b0..The inactive state value of SCK is low.
  19755. * 0b1..The inactive state value of SCK is high.
  19756. */
  19757. #define SPI_CTAR_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPOL_SHIFT)) & SPI_CTAR_CPOL_MASK)
  19758. #define SPI_CTAR_FMSZ_MASK (0x78000000U)
  19759. #define SPI_CTAR_FMSZ_SHIFT (27U)
  19760. #define SPI_CTAR_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_FMSZ_SHIFT)) & SPI_CTAR_FMSZ_MASK)
  19761. #define SPI_CTAR_DBR_MASK (0x80000000U)
  19762. #define SPI_CTAR_DBR_SHIFT (31U)
  19763. /*! DBR - Double Baud Rate
  19764. * 0b0..The baud rate is computed normally with a 50/50 duty cycle.
  19765. * 0b1..The baud rate is doubled with the duty cycle depending on the Baud Rate Prescaler.
  19766. */
  19767. #define SPI_CTAR_DBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DBR_SHIFT)) & SPI_CTAR_DBR_MASK)
  19768. /*! @} */
  19769. /* The count of SPI_CTAR */
  19770. #define SPI_CTAR_COUNT (2U)
  19771. /*! @name CTAR_SLAVE - Clock and Transfer Attributes Register (In Slave Mode) */
  19772. /*! @{ */
  19773. #define SPI_CTAR_SLAVE_CPHA_MASK (0x2000000U)
  19774. #define SPI_CTAR_SLAVE_CPHA_SHIFT (25U)
  19775. /*! CPHA - Clock Phase
  19776. * 0b0..Data is captured on the leading edge of SCK and changed on the following edge.
  19777. * 0b1..Data is changed on the leading edge of SCK and captured on the following edge.
  19778. */
  19779. #define SPI_CTAR_SLAVE_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPHA_SHIFT)) & SPI_CTAR_SLAVE_CPHA_MASK)
  19780. #define SPI_CTAR_SLAVE_CPOL_MASK (0x4000000U)
  19781. #define SPI_CTAR_SLAVE_CPOL_SHIFT (26U)
  19782. /*! CPOL - Clock Polarity
  19783. * 0b0..The inactive state value of SCK is low.
  19784. * 0b1..The inactive state value of SCK is high.
  19785. */
  19786. #define SPI_CTAR_SLAVE_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPOL_SHIFT)) & SPI_CTAR_SLAVE_CPOL_MASK)
  19787. #define SPI_CTAR_SLAVE_FMSZ_MASK (0x78000000U)
  19788. #define SPI_CTAR_SLAVE_FMSZ_SHIFT (27U)
  19789. #define SPI_CTAR_SLAVE_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_FMSZ_SHIFT)) & SPI_CTAR_SLAVE_FMSZ_MASK)
  19790. /*! @} */
  19791. /* The count of SPI_CTAR_SLAVE */
  19792. #define SPI_CTAR_SLAVE_COUNT (1U)
  19793. /*! @name SR - Status Register */
  19794. /*! @{ */
  19795. #define SPI_SR_POPNXTPTR_MASK (0xFU)
  19796. #define SPI_SR_POPNXTPTR_SHIFT (0U)
  19797. #define SPI_SR_POPNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_POPNXTPTR_SHIFT)) & SPI_SR_POPNXTPTR_MASK)
  19798. #define SPI_SR_RXCTR_MASK (0xF0U)
  19799. #define SPI_SR_RXCTR_SHIFT (4U)
  19800. #define SPI_SR_RXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RXCTR_SHIFT)) & SPI_SR_RXCTR_MASK)
  19801. #define SPI_SR_TXNXTPTR_MASK (0xF00U)
  19802. #define SPI_SR_TXNXTPTR_SHIFT (8U)
  19803. #define SPI_SR_TXNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXNXTPTR_SHIFT)) & SPI_SR_TXNXTPTR_MASK)
  19804. #define SPI_SR_TXCTR_MASK (0xF000U)
  19805. #define SPI_SR_TXCTR_SHIFT (12U)
  19806. #define SPI_SR_TXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXCTR_SHIFT)) & SPI_SR_TXCTR_MASK)
  19807. #define SPI_SR_RFDF_MASK (0x20000U)
  19808. #define SPI_SR_RFDF_SHIFT (17U)
  19809. /*! RFDF - Receive FIFO Drain Flag
  19810. * 0b0..RX FIFO is empty.
  19811. * 0b1..RX FIFO is not empty.
  19812. */
  19813. #define SPI_SR_RFDF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFDF_SHIFT)) & SPI_SR_RFDF_MASK)
  19814. #define SPI_SR_RFOF_MASK (0x80000U)
  19815. #define SPI_SR_RFOF_SHIFT (19U)
  19816. /*! RFOF - Receive FIFO Overflow Flag
  19817. * 0b0..No Rx FIFO overflow.
  19818. * 0b1..Rx FIFO overflow has occurred.
  19819. */
  19820. #define SPI_SR_RFOF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFOF_SHIFT)) & SPI_SR_RFOF_MASK)
  19821. #define SPI_SR_TFFF_MASK (0x2000000U)
  19822. #define SPI_SR_TFFF_SHIFT (25U)
  19823. /*! TFFF - Transmit FIFO Fill Flag
  19824. * 0b0..TX FIFO is full.
  19825. * 0b1..TX FIFO is not full.
  19826. */
  19827. #define SPI_SR_TFFF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFFF_SHIFT)) & SPI_SR_TFFF_MASK)
  19828. #define SPI_SR_TFUF_MASK (0x8000000U)
  19829. #define SPI_SR_TFUF_SHIFT (27U)
  19830. /*! TFUF - Transmit FIFO Underflow Flag
  19831. * 0b0..No TX FIFO underflow.
  19832. * 0b1..TX FIFO underflow has occurred.
  19833. */
  19834. #define SPI_SR_TFUF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFUF_SHIFT)) & SPI_SR_TFUF_MASK)
  19835. #define SPI_SR_EOQF_MASK (0x10000000U)
  19836. #define SPI_SR_EOQF_SHIFT (28U)
  19837. /*! EOQF - End of Queue Flag
  19838. * 0b0..EOQ is not set in the executing command.
  19839. * 0b1..EOQ is set in the executing SPI command.
  19840. */
  19841. #define SPI_SR_EOQF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_EOQF_SHIFT)) & SPI_SR_EOQF_MASK)
  19842. #define SPI_SR_TXRXS_MASK (0x40000000U)
  19843. #define SPI_SR_TXRXS_SHIFT (30U)
  19844. /*! TXRXS - TX and RX Status
  19845. * 0b0..Transmit and receive operations are disabled (The module is in Stopped state).
  19846. * 0b1..Transmit and receive operations are enabled (The module is in Running state).
  19847. */
  19848. #define SPI_SR_TXRXS(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXRXS_SHIFT)) & SPI_SR_TXRXS_MASK)
  19849. #define SPI_SR_TCF_MASK (0x80000000U)
  19850. #define SPI_SR_TCF_SHIFT (31U)
  19851. /*! TCF - Transfer Complete Flag
  19852. * 0b0..Transfer not complete.
  19853. * 0b1..Transfer complete.
  19854. */
  19855. #define SPI_SR_TCF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TCF_SHIFT)) & SPI_SR_TCF_MASK)
  19856. /*! @} */
  19857. /*! @name RSER - DMA/Interrupt Request Select and Enable Register */
  19858. /*! @{ */
  19859. #define SPI_RSER_RFDF_DIRS_MASK (0x10000U)
  19860. #define SPI_RSER_RFDF_DIRS_SHIFT (16U)
  19861. /*! RFDF_DIRS - Receive FIFO Drain DMA or Interrupt Request Select
  19862. * 0b0..Interrupt request.
  19863. * 0b1..DMA request.
  19864. */
  19865. #define SPI_RSER_RFDF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_DIRS_SHIFT)) & SPI_RSER_RFDF_DIRS_MASK)
  19866. #define SPI_RSER_RFDF_RE_MASK (0x20000U)
  19867. #define SPI_RSER_RFDF_RE_SHIFT (17U)
  19868. /*! RFDF_RE - Receive FIFO Drain Request Enable
  19869. * 0b0..RFDF interrupt or DMA requests are disabled.
  19870. * 0b1..RFDF interrupt or DMA requests are enabled.
  19871. */
  19872. #define SPI_RSER_RFDF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_RE_SHIFT)) & SPI_RSER_RFDF_RE_MASK)
  19873. #define SPI_RSER_RFOF_RE_MASK (0x80000U)
  19874. #define SPI_RSER_RFOF_RE_SHIFT (19U)
  19875. /*! RFOF_RE - Receive FIFO Overflow Request Enable
  19876. * 0b0..RFOF interrupt requests are disabled.
  19877. * 0b1..RFOF interrupt requests are enabled.
  19878. */
  19879. #define SPI_RSER_RFOF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFOF_RE_SHIFT)) & SPI_RSER_RFOF_RE_MASK)
  19880. #define SPI_RSER_TFFF_DIRS_MASK (0x1000000U)
  19881. #define SPI_RSER_TFFF_DIRS_SHIFT (24U)
  19882. /*! TFFF_DIRS - Transmit FIFO Fill DMA or Interrupt Request Select
  19883. * 0b0..TFFF flag generates interrupt requests.
  19884. * 0b1..TFFF flag generates DMA requests.
  19885. */
  19886. #define SPI_RSER_TFFF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_DIRS_SHIFT)) & SPI_RSER_TFFF_DIRS_MASK)
  19887. #define SPI_RSER_TFFF_RE_MASK (0x2000000U)
  19888. #define SPI_RSER_TFFF_RE_SHIFT (25U)
  19889. /*! TFFF_RE - Transmit FIFO Fill Request Enable
  19890. * 0b0..TFFF interrupts or DMA requests are disabled.
  19891. * 0b1..TFFF interrupts or DMA requests are enabled.
  19892. */
  19893. #define SPI_RSER_TFFF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_RE_SHIFT)) & SPI_RSER_TFFF_RE_MASK)
  19894. #define SPI_RSER_TFUF_RE_MASK (0x8000000U)
  19895. #define SPI_RSER_TFUF_RE_SHIFT (27U)
  19896. /*! TFUF_RE - Transmit FIFO Underflow Request Enable
  19897. * 0b0..TFUF interrupt requests are disabled.
  19898. * 0b1..TFUF interrupt requests are enabled.
  19899. */
  19900. #define SPI_RSER_TFUF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFUF_RE_SHIFT)) & SPI_RSER_TFUF_RE_MASK)
  19901. #define SPI_RSER_EOQF_RE_MASK (0x10000000U)
  19902. #define SPI_RSER_EOQF_RE_SHIFT (28U)
  19903. /*! EOQF_RE - Finished Request Enable
  19904. * 0b0..EOQF interrupt requests are disabled.
  19905. * 0b1..EOQF interrupt requests are enabled.
  19906. */
  19907. #define SPI_RSER_EOQF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_EOQF_RE_SHIFT)) & SPI_RSER_EOQF_RE_MASK)
  19908. #define SPI_RSER_TCF_RE_MASK (0x80000000U)
  19909. #define SPI_RSER_TCF_RE_SHIFT (31U)
  19910. /*! TCF_RE - Transmission Complete Request Enable
  19911. * 0b0..TCF interrupt requests are disabled.
  19912. * 0b1..TCF interrupt requests are enabled.
  19913. */
  19914. #define SPI_RSER_TCF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TCF_RE_SHIFT)) & SPI_RSER_TCF_RE_MASK)
  19915. /*! @} */
  19916. /*! @name PUSHR - PUSH TX FIFO Register In Master Mode */
  19917. /*! @{ */
  19918. #define SPI_PUSHR_TXDATA_MASK (0xFFFFU)
  19919. #define SPI_PUSHR_TXDATA_SHIFT (0U)
  19920. #define SPI_PUSHR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_TXDATA_SHIFT)) & SPI_PUSHR_TXDATA_MASK)
  19921. #define SPI_PUSHR_PCS_MASK (0x3F0000U)
  19922. #define SPI_PUSHR_PCS_SHIFT (16U)
  19923. /*! PCS
  19924. * 0b000000..Negate the PCS[x] signal.
  19925. * 0b000001..Assert the PCS[x] signal.
  19926. */
  19927. #define SPI_PUSHR_PCS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_PCS_SHIFT)) & SPI_PUSHR_PCS_MASK)
  19928. #define SPI_PUSHR_CTCNT_MASK (0x4000000U)
  19929. #define SPI_PUSHR_CTCNT_SHIFT (26U)
  19930. /*! CTCNT - Clear Transfer Counter
  19931. * 0b0..Do not clear the TCR[TCNT] field.
  19932. * 0b1..Clear the TCR[TCNT] field.
  19933. */
  19934. #define SPI_PUSHR_CTCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTCNT_SHIFT)) & SPI_PUSHR_CTCNT_MASK)
  19935. #define SPI_PUSHR_EOQ_MASK (0x8000000U)
  19936. #define SPI_PUSHR_EOQ_SHIFT (27U)
  19937. /*! EOQ - End Of Queue
  19938. * 0b0..The SPI data is not the last data to transfer.
  19939. * 0b1..The SPI data is the last data to transfer.
  19940. */
  19941. #define SPI_PUSHR_EOQ(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_EOQ_SHIFT)) & SPI_PUSHR_EOQ_MASK)
  19942. #define SPI_PUSHR_CTAS_MASK (0x70000000U)
  19943. #define SPI_PUSHR_CTAS_SHIFT (28U)
  19944. /*! CTAS - Clock and Transfer Attributes Select
  19945. * 0b000..CTAR0
  19946. * 0b001..CTAR1
  19947. * 0b010..Reserved
  19948. * 0b011..Reserved
  19949. * 0b100..Reserved
  19950. * 0b101..Reserved
  19951. * 0b110..Reserved
  19952. * 0b111..Reserved
  19953. */
  19954. #define SPI_PUSHR_CTAS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTAS_SHIFT)) & SPI_PUSHR_CTAS_MASK)
  19955. #define SPI_PUSHR_CONT_MASK (0x80000000U)
  19956. #define SPI_PUSHR_CONT_SHIFT (31U)
  19957. /*! CONT - Continuous Peripheral Chip Select Enable
  19958. * 0b0..Return PCSn signals to their inactive state between transfers.
  19959. * 0b1..Keep PCSn signals asserted between transfers.
  19960. */
  19961. #define SPI_PUSHR_CONT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CONT_SHIFT)) & SPI_PUSHR_CONT_MASK)
  19962. /*! @} */
  19963. /*! @name PUSHR_SLAVE - PUSH TX FIFO Register In Slave Mode */
  19964. /*! @{ */
  19965. #define SPI_PUSHR_SLAVE_TXDATA_MASK (0xFFFFU)
  19966. #define SPI_PUSHR_SLAVE_TXDATA_SHIFT (0U)
  19967. #define SPI_PUSHR_SLAVE_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_SLAVE_TXDATA_SHIFT)) & SPI_PUSHR_SLAVE_TXDATA_MASK)
  19968. /*! @} */
  19969. /*! @name POPR - POP RX FIFO Register */
  19970. /*! @{ */
  19971. #define SPI_POPR_RXDATA_MASK (0xFFFFFFFFU)
  19972. #define SPI_POPR_RXDATA_SHIFT (0U)
  19973. #define SPI_POPR_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_POPR_RXDATA_SHIFT)) & SPI_POPR_RXDATA_MASK)
  19974. /*! @} */
  19975. /*! @name TXFR0 - Transmit FIFO Registers */
  19976. /*! @{ */
  19977. #define SPI_TXFR0_TXDATA_MASK (0xFFFFU)
  19978. #define SPI_TXFR0_TXDATA_SHIFT (0U)
  19979. #define SPI_TXFR0_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXDATA_SHIFT)) & SPI_TXFR0_TXDATA_MASK)
  19980. #define SPI_TXFR0_TXCMD_TXDATA_MASK (0xFFFF0000U)
  19981. #define SPI_TXFR0_TXCMD_TXDATA_SHIFT (16U)
  19982. #define SPI_TXFR0_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXCMD_TXDATA_SHIFT)) & SPI_TXFR0_TXCMD_TXDATA_MASK)
  19983. /*! @} */
  19984. /*! @name TXFR1 - Transmit FIFO Registers */
  19985. /*! @{ */
  19986. #define SPI_TXFR1_TXDATA_MASK (0xFFFFU)
  19987. #define SPI_TXFR1_TXDATA_SHIFT (0U)
  19988. #define SPI_TXFR1_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXDATA_SHIFT)) & SPI_TXFR1_TXDATA_MASK)
  19989. #define SPI_TXFR1_TXCMD_TXDATA_MASK (0xFFFF0000U)
  19990. #define SPI_TXFR1_TXCMD_TXDATA_SHIFT (16U)
  19991. #define SPI_TXFR1_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXCMD_TXDATA_SHIFT)) & SPI_TXFR1_TXCMD_TXDATA_MASK)
  19992. /*! @} */
  19993. /*! @name TXFR2 - Transmit FIFO Registers */
  19994. /*! @{ */
  19995. #define SPI_TXFR2_TXDATA_MASK (0xFFFFU)
  19996. #define SPI_TXFR2_TXDATA_SHIFT (0U)
  19997. #define SPI_TXFR2_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXDATA_SHIFT)) & SPI_TXFR2_TXDATA_MASK)
  19998. #define SPI_TXFR2_TXCMD_TXDATA_MASK (0xFFFF0000U)
  19999. #define SPI_TXFR2_TXCMD_TXDATA_SHIFT (16U)
  20000. #define SPI_TXFR2_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXCMD_TXDATA_SHIFT)) & SPI_TXFR2_TXCMD_TXDATA_MASK)
  20001. /*! @} */
  20002. /*! @name TXFR3 - Transmit FIFO Registers */
  20003. /*! @{ */
  20004. #define SPI_TXFR3_TXDATA_MASK (0xFFFFU)
  20005. #define SPI_TXFR3_TXDATA_SHIFT (0U)
  20006. #define SPI_TXFR3_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXDATA_SHIFT)) & SPI_TXFR3_TXDATA_MASK)
  20007. #define SPI_TXFR3_TXCMD_TXDATA_MASK (0xFFFF0000U)
  20008. #define SPI_TXFR3_TXCMD_TXDATA_SHIFT (16U)
  20009. #define SPI_TXFR3_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXCMD_TXDATA_SHIFT)) & SPI_TXFR3_TXCMD_TXDATA_MASK)
  20010. /*! @} */
  20011. /*! @name RXFR0 - Receive FIFO Registers */
  20012. /*! @{ */
  20013. #define SPI_RXFR0_RXDATA_MASK (0xFFFFFFFFU)
  20014. #define SPI_RXFR0_RXDATA_SHIFT (0U)
  20015. #define SPI_RXFR0_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR0_RXDATA_SHIFT)) & SPI_RXFR0_RXDATA_MASK)
  20016. /*! @} */
  20017. /*! @name RXFR1 - Receive FIFO Registers */
  20018. /*! @{ */
  20019. #define SPI_RXFR1_RXDATA_MASK (0xFFFFFFFFU)
  20020. #define SPI_RXFR1_RXDATA_SHIFT (0U)
  20021. #define SPI_RXFR1_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR1_RXDATA_SHIFT)) & SPI_RXFR1_RXDATA_MASK)
  20022. /*! @} */
  20023. /*! @name RXFR2 - Receive FIFO Registers */
  20024. /*! @{ */
  20025. #define SPI_RXFR2_RXDATA_MASK (0xFFFFFFFFU)
  20026. #define SPI_RXFR2_RXDATA_SHIFT (0U)
  20027. #define SPI_RXFR2_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR2_RXDATA_SHIFT)) & SPI_RXFR2_RXDATA_MASK)
  20028. /*! @} */
  20029. /*! @name RXFR3 - Receive FIFO Registers */
  20030. /*! @{ */
  20031. #define SPI_RXFR3_RXDATA_MASK (0xFFFFFFFFU)
  20032. #define SPI_RXFR3_RXDATA_SHIFT (0U)
  20033. #define SPI_RXFR3_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR3_RXDATA_SHIFT)) & SPI_RXFR3_RXDATA_MASK)
  20034. /*! @} */
  20035. /*!
  20036. * @}
  20037. */ /* end of group SPI_Register_Masks */
  20038. /* SPI - Peripheral instance base addresses */
  20039. /** Peripheral SPI0 base address */
  20040. #define SPI0_BASE (0x4002C000u)
  20041. /** Peripheral SPI0 base pointer */
  20042. #define SPI0 ((SPI_Type *)SPI0_BASE)
  20043. /** Peripheral SPI1 base address */
  20044. #define SPI1_BASE (0x4002D000u)
  20045. /** Peripheral SPI1 base pointer */
  20046. #define SPI1 ((SPI_Type *)SPI1_BASE)
  20047. /** Peripheral SPI2 base address */
  20048. #define SPI2_BASE (0x400AC000u)
  20049. /** Peripheral SPI2 base pointer */
  20050. #define SPI2 ((SPI_Type *)SPI2_BASE)
  20051. /** Array initializer of SPI peripheral base addresses */
  20052. #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE }
  20053. /** Array initializer of SPI peripheral base pointers */
  20054. #define SPI_BASE_PTRS { SPI0, SPI1, SPI2 }
  20055. /** Interrupt vectors for the SPI peripheral type */
  20056. #define SPI_IRQS { SPI0_IRQn, SPI1_IRQn, SPI2_IRQn }
  20057. /*!
  20058. * @}
  20059. */ /* end of group SPI_Peripheral_Access_Layer */
  20060. /* ----------------------------------------------------------------------------
  20061. -- SYSMPU Peripheral Access Layer
  20062. ---------------------------------------------------------------------------- */
  20063. /*!
  20064. * @addtogroup SYSMPU_Peripheral_Access_Layer SYSMPU Peripheral Access Layer
  20065. * @{
  20066. */
  20067. /** SYSMPU - Register Layout Typedef */
  20068. typedef struct {
  20069. __IO uint32_t CESR; /**< Control/Error Status Register, offset: 0x0 */
  20070. uint8_t RESERVED_0[12];
  20071. struct { /* offset: 0x10, array step: 0x8 */
  20072. __I uint32_t EAR; /**< Error Address Register, slave port n, array offset: 0x10, array step: 0x8 */
  20073. __I uint32_t EDR; /**< Error Detail Register, slave port n, array offset: 0x14, array step: 0x8 */
  20074. } SP[5];
  20075. uint8_t RESERVED_1[968];
  20076. __IO uint32_t WORD[12][4]; /**< Region Descriptor n, Word 0..Region Descriptor n, Word 3, array offset: 0x400, array step: index*0x10, index2*0x4 */
  20077. uint8_t RESERVED_2[832];
  20078. __IO uint32_t RGDAAC[12]; /**< Region Descriptor Alternate Access Control n, array offset: 0x800, array step: 0x4 */
  20079. } SYSMPU_Type;
  20080. /* ----------------------------------------------------------------------------
  20081. -- SYSMPU Register Masks
  20082. ---------------------------------------------------------------------------- */
  20083. /*!
  20084. * @addtogroup SYSMPU_Register_Masks SYSMPU Register Masks
  20085. * @{
  20086. */
  20087. /*! @name CESR - Control/Error Status Register */
  20088. /*! @{ */
  20089. #define SYSMPU_CESR_VLD_MASK (0x1U)
  20090. #define SYSMPU_CESR_VLD_SHIFT (0U)
  20091. /*! VLD - Valid
  20092. * 0b0..MPU is disabled. All accesses from all bus masters are allowed.
  20093. * 0b1..MPU is enabled
  20094. */
  20095. #define SYSMPU_CESR_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_VLD_SHIFT)) & SYSMPU_CESR_VLD_MASK)
  20096. #define SYSMPU_CESR_NRGD_MASK (0xF00U)
  20097. #define SYSMPU_CESR_NRGD_SHIFT (8U)
  20098. /*! NRGD - Number Of Region Descriptors
  20099. * 0b0000..8 region descriptors
  20100. * 0b0001..12 region descriptors
  20101. * 0b0010..16 region descriptors
  20102. */
  20103. #define SYSMPU_CESR_NRGD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NRGD_SHIFT)) & SYSMPU_CESR_NRGD_MASK)
  20104. #define SYSMPU_CESR_NSP_MASK (0xF000U)
  20105. #define SYSMPU_CESR_NSP_SHIFT (12U)
  20106. #define SYSMPU_CESR_NSP(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NSP_SHIFT)) & SYSMPU_CESR_NSP_MASK)
  20107. #define SYSMPU_CESR_HRL_MASK (0xF0000U)
  20108. #define SYSMPU_CESR_HRL_SHIFT (16U)
  20109. #define SYSMPU_CESR_HRL(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_HRL_SHIFT)) & SYSMPU_CESR_HRL_MASK)
  20110. #define SYSMPU_CESR_SPERR_MASK (0xF8000000U)
  20111. #define SYSMPU_CESR_SPERR_SHIFT (27U)
  20112. /*! SPERR - Slave Port n Error
  20113. * 0b00000..No error has occurred for slave port n.
  20114. * 0b00001..An error has occurred for slave port n.
  20115. */
  20116. #define SYSMPU_CESR_SPERR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_SPERR_SHIFT)) & SYSMPU_CESR_SPERR_MASK)
  20117. /*! @} */
  20118. /*! @name EAR - Error Address Register, slave port n */
  20119. /*! @{ */
  20120. #define SYSMPU_EAR_EADDR_MASK (0xFFFFFFFFU)
  20121. #define SYSMPU_EAR_EADDR_SHIFT (0U)
  20122. #define SYSMPU_EAR_EADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EAR_EADDR_SHIFT)) & SYSMPU_EAR_EADDR_MASK)
  20123. /*! @} */
  20124. /* The count of SYSMPU_EAR */
  20125. #define SYSMPU_EAR_COUNT (5U)
  20126. /*! @name EDR - Error Detail Register, slave port n */
  20127. /*! @{ */
  20128. #define SYSMPU_EDR_ERW_MASK (0x1U)
  20129. #define SYSMPU_EDR_ERW_SHIFT (0U)
  20130. /*! ERW - Error Read/Write
  20131. * 0b0..Read
  20132. * 0b1..Write
  20133. */
  20134. #define SYSMPU_EDR_ERW(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_ERW_SHIFT)) & SYSMPU_EDR_ERW_MASK)
  20135. #define SYSMPU_EDR_EATTR_MASK (0xEU)
  20136. #define SYSMPU_EDR_EATTR_SHIFT (1U)
  20137. /*! EATTR - Error Attributes
  20138. * 0b000..User mode, instruction access
  20139. * 0b001..User mode, data access
  20140. * 0b010..Supervisor mode, instruction access
  20141. * 0b011..Supervisor mode, data access
  20142. */
  20143. #define SYSMPU_EDR_EATTR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EATTR_SHIFT)) & SYSMPU_EDR_EATTR_MASK)
  20144. #define SYSMPU_EDR_EMN_MASK (0xF0U)
  20145. #define SYSMPU_EDR_EMN_SHIFT (4U)
  20146. #define SYSMPU_EDR_EMN(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EMN_SHIFT)) & SYSMPU_EDR_EMN_MASK)
  20147. #define SYSMPU_EDR_EPID_MASK (0xFF00U)
  20148. #define SYSMPU_EDR_EPID_SHIFT (8U)
  20149. #define SYSMPU_EDR_EPID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EPID_SHIFT)) & SYSMPU_EDR_EPID_MASK)
  20150. #define SYSMPU_EDR_EACD_MASK (0xFFFF0000U)
  20151. #define SYSMPU_EDR_EACD_SHIFT (16U)
  20152. #define SYSMPU_EDR_EACD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EACD_SHIFT)) & SYSMPU_EDR_EACD_MASK)
  20153. /*! @} */
  20154. /* The count of SYSMPU_EDR */
  20155. #define SYSMPU_EDR_COUNT (5U)
  20156. /*! @name WORD - Region Descriptor n, Word 0..Region Descriptor n, Word 3 */
  20157. /*! @{ */
  20158. #define SYSMPU_WORD_M0UM_MASK (0x7U)
  20159. #define SYSMPU_WORD_M0UM_SHIFT (0U)
  20160. #define SYSMPU_WORD_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0UM_SHIFT)) & SYSMPU_WORD_M0UM_MASK)
  20161. #define SYSMPU_WORD_VLD_MASK (0x1U)
  20162. #define SYSMPU_WORD_VLD_SHIFT (0U)
  20163. /*! VLD - Valid
  20164. * 0b0..Region descriptor is invalid
  20165. * 0b1..Region descriptor is valid
  20166. */
  20167. #define SYSMPU_WORD_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_VLD_SHIFT)) & SYSMPU_WORD_VLD_MASK)
  20168. #define SYSMPU_WORD_M0SM_MASK (0x18U)
  20169. #define SYSMPU_WORD_M0SM_SHIFT (3U)
  20170. #define SYSMPU_WORD_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0SM_SHIFT)) & SYSMPU_WORD_M0SM_MASK)
  20171. #define SYSMPU_WORD_ENDADDR_MASK (0xFFFFFFE0U)
  20172. #define SYSMPU_WORD_ENDADDR_SHIFT (5U)
  20173. #define SYSMPU_WORD_ENDADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_ENDADDR_SHIFT)) & SYSMPU_WORD_ENDADDR_MASK)
  20174. #define SYSMPU_WORD_M0PE_MASK (0x20U)
  20175. #define SYSMPU_WORD_M0PE_SHIFT (5U)
  20176. #define SYSMPU_WORD_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0PE_SHIFT)) & SYSMPU_WORD_M0PE_MASK)
  20177. #define SYSMPU_WORD_SRTADDR_MASK (0xFFFFFFE0U)
  20178. #define SYSMPU_WORD_SRTADDR_SHIFT (5U)
  20179. #define SYSMPU_WORD_SRTADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_SRTADDR_SHIFT)) & SYSMPU_WORD_SRTADDR_MASK)
  20180. #define SYSMPU_WORD_M1UM_MASK (0x1C0U)
  20181. #define SYSMPU_WORD_M1UM_SHIFT (6U)
  20182. #define SYSMPU_WORD_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1UM_SHIFT)) & SYSMPU_WORD_M1UM_MASK)
  20183. #define SYSMPU_WORD_M1SM_MASK (0x600U)
  20184. #define SYSMPU_WORD_M1SM_SHIFT (9U)
  20185. #define SYSMPU_WORD_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1SM_SHIFT)) & SYSMPU_WORD_M1SM_MASK)
  20186. #define SYSMPU_WORD_M1PE_MASK (0x800U)
  20187. #define SYSMPU_WORD_M1PE_SHIFT (11U)
  20188. #define SYSMPU_WORD_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1PE_SHIFT)) & SYSMPU_WORD_M1PE_MASK)
  20189. #define SYSMPU_WORD_M2UM_MASK (0x7000U)
  20190. #define SYSMPU_WORD_M2UM_SHIFT (12U)
  20191. #define SYSMPU_WORD_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2UM_SHIFT)) & SYSMPU_WORD_M2UM_MASK)
  20192. #define SYSMPU_WORD_M2SM_MASK (0x18000U)
  20193. #define SYSMPU_WORD_M2SM_SHIFT (15U)
  20194. #define SYSMPU_WORD_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2SM_SHIFT)) & SYSMPU_WORD_M2SM_MASK)
  20195. #define SYSMPU_WORD_PIDMASK_MASK (0xFF0000U)
  20196. #define SYSMPU_WORD_PIDMASK_SHIFT (16U)
  20197. #define SYSMPU_WORD_PIDMASK(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PIDMASK_SHIFT)) & SYSMPU_WORD_PIDMASK_MASK)
  20198. #define SYSMPU_WORD_M2PE_MASK (0x20000U)
  20199. #define SYSMPU_WORD_M2PE_SHIFT (17U)
  20200. #define SYSMPU_WORD_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2PE_SHIFT)) & SYSMPU_WORD_M2PE_MASK)
  20201. #define SYSMPU_WORD_M3UM_MASK (0x1C0000U)
  20202. #define SYSMPU_WORD_M3UM_SHIFT (18U)
  20203. /*! M3UM - Bus Master 3 User Mode Access Control
  20204. * 0b000..An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed.
  20205. * 0b001..Allows the given access type to occur
  20206. */
  20207. #define SYSMPU_WORD_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3UM_SHIFT)) & SYSMPU_WORD_M3UM_MASK)
  20208. #define SYSMPU_WORD_M3SM_MASK (0x600000U)
  20209. #define SYSMPU_WORD_M3SM_SHIFT (21U)
  20210. /*! M3SM - Bus Master 3 Supervisor Mode Access Control
  20211. * 0b00..r/w/x; read, write and execute allowed
  20212. * 0b01..r/x; read and execute allowed, but no write
  20213. * 0b10..r/w; read and write allowed, but no execute
  20214. * 0b11..Same as User mode defined in M3UM
  20215. */
  20216. #define SYSMPU_WORD_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3SM_SHIFT)) & SYSMPU_WORD_M3SM_MASK)
  20217. #define SYSMPU_WORD_M3PE_MASK (0x800000U)
  20218. #define SYSMPU_WORD_M3PE_SHIFT (23U)
  20219. /*! M3PE - Bus Master 3 Process Identifier Enable
  20220. * 0b0..Do not include the process identifier in the evaluation
  20221. * 0b1..Include the process identifier and mask (RGDn_WORD3) in the region hit evaluation
  20222. */
  20223. #define SYSMPU_WORD_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3PE_SHIFT)) & SYSMPU_WORD_M3PE_MASK)
  20224. #define SYSMPU_WORD_M4WE_MASK (0x1000000U)
  20225. #define SYSMPU_WORD_M4WE_SHIFT (24U)
  20226. /*! M4WE - Bus Master 4 Write Enable
  20227. * 0b0..Bus master 4 writes terminate with an access error and the write is not performed
  20228. * 0b1..Bus master 4 writes allowed
  20229. */
  20230. #define SYSMPU_WORD_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4WE_SHIFT)) & SYSMPU_WORD_M4WE_MASK)
  20231. #define SYSMPU_WORD_PID_MASK (0xFF000000U)
  20232. #define SYSMPU_WORD_PID_SHIFT (24U)
  20233. #define SYSMPU_WORD_PID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PID_SHIFT)) & SYSMPU_WORD_PID_MASK)
  20234. #define SYSMPU_WORD_M4RE_MASK (0x2000000U)
  20235. #define SYSMPU_WORD_M4RE_SHIFT (25U)
  20236. /*! M4RE - Bus Master 4 Read Enable
  20237. * 0b0..Bus master 4 reads terminate with an access error and the read is not performed
  20238. * 0b1..Bus master 4 reads allowed
  20239. */
  20240. #define SYSMPU_WORD_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4RE_SHIFT)) & SYSMPU_WORD_M4RE_MASK)
  20241. #define SYSMPU_WORD_M5WE_MASK (0x4000000U)
  20242. #define SYSMPU_WORD_M5WE_SHIFT (26U)
  20243. /*! M5WE - Bus Master 5 Write Enable
  20244. * 0b0..Bus master 5 writes terminate with an access error and the write is not performed
  20245. * 0b1..Bus master 5 writes allowed
  20246. */
  20247. #define SYSMPU_WORD_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5WE_SHIFT)) & SYSMPU_WORD_M5WE_MASK)
  20248. #define SYSMPU_WORD_M5RE_MASK (0x8000000U)
  20249. #define SYSMPU_WORD_M5RE_SHIFT (27U)
  20250. /*! M5RE - Bus Master 5 Read Enable
  20251. * 0b0..Bus master 5 reads terminate with an access error and the read is not performed
  20252. * 0b1..Bus master 5 reads allowed
  20253. */
  20254. #define SYSMPU_WORD_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5RE_SHIFT)) & SYSMPU_WORD_M5RE_MASK)
  20255. #define SYSMPU_WORD_M6WE_MASK (0x10000000U)
  20256. #define SYSMPU_WORD_M6WE_SHIFT (28U)
  20257. /*! M6WE - Bus Master 6 Write Enable
  20258. * 0b0..Bus master 6 writes terminate with an access error and the write is not performed
  20259. * 0b1..Bus master 6 writes allowed
  20260. */
  20261. #define SYSMPU_WORD_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6WE_SHIFT)) & SYSMPU_WORD_M6WE_MASK)
  20262. #define SYSMPU_WORD_M6RE_MASK (0x20000000U)
  20263. #define SYSMPU_WORD_M6RE_SHIFT (29U)
  20264. /*! M6RE - Bus Master 6 Read Enable
  20265. * 0b0..Bus master 6 reads terminate with an access error and the read is not performed
  20266. * 0b1..Bus master 6 reads allowed
  20267. */
  20268. #define SYSMPU_WORD_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6RE_SHIFT)) & SYSMPU_WORD_M6RE_MASK)
  20269. #define SYSMPU_WORD_M7WE_MASK (0x40000000U)
  20270. #define SYSMPU_WORD_M7WE_SHIFT (30U)
  20271. /*! M7WE - Bus Master 7 Write Enable
  20272. * 0b0..Bus master 7 writes terminate with an access error and the write is not performed
  20273. * 0b1..Bus master 7 writes allowed
  20274. */
  20275. #define SYSMPU_WORD_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7WE_SHIFT)) & SYSMPU_WORD_M7WE_MASK)
  20276. #define SYSMPU_WORD_M7RE_MASK (0x80000000U)
  20277. #define SYSMPU_WORD_M7RE_SHIFT (31U)
  20278. /*! M7RE - Bus Master 7 Read Enable
  20279. * 0b0..Bus master 7 reads terminate with an access error and the read is not performed
  20280. * 0b1..Bus master 7 reads allowed
  20281. */
  20282. #define SYSMPU_WORD_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7RE_SHIFT)) & SYSMPU_WORD_M7RE_MASK)
  20283. /*! @} */
  20284. /* The count of SYSMPU_WORD */
  20285. #define SYSMPU_WORD_COUNT (12U)
  20286. /* The count of SYSMPU_WORD */
  20287. #define SYSMPU_WORD_COUNT2 (4U)
  20288. /*! @name RGDAAC - Region Descriptor Alternate Access Control n */
  20289. /*! @{ */
  20290. #define SYSMPU_RGDAAC_M0UM_MASK (0x7U)
  20291. #define SYSMPU_RGDAAC_M0UM_SHIFT (0U)
  20292. #define SYSMPU_RGDAAC_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0UM_SHIFT)) & SYSMPU_RGDAAC_M0UM_MASK)
  20293. #define SYSMPU_RGDAAC_M0SM_MASK (0x18U)
  20294. #define SYSMPU_RGDAAC_M0SM_SHIFT (3U)
  20295. #define SYSMPU_RGDAAC_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0SM_SHIFT)) & SYSMPU_RGDAAC_M0SM_MASK)
  20296. #define SYSMPU_RGDAAC_M0PE_MASK (0x20U)
  20297. #define SYSMPU_RGDAAC_M0PE_SHIFT (5U)
  20298. #define SYSMPU_RGDAAC_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0PE_SHIFT)) & SYSMPU_RGDAAC_M0PE_MASK)
  20299. #define SYSMPU_RGDAAC_M1UM_MASK (0x1C0U)
  20300. #define SYSMPU_RGDAAC_M1UM_SHIFT (6U)
  20301. #define SYSMPU_RGDAAC_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1UM_SHIFT)) & SYSMPU_RGDAAC_M1UM_MASK)
  20302. #define SYSMPU_RGDAAC_M1SM_MASK (0x600U)
  20303. #define SYSMPU_RGDAAC_M1SM_SHIFT (9U)
  20304. #define SYSMPU_RGDAAC_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1SM_SHIFT)) & SYSMPU_RGDAAC_M1SM_MASK)
  20305. #define SYSMPU_RGDAAC_M1PE_MASK (0x800U)
  20306. #define SYSMPU_RGDAAC_M1PE_SHIFT (11U)
  20307. #define SYSMPU_RGDAAC_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1PE_SHIFT)) & SYSMPU_RGDAAC_M1PE_MASK)
  20308. #define SYSMPU_RGDAAC_M2UM_MASK (0x7000U)
  20309. #define SYSMPU_RGDAAC_M2UM_SHIFT (12U)
  20310. #define SYSMPU_RGDAAC_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2UM_SHIFT)) & SYSMPU_RGDAAC_M2UM_MASK)
  20311. #define SYSMPU_RGDAAC_M2SM_MASK (0x18000U)
  20312. #define SYSMPU_RGDAAC_M2SM_SHIFT (15U)
  20313. #define SYSMPU_RGDAAC_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2SM_SHIFT)) & SYSMPU_RGDAAC_M2SM_MASK)
  20314. #define SYSMPU_RGDAAC_M2PE_MASK (0x20000U)
  20315. #define SYSMPU_RGDAAC_M2PE_SHIFT (17U)
  20316. #define SYSMPU_RGDAAC_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2PE_SHIFT)) & SYSMPU_RGDAAC_M2PE_MASK)
  20317. #define SYSMPU_RGDAAC_M3UM_MASK (0x1C0000U)
  20318. #define SYSMPU_RGDAAC_M3UM_SHIFT (18U)
  20319. /*! M3UM - Bus Master 3 User Mode Access Control
  20320. * 0b000..An attempted access of that mode may be terminated with an access error (if not allowed by another descriptor) and the access not performed.
  20321. * 0b001..Allows the given access type to occur
  20322. */
  20323. #define SYSMPU_RGDAAC_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3UM_SHIFT)) & SYSMPU_RGDAAC_M3UM_MASK)
  20324. #define SYSMPU_RGDAAC_M3SM_MASK (0x600000U)
  20325. #define SYSMPU_RGDAAC_M3SM_SHIFT (21U)
  20326. /*! M3SM - Bus Master 3 Supervisor Mode Access Control
  20327. * 0b00..r/w/x; read, write and execute allowed
  20328. * 0b01..r/x; read and execute allowed, but no write
  20329. * 0b10..r/w; read and write allowed, but no execute
  20330. * 0b11..Same as User mode defined in M3UM
  20331. */
  20332. #define SYSMPU_RGDAAC_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3SM_SHIFT)) & SYSMPU_RGDAAC_M3SM_MASK)
  20333. #define SYSMPU_RGDAAC_M3PE_MASK (0x800000U)
  20334. #define SYSMPU_RGDAAC_M3PE_SHIFT (23U)
  20335. /*! M3PE - Bus Master 3 Process Identifier Enable
  20336. * 0b0..Do not include the process identifier in the evaluation
  20337. * 0b1..Include the process identifier and mask (RGDn.RGDAAC) in the region hit evaluation
  20338. */
  20339. #define SYSMPU_RGDAAC_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3PE_SHIFT)) & SYSMPU_RGDAAC_M3PE_MASK)
  20340. #define SYSMPU_RGDAAC_M4WE_MASK (0x1000000U)
  20341. #define SYSMPU_RGDAAC_M4WE_SHIFT (24U)
  20342. /*! M4WE - Bus Master 4 Write Enable
  20343. * 0b0..Bus master 4 writes terminate with an access error and the write is not performed
  20344. * 0b1..Bus master 4 writes allowed
  20345. */
  20346. #define SYSMPU_RGDAAC_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4WE_SHIFT)) & SYSMPU_RGDAAC_M4WE_MASK)
  20347. #define SYSMPU_RGDAAC_M4RE_MASK (0x2000000U)
  20348. #define SYSMPU_RGDAAC_M4RE_SHIFT (25U)
  20349. /*! M4RE - Bus Master 4 Read Enable
  20350. * 0b0..Bus master 4 reads terminate with an access error and the read is not performed
  20351. * 0b1..Bus master 4 reads allowed
  20352. */
  20353. #define SYSMPU_RGDAAC_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4RE_SHIFT)) & SYSMPU_RGDAAC_M4RE_MASK)
  20354. #define SYSMPU_RGDAAC_M5WE_MASK (0x4000000U)
  20355. #define SYSMPU_RGDAAC_M5WE_SHIFT (26U)
  20356. /*! M5WE - Bus Master 5 Write Enable
  20357. * 0b0..Bus master 5 writes terminate with an access error and the write is not performed
  20358. * 0b1..Bus master 5 writes allowed
  20359. */
  20360. #define SYSMPU_RGDAAC_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5WE_SHIFT)) & SYSMPU_RGDAAC_M5WE_MASK)
  20361. #define SYSMPU_RGDAAC_M5RE_MASK (0x8000000U)
  20362. #define SYSMPU_RGDAAC_M5RE_SHIFT (27U)
  20363. /*! M5RE - Bus Master 5 Read Enable
  20364. * 0b0..Bus master 5 reads terminate with an access error and the read is not performed
  20365. * 0b1..Bus master 5 reads allowed
  20366. */
  20367. #define SYSMPU_RGDAAC_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5RE_SHIFT)) & SYSMPU_RGDAAC_M5RE_MASK)
  20368. #define SYSMPU_RGDAAC_M6WE_MASK (0x10000000U)
  20369. #define SYSMPU_RGDAAC_M6WE_SHIFT (28U)
  20370. /*! M6WE - Bus Master 6 Write Enable
  20371. * 0b0..Bus master 6 writes terminate with an access error and the write is not performed
  20372. * 0b1..Bus master 6 writes allowed
  20373. */
  20374. #define SYSMPU_RGDAAC_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6WE_SHIFT)) & SYSMPU_RGDAAC_M6WE_MASK)
  20375. #define SYSMPU_RGDAAC_M6RE_MASK (0x20000000U)
  20376. #define SYSMPU_RGDAAC_M6RE_SHIFT (29U)
  20377. /*! M6RE - Bus Master 6 Read Enable
  20378. * 0b0..Bus master 6 reads terminate with an access error and the read is not performed
  20379. * 0b1..Bus master 6 reads allowed
  20380. */
  20381. #define SYSMPU_RGDAAC_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6RE_SHIFT)) & SYSMPU_RGDAAC_M6RE_MASK)
  20382. #define SYSMPU_RGDAAC_M7WE_MASK (0x40000000U)
  20383. #define SYSMPU_RGDAAC_M7WE_SHIFT (30U)
  20384. /*! M7WE - Bus Master 7 Write Enable
  20385. * 0b0..Bus master 7 writes terminate with an access error and the write is not performed
  20386. * 0b1..Bus master 7 writes allowed
  20387. */
  20388. #define SYSMPU_RGDAAC_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7WE_SHIFT)) & SYSMPU_RGDAAC_M7WE_MASK)
  20389. #define SYSMPU_RGDAAC_M7RE_MASK (0x80000000U)
  20390. #define SYSMPU_RGDAAC_M7RE_SHIFT (31U)
  20391. /*! M7RE - Bus Master 7 Read Enable
  20392. * 0b0..Bus master 7 reads terminate with an access error and the read is not performed
  20393. * 0b1..Bus master 7 reads allowed
  20394. */
  20395. #define SYSMPU_RGDAAC_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7RE_SHIFT)) & SYSMPU_RGDAAC_M7RE_MASK)
  20396. /*! @} */
  20397. /* The count of SYSMPU_RGDAAC */
  20398. #define SYSMPU_RGDAAC_COUNT (12U)
  20399. /*!
  20400. * @}
  20401. */ /* end of group SYSMPU_Register_Masks */
  20402. /* SYSMPU - Peripheral instance base addresses */
  20403. /** Peripheral SYSMPU base address */
  20404. #define SYSMPU_BASE (0x4000D000u)
  20405. /** Peripheral SYSMPU base pointer */
  20406. #define SYSMPU ((SYSMPU_Type *)SYSMPU_BASE)
  20407. /** Array initializer of SYSMPU peripheral base addresses */
  20408. #define SYSMPU_BASE_ADDRS { SYSMPU_BASE }
  20409. /** Array initializer of SYSMPU peripheral base pointers */
  20410. #define SYSMPU_BASE_PTRS { SYSMPU }
  20411. /*!
  20412. * @}
  20413. */ /* end of group SYSMPU_Peripheral_Access_Layer */
  20414. /* ----------------------------------------------------------------------------
  20415. -- TRNG Peripheral Access Layer
  20416. ---------------------------------------------------------------------------- */
  20417. /*!
  20418. * @addtogroup TRNG_Peripheral_Access_Layer TRNG Peripheral Access Layer
  20419. * @{
  20420. */
  20421. /** TRNG - Register Layout Typedef */
  20422. typedef struct {
  20423. __IO uint32_t MCTL; /**< RNG Miscellaneous Control Register, offset: 0x0 */
  20424. __IO uint32_t SCMISC; /**< RNG Statistical Check Miscellaneous Register, offset: 0x4 */
  20425. __IO uint32_t PKRRNG; /**< RNG Poker Range Register, offset: 0x8 */
  20426. union { /* offset: 0xC */
  20427. __IO uint32_t PKRMAX; /**< RNG Poker Maximum Limit Register, offset: 0xC */
  20428. __I uint32_t PKRSQ; /**< RNG Poker Square Calculation Result Register, offset: 0xC */
  20429. };
  20430. __IO uint32_t SDCTL; /**< RNG Seed Control Register, offset: 0x10 */
  20431. union { /* offset: 0x14 */
  20432. __IO uint32_t SBLIM; /**< RNG Sparse Bit Limit Register, offset: 0x14 */
  20433. __I uint32_t TOTSAM; /**< RNG Total Samples Register, offset: 0x14 */
  20434. };
  20435. __IO uint32_t FRQMIN; /**< RNG Frequency Count Minimum Limit Register, offset: 0x18 */
  20436. union { /* offset: 0x1C */
  20437. __I uint32_t FRQCNT; /**< RNG Frequency Count Register, offset: 0x1C */
  20438. __IO uint32_t FRQMAX; /**< RNG Frequency Count Maximum Limit Register, offset: 0x1C */
  20439. };
  20440. union { /* offset: 0x20 */
  20441. __I uint32_t SCMC; /**< RNG Statistical Check Monobit Count Register, offset: 0x20 */
  20442. __IO uint32_t SCML; /**< RNG Statistical Check Monobit Limit Register, offset: 0x20 */
  20443. };
  20444. union { /* offset: 0x24 */
  20445. __I uint32_t SCR1C; /**< RNG Statistical Check Run Length 1 Count Register, offset: 0x24 */
  20446. __IO uint32_t SCR1L; /**< RNG Statistical Check Run Length 1 Limit Register, offset: 0x24 */
  20447. };
  20448. union { /* offset: 0x28 */
  20449. __I uint32_t SCR2C; /**< RNG Statistical Check Run Length 2 Count Register, offset: 0x28 */
  20450. __IO uint32_t SCR2L; /**< RNG Statistical Check Run Length 2 Limit Register, offset: 0x28 */
  20451. };
  20452. union { /* offset: 0x2C */
  20453. __I uint32_t SCR3C; /**< RNG Statistical Check Run Length 3 Count Register, offset: 0x2C */
  20454. __IO uint32_t SCR3L; /**< RNG Statistical Check Run Length 3 Limit Register, offset: 0x2C */
  20455. };
  20456. union { /* offset: 0x30 */
  20457. __I uint32_t SCR4C; /**< RNG Statistical Check Run Length 4 Count Register, offset: 0x30 */
  20458. __IO uint32_t SCR4L; /**< RNG Statistical Check Run Length 4 Limit Register, offset: 0x30 */
  20459. };
  20460. union { /* offset: 0x34 */
  20461. __I uint32_t SCR5C; /**< RNG Statistical Check Run Length 5 Count Register, offset: 0x34 */
  20462. __IO uint32_t SCR5L; /**< RNG Statistical Check Run Length 5 Limit Register, offset: 0x34 */
  20463. };
  20464. union { /* offset: 0x38 */
  20465. __I uint32_t SCR6PC; /**< RNG Statistical Check Run Length 6+ Count Register, offset: 0x38 */
  20466. __IO uint32_t SCR6PL; /**< RNG Statistical Check Run Length 6+ Limit Register, offset: 0x38 */
  20467. };
  20468. __I uint32_t STATUS; /**< RNG Status Register, offset: 0x3C */
  20469. __I uint32_t ENT[16]; /**< RNG TRNG Entropy Read Register, array offset: 0x40, array step: 0x4 */
  20470. __I uint32_t PKRCNT10; /**< RNG Statistical Check Poker Count 1 and 0 Register, offset: 0x80 */
  20471. __I uint32_t PKRCNT32; /**< RNG Statistical Check Poker Count 3 and 2 Register, offset: 0x84 */
  20472. __I uint32_t PKRCNT54; /**< RNG Statistical Check Poker Count 5 and 4 Register, offset: 0x88 */
  20473. __I uint32_t PKRCNT76; /**< RNG Statistical Check Poker Count 7 and 6 Register, offset: 0x8C */
  20474. __I uint32_t PKRCNT98; /**< RNG Statistical Check Poker Count 9 and 8 Register, offset: 0x90 */
  20475. __I uint32_t PKRCNTBA; /**< RNG Statistical Check Poker Count B and A Register, offset: 0x94 */
  20476. __I uint32_t PKRCNTDC; /**< RNG Statistical Check Poker Count D and C Register, offset: 0x98 */
  20477. __I uint32_t PKRCNTFE; /**< RNG Statistical Check Poker Count F and E Register, offset: 0x9C */
  20478. uint8_t RESERVED_0[16];
  20479. __IO uint32_t SEC_CFG; /**< RNG Security Configuration Register, offset: 0xB0 */
  20480. __IO uint32_t INT_CTRL; /**< RNG Interrupt Control Register, offset: 0xB4 */
  20481. __IO uint32_t INT_MASK; /**< RNG Mask Register, offset: 0xB8 */
  20482. __IO uint32_t INT_STATUS; /**< RNG Interrupt Status Register, offset: 0xBC */
  20483. uint8_t RESERVED_1[48];
  20484. __I uint32_t VID1; /**< RNG Version ID Register (MS), offset: 0xF0 */
  20485. __I uint32_t VID2; /**< RNG Version ID Register (LS), offset: 0xF4 */
  20486. } TRNG_Type;
  20487. /* ----------------------------------------------------------------------------
  20488. -- TRNG Register Masks
  20489. ---------------------------------------------------------------------------- */
  20490. /*!
  20491. * @addtogroup TRNG_Register_Masks TRNG Register Masks
  20492. * @{
  20493. */
  20494. /*! @name MCTL - RNG Miscellaneous Control Register */
  20495. /*! @{ */
  20496. #define TRNG_MCTL_SAMP_MODE_MASK (0x3U)
  20497. #define TRNG_MCTL_SAMP_MODE_SHIFT (0U)
  20498. /*! SAMP_MODE
  20499. * 0b00..use Von Neumann data into both Entropy shifter and Statistical Checker
  20500. * 0b01..use raw data into both Entropy shifter and Statistical Checker
  20501. * 0b10..use Von Neumann data into Entropy shifter. Use raw data into Statistical Checker
  20502. * 0b11..reserved.
  20503. */
  20504. #define TRNG_MCTL_SAMP_MODE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_SAMP_MODE_SHIFT)) & TRNG_MCTL_SAMP_MODE_MASK)
  20505. #define TRNG_MCTL_OSC_DIV_MASK (0xCU)
  20506. #define TRNG_MCTL_OSC_DIV_SHIFT (2U)
  20507. /*! OSC_DIV
  20508. * 0b00..use ring oscillator with no divide
  20509. * 0b01..use ring oscillator divided-by-2
  20510. * 0b10..use ring oscillator divided-by-4
  20511. * 0b11..use ring oscillator divided-by-8
  20512. */
  20513. #define TRNG_MCTL_OSC_DIV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_OSC_DIV_SHIFT)) & TRNG_MCTL_OSC_DIV_MASK)
  20514. #define TRNG_MCTL_UNUSED_MASK (0x10U)
  20515. #define TRNG_MCTL_UNUSED_SHIFT (4U)
  20516. #define TRNG_MCTL_UNUSED(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_UNUSED_SHIFT)) & TRNG_MCTL_UNUSED_MASK)
  20517. #define TRNG_MCTL_TRNG_ACC_MASK (0x20U)
  20518. #define TRNG_MCTL_TRNG_ACC_SHIFT (5U)
  20519. #define TRNG_MCTL_TRNG_ACC(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TRNG_ACC_SHIFT)) & TRNG_MCTL_TRNG_ACC_MASK)
  20520. #define TRNG_MCTL_RST_DEF_MASK (0x40U)
  20521. #define TRNG_MCTL_RST_DEF_SHIFT (6U)
  20522. #define TRNG_MCTL_RST_DEF(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_RST_DEF_SHIFT)) & TRNG_MCTL_RST_DEF_MASK)
  20523. #define TRNG_MCTL_FOR_SCLK_MASK (0x80U)
  20524. #define TRNG_MCTL_FOR_SCLK_SHIFT (7U)
  20525. #define TRNG_MCTL_FOR_SCLK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FOR_SCLK_SHIFT)) & TRNG_MCTL_FOR_SCLK_MASK)
  20526. #define TRNG_MCTL_FCT_FAIL_MASK (0x100U)
  20527. #define TRNG_MCTL_FCT_FAIL_SHIFT (8U)
  20528. #define TRNG_MCTL_FCT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_FAIL_SHIFT)) & TRNG_MCTL_FCT_FAIL_MASK)
  20529. #define TRNG_MCTL_FCT_VAL_MASK (0x200U)
  20530. #define TRNG_MCTL_FCT_VAL_SHIFT (9U)
  20531. #define TRNG_MCTL_FCT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_VAL_SHIFT)) & TRNG_MCTL_FCT_VAL_MASK)
  20532. #define TRNG_MCTL_ENT_VAL_MASK (0x400U)
  20533. #define TRNG_MCTL_ENT_VAL_SHIFT (10U)
  20534. #define TRNG_MCTL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ENT_VAL_SHIFT)) & TRNG_MCTL_ENT_VAL_MASK)
  20535. #define TRNG_MCTL_TST_OUT_MASK (0x800U)
  20536. #define TRNG_MCTL_TST_OUT_SHIFT (11U)
  20537. #define TRNG_MCTL_TST_OUT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TST_OUT_SHIFT)) & TRNG_MCTL_TST_OUT_MASK)
  20538. #define TRNG_MCTL_ERR_MASK (0x1000U)
  20539. #define TRNG_MCTL_ERR_SHIFT (12U)
  20540. #define TRNG_MCTL_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ERR_SHIFT)) & TRNG_MCTL_ERR_MASK)
  20541. #define TRNG_MCTL_TSTOP_OK_MASK (0x2000U)
  20542. #define TRNG_MCTL_TSTOP_OK_SHIFT (13U)
  20543. #define TRNG_MCTL_TSTOP_OK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TSTOP_OK_SHIFT)) & TRNG_MCTL_TSTOP_OK_MASK)
  20544. #define TRNG_MCTL_PRGM_MASK (0x10000U)
  20545. #define TRNG_MCTL_PRGM_SHIFT (16U)
  20546. #define TRNG_MCTL_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_PRGM_SHIFT)) & TRNG_MCTL_PRGM_MASK)
  20547. /*! @} */
  20548. /*! @name SCMISC - RNG Statistical Check Miscellaneous Register */
  20549. /*! @{ */
  20550. #define TRNG_SCMISC_LRUN_MAX_MASK (0xFFU)
  20551. #define TRNG_SCMISC_LRUN_MAX_SHIFT (0U)
  20552. #define TRNG_SCMISC_LRUN_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_LRUN_MAX_SHIFT)) & TRNG_SCMISC_LRUN_MAX_MASK)
  20553. #define TRNG_SCMISC_RTY_CT_MASK (0xF0000U)
  20554. #define TRNG_SCMISC_RTY_CT_SHIFT (16U)
  20555. #define TRNG_SCMISC_RTY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_RTY_CT_SHIFT)) & TRNG_SCMISC_RTY_CT_MASK)
  20556. /*! @} */
  20557. /*! @name PKRRNG - RNG Poker Range Register */
  20558. /*! @{ */
  20559. #define TRNG_PKRRNG_PKR_RNG_MASK (0xFFFFU)
  20560. #define TRNG_PKRRNG_PKR_RNG_SHIFT (0U)
  20561. #define TRNG_PKRRNG_PKR_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRRNG_PKR_RNG_SHIFT)) & TRNG_PKRRNG_PKR_RNG_MASK)
  20562. /*! @} */
  20563. /*! @name PKRMAX - RNG Poker Maximum Limit Register */
  20564. /*! @{ */
  20565. #define TRNG_PKRMAX_PKR_MAX_MASK (0xFFFFFFU)
  20566. #define TRNG_PKRMAX_PKR_MAX_SHIFT (0U)
  20567. #define TRNG_PKRMAX_PKR_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRMAX_PKR_MAX_SHIFT)) & TRNG_PKRMAX_PKR_MAX_MASK)
  20568. /*! @} */
  20569. /*! @name PKRSQ - RNG Poker Square Calculation Result Register */
  20570. /*! @{ */
  20571. #define TRNG_PKRSQ_PKR_SQ_MASK (0xFFFFFFU)
  20572. #define TRNG_PKRSQ_PKR_SQ_SHIFT (0U)
  20573. #define TRNG_PKRSQ_PKR_SQ(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRSQ_PKR_SQ_SHIFT)) & TRNG_PKRSQ_PKR_SQ_MASK)
  20574. /*! @} */
  20575. /*! @name SDCTL - RNG Seed Control Register */
  20576. /*! @{ */
  20577. #define TRNG_SDCTL_SAMP_SIZE_MASK (0xFFFFU)
  20578. #define TRNG_SDCTL_SAMP_SIZE_SHIFT (0U)
  20579. #define TRNG_SDCTL_SAMP_SIZE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_SAMP_SIZE_SHIFT)) & TRNG_SDCTL_SAMP_SIZE_MASK)
  20580. #define TRNG_SDCTL_ENT_DLY_MASK (0xFFFF0000U)
  20581. #define TRNG_SDCTL_ENT_DLY_SHIFT (16U)
  20582. #define TRNG_SDCTL_ENT_DLY(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_ENT_DLY_SHIFT)) & TRNG_SDCTL_ENT_DLY_MASK)
  20583. /*! @} */
  20584. /*! @name SBLIM - RNG Sparse Bit Limit Register */
  20585. /*! @{ */
  20586. #define TRNG_SBLIM_SB_LIM_MASK (0x3FFU)
  20587. #define TRNG_SBLIM_SB_LIM_SHIFT (0U)
  20588. #define TRNG_SBLIM_SB_LIM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SBLIM_SB_LIM_SHIFT)) & TRNG_SBLIM_SB_LIM_MASK)
  20589. /*! @} */
  20590. /*! @name TOTSAM - RNG Total Samples Register */
  20591. /*! @{ */
  20592. #define TRNG_TOTSAM_TOT_SAM_MASK (0xFFFFFU)
  20593. #define TRNG_TOTSAM_TOT_SAM_SHIFT (0U)
  20594. #define TRNG_TOTSAM_TOT_SAM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_TOTSAM_TOT_SAM_SHIFT)) & TRNG_TOTSAM_TOT_SAM_MASK)
  20595. /*! @} */
  20596. /*! @name FRQMIN - RNG Frequency Count Minimum Limit Register */
  20597. /*! @{ */
  20598. #define TRNG_FRQMIN_FRQ_MIN_MASK (0x3FFFFFU)
  20599. #define TRNG_FRQMIN_FRQ_MIN_SHIFT (0U)
  20600. #define TRNG_FRQMIN_FRQ_MIN(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMIN_FRQ_MIN_SHIFT)) & TRNG_FRQMIN_FRQ_MIN_MASK)
  20601. /*! @} */
  20602. /*! @name FRQCNT - RNG Frequency Count Register */
  20603. /*! @{ */
  20604. #define TRNG_FRQCNT_FRQ_CT_MASK (0x3FFFFFU)
  20605. #define TRNG_FRQCNT_FRQ_CT_SHIFT (0U)
  20606. #define TRNG_FRQCNT_FRQ_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQCNT_FRQ_CT_SHIFT)) & TRNG_FRQCNT_FRQ_CT_MASK)
  20607. /*! @} */
  20608. /*! @name FRQMAX - RNG Frequency Count Maximum Limit Register */
  20609. /*! @{ */
  20610. #define TRNG_FRQMAX_FRQ_MAX_MASK (0x3FFFFFU)
  20611. #define TRNG_FRQMAX_FRQ_MAX_SHIFT (0U)
  20612. #define TRNG_FRQMAX_FRQ_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMAX_FRQ_MAX_SHIFT)) & TRNG_FRQMAX_FRQ_MAX_MASK)
  20613. /*! @} */
  20614. /*! @name SCMC - RNG Statistical Check Monobit Count Register */
  20615. /*! @{ */
  20616. #define TRNG_SCMC_MONO_CT_MASK (0xFFFFU)
  20617. #define TRNG_SCMC_MONO_CT_SHIFT (0U)
  20618. #define TRNG_SCMC_MONO_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMC_MONO_CT_SHIFT)) & TRNG_SCMC_MONO_CT_MASK)
  20619. /*! @} */
  20620. /*! @name SCML - RNG Statistical Check Monobit Limit Register */
  20621. /*! @{ */
  20622. #define TRNG_SCML_MONO_MAX_MASK (0xFFFFU)
  20623. #define TRNG_SCML_MONO_MAX_SHIFT (0U)
  20624. #define TRNG_SCML_MONO_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_MAX_SHIFT)) & TRNG_SCML_MONO_MAX_MASK)
  20625. #define TRNG_SCML_MONO_RNG_MASK (0xFFFF0000U)
  20626. #define TRNG_SCML_MONO_RNG_SHIFT (16U)
  20627. #define TRNG_SCML_MONO_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_RNG_SHIFT)) & TRNG_SCML_MONO_RNG_MASK)
  20628. /*! @} */
  20629. /*! @name SCR1C - RNG Statistical Check Run Length 1 Count Register */
  20630. /*! @{ */
  20631. #define TRNG_SCR1C_R1_0_CT_MASK (0x7FFFU)
  20632. #define TRNG_SCR1C_R1_0_CT_SHIFT (0U)
  20633. #define TRNG_SCR1C_R1_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_0_CT_SHIFT)) & TRNG_SCR1C_R1_0_CT_MASK)
  20634. #define TRNG_SCR1C_R1_1_CT_MASK (0x7FFF0000U)
  20635. #define TRNG_SCR1C_R1_1_CT_SHIFT (16U)
  20636. #define TRNG_SCR1C_R1_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_1_CT_SHIFT)) & TRNG_SCR1C_R1_1_CT_MASK)
  20637. /*! @} */
  20638. /*! @name SCR1L - RNG Statistical Check Run Length 1 Limit Register */
  20639. /*! @{ */
  20640. #define TRNG_SCR1L_RUN1_MAX_MASK (0x7FFFU)
  20641. #define TRNG_SCR1L_RUN1_MAX_SHIFT (0U)
  20642. #define TRNG_SCR1L_RUN1_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_MAX_SHIFT)) & TRNG_SCR1L_RUN1_MAX_MASK)
  20643. #define TRNG_SCR1L_RUN1_RNG_MASK (0x7FFF0000U)
  20644. #define TRNG_SCR1L_RUN1_RNG_SHIFT (16U)
  20645. #define TRNG_SCR1L_RUN1_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_RNG_SHIFT)) & TRNG_SCR1L_RUN1_RNG_MASK)
  20646. /*! @} */
  20647. /*! @name SCR2C - RNG Statistical Check Run Length 2 Count Register */
  20648. /*! @{ */
  20649. #define TRNG_SCR2C_R2_0_CT_MASK (0x3FFFU)
  20650. #define TRNG_SCR2C_R2_0_CT_SHIFT (0U)
  20651. #define TRNG_SCR2C_R2_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_0_CT_SHIFT)) & TRNG_SCR2C_R2_0_CT_MASK)
  20652. #define TRNG_SCR2C_R2_1_CT_MASK (0x3FFF0000U)
  20653. #define TRNG_SCR2C_R2_1_CT_SHIFT (16U)
  20654. #define TRNG_SCR2C_R2_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_1_CT_SHIFT)) & TRNG_SCR2C_R2_1_CT_MASK)
  20655. /*! @} */
  20656. /*! @name SCR2L - RNG Statistical Check Run Length 2 Limit Register */
  20657. /*! @{ */
  20658. #define TRNG_SCR2L_RUN2_MAX_MASK (0x3FFFU)
  20659. #define TRNG_SCR2L_RUN2_MAX_SHIFT (0U)
  20660. #define TRNG_SCR2L_RUN2_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_MAX_SHIFT)) & TRNG_SCR2L_RUN2_MAX_MASK)
  20661. #define TRNG_SCR2L_RUN2_RNG_MASK (0x3FFF0000U)
  20662. #define TRNG_SCR2L_RUN2_RNG_SHIFT (16U)
  20663. #define TRNG_SCR2L_RUN2_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_RNG_SHIFT)) & TRNG_SCR2L_RUN2_RNG_MASK)
  20664. /*! @} */
  20665. /*! @name SCR3C - RNG Statistical Check Run Length 3 Count Register */
  20666. /*! @{ */
  20667. #define TRNG_SCR3C_R3_0_CT_MASK (0x1FFFU)
  20668. #define TRNG_SCR3C_R3_0_CT_SHIFT (0U)
  20669. #define TRNG_SCR3C_R3_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_0_CT_SHIFT)) & TRNG_SCR3C_R3_0_CT_MASK)
  20670. #define TRNG_SCR3C_R3_1_CT_MASK (0x1FFF0000U)
  20671. #define TRNG_SCR3C_R3_1_CT_SHIFT (16U)
  20672. #define TRNG_SCR3C_R3_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_1_CT_SHIFT)) & TRNG_SCR3C_R3_1_CT_MASK)
  20673. /*! @} */
  20674. /*! @name SCR3L - RNG Statistical Check Run Length 3 Limit Register */
  20675. /*! @{ */
  20676. #define TRNG_SCR3L_RUN3_MAX_MASK (0x1FFFU)
  20677. #define TRNG_SCR3L_RUN3_MAX_SHIFT (0U)
  20678. #define TRNG_SCR3L_RUN3_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_MAX_SHIFT)) & TRNG_SCR3L_RUN3_MAX_MASK)
  20679. #define TRNG_SCR3L_RUN3_RNG_MASK (0x1FFF0000U)
  20680. #define TRNG_SCR3L_RUN3_RNG_SHIFT (16U)
  20681. #define TRNG_SCR3L_RUN3_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_RNG_SHIFT)) & TRNG_SCR3L_RUN3_RNG_MASK)
  20682. /*! @} */
  20683. /*! @name SCR4C - RNG Statistical Check Run Length 4 Count Register */
  20684. /*! @{ */
  20685. #define TRNG_SCR4C_R4_0_CT_MASK (0xFFFU)
  20686. #define TRNG_SCR4C_R4_0_CT_SHIFT (0U)
  20687. #define TRNG_SCR4C_R4_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_0_CT_SHIFT)) & TRNG_SCR4C_R4_0_CT_MASK)
  20688. #define TRNG_SCR4C_R4_1_CT_MASK (0xFFF0000U)
  20689. #define TRNG_SCR4C_R4_1_CT_SHIFT (16U)
  20690. #define TRNG_SCR4C_R4_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_1_CT_SHIFT)) & TRNG_SCR4C_R4_1_CT_MASK)
  20691. /*! @} */
  20692. /*! @name SCR4L - RNG Statistical Check Run Length 4 Limit Register */
  20693. /*! @{ */
  20694. #define TRNG_SCR4L_RUN4_MAX_MASK (0xFFFU)
  20695. #define TRNG_SCR4L_RUN4_MAX_SHIFT (0U)
  20696. #define TRNG_SCR4L_RUN4_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_MAX_SHIFT)) & TRNG_SCR4L_RUN4_MAX_MASK)
  20697. #define TRNG_SCR4L_RUN4_RNG_MASK (0xFFF0000U)
  20698. #define TRNG_SCR4L_RUN4_RNG_SHIFT (16U)
  20699. #define TRNG_SCR4L_RUN4_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_RNG_SHIFT)) & TRNG_SCR4L_RUN4_RNG_MASK)
  20700. /*! @} */
  20701. /*! @name SCR5C - RNG Statistical Check Run Length 5 Count Register */
  20702. /*! @{ */
  20703. #define TRNG_SCR5C_R5_0_CT_MASK (0x7FFU)
  20704. #define TRNG_SCR5C_R5_0_CT_SHIFT (0U)
  20705. #define TRNG_SCR5C_R5_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_0_CT_SHIFT)) & TRNG_SCR5C_R5_0_CT_MASK)
  20706. #define TRNG_SCR5C_R5_1_CT_MASK (0x7FF0000U)
  20707. #define TRNG_SCR5C_R5_1_CT_SHIFT (16U)
  20708. #define TRNG_SCR5C_R5_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_1_CT_SHIFT)) & TRNG_SCR5C_R5_1_CT_MASK)
  20709. /*! @} */
  20710. /*! @name SCR5L - RNG Statistical Check Run Length 5 Limit Register */
  20711. /*! @{ */
  20712. #define TRNG_SCR5L_RUN5_MAX_MASK (0x7FFU)
  20713. #define TRNG_SCR5L_RUN5_MAX_SHIFT (0U)
  20714. #define TRNG_SCR5L_RUN5_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_MAX_SHIFT)) & TRNG_SCR5L_RUN5_MAX_MASK)
  20715. #define TRNG_SCR5L_RUN5_RNG_MASK (0x7FF0000U)
  20716. #define TRNG_SCR5L_RUN5_RNG_SHIFT (16U)
  20717. #define TRNG_SCR5L_RUN5_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_RNG_SHIFT)) & TRNG_SCR5L_RUN5_RNG_MASK)
  20718. /*! @} */
  20719. /*! @name SCR6PC - RNG Statistical Check Run Length 6+ Count Register */
  20720. /*! @{ */
  20721. #define TRNG_SCR6PC_R6P_0_CT_MASK (0x7FFU)
  20722. #define TRNG_SCR6PC_R6P_0_CT_SHIFT (0U)
  20723. #define TRNG_SCR6PC_R6P_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_0_CT_SHIFT)) & TRNG_SCR6PC_R6P_0_CT_MASK)
  20724. #define TRNG_SCR6PC_R6P_1_CT_MASK (0x7FF0000U)
  20725. #define TRNG_SCR6PC_R6P_1_CT_SHIFT (16U)
  20726. #define TRNG_SCR6PC_R6P_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_1_CT_SHIFT)) & TRNG_SCR6PC_R6P_1_CT_MASK)
  20727. /*! @} */
  20728. /*! @name SCR6PL - RNG Statistical Check Run Length 6+ Limit Register */
  20729. /*! @{ */
  20730. #define TRNG_SCR6PL_RUN6P_MAX_MASK (0x7FFU)
  20731. #define TRNG_SCR6PL_RUN6P_MAX_SHIFT (0U)
  20732. #define TRNG_SCR6PL_RUN6P_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_MAX_SHIFT)) & TRNG_SCR6PL_RUN6P_MAX_MASK)
  20733. #define TRNG_SCR6PL_RUN6P_RNG_MASK (0x7FF0000U)
  20734. #define TRNG_SCR6PL_RUN6P_RNG_SHIFT (16U)
  20735. #define TRNG_SCR6PL_RUN6P_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_RNG_SHIFT)) & TRNG_SCR6PL_RUN6P_RNG_MASK)
  20736. /*! @} */
  20737. /*! @name STATUS - RNG Status Register */
  20738. /*! @{ */
  20739. #define TRNG_STATUS_TF1BR0_MASK (0x1U)
  20740. #define TRNG_STATUS_TF1BR0_SHIFT (0U)
  20741. #define TRNG_STATUS_TF1BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR0_SHIFT)) & TRNG_STATUS_TF1BR0_MASK)
  20742. #define TRNG_STATUS_TF1BR1_MASK (0x2U)
  20743. #define TRNG_STATUS_TF1BR1_SHIFT (1U)
  20744. #define TRNG_STATUS_TF1BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR1_SHIFT)) & TRNG_STATUS_TF1BR1_MASK)
  20745. #define TRNG_STATUS_TF2BR0_MASK (0x4U)
  20746. #define TRNG_STATUS_TF2BR0_SHIFT (2U)
  20747. #define TRNG_STATUS_TF2BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR0_SHIFT)) & TRNG_STATUS_TF2BR0_MASK)
  20748. #define TRNG_STATUS_TF2BR1_MASK (0x8U)
  20749. #define TRNG_STATUS_TF2BR1_SHIFT (3U)
  20750. #define TRNG_STATUS_TF2BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR1_SHIFT)) & TRNG_STATUS_TF2BR1_MASK)
  20751. #define TRNG_STATUS_TF3BR0_MASK (0x10U)
  20752. #define TRNG_STATUS_TF3BR0_SHIFT (4U)
  20753. #define TRNG_STATUS_TF3BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR0_SHIFT)) & TRNG_STATUS_TF3BR0_MASK)
  20754. #define TRNG_STATUS_TF3BR1_MASK (0x20U)
  20755. #define TRNG_STATUS_TF3BR1_SHIFT (5U)
  20756. #define TRNG_STATUS_TF3BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR1_SHIFT)) & TRNG_STATUS_TF3BR1_MASK)
  20757. #define TRNG_STATUS_TF4BR0_MASK (0x40U)
  20758. #define TRNG_STATUS_TF4BR0_SHIFT (6U)
  20759. #define TRNG_STATUS_TF4BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR0_SHIFT)) & TRNG_STATUS_TF4BR0_MASK)
  20760. #define TRNG_STATUS_TF4BR1_MASK (0x80U)
  20761. #define TRNG_STATUS_TF4BR1_SHIFT (7U)
  20762. #define TRNG_STATUS_TF4BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR1_SHIFT)) & TRNG_STATUS_TF4BR1_MASK)
  20763. #define TRNG_STATUS_TF5BR0_MASK (0x100U)
  20764. #define TRNG_STATUS_TF5BR0_SHIFT (8U)
  20765. #define TRNG_STATUS_TF5BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR0_SHIFT)) & TRNG_STATUS_TF5BR0_MASK)
  20766. #define TRNG_STATUS_TF5BR1_MASK (0x200U)
  20767. #define TRNG_STATUS_TF5BR1_SHIFT (9U)
  20768. #define TRNG_STATUS_TF5BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR1_SHIFT)) & TRNG_STATUS_TF5BR1_MASK)
  20769. #define TRNG_STATUS_TF6PBR0_MASK (0x400U)
  20770. #define TRNG_STATUS_TF6PBR0_SHIFT (10U)
  20771. #define TRNG_STATUS_TF6PBR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR0_SHIFT)) & TRNG_STATUS_TF6PBR0_MASK)
  20772. #define TRNG_STATUS_TF6PBR1_MASK (0x800U)
  20773. #define TRNG_STATUS_TF6PBR1_SHIFT (11U)
  20774. #define TRNG_STATUS_TF6PBR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR1_SHIFT)) & TRNG_STATUS_TF6PBR1_MASK)
  20775. #define TRNG_STATUS_TFSB_MASK (0x1000U)
  20776. #define TRNG_STATUS_TFSB_SHIFT (12U)
  20777. #define TRNG_STATUS_TFSB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFSB_SHIFT)) & TRNG_STATUS_TFSB_MASK)
  20778. #define TRNG_STATUS_TFLR_MASK (0x2000U)
  20779. #define TRNG_STATUS_TFLR_SHIFT (13U)
  20780. #define TRNG_STATUS_TFLR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFLR_SHIFT)) & TRNG_STATUS_TFLR_MASK)
  20781. #define TRNG_STATUS_TFP_MASK (0x4000U)
  20782. #define TRNG_STATUS_TFP_SHIFT (14U)
  20783. #define TRNG_STATUS_TFP(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFP_SHIFT)) & TRNG_STATUS_TFP_MASK)
  20784. #define TRNG_STATUS_TFMB_MASK (0x8000U)
  20785. #define TRNG_STATUS_TFMB_SHIFT (15U)
  20786. #define TRNG_STATUS_TFMB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFMB_SHIFT)) & TRNG_STATUS_TFMB_MASK)
  20787. #define TRNG_STATUS_RETRY_CT_MASK (0xF0000U)
  20788. #define TRNG_STATUS_RETRY_CT_SHIFT (16U)
  20789. #define TRNG_STATUS_RETRY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_RETRY_CT_SHIFT)) & TRNG_STATUS_RETRY_CT_MASK)
  20790. /*! @} */
  20791. /*! @name ENT - RNG TRNG Entropy Read Register */
  20792. /*! @{ */
  20793. #define TRNG_ENT_ENT_MASK (0xFFFFFFFFU)
  20794. #define TRNG_ENT_ENT_SHIFT (0U)
  20795. #define TRNG_ENT_ENT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_ENT_ENT_SHIFT)) & TRNG_ENT_ENT_MASK)
  20796. /*! @} */
  20797. /* The count of TRNG_ENT */
  20798. #define TRNG_ENT_COUNT (16U)
  20799. /*! @name PKRCNT10 - RNG Statistical Check Poker Count 1 and 0 Register */
  20800. /*! @{ */
  20801. #define TRNG_PKRCNT10_PKR_0_CT_MASK (0xFFFFU)
  20802. #define TRNG_PKRCNT10_PKR_0_CT_SHIFT (0U)
  20803. #define TRNG_PKRCNT10_PKR_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_0_CT_SHIFT)) & TRNG_PKRCNT10_PKR_0_CT_MASK)
  20804. #define TRNG_PKRCNT10_PKR_1_CT_MASK (0xFFFF0000U)
  20805. #define TRNG_PKRCNT10_PKR_1_CT_SHIFT (16U)
  20806. #define TRNG_PKRCNT10_PKR_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_1_CT_SHIFT)) & TRNG_PKRCNT10_PKR_1_CT_MASK)
  20807. /*! @} */
  20808. /*! @name PKRCNT32 - RNG Statistical Check Poker Count 3 and 2 Register */
  20809. /*! @{ */
  20810. #define TRNG_PKRCNT32_PKR_2_CT_MASK (0xFFFFU)
  20811. #define TRNG_PKRCNT32_PKR_2_CT_SHIFT (0U)
  20812. #define TRNG_PKRCNT32_PKR_2_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_2_CT_SHIFT)) & TRNG_PKRCNT32_PKR_2_CT_MASK)
  20813. #define TRNG_PKRCNT32_PKR_3_CT_MASK (0xFFFF0000U)
  20814. #define TRNG_PKRCNT32_PKR_3_CT_SHIFT (16U)
  20815. #define TRNG_PKRCNT32_PKR_3_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_3_CT_SHIFT)) & TRNG_PKRCNT32_PKR_3_CT_MASK)
  20816. /*! @} */
  20817. /*! @name PKRCNT54 - RNG Statistical Check Poker Count 5 and 4 Register */
  20818. /*! @{ */
  20819. #define TRNG_PKRCNT54_PKR_4_CT_MASK (0xFFFFU)
  20820. #define TRNG_PKRCNT54_PKR_4_CT_SHIFT (0U)
  20821. #define TRNG_PKRCNT54_PKR_4_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_4_CT_SHIFT)) & TRNG_PKRCNT54_PKR_4_CT_MASK)
  20822. #define TRNG_PKRCNT54_PKR_5_CT_MASK (0xFFFF0000U)
  20823. #define TRNG_PKRCNT54_PKR_5_CT_SHIFT (16U)
  20824. #define TRNG_PKRCNT54_PKR_5_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_5_CT_SHIFT)) & TRNG_PKRCNT54_PKR_5_CT_MASK)
  20825. /*! @} */
  20826. /*! @name PKRCNT76 - RNG Statistical Check Poker Count 7 and 6 Register */
  20827. /*! @{ */
  20828. #define TRNG_PKRCNT76_PKR_6_CT_MASK (0xFFFFU)
  20829. #define TRNG_PKRCNT76_PKR_6_CT_SHIFT (0U)
  20830. #define TRNG_PKRCNT76_PKR_6_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_6_CT_SHIFT)) & TRNG_PKRCNT76_PKR_6_CT_MASK)
  20831. #define TRNG_PKRCNT76_PKR_7_CT_MASK (0xFFFF0000U)
  20832. #define TRNG_PKRCNT76_PKR_7_CT_SHIFT (16U)
  20833. #define TRNG_PKRCNT76_PKR_7_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_7_CT_SHIFT)) & TRNG_PKRCNT76_PKR_7_CT_MASK)
  20834. /*! @} */
  20835. /*! @name PKRCNT98 - RNG Statistical Check Poker Count 9 and 8 Register */
  20836. /*! @{ */
  20837. #define TRNG_PKRCNT98_PKR_8_CT_MASK (0xFFFFU)
  20838. #define TRNG_PKRCNT98_PKR_8_CT_SHIFT (0U)
  20839. #define TRNG_PKRCNT98_PKR_8_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_8_CT_SHIFT)) & TRNG_PKRCNT98_PKR_8_CT_MASK)
  20840. #define TRNG_PKRCNT98_PKR_9_CT_MASK (0xFFFF0000U)
  20841. #define TRNG_PKRCNT98_PKR_9_CT_SHIFT (16U)
  20842. #define TRNG_PKRCNT98_PKR_9_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_9_CT_SHIFT)) & TRNG_PKRCNT98_PKR_9_CT_MASK)
  20843. /*! @} */
  20844. /*! @name PKRCNTBA - RNG Statistical Check Poker Count B and A Register */
  20845. /*! @{ */
  20846. #define TRNG_PKRCNTBA_PKR_A_CT_MASK (0xFFFFU)
  20847. #define TRNG_PKRCNTBA_PKR_A_CT_SHIFT (0U)
  20848. #define TRNG_PKRCNTBA_PKR_A_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_A_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_A_CT_MASK)
  20849. #define TRNG_PKRCNTBA_PKR_B_CT_MASK (0xFFFF0000U)
  20850. #define TRNG_PKRCNTBA_PKR_B_CT_SHIFT (16U)
  20851. #define TRNG_PKRCNTBA_PKR_B_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_B_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_B_CT_MASK)
  20852. /*! @} */
  20853. /*! @name PKRCNTDC - RNG Statistical Check Poker Count D and C Register */
  20854. /*! @{ */
  20855. #define TRNG_PKRCNTDC_PKR_C_CT_MASK (0xFFFFU)
  20856. #define TRNG_PKRCNTDC_PKR_C_CT_SHIFT (0U)
  20857. #define TRNG_PKRCNTDC_PKR_C_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_C_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_C_CT_MASK)
  20858. #define TRNG_PKRCNTDC_PKR_D_CT_MASK (0xFFFF0000U)
  20859. #define TRNG_PKRCNTDC_PKR_D_CT_SHIFT (16U)
  20860. #define TRNG_PKRCNTDC_PKR_D_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_D_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_D_CT_MASK)
  20861. /*! @} */
  20862. /*! @name PKRCNTFE - RNG Statistical Check Poker Count F and E Register */
  20863. /*! @{ */
  20864. #define TRNG_PKRCNTFE_PKR_E_CT_MASK (0xFFFFU)
  20865. #define TRNG_PKRCNTFE_PKR_E_CT_SHIFT (0U)
  20866. #define TRNG_PKRCNTFE_PKR_E_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_E_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_E_CT_MASK)
  20867. #define TRNG_PKRCNTFE_PKR_F_CT_MASK (0xFFFF0000U)
  20868. #define TRNG_PKRCNTFE_PKR_F_CT_SHIFT (16U)
  20869. #define TRNG_PKRCNTFE_PKR_F_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_F_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_F_CT_MASK)
  20870. /*! @} */
  20871. /*! @name SEC_CFG - RNG Security Configuration Register */
  20872. /*! @{ */
  20873. #define TRNG_SEC_CFG_SH0_MASK (0x1U)
  20874. #define TRNG_SEC_CFG_SH0_SHIFT (0U)
  20875. /*! SH0
  20876. * 0b0..See DRNG version.
  20877. * 0b1..See DRNG version.
  20878. */
  20879. #define TRNG_SEC_CFG_SH0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_SH0_SHIFT)) & TRNG_SEC_CFG_SH0_MASK)
  20880. #define TRNG_SEC_CFG_NO_PRGM_MASK (0x2U)
  20881. #define TRNG_SEC_CFG_NO_PRGM_SHIFT (1U)
  20882. /*! NO_PRGM
  20883. * 0b0..Programability of registers controlled only by the RNG Miscellaneous Control Register's access mode bit.
  20884. * 0b1..Overides RNG Miscellaneous Control Register access mode and prevents TRNG register programming.
  20885. */
  20886. #define TRNG_SEC_CFG_NO_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_NO_PRGM_SHIFT)) & TRNG_SEC_CFG_NO_PRGM_MASK)
  20887. #define TRNG_SEC_CFG_SK_VAL_MASK (0x4U)
  20888. #define TRNG_SEC_CFG_SK_VAL_SHIFT (2U)
  20889. /*! SK_VAL
  20890. * 0b0..See DRNG version.
  20891. * 0b1..See DRNG version.
  20892. */
  20893. #define TRNG_SEC_CFG_SK_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_SK_VAL_SHIFT)) & TRNG_SEC_CFG_SK_VAL_MASK)
  20894. /*! @} */
  20895. /*! @name INT_CTRL - RNG Interrupt Control Register */
  20896. /*! @{ */
  20897. #define TRNG_INT_CTRL_HW_ERR_MASK (0x1U)
  20898. #define TRNG_INT_CTRL_HW_ERR_SHIFT (0U)
  20899. /*! HW_ERR
  20900. * 0b0..Corresponding bit of INT_STATUS cleared.
  20901. * 0b1..Corresponding bit of INT_STATUS active.
  20902. */
  20903. #define TRNG_INT_CTRL_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_HW_ERR_SHIFT)) & TRNG_INT_CTRL_HW_ERR_MASK)
  20904. #define TRNG_INT_CTRL_ENT_VAL_MASK (0x2U)
  20905. #define TRNG_INT_CTRL_ENT_VAL_SHIFT (1U)
  20906. /*! ENT_VAL
  20907. * 0b0..Same behavior as bit 0 above.
  20908. * 0b1..Same behavior as bit 0 above.
  20909. */
  20910. #define TRNG_INT_CTRL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_ENT_VAL_SHIFT)) & TRNG_INT_CTRL_ENT_VAL_MASK)
  20911. #define TRNG_INT_CTRL_FRQ_CT_FAIL_MASK (0x4U)
  20912. #define TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT (2U)
  20913. /*! FRQ_CT_FAIL
  20914. * 0b0..Same behavior as bit 0 above.
  20915. * 0b1..Same behavior as bit 0 above.
  20916. */
  20917. #define TRNG_INT_CTRL_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_CTRL_FRQ_CT_FAIL_MASK)
  20918. #define TRNG_INT_CTRL_UNUSED_MASK (0xFFFFFFF8U)
  20919. #define TRNG_INT_CTRL_UNUSED_SHIFT (3U)
  20920. #define TRNG_INT_CTRL_UNUSED(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_UNUSED_SHIFT)) & TRNG_INT_CTRL_UNUSED_MASK)
  20921. /*! @} */
  20922. /*! @name INT_MASK - RNG Mask Register */
  20923. /*! @{ */
  20924. #define TRNG_INT_MASK_HW_ERR_MASK (0x1U)
  20925. #define TRNG_INT_MASK_HW_ERR_SHIFT (0U)
  20926. /*! HW_ERR
  20927. * 0b0..Corresponding interrupt of INT_STATUS is masked.
  20928. * 0b1..Corresponding bit of INT_STATUS is active.
  20929. */
  20930. #define TRNG_INT_MASK_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_HW_ERR_SHIFT)) & TRNG_INT_MASK_HW_ERR_MASK)
  20931. #define TRNG_INT_MASK_ENT_VAL_MASK (0x2U)
  20932. #define TRNG_INT_MASK_ENT_VAL_SHIFT (1U)
  20933. /*! ENT_VAL
  20934. * 0b0..Same behavior as bit 0 above.
  20935. * 0b1..Same behavior as bit 0 above.
  20936. */
  20937. #define TRNG_INT_MASK_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_ENT_VAL_SHIFT)) & TRNG_INT_MASK_ENT_VAL_MASK)
  20938. #define TRNG_INT_MASK_FRQ_CT_FAIL_MASK (0x4U)
  20939. #define TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT (2U)
  20940. /*! FRQ_CT_FAIL
  20941. * 0b0..Same behavior as bit 0 above.
  20942. * 0b1..Same behavior as bit 0 above.
  20943. */
  20944. #define TRNG_INT_MASK_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_MASK_FRQ_CT_FAIL_MASK)
  20945. /*! @} */
  20946. /*! @name INT_STATUS - RNG Interrupt Status Register */
  20947. /*! @{ */
  20948. #define TRNG_INT_STATUS_HW_ERR_MASK (0x1U)
  20949. #define TRNG_INT_STATUS_HW_ERR_SHIFT (0U)
  20950. /*! HW_ERR
  20951. * 0b0..no error
  20952. * 0b1..error detected.
  20953. */
  20954. #define TRNG_INT_STATUS_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_HW_ERR_SHIFT)) & TRNG_INT_STATUS_HW_ERR_MASK)
  20955. #define TRNG_INT_STATUS_ENT_VAL_MASK (0x2U)
  20956. #define TRNG_INT_STATUS_ENT_VAL_SHIFT (1U)
  20957. /*! ENT_VAL
  20958. * 0b0..Busy generation entropy. Any value read is invalid.
  20959. * 0b1..TRNG can be stopped and entropy is valid if read.
  20960. */
  20961. #define TRNG_INT_STATUS_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_ENT_VAL_SHIFT)) & TRNG_INT_STATUS_ENT_VAL_MASK)
  20962. #define TRNG_INT_STATUS_FRQ_CT_FAIL_MASK (0x4U)
  20963. #define TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT (2U)
  20964. /*! FRQ_CT_FAIL
  20965. * 0b0..No hardware nor self test frequency errors.
  20966. * 0b1..The frequency counter has detected a failure.
  20967. */
  20968. #define TRNG_INT_STATUS_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_STATUS_FRQ_CT_FAIL_MASK)
  20969. /*! @} */
  20970. /*! @name VID1 - RNG Version ID Register (MS) */
  20971. /*! @{ */
  20972. #define TRNG_VID1_RNG_MIN_REV_MASK (0xFFU)
  20973. #define TRNG_VID1_RNG_MIN_REV_SHIFT (0U)
  20974. /*! RNG_MIN_REV
  20975. * 0b00000000..Minor revision number for TRNG.
  20976. */
  20977. #define TRNG_VID1_RNG_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_MIN_REV_SHIFT)) & TRNG_VID1_RNG_MIN_REV_MASK)
  20978. #define TRNG_VID1_RNG_MAJ_REV_MASK (0xFF00U)
  20979. #define TRNG_VID1_RNG_MAJ_REV_SHIFT (8U)
  20980. /*! RNG_MAJ_REV
  20981. * 0b00000001..Major revision number for TRNG.
  20982. */
  20983. #define TRNG_VID1_RNG_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_MAJ_REV_SHIFT)) & TRNG_VID1_RNG_MAJ_REV_MASK)
  20984. #define TRNG_VID1_RNG_IP_ID_MASK (0xFFFF0000U)
  20985. #define TRNG_VID1_RNG_IP_ID_SHIFT (16U)
  20986. #define TRNG_VID1_RNG_IP_ID(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_IP_ID_SHIFT)) & TRNG_VID1_RNG_IP_ID_MASK)
  20987. /*! @} */
  20988. /*! @name VID2 - RNG Version ID Register (LS) */
  20989. /*! @{ */
  20990. #define TRNG_VID2_RNG_CONFIG_OPT_MASK (0xFFU)
  20991. #define TRNG_VID2_RNG_CONFIG_OPT_SHIFT (0U)
  20992. /*! RNG_CONFIG_OPT
  20993. * 0b00000000..TRNG_CONFIG_OPT for TRNG.
  20994. */
  20995. #define TRNG_VID2_RNG_CONFIG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_CONFIG_OPT_SHIFT)) & TRNG_VID2_RNG_CONFIG_OPT_MASK)
  20996. #define TRNG_VID2_RNG_ECO_REV_MASK (0xFF00U)
  20997. #define TRNG_VID2_RNG_ECO_REV_SHIFT (8U)
  20998. /*! RNG_ECO_REV
  20999. * 0b00000000..TRNG_ECO_REV for TRNG.
  21000. */
  21001. #define TRNG_VID2_RNG_ECO_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_ECO_REV_SHIFT)) & TRNG_VID2_RNG_ECO_REV_MASK)
  21002. #define TRNG_VID2_RNG_INTG_OPT_MASK (0xFF0000U)
  21003. #define TRNG_VID2_RNG_INTG_OPT_SHIFT (16U)
  21004. /*! RNG_INTG_OPT
  21005. * 0b00000000..INTG_OPT for TRNG.
  21006. */
  21007. #define TRNG_VID2_RNG_INTG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_INTG_OPT_SHIFT)) & TRNG_VID2_RNG_INTG_OPT_MASK)
  21008. #define TRNG_VID2_RNG_ERA_MASK (0xFF000000U)
  21009. #define TRNG_VID2_RNG_ERA_SHIFT (24U)
  21010. /*! RNG_ERA
  21011. * 0b00000000..COMPILE_OPT for TRNG.
  21012. */
  21013. #define TRNG_VID2_RNG_ERA(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_ERA_SHIFT)) & TRNG_VID2_RNG_ERA_MASK)
  21014. /*! @} */
  21015. /*!
  21016. * @}
  21017. */ /* end of group TRNG_Register_Masks */
  21018. /* TRNG - Peripheral instance base addresses */
  21019. /** Peripheral TRNG0 base address */
  21020. #define TRNG0_BASE (0x400A0000u)
  21021. /** Peripheral TRNG0 base pointer */
  21022. #define TRNG0 ((TRNG_Type *)TRNG0_BASE)
  21023. /** Array initializer of TRNG peripheral base addresses */
  21024. #define TRNG_BASE_ADDRS { TRNG0_BASE }
  21025. /** Array initializer of TRNG peripheral base pointers */
  21026. #define TRNG_BASE_PTRS { TRNG0 }
  21027. /** Interrupt vectors for the TRNG peripheral type */
  21028. #define TRNG_IRQS { TRNG0_IRQn }
  21029. /*!
  21030. * @}
  21031. */ /* end of group TRNG_Peripheral_Access_Layer */
  21032. /* ----------------------------------------------------------------------------
  21033. -- UART Peripheral Access Layer
  21034. ---------------------------------------------------------------------------- */
  21035. /*!
  21036. * @addtogroup UART_Peripheral_Access_Layer UART Peripheral Access Layer
  21037. * @{
  21038. */
  21039. /** UART - Register Layout Typedef */
  21040. typedef struct {
  21041. __IO uint8_t BDH; /**< UART Baud Rate Registers: High, offset: 0x0 */
  21042. __IO uint8_t BDL; /**< UART Baud Rate Registers: Low, offset: 0x1 */
  21043. __IO uint8_t C1; /**< UART Control Register 1, offset: 0x2 */
  21044. __IO uint8_t C2; /**< UART Control Register 2, offset: 0x3 */
  21045. __I uint8_t S1; /**< UART Status Register 1, offset: 0x4 */
  21046. __IO uint8_t S2; /**< UART Status Register 2, offset: 0x5 */
  21047. __IO uint8_t C3; /**< UART Control Register 3, offset: 0x6 */
  21048. __IO uint8_t D; /**< UART Data Register, offset: 0x7 */
  21049. __IO uint8_t MA1; /**< UART Match Address Registers 1, offset: 0x8 */
  21050. __IO uint8_t MA2; /**< UART Match Address Registers 2, offset: 0x9 */
  21051. __IO uint8_t C4; /**< UART Control Register 4, offset: 0xA */
  21052. __IO uint8_t C5; /**< UART Control Register 5, offset: 0xB */
  21053. __I uint8_t ED; /**< UART Extended Data Register, offset: 0xC */
  21054. __IO uint8_t MODEM; /**< UART Modem Register, offset: 0xD */
  21055. __IO uint8_t IR; /**< UART Infrared Register, offset: 0xE */
  21056. uint8_t RESERVED_0[1];
  21057. __IO uint8_t PFIFO; /**< UART FIFO Parameters, offset: 0x10 */
  21058. __IO uint8_t CFIFO; /**< UART FIFO Control Register, offset: 0x11 */
  21059. __IO uint8_t SFIFO; /**< UART FIFO Status Register, offset: 0x12 */
  21060. __IO uint8_t TWFIFO; /**< UART FIFO Transmit Watermark, offset: 0x13 */
  21061. __I uint8_t TCFIFO; /**< UART FIFO Transmit Count, offset: 0x14 */
  21062. __IO uint8_t RWFIFO; /**< UART FIFO Receive Watermark, offset: 0x15 */
  21063. __I uint8_t RCFIFO; /**< UART FIFO Receive Count, offset: 0x16 */
  21064. uint8_t RESERVED_1[1];
  21065. __IO uint8_t C7816; /**< UART 7816 Control Register, offset: 0x18 */
  21066. __IO uint8_t IE7816; /**< UART 7816 Interrupt Enable Register, offset: 0x19 */
  21067. __IO uint8_t IS7816; /**< UART 7816 Interrupt Status Register, offset: 0x1A */
  21068. __IO uint8_t WP7816; /**< UART 7816 Wait Parameter Register, offset: 0x1B */
  21069. __IO uint8_t WN7816; /**< UART 7816 Wait N Register, offset: 0x1C */
  21070. __IO uint8_t WF7816; /**< UART 7816 Wait FD Register, offset: 0x1D */
  21071. __IO uint8_t ET7816; /**< UART 7816 Error Threshold Register, offset: 0x1E */
  21072. __IO uint8_t TL7816; /**< UART 7816 Transmit Length Register, offset: 0x1F */
  21073. uint8_t RESERVED_2[26];
  21074. __IO uint8_t AP7816A_T0; /**< UART 7816 ATR Duration Timer Register A, offset: 0x3A */
  21075. __IO uint8_t AP7816B_T0; /**< UART 7816 ATR Duration Timer Register B, offset: 0x3B */
  21076. union { /* offset: 0x3C */
  21077. struct { /* offset: 0x3C */
  21078. __IO uint8_t WP7816A_T0; /**< UART 7816 Wait Parameter Register A, offset: 0x3C */
  21079. __IO uint8_t WP7816B_T0; /**< UART 7816 Wait Parameter Register B, offset: 0x3D */
  21080. } TYPE0;
  21081. struct { /* offset: 0x3C */
  21082. __IO uint8_t WP7816A_T1; /**< UART 7816 Wait Parameter Register A, offset: 0x3C */
  21083. __IO uint8_t WP7816B_T1; /**< UART 7816 Wait Parameter Register B, offset: 0x3D */
  21084. } TYPE1;
  21085. };
  21086. __IO uint8_t WGP7816_T1; /**< UART 7816 Wait and Guard Parameter Register, offset: 0x3E */
  21087. __IO uint8_t WP7816C_T1; /**< UART 7816 Wait Parameter Register C, offset: 0x3F */
  21088. } UART_Type;
  21089. /* ----------------------------------------------------------------------------
  21090. -- UART Register Masks
  21091. ---------------------------------------------------------------------------- */
  21092. /*!
  21093. * @addtogroup UART_Register_Masks UART Register Masks
  21094. * @{
  21095. */
  21096. /*! @name BDH - UART Baud Rate Registers: High */
  21097. /*! @{ */
  21098. #define UART_BDH_SBR_MASK (0x1FU)
  21099. #define UART_BDH_SBR_SHIFT (0U)
  21100. #define UART_BDH_SBR(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_SBR_SHIFT)) & UART_BDH_SBR_MASK)
  21101. #define UART_BDH_SBNS_MASK (0x20U)
  21102. #define UART_BDH_SBNS_SHIFT (5U)
  21103. /*! SBNS - Stop Bit Number Select
  21104. * 0b0..Data frame consists of a single stop bit.
  21105. * 0b1..Data frame consists of two stop bits.
  21106. */
  21107. #define UART_BDH_SBNS(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_SBNS_SHIFT)) & UART_BDH_SBNS_MASK)
  21108. #define UART_BDH_RXEDGIE_MASK (0x40U)
  21109. #define UART_BDH_RXEDGIE_SHIFT (6U)
  21110. /*! RXEDGIE - RxD Input Active Edge Interrupt Enable
  21111. * 0b0..Hardware interrupts from RXEDGIF disabled using polling.
  21112. * 0b1..RXEDGIF interrupt request enabled.
  21113. */
  21114. #define UART_BDH_RXEDGIE(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_RXEDGIE_SHIFT)) & UART_BDH_RXEDGIE_MASK)
  21115. #define UART_BDH_LBKDIE_MASK (0x80U)
  21116. #define UART_BDH_LBKDIE_SHIFT (7U)
  21117. /*! LBKDIE - LIN Break Detect Interrupt or DMA Request Enable
  21118. * 0b0..LBKDIF interrupt and DMA transfer requests disabled.
  21119. * 0b1..LBKDIF interrupt or DMA transfer requests enabled.
  21120. */
  21121. #define UART_BDH_LBKDIE(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_LBKDIE_SHIFT)) & UART_BDH_LBKDIE_MASK)
  21122. /*! @} */
  21123. /*! @name BDL - UART Baud Rate Registers: Low */
  21124. /*! @{ */
  21125. #define UART_BDL_SBR_MASK (0xFFU)
  21126. #define UART_BDL_SBR_SHIFT (0U)
  21127. #define UART_BDL_SBR(x) (((uint8_t)(((uint8_t)(x)) << UART_BDL_SBR_SHIFT)) & UART_BDL_SBR_MASK)
  21128. /*! @} */
  21129. /*! @name C1 - UART Control Register 1 */
  21130. /*! @{ */
  21131. #define UART_C1_PT_MASK (0x1U)
  21132. #define UART_C1_PT_SHIFT (0U)
  21133. /*! PT - Parity Type
  21134. * 0b0..Even parity.
  21135. * 0b1..Odd parity.
  21136. */
  21137. #define UART_C1_PT(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_PT_SHIFT)) & UART_C1_PT_MASK)
  21138. #define UART_C1_PE_MASK (0x2U)
  21139. #define UART_C1_PE_SHIFT (1U)
  21140. /*! PE - Parity Enable
  21141. * 0b0..Parity function disabled.
  21142. * 0b1..Parity function enabled.
  21143. */
  21144. #define UART_C1_PE(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_PE_SHIFT)) & UART_C1_PE_MASK)
  21145. #define UART_C1_ILT_MASK (0x4U)
  21146. #define UART_C1_ILT_SHIFT (2U)
  21147. /*! ILT - Idle Line Type Select
  21148. * 0b0..Idle character bit count starts after start bit.
  21149. * 0b1..Idle character bit count starts after stop bit.
  21150. */
  21151. #define UART_C1_ILT(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_ILT_SHIFT)) & UART_C1_ILT_MASK)
  21152. #define UART_C1_WAKE_MASK (0x8U)
  21153. #define UART_C1_WAKE_SHIFT (3U)
  21154. /*! WAKE - Receiver Wakeup Method Select
  21155. * 0b0..Idle line wakeup.
  21156. * 0b1..Address mark wakeup.
  21157. */
  21158. #define UART_C1_WAKE(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_WAKE_SHIFT)) & UART_C1_WAKE_MASK)
  21159. #define UART_C1_M_MASK (0x10U)
  21160. #define UART_C1_M_SHIFT (4U)
  21161. /*! M - 9-bit or 8-bit Mode Select
  21162. * 0b0..Normal-start + 8 data bits (MSB/LSB first as determined by MSBF) + stop.
  21163. * 0b1..Use-start + 9 data bits (MSB/LSB first as determined by MSBF) + stop.
  21164. */
  21165. #define UART_C1_M(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_M_SHIFT)) & UART_C1_M_MASK)
  21166. #define UART_C1_RSRC_MASK (0x20U)
  21167. #define UART_C1_RSRC_SHIFT (5U)
  21168. /*! RSRC - Receiver Source Select
  21169. * 0b0..Selects internal loop back mode. The receiver input is internally connected to transmitter output.
  21170. * 0b1..Single wire UART mode where the receiver input is connected to the transmit pin input signal.
  21171. */
  21172. #define UART_C1_RSRC(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_RSRC_SHIFT)) & UART_C1_RSRC_MASK)
  21173. #define UART_C1_UARTSWAI_MASK (0x40U)
  21174. #define UART_C1_UARTSWAI_SHIFT (6U)
  21175. /*! UARTSWAI - UART Stops in Wait Mode
  21176. * 0b0..UART clock continues to run in Wait mode.
  21177. * 0b1..UART clock freezes while CPU is in Wait mode.
  21178. */
  21179. #define UART_C1_UARTSWAI(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_UARTSWAI_SHIFT)) & UART_C1_UARTSWAI_MASK)
  21180. #define UART_C1_LOOPS_MASK (0x80U)
  21181. #define UART_C1_LOOPS_SHIFT (7U)
  21182. /*! LOOPS - Loop Mode Select
  21183. * 0b0..Normal operation.
  21184. * 0b1..Loop mode where transmitter output is internally connected to receiver input. The receiver input is determined by RSRC.
  21185. */
  21186. #define UART_C1_LOOPS(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_LOOPS_SHIFT)) & UART_C1_LOOPS_MASK)
  21187. /*! @} */
  21188. /*! @name C2 - UART Control Register 2 */
  21189. /*! @{ */
  21190. #define UART_C2_SBK_MASK (0x1U)
  21191. #define UART_C2_SBK_SHIFT (0U)
  21192. /*! SBK - Send Break
  21193. * 0b0..Normal transmitter operation.
  21194. * 0b1..Queue break characters to be sent.
  21195. */
  21196. #define UART_C2_SBK(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_SBK_SHIFT)) & UART_C2_SBK_MASK)
  21197. #define UART_C2_RWU_MASK (0x2U)
  21198. #define UART_C2_RWU_SHIFT (1U)
  21199. /*! RWU - Receiver Wakeup Control
  21200. * 0b0..Normal operation.
  21201. * 0b1..RWU enables the wakeup function and inhibits further receiver interrupt requests. Normally, hardware wakes the receiver by automatically clearing RWU.
  21202. */
  21203. #define UART_C2_RWU(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RWU_SHIFT)) & UART_C2_RWU_MASK)
  21204. #define UART_C2_RE_MASK (0x4U)
  21205. #define UART_C2_RE_SHIFT (2U)
  21206. /*! RE - Receiver Enable
  21207. * 0b0..Receiver off.
  21208. * 0b1..Receiver on.
  21209. */
  21210. #define UART_C2_RE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RE_SHIFT)) & UART_C2_RE_MASK)
  21211. #define UART_C2_TE_MASK (0x8U)
  21212. #define UART_C2_TE_SHIFT (3U)
  21213. /*! TE - Transmitter Enable
  21214. * 0b0..Transmitter off.
  21215. * 0b1..Transmitter on.
  21216. */
  21217. #define UART_C2_TE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TE_SHIFT)) & UART_C2_TE_MASK)
  21218. #define UART_C2_ILIE_MASK (0x10U)
  21219. #define UART_C2_ILIE_SHIFT (4U)
  21220. /*! ILIE - Idle Line Interrupt Enable
  21221. * 0b0..IDLE interrupt requests disabled.
  21222. * 0b1..IDLE interrupt requests enabled.
  21223. */
  21224. #define UART_C2_ILIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_ILIE_SHIFT)) & UART_C2_ILIE_MASK)
  21225. #define UART_C2_RIE_MASK (0x20U)
  21226. #define UART_C2_RIE_SHIFT (5U)
  21227. /*! RIE - Receiver Full Interrupt or DMA Transfer Enable
  21228. * 0b0..RDRF interrupt and DMA transfer requests disabled.
  21229. * 0b1..RDRF interrupt or DMA transfer requests enabled.
  21230. */
  21231. #define UART_C2_RIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RIE_SHIFT)) & UART_C2_RIE_MASK)
  21232. #define UART_C2_TCIE_MASK (0x40U)
  21233. #define UART_C2_TCIE_SHIFT (6U)
  21234. /*! TCIE - Transmission Complete Interrupt Enable
  21235. * 0b0..TC interrupt requests disabled.
  21236. * 0b1..TC interrupt requests enabled.
  21237. */
  21238. #define UART_C2_TCIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TCIE_SHIFT)) & UART_C2_TCIE_MASK)
  21239. #define UART_C2_TIE_MASK (0x80U)
  21240. #define UART_C2_TIE_SHIFT (7U)
  21241. /*! TIE - Transmitter Interrupt or DMA Transfer Enable.
  21242. * 0b0..TDRE interrupt and DMA transfer requests disabled.
  21243. * 0b1..TDRE interrupt or DMA transfer requests enabled.
  21244. */
  21245. #define UART_C2_TIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TIE_SHIFT)) & UART_C2_TIE_MASK)
  21246. /*! @} */
  21247. /*! @name S1 - UART Status Register 1 */
  21248. /*! @{ */
  21249. #define UART_S1_PF_MASK (0x1U)
  21250. #define UART_S1_PF_SHIFT (0U)
  21251. /*! PF - Parity Error Flag
  21252. * 0b0..No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error.
  21253. * 0b1..At least one dataword was received with a parity error since the last time this flag was cleared.
  21254. */
  21255. #define UART_S1_PF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_PF_SHIFT)) & UART_S1_PF_MASK)
  21256. #define UART_S1_FE_MASK (0x2U)
  21257. #define UART_S1_FE_SHIFT (1U)
  21258. /*! FE - Framing Error Flag
  21259. * 0b0..No framing error detected.
  21260. * 0b1..Framing error.
  21261. */
  21262. #define UART_S1_FE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_FE_SHIFT)) & UART_S1_FE_MASK)
  21263. #define UART_S1_NF_MASK (0x4U)
  21264. #define UART_S1_NF_SHIFT (2U)
  21265. /*! NF - Noise Flag
  21266. * 0b0..No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise.
  21267. * 0b1..At least one dataword was received with noise detected since the last time the flag was cleared.
  21268. */
  21269. #define UART_S1_NF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_NF_SHIFT)) & UART_S1_NF_MASK)
  21270. #define UART_S1_OR_MASK (0x8U)
  21271. #define UART_S1_OR_SHIFT (3U)
  21272. /*! OR - Receiver Overrun Flag
  21273. * 0b0..No overrun has occurred since the last time the flag was cleared.
  21274. * 0b1..Overrun has occurred or the overrun flag has not been cleared since the last overrun occured.
  21275. */
  21276. #define UART_S1_OR(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_OR_SHIFT)) & UART_S1_OR_MASK)
  21277. #define UART_S1_IDLE_MASK (0x10U)
  21278. #define UART_S1_IDLE_SHIFT (4U)
  21279. /*! IDLE - Idle Line Flag
  21280. * 0b0..Receiver input is either active now or has never become active since the IDLE flag was last cleared.
  21281. * 0b1..Receiver input has become idle or the flag has not been cleared since it last asserted.
  21282. */
  21283. #define UART_S1_IDLE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_IDLE_SHIFT)) & UART_S1_IDLE_MASK)
  21284. #define UART_S1_RDRF_MASK (0x20U)
  21285. #define UART_S1_RDRF_SHIFT (5U)
  21286. /*! RDRF - Receive Data Register Full Flag
  21287. * 0b0..The number of datawords in the receive buffer is less than the number indicated by RXWATER.
  21288. * 0b1..The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared.
  21289. */
  21290. #define UART_S1_RDRF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_RDRF_SHIFT)) & UART_S1_RDRF_MASK)
  21291. #define UART_S1_TC_MASK (0x40U)
  21292. #define UART_S1_TC_SHIFT (6U)
  21293. /*! TC - Transmit Complete Flag
  21294. * 0b0..Transmitter active (sending data, a preamble, or a break).
  21295. * 0b1..Transmitter idle (transmission activity complete).
  21296. */
  21297. #define UART_S1_TC(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_TC_SHIFT)) & UART_S1_TC_MASK)
  21298. #define UART_S1_TDRE_MASK (0x80U)
  21299. #define UART_S1_TDRE_SHIFT (7U)
  21300. /*! TDRE - Transmit Data Register Empty Flag
  21301. * 0b0..The amount of data in the transmit buffer is greater than the value indicated by TWFIFO[TXWATER].
  21302. * 0b1..The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO[TXWATER] at some point in time since the flag has been cleared.
  21303. */
  21304. #define UART_S1_TDRE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_TDRE_SHIFT)) & UART_S1_TDRE_MASK)
  21305. /*! @} */
  21306. /*! @name S2 - UART Status Register 2 */
  21307. /*! @{ */
  21308. #define UART_S2_RAF_MASK (0x1U)
  21309. #define UART_S2_RAF_SHIFT (0U)
  21310. /*! RAF - Receiver Active Flag
  21311. * 0b0..UART receiver idle/inactive waiting for a start bit.
  21312. * 0b1..UART receiver active, RxD input not idle.
  21313. */
  21314. #define UART_S2_RAF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RAF_SHIFT)) & UART_S2_RAF_MASK)
  21315. #define UART_S2_LBKDE_MASK (0x2U)
  21316. #define UART_S2_LBKDE_SHIFT (1U)
  21317. /*! LBKDE - LIN Break Detection Enable
  21318. * 0b0..Break character detection is disabled.
  21319. * 0b1..Break character is detected at length of 11 bit times if C1[M] = 0 or 12 bits time if C1[M] = 1.
  21320. */
  21321. #define UART_S2_LBKDE(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_LBKDE_SHIFT)) & UART_S2_LBKDE_MASK)
  21322. #define UART_S2_BRK13_MASK (0x4U)
  21323. #define UART_S2_BRK13_SHIFT (2U)
  21324. /*! BRK13 - Break Transmit Character Length
  21325. * 0b0..Break character is 10, 11, or 12 bits long.
  21326. * 0b1..Break character is 13 or 14 bits long.
  21327. */
  21328. #define UART_S2_BRK13(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_BRK13_SHIFT)) & UART_S2_BRK13_MASK)
  21329. #define UART_S2_RWUID_MASK (0x8U)
  21330. #define UART_S2_RWUID_SHIFT (3U)
  21331. /*! RWUID - Receive Wakeup Idle Detect
  21332. * 0b0..S1[IDLE] is not set upon detection of an idle character.
  21333. * 0b1..S1[IDLE] is set upon detection of an idle character.
  21334. */
  21335. #define UART_S2_RWUID(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RWUID_SHIFT)) & UART_S2_RWUID_MASK)
  21336. #define UART_S2_RXINV_MASK (0x10U)
  21337. #define UART_S2_RXINV_SHIFT (4U)
  21338. /*! RXINV - Receive Data Inversion
  21339. * 0b0..Receive data is not inverted.
  21340. * 0b1..Receive data is inverted.
  21341. */
  21342. #define UART_S2_RXINV(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RXINV_SHIFT)) & UART_S2_RXINV_MASK)
  21343. #define UART_S2_MSBF_MASK (0x20U)
  21344. #define UART_S2_MSBF_SHIFT (5U)
  21345. /*! MSBF - Most Significant Bit First
  21346. * 0b0..LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0.
  21347. * 0b1..MSB (bit8, bit7 or bit6) is the first bit that is transmitted following the start bit, depending on the setting of C1[M] and C1[PE]. Further, the first bit received after the start bit is identified as bit8, bit7, or bit6, depending on the setting of C1[M] and C1[PE].
  21348. */
  21349. #define UART_S2_MSBF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_MSBF_SHIFT)) & UART_S2_MSBF_MASK)
  21350. #define UART_S2_RXEDGIF_MASK (0x40U)
  21351. #define UART_S2_RXEDGIF_SHIFT (6U)
  21352. /*! RXEDGIF - RxD Pin Active Edge Interrupt Flag
  21353. * 0b0..No active edge on the receive pin has occurred.
  21354. * 0b1..An active edge on the receive pin has occurred.
  21355. */
  21356. #define UART_S2_RXEDGIF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RXEDGIF_SHIFT)) & UART_S2_RXEDGIF_MASK)
  21357. #define UART_S2_LBKDIF_MASK (0x80U)
  21358. #define UART_S2_LBKDIF_SHIFT (7U)
  21359. /*! LBKDIF - LIN Break Detect Interrupt Flag
  21360. * 0b0..No LIN break character detected.
  21361. * 0b1..LIN break character detected.
  21362. */
  21363. #define UART_S2_LBKDIF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_LBKDIF_SHIFT)) & UART_S2_LBKDIF_MASK)
  21364. /*! @} */
  21365. /*! @name C3 - UART Control Register 3 */
  21366. /*! @{ */
  21367. #define UART_C3_PEIE_MASK (0x1U)
  21368. #define UART_C3_PEIE_SHIFT (0U)
  21369. /*! PEIE - Parity Error Interrupt Enable
  21370. * 0b0..PF interrupt requests are disabled.
  21371. * 0b1..PF interrupt requests are enabled.
  21372. */
  21373. #define UART_C3_PEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_PEIE_SHIFT)) & UART_C3_PEIE_MASK)
  21374. #define UART_C3_FEIE_MASK (0x2U)
  21375. #define UART_C3_FEIE_SHIFT (1U)
  21376. /*! FEIE - Framing Error Interrupt Enable
  21377. * 0b0..FE interrupt requests are disabled.
  21378. * 0b1..FE interrupt requests are enabled.
  21379. */
  21380. #define UART_C3_FEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_FEIE_SHIFT)) & UART_C3_FEIE_MASK)
  21381. #define UART_C3_NEIE_MASK (0x4U)
  21382. #define UART_C3_NEIE_SHIFT (2U)
  21383. /*! NEIE - Noise Error Interrupt Enable
  21384. * 0b0..NF interrupt requests are disabled.
  21385. * 0b1..NF interrupt requests are enabled.
  21386. */
  21387. #define UART_C3_NEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_NEIE_SHIFT)) & UART_C3_NEIE_MASK)
  21388. #define UART_C3_ORIE_MASK (0x8U)
  21389. #define UART_C3_ORIE_SHIFT (3U)
  21390. /*! ORIE - Overrun Error Interrupt Enable
  21391. * 0b0..OR interrupts are disabled.
  21392. * 0b1..OR interrupt requests are enabled.
  21393. */
  21394. #define UART_C3_ORIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_ORIE_SHIFT)) & UART_C3_ORIE_MASK)
  21395. #define UART_C3_TXINV_MASK (0x10U)
  21396. #define UART_C3_TXINV_SHIFT (4U)
  21397. /*! TXINV - Transmit Data Inversion.
  21398. * 0b0..Transmit data is not inverted.
  21399. * 0b1..Transmit data is inverted.
  21400. */
  21401. #define UART_C3_TXINV(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_TXINV_SHIFT)) & UART_C3_TXINV_MASK)
  21402. #define UART_C3_TXDIR_MASK (0x20U)
  21403. #define UART_C3_TXDIR_SHIFT (5U)
  21404. /*! TXDIR - Transmitter Pin Data Direction in Single-Wire mode
  21405. * 0b0..TXD pin is an input in single wire mode.
  21406. * 0b1..TXD pin is an output in single wire mode.
  21407. */
  21408. #define UART_C3_TXDIR(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_TXDIR_SHIFT)) & UART_C3_TXDIR_MASK)
  21409. #define UART_C3_T8_MASK (0x40U)
  21410. #define UART_C3_T8_SHIFT (6U)
  21411. #define UART_C3_T8(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_T8_SHIFT)) & UART_C3_T8_MASK)
  21412. #define UART_C3_R8_MASK (0x80U)
  21413. #define UART_C3_R8_SHIFT (7U)
  21414. #define UART_C3_R8(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_R8_SHIFT)) & UART_C3_R8_MASK)
  21415. /*! @} */
  21416. /*! @name D - UART Data Register */
  21417. /*! @{ */
  21418. #define UART_D_RT_MASK (0xFFU)
  21419. #define UART_D_RT_SHIFT (0U)
  21420. #define UART_D_RT(x) (((uint8_t)(((uint8_t)(x)) << UART_D_RT_SHIFT)) & UART_D_RT_MASK)
  21421. /*! @} */
  21422. /*! @name MA1 - UART Match Address Registers 1 */
  21423. /*! @{ */
  21424. #define UART_MA1_MA_MASK (0xFFU)
  21425. #define UART_MA1_MA_SHIFT (0U)
  21426. #define UART_MA1_MA(x) (((uint8_t)(((uint8_t)(x)) << UART_MA1_MA_SHIFT)) & UART_MA1_MA_MASK)
  21427. /*! @} */
  21428. /*! @name MA2 - UART Match Address Registers 2 */
  21429. /*! @{ */
  21430. #define UART_MA2_MA_MASK (0xFFU)
  21431. #define UART_MA2_MA_SHIFT (0U)
  21432. #define UART_MA2_MA(x) (((uint8_t)(((uint8_t)(x)) << UART_MA2_MA_SHIFT)) & UART_MA2_MA_MASK)
  21433. /*! @} */
  21434. /*! @name C4 - UART Control Register 4 */
  21435. /*! @{ */
  21436. #define UART_C4_BRFA_MASK (0x1FU)
  21437. #define UART_C4_BRFA_SHIFT (0U)
  21438. #define UART_C4_BRFA(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_BRFA_SHIFT)) & UART_C4_BRFA_MASK)
  21439. #define UART_C4_M10_MASK (0x20U)
  21440. #define UART_C4_M10_SHIFT (5U)
  21441. /*! M10 - 10-bit Mode select
  21442. * 0b0..The parity bit is the ninth bit in the serial transmission.
  21443. * 0b1..The parity bit is the tenth bit in the serial transmission.
  21444. */
  21445. #define UART_C4_M10(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_M10_SHIFT)) & UART_C4_M10_MASK)
  21446. #define UART_C4_MAEN2_MASK (0x40U)
  21447. #define UART_C4_MAEN2_SHIFT (6U)
  21448. /*! MAEN2 - Match Address Mode Enable 2
  21449. * 0b0..All data received is transferred to the data buffer if MAEN1 is cleared.
  21450. * 0b1..All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If a match occurs, data is transferred to the data buffer. This field must be cleared when C7816[ISO7816E] is set/enabled.
  21451. */
  21452. #define UART_C4_MAEN2(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_MAEN2_SHIFT)) & UART_C4_MAEN2_MASK)
  21453. #define UART_C4_MAEN1_MASK (0x80U)
  21454. #define UART_C4_MAEN1_SHIFT (7U)
  21455. /*! MAEN1 - Match Address Mode Enable 1
  21456. * 0b0..All data received is transferred to the data buffer if MAEN2 is cleared.
  21457. * 0b1..All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer. This field must be cleared when C7816[ISO7816E] is set/enabled.
  21458. */
  21459. #define UART_C4_MAEN1(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_MAEN1_SHIFT)) & UART_C4_MAEN1_MASK)
  21460. /*! @} */
  21461. /*! @name C5 - UART Control Register 5 */
  21462. /*! @{ */
  21463. #define UART_C5_LBKDDMAS_MASK (0x8U)
  21464. #define UART_C5_LBKDDMAS_SHIFT (3U)
  21465. /*! LBKDDMAS - LIN Break Detect DMA Select Bit
  21466. * 0b0..If BDH[LBKDIE] and S2[LBKDIF] are set, the LBKDIF interrupt signal is asserted to request an interrupt service.
  21467. * 0b1..If BDH[LBKDIE] and S2[LBKDIF] are set, the LBKDIF DMA request signal is asserted to request a DMA transfer.
  21468. */
  21469. #define UART_C5_LBKDDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_LBKDDMAS_SHIFT)) & UART_C5_LBKDDMAS_MASK)
  21470. #define UART_C5_RDMAS_MASK (0x20U)
  21471. #define UART_C5_RDMAS_SHIFT (5U)
  21472. /*! RDMAS - Receiver Full DMA Select
  21473. * 0b0..If C2[RIE] and S1[RDRF] are set, the RDFR interrupt request signal is asserted to request an interrupt service.
  21474. * 0b1..If C2[RIE] and S1[RDRF] are set, the RDRF DMA request signal is asserted to request a DMA transfer.
  21475. */
  21476. #define UART_C5_RDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_RDMAS_SHIFT)) & UART_C5_RDMAS_MASK)
  21477. #define UART_C5_TDMAS_MASK (0x80U)
  21478. #define UART_C5_TDMAS_SHIFT (7U)
  21479. /*! TDMAS - Transmitter DMA Select
  21480. * 0b0..If C2[TIE] is set and the S1[TDRE] flag is set, the TDRE interrupt request signal is asserted to request interrupt service.
  21481. * 0b1..If C2[TIE] is set and the S1[TDRE] flag is set, the TDRE DMA request signal is asserted to request a DMA transfer.
  21482. */
  21483. #define UART_C5_TDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_TDMAS_SHIFT)) & UART_C5_TDMAS_MASK)
  21484. /*! @} */
  21485. /*! @name ED - UART Extended Data Register */
  21486. /*! @{ */
  21487. #define UART_ED_PARITYE_MASK (0x40U)
  21488. #define UART_ED_PARITYE_SHIFT (6U)
  21489. /*! PARITYE
  21490. * 0b0..The dataword was received without a parity error.
  21491. * 0b1..The dataword was received with a parity error.
  21492. */
  21493. #define UART_ED_PARITYE(x) (((uint8_t)(((uint8_t)(x)) << UART_ED_PARITYE_SHIFT)) & UART_ED_PARITYE_MASK)
  21494. #define UART_ED_NOISY_MASK (0x80U)
  21495. #define UART_ED_NOISY_SHIFT (7U)
  21496. /*! NOISY
  21497. * 0b0..The dataword was received without noise.
  21498. * 0b1..The data was received with noise.
  21499. */
  21500. #define UART_ED_NOISY(x) (((uint8_t)(((uint8_t)(x)) << UART_ED_NOISY_SHIFT)) & UART_ED_NOISY_MASK)
  21501. /*! @} */
  21502. /*! @name MODEM - UART Modem Register */
  21503. /*! @{ */
  21504. #define UART_MODEM_TXCTSE_MASK (0x1U)
  21505. #define UART_MODEM_TXCTSE_SHIFT (0U)
  21506. /*! TXCTSE - Transmitter clear-to-send enable
  21507. * 0b0..CTS has no effect on the transmitter.
  21508. * 0b1..Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent do not affect its transmission.
  21509. */
  21510. #define UART_MODEM_TXCTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXCTSE_SHIFT)) & UART_MODEM_TXCTSE_MASK)
  21511. #define UART_MODEM_TXRTSE_MASK (0x2U)
  21512. #define UART_MODEM_TXRTSE_SHIFT (1U)
  21513. /*! TXRTSE - Transmitter request-to-send enable
  21514. * 0b0..The transmitter has no effect on RTS.
  21515. * 0b1..When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and shift register are completely sent, including the last stop bit. (FIFO) Ensure that C2[TE] is asserted before assertion of this bit.
  21516. */
  21517. #define UART_MODEM_TXRTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXRTSE_SHIFT)) & UART_MODEM_TXRTSE_MASK)
  21518. #define UART_MODEM_TXRTSPOL_MASK (0x4U)
  21519. #define UART_MODEM_TXRTSPOL_SHIFT (2U)
  21520. /*! TXRTSPOL - Transmitter request-to-send polarity
  21521. * 0b0..Transmitter RTS is active low.
  21522. * 0b1..Transmitter RTS is active high.
  21523. */
  21524. #define UART_MODEM_TXRTSPOL(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXRTSPOL_SHIFT)) & UART_MODEM_TXRTSPOL_MASK)
  21525. #define UART_MODEM_RXRTSE_MASK (0x8U)
  21526. #define UART_MODEM_RXRTSE_SHIFT (3U)
  21527. /*! RXRTSE - Receiver request-to-send enable
  21528. * 0b0..The receiver has no effect on RTS.
  21529. * 0b1..RTS is deasserted if the number of characters in the receiver data register (FIFO) is equal to or greater than RWFIFO[RXWATER]. RTS is asserted when the number of characters in the receiver data register (FIFO) is less than RWFIFO[RXWATER]. See Hardware flow control
  21530. */
  21531. #define UART_MODEM_RXRTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_RXRTSE_SHIFT)) & UART_MODEM_RXRTSE_MASK)
  21532. /*! @} */
  21533. /*! @name IR - UART Infrared Register */
  21534. /*! @{ */
  21535. #define UART_IR_TNP_MASK (0x3U)
  21536. #define UART_IR_TNP_SHIFT (0U)
  21537. /*! TNP - Transmitter narrow pulse
  21538. * 0b00..3/16.
  21539. * 0b01..1/16.
  21540. * 0b10..1/32.
  21541. * 0b11..1/4.
  21542. */
  21543. #define UART_IR_TNP(x) (((uint8_t)(((uint8_t)(x)) << UART_IR_TNP_SHIFT)) & UART_IR_TNP_MASK)
  21544. #define UART_IR_IREN_MASK (0x4U)
  21545. #define UART_IR_IREN_SHIFT (2U)
  21546. /*! IREN - Infrared enable
  21547. * 0b0..IR disabled.
  21548. * 0b1..IR enabled.
  21549. */
  21550. #define UART_IR_IREN(x) (((uint8_t)(((uint8_t)(x)) << UART_IR_IREN_SHIFT)) & UART_IR_IREN_MASK)
  21551. /*! @} */
  21552. /*! @name PFIFO - UART FIFO Parameters */
  21553. /*! @{ */
  21554. #define UART_PFIFO_RXFIFOSIZE_MASK (0x7U)
  21555. #define UART_PFIFO_RXFIFOSIZE_SHIFT (0U)
  21556. /*! RXFIFOSIZE - Receive FIFO. Buffer Depth
  21557. * 0b000..Receive FIFO/Buffer depth = 1 dataword.
  21558. * 0b001..Receive FIFO/Buffer depth = 4 datawords.
  21559. * 0b010..Receive FIFO/Buffer depth = 8 datawords.
  21560. * 0b011..Receive FIFO/Buffer depth = 16 datawords.
  21561. * 0b100..Receive FIFO/Buffer depth = 32 datawords.
  21562. * 0b101..Receive FIFO/Buffer depth = 64 datawords.
  21563. * 0b110..Receive FIFO/Buffer depth = 128 datawords.
  21564. * 0b111..Reserved.
  21565. */
  21566. #define UART_PFIFO_RXFIFOSIZE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_RXFIFOSIZE_SHIFT)) & UART_PFIFO_RXFIFOSIZE_MASK)
  21567. #define UART_PFIFO_RXFE_MASK (0x8U)
  21568. #define UART_PFIFO_RXFE_SHIFT (3U)
  21569. /*! RXFE - Receive FIFO Enable
  21570. * 0b0..Receive FIFO is not enabled. Buffer is depth 1. (Legacy support)
  21571. * 0b1..Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE.
  21572. */
  21573. #define UART_PFIFO_RXFE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_RXFE_SHIFT)) & UART_PFIFO_RXFE_MASK)
  21574. #define UART_PFIFO_TXFIFOSIZE_MASK (0x70U)
  21575. #define UART_PFIFO_TXFIFOSIZE_SHIFT (4U)
  21576. /*! TXFIFOSIZE - Transmit FIFO. Buffer Depth
  21577. * 0b000..Transmit FIFO/Buffer depth = 1 dataword.
  21578. * 0b001..Transmit FIFO/Buffer depth = 4 datawords.
  21579. * 0b010..Transmit FIFO/Buffer depth = 8 datawords.
  21580. * 0b011..Transmit FIFO/Buffer depth = 16 datawords.
  21581. * 0b100..Transmit FIFO/Buffer depth = 32 datawords.
  21582. * 0b101..Transmit FIFO/Buffer depth = 64 datawords.
  21583. * 0b110..Transmit FIFO/Buffer depth = 128 datawords.
  21584. * 0b111..Reserved.
  21585. */
  21586. #define UART_PFIFO_TXFIFOSIZE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_TXFIFOSIZE_SHIFT)) & UART_PFIFO_TXFIFOSIZE_MASK)
  21587. #define UART_PFIFO_TXFE_MASK (0x80U)
  21588. #define UART_PFIFO_TXFE_SHIFT (7U)
  21589. /*! TXFE - Transmit FIFO Enable
  21590. * 0b0..Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support).
  21591. * 0b1..Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE.
  21592. */
  21593. #define UART_PFIFO_TXFE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_TXFE_SHIFT)) & UART_PFIFO_TXFE_MASK)
  21594. /*! @} */
  21595. /*! @name CFIFO - UART FIFO Control Register */
  21596. /*! @{ */
  21597. #define UART_CFIFO_RXUFE_MASK (0x1U)
  21598. #define UART_CFIFO_RXUFE_SHIFT (0U)
  21599. /*! RXUFE - Receive FIFO Underflow Interrupt Enable
  21600. * 0b0..RXUF flag does not generate an interrupt to the host.
  21601. * 0b1..RXUF flag generates an interrupt to the host.
  21602. */
  21603. #define UART_CFIFO_RXUFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXUFE_SHIFT)) & UART_CFIFO_RXUFE_MASK)
  21604. #define UART_CFIFO_TXOFE_MASK (0x2U)
  21605. #define UART_CFIFO_TXOFE_SHIFT (1U)
  21606. /*! TXOFE - Transmit FIFO Overflow Interrupt Enable
  21607. * 0b0..TXOF flag does not generate an interrupt to the host.
  21608. * 0b1..TXOF flag generates an interrupt to the host.
  21609. */
  21610. #define UART_CFIFO_TXOFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_TXOFE_SHIFT)) & UART_CFIFO_TXOFE_MASK)
  21611. #define UART_CFIFO_RXOFE_MASK (0x4U)
  21612. #define UART_CFIFO_RXOFE_SHIFT (2U)
  21613. /*! RXOFE - Receive FIFO Overflow Interrupt Enable
  21614. * 0b0..RXOF flag does not generate an interrupt to the host.
  21615. * 0b1..RXOF flag generates an interrupt to the host.
  21616. */
  21617. #define UART_CFIFO_RXOFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXOFE_SHIFT)) & UART_CFIFO_RXOFE_MASK)
  21618. #define UART_CFIFO_RXFLUSH_MASK (0x40U)
  21619. #define UART_CFIFO_RXFLUSH_SHIFT (6U)
  21620. /*! RXFLUSH - Receive FIFO/Buffer Flush
  21621. * 0b0..No flush operation occurs.
  21622. * 0b1..All data in the receive FIFO/buffer is cleared out.
  21623. */
  21624. #define UART_CFIFO_RXFLUSH(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXFLUSH_SHIFT)) & UART_CFIFO_RXFLUSH_MASK)
  21625. #define UART_CFIFO_TXFLUSH_MASK (0x80U)
  21626. #define UART_CFIFO_TXFLUSH_SHIFT (7U)
  21627. /*! TXFLUSH - Transmit FIFO/Buffer Flush
  21628. * 0b0..No flush operation occurs.
  21629. * 0b1..All data in the transmit FIFO/Buffer is cleared out.
  21630. */
  21631. #define UART_CFIFO_TXFLUSH(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_TXFLUSH_SHIFT)) & UART_CFIFO_TXFLUSH_MASK)
  21632. /*! @} */
  21633. /*! @name SFIFO - UART FIFO Status Register */
  21634. /*! @{ */
  21635. #define UART_SFIFO_RXUF_MASK (0x1U)
  21636. #define UART_SFIFO_RXUF_SHIFT (0U)
  21637. /*! RXUF - Receiver Buffer Underflow Flag
  21638. * 0b0..No receive buffer underflow has occurred since the last time the flag was cleared.
  21639. * 0b1..At least one receive buffer underflow has occurred since the last time the flag was cleared.
  21640. */
  21641. #define UART_SFIFO_RXUF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXUF_SHIFT)) & UART_SFIFO_RXUF_MASK)
  21642. #define UART_SFIFO_TXOF_MASK (0x2U)
  21643. #define UART_SFIFO_TXOF_SHIFT (1U)
  21644. /*! TXOF - Transmitter Buffer Overflow Flag
  21645. * 0b0..No transmit buffer overflow has occurred since the last time the flag was cleared.
  21646. * 0b1..At least one transmit buffer overflow has occurred since the last time the flag was cleared.
  21647. */
  21648. #define UART_SFIFO_TXOF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_TXOF_SHIFT)) & UART_SFIFO_TXOF_MASK)
  21649. #define UART_SFIFO_RXOF_MASK (0x4U)
  21650. #define UART_SFIFO_RXOF_SHIFT (2U)
  21651. /*! RXOF - Receiver Buffer Overflow Flag
  21652. * 0b0..No receive buffer overflow has occurred since the last time the flag was cleared.
  21653. * 0b1..At least one receive buffer overflow has occurred since the last time the flag was cleared.
  21654. */
  21655. #define UART_SFIFO_RXOF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXOF_SHIFT)) & UART_SFIFO_RXOF_MASK)
  21656. #define UART_SFIFO_RXEMPT_MASK (0x40U)
  21657. #define UART_SFIFO_RXEMPT_SHIFT (6U)
  21658. /*! RXEMPT - Receive Buffer/FIFO Empty
  21659. * 0b0..Receive buffer is not empty.
  21660. * 0b1..Receive buffer is empty.
  21661. */
  21662. #define UART_SFIFO_RXEMPT(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXEMPT_SHIFT)) & UART_SFIFO_RXEMPT_MASK)
  21663. #define UART_SFIFO_TXEMPT_MASK (0x80U)
  21664. #define UART_SFIFO_TXEMPT_SHIFT (7U)
  21665. /*! TXEMPT - Transmit Buffer/FIFO Empty
  21666. * 0b0..Transmit buffer is not empty.
  21667. * 0b1..Transmit buffer is empty.
  21668. */
  21669. #define UART_SFIFO_TXEMPT(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_TXEMPT_SHIFT)) & UART_SFIFO_TXEMPT_MASK)
  21670. /*! @} */
  21671. /*! @name TWFIFO - UART FIFO Transmit Watermark */
  21672. /*! @{ */
  21673. #define UART_TWFIFO_TXWATER_MASK (0xFFU)
  21674. #define UART_TWFIFO_TXWATER_SHIFT (0U)
  21675. #define UART_TWFIFO_TXWATER(x) (((uint8_t)(((uint8_t)(x)) << UART_TWFIFO_TXWATER_SHIFT)) & UART_TWFIFO_TXWATER_MASK)
  21676. /*! @} */
  21677. /*! @name TCFIFO - UART FIFO Transmit Count */
  21678. /*! @{ */
  21679. #define UART_TCFIFO_TXCOUNT_MASK (0xFFU)
  21680. #define UART_TCFIFO_TXCOUNT_SHIFT (0U)
  21681. #define UART_TCFIFO_TXCOUNT(x) (((uint8_t)(((uint8_t)(x)) << UART_TCFIFO_TXCOUNT_SHIFT)) & UART_TCFIFO_TXCOUNT_MASK)
  21682. /*! @} */
  21683. /*! @name RWFIFO - UART FIFO Receive Watermark */
  21684. /*! @{ */
  21685. #define UART_RWFIFO_RXWATER_MASK (0xFFU)
  21686. #define UART_RWFIFO_RXWATER_SHIFT (0U)
  21687. #define UART_RWFIFO_RXWATER(x) (((uint8_t)(((uint8_t)(x)) << UART_RWFIFO_RXWATER_SHIFT)) & UART_RWFIFO_RXWATER_MASK)
  21688. /*! @} */
  21689. /*! @name RCFIFO - UART FIFO Receive Count */
  21690. /*! @{ */
  21691. #define UART_RCFIFO_RXCOUNT_MASK (0xFFU)
  21692. #define UART_RCFIFO_RXCOUNT_SHIFT (0U)
  21693. #define UART_RCFIFO_RXCOUNT(x) (((uint8_t)(((uint8_t)(x)) << UART_RCFIFO_RXCOUNT_SHIFT)) & UART_RCFIFO_RXCOUNT_MASK)
  21694. /*! @} */
  21695. /*! @name C7816 - UART 7816 Control Register */
  21696. /*! @{ */
  21697. #define UART_C7816_ISO_7816E_MASK (0x1U)
  21698. #define UART_C7816_ISO_7816E_SHIFT (0U)
  21699. /*! ISO_7816E - ISO-7816 Functionality Enabled
  21700. * 0b0..ISO-7816 functionality is turned off/not enabled.
  21701. * 0b1..ISO-7816 functionality is turned on/enabled.
  21702. */
  21703. #define UART_C7816_ISO_7816E(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ISO_7816E_SHIFT)) & UART_C7816_ISO_7816E_MASK)
  21704. #define UART_C7816_TTYPE_MASK (0x2U)
  21705. #define UART_C7816_TTYPE_SHIFT (1U)
  21706. /*! TTYPE - Transfer Type
  21707. * 0b0..T = 0 per the ISO-7816 specification.
  21708. * 0b1..T = 1 per the ISO-7816 specification.
  21709. */
  21710. #define UART_C7816_TTYPE(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_TTYPE_SHIFT)) & UART_C7816_TTYPE_MASK)
  21711. #define UART_C7816_INIT_MASK (0x4U)
  21712. #define UART_C7816_INIT_SHIFT (2U)
  21713. /*! INIT - Detect Initial Character
  21714. * 0b0..Normal operating mode. Receiver does not seek to identify initial character.
  21715. * 0b1..Receiver searches for initial character.
  21716. */
  21717. #define UART_C7816_INIT(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_INIT_SHIFT)) & UART_C7816_INIT_MASK)
  21718. #define UART_C7816_ANACK_MASK (0x8U)
  21719. #define UART_C7816_ANACK_SHIFT (3U)
  21720. /*! ANACK - Generate NACK on Error
  21721. * 0b0..No NACK is automatically generated.
  21722. * 0b1..A NACK is automatically generated if a parity error is detected or if an invalid initial character is detected.
  21723. */
  21724. #define UART_C7816_ANACK(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ANACK_SHIFT)) & UART_C7816_ANACK_MASK)
  21725. #define UART_C7816_ONACK_MASK (0x10U)
  21726. #define UART_C7816_ONACK_SHIFT (4U)
  21727. /*! ONACK - Generate NACK on Overflow
  21728. * 0b0..The received data does not generate a NACK when the receipt of the data results in an overflow event.
  21729. * 0b1..If the receiver buffer overflows, a NACK is automatically sent on a received character.
  21730. */
  21731. #define UART_C7816_ONACK(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ONACK_SHIFT)) & UART_C7816_ONACK_MASK)
  21732. /*! @} */
  21733. /*! @name IE7816 - UART 7816 Interrupt Enable Register */
  21734. /*! @{ */
  21735. #define UART_IE7816_RXTE_MASK (0x1U)
  21736. #define UART_IE7816_RXTE_SHIFT (0U)
  21737. /*! RXTE - Receive Threshold Exceeded Interrupt Enable
  21738. * 0b0..The assertion of IS7816[RXT] does not result in the generation of an interrupt.
  21739. * 0b1..The assertion of IS7816[RXT] results in the generation of an interrupt.
  21740. */
  21741. #define UART_IE7816_RXTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_RXTE_SHIFT)) & UART_IE7816_RXTE_MASK)
  21742. #define UART_IE7816_TXTE_MASK (0x2U)
  21743. #define UART_IE7816_TXTE_SHIFT (1U)
  21744. /*! TXTE - Transmit Threshold Exceeded Interrupt Enable
  21745. * 0b0..The assertion of IS7816[TXT] does not result in the generation of an interrupt.
  21746. * 0b1..The assertion of IS7816[TXT] results in the generation of an interrupt.
  21747. */
  21748. #define UART_IE7816_TXTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_TXTE_SHIFT)) & UART_IE7816_TXTE_MASK)
  21749. #define UART_IE7816_GTVE_MASK (0x4U)
  21750. #define UART_IE7816_GTVE_SHIFT (2U)
  21751. /*! GTVE - Guard Timer Violated Interrupt Enable
  21752. * 0b0..The assertion of IS7816[GTV] does not result in the generation of an interrupt.
  21753. * 0b1..The assertion of IS7816[GTV] results in the generation of an interrupt.
  21754. */
  21755. #define UART_IE7816_GTVE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_GTVE_SHIFT)) & UART_IE7816_GTVE_MASK)
  21756. #define UART_IE7816_ADTE_MASK (0x8U)
  21757. #define UART_IE7816_ADTE_SHIFT (3U)
  21758. /*! ADTE - ATR Duration Timer Interrupt Enable
  21759. * 0b0..The assertion of IS7816[ADT] does not result in the generation of an interrupt.
  21760. * 0b1..The assertion of IS7816[ADT] results in the generation of an interrupt.
  21761. */
  21762. #define UART_IE7816_ADTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_ADTE_SHIFT)) & UART_IE7816_ADTE_MASK)
  21763. #define UART_IE7816_INITDE_MASK (0x10U)
  21764. #define UART_IE7816_INITDE_SHIFT (4U)
  21765. /*! INITDE - Initial Character Detected Interrupt Enable
  21766. * 0b0..The assertion of IS7816[INITD] does not result in the generation of an interrupt.
  21767. * 0b1..The assertion of IS7816[INITD] results in the generation of an interrupt.
  21768. */
  21769. #define UART_IE7816_INITDE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_INITDE_SHIFT)) & UART_IE7816_INITDE_MASK)
  21770. #define UART_IE7816_BWTE_MASK (0x20U)
  21771. #define UART_IE7816_BWTE_SHIFT (5U)
  21772. /*! BWTE - Block Wait Timer Interrupt Enable
  21773. * 0b0..The assertion of IS7816[BWT] does not result in the generation of an interrupt.
  21774. * 0b1..The assertion of IS7816[BWT] results in the generation of an interrupt.
  21775. */
  21776. #define UART_IE7816_BWTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_BWTE_SHIFT)) & UART_IE7816_BWTE_MASK)
  21777. #define UART_IE7816_CWTE_MASK (0x40U)
  21778. #define UART_IE7816_CWTE_SHIFT (6U)
  21779. /*! CWTE - Character Wait Timer Interrupt Enable
  21780. * 0b0..The assertion of IS7816[CWT] does not result in the generation of an interrupt.
  21781. * 0b1..The assertion of IS7816[CWT] results in the generation of an interrupt.
  21782. */
  21783. #define UART_IE7816_CWTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_CWTE_SHIFT)) & UART_IE7816_CWTE_MASK)
  21784. #define UART_IE7816_WTE_MASK (0x80U)
  21785. #define UART_IE7816_WTE_SHIFT (7U)
  21786. /*! WTE - Wait Timer Interrupt Enable
  21787. * 0b0..The assertion of IS7816[WT] does not result in the generation of an interrupt.
  21788. * 0b1..The assertion of IS7816[WT] results in the generation of an interrupt.
  21789. */
  21790. #define UART_IE7816_WTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_WTE_SHIFT)) & UART_IE7816_WTE_MASK)
  21791. /*! @} */
  21792. /*! @name IS7816 - UART 7816 Interrupt Status Register */
  21793. /*! @{ */
  21794. #define UART_IS7816_RXT_MASK (0x1U)
  21795. #define UART_IS7816_RXT_SHIFT (0U)
  21796. /*! RXT - Receive Threshold Exceeded Interrupt
  21797. * 0b0..The number of consecutive NACKS generated as a result of parity errors and buffer overruns is less than or equal to the value in ET7816[RXTHRESHOLD].
  21798. * 0b1..The number of consecutive NACKS generated as a result of parity errors and buffer overruns is greater than the value in ET7816[RXTHRESHOLD].
  21799. */
  21800. #define UART_IS7816_RXT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_RXT_SHIFT)) & UART_IS7816_RXT_MASK)
  21801. #define UART_IS7816_TXT_MASK (0x2U)
  21802. #define UART_IS7816_TXT_SHIFT (1U)
  21803. /*! TXT - Transmit Threshold Exceeded Interrupt
  21804. * 0b0..The number of retries and corresponding NACKS does not exceed the value in ET7816[TXTHRESHOLD].
  21805. * 0b1..The number of retries and corresponding NACKS exceeds the value in ET7816[TXTHRESHOLD].
  21806. */
  21807. #define UART_IS7816_TXT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_TXT_SHIFT)) & UART_IS7816_TXT_MASK)
  21808. #define UART_IS7816_GTV_MASK (0x4U)
  21809. #define UART_IS7816_GTV_SHIFT (2U)
  21810. /*! GTV - Guard Timer Violated Interrupt
  21811. * 0b0..A guard time (GT, CGT, or BGT) has not been violated.
  21812. * 0b1..A guard time (GT, CGT, or BGT) has been violated.
  21813. */
  21814. #define UART_IS7816_GTV(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_GTV_SHIFT)) & UART_IS7816_GTV_MASK)
  21815. #define UART_IS7816_ADT_MASK (0x8U)
  21816. #define UART_IS7816_ADT_SHIFT (3U)
  21817. /*! ADT - ATR Duration Time Interrupt
  21818. * 0b0..ATR Duration time (ADT) has not been violated.
  21819. * 0b1..ATR Duration time (ADT) has been violated.
  21820. */
  21821. #define UART_IS7816_ADT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_ADT_SHIFT)) & UART_IS7816_ADT_MASK)
  21822. #define UART_IS7816_INITD_MASK (0x10U)
  21823. #define UART_IS7816_INITD_SHIFT (4U)
  21824. /*! INITD - Initial Character Detected Interrupt
  21825. * 0b0..A valid initial character has not been received.
  21826. * 0b1..A valid initial character has been received.
  21827. */
  21828. #define UART_IS7816_INITD(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_INITD_SHIFT)) & UART_IS7816_INITD_MASK)
  21829. #define UART_IS7816_BWT_MASK (0x20U)
  21830. #define UART_IS7816_BWT_SHIFT (5U)
  21831. /*! BWT - Block Wait Timer Interrupt
  21832. * 0b0..Block wait time (BWT) has not been violated.
  21833. * 0b1..Block wait time (BWT) has been violated.
  21834. */
  21835. #define UART_IS7816_BWT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_BWT_SHIFT)) & UART_IS7816_BWT_MASK)
  21836. #define UART_IS7816_CWT_MASK (0x40U)
  21837. #define UART_IS7816_CWT_SHIFT (6U)
  21838. /*! CWT - Character Wait Timer Interrupt
  21839. * 0b0..Character wait time (CWT) has not been violated.
  21840. * 0b1..Character wait time (CWT) has been violated.
  21841. */
  21842. #define UART_IS7816_CWT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_CWT_SHIFT)) & UART_IS7816_CWT_MASK)
  21843. #define UART_IS7816_WT_MASK (0x80U)
  21844. #define UART_IS7816_WT_SHIFT (7U)
  21845. /*! WT - Wait Timer Interrupt
  21846. * 0b0..Wait time (WT) has not been violated.
  21847. * 0b1..Wait time (WT) has been violated.
  21848. */
  21849. #define UART_IS7816_WT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_WT_SHIFT)) & UART_IS7816_WT_MASK)
  21850. /*! @} */
  21851. /*! @name WP7816 - UART 7816 Wait Parameter Register */
  21852. /*! @{ */
  21853. #define UART_WP7816_WTX_MASK (0xFFU)
  21854. #define UART_WP7816_WTX_SHIFT (0U)
  21855. #define UART_WP7816_WTX(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816_WTX_SHIFT)) & UART_WP7816_WTX_MASK)
  21856. /*! @} */
  21857. /*! @name WN7816 - UART 7816 Wait N Register */
  21858. /*! @{ */
  21859. #define UART_WN7816_GTN_MASK (0xFFU)
  21860. #define UART_WN7816_GTN_SHIFT (0U)
  21861. #define UART_WN7816_GTN(x) (((uint8_t)(((uint8_t)(x)) << UART_WN7816_GTN_SHIFT)) & UART_WN7816_GTN_MASK)
  21862. /*! @} */
  21863. /*! @name WF7816 - UART 7816 Wait FD Register */
  21864. /*! @{ */
  21865. #define UART_WF7816_GTFD_MASK (0xFFU)
  21866. #define UART_WF7816_GTFD_SHIFT (0U)
  21867. #define UART_WF7816_GTFD(x) (((uint8_t)(((uint8_t)(x)) << UART_WF7816_GTFD_SHIFT)) & UART_WF7816_GTFD_MASK)
  21868. /*! @} */
  21869. /*! @name ET7816 - UART 7816 Error Threshold Register */
  21870. /*! @{ */
  21871. #define UART_ET7816_RXTHRESHOLD_MASK (0xFU)
  21872. #define UART_ET7816_RXTHRESHOLD_SHIFT (0U)
  21873. #define UART_ET7816_RXTHRESHOLD(x) (((uint8_t)(((uint8_t)(x)) << UART_ET7816_RXTHRESHOLD_SHIFT)) & UART_ET7816_RXTHRESHOLD_MASK)
  21874. #define UART_ET7816_TXTHRESHOLD_MASK (0xF0U)
  21875. #define UART_ET7816_TXTHRESHOLD_SHIFT (4U)
  21876. /*! TXTHRESHOLD - Transmit NACK Threshold
  21877. * 0b0000..TXT asserts on the first NACK that is received.
  21878. * 0b0001..TXT asserts on the second NACK that is received.
  21879. */
  21880. #define UART_ET7816_TXTHRESHOLD(x) (((uint8_t)(((uint8_t)(x)) << UART_ET7816_TXTHRESHOLD_SHIFT)) & UART_ET7816_TXTHRESHOLD_MASK)
  21881. /*! @} */
  21882. /*! @name TL7816 - UART 7816 Transmit Length Register */
  21883. /*! @{ */
  21884. #define UART_TL7816_TLEN_MASK (0xFFU)
  21885. #define UART_TL7816_TLEN_SHIFT (0U)
  21886. #define UART_TL7816_TLEN(x) (((uint8_t)(((uint8_t)(x)) << UART_TL7816_TLEN_SHIFT)) & UART_TL7816_TLEN_MASK)
  21887. /*! @} */
  21888. /*! @name AP7816A_T0 - UART 7816 ATR Duration Timer Register A */
  21889. /*! @{ */
  21890. #define UART_AP7816A_T0_ADTI_H_MASK (0xFFU)
  21891. #define UART_AP7816A_T0_ADTI_H_SHIFT (0U)
  21892. #define UART_AP7816A_T0_ADTI_H(x) (((uint8_t)(((uint8_t)(x)) << UART_AP7816A_T0_ADTI_H_SHIFT)) & UART_AP7816A_T0_ADTI_H_MASK)
  21893. /*! @} */
  21894. /*! @name AP7816B_T0 - UART 7816 ATR Duration Timer Register B */
  21895. /*! @{ */
  21896. #define UART_AP7816B_T0_ADTI_L_MASK (0xFFU)
  21897. #define UART_AP7816B_T0_ADTI_L_SHIFT (0U)
  21898. #define UART_AP7816B_T0_ADTI_L(x) (((uint8_t)(((uint8_t)(x)) << UART_AP7816B_T0_ADTI_L_SHIFT)) & UART_AP7816B_T0_ADTI_L_MASK)
  21899. /*! @} */
  21900. /*! @name WP7816A_T0 - UART 7816 Wait Parameter Register A */
  21901. /*! @{ */
  21902. #define UART_WP7816A_T0_WI_H_MASK (0xFFU)
  21903. #define UART_WP7816A_T0_WI_H_SHIFT (0U)
  21904. #define UART_WP7816A_T0_WI_H(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816A_T0_WI_H_SHIFT)) & UART_WP7816A_T0_WI_H_MASK)
  21905. /*! @} */
  21906. /*! @name WP7816B_T0 - UART 7816 Wait Parameter Register B */
  21907. /*! @{ */
  21908. #define UART_WP7816B_T0_WI_L_MASK (0xFFU)
  21909. #define UART_WP7816B_T0_WI_L_SHIFT (0U)
  21910. #define UART_WP7816B_T0_WI_L(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816B_T0_WI_L_SHIFT)) & UART_WP7816B_T0_WI_L_MASK)
  21911. /*! @} */
  21912. /*! @name WP7816A_T1 - UART 7816 Wait Parameter Register A */
  21913. /*! @{ */
  21914. #define UART_WP7816A_T1_BWI_H_MASK (0xFFU)
  21915. #define UART_WP7816A_T1_BWI_H_SHIFT (0U)
  21916. #define UART_WP7816A_T1_BWI_H(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816A_T1_BWI_H_SHIFT)) & UART_WP7816A_T1_BWI_H_MASK)
  21917. /*! @} */
  21918. /*! @name WP7816B_T1 - UART 7816 Wait Parameter Register B */
  21919. /*! @{ */
  21920. #define UART_WP7816B_T1_BWI_L_MASK (0xFFU)
  21921. #define UART_WP7816B_T1_BWI_L_SHIFT (0U)
  21922. #define UART_WP7816B_T1_BWI_L(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816B_T1_BWI_L_SHIFT)) & UART_WP7816B_T1_BWI_L_MASK)
  21923. /*! @} */
  21924. /*! @name WGP7816_T1 - UART 7816 Wait and Guard Parameter Register */
  21925. /*! @{ */
  21926. #define UART_WGP7816_T1_BGI_MASK (0xFU)
  21927. #define UART_WGP7816_T1_BGI_SHIFT (0U)
  21928. #define UART_WGP7816_T1_BGI(x) (((uint8_t)(((uint8_t)(x)) << UART_WGP7816_T1_BGI_SHIFT)) & UART_WGP7816_T1_BGI_MASK)
  21929. #define UART_WGP7816_T1_CWI1_MASK (0xF0U)
  21930. #define UART_WGP7816_T1_CWI1_SHIFT (4U)
  21931. #define UART_WGP7816_T1_CWI1(x) (((uint8_t)(((uint8_t)(x)) << UART_WGP7816_T1_CWI1_SHIFT)) & UART_WGP7816_T1_CWI1_MASK)
  21932. /*! @} */
  21933. /*! @name WP7816C_T1 - UART 7816 Wait Parameter Register C */
  21934. /*! @{ */
  21935. #define UART_WP7816C_T1_CWI2_MASK (0x1FU)
  21936. #define UART_WP7816C_T1_CWI2_SHIFT (0U)
  21937. #define UART_WP7816C_T1_CWI2(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816C_T1_CWI2_SHIFT)) & UART_WP7816C_T1_CWI2_MASK)
  21938. /*! @} */
  21939. /*!
  21940. * @}
  21941. */ /* end of group UART_Register_Masks */
  21942. /* UART - Peripheral instance base addresses */
  21943. /** Peripheral UART0 base address */
  21944. #define UART0_BASE (0x4006A000u)
  21945. /** Peripheral UART0 base pointer */
  21946. #define UART0 ((UART_Type *)UART0_BASE)
  21947. /** Peripheral UART1 base address */
  21948. #define UART1_BASE (0x4006B000u)
  21949. /** Peripheral UART1 base pointer */
  21950. #define UART1 ((UART_Type *)UART1_BASE)
  21951. /** Peripheral UART2 base address */
  21952. #define UART2_BASE (0x4006C000u)
  21953. /** Peripheral UART2 base pointer */
  21954. #define UART2 ((UART_Type *)UART2_BASE)
  21955. /** Peripheral UART3 base address */
  21956. #define UART3_BASE (0x4006D000u)
  21957. /** Peripheral UART3 base pointer */
  21958. #define UART3 ((UART_Type *)UART3_BASE)
  21959. /** Peripheral UART4 base address */
  21960. #define UART4_BASE (0x400EA000u)
  21961. /** Peripheral UART4 base pointer */
  21962. #define UART4 ((UART_Type *)UART4_BASE)
  21963. /** Peripheral UART5 base address */
  21964. #define UART5_BASE (0x400EB000u)
  21965. /** Peripheral UART5 base pointer */
  21966. #define UART5 ((UART_Type *)UART5_BASE)
  21967. /** Array initializer of UART peripheral base addresses */
  21968. #define UART_BASE_ADDRS { UART0_BASE, UART1_BASE, UART2_BASE, UART3_BASE, UART4_BASE, UART5_BASE }
  21969. /** Array initializer of UART peripheral base pointers */
  21970. #define UART_BASE_PTRS { UART0, UART1, UART2, UART3, UART4, UART5 }
  21971. /** Interrupt vectors for the UART peripheral type */
  21972. #define UART_RX_TX_IRQS { UART0_RX_TX_IRQn, UART1_RX_TX_IRQn, UART2_RX_TX_IRQn, UART3_RX_TX_IRQn, UART4_RX_TX_IRQn, UART5_RX_TX_IRQn }
  21973. #define UART_ERR_IRQS { UART0_ERR_IRQn, UART1_ERR_IRQn, UART2_ERR_IRQn, UART3_ERR_IRQn, UART4_ERR_IRQn, UART5_ERR_IRQn }
  21974. /*!
  21975. * @}
  21976. */ /* end of group UART_Peripheral_Access_Layer */
  21977. /* ----------------------------------------------------------------------------
  21978. -- WDOG Peripheral Access Layer
  21979. ---------------------------------------------------------------------------- */
  21980. /*!
  21981. * @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer
  21982. * @{
  21983. */
  21984. /** WDOG - Register Layout Typedef */
  21985. typedef struct {
  21986. __IO uint16_t STCTRLH; /**< Watchdog Status and Control Register High, offset: 0x0 */
  21987. __IO uint16_t STCTRLL; /**< Watchdog Status and Control Register Low, offset: 0x2 */
  21988. __IO uint16_t TOVALH; /**< Watchdog Time-out Value Register High, offset: 0x4 */
  21989. __IO uint16_t TOVALL; /**< Watchdog Time-out Value Register Low, offset: 0x6 */
  21990. __IO uint16_t WINH; /**< Watchdog Window Register High, offset: 0x8 */
  21991. __IO uint16_t WINL; /**< Watchdog Window Register Low, offset: 0xA */
  21992. __IO uint16_t REFRESH; /**< Watchdog Refresh register, offset: 0xC */
  21993. __IO uint16_t UNLOCK; /**< Watchdog Unlock register, offset: 0xE */
  21994. __IO uint16_t TMROUTH; /**< Watchdog Timer Output Register High, offset: 0x10 */
  21995. __IO uint16_t TMROUTL; /**< Watchdog Timer Output Register Low, offset: 0x12 */
  21996. __IO uint16_t RSTCNT; /**< Watchdog Reset Count register, offset: 0x14 */
  21997. __IO uint16_t PRESC; /**< Watchdog Prescaler register, offset: 0x16 */
  21998. } WDOG_Type;
  21999. /* ----------------------------------------------------------------------------
  22000. -- WDOG Register Masks
  22001. ---------------------------------------------------------------------------- */
  22002. /*!
  22003. * @addtogroup WDOG_Register_Masks WDOG Register Masks
  22004. * @{
  22005. */
  22006. /*! @name STCTRLH - Watchdog Status and Control Register High */
  22007. /*! @{ */
  22008. #define WDOG_STCTRLH_WDOGEN_MASK (0x1U)
  22009. #define WDOG_STCTRLH_WDOGEN_SHIFT (0U)
  22010. /*! WDOGEN
  22011. * 0b0..WDOG is disabled.
  22012. * 0b1..WDOG is enabled.
  22013. */
  22014. #define WDOG_STCTRLH_WDOGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WDOGEN_SHIFT)) & WDOG_STCTRLH_WDOGEN_MASK)
  22015. #define WDOG_STCTRLH_CLKSRC_MASK (0x2U)
  22016. #define WDOG_STCTRLH_CLKSRC_SHIFT (1U)
  22017. /*! CLKSRC
  22018. * 0b0..WDOG clock sourced from LPO .
  22019. * 0b1..WDOG clock sourced from alternate clock source.
  22020. */
  22021. #define WDOG_STCTRLH_CLKSRC(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_CLKSRC_SHIFT)) & WDOG_STCTRLH_CLKSRC_MASK)
  22022. #define WDOG_STCTRLH_IRQRSTEN_MASK (0x4U)
  22023. #define WDOG_STCTRLH_IRQRSTEN_SHIFT (2U)
  22024. /*! IRQRSTEN
  22025. * 0b0..WDOG time-out generates reset only.
  22026. * 0b1..WDOG time-out initially generates an interrupt. After WCT, it generates a reset.
  22027. */
  22028. #define WDOG_STCTRLH_IRQRSTEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_IRQRSTEN_SHIFT)) & WDOG_STCTRLH_IRQRSTEN_MASK)
  22029. #define WDOG_STCTRLH_WINEN_MASK (0x8U)
  22030. #define WDOG_STCTRLH_WINEN_SHIFT (3U)
  22031. /*! WINEN
  22032. * 0b0..Windowing mode is disabled.
  22033. * 0b1..Windowing mode is enabled.
  22034. */
  22035. #define WDOG_STCTRLH_WINEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WINEN_SHIFT)) & WDOG_STCTRLH_WINEN_MASK)
  22036. #define WDOG_STCTRLH_ALLOWUPDATE_MASK (0x10U)
  22037. #define WDOG_STCTRLH_ALLOWUPDATE_SHIFT (4U)
  22038. /*! ALLOWUPDATE
  22039. * 0b0..No further updates allowed to WDOG write-once registers.
  22040. * 0b1..WDOG write-once registers can be unlocked for updating.
  22041. */
  22042. #define WDOG_STCTRLH_ALLOWUPDATE(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_ALLOWUPDATE_SHIFT)) & WDOG_STCTRLH_ALLOWUPDATE_MASK)
  22043. #define WDOG_STCTRLH_DBGEN_MASK (0x20U)
  22044. #define WDOG_STCTRLH_DBGEN_SHIFT (5U)
  22045. /*! DBGEN
  22046. * 0b0..WDOG is disabled in CPU Debug mode.
  22047. * 0b1..WDOG is enabled in CPU Debug mode.
  22048. */
  22049. #define WDOG_STCTRLH_DBGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DBGEN_SHIFT)) & WDOG_STCTRLH_DBGEN_MASK)
  22050. #define WDOG_STCTRLH_STOPEN_MASK (0x40U)
  22051. #define WDOG_STCTRLH_STOPEN_SHIFT (6U)
  22052. /*! STOPEN
  22053. * 0b0..WDOG is disabled in CPU Stop mode.
  22054. * 0b1..WDOG is enabled in CPU Stop mode.
  22055. */
  22056. #define WDOG_STCTRLH_STOPEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_STOPEN_SHIFT)) & WDOG_STCTRLH_STOPEN_MASK)
  22057. #define WDOG_STCTRLH_WAITEN_MASK (0x80U)
  22058. #define WDOG_STCTRLH_WAITEN_SHIFT (7U)
  22059. /*! WAITEN
  22060. * 0b0..WDOG is disabled in CPU Wait mode.
  22061. * 0b1..WDOG is enabled in CPU Wait mode.
  22062. */
  22063. #define WDOG_STCTRLH_WAITEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WAITEN_SHIFT)) & WDOG_STCTRLH_WAITEN_MASK)
  22064. #define WDOG_STCTRLH_TESTWDOG_MASK (0x400U)
  22065. #define WDOG_STCTRLH_TESTWDOG_SHIFT (10U)
  22066. #define WDOG_STCTRLH_TESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTWDOG_SHIFT)) & WDOG_STCTRLH_TESTWDOG_MASK)
  22067. #define WDOG_STCTRLH_TESTSEL_MASK (0x800U)
  22068. #define WDOG_STCTRLH_TESTSEL_SHIFT (11U)
  22069. /*! TESTSEL
  22070. * 0b0..Quick test. The timer runs in normal operation. You can load a small time-out value to do a quick test.
  22071. * 0b1..Byte test. Puts the timer in the byte test mode where individual bytes of the timer are enabled for operation and are compared for time-out against the corresponding byte of the programmed time-out value. Select the byte through BYTESEL[1:0] for testing.
  22072. */
  22073. #define WDOG_STCTRLH_TESTSEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTSEL_SHIFT)) & WDOG_STCTRLH_TESTSEL_MASK)
  22074. #define WDOG_STCTRLH_BYTESEL_MASK (0x3000U)
  22075. #define WDOG_STCTRLH_BYTESEL_SHIFT (12U)
  22076. /*! BYTESEL
  22077. * 0b00..Byte 0 selected
  22078. * 0b01..Byte 1 selected
  22079. * 0b10..Byte 2 selected
  22080. * 0b11..Byte 3 selected
  22081. */
  22082. #define WDOG_STCTRLH_BYTESEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_BYTESEL_SHIFT)) & WDOG_STCTRLH_BYTESEL_MASK)
  22083. #define WDOG_STCTRLH_DISTESTWDOG_MASK (0x4000U)
  22084. #define WDOG_STCTRLH_DISTESTWDOG_SHIFT (14U)
  22085. /*! DISTESTWDOG
  22086. * 0b0..WDOG functional test mode is not disabled.
  22087. * 0b1..WDOG functional test mode is disabled permanently until reset.
  22088. */
  22089. #define WDOG_STCTRLH_DISTESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DISTESTWDOG_SHIFT)) & WDOG_STCTRLH_DISTESTWDOG_MASK)
  22090. /*! @} */
  22091. /*! @name STCTRLL - Watchdog Status and Control Register Low */
  22092. /*! @{ */
  22093. #define WDOG_STCTRLL_INTFLG_MASK (0x8000U)
  22094. #define WDOG_STCTRLL_INTFLG_SHIFT (15U)
  22095. #define WDOG_STCTRLL_INTFLG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLL_INTFLG_SHIFT)) & WDOG_STCTRLL_INTFLG_MASK)
  22096. /*! @} */
  22097. /*! @name TOVALH - Watchdog Time-out Value Register High */
  22098. /*! @{ */
  22099. #define WDOG_TOVALH_TOVALHIGH_MASK (0xFFFFU)
  22100. #define WDOG_TOVALH_TOVALHIGH_SHIFT (0U)
  22101. #define WDOG_TOVALH_TOVALHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALH_TOVALHIGH_SHIFT)) & WDOG_TOVALH_TOVALHIGH_MASK)
  22102. /*! @} */
  22103. /*! @name TOVALL - Watchdog Time-out Value Register Low */
  22104. /*! @{ */
  22105. #define WDOG_TOVALL_TOVALLOW_MASK (0xFFFFU)
  22106. #define WDOG_TOVALL_TOVALLOW_SHIFT (0U)
  22107. #define WDOG_TOVALL_TOVALLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALL_TOVALLOW_SHIFT)) & WDOG_TOVALL_TOVALLOW_MASK)
  22108. /*! @} */
  22109. /*! @name WINH - Watchdog Window Register High */
  22110. /*! @{ */
  22111. #define WDOG_WINH_WINHIGH_MASK (0xFFFFU)
  22112. #define WDOG_WINH_WINHIGH_SHIFT (0U)
  22113. #define WDOG_WINH_WINHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINH_WINHIGH_SHIFT)) & WDOG_WINH_WINHIGH_MASK)
  22114. /*! @} */
  22115. /*! @name WINL - Watchdog Window Register Low */
  22116. /*! @{ */
  22117. #define WDOG_WINL_WINLOW_MASK (0xFFFFU)
  22118. #define WDOG_WINL_WINLOW_SHIFT (0U)
  22119. #define WDOG_WINL_WINLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINL_WINLOW_SHIFT)) & WDOG_WINL_WINLOW_MASK)
  22120. /*! @} */
  22121. /*! @name REFRESH - Watchdog Refresh register */
  22122. /*! @{ */
  22123. #define WDOG_REFRESH_WDOGREFRESH_MASK (0xFFFFU)
  22124. #define WDOG_REFRESH_WDOGREFRESH_SHIFT (0U)
  22125. #define WDOG_REFRESH_WDOGREFRESH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_REFRESH_WDOGREFRESH_SHIFT)) & WDOG_REFRESH_WDOGREFRESH_MASK)
  22126. /*! @} */
  22127. /*! @name UNLOCK - Watchdog Unlock register */
  22128. /*! @{ */
  22129. #define WDOG_UNLOCK_WDOGUNLOCK_MASK (0xFFFFU)
  22130. #define WDOG_UNLOCK_WDOGUNLOCK_SHIFT (0U)
  22131. #define WDOG_UNLOCK_WDOGUNLOCK(x) (((uint16_t)(((uint16_t)(x)) << WDOG_UNLOCK_WDOGUNLOCK_SHIFT)) & WDOG_UNLOCK_WDOGUNLOCK_MASK)
  22132. /*! @} */
  22133. /*! @name TMROUTH - Watchdog Timer Output Register High */
  22134. /*! @{ */
  22135. #define WDOG_TMROUTH_TIMEROUTHIGH_MASK (0xFFFFU)
  22136. #define WDOG_TMROUTH_TIMEROUTHIGH_SHIFT (0U)
  22137. #define WDOG_TMROUTH_TIMEROUTHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTH_TIMEROUTHIGH_SHIFT)) & WDOG_TMROUTH_TIMEROUTHIGH_MASK)
  22138. /*! @} */
  22139. /*! @name TMROUTL - Watchdog Timer Output Register Low */
  22140. /*! @{ */
  22141. #define WDOG_TMROUTL_TIMEROUTLOW_MASK (0xFFFFU)
  22142. #define WDOG_TMROUTL_TIMEROUTLOW_SHIFT (0U)
  22143. #define WDOG_TMROUTL_TIMEROUTLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTL_TIMEROUTLOW_SHIFT)) & WDOG_TMROUTL_TIMEROUTLOW_MASK)
  22144. /*! @} */
  22145. /*! @name RSTCNT - Watchdog Reset Count register */
  22146. /*! @{ */
  22147. #define WDOG_RSTCNT_RSTCNT_MASK (0xFFFFU)
  22148. #define WDOG_RSTCNT_RSTCNT_SHIFT (0U)
  22149. #define WDOG_RSTCNT_RSTCNT(x) (((uint16_t)(((uint16_t)(x)) << WDOG_RSTCNT_RSTCNT_SHIFT)) & WDOG_RSTCNT_RSTCNT_MASK)
  22150. /*! @} */
  22151. /*! @name PRESC - Watchdog Prescaler register */
  22152. /*! @{ */
  22153. #define WDOG_PRESC_PRESCVAL_MASK (0x700U)
  22154. #define WDOG_PRESC_PRESCVAL_SHIFT (8U)
  22155. #define WDOG_PRESC_PRESCVAL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_PRESC_PRESCVAL_SHIFT)) & WDOG_PRESC_PRESCVAL_MASK)
  22156. /*! @} */
  22157. /*!
  22158. * @}
  22159. */ /* end of group WDOG_Register_Masks */
  22160. /* WDOG - Peripheral instance base addresses */
  22161. /** Peripheral WDOG base address */
  22162. #define WDOG_BASE (0x40052000u)
  22163. /** Peripheral WDOG base pointer */
  22164. #define WDOG ((WDOG_Type *)WDOG_BASE)
  22165. /** Array initializer of WDOG peripheral base addresses */
  22166. #define WDOG_BASE_ADDRS { WDOG_BASE }
  22167. /** Array initializer of WDOG peripheral base pointers */
  22168. #define WDOG_BASE_PTRS { WDOG }
  22169. /** Interrupt vectors for the WDOG peripheral type */
  22170. #define WDOG_IRQS { WDOG_EWM_IRQn }
  22171. /*!
  22172. * @}
  22173. */ /* end of group WDOG_Peripheral_Access_Layer */
  22174. /* ----------------------------------------------------------------------------
  22175. -- XBARA Peripheral Access Layer
  22176. ---------------------------------------------------------------------------- */
  22177. /*!
  22178. * @addtogroup XBARA_Peripheral_Access_Layer XBARA Peripheral Access Layer
  22179. * @{
  22180. */
  22181. /** XBARA - Register Layout Typedef */
  22182. typedef struct {
  22183. __IO uint16_t SEL0; /**< Crossbar A Select Register 0, offset: 0x0 */
  22184. __IO uint16_t SEL1; /**< Crossbar A Select Register 1, offset: 0x2 */
  22185. __IO uint16_t SEL2; /**< Crossbar A Select Register 2, offset: 0x4 */
  22186. __IO uint16_t SEL3; /**< Crossbar A Select Register 3, offset: 0x6 */
  22187. __IO uint16_t SEL4; /**< Crossbar A Select Register 4, offset: 0x8 */
  22188. __IO uint16_t SEL5; /**< Crossbar A Select Register 5, offset: 0xA */
  22189. __IO uint16_t SEL6; /**< Crossbar A Select Register 6, offset: 0xC */
  22190. __IO uint16_t SEL7; /**< Crossbar A Select Register 7, offset: 0xE */
  22191. __IO uint16_t SEL8; /**< Crossbar A Select Register 8, offset: 0x10 */
  22192. __IO uint16_t SEL9; /**< Crossbar A Select Register 9, offset: 0x12 */
  22193. __IO uint16_t SEL10; /**< Crossbar A Select Register 10, offset: 0x14 */
  22194. __IO uint16_t SEL11; /**< Crossbar A Select Register 11, offset: 0x16 */
  22195. __IO uint16_t SEL12; /**< Crossbar A Select Register 12, offset: 0x18 */
  22196. __IO uint16_t SEL13; /**< Crossbar A Select Register 13, offset: 0x1A */
  22197. __IO uint16_t SEL14; /**< Crossbar A Select Register 14, offset: 0x1C */
  22198. __IO uint16_t SEL15; /**< Crossbar A Select Register 15, offset: 0x1E */
  22199. __IO uint16_t SEL16; /**< Crossbar A Select Register 16, offset: 0x20 */
  22200. __IO uint16_t SEL17; /**< Crossbar A Select Register 17, offset: 0x22 */
  22201. __IO uint16_t SEL18; /**< Crossbar A Select Register 18, offset: 0x24 */
  22202. __IO uint16_t SEL19; /**< Crossbar A Select Register 19, offset: 0x26 */
  22203. __IO uint16_t SEL20; /**< Crossbar A Select Register 20, offset: 0x28 */
  22204. __IO uint16_t SEL21; /**< Crossbar A Select Register 21, offset: 0x2A */
  22205. __IO uint16_t SEL22; /**< Crossbar A Select Register 22, offset: 0x2C */
  22206. __IO uint16_t SEL23; /**< Crossbar A Select Register 23, offset: 0x2E */
  22207. __IO uint16_t SEL24; /**< Crossbar A Select Register 24, offset: 0x30 */
  22208. __IO uint16_t SEL25; /**< Crossbar A Select Register 25, offset: 0x32 */
  22209. __IO uint16_t SEL26; /**< Crossbar A Select Register 26, offset: 0x34 */
  22210. __IO uint16_t SEL27; /**< Crossbar A Select Register 27, offset: 0x36 */
  22211. __IO uint16_t SEL28; /**< Crossbar A Select Register 28, offset: 0x38 */
  22212. __IO uint16_t SEL29; /**< Crossbar A Select Register 29, offset: 0x3A */
  22213. __IO uint16_t CTRL0; /**< Crossbar A Control Register 0, offset: 0x3C */
  22214. __IO uint16_t CTRL1; /**< Crossbar A Control Register 1, offset: 0x3E */
  22215. } XBARA_Type;
  22216. /* ----------------------------------------------------------------------------
  22217. -- XBARA Register Masks
  22218. ---------------------------------------------------------------------------- */
  22219. /*!
  22220. * @addtogroup XBARA_Register_Masks XBARA Register Masks
  22221. * @{
  22222. */
  22223. /*! @name SEL0 - Crossbar A Select Register 0 */
  22224. /*! @{ */
  22225. #define XBARA_SEL0_SEL0_MASK (0x3FU)
  22226. #define XBARA_SEL0_SEL0_SHIFT (0U)
  22227. /*! SEL0
  22228. * 0b000000..Logic zero
  22229. * 0b000001..Logic one
  22230. * 0b000010..XB_IN2 input pin
  22231. * 0b000011..XB_IN3 input pin
  22232. * 0b000100..XB_IN4 input pin
  22233. * 0b000101..XB_IN5 input pin
  22234. * 0b000110..XB_IN6 input pin
  22235. * 0b000111..XB_IN7 input pin
  22236. * 0b001000..XB_IN8 input pin
  22237. * 0b001001..XB_IN9 input pin
  22238. * 0b001010..XB_IN10 input pin
  22239. * 0b001011..XB_IN11 input pin
  22240. * 0b001100..CMP0 Output
  22241. * 0b001101..CMP1 Output
  22242. * 0b001110..CMP2 Output
  22243. * 0b001111..CMP3 Output
  22244. * 0b010000..FTM0 all channels match trigger ORed together
  22245. * 0b010001..FTM0 counter init trigger
  22246. * 0b010010..FTM3 all channels match trigger ORed together
  22247. * 0b010011..FTM3 counter init trigger
  22248. * 0b010100..PWMA channel 0 trigger 0
  22249. * 0b010101..PWMA channel 0 trigger 1
  22250. * 0b010110..PWMA channel 1 trigger 0
  22251. * 0b010111..PWMA channel 1 trigger 1
  22252. * 0b011000..PWMA channel 2 trigger 0
  22253. * 0b011001..PWMA channel 2 trigger 1
  22254. * 0b011010..PWMA channel 3 trigger 0
  22255. * 0b011011..PWMA channel 3 trigger 1
  22256. * 0b011100..PDB0 channel 1 output trigger
  22257. * 0b011101..PDB0 channel 0 output trigger
  22258. * 0b011110..PDB1 channel 1 output trigger
  22259. * 0b011111..PDB1 channel 0 output trigger
  22260. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22261. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22262. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22263. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22264. * 0b100100..FTM1 all channels match trigger ORed together
  22265. * 0b100101..FTM1 counter init trigger
  22266. * 0b100110..DMA channel 0 done
  22267. * 0b100111..DMA channel 1 done
  22268. * 0b101000..DMA channel 6 done
  22269. * 0b101001..DMA channel 7 done
  22270. * 0b101010..PIT trigger 0
  22271. * 0b101011..PIT trigger 1
  22272. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22273. * 0b101101..ENC compare trigger and position match
  22274. * 0b101110..AOI output 0
  22275. * 0b101111..AOI output 1
  22276. * 0b110000..AOI output 2
  22277. * 0b110001..AOI output 3
  22278. * 0b110010..PIT trigger 2
  22279. * 0b110011..PIT trigger 3
  22280. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22281. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22282. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22283. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22284. * 0b111000..FTM2 all channels match trigger ORed together
  22285. * 0b111001..FTM2 counter init trigger
  22286. */
  22287. #define XBARA_SEL0_SEL0(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL0_SEL0_SHIFT)) & XBARA_SEL0_SEL0_MASK)
  22288. #define XBARA_SEL0_SEL1_MASK (0x3F00U)
  22289. #define XBARA_SEL0_SEL1_SHIFT (8U)
  22290. /*! SEL1
  22291. * 0b000000..Logic zero
  22292. * 0b000001..Logic one
  22293. * 0b000010..XB_IN2 input pin
  22294. * 0b000011..XB_IN3 input pin
  22295. * 0b000100..XB_IN4 input pin
  22296. * 0b000101..XB_IN5 input pin
  22297. * 0b000110..XB_IN6 input pin
  22298. * 0b000111..XB_IN7 input pin
  22299. * 0b001000..XB_IN8 input pin
  22300. * 0b001001..XB_IN9 input pin
  22301. * 0b001010..XB_IN10 input pin
  22302. * 0b001011..XB_IN11 input pin
  22303. * 0b001100..CMP0 Output
  22304. * 0b001101..CMP1 Output
  22305. * 0b001110..CMP2 Output
  22306. * 0b001111..CMP3 Output
  22307. * 0b010000..FTM0 all channels match trigger ORed together
  22308. * 0b010001..FTM0 counter init trigger
  22309. * 0b010010..FTM3 all channels match trigger ORed together
  22310. * 0b010011..FTM3 counter init trigger
  22311. * 0b010100..PWMA channel 0 trigger 0
  22312. * 0b010101..PWMA channel 0 trigger 1
  22313. * 0b010110..PWMA channel 1 trigger 0
  22314. * 0b010111..PWMA channel 1 trigger 1
  22315. * 0b011000..PWMA channel 2 trigger 0
  22316. * 0b011001..PWMA channel 2 trigger 1
  22317. * 0b011010..PWMA channel 3 trigger 0
  22318. * 0b011011..PWMA channel 3 trigger 1
  22319. * 0b011100..PDB0 channel 1 output trigger
  22320. * 0b011101..PDB0 channel 0 output trigger
  22321. * 0b011110..PDB1 channel 1 output trigger
  22322. * 0b011111..PDB1 channel 0 output trigger
  22323. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22324. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22325. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22326. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22327. * 0b100100..FTM1 all channels match trigger ORed together
  22328. * 0b100101..FTM1 counter init trigger
  22329. * 0b100110..DMA channel 0 done
  22330. * 0b100111..DMA channel 1 done
  22331. * 0b101000..DMA channel 6 done
  22332. * 0b101001..DMA channel 7 done
  22333. * 0b101010..PIT trigger 0
  22334. * 0b101011..PIT trigger 1
  22335. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22336. * 0b101101..ENC compare trigger and position match
  22337. * 0b101110..AOI output 0
  22338. * 0b101111..AOI output 1
  22339. * 0b110000..AOI output 2
  22340. * 0b110001..AOI output 3
  22341. * 0b110010..PIT trigger 2
  22342. * 0b110011..PIT trigger 3
  22343. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22344. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22345. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22346. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22347. * 0b111000..FTM2 all channels match trigger ORed together
  22348. * 0b111001..FTM2 counter init trigger
  22349. */
  22350. #define XBARA_SEL0_SEL1(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL0_SEL1_SHIFT)) & XBARA_SEL0_SEL1_MASK)
  22351. /*! @} */
  22352. /*! @name SEL1 - Crossbar A Select Register 1 */
  22353. /*! @{ */
  22354. #define XBARA_SEL1_SEL2_MASK (0x3FU)
  22355. #define XBARA_SEL1_SEL2_SHIFT (0U)
  22356. /*! SEL2
  22357. * 0b000000..Logic zero
  22358. * 0b000001..Logic one
  22359. * 0b000010..XB_IN2 input pin
  22360. * 0b000011..XB_IN3 input pin
  22361. * 0b000100..XB_IN4 input pin
  22362. * 0b000101..XB_IN5 input pin
  22363. * 0b000110..XB_IN6 input pin
  22364. * 0b000111..XB_IN7 input pin
  22365. * 0b001000..XB_IN8 input pin
  22366. * 0b001001..XB_IN9 input pin
  22367. * 0b001010..XB_IN10 input pin
  22368. * 0b001011..XB_IN11 input pin
  22369. * 0b001100..CMP0 Output
  22370. * 0b001101..CMP1 Output
  22371. * 0b001110..CMP2 Output
  22372. * 0b001111..CMP3 Output
  22373. * 0b010000..FTM0 all channels match trigger ORed together
  22374. * 0b010001..FTM0 counter init trigger
  22375. * 0b010010..FTM3 all channels match trigger ORed together
  22376. * 0b010011..FTM3 counter init trigger
  22377. * 0b010100..PWMA channel 0 trigger 0
  22378. * 0b010101..PWMA channel 0 trigger 1
  22379. * 0b010110..PWMA channel 1 trigger 0
  22380. * 0b010111..PWMA channel 1 trigger 1
  22381. * 0b011000..PWMA channel 2 trigger 0
  22382. * 0b011001..PWMA channel 2 trigger 1
  22383. * 0b011010..PWMA channel 3 trigger 0
  22384. * 0b011011..PWMA channel 3 trigger 1
  22385. * 0b011100..PDB0 channel 1 output trigger
  22386. * 0b011101..PDB0 channel 0 output trigger
  22387. * 0b011110..PDB1 channel 1 output trigger
  22388. * 0b011111..PDB1 channel 0 output trigger
  22389. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22390. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22391. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22392. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22393. * 0b100100..FTM1 all channels match trigger ORed together
  22394. * 0b100101..FTM1 counter init trigger
  22395. * 0b100110..DMA channel 0 done
  22396. * 0b100111..DMA channel 1 done
  22397. * 0b101000..DMA channel 6 done
  22398. * 0b101001..DMA channel 7 done
  22399. * 0b101010..PIT trigger 0
  22400. * 0b101011..PIT trigger 1
  22401. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22402. * 0b101101..ENC compare trigger and position match
  22403. * 0b101110..AOI output 0
  22404. * 0b101111..AOI output 1
  22405. * 0b110000..AOI output 2
  22406. * 0b110001..AOI output 3
  22407. * 0b110010..PIT trigger 2
  22408. * 0b110011..PIT trigger 3
  22409. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22410. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22411. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22412. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22413. * 0b111000..FTM2 all channels match trigger ORed together
  22414. * 0b111001..FTM2 counter init trigger
  22415. */
  22416. #define XBARA_SEL1_SEL2(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL1_SEL2_SHIFT)) & XBARA_SEL1_SEL2_MASK)
  22417. #define XBARA_SEL1_SEL3_MASK (0x3F00U)
  22418. #define XBARA_SEL1_SEL3_SHIFT (8U)
  22419. /*! SEL3
  22420. * 0b000000..Logic zero
  22421. * 0b000001..Logic one
  22422. * 0b000010..XB_IN2 input pin
  22423. * 0b000011..XB_IN3 input pin
  22424. * 0b000100..XB_IN4 input pin
  22425. * 0b000101..XB_IN5 input pin
  22426. * 0b000110..XB_IN6 input pin
  22427. * 0b000111..XB_IN7 input pin
  22428. * 0b001000..XB_IN8 input pin
  22429. * 0b001001..XB_IN9 input pin
  22430. * 0b001010..XB_IN10 input pin
  22431. * 0b001011..XB_IN11 input pin
  22432. * 0b001100..CMP0 Output
  22433. * 0b001101..CMP1 Output
  22434. * 0b001110..CMP2 Output
  22435. * 0b001111..CMP3 Output
  22436. * 0b010000..FTM0 all channels match trigger ORed together
  22437. * 0b010001..FTM0 counter init trigger
  22438. * 0b010010..FTM3 all channels match trigger ORed together
  22439. * 0b010011..FTM3 counter init trigger
  22440. * 0b010100..PWMA channel 0 trigger 0
  22441. * 0b010101..PWMA channel 0 trigger 1
  22442. * 0b010110..PWMA channel 1 trigger 0
  22443. * 0b010111..PWMA channel 1 trigger 1
  22444. * 0b011000..PWMA channel 2 trigger 0
  22445. * 0b011001..PWMA channel 2 trigger 1
  22446. * 0b011010..PWMA channel 3 trigger 0
  22447. * 0b011011..PWMA channel 3 trigger 1
  22448. * 0b011100..PDB0 channel 1 output trigger
  22449. * 0b011101..PDB0 channel 0 output trigger
  22450. * 0b011110..PDB1 channel 1 output trigger
  22451. * 0b011111..PDB1 channel 0 output trigger
  22452. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22453. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22454. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22455. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22456. * 0b100100..FTM1 all channels match trigger ORed together
  22457. * 0b100101..FTM1 counter init trigger
  22458. * 0b100110..DMA channel 0 done
  22459. * 0b100111..DMA channel 1 done
  22460. * 0b101000..DMA channel 6 done
  22461. * 0b101001..DMA channel 7 done
  22462. * 0b101010..PIT trigger 0
  22463. * 0b101011..PIT trigger 1
  22464. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22465. * 0b101101..ENC compare trigger and position match
  22466. * 0b101110..AOI output 0
  22467. * 0b101111..AOI output 1
  22468. * 0b110000..AOI output 2
  22469. * 0b110001..AOI output 3
  22470. * 0b110010..PIT trigger 2
  22471. * 0b110011..PIT trigger 3
  22472. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22473. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22474. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22475. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22476. * 0b111000..FTM2 all channels match trigger ORed together
  22477. * 0b111001..FTM2 counter init trigger
  22478. */
  22479. #define XBARA_SEL1_SEL3(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL1_SEL3_SHIFT)) & XBARA_SEL1_SEL3_MASK)
  22480. /*! @} */
  22481. /*! @name SEL2 - Crossbar A Select Register 2 */
  22482. /*! @{ */
  22483. #define XBARA_SEL2_SEL4_MASK (0x3FU)
  22484. #define XBARA_SEL2_SEL4_SHIFT (0U)
  22485. /*! SEL4
  22486. * 0b000000..Logic zero
  22487. * 0b000001..Logic one
  22488. * 0b000010..XB_IN2 input pin
  22489. * 0b000011..XB_IN3 input pin
  22490. * 0b000100..XB_IN4 input pin
  22491. * 0b000101..XB_IN5 input pin
  22492. * 0b000110..XB_IN6 input pin
  22493. * 0b000111..XB_IN7 input pin
  22494. * 0b001000..XB_IN8 input pin
  22495. * 0b001001..XB_IN9 input pin
  22496. * 0b001010..XB_IN10 input pin
  22497. * 0b001011..XB_IN11 input pin
  22498. * 0b001100..CMP0 Output
  22499. * 0b001101..CMP1 Output
  22500. * 0b001110..CMP2 Output
  22501. * 0b001111..CMP3 Output
  22502. * 0b010000..FTM0 all channels match trigger ORed together
  22503. * 0b010001..FTM0 counter init trigger
  22504. * 0b010010..FTM3 all channels match trigger ORed together
  22505. * 0b010011..FTM3 counter init trigger
  22506. * 0b010100..PWMA channel 0 trigger 0
  22507. * 0b010101..PWMA channel 0 trigger 1
  22508. * 0b010110..PWMA channel 1 trigger 0
  22509. * 0b010111..PWMA channel 1 trigger 1
  22510. * 0b011000..PWMA channel 2 trigger 0
  22511. * 0b011001..PWMA channel 2 trigger 1
  22512. * 0b011010..PWMA channel 3 trigger 0
  22513. * 0b011011..PWMA channel 3 trigger 1
  22514. * 0b011100..PDB0 channel 1 output trigger
  22515. * 0b011101..PDB0 channel 0 output trigger
  22516. * 0b011110..PDB1 channel 1 output trigger
  22517. * 0b011111..PDB1 channel 0 output trigger
  22518. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22519. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22520. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22521. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22522. * 0b100100..FTM1 all channels match trigger ORed together
  22523. * 0b100101..FTM1 counter init trigger
  22524. * 0b100110..DMA channel 0 done
  22525. * 0b100111..DMA channel 1 done
  22526. * 0b101000..DMA channel 6 done
  22527. * 0b101001..DMA channel 7 done
  22528. * 0b101010..PIT trigger 0
  22529. * 0b101011..PIT trigger 1
  22530. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22531. * 0b101101..ENC compare trigger and position match
  22532. * 0b101110..AOI output 0
  22533. * 0b101111..AOI output 1
  22534. * 0b110000..AOI output 2
  22535. * 0b110001..AOI output 3
  22536. * 0b110010..PIT trigger 2
  22537. * 0b110011..PIT trigger 3
  22538. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22539. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22540. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22541. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22542. * 0b111000..FTM2 all channels match trigger ORed together
  22543. * 0b111001..FTM2 counter init trigger
  22544. */
  22545. #define XBARA_SEL2_SEL4(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL2_SEL4_SHIFT)) & XBARA_SEL2_SEL4_MASK)
  22546. #define XBARA_SEL2_SEL5_MASK (0x3F00U)
  22547. #define XBARA_SEL2_SEL5_SHIFT (8U)
  22548. /*! SEL5
  22549. * 0b000000..Logic zero
  22550. * 0b000001..Logic one
  22551. * 0b000010..XB_IN2 input pin
  22552. * 0b000011..XB_IN3 input pin
  22553. * 0b000100..XB_IN4 input pin
  22554. * 0b000101..XB_IN5 input pin
  22555. * 0b000110..XB_IN6 input pin
  22556. * 0b000111..XB_IN7 input pin
  22557. * 0b001000..XB_IN8 input pin
  22558. * 0b001001..XB_IN9 input pin
  22559. * 0b001010..XB_IN10 input pin
  22560. * 0b001011..XB_IN11 input pin
  22561. * 0b001100..CMP0 Output
  22562. * 0b001101..CMP1 Output
  22563. * 0b001110..CMP2 Output
  22564. * 0b001111..CMP3 Output
  22565. * 0b010000..FTM0 all channels match trigger ORed together
  22566. * 0b010001..FTM0 counter init trigger
  22567. * 0b010010..FTM3 all channels match trigger ORed together
  22568. * 0b010011..FTM3 counter init trigger
  22569. * 0b010100..PWMA channel 0 trigger 0
  22570. * 0b010101..PWMA channel 0 trigger 1
  22571. * 0b010110..PWMA channel 1 trigger 0
  22572. * 0b010111..PWMA channel 1 trigger 1
  22573. * 0b011000..PWMA channel 2 trigger 0
  22574. * 0b011001..PWMA channel 2 trigger 1
  22575. * 0b011010..PWMA channel 3 trigger 0
  22576. * 0b011011..PWMA channel 3 trigger 1
  22577. * 0b011100..PDB0 channel 1 output trigger
  22578. * 0b011101..PDB0 channel 0 output trigger
  22579. * 0b011110..PDB1 channel 1 output trigger
  22580. * 0b011111..PDB1 channel 0 output trigger
  22581. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22582. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22583. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22584. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22585. * 0b100100..FTM1 all channels match trigger ORed together
  22586. * 0b100101..FTM1 counter init trigger
  22587. * 0b100110..DMA channel 0 done
  22588. * 0b100111..DMA channel 1 done
  22589. * 0b101000..DMA channel 6 done
  22590. * 0b101001..DMA channel 7 done
  22591. * 0b101010..PIT trigger 0
  22592. * 0b101011..PIT trigger 1
  22593. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22594. * 0b101101..ENC compare trigger and position match
  22595. * 0b101110..AOI output 0
  22596. * 0b101111..AOI output 1
  22597. * 0b110000..AOI output 2
  22598. * 0b110001..AOI output 3
  22599. * 0b110010..PIT trigger 2
  22600. * 0b110011..PIT trigger 3
  22601. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22602. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22603. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22604. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22605. * 0b111000..FTM2 all channels match trigger ORed together
  22606. * 0b111001..FTM2 counter init trigger
  22607. */
  22608. #define XBARA_SEL2_SEL5(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL2_SEL5_SHIFT)) & XBARA_SEL2_SEL5_MASK)
  22609. /*! @} */
  22610. /*! @name SEL3 - Crossbar A Select Register 3 */
  22611. /*! @{ */
  22612. #define XBARA_SEL3_SEL6_MASK (0x3FU)
  22613. #define XBARA_SEL3_SEL6_SHIFT (0U)
  22614. /*! SEL6
  22615. * 0b000000..Logic zero
  22616. * 0b000001..Logic one
  22617. * 0b000010..XB_IN2 input pin
  22618. * 0b000011..XB_IN3 input pin
  22619. * 0b000100..XB_IN4 input pin
  22620. * 0b000101..XB_IN5 input pin
  22621. * 0b000110..XB_IN6 input pin
  22622. * 0b000111..XB_IN7 input pin
  22623. * 0b001000..XB_IN8 input pin
  22624. * 0b001001..XB_IN9 input pin
  22625. * 0b001010..XB_IN10 input pin
  22626. * 0b001011..XB_IN11 input pin
  22627. * 0b001100..CMP0 Output
  22628. * 0b001101..CMP1 Output
  22629. * 0b001110..CMP2 Output
  22630. * 0b001111..CMP3 Output
  22631. * 0b010000..FTM0 all channels match trigger ORed together
  22632. * 0b010001..FTM0 counter init trigger
  22633. * 0b010010..FTM3 all channels match trigger ORed together
  22634. * 0b010011..FTM3 counter init trigger
  22635. * 0b010100..PWMA channel 0 trigger 0
  22636. * 0b010101..PWMA channel 0 trigger 1
  22637. * 0b010110..PWMA channel 1 trigger 0
  22638. * 0b010111..PWMA channel 1 trigger 1
  22639. * 0b011000..PWMA channel 2 trigger 0
  22640. * 0b011001..PWMA channel 2 trigger 1
  22641. * 0b011010..PWMA channel 3 trigger 0
  22642. * 0b011011..PWMA channel 3 trigger 1
  22643. * 0b011100..PDB0 channel 1 output trigger
  22644. * 0b011101..PDB0 channel 0 output trigger
  22645. * 0b011110..PDB1 channel 1 output trigger
  22646. * 0b011111..PDB1 channel 0 output trigger
  22647. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22648. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22649. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22650. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22651. * 0b100100..FTM1 all channels match trigger ORed together
  22652. * 0b100101..FTM1 counter init trigger
  22653. * 0b100110..DMA channel 0 done
  22654. * 0b100111..DMA channel 1 done
  22655. * 0b101000..DMA channel 6 done
  22656. * 0b101001..DMA channel 7 done
  22657. * 0b101010..PIT trigger 0
  22658. * 0b101011..PIT trigger 1
  22659. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22660. * 0b101101..ENC compare trigger and position match
  22661. * 0b101110..AOI output 0
  22662. * 0b101111..AOI output 1
  22663. * 0b110000..AOI output 2
  22664. * 0b110001..AOI output 3
  22665. * 0b110010..PIT trigger 2
  22666. * 0b110011..PIT trigger 3
  22667. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22668. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22669. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22670. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22671. * 0b111000..FTM2 all channels match trigger ORed together
  22672. * 0b111001..FTM2 counter init trigger
  22673. */
  22674. #define XBARA_SEL3_SEL6(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL3_SEL6_SHIFT)) & XBARA_SEL3_SEL6_MASK)
  22675. #define XBARA_SEL3_SEL7_MASK (0x3F00U)
  22676. #define XBARA_SEL3_SEL7_SHIFT (8U)
  22677. /*! SEL7
  22678. * 0b000000..Logic zero
  22679. * 0b000001..Logic one
  22680. * 0b000010..XB_IN2 input pin
  22681. * 0b000011..XB_IN3 input pin
  22682. * 0b000100..XB_IN4 input pin
  22683. * 0b000101..XB_IN5 input pin
  22684. * 0b000110..XB_IN6 input pin
  22685. * 0b000111..XB_IN7 input pin
  22686. * 0b001000..XB_IN8 input pin
  22687. * 0b001001..XB_IN9 input pin
  22688. * 0b001010..XB_IN10 input pin
  22689. * 0b001011..XB_IN11 input pin
  22690. * 0b001100..CMP0 Output
  22691. * 0b001101..CMP1 Output
  22692. * 0b001110..CMP2 Output
  22693. * 0b001111..CMP3 Output
  22694. * 0b010000..FTM0 all channels match trigger ORed together
  22695. * 0b010001..FTM0 counter init trigger
  22696. * 0b010010..FTM3 all channels match trigger ORed together
  22697. * 0b010011..FTM3 counter init trigger
  22698. * 0b010100..PWMA channel 0 trigger 0
  22699. * 0b010101..PWMA channel 0 trigger 1
  22700. * 0b010110..PWMA channel 1 trigger 0
  22701. * 0b010111..PWMA channel 1 trigger 1
  22702. * 0b011000..PWMA channel 2 trigger 0
  22703. * 0b011001..PWMA channel 2 trigger 1
  22704. * 0b011010..PWMA channel 3 trigger 0
  22705. * 0b011011..PWMA channel 3 trigger 1
  22706. * 0b011100..PDB0 channel 1 output trigger
  22707. * 0b011101..PDB0 channel 0 output trigger
  22708. * 0b011110..PDB1 channel 1 output trigger
  22709. * 0b011111..PDB1 channel 0 output trigger
  22710. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22711. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22712. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22713. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22714. * 0b100100..FTM1 all channels match trigger ORed together
  22715. * 0b100101..FTM1 counter init trigger
  22716. * 0b100110..DMA channel 0 done
  22717. * 0b100111..DMA channel 1 done
  22718. * 0b101000..DMA channel 6 done
  22719. * 0b101001..DMA channel 7 done
  22720. * 0b101010..PIT trigger 0
  22721. * 0b101011..PIT trigger 1
  22722. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22723. * 0b101101..ENC compare trigger and position match
  22724. * 0b101110..AOI output 0
  22725. * 0b101111..AOI output 1
  22726. * 0b110000..AOI output 2
  22727. * 0b110001..AOI output 3
  22728. * 0b110010..PIT trigger 2
  22729. * 0b110011..PIT trigger 3
  22730. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22731. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22732. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22733. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22734. * 0b111000..FTM2 all channels match trigger ORed together
  22735. * 0b111001..FTM2 counter init trigger
  22736. */
  22737. #define XBARA_SEL3_SEL7(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL3_SEL7_SHIFT)) & XBARA_SEL3_SEL7_MASK)
  22738. /*! @} */
  22739. /*! @name SEL4 - Crossbar A Select Register 4 */
  22740. /*! @{ */
  22741. #define XBARA_SEL4_SEL8_MASK (0x3FU)
  22742. #define XBARA_SEL4_SEL8_SHIFT (0U)
  22743. /*! SEL8
  22744. * 0b000000..Logic zero
  22745. * 0b000001..Logic one
  22746. * 0b000010..XB_IN2 input pin
  22747. * 0b000011..XB_IN3 input pin
  22748. * 0b000100..XB_IN4 input pin
  22749. * 0b000101..XB_IN5 input pin
  22750. * 0b000110..XB_IN6 input pin
  22751. * 0b000111..XB_IN7 input pin
  22752. * 0b001000..XB_IN8 input pin
  22753. * 0b001001..XB_IN9 input pin
  22754. * 0b001010..XB_IN10 input pin
  22755. * 0b001011..XB_IN11 input pin
  22756. * 0b001100..CMP0 Output
  22757. * 0b001101..CMP1 Output
  22758. * 0b001110..CMP2 Output
  22759. * 0b001111..CMP3 Output
  22760. * 0b010000..FTM0 all channels match trigger ORed together
  22761. * 0b010001..FTM0 counter init trigger
  22762. * 0b010010..FTM3 all channels match trigger ORed together
  22763. * 0b010011..FTM3 counter init trigger
  22764. * 0b010100..PWMA channel 0 trigger 0
  22765. * 0b010101..PWMA channel 0 trigger 1
  22766. * 0b010110..PWMA channel 1 trigger 0
  22767. * 0b010111..PWMA channel 1 trigger 1
  22768. * 0b011000..PWMA channel 2 trigger 0
  22769. * 0b011001..PWMA channel 2 trigger 1
  22770. * 0b011010..PWMA channel 3 trigger 0
  22771. * 0b011011..PWMA channel 3 trigger 1
  22772. * 0b011100..PDB0 channel 1 output trigger
  22773. * 0b011101..PDB0 channel 0 output trigger
  22774. * 0b011110..PDB1 channel 1 output trigger
  22775. * 0b011111..PDB1 channel 0 output trigger
  22776. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22777. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22778. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22779. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22780. * 0b100100..FTM1 all channels match trigger ORed together
  22781. * 0b100101..FTM1 counter init trigger
  22782. * 0b100110..DMA channel 0 done
  22783. * 0b100111..DMA channel 1 done
  22784. * 0b101000..DMA channel 6 done
  22785. * 0b101001..DMA channel 7 done
  22786. * 0b101010..PIT trigger 0
  22787. * 0b101011..PIT trigger 1
  22788. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22789. * 0b101101..ENC compare trigger and position match
  22790. * 0b101110..AOI output 0
  22791. * 0b101111..AOI output 1
  22792. * 0b110000..AOI output 2
  22793. * 0b110001..AOI output 3
  22794. * 0b110010..PIT trigger 2
  22795. * 0b110011..PIT trigger 3
  22796. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22797. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22798. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22799. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22800. * 0b111000..FTM2 all channels match trigger ORed together
  22801. * 0b111001..FTM2 counter init trigger
  22802. */
  22803. #define XBARA_SEL4_SEL8(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL4_SEL8_SHIFT)) & XBARA_SEL4_SEL8_MASK)
  22804. #define XBARA_SEL4_SEL9_MASK (0x3F00U)
  22805. #define XBARA_SEL4_SEL9_SHIFT (8U)
  22806. /*! SEL9
  22807. * 0b000000..Logic zero
  22808. * 0b000001..Logic one
  22809. * 0b000010..XB_IN2 input pin
  22810. * 0b000011..XB_IN3 input pin
  22811. * 0b000100..XB_IN4 input pin
  22812. * 0b000101..XB_IN5 input pin
  22813. * 0b000110..XB_IN6 input pin
  22814. * 0b000111..XB_IN7 input pin
  22815. * 0b001000..XB_IN8 input pin
  22816. * 0b001001..XB_IN9 input pin
  22817. * 0b001010..XB_IN10 input pin
  22818. * 0b001011..XB_IN11 input pin
  22819. * 0b001100..CMP0 Output
  22820. * 0b001101..CMP1 Output
  22821. * 0b001110..CMP2 Output
  22822. * 0b001111..CMP3 Output
  22823. * 0b010000..FTM0 all channels match trigger ORed together
  22824. * 0b010001..FTM0 counter init trigger
  22825. * 0b010010..FTM3 all channels match trigger ORed together
  22826. * 0b010011..FTM3 counter init trigger
  22827. * 0b010100..PWMA channel 0 trigger 0
  22828. * 0b010101..PWMA channel 0 trigger 1
  22829. * 0b010110..PWMA channel 1 trigger 0
  22830. * 0b010111..PWMA channel 1 trigger 1
  22831. * 0b011000..PWMA channel 2 trigger 0
  22832. * 0b011001..PWMA channel 2 trigger 1
  22833. * 0b011010..PWMA channel 3 trigger 0
  22834. * 0b011011..PWMA channel 3 trigger 1
  22835. * 0b011100..PDB0 channel 1 output trigger
  22836. * 0b011101..PDB0 channel 0 output trigger
  22837. * 0b011110..PDB1 channel 1 output trigger
  22838. * 0b011111..PDB1 channel 0 output trigger
  22839. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22840. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22841. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22842. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22843. * 0b100100..FTM1 all channels match trigger ORed together
  22844. * 0b100101..FTM1 counter init trigger
  22845. * 0b100110..DMA channel 0 done
  22846. * 0b100111..DMA channel 1 done
  22847. * 0b101000..DMA channel 6 done
  22848. * 0b101001..DMA channel 7 done
  22849. * 0b101010..PIT trigger 0
  22850. * 0b101011..PIT trigger 1
  22851. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22852. * 0b101101..ENC compare trigger and position match
  22853. * 0b101110..AOI output 0
  22854. * 0b101111..AOI output 1
  22855. * 0b110000..AOI output 2
  22856. * 0b110001..AOI output 3
  22857. * 0b110010..PIT trigger 2
  22858. * 0b110011..PIT trigger 3
  22859. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22860. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22861. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22862. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22863. * 0b111000..FTM2 all channels match trigger ORed together
  22864. * 0b111001..FTM2 counter init trigger
  22865. */
  22866. #define XBARA_SEL4_SEL9(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL4_SEL9_SHIFT)) & XBARA_SEL4_SEL9_MASK)
  22867. /*! @} */
  22868. /*! @name SEL5 - Crossbar A Select Register 5 */
  22869. /*! @{ */
  22870. #define XBARA_SEL5_SEL10_MASK (0x3FU)
  22871. #define XBARA_SEL5_SEL10_SHIFT (0U)
  22872. /*! SEL10
  22873. * 0b000000..Logic zero
  22874. * 0b000001..Logic one
  22875. * 0b000010..XB_IN2 input pin
  22876. * 0b000011..XB_IN3 input pin
  22877. * 0b000100..XB_IN4 input pin
  22878. * 0b000101..XB_IN5 input pin
  22879. * 0b000110..XB_IN6 input pin
  22880. * 0b000111..XB_IN7 input pin
  22881. * 0b001000..XB_IN8 input pin
  22882. * 0b001001..XB_IN9 input pin
  22883. * 0b001010..XB_IN10 input pin
  22884. * 0b001011..XB_IN11 input pin
  22885. * 0b001100..CMP0 Output
  22886. * 0b001101..CMP1 Output
  22887. * 0b001110..CMP2 Output
  22888. * 0b001111..CMP3 Output
  22889. * 0b010000..FTM0 all channels match trigger ORed together
  22890. * 0b010001..FTM0 counter init trigger
  22891. * 0b010010..FTM3 all channels match trigger ORed together
  22892. * 0b010011..FTM3 counter init trigger
  22893. * 0b010100..PWMA channel 0 trigger 0
  22894. * 0b010101..PWMA channel 0 trigger 1
  22895. * 0b010110..PWMA channel 1 trigger 0
  22896. * 0b010111..PWMA channel 1 trigger 1
  22897. * 0b011000..PWMA channel 2 trigger 0
  22898. * 0b011001..PWMA channel 2 trigger 1
  22899. * 0b011010..PWMA channel 3 trigger 0
  22900. * 0b011011..PWMA channel 3 trigger 1
  22901. * 0b011100..PDB0 channel 1 output trigger
  22902. * 0b011101..PDB0 channel 0 output trigger
  22903. * 0b011110..PDB1 channel 1 output trigger
  22904. * 0b011111..PDB1 channel 0 output trigger
  22905. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22906. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22907. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22908. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22909. * 0b100100..FTM1 all channels match trigger ORed together
  22910. * 0b100101..FTM1 counter init trigger
  22911. * 0b100110..DMA channel 0 done
  22912. * 0b100111..DMA channel 1 done
  22913. * 0b101000..DMA channel 6 done
  22914. * 0b101001..DMA channel 7 done
  22915. * 0b101010..PIT trigger 0
  22916. * 0b101011..PIT trigger 1
  22917. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22918. * 0b101101..ENC compare trigger and position match
  22919. * 0b101110..AOI output 0
  22920. * 0b101111..AOI output 1
  22921. * 0b110000..AOI output 2
  22922. * 0b110001..AOI output 3
  22923. * 0b110010..PIT trigger 2
  22924. * 0b110011..PIT trigger 3
  22925. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22926. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22927. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22928. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22929. * 0b111000..FTM2 all channels match trigger ORed together
  22930. * 0b111001..FTM2 counter init trigger
  22931. */
  22932. #define XBARA_SEL5_SEL10(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL5_SEL10_SHIFT)) & XBARA_SEL5_SEL10_MASK)
  22933. #define XBARA_SEL5_SEL11_MASK (0x3F00U)
  22934. #define XBARA_SEL5_SEL11_SHIFT (8U)
  22935. /*! SEL11
  22936. * 0b000000..Logic zero
  22937. * 0b000001..Logic one
  22938. * 0b000010..XB_IN2 input pin
  22939. * 0b000011..XB_IN3 input pin
  22940. * 0b000100..XB_IN4 input pin
  22941. * 0b000101..XB_IN5 input pin
  22942. * 0b000110..XB_IN6 input pin
  22943. * 0b000111..XB_IN7 input pin
  22944. * 0b001000..XB_IN8 input pin
  22945. * 0b001001..XB_IN9 input pin
  22946. * 0b001010..XB_IN10 input pin
  22947. * 0b001011..XB_IN11 input pin
  22948. * 0b001100..CMP0 Output
  22949. * 0b001101..CMP1 Output
  22950. * 0b001110..CMP2 Output
  22951. * 0b001111..CMP3 Output
  22952. * 0b010000..FTM0 all channels match trigger ORed together
  22953. * 0b010001..FTM0 counter init trigger
  22954. * 0b010010..FTM3 all channels match trigger ORed together
  22955. * 0b010011..FTM3 counter init trigger
  22956. * 0b010100..PWMA channel 0 trigger 0
  22957. * 0b010101..PWMA channel 0 trigger 1
  22958. * 0b010110..PWMA channel 1 trigger 0
  22959. * 0b010111..PWMA channel 1 trigger 1
  22960. * 0b011000..PWMA channel 2 trigger 0
  22961. * 0b011001..PWMA channel 2 trigger 1
  22962. * 0b011010..PWMA channel 3 trigger 0
  22963. * 0b011011..PWMA channel 3 trigger 1
  22964. * 0b011100..PDB0 channel 1 output trigger
  22965. * 0b011101..PDB0 channel 0 output trigger
  22966. * 0b011110..PDB1 channel 1 output trigger
  22967. * 0b011111..PDB1 channel 0 output trigger
  22968. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  22969. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  22970. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  22971. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  22972. * 0b100100..FTM1 all channels match trigger ORed together
  22973. * 0b100101..FTM1 counter init trigger
  22974. * 0b100110..DMA channel 0 done
  22975. * 0b100111..DMA channel 1 done
  22976. * 0b101000..DMA channel 6 done
  22977. * 0b101001..DMA channel 7 done
  22978. * 0b101010..PIT trigger 0
  22979. * 0b101011..PIT trigger 1
  22980. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  22981. * 0b101101..ENC compare trigger and position match
  22982. * 0b101110..AOI output 0
  22983. * 0b101111..AOI output 1
  22984. * 0b110000..AOI output 2
  22985. * 0b110001..AOI output 3
  22986. * 0b110010..PIT trigger 2
  22987. * 0b110011..PIT trigger 3
  22988. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  22989. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  22990. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  22991. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  22992. * 0b111000..FTM2 all channels match trigger ORed together
  22993. * 0b111001..FTM2 counter init trigger
  22994. */
  22995. #define XBARA_SEL5_SEL11(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL5_SEL11_SHIFT)) & XBARA_SEL5_SEL11_MASK)
  22996. /*! @} */
  22997. /*! @name SEL6 - Crossbar A Select Register 6 */
  22998. /*! @{ */
  22999. #define XBARA_SEL6_SEL12_MASK (0x3FU)
  23000. #define XBARA_SEL6_SEL12_SHIFT (0U)
  23001. /*! SEL12
  23002. * 0b000000..Logic zero
  23003. * 0b000001..Logic one
  23004. * 0b000010..XB_IN2 input pin
  23005. * 0b000011..XB_IN3 input pin
  23006. * 0b000100..XB_IN4 input pin
  23007. * 0b000101..XB_IN5 input pin
  23008. * 0b000110..XB_IN6 input pin
  23009. * 0b000111..XB_IN7 input pin
  23010. * 0b001000..XB_IN8 input pin
  23011. * 0b001001..XB_IN9 input pin
  23012. * 0b001010..XB_IN10 input pin
  23013. * 0b001011..XB_IN11 input pin
  23014. * 0b001100..CMP0 Output
  23015. * 0b001101..CMP1 Output
  23016. * 0b001110..CMP2 Output
  23017. * 0b001111..CMP3 Output
  23018. * 0b010000..FTM0 all channels match trigger ORed together
  23019. * 0b010001..FTM0 counter init trigger
  23020. * 0b010010..FTM3 all channels match trigger ORed together
  23021. * 0b010011..FTM3 counter init trigger
  23022. * 0b010100..PWMA channel 0 trigger 0
  23023. * 0b010101..PWMA channel 0 trigger 1
  23024. * 0b010110..PWMA channel 1 trigger 0
  23025. * 0b010111..PWMA channel 1 trigger 1
  23026. * 0b011000..PWMA channel 2 trigger 0
  23027. * 0b011001..PWMA channel 2 trigger 1
  23028. * 0b011010..PWMA channel 3 trigger 0
  23029. * 0b011011..PWMA channel 3 trigger 1
  23030. * 0b011100..PDB0 channel 1 output trigger
  23031. * 0b011101..PDB0 channel 0 output trigger
  23032. * 0b011110..PDB1 channel 1 output trigger
  23033. * 0b011111..PDB1 channel 0 output trigger
  23034. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23035. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23036. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23037. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23038. * 0b100100..FTM1 all channels match trigger ORed together
  23039. * 0b100101..FTM1 counter init trigger
  23040. * 0b100110..DMA channel 0 done
  23041. * 0b100111..DMA channel 1 done
  23042. * 0b101000..DMA channel 6 done
  23043. * 0b101001..DMA channel 7 done
  23044. * 0b101010..PIT trigger 0
  23045. * 0b101011..PIT trigger 1
  23046. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23047. * 0b101101..ENC compare trigger and position match
  23048. * 0b101110..AOI output 0
  23049. * 0b101111..AOI output 1
  23050. * 0b110000..AOI output 2
  23051. * 0b110001..AOI output 3
  23052. * 0b110010..PIT trigger 2
  23053. * 0b110011..PIT trigger 3
  23054. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23055. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23056. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23057. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23058. * 0b111000..FTM2 all channels match trigger ORed together
  23059. * 0b111001..FTM2 counter init trigger
  23060. */
  23061. #define XBARA_SEL6_SEL12(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL6_SEL12_SHIFT)) & XBARA_SEL6_SEL12_MASK)
  23062. #define XBARA_SEL6_SEL13_MASK (0x3F00U)
  23063. #define XBARA_SEL6_SEL13_SHIFT (8U)
  23064. /*! SEL13
  23065. * 0b000000..Logic zero
  23066. * 0b000001..Logic one
  23067. * 0b000010..XB_IN2 input pin
  23068. * 0b000011..XB_IN3 input pin
  23069. * 0b000100..XB_IN4 input pin
  23070. * 0b000101..XB_IN5 input pin
  23071. * 0b000110..XB_IN6 input pin
  23072. * 0b000111..XB_IN7 input pin
  23073. * 0b001000..XB_IN8 input pin
  23074. * 0b001001..XB_IN9 input pin
  23075. * 0b001010..XB_IN10 input pin
  23076. * 0b001011..XB_IN11 input pin
  23077. * 0b001100..CMP0 Output
  23078. * 0b001101..CMP1 Output
  23079. * 0b001110..CMP2 Output
  23080. * 0b001111..CMP3 Output
  23081. * 0b010000..FTM0 all channels match trigger ORed together
  23082. * 0b010001..FTM0 counter init trigger
  23083. * 0b010010..FTM3 all channels match trigger ORed together
  23084. * 0b010011..FTM3 counter init trigger
  23085. * 0b010100..PWMA channel 0 trigger 0
  23086. * 0b010101..PWMA channel 0 trigger 1
  23087. * 0b010110..PWMA channel 1 trigger 0
  23088. * 0b010111..PWMA channel 1 trigger 1
  23089. * 0b011000..PWMA channel 2 trigger 0
  23090. * 0b011001..PWMA channel 2 trigger 1
  23091. * 0b011010..PWMA channel 3 trigger 0
  23092. * 0b011011..PWMA channel 3 trigger 1
  23093. * 0b011100..PDB0 channel 1 output trigger
  23094. * 0b011101..PDB0 channel 0 output trigger
  23095. * 0b011110..PDB1 channel 1 output trigger
  23096. * 0b011111..PDB1 channel 0 output trigger
  23097. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23098. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23099. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23100. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23101. * 0b100100..FTM1 all channels match trigger ORed together
  23102. * 0b100101..FTM1 counter init trigger
  23103. * 0b100110..DMA channel 0 done
  23104. * 0b100111..DMA channel 1 done
  23105. * 0b101000..DMA channel 6 done
  23106. * 0b101001..DMA channel 7 done
  23107. * 0b101010..PIT trigger 0
  23108. * 0b101011..PIT trigger 1
  23109. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23110. * 0b101101..ENC compare trigger and position match
  23111. * 0b101110..AOI output 0
  23112. * 0b101111..AOI output 1
  23113. * 0b110000..AOI output 2
  23114. * 0b110001..AOI output 3
  23115. * 0b110010..PIT trigger 2
  23116. * 0b110011..PIT trigger 3
  23117. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23118. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23119. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23120. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23121. * 0b111000..FTM2 all channels match trigger ORed together
  23122. * 0b111001..FTM2 counter init trigger
  23123. */
  23124. #define XBARA_SEL6_SEL13(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL6_SEL13_SHIFT)) & XBARA_SEL6_SEL13_MASK)
  23125. /*! @} */
  23126. /*! @name SEL7 - Crossbar A Select Register 7 */
  23127. /*! @{ */
  23128. #define XBARA_SEL7_SEL14_MASK (0x3FU)
  23129. #define XBARA_SEL7_SEL14_SHIFT (0U)
  23130. #define XBARA_SEL7_SEL14(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL7_SEL14_SHIFT)) & XBARA_SEL7_SEL14_MASK)
  23131. #define XBARA_SEL7_SEL15_MASK (0x3F00U)
  23132. #define XBARA_SEL7_SEL15_SHIFT (8U)
  23133. /*! SEL15
  23134. * 0b000000..Logic zero
  23135. * 0b000001..Logic one
  23136. * 0b000010..XB_IN2 input pin
  23137. * 0b000011..XB_IN3 input pin
  23138. * 0b000100..XB_IN4 input pin
  23139. * 0b000101..XB_IN5 input pin
  23140. * 0b000110..XB_IN6 input pin
  23141. * 0b000111..XB_IN7 input pin
  23142. * 0b001000..XB_IN8 input pin
  23143. * 0b001001..XB_IN9 input pin
  23144. * 0b001010..XB_IN10 input pin
  23145. * 0b001011..XB_IN11 input pin
  23146. * 0b001100..CMP0 Output
  23147. * 0b001101..CMP1 Output
  23148. * 0b001110..CMP2 Output
  23149. * 0b001111..CMP3 Output
  23150. * 0b010000..FTM0 all channels match trigger ORed together
  23151. * 0b010001..FTM0 counter init trigger
  23152. * 0b010010..FTM3 all channels match trigger ORed together
  23153. * 0b010011..FTM3 counter init trigger
  23154. * 0b010100..PWMA channel 0 trigger 0
  23155. * 0b010101..PWMA channel 0 trigger 1
  23156. * 0b010110..PWMA channel 1 trigger 0
  23157. * 0b010111..PWMA channel 1 trigger 1
  23158. * 0b011000..PWMA channel 2 trigger 0
  23159. * 0b011001..PWMA channel 2 trigger 1
  23160. * 0b011010..PWMA channel 3 trigger 0
  23161. * 0b011011..PWMA channel 3 trigger 1
  23162. * 0b011100..PDB0 channel 1 output trigger
  23163. * 0b011101..PDB0 channel 0 output trigger
  23164. * 0b011110..PDB1 channel 1 output trigger
  23165. * 0b011111..PDB1 channel 0 output trigger
  23166. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23167. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23168. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23169. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23170. * 0b100100..FTM1 all channels match trigger ORed together
  23171. * 0b100101..FTM1 counter init trigger
  23172. * 0b100110..DMA channel 0 done
  23173. * 0b100111..DMA channel 1 done
  23174. * 0b101000..DMA channel 6 done
  23175. * 0b101001..DMA channel 7 done
  23176. * 0b101010..PIT trigger 0
  23177. * 0b101011..PIT trigger 1
  23178. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23179. * 0b101101..ENC compare trigger and position match
  23180. * 0b101110..AOI output 0
  23181. * 0b101111..AOI output 1
  23182. * 0b110000..AOI output 2
  23183. * 0b110001..AOI output 3
  23184. * 0b110010..PIT trigger 2
  23185. * 0b110011..PIT trigger 3
  23186. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23187. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23188. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23189. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23190. * 0b111000..FTM2 all channels match trigger ORed together
  23191. * 0b111001..FTM2 counter init trigger
  23192. */
  23193. #define XBARA_SEL7_SEL15(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL7_SEL15_SHIFT)) & XBARA_SEL7_SEL15_MASK)
  23194. /*! @} */
  23195. /*! @name SEL8 - Crossbar A Select Register 8 */
  23196. /*! @{ */
  23197. #define XBARA_SEL8_SEL16_MASK (0x3FU)
  23198. #define XBARA_SEL8_SEL16_SHIFT (0U)
  23199. /*! SEL16
  23200. * 0b000000..Logic zero
  23201. * 0b000001..Logic one
  23202. * 0b000010..XB_IN2 input pin
  23203. * 0b000011..XB_IN3 input pin
  23204. * 0b000100..XB_IN4 input pin
  23205. * 0b000101..XB_IN5 input pin
  23206. * 0b000110..XB_IN6 input pin
  23207. * 0b000111..XB_IN7 input pin
  23208. * 0b001000..XB_IN8 input pin
  23209. * 0b001001..XB_IN9 input pin
  23210. * 0b001010..XB_IN10 input pin
  23211. * 0b001011..XB_IN11 input pin
  23212. * 0b001100..CMP0 Output
  23213. * 0b001101..CMP1 Output
  23214. * 0b001110..CMP2 Output
  23215. * 0b001111..CMP3 Output
  23216. * 0b010000..FTM0 all channels match trigger ORed together
  23217. * 0b010001..FTM0 counter init trigger
  23218. * 0b010010..FTM3 all channels match trigger ORed together
  23219. * 0b010011..FTM3 counter init trigger
  23220. * 0b010100..PWMA channel 0 trigger 0
  23221. * 0b010101..PWMA channel 0 trigger 1
  23222. * 0b010110..PWMA channel 1 trigger 0
  23223. * 0b010111..PWMA channel 1 trigger 1
  23224. * 0b011000..PWMA channel 2 trigger 0
  23225. * 0b011001..PWMA channel 2 trigger 1
  23226. * 0b011010..PWMA channel 3 trigger 0
  23227. * 0b011011..PWMA channel 3 trigger 1
  23228. * 0b011100..PDB0 channel 1 output trigger
  23229. * 0b011101..PDB0 channel 0 output trigger
  23230. * 0b011110..PDB1 channel 1 output trigger
  23231. * 0b011111..PDB1 channel 0 output trigger
  23232. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23233. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23234. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23235. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23236. * 0b100100..FTM1 all channels match trigger ORed together
  23237. * 0b100101..FTM1 counter init trigger
  23238. * 0b100110..DMA channel 0 done
  23239. * 0b100111..DMA channel 1 done
  23240. * 0b101000..DMA channel 6 done
  23241. * 0b101001..DMA channel 7 done
  23242. * 0b101010..PIT trigger 0
  23243. * 0b101011..PIT trigger 1
  23244. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23245. * 0b101101..ENC compare trigger and position match
  23246. * 0b101110..AOI output 0
  23247. * 0b101111..AOI output 1
  23248. * 0b110000..AOI output 2
  23249. * 0b110001..AOI output 3
  23250. * 0b110010..PIT trigger 2
  23251. * 0b110011..PIT trigger 3
  23252. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23253. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23254. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23255. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23256. * 0b111000..FTM2 all channels match trigger ORed together
  23257. * 0b111001..FTM2 counter init trigger
  23258. */
  23259. #define XBARA_SEL8_SEL16(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL8_SEL16_SHIFT)) & XBARA_SEL8_SEL16_MASK)
  23260. #define XBARA_SEL8_SEL17_MASK (0x3F00U)
  23261. #define XBARA_SEL8_SEL17_SHIFT (8U)
  23262. /*! SEL17
  23263. * 0b000000..Logic zero
  23264. * 0b000001..Logic one
  23265. * 0b000010..XB_IN2 input pin
  23266. * 0b000011..XB_IN3 input pin
  23267. * 0b000100..XB_IN4 input pin
  23268. * 0b000101..XB_IN5 input pin
  23269. * 0b000110..XB_IN6 input pin
  23270. * 0b000111..XB_IN7 input pin
  23271. * 0b001000..XB_IN8 input pin
  23272. * 0b001001..XB_IN9 input pin
  23273. * 0b001010..XB_IN10 input pin
  23274. * 0b001011..XB_IN11 input pin
  23275. * 0b001100..CMP0 Output
  23276. * 0b001101..CMP1 Output
  23277. * 0b001110..CMP2 Output
  23278. * 0b001111..CMP3 Output
  23279. * 0b010000..FTM0 all channels match trigger ORed together
  23280. * 0b010001..FTM0 counter init trigger
  23281. * 0b010010..FTM3 all channels match trigger ORed together
  23282. * 0b010011..FTM3 counter init trigger
  23283. * 0b010100..PWMA channel 0 trigger 0
  23284. * 0b010101..PWMA channel 0 trigger 1
  23285. * 0b010110..PWMA channel 1 trigger 0
  23286. * 0b010111..PWMA channel 1 trigger 1
  23287. * 0b011000..PWMA channel 2 trigger 0
  23288. * 0b011001..PWMA channel 2 trigger 1
  23289. * 0b011010..PWMA channel 3 trigger 0
  23290. * 0b011011..PWMA channel 3 trigger 1
  23291. * 0b011100..PDB0 channel 1 output trigger
  23292. * 0b011101..PDB0 channel 0 output trigger
  23293. * 0b011110..PDB1 channel 1 output trigger
  23294. * 0b011111..PDB1 channel 0 output trigger
  23295. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23296. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23297. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23298. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23299. * 0b100100..FTM1 all channels match trigger ORed together
  23300. * 0b100101..FTM1 counter init trigger
  23301. * 0b100110..DMA channel 0 done
  23302. * 0b100111..DMA channel 1 done
  23303. * 0b101000..DMA channel 6 done
  23304. * 0b101001..DMA channel 7 done
  23305. * 0b101010..PIT trigger 0
  23306. * 0b101011..PIT trigger 1
  23307. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23308. * 0b101101..ENC compare trigger and position match
  23309. * 0b101110..AOI output 0
  23310. * 0b101111..AOI output 1
  23311. * 0b110000..AOI output 2
  23312. * 0b110001..AOI output 3
  23313. * 0b110010..PIT trigger 2
  23314. * 0b110011..PIT trigger 3
  23315. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23316. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23317. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23318. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23319. * 0b111000..FTM2 all channels match trigger ORed together
  23320. * 0b111001..FTM2 counter init trigger
  23321. */
  23322. #define XBARA_SEL8_SEL17(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL8_SEL17_SHIFT)) & XBARA_SEL8_SEL17_MASK)
  23323. /*! @} */
  23324. /*! @name SEL9 - Crossbar A Select Register 9 */
  23325. /*! @{ */
  23326. #define XBARA_SEL9_SEL18_MASK (0x3FU)
  23327. #define XBARA_SEL9_SEL18_SHIFT (0U)
  23328. /*! SEL18
  23329. * 0b000000..Logic zero
  23330. * 0b000001..Logic one
  23331. * 0b000010..XB_IN2 input pin
  23332. * 0b000011..XB_IN3 input pin
  23333. * 0b000100..XB_IN4 input pin
  23334. * 0b000101..XB_IN5 input pin
  23335. * 0b000110..XB_IN6 input pin
  23336. * 0b000111..XB_IN7 input pin
  23337. * 0b001000..XB_IN8 input pin
  23338. * 0b001001..XB_IN9 input pin
  23339. * 0b001010..XB_IN10 input pin
  23340. * 0b001011..XB_IN11 input pin
  23341. * 0b001100..CMP0 Output
  23342. * 0b001101..CMP1 Output
  23343. * 0b001110..CMP2 Output
  23344. * 0b001111..CMP3 Output
  23345. * 0b010000..FTM0 all channels match trigger ORed together
  23346. * 0b010001..FTM0 counter init trigger
  23347. * 0b010010..FTM3 all channels match trigger ORed together
  23348. * 0b010011..FTM3 counter init trigger
  23349. * 0b010100..PWMA channel 0 trigger 0
  23350. * 0b010101..PWMA channel 0 trigger 1
  23351. * 0b010110..PWMA channel 1 trigger 0
  23352. * 0b010111..PWMA channel 1 trigger 1
  23353. * 0b011000..PWMA channel 2 trigger 0
  23354. * 0b011001..PWMA channel 2 trigger 1
  23355. * 0b011010..PWMA channel 3 trigger 0
  23356. * 0b011011..PWMA channel 3 trigger 1
  23357. * 0b011100..PDB0 channel 1 output trigger
  23358. * 0b011101..PDB0 channel 0 output trigger
  23359. * 0b011110..PDB1 channel 1 output trigger
  23360. * 0b011111..PDB1 channel 0 output trigger
  23361. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23362. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23363. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23364. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23365. * 0b100100..FTM1 all channels match trigger ORed together
  23366. * 0b100101..FTM1 counter init trigger
  23367. * 0b100110..DMA channel 0 done
  23368. * 0b100111..DMA channel 1 done
  23369. * 0b101000..DMA channel 6 done
  23370. * 0b101001..DMA channel 7 done
  23371. * 0b101010..PIT trigger 0
  23372. * 0b101011..PIT trigger 1
  23373. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23374. * 0b101101..ENC compare trigger and position match
  23375. * 0b101110..AOI output 0
  23376. * 0b101111..AOI output 1
  23377. * 0b110000..AOI output 2
  23378. * 0b110001..AOI output 3
  23379. * 0b110010..PIT trigger 2
  23380. * 0b110011..PIT trigger 3
  23381. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23382. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23383. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23384. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23385. * 0b111000..FTM2 all channels match trigger ORed together
  23386. * 0b111001..FTM2 counter init trigger
  23387. */
  23388. #define XBARA_SEL9_SEL18(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL9_SEL18_SHIFT)) & XBARA_SEL9_SEL18_MASK)
  23389. #define XBARA_SEL9_SEL19_MASK (0x3F00U)
  23390. #define XBARA_SEL9_SEL19_SHIFT (8U)
  23391. /*! SEL19
  23392. * 0b000000..Logic zero
  23393. * 0b000001..Logic one
  23394. * 0b000010..XB_IN2 input pin
  23395. * 0b000011..XB_IN3 input pin
  23396. * 0b000100..XB_IN4 input pin
  23397. * 0b000101..XB_IN5 input pin
  23398. * 0b000110..XB_IN6 input pin
  23399. * 0b000111..XB_IN7 input pin
  23400. * 0b001000..XB_IN8 input pin
  23401. * 0b001001..XB_IN9 input pin
  23402. * 0b001010..XB_IN10 input pin
  23403. * 0b001011..XB_IN11 input pin
  23404. * 0b001100..CMP0 Output
  23405. * 0b001101..CMP1 Output
  23406. * 0b001110..CMP2 Output
  23407. * 0b001111..CMP3 Output
  23408. * 0b010000..FTM0 all channels match trigger ORed together
  23409. * 0b010001..FTM0 counter init trigger
  23410. * 0b010010..FTM3 all channels match trigger ORed together
  23411. * 0b010011..FTM3 counter init trigger
  23412. * 0b010100..PWMA channel 0 trigger 0
  23413. * 0b010101..PWMA channel 0 trigger 1
  23414. * 0b010110..PWMA channel 1 trigger 0
  23415. * 0b010111..PWMA channel 1 trigger 1
  23416. * 0b011000..PWMA channel 2 trigger 0
  23417. * 0b011001..PWMA channel 2 trigger 1
  23418. * 0b011010..PWMA channel 3 trigger 0
  23419. * 0b011011..PWMA channel 3 trigger 1
  23420. * 0b011100..PDB0 channel 1 output trigger
  23421. * 0b011101..PDB0 channel 0 output trigger
  23422. * 0b011110..PDB1 channel 1 output trigger
  23423. * 0b011111..PDB1 channel 0 output trigger
  23424. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23425. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23426. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23427. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23428. * 0b100100..FTM1 all channels match trigger ORed together
  23429. * 0b100101..FTM1 counter init trigger
  23430. * 0b100110..DMA channel 0 done
  23431. * 0b100111..DMA channel 1 done
  23432. * 0b101000..DMA channel 6 done
  23433. * 0b101001..DMA channel 7 done
  23434. * 0b101010..PIT trigger 0
  23435. * 0b101011..PIT trigger 1
  23436. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23437. * 0b101101..ENC compare trigger and position match
  23438. * 0b101110..AOI output 0
  23439. * 0b101111..AOI output 1
  23440. * 0b110000..AOI output 2
  23441. * 0b110001..AOI output 3
  23442. * 0b110010..PIT trigger 2
  23443. * 0b110011..PIT trigger 3
  23444. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23445. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23446. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23447. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23448. * 0b111000..FTM2 all channels match trigger ORed together
  23449. * 0b111001..FTM2 counter init trigger
  23450. */
  23451. #define XBARA_SEL9_SEL19(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL9_SEL19_SHIFT)) & XBARA_SEL9_SEL19_MASK)
  23452. /*! @} */
  23453. /*! @name SEL10 - Crossbar A Select Register 10 */
  23454. /*! @{ */
  23455. #define XBARA_SEL10_SEL20_MASK (0x3FU)
  23456. #define XBARA_SEL10_SEL20_SHIFT (0U)
  23457. /*! SEL20
  23458. * 0b000000..Logic zero
  23459. * 0b000001..Logic one
  23460. * 0b000010..XB_IN2 input pin
  23461. * 0b000011..XB_IN3 input pin
  23462. * 0b000100..XB_IN4 input pin
  23463. * 0b000101..XB_IN5 input pin
  23464. * 0b000110..XB_IN6 input pin
  23465. * 0b000111..XB_IN7 input pin
  23466. * 0b001000..XB_IN8 input pin
  23467. * 0b001001..XB_IN9 input pin
  23468. * 0b001010..XB_IN10 input pin
  23469. * 0b001011..XB_IN11 input pin
  23470. * 0b001100..CMP0 Output
  23471. * 0b001101..CMP1 Output
  23472. * 0b001110..CMP2 Output
  23473. * 0b001111..CMP3 Output
  23474. * 0b010000..FTM0 all channels match trigger ORed together
  23475. * 0b010001..FTM0 counter init trigger
  23476. * 0b010010..FTM3 all channels match trigger ORed together
  23477. * 0b010011..FTM3 counter init trigger
  23478. * 0b010100..PWMA channel 0 trigger 0
  23479. * 0b010101..PWMA channel 0 trigger 1
  23480. * 0b010110..PWMA channel 1 trigger 0
  23481. * 0b010111..PWMA channel 1 trigger 1
  23482. * 0b011000..PWMA channel 2 trigger 0
  23483. * 0b011001..PWMA channel 2 trigger 1
  23484. * 0b011010..PWMA channel 3 trigger 0
  23485. * 0b011011..PWMA channel 3 trigger 1
  23486. * 0b011100..PDB0 channel 1 output trigger
  23487. * 0b011101..PDB0 channel 0 output trigger
  23488. * 0b011110..PDB1 channel 1 output trigger
  23489. * 0b011111..PDB1 channel 0 output trigger
  23490. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23491. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23492. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23493. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23494. * 0b100100..FTM1 all channels match trigger ORed together
  23495. * 0b100101..FTM1 counter init trigger
  23496. * 0b100110..DMA channel 0 done
  23497. * 0b100111..DMA channel 1 done
  23498. * 0b101000..DMA channel 6 done
  23499. * 0b101001..DMA channel 7 done
  23500. * 0b101010..PIT trigger 0
  23501. * 0b101011..PIT trigger 1
  23502. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23503. * 0b101101..ENC compare trigger and position match
  23504. * 0b101110..AOI output 0
  23505. * 0b101111..AOI output 1
  23506. * 0b110000..AOI output 2
  23507. * 0b110001..AOI output 3
  23508. * 0b110010..PIT trigger 2
  23509. * 0b110011..PIT trigger 3
  23510. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23511. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23512. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23513. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23514. * 0b111000..FTM2 all channels match trigger ORed together
  23515. * 0b111001..FTM2 counter init trigger
  23516. */
  23517. #define XBARA_SEL10_SEL20(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL10_SEL20_SHIFT)) & XBARA_SEL10_SEL20_MASK)
  23518. #define XBARA_SEL10_SEL21_MASK (0x3F00U)
  23519. #define XBARA_SEL10_SEL21_SHIFT (8U)
  23520. /*! SEL21
  23521. * 0b000000..Logic zero
  23522. * 0b000001..Logic one
  23523. * 0b000010..XB_IN2 input pin
  23524. * 0b000011..XB_IN3 input pin
  23525. * 0b000100..XB_IN4 input pin
  23526. * 0b000101..XB_IN5 input pin
  23527. * 0b000110..XB_IN6 input pin
  23528. * 0b000111..XB_IN7 input pin
  23529. * 0b001000..XB_IN8 input pin
  23530. * 0b001001..XB_IN9 input pin
  23531. * 0b001010..XB_IN10 input pin
  23532. * 0b001011..XB_IN11 input pin
  23533. * 0b001100..CMP0 Output
  23534. * 0b001101..CMP1 Output
  23535. * 0b001110..CMP2 Output
  23536. * 0b001111..CMP3 Output
  23537. * 0b010000..FTM0 all channels match trigger ORed together
  23538. * 0b010001..FTM0 counter init trigger
  23539. * 0b010010..FTM3 all channels match trigger ORed together
  23540. * 0b010011..FTM3 counter init trigger
  23541. * 0b010100..PWMA channel 0 trigger 0
  23542. * 0b010101..PWMA channel 0 trigger 1
  23543. * 0b010110..PWMA channel 1 trigger 0
  23544. * 0b010111..PWMA channel 1 trigger 1
  23545. * 0b011000..PWMA channel 2 trigger 0
  23546. * 0b011001..PWMA channel 2 trigger 1
  23547. * 0b011010..PWMA channel 3 trigger 0
  23548. * 0b011011..PWMA channel 3 trigger 1
  23549. * 0b011100..PDB0 channel 1 output trigger
  23550. * 0b011101..PDB0 channel 0 output trigger
  23551. * 0b011110..PDB1 channel 1 output trigger
  23552. * 0b011111..PDB1 channel 0 output trigger
  23553. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23554. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23555. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23556. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23557. * 0b100100..FTM1 all channels match trigger ORed together
  23558. * 0b100101..FTM1 counter init trigger
  23559. * 0b100110..DMA channel 0 done
  23560. * 0b100111..DMA channel 1 done
  23561. * 0b101000..DMA channel 6 done
  23562. * 0b101001..DMA channel 7 done
  23563. * 0b101010..PIT trigger 0
  23564. * 0b101011..PIT trigger 1
  23565. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23566. * 0b101101..ENC compare trigger and position match
  23567. * 0b101110..AOI output 0
  23568. * 0b101111..AOI output 1
  23569. * 0b110000..AOI output 2
  23570. * 0b110001..AOI output 3
  23571. * 0b110010..PIT trigger 2
  23572. * 0b110011..PIT trigger 3
  23573. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23574. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23575. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23576. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23577. * 0b111000..FTM2 all channels match trigger ORed together
  23578. * 0b111001..FTM2 counter init trigger
  23579. */
  23580. #define XBARA_SEL10_SEL21(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL10_SEL21_SHIFT)) & XBARA_SEL10_SEL21_MASK)
  23581. /*! @} */
  23582. /*! @name SEL11 - Crossbar A Select Register 11 */
  23583. /*! @{ */
  23584. #define XBARA_SEL11_SEL22_MASK (0x3FU)
  23585. #define XBARA_SEL11_SEL22_SHIFT (0U)
  23586. /*! SEL22
  23587. * 0b000000..Logic zero
  23588. * 0b000001..Logic one
  23589. * 0b000010..XB_IN2 input pin
  23590. * 0b000011..XB_IN3 input pin
  23591. * 0b000100..XB_IN4 input pin
  23592. * 0b000101..XB_IN5 input pin
  23593. * 0b000110..XB_IN6 input pin
  23594. * 0b000111..XB_IN7 input pin
  23595. * 0b001000..XB_IN8 input pin
  23596. * 0b001001..XB_IN9 input pin
  23597. * 0b001010..XB_IN10 input pin
  23598. * 0b001011..XB_IN11 input pin
  23599. * 0b001100..CMP0 Output
  23600. * 0b001101..CMP1 Output
  23601. * 0b001110..CMP2 Output
  23602. * 0b001111..CMP3 Output
  23603. * 0b010000..FTM0 all channels match trigger ORed together
  23604. * 0b010001..FTM0 counter init trigger
  23605. * 0b010010..FTM3 all channels match trigger ORed together
  23606. * 0b010011..FTM3 counter init trigger
  23607. * 0b010100..PWMA channel 0 trigger 0
  23608. * 0b010101..PWMA channel 0 trigger 1
  23609. * 0b010110..PWMA channel 1 trigger 0
  23610. * 0b010111..PWMA channel 1 trigger 1
  23611. * 0b011000..PWMA channel 2 trigger 0
  23612. * 0b011001..PWMA channel 2 trigger 1
  23613. * 0b011010..PWMA channel 3 trigger 0
  23614. * 0b011011..PWMA channel 3 trigger 1
  23615. * 0b011100..PDB0 channel 1 output trigger
  23616. * 0b011101..PDB0 channel 0 output trigger
  23617. * 0b011110..PDB1 channel 1 output trigger
  23618. * 0b011111..PDB1 channel 0 output trigger
  23619. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23620. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23621. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23622. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23623. * 0b100100..FTM1 all channels match trigger ORed together
  23624. * 0b100101..FTM1 counter init trigger
  23625. * 0b100110..DMA channel 0 done
  23626. * 0b100111..DMA channel 1 done
  23627. * 0b101000..DMA channel 6 done
  23628. * 0b101001..DMA channel 7 done
  23629. * 0b101010..PIT trigger 0
  23630. * 0b101011..PIT trigger 1
  23631. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23632. * 0b101101..ENC compare trigger and position match
  23633. * 0b101110..AOI output 0
  23634. * 0b101111..AOI output 1
  23635. * 0b110000..AOI output 2
  23636. * 0b110001..AOI output 3
  23637. * 0b110010..PIT trigger 2
  23638. * 0b110011..PIT trigger 3
  23639. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23640. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23641. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23642. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23643. * 0b111000..FTM2 all channels match trigger ORed together
  23644. * 0b111001..FTM2 counter init trigger
  23645. */
  23646. #define XBARA_SEL11_SEL22(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL11_SEL22_SHIFT)) & XBARA_SEL11_SEL22_MASK)
  23647. #define XBARA_SEL11_SEL23_MASK (0x3F00U)
  23648. #define XBARA_SEL11_SEL23_SHIFT (8U)
  23649. /*! SEL23
  23650. * 0b000000..Logic zero
  23651. * 0b000001..Logic one
  23652. * 0b000010..XB_IN2 input pin
  23653. * 0b000011..XB_IN3 input pin
  23654. * 0b000100..XB_IN4 input pin
  23655. * 0b000101..XB_IN5 input pin
  23656. * 0b000110..XB_IN6 input pin
  23657. * 0b000111..XB_IN7 input pin
  23658. * 0b001000..XB_IN8 input pin
  23659. * 0b001001..XB_IN9 input pin
  23660. * 0b001010..XB_IN10 input pin
  23661. * 0b001011..XB_IN11 input pin
  23662. * 0b001100..CMP0 Output
  23663. * 0b001101..CMP1 Output
  23664. * 0b001110..CMP2 Output
  23665. * 0b001111..CMP3 Output
  23666. * 0b010000..FTM0 all channels match trigger ORed together
  23667. * 0b010001..FTM0 counter init trigger
  23668. * 0b010010..FTM3 all channels match trigger ORed together
  23669. * 0b010011..FTM3 counter init trigger
  23670. * 0b010100..PWMA channel 0 trigger 0
  23671. * 0b010101..PWMA channel 0 trigger 1
  23672. * 0b010110..PWMA channel 1 trigger 0
  23673. * 0b010111..PWMA channel 1 trigger 1
  23674. * 0b011000..PWMA channel 2 trigger 0
  23675. * 0b011001..PWMA channel 2 trigger 1
  23676. * 0b011010..PWMA channel 3 trigger 0
  23677. * 0b011011..PWMA channel 3 trigger 1
  23678. * 0b011100..PDB0 channel 1 output trigger
  23679. * 0b011101..PDB0 channel 0 output trigger
  23680. * 0b011110..PDB1 channel 1 output trigger
  23681. * 0b011111..PDB1 channel 0 output trigger
  23682. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23683. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23684. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23685. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23686. * 0b100100..FTM1 all channels match trigger ORed together
  23687. * 0b100101..FTM1 counter init trigger
  23688. * 0b100110..DMA channel 0 done
  23689. * 0b100111..DMA channel 1 done
  23690. * 0b101000..DMA channel 6 done
  23691. * 0b101001..DMA channel 7 done
  23692. * 0b101010..PIT trigger 0
  23693. * 0b101011..PIT trigger 1
  23694. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23695. * 0b101101..ENC compare trigger and position match
  23696. * 0b101110..AOI output 0
  23697. * 0b101111..AOI output 1
  23698. * 0b110000..AOI output 2
  23699. * 0b110001..AOI output 3
  23700. * 0b110010..PIT trigger 2
  23701. * 0b110011..PIT trigger 3
  23702. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23703. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23704. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23705. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23706. * 0b111000..FTM2 all channels match trigger ORed together
  23707. * 0b111001..FTM2 counter init trigger
  23708. */
  23709. #define XBARA_SEL11_SEL23(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL11_SEL23_SHIFT)) & XBARA_SEL11_SEL23_MASK)
  23710. /*! @} */
  23711. /*! @name SEL12 - Crossbar A Select Register 12 */
  23712. /*! @{ */
  23713. #define XBARA_SEL12_SEL24_MASK (0x3FU)
  23714. #define XBARA_SEL12_SEL24_SHIFT (0U)
  23715. /*! SEL24
  23716. * 0b000000..Logic zero
  23717. * 0b000001..Logic one
  23718. * 0b000010..XB_IN2 input pin
  23719. * 0b000011..XB_IN3 input pin
  23720. * 0b000100..XB_IN4 input pin
  23721. * 0b000101..XB_IN5 input pin
  23722. * 0b000110..XB_IN6 input pin
  23723. * 0b000111..XB_IN7 input pin
  23724. * 0b001000..XB_IN8 input pin
  23725. * 0b001001..XB_IN9 input pin
  23726. * 0b001010..XB_IN10 input pin
  23727. * 0b001011..XB_IN11 input pin
  23728. * 0b001100..CMP0 Output
  23729. * 0b001101..CMP1 Output
  23730. * 0b001110..CMP2 Output
  23731. * 0b001111..CMP3 Output
  23732. * 0b010000..FTM0 all channels match trigger ORed together
  23733. * 0b010001..FTM0 counter init trigger
  23734. * 0b010010..FTM3 all channels match trigger ORed together
  23735. * 0b010011..FTM3 counter init trigger
  23736. * 0b010100..PWMA channel 0 trigger 0
  23737. * 0b010101..PWMA channel 0 trigger 1
  23738. * 0b010110..PWMA channel 1 trigger 0
  23739. * 0b010111..PWMA channel 1 trigger 1
  23740. * 0b011000..PWMA channel 2 trigger 0
  23741. * 0b011001..PWMA channel 2 trigger 1
  23742. * 0b011010..PWMA channel 3 trigger 0
  23743. * 0b011011..PWMA channel 3 trigger 1
  23744. * 0b011100..PDB0 channel 1 output trigger
  23745. * 0b011101..PDB0 channel 0 output trigger
  23746. * 0b011110..PDB1 channel 1 output trigger
  23747. * 0b011111..PDB1 channel 0 output trigger
  23748. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23749. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23750. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23751. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23752. * 0b100100..FTM1 all channels match trigger ORed together
  23753. * 0b100101..FTM1 counter init trigger
  23754. * 0b100110..DMA channel 0 done
  23755. * 0b100111..DMA channel 1 done
  23756. * 0b101000..DMA channel 6 done
  23757. * 0b101001..DMA channel 7 done
  23758. * 0b101010..PIT trigger 0
  23759. * 0b101011..PIT trigger 1
  23760. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23761. * 0b101101..ENC compare trigger and position match
  23762. * 0b101110..AOI output 0
  23763. * 0b101111..AOI output 1
  23764. * 0b110000..AOI output 2
  23765. * 0b110001..AOI output 3
  23766. * 0b110010..PIT trigger 2
  23767. * 0b110011..PIT trigger 3
  23768. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23769. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23770. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23771. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23772. * 0b111000..FTM2 all channels match trigger ORed together
  23773. * 0b111001..FTM2 counter init trigger
  23774. */
  23775. #define XBARA_SEL12_SEL24(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL12_SEL24_SHIFT)) & XBARA_SEL12_SEL24_MASK)
  23776. #define XBARA_SEL12_SEL25_MASK (0x3F00U)
  23777. #define XBARA_SEL12_SEL25_SHIFT (8U)
  23778. /*! SEL25
  23779. * 0b000000..Logic zero
  23780. * 0b000001..Logic one
  23781. * 0b000010..XB_IN2 input pin
  23782. * 0b000011..XB_IN3 input pin
  23783. * 0b000100..XB_IN4 input pin
  23784. * 0b000101..XB_IN5 input pin
  23785. * 0b000110..XB_IN6 input pin
  23786. * 0b000111..XB_IN7 input pin
  23787. * 0b001000..XB_IN8 input pin
  23788. * 0b001001..XB_IN9 input pin
  23789. * 0b001010..XB_IN10 input pin
  23790. * 0b001011..XB_IN11 input pin
  23791. * 0b001100..CMP0 Output
  23792. * 0b001101..CMP1 Output
  23793. * 0b001110..CMP2 Output
  23794. * 0b001111..CMP3 Output
  23795. * 0b010000..FTM0 all channels match trigger ORed together
  23796. * 0b010001..FTM0 counter init trigger
  23797. * 0b010010..FTM3 all channels match trigger ORed together
  23798. * 0b010011..FTM3 counter init trigger
  23799. * 0b010100..PWMA channel 0 trigger 0
  23800. * 0b010101..PWMA channel 0 trigger 1
  23801. * 0b010110..PWMA channel 1 trigger 0
  23802. * 0b010111..PWMA channel 1 trigger 1
  23803. * 0b011000..PWMA channel 2 trigger 0
  23804. * 0b011001..PWMA channel 2 trigger 1
  23805. * 0b011010..PWMA channel 3 trigger 0
  23806. * 0b011011..PWMA channel 3 trigger 1
  23807. * 0b011100..PDB0 channel 1 output trigger
  23808. * 0b011101..PDB0 channel 0 output trigger
  23809. * 0b011110..PDB1 channel 1 output trigger
  23810. * 0b011111..PDB1 channel 0 output trigger
  23811. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23812. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23813. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23814. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23815. * 0b100100..FTM1 all channels match trigger ORed together
  23816. * 0b100101..FTM1 counter init trigger
  23817. * 0b100110..DMA channel 0 done
  23818. * 0b100111..DMA channel 1 done
  23819. * 0b101000..DMA channel 6 done
  23820. * 0b101001..DMA channel 7 done
  23821. * 0b101010..PIT trigger 0
  23822. * 0b101011..PIT trigger 1
  23823. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23824. * 0b101101..ENC compare trigger and position match
  23825. * 0b101110..AOI output 0
  23826. * 0b101111..AOI output 1
  23827. * 0b110000..AOI output 2
  23828. * 0b110001..AOI output 3
  23829. * 0b110010..PIT trigger 2
  23830. * 0b110011..PIT trigger 3
  23831. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23832. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23833. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23834. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23835. * 0b111000..FTM2 all channels match trigger ORed together
  23836. * 0b111001..FTM2 counter init trigger
  23837. */
  23838. #define XBARA_SEL12_SEL25(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL12_SEL25_SHIFT)) & XBARA_SEL12_SEL25_MASK)
  23839. /*! @} */
  23840. /*! @name SEL13 - Crossbar A Select Register 13 */
  23841. /*! @{ */
  23842. #define XBARA_SEL13_SEL26_MASK (0x3FU)
  23843. #define XBARA_SEL13_SEL26_SHIFT (0U)
  23844. /*! SEL26
  23845. * 0b000000..Logic zero
  23846. * 0b000001..Logic one
  23847. * 0b000010..XB_IN2 input pin
  23848. * 0b000011..XB_IN3 input pin
  23849. * 0b000100..XB_IN4 input pin
  23850. * 0b000101..XB_IN5 input pin
  23851. * 0b000110..XB_IN6 input pin
  23852. * 0b000111..XB_IN7 input pin
  23853. * 0b001000..XB_IN8 input pin
  23854. * 0b001001..XB_IN9 input pin
  23855. * 0b001010..XB_IN10 input pin
  23856. * 0b001011..XB_IN11 input pin
  23857. * 0b001100..CMP0 Output
  23858. * 0b001101..CMP1 Output
  23859. * 0b001110..CMP2 Output
  23860. * 0b001111..CMP3 Output
  23861. * 0b010000..FTM0 all channels match trigger ORed together
  23862. * 0b010001..FTM0 counter init trigger
  23863. * 0b010010..FTM3 all channels match trigger ORed together
  23864. * 0b010011..FTM3 counter init trigger
  23865. * 0b010100..PWMA channel 0 trigger 0
  23866. * 0b010101..PWMA channel 0 trigger 1
  23867. * 0b010110..PWMA channel 1 trigger 0
  23868. * 0b010111..PWMA channel 1 trigger 1
  23869. * 0b011000..PWMA channel 2 trigger 0
  23870. * 0b011001..PWMA channel 2 trigger 1
  23871. * 0b011010..PWMA channel 3 trigger 0
  23872. * 0b011011..PWMA channel 3 trigger 1
  23873. * 0b011100..PDB0 channel 1 output trigger
  23874. * 0b011101..PDB0 channel 0 output trigger
  23875. * 0b011110..PDB1 channel 1 output trigger
  23876. * 0b011111..PDB1 channel 0 output trigger
  23877. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23878. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23879. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23880. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23881. * 0b100100..FTM1 all channels match trigger ORed together
  23882. * 0b100101..FTM1 counter init trigger
  23883. * 0b100110..DMA channel 0 done
  23884. * 0b100111..DMA channel 1 done
  23885. * 0b101000..DMA channel 6 done
  23886. * 0b101001..DMA channel 7 done
  23887. * 0b101010..PIT trigger 0
  23888. * 0b101011..PIT trigger 1
  23889. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23890. * 0b101101..ENC compare trigger and position match
  23891. * 0b101110..AOI output 0
  23892. * 0b101111..AOI output 1
  23893. * 0b110000..AOI output 2
  23894. * 0b110001..AOI output 3
  23895. * 0b110010..PIT trigger 2
  23896. * 0b110011..PIT trigger 3
  23897. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23898. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23899. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23900. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23901. * 0b111000..FTM2 all channels match trigger ORed together
  23902. * 0b111001..FTM2 counter init trigger
  23903. */
  23904. #define XBARA_SEL13_SEL26(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL13_SEL26_SHIFT)) & XBARA_SEL13_SEL26_MASK)
  23905. #define XBARA_SEL13_SEL27_MASK (0x3F00U)
  23906. #define XBARA_SEL13_SEL27_SHIFT (8U)
  23907. /*! SEL27
  23908. * 0b000000..Logic zero
  23909. * 0b000001..Logic one
  23910. * 0b000010..XB_IN2 input pin
  23911. * 0b000011..XB_IN3 input pin
  23912. * 0b000100..XB_IN4 input pin
  23913. * 0b000101..XB_IN5 input pin
  23914. * 0b000110..XB_IN6 input pin
  23915. * 0b000111..XB_IN7 input pin
  23916. * 0b001000..XB_IN8 input pin
  23917. * 0b001001..XB_IN9 input pin
  23918. * 0b001010..XB_IN10 input pin
  23919. * 0b001011..XB_IN11 input pin
  23920. * 0b001100..CMP0 Output
  23921. * 0b001101..CMP1 Output
  23922. * 0b001110..CMP2 Output
  23923. * 0b001111..CMP3 Output
  23924. * 0b010000..FTM0 all channels match trigger ORed together
  23925. * 0b010001..FTM0 counter init trigger
  23926. * 0b010010..FTM3 all channels match trigger ORed together
  23927. * 0b010011..FTM3 counter init trigger
  23928. * 0b010100..PWMA channel 0 trigger 0
  23929. * 0b010101..PWMA channel 0 trigger 1
  23930. * 0b010110..PWMA channel 1 trigger 0
  23931. * 0b010111..PWMA channel 1 trigger 1
  23932. * 0b011000..PWMA channel 2 trigger 0
  23933. * 0b011001..PWMA channel 2 trigger 1
  23934. * 0b011010..PWMA channel 3 trigger 0
  23935. * 0b011011..PWMA channel 3 trigger 1
  23936. * 0b011100..PDB0 channel 1 output trigger
  23937. * 0b011101..PDB0 channel 0 output trigger
  23938. * 0b011110..PDB1 channel 1 output trigger
  23939. * 0b011111..PDB1 channel 0 output trigger
  23940. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  23941. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  23942. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  23943. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  23944. * 0b100100..FTM1 all channels match trigger ORed together
  23945. * 0b100101..FTM1 counter init trigger
  23946. * 0b100110..DMA channel 0 done
  23947. * 0b100111..DMA channel 1 done
  23948. * 0b101000..DMA channel 6 done
  23949. * 0b101001..DMA channel 7 done
  23950. * 0b101010..PIT trigger 0
  23951. * 0b101011..PIT trigger 1
  23952. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  23953. * 0b101101..ENC compare trigger and position match
  23954. * 0b101110..AOI output 0
  23955. * 0b101111..AOI output 1
  23956. * 0b110000..AOI output 2
  23957. * 0b110001..AOI output 3
  23958. * 0b110010..PIT trigger 2
  23959. * 0b110011..PIT trigger 3
  23960. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  23961. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  23962. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  23963. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  23964. * 0b111000..FTM2 all channels match trigger ORed together
  23965. * 0b111001..FTM2 counter init trigger
  23966. */
  23967. #define XBARA_SEL13_SEL27(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL13_SEL27_SHIFT)) & XBARA_SEL13_SEL27_MASK)
  23968. /*! @} */
  23969. /*! @name SEL14 - Crossbar A Select Register 14 */
  23970. /*! @{ */
  23971. #define XBARA_SEL14_SEL28_MASK (0x3FU)
  23972. #define XBARA_SEL14_SEL28_SHIFT (0U)
  23973. /*! SEL28
  23974. * 0b000000..Logic zero
  23975. * 0b000001..Logic one
  23976. * 0b000010..XB_IN2 input pin
  23977. * 0b000011..XB_IN3 input pin
  23978. * 0b000100..XB_IN4 input pin
  23979. * 0b000101..XB_IN5 input pin
  23980. * 0b000110..XB_IN6 input pin
  23981. * 0b000111..XB_IN7 input pin
  23982. * 0b001000..XB_IN8 input pin
  23983. * 0b001001..XB_IN9 input pin
  23984. * 0b001010..XB_IN10 input pin
  23985. * 0b001011..XB_IN11 input pin
  23986. * 0b001100..CMP0 Output
  23987. * 0b001101..CMP1 Output
  23988. * 0b001110..CMP2 Output
  23989. * 0b001111..CMP3 Output
  23990. * 0b010000..FTM0 all channels match trigger ORed together
  23991. * 0b010001..FTM0 counter init trigger
  23992. * 0b010010..FTM3 all channels match trigger ORed together
  23993. * 0b010011..FTM3 counter init trigger
  23994. * 0b010100..PWMA channel 0 trigger 0
  23995. * 0b010101..PWMA channel 0 trigger 1
  23996. * 0b010110..PWMA channel 1 trigger 0
  23997. * 0b010111..PWMA channel 1 trigger 1
  23998. * 0b011000..PWMA channel 2 trigger 0
  23999. * 0b011001..PWMA channel 2 trigger 1
  24000. * 0b011010..PWMA channel 3 trigger 0
  24001. * 0b011011..PWMA channel 3 trigger 1
  24002. * 0b011100..PDB0 channel 1 output trigger
  24003. * 0b011101..PDB0 channel 0 output trigger
  24004. * 0b011110..PDB1 channel 1 output trigger
  24005. * 0b011111..PDB1 channel 0 output trigger
  24006. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24007. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24008. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24009. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24010. * 0b100100..FTM1 all channels match trigger ORed together
  24011. * 0b100101..FTM1 counter init trigger
  24012. * 0b100110..DMA channel 0 done
  24013. * 0b100111..DMA channel 1 done
  24014. * 0b101000..DMA channel 6 done
  24015. * 0b101001..DMA channel 7 done
  24016. * 0b101010..PIT trigger 0
  24017. * 0b101011..PIT trigger 1
  24018. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24019. * 0b101101..ENC compare trigger and position match
  24020. * 0b101110..AOI output 0
  24021. * 0b101111..AOI output 1
  24022. * 0b110000..AOI output 2
  24023. * 0b110001..AOI output 3
  24024. * 0b110010..PIT trigger 2
  24025. * 0b110011..PIT trigger 3
  24026. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24027. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24028. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24029. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24030. * 0b111000..FTM2 all channels match trigger ORed together
  24031. * 0b111001..FTM2 counter init trigger
  24032. */
  24033. #define XBARA_SEL14_SEL28(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL14_SEL28_SHIFT)) & XBARA_SEL14_SEL28_MASK)
  24034. #define XBARA_SEL14_SEL29_MASK (0x3F00U)
  24035. #define XBARA_SEL14_SEL29_SHIFT (8U)
  24036. /*! SEL29
  24037. * 0b000000..Logic zero
  24038. * 0b000001..Logic one
  24039. * 0b000010..XB_IN2 input pin
  24040. * 0b000011..XB_IN3 input pin
  24041. * 0b000100..XB_IN4 input pin
  24042. * 0b000101..XB_IN5 input pin
  24043. * 0b000110..XB_IN6 input pin
  24044. * 0b000111..XB_IN7 input pin
  24045. * 0b001000..XB_IN8 input pin
  24046. * 0b001001..XB_IN9 input pin
  24047. * 0b001010..XB_IN10 input pin
  24048. * 0b001011..XB_IN11 input pin
  24049. * 0b001100..CMP0 Output
  24050. * 0b001101..CMP1 Output
  24051. * 0b001110..CMP2 Output
  24052. * 0b001111..CMP3 Output
  24053. * 0b010000..FTM0 all channels match trigger ORed together
  24054. * 0b010001..FTM0 counter init trigger
  24055. * 0b010010..FTM3 all channels match trigger ORed together
  24056. * 0b010011..FTM3 counter init trigger
  24057. * 0b010100..PWMA channel 0 trigger 0
  24058. * 0b010101..PWMA channel 0 trigger 1
  24059. * 0b010110..PWMA channel 1 trigger 0
  24060. * 0b010111..PWMA channel 1 trigger 1
  24061. * 0b011000..PWMA channel 2 trigger 0
  24062. * 0b011001..PWMA channel 2 trigger 1
  24063. * 0b011010..PWMA channel 3 trigger 0
  24064. * 0b011011..PWMA channel 3 trigger 1
  24065. * 0b011100..PDB0 channel 1 output trigger
  24066. * 0b011101..PDB0 channel 0 output trigger
  24067. * 0b011110..PDB1 channel 1 output trigger
  24068. * 0b011111..PDB1 channel 0 output trigger
  24069. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24070. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24071. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24072. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24073. * 0b100100..FTM1 all channels match trigger ORed together
  24074. * 0b100101..FTM1 counter init trigger
  24075. * 0b100110..DMA channel 0 done
  24076. * 0b100111..DMA channel 1 done
  24077. * 0b101000..DMA channel 6 done
  24078. * 0b101001..DMA channel 7 done
  24079. * 0b101010..PIT trigger 0
  24080. * 0b101011..PIT trigger 1
  24081. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24082. * 0b101101..ENC compare trigger and position match
  24083. * 0b101110..AOI output 0
  24084. * 0b101111..AOI output 1
  24085. * 0b110000..AOI output 2
  24086. * 0b110001..AOI output 3
  24087. * 0b110010..PIT trigger 2
  24088. * 0b110011..PIT trigger 3
  24089. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24090. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24091. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24092. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24093. * 0b111000..FTM2 all channels match trigger ORed together
  24094. * 0b111001..FTM2 counter init trigger
  24095. */
  24096. #define XBARA_SEL14_SEL29(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL14_SEL29_SHIFT)) & XBARA_SEL14_SEL29_MASK)
  24097. /*! @} */
  24098. /*! @name SEL15 - Crossbar A Select Register 15 */
  24099. /*! @{ */
  24100. #define XBARA_SEL15_SEL30_MASK (0x3FU)
  24101. #define XBARA_SEL15_SEL30_SHIFT (0U)
  24102. /*! SEL30
  24103. * 0b000000..Logic zero
  24104. * 0b000001..Logic one
  24105. * 0b000010..XB_IN2 input pin
  24106. * 0b000011..XB_IN3 input pin
  24107. * 0b000100..XB_IN4 input pin
  24108. * 0b000101..XB_IN5 input pin
  24109. * 0b000110..XB_IN6 input pin
  24110. * 0b000111..XB_IN7 input pin
  24111. * 0b001000..XB_IN8 input pin
  24112. * 0b001001..XB_IN9 input pin
  24113. * 0b001010..XB_IN10 input pin
  24114. * 0b001011..XB_IN11 input pin
  24115. * 0b001100..CMP0 Output
  24116. * 0b001101..CMP1 Output
  24117. * 0b001110..CMP2 Output
  24118. * 0b001111..CMP3 Output
  24119. * 0b010000..FTM0 all channels match trigger ORed together
  24120. * 0b010001..FTM0 counter init trigger
  24121. * 0b010010..FTM3 all channels match trigger ORed together
  24122. * 0b010011..FTM3 counter init trigger
  24123. * 0b010100..PWMA channel 0 trigger 0
  24124. * 0b010101..PWMA channel 0 trigger 1
  24125. * 0b010110..PWMA channel 1 trigger 0
  24126. * 0b010111..PWMA channel 1 trigger 1
  24127. * 0b011000..PWMA channel 2 trigger 0
  24128. * 0b011001..PWMA channel 2 trigger 1
  24129. * 0b011010..PWMA channel 3 trigger 0
  24130. * 0b011011..PWMA channel 3 trigger 1
  24131. * 0b011100..PDB0 channel 1 output trigger
  24132. * 0b011101..PDB0 channel 0 output trigger
  24133. * 0b011110..PDB1 channel 1 output trigger
  24134. * 0b011111..PDB1 channel 0 output trigger
  24135. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24136. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24137. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24138. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24139. * 0b100100..FTM1 all channels match trigger ORed together
  24140. * 0b100101..FTM1 counter init trigger
  24141. * 0b100110..DMA channel 0 done
  24142. * 0b100111..DMA channel 1 done
  24143. * 0b101000..DMA channel 6 done
  24144. * 0b101001..DMA channel 7 done
  24145. * 0b101010..PIT trigger 0
  24146. * 0b101011..PIT trigger 1
  24147. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24148. * 0b101101..ENC compare trigger and position match
  24149. * 0b101110..AOI output 0
  24150. * 0b101111..AOI output 1
  24151. * 0b110000..AOI output 2
  24152. * 0b110001..AOI output 3
  24153. * 0b110010..PIT trigger 2
  24154. * 0b110011..PIT trigger 3
  24155. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24156. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24157. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24158. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24159. * 0b111000..FTM2 all channels match trigger ORed together
  24160. * 0b111001..FTM2 counter init trigger
  24161. */
  24162. #define XBARA_SEL15_SEL30(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL15_SEL30_SHIFT)) & XBARA_SEL15_SEL30_MASK)
  24163. #define XBARA_SEL15_SEL31_MASK (0x3F00U)
  24164. #define XBARA_SEL15_SEL31_SHIFT (8U)
  24165. /*! SEL31
  24166. * 0b000000..Logic zero
  24167. * 0b000001..Logic one
  24168. * 0b000010..XB_IN2 input pin
  24169. * 0b000011..XB_IN3 input pin
  24170. * 0b000100..XB_IN4 input pin
  24171. * 0b000101..XB_IN5 input pin
  24172. * 0b000110..XB_IN6 input pin
  24173. * 0b000111..XB_IN7 input pin
  24174. * 0b001000..XB_IN8 input pin
  24175. * 0b001001..XB_IN9 input pin
  24176. * 0b001010..XB_IN10 input pin
  24177. * 0b001011..XB_IN11 input pin
  24178. * 0b001100..CMP0 Output
  24179. * 0b001101..CMP1 Output
  24180. * 0b001110..CMP2 Output
  24181. * 0b001111..CMP3 Output
  24182. * 0b010000..FTM0 all channels match trigger ORed together
  24183. * 0b010001..FTM0 counter init trigger
  24184. * 0b010010..FTM3 all channels match trigger ORed together
  24185. * 0b010011..FTM3 counter init trigger
  24186. * 0b010100..PWMA channel 0 trigger 0
  24187. * 0b010101..PWMA channel 0 trigger 1
  24188. * 0b010110..PWMA channel 1 trigger 0
  24189. * 0b010111..PWMA channel 1 trigger 1
  24190. * 0b011000..PWMA channel 2 trigger 0
  24191. * 0b011001..PWMA channel 2 trigger 1
  24192. * 0b011010..PWMA channel 3 trigger 0
  24193. * 0b011011..PWMA channel 3 trigger 1
  24194. * 0b011100..PDB0 channel 1 output trigger
  24195. * 0b011101..PDB0 channel 0 output trigger
  24196. * 0b011110..PDB1 channel 1 output trigger
  24197. * 0b011111..PDB1 channel 0 output trigger
  24198. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24199. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24200. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24201. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24202. * 0b100100..FTM1 all channels match trigger ORed together
  24203. * 0b100101..FTM1 counter init trigger
  24204. * 0b100110..DMA channel 0 done
  24205. * 0b100111..DMA channel 1 done
  24206. * 0b101000..DMA channel 6 done
  24207. * 0b101001..DMA channel 7 done
  24208. * 0b101010..PIT trigger 0
  24209. * 0b101011..PIT trigger 1
  24210. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24211. * 0b101101..ENC compare trigger and position match
  24212. * 0b101110..AOI output 0
  24213. * 0b101111..AOI output 1
  24214. * 0b110000..AOI output 2
  24215. * 0b110001..AOI output 3
  24216. * 0b110010..PIT trigger 2
  24217. * 0b110011..PIT trigger 3
  24218. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24219. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24220. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24221. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24222. * 0b111000..FTM2 all channels match trigger ORed together
  24223. * 0b111001..FTM2 counter init trigger
  24224. */
  24225. #define XBARA_SEL15_SEL31(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL15_SEL31_SHIFT)) & XBARA_SEL15_SEL31_MASK)
  24226. /*! @} */
  24227. /*! @name SEL16 - Crossbar A Select Register 16 */
  24228. /*! @{ */
  24229. #define XBARA_SEL16_SEL32_MASK (0x3FU)
  24230. #define XBARA_SEL16_SEL32_SHIFT (0U)
  24231. /*! SEL32
  24232. * 0b000000..Logic zero
  24233. * 0b000001..Logic one
  24234. * 0b000010..XB_IN2 input pin
  24235. * 0b000011..XB_IN3 input pin
  24236. * 0b000100..XB_IN4 input pin
  24237. * 0b000101..XB_IN5 input pin
  24238. * 0b000110..XB_IN6 input pin
  24239. * 0b000111..XB_IN7 input pin
  24240. * 0b001000..XB_IN8 input pin
  24241. * 0b001001..XB_IN9 input pin
  24242. * 0b001010..XB_IN10 input pin
  24243. * 0b001011..XB_IN11 input pin
  24244. * 0b001100..CMP0 Output
  24245. * 0b001101..CMP1 Output
  24246. * 0b001110..CMP2 Output
  24247. * 0b001111..CMP3 Output
  24248. * 0b010000..FTM0 all channels match trigger ORed together
  24249. * 0b010001..FTM0 counter init trigger
  24250. * 0b010010..FTM3 all channels match trigger ORed together
  24251. * 0b010011..FTM3 counter init trigger
  24252. * 0b010100..PWMA channel 0 trigger 0
  24253. * 0b010101..PWMA channel 0 trigger 1
  24254. * 0b010110..PWMA channel 1 trigger 0
  24255. * 0b010111..PWMA channel 1 trigger 1
  24256. * 0b011000..PWMA channel 2 trigger 0
  24257. * 0b011001..PWMA channel 2 trigger 1
  24258. * 0b011010..PWMA channel 3 trigger 0
  24259. * 0b011011..PWMA channel 3 trigger 1
  24260. * 0b011100..PDB0 channel 1 output trigger
  24261. * 0b011101..PDB0 channel 0 output trigger
  24262. * 0b011110..PDB1 channel 1 output trigger
  24263. * 0b011111..PDB1 channel 0 output trigger
  24264. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24265. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24266. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24267. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24268. * 0b100100..FTM1 all channels match trigger ORed together
  24269. * 0b100101..FTM1 counter init trigger
  24270. * 0b100110..DMA channel 0 done
  24271. * 0b100111..DMA channel 1 done
  24272. * 0b101000..DMA channel 6 done
  24273. * 0b101001..DMA channel 7 done
  24274. * 0b101010..PIT trigger 0
  24275. * 0b101011..PIT trigger 1
  24276. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24277. * 0b101101..ENC compare trigger and position match
  24278. * 0b101110..AOI output 0
  24279. * 0b101111..AOI output 1
  24280. * 0b110000..AOI output 2
  24281. * 0b110001..AOI output 3
  24282. * 0b110010..PIT trigger 2
  24283. * 0b110011..PIT trigger 3
  24284. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24285. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24286. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24287. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24288. * 0b111000..FTM2 all channels match trigger ORed together
  24289. * 0b111001..FTM2 counter init trigger
  24290. */
  24291. #define XBARA_SEL16_SEL32(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL16_SEL32_SHIFT)) & XBARA_SEL16_SEL32_MASK)
  24292. #define XBARA_SEL16_SEL33_MASK (0x3F00U)
  24293. #define XBARA_SEL16_SEL33_SHIFT (8U)
  24294. /*! SEL33
  24295. * 0b000000..Logic zero
  24296. * 0b000001..Logic one
  24297. * 0b000010..XB_IN2 input pin
  24298. * 0b000011..XB_IN3 input pin
  24299. * 0b000100..XB_IN4 input pin
  24300. * 0b000101..XB_IN5 input pin
  24301. * 0b000110..XB_IN6 input pin
  24302. * 0b000111..XB_IN7 input pin
  24303. * 0b001000..XB_IN8 input pin
  24304. * 0b001001..XB_IN9 input pin
  24305. * 0b001010..XB_IN10 input pin
  24306. * 0b001011..XB_IN11 input pin
  24307. * 0b001100..CMP0 Output
  24308. * 0b001101..CMP1 Output
  24309. * 0b001110..CMP2 Output
  24310. * 0b001111..CMP3 Output
  24311. * 0b010000..FTM0 all channels match trigger ORed together
  24312. * 0b010001..FTM0 counter init trigger
  24313. * 0b010010..FTM3 all channels match trigger ORed together
  24314. * 0b010011..FTM3 counter init trigger
  24315. * 0b010100..PWMA channel 0 trigger 0
  24316. * 0b010101..PWMA channel 0 trigger 1
  24317. * 0b010110..PWMA channel 1 trigger 0
  24318. * 0b010111..PWMA channel 1 trigger 1
  24319. * 0b011000..PWMA channel 2 trigger 0
  24320. * 0b011001..PWMA channel 2 trigger 1
  24321. * 0b011010..PWMA channel 3 trigger 0
  24322. * 0b011011..PWMA channel 3 trigger 1
  24323. * 0b011100..PDB0 channel 1 output trigger
  24324. * 0b011101..PDB0 channel 0 output trigger
  24325. * 0b011110..PDB1 channel 1 output trigger
  24326. * 0b011111..PDB1 channel 0 output trigger
  24327. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24328. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24329. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24330. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24331. * 0b100100..FTM1 all channels match trigger ORed together
  24332. * 0b100101..FTM1 counter init trigger
  24333. * 0b100110..DMA channel 0 done
  24334. * 0b100111..DMA channel 1 done
  24335. * 0b101000..DMA channel 6 done
  24336. * 0b101001..DMA channel 7 done
  24337. * 0b101010..PIT trigger 0
  24338. * 0b101011..PIT trigger 1
  24339. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24340. * 0b101101..ENC compare trigger and position match
  24341. * 0b101110..AOI output 0
  24342. * 0b101111..AOI output 1
  24343. * 0b110000..AOI output 2
  24344. * 0b110001..AOI output 3
  24345. * 0b110010..PIT trigger 2
  24346. * 0b110011..PIT trigger 3
  24347. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24348. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24349. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24350. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24351. * 0b111000..FTM2 all channels match trigger ORed together
  24352. * 0b111001..FTM2 counter init trigger
  24353. */
  24354. #define XBARA_SEL16_SEL33(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL16_SEL33_SHIFT)) & XBARA_SEL16_SEL33_MASK)
  24355. /*! @} */
  24356. /*! @name SEL17 - Crossbar A Select Register 17 */
  24357. /*! @{ */
  24358. #define XBARA_SEL17_SEL34_MASK (0x3FU)
  24359. #define XBARA_SEL17_SEL34_SHIFT (0U)
  24360. /*! SEL34
  24361. * 0b000000..Logic zero
  24362. * 0b000001..Logic one
  24363. * 0b000010..XB_IN2 input pin
  24364. * 0b000011..XB_IN3 input pin
  24365. * 0b000100..XB_IN4 input pin
  24366. * 0b000101..XB_IN5 input pin
  24367. * 0b000110..XB_IN6 input pin
  24368. * 0b000111..XB_IN7 input pin
  24369. * 0b001000..XB_IN8 input pin
  24370. * 0b001001..XB_IN9 input pin
  24371. * 0b001010..XB_IN10 input pin
  24372. * 0b001011..XB_IN11 input pin
  24373. * 0b001100..CMP0 Output
  24374. * 0b001101..CMP1 Output
  24375. * 0b001110..CMP2 Output
  24376. * 0b001111..CMP3 Output
  24377. * 0b010000..FTM0 all channels match trigger ORed together
  24378. * 0b010001..FTM0 counter init trigger
  24379. * 0b010010..FTM3 all channels match trigger ORed together
  24380. * 0b010011..FTM3 counter init trigger
  24381. * 0b010100..PWMA channel 0 trigger 0
  24382. * 0b010101..PWMA channel 0 trigger 1
  24383. * 0b010110..PWMA channel 1 trigger 0
  24384. * 0b010111..PWMA channel 1 trigger 1
  24385. * 0b011000..PWMA channel 2 trigger 0
  24386. * 0b011001..PWMA channel 2 trigger 1
  24387. * 0b011010..PWMA channel 3 trigger 0
  24388. * 0b011011..PWMA channel 3 trigger 1
  24389. * 0b011100..PDB0 channel 1 output trigger
  24390. * 0b011101..PDB0 channel 0 output trigger
  24391. * 0b011110..PDB1 channel 1 output trigger
  24392. * 0b011111..PDB1 channel 0 output trigger
  24393. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24394. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24395. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24396. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24397. * 0b100100..FTM1 all channels match trigger ORed together
  24398. * 0b100101..FTM1 counter init trigger
  24399. * 0b100110..DMA channel 0 done
  24400. * 0b100111..DMA channel 1 done
  24401. * 0b101000..DMA channel 6 done
  24402. * 0b101001..DMA channel 7 done
  24403. * 0b101010..PIT trigger 0
  24404. * 0b101011..PIT trigger 1
  24405. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24406. * 0b101101..ENC compare trigger and position match
  24407. * 0b101110..AOI output 0
  24408. * 0b101111..AOI output 1
  24409. * 0b110000..AOI output 2
  24410. * 0b110001..AOI output 3
  24411. * 0b110010..PIT trigger 2
  24412. * 0b110011..PIT trigger 3
  24413. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24414. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24415. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24416. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24417. * 0b111000..FTM2 all channels match trigger ORed together
  24418. * 0b111001..FTM2 counter init trigger
  24419. */
  24420. #define XBARA_SEL17_SEL34(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL17_SEL34_SHIFT)) & XBARA_SEL17_SEL34_MASK)
  24421. #define XBARA_SEL17_SEL35_MASK (0x3F00U)
  24422. #define XBARA_SEL17_SEL35_SHIFT (8U)
  24423. /*! SEL35
  24424. * 0b000000..Logic zero
  24425. * 0b000001..Logic one
  24426. * 0b000010..XB_IN2 input pin
  24427. * 0b000011..XB_IN3 input pin
  24428. * 0b000100..XB_IN4 input pin
  24429. * 0b000101..XB_IN5 input pin
  24430. * 0b000110..XB_IN6 input pin
  24431. * 0b000111..XB_IN7 input pin
  24432. * 0b001000..XB_IN8 input pin
  24433. * 0b001001..XB_IN9 input pin
  24434. * 0b001010..XB_IN10 input pin
  24435. * 0b001011..XB_IN11 input pin
  24436. * 0b001100..CMP0 Output
  24437. * 0b001101..CMP1 Output
  24438. * 0b001110..CMP2 Output
  24439. * 0b001111..CMP3 Output
  24440. * 0b010000..FTM0 all channels match trigger ORed together
  24441. * 0b010001..FTM0 counter init trigger
  24442. * 0b010010..FTM3 all channels match trigger ORed together
  24443. * 0b010011..FTM3 counter init trigger
  24444. * 0b010100..PWMA channel 0 trigger 0
  24445. * 0b010101..PWMA channel 0 trigger 1
  24446. * 0b010110..PWMA channel 1 trigger 0
  24447. * 0b010111..PWMA channel 1 trigger 1
  24448. * 0b011000..PWMA channel 2 trigger 0
  24449. * 0b011001..PWMA channel 2 trigger 1
  24450. * 0b011010..PWMA channel 3 trigger 0
  24451. * 0b011011..PWMA channel 3 trigger 1
  24452. * 0b011100..PDB0 channel 1 output trigger
  24453. * 0b011101..PDB0 channel 0 output trigger
  24454. * 0b011110..PDB1 channel 1 output trigger
  24455. * 0b011111..PDB1 channel 0 output trigger
  24456. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24457. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24458. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24459. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24460. * 0b100100..FTM1 all channels match trigger ORed together
  24461. * 0b100101..FTM1 counter init trigger
  24462. * 0b100110..DMA channel 0 done
  24463. * 0b100111..DMA channel 1 done
  24464. * 0b101000..DMA channel 6 done
  24465. * 0b101001..DMA channel 7 done
  24466. * 0b101010..PIT trigger 0
  24467. * 0b101011..PIT trigger 1
  24468. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24469. * 0b101101..ENC compare trigger and position match
  24470. * 0b101110..AOI output 0
  24471. * 0b101111..AOI output 1
  24472. * 0b110000..AOI output 2
  24473. * 0b110001..AOI output 3
  24474. * 0b110010..PIT trigger 2
  24475. * 0b110011..PIT trigger 3
  24476. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24477. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24478. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24479. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24480. * 0b111000..FTM2 all channels match trigger ORed together
  24481. * 0b111001..FTM2 counter init trigger
  24482. */
  24483. #define XBARA_SEL17_SEL35(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL17_SEL35_SHIFT)) & XBARA_SEL17_SEL35_MASK)
  24484. /*! @} */
  24485. /*! @name SEL18 - Crossbar A Select Register 18 */
  24486. /*! @{ */
  24487. #define XBARA_SEL18_SEL36_MASK (0x3FU)
  24488. #define XBARA_SEL18_SEL36_SHIFT (0U)
  24489. /*! SEL36
  24490. * 0b000000..Logic zero
  24491. * 0b000001..Logic one
  24492. * 0b000010..XB_IN2 input pin
  24493. * 0b000011..XB_IN3 input pin
  24494. * 0b000100..XB_IN4 input pin
  24495. * 0b000101..XB_IN5 input pin
  24496. * 0b000110..XB_IN6 input pin
  24497. * 0b000111..XB_IN7 input pin
  24498. * 0b001000..XB_IN8 input pin
  24499. * 0b001001..XB_IN9 input pin
  24500. * 0b001010..XB_IN10 input pin
  24501. * 0b001011..XB_IN11 input pin
  24502. * 0b001100..CMP0 Output
  24503. * 0b001101..CMP1 Output
  24504. * 0b001110..CMP2 Output
  24505. * 0b001111..CMP3 Output
  24506. * 0b010000..FTM0 all channels match trigger ORed together
  24507. * 0b010001..FTM0 counter init trigger
  24508. * 0b010010..FTM3 all channels match trigger ORed together
  24509. * 0b010011..FTM3 counter init trigger
  24510. * 0b010100..PWMA channel 0 trigger 0
  24511. * 0b010101..PWMA channel 0 trigger 1
  24512. * 0b010110..PWMA channel 1 trigger 0
  24513. * 0b010111..PWMA channel 1 trigger 1
  24514. * 0b011000..PWMA channel 2 trigger 0
  24515. * 0b011001..PWMA channel 2 trigger 1
  24516. * 0b011010..PWMA channel 3 trigger 0
  24517. * 0b011011..PWMA channel 3 trigger 1
  24518. * 0b011100..PDB0 channel 1 output trigger
  24519. * 0b011101..PDB0 channel 0 output trigger
  24520. * 0b011110..PDB1 channel 1 output trigger
  24521. * 0b011111..PDB1 channel 0 output trigger
  24522. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24523. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24524. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24525. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24526. * 0b100100..FTM1 all channels match trigger ORed together
  24527. * 0b100101..FTM1 counter init trigger
  24528. * 0b100110..DMA channel 0 done
  24529. * 0b100111..DMA channel 1 done
  24530. * 0b101000..DMA channel 6 done
  24531. * 0b101001..DMA channel 7 done
  24532. * 0b101010..PIT trigger 0
  24533. * 0b101011..PIT trigger 1
  24534. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24535. * 0b101101..ENC compare trigger and position match
  24536. * 0b101110..AOI output 0
  24537. * 0b101111..AOI output 1
  24538. * 0b110000..AOI output 2
  24539. * 0b110001..AOI output 3
  24540. * 0b110010..PIT trigger 2
  24541. * 0b110011..PIT trigger 3
  24542. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24543. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24544. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24545. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24546. * 0b111000..FTM2 all channels match trigger ORed together
  24547. * 0b111001..FTM2 counter init trigger
  24548. */
  24549. #define XBARA_SEL18_SEL36(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL18_SEL36_SHIFT)) & XBARA_SEL18_SEL36_MASK)
  24550. #define XBARA_SEL18_SEL37_MASK (0x3F00U)
  24551. #define XBARA_SEL18_SEL37_SHIFT (8U)
  24552. /*! SEL37
  24553. * 0b000000..Logic zero
  24554. * 0b000001..Logic one
  24555. * 0b000010..XB_IN2 input pin
  24556. * 0b000011..XB_IN3 input pin
  24557. * 0b000100..XB_IN4 input pin
  24558. * 0b000101..XB_IN5 input pin
  24559. * 0b000110..XB_IN6 input pin
  24560. * 0b000111..XB_IN7 input pin
  24561. * 0b001000..XB_IN8 input pin
  24562. * 0b001001..XB_IN9 input pin
  24563. * 0b001010..XB_IN10 input pin
  24564. * 0b001011..XB_IN11 input pin
  24565. * 0b001100..CMP0 Output
  24566. * 0b001101..CMP1 Output
  24567. * 0b001110..CMP2 Output
  24568. * 0b001111..CMP3 Output
  24569. * 0b010000..FTM0 all channels match trigger ORed together
  24570. * 0b010001..FTM0 counter init trigger
  24571. * 0b010010..FTM3 all channels match trigger ORed together
  24572. * 0b010011..FTM3 counter init trigger
  24573. * 0b010100..PWMA channel 0 trigger 0
  24574. * 0b010101..PWMA channel 0 trigger 1
  24575. * 0b010110..PWMA channel 1 trigger 0
  24576. * 0b010111..PWMA channel 1 trigger 1
  24577. * 0b011000..PWMA channel 2 trigger 0
  24578. * 0b011001..PWMA channel 2 trigger 1
  24579. * 0b011010..PWMA channel 3 trigger 0
  24580. * 0b011011..PWMA channel 3 trigger 1
  24581. * 0b011100..PDB0 channel 1 output trigger
  24582. * 0b011101..PDB0 channel 0 output trigger
  24583. * 0b011110..PDB1 channel 1 output trigger
  24584. * 0b011111..PDB1 channel 0 output trigger
  24585. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24586. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24587. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24588. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24589. * 0b100100..FTM1 all channels match trigger ORed together
  24590. * 0b100101..FTM1 counter init trigger
  24591. * 0b100110..DMA channel 0 done
  24592. * 0b100111..DMA channel 1 done
  24593. * 0b101000..DMA channel 6 done
  24594. * 0b101001..DMA channel 7 done
  24595. * 0b101010..PIT trigger 0
  24596. * 0b101011..PIT trigger 1
  24597. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24598. * 0b101101..ENC compare trigger and position match
  24599. * 0b101110..AOI output 0
  24600. * 0b101111..AOI output 1
  24601. * 0b110000..AOI output 2
  24602. * 0b110001..AOI output 3
  24603. * 0b110010..PIT trigger 2
  24604. * 0b110011..PIT trigger 3
  24605. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24606. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24607. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24608. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24609. * 0b111000..FTM2 all channels match trigger ORed together
  24610. * 0b111001..FTM2 counter init trigger
  24611. */
  24612. #define XBARA_SEL18_SEL37(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL18_SEL37_SHIFT)) & XBARA_SEL18_SEL37_MASK)
  24613. /*! @} */
  24614. /*! @name SEL19 - Crossbar A Select Register 19 */
  24615. /*! @{ */
  24616. #define XBARA_SEL19_SEL38_MASK (0x3FU)
  24617. #define XBARA_SEL19_SEL38_SHIFT (0U)
  24618. /*! SEL38
  24619. * 0b000000..Logic zero
  24620. * 0b000001..Logic one
  24621. * 0b000010..XB_IN2 input pin
  24622. * 0b000011..XB_IN3 input pin
  24623. * 0b000100..XB_IN4 input pin
  24624. * 0b000101..XB_IN5 input pin
  24625. * 0b000110..XB_IN6 input pin
  24626. * 0b000111..XB_IN7 input pin
  24627. * 0b001000..XB_IN8 input pin
  24628. * 0b001001..XB_IN9 input pin
  24629. * 0b001010..XB_IN10 input pin
  24630. * 0b001011..XB_IN11 input pin
  24631. * 0b001100..CMP0 Output
  24632. * 0b001101..CMP1 Output
  24633. * 0b001110..CMP2 Output
  24634. * 0b001111..CMP3 Output
  24635. * 0b010000..FTM0 all channels match trigger ORed together
  24636. * 0b010001..FTM0 counter init trigger
  24637. * 0b010010..FTM3 all channels match trigger ORed together
  24638. * 0b010011..FTM3 counter init trigger
  24639. * 0b010100..PWMA channel 0 trigger 0
  24640. * 0b010101..PWMA channel 0 trigger 1
  24641. * 0b010110..PWMA channel 1 trigger 0
  24642. * 0b010111..PWMA channel 1 trigger 1
  24643. * 0b011000..PWMA channel 2 trigger 0
  24644. * 0b011001..PWMA channel 2 trigger 1
  24645. * 0b011010..PWMA channel 3 trigger 0
  24646. * 0b011011..PWMA channel 3 trigger 1
  24647. * 0b011100..PDB0 channel 1 output trigger
  24648. * 0b011101..PDB0 channel 0 output trigger
  24649. * 0b011110..PDB1 channel 1 output trigger
  24650. * 0b011111..PDB1 channel 0 output trigger
  24651. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24652. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24653. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24654. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24655. * 0b100100..FTM1 all channels match trigger ORed together
  24656. * 0b100101..FTM1 counter init trigger
  24657. * 0b100110..DMA channel 0 done
  24658. * 0b100111..DMA channel 1 done
  24659. * 0b101000..DMA channel 6 done
  24660. * 0b101001..DMA channel 7 done
  24661. * 0b101010..PIT trigger 0
  24662. * 0b101011..PIT trigger 1
  24663. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24664. * 0b101101..ENC compare trigger and position match
  24665. * 0b101110..AOI output 0
  24666. * 0b101111..AOI output 1
  24667. * 0b110000..AOI output 2
  24668. * 0b110001..AOI output 3
  24669. * 0b110010..PIT trigger 2
  24670. * 0b110011..PIT trigger 3
  24671. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24672. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24673. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24674. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24675. * 0b111000..FTM2 all channels match trigger ORed together
  24676. * 0b111001..FTM2 counter init trigger
  24677. */
  24678. #define XBARA_SEL19_SEL38(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL19_SEL38_SHIFT)) & XBARA_SEL19_SEL38_MASK)
  24679. #define XBARA_SEL19_SEL39_MASK (0x3F00U)
  24680. #define XBARA_SEL19_SEL39_SHIFT (8U)
  24681. /*! SEL39
  24682. * 0b000000..Logic zero
  24683. * 0b000001..Logic one
  24684. * 0b000010..XB_IN2 input pin
  24685. * 0b000011..XB_IN3 input pin
  24686. * 0b000100..XB_IN4 input pin
  24687. * 0b000101..XB_IN5 input pin
  24688. * 0b000110..XB_IN6 input pin
  24689. * 0b000111..XB_IN7 input pin
  24690. * 0b001000..XB_IN8 input pin
  24691. * 0b001001..XB_IN9 input pin
  24692. * 0b001010..XB_IN10 input pin
  24693. * 0b001011..XB_IN11 input pin
  24694. * 0b001100..CMP0 Output
  24695. * 0b001101..CMP1 Output
  24696. * 0b001110..CMP2 Output
  24697. * 0b001111..CMP3 Output
  24698. * 0b010000..FTM0 all channels match trigger ORed together
  24699. * 0b010001..FTM0 counter init trigger
  24700. * 0b010010..FTM3 all channels match trigger ORed together
  24701. * 0b010011..FTM3 counter init trigger
  24702. * 0b010100..PWMA channel 0 trigger 0
  24703. * 0b010101..PWMA channel 0 trigger 1
  24704. * 0b010110..PWMA channel 1 trigger 0
  24705. * 0b010111..PWMA channel 1 trigger 1
  24706. * 0b011000..PWMA channel 2 trigger 0
  24707. * 0b011001..PWMA channel 2 trigger 1
  24708. * 0b011010..PWMA channel 3 trigger 0
  24709. * 0b011011..PWMA channel 3 trigger 1
  24710. * 0b011100..PDB0 channel 1 output trigger
  24711. * 0b011101..PDB0 channel 0 output trigger
  24712. * 0b011110..PDB1 channel 1 output trigger
  24713. * 0b011111..PDB1 channel 0 output trigger
  24714. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24715. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24716. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24717. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24718. * 0b100100..FTM1 all channels match trigger ORed together
  24719. * 0b100101..FTM1 counter init trigger
  24720. * 0b100110..DMA channel 0 done
  24721. * 0b100111..DMA channel 1 done
  24722. * 0b101000..DMA channel 6 done
  24723. * 0b101001..DMA channel 7 done
  24724. * 0b101010..PIT trigger 0
  24725. * 0b101011..PIT trigger 1
  24726. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24727. * 0b101101..ENC compare trigger and position match
  24728. * 0b101110..AOI output 0
  24729. * 0b101111..AOI output 1
  24730. * 0b110000..AOI output 2
  24731. * 0b110001..AOI output 3
  24732. * 0b110010..PIT trigger 2
  24733. * 0b110011..PIT trigger 3
  24734. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24735. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24736. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24737. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24738. * 0b111000..FTM2 all channels match trigger ORed together
  24739. * 0b111001..FTM2 counter init trigger
  24740. */
  24741. #define XBARA_SEL19_SEL39(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL19_SEL39_SHIFT)) & XBARA_SEL19_SEL39_MASK)
  24742. /*! @} */
  24743. /*! @name SEL20 - Crossbar A Select Register 20 */
  24744. /*! @{ */
  24745. #define XBARA_SEL20_SEL40_MASK (0x3FU)
  24746. #define XBARA_SEL20_SEL40_SHIFT (0U)
  24747. #define XBARA_SEL20_SEL40(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL20_SEL40_SHIFT)) & XBARA_SEL20_SEL40_MASK)
  24748. #define XBARA_SEL20_SEL41_MASK (0x3F00U)
  24749. #define XBARA_SEL20_SEL41_SHIFT (8U)
  24750. /*! SEL41
  24751. * 0b000000..Logic zero
  24752. * 0b000001..Logic one
  24753. * 0b000010..XB_IN2 input pin
  24754. * 0b000011..XB_IN3 input pin
  24755. * 0b000100..XB_IN4 input pin
  24756. * 0b000101..XB_IN5 input pin
  24757. * 0b000110..XB_IN6 input pin
  24758. * 0b000111..XB_IN7 input pin
  24759. * 0b001000..XB_IN8 input pin
  24760. * 0b001001..XB_IN9 input pin
  24761. * 0b001010..XB_IN10 input pin
  24762. * 0b001011..XB_IN11 input pin
  24763. * 0b001100..CMP0 Output
  24764. * 0b001101..CMP1 Output
  24765. * 0b001110..CMP2 Output
  24766. * 0b001111..CMP3 Output
  24767. * 0b010000..FTM0 all channels match trigger ORed together
  24768. * 0b010001..FTM0 counter init trigger
  24769. * 0b010010..FTM3 all channels match trigger ORed together
  24770. * 0b010011..FTM3 counter init trigger
  24771. * 0b010100..PWMA channel 0 trigger 0
  24772. * 0b010101..PWMA channel 0 trigger 1
  24773. * 0b010110..PWMA channel 1 trigger 0
  24774. * 0b010111..PWMA channel 1 trigger 1
  24775. * 0b011000..PWMA channel 2 trigger 0
  24776. * 0b011001..PWMA channel 2 trigger 1
  24777. * 0b011010..PWMA channel 3 trigger 0
  24778. * 0b011011..PWMA channel 3 trigger 1
  24779. * 0b011100..PDB0 channel 1 output trigger
  24780. * 0b011101..PDB0 channel 0 output trigger
  24781. * 0b011110..PDB1 channel 1 output trigger
  24782. * 0b011111..PDB1 channel 0 output trigger
  24783. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24784. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24785. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24786. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24787. * 0b100100..FTM1 all channels match trigger ORed together
  24788. * 0b100101..FTM1 counter init trigger
  24789. * 0b100110..DMA channel 0 done
  24790. * 0b100111..DMA channel 1 done
  24791. * 0b101000..DMA channel 6 done
  24792. * 0b101001..DMA channel 7 done
  24793. * 0b101010..PIT trigger 0
  24794. * 0b101011..PIT trigger 1
  24795. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24796. * 0b101101..ENC compare trigger and position match
  24797. * 0b101110..AOI output 0
  24798. * 0b101111..AOI output 1
  24799. * 0b110000..AOI output 2
  24800. * 0b110001..AOI output 3
  24801. * 0b110010..PIT trigger 2
  24802. * 0b110011..PIT trigger 3
  24803. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24804. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24805. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24806. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24807. * 0b111000..FTM2 all channels match trigger ORed together
  24808. * 0b111001..FTM2 counter init trigger
  24809. */
  24810. #define XBARA_SEL20_SEL41(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL20_SEL41_SHIFT)) & XBARA_SEL20_SEL41_MASK)
  24811. /*! @} */
  24812. /*! @name SEL21 - Crossbar A Select Register 21 */
  24813. /*! @{ */
  24814. #define XBARA_SEL21_SEL42_MASK (0x3FU)
  24815. #define XBARA_SEL21_SEL42_SHIFT (0U)
  24816. /*! SEL42
  24817. * 0b000000..Logic zero
  24818. * 0b000001..Logic one
  24819. * 0b000010..XB_IN2 input pin
  24820. * 0b000011..XB_IN3 input pin
  24821. * 0b000100..XB_IN4 input pin
  24822. * 0b000101..XB_IN5 input pin
  24823. * 0b000110..XB_IN6 input pin
  24824. * 0b000111..XB_IN7 input pin
  24825. * 0b001000..XB_IN8 input pin
  24826. * 0b001001..XB_IN9 input pin
  24827. * 0b001010..XB_IN10 input pin
  24828. * 0b001011..XB_IN11 input pin
  24829. * 0b001100..CMP0 Output
  24830. * 0b001101..CMP1 Output
  24831. * 0b001110..CMP2 Output
  24832. * 0b001111..CMP3 Output
  24833. * 0b010000..FTM0 all channels match trigger ORed together
  24834. * 0b010001..FTM0 counter init trigger
  24835. * 0b010010..FTM3 all channels match trigger ORed together
  24836. * 0b010011..FTM3 counter init trigger
  24837. * 0b010100..PWMA channel 0 trigger 0
  24838. * 0b010101..PWMA channel 0 trigger 1
  24839. * 0b010110..PWMA channel 1 trigger 0
  24840. * 0b010111..PWMA channel 1 trigger 1
  24841. * 0b011000..PWMA channel 2 trigger 0
  24842. * 0b011001..PWMA channel 2 trigger 1
  24843. * 0b011010..PWMA channel 3 trigger 0
  24844. * 0b011011..PWMA channel 3 trigger 1
  24845. * 0b011100..PDB0 channel 1 output trigger
  24846. * 0b011101..PDB0 channel 0 output trigger
  24847. * 0b011110..PDB1 channel 1 output trigger
  24848. * 0b011111..PDB1 channel 0 output trigger
  24849. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24850. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24851. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24852. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24853. * 0b100100..FTM1 all channels match trigger ORed together
  24854. * 0b100101..FTM1 counter init trigger
  24855. * 0b100110..DMA channel 0 done
  24856. * 0b100111..DMA channel 1 done
  24857. * 0b101000..DMA channel 6 done
  24858. * 0b101001..DMA channel 7 done
  24859. * 0b101010..PIT trigger 0
  24860. * 0b101011..PIT trigger 1
  24861. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24862. * 0b101101..ENC compare trigger and position match
  24863. * 0b101110..AOI output 0
  24864. * 0b101111..AOI output 1
  24865. * 0b110000..AOI output 2
  24866. * 0b110001..AOI output 3
  24867. * 0b110010..PIT trigger 2
  24868. * 0b110011..PIT trigger 3
  24869. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24870. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24871. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24872. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24873. * 0b111000..FTM2 all channels match trigger ORed together
  24874. * 0b111001..FTM2 counter init trigger
  24875. */
  24876. #define XBARA_SEL21_SEL42(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL21_SEL42_SHIFT)) & XBARA_SEL21_SEL42_MASK)
  24877. #define XBARA_SEL21_SEL43_MASK (0x3F00U)
  24878. #define XBARA_SEL21_SEL43_SHIFT (8U)
  24879. /*! SEL43
  24880. * 0b000000..Logic zero
  24881. * 0b000001..Logic one
  24882. * 0b000010..XB_IN2 input pin
  24883. * 0b000011..XB_IN3 input pin
  24884. * 0b000100..XB_IN4 input pin
  24885. * 0b000101..XB_IN5 input pin
  24886. * 0b000110..XB_IN6 input pin
  24887. * 0b000111..XB_IN7 input pin
  24888. * 0b001000..XB_IN8 input pin
  24889. * 0b001001..XB_IN9 input pin
  24890. * 0b001010..XB_IN10 input pin
  24891. * 0b001011..XB_IN11 input pin
  24892. * 0b001100..CMP0 Output
  24893. * 0b001101..CMP1 Output
  24894. * 0b001110..CMP2 Output
  24895. * 0b001111..CMP3 Output
  24896. * 0b010000..FTM0 all channels match trigger ORed together
  24897. * 0b010001..FTM0 counter init trigger
  24898. * 0b010010..FTM3 all channels match trigger ORed together
  24899. * 0b010011..FTM3 counter init trigger
  24900. * 0b010100..PWMA channel 0 trigger 0
  24901. * 0b010101..PWMA channel 0 trigger 1
  24902. * 0b010110..PWMA channel 1 trigger 0
  24903. * 0b010111..PWMA channel 1 trigger 1
  24904. * 0b011000..PWMA channel 2 trigger 0
  24905. * 0b011001..PWMA channel 2 trigger 1
  24906. * 0b011010..PWMA channel 3 trigger 0
  24907. * 0b011011..PWMA channel 3 trigger 1
  24908. * 0b011100..PDB0 channel 1 output trigger
  24909. * 0b011101..PDB0 channel 0 output trigger
  24910. * 0b011110..PDB1 channel 1 output trigger
  24911. * 0b011111..PDB1 channel 0 output trigger
  24912. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24913. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24914. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24915. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24916. * 0b100100..FTM1 all channels match trigger ORed together
  24917. * 0b100101..FTM1 counter init trigger
  24918. * 0b100110..DMA channel 0 done
  24919. * 0b100111..DMA channel 1 done
  24920. * 0b101000..DMA channel 6 done
  24921. * 0b101001..DMA channel 7 done
  24922. * 0b101010..PIT trigger 0
  24923. * 0b101011..PIT trigger 1
  24924. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24925. * 0b101101..ENC compare trigger and position match
  24926. * 0b101110..AOI output 0
  24927. * 0b101111..AOI output 1
  24928. * 0b110000..AOI output 2
  24929. * 0b110001..AOI output 3
  24930. * 0b110010..PIT trigger 2
  24931. * 0b110011..PIT trigger 3
  24932. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24933. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  24934. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  24935. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  24936. * 0b111000..FTM2 all channels match trigger ORed together
  24937. * 0b111001..FTM2 counter init trigger
  24938. */
  24939. #define XBARA_SEL21_SEL43(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL21_SEL43_SHIFT)) & XBARA_SEL21_SEL43_MASK)
  24940. /*! @} */
  24941. /*! @name SEL22 - Crossbar A Select Register 22 */
  24942. /*! @{ */
  24943. #define XBARA_SEL22_SEL44_MASK (0x3FU)
  24944. #define XBARA_SEL22_SEL44_SHIFT (0U)
  24945. /*! SEL44
  24946. * 0b000000..Logic zero
  24947. * 0b000001..Logic one
  24948. * 0b000010..XB_IN2 input pin
  24949. * 0b000011..XB_IN3 input pin
  24950. * 0b000100..XB_IN4 input pin
  24951. * 0b000101..XB_IN5 input pin
  24952. * 0b000110..XB_IN6 input pin
  24953. * 0b000111..XB_IN7 input pin
  24954. * 0b001000..XB_IN8 input pin
  24955. * 0b001001..XB_IN9 input pin
  24956. * 0b001010..XB_IN10 input pin
  24957. * 0b001011..XB_IN11 input pin
  24958. * 0b001100..CMP0 Output
  24959. * 0b001101..CMP1 Output
  24960. * 0b001110..CMP2 Output
  24961. * 0b001111..CMP3 Output
  24962. * 0b010000..FTM0 all channels match trigger ORed together
  24963. * 0b010001..FTM0 counter init trigger
  24964. * 0b010010..FTM3 all channels match trigger ORed together
  24965. * 0b010011..FTM3 counter init trigger
  24966. * 0b010100..PWMA channel 0 trigger 0
  24967. * 0b010101..PWMA channel 0 trigger 1
  24968. * 0b010110..PWMA channel 1 trigger 0
  24969. * 0b010111..PWMA channel 1 trigger 1
  24970. * 0b011000..PWMA channel 2 trigger 0
  24971. * 0b011001..PWMA channel 2 trigger 1
  24972. * 0b011010..PWMA channel 3 trigger 0
  24973. * 0b011011..PWMA channel 3 trigger 1
  24974. * 0b011100..PDB0 channel 1 output trigger
  24975. * 0b011101..PDB0 channel 0 output trigger
  24976. * 0b011110..PDB1 channel 1 output trigger
  24977. * 0b011111..PDB1 channel 0 output trigger
  24978. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  24979. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  24980. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  24981. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  24982. * 0b100100..FTM1 all channels match trigger ORed together
  24983. * 0b100101..FTM1 counter init trigger
  24984. * 0b100110..DMA channel 0 done
  24985. * 0b100111..DMA channel 1 done
  24986. * 0b101000..DMA channel 6 done
  24987. * 0b101001..DMA channel 7 done
  24988. * 0b101010..PIT trigger 0
  24989. * 0b101011..PIT trigger 1
  24990. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  24991. * 0b101101..ENC compare trigger and position match
  24992. * 0b101110..AOI output 0
  24993. * 0b101111..AOI output 1
  24994. * 0b110000..AOI output 2
  24995. * 0b110001..AOI output 3
  24996. * 0b110010..PIT trigger 2
  24997. * 0b110011..PIT trigger 3
  24998. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  24999. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25000. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25001. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25002. * 0b111000..FTM2 all channels match trigger ORed together
  25003. * 0b111001..FTM2 counter init trigger
  25004. */
  25005. #define XBARA_SEL22_SEL44(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL22_SEL44_SHIFT)) & XBARA_SEL22_SEL44_MASK)
  25006. #define XBARA_SEL22_SEL45_MASK (0x3F00U)
  25007. #define XBARA_SEL22_SEL45_SHIFT (8U)
  25008. /*! SEL45
  25009. * 0b000000..Logic zero
  25010. * 0b000001..Logic one
  25011. * 0b000010..XB_IN2 input pin
  25012. * 0b000011..XB_IN3 input pin
  25013. * 0b000100..XB_IN4 input pin
  25014. * 0b000101..XB_IN5 input pin
  25015. * 0b000110..XB_IN6 input pin
  25016. * 0b000111..XB_IN7 input pin
  25017. * 0b001000..XB_IN8 input pin
  25018. * 0b001001..XB_IN9 input pin
  25019. * 0b001010..XB_IN10 input pin
  25020. * 0b001011..XB_IN11 input pin
  25021. * 0b001100..CMP0 Output
  25022. * 0b001101..CMP1 Output
  25023. * 0b001110..CMP2 Output
  25024. * 0b001111..CMP3 Output
  25025. * 0b010000..FTM0 all channels match trigger ORed together
  25026. * 0b010001..FTM0 counter init trigger
  25027. * 0b010010..FTM3 all channels match trigger ORed together
  25028. * 0b010011..FTM3 counter init trigger
  25029. * 0b010100..PWMA channel 0 trigger 0
  25030. * 0b010101..PWMA channel 0 trigger 1
  25031. * 0b010110..PWMA channel 1 trigger 0
  25032. * 0b010111..PWMA channel 1 trigger 1
  25033. * 0b011000..PWMA channel 2 trigger 0
  25034. * 0b011001..PWMA channel 2 trigger 1
  25035. * 0b011010..PWMA channel 3 trigger 0
  25036. * 0b011011..PWMA channel 3 trigger 1
  25037. * 0b011100..PDB0 channel 1 output trigger
  25038. * 0b011101..PDB0 channel 0 output trigger
  25039. * 0b011110..PDB1 channel 1 output trigger
  25040. * 0b011111..PDB1 channel 0 output trigger
  25041. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25042. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25043. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25044. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25045. * 0b100100..FTM1 all channels match trigger ORed together
  25046. * 0b100101..FTM1 counter init trigger
  25047. * 0b100110..DMA channel 0 done
  25048. * 0b100111..DMA channel 1 done
  25049. * 0b101000..DMA channel 6 done
  25050. * 0b101001..DMA channel 7 done
  25051. * 0b101010..PIT trigger 0
  25052. * 0b101011..PIT trigger 1
  25053. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25054. * 0b101101..ENC compare trigger and position match
  25055. * 0b101110..AOI output 0
  25056. * 0b101111..AOI output 1
  25057. * 0b110000..AOI output 2
  25058. * 0b110001..AOI output 3
  25059. * 0b110010..PIT trigger 2
  25060. * 0b110011..PIT trigger 3
  25061. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25062. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25063. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25064. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25065. * 0b111000..FTM2 all channels match trigger ORed together
  25066. * 0b111001..FTM2 counter init trigger
  25067. */
  25068. #define XBARA_SEL22_SEL45(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL22_SEL45_SHIFT)) & XBARA_SEL22_SEL45_MASK)
  25069. /*! @} */
  25070. /*! @name SEL23 - Crossbar A Select Register 23 */
  25071. /*! @{ */
  25072. #define XBARA_SEL23_SEL46_MASK (0x3FU)
  25073. #define XBARA_SEL23_SEL46_SHIFT (0U)
  25074. /*! SEL46
  25075. * 0b000000..Logic zero
  25076. * 0b000001..Logic one
  25077. * 0b000010..XB_IN2 input pin
  25078. * 0b000011..XB_IN3 input pin
  25079. * 0b000100..XB_IN4 input pin
  25080. * 0b000101..XB_IN5 input pin
  25081. * 0b000110..XB_IN6 input pin
  25082. * 0b000111..XB_IN7 input pin
  25083. * 0b001000..XB_IN8 input pin
  25084. * 0b001001..XB_IN9 input pin
  25085. * 0b001010..XB_IN10 input pin
  25086. * 0b001011..XB_IN11 input pin
  25087. * 0b001100..CMP0 Output
  25088. * 0b001101..CMP1 Output
  25089. * 0b001110..CMP2 Output
  25090. * 0b001111..CMP3 Output
  25091. * 0b010000..FTM0 all channels match trigger ORed together
  25092. * 0b010001..FTM0 counter init trigger
  25093. * 0b010010..FTM3 all channels match trigger ORed together
  25094. * 0b010011..FTM3 counter init trigger
  25095. * 0b010100..PWMA channel 0 trigger 0
  25096. * 0b010101..PWMA channel 0 trigger 1
  25097. * 0b010110..PWMA channel 1 trigger 0
  25098. * 0b010111..PWMA channel 1 trigger 1
  25099. * 0b011000..PWMA channel 2 trigger 0
  25100. * 0b011001..PWMA channel 2 trigger 1
  25101. * 0b011010..PWMA channel 3 trigger 0
  25102. * 0b011011..PWMA channel 3 trigger 1
  25103. * 0b011100..PDB0 channel 1 output trigger
  25104. * 0b011101..PDB0 channel 0 output trigger
  25105. * 0b011110..PDB1 channel 1 output trigger
  25106. * 0b011111..PDB1 channel 0 output trigger
  25107. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25108. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25109. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25110. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25111. * 0b100100..FTM1 all channels match trigger ORed together
  25112. * 0b100101..FTM1 counter init trigger
  25113. * 0b100110..DMA channel 0 done
  25114. * 0b100111..DMA channel 1 done
  25115. * 0b101000..DMA channel 6 done
  25116. * 0b101001..DMA channel 7 done
  25117. * 0b101010..PIT trigger 0
  25118. * 0b101011..PIT trigger 1
  25119. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25120. * 0b101101..ENC compare trigger and position match
  25121. * 0b101110..AOI output 0
  25122. * 0b101111..AOI output 1
  25123. * 0b110000..AOI output 2
  25124. * 0b110001..AOI output 3
  25125. * 0b110010..PIT trigger 2
  25126. * 0b110011..PIT trigger 3
  25127. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25128. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25129. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25130. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25131. * 0b111000..FTM2 all channels match trigger ORed together
  25132. * 0b111001..FTM2 counter init trigger
  25133. */
  25134. #define XBARA_SEL23_SEL46(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL23_SEL46_SHIFT)) & XBARA_SEL23_SEL46_MASK)
  25135. #define XBARA_SEL23_SEL47_MASK (0x3F00U)
  25136. #define XBARA_SEL23_SEL47_SHIFT (8U)
  25137. /*! SEL47
  25138. * 0b000000..Logic zero
  25139. * 0b000001..Logic one
  25140. * 0b000010..XB_IN2 input pin
  25141. * 0b000011..XB_IN3 input pin
  25142. * 0b000100..XB_IN4 input pin
  25143. * 0b000101..XB_IN5 input pin
  25144. * 0b000110..XB_IN6 input pin
  25145. * 0b000111..XB_IN7 input pin
  25146. * 0b001000..XB_IN8 input pin
  25147. * 0b001001..XB_IN9 input pin
  25148. * 0b001010..XB_IN10 input pin
  25149. * 0b001011..XB_IN11 input pin
  25150. * 0b001100..CMP0 Output
  25151. * 0b001101..CMP1 Output
  25152. * 0b001110..CMP2 Output
  25153. * 0b001111..CMP3 Output
  25154. * 0b010000..FTM0 all channels match trigger ORed together
  25155. * 0b010001..FTM0 counter init trigger
  25156. * 0b010010..FTM3 all channels match trigger ORed together
  25157. * 0b010011..FTM3 counter init trigger
  25158. * 0b010100..PWMA channel 0 trigger 0
  25159. * 0b010101..PWMA channel 0 trigger 1
  25160. * 0b010110..PWMA channel 1 trigger 0
  25161. * 0b010111..PWMA channel 1 trigger 1
  25162. * 0b011000..PWMA channel 2 trigger 0
  25163. * 0b011001..PWMA channel 2 trigger 1
  25164. * 0b011010..PWMA channel 3 trigger 0
  25165. * 0b011011..PWMA channel 3 trigger 1
  25166. * 0b011100..PDB0 channel 1 output trigger
  25167. * 0b011101..PDB0 channel 0 output trigger
  25168. * 0b011110..PDB1 channel 1 output trigger
  25169. * 0b011111..PDB1 channel 0 output trigger
  25170. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25171. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25172. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25173. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25174. * 0b100100..FTM1 all channels match trigger ORed together
  25175. * 0b100101..FTM1 counter init trigger
  25176. * 0b100110..DMA channel 0 done
  25177. * 0b100111..DMA channel 1 done
  25178. * 0b101000..DMA channel 6 done
  25179. * 0b101001..DMA channel 7 done
  25180. * 0b101010..PIT trigger 0
  25181. * 0b101011..PIT trigger 1
  25182. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25183. * 0b101101..ENC compare trigger and position match
  25184. * 0b101110..AOI output 0
  25185. * 0b101111..AOI output 1
  25186. * 0b110000..AOI output 2
  25187. * 0b110001..AOI output 3
  25188. * 0b110010..PIT trigger 2
  25189. * 0b110011..PIT trigger 3
  25190. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25191. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25192. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25193. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25194. * 0b111000..FTM2 all channels match trigger ORed together
  25195. * 0b111001..FTM2 counter init trigger
  25196. */
  25197. #define XBARA_SEL23_SEL47(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL23_SEL47_SHIFT)) & XBARA_SEL23_SEL47_MASK)
  25198. /*! @} */
  25199. /*! @name SEL24 - Crossbar A Select Register 24 */
  25200. /*! @{ */
  25201. #define XBARA_SEL24_SEL48_MASK (0x3FU)
  25202. #define XBARA_SEL24_SEL48_SHIFT (0U)
  25203. /*! SEL48
  25204. * 0b000000..Logic zero
  25205. * 0b000001..Logic one
  25206. * 0b000010..XB_IN2 input pin
  25207. * 0b000011..XB_IN3 input pin
  25208. * 0b000100..XB_IN4 input pin
  25209. * 0b000101..XB_IN5 input pin
  25210. * 0b000110..XB_IN6 input pin
  25211. * 0b000111..XB_IN7 input pin
  25212. * 0b001000..XB_IN8 input pin
  25213. * 0b001001..XB_IN9 input pin
  25214. * 0b001010..XB_IN10 input pin
  25215. * 0b001011..XB_IN11 input pin
  25216. * 0b001100..CMP0 Output
  25217. * 0b001101..CMP1 Output
  25218. * 0b001110..CMP2 Output
  25219. * 0b001111..CMP3 Output
  25220. * 0b010000..FTM0 all channels match trigger ORed together
  25221. * 0b010001..FTM0 counter init trigger
  25222. * 0b010010..FTM3 all channels match trigger ORed together
  25223. * 0b010011..FTM3 counter init trigger
  25224. * 0b010100..PWMA channel 0 trigger 0
  25225. * 0b010101..PWMA channel 0 trigger 1
  25226. * 0b010110..PWMA channel 1 trigger 0
  25227. * 0b010111..PWMA channel 1 trigger 1
  25228. * 0b011000..PWMA channel 2 trigger 0
  25229. * 0b011001..PWMA channel 2 trigger 1
  25230. * 0b011010..PWMA channel 3 trigger 0
  25231. * 0b011011..PWMA channel 3 trigger 1
  25232. * 0b011100..PDB0 channel 1 output trigger
  25233. * 0b011101..PDB0 channel 0 output trigger
  25234. * 0b011110..PDB1 channel 1 output trigger
  25235. * 0b011111..PDB1 channel 0 output trigger
  25236. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25237. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25238. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25239. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25240. * 0b100100..FTM1 all channels match trigger ORed together
  25241. * 0b100101..FTM1 counter init trigger
  25242. * 0b100110..DMA channel 0 done
  25243. * 0b100111..DMA channel 1 done
  25244. * 0b101000..DMA channel 6 done
  25245. * 0b101001..DMA channel 7 done
  25246. * 0b101010..PIT trigger 0
  25247. * 0b101011..PIT trigger 1
  25248. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25249. * 0b101101..ENC compare trigger and position match
  25250. * 0b101110..AOI output 0
  25251. * 0b101111..AOI output 1
  25252. * 0b110000..AOI output 2
  25253. * 0b110001..AOI output 3
  25254. * 0b110010..PIT trigger 2
  25255. * 0b110011..PIT trigger 3
  25256. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25257. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25258. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25259. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25260. * 0b111000..FTM2 all channels match trigger ORed together
  25261. * 0b111001..FTM2 counter init trigger
  25262. */
  25263. #define XBARA_SEL24_SEL48(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL24_SEL48_SHIFT)) & XBARA_SEL24_SEL48_MASK)
  25264. #define XBARA_SEL24_SEL49_MASK (0x3F00U)
  25265. #define XBARA_SEL24_SEL49_SHIFT (8U)
  25266. /*! SEL49
  25267. * 0b000000..Logic zero
  25268. * 0b000001..Logic one
  25269. * 0b000010..XB_IN2 input pin
  25270. * 0b000011..XB_IN3 input pin
  25271. * 0b000100..XB_IN4 input pin
  25272. * 0b000101..XB_IN5 input pin
  25273. * 0b000110..XB_IN6 input pin
  25274. * 0b000111..XB_IN7 input pin
  25275. * 0b001000..XB_IN8 input pin
  25276. * 0b001001..XB_IN9 input pin
  25277. * 0b001010..XB_IN10 input pin
  25278. * 0b001011..XB_IN11 input pin
  25279. * 0b001100..CMP0 Output
  25280. * 0b001101..CMP1 Output
  25281. * 0b001110..CMP2 Output
  25282. * 0b001111..CMP3 Output
  25283. * 0b010000..FTM0 all channels match trigger ORed together
  25284. * 0b010001..FTM0 counter init trigger
  25285. * 0b010010..FTM3 all channels match trigger ORed together
  25286. * 0b010011..FTM3 counter init trigger
  25287. * 0b010100..PWMA channel 0 trigger 0
  25288. * 0b010101..PWMA channel 0 trigger 1
  25289. * 0b010110..PWMA channel 1 trigger 0
  25290. * 0b010111..PWMA channel 1 trigger 1
  25291. * 0b011000..PWMA channel 2 trigger 0
  25292. * 0b011001..PWMA channel 2 trigger 1
  25293. * 0b011010..PWMA channel 3 trigger 0
  25294. * 0b011011..PWMA channel 3 trigger 1
  25295. * 0b011100..PDB0 channel 1 output trigger
  25296. * 0b011101..PDB0 channel 0 output trigger
  25297. * 0b011110..PDB1 channel 1 output trigger
  25298. * 0b011111..PDB1 channel 0 output trigger
  25299. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25300. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25301. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25302. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25303. * 0b100100..FTM1 all channels match trigger ORed together
  25304. * 0b100101..FTM1 counter init trigger
  25305. * 0b100110..DMA channel 0 done
  25306. * 0b100111..DMA channel 1 done
  25307. * 0b101000..DMA channel 6 done
  25308. * 0b101001..DMA channel 7 done
  25309. * 0b101010..PIT trigger 0
  25310. * 0b101011..PIT trigger 1
  25311. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25312. * 0b101101..ENC compare trigger and position match
  25313. * 0b101110..AOI output 0
  25314. * 0b101111..AOI output 1
  25315. * 0b110000..AOI output 2
  25316. * 0b110001..AOI output 3
  25317. * 0b110010..PIT trigger 2
  25318. * 0b110011..PIT trigger 3
  25319. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25320. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25321. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25322. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25323. * 0b111000..FTM2 all channels match trigger ORed together
  25324. * 0b111001..FTM2 counter init trigger
  25325. */
  25326. #define XBARA_SEL24_SEL49(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL24_SEL49_SHIFT)) & XBARA_SEL24_SEL49_MASK)
  25327. /*! @} */
  25328. /*! @name SEL25 - Crossbar A Select Register 25 */
  25329. /*! @{ */
  25330. #define XBARA_SEL25_SEL50_MASK (0x3FU)
  25331. #define XBARA_SEL25_SEL50_SHIFT (0U)
  25332. /*! SEL50
  25333. * 0b000000..Logic zero
  25334. * 0b000001..Logic one
  25335. * 0b000010..XB_IN2 input pin
  25336. * 0b000011..XB_IN3 input pin
  25337. * 0b000100..XB_IN4 input pin
  25338. * 0b000101..XB_IN5 input pin
  25339. * 0b000110..XB_IN6 input pin
  25340. * 0b000111..XB_IN7 input pin
  25341. * 0b001000..XB_IN8 input pin
  25342. * 0b001001..XB_IN9 input pin
  25343. * 0b001010..XB_IN10 input pin
  25344. * 0b001011..XB_IN11 input pin
  25345. * 0b001100..CMP0 Output
  25346. * 0b001101..CMP1 Output
  25347. * 0b001110..CMP2 Output
  25348. * 0b001111..CMP3 Output
  25349. * 0b010000..FTM0 all channels match trigger ORed together
  25350. * 0b010001..FTM0 counter init trigger
  25351. * 0b010010..FTM3 all channels match trigger ORed together
  25352. * 0b010011..FTM3 counter init trigger
  25353. * 0b010100..PWMA channel 0 trigger 0
  25354. * 0b010101..PWMA channel 0 trigger 1
  25355. * 0b010110..PWMA channel 1 trigger 0
  25356. * 0b010111..PWMA channel 1 trigger 1
  25357. * 0b011000..PWMA channel 2 trigger 0
  25358. * 0b011001..PWMA channel 2 trigger 1
  25359. * 0b011010..PWMA channel 3 trigger 0
  25360. * 0b011011..PWMA channel 3 trigger 1
  25361. * 0b011100..PDB0 channel 1 output trigger
  25362. * 0b011101..PDB0 channel 0 output trigger
  25363. * 0b011110..PDB1 channel 1 output trigger
  25364. * 0b011111..PDB1 channel 0 output trigger
  25365. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25366. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25367. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25368. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25369. * 0b100100..FTM1 all channels match trigger ORed together
  25370. * 0b100101..FTM1 counter init trigger
  25371. * 0b100110..DMA channel 0 done
  25372. * 0b100111..DMA channel 1 done
  25373. * 0b101000..DMA channel 6 done
  25374. * 0b101001..DMA channel 7 done
  25375. * 0b101010..PIT trigger 0
  25376. * 0b101011..PIT trigger 1
  25377. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25378. * 0b101101..ENC compare trigger and position match
  25379. * 0b101110..AOI output 0
  25380. * 0b101111..AOI output 1
  25381. * 0b110000..AOI output 2
  25382. * 0b110001..AOI output 3
  25383. * 0b110010..PIT trigger 2
  25384. * 0b110011..PIT trigger 3
  25385. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25386. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25387. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25388. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25389. * 0b111000..FTM2 all channels match trigger ORed together
  25390. * 0b111001..FTM2 counter init trigger
  25391. */
  25392. #define XBARA_SEL25_SEL50(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL25_SEL50_SHIFT)) & XBARA_SEL25_SEL50_MASK)
  25393. #define XBARA_SEL25_SEL51_MASK (0x3F00U)
  25394. #define XBARA_SEL25_SEL51_SHIFT (8U)
  25395. /*! SEL51
  25396. * 0b000000..Logic zero
  25397. * 0b000001..Logic one
  25398. * 0b000010..XB_IN2 input pin
  25399. * 0b000011..XB_IN3 input pin
  25400. * 0b000100..XB_IN4 input pin
  25401. * 0b000101..XB_IN5 input pin
  25402. * 0b000110..XB_IN6 input pin
  25403. * 0b000111..XB_IN7 input pin
  25404. * 0b001000..XB_IN8 input pin
  25405. * 0b001001..XB_IN9 input pin
  25406. * 0b001010..XB_IN10 input pin
  25407. * 0b001011..XB_IN11 input pin
  25408. * 0b001100..CMP0 Output
  25409. * 0b001101..CMP1 Output
  25410. * 0b001110..CMP2 Output
  25411. * 0b001111..CMP3 Output
  25412. * 0b010000..FTM0 all channels match trigger ORed together
  25413. * 0b010001..FTM0 counter init trigger
  25414. * 0b010010..FTM3 all channels match trigger ORed together
  25415. * 0b010011..FTM3 counter init trigger
  25416. * 0b010100..PWMA channel 0 trigger 0
  25417. * 0b010101..PWMA channel 0 trigger 1
  25418. * 0b010110..PWMA channel 1 trigger 0
  25419. * 0b010111..PWMA channel 1 trigger 1
  25420. * 0b011000..PWMA channel 2 trigger 0
  25421. * 0b011001..PWMA channel 2 trigger 1
  25422. * 0b011010..PWMA channel 3 trigger 0
  25423. * 0b011011..PWMA channel 3 trigger 1
  25424. * 0b011100..PDB0 channel 1 output trigger
  25425. * 0b011101..PDB0 channel 0 output trigger
  25426. * 0b011110..PDB1 channel 1 output trigger
  25427. * 0b011111..PDB1 channel 0 output trigger
  25428. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25429. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25430. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25431. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25432. * 0b100100..FTM1 all channels match trigger ORed together
  25433. * 0b100101..FTM1 counter init trigger
  25434. * 0b100110..DMA channel 0 done
  25435. * 0b100111..DMA channel 1 done
  25436. * 0b101000..DMA channel 6 done
  25437. * 0b101001..DMA channel 7 done
  25438. * 0b101010..PIT trigger 0
  25439. * 0b101011..PIT trigger 1
  25440. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25441. * 0b101101..ENC compare trigger and position match
  25442. * 0b101110..AOI output 0
  25443. * 0b101111..AOI output 1
  25444. * 0b110000..AOI output 2
  25445. * 0b110001..AOI output 3
  25446. * 0b110010..PIT trigger 2
  25447. * 0b110011..PIT trigger 3
  25448. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25449. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25450. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25451. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25452. * 0b111000..FTM2 all channels match trigger ORed together
  25453. * 0b111001..FTM2 counter init trigger
  25454. */
  25455. #define XBARA_SEL25_SEL51(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL25_SEL51_SHIFT)) & XBARA_SEL25_SEL51_MASK)
  25456. /*! @} */
  25457. /*! @name SEL26 - Crossbar A Select Register 26 */
  25458. /*! @{ */
  25459. #define XBARA_SEL26_SEL52_MASK (0x3FU)
  25460. #define XBARA_SEL26_SEL52_SHIFT (0U)
  25461. /*! SEL52
  25462. * 0b000000..Logic zero
  25463. * 0b000001..Logic one
  25464. * 0b000010..XB_IN2 input pin
  25465. * 0b000011..XB_IN3 input pin
  25466. * 0b000100..XB_IN4 input pin
  25467. * 0b000101..XB_IN5 input pin
  25468. * 0b000110..XB_IN6 input pin
  25469. * 0b000111..XB_IN7 input pin
  25470. * 0b001000..XB_IN8 input pin
  25471. * 0b001001..XB_IN9 input pin
  25472. * 0b001010..XB_IN10 input pin
  25473. * 0b001011..XB_IN11 input pin
  25474. * 0b001100..CMP0 Output
  25475. * 0b001101..CMP1 Output
  25476. * 0b001110..CMP2 Output
  25477. * 0b001111..CMP3 Output
  25478. * 0b010000..FTM0 all channels match trigger ORed together
  25479. * 0b010001..FTM0 counter init trigger
  25480. * 0b010010..FTM3 all channels match trigger ORed together
  25481. * 0b010011..FTM3 counter init trigger
  25482. * 0b010100..PWMA channel 0 trigger 0
  25483. * 0b010101..PWMA channel 0 trigger 1
  25484. * 0b010110..PWMA channel 1 trigger 0
  25485. * 0b010111..PWMA channel 1 trigger 1
  25486. * 0b011000..PWMA channel 2 trigger 0
  25487. * 0b011001..PWMA channel 2 trigger 1
  25488. * 0b011010..PWMA channel 3 trigger 0
  25489. * 0b011011..PWMA channel 3 trigger 1
  25490. * 0b011100..PDB0 channel 1 output trigger
  25491. * 0b011101..PDB0 channel 0 output trigger
  25492. * 0b011110..PDB1 channel 1 output trigger
  25493. * 0b011111..PDB1 channel 0 output trigger
  25494. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25495. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25496. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25497. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25498. * 0b100100..FTM1 all channels match trigger ORed together
  25499. * 0b100101..FTM1 counter init trigger
  25500. * 0b100110..DMA channel 0 done
  25501. * 0b100111..DMA channel 1 done
  25502. * 0b101000..DMA channel 6 done
  25503. * 0b101001..DMA channel 7 done
  25504. * 0b101010..PIT trigger 0
  25505. * 0b101011..PIT trigger 1
  25506. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25507. * 0b101101..ENC compare trigger and position match
  25508. * 0b101110..AOI output 0
  25509. * 0b101111..AOI output 1
  25510. * 0b110000..AOI output 2
  25511. * 0b110001..AOI output 3
  25512. * 0b110010..PIT trigger 2
  25513. * 0b110011..PIT trigger 3
  25514. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25515. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25516. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25517. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25518. * 0b111000..FTM2 all channels match trigger ORed together
  25519. * 0b111001..FTM2 counter init trigger
  25520. */
  25521. #define XBARA_SEL26_SEL52(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL26_SEL52_SHIFT)) & XBARA_SEL26_SEL52_MASK)
  25522. #define XBARA_SEL26_SEL53_MASK (0x3F00U)
  25523. #define XBARA_SEL26_SEL53_SHIFT (8U)
  25524. /*! SEL53
  25525. * 0b000000..Logic zero
  25526. * 0b000001..Logic one
  25527. * 0b000010..XB_IN2 input pin
  25528. * 0b000011..XB_IN3 input pin
  25529. * 0b000100..XB_IN4 input pin
  25530. * 0b000101..XB_IN5 input pin
  25531. * 0b000110..XB_IN6 input pin
  25532. * 0b000111..XB_IN7 input pin
  25533. * 0b001000..XB_IN8 input pin
  25534. * 0b001001..XB_IN9 input pin
  25535. * 0b001010..XB_IN10 input pin
  25536. * 0b001011..XB_IN11 input pin
  25537. * 0b001100..CMP0 Output
  25538. * 0b001101..CMP1 Output
  25539. * 0b001110..CMP2 Output
  25540. * 0b001111..CMP3 Output
  25541. * 0b010000..FTM0 all channels match trigger ORed together
  25542. * 0b010001..FTM0 counter init trigger
  25543. * 0b010010..FTM3 all channels match trigger ORed together
  25544. * 0b010011..FTM3 counter init trigger
  25545. * 0b010100..PWMA channel 0 trigger 0
  25546. * 0b010101..PWMA channel 0 trigger 1
  25547. * 0b010110..PWMA channel 1 trigger 0
  25548. * 0b010111..PWMA channel 1 trigger 1
  25549. * 0b011000..PWMA channel 2 trigger 0
  25550. * 0b011001..PWMA channel 2 trigger 1
  25551. * 0b011010..PWMA channel 3 trigger 0
  25552. * 0b011011..PWMA channel 3 trigger 1
  25553. * 0b011100..PDB0 channel 1 output trigger
  25554. * 0b011101..PDB0 channel 0 output trigger
  25555. * 0b011110..PDB1 channel 1 output trigger
  25556. * 0b011111..PDB1 channel 0 output trigger
  25557. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25558. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25559. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25560. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25561. * 0b100100..FTM1 all channels match trigger ORed together
  25562. * 0b100101..FTM1 counter init trigger
  25563. * 0b100110..DMA channel 0 done
  25564. * 0b100111..DMA channel 1 done
  25565. * 0b101000..DMA channel 6 done
  25566. * 0b101001..DMA channel 7 done
  25567. * 0b101010..PIT trigger 0
  25568. * 0b101011..PIT trigger 1
  25569. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25570. * 0b101101..ENC compare trigger and position match
  25571. * 0b101110..AOI output 0
  25572. * 0b101111..AOI output 1
  25573. * 0b110000..AOI output 2
  25574. * 0b110001..AOI output 3
  25575. * 0b110010..PIT trigger 2
  25576. * 0b110011..PIT trigger 3
  25577. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25578. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25579. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25580. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25581. * 0b111000..FTM2 all channels match trigger ORed together
  25582. * 0b111001..FTM2 counter init trigger
  25583. */
  25584. #define XBARA_SEL26_SEL53(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL26_SEL53_SHIFT)) & XBARA_SEL26_SEL53_MASK)
  25585. /*! @} */
  25586. /*! @name SEL27 - Crossbar A Select Register 27 */
  25587. /*! @{ */
  25588. #define XBARA_SEL27_SEL54_MASK (0x3FU)
  25589. #define XBARA_SEL27_SEL54_SHIFT (0U)
  25590. /*! SEL54
  25591. * 0b000000..Logic zero
  25592. * 0b000001..Logic one
  25593. * 0b000010..XB_IN2 input pin
  25594. * 0b000011..XB_IN3 input pin
  25595. * 0b000100..XB_IN4 input pin
  25596. * 0b000101..XB_IN5 input pin
  25597. * 0b000110..XB_IN6 input pin
  25598. * 0b000111..XB_IN7 input pin
  25599. * 0b001000..XB_IN8 input pin
  25600. * 0b001001..XB_IN9 input pin
  25601. * 0b001010..XB_IN10 input pin
  25602. * 0b001011..XB_IN11 input pin
  25603. * 0b001100..CMP0 Output
  25604. * 0b001101..CMP1 Output
  25605. * 0b001110..CMP2 Output
  25606. * 0b001111..CMP3 Output
  25607. * 0b010000..FTM0 all channels match trigger ORed together
  25608. * 0b010001..FTM0 counter init trigger
  25609. * 0b010010..FTM3 all channels match trigger ORed together
  25610. * 0b010011..FTM3 counter init trigger
  25611. * 0b010100..PWMA channel 0 trigger 0
  25612. * 0b010101..PWMA channel 0 trigger 1
  25613. * 0b010110..PWMA channel 1 trigger 0
  25614. * 0b010111..PWMA channel 1 trigger 1
  25615. * 0b011000..PWMA channel 2 trigger 0
  25616. * 0b011001..PWMA channel 2 trigger 1
  25617. * 0b011010..PWMA channel 3 trigger 0
  25618. * 0b011011..PWMA channel 3 trigger 1
  25619. * 0b011100..PDB0 channel 1 output trigger
  25620. * 0b011101..PDB0 channel 0 output trigger
  25621. * 0b011110..PDB1 channel 1 output trigger
  25622. * 0b011111..PDB1 channel 0 output trigger
  25623. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25624. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25625. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25626. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25627. * 0b100100..FTM1 all channels match trigger ORed together
  25628. * 0b100101..FTM1 counter init trigger
  25629. * 0b100110..DMA channel 0 done
  25630. * 0b100111..DMA channel 1 done
  25631. * 0b101000..DMA channel 6 done
  25632. * 0b101001..DMA channel 7 done
  25633. * 0b101010..PIT trigger 0
  25634. * 0b101011..PIT trigger 1
  25635. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25636. * 0b101101..ENC compare trigger and position match
  25637. * 0b101110..AOI output 0
  25638. * 0b101111..AOI output 1
  25639. * 0b110000..AOI output 2
  25640. * 0b110001..AOI output 3
  25641. * 0b110010..PIT trigger 2
  25642. * 0b110011..PIT trigger 3
  25643. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25644. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25645. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25646. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25647. * 0b111000..FTM2 all channels match trigger ORed together
  25648. * 0b111001..FTM2 counter init trigger
  25649. */
  25650. #define XBARA_SEL27_SEL54(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL27_SEL54_SHIFT)) & XBARA_SEL27_SEL54_MASK)
  25651. #define XBARA_SEL27_SEL55_MASK (0x3F00U)
  25652. #define XBARA_SEL27_SEL55_SHIFT (8U)
  25653. /*! SEL55
  25654. * 0b000000..Logic zero
  25655. * 0b000001..Logic one
  25656. * 0b000010..XB_IN2 input pin
  25657. * 0b000011..XB_IN3 input pin
  25658. * 0b000100..XB_IN4 input pin
  25659. * 0b000101..XB_IN5 input pin
  25660. * 0b000110..XB_IN6 input pin
  25661. * 0b000111..XB_IN7 input pin
  25662. * 0b001000..XB_IN8 input pin
  25663. * 0b001001..XB_IN9 input pin
  25664. * 0b001010..XB_IN10 input pin
  25665. * 0b001011..XB_IN11 input pin
  25666. * 0b001100..CMP0 Output
  25667. * 0b001101..CMP1 Output
  25668. * 0b001110..CMP2 Output
  25669. * 0b001111..CMP3 Output
  25670. * 0b010000..FTM0 all channels match trigger ORed together
  25671. * 0b010001..FTM0 counter init trigger
  25672. * 0b010010..FTM3 all channels match trigger ORed together
  25673. * 0b010011..FTM3 counter init trigger
  25674. * 0b010100..PWMA channel 0 trigger 0
  25675. * 0b010101..PWMA channel 0 trigger 1
  25676. * 0b010110..PWMA channel 1 trigger 0
  25677. * 0b010111..PWMA channel 1 trigger 1
  25678. * 0b011000..PWMA channel 2 trigger 0
  25679. * 0b011001..PWMA channel 2 trigger 1
  25680. * 0b011010..PWMA channel 3 trigger 0
  25681. * 0b011011..PWMA channel 3 trigger 1
  25682. * 0b011100..PDB0 channel 1 output trigger
  25683. * 0b011101..PDB0 channel 0 output trigger
  25684. * 0b011110..PDB1 channel 1 output trigger
  25685. * 0b011111..PDB1 channel 0 output trigger
  25686. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25687. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25688. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25689. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25690. * 0b100100..FTM1 all channels match trigger ORed together
  25691. * 0b100101..FTM1 counter init trigger
  25692. * 0b100110..DMA channel 0 done
  25693. * 0b100111..DMA channel 1 done
  25694. * 0b101000..DMA channel 6 done
  25695. * 0b101001..DMA channel 7 done
  25696. * 0b101010..PIT trigger 0
  25697. * 0b101011..PIT trigger 1
  25698. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25699. * 0b101101..ENC compare trigger and position match
  25700. * 0b101110..AOI output 0
  25701. * 0b101111..AOI output 1
  25702. * 0b110000..AOI output 2
  25703. * 0b110001..AOI output 3
  25704. * 0b110010..PIT trigger 2
  25705. * 0b110011..PIT trigger 3
  25706. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25707. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25708. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25709. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25710. * 0b111000..FTM2 all channels match trigger ORed together
  25711. * 0b111001..FTM2 counter init trigger
  25712. */
  25713. #define XBARA_SEL27_SEL55(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL27_SEL55_SHIFT)) & XBARA_SEL27_SEL55_MASK)
  25714. /*! @} */
  25715. /*! @name SEL28 - Crossbar A Select Register 28 */
  25716. /*! @{ */
  25717. #define XBARA_SEL28_SEL56_MASK (0x3FU)
  25718. #define XBARA_SEL28_SEL56_SHIFT (0U)
  25719. /*! SEL56
  25720. * 0b000000..Logic zero
  25721. * 0b000001..Logic one
  25722. * 0b000010..XB_IN2 input pin
  25723. * 0b000011..XB_IN3 input pin
  25724. * 0b000100..XB_IN4 input pin
  25725. * 0b000101..XB_IN5 input pin
  25726. * 0b000110..XB_IN6 input pin
  25727. * 0b000111..XB_IN7 input pin
  25728. * 0b001000..XB_IN8 input pin
  25729. * 0b001001..XB_IN9 input pin
  25730. * 0b001010..XB_IN10 input pin
  25731. * 0b001011..XB_IN11 input pin
  25732. * 0b001100..CMP0 Output
  25733. * 0b001101..CMP1 Output
  25734. * 0b001110..CMP2 Output
  25735. * 0b001111..CMP3 Output
  25736. * 0b010000..FTM0 all channels match trigger ORed together
  25737. * 0b010001..FTM0 counter init trigger
  25738. * 0b010010..FTM3 all channels match trigger ORed together
  25739. * 0b010011..FTM3 counter init trigger
  25740. * 0b010100..PWMA channel 0 trigger 0
  25741. * 0b010101..PWMA channel 0 trigger 1
  25742. * 0b010110..PWMA channel 1 trigger 0
  25743. * 0b010111..PWMA channel 1 trigger 1
  25744. * 0b011000..PWMA channel 2 trigger 0
  25745. * 0b011001..PWMA channel 2 trigger 1
  25746. * 0b011010..PWMA channel 3 trigger 0
  25747. * 0b011011..PWMA channel 3 trigger 1
  25748. * 0b011100..PDB0 channel 1 output trigger
  25749. * 0b011101..PDB0 channel 0 output trigger
  25750. * 0b011110..PDB1 channel 1 output trigger
  25751. * 0b011111..PDB1 channel 0 output trigger
  25752. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25753. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25754. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25755. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25756. * 0b100100..FTM1 all channels match trigger ORed together
  25757. * 0b100101..FTM1 counter init trigger
  25758. * 0b100110..DMA channel 0 done
  25759. * 0b100111..DMA channel 1 done
  25760. * 0b101000..DMA channel 6 done
  25761. * 0b101001..DMA channel 7 done
  25762. * 0b101010..PIT trigger 0
  25763. * 0b101011..PIT trigger 1
  25764. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25765. * 0b101101..ENC compare trigger and position match
  25766. * 0b101110..AOI output 0
  25767. * 0b101111..AOI output 1
  25768. * 0b110000..AOI output 2
  25769. * 0b110001..AOI output 3
  25770. * 0b110010..PIT trigger 2
  25771. * 0b110011..PIT trigger 3
  25772. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25773. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25774. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25775. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25776. * 0b111000..FTM2 all channels match trigger ORed together
  25777. * 0b111001..FTM2 counter init trigger
  25778. */
  25779. #define XBARA_SEL28_SEL56(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL28_SEL56_SHIFT)) & XBARA_SEL28_SEL56_MASK)
  25780. #define XBARA_SEL28_SEL57_MASK (0x3F00U)
  25781. #define XBARA_SEL28_SEL57_SHIFT (8U)
  25782. /*! SEL57
  25783. * 0b000000..Logic zero
  25784. * 0b000001..Logic one
  25785. * 0b000010..XB_IN2 input pin
  25786. * 0b000011..XB_IN3 input pin
  25787. * 0b000100..XB_IN4 input pin
  25788. * 0b000101..XB_IN5 input pin
  25789. * 0b000110..XB_IN6 input pin
  25790. * 0b000111..XB_IN7 input pin
  25791. * 0b001000..XB_IN8 input pin
  25792. * 0b001001..XB_IN9 input pin
  25793. * 0b001010..XB_IN10 input pin
  25794. * 0b001011..XB_IN11 input pin
  25795. * 0b001100..CMP0 Output
  25796. * 0b001101..CMP1 Output
  25797. * 0b001110..CMP2 Output
  25798. * 0b001111..CMP3 Output
  25799. * 0b010000..FTM0 all channels match trigger ORed together
  25800. * 0b010001..FTM0 counter init trigger
  25801. * 0b010010..FTM3 all channels match trigger ORed together
  25802. * 0b010011..FTM3 counter init trigger
  25803. * 0b010100..PWMA channel 0 trigger 0
  25804. * 0b010101..PWMA channel 0 trigger 1
  25805. * 0b010110..PWMA channel 1 trigger 0
  25806. * 0b010111..PWMA channel 1 trigger 1
  25807. * 0b011000..PWMA channel 2 trigger 0
  25808. * 0b011001..PWMA channel 2 trigger 1
  25809. * 0b011010..PWMA channel 3 trigger 0
  25810. * 0b011011..PWMA channel 3 trigger 1
  25811. * 0b011100..PDB0 channel 1 output trigger
  25812. * 0b011101..PDB0 channel 0 output trigger
  25813. * 0b011110..PDB1 channel 1 output trigger
  25814. * 0b011111..PDB1 channel 0 output trigger
  25815. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25816. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25817. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25818. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25819. * 0b100100..FTM1 all channels match trigger ORed together
  25820. * 0b100101..FTM1 counter init trigger
  25821. * 0b100110..DMA channel 0 done
  25822. * 0b100111..DMA channel 1 done
  25823. * 0b101000..DMA channel 6 done
  25824. * 0b101001..DMA channel 7 done
  25825. * 0b101010..PIT trigger 0
  25826. * 0b101011..PIT trigger 1
  25827. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25828. * 0b101101..ENC compare trigger and position match
  25829. * 0b101110..AOI output 0
  25830. * 0b101111..AOI output 1
  25831. * 0b110000..AOI output 2
  25832. * 0b110001..AOI output 3
  25833. * 0b110010..PIT trigger 2
  25834. * 0b110011..PIT trigger 3
  25835. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25836. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25837. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25838. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25839. * 0b111000..FTM2 all channels match trigger ORed together
  25840. * 0b111001..FTM2 counter init trigger
  25841. */
  25842. #define XBARA_SEL28_SEL57(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL28_SEL57_SHIFT)) & XBARA_SEL28_SEL57_MASK)
  25843. /*! @} */
  25844. /*! @name SEL29 - Crossbar A Select Register 29 */
  25845. /*! @{ */
  25846. #define XBARA_SEL29_SEL58_MASK (0x3FU)
  25847. #define XBARA_SEL29_SEL58_SHIFT (0U)
  25848. /*! SEL58
  25849. * 0b000000..Logic zero
  25850. * 0b000001..Logic one
  25851. * 0b000010..XB_IN2 input pin
  25852. * 0b000011..XB_IN3 input pin
  25853. * 0b000100..XB_IN4 input pin
  25854. * 0b000101..XB_IN5 input pin
  25855. * 0b000110..XB_IN6 input pin
  25856. * 0b000111..XB_IN7 input pin
  25857. * 0b001000..XB_IN8 input pin
  25858. * 0b001001..XB_IN9 input pin
  25859. * 0b001010..XB_IN10 input pin
  25860. * 0b001011..XB_IN11 input pin
  25861. * 0b001100..CMP0 Output
  25862. * 0b001101..CMP1 Output
  25863. * 0b001110..CMP2 Output
  25864. * 0b001111..CMP3 Output
  25865. * 0b010000..FTM0 all channels match trigger ORed together
  25866. * 0b010001..FTM0 counter init trigger
  25867. * 0b010010..FTM3 all channels match trigger ORed together
  25868. * 0b010011..FTM3 counter init trigger
  25869. * 0b010100..PWMA channel 0 trigger 0
  25870. * 0b010101..PWMA channel 0 trigger 1
  25871. * 0b010110..PWMA channel 1 trigger 0
  25872. * 0b010111..PWMA channel 1 trigger 1
  25873. * 0b011000..PWMA channel 2 trigger 0
  25874. * 0b011001..PWMA channel 2 trigger 1
  25875. * 0b011010..PWMA channel 3 trigger 0
  25876. * 0b011011..PWMA channel 3 trigger 1
  25877. * 0b011100..PDB0 channel 1 output trigger
  25878. * 0b011101..PDB0 channel 0 output trigger
  25879. * 0b011110..PDB1 channel 1 output trigger
  25880. * 0b011111..PDB1 channel 0 output trigger
  25881. * 0b100000..High Speed Analog-to-Digital Converter 1 conversion A complete
  25882. * 0b100001..High Speed Analog-to-Digital Converter 0 conversion A complete
  25883. * 0b100010..High Speed Analog-to-Digital Converter 1 conversion B complete
  25884. * 0b100011..High Speed Analog-to-Digital Converter 0 conversion B complete
  25885. * 0b100100..FTM1 all channels match trigger ORed together
  25886. * 0b100101..FTM1 counter init trigger
  25887. * 0b100110..DMA channel 0 done
  25888. * 0b100111..DMA channel 1 done
  25889. * 0b101000..DMA channel 6 done
  25890. * 0b101001..DMA channel 7 done
  25891. * 0b101010..PIT trigger 0
  25892. * 0b101011..PIT trigger 1
  25893. * 0b101100..Analog-to-Digital Converter 0 conversion complete
  25894. * 0b101101..ENC compare trigger and position match
  25895. * 0b101110..AOI output 0
  25896. * 0b101111..AOI output 1
  25897. * 0b110000..AOI output 2
  25898. * 0b110001..AOI output 3
  25899. * 0b110010..PIT trigger 2
  25900. * 0b110011..PIT trigger 3
  25901. * 0b110100..PWMB channel 0 trigger 0 or trigger 1
  25902. * 0b110101..PWMB channel 1 trigger 0 or trigger 1
  25903. * 0b110110..PWMB channel 2 trigger 0 or trigger 1
  25904. * 0b110111..PWMB channel 3 trigger 0 or trigger 1
  25905. * 0b111000..FTM2 all channels match trigger ORed together
  25906. * 0b111001..FTM2 counter init trigger
  25907. */
  25908. #define XBARA_SEL29_SEL58(x) (((uint16_t)(((uint16_t)(x)) << XBARA_SEL29_SEL58_SHIFT)) & XBARA_SEL29_SEL58_MASK)
  25909. /*! @} */
  25910. /*! @name CTRL0 - Crossbar A Control Register 0 */
  25911. /*! @{ */
  25912. #define XBARA_CTRL0_DEN0_MASK (0x1U)
  25913. #define XBARA_CTRL0_DEN0_SHIFT (0U)
  25914. /*! DEN0 - DMA Enable for XBAR_OUT0
  25915. * 0b0..DMA disabled
  25916. * 0b1..DMA enabled
  25917. */
  25918. #define XBARA_CTRL0_DEN0(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_DEN0_SHIFT)) & XBARA_CTRL0_DEN0_MASK)
  25919. #define XBARA_CTRL0_IEN0_MASK (0x2U)
  25920. #define XBARA_CTRL0_IEN0_SHIFT (1U)
  25921. /*! IEN0 - Interrupt Enable for XBAR_OUT0
  25922. * 0b0..Interrupt disabled
  25923. * 0b1..Interrupt enabled
  25924. */
  25925. #define XBARA_CTRL0_IEN0(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_IEN0_SHIFT)) & XBARA_CTRL0_IEN0_MASK)
  25926. #define XBARA_CTRL0_EDGE0_MASK (0xCU)
  25927. #define XBARA_CTRL0_EDGE0_SHIFT (2U)
  25928. /*! EDGE0 - Active edge for edge detection on XBAR_OUT0
  25929. * 0b00..STS0 never asserts
  25930. * 0b01..STS0 asserts on rising edges of XBAR_OUT0
  25931. * 0b10..STS0 asserts on falling edges of XBAR_OUT0
  25932. * 0b11..STS0 asserts on rising and falling edges of XBAR_OUT0
  25933. */
  25934. #define XBARA_CTRL0_EDGE0(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_EDGE0_SHIFT)) & XBARA_CTRL0_EDGE0_MASK)
  25935. #define XBARA_CTRL0_STS0_MASK (0x10U)
  25936. #define XBARA_CTRL0_STS0_SHIFT (4U)
  25937. /*! STS0 - Edge detection status for XBAR_OUT0
  25938. * 0b0..Active edge not yet detected on XBAR_OUT0
  25939. * 0b1..Active edge detected on XBAR_OUT0
  25940. */
  25941. #define XBARA_CTRL0_STS0(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_STS0_SHIFT)) & XBARA_CTRL0_STS0_MASK)
  25942. #define XBARA_CTRL0_DEN1_MASK (0x100U)
  25943. #define XBARA_CTRL0_DEN1_SHIFT (8U)
  25944. /*! DEN1 - DMA Enable for XBAR_OUT1
  25945. * 0b0..DMA disabled
  25946. * 0b1..DMA enabled
  25947. */
  25948. #define XBARA_CTRL0_DEN1(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_DEN1_SHIFT)) & XBARA_CTRL0_DEN1_MASK)
  25949. #define XBARA_CTRL0_IEN1_MASK (0x200U)
  25950. #define XBARA_CTRL0_IEN1_SHIFT (9U)
  25951. /*! IEN1 - Interrupt Enable for XBAR_OUT1
  25952. * 0b0..Interrupt disabled
  25953. * 0b1..Interrupt enabled
  25954. */
  25955. #define XBARA_CTRL0_IEN1(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_IEN1_SHIFT)) & XBARA_CTRL0_IEN1_MASK)
  25956. #define XBARA_CTRL0_EDGE1_MASK (0xC00U)
  25957. #define XBARA_CTRL0_EDGE1_SHIFT (10U)
  25958. /*! EDGE1 - Active edge for edge detection on XBAR_OUT1
  25959. * 0b00..STS1 never asserts
  25960. * 0b01..STS1 asserts on rising edges of XBAR_OUT1
  25961. * 0b10..STS1 asserts on falling edges of XBAR_OUT1
  25962. * 0b11..STS1 asserts on rising and falling edges of XBAR_OUT1
  25963. */
  25964. #define XBARA_CTRL0_EDGE1(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_EDGE1_SHIFT)) & XBARA_CTRL0_EDGE1_MASK)
  25965. #define XBARA_CTRL0_STS1_MASK (0x1000U)
  25966. #define XBARA_CTRL0_STS1_SHIFT (12U)
  25967. /*! STS1 - Edge detection status for XBAR_OUT1
  25968. * 0b0..Active edge not yet detected on XBAR_OUT1
  25969. * 0b1..Active edge detected on XBAR_OUT1
  25970. */
  25971. #define XBARA_CTRL0_STS1(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL0_STS1_SHIFT)) & XBARA_CTRL0_STS1_MASK)
  25972. /*! @} */
  25973. /*! @name CTRL1 - Crossbar A Control Register 1 */
  25974. /*! @{ */
  25975. #define XBARA_CTRL1_DEN2_MASK (0x1U)
  25976. #define XBARA_CTRL1_DEN2_SHIFT (0U)
  25977. /*! DEN2 - DMA Enable for XBAR_OUT2
  25978. * 0b0..DMA disabled
  25979. * 0b1..DMA enabled
  25980. */
  25981. #define XBARA_CTRL1_DEN2(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_DEN2_SHIFT)) & XBARA_CTRL1_DEN2_MASK)
  25982. #define XBARA_CTRL1_IEN2_MASK (0x2U)
  25983. #define XBARA_CTRL1_IEN2_SHIFT (1U)
  25984. /*! IEN2 - Interrupt Enable for XBAR_OUT2
  25985. * 0b0..Interrupt disabled
  25986. * 0b1..Interrupt enabled
  25987. */
  25988. #define XBARA_CTRL1_IEN2(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_IEN2_SHIFT)) & XBARA_CTRL1_IEN2_MASK)
  25989. #define XBARA_CTRL1_EDGE2_MASK (0xCU)
  25990. #define XBARA_CTRL1_EDGE2_SHIFT (2U)
  25991. /*! EDGE2 - Active edge for edge detection on XBAR_OUT2
  25992. * 0b00..STS2 never asserts
  25993. * 0b01..STS2 asserts on rising edges of XBAR_OUT2
  25994. * 0b10..STS2 asserts on falling edges of XBAR_OUT2
  25995. * 0b11..STS2 asserts on rising and falling edges of XBAR_OUT2
  25996. */
  25997. #define XBARA_CTRL1_EDGE2(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_EDGE2_SHIFT)) & XBARA_CTRL1_EDGE2_MASK)
  25998. #define XBARA_CTRL1_STS2_MASK (0x10U)
  25999. #define XBARA_CTRL1_STS2_SHIFT (4U)
  26000. /*! STS2 - Edge detection status for XBAR_OUT2
  26001. * 0b0..Active edge not yet detected on XBAR_OUT2
  26002. * 0b1..Active edge detected on XBAR_OUT2
  26003. */
  26004. #define XBARA_CTRL1_STS2(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_STS2_SHIFT)) & XBARA_CTRL1_STS2_MASK)
  26005. #define XBARA_CTRL1_DEN3_MASK (0x100U)
  26006. #define XBARA_CTRL1_DEN3_SHIFT (8U)
  26007. /*! DEN3 - DMA Enable for XBAR_OUT3
  26008. * 0b0..DMA disabled
  26009. * 0b1..DMA enabled
  26010. */
  26011. #define XBARA_CTRL1_DEN3(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_DEN3_SHIFT)) & XBARA_CTRL1_DEN3_MASK)
  26012. #define XBARA_CTRL1_IEN3_MASK (0x200U)
  26013. #define XBARA_CTRL1_IEN3_SHIFT (9U)
  26014. /*! IEN3 - Interrupt Enable for XBAR_OUT3
  26015. * 0b0..Interrupt disabled
  26016. * 0b1..Interrupt enabled
  26017. */
  26018. #define XBARA_CTRL1_IEN3(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_IEN3_SHIFT)) & XBARA_CTRL1_IEN3_MASK)
  26019. #define XBARA_CTRL1_EDGE3_MASK (0xC00U)
  26020. #define XBARA_CTRL1_EDGE3_SHIFT (10U)
  26021. /*! EDGE3 - Active edge for edge detection on XBAR_OUT3
  26022. * 0b00..STS3 never asserts
  26023. * 0b01..STS3 asserts on rising edges of XBAR_OUT3
  26024. * 0b10..STS3 asserts on falling edges of XBAR_OUT3
  26025. * 0b11..STS3 asserts on rising and falling edges of XBAR_OUT3
  26026. */
  26027. #define XBARA_CTRL1_EDGE3(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_EDGE3_SHIFT)) & XBARA_CTRL1_EDGE3_MASK)
  26028. #define XBARA_CTRL1_STS3_MASK (0x1000U)
  26029. #define XBARA_CTRL1_STS3_SHIFT (12U)
  26030. /*! STS3 - Edge detection status for XBAR_OUT3
  26031. * 0b0..Active edge not yet detected on XBAR_OUT3
  26032. * 0b1..Active edge detected on XBAR_OUT3
  26033. */
  26034. #define XBARA_CTRL1_STS3(x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRL1_STS3_SHIFT)) & XBARA_CTRL1_STS3_MASK)
  26035. /*! @} */
  26036. /*!
  26037. * @}
  26038. */ /* end of group XBARA_Register_Masks */
  26039. /* XBARA - Peripheral instance base addresses */
  26040. /** Peripheral XBARA base address */
  26041. #define XBARA_BASE (0x40059000u)
  26042. /** Peripheral XBARA base pointer */
  26043. #define XBARA ((XBARA_Type *)XBARA_BASE)
  26044. /** Array initializer of XBARA peripheral base addresses */
  26045. #define XBARA_BASE_ADDRS { XBARA_BASE }
  26046. /** Array initializer of XBARA peripheral base pointers */
  26047. #define XBARA_BASE_PTRS { XBARA }
  26048. /** Interrupt vectors for the XBARA peripheral type */
  26049. #define XBARA_IRQS { XBARA_IRQn }
  26050. /*!
  26051. * @}
  26052. */ /* end of group XBARA_Peripheral_Access_Layer */
  26053. /* ----------------------------------------------------------------------------
  26054. -- XBARB Peripheral Access Layer
  26055. ---------------------------------------------------------------------------- */
  26056. /*!
  26057. * @addtogroup XBARB_Peripheral_Access_Layer XBARB Peripheral Access Layer
  26058. * @{
  26059. */
  26060. /** XBARB - Register Layout Typedef */
  26061. typedef struct {
  26062. __IO uint16_t SEL0; /**< Crossbar B Select Register 0, offset: 0x0 */
  26063. __IO uint16_t SEL1; /**< Crossbar B Select Register 1, offset: 0x2 */
  26064. __IO uint16_t SEL2; /**< Crossbar B Select Register 2, offset: 0x4 */
  26065. __IO uint16_t SEL3; /**< Crossbar B Select Register 3, offset: 0x6 */
  26066. __IO uint16_t SEL4; /**< Crossbar B Select Register 4, offset: 0x8 */
  26067. __IO uint16_t SEL5; /**< Crossbar B Select Register 5, offset: 0xA */
  26068. __IO uint16_t SEL6; /**< Crossbar B Select Register 6, offset: 0xC */
  26069. __IO uint16_t SEL7; /**< Crossbar B Select Register 7, offset: 0xE */
  26070. } XBARB_Type;
  26071. /* ----------------------------------------------------------------------------
  26072. -- XBARB Register Masks
  26073. ---------------------------------------------------------------------------- */
  26074. /*!
  26075. * @addtogroup XBARB_Register_Masks XBARB Register Masks
  26076. * @{
  26077. */
  26078. /*! @name SEL0 - Crossbar B Select Register 0 */
  26079. /*! @{ */
  26080. #define XBARB_SEL0_SEL0_MASK (0x3FU)
  26081. #define XBARB_SEL0_SEL0_SHIFT (0U)
  26082. /*! SEL0
  26083. * 0b000000..CMP0 Output
  26084. * 0b000001..CMP1 Output
  26085. * 0b000010..CMP2 Output
  26086. * 0b000011..CMP3 Output
  26087. * 0b000100..FTM0 all channels match trigger ORed together
  26088. * 0b000101..FTM0 counter init trigger
  26089. * 0b000110..FTM3 all channels match trigger ORed together
  26090. * 0b000111..FTM3 counter init trigger
  26091. * 0b001000..PWMA channel 0 trigger 0
  26092. * 0b001001..PWMA channel 1 trigger 0
  26093. * 0b001010..PWMA channel 2 trigger 0
  26094. * 0b001011..PWMA channel 3 trigger 0
  26095. * 0b001100..PDB0 channel 0 output trigger
  26096. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26097. * 0b001110..XB_IN2 input pin
  26098. * 0b001111..XB_IN3 input pin
  26099. * 0b010000..FTM1 all channels match trigger ORed together
  26100. * 0b010001..FTM1 counter init trigger
  26101. * 0b010010..DMA channel 0 done
  26102. * 0b010011..DMA channel 1 done
  26103. * 0b010100..XB_IN10 input pin
  26104. * 0b010101..XB_IN11 input pin
  26105. * 0b010110..DMA channel 6 done
  26106. * 0b010111..DMA channel 7 done
  26107. * 0b011000..PIT trigger 0
  26108. * 0b011001..PIT trigger 1
  26109. * 0b011010..PDB1 channel 0 output trigger
  26110. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26111. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26112. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26113. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26114. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26115. * 0b100000..FTM2 all channels match trigger ORed together
  26116. * 0b100001..FTM2 counter init trigger
  26117. * 0b100010..PDB0 channel 1 output trigger
  26118. * 0b100011..PDB1 channel 1 output trigger
  26119. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26120. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26121. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26122. */
  26123. #define XBARB_SEL0_SEL0(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL0_SEL0_SHIFT)) & XBARB_SEL0_SEL0_MASK)
  26124. #define XBARB_SEL0_SEL1_MASK (0x3F00U)
  26125. #define XBARB_SEL0_SEL1_SHIFT (8U)
  26126. /*! SEL1
  26127. * 0b000000..CMP0 Output
  26128. * 0b000001..CMP1 Output
  26129. * 0b000010..CMP2 Output
  26130. * 0b000011..CMP3 Output
  26131. * 0b000100..FTM0 all channels match trigger ORed together
  26132. * 0b000101..FTM0 counter init trigger
  26133. * 0b000110..FTM3 all channels match trigger ORed together
  26134. * 0b000111..FTM3 counter init trigger
  26135. * 0b001000..PWMA channel 0 trigger 0
  26136. * 0b001001..PWMA channel 1 trigger 0
  26137. * 0b001010..PWMA channel 2 trigger 0
  26138. * 0b001011..PWMA channel 3 trigger 0
  26139. * 0b001100..PDB0 channel 0 output trigger
  26140. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26141. * 0b001110..XB_IN2 input pin
  26142. * 0b001111..XB_IN3 input pin
  26143. * 0b010000..FTM1 all channels match trigger ORed together
  26144. * 0b010001..FTM1 counter init trigger
  26145. * 0b010010..DMA channel 0 done
  26146. * 0b010011..DMA channel 1 done
  26147. * 0b010100..XB_IN10 input pin
  26148. * 0b010101..XB_IN11 input pin
  26149. * 0b010110..DMA channel 6 done
  26150. * 0b010111..DMA channel 7 done
  26151. * 0b011000..PIT trigger 0
  26152. * 0b011001..PIT trigger 1
  26153. * 0b011010..PDB1 channel 0 output trigger
  26154. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26155. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26156. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26157. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26158. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26159. * 0b100000..FTM2 all channels match trigger ORed together
  26160. * 0b100001..FTM2 counter init trigger
  26161. * 0b100010..PDB0 channel 1 output trigger
  26162. * 0b100011..PDB1 channel 1 output trigger
  26163. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26164. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26165. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26166. */
  26167. #define XBARB_SEL0_SEL1(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL0_SEL1_SHIFT)) & XBARB_SEL0_SEL1_MASK)
  26168. /*! @} */
  26169. /*! @name SEL1 - Crossbar B Select Register 1 */
  26170. /*! @{ */
  26171. #define XBARB_SEL1_SEL2_MASK (0x3FU)
  26172. #define XBARB_SEL1_SEL2_SHIFT (0U)
  26173. /*! SEL2
  26174. * 0b000000..CMP0 Output
  26175. * 0b000001..CMP1 Output
  26176. * 0b000010..CMP2 Output
  26177. * 0b000011..CMP3 Output
  26178. * 0b000100..FTM0 all channels match trigger ORed together
  26179. * 0b000101..FTM0 counter init trigger
  26180. * 0b000110..FTM3 all channels match trigger ORed together
  26181. * 0b000111..FTM3 counter init trigger
  26182. * 0b001000..PWMA channel 0 trigger 0
  26183. * 0b001001..PWMA channel 1 trigger 0
  26184. * 0b001010..PWMA channel 2 trigger 0
  26185. * 0b001011..PWMA channel 3 trigger 0
  26186. * 0b001100..PDB0 channel 0 output trigger
  26187. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26188. * 0b001110..XB_IN2 input pin
  26189. * 0b001111..XB_IN3 input pin
  26190. * 0b010000..FTM1 all channels match trigger ORed together
  26191. * 0b010001..FTM1 counter init trigger
  26192. * 0b010010..DMA channel 0 done
  26193. * 0b010011..DMA channel 1 done
  26194. * 0b010100..XB_IN10 input pin
  26195. * 0b010101..XB_IN11 input pin
  26196. * 0b010110..DMA channel 6 done
  26197. * 0b010111..DMA channel 7 done
  26198. * 0b011000..PIT trigger 0
  26199. * 0b011001..PIT trigger 1
  26200. * 0b011010..PDB1 channel 0 output trigger
  26201. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26202. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26203. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26204. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26205. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26206. * 0b100000..FTM2 all channels match trigger ORed together
  26207. * 0b100001..FTM2 counter init trigger
  26208. * 0b100010..PDB0 channel 1 output trigger
  26209. * 0b100011..PDB1 channel 1 output trigger
  26210. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26211. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26212. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26213. */
  26214. #define XBARB_SEL1_SEL2(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL1_SEL2_SHIFT)) & XBARB_SEL1_SEL2_MASK)
  26215. #define XBARB_SEL1_SEL3_MASK (0x3F00U)
  26216. #define XBARB_SEL1_SEL3_SHIFT (8U)
  26217. /*! SEL3
  26218. * 0b000000..CMP0 Output
  26219. * 0b000001..CMP1 Output
  26220. * 0b000010..CMP2 Output
  26221. * 0b000011..CMP3 Output
  26222. * 0b000100..FTM0 all channels match trigger ORed together
  26223. * 0b000101..FTM0 counter init trigger
  26224. * 0b000110..FTM3 all channels match trigger ORed together
  26225. * 0b000111..FTM3 counter init trigger
  26226. * 0b001000..PWMA channel 0 trigger 0
  26227. * 0b001001..PWMA channel 1 trigger 0
  26228. * 0b001010..PWMA channel 2 trigger 0
  26229. * 0b001011..PWMA channel 3 trigger 0
  26230. * 0b001100..PDB0 channel 0 output trigger
  26231. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26232. * 0b001110..XB_IN2 input pin
  26233. * 0b001111..XB_IN3 input pin
  26234. * 0b010000..FTM1 all channels match trigger ORed together
  26235. * 0b010001..FTM1 counter init trigger
  26236. * 0b010010..DMA channel 0 done
  26237. * 0b010011..DMA channel 1 done
  26238. * 0b010100..XB_IN10 input pin
  26239. * 0b010101..XB_IN11 input pin
  26240. * 0b010110..DMA channel 6 done
  26241. * 0b010111..DMA channel 7 done
  26242. * 0b011000..PIT trigger 0
  26243. * 0b011001..PIT trigger 1
  26244. * 0b011010..PDB1 channel 0 output trigger
  26245. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26246. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26247. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26248. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26249. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26250. * 0b100000..FTM2 all channels match trigger ORed together
  26251. * 0b100001..FTM2 counter init trigger
  26252. * 0b100010..PDB0 channel 1 output trigger
  26253. * 0b100011..PDB1 channel 1 output trigger
  26254. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26255. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26256. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26257. */
  26258. #define XBARB_SEL1_SEL3(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL1_SEL3_SHIFT)) & XBARB_SEL1_SEL3_MASK)
  26259. /*! @} */
  26260. /*! @name SEL2 - Crossbar B Select Register 2 */
  26261. /*! @{ */
  26262. #define XBARB_SEL2_SEL4_MASK (0x3FU)
  26263. #define XBARB_SEL2_SEL4_SHIFT (0U)
  26264. /*! SEL4
  26265. * 0b000000..CMP0 Output
  26266. * 0b000001..CMP1 Output
  26267. * 0b000010..CMP2 Output
  26268. * 0b000011..CMP3 Output
  26269. * 0b000100..FTM0 all channels match trigger ORed together
  26270. * 0b000101..FTM0 counter init trigger
  26271. * 0b000110..FTM3 all channels match trigger ORed together
  26272. * 0b000111..FTM3 counter init trigger
  26273. * 0b001000..PWMA channel 0 trigger 0
  26274. * 0b001001..PWMA channel 1 trigger 0
  26275. * 0b001010..PWMA channel 2 trigger 0
  26276. * 0b001011..PWMA channel 3 trigger 0
  26277. * 0b001100..PDB0 channel 0 output trigger
  26278. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26279. * 0b001110..XB_IN2 input pin
  26280. * 0b001111..XB_IN3 input pin
  26281. * 0b010000..FTM1 all channels match trigger ORed together
  26282. * 0b010001..FTM1 counter init trigger
  26283. * 0b010010..DMA channel 0 done
  26284. * 0b010011..DMA channel 1 done
  26285. * 0b010100..XB_IN10 input pin
  26286. * 0b010101..XB_IN11 input pin
  26287. * 0b010110..DMA channel 6 done
  26288. * 0b010111..DMA channel 7 done
  26289. * 0b011000..PIT trigger 0
  26290. * 0b011001..PIT trigger 1
  26291. * 0b011010..PDB1 channel 0 output trigger
  26292. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26293. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26294. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26295. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26296. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26297. * 0b100000..FTM2 all channels match trigger ORed together
  26298. * 0b100001..FTM2 counter init trigger
  26299. * 0b100010..PDB0 channel 1 output trigger
  26300. * 0b100011..PDB1 channel 1 output trigger
  26301. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26302. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26303. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26304. */
  26305. #define XBARB_SEL2_SEL4(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL2_SEL4_SHIFT)) & XBARB_SEL2_SEL4_MASK)
  26306. #define XBARB_SEL2_SEL5_MASK (0x3F00U)
  26307. #define XBARB_SEL2_SEL5_SHIFT (8U)
  26308. /*! SEL5
  26309. * 0b000000..CMP0 Output
  26310. * 0b000001..CMP1 Output
  26311. * 0b000010..CMP2 Output
  26312. * 0b000011..CMP3 Output
  26313. * 0b000100..FTM0 all channels match trigger ORed together
  26314. * 0b000101..FTM0 counter init trigger
  26315. * 0b000110..FTM3 all channels match trigger ORed together
  26316. * 0b000111..FTM3 counter init trigger
  26317. * 0b001000..PWMA channel 0 trigger 0
  26318. * 0b001001..PWMA channel 1 trigger 0
  26319. * 0b001010..PWMA channel 2 trigger 0
  26320. * 0b001011..PWMA channel 3 trigger 0
  26321. * 0b001100..PDB0 channel 0 output trigger
  26322. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26323. * 0b001110..XB_IN2 input pin
  26324. * 0b001111..XB_IN3 input pin
  26325. * 0b010000..FTM1 all channels match trigger ORed together
  26326. * 0b010001..FTM1 counter init trigger
  26327. * 0b010010..DMA channel 0 done
  26328. * 0b010011..DMA channel 1 done
  26329. * 0b010100..XB_IN10 input pin
  26330. * 0b010101..XB_IN11 input pin
  26331. * 0b010110..DMA channel 6 done
  26332. * 0b010111..DMA channel 7 done
  26333. * 0b011000..PIT trigger 0
  26334. * 0b011001..PIT trigger 1
  26335. * 0b011010..PDB1 channel 0 output trigger
  26336. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26337. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26338. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26339. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26340. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26341. * 0b100000..FTM2 all channels match trigger ORed together
  26342. * 0b100001..FTM2 counter init trigger
  26343. * 0b100010..PDB0 channel 1 output trigger
  26344. * 0b100011..PDB1 channel 1 output trigger
  26345. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26346. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26347. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26348. */
  26349. #define XBARB_SEL2_SEL5(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL2_SEL5_SHIFT)) & XBARB_SEL2_SEL5_MASK)
  26350. /*! @} */
  26351. /*! @name SEL3 - Crossbar B Select Register 3 */
  26352. /*! @{ */
  26353. #define XBARB_SEL3_SEL6_MASK (0x3FU)
  26354. #define XBARB_SEL3_SEL6_SHIFT (0U)
  26355. /*! SEL6
  26356. * 0b000000..CMP0 Output
  26357. * 0b000001..CMP1 Output
  26358. * 0b000010..CMP2 Output
  26359. * 0b000011..CMP3 Output
  26360. * 0b000100..FTM0 all channels match trigger ORed together
  26361. * 0b000101..FTM0 counter init trigger
  26362. * 0b000110..FTM3 all channels match trigger ORed together
  26363. * 0b000111..FTM3 counter init trigger
  26364. * 0b001000..PWMA channel 0 trigger 0
  26365. * 0b001001..PWMA channel 1 trigger 0
  26366. * 0b001010..PWMA channel 2 trigger 0
  26367. * 0b001011..PWMA channel 3 trigger 0
  26368. * 0b001100..PDB0 channel 0 output trigger
  26369. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26370. * 0b001110..XB_IN2 input pin
  26371. * 0b001111..XB_IN3 input pin
  26372. * 0b010000..FTM1 all channels match trigger ORed together
  26373. * 0b010001..FTM1 counter init trigger
  26374. * 0b010010..DMA channel 0 done
  26375. * 0b010011..DMA channel 1 done
  26376. * 0b010100..XB_IN10 input pin
  26377. * 0b010101..XB_IN11 input pin
  26378. * 0b010110..DMA channel 6 done
  26379. * 0b010111..DMA channel 7 done
  26380. * 0b011000..PIT trigger 0
  26381. * 0b011001..PIT trigger 1
  26382. * 0b011010..PDB1 channel 0 output trigger
  26383. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26384. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26385. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26386. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26387. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26388. * 0b100000..FTM2 all channels match trigger ORed together
  26389. * 0b100001..FTM2 counter init trigger
  26390. * 0b100010..PDB0 channel 1 output trigger
  26391. * 0b100011..PDB1 channel 1 output trigger
  26392. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26393. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26394. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26395. */
  26396. #define XBARB_SEL3_SEL6(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL3_SEL6_SHIFT)) & XBARB_SEL3_SEL6_MASK)
  26397. #define XBARB_SEL3_SEL7_MASK (0x3F00U)
  26398. #define XBARB_SEL3_SEL7_SHIFT (8U)
  26399. /*! SEL7
  26400. * 0b000000..CMP0 Output
  26401. * 0b000001..CMP1 Output
  26402. * 0b000010..CMP2 Output
  26403. * 0b000011..CMP3 Output
  26404. * 0b000100..FTM0 all channels match trigger ORed together
  26405. * 0b000101..FTM0 counter init trigger
  26406. * 0b000110..FTM3 all channels match trigger ORed together
  26407. * 0b000111..FTM3 counter init trigger
  26408. * 0b001000..PWMA channel 0 trigger 0
  26409. * 0b001001..PWMA channel 1 trigger 0
  26410. * 0b001010..PWMA channel 2 trigger 0
  26411. * 0b001011..PWMA channel 3 trigger 0
  26412. * 0b001100..PDB0 channel 0 output trigger
  26413. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26414. * 0b001110..XB_IN2 input pin
  26415. * 0b001111..XB_IN3 input pin
  26416. * 0b010000..FTM1 all channels match trigger ORed together
  26417. * 0b010001..FTM1 counter init trigger
  26418. * 0b010010..DMA channel 0 done
  26419. * 0b010011..DMA channel 1 done
  26420. * 0b010100..XB_IN10 input pin
  26421. * 0b010101..XB_IN11 input pin
  26422. * 0b010110..DMA channel 6 done
  26423. * 0b010111..DMA channel 7 done
  26424. * 0b011000..PIT trigger 0
  26425. * 0b011001..PIT trigger 1
  26426. * 0b011010..PDB1 channel 0 output trigger
  26427. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26428. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26429. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26430. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26431. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26432. * 0b100000..FTM2 all channels match trigger ORed together
  26433. * 0b100001..FTM2 counter init trigger
  26434. * 0b100010..PDB0 channel 1 output trigger
  26435. * 0b100011..PDB1 channel 1 output trigger
  26436. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26437. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26438. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26439. */
  26440. #define XBARB_SEL3_SEL7(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL3_SEL7_SHIFT)) & XBARB_SEL3_SEL7_MASK)
  26441. /*! @} */
  26442. /*! @name SEL4 - Crossbar B Select Register 4 */
  26443. /*! @{ */
  26444. #define XBARB_SEL4_SEL8_MASK (0x3FU)
  26445. #define XBARB_SEL4_SEL8_SHIFT (0U)
  26446. /*! SEL8
  26447. * 0b000000..CMP0 Output
  26448. * 0b000001..CMP1 Output
  26449. * 0b000010..CMP2 Output
  26450. * 0b000011..CMP3 Output
  26451. * 0b000100..FTM0 all channels match trigger ORed together
  26452. * 0b000101..FTM0 counter init trigger
  26453. * 0b000110..FTM3 all channels match trigger ORed together
  26454. * 0b000111..FTM3 counter init trigger
  26455. * 0b001000..PWMA channel 0 trigger 0
  26456. * 0b001001..PWMA channel 1 trigger 0
  26457. * 0b001010..PWMA channel 2 trigger 0
  26458. * 0b001011..PWMA channel 3 trigger 0
  26459. * 0b001100..PDB0 channel 0 output trigger
  26460. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26461. * 0b001110..XB_IN2 input pin
  26462. * 0b001111..XB_IN3 input pin
  26463. * 0b010000..FTM1 all channels match trigger ORed together
  26464. * 0b010001..FTM1 counter init trigger
  26465. * 0b010010..DMA channel 0 done
  26466. * 0b010011..DMA channel 1 done
  26467. * 0b010100..XB_IN10 input pin
  26468. * 0b010101..XB_IN11 input pin
  26469. * 0b010110..DMA channel 6 done
  26470. * 0b010111..DMA channel 7 done
  26471. * 0b011000..PIT trigger 0
  26472. * 0b011001..PIT trigger 1
  26473. * 0b011010..PDB1 channel 0 output trigger
  26474. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26475. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26476. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26477. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26478. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26479. * 0b100000..FTM2 all channels match trigger ORed together
  26480. * 0b100001..FTM2 counter init trigger
  26481. * 0b100010..PDB0 channel 1 output trigger
  26482. * 0b100011..PDB1 channel 1 output trigger
  26483. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26484. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26485. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26486. */
  26487. #define XBARB_SEL4_SEL8(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL4_SEL8_SHIFT)) & XBARB_SEL4_SEL8_MASK)
  26488. #define XBARB_SEL4_SEL9_MASK (0x3F00U)
  26489. #define XBARB_SEL4_SEL9_SHIFT (8U)
  26490. /*! SEL9
  26491. * 0b000000..CMP0 Output
  26492. * 0b000001..CMP1 Output
  26493. * 0b000010..CMP2 Output
  26494. * 0b000011..CMP3 Output
  26495. * 0b000100..FTM0 all channels match trigger ORed together
  26496. * 0b000101..FTM0 counter init trigger
  26497. * 0b000110..FTM3 all channels match trigger ORed together
  26498. * 0b000111..FTM3 counter init trigger
  26499. * 0b001000..PWMA channel 0 trigger 0
  26500. * 0b001001..PWMA channel 1 trigger 0
  26501. * 0b001010..PWMA channel 2 trigger 0
  26502. * 0b001011..PWMA channel 3 trigger 0
  26503. * 0b001100..PDB0 channel 0 output trigger
  26504. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26505. * 0b001110..XB_IN2 input pin
  26506. * 0b001111..XB_IN3 input pin
  26507. * 0b010000..FTM1 all channels match trigger ORed together
  26508. * 0b010001..FTM1 counter init trigger
  26509. * 0b010010..DMA channel 0 done
  26510. * 0b010011..DMA channel 1 done
  26511. * 0b010100..XB_IN10 input pin
  26512. * 0b010101..XB_IN11 input pin
  26513. * 0b010110..DMA channel 6 done
  26514. * 0b010111..DMA channel 7 done
  26515. * 0b011000..PIT trigger 0
  26516. * 0b011001..PIT trigger 1
  26517. * 0b011010..PDB1 channel 0 output trigger
  26518. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26519. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26520. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26521. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26522. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26523. * 0b100000..FTM2 all channels match trigger ORed together
  26524. * 0b100001..FTM2 counter init trigger
  26525. * 0b100010..PDB0 channel 1 output trigger
  26526. * 0b100011..PDB1 channel 1 output trigger
  26527. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26528. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26529. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26530. */
  26531. #define XBARB_SEL4_SEL9(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL4_SEL9_SHIFT)) & XBARB_SEL4_SEL9_MASK)
  26532. /*! @} */
  26533. /*! @name SEL5 - Crossbar B Select Register 5 */
  26534. /*! @{ */
  26535. #define XBARB_SEL5_SEL10_MASK (0x3FU)
  26536. #define XBARB_SEL5_SEL10_SHIFT (0U)
  26537. /*! SEL10
  26538. * 0b000000..CMP0 Output
  26539. * 0b000001..CMP1 Output
  26540. * 0b000010..CMP2 Output
  26541. * 0b000011..CMP3 Output
  26542. * 0b000100..FTM0 all channels match trigger ORed together
  26543. * 0b000101..FTM0 counter init trigger
  26544. * 0b000110..FTM3 all channels match trigger ORed together
  26545. * 0b000111..FTM3 counter init trigger
  26546. * 0b001000..PWMA channel 0 trigger 0
  26547. * 0b001001..PWMA channel 1 trigger 0
  26548. * 0b001010..PWMA channel 2 trigger 0
  26549. * 0b001011..PWMA channel 3 trigger 0
  26550. * 0b001100..PDB0 channel 0 output trigger
  26551. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26552. * 0b001110..XB_IN2 input pin
  26553. * 0b001111..XB_IN3 input pin
  26554. * 0b010000..FTM1 all channels match trigger ORed together
  26555. * 0b010001..FTM1 counter init trigger
  26556. * 0b010010..DMA channel 0 done
  26557. * 0b010011..DMA channel 1 done
  26558. * 0b010100..XB_IN10 input pin
  26559. * 0b010101..XB_IN11 input pin
  26560. * 0b010110..DMA channel 6 done
  26561. * 0b010111..DMA channel 7 done
  26562. * 0b011000..PIT trigger 0
  26563. * 0b011001..PIT trigger 1
  26564. * 0b011010..PDB1 channel 0 output trigger
  26565. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26566. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26567. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26568. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26569. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26570. * 0b100000..FTM2 all channels match trigger ORed together
  26571. * 0b100001..FTM2 counter init trigger
  26572. * 0b100010..PDB0 channel 1 output trigger
  26573. * 0b100011..PDB1 channel 1 output trigger
  26574. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26575. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26576. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26577. */
  26578. #define XBARB_SEL5_SEL10(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL5_SEL10_SHIFT)) & XBARB_SEL5_SEL10_MASK)
  26579. #define XBARB_SEL5_SEL11_MASK (0x3F00U)
  26580. #define XBARB_SEL5_SEL11_SHIFT (8U)
  26581. /*! SEL11
  26582. * 0b000000..CMP0 Output
  26583. * 0b000001..CMP1 Output
  26584. * 0b000010..CMP2 Output
  26585. * 0b000011..CMP3 Output
  26586. * 0b000100..FTM0 all channels match trigger ORed together
  26587. * 0b000101..FTM0 counter init trigger
  26588. * 0b000110..FTM3 all channels match trigger ORed together
  26589. * 0b000111..FTM3 counter init trigger
  26590. * 0b001000..PWMA channel 0 trigger 0
  26591. * 0b001001..PWMA channel 1 trigger 0
  26592. * 0b001010..PWMA channel 2 trigger 0
  26593. * 0b001011..PWMA channel 3 trigger 0
  26594. * 0b001100..PDB0 channel 0 output trigger
  26595. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26596. * 0b001110..XB_IN2 input pin
  26597. * 0b001111..XB_IN3 input pin
  26598. * 0b010000..FTM1 all channels match trigger ORed together
  26599. * 0b010001..FTM1 counter init trigger
  26600. * 0b010010..DMA channel 0 done
  26601. * 0b010011..DMA channel 1 done
  26602. * 0b010100..XB_IN10 input pin
  26603. * 0b010101..XB_IN11 input pin
  26604. * 0b010110..DMA channel 6 done
  26605. * 0b010111..DMA channel 7 done
  26606. * 0b011000..PIT trigger 0
  26607. * 0b011001..PIT trigger 1
  26608. * 0b011010..PDB1 channel 0 output trigger
  26609. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26610. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26611. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26612. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26613. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26614. * 0b100000..FTM2 all channels match trigger ORed together
  26615. * 0b100001..FTM2 counter init trigger
  26616. * 0b100010..PDB0 channel 1 output trigger
  26617. * 0b100011..PDB1 channel 1 output trigger
  26618. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26619. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26620. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26621. */
  26622. #define XBARB_SEL5_SEL11(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL5_SEL11_SHIFT)) & XBARB_SEL5_SEL11_MASK)
  26623. /*! @} */
  26624. /*! @name SEL6 - Crossbar B Select Register 6 */
  26625. /*! @{ */
  26626. #define XBARB_SEL6_SEL12_MASK (0x3FU)
  26627. #define XBARB_SEL6_SEL12_SHIFT (0U)
  26628. /*! SEL12
  26629. * 0b000000..CMP0 Output
  26630. * 0b000001..CMP1 Output
  26631. * 0b000010..CMP2 Output
  26632. * 0b000011..CMP3 Output
  26633. * 0b000100..FTM0 all channels match trigger ORed together
  26634. * 0b000101..FTM0 counter init trigger
  26635. * 0b000110..FTM3 all channels match trigger ORed together
  26636. * 0b000111..FTM3 counter init trigger
  26637. * 0b001000..PWMA channel 0 trigger 0
  26638. * 0b001001..PWMA channel 1 trigger 0
  26639. * 0b001010..PWMA channel 2 trigger 0
  26640. * 0b001011..PWMA channel 3 trigger 0
  26641. * 0b001100..PDB0 channel 0 output trigger
  26642. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26643. * 0b001110..XB_IN2 input pin
  26644. * 0b001111..XB_IN3 input pin
  26645. * 0b010000..FTM1 all channels match trigger ORed together
  26646. * 0b010001..FTM1 counter init trigger
  26647. * 0b010010..DMA channel 0 done
  26648. * 0b010011..DMA channel 1 done
  26649. * 0b010100..XB_IN10 input pin
  26650. * 0b010101..XB_IN11 input pin
  26651. * 0b010110..DMA channel 6 done
  26652. * 0b010111..DMA channel 7 done
  26653. * 0b011000..PIT trigger 0
  26654. * 0b011001..PIT trigger 1
  26655. * 0b011010..PDB1 channel 0 output trigger
  26656. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26657. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26658. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26659. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26660. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26661. * 0b100000..FTM2 all channels match trigger ORed together
  26662. * 0b100001..FTM2 counter init trigger
  26663. * 0b100010..PDB0 channel 1 output trigger
  26664. * 0b100011..PDB1 channel 1 output trigger
  26665. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26666. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26667. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26668. */
  26669. #define XBARB_SEL6_SEL12(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL6_SEL12_SHIFT)) & XBARB_SEL6_SEL12_MASK)
  26670. #define XBARB_SEL6_SEL13_MASK (0x3F00U)
  26671. #define XBARB_SEL6_SEL13_SHIFT (8U)
  26672. /*! SEL13
  26673. * 0b000000..CMP0 Output
  26674. * 0b000001..CMP1 Output
  26675. * 0b000010..CMP2 Output
  26676. * 0b000011..CMP3 Output
  26677. * 0b000100..FTM0 all channels match trigger ORed together
  26678. * 0b000101..FTM0 counter init trigger
  26679. * 0b000110..FTM3 all channels match trigger ORed together
  26680. * 0b000111..FTM3 counter init trigger
  26681. * 0b001000..PWMA channel 0 trigger 0
  26682. * 0b001001..PWMA channel 1 trigger 0
  26683. * 0b001010..PWMA channel 2 trigger 0
  26684. * 0b001011..PWMA channel 3 trigger 0
  26685. * 0b001100..PDB0 channel 0 output trigger
  26686. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26687. * 0b001110..XB_IN2 input pin
  26688. * 0b001111..XB_IN3 input pin
  26689. * 0b010000..FTM1 all channels match trigger ORed together
  26690. * 0b010001..FTM1 counter init trigger
  26691. * 0b010010..DMA channel 0 done
  26692. * 0b010011..DMA channel 1 done
  26693. * 0b010100..XB_IN10 input pin
  26694. * 0b010101..XB_IN11 input pin
  26695. * 0b010110..DMA channel 6 done
  26696. * 0b010111..DMA channel 7 done
  26697. * 0b011000..PIT trigger 0
  26698. * 0b011001..PIT trigger 1
  26699. * 0b011010..PDB1 channel 0 output trigger
  26700. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26701. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26702. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26703. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26704. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26705. * 0b100000..FTM2 all channels match trigger ORed together
  26706. * 0b100001..FTM2 counter init trigger
  26707. * 0b100010..PDB0 channel 1 output trigger
  26708. * 0b100011..PDB1 channel 1 output trigger
  26709. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26710. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26711. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26712. */
  26713. #define XBARB_SEL6_SEL13(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL6_SEL13_SHIFT)) & XBARB_SEL6_SEL13_MASK)
  26714. /*! @} */
  26715. /*! @name SEL7 - Crossbar B Select Register 7 */
  26716. /*! @{ */
  26717. #define XBARB_SEL7_SEL14_MASK (0x3FU)
  26718. #define XBARB_SEL7_SEL14_SHIFT (0U)
  26719. /*! SEL14
  26720. * 0b000000..CMP0 Output
  26721. * 0b000001..CMP1 Output
  26722. * 0b000010..CMP2 Output
  26723. * 0b000011..CMP3 Output
  26724. * 0b000100..FTM0 all channels match trigger ORed together
  26725. * 0b000101..FTM0 counter init trigger
  26726. * 0b000110..FTM3 all channels match trigger ORed together
  26727. * 0b000111..FTM3 counter init trigger
  26728. * 0b001000..PWMA channel 0 trigger 0
  26729. * 0b001001..PWMA channel 1 trigger 0
  26730. * 0b001010..PWMA channel 2 trigger 0
  26731. * 0b001011..PWMA channel 3 trigger 0
  26732. * 0b001100..PDB0 channel 0 output trigger
  26733. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26734. * 0b001110..XB_IN2 input pin
  26735. * 0b001111..XB_IN3 input pin
  26736. * 0b010000..FTM1 all channels match trigger ORed together
  26737. * 0b010001..FTM1 counter init trigger
  26738. * 0b010010..DMA channel 0 done
  26739. * 0b010011..DMA channel 1 done
  26740. * 0b010100..XB_IN10 input pin
  26741. * 0b010101..XB_IN11 input pin
  26742. * 0b010110..DMA channel 6 done
  26743. * 0b010111..DMA channel 7 done
  26744. * 0b011000..PIT trigger 0
  26745. * 0b011001..PIT trigger 1
  26746. * 0b011010..PDB1 channel 0 output trigger
  26747. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26748. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26749. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26750. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26751. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26752. * 0b100000..FTM2 all channels match trigger ORed together
  26753. * 0b100001..FTM2 counter init trigger
  26754. * 0b100010..PDB0 channel 1 output trigger
  26755. * 0b100011..PDB1 channel 1 output trigger
  26756. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26757. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26758. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26759. */
  26760. #define XBARB_SEL7_SEL14(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL7_SEL14_SHIFT)) & XBARB_SEL7_SEL14_MASK)
  26761. #define XBARB_SEL7_SEL15_MASK (0x3F00U)
  26762. #define XBARB_SEL7_SEL15_SHIFT (8U)
  26763. /*! SEL15
  26764. * 0b000000..CMP0 Output
  26765. * 0b000001..CMP1 Output
  26766. * 0b000010..CMP2 Output
  26767. * 0b000011..CMP3 Output
  26768. * 0b000100..FTM0 all channels match trigger ORed together
  26769. * 0b000101..FTM0 counter init trigger
  26770. * 0b000110..FTM3 all channels match trigger ORed together
  26771. * 0b000111..FTM3 counter init trigger
  26772. * 0b001000..PWMA channel 0 trigger 0
  26773. * 0b001001..PWMA channel 1 trigger 0
  26774. * 0b001010..PWMA channel 2 trigger 0
  26775. * 0b001011..PWMA channel 3 trigger 0
  26776. * 0b001100..PDB0 channel 0 output trigger
  26777. * 0b001101..High Speed Analog-to-Digital Converter 0 conversion A complete
  26778. * 0b001110..XB_IN2 input pin
  26779. * 0b001111..XB_IN3 input pin
  26780. * 0b010000..FTM1 all channels match trigger ORed together
  26781. * 0b010001..FTM1 counter init trigger
  26782. * 0b010010..DMA channel 0 done
  26783. * 0b010011..DMA channel 1 done
  26784. * 0b010100..XB_IN10 input pin
  26785. * 0b010101..XB_IN11 input pin
  26786. * 0b010110..DMA channel 6 done
  26787. * 0b010111..DMA channel 7 done
  26788. * 0b011000..PIT trigger 0
  26789. * 0b011001..PIT trigger 1
  26790. * 0b011010..PDB1 channel 0 output trigger
  26791. * 0b011011..High Speed Analog-to-Digital Converter 0 conversion B complete
  26792. * 0b011100..PWMB channel 0 trigger 0 or trigger 1
  26793. * 0b011101..PWMB channel 1 trigger 0 or trigger 1
  26794. * 0b011110..PWMB channel 2 trigger 0 or trigger 1
  26795. * 0b011111..PWMB channel 3 trigger 0 or trigger 1
  26796. * 0b100000..FTM2 all channels match trigger ORed together
  26797. * 0b100001..FTM2 counter init trigger
  26798. * 0b100010..PDB0 channel 1 output trigger
  26799. * 0b100011..PDB1 channel 1 output trigger
  26800. * 0b100100..High Speed Analog-to-Digital Converter 1 conversion A complete
  26801. * 0b100101..High Speed Analog-to-Digital Converter 1 conversion B complete
  26802. * 0b100110..Analog-to-Digital Converter 0 conversion complete
  26803. */
  26804. #define XBARB_SEL7_SEL15(x) (((uint16_t)(((uint16_t)(x)) << XBARB_SEL7_SEL15_SHIFT)) & XBARB_SEL7_SEL15_MASK)
  26805. /*! @} */
  26806. /*!
  26807. * @}
  26808. */ /* end of group XBARB_Register_Masks */
  26809. /* XBARB - Peripheral instance base addresses */
  26810. /** Peripheral XBARB base address */
  26811. #define XBARB_BASE (0x4005A000u)
  26812. /** Peripheral XBARB base pointer */
  26813. #define XBARB ((XBARB_Type *)XBARB_BASE)
  26814. /** Array initializer of XBARB peripheral base addresses */
  26815. #define XBARB_BASE_ADDRS { XBARB_BASE }
  26816. /** Array initializer of XBARB peripheral base pointers */
  26817. #define XBARB_BASE_PTRS { XBARB }
  26818. /*!
  26819. * @}
  26820. */ /* end of group XBARB_Peripheral_Access_Layer */
  26821. /*
  26822. ** End of section using anonymous unions
  26823. */
  26824. #if defined(__ARMCC_VERSION)
  26825. #if (__ARMCC_VERSION >= 6010050)
  26826. #pragma clang diagnostic pop
  26827. #else
  26828. #pragma pop
  26829. #endif
  26830. #elif defined(__CWCC__)
  26831. #pragma pop
  26832. #elif defined(__GNUC__)
  26833. /* leave anonymous unions enabled */
  26834. #elif defined(__IAR_SYSTEMS_ICC__)
  26835. #pragma language=default
  26836. #else
  26837. #error Not supported compiler type
  26838. #endif
  26839. /*!
  26840. * @}
  26841. */ /* end of group Peripheral_access_layer */
  26842. /* ----------------------------------------------------------------------------
  26843. -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  26844. ---------------------------------------------------------------------------- */
  26845. /*!
  26846. * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  26847. * @{
  26848. */
  26849. #if defined(__ARMCC_VERSION)
  26850. #if (__ARMCC_VERSION >= 6010050)
  26851. #pragma clang system_header
  26852. #endif
  26853. #elif defined(__IAR_SYSTEMS_ICC__)
  26854. #pragma system_include
  26855. #endif
  26856. /**
  26857. * @brief Mask and left-shift a bit field value for use in a register bit range.
  26858. * @param field Name of the register bit field.
  26859. * @param value Value of the bit field.
  26860. * @return Masked and shifted value.
  26861. */
  26862. #define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK))
  26863. /**
  26864. * @brief Mask and right-shift a register value to extract a bit field value.
  26865. * @param field Name of the register bit field.
  26866. * @param value Value of the register.
  26867. * @return Masked and shifted bit field value.
  26868. */
  26869. #define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT))
  26870. /*!
  26871. * @}
  26872. */ /* end of group Bit_Field_Generic_Macros */
  26873. /* ----------------------------------------------------------------------------
  26874. -- SDK Compatibility
  26875. ---------------------------------------------------------------------------- */
  26876. /*!
  26877. * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
  26878. * @{
  26879. */
  26880. #define DSPI0 SPI0
  26881. #define DSPI1 SPI1
  26882. #define DSPI2 SPI2
  26883. #define FLEXCAN0 CAN0
  26884. #define FLEXCAN1 CAN1
  26885. #define FLEXCAN2 CAN2
  26886. #define DMAMUX0 DMAMUX
  26887. /*!
  26888. * @}
  26889. */ /* end of group SDK_Compatibility_Symbols */
  26890. #endif /* _MKV56F24_H_ */