Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

7152 lines
352KB

  1. #pragma once
  2. #include <stdint.h>
  3. // Definitions based these documents:
  4. // i.MX RT1050 Reference Manual, Rev. 1, 03/2018
  5. // ARM v7-M Architecture Reference Manual (DDI 0403E.b)
  6. enum IRQ_NUMBER_t {
  7. IRQ_DMA_CH0 = 0,
  8. IRQ_DMA_CH1 = 1,
  9. IRQ_DMA_CH2 = 2,
  10. IRQ_DMA_CH3 = 3,
  11. IRQ_DMA_CH4 = 4,
  12. IRQ_DMA_CH5 = 5,
  13. IRQ_DMA_CH6 = 6,
  14. IRQ_DMA_CH7 = 7,
  15. IRQ_DMA_CH8 = 8,
  16. IRQ_DMA_CH9 = 9,
  17. IRQ_DMA_CH10 = 10,
  18. IRQ_DMA_CH11 = 11,
  19. IRQ_DMA_CH12 = 12,
  20. IRQ_DMA_CH13 = 13,
  21. IRQ_DMA_CH14 = 14,
  22. IRQ_DMA_CH15 = 15,
  23. IRQ_DMA_ERROR = 16,
  24. IRQ_CTI0 = 17,
  25. IRQ_CTI1 = 18,
  26. IRQ_CORE_ERROR = 19, // TODO - name?
  27. IRQ_LPUART1 = 20,
  28. IRQ_LPUART2 = 21,
  29. IRQ_LPUART3 = 22,
  30. IRQ_LPUART4 = 23,
  31. IRQ_LPUART5 = 24,
  32. IRQ_LPUART6 = 25,
  33. IRQ_LPUART7 = 26,
  34. IRQ_LPUART8 = 27,
  35. IRQ_LPI2C1 = 28,
  36. IRQ_LPI2C2 = 29,
  37. IRQ_LPI2C3 = 30,
  38. IRQ_LPI2C4 = 31,
  39. IRQ_LPSPI1 = 32,
  40. IRQ_LPSPI2 = 33,
  41. IRQ_LPSPI3 = 34,
  42. IRQ_LPSPI4 = 35,
  43. IRQ_CAN1 = 36,
  44. IRQ_CAN2 = 37,
  45. IRQ_ADDR_ERR = 38, // TODO: name?
  46. IRQ_KPP = 39,
  47. IRQ_TSC_DIG = 40,
  48. IRQ_GPR_IRQ = 41,
  49. IRQ_LCDIF = 42,
  50. IRQ_CSI = 43,
  51. IRQ_PXP = 44,
  52. IRQ_WDOG2 = 45,
  53. IRQ_SNVS_IRQ = 46,
  54. IRQ_SNVS_SECURITY = 47,
  55. IRQ_SNVS_ONOFF = 48,
  56. IRQ_CSU = 49,
  57. IRQ_DCP0 = 50, // TODO: ???
  58. IRQ_DCP1 = 51, // TODO: ???
  59. IRQ_DCP2 = 52, // TODO: ???
  60. IRQ_TRNG = 53,
  61. IRQ_SJC_IRQ = 54,
  62. IRQ_BEE = 55,
  63. IRQ_SAI1 = 56,
  64. IRQ_SAI2 = 57,
  65. IRQ_SAI3_RX = 58,
  66. IRQ_SAI3_TX = 59,
  67. IRQ_SPDIF = 60,
  68. IRQ_BROWNOUT0 = 61,
  69. IRQ_Reserved13 = 62,
  70. IRQ_TEMPERATURE = 63,
  71. IRQ_TEMPERATURE_PANIC = 64,
  72. IRQ_USBPHY0 = 65,
  73. IRQ_USBPHY1 = 66,
  74. IRQ_ADC1 = 67,
  75. IRQ_ADC2 = 68,
  76. IRQ_DCDC = 69,
  77. IRQ_Reserved1 = 70,
  78. IRQ_Reserved2 = 71,
  79. IRQ_GPIO1_INT0 = 72,
  80. IRQ_GPIO1_INT1 = 73,
  81. IRQ_GPIO1_INT2 = 74,
  82. IRQ_GPIO1_INT3 = 75,
  83. IRQ_GPIO1_INT4 = 76,
  84. IRQ_GPIO1_INT5 = 77,
  85. IRQ_GPIO1_INT6 = 78,
  86. IRQ_GPIO1_INT7 = 79,
  87. IRQ_GPI01_0_15 = 80,
  88. IRQ_GPIO1_16_31 = 81,
  89. IRQ_GPI02_0_15 = 82,
  90. IRQ_GPIO2_16_31 = 83,
  91. IRQ_GPI03_0_15 = 84,
  92. IRQ_GPIO3_16_31 = 85,
  93. IRQ_GPI04_0_15 = 86,
  94. IRQ_GPIO4_16_31 = 87,
  95. IRQ_GPI05_0_15 = 88,
  96. IRQ_GPIO5_16_31 = 89,
  97. IRQ_FLEXIO1 = 90,
  98. IRQ_FLEXIO2 = 91,
  99. IRQ_WDOG1 = 92,
  100. IRQ_RTWDOG = 93,
  101. IRQ_EWM = 94,
  102. IRQ_CCM1 = 95,
  103. IRQ_CCM2 = 96,
  104. IRQ_GPC = 97,
  105. IRQ_SRC = 98,
  106. IRQ_Reserved3 = 99,
  107. IRQ_GPT1 = 100,
  108. IRQ_GPT2 = 101,
  109. IRQ_FLEXPWM1_0 = 102,
  110. IRQ_FLEXPWM1_1 = 103,
  111. IRQ_FLEXPWM1_2 = 104,
  112. IRQ_FLEXPWM1_3 = 105,
  113. IRQ_FLEXPWM1_FAULT = 106,
  114. IRQ_FLEXSPI2 = 107, // RT1060 only
  115. IRQ_FLEXSPI = 108,
  116. IRQ_SEMC = 109,
  117. IRQ_SDHC1 = 110,
  118. IRQ_SDHC2 = 111,
  119. IRQ_USB2 = 112,
  120. IRQ_USB1 = 113,
  121. IRQ_ENET = 114,
  122. IRQ_ENET_TIMER = 115,
  123. IRQ_XBAR1_01 = 116,
  124. IRQ_XBAR1_23 = 117,
  125. IRQ_ADC_ETC0 = 118,
  126. IRQ_ADC_ETC1 = 119,
  127. IRQ_ADC_ETC2 = 120,
  128. IRQ_ADC_ETC_ERR = 121,
  129. IRQ_PIT = 122,
  130. IRQ_ACMP0 = 123,
  131. IRQ_ACMP1 = 124,
  132. IRQ_ACMP2 = 125,
  133. IRQ_ACMP3 = 126,
  134. IRQ_Reserved5 = 127,
  135. IRQ_Reserved6 = 128,
  136. IRQ_ENC1 = 129,
  137. IRQ_ENC2 = 130,
  138. IRQ_ENC3 = 131,
  139. IRQ_ENC4 = 132,
  140. IRQ_QTIMER1 = 133,
  141. IRQ_QTIMER2 = 134,
  142. IRQ_QTIMER3 = 135,
  143. IRQ_QTIMER4 = 136,
  144. IRQ_FLEXPWM2_0 = 137,
  145. IRQ_FLEXPWM2_1 = 138,
  146. IRQ_FLEXPWM2_2 = 139,
  147. IRQ_FLEXPWM2_3 = 140,
  148. IRQ_FLEXPWM2_FAULT = 141,
  149. IRQ_FLEXPWM3_0 = 142,
  150. IRQ_FLEXPWM3_1 = 143,
  151. IRQ_FLEXPWM3_2 = 144,
  152. IRQ_FLEXPWM3_3 = 145,
  153. IRQ_FLEXPWM3_FAULT = 146,
  154. IRQ_FLEXPWM4_0 = 147,
  155. IRQ_FLEXPWM4_1 = 148,
  156. IRQ_FLEXPWM4_2 = 149,
  157. IRQ_FLEXPWM4_3 = 150,
  158. IRQ_FLEXPWM4_FAULT = 151,
  159. IRQ_ENET2 = 152, // RT1060 only
  160. IRQ_ENET2_TIMER = 153, // RT1060 only
  161. IRQ_Reserved9 = 154,
  162. IRQ_Reserved10 = 155,
  163. IRQ_CAN3 = 156, // RT1060 only
  164. IRQ_GPIO6789 = 157, // RT1060 only
  165. IRQ_SJC_DEBUG = 158,
  166. IRQ_NMI_WAKEUP = 159
  167. };
  168. #define NVIC_NUM_INTERRUPTS 160
  169. #define DMA_NUM_CHANNELS 32
  170. #ifdef __cplusplus
  171. extern "C" void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  172. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  173. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; }
  174. #else
  175. extern void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  176. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  177. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; }
  178. #endif
  179. #define DMAMUX_SOURCE_FLEXIO1_REQUEST0 0
  180. #define DMAMUX_SOURCE_FLEXIO1_REQUEST1 0
  181. #define DMAMUX_SOURCE_FLEXIO2_REQUEST0 1
  182. #define DMAMUX_SOURCE_FLEXIO2_REQUEST1 1
  183. #define DMAMUX_SOURCE_LPUART1_RX 2
  184. #define DMAMUX_SOURCE_LPUART1_TX 3
  185. #define DMAMUX_SOURCE_LPUART3_RX 4
  186. #define DMAMUX_SOURCE_LPUART3_TX 5
  187. #define DMAMUX_SOURCE_LPUART5_RX 6
  188. #define DMAMUX_SOURCE_LPUART5_TX 7
  189. #define DMAMUX_SOURCE_LPUART7_RX 8
  190. #define DMAMUX_SOURCE_LPUART7_TX 9
  191. #define DMAMUX_SOURCE_FLEXCAN3 11
  192. #define DMAMUX_SOURCE_CSI 12
  193. #define DMAMUX_SOURCE_LPSPI1_RX 13
  194. #define DMAMUX_SOURCE_LPSPI1_TX 14
  195. #define DMAMUX_SOURCE_LPSPI3_RX 15
  196. #define DMAMUX_SOURCE_LPSPI3_TX 16
  197. #define DMAMUX_SOURCE_LPI2C1 17
  198. #define DMAMUX_SOURCE_LPI2C3 18
  199. #define DMAMUX_SOURCE_SAI1_RX 19
  200. #define DMAMUX_SOURCE_SAI1_TX 20
  201. #define DMAMUX_SOURCE_SAI2_RX 21
  202. #define DMAMUX_SOURCE_SAI2_TX 22
  203. #define DMAMUX_SOURCE_ADC_ETC 23
  204. #define DMAMUX_SOURCE_ADC1 24
  205. #define DMAMUX_SOURCE_ACMP1 25
  206. #define DMAMUX_SOURCE_ACMP3 26
  207. #define DMAMUX_SOURCE_FLEXSPI_RX 28
  208. #define DMAMUX_SOURCE_FLEXSPI_TX 29
  209. #define DMAMUX_SOURCE_XBAR1_0 30
  210. #define DMAMUX_SOURCE_XBAR1_1 31
  211. #define DMAMUX_SOURCE_FLEXPWM1_READ0 32
  212. #define DMAMUX_SOURCE_FLEXPWM1_READ1 33
  213. #define DMAMUX_SOURCE_FLEXPWM1_READ2 34
  214. #define DMAMUX_SOURCE_FLEXPWM1_READ3 35
  215. #define DMAMUX_SOURCE_FLEXPWM1_WRITE0 36
  216. #define DMAMUX_SOURCE_FLEXPWM1_WRITE1 37
  217. #define DMAMUX_SOURCE_FLEXPWM1_WRITE2 38
  218. #define DMAMUX_SOURCE_FLEXPWM1_WRITE3 39
  219. #define DMAMUX_SOURCE_FLEXPWM3_READ0 40
  220. #define DMAMUX_SOURCE_FLEXPWM3_READ1 41
  221. #define DMAMUX_SOURCE_FLEXPWM3_READ2 42
  222. #define DMAMUX_SOURCE_FLEXPWM3_READ3 43
  223. #define DMAMUX_SOURCE_FLEXPWM3_WRITE0 44
  224. #define DMAMUX_SOURCE_FLEXPWM3_WRITE1 45
  225. #define DMAMUX_SOURCE_FLEXPWM3_WRITE2 46
  226. #define DMAMUX_SOURCE_FLEXPWM3_WRITE3 47
  227. #define DMAMUX_SOURCE_QTIMER1_READ0 48
  228. #define DMAMUX_SOURCE_QTIMER1_READ1 49
  229. #define DMAMUX_SOURCE_QTIMER1_READ2 50
  230. #define DMAMUX_SOURCE_QTIMER1_READ3 51
  231. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD1 52
  232. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD1 53
  233. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD1 54
  234. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD1 55
  235. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD2 52
  236. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD2 53
  237. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD2 54
  238. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD2 55
  239. #define DMAMUX_SOURCE_QTIMER3_READ0 56
  240. #define DMAMUX_SOURCE_QTIMER3_READ1 57
  241. #define DMAMUX_SOURCE_QTIMER3_READ2 58
  242. #define DMAMUX_SOURCE_QTIMER3_READ3 59
  243. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD1 56
  244. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD1 57
  245. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD1 58
  246. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD1 59
  247. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD2 56
  248. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD2 57
  249. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD2 58
  250. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD2 59
  251. #define DMAMUX_SOURCE_FLEXSPI2_RX 60
  252. #define DMAMUX_SOURCE_FLEXSPI2_TX 61
  253. #define DMAMUX_SOURCE_FLEXIO1_REQUEST2 64
  254. #define DMAMUX_SOURCE_FLEXIO1_REQUEST3 64
  255. #define DMAMUX_SOURCE_FLEXIO2_REQUEST2 65
  256. #define DMAMUX_SOURCE_FLEXIO2_REQUEST3 65
  257. #define DMAMUX_SOURCE_LPUART2_RX 66
  258. #define DMAMUX_SOURCE_LPUART2_TX 67
  259. #define DMAMUX_SOURCE_LPUART4_RX 68
  260. #define DMAMUX_SOURCE_LPUART4_TX 69
  261. #define DMAMUX_SOURCE_LPUART6_RX 70
  262. #define DMAMUX_SOURCE_LPUART6_TX 71
  263. #define DMAMUX_SOURCE_LPUART8_RX 72
  264. #define DMAMUX_SOURCE_LPUART8_TX 73
  265. #define DMAMUX_SOURCE_PXP 75
  266. #define DMAMUX_SOURCE_LCDIF 76
  267. #define DMAMUX_SOURCE_LPSPI2_RX 77
  268. #define DMAMUX_SOURCE_LPSPI2_TX 78
  269. #define DMAMUX_SOURCE_LPSPI4_RX 79
  270. #define DMAMUX_SOURCE_LPSPI4_TX 80
  271. #define DMAMUX_SOURCE_LPI2C2 81
  272. #define DMAMUX_SOURCE_LPI2C4 82
  273. #define DMAMUX_SOURCE_SAI3_RX 83
  274. #define DMAMUX_SOURCE_SAI3_TX 84
  275. #define DMAMUX_SOURCE_SPDIF_RX 85
  276. #define DMAMUX_SOURCE_SPDIF_TX 86
  277. #define DMAMUX_SOURCE_ADC2 88
  278. #define DMAMUX_SOURCE_ACMP2 89
  279. #define DMAMUX_SOURCE_ACMP4 90
  280. #define DMAMUX_SOURCE_ENET1_TIMER0 92
  281. #define DMAMUX_SOURCE_ENET1_TIMER1 93
  282. #define DMAMUX_SOURCE_XBAR1_2 94
  283. #define DMAMUX_SOURCE_XBAR1_3 95
  284. #define DMAMUX_SOURCE_FLEXPWM2_READ0 96
  285. #define DMAMUX_SOURCE_FLEXPWM2_READ1 97
  286. #define DMAMUX_SOURCE_FLEXPWM2_READ2 98
  287. #define DMAMUX_SOURCE_FLEXPWM2_READ3 99
  288. #define DMAMUX_SOURCE_FLEXPWM2_WRITE0 100
  289. #define DMAMUX_SOURCE_FLEXPWM2_WRITE1 101
  290. #define DMAMUX_SOURCE_FLEXPWM2_WRITE2 102
  291. #define DMAMUX_SOURCE_FLEXPWM2_WRITE3 103
  292. #define DMAMUX_SOURCE_FLEXPWM4_READ0 104
  293. #define DMAMUX_SOURCE_FLEXPWM4_READ1 105
  294. #define DMAMUX_SOURCE_FLEXPWM4_READ2 106
  295. #define DMAMUX_SOURCE_FLEXPWM4_READ3 107
  296. #define DMAMUX_SOURCE_FLEXPWM4_WRITE0 108
  297. #define DMAMUX_SOURCE_FLEXPWM4_WRITE1 109
  298. #define DMAMUX_SOURCE_FLEXPWM4_WRITE2 110
  299. #define DMAMUX_SOURCE_FLEXPWM4_WRITE3 111
  300. #define DMAMUX_SOURCE_QTIMER2_READ0 112
  301. #define DMAMUX_SOURCE_QTIMER2_READ1 113
  302. #define DMAMUX_SOURCE_QTIMER2_READ2 114
  303. #define DMAMUX_SOURCE_QTIMER2_READ3 115
  304. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD1 116
  305. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD1 117
  306. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD1 118
  307. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD1 119
  308. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD2 116
  309. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD2 117
  310. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD2 118
  311. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD2 119
  312. #define DMAMUX_SOURCE_QTIMER4_READ0 120
  313. #define DMAMUX_SOURCE_QTIMER4_READ1 121
  314. #define DMAMUX_SOURCE_QTIMER4_READ2 122
  315. #define DMAMUX_SOURCE_QTIMER4_READ3 123
  316. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD1 120
  317. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD1 121
  318. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD1 122
  319. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD1 123
  320. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD2 120
  321. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD2 121
  322. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD2 122
  323. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD2 123
  324. #define DMAMUX_SOURCE_ENET2_TIMER0 124
  325. #define DMAMUX_SOURCE_ENET2_TIMER1 125
  326. typedef struct {
  327. volatile uint32_t offset000;
  328. volatile uint32_t offset004;
  329. volatile uint32_t offset008;
  330. volatile uint32_t offset00C;
  331. volatile uint32_t offset010;
  332. volatile uint32_t offset014;
  333. volatile uint32_t offset018;
  334. volatile uint32_t offset01C;
  335. volatile uint32_t offset020;
  336. volatile uint32_t offset024;
  337. volatile uint32_t offset028;
  338. volatile uint32_t offset02C;
  339. volatile uint32_t offset030;
  340. volatile uint32_t offset034;
  341. volatile uint32_t offset038;
  342. volatile uint32_t offset03C;
  343. volatile uint32_t offset040;
  344. volatile uint32_t offset044;
  345. volatile uint32_t offset048;
  346. volatile uint32_t offset04C;
  347. volatile uint32_t offset050;
  348. volatile uint32_t offset054;
  349. volatile uint32_t offset058;
  350. volatile uint32_t offset05C;
  351. volatile uint32_t offset060;
  352. volatile uint32_t offset064;
  353. volatile uint32_t offset068;
  354. volatile uint32_t offset06C;
  355. volatile uint32_t offset070;
  356. volatile uint32_t offset074;
  357. volatile uint32_t offset078;
  358. volatile uint32_t offset07C;
  359. volatile uint32_t offset080;
  360. volatile uint32_t offset084;
  361. volatile uint32_t offset088;
  362. volatile uint32_t offset08C;
  363. volatile uint32_t offset090;
  364. volatile uint32_t offset094;
  365. volatile uint32_t offset098;
  366. volatile uint32_t offset09C;
  367. volatile uint32_t offset0A0;
  368. volatile uint32_t offset0A4;
  369. volatile uint32_t offset0A8;
  370. volatile uint32_t offset0AC;
  371. volatile uint32_t offset0B0;
  372. volatile uint32_t offset0B4;
  373. volatile uint32_t offset0B8;
  374. volatile uint32_t offset0BC;
  375. volatile uint32_t offset0C0;
  376. volatile uint32_t offset0C4;
  377. volatile uint32_t offset0C8;
  378. volatile uint32_t offset0CC;
  379. volatile uint32_t offset0D0;
  380. volatile uint32_t offset0D4;
  381. volatile uint32_t offset0D8;
  382. volatile uint32_t offset0DC;
  383. volatile uint32_t offset0E0;
  384. volatile uint32_t offset0E4;
  385. volatile uint32_t offset0E8;
  386. volatile uint32_t offset0EC;
  387. volatile uint32_t offset0F0;
  388. volatile uint32_t offset0F4;
  389. volatile uint32_t offset0F8;
  390. volatile uint32_t offset0FC;
  391. volatile uint32_t offset100;
  392. volatile uint32_t offset104;
  393. volatile uint32_t offset108;
  394. volatile uint32_t offset10C;
  395. volatile uint32_t offset110;
  396. volatile uint32_t offset114;
  397. volatile uint32_t offset118;
  398. volatile uint32_t offset11C;
  399. volatile uint32_t offset120;
  400. volatile uint32_t offset124;
  401. volatile uint32_t offset128;
  402. volatile uint32_t offset12C;
  403. volatile uint32_t offset130;
  404. volatile uint32_t offset134;
  405. volatile uint32_t offset138;
  406. volatile uint32_t offset13C;
  407. volatile uint32_t offset140;
  408. volatile uint32_t offset144;
  409. volatile uint32_t offset148;
  410. volatile uint32_t offset14C;
  411. volatile uint32_t offset150;
  412. volatile uint32_t offset154;
  413. volatile uint32_t offset158;
  414. volatile uint32_t offset15C;
  415. volatile uint32_t offset160;
  416. volatile uint32_t offset164;
  417. volatile uint32_t offset168;
  418. volatile uint32_t offset16C;
  419. volatile uint32_t offset170;
  420. volatile uint32_t offset174;
  421. volatile uint32_t offset178;
  422. volatile uint32_t offset17C;
  423. volatile uint32_t offset180;
  424. volatile uint32_t offset184;
  425. volatile uint32_t offset188;
  426. volatile uint32_t offset18C;
  427. volatile uint32_t offset190;
  428. volatile uint32_t offset194;
  429. volatile uint32_t offset198;
  430. volatile uint32_t offset19C;
  431. volatile uint32_t offset1A0;
  432. volatile uint32_t offset1A4;
  433. volatile uint32_t offset1A8;
  434. volatile uint32_t offset1AC;
  435. volatile uint32_t offset1B0;
  436. volatile uint32_t offset1B4;
  437. volatile uint32_t offset1B8;
  438. volatile uint32_t offset1BC;
  439. volatile uint32_t offset1C0;
  440. volatile uint32_t offset1C4;
  441. volatile uint32_t offset1C8;
  442. volatile uint32_t offset1CC;
  443. volatile uint32_t offset1D0;
  444. volatile uint32_t offset1D4;
  445. volatile uint32_t offset1D8;
  446. volatile uint32_t offset1DC;
  447. volatile uint32_t offset1E0;
  448. volatile uint32_t offset1E4;
  449. volatile uint32_t offset1E8;
  450. volatile uint32_t offset1EC;
  451. volatile uint32_t offset1F0;
  452. volatile uint32_t offset1F4;
  453. volatile uint32_t offset1F8;
  454. volatile uint32_t offset1FC;
  455. volatile uint32_t offset200;
  456. volatile uint32_t offset204;
  457. volatile uint32_t offset208;
  458. volatile uint32_t offset20C;
  459. volatile uint32_t offset210;
  460. volatile uint32_t offset214;
  461. volatile uint32_t offset218;
  462. volatile uint32_t offset21C;
  463. volatile uint32_t offset220;
  464. volatile uint32_t offset224;
  465. volatile uint32_t offset228;
  466. volatile uint32_t offset22C;
  467. volatile uint32_t offset230;
  468. volatile uint32_t offset234;
  469. volatile uint32_t offset238;
  470. volatile uint32_t offset23C;
  471. volatile uint32_t offset240;
  472. volatile uint32_t offset244;
  473. volatile uint32_t offset248;
  474. volatile uint32_t offset24C;
  475. volatile uint32_t offset250;
  476. volatile uint32_t offset254;
  477. volatile uint32_t offset258;
  478. volatile uint32_t offset25C;
  479. volatile uint32_t offset260;
  480. volatile uint32_t offset264;
  481. volatile uint32_t offset268;
  482. volatile uint32_t offset26C;
  483. volatile uint32_t offset270;
  484. volatile uint32_t offset274;
  485. volatile uint32_t offset278;
  486. volatile uint32_t offset27C;
  487. volatile uint32_t offset280;
  488. volatile uint32_t offset284;
  489. volatile uint32_t offset288;
  490. volatile uint32_t offset28C;
  491. volatile uint32_t offset290;
  492. volatile uint32_t offset294;
  493. volatile uint32_t offset298;
  494. volatile uint32_t offset29C;
  495. volatile uint32_t offset2A0;
  496. volatile uint32_t offset2A4;
  497. volatile uint32_t offset2A8;
  498. volatile uint32_t offset2AC;
  499. volatile uint32_t offset2B0;
  500. volatile uint32_t offset2B4;
  501. volatile uint32_t offset2B8;
  502. volatile uint32_t offset2BC;
  503. volatile uint32_t offset2C0;
  504. volatile uint32_t offset2C4;
  505. volatile uint32_t offset2C8;
  506. volatile uint32_t offset2CC;
  507. volatile uint32_t offset2D0;
  508. volatile uint32_t offset2D4;
  509. volatile uint32_t offset2D8;
  510. volatile uint32_t offset2DC;
  511. volatile uint32_t offset2E0;
  512. volatile uint32_t offset2E4;
  513. volatile uint32_t offset2E8;
  514. volatile uint32_t offset2EC;
  515. volatile uint32_t offset2F0;
  516. volatile uint32_t offset2F4;
  517. volatile uint32_t offset2F8;
  518. volatile uint32_t offset2FC;
  519. volatile uint32_t offset300;
  520. volatile uint32_t offset304;
  521. volatile uint32_t offset308;
  522. volatile uint32_t offset30C;
  523. volatile uint32_t offset310;
  524. volatile uint32_t offset314;
  525. volatile uint32_t offset318;
  526. volatile uint32_t offset31C;
  527. volatile uint32_t offset320;
  528. volatile uint32_t offset324;
  529. volatile uint32_t offset328;
  530. volatile uint32_t offset32C;
  531. volatile uint32_t offset330;
  532. volatile uint32_t offset334;
  533. volatile uint32_t offset338;
  534. volatile uint32_t offset33C;
  535. volatile uint32_t offset340;
  536. volatile uint32_t offset344;
  537. volatile uint32_t offset348;
  538. volatile uint32_t offset34C;
  539. volatile uint32_t offset350;
  540. volatile uint32_t offset354;
  541. volatile uint32_t offset358;
  542. volatile uint32_t offset35C;
  543. volatile uint32_t offset360;
  544. volatile uint32_t offset364;
  545. volatile uint32_t offset368;
  546. volatile uint32_t offset36C;
  547. volatile uint32_t offset370;
  548. volatile uint32_t offset374;
  549. volatile uint32_t offset378;
  550. volatile uint32_t offset37C;
  551. volatile uint32_t offset380;
  552. volatile uint32_t offset384;
  553. volatile uint32_t offset388;
  554. volatile uint32_t offset38C;
  555. volatile uint32_t offset390;
  556. volatile uint32_t offset394;
  557. volatile uint32_t offset398;
  558. volatile uint32_t offset39C;
  559. volatile uint32_t offset3A0;
  560. volatile uint32_t offset3A4;
  561. volatile uint32_t offset3A8;
  562. volatile uint32_t offset3AC;
  563. volatile uint32_t offset3B0;
  564. volatile uint32_t offset3B4;
  565. volatile uint32_t offset3B8;
  566. volatile uint32_t offset3BC;
  567. volatile uint32_t offset3C0;
  568. volatile uint32_t offset3C4;
  569. volatile uint32_t offset3C8;
  570. volatile uint32_t offset3CC;
  571. volatile uint32_t offset3D0;
  572. volatile uint32_t offset3D4;
  573. volatile uint32_t offset3D8;
  574. volatile uint32_t offset3DC;
  575. volatile uint32_t offset3E0;
  576. volatile uint32_t offset3E4;
  577. volatile uint32_t offset3E8;
  578. volatile uint32_t offset3EC;
  579. volatile uint32_t offset3F0;
  580. volatile uint32_t offset3F4;
  581. volatile uint32_t offset3F8;
  582. volatile uint32_t offset3FC;
  583. } IMXRT_REGISTER32_t;
  584. typedef struct {
  585. volatile uint16_t offset000;
  586. volatile uint16_t offset002;
  587. volatile uint16_t offset004;
  588. volatile uint16_t offset006;
  589. volatile uint16_t offset008;
  590. volatile uint16_t offset00A;
  591. volatile uint16_t offset00C;
  592. volatile uint16_t offset00E;
  593. volatile uint16_t offset010;
  594. volatile uint16_t offset012;
  595. volatile uint16_t offset014;
  596. volatile uint16_t offset016;
  597. volatile uint16_t offset018;
  598. volatile uint16_t offset01A;
  599. volatile uint16_t offset01C;
  600. volatile uint16_t offset01E;
  601. volatile uint16_t offset020;
  602. volatile uint16_t offset022;
  603. volatile uint16_t offset024;
  604. volatile uint16_t offset026;
  605. volatile uint16_t offset028;
  606. volatile uint16_t offset02A;
  607. volatile uint16_t offset02C;
  608. volatile uint16_t offset02E;
  609. volatile uint16_t offset030;
  610. volatile uint16_t offset032;
  611. volatile uint16_t offset034;
  612. volatile uint16_t offset036;
  613. volatile uint16_t offset038;
  614. volatile uint16_t offset03A;
  615. volatile uint16_t offset03C;
  616. volatile uint16_t offset03E;
  617. volatile uint16_t offset040;
  618. volatile uint16_t offset042;
  619. volatile uint16_t offset044;
  620. volatile uint16_t offset046;
  621. volatile uint16_t offset048;
  622. volatile uint16_t offset04A;
  623. volatile uint16_t offset04C;
  624. volatile uint16_t offset04E;
  625. volatile uint16_t offset050;
  626. volatile uint16_t offset052;
  627. volatile uint16_t offset054;
  628. volatile uint16_t offset056;
  629. volatile uint16_t offset058;
  630. volatile uint16_t offset05A;
  631. volatile uint16_t offset05C;
  632. volatile uint16_t offset05E;
  633. volatile uint16_t offset060;
  634. volatile uint16_t offset062;
  635. volatile uint16_t offset064;
  636. volatile uint16_t offset066;
  637. volatile uint16_t offset068;
  638. volatile uint16_t offset06A;
  639. volatile uint16_t offset06C;
  640. volatile uint16_t offset06E;
  641. volatile uint16_t offset070;
  642. volatile uint16_t offset072;
  643. volatile uint16_t offset074;
  644. volatile uint16_t offset076;
  645. volatile uint16_t offset078;
  646. volatile uint16_t offset07A;
  647. volatile uint16_t offset07C;
  648. volatile uint16_t offset07E;
  649. volatile uint16_t offset080;
  650. volatile uint16_t offset082;
  651. volatile uint16_t offset084;
  652. volatile uint16_t offset086;
  653. volatile uint16_t offset088;
  654. volatile uint16_t offset08A;
  655. volatile uint16_t offset08C;
  656. volatile uint16_t offset08E;
  657. volatile uint16_t offset090;
  658. volatile uint16_t offset092;
  659. volatile uint16_t offset094;
  660. volatile uint16_t offset096;
  661. volatile uint16_t offset098;
  662. volatile uint16_t offset09A;
  663. volatile uint16_t offset09C;
  664. volatile uint16_t offset09E;
  665. volatile uint16_t offset0A0;
  666. volatile uint16_t offset0A2;
  667. volatile uint16_t offset0A4;
  668. volatile uint16_t offset0A6;
  669. volatile uint16_t offset0A8;
  670. volatile uint16_t offset0AA;
  671. volatile uint16_t offset0AC;
  672. volatile uint16_t offset0AE;
  673. volatile uint16_t offset0B0;
  674. volatile uint16_t offset0B2;
  675. volatile uint16_t offset0B4;
  676. volatile uint16_t offset0B6;
  677. volatile uint16_t offset0B8;
  678. volatile uint16_t offset0BA;
  679. volatile uint16_t offset0BC;
  680. volatile uint16_t offset0BE;
  681. volatile uint16_t offset0C0;
  682. volatile uint16_t offset0C2;
  683. volatile uint16_t offset0C4;
  684. volatile uint16_t offset0C6;
  685. volatile uint16_t offset0C8;
  686. volatile uint16_t offset0CA;
  687. volatile uint16_t offset0CC;
  688. volatile uint16_t offset0CE;
  689. volatile uint16_t offset0D0;
  690. volatile uint16_t offset0D2;
  691. volatile uint16_t offset0D4;
  692. volatile uint16_t offset0D6;
  693. volatile uint16_t offset0D8;
  694. volatile uint16_t offset0DA;
  695. volatile uint16_t offset0DC;
  696. volatile uint16_t offset0DE;
  697. volatile uint16_t offset0E0;
  698. volatile uint16_t offset0E2;
  699. volatile uint16_t offset0E4;
  700. volatile uint16_t offset0E6;
  701. volatile uint16_t offset0E8;
  702. volatile uint16_t offset0EA;
  703. volatile uint16_t offset0EC;
  704. volatile uint16_t offset0EE;
  705. volatile uint16_t offset0F0;
  706. volatile uint16_t offset0F2;
  707. volatile uint16_t offset0F4;
  708. volatile uint16_t offset0F6;
  709. volatile uint16_t offset0F8;
  710. volatile uint16_t offset0FA;
  711. volatile uint16_t offset0FC;
  712. volatile uint16_t offset0FE;
  713. volatile uint16_t offset100;
  714. volatile uint16_t offset102;
  715. volatile uint16_t offset104;
  716. volatile uint16_t offset106;
  717. volatile uint16_t offset108;
  718. volatile uint16_t offset10A;
  719. volatile uint16_t offset10C;
  720. volatile uint16_t offset10E;
  721. volatile uint16_t offset110;
  722. volatile uint16_t offset112;
  723. volatile uint16_t offset114;
  724. volatile uint16_t offset116;
  725. volatile uint16_t offset118;
  726. volatile uint16_t offset11A;
  727. volatile uint16_t offset11C;
  728. volatile uint16_t offset11E;
  729. volatile uint16_t offset120;
  730. volatile uint16_t offset122;
  731. volatile uint16_t offset124;
  732. volatile uint16_t offset126;
  733. volatile uint16_t offset128;
  734. volatile uint16_t offset12A;
  735. volatile uint16_t offset12C;
  736. volatile uint16_t offset12E;
  737. volatile uint16_t offset130;
  738. volatile uint16_t offset132;
  739. volatile uint16_t offset134;
  740. volatile uint16_t offset136;
  741. volatile uint16_t offset138;
  742. volatile uint16_t offset13A;
  743. volatile uint16_t offset13C;
  744. volatile uint16_t offset13E;
  745. volatile uint16_t offset140;
  746. volatile uint16_t offset142;
  747. volatile uint16_t offset144;
  748. volatile uint16_t offset146;
  749. volatile uint16_t offset148;
  750. volatile uint16_t offset14A;
  751. volatile uint16_t offset14C;
  752. volatile uint16_t offset14E;
  753. volatile uint16_t offset150;
  754. volatile uint16_t offset152;
  755. volatile uint16_t offset154;
  756. volatile uint16_t offset156;
  757. volatile uint16_t offset158;
  758. volatile uint16_t offset15A;
  759. volatile uint16_t offset15C;
  760. volatile uint16_t offset15E;
  761. volatile uint16_t offset160;
  762. volatile uint16_t offset162;
  763. volatile uint16_t offset164;
  764. volatile uint16_t offset166;
  765. volatile uint16_t offset168;
  766. volatile uint16_t offset16A;
  767. volatile uint16_t offset16C;
  768. volatile uint16_t offset16E;
  769. volatile uint16_t offset170;
  770. volatile uint16_t offset172;
  771. volatile uint16_t offset174;
  772. volatile uint16_t offset176;
  773. volatile uint16_t offset178;
  774. volatile uint16_t offset17A;
  775. volatile uint16_t offset17C;
  776. volatile uint16_t offset17E;
  777. volatile uint16_t offset180;
  778. volatile uint16_t offset182;
  779. volatile uint16_t offset184;
  780. volatile uint16_t offset186;
  781. volatile uint16_t offset188;
  782. volatile uint16_t offset18A;
  783. volatile uint16_t offset18C;
  784. volatile uint16_t offset18E;
  785. volatile uint16_t offset190;
  786. volatile uint16_t offset192;
  787. volatile uint16_t offset194;
  788. volatile uint16_t offset196;
  789. volatile uint16_t offset198;
  790. volatile uint16_t offset19A;
  791. volatile uint16_t offset19C;
  792. volatile uint16_t offset19E;
  793. volatile uint16_t offset1A0;
  794. volatile uint16_t offset1A2;
  795. volatile uint16_t offset1A4;
  796. volatile uint16_t offset1A6;
  797. volatile uint16_t offset1A8;
  798. volatile uint16_t offset1AA;
  799. volatile uint16_t offset1AC;
  800. volatile uint16_t offset1AE;
  801. volatile uint16_t offset1B0;
  802. volatile uint16_t offset1B2;
  803. volatile uint16_t offset1B4;
  804. volatile uint16_t offset1B6;
  805. volatile uint16_t offset1B8;
  806. volatile uint16_t offset1BA;
  807. volatile uint16_t offset1BC;
  808. volatile uint16_t offset1BE;
  809. volatile uint16_t offset1C0;
  810. volatile uint16_t offset1C2;
  811. volatile uint16_t offset1C4;
  812. volatile uint16_t offset1C6;
  813. volatile uint16_t offset1C8;
  814. volatile uint16_t offset1CA;
  815. volatile uint16_t offset1CC;
  816. volatile uint16_t offset1CE;
  817. volatile uint16_t offset1D0;
  818. volatile uint16_t offset1D2;
  819. volatile uint16_t offset1D4;
  820. volatile uint16_t offset1D6;
  821. volatile uint16_t offset1D8;
  822. volatile uint16_t offset1DA;
  823. volatile uint16_t offset1DC;
  824. volatile uint16_t offset1DE;
  825. volatile uint16_t offset1E0;
  826. volatile uint16_t offset1E2;
  827. volatile uint16_t offset1E4;
  828. volatile uint16_t offset1E6;
  829. volatile uint16_t offset1E8;
  830. volatile uint16_t offset1EA;
  831. volatile uint16_t offset1EC;
  832. volatile uint16_t offset1EE;
  833. volatile uint16_t offset1F0;
  834. volatile uint16_t offset1F2;
  835. volatile uint16_t offset1F4;
  836. volatile uint16_t offset1F6;
  837. volatile uint16_t offset1F8;
  838. volatile uint16_t offset1FA;
  839. volatile uint16_t offset1FC;
  840. volatile uint16_t offset1FE;
  841. } IMXRT_REGISTER16_t;
  842. typedef struct {
  843. volatile uint8_t offset00;
  844. volatile uint8_t offset01;
  845. volatile uint8_t offset02;
  846. volatile uint8_t offset03;
  847. volatile uint8_t offset04;
  848. volatile uint8_t offset05;
  849. volatile uint8_t offset06;
  850. volatile uint8_t offset07;
  851. volatile uint8_t offset08;
  852. volatile uint8_t offset09;
  853. volatile uint8_t offset0A;
  854. volatile uint8_t offset0B;
  855. volatile uint8_t offset0C;
  856. volatile uint8_t offset0D;
  857. volatile uint8_t offset0E;
  858. volatile uint8_t offset0F;
  859. } IMXRT_REGISTER8_t;
  860. // 13.3: page 456
  861. #define IMXRT_CMP1 (*(IMXRT_REGISTER8_t *)0x40094000)
  862. #define CMP1_CR0 (IMXRT_CMP1.offset00)
  863. #define CMP1_CR1 (IMXRT_CMP1.offset01)
  864. #define CMP1_FPR (IMXRT_CMP1.offset02)
  865. #define CMP1_SCR (IMXRT_CMP1.offset03)
  866. #define CMP1_DACCR (IMXRT_CMP1.offset04)
  867. #define CMP1_MUXCR (IMXRT_CMP1.offset05)
  868. #define IMXRT_CMP2 (*(IMXRT_REGISTER8_t *)0x40094008)
  869. #define CMP2_CR0 (IMXRT_CMP2.offset00)
  870. #define CMP2_CR1 (IMXRT_CMP2.offset01)
  871. #define CMP2_FPR (IMXRT_CMP2.offset02)
  872. #define CMP2_SCR (IMXRT_CMP2.offset03)
  873. #define CMP2_DACCR (IMXRT_CMP2.offset04)
  874. #define CMP2_MUXCR (IMXRT_CMP2.offset05)
  875. #define IMXRT_CMP3 (*(IMXRT_REGISTER8_t *)0x40094010)
  876. #define CMP3_CR0 (IMXRT_CMP3.offset00)
  877. #define CMP3_CR1 (IMXRT_CMP3.offset01)
  878. #define CMP3_FPR (IMXRT_CMP3.offset02)
  879. #define CMP3_SCR (IMXRT_CMP3.offset03)
  880. #define CMP3_DACCR (IMXRT_CMP3.offset04)
  881. #define CMP3_MUXCR (IMXRT_CMP3.offset05)
  882. #define IMXRT_CMP4 (*(IMXRT_REGISTER8_t *)0x40094018)
  883. #define CMP4_CR0 (IMXRT_CMP4.offset00)
  884. #define CMP4_CR1 (IMXRT_CMP4.offset01)
  885. #define CMP4_FPR (IMXRT_CMP4.offset02)
  886. #define CMP4_SCR (IMXRT_CMP4.offset03)
  887. #define CMP4_DACCR (IMXRT_CMP4.offset04)
  888. #define CMP4_MUXCR (IMXRT_CMP4.offset05)
  889. // 14.6: page 505
  890. #define IMXRT_ADC1 (*(IMXRT_REGISTER32_t *)0x400C4000)
  891. #define ADC1_HC0 (IMXRT_ADC1.offset000)
  892. #define ADC1_HC1 (IMXRT_ADC1.offset004)
  893. #define ADC1_HC2 (IMXRT_ADC1.offset008)
  894. #define ADC1_HC3 (IMXRT_ADC1.offset00C)
  895. #define ADC1_HC4 (IMXRT_ADC1.offset010)
  896. #define ADC1_HC5 (IMXRT_ADC1.offset014)
  897. #define ADC1_HC6 (IMXRT_ADC1.offset018)
  898. #define ADC1_HC7 (IMXRT_ADC1.offset01C)
  899. #define ADC1_HS (IMXRT_ADC1.offset020)
  900. #define ADC1_R0 (IMXRT_ADC1.offset024)
  901. #define ADC1_R1 (IMXRT_ADC1.offset028)
  902. #define ADC1_R2 (IMXRT_ADC1.offset02C)
  903. #define ADC1_R3 (IMXRT_ADC1.offset030)
  904. #define ADC1_R4 (IMXRT_ADC1.offset034)
  905. #define ADC1_R5 (IMXRT_ADC1.offset038)
  906. #define ADC1_R6 (IMXRT_ADC1.offset03C)
  907. #define ADC1_R7 (IMXRT_ADC1.offset040)
  908. #define ADC1_CFG (IMXRT_ADC1.offset044)
  909. #define ADC1_GC (IMXRT_ADC1.offset048)
  910. #define ADC1_GS (IMXRT_ADC1.offset04C)
  911. #define ADC1_CV (IMXRT_ADC1.offset050)
  912. #define ADC1_OFS (IMXRT_ADC1.offset054)
  913. #define ADC1_CAL (IMXRT_ADC1.offset058)
  914. #define IMXRT_ADC2 (*(IMXRT_REGISTER32_t *)0x400C8000)
  915. #define ADC2_HC0 (IMXRT_ADC2.offset000)
  916. #define ADC2_HC1 (IMXRT_ADC2.offset004)
  917. #define ADC2_HC2 (IMXRT_ADC2.offset008)
  918. #define ADC2_HC3 (IMXRT_ADC2.offset00C)
  919. #define ADC2_HC4 (IMXRT_ADC2.offset010)
  920. #define ADC2_HC5 (IMXRT_ADC2.offset014)
  921. #define ADC2_HC6 (IMXRT_ADC2.offset018)
  922. #define ADC2_HC7 (IMXRT_ADC2.offset01C)
  923. #define ADC2_HS (IMXRT_ADC2.offset020)
  924. #define ADC2_R0 (IMXRT_ADC2.offset024)
  925. #define ADC2_R1 (IMXRT_ADC2.offset028)
  926. #define ADC2_R2 (IMXRT_ADC2.offset02C)
  927. #define ADC2_R3 (IMXRT_ADC2.offset030)
  928. #define ADC2_R4 (IMXRT_ADC2.offset034)
  929. #define ADC2_R5 (IMXRT_ADC2.offset038)
  930. #define ADC2_R6 (IMXRT_ADC2.offset03C)
  931. #define ADC2_R7 (IMXRT_ADC2.offset040)
  932. #define ADC2_CFG (IMXRT_ADC2.offset044)
  933. #define ADC2_GC (IMXRT_ADC2.offset048)
  934. #define ADC2_GS (IMXRT_ADC2.offset04C)
  935. #define ADC2_CV (IMXRT_ADC2.offset050)
  936. #define ADC2_OFS (IMXRT_ADC2.offset054)
  937. #define ADC2_CAL (IMXRT_ADC2.offset058)
  938. #define ADC_HC_AIEN ((uint32_t)(1<<7))
  939. #define ADC_HC_ADCH(n) ((uint32_t)(((n) & 0x1F) << 0))
  940. #define ADC_HS_COCO0 ((uint32_t)(1<<0))
  941. #define ADC_CFG_OVWREN ((uint32_t)(1<<16))
  942. #define ADC_CFG_AVGS(n) ((uint32_t)(((n) & 0x03) << 14))
  943. #define ADC_CFG_ADTRG ((uint32_t)(1<<13))
  944. #define ADC_CFG_REFSEL(n) ((uint32_t)(((n) & 0x03) << 11))
  945. #define ADC_CFG_ADHSC ((uint32_t)(1<<10))
  946. #define ADC_CFG_ADSTS(n) ((uint32_t)(((n) & 0x03) << 8))
  947. #define ADC_CFG_ADLPC ((uint32_t)(1<<7))
  948. #define ADC_CFG_ADIV(n) ((uint32_t)(((n) & 0x03) << 5))
  949. #define ADC_CFG_ADLSMP ((uint32_t)(1<<4))
  950. #define ADC_CFG_MODE(n) ((uint32_t)(((n) & 0x03) << 2))
  951. #define ADC_CFG_ADICLK(n) ((uint32_t)(((n) & 0x03) << 0))
  952. #define ADC_GC_CAL ((uint32_t)(1<<7))
  953. #define ADC_GC_ADCO ((uint32_t)(1<<6))
  954. #define ADC_GC_AVGE ((uint32_t)(1<<5))
  955. #define ADC_GC_ACFE ((uint32_t)(1<<4))
  956. #define ADC_GC_ACFGT ((uint32_t)(1<<3))
  957. #define ADC_GC_ACREN ((uint32_t)(1<<2))
  958. #define ADC_GC_DMAEN ((uint32_t)(1<<1))
  959. #define ADC_GC_ADACKEN ((uint32_t)(1<<0))
  960. #define ADC_GS_AWKST ((uint32_t)(1<<2))
  961. #define ADC_GS_CALF ((uint32_t)(1<<1))
  962. #define ADC_GS_ADACT ((uint32_t)(1<<0))
  963. #define ADC_CV_CV2(n) ((uint32_t)(((n) & 0xFFF) << 16))
  964. #define ADC_CV_CV1(n) ((uint32_t)(((n) & 0xFFF) << 0))
  965. #define ADC_OFS_SIGN ((uint32_t)(1<<12))
  966. #define ADC_OFS_OFS(n) ((uint32_t)(((n) & 0xFFF) << 0))
  967. #define ADC_CAL_CAL_CODE(n) ((uint32_t)(((n) & 0x0F) << 0))
  968. // 15.4.1.1: page 527
  969. #define IMXRT_ADC_ETC (*(IMXRT_REGISTER32_t *)0x403B0000)
  970. #define ADC_ETC_CTRL (IMXRT_ADC_ETC.offset000)
  971. #define ADC_ETC_DONE0_1_IRQ (IMXRT_ADC_ETC.offset004)
  972. #define ADC_ETC_DONE2_ERR_IRQ (IMXRT_ADC_ETC.offset008)
  973. #define ADC_ETC_DMA_CTRL (IMXRT_ADC_ETC.offset00C)
  974. #define ADC_ETC_TRIG0_CTRL (IMXRT_ADC_ETC.offset010)
  975. #define ADC_ETC_TRIG0_COUNTER (IMXRT_ADC_ETC.offset014)
  976. #define ADC_ETC_TRIG0_CHAIN_1_0 (IMXRT_ADC_ETC.offset018)
  977. #define ADC_ETC_TRIG0_CHAIN_3_2 (IMXRT_ADC_ETC.offset01C)
  978. #define ADC_ETC_TRIG0_CHAIN_5_4 (IMXRT_ADC_ETC.offset020)
  979. #define ADC_ETC_TRIG0_CHAIN_7_6 (IMXRT_ADC_ETC.offset024)
  980. #define ADC_ETC_TRIG0_RESULT_1_0 (IMXRT_ADC_ETC.offset028)
  981. #define ADC_ETC_TRIG0_RESULT_3_2 (IMXRT_ADC_ETC.offset02C)
  982. #define ADC_ETC_TRIG0_RESULT_5_4 (IMXRT_ADC_ETC.offset030)
  983. #define ADC_ETC_TRIG0_RESULT_7_6 (IMXRT_ADC_ETC.offset034)
  984. #define ADC_ETC_TRIG1_CTRL (IMXRT_ADC_ETC.offset038)
  985. #define ADC_ETC_TRIG1_COUNTER (IMXRT_ADC_ETC.offset03C)
  986. #define ADC_ETC_TRIG1_CHAIN_1_0 (IMXRT_ADC_ETC.offset040)
  987. #define ADC_ETC_TRIG1_CHAIN_3_2 (IMXRT_ADC_ETC.offset044)
  988. #define ADC_ETC_TRIG1_CHAIN_5_4 (IMXRT_ADC_ETC.offset048)
  989. #define ADC_ETC_TRIG1_CHAIN_7_6 (IMXRT_ADC_ETC.offset04C)
  990. #define ADC_ETC_TRIG1_RESULT_1_0 (IMXRT_ADC_ETC.offset050)
  991. #define ADC_ETC_TRIG1_RESULT_3_2 (IMXRT_ADC_ETC.offset054)
  992. #define ADC_ETC_TRIG1_RESULT_5_4 (IMXRT_ADC_ETC.offset058)
  993. #define ADC_ETC_TRIG1_RESULT_7_6 (IMXRT_ADC_ETC.offset05C)
  994. #define ADC_ETC_TRIG2_CTRL (IMXRT_ADC_ETC.offset060)
  995. #define ADC_ETC_TRIG2_COUNTER (IMXRT_ADC_ETC.offset064)
  996. #define ADC_ETC_TRIG2_CHAIN_1_0 (IMXRT_ADC_ETC.offset068)
  997. #define ADC_ETC_TRIG2_CHAIN_3_2 (IMXRT_ADC_ETC.offset06C)
  998. #define ADC_ETC_TRIG2_CHAIN_5_4 (IMXRT_ADC_ETC.offset070)
  999. #define ADC_ETC_TRIG2_CHAIN_7_6 (IMXRT_ADC_ETC.offset074)
  1000. #define ADC_ETC_TRIG2_RESULT_1_0 (IMXRT_ADC_ETC.offset078)
  1001. #define ADC_ETC_TRIG2_RESULT_3_2 (IMXRT_ADC_ETC.offset07C)
  1002. #define ADC_ETC_TRIG2_RESULT_5_4 (IMXRT_ADC_ETC.offset080)
  1003. #define ADC_ETC_TRIG2_RESULT_7_6 (IMXRT_ADC_ETC.offset084)
  1004. #define ADC_ETC_TRIG3_CTRL (IMXRT_ADC_ETC.offset088)
  1005. #define ADC_ETC_TRIG3_COUNTER (IMXRT_ADC_ETC.offset08C)
  1006. #define ADC_ETC_TRIG3_CHAIN_1_0 (IMXRT_ADC_ETC.offset090)
  1007. #define ADC_ETC_TRIG3_CHAIN_3_2 (IMXRT_ADC_ETC.offset094)
  1008. #define ADC_ETC_TRIG3_CHAIN_5_4 (IMXRT_ADC_ETC.offset098)
  1009. #define ADC_ETC_TRIG3_CHAIN_7_6 (IMXRT_ADC_ETC.offset09C)
  1010. #define ADC_ETC_TRIG3_RESULT_1_0 (IMXRT_ADC_ETC.offset0A0)
  1011. #define ADC_ETC_TRIG3_RESULT_3_2 (IMXRT_ADC_ETC.offset0A4)
  1012. #define ADC_ETC_TRIG3_RESULT_5_4 (IMXRT_ADC_ETC.offset0A8)
  1013. #define ADC_ETC_TRIG3_RESULT_7_6 (IMXRT_ADC_ETC.offset0AC)
  1014. #define ADC_ETC_TRIG4_CTRL (IMXRT_ADC_ETC.offset0B0)
  1015. #define ADC_ETC_TRIG4_COUNTER (IMXRT_ADC_ETC.offset0B4)
  1016. #define ADC_ETC_TRIG4_CHAIN_1_0 (IMXRT_ADC_ETC.offset0B8)
  1017. #define ADC_ETC_TRIG4_CHAIN_3_2 (IMXRT_ADC_ETC.offset0BC)
  1018. #define ADC_ETC_TRIG4_CHAIN_5_4 (IMXRT_ADC_ETC.offset0C0)
  1019. #define ADC_ETC_TRIG4_CHAIN_7_6 (IMXRT_ADC_ETC.offset0C4)
  1020. #define ADC_ETC_TRIG4_RESULT_1_0 (IMXRT_ADC_ETC.offset0C8)
  1021. #define ADC_ETC_TRIG4_RESULT_3_2 (IMXRT_ADC_ETC.offset0CC)
  1022. #define ADC_ETC_TRIG4_RESULT_5_4 (IMXRT_ADC_ETC.offset0D0)
  1023. #define ADC_ETC_TRIG4_RESULT_7_6 (IMXRT_ADC_ETC.offset0D4)
  1024. #define ADC_ETC_TRIG5_CTRL (IMXRT_ADC_ETC.offset0D8)
  1025. #define ADC_ETC_TRIG5_COUNTER (IMXRT_ADC_ETC.offset0DC)
  1026. #define ADC_ETC_TRIG5_CHAIN_1_0 (IMXRT_ADC_ETC.offset0E0)
  1027. #define ADC_ETC_TRIG5_CHAIN_3_2 (IMXRT_ADC_ETC.offset0E4)
  1028. #define ADC_ETC_TRIG5_CHAIN_5_4 (IMXRT_ADC_ETC.offset0E8)
  1029. #define ADC_ETC_TRIG5_CHAIN_7_6 (IMXRT_ADC_ETC.offset0EC)
  1030. #define ADC_ETC_TRIG5_RESULT_1_0 (IMXRT_ADC_ETC.offset0F0)
  1031. #define ADC_ETC_TRIG5_RESULT_3_2 (IMXRT_ADC_ETC.offset0F4)
  1032. #define ADC_ETC_TRIG5_RESULT_5_4 (IMXRT_ADC_ETC.offset0F8)
  1033. #define ADC_ETC_TRIG5_RESULT_7_6 (IMXRT_ADC_ETC.offset0FC)
  1034. #define ADC_ETC_TRIG6_CTRL (IMXRT_ADC_ETC.offset100)
  1035. #define ADC_ETC_TRIG6_COUNTER (IMXRT_ADC_ETC.offset104)
  1036. #define ADC_ETC_TRIG6_CHAIN_1_0 (IMXRT_ADC_ETC.offset108)
  1037. #define ADC_ETC_TRIG6_CHAIN_3_2 (IMXRT_ADC_ETC.offset10C)
  1038. #define ADC_ETC_TRIG6_CHAIN_5_4 (IMXRT_ADC_ETC.offset110)
  1039. #define ADC_ETC_TRIG6_CHAIN_7_6 (IMXRT_ADC_ETC.offset114)
  1040. #define ADC_ETC_TRIG6_RESULT_1_0 (IMXRT_ADC_ETC.offset118)
  1041. #define ADC_ETC_TRIG6_RESULT_3_2 (IMXRT_ADC_ETC.offset11C)
  1042. #define ADC_ETC_TRIG6_RESULT_5_4 (IMXRT_ADC_ETC.offset120)
  1043. #define ADC_ETC_TRIG6_RESULT_7_6 (IMXRT_ADC_ETC.offset124)
  1044. #define ADC_ETC_TRIG7_CTRL (IMXRT_ADC_ETC.offset128)
  1045. #define ADC_ETC_TRIG7_COUNTER (IMXRT_ADC_ETC.offset12C)
  1046. #define ADC_ETC_TRIG7_CHAIN_1_0 (IMXRT_ADC_ETC.offset130)
  1047. #define ADC_ETC_TRIG7_CHAIN_3_2 (IMXRT_ADC_ETC.offset134)
  1048. #define ADC_ETC_TRIG7_CHAIN_5_4 (IMXRT_ADC_ETC.offset138)
  1049. #define ADC_ETC_TRIG7_CHAIN_7_6 (IMXRT_ADC_ETC.offset13C)
  1050. #define ADC_ETC_TRIG7_RESULT_1_0 (IMXRT_ADC_ETC.offset140)
  1051. #define ADC_ETC_TRIG7_RESULT_3_2 (IMXRT_ADC_ETC.offset144)
  1052. #define ADC_ETC_TRIG7_RESULT_5_4 (IMXRT_ADC_ETC.offset148)
  1053. #define ADC_ETC_TRIG7_RESULT_7_6 (IMXRT_ADC_ETC.offset14C)
  1054. // 16.7: page 640
  1055. #define IMXRT_AIPSTZ1 (*(IMXRT_REGISTER32_t *)0x4007C000)
  1056. #define AIPSTZ1_MPR (IMXRT_AIPSTZ1.offset000)
  1057. #define AIPSTZ1_OPACR (IMXRT_AIPSTZ1.offset040)
  1058. #define AIPSTZ1_OPACR1 (IMXRT_AIPSTZ1.offset044)
  1059. #define AIPSTZ1_OPACR2 (IMXRT_AIPSTZ1.offset048)
  1060. #define AIPSTZ1_OPACR3 (IMXRT_AIPSTZ1.offset04C)
  1061. #define AIPSTZ1_OPACR4 (IMXRT_AIPSTZ1.offset050)
  1062. #define IMXRT_AIPSTZ2 (*(IMXRT_REGISTER32_t *)0x4017C000)
  1063. #define AIPSTZ2_MPR (IMXRT_AIPSTZ2.offset000)
  1064. #define AIPSTZ2_OPACR (IMXRT_AIPSTZ2.offset040)
  1065. #define AIPSTZ2_OPACR1 (IMXRT_AIPSTZ2.offset044)
  1066. #define AIPSTZ2_OPACR2 (IMXRT_AIPSTZ2.offset048)
  1067. #define AIPSTZ2_OPACR3 (IMXRT_AIPSTZ2.offset04C)
  1068. #define AIPSTZ2_OPACR4 (IMXRT_AIPSTZ2.offset050)
  1069. #define IMXRT_AIPSTZ3 (*(IMXRT_REGISTER32_t *)0x4027C000)
  1070. #define AIPSTZ3_MPR (IMXRT_AIPSTZ3.offset000)
  1071. #define AIPSTZ3_OPACR (IMXRT_AIPSTZ3.offset040)
  1072. #define AIPSTZ3_OPACR1 (IMXRT_AIPSTZ3.offset044)
  1073. #define AIPSTZ3_OPACR2 (IMXRT_AIPSTZ3.offset048)
  1074. #define AIPSTZ3_OPACR3 (IMXRT_AIPSTZ3.offset04C)
  1075. #define AIPSTZ3_OPACR4 (IMXRT_AIPSTZ3.offset050)
  1076. #define IMXRT_AIPSTZ4 (*(IMXRT_REGISTER32_t *)0x4037C000)
  1077. #define AIPSTZ4_MPR (IMXRT_AIPSTZ4.offset000)
  1078. #define AIPSTZ4_OPACR (IMXRT_AIPSTZ4.offset040)
  1079. #define AIPSTZ4_OPACR1 (IMXRT_AIPSTZ4.offset044)
  1080. #define AIPSTZ4_OPACR2 (IMXRT_AIPSTZ4.offset048)
  1081. #define AIPSTZ4_OPACR3 (IMXRT_AIPSTZ4.offset04C)
  1082. #define AIPSTZ4_OPACR4 (IMXRT_AIPSTZ4.offset050)
  1083. // 17.3: page 662
  1084. #define IMXRT_AOI1 (*(IMXRT_REGISTER16_t *)0x403B4000)
  1085. #define AOI1_BFCRT010 (IMXRT_AOI1.offset000)
  1086. #define AOI1_BFCRT230 (IMXRT_AOI1.offset002)
  1087. #define AOI1_BFCRT011 (IMXRT_AOI1.offset004)
  1088. #define AOI1_BFCRT231 (IMXRT_AOI1.offset006)
  1089. #define AOI1_BFCRT012 (IMXRT_AOI1.offset008)
  1090. #define AOI1_BFCRT232 (IMXRT_AOI1.offset00A)
  1091. #define AOI1_BFCRT013 (IMXRT_AOI1.offset00C)
  1092. #define AOI1_BFCRT233 (IMXRT_AOI1.offset00E)
  1093. #define IMXRT_AOI2 (*(IMXRT_REGISTER16_t *)0x403B8000)
  1094. #define AOI2_BFCRT010 (IMXRT_AOI2.offset000)
  1095. #define AOI2_BFCRT230 (IMXRT_AOI2.offset002)
  1096. #define AOI2_BFCRT011 (IMXRT_AOI2.offset004)
  1097. #define AOI2_BFCRT231 (IMXRT_AOI2.offset006)
  1098. #define AOI2_BFCRT012 (IMXRT_AOI2.offset008)
  1099. #define AOI2_BFCRT232 (IMXRT_AOI2.offset00A)
  1100. #define AOI2_BFCRT013 (IMXRT_AOI2.offset00C)
  1101. #define AOI2_BFCRT233 (IMXRT_AOI2.offset00E)
  1102. // 18.7: page 703
  1103. #define IMXRT_CCM (*(IMXRT_REGISTER32_t *)0x400FC000)
  1104. #define CCM_CCR (IMXRT_CCM.offset000)
  1105. #define CCM_CSR (IMXRT_CCM.offset008)
  1106. #define CCM_CCSR (IMXRT_CCM.offset00C)
  1107. #define CCM_CACRR (IMXRT_CCM.offset010)
  1108. #define CCM_CBCDR (IMXRT_CCM.offset014)
  1109. #define CCM_CBCMR (IMXRT_CCM.offset018)
  1110. #define CCM_CSCMR1 (IMXRT_CCM.offset01C)
  1111. #define CCM_CSCMR2 (IMXRT_CCM.offset020)
  1112. #define CCM_CSCDR1 (IMXRT_CCM.offset024)
  1113. #define CCM_CS1CDR (IMXRT_CCM.offset028)
  1114. #define CCM_CS2CDR (IMXRT_CCM.offset02C)
  1115. #define CCM_CDCDR (IMXRT_CCM.offset030)
  1116. #define CCM_CSCDR2 (IMXRT_CCM.offset038)
  1117. #define CCM_CSCDR3 (IMXRT_CCM.offset03C)
  1118. #define CCM_CDHIPR (IMXRT_CCM.offset048)
  1119. #define CCM_CLPCR (IMXRT_CCM.offset054)
  1120. #define CCM_CISR (IMXRT_CCM.offset058)
  1121. #define CCM_CIMR (IMXRT_CCM.offset05C)
  1122. #define CCM_CCOSR (IMXRT_CCM.offset060)
  1123. #define CCM_CGPR (IMXRT_CCM.offset064)
  1124. #define CCM_CCGR0 (IMXRT_CCM.offset068)
  1125. #define CCM_CCGR1 (IMXRT_CCM.offset06C)
  1126. #define CCM_CCGR2 (IMXRT_CCM.offset070)
  1127. #define CCM_CCGR3 (IMXRT_CCM.offset074)
  1128. #define CCM_CCGR4 (IMXRT_CCM.offset078)
  1129. #define CCM_CCGR5 (IMXRT_CCM.offset07C)
  1130. #define CCM_CCGR6 (IMXRT_CCM.offset080)
  1131. #define CCM_CMEOR (IMXRT_CCM.offset088)
  1132. #define CCM_CCR_RBC_EN ((uint32_t)(1<<27))
  1133. #define CCM_CCR_REG_BYPASS_COUNT(n) ((uint32_t)(((n) & 0x3F) << 21))
  1134. #define CCM_CCR_COSC_EN ((uint32_t)(1<<12))
  1135. #define CCM_CCR_OSCNT(n) ((uint32_t)(((n) & 0xFF) << 0))
  1136. #define CCM_CSR_COSC_READY ((uint32_t)(1<<5))
  1137. #define CCM_CSR_CAMP2_READY ((uint32_t)(1<<3))
  1138. #define CCM_CSR_REF_EN_B ((uint32_t)(1<<0))
  1139. #define CCM_CCSR_PLL3_SW_CLK_SEL ((uint32_t)(1<<0))
  1140. #define CCM_CACRR_ARM_PODF(n) ((uint32_t)(((n) & 0x07) << 0))
  1141. #define CCM_CACRR_ARM_PODF_MASK ((uint32_t)(0x07 << 0))
  1142. #define CCM_CBCDR_PERIPH_CLK2_PODF(n) ((uint32_t)(((n) & 0x07) << 27))
  1143. #define CCM_CBCDR_PERIPH_CLK2_PODF_MASK ((uint32_t)(0x07 << 27))
  1144. #define CCM_CBCDR_PERIPH_CLK_SEL ((uint32_t)(1<<25))
  1145. #define CCM_CBCDR_SEMC_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1146. #define CCM_CBCDR_AHB_PODF(n) ((uint32_t)(((n) & 0x07) << 10))
  1147. #define CCM_CBCDR_AHB_PODF_MASK ((uint32_t)(0x07 << 10))
  1148. #define CCM_CBCDR_IPG_PODF(n) ((uint32_t)(((n) & 0x03) << 8))
  1149. #define CCM_CBCDR_IPG_PODF_MASK ((uint32_t)(0x03 << 8))
  1150. #define CCM_CBCDR_SEMC_ALT_CLK_SEL ((uint32_t)(1<<7))
  1151. #define CCM_CBCDR_SEMC_CLK_SEL ((uint32_t)(1<<6))
  1152. #define CCM_CBCMR_LPSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 26))
  1153. #define CCM_CBCMR_LCDIF_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1154. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 18))
  1155. #define CCM_CBCMR_TRACE_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1156. #define CCM_CBCMR_PERIPH_CLK2_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1157. #define CCM_CBCMR_PERIPH_CLK2_SEL_MASK ((uint32_t)(0x03 << 12))
  1158. #define CCM_CBCMR_LPSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 4))
  1159. #define CCM_CBCMR_LPSPI_PODF_MASK ((uint32_t)(0x07 << 26))
  1160. #define CCM_CBCMR_LCDIF_PODF_MASK ((uint32_t)(0x07 << 23))
  1161. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL_MASK ((uint32_t)(0x03 << 18))
  1162. #define CCM_CBCMR_TRACE_CLK_SEL_MASK ((uint32_t)(0x03 << 14))
  1163. #define CCM_CBCMR_LPSPI_CLK_SEL_MASK ((uint32_t)(0x03 << 4))
  1164. #define CCM_CSCMR1_FLEXSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 29))
  1165. #define CCM_CSCMR1_FLEXSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1166. #define CCM_CSCMR1_USDHC2_CLK_SEL ((uint32_t)(1<<17))
  1167. #define CCM_CSCMR1_USDHC1_CLK_SEL ((uint32_t)(1<<16))
  1168. #define CCM_CSCMR1_SAI3_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1169. #define CCM_CSCMR1_SAI2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1170. #define CCM_CSCMR1_SAI1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  1171. #define CCM_CSCMR1_PERCLK_CLK_SEL ((uint32_t)(1<<6))
  1172. #define CCM_CSCMR1_PERCLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1173. #define CCM_CSCMR2_FLEXIO2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 19))
  1174. #define CCM_CSCMR2_CAN_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  1175. #define CCM_CSCMR2_CAN_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 2))
  1176. #define CCM_CSCDR1_TRACE_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1177. #define CCM_CSCDR1_USDHC2_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1178. #define CCM_CSCDR1_USDHC1_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1179. #define CCM_CSCDR1_UART_CLK_SEL ((uint32_t)(1<<6))
  1180. #define CCM_CSCDR1_UART_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1181. #define CCM_CS1CDR_FLEXIO2_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1182. #define CCM_CS1CDR_SAI3_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 22))
  1183. #define CCM_CS1CDR_SAI3_CLK_PODF(n) ((uint32_t)(((n) & 0x1F) << 16))
  1184. #define CCM_CS1CDR_FLEXIO2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 9))
  1185. #define CCM_CS1CDR_SAI1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1186. #define CCM_CS1CDR_SAI1_CLK_PODF(n) ((uint32_t)(((n) & 0x1F) << 0))
  1187. #define CCM_CS2CDR_SAI2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1188. #define CCM_CS2CDR_SAI2_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1189. #define CCM_CDCDR_SPDIF0_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 25))
  1190. #define CCM_CDCDR_SPDIF0_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 22))
  1191. #define CCM_CDCDR_SPDIF0_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 20))
  1192. #define CCM_CDCDR_FLEXIO1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1193. #define CCM_CDCDR_FLEXIO1_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 9))
  1194. #define CCM_CDCDR_FLEXIO1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1195. #define CCM_CSCDR2_LPI2C_CLK_PODF(n) ((uint32_t)(((n) & 0x1F) << 19))
  1196. #define CCM_CSCDR2_LPI2C_CLK_SEL ((uint32_t)(1<<18))
  1197. #define CCM_CSCDR2_LCDIF_PRE_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 15))
  1198. #define CCM_CSCDR2_LCDIF_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1199. #define CCM_CSCDR2_LCDIF_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 9))
  1200. #define CCM_CSCDR3_CSI_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1201. #define CCM_CSCDR3_CSI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 9))
  1202. #define CCM_CDHIPR_ARM_PODF_BUSY ((uint32_t)(1<<16))
  1203. #define CCM_CDHIPR_PERIPH_CLK_SEL_BUSY ((uint32_t)(1<<5))
  1204. #define CCM_CDHIPR_PERIPH2_CLK_SEL_BUSY ((uint32_t)(1<<3))
  1205. #define CCM_CDHIPR_AHB_PODF_BUSY ((uint32_t)(1<<1))
  1206. #define CCM_CDHIPR_SEMC_PODF_BUSY ((uint32_t)(1<<0))
  1207. #define CCM_CLPCR_MASK_L2CC_IDLE ((uint32_t)(1<<27))
  1208. #define CCM_CLPCR_MASK_SCU_IDLE ((uint32_t)(1<<26))
  1209. #define CCM_CLPCR_MASK_CORE0_WFI ((uint32_t)(1<<22))
  1210. #define CCM_CLPCR_BYPASS_LPM_HS0 ((uint32_t)(1<<21))
  1211. #define CCM_CLPCR_BYPASS_LPM_HS1 ((uint32_t)(1<<19))
  1212. #define CCM_CLPCR_COSC_PWRDOWN ((uint32_t)(1<<11))
  1213. #define CCM_CLPCR_STBY_COUNT(n) ((uint32_t)(((n) & 0x03) << 9))
  1214. #define CCM_CLPCR_VSTBY ((uint32_t)(1<<8))
  1215. #define CCM_CLPCR_DIS_REF_OSC ((uint32_t)(1<<7))
  1216. #define CCM_CLPCR_SBYOS ((uint32_t)(1<<6))
  1217. #define CCM_CLPCR_ARM_CLK_DIS_ON_LPM ((uint32_t)(1<<5))
  1218. #define CCM_CLPCR_LPM(n) ((uint32_t)(((n) & 0x03) << 0))
  1219. #define CCM_CISR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1220. #define CCM_CISR_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1221. #define CCM_CISR_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1222. #define CCM_CISR_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1223. #define CCM_CISR_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1224. #define CCM_CISR_COSC_READY ((uint32_t)(1<<6))
  1225. #define CCM_CISR_LRF_PLL ((uint32_t)(1<<0))
  1226. #define CCM_CIMR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1227. #define CCM_CIMR_MASK_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1228. #define CCM_CIMR_MASK_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1229. #define CCM_CIMR_MASK_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1230. #define CCM_CIMR_MASK_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1231. #define CCM_CIMR_MASK_COSC_READY ((uint32_t)(1<<6))
  1232. #define CCM_CIMR_MASK_LRF_PLL ((uint32_t)(1<<0))
  1233. #define CCM_CCOSR_CLKO2_EN ((uint32_t)(1<<24))
  1234. #define CCM_CCOSR_CLKO2_DIV(n) ((uint32_t)(((n) & 0x07) << 21))
  1235. #define CCM_CCOSR_CLKO2_SEL(n) ((uint32_t)(((n) & 0x1F) << 16))
  1236. #define CCM_CCOSR_CLK_OUT_SEL ((uint32_t)(1<<8))
  1237. #define CCM_CCOSR_CLKO1_EN ((uint32_t)(1<<7))
  1238. #define CCM_CCOSR_CLKO1_DIV(n) ((uint32_t)(((n) & 0x07) << 4))
  1239. #define CCM_CCOSR_CLKO1_SEL(n) ((uint32_t)(((n) & 0x0F) << 0))
  1240. #define CCM_CGPR_INT_MEM_CLK_LPM ((uint32_t)(1<<17))
  1241. #define CCM_CGPR_FPL ((uint32_t)(1<<16))
  1242. #define CCM_CGPR_SYS_MEM_DS_CTRL(n) ((uint32_t)(((n) & 0x03) << 14))
  1243. #define CCM_CGPR_EFUSE_PROG_SUPPLY_GATE ((uint32_t)(1<<4))
  1244. #define CCM_CGPR_PMIC_DELAY_SCALER ((uint32_t)(1<<0))
  1245. #define CCM_CCGR_OFF 0
  1246. #define CCM_CCGR_ON_RUNONLY 1
  1247. #define CCM_CCGR_ON 3
  1248. #define CCM_CCGR0_GPIO2(n) ((uint32_t)(((n) & 0x03) << 30))
  1249. #define CCM_CCGR0_LPUART2(n) ((uint32_t)(((n) & 0x03) << 28))
  1250. #define CCM_CCGR0_GPT2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 26))
  1251. #define CCM_CCGR0_GPT2_BUS(n) ((uint32_t)(((n) & 0x03) << 24))
  1252. #define CCM_CCGR0_TRACE(n) ((uint32_t)(((n) & 0x03) << 22))
  1253. #define CCM_CCGR0_CAN2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 20))
  1254. #define CCM_CCGR0_CAN2(n) ((uint32_t)(((n) & 0x03) << 18))
  1255. #define CCM_CCGR0_CAN1_SERIAl(n) ((uint32_t)(((n) & 0x03) << 16))
  1256. #define CCM_CCGR0_CAN1(n) ((uint32_t)(((n) & 0x03) << 14))
  1257. #define CCM_CCGR0_LPUART3(n) ((uint32_t)(((n) & 0x03) << 12))
  1258. #define CCM_CCGR0_DCP(n) ((uint32_t)(((n) & 0x03) << 10))
  1259. #define CCM_CCGR0_MQS_HMCLK(n) ((uint32_t)(((n) & 0x03) << 4))
  1260. #define CCM_CCGR0_AIPS_TZ2(n) ((uint32_t)(((n) & 0x03) << 2))
  1261. #define CCM_CCGR0_AIPS_TZ1(n) ((uint32_t)(((n) & 0x03) << 0))
  1262. #define CCM_CCGR1_CSU(n) ((uint32_t)(((n) & 0x03) << 28))
  1263. #define CCM_CCGR1_GPIO1(n) ((uint32_t)(((n) & 0x03) << 26))
  1264. #define CCM_CCGR1_LPUART4(n) ((uint32_t)(((n) & 0x03) << 24))
  1265. #define CCM_CCGR1_GPT_SERIAL(n) ((uint32_t)(((n) & 0x03) << 22))
  1266. #define CCM_CCGR1_GPT(n) ((uint32_t)(((n) & 0x03) << 20))
  1267. #define CCM_CCGR1_ADC1(n) ((uint32_t)(((n) & 0x03) << 16))
  1268. #define CCM_CCGR1_AOI2(n) ((uint32_t)(((n) & 0x03) << 14))
  1269. #define CCM_CCGR1_PIT(n) ((uint32_t)(((n) & 0x03) << 12))
  1270. #define CCM_CCGR1_ENET(n) ((uint32_t)(((n) & 0x03) << 10))
  1271. #define CCM_CCGR1_ADC2(n) ((uint32_t)(((n) & 0x03) << 8))
  1272. #define CCM_CCGR1_LPSPI4(n) ((uint32_t)(((n) & 0x03) << 6))
  1273. #define CCM_CCGR1_LPSPI3(n) ((uint32_t)(((n) & 0x03) << 4))
  1274. #define CCM_CCGR1_LPSPI2(n) ((uint32_t)(((n) & 0x03) << 2))
  1275. #define CCM_CCGR1_LPSPI1(n) ((uint32_t)(((n) & 0x03) << 0))
  1276. #define CCM_CCGR2_PXP(n) ((uint32_t)(((n) & 0x03) << 30))
  1277. #define CCM_CCGR2_LCD(n) ((uint32_t)(((n) & 0x03) << 28))
  1278. #define CCM_CCGR2_GPIO3(n) ((uint32_t)(((n) & 0x03) << 26))
  1279. #define CCM_CCGR2_XBAR2(n) ((uint32_t)(((n) & 0x03) << 24))
  1280. #define CCM_CCGR2_XBAR1(n) ((uint32_t)(((n) & 0x03) << 22))
  1281. #define CCM_CCGR2_IPMUX3(n) ((uint32_t)(((n) & 0x03) << 20))
  1282. #define CCM_CCGR2_IPMUX2(n) ((uint32_t)(((n) & 0x03) << 18))
  1283. #define CCM_CCGR2_IPMUX1(n) ((uint32_t)(((n) & 0x03) << 16))
  1284. #define CCM_CCGR2_XBAR3(n) ((uint32_t)(((n) & 0x03) << 14))
  1285. #define CCM_CCGR2_IIM(n) ((uint32_t)(((n) & 0x03) << 12))
  1286. #define CCM_CCGR2_LPI2C3(n) ((uint32_t)(((n) & 0x03) << 10))
  1287. #define CCM_CCGR2_LPI2C2(n) ((uint32_t)(((n) & 0x03) << 8))
  1288. #define CCM_CCGR2_LPI2C1(n) ((uint32_t)(((n) & 0x03) << 6))
  1289. #define CCM_CCGR2_IOMUXC_SNVS(n) ((uint32_t)(((n) & 0x03) << 4))
  1290. #define CCM_CCGR2_CSI(n) ((uint32_t)(((n) & 0x03) << 2))
  1291. #define CCM_CCGR3_IOMUXC_SNVS_GPR(n) ((uint32_t)(((n) & 0x03) << 30))
  1292. #define CCM_CCGR3_OCRAM(n) ((uint32_t)(((n) & 0x03) << 28))
  1293. #define CCM_CCGR3_ACMP4(n) ((uint32_t)(((n) & 0x03) << 26))
  1294. #define CCM_CCGR3_ACMP3(n) ((uint32_t)(((n) & 0x03) << 24))
  1295. #define CCM_CCGR3_ACMP2(n) ((uint32_t)(((n) & 0x03) << 22))
  1296. #define CCM_CCGR3_ACMP1(n) ((uint32_t)(((n) & 0x03) << 20))
  1297. #define CCM_CCGR3_FLEXRAM(n) ((uint32_t)(((n) & 0x03) << 18))
  1298. #define CCM_CCGR3_WDOG1(n) ((uint32_t)(((n) & 0x03) << 16))
  1299. #define CCM_CCGR3_EWM(n) ((uint32_t)(((n) & 0x03) << 14))
  1300. #define CCM_CCGR3_GPIO4(n) ((uint32_t)(((n) & 0x03) << 12))
  1301. #define CCM_CCGR3_LCDIF_PIX(n) ((uint32_t)(((n) & 0x03) << 10))
  1302. #define CCM_CCGR3_AOI1(n) ((uint32_t)(((n) & 0x03) << 8))
  1303. #define CCM_CCGR3_LPUART6(n) ((uint32_t)(((n) & 0x03) << 6))
  1304. #define CCM_CCGR3_SEMC(n) ((uint32_t)(((n) & 0x03) << 4))
  1305. #define CCM_CCGR3_LPUART5(n) ((uint32_t)(((n) & 0x03) << 2))
  1306. #define CCM_CCGR3_FLEXIO2(n) ((uint32_t)(((n) & 0x03) << 0))
  1307. #define CCM_CCGR4_ENC4(n) ((uint32_t)(((n) & 0x03) << 30))
  1308. #define CCM_CCGR4_ENC3(n) ((uint32_t)(((n) & 0x03) << 28))
  1309. #define CCM_CCGR4_ENC2(n) ((uint32_t)(((n) & 0x03) << 26))
  1310. #define CCM_CCGR4_ENC1(n) ((uint32_t)(((n) & 0x03) << 24))
  1311. #define CCM_CCGR4_PWM4(n) ((uint32_t)(((n) & 0x03) << 22))
  1312. #define CCM_CCGR4_PWM3(n) ((uint32_t)(((n) & 0x03) << 20))
  1313. #define CCM_CCGR4_PWM2(n) ((uint32_t)(((n) & 0x03) << 18))
  1314. #define CCM_CCGR4_PWM1(n) ((uint32_t)(((n) & 0x03) << 16))
  1315. #define CCM_CCGR4_SIM_EMS(n) ((uint32_t)(((n) & 0x03) << 14))
  1316. #define CCM_CCGR4_SIM_M(n) ((uint32_t)(((n) & 0x03) << 12))
  1317. #define CCM_CCGR4_TSC(n) ((uint32_t)(((n) & 0x03) << 10))
  1318. #define CCM_CCGR4_SIM_M7(n) ((uint32_t)(((n) & 0x03) << 8))
  1319. #define CCM_CCGR4_BEE(n) ((uint32_t)(((n) & 0x03) << 6))
  1320. #define CCM_CCGR4_IOMUXC_GPR(n) ((uint32_t)(((n) & 0x03) << 4))
  1321. #define CCM_CCGR4_IOMUXC(n) ((uint32_t)(((n) & 0x03) << 2))
  1322. #define CCM_CCGR5_SNVS_LP(n) ((uint32_t)(((n) & 0x03) << 30))
  1323. #define CCM_CCGR5_SNVS_HP(n) ((uint32_t)(((n) & 0x03) << 28))
  1324. #define CCM_CCGR5_LPUART7(n) ((uint32_t)(((n) & 0x03) << 26))
  1325. #define CCM_CCGR5_LPUART1(n) ((uint32_t)(((n) & 0x03) << 24))
  1326. #define CCM_CCGR5_SAI3(n) ((uint32_t)(((n) & 0x03) << 22))
  1327. #define CCM_CCGR5_SAI2(n) ((uint32_t)(((n) & 0x03) << 20))
  1328. #define CCM_CCGR5_SAI1(n) ((uint32_t)(((n) & 0x03) << 18))
  1329. #define CCM_CCGR5_SIM_MAIN(n) ((uint32_t)(((n) & 0x03) << 16))
  1330. #define CCM_CCGR5_SPDIF(n) ((uint32_t)(((n) & 0x03) << 14))
  1331. #define CCM_CCGR5_AIPS_TZ4(n) ((uint32_t)(((n) & 0x03) << 12))
  1332. #define CCM_CCGR5_WDOG2(n) ((uint32_t)(((n) & 0x03) << 10))
  1333. #define CCM_CCGR5_KPP(n) ((uint32_t)(((n) & 0x03) << 8))
  1334. #define CCM_CCGR5_DMA(n) ((uint32_t)(((n) & 0x03) << 6))
  1335. #define CCM_CCGR5_WDOG3(n) ((uint32_t)(((n) & 0x03) << 4))
  1336. #define CCM_CCGR5_FLEXIO1(n) ((uint32_t)(((n) & 0x03) << 2))
  1337. #define CCM_CCGR5_ROM(n) ((uint32_t)(((n) & 0x03) << 0))
  1338. #define CCM_CCGR6_QTIMER3(n) ((uint32_t)(((n) & 0x03) << 30))
  1339. #define CCM_CCGR6_QTIMER2(n) ((uint32_t)(((n) & 0x03) << 28))
  1340. #define CCM_CCGR6_QTIMER1(n) ((uint32_t)(((n) & 0x03) << 26))
  1341. #define CCM_CCGR6_LPI2C4_SERIAL(n) ((uint32_t)(((n) & 0x03) << 24))
  1342. #define CCM_CCGR6_ANADIG(n) ((uint32_t)(((n) & 0x03) << 22))
  1343. #define CCM_CCGR6_SIM_PER(n) ((uint32_t)(((n) & 0x03) << 20))
  1344. #define CCM_CCGR6_AIPS_TZ3(n) ((uint32_t)(((n) & 0x03) << 18))
  1345. #define CCM_CCGR6_QTIMER4(n) ((uint32_t)(((n) & 0x03) << 16))
  1346. #define CCM_CCGR6_LPUART8(n) ((uint32_t)(((n) & 0x03) << 14))
  1347. #define CCM_CCGR6_TRNG(n) ((uint32_t)(((n) & 0x03) << 12))
  1348. #define CCM_CCGR6_FLEXSPI(n) ((uint32_t)(((n) & 0x03) << 10))
  1349. #define CCM_CCGR6_IPMUX4(n) ((uint32_t)(((n) & 0x03) << 8))
  1350. #define CCM_CCGR6_DCDC(n) ((uint32_t)(((n) & 0x03) << 6))
  1351. #define CCM_CCGR6_USDHC2(n) ((uint32_t)(((n) & 0x03) << 4))
  1352. #define CCM_CCGR6_USDHC1(n) ((uint32_t)(((n) & 0x03) << 2))
  1353. #define CCM_CCGR6_USBOH3(n) ((uint32_t)(((n) & 0x03) << 0))
  1354. #define CCM_CMEOR_MOD_EN_OV_CAN1_CPI ((uint32_t)(1<<30))
  1355. #define CCM_CMEOR_MOD_EN_OV_CAN2_CPI ((uint32_t)(1<<28))
  1356. #define CCM_CMEOR_MOD_EN_OV_TRNG ((uint32_t)(1<<9))
  1357. #define CCM_CMEOR_MOD_EN_USDHC ((uint32_t)(1<<7))
  1358. #define CCM_CMEOR_MOD_EN_OV_PIT ((uint32_t)(1<<6))
  1359. #define CCM_CMEOR_MOD_EN_OV_GPT ((uint32_t)(1<<5))
  1360. // 18.8: page 752
  1361. #define IMXRT_CCM_ANALOG (*(IMXRT_REGISTER32_t *)0x400D8000)
  1362. #define CCM_ANALOG_PLL_ARM (IMXRT_CCM_ANALOG.offset000)
  1363. #define CCM_ANALOG_PLL_ARM_SET (IMXRT_CCM_ANALOG.offset004)
  1364. #define CCM_ANALOG_PLL_ARM_CLR (IMXRT_CCM_ANALOG.offset008)
  1365. #define CCM_ANALOG_PLL_ARM_TOG (IMXRT_CCM_ANALOG.offset00C)
  1366. #define CCM_ANALOG_PLL_USB1 (IMXRT_CCM_ANALOG.offset010)
  1367. #define CCM_ANALOG_PLL_USB1_SET (IMXRT_CCM_ANALOG.offset014)
  1368. #define CCM_ANALOG_PLL_USB1_CLR (IMXRT_CCM_ANALOG.offset018)
  1369. #define CCM_ANALOG_PLL_USB1_TOG (IMXRT_CCM_ANALOG.offset01C)
  1370. #define CCM_ANALOG_PLL_USB2 (IMXRT_CCM_ANALOG.offset020)
  1371. #define CCM_ANALOG_PLL_USB2_SET (IMXRT_CCM_ANALOG.offset024)
  1372. #define CCM_ANALOG_PLL_USB2_CLR (IMXRT_CCM_ANALOG.offset028)
  1373. #define CCM_ANALOG_PLL_USB2_TOG (IMXRT_CCM_ANALOG.offset02C)
  1374. #define CCM_ANALOG_PLL_SYS (IMXRT_CCM_ANALOG.offset030)
  1375. #define CCM_ANALOG_PLL_SYS_SET (IMXRT_CCM_ANALOG.offset034)
  1376. #define CCM_ANALOG_PLL_SYS_CLR (IMXRT_CCM_ANALOG.offset038)
  1377. #define CCM_ANALOG_PLL_SYS_TOG (IMXRT_CCM_ANALOG.offset03C)
  1378. #define CCM_ANALOG_PLL_SYS_SS (IMXRT_CCM_ANALOG.offset040)
  1379. #define CCM_ANALOG_PLL_SYS_NUM (IMXRT_CCM_ANALOG.offset050)
  1380. #define CCM_ANALOG_PLL_SYS_DENOM (IMXRT_CCM_ANALOG.offset060)
  1381. #define CCM_ANALOG_PLL_AUDIO (IMXRT_CCM_ANALOG.offset070)
  1382. #define CCM_ANALOG_PLL_AUDIO_SET (IMXRT_CCM_ANALOG.offset074)
  1383. #define CCM_ANALOG_PLL_AUDIO_CLR (IMXRT_CCM_ANALOG.offset078)
  1384. #define CCM_ANALOG_PLL_AUDIO_TOG (IMXRT_CCM_ANALOG.offset07C)
  1385. #define CCM_ANALOG_PLL_AUDIO_NUM (IMXRT_CCM_ANALOG.offset080)
  1386. #define CCM_ANALOG_PLL_AUDIO_DENOM (IMXRT_CCM_ANALOG.offset090)
  1387. #define CCM_ANALOG_PLL_VIDEO (IMXRT_CCM_ANALOG.offset0A0)
  1388. #define CCM_ANALOG_PLL_VIDEO_SET (IMXRT_CCM_ANALOG.offset0A4)
  1389. #define CCM_ANALOG_PLL_VIDEO_CLR (IMXRT_CCM_ANALOG.offset0A8)
  1390. #define CCM_ANALOG_PLL_VIDEO_TOG (IMXRT_CCM_ANALOG.offset0AC)
  1391. #define CCM_ANALOG_PLL_VIDEO_NUM (IMXRT_CCM_ANALOG.offset0B0)
  1392. #define CCM_ANALOG_PLL_VIDEO_DENOM (IMXRT_CCM_ANALOG.offset0C0)
  1393. #define CCM_ANALOG_PLL_ENET (IMXRT_CCM_ANALOG.offset0EC)
  1394. #define CCM_ANALOG_PLL_ENET_SET (IMXRT_CCM_ANALOG.offset0E4)
  1395. #define CCM_ANALOG_PLL_ENET_CLR (IMXRT_CCM_ANALOG.offset0E8)
  1396. #define CCM_ANALOG_PLL_ENET_TOG (IMXRT_CCM_ANALOG.offset0EC)
  1397. #define CCM_ANALOG_PFD_480 (IMXRT_CCM_ANALOG.offset0F0)
  1398. #define CCM_ANALOG_PFD_480_SET (IMXRT_CCM_ANALOG.offset0F4)
  1399. #define CCM_ANALOG_PFD_480_CLR (IMXRT_CCM_ANALOG.offset0F8)
  1400. #define CCM_ANALOG_PFD_480_TOG (IMXRT_CCM_ANALOG.offset0FC)
  1401. #define CCM_ANALOG_PFD_528 (IMXRT_CCM_ANALOG.offset100)
  1402. #define CCM_ANALOG_PFD_528_SET (IMXRT_CCM_ANALOG.offset104)
  1403. #define CCM_ANALOG_PFD_528_CLR (IMXRT_CCM_ANALOG.offset108)
  1404. #define CCM_ANALOG_PFD_528_TOG (IMXRT_CCM_ANALOG.offset10C)
  1405. #define CCM_ANALOG_MISC0 (IMXRT_CCM_ANALOG.offset150)
  1406. #define CCM_ANALOG_MISC0_SET (IMXRT_CCM_ANALOG.offset154)
  1407. #define CCM_ANALOG_MISC0_CLR (IMXRT_CCM_ANALOG.offset158)
  1408. #define CCM_ANALOG_MISC0_TOG (IMXRT_CCM_ANALOG.offset15C)
  1409. #define CCM_ANALOG_MISC1 (IMXRT_CCM_ANALOG.offset160)
  1410. #define CCM_ANALOG_MISC1_SET (IMXRT_CCM_ANALOG.offset164)
  1411. #define CCM_ANALOG_MISC1_CLR (IMXRT_CCM_ANALOG.offset168)
  1412. #define CCM_ANALOG_MISC1_TOG (IMXRT_CCM_ANALOG.offset16C)
  1413. #define CCM_ANALOG_MISC2 (IMXRT_CCM_ANALOG.offset170)
  1414. #define CCM_ANALOG_MISC2_SET (IMXRT_CCM_ANALOG.offset174)
  1415. #define CCM_ANALOG_MISC2_CLR (IMXRT_CCM_ANALOG.offset178)
  1416. #define CCM_ANALOG_MISC2_TOG (IMXRT_CCM_ANALOG.offset17C)
  1417. #define CCM_ANALOG_PLL_ARM_LOCK ((uint32_t)(1<<31))
  1418. #define CCM_ANALOG_PLL_ARM_BYPASS ((uint32_t)(1<<16))
  1419. #define CCM_ANALOG_PLL_ARM_ENABLE ((uint32_t)(1<<13))
  1420. #define CCM_ANALOG_PLL_ARM_POWERDOWN ((uint32_t)(1<<12))
  1421. #define CCM_ANALOG_PLL_ARM_DIV_SELECT(n) ((uint32_t)(((n) & 0x7F) << 0))
  1422. #define CCM_ANALOG_PLL_ARM_DIV_SELECT_MASK ((uint32_t)(0x7F << 0))
  1423. #define CCM_ANALOG_PLL_USB1_LOCK ((uint32_t)(1<<31))
  1424. #define CCM_ANALOG_PLL_USB1_BYPASS ((uint32_t)(1<<16))
  1425. #define CCM_ANALOG_PLL_USB1_ENABLE ((uint32_t)(1<<13))
  1426. #define CCM_ANALOG_PLL_USB1_POWER ((uint32_t)(1<<12))
  1427. #define CCM_ANALOG_PLL_USB1_EN_USB_CLKS ((uint32_t)(1<<6))
  1428. #define CCM_ANALOG_PLL_USB1_DIV_SELECT ((uint32_t)(1<<1))
  1429. #define CCM_ANALOG_PLL_SYS_LOCK ((uint32_t)(1<<31))
  1430. #define CCM_ANALOG_PLL_SYS_BYPASS ((uint32_t)(1<<16))
  1431. #define CCM_ANALOG_PLL_SYS_ENABLE ((uint32_t)(1<<13))
  1432. #define CCM_ANALOG_PLL_SYS_POWERDOWN ((uint32_t)(1<<12))
  1433. #define CCM_ANALOG_PLL_SYS_DIV_SELECT ((uint32_t)(1<<1))
  1434. // 19.7: page 810
  1435. #define IMXRT_CSI (*(IMXRT_REGISTER32_t *)0x402BC000)
  1436. #define CSI_CSICR1 (IMXRT_CSI.offset000)
  1437. #define CSI_CSICR2 (IMXRT_CSI.offset004)
  1438. #define CSI_CSICR3 (IMXRT_CSI.offset008)
  1439. #define CSI_CSISTATFIFO (IMXRT_CSI.offset00C)
  1440. #define CSI_CSIRFIFO (IMXRT_CSI.offset010)
  1441. #define CSI_CSIRXCNT (IMXRT_CSI.offset014)
  1442. #define CSI_CSISR (IMXRT_CSI.offset018)
  1443. #define CSI_CSIDMASA_STATFIFO (IMXRT_CSI.offset020)
  1444. #define CSI_CSIDMATS_STATFIFO (IMXRT_CSI.offset024)
  1445. #define CSI_CSIDMASA_FB1 (IMXRT_CSI.offset028)
  1446. #define CSI_CSIDMASA_FB2 (IMXRT_CSI.offset02C)
  1447. #define CSI_CSIFBUF_PARA (IMXRT_CSI.offset030)
  1448. #define CSI_CSIIMAG_PARA (IMXRT_CSI.offset034)
  1449. #define CSI_CSICR18 (IMXRT_CSI.offset048)
  1450. #define CSI_CSICR19 (IMXRT_CSI.offset04C)
  1451. // 20.6.1.1: page 837
  1452. #define IMXRT_DCDC (*(IMXRT_REGISTER32_t *)0x40080000)
  1453. #define DCDC_REG0 (IMXRT_DCDC.offset000)
  1454. #define DCDC_REG1 (IMXRT_DCDC.offset004)
  1455. #define DCDC_REG2 (IMXRT_DCDC.offset008)
  1456. #define DCDC_REG3 (IMXRT_DCDC.offset00C)
  1457. #define DCDC_REG0_STS_DC_OK ((uint32_t)(1<<31))
  1458. #define DCDC_REG0_XTAL_24M_OK ((uint32_t)(1<<29))
  1459. #define DCDC_REG0_CURRENT_ALERT_RESET ((uint32_t)(1<<28))
  1460. #define DCDC_REG0_XTALOK_DISABLE ((uint32_t)(1<<27))
  1461. #define DCDC_REG0_PWD_CMP_OFFSET ((uint32_t)(1<<26))
  1462. #define DCDC_REG0_LP_HIGH_HYS ((uint32_t)(1<<21))
  1463. #define DCDC_REG0_LP_OVERLOAD_FREQ_SEL ((uint32_t)(1<<20))
  1464. #define DCDC_REG0_LP_OVERLOAD_THRSH(n) ((uint32_t)(((n) & 0x03) << 18))
  1465. #define DCDC_REG0_PWD_HIGH_VOLT_DET ((uint32_t)(1<<17))
  1466. #define DCDC_REG0_EN_LP_OVERLOAD_SNS ((uint32_t)(1<<16))
  1467. #define DCDC_REG0_ADJ_POSLIMIT_BUCK(n) ((uint32_t)(((n) & 0x0F) << 12))
  1468. #define DCDC_REG0_PWD_CMP_BATT_DET ((uint32_t)(1<<11))
  1469. #define DCDC_REG0_OVERCUR_TRIG_ADJ(n) ((uint32_t)(((n) & 0x03) << 9))
  1470. #define DCDC_REG0_PWD_OVERCUR_DET ((uint32_t)(1<<8))
  1471. #define DCDC_REG0_CUR_SNS_THRSH(n) ((uint32_t)(((n) & 0x07) << 5))
  1472. #define DCDC_REG0_PWD_CUR_SNS_CMP ((uint32_t)(1<<4))
  1473. #define DCDC_REG0_PWD_OSC_INT ((uint32_t)(1<<3))
  1474. #define DCDC_REG0_SEL_CLK ((uint32_t)(1<<2))
  1475. #define DCDC_REG0_DISABLE_AUTO_CLK_SWITCH ((uint32_t)(1<<1))
  1476. #define DCDC_REG0_PWD_ZCD ((uint32_t)(1<<0))
  1477. #define DCDC_REG1_VBG_TRIM(n) ((uint32_t)(((n) & 0x1F) << 24))
  1478. #define DCDC_REG1_LOOPCTRL_EN_HYST ((uint32_t)(1<<23))
  1479. #define DCDC_REG1_LOOPCTRL_HST_THRESH ((uint32_t)(1<<21))
  1480. #define DCDC_REG1_LP_CMP_ISRC_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1481. #define DCDC_REG1_REG_RLOAD_SW ((uint32_t)(1<<9))
  1482. #define DCDC_REG1_REG_FBK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1483. #define DCDC_REG2_DCM_SET_CTRL ((uint32_t)(1<<28))
  1484. #define DCDC_REG2_DISABLE_PULSE_SKIP ((uint32_t)(1<<27))
  1485. #define DCDC_REG2_LOOPCTRL_HYST_SIGN ((uint32_t)(1<<13))
  1486. #define DCDC_REG2_LOOPCTRL_RCSCALE_THRSH ((uint32_t)(1<<12))
  1487. #define DCDC_REG2_LOOPCTRL_EN_RCSCALE ((uint32_t)(((n) & 0x07) << 9))
  1488. #define DCDC_REG2_LOOPCTRL_DC_FF ((uint32_t)(((n) & 0x07) << 6))
  1489. #define DCDC_REG2_LOOPCTRL_DC_R ((uint32_t)(((n) & 0x0F) << 2))
  1490. #define DCDC_REG2_LOOPCTRL_DC_C ((uint32_t)(((n) & 0x03) << 0))
  1491. #define DCDC_REG3_DISABLE_STEP ((uint32_t)(1<<30))
  1492. #define DCDC_REG3_MISC_DISABLEFET_LOGIC ((uint32_t)(1<<28))
  1493. #define DCDC_REG3_MISC_DELAY_TIMING ((uint32_t)(1<<27))
  1494. #define DCDC_REG3_MINPWR_DC_HALFCLK ((uint32_t)(1<<24))
  1495. #define DCDC_REG3_TARGET_LP(n) ((uint32_t)(((n) & 0x07) << 8))
  1496. #define DCDC_REG3_TRG(n) ((uint32_t)(((n) & 0x1F) << 0))
  1497. #define DCDC_REG3_TRG_MASK ((uint32_t)(0x1F << 0))
  1498. // 21.4.1.1: page 849
  1499. #define IMXRT_DMAMUX (*(IMXRT_REGISTER32_t *)0x400EC000)
  1500. #define DMAMUX_CHCFG0 (IMXRT_DMAMUX.offset000)
  1501. #define DMAMUX_CHCFG1 (IMXRT_DMAMUX.offset004)
  1502. #define DMAMUX_CHCFG2 (IMXRT_DMAMUX.offset008)
  1503. #define DMAMUX_CHCFG3 (IMXRT_DMAMUX.offset00C)
  1504. #define DMAMUX_CHCFG4 (IMXRT_DMAMUX.offset010)
  1505. #define DMAMUX_CHCFG5 (IMXRT_DMAMUX.offset014)
  1506. #define DMAMUX_CHCFG6 (IMXRT_DMAMUX.offset018)
  1507. #define DMAMUX_CHCFG7 (IMXRT_DMAMUX.offset01C)
  1508. #define DMAMUX_CHCFG8 (IMXRT_DMAMUX.offset020)
  1509. #define DMAMUX_CHCFG9 (IMXRT_DMAMUX.offset024)
  1510. #define DMAMUX_CHCFG10 (IMXRT_DMAMUX.offset028)
  1511. #define DMAMUX_CHCFG11 (IMXRT_DMAMUX.offset02C)
  1512. #define DMAMUX_CHCFG12 (IMXRT_DMAMUX.offset030)
  1513. #define DMAMUX_CHCFG13 (IMXRT_DMAMUX.offset034)
  1514. #define DMAMUX_CHCFG14 (IMXRT_DMAMUX.offset038)
  1515. #define DMAMUX_CHCFG15 (IMXRT_DMAMUX.offset03C)
  1516. #define DMAMUX_CHCFG16 (IMXRT_DMAMUX.offset040)
  1517. #define DMAMUX_CHCFG17 (IMXRT_DMAMUX.offset044)
  1518. #define DMAMUX_CHCFG18 (IMXRT_DMAMUX.offset048)
  1519. #define DMAMUX_CHCFG19 (IMXRT_DMAMUX.offset04C)
  1520. #define DMAMUX_CHCFG20 (IMXRT_DMAMUX.offset050)
  1521. #define DMAMUX_CHCFG21 (IMXRT_DMAMUX.offset054)
  1522. #define DMAMUX_CHCFG22 (IMXRT_DMAMUX.offset058)
  1523. #define DMAMUX_CHCFG23 (IMXRT_DMAMUX.offset05C)
  1524. #define DMAMUX_CHCFG24 (IMXRT_DMAMUX.offset060)
  1525. #define DMAMUX_CHCFG25 (IMXRT_DMAMUX.offset064)
  1526. #define DMAMUX_CHCFG26 (IMXRT_DMAMUX.offset068)
  1527. #define DMAMUX_CHCFG27 (IMXRT_DMAMUX.offset06C)
  1528. #define DMAMUX_CHCFG28 (IMXRT_DMAMUX.offset070)
  1529. #define DMAMUX_CHCFG29 (IMXRT_DMAMUX.offset074)
  1530. #define DMAMUX_CHCFG30 (IMXRT_DMAMUX.offset078)
  1531. #define DMAMUX_CHCFG31 (IMXRT_DMAMUX.offset07C)
  1532. // 22.3.5.1: page 864
  1533. typedef struct {
  1534. volatile uint32_t CR; // 0
  1535. volatile uint32_t ES; // 4
  1536. uint32_t unused1; // 8
  1537. volatile uint32_t ERQ; // C
  1538. uint32_t unused2; // 10
  1539. volatile uint32_t EEI; // 14
  1540. volatile uint8_t CEEI; // 18
  1541. volatile uint8_t SEEI; // 19
  1542. volatile uint8_t CERQ; // 1A
  1543. volatile uint8_t SERQ; // 1B
  1544. volatile uint8_t CDNE; // 1C
  1545. volatile uint8_t SSRT; // 1D
  1546. volatile uint8_t CERR; // 1E
  1547. volatile uint8_t CINT; // 1F
  1548. uint32_t unused3; // 20
  1549. volatile uint32_t INT; // 24
  1550. uint32_t unused4; // 28
  1551. volatile uint32_t ERR; // 2C
  1552. uint32_t unused5; // 30
  1553. volatile uint32_t HRS; // 34
  1554. uint32_t unused6; // 38
  1555. uint32_t unused7; // 3C
  1556. uint32_t unused8; // 40
  1557. volatile uint32_t EARS; // 44
  1558. uint32_t unused[46];
  1559. volatile uint8_t DCHPRI3;
  1560. volatile uint8_t DCHPRI2;
  1561. volatile uint8_t DCHPRI1;
  1562. volatile uint8_t DCHPRI0;
  1563. volatile uint8_t DCHPRI7;
  1564. volatile uint8_t DCHPRI6;
  1565. volatile uint8_t DCHPRI5;
  1566. volatile uint8_t DCHPRI4;
  1567. volatile uint8_t DCHPRI11;
  1568. volatile uint8_t DCHPRI10;
  1569. volatile uint8_t DCHPRI9;
  1570. volatile uint8_t DCHPRI8;
  1571. volatile uint8_t DCHPRI15;
  1572. volatile uint8_t DCHPRI14;
  1573. volatile uint8_t DCHPRI13;
  1574. volatile uint8_t DCHPRI12;
  1575. volatile uint8_t DCHPRI19;
  1576. volatile uint8_t DCHPRI18;
  1577. volatile uint8_t DCHPRI17;
  1578. volatile uint8_t DCHPRI16;
  1579. volatile uint8_t DCHPRI23;
  1580. volatile uint8_t DCHPRI22;
  1581. volatile uint8_t DCHPRI21;
  1582. volatile uint8_t DCHPRI20;
  1583. volatile uint8_t DCHPRI27;
  1584. volatile uint8_t DCHPRI26;
  1585. volatile uint8_t DCHPRI25;
  1586. volatile uint8_t DCHPRI24;
  1587. volatile uint8_t DCHPRI31;
  1588. volatile uint8_t DCHPRI30;
  1589. volatile uint8_t DCHPRI29;
  1590. volatile uint8_t DCHPRI28;
  1591. } IMXRT_DMA_t;
  1592. typedef struct {
  1593. volatile const void * volatile SADDR;
  1594. int16_t SOFF;
  1595. union {
  1596. uint16_t ATTR;
  1597. struct {
  1598. uint8_t ATTR_DST;
  1599. uint8_t ATTR_SRC;
  1600. };
  1601. };
  1602. union {
  1603. uint32_t NBYTES;
  1604. uint32_t NBYTES_MLNO;
  1605. uint32_t NBYTES_MLOFFNO;
  1606. uint32_t NBYTES_MLOFFYES;
  1607. };
  1608. int32_t SLAST;
  1609. volatile void * volatile DADDR;
  1610. int16_t DOFF;
  1611. union {
  1612. volatile uint16_t CITER;
  1613. volatile uint16_t CITER_ELINKYES;
  1614. volatile uint16_t CITER_ELINKNO;
  1615. };
  1616. int32_t DLASTSGA;
  1617. volatile uint16_t CSR;
  1618. union {
  1619. volatile uint16_t BITER;
  1620. volatile uint16_t BITER_ELINKYES;
  1621. volatile uint16_t BITER_ELINKNO;
  1622. };
  1623. } IMXRT_DMA_TCD_t;
  1624. #define IMXRT_DMA (*(IMXRT_DMA_t *)0x400E8000)
  1625. #define DMA_CR (IMXRT_DMA.CR)
  1626. #define DMA_ES (IMXRT_DMA.ES)
  1627. #define DMA_ERQ (IMXRT_DMA.ERQ)
  1628. #define DMA_EEI (IMXRT_DMA.EEI)
  1629. #define DMA_CEEI (IMXRT_DMA.CEEI)
  1630. #define DMA_SEEI (IMXRT_DMA.SEEI)
  1631. #define DMA_CERQ (IMXRT_DMA.CERQ)
  1632. #define DMA_SERQ (IMXRT_DMA.SERQ)
  1633. #define DMA_CDNE (IMXRT_DMA.CDNE)
  1634. #define DMA_SSRT (IMXRT_DMA.SSRT)
  1635. #define DMA_CERR (IMXRT_DMA.CERR)
  1636. #define DMA_CINT (IMXRT_DMA.CINT)
  1637. #define DMA_INT (IMXRT_DMA.INT)
  1638. #define DMA_ERR (IMXRT_DMA.ERR)
  1639. #define DMA_HRS (IMXRT_DMA.HRS)
  1640. #define DMA_EARS (IMXRT_DMA.EARS)
  1641. #define DMA_DCHPRI3 (IMXRT_DMA.DCHPRI3)
  1642. #define DMA_DCHPRI2 (IMXRT_DMA.DCHPRI2)
  1643. #define DMA_DCHPRI1 (IMXRT_DMA.DCHPRI1)
  1644. #define DMA_DCHPRI0 (IMXRT_DMA.DCHPRI0)
  1645. #define DMA_DCHPRI7 (IMXRT_DMA.DCHPRI7)
  1646. #define DMA_DCHPRI6 (IMXRT_DMA.DCHPRI6)
  1647. #define DMA_DCHPRI5 (IMXRT_DMA.DCHPRI5)
  1648. #define DMA_DCHPRI4 (IMXRT_DMA.DCHPRI4)
  1649. #define DMA_DCHPRI11 (IMXRT_DMA.DCHPRI11)
  1650. #define DMA_DCHPRI10 (IMXRT_DMA.DCHPRI10)
  1651. #define DMA_DCHPRI9 (IMXRT_DMA.DCHPRI9)
  1652. #define DMA_DCHPRI8 (IMXRT_DMA.DCHPRI8)
  1653. #define DMA_DCHPRI15 (IMXRT_DMA.DCHPRI15)
  1654. #define DMA_DCHPRI14 (IMXRT_DMA.DCHPRI14)
  1655. #define DMA_DCHPRI13 (IMXRT_DMA.DCHPRI13)
  1656. #define DMA_DCHPRI12 (IMXRT_DMA.DCHPRI12)
  1657. #define DMA_DCHPRI19 (IMXRT_DMA.DCHPRI19)
  1658. #define DMA_DCHPRI18 (IMXRT_DMA.DCHPRI18)
  1659. #define DMA_DCHPRI17 (IMXRT_DMA.DCHPRI17)
  1660. #define DMA_DCHPRI16 (IMXRT_DMA.DCHPRI16)
  1661. #define DMA_DCHPRI23 (IMXRT_DMA.DCHPRI23)
  1662. #define DMA_DCHPRI22 (IMXRT_DMA.DCHPRI22)
  1663. #define DMA_DCHPRI21 (IMXRT_DMA.DCHPRI21)
  1664. #define DMA_DCHPRI20 (IMXRT_DMA.DCHPRI20)
  1665. #define DMA_DCHPRI27 (IMXRT_DMA.DCHPRI27)
  1666. #define DMA_DCHPRI26 (IMXRT_DMA.DCHPRI26)
  1667. #define DMA_DCHPRI25 (IMXRT_DMA.DCHPRI25)
  1668. #define DMA_DCHPRI24 (IMXRT_DMA.DCHPRI24)
  1669. #define DMA_DCHPRI31 (IMXRT_DMA.DCHPRI31)
  1670. #define DMA_DCHPRI30 (IMXRT_DMA.DCHPRI30)
  1671. #define DMA_DCHPRI29 (IMXRT_DMA.DCHPRI29)
  1672. #define DMA_DCHPRI28 (IMXRT_DMA.DCHPRI28)
  1673. #define IMXRT_DMA_TCD ((IMXRT_DMA_TCD_t *)0x400E9000)
  1674. #define DMA_TCD0_SADDR (IMXRT_DMA_TCD[0].SADDR)
  1675. #define DMA_TCD0_SOFF (IMXRT_DMA_TCD[0].SOFF)
  1676. #define DMA_TCD0_ATTR (IMXRT_DMA_TCD[0].ATTR)
  1677. #define DMA_TCD0_NBYTES (IMXRT_DMA_TCD[0].NBYTES)
  1678. #define DMA_TCD0_NBYTES_MLNO (IMXRT_DMA_TCD[0].NBYTES_MLNO)
  1679. #define DMA_TCD0_NBYTES_MLOFFNO (IMXRT_DMA_TCD[0].NBYTES_MLOFFNO)
  1680. #define DMA_TCD0_NBYTES_MLOFFYES (IMXRT_DMA_TCD[0].NBYTES_MLOFFYES)
  1681. #define DMA_TCD0_SLAST (IMXRT_DMA_TCD[0].SLAST)
  1682. #define DMA_TCD0_DADDR (IMXRT_DMA_TCD[0].DADDR)
  1683. #define DMA_TCD0_DOFF (IMXRT_DMA_TCD[0].DOFF)
  1684. #define DMA_TCD0_CITER (IMXRT_DMA_TCD[0].CITER)
  1685. #define DMA_TCD0_CITER_ELINKYES (IMXRT_DMA_TCD[0].CITER_ELINKYES)
  1686. #define DMA_TCD0_CITER_ELINKNO (IMXRT_DMA_TCD[0].CITER_ELINKNO)
  1687. #define DMA_TCD0_DLASTSGA (IMXRT_DMA_TCD[0].DLASTSGA)
  1688. #define DMA_TCD0_CSR (IMXRT_DMA_TCD[0].CSR)
  1689. #define DMA_TCD0_BITER (IMXRT_DMA_TCD[0].BITER)
  1690. #define DMA_TCD0_BITER_ELINKYES (IMXRT_DMA_TCD[0].BITER_ELINKYES)
  1691. #define DMA_TCD0_BITER_ELINKNO (IMXRT_DMA_TCD[0].BITER_ELINKNO)
  1692. #define DMA_TCD1_SADDR (IMXRT_DMA_TCD[1].SADDR)
  1693. #define DMA_TCD1_SOFF (IMXRT_DMA_TCD[1].SOFF)
  1694. #define DMA_TCD1_ATTR (IMXRT_DMA_TCD[1].ATTR)
  1695. #define DMA_TCD1_NBYTES (IMXRT_DMA_TCD[1].NBYTES)
  1696. #define DMA_TCD1_NBYTES_MLNO (IMXRT_DMA_TCD[1].NBYTES_MLNO)
  1697. #define DMA_TCD1_NBYTES_MLOFFNO (IMXRT_DMA_TCD[1].NBYTES_MLOFFNO)
  1698. #define DMA_TCD1_NBYTES_MLOFFYES (IMXRT_DMA_TCD[1].NBYTES_MLOFFYES)
  1699. #define DMA_TCD1_SLAST (IMXRT_DMA_TCD[1].SLAST)
  1700. #define DMA_TCD1_DADDR (IMXRT_DMA_TCD[1].DADDR)
  1701. #define DMA_TCD1_DOFF (IMXRT_DMA_TCD[1].DOFF)
  1702. #define DMA_TCD1_CITER (IMXRT_DMA_TCD[1].CITER)
  1703. #define DMA_TCD1_CITER_ELINKYES (IMXRT_DMA_TCD[1].CITER_ELINKYES)
  1704. #define DMA_TCD1_CITER_ELINKNO (IMXRT_DMA_TCD[1].CITER_ELINKNO)
  1705. #define DMA_TCD1_DLASTSGA (IMXRT_DMA_TCD[1].DLASTSGA)
  1706. #define DMA_TCD1_CSR (IMXRT_DMA_TCD[1].CSR)
  1707. #define DMA_TCD1_BITER (IMXRT_DMA_TCD[1].BITER)
  1708. #define DMA_TCD1_BITER_ELINKYES (IMXRT_DMA_TCD[1].BITER_ELINKYES)
  1709. #define DMA_TCD1_BITER_ELINKNO (IMXRT_DMA_TCD[1].BITER_ELINKNO)
  1710. #define DMA_TCD2_SADDR (IMXRT_DMA_TCD[2].SADDR)
  1711. #define DMA_TCD2_SOFF (IMXRT_DMA_TCD[2].SOFF)
  1712. #define DMA_TCD2_ATTR (IMXRT_DMA_TCD[2].ATTR)
  1713. #define DMA_TCD2_NBYTES (IMXRT_DMA_TCD[2].NBYTES)
  1714. #define DMA_TCD2_NBYTES_MLNO (IMXRT_DMA_TCD[2].NBYTES_MLNO)
  1715. #define DMA_TCD2_NBYTES_MLOFFNO (IMXRT_DMA_TCD[2].NBYTES_MLOFFNO)
  1716. #define DMA_TCD2_NBYTES_MLOFFYES (IMXRT_DMA_TCD[2].NBYTES_MLOFFYES)
  1717. #define DMA_TCD2_SLAST (IMXRT_DMA_TCD[2].SLAST)
  1718. #define DMA_TCD2_DADDR (IMXRT_DMA_TCD[2].DADDR)
  1719. #define DMA_TCD2_DOFF (IMXRT_DMA_TCD[2].DOFF)
  1720. #define DMA_TCD2_CITER (IMXRT_DMA_TCD[2].CITER)
  1721. #define DMA_TCD2_CITER_ELINKYES (IMXRT_DMA_TCD[2].CITER_ELINKYES)
  1722. #define DMA_TCD2_CITER_ELINKNO (IMXRT_DMA_TCD[2].CITER_ELINKNO)
  1723. #define DMA_TCD2_DLASTSGA (IMXRT_DMA_TCD[2].DLASTSGA)
  1724. #define DMA_TCD2_CSR (IMXRT_DMA_TCD[2].CSR)
  1725. #define DMA_TCD2_BITER (IMXRT_DMA_TCD[2].BITER)
  1726. #define DMA_TCD2_BITER_ELINKYES (IMXRT_DMA_TCD[2].BITER_ELINKYES)
  1727. #define DMA_TCD2_BITER_ELINKNO (IMXRT_DMA_TCD[2].BITER_ELINKNO)
  1728. #define DMA_TCD3_SADDR (IMXRT_DMA_TCD[3].SADDR)
  1729. #define DMA_TCD3_SOFF (IMXRT_DMA_TCD[3].SOFF)
  1730. #define DMA_TCD3_ATTR (IMXRT_DMA_TCD[3].ATTR)
  1731. #define DMA_TCD3_NBYTES (IMXRT_DMA_TCD[3].NBYTES)
  1732. #define DMA_TCD3_NBYTES_MLNO (IMXRT_DMA_TCD[3].NBYTES_MLNO)
  1733. #define DMA_TCD3_NBYTES_MLOFFNO (IMXRT_DMA_TCD[3].NBYTES_MLOFFNO)
  1734. #define DMA_TCD3_NBYTES_MLOFFYES (IMXRT_DMA_TCD[3].NBYTES_MLOFFYES)
  1735. #define DMA_TCD3_SLAST (IMXRT_DMA_TCD[3].SLAST)
  1736. #define DMA_TCD3_DADDR (IMXRT_DMA_TCD[3].DADDR)
  1737. #define DMA_TCD3_DOFF (IMXRT_DMA_TCD[3].DOFF)
  1738. #define DMA_TCD3_CITER (IMXRT_DMA_TCD[3].CITER)
  1739. #define DMA_TCD3_CITER_ELINKYES (IMXRT_DMA_TCD[3].CITER_ELINKYES)
  1740. #define DMA_TCD3_CITER_ELINKNO (IMXRT_DMA_TCD[3].CITER_ELINKNO)
  1741. #define DMA_TCD3_DLASTSGA (IMXRT_DMA_TCD[3].DLASTSGA)
  1742. #define DMA_TCD3_CSR (IMXRT_DMA_TCD[3].CSR)
  1743. #define DMA_TCD3_BITER (IMXRT_DMA_TCD[3].BITER)
  1744. #define DMA_TCD3_BITER_ELINKYES (IMXRT_DMA_TCD[3].BITER_ELINKYES)
  1745. #define DMA_TCD3_BITER_ELINKNO (IMXRT_DMA_TCD[3].BITER_ELINKNO)
  1746. #define DMA_TCD4_SADDR (IMXRT_DMA_TCD[4].SADDR)
  1747. #define DMA_TCD4_SOFF (IMXRT_DMA_TCD[4].SOFF)
  1748. #define DMA_TCD4_ATTR (IMXRT_DMA_TCD[4].ATTR)
  1749. #define DMA_TCD4_NBYTES (IMXRT_DMA_TCD[4].NBYTES)
  1750. #define DMA_TCD4_NBYTES_MLNO (IMXRT_DMA_TCD[4].NBYTES_MLNO)
  1751. #define DMA_TCD4_NBYTES_MLOFFNO (IMXRT_DMA_TCD[4].NBYTES_MLOFFNO)
  1752. #define DMA_TCD4_NBYTES_MLOFFYES (IMXRT_DMA_TCD[4].NBYTES_MLOFFYES)
  1753. #define DMA_TCD4_SLAST (IMXRT_DMA_TCD[4].SLAST)
  1754. #define DMA_TCD4_DADDR (IMXRT_DMA_TCD[4].DADDR)
  1755. #define DMA_TCD4_DOFF (IMXRT_DMA_TCD[4].DOFF)
  1756. #define DMA_TCD4_CITER (IMXRT_DMA_TCD[4].CITER)
  1757. #define DMA_TCD4_CITER_ELINKYES (IMXRT_DMA_TCD[4].CITER_ELINKYES)
  1758. #define DMA_TCD4_CITER_ELINKNO (IMXRT_DMA_TCD[4].CITER_ELINKNO)
  1759. #define DMA_TCD4_DLASTSGA (IMXRT_DMA_TCD[4].DLASTSGA)
  1760. #define DMA_TCD4_CSR (IMXRT_DMA_TCD[4].CSR)
  1761. #define DMA_TCD4_BITER (IMXRT_DMA_TCD[4].BITER)
  1762. #define DMA_TCD4_BITER_ELINKYES (IMXRT_DMA_TCD[4].BITER_ELINKYES)
  1763. #define DMA_TCD4_BITER_ELINKNO (IMXRT_DMA_TCD[4].BITER_ELINKNO)
  1764. #define DMA_TCD5_SADDR (IMXRT_DMA_TCD[5].SADDR)
  1765. #define DMA_TCD5_SOFF (IMXRT_DMA_TCD[5].SOFF)
  1766. #define DMA_TCD5_ATTR (IMXRT_DMA_TCD[5].ATTR)
  1767. #define DMA_TCD5_NBYTES (IMXRT_DMA_TCD[5].NBYTES)
  1768. #define DMA_TCD5_NBYTES_MLNO (IMXRT_DMA_TCD[5].NBYTES_MLNO)
  1769. #define DMA_TCD5_NBYTES_MLOFFNO (IMXRT_DMA_TCD[5].NBYTES_MLOFFNO)
  1770. #define DMA_TCD5_NBYTES_MLOFFYES (IMXRT_DMA_TCD[5].NBYTES_MLOFFYES)
  1771. #define DMA_TCD5_SLAST (IMXRT_DMA_TCD[5].SLAST)
  1772. #define DMA_TCD5_DADDR (IMXRT_DMA_TCD[5].DADDR)
  1773. #define DMA_TCD5_DOFF (IMXRT_DMA_TCD[5].DOFF)
  1774. #define DMA_TCD5_CITER (IMXRT_DMA_TCD[5].CITER)
  1775. #define DMA_TCD5_CITER_ELINKYES (IMXRT_DMA_TCD[5].CITER_ELINKYES)
  1776. #define DMA_TCD5_CITER_ELINKNO (IMXRT_DMA_TCD[5].CITER_ELINKNO)
  1777. #define DMA_TCD5_DLASTSGA (IMXRT_DMA_TCD[5].DLASTSGA)
  1778. #define DMA_TCD5_CSR (IMXRT_DMA_TCD[5].CSR)
  1779. #define DMA_TCD5_BITER (IMXRT_DMA_TCD[5].BITER)
  1780. #define DMA_TCD5_BITER_ELINKYES (IMXRT_DMA_TCD[5].BITER_ELINKYES)
  1781. #define DMA_TCD5_BITER_ELINKNO (IMXRT_DMA_TCD[5].BITER_ELINKNO)
  1782. #define DMA_TCD6_SADDR (IMXRT_DMA_TCD[6].SADDR)
  1783. #define DMA_TCD6_SOFF (IMXRT_DMA_TCD[6].SOFF)
  1784. #define DMA_TCD6_ATTR (IMXRT_DMA_TCD[6].ATTR)
  1785. #define DMA_TCD6_NBYTES (IMXRT_DMA_TCD[6].NBYTES)
  1786. #define DMA_TCD6_NBYTES_MLNO (IMXRT_DMA_TCD[6].NBYTES_MLNO)
  1787. #define DMA_TCD6_NBYTES_MLOFFNO (IMXRT_DMA_TCD[6].NBYTES_MLOFFNO)
  1788. #define DMA_TCD6_NBYTES_MLOFFYES (IMXRT_DMA_TCD[6].NBYTES_MLOFFYES)
  1789. #define DMA_TCD6_SLAST (IMXRT_DMA_TCD[6].SLAST)
  1790. #define DMA_TCD6_DADDR (IMXRT_DMA_TCD[6].DADDR)
  1791. #define DMA_TCD6_DOFF (IMXRT_DMA_TCD[6].DOFF)
  1792. #define DMA_TCD6_CITER (IMXRT_DMA_TCD[6].CITER)
  1793. #define DMA_TCD6_CITER_ELINKYES (IMXRT_DMA_TCD[6].CITER_ELINKYES)
  1794. #define DMA_TCD6_CITER_ELINKNO (IMXRT_DMA_TCD[6].CITER_ELINKNO)
  1795. #define DMA_TCD6_DLASTSGA (IMXRT_DMA_TCD[6].DLASTSGA)
  1796. #define DMA_TCD6_CSR (IMXRT_DMA_TCD[6].CSR)
  1797. #define DMA_TCD6_BITER (IMXRT_DMA_TCD[6].BITER)
  1798. #define DMA_TCD6_BITER_ELINKYES (IMXRT_DMA_TCD[6].BITER_ELINKYES)
  1799. #define DMA_TCD6_BITER_ELINKNO (IMXRT_DMA_TCD[6].BITER_ELINKNO)
  1800. #define DMA_TCD7_SADDR (IMXRT_DMA_TCD[7].SADDR)
  1801. #define DMA_TCD7_SOFF (IMXRT_DMA_TCD[7].SOFF)
  1802. #define DMA_TCD7_ATTR (IMXRT_DMA_TCD[7].ATTR)
  1803. #define DMA_TCD7_NBYTES (IMXRT_DMA_TCD[7].NBYTES)
  1804. #define DMA_TCD7_NBYTES_MLNO (IMXRT_DMA_TCD[7].NBYTES_MLNO)
  1805. #define DMA_TCD7_NBYTES_MLOFFNO (IMXRT_DMA_TCD[7].NBYTES_MLOFFNO)
  1806. #define DMA_TCD7_NBYTES_MLOFFYES (IMXRT_DMA_TCD[7].NBYTES_MLOFFYES)
  1807. #define DMA_TCD7_SLAST (IMXRT_DMA_TCD[7].SLAST)
  1808. #define DMA_TCD7_DADDR (IMXRT_DMA_TCD[7].DADDR)
  1809. #define DMA_TCD7_DOFF (IMXRT_DMA_TCD[7].DOFF)
  1810. #define DMA_TCD7_CITER (IMXRT_DMA_TCD[7].CITER)
  1811. #define DMA_TCD7_CITER_ELINKYES (IMXRT_DMA_TCD[7].CITER_ELINKYES)
  1812. #define DMA_TCD7_CITER_ELINKNO (IMXRT_DMA_TCD[7].CITER_ELINKNO)
  1813. #define DMA_TCD7_DLASTSGA (IMXRT_DMA_TCD[7].DLASTSGA)
  1814. #define DMA_TCD7_CSR (IMXRT_DMA_TCD[7].CSR)
  1815. #define DMA_TCD7_BITER (IMXRT_DMA_TCD[7].BITER)
  1816. #define DMA_TCD7_BITER_ELINKYES (IMXRT_DMA_TCD[7].BITER_ELINKYES)
  1817. #define DMA_TCD7_BITER_ELINKNO (IMXRT_DMA_TCD[7].BITER_ELINKNO)
  1818. #define DMA_TCD8_SADDR (IMXRT_DMA_TCD[8].SADDR)
  1819. #define DMA_TCD8_SOFF (IMXRT_DMA_TCD[8].SOFF)
  1820. #define DMA_TCD8_ATTR (IMXRT_DMA_TCD[8].ATTR)
  1821. #define DMA_TCD8_NBYTES (IMXRT_DMA_TCD[8].NBYTES)
  1822. #define DMA_TCD8_NBYTES_MLNO (IMXRT_DMA_TCD[8].NBYTES_MLNO)
  1823. #define DMA_TCD8_NBYTES_MLOFFNO (IMXRT_DMA_TCD[8].NBYTES_MLOFFNO)
  1824. #define DMA_TCD8_NBYTES_MLOFFYES (IMXRT_DMA_TCD[8].NBYTES_MLOFFYES)
  1825. #define DMA_TCD8_SLAST (IMXRT_DMA_TCD[8].SLAST)
  1826. #define DMA_TCD8_DADDR (IMXRT_DMA_TCD[8].DADDR)
  1827. #define DMA_TCD8_DOFF (IMXRT_DMA_TCD[8].DOFF)
  1828. #define DMA_TCD8_CITER (IMXRT_DMA_TCD[8].CITER)
  1829. #define DMA_TCD8_CITER_ELINKYES (IMXRT_DMA_TCD[8].CITER_ELINKYES)
  1830. #define DMA_TCD8_CITER_ELINKNO (IMXRT_DMA_TCD[8].CITER_ELINKNO)
  1831. #define DMA_TCD8_DLASTSGA (IMXRT_DMA_TCD[8].DLASTSGA)
  1832. #define DMA_TCD8_CSR (IMXRT_DMA_TCD[8].CSR)
  1833. #define DMA_TCD8_BITER (IMXRT_DMA_TCD[8].BITER)
  1834. #define DMA_TCD8_BITER_ELINKYES (IMXRT_DMA_TCD[8].BITER_ELINKYES)
  1835. #define DMA_TCD8_BITER_ELINKNO (IMXRT_DMA_TCD[8].BITER_ELINKNO)
  1836. #define DMA_TCD9_SADDR (IMXRT_DMA_TCD[9].SADDR)
  1837. #define DMA_TCD9_SOFF (IMXRT_DMA_TCD[9].SOFF)
  1838. #define DMA_TCD9_ATTR (IMXRT_DMA_TCD[9].ATTR)
  1839. #define DMA_TCD9_NBYTES (IMXRT_DMA_TCD[9].NBYTES)
  1840. #define DMA_TCD9_NBYTES_MLNO (IMXRT_DMA_TCD[9].NBYTES_MLNO)
  1841. #define DMA_TCD9_NBYTES_MLOFFNO (IMXRT_DMA_TCD[9].NBYTES_MLOFFNO)
  1842. #define DMA_TCD9_NBYTES_MLOFFYES (IMXRT_DMA_TCD[9].NBYTES_MLOFFYES)
  1843. #define DMA_TCD9_SLAST (IMXRT_DMA_TCD[9].SLAST)
  1844. #define DMA_TCD9_DADDR (IMXRT_DMA_TCD[9].DADDR)
  1845. #define DMA_TCD9_DOFF (IMXRT_DMA_TCD[9].DOFF)
  1846. #define DMA_TCD9_CITER (IMXRT_DMA_TCD[9].CITER)
  1847. #define DMA_TCD9_CITER_ELINKYES (IMXRT_DMA_TCD[9].CITER_ELINKYES)
  1848. #define DMA_TCD9_CITER_ELINKNO (IMXRT_DMA_TCD[9].CITER_ELINKNO)
  1849. #define DMA_TCD9_DLASTSGA (IMXRT_DMA_TCD[9].DLASTSGA)
  1850. #define DMA_TCD9_CSR (IMXRT_DMA_TCD[9].CSR)
  1851. #define DMA_TCD9_BITER (IMXRT_DMA_TCD[9].BITER)
  1852. #define DMA_TCD9_BITER_ELINKYES (IMXRT_DMA_TCD[9].BITER_ELINKYES)
  1853. #define DMA_TCD9_BITER_ELINKNO (IMXRT_DMA_TCD[9].BITER_ELINKNO)
  1854. #define DMA_TCD10_SADDR (IMXRT_DMA_TCD[10].SADDR)
  1855. #define DMA_TCD10_SOFF (IMXRT_DMA_TCD[10].SOFF)
  1856. #define DMA_TCD10_ATTR (IMXRT_DMA_TCD[10].ATTR)
  1857. #define DMA_TCD10_NBYTES (IMXRT_DMA_TCD[10].NBYTES)
  1858. #define DMA_TCD10_NBYTES_MLNO (IMXRT_DMA_TCD[10].NBYTES_MLNO)
  1859. #define DMA_TCD10_NBYTES_MLOFFNO (IMXRT_DMA_TCD[10].NBYTES_MLOFFNO)
  1860. #define DMA_TCD10_NBYTES_MLOFFYES (IMXRT_DMA_TCD[10].NBYTES_MLOFFYES)
  1861. #define DMA_TCD10_SLAST (IMXRT_DMA_TCD[10].SLAST)
  1862. #define DMA_TCD10_DADDR (IMXRT_DMA_TCD[10].DADDR)
  1863. #define DMA_TCD10_DOFF (IMXRT_DMA_TCD[10].DOFF)
  1864. #define DMA_TCD10_CITER (IMXRT_DMA_TCD[10].CITER)
  1865. #define DMA_TCD10_CITER_ELINKYES (IMXRT_DMA_TCD[10].CITER_ELINKYES)
  1866. #define DMA_TCD10_CITER_ELINKNO (IMXRT_DMA_TCD[10].CITER_ELINKNO)
  1867. #define DMA_TCD10_DLASTSGA (IMXRT_DMA_TCD[10].DLASTSGA)
  1868. #define DMA_TCD10_CSR (IMXRT_DMA_TCD[10].CSR)
  1869. #define DMA_TCD10_BITER (IMXRT_DMA_TCD[10].BITER)
  1870. #define DMA_TCD10_BITER_ELINKYES (IMXRT_DMA_TCD[10].BITER_ELINKYES)
  1871. #define DMA_TCD10_BITER_ELINKNO (IMXRT_DMA_TCD[10].BITER_ELINKNO)
  1872. #define DMA_TCD11_SADDR (IMXRT_DMA_TCD[11].SADDR)
  1873. #define DMA_TCD11_SOFF (IMXRT_DMA_TCD[11].SOFF)
  1874. #define DMA_TCD11_ATTR (IMXRT_DMA_TCD[11].ATTR)
  1875. #define DMA_TCD11_NBYTES (IMXRT_DMA_TCD[11].NBYTES)
  1876. #define DMA_TCD11_NBYTES_MLNO (IMXRT_DMA_TCD[11].NBYTES_MLNO)
  1877. #define DMA_TCD11_NBYTES_MLOFFNO (IMXRT_DMA_TCD[11].NBYTES_MLOFFNO)
  1878. #define DMA_TCD11_NBYTES_MLOFFYES (IMXRT_DMA_TCD[11].NBYTES_MLOFFYES)
  1879. #define DMA_TCD11_SLAST (IMXRT_DMA_TCD[11].SLAST)
  1880. #define DMA_TCD11_DADDR (IMXRT_DMA_TCD[11].DADDR)
  1881. #define DMA_TCD11_DOFF (IMXRT_DMA_TCD[11].DOFF)
  1882. #define DMA_TCD11_CITER (IMXRT_DMA_TCD[11].CITER)
  1883. #define DMA_TCD11_CITER_ELINKYES (IMXRT_DMA_TCD[11].CITER_ELINKYES)
  1884. #define DMA_TCD11_CITER_ELINKNO (IMXRT_DMA_TCD[11].CITER_ELINKNO)
  1885. #define DMA_TCD11_DLASTSGA (IMXRT_DMA_TCD[11].DLASTSGA)
  1886. #define DMA_TCD11_CSR (IMXRT_DMA_TCD[11].CSR)
  1887. #define DMA_TCD11_BITER (IMXRT_DMA_TCD[11].BITER)
  1888. #define DMA_TCD11_BITER_ELINKYES (IMXRT_DMA_TCD[11].BITER_ELINKYES)
  1889. #define DMA_TCD11_BITER_ELINKNO (IMXRT_DMA_TCD[11].BITER_ELINKNO)
  1890. #define DMA_TCD12_SADDR (IMXRT_DMA_TCD[12].SADDR)
  1891. #define DMA_TCD12_SOFF (IMXRT_DMA_TCD[12].SOFF)
  1892. #define DMA_TCD12_ATTR (IMXRT_DMA_TCD[12].ATTR)
  1893. #define DMA_TCD12_NBYTES (IMXRT_DMA_TCD[12].NBYTES)
  1894. #define DMA_TCD12_NBYTES_MLNO (IMXRT_DMA_TCD[12].NBYTES_MLNO)
  1895. #define DMA_TCD12_NBYTES_MLOFFNO (IMXRT_DMA_TCD[12].NBYTES_MLOFFNO)
  1896. #define DMA_TCD12_NBYTES_MLOFFYES (IMXRT_DMA_TCD[12].NBYTES_MLOFFYES)
  1897. #define DMA_TCD12_SLAST (IMXRT_DMA_TCD[12].SLAST)
  1898. #define DMA_TCD12_DADDR (IMXRT_DMA_TCD[12].DADDR)
  1899. #define DMA_TCD12_DOFF (IMXRT_DMA_TCD[12].DOFF)
  1900. #define DMA_TCD12_CITER (IMXRT_DMA_TCD[12].CITER)
  1901. #define DMA_TCD12_CITER_ELINKYES (IMXRT_DMA_TCD[12].CITER_ELINKYES)
  1902. #define DMA_TCD12_CITER_ELINKNO (IMXRT_DMA_TCD[12].CITER_ELINKNO)
  1903. #define DMA_TCD12_DLASTSGA (IMXRT_DMA_TCD[12].DLASTSGA)
  1904. #define DMA_TCD12_CSR (IMXRT_DMA_TCD[12].CSR)
  1905. #define DMA_TCD12_BITER (IMXRT_DMA_TCD[12].BITER)
  1906. #define DMA_TCD12_BITER_ELINKYES (IMXRT_DMA_TCD[12].BITER_ELINKYES)
  1907. #define DMA_TCD12_BITER_ELINKNO (IMXRT_DMA_TCD[12].BITER_ELINKNO)
  1908. #define DMA_TCD13_SADDR (IMXRT_DMA_TCD[13].SADDR)
  1909. #define DMA_TCD13_SOFF (IMXRT_DMA_TCD[13].SOFF)
  1910. #define DMA_TCD13_ATTR (IMXRT_DMA_TCD[13].ATTR)
  1911. #define DMA_TCD13_NBYTES (IMXRT_DMA_TCD[13].NBYTES)
  1912. #define DMA_TCD13_NBYTES_MLNO (IMXRT_DMA_TCD[13].NBYTES_MLNO)
  1913. #define DMA_TCD13_NBYTES_MLOFFNO (IMXRT_DMA_TCD[13].NBYTES_MLOFFNO)
  1914. #define DMA_TCD13_NBYTES_MLOFFYES (IMXRT_DMA_TCD[13].NBYTES_MLOFFYES)
  1915. #define DMA_TCD13_SLAST (IMXRT_DMA_TCD[13].SLAST)
  1916. #define DMA_TCD13_DADDR (IMXRT_DMA_TCD[13].DADDR)
  1917. #define DMA_TCD13_DOFF (IMXRT_DMA_TCD[13].DOFF)
  1918. #define DMA_TCD13_CITER (IMXRT_DMA_TCD[13].CITER)
  1919. #define DMA_TCD13_CITER_ELINKYES (IMXRT_DMA_TCD[13].CITER_ELINKYES)
  1920. #define DMA_TCD13_CITER_ELINKNO (IMXRT_DMA_TCD[13].CITER_ELINKNO)
  1921. #define DMA_TCD13_DLASTSGA (IMXRT_DMA_TCD[13].DLASTSGA)
  1922. #define DMA_TCD13_CSR (IMXRT_DMA_TCD[13].CSR)
  1923. #define DMA_TCD13_BITER (IMXRT_DMA_TCD[13].BITER)
  1924. #define DMA_TCD13_BITER_ELINKYES (IMXRT_DMA_TCD[13].BITER_ELINKYES)
  1925. #define DMA_TCD13_BITER_ELINKNO (IMXRT_DMA_TCD[13].BITER_ELINKNO)
  1926. #define DMA_TCD14_SADDR (IMXRT_DMA_TCD[14].SADDR)
  1927. #define DMA_TCD14_SOFF (IMXRT_DMA_TCD[14].SOFF)
  1928. #define DMA_TCD14_ATTR (IMXRT_DMA_TCD[14].ATTR)
  1929. #define DMA_TCD14_NBYTES (IMXRT_DMA_TCD[14].NBYTES)
  1930. #define DMA_TCD14_NBYTES_MLNO (IMXRT_DMA_TCD[14].NBYTES_MLNO)
  1931. #define DMA_TCD14_NBYTES_MLOFFNO (IMXRT_DMA_TCD[14].NBYTES_MLOFFNO)
  1932. #define DMA_TCD14_NBYTES_MLOFFYES (IMXRT_DMA_TCD[14].NBYTES_MLOFFYES)
  1933. #define DMA_TCD14_SLAST (IMXRT_DMA_TCD[14].SLAST)
  1934. #define DMA_TCD14_DADDR (IMXRT_DMA_TCD[14].DADDR)
  1935. #define DMA_TCD14_DOFF (IMXRT_DMA_TCD[14].DOFF)
  1936. #define DMA_TCD14_CITER (IMXRT_DMA_TCD[14].CITER)
  1937. #define DMA_TCD14_CITER_ELINKYES (IMXRT_DMA_TCD[14].CITER_ELINKYES)
  1938. #define DMA_TCD14_CITER_ELINKNO (IMXRT_DMA_TCD[14].CITER_ELINKNO)
  1939. #define DMA_TCD14_DLASTSGA (IMXRT_DMA_TCD[14].DLASTSGA)
  1940. #define DMA_TCD14_CSR (IMXRT_DMA_TCD[14].CSR)
  1941. #define DMA_TCD14_BITER (IMXRT_DMA_TCD[14].BITER)
  1942. #define DMA_TCD14_BITER_ELINKYES (IMXRT_DMA_TCD[14].BITER_ELINKYES)
  1943. #define DMA_TCD14_BITER_ELINKNO (IMXRT_DMA_TCD[14].BITER_ELINKNO)
  1944. #define DMA_TCD15_SADDR (IMXRT_DMA_TCD[15].SADDR)
  1945. #define DMA_TCD15_SOFF (IMXRT_DMA_TCD[15].SOFF)
  1946. #define DMA_TCD15_ATTR (IMXRT_DMA_TCD[15].ATTR)
  1947. #define DMA_TCD15_NBYTES (IMXRT_DMA_TCD[15].NBYTES)
  1948. #define DMA_TCD15_NBYTES_MLNO (IMXRT_DMA_TCD[15].NBYTES_MLNO)
  1949. #define DMA_TCD15_NBYTES_MLOFFNO (IMXRT_DMA_TCD[15].NBYTES_MLOFFNO)
  1950. #define DMA_TCD15_NBYTES_MLOFFYES (IMXRT_DMA_TCD[15].NBYTES_MLOFFYES)
  1951. #define DMA_TCD15_SLAST (IMXRT_DMA_TCD[15].SLAST)
  1952. #define DMA_TCD15_DADDR (IMXRT_DMA_TCD[15].DADDR)
  1953. #define DMA_TCD15_DOFF (IMXRT_DMA_TCD[15].DOFF)
  1954. #define DMA_TCD15_CITER (IMXRT_DMA_TCD[15].CITER)
  1955. #define DMA_TCD15_CITER_ELINKYES (IMXRT_DMA_TCD[15].CITER_ELINKYES)
  1956. #define DMA_TCD15_CITER_ELINKNO (IMXRT_DMA_TCD[15].CITER_ELINKNO)
  1957. #define DMA_TCD15_DLASTSGA (IMXRT_DMA_TCD[15].DLASTSGA)
  1958. #define DMA_TCD15_CSR (IMXRT_DMA_TCD[15].CSR)
  1959. #define DMA_TCD15_BITER (IMXRT_DMA_TCD[15].BITER)
  1960. #define DMA_TCD15_BITER_ELINKYES (IMXRT_DMA_TCD[15].BITER_ELINKYES)
  1961. #define DMA_TCD15_BITER_ELINKNO (IMXRT_DMA_TCD[15].BITER_ELINKNO)
  1962. #define DMA_TCD16_SADDR (IMXRT_DMA_TCD[16].SADDR)
  1963. #define DMA_TCD16_SOFF (IMXRT_DMA_TCD[16].SOFF)
  1964. #define DMA_TCD16_ATTR (IMXRT_DMA_TCD[16].ATTR)
  1965. #define DMA_TCD16_NBYTES (IMXRT_DMA_TCD[16].NBYTES)
  1966. #define DMA_TCD16_NBYTES_MLNO (IMXRT_DMA_TCD[16].NBYTES_MLNO)
  1967. #define DMA_TCD16_NBYTES_MLOFFNO (IMXRT_DMA_TCD[16].NBYTES_MLOFFNO)
  1968. #define DMA_TCD16_NBYTES_MLOFFYES (IMXRT_DMA_TCD[16].NBYTES_MLOFFYES)
  1969. #define DMA_TCD16_SLAST (IMXRT_DMA_TCD[16].SLAST)
  1970. #define DMA_TCD16_DADDR (IMXRT_DMA_TCD[16].DADDR)
  1971. #define DMA_TCD16_DOFF (IMXRT_DMA_TCD[16].DOFF)
  1972. #define DMA_TCD16_CITER (IMXRT_DMA_TCD[16].CITER)
  1973. #define DMA_TCD16_CITER_ELINKYES (IMXRT_DMA_TCD[16].CITER_ELINKYES)
  1974. #define DMA_TCD16_CITER_ELINKNO (IMXRT_DMA_TCD[16].CITER_ELINKNO)
  1975. #define DMA_TCD16_DLASTSGA (IMXRT_DMA_TCD[16].DLASTSGA)
  1976. #define DMA_TCD16_CSR (IMXRT_DMA_TCD[16].CSR)
  1977. #define DMA_TCD16_BITER (IMXRT_DMA_TCD[16].BITER)
  1978. #define DMA_TCD16_BITER_ELINKYES (IMXRT_DMA_TCD[16].BITER_ELINKYES)
  1979. #define DMA_TCD16_BITER_ELINKNO (IMXRT_DMA_TCD[16].BITER_ELINKNO)
  1980. #define DMA_TCD17_SADDR (IMXRT_DMA_TCD[17].SADDR)
  1981. #define DMA_TCD17_SOFF (IMXRT_DMA_TCD[17].SOFF)
  1982. #define DMA_TCD17_ATTR (IMXRT_DMA_TCD[17].ATTR)
  1983. #define DMA_TCD17_NBYTES (IMXRT_DMA_TCD[17].NBYTES)
  1984. #define DMA_TCD17_NBYTES_MLNO (IMXRT_DMA_TCD[17].NBYTES_MLNO)
  1985. #define DMA_TCD17_NBYTES_MLOFFNO (IMXRT_DMA_TCD[17].NBYTES_MLOFFNO)
  1986. #define DMA_TCD17_NBYTES_MLOFFYES (IMXRT_DMA_TCD[17].NBYTES_MLOFFYES)
  1987. #define DMA_TCD17_SLAST (IMXRT_DMA_TCD[17].SLAST)
  1988. #define DMA_TCD17_DADDR (IMXRT_DMA_TCD[17].DADDR)
  1989. #define DMA_TCD17_DOFF (IMXRT_DMA_TCD[17].DOFF)
  1990. #define DMA_TCD17_CITER (IMXRT_DMA_TCD[17].CITER)
  1991. #define DMA_TCD17_CITER_ELINKYES (IMXRT_DMA_TCD[17].CITER_ELINKYES)
  1992. #define DMA_TCD17_CITER_ELINKNO (IMXRT_DMA_TCD[17].CITER_ELINKNO)
  1993. #define DMA_TCD17_DLASTSGA (IMXRT_DMA_TCD[17].DLASTSGA)
  1994. #define DMA_TCD17_CSR (IMXRT_DMA_TCD[17].CSR)
  1995. #define DMA_TCD17_BITER (IMXRT_DMA_TCD[17].BITER)
  1996. #define DMA_TCD17_BITER_ELINKYES (IMXRT_DMA_TCD[17].BITER_ELINKYES)
  1997. #define DMA_TCD17_BITER_ELINKNO (IMXRT_DMA_TCD[17].BITER_ELINKNO)
  1998. #define DMA_TCD18_SADDR (IMXRT_DMA_TCD[18].SADDR)
  1999. #define DMA_TCD18_SOFF (IMXRT_DMA_TCD[18].SOFF)
  2000. #define DMA_TCD18_ATTR (IMXRT_DMA_TCD[18].ATTR)
  2001. #define DMA_TCD18_NBYTES (IMXRT_DMA_TCD[18].NBYTES)
  2002. #define DMA_TCD18_NBYTES_MLNO (IMXRT_DMA_TCD[18].NBYTES_MLNO)
  2003. #define DMA_TCD18_NBYTES_MLOFFNO (IMXRT_DMA_TCD[18].NBYTES_MLOFFNO)
  2004. #define DMA_TCD18_NBYTES_MLOFFYES (IMXRT_DMA_TCD[18].NBYTES_MLOFFYES)
  2005. #define DMA_TCD18_SLAST (IMXRT_DMA_TCD[18].SLAST)
  2006. #define DMA_TCD18_DADDR (IMXRT_DMA_TCD[18].DADDR)
  2007. #define DMA_TCD18_DOFF (IMXRT_DMA_TCD[18].DOFF)
  2008. #define DMA_TCD18_CITER (IMXRT_DMA_TCD[18].CITER)
  2009. #define DMA_TCD18_CITER_ELINKYES (IMXRT_DMA_TCD[18].CITER_ELINKYES)
  2010. #define DMA_TCD18_CITER_ELINKNO (IMXRT_DMA_TCD[18].CITER_ELINKNO)
  2011. #define DMA_TCD18_DLASTSGA (IMXRT_DMA_TCD[18].DLASTSGA)
  2012. #define DMA_TCD18_CSR (IMXRT_DMA_TCD[18].CSR)
  2013. #define DMA_TCD18_BITER (IMXRT_DMA_TCD[18].BITER)
  2014. #define DMA_TCD18_BITER_ELINKYES (IMXRT_DMA_TCD[18].BITER_ELINKYES)
  2015. #define DMA_TCD18_BITER_ELINKNO (IMXRT_DMA_TCD[18].BITER_ELINKNO)
  2016. #define DMA_TCD19_SADDR (IMXRT_DMA_TCD[19].SADDR)
  2017. #define DMA_TCD19_SOFF (IMXRT_DMA_TCD[19].SOFF)
  2018. #define DMA_TCD19_ATTR (IMXRT_DMA_TCD[19].ATTR)
  2019. #define DMA_TCD19_NBYTES (IMXRT_DMA_TCD[19].NBYTES)
  2020. #define DMA_TCD19_NBYTES_MLNO (IMXRT_DMA_TCD[19].NBYTES_MLNO)
  2021. #define DMA_TCD19_NBYTES_MLOFFNO (IMXRT_DMA_TCD[19].NBYTES_MLOFFNO)
  2022. #define DMA_TCD19_NBYTES_MLOFFYES (IMXRT_DMA_TCD[19].NBYTES_MLOFFYES)
  2023. #define DMA_TCD19_SLAST (IMXRT_DMA_TCD[19].SLAST)
  2024. #define DMA_TCD19_DADDR (IMXRT_DMA_TCD[19].DADDR)
  2025. #define DMA_TCD19_DOFF (IMXRT_DMA_TCD[19].DOFF)
  2026. #define DMA_TCD19_CITER (IMXRT_DMA_TCD[19].CITER)
  2027. #define DMA_TCD19_CITER_ELINKYES (IMXRT_DMA_TCD[19].CITER_ELINKYES)
  2028. #define DMA_TCD19_CITER_ELINKNO (IMXRT_DMA_TCD[19].CITER_ELINKNO)
  2029. #define DMA_TCD19_DLASTSGA (IMXRT_DMA_TCD[19].DLASTSGA)
  2030. #define DMA_TCD19_CSR (IMXRT_DMA_TCD[19].CSR)
  2031. #define DMA_TCD19_BITER (IMXRT_DMA_TCD[19].BITER)
  2032. #define DMA_TCD19_BITER_ELINKYES (IMXRT_DMA_TCD[19].BITER_ELINKYES)
  2033. #define DMA_TCD19_BITER_ELINKNO (IMXRT_DMA_TCD[19].BITER_ELINKNO)
  2034. #define DMA_TCD20_SADDR (IMXRT_DMA_TCD[20].SADDR)
  2035. #define DMA_TCD20_SOFF (IMXRT_DMA_TCD[20].SOFF)
  2036. #define DMA_TCD20_ATTR (IMXRT_DMA_TCD[20].ATTR)
  2037. #define DMA_TCD20_NBYTES (IMXRT_DMA_TCD[20].NBYTES)
  2038. #define DMA_TCD20_NBYTES_MLNO (IMXRT_DMA_TCD[20].NBYTES_MLNO)
  2039. #define DMA_TCD20_NBYTES_MLOFFNO (IMXRT_DMA_TCD[20].NBYTES_MLOFFNO)
  2040. #define DMA_TCD20_NBYTES_MLOFFYES (IMXRT_DMA_TCD[20].NBYTES_MLOFFYES)
  2041. #define DMA_TCD20_SLAST (IMXRT_DMA_TCD[20].SLAST)
  2042. #define DMA_TCD20_DADDR (IMXRT_DMA_TCD[20].DADDR)
  2043. #define DMA_TCD20_DOFF (IMXRT_DMA_TCD[20].DOFF)
  2044. #define DMA_TCD20_CITER (IMXRT_DMA_TCD[20].CITER)
  2045. #define DMA_TCD20_CITER_ELINKYES (IMXRT_DMA_TCD[20].CITER_ELINKYES)
  2046. #define DMA_TCD20_CITER_ELINKNO (IMXRT_DMA_TCD[20].CITER_ELINKNO)
  2047. #define DMA_TCD20_DLASTSGA (IMXRT_DMA_TCD[20].DLASTSGA)
  2048. #define DMA_TCD20_CSR (IMXRT_DMA_TCD[20].CSR)
  2049. #define DMA_TCD20_BITER (IMXRT_DMA_TCD[20].BITER)
  2050. #define DMA_TCD20_BITER_ELINKYES (IMXRT_DMA_TCD[20].BITER_ELINKYES)
  2051. #define DMA_TCD20_BITER_ELINKNO (IMXRT_DMA_TCD[20].BITER_ELINKNO)
  2052. #define DMA_TCD21_SADDR (IMXRT_DMA_TCD[21].SADDR)
  2053. #define DMA_TCD21_SOFF (IMXRT_DMA_TCD[21].SOFF)
  2054. #define DMA_TCD21_ATTR (IMXRT_DMA_TCD[21].ATTR)
  2055. #define DMA_TCD21_NBYTES (IMXRT_DMA_TCD[21].NBYTES)
  2056. #define DMA_TCD21_NBYTES_MLNO (IMXRT_DMA_TCD[21].NBYTES_MLNO)
  2057. #define DMA_TCD21_NBYTES_MLOFFNO (IMXRT_DMA_TCD[21].NBYTES_MLOFFNO)
  2058. #define DMA_TCD21_NBYTES_MLOFFYES (IMXRT_DMA_TCD[21].NBYTES_MLOFFYES)
  2059. #define DMA_TCD21_SLAST (IMXRT_DMA_TCD[21].SLAST)
  2060. #define DMA_TCD21_DADDR (IMXRT_DMA_TCD[21].DADDR)
  2061. #define DMA_TCD21_DOFF (IMXRT_DMA_TCD[21].DOFF)
  2062. #define DMA_TCD21_CITER (IMXRT_DMA_TCD[21].CITER)
  2063. #define DMA_TCD21_CITER_ELINKYES (IMXRT_DMA_TCD[21].CITER_ELINKYES)
  2064. #define DMA_TCD21_CITER_ELINKNO (IMXRT_DMA_TCD[21].CITER_ELINKNO)
  2065. #define DMA_TCD21_DLASTSGA (IMXRT_DMA_TCD[21].DLASTSGA)
  2066. #define DMA_TCD21_CSR (IMXRT_DMA_TCD[21].CSR)
  2067. #define DMA_TCD21_BITER (IMXRT_DMA_TCD[21].BITER)
  2068. #define DMA_TCD21_BITER_ELINKYES (IMXRT_DMA_TCD[21].BITER_ELINKYES)
  2069. #define DMA_TCD21_BITER_ELINKNO (IMXRT_DMA_TCD[21].BITER_ELINKNO)
  2070. #define DMA_TCD22_SADDR (IMXRT_DMA_TCD[22].SADDR)
  2071. #define DMA_TCD22_SOFF (IMXRT_DMA_TCD[22].SOFF)
  2072. #define DMA_TCD22_ATTR (IMXRT_DMA_TCD[22].ATTR)
  2073. #define DMA_TCD22_NBYTES (IMXRT_DMA_TCD[22].NBYTES)
  2074. #define DMA_TCD22_NBYTES_MLNO (IMXRT_DMA_TCD[22].NBYTES_MLNO)
  2075. #define DMA_TCD22_NBYTES_MLOFFNO (IMXRT_DMA_TCD[22].NBYTES_MLOFFNO)
  2076. #define DMA_TCD22_NBYTES_MLOFFYES (IMXRT_DMA_TCD[22].NBYTES_MLOFFYES)
  2077. #define DMA_TCD22_SLAST (IMXRT_DMA_TCD[22].SLAST)
  2078. #define DMA_TCD22_DADDR (IMXRT_DMA_TCD[22].DADDR)
  2079. #define DMA_TCD22_DOFF (IMXRT_DMA_TCD[22].DOFF)
  2080. #define DMA_TCD22_CITER (IMXRT_DMA_TCD[22].CITER)
  2081. #define DMA_TCD22_CITER_ELINKYES (IMXRT_DMA_TCD[22].CITER_ELINKYES)
  2082. #define DMA_TCD22_CITER_ELINKNO (IMXRT_DMA_TCD[22].CITER_ELINKNO)
  2083. #define DMA_TCD22_DLASTSGA (IMXRT_DMA_TCD[22].DLASTSGA)
  2084. #define DMA_TCD22_CSR (IMXRT_DMA_TCD[22].CSR)
  2085. #define DMA_TCD22_BITER (IMXRT_DMA_TCD[22].BITER)
  2086. #define DMA_TCD22_BITER_ELINKYES (IMXRT_DMA_TCD[22].BITER_ELINKYES)
  2087. #define DMA_TCD22_BITER_ELINKNO (IMXRT_DMA_TCD[22].BITER_ELINKNO)
  2088. #define DMA_TCD23_SADDR (IMXRT_DMA_TCD[23].SADDR)
  2089. #define DMA_TCD23_SOFF (IMXRT_DMA_TCD[23].SOFF)
  2090. #define DMA_TCD23_ATTR (IMXRT_DMA_TCD[23].ATTR)
  2091. #define DMA_TCD23_NBYTES (IMXRT_DMA_TCD[23].NBYTES)
  2092. #define DMA_TCD23_NBYTES_MLNO (IMXRT_DMA_TCD[23].NBYTES_MLNO)
  2093. #define DMA_TCD23_NBYTES_MLOFFNO (IMXRT_DMA_TCD[23].NBYTES_MLOFFNO)
  2094. #define DMA_TCD23_NBYTES_MLOFFYES (IMXRT_DMA_TCD[23].NBYTES_MLOFFYES)
  2095. #define DMA_TCD23_SLAST (IMXRT_DMA_TCD[23].SLAST)
  2096. #define DMA_TCD23_DADDR (IMXRT_DMA_TCD[23].DADDR)
  2097. #define DMA_TCD23_DOFF (IMXRT_DMA_TCD[23].DOFF)
  2098. #define DMA_TCD23_CITER (IMXRT_DMA_TCD[23].CITER)
  2099. #define DMA_TCD23_CITER_ELINKYES (IMXRT_DMA_TCD[23].CITER_ELINKYES)
  2100. #define DMA_TCD23_CITER_ELINKNO (IMXRT_DMA_TCD[23].CITER_ELINKNO)
  2101. #define DMA_TCD23_DLASTSGA (IMXRT_DMA_TCD[23].DLASTSGA)
  2102. #define DMA_TCD23_CSR (IMXRT_DMA_TCD[23].CSR)
  2103. #define DMA_TCD23_BITER (IMXRT_DMA_TCD[23].BITER)
  2104. #define DMA_TCD23_BITER_ELINKYES (IMXRT_DMA_TCD[23].BITER_ELINKYES)
  2105. #define DMA_TCD23_BITER_ELINKNO (IMXRT_DMA_TCD[23].BITER_ELINKNO)
  2106. #define DMA_TCD24_SADDR (IMXRT_DMA_TCD[24].SADDR)
  2107. #define DMA_TCD24_SOFF (IMXRT_DMA_TCD[24].SOFF)
  2108. #define DMA_TCD24_ATTR (IMXRT_DMA_TCD[24].ATTR)
  2109. #define DMA_TCD24_NBYTES (IMXRT_DMA_TCD[24].NBYTES)
  2110. #define DMA_TCD24_NBYTES_MLNO (IMXRT_DMA_TCD[24].NBYTES_MLNO)
  2111. #define DMA_TCD24_NBYTES_MLOFFNO (IMXRT_DMA_TCD[24].NBYTES_MLOFFNO)
  2112. #define DMA_TCD24_NBYTES_MLOFFYES (IMXRT_DMA_TCD[24].NBYTES_MLOFFYES)
  2113. #define DMA_TCD24_SLAST (IMXRT_DMA_TCD[24].SLAST)
  2114. #define DMA_TCD24_DADDR (IMXRT_DMA_TCD[24].DADDR)
  2115. #define DMA_TCD24_DOFF (IMXRT_DMA_TCD[24].DOFF)
  2116. #define DMA_TCD24_CITER (IMXRT_DMA_TCD[24].CITER)
  2117. #define DMA_TCD24_CITER_ELINKYES (IMXRT_DMA_TCD[24].CITER_ELINKYES)
  2118. #define DMA_TCD24_CITER_ELINKNO (IMXRT_DMA_TCD[24].CITER_ELINKNO)
  2119. #define DMA_TCD24_DLASTSGA (IMXRT_DMA_TCD[24].DLASTSGA)
  2120. #define DMA_TCD24_CSR (IMXRT_DMA_TCD[24].CSR)
  2121. #define DMA_TCD24_BITER (IMXRT_DMA_TCD[24].BITER)
  2122. #define DMA_TCD24_BITER_ELINKYES (IMXRT_DMA_TCD[24].BITER_ELINKYES)
  2123. #define DMA_TCD24_BITER_ELINKNO (IMXRT_DMA_TCD[24].BITER_ELINKNO)
  2124. #define DMA_TCD25_SADDR (IMXRT_DMA_TCD[25].SADDR)
  2125. #define DMA_TCD25_SOFF (IMXRT_DMA_TCD[25].SOFF)
  2126. #define DMA_TCD25_ATTR (IMXRT_DMA_TCD[25].ATTR)
  2127. #define DMA_TCD25_NBYTES (IMXRT_DMA_TCD[25].NBYTES)
  2128. #define DMA_TCD25_NBYTES_MLNO (IMXRT_DMA_TCD[25].NBYTES_MLNO)
  2129. #define DMA_TCD25_NBYTES_MLOFFNO (IMXRT_DMA_TCD[25].NBYTES_MLOFFNO)
  2130. #define DMA_TCD25_NBYTES_MLOFFYES (IMXRT_DMA_TCD[25].NBYTES_MLOFFYES)
  2131. #define DMA_TCD25_SLAST (IMXRT_DMA_TCD[25].SLAST)
  2132. #define DMA_TCD25_DADDR (IMXRT_DMA_TCD[25].DADDR)
  2133. #define DMA_TCD25_DOFF (IMXRT_DMA_TCD[25].DOFF)
  2134. #define DMA_TCD25_CITER (IMXRT_DMA_TCD[25].CITER)
  2135. #define DMA_TCD25_CITER_ELINKYES (IMXRT_DMA_TCD[25].CITER_ELINKYES)
  2136. #define DMA_TCD25_CITER_ELINKNO (IMXRT_DMA_TCD[25].CITER_ELINKNO)
  2137. #define DMA_TCD25_DLASTSGA (IMXRT_DMA_TCD[25].DLASTSGA)
  2138. #define DMA_TCD25_CSR (IMXRT_DMA_TCD[25].CSR)
  2139. #define DMA_TCD25_BITER (IMXRT_DMA_TCD[25].BITER)
  2140. #define DMA_TCD25_BITER_ELINKYES (IMXRT_DMA_TCD[25].BITER_ELINKYES)
  2141. #define DMA_TCD25_BITER_ELINKNO (IMXRT_DMA_TCD[25].BITER_ELINKNO)
  2142. #define DMA_TCD26_SADDR (IMXRT_DMA_TCD[26].SADDR)
  2143. #define DMA_TCD26_SOFF (IMXRT_DMA_TCD[26].SOFF)
  2144. #define DMA_TCD26_ATTR (IMXRT_DMA_TCD[26].ATTR)
  2145. #define DMA_TCD26_NBYTES (IMXRT_DMA_TCD[26].NBYTES)
  2146. #define DMA_TCD26_NBYTES_MLNO (IMXRT_DMA_TCD[26].NBYTES_MLNO)
  2147. #define DMA_TCD26_NBYTES_MLOFFNO (IMXRT_DMA_TCD[26].NBYTES_MLOFFNO)
  2148. #define DMA_TCD26_NBYTES_MLOFFYES (IMXRT_DMA_TCD[26].NBYTES_MLOFFYES)
  2149. #define DMA_TCD26_SLAST (IMXRT_DMA_TCD[26].SLAST)
  2150. #define DMA_TCD26_DADDR (IMXRT_DMA_TCD[26].DADDR)
  2151. #define DMA_TCD26_DOFF (IMXRT_DMA_TCD[26].DOFF)
  2152. #define DMA_TCD26_CITER (IMXRT_DMA_TCD[26].CITER)
  2153. #define DMA_TCD26_CITER_ELINKYES (IMXRT_DMA_TCD[26].CITER_ELINKYES)
  2154. #define DMA_TCD26_CITER_ELINKNO (IMXRT_DMA_TCD[26].CITER_ELINKNO)
  2155. #define DMA_TCD26_DLASTSGA (IMXRT_DMA_TCD[26].DLASTSGA)
  2156. #define DMA_TCD26_CSR (IMXRT_DMA_TCD[26].CSR)
  2157. #define DMA_TCD26_BITER (IMXRT_DMA_TCD[26].BITER)
  2158. #define DMA_TCD26_BITER_ELINKYES (IMXRT_DMA_TCD[26].BITER_ELINKYES)
  2159. #define DMA_TCD26_BITER_ELINKNO (IMXRT_DMA_TCD[26].BITER_ELINKNO)
  2160. #define DMA_TCD27_SADDR (IMXRT_DMA_TCD[27].SADDR)
  2161. #define DMA_TCD27_SOFF (IMXRT_DMA_TCD[27].SOFF)
  2162. #define DMA_TCD27_ATTR (IMXRT_DMA_TCD[27].ATTR)
  2163. #define DMA_TCD27_NBYTES (IMXRT_DMA_TCD[27].NBYTES)
  2164. #define DMA_TCD27_NBYTES_MLNO (IMXRT_DMA_TCD[27].NBYTES_MLNO)
  2165. #define DMA_TCD27_NBYTES_MLOFFNO (IMXRT_DMA_TCD[27].NBYTES_MLOFFNO)
  2166. #define DMA_TCD27_NBYTES_MLOFFYES (IMXRT_DMA_TCD[27].NBYTES_MLOFFYES)
  2167. #define DMA_TCD27_SLAST (IMXRT_DMA_TCD[27].SLAST)
  2168. #define DMA_TCD27_DADDR (IMXRT_DMA_TCD[27].DADDR)
  2169. #define DMA_TCD27_DOFF (IMXRT_DMA_TCD[27].DOFF)
  2170. #define DMA_TCD27_CITER (IMXRT_DMA_TCD[27].CITER)
  2171. #define DMA_TCD27_CITER_ELINKYES (IMXRT_DMA_TCD[27].CITER_ELINKYES)
  2172. #define DMA_TCD27_CITER_ELINKNO (IMXRT_DMA_TCD[27].CITER_ELINKNO)
  2173. #define DMA_TCD27_DLASTSGA (IMXRT_DMA_TCD[27].DLASTSGA)
  2174. #define DMA_TCD27_CSR (IMXRT_DMA_TCD[27].CSR)
  2175. #define DMA_TCD27_BITER (IMXRT_DMA_TCD[27].BITER)
  2176. #define DMA_TCD27_BITER_ELINKYES (IMXRT_DMA_TCD[27].BITER_ELINKYES)
  2177. #define DMA_TCD27_BITER_ELINKNO (IMXRT_DMA_TCD[27].BITER_ELINKNO)
  2178. #define DMA_TCD28_SADDR (IMXRT_DMA_TCD[28].SADDR)
  2179. #define DMA_TCD28_SOFF (IMXRT_DMA_TCD[28].SOFF)
  2180. #define DMA_TCD28_ATTR (IMXRT_DMA_TCD[28].ATTR)
  2181. #define DMA_TCD28_NBYTES (IMXRT_DMA_TCD[28].NBYTES)
  2182. #define DMA_TCD28_NBYTES_MLNO (IMXRT_DMA_TCD[28].NBYTES_MLNO)
  2183. #define DMA_TCD28_NBYTES_MLOFFNO (IMXRT_DMA_TCD[28].NBYTES_MLOFFNO)
  2184. #define DMA_TCD28_NBYTES_MLOFFYES (IMXRT_DMA_TCD[28].NBYTES_MLOFFYES)
  2185. #define DMA_TCD28_SLAST (IMXRT_DMA_TCD[28].SLAST)
  2186. #define DMA_TCD28_DADDR (IMXRT_DMA_TCD[28].DADDR)
  2187. #define DMA_TCD28_DOFF (IMXRT_DMA_TCD[28].DOFF)
  2188. #define DMA_TCD28_CITER (IMXRT_DMA_TCD[28].CITER)
  2189. #define DMA_TCD28_CITER_ELINKYES (IMXRT_DMA_TCD[28].CITER_ELINKYES)
  2190. #define DMA_TCD28_CITER_ELINKNO (IMXRT_DMA_TCD[28].CITER_ELINKNO)
  2191. #define DMA_TCD28_DLASTSGA (IMXRT_DMA_TCD[28].DLASTSGA)
  2192. #define DMA_TCD28_CSR (IMXRT_DMA_TCD[28].CSR)
  2193. #define DMA_TCD28_BITER (IMXRT_DMA_TCD[28].BITER)
  2194. #define DMA_TCD28_BITER_ELINKYES (IMXRT_DMA_TCD[28].BITER_ELINKYES)
  2195. #define DMA_TCD28_BITER_ELINKNO (IMXRT_DMA_TCD[28].BITER_ELINKNO)
  2196. #define DMA_TCD29_SADDR (IMXRT_DMA_TCD[29].SADDR)
  2197. #define DMA_TCD29_SOFF (IMXRT_DMA_TCD[29].SOFF)
  2198. #define DMA_TCD29_ATTR (IMXRT_DMA_TCD[29].ATTR)
  2199. #define DMA_TCD29_NBYTES (IMXRT_DMA_TCD[29].NBYTES)
  2200. #define DMA_TCD29_NBYTES_MLNO (IMXRT_DMA_TCD[29].NBYTES_MLNO)
  2201. #define DMA_TCD29_NBYTES_MLOFFNO (IMXRT_DMA_TCD[29].NBYTES_MLOFFNO)
  2202. #define DMA_TCD29_NBYTES_MLOFFYES (IMXRT_DMA_TCD[29].NBYTES_MLOFFYES)
  2203. #define DMA_TCD29_SLAST (IMXRT_DMA_TCD[29].SLAST)
  2204. #define DMA_TCD29_DADDR (IMXRT_DMA_TCD[29].DADDR)
  2205. #define DMA_TCD29_DOFF (IMXRT_DMA_TCD[29].DOFF)
  2206. #define DMA_TCD29_CITER (IMXRT_DMA_TCD[29].CITER)
  2207. #define DMA_TCD29_CITER_ELINKYES (IMXRT_DMA_TCD[29].CITER_ELINKYES)
  2208. #define DMA_TCD29_CITER_ELINKNO (IMXRT_DMA_TCD[29].CITER_ELINKNO)
  2209. #define DMA_TCD29_DLASTSGA (IMXRT_DMA_TCD[29].DLASTSGA)
  2210. #define DMA_TCD29_CSR (IMXRT_DMA_TCD[29].CSR)
  2211. #define DMA_TCD29_BITER (IMXRT_DMA_TCD[29].BITER)
  2212. #define DMA_TCD29_BITER_ELINKYES (IMXRT_DMA_TCD[29].BITER_ELINKYES)
  2213. #define DMA_TCD29_BITER_ELINKNO (IMXRT_DMA_TCD[29].BITER_ELINKNO)
  2214. #define DMA_TCD30_SADDR (IMXRT_DMA_TCD[30].SADDR)
  2215. #define DMA_TCD30_SOFF (IMXRT_DMA_TCD[30].SOFF)
  2216. #define DMA_TCD30_ATTR (IMXRT_DMA_TCD[30].ATTR)
  2217. #define DMA_TCD30_NBYTES (IMXRT_DMA_TCD[30].NBYTES)
  2218. #define DMA_TCD30_NBYTES_MLNO (IMXRT_DMA_TCD[30].NBYTES_MLNO)
  2219. #define DMA_TCD30_NBYTES_MLOFFNO (IMXRT_DMA_TCD[30].NBYTES_MLOFFNO)
  2220. #define DMA_TCD30_NBYTES_MLOFFYES (IMXRT_DMA_TCD[30].NBYTES_MLOFFYES)
  2221. #define DMA_TCD30_SLAST (IMXRT_DMA_TCD[30].SLAST)
  2222. #define DMA_TCD30_DADDR (IMXRT_DMA_TCD[30].DADDR)
  2223. #define DMA_TCD30_DOFF (IMXRT_DMA_TCD[30].DOFF)
  2224. #define DMA_TCD30_CITER (IMXRT_DMA_TCD[30].CITER)
  2225. #define DMA_TCD30_CITER_ELINKYES (IMXRT_DMA_TCD[30].CITER_ELINKYES)
  2226. #define DMA_TCD30_CITER_ELINKNO (IMXRT_DMA_TCD[30].CITER_ELINKNO)
  2227. #define DMA_TCD30_DLASTSGA (IMXRT_DMA_TCD[30].DLASTSGA)
  2228. #define DMA_TCD30_CSR (IMXRT_DMA_TCD[30].CSR)
  2229. #define DMA_TCD30_BITER (IMXRT_DMA_TCD[30].BITER)
  2230. #define DMA_TCD30_BITER_ELINKYES (IMXRT_DMA_TCD[30].BITER_ELINKYES)
  2231. #define DMA_TCD30_BITER_ELINKNO (IMXRT_DMA_TCD[30].BITER_ELINKNO)
  2232. #define DMA_TCD31_SADDR (IMXRT_DMA_TCD[31].SADDR)
  2233. #define DMA_TCD31_SOFF (IMXRT_DMA_TCD[31].SOFF)
  2234. #define DMA_TCD31_ATTR (IMXRT_DMA_TCD[31].ATTR)
  2235. #define DMA_TCD31_NBYTES (IMXRT_DMA_TCD[31].NBYTES)
  2236. #define DMA_TCD31_NBYTES_MLNO (IMXRT_DMA_TCD[31].NBYTES_MLNO)
  2237. #define DMA_TCD31_NBYTES_MLOFFNO (IMXRT_DMA_TCD[31].NBYTES_MLOFFNO)
  2238. #define DMA_TCD31_NBYTES_MLOFFYES (IMXRT_DMA_TCD[31].NBYTES_MLOFFYES)
  2239. #define DMA_TCD31_SLAST (IMXRT_DMA_TCD[31].SLAST)
  2240. #define DMA_TCD31_DADDR (IMXRT_DMA_TCD[31].DADDR)
  2241. #define DMA_TCD31_DOFF (IMXRT_DMA_TCD[31].DOFF)
  2242. #define DMA_TCD31_CITER (IMXRT_DMA_TCD[31].CITER)
  2243. #define DMA_TCD31_CITER_ELINKYES (IMXRT_DMA_TCD[31].CITER_ELINKYES)
  2244. #define DMA_TCD31_CITER_ELINKNO (IMXRT_DMA_TCD[31].CITER_ELINKNO)
  2245. #define DMA_TCD31_DLASTSGA (IMXRT_DMA_TCD[31].DLASTSGA)
  2246. #define DMA_TCD31_CSR (IMXRT_DMA_TCD[31].CSR)
  2247. #define DMA_TCD31_BITER (IMXRT_DMA_TCD[31].BITER)
  2248. #define DMA_TCD31_BITER_ELINKYES (IMXRT_DMA_TCD[31].BITER_ELINKYES)
  2249. #define DMA_TCD31_BITER_ELINKNO (IMXRT_DMA_TCD[31].BITER_ELINKNO)
  2250. // 23.7.1: page 1023
  2251. #define IMXRT_ENC1 (*(IMXRT_REGISTER16_t *)0x403C8000)
  2252. #define ENC1_CTRL (IMXRT_ENC1.offset000)
  2253. #define ENC1_FILT (IMXRT_ENC1.offset002)
  2254. #define ENC1_WTR (IMXRT_ENC1.offset004)
  2255. #define ENC1_POSD (IMXRT_ENC1.offset006)
  2256. #define ENC1_POSDH (IMXRT_ENC1.offset008)
  2257. #define ENC1_REV (IMXRT_ENC1.offset00A)
  2258. #define ENC1_REVH (IMXRT_ENC1.offset00C)
  2259. #define ENC1_UPOS (IMXRT_ENC1.offset00E)
  2260. #define ENC1_LPOS (IMXRT_ENC1.offset010)
  2261. #define ENC1_UPOSH (IMXRT_ENC1.offset012)
  2262. #define ENC1_LPOSH (IMXRT_ENC1.offset014)
  2263. #define ENC1_UINIT (IMXRT_ENC1.offset016)
  2264. #define ENC1_LINIT (IMXRT_ENC1.offset018)
  2265. #define ENC1_IMR (IMXRT_ENC1.offset01A)
  2266. #define ENC1_TST (IMXRT_ENC1.offset01C)
  2267. #define ENC1_CTRL2 (IMXRT_ENC1.offset01E)
  2268. #define ENC1_UMOD (IMXRT_ENC1.offset020)
  2269. #define ENC1_LMOD (IMXRT_ENC1.offset022)
  2270. #define ENC1_UCOMP (IMXRT_ENC1.offset024)
  2271. #define ENC1_LCOMP (IMXRT_ENC1.offset026)
  2272. #define IMXRT_ENC2 (*(IMXRT_REGISTER16_t *)0x403CC000)
  2273. #define ENC2_CTRL (IMXRT_ENC2.offset000)
  2274. #define ENC2_FILT (IMXRT_ENC2.offset002)
  2275. #define ENC2_WTR (IMXRT_ENC2.offset004)
  2276. #define ENC2_POSD (IMXRT_ENC2.offset006)
  2277. #define ENC2_POSDH (IMXRT_ENC2.offset008)
  2278. #define ENC2_REV (IMXRT_ENC2.offset00A)
  2279. #define ENC2_REVH (IMXRT_ENC2.offset00C)
  2280. #define ENC2_UPOS (IMXRT_ENC2.offset00E)
  2281. #define ENC2_LPOS (IMXRT_ENC2.offset010)
  2282. #define ENC2_UPOSH (IMXRT_ENC2.offset012)
  2283. #define ENC2_LPOSH (IMXRT_ENC2.offset014)
  2284. #define ENC2_UINIT (IMXRT_ENC2.offset016)
  2285. #define ENC2_LINIT (IMXRT_ENC2.offset018)
  2286. #define ENC2_IMR (IMXRT_ENC2.offset01A)
  2287. #define ENC2_TST (IMXRT_ENC2.offset01C)
  2288. #define ENC2_CTRL2 (IMXRT_ENC2.offset01E)
  2289. #define ENC2_UMOD (IMXRT_ENC2.offset020)
  2290. #define ENC2_LMOD (IMXRT_ENC2.offset022)
  2291. #define ENC2_UCOMP (IMXRT_ENC2.offset024)
  2292. #define ENC2_LCOMP (IMXRT_ENC2.offset026)
  2293. #define IMXRT_ENC3 (*(IMXRT_REGISTER16_t *)0x403D0000)
  2294. #define ENC3_CTRL (IMXRT_ENC3.offset000)
  2295. #define ENC3_FILT (IMXRT_ENC3.offset002)
  2296. #define ENC3_WTR (IMXRT_ENC3.offset004)
  2297. #define ENC3_POSD (IMXRT_ENC3.offset006)
  2298. #define ENC3_POSDH (IMXRT_ENC3.offset008)
  2299. #define ENC3_REV (IMXRT_ENC3.offset00A)
  2300. #define ENC3_REVH (IMXRT_ENC3.offset00C)
  2301. #define ENC3_UPOS (IMXRT_ENC3.offset00E)
  2302. #define ENC3_LPOS (IMXRT_ENC3.offset010)
  2303. #define ENC3_UPOSH (IMXRT_ENC3.offset012)
  2304. #define ENC3_LPOSH (IMXRT_ENC3.offset014)
  2305. #define ENC3_UINIT (IMXRT_ENC3.offset016)
  2306. #define ENC3_LINIT (IMXRT_ENC3.offset018)
  2307. #define ENC3_IMR (IMXRT_ENC3.offset01A)
  2308. #define ENC3_TST (IMXRT_ENC3.offset01C)
  2309. #define ENC3_CTRL2 (IMXRT_ENC3.offset01E)
  2310. #define ENC3_UMOD (IMXRT_ENC3.offset020)
  2311. #define ENC3_LMOD (IMXRT_ENC3.offset022)
  2312. #define ENC3_UCOMP (IMXRT_ENC3.offset024)
  2313. #define ENC3_LCOMP (IMXRT_ENC3.offset026)
  2314. #define IMXRT_ENC4 (*(IMXRT_REGISTER16_t *)0x403D4000)
  2315. #define ENC4_CTRL (IMXRT_ENC4.offset000)
  2316. #define ENC4_FILT (IMXRT_ENC4.offset002)
  2317. #define ENC4_WTR (IMXRT_ENC4.offset004)
  2318. #define ENC4_POSD (IMXRT_ENC4.offset006)
  2319. #define ENC4_POSDH (IMXRT_ENC4.offset008)
  2320. #define ENC4_REV (IMXRT_ENC4.offset00A)
  2321. #define ENC4_REVH (IMXRT_ENC4.offset00C)
  2322. #define ENC4_UPOS (IMXRT_ENC4.offset00E)
  2323. #define ENC4_LPOS (IMXRT_ENC4.offset010)
  2324. #define ENC4_UPOSH (IMXRT_ENC4.offset012)
  2325. #define ENC4_LPOSH (IMXRT_ENC4.offset014)
  2326. #define ENC4_UINIT (IMXRT_ENC4.offset016)
  2327. #define ENC4_LINIT (IMXRT_ENC4.offset018)
  2328. #define ENC4_IMR (IMXRT_ENC4.offset01A)
  2329. #define ENC4_TST (IMXRT_ENC4.offset01C)
  2330. #define ENC4_CTRL2 (IMXRT_ENC4.offset01E)
  2331. #define ENC4_UMOD (IMXRT_ENC4.offset020)
  2332. #define ENC4_LMOD (IMXRT_ENC4.offset022)
  2333. #define ENC4_UCOMP (IMXRT_ENC4.offset024)
  2334. #define ENC4_LCOMP (IMXRT_ENC4.offset026)
  2335. // 24.5: page 1060
  2336. #define IMXRT_ENET (*(IMXRT_REGISTER32_t *)0x402D8000)
  2337. #define IMXRT_ENET_TIMER (*(IMXRT_REGISTER32_t *)0x402D8400)
  2338. #define ENET_EIR (IMXRT_ENET.offset004)
  2339. #define ENET_EIMR (IMXRT_ENET.offset008)
  2340. #define ENET_RDAR (IMXRT_ENET.offset010)
  2341. #define ENET_TDAR (IMXRT_ENET.offset014)
  2342. #define ENET_ECR (IMXRT_ENET.offset024)
  2343. #define ENET_MMFR (IMXRT_ENET.offset040)
  2344. #define ENET_MSCR (IMXRT_ENET.offset044)
  2345. #define ENET_MIBC (IMXRT_ENET.offset064)
  2346. #define ENET_RCR (IMXRT_ENET.offset084)
  2347. #define ENET_TCR (IMXRT_ENET.offset0C4)
  2348. #define ENET_PALR (IMXRT_ENET.offset0E4)
  2349. #define ENET_PAUR (IMXRT_ENET.offset0E8)
  2350. #define ENET_OPD (IMXRT_ENET.offset0EC)
  2351. #define ENET_TXIC (IMXRT_ENET.offset0F0)
  2352. #define ENET_RXIC (IMXRT_ENET.offset100)
  2353. #define ENET_IAUR (IMXRT_ENET.offset118)
  2354. #define ENET_IALR (IMXRT_ENET.offset11C)
  2355. #define ENET_GAUR (IMXRT_ENET.offset120)
  2356. #define ENET_GALR (IMXRT_ENET.offset124)
  2357. #define ENET_TFWR (IMXRT_ENET.offset144)
  2358. #define ENET_RDSR (IMXRT_ENET.offset180)
  2359. #define ENET_TDSR (IMXRT_ENET.offset184)
  2360. #define ENET_MRBR (IMXRT_ENET.offset188)
  2361. #define ENET_RSFL (IMXRT_ENET.offset190)
  2362. #define ENET_RSEM (IMXRT_ENET.offset194)
  2363. #define ENET_RAEM (IMXRT_ENET.offset198)
  2364. #define ENET_RAFL (IMXRT_ENET.offset19C)
  2365. #define ENET_TSEM (IMXRT_ENET.offset1A0)
  2366. #define ENET_TAEM (IMXRT_ENET.offset1A4)
  2367. #define ENET_TAFL (IMXRT_ENET.offset1A8)
  2368. #define ENET_TIPG (IMXRT_ENET.offset1AC)
  2369. #define ENET_FTRL (IMXRT_ENET.offset1B0)
  2370. #define ENET_TACC (IMXRT_ENET.offset1C0)
  2371. #define ENET_RACC (IMXRT_ENET.offset1C4)
  2372. #define ENET_RMON_T_DROP (IMXRT_ENET.offset200)
  2373. #define ENET_RMON_T_PACKETS (IMXRT_ENET.offset204)
  2374. #define ENET_RMON_T_BC_PKT (IMXRT_ENET.offset208)
  2375. #define ENET_RMON_T_MC_PKT (IMXRT_ENET.offset20C)
  2376. #define ENET_RMON_T_CRC_ALIGN (IMXRT_ENET.offset210)
  2377. #define ENET_RMON_T_UNDERSIZE (IMXRT_ENET.offset214)
  2378. #define ENET_RMON_T_OVERSIZE (IMXRT_ENET.offset218)
  2379. #define ENET_RMON_T_FRAG (IMXRT_ENET.offset21C)
  2380. #define ENET_RMON_T_JAB (IMXRT_ENET.offset220)
  2381. #define ENET_RMON_T_COL (IMXRT_ENET.offset224)
  2382. #define ENET_RMON_T_P64 (IMXRT_ENET.offset228)
  2383. #define ENET_RMON_T_P65TO127 (IMXRT_ENET.offset22C)
  2384. #define ENET_RMON_T_P128TO255 (IMXRT_ENET.offset230)
  2385. #define ENET_RMON_T_P256TO511 (IMXRT_ENET.offset234)
  2386. #define ENET_RMON_T_P512TO1023 (IMXRT_ENET.offset238)
  2387. #define ENET_RMON_T_P1024TO2047 (IMXRT_ENET.offset23C)
  2388. #define ENET_RMON_T_P_GTE2048 (IMXRT_ENET.offset240)
  2389. #define ENET_RMON_T_OCTETS (IMXRT_ENET.offset244)
  2390. #define ENET_IEEE_T_DROP (IMXRT_ENET.offset248)
  2391. #define ENET_IEEE_T_FRAME_OK (IMXRT_ENET.offset24C)
  2392. #define ENET_IEEE_T_1COL (IMXRT_ENET.offset250)
  2393. #define ENET_IEEE_T_MCOL (IMXRT_ENET.offset254)
  2394. #define ENET_IEEE_T_DEF (IMXRT_ENET.offset258)
  2395. #define ENET_IEEE_T_LCOL (IMXRT_ENET.offset25C)
  2396. #define ENET_IEEE_T_EXCOL (IMXRT_ENET.offset260)
  2397. #define ENET_IEEE_T_MACERR (IMXRT_ENET.offset264)
  2398. #define ENET_IEEE_T_CSERR (IMXRT_ENET.offset268)
  2399. #define ENET_IEEE_T_SQE (IMXRT_ENET.offset26C)
  2400. #define ENET_IEEE_T_FDXFC (IMXRT_ENET.offset270)
  2401. #define ENET_IEEE_T_OCTETS_OK (IMXRT_ENET.offset274)
  2402. #define ENET_RMON_R_PACKETS (IMXRT_ENET.offset284)
  2403. #define ENET_RMON_R_BC_PKT (IMXRT_ENET.offset288)
  2404. #define ENET_RMON_R_MC_PKT (IMXRT_ENET.offset28C)
  2405. #define ENET_RMON_R_CRC_ALIGN (IMXRT_ENET.offset290)
  2406. #define ENET_RMON_R_UNDERSIZE (IMXRT_ENET.offset294)
  2407. #define ENET_RMON_R_OVERSIZE (IMXRT_ENET.offset298)
  2408. #define ENET_RMON_R_FRAG (IMXRT_ENET.offset29C)
  2409. #define ENET_RMON_R_JAB (IMXRT_ENET.offset2A0)
  2410. #define ENET_RMON_R_RESVD_0 (IMXRT_ENET.offset2A4)
  2411. #define ENET_RMON_R_P64 (IMXRT_ENET.offset2A8)
  2412. #define ENET_RMON_R_P65TO127 (IMXRT_ENET.offset2AC)
  2413. #define ENET_RMON_R_P128TO255 (IMXRT_ENET.offset2B0)
  2414. #define ENET_RMON_R_P256TO511 (IMXRT_ENET.offset2B4)
  2415. #define ENET_RMON_R_P512TO1023 (IMXRT_ENET.offset2B8)
  2416. #define ENET_RMON_R_P1024TO2047 (IMXRT_ENET.offset2BC)
  2417. #define ENET_RMON_R_P_GTE2048 (IMXRT_ENET.offset2C0)
  2418. #define ENET_RMON_R_OCTETS (IMXRT_ENET.offset2C4)
  2419. #define ENET_IEEE_R_DROP (IMXRT_ENET.offset2C8)
  2420. #define ENET_IEEE_R_FRAME_OK (IMXRT_ENET.offset2CC)
  2421. #define ENET_IEEE_R_CRC (IMXRT_ENET.offset2D0)
  2422. #define ENET_IEEE_R_ALIGN (IMXRT_ENET.offset2D4)
  2423. #define ENET_IEEE_R_MACERR (IMXRT_ENET.offset2D8)
  2424. #define ENET_IEEE_R_FDXFC (IMXRT_ENET.offset2DC)
  2425. #define ENET_IEEE_R_OCTETS_OK (IMXRT_ENET.offset2E0)
  2426. #define ENET_ATCR (IMXRT_ENET_TIMER.offset000)
  2427. #define ENET_ATVR (IMXRT_ENET_TIMER.offset004)
  2428. #define ENET_ATOFF (IMXRT_ENET_TIMER.offset008)
  2429. #define ENET_ATPER (IMXRT_ENET_TIMER.offset00C)
  2430. #define ENET_ATCOR (IMXRT_ENET_TIMER.offset010)
  2431. #define ENET_ATINC (IMXRT_ENET_TIMER.offset014)
  2432. #define ENET_ATSTMP (IMXRT_ENET_TIMER.offset018)
  2433. #define ENET_TGSR (IMXRT_ENET_TIMER.offset204)
  2434. #define ENET_TCSR0 (IMXRT_ENET_TIMER.offset208)
  2435. #define ENET_TCCR0 (IMXRT_ENET_TIMER.offset20C)
  2436. #define ENET_TCSR1 (IMXRT_ENET_TIMER.offset210)
  2437. #define ENET_TCCR1 (IMXRT_ENET_TIMER.offset214)
  2438. #define ENET_TCSR2 (IMXRT_ENET_TIMER.offset218)
  2439. #define ENET_TCCR2 (IMXRT_ENET_TIMER.offset21C)
  2440. #define ENET_TCSR3 (IMXRT_ENET_TIMER.offset220)
  2441. #define ENET_TCCR3 (IMXRT_ENET_TIMER.offset224)
  2442. // 25.3.1.1: page 1199
  2443. #define IMXRT_EWM (*(IMXRT_REGISTER8_t *)0x402D8000)
  2444. #define EWM_CTRL (IMXRT_EWM.offset00)
  2445. #define EWM_SERV (IMXRT_EWM.offset01)
  2446. #define EWM_CMPL (IMXRT_EWM.offset02)
  2447. #define EWM_CMPH (IMXRT_EWM.offset03)
  2448. #define EWM_CLKCTRL (IMXRT_EWM.offset04)
  2449. #define EWM_CLKPRESCALER (IMXRT_EWM.offset05)
  2450. // 26.8: page 1249
  2451. #define IMXRT_FLEXCAN1 (*(IMXRT_REGISTER32_t *)0x401D0000)
  2452. #define IMXRT_FLEXCAN1_MASK (*(IMXRT_REGISTER32_t *)0x401D0800)
  2453. #define FLEXCAN1_MCR (IMXRT_FLEXCAN1.offset000)
  2454. #define FLEXCAN1_CTRL1 (IMXRT_FLEXCAN1.offset004)
  2455. #define FLEXCAN1_TIMER (IMXRT_FLEXCAN1.offset008)
  2456. #define FLEXCAN1_RXMGMASK (IMXRT_FLEXCAN1.offset010)
  2457. #define FLEXCAN1_RX14MASK (IMXRT_FLEXCAN1.offset014)
  2458. #define FLEXCAN1_RX15MASK (IMXRT_FLEXCAN1.offset018)
  2459. #define FLEXCAN1_ECR (IMXRT_FLEXCAN1.offset01C)
  2460. #define FLEXCAN1_ESR1 (IMXRT_FLEXCAN1.offset020)
  2461. #define FLEXCAN1_IMASK2 (IMXRT_FLEXCAN1.offset024)
  2462. #define FLEXCAN1_IMASK1 (IMXRT_FLEXCAN1.offset028)
  2463. #define FLEXCAN1_IFLAG2 (IMXRT_FLEXCAN1.offset02C)
  2464. #define FLEXCAN1_IFLAG1 (IMXRT_FLEXCAN1.offset030)
  2465. #define FLEXCAN1_CTRL2 (IMXRT_FLEXCAN1.offset034)
  2466. #define FLEXCAN1_ESR2 (IMXRT_FLEXCAN1.offset038)
  2467. #define FLEXCAN1_CRCR (IMXRT_FLEXCAN1.offset044)
  2468. #define FLEXCAN1_RXFGMASK (IMXRT_FLEXCAN1.offset048)
  2469. #define FLEXCAN1_RXFIR (IMXRT_FLEXCAN1.offset04C)
  2470. #define FLEXCAN1_RXIMR0 (IMXRT_FLEXCAN1_MASK.offset080)
  2471. #define FLEXCAN1_RXIMR1 (IMXRT_FLEXCAN1_MASK.offset084)
  2472. #define FLEXCAN1_RXIMR2 (IMXRT_FLEXCAN1_MASK.offset088)
  2473. #define FLEXCAN1_RXIMR3 (IMXRT_FLEXCAN1_MASK.offset08C)
  2474. #define FLEXCAN1_RXIMR4 (IMXRT_FLEXCAN1_MASK.offset090)
  2475. #define FLEXCAN1_RXIMR5 (IMXRT_FLEXCAN1_MASK.offset094)
  2476. #define FLEXCAN1_RXIMR6 (IMXRT_FLEXCAN1_MASK.offset098)
  2477. #define FLEXCAN1_RXIMR7 (IMXRT_FLEXCAN1_MASK.offset09C)
  2478. #define FLEXCAN1_RXIMR8 (IMXRT_FLEXCAN1_MASK.offset0A0)
  2479. #define FLEXCAN1_RXIMR9 (IMXRT_FLEXCAN1_MASK.offset0A4)
  2480. #define FLEXCAN1_RXIMR10 (IMXRT_FLEXCAN1_MASK.offset0A8)
  2481. #define FLEXCAN1_RXIMR11 (IMXRT_FLEXCAN1_MASK.offset0AC)
  2482. #define FLEXCAN1_RXIMR12 (IMXRT_FLEXCAN1_MASK.offset0B0)
  2483. #define FLEXCAN1_RXIMR13 (IMXRT_FLEXCAN1_MASK.offset0B4)
  2484. #define FLEXCAN1_RXIMR14 (IMXRT_FLEXCAN1_MASK.offset0B8)
  2485. #define FLEXCAN1_RXIMR15 (IMXRT_FLEXCAN1_MASK.offset0BC)
  2486. #define FLEXCAN1_RXIMR16 (IMXRT_FLEXCAN1_MASK.offset0C0)
  2487. #define FLEXCAN1_RXIMR17 (IMXRT_FLEXCAN1_MASK.offset0C4)
  2488. #define FLEXCAN1_RXIMR18 (IMXRT_FLEXCAN1_MASK.offset0C8)
  2489. #define FLEXCAN1_RXIMR19 (IMXRT_FLEXCAN1_MASK.offset0CC)
  2490. #define FLEXCAN1_RXIMR20 (IMXRT_FLEXCAN1_MASK.offset0D0)
  2491. #define FLEXCAN1_RXIMR21 (IMXRT_FLEXCAN1_MASK.offset0D4)
  2492. #define FLEXCAN1_RXIMR22 (IMXRT_FLEXCAN1_MASK.offset0D8)
  2493. #define FLEXCAN1_RXIMR23 (IMXRT_FLEXCAN1_MASK.offset0DC)
  2494. #define FLEXCAN1_RXIMR24 (IMXRT_FLEXCAN1_MASK.offset0E0)
  2495. #define FLEXCAN1_RXIMR25 (IMXRT_FLEXCAN1_MASK.offset0E4)
  2496. #define FLEXCAN1_RXIMR26 (IMXRT_FLEXCAN1_MASK.offset0E8)
  2497. #define FLEXCAN1_RXIMR27 (IMXRT_FLEXCAN1_MASK.offset0EC)
  2498. #define FLEXCAN1_RXIMR28 (IMXRT_FLEXCAN1_MASK.offset0F0)
  2499. #define FLEXCAN1_RXIMR29 (IMXRT_FLEXCAN1_MASK.offset0F4)
  2500. #define FLEXCAN1_RXIMR30 (IMXRT_FLEXCAN1_MASK.offset0F8)
  2501. #define FLEXCAN1_RXIMR31 (IMXRT_FLEXCAN1_MASK.offset0FC)
  2502. #define FLEXCAN1_RXIMR32 (IMXRT_FLEXCAN1_MASK.offset100)
  2503. #define FLEXCAN1_RXIMR33 (IMXRT_FLEXCAN1_MASK.offset104)
  2504. #define FLEXCAN1_RXIMR34 (IMXRT_FLEXCAN1_MASK.offset108)
  2505. #define FLEXCAN1_RXIMR35 (IMXRT_FLEXCAN1_MASK.offset10C)
  2506. #define FLEXCAN1_RXIMR36 (IMXRT_FLEXCAN1_MASK.offset110)
  2507. #define FLEXCAN1_RXIMR37 (IMXRT_FLEXCAN1_MASK.offset114)
  2508. #define FLEXCAN1_RXIMR38 (IMXRT_FLEXCAN1_MASK.offset118)
  2509. #define FLEXCAN1_RXIMR39 (IMXRT_FLEXCAN1_MASK.offset11C)
  2510. #define FLEXCAN1_RXIMR40 (IMXRT_FLEXCAN1_MASK.offset120)
  2511. #define FLEXCAN1_RXIMR41 (IMXRT_FLEXCAN1_MASK.offset124)
  2512. #define FLEXCAN1_RXIMR42 (IMXRT_FLEXCAN1_MASK.offset128)
  2513. #define FLEXCAN1_RXIMR43 (IMXRT_FLEXCAN1_MASK.offset12C)
  2514. #define FLEXCAN1_RXIMR44 (IMXRT_FLEXCAN1_MASK.offset130)
  2515. #define FLEXCAN1_RXIMR45 (IMXRT_FLEXCAN1_MASK.offset134)
  2516. #define FLEXCAN1_RXIMR46 (IMXRT_FLEXCAN1_MASK.offset138)
  2517. #define FLEXCAN1_RXIMR47 (IMXRT_FLEXCAN1_MASK.offset13C)
  2518. #define FLEXCAN1_RXIMR48 (IMXRT_FLEXCAN1_MASK.offset140)
  2519. #define FLEXCAN1_RXIMR49 (IMXRT_FLEXCAN1_MASK.offset144)
  2520. #define FLEXCAN1_RXIMR50 (IMXRT_FLEXCAN1_MASK.offset148)
  2521. #define FLEXCAN1_RXIMR51 (IMXRT_FLEXCAN1_MASK.offset14C)
  2522. #define FLEXCAN1_RXIMR52 (IMXRT_FLEXCAN1_MASK.offset150)
  2523. #define FLEXCAN1_RXIMR53 (IMXRT_FLEXCAN1_MASK.offset154)
  2524. #define FLEXCAN1_RXIMR54 (IMXRT_FLEXCAN1_MASK.offset158)
  2525. #define FLEXCAN1_RXIMR55 (IMXRT_FLEXCAN1_MASK.offset15C)
  2526. #define FLEXCAN1_RXIMR56 (IMXRT_FLEXCAN1_MASK.offset160)
  2527. #define FLEXCAN1_RXIMR57 (IMXRT_FLEXCAN1_MASK.offset164)
  2528. #define FLEXCAN1_RXIMR58 (IMXRT_FLEXCAN1_MASK.offset168)
  2529. #define FLEXCAN1_RXIMR59 (IMXRT_FLEXCAN1_MASK.offset16C)
  2530. #define FLEXCAN1_RXIMR60 (IMXRT_FLEXCAN1_MASK.offset170)
  2531. #define FLEXCAN1_RXIMR61 (IMXRT_FLEXCAN1_MASK.offset174)
  2532. #define FLEXCAN1_RXIMR62 (IMXRT_FLEXCAN1_MASK.offset178)
  2533. #define FLEXCAN1_RXIMR63 (IMXRT_FLEXCAN1_MASK.offset17C)
  2534. #define FLEXCAN1_GFWR (IMXRT_FLEXCAN1_MASK.offset1E0)
  2535. #define IMXRT_FLEXCAN2 (*(IMXRT_REGISTER32_t *)0x401D4000)
  2536. #define IMXRT_FLEXCAN2_MASK (*(IMXRT_REGISTER32_t *)0x401D4800)
  2537. #define FLEXCAN2_MCR (IMXRT_FLEXCAN2.offset000)
  2538. #define FLEXCAN2_CTRL1 (IMXRT_FLEXCAN2.offset004)
  2539. #define FLEXCAN2_TIMER (IMXRT_FLEXCAN2.offset008)
  2540. #define FLEXCAN2_RXMGMASK (IMXRT_FLEXCAN2.offset010)
  2541. #define FLEXCAN2_RX14MASK (IMXRT_FLEXCAN2.offset014)
  2542. #define FLEXCAN2_RX15MASK (IMXRT_FLEXCAN2.offset018)
  2543. #define FLEXCAN2_ECR (IMXRT_FLEXCAN2.offset01C)
  2544. #define FLEXCAN2_ESR1 (IMXRT_FLEXCAN2.offset020)
  2545. #define FLEXCAN2_IMASK2 (IMXRT_FLEXCAN2.offset024)
  2546. #define FLEXCAN2_IMASK1 (IMXRT_FLEXCAN2.offset028)
  2547. #define FLEXCAN2_IFLAG2 (IMXRT_FLEXCAN2.offset02C)
  2548. #define FLEXCAN2_IFLAG1 (IMXRT_FLEXCAN2.offset030)
  2549. #define FLEXCAN2_CTRL2 (IMXRT_FLEXCAN2.offset034)
  2550. #define FLEXCAN2_ESR2 (IMXRT_FLEXCAN2.offset038)
  2551. #define FLEXCAN2_CRCR (IMXRT_FLEXCAN2.offset044)
  2552. #define FLEXCAN2_RXFGMASK (IMXRT_FLEXCAN2.offset048)
  2553. #define FLEXCAN2_RXFIR (IMXRT_FLEXCAN2.offset04C)
  2554. #define FLEXCAN2_RXIMR0 (IMXRT_FLEXCAN2_MASK.offset080)
  2555. #define FLEXCAN2_RXIMR1 (IMXRT_FLEXCAN2_MASK.offset084)
  2556. #define FLEXCAN2_RXIMR2 (IMXRT_FLEXCAN2_MASK.offset088)
  2557. #define FLEXCAN2_RXIMR3 (IMXRT_FLEXCAN2_MASK.offset08C)
  2558. #define FLEXCAN2_RXIMR4 (IMXRT_FLEXCAN2_MASK.offset090)
  2559. #define FLEXCAN2_RXIMR5 (IMXRT_FLEXCAN2_MASK.offset094)
  2560. #define FLEXCAN2_RXIMR6 (IMXRT_FLEXCAN2_MASK.offset098)
  2561. #define FLEXCAN2_RXIMR7 (IMXRT_FLEXCAN2_MASK.offset09C)
  2562. #define FLEXCAN2_RXIMR8 (IMXRT_FLEXCAN2_MASK.offset0A0)
  2563. #define FLEXCAN2_RXIMR9 (IMXRT_FLEXCAN2_MASK.offset0A4)
  2564. #define FLEXCAN2_RXIMR10 (IMXRT_FLEXCAN2_MASK.offset0A8)
  2565. #define FLEXCAN2_RXIMR11 (IMXRT_FLEXCAN2_MASK.offset0AC)
  2566. #define FLEXCAN2_RXIMR12 (IMXRT_FLEXCAN2_MASK.offset0B0)
  2567. #define FLEXCAN2_RXIMR13 (IMXRT_FLEXCAN2_MASK.offset0B4)
  2568. #define FLEXCAN2_RXIMR14 (IMXRT_FLEXCAN2_MASK.offset0B8)
  2569. #define FLEXCAN2_RXIMR15 (IMXRT_FLEXCAN2_MASK.offset0BC)
  2570. #define FLEXCAN2_RXIMR16 (IMXRT_FLEXCAN2_MASK.offset0C0)
  2571. #define FLEXCAN2_RXIMR17 (IMXRT_FLEXCAN2_MASK.offset0C4)
  2572. #define FLEXCAN2_RXIMR18 (IMXRT_FLEXCAN2_MASK.offset0C8)
  2573. #define FLEXCAN2_RXIMR19 (IMXRT_FLEXCAN2_MASK.offset0CC)
  2574. #define FLEXCAN2_RXIMR20 (IMXRT_FLEXCAN2_MASK.offset0D0)
  2575. #define FLEXCAN2_RXIMR21 (IMXRT_FLEXCAN2_MASK.offset0D4)
  2576. #define FLEXCAN2_RXIMR22 (IMXRT_FLEXCAN2_MASK.offset0D8)
  2577. #define FLEXCAN2_RXIMR23 (IMXRT_FLEXCAN2_MASK.offset0DC)
  2578. #define FLEXCAN2_RXIMR24 (IMXRT_FLEXCAN2_MASK.offset0E0)
  2579. #define FLEXCAN2_RXIMR25 (IMXRT_FLEXCAN2_MASK.offset0E4)
  2580. #define FLEXCAN2_RXIMR26 (IMXRT_FLEXCAN2_MASK.offset0E8)
  2581. #define FLEXCAN2_RXIMR27 (IMXRT_FLEXCAN2_MASK.offset0EC)
  2582. #define FLEXCAN2_RXIMR28 (IMXRT_FLEXCAN2_MASK.offset0F0)
  2583. #define FLEXCAN2_RXIMR29 (IMXRT_FLEXCAN2_MASK.offset0F4)
  2584. #define FLEXCAN2_RXIMR30 (IMXRT_FLEXCAN2_MASK.offset0F8)
  2585. #define FLEXCAN2_RXIMR31 (IMXRT_FLEXCAN2_MASK.offset0FC)
  2586. #define FLEXCAN2_RXIMR32 (IMXRT_FLEXCAN2_MASK.offset100)
  2587. #define FLEXCAN2_RXIMR33 (IMXRT_FLEXCAN2_MASK.offset104)
  2588. #define FLEXCAN2_RXIMR34 (IMXRT_FLEXCAN2_MASK.offset108)
  2589. #define FLEXCAN2_RXIMR35 (IMXRT_FLEXCAN2_MASK.offset10C)
  2590. #define FLEXCAN2_RXIMR36 (IMXRT_FLEXCAN2_MASK.offset110)
  2591. #define FLEXCAN2_RXIMR37 (IMXRT_FLEXCAN2_MASK.offset114)
  2592. #define FLEXCAN2_RXIMR38 (IMXRT_FLEXCAN2_MASK.offset118)
  2593. #define FLEXCAN2_RXIMR39 (IMXRT_FLEXCAN2_MASK.offset11C)
  2594. #define FLEXCAN2_RXIMR40 (IMXRT_FLEXCAN2_MASK.offset120)
  2595. #define FLEXCAN2_RXIMR41 (IMXRT_FLEXCAN2_MASK.offset124)
  2596. #define FLEXCAN2_RXIMR42 (IMXRT_FLEXCAN2_MASK.offset128)
  2597. #define FLEXCAN2_RXIMR43 (IMXRT_FLEXCAN2_MASK.offset12C)
  2598. #define FLEXCAN2_RXIMR44 (IMXRT_FLEXCAN2_MASK.offset130)
  2599. #define FLEXCAN2_RXIMR45 (IMXRT_FLEXCAN2_MASK.offset134)
  2600. #define FLEXCAN2_RXIMR46 (IMXRT_FLEXCAN2_MASK.offset138)
  2601. #define FLEXCAN2_RXIMR47 (IMXRT_FLEXCAN2_MASK.offset13C)
  2602. #define FLEXCAN2_RXIMR48 (IMXRT_FLEXCAN2_MASK.offset140)
  2603. #define FLEXCAN2_RXIMR49 (IMXRT_FLEXCAN2_MASK.offset144)
  2604. #define FLEXCAN2_RXIMR50 (IMXRT_FLEXCAN2_MASK.offset148)
  2605. #define FLEXCAN2_RXIMR51 (IMXRT_FLEXCAN2_MASK.offset14C)
  2606. #define FLEXCAN2_RXIMR52 (IMXRT_FLEXCAN2_MASK.offset150)
  2607. #define FLEXCAN2_RXIMR53 (IMXRT_FLEXCAN2_MASK.offset154)
  2608. #define FLEXCAN2_RXIMR54 (IMXRT_FLEXCAN2_MASK.offset158)
  2609. #define FLEXCAN2_RXIMR55 (IMXRT_FLEXCAN2_MASK.offset15C)
  2610. #define FLEXCAN2_RXIMR56 (IMXRT_FLEXCAN2_MASK.offset160)
  2611. #define FLEXCAN2_RXIMR57 (IMXRT_FLEXCAN2_MASK.offset164)
  2612. #define FLEXCAN2_RXIMR58 (IMXRT_FLEXCAN2_MASK.offset168)
  2613. #define FLEXCAN2_RXIMR59 (IMXRT_FLEXCAN2_MASK.offset16C)
  2614. #define FLEXCAN2_RXIMR60 (IMXRT_FLEXCAN2_MASK.offset170)
  2615. #define FLEXCAN2_RXIMR61 (IMXRT_FLEXCAN2_MASK.offset174)
  2616. #define FLEXCAN2_RXIMR62 (IMXRT_FLEXCAN2_MASK.offset178)
  2617. #define FLEXCAN2_RXIMR63 (IMXRT_FLEXCAN2_MASK.offset17C)
  2618. #define FLEXCAN2_GFWR (IMXRT_FLEXCAN2_MASK.offset1E0)
  2619. // 27.3.1.1: page 1292
  2620. #define IMXRT_FLEXIO1 (*(IMXRT_REGISTER32_t *)0x401AC000)
  2621. #define IMXRT_FLEXIO1_b (*(IMXRT_REGISTER32_t *)0x401AC400)
  2622. #define FLEXIO1_VERID (IMXRT_FLEXIO1.offset000)
  2623. #define FLEXIO1_PARAM (IMXRT_FLEXIO1.offset004)
  2624. #define FLEXIO1_CTRL (IMXRT_FLEXIO1.offset008)
  2625. #define FLEXIO1_PIN (IMXRT_FLEXIO1.offset00C)
  2626. #define FLEXIO1_SHIFTSTAT (IMXRT_FLEXIO1.offset010)
  2627. #define FLEXIO1_SHIFTERR (IMXRT_FLEXIO1.offset014)
  2628. #define FLEXIO1_TIMSTAT (IMXRT_FLEXIO1.offset018)
  2629. #define FLEXIO1_SHIFTSIEN (IMXRT_FLEXIO1.offset020)
  2630. #define FLEXIO1_SHIFTEIEN (IMXRT_FLEXIO1.offset024)
  2631. #define FLEXIO1_TIMIEN (IMXRT_FLEXIO1.offset028)
  2632. #define FLEXIO1_SHIFTSDEN (IMXRT_FLEXIO1.offset030)
  2633. #define FLEXIO1_SHIFTSTATE (IMXRT_FLEXIO1.offset040)
  2634. #define FLEXIO1_SHIFTCTL0 (IMXRT_FLEXIO1.offset080)
  2635. #define FLEXIO1_SHIFTCTL1 (IMXRT_FLEXIO1.offset084)
  2636. #define FLEXIO1_SHIFTCTL2 (IMXRT_FLEXIO1.offset088)
  2637. #define FLEXIO1_SHIFTCTL3 (IMXRT_FLEXIO1.offset08C)
  2638. #define FLEXIO1_SHIFTCFG0 (IMXRT_FLEXIO1.offset100)
  2639. #define FLEXIO1_SHIFTCFG1 (IMXRT_FLEXIO1.offset104)
  2640. #define FLEXIO1_SHIFTCFG2 (IMXRT_FLEXIO1.offset108)
  2641. #define FLEXIO1_SHIFTCFG3 (IMXRT_FLEXIO1.offset10C)
  2642. #define FLEXIO1_SHIFTBUF0 (IMXRT_FLEXIO1.offset200)
  2643. #define FLEXIO1_SHIFTBUF1 (IMXRT_FLEXIO1.offset204)
  2644. #define FLEXIO1_SHIFTBUF2 (IMXRT_FLEXIO1.offset208)
  2645. #define FLEXIO1_SHIFTBUF3 (IMXRT_FLEXIO1.offset20C)
  2646. #define FLEXIO1_SHIFTBUFBIS0 (IMXRT_FLEXIO1.offset280)
  2647. #define FLEXIO1_SHIFTBUFBIS1 (IMXRT_FLEXIO1.offset284)
  2648. #define FLEXIO1_SHIFTBUFBIS2 (IMXRT_FLEXIO1.offset288)
  2649. #define FLEXIO1_SHIFTBUFBIS3 (IMXRT_FLEXIO1.offset28C)
  2650. #define FLEXIO1_SHIFTBUFBYS0 (IMXRT_FLEXIO1.offset300)
  2651. #define FLEXIO1_SHIFTBUFBYS1 (IMXRT_FLEXIO1.offset304)
  2652. #define FLEXIO1_SHIFTBUFBYS2 (IMXRT_FLEXIO1.offset308)
  2653. #define FLEXIO1_SHIFTBUFBYS3 (IMXRT_FLEXIO1.offset30C)
  2654. #define FLEXIO1_SHIFTBUFBBS0 (IMXRT_FLEXIO1.offset380)
  2655. #define FLEXIO1_SHIFTBUFBBS1 (IMXRT_FLEXIO1.offset384)
  2656. #define FLEXIO1_SHIFTBUFBBS2 (IMXRT_FLEXIO1.offset388)
  2657. #define FLEXIO1_SHIFTBUFBBS3 (IMXRT_FLEXIO1.offset38C)
  2658. #define FLEXIO1_TIMCTL0 (IMXRT_FLEXIO1_b.offset000)
  2659. #define FLEXIO1_TIMCTL1 (IMXRT_FLEXIO1_b.offset004)
  2660. #define FLEXIO1_TIMCTL2 (IMXRT_FLEXIO1_b.offset008)
  2661. #define FLEXIO1_TIMCTL3 (IMXRT_FLEXIO1_b.offset00C)
  2662. #define FLEXIO1_TIMCFG0 (IMXRT_FLEXIO1_b.offset080)
  2663. #define FLEXIO1_TIMCFG1 (IMXRT_FLEXIO1_b.offset084)
  2664. #define FLEXIO1_TIMCFG2 (IMXRT_FLEXIO1_b.offset088)
  2665. #define FLEXIO1_TIMCFG3 (IMXRT_FLEXIO1_b.offset08C)
  2666. #define FLEXIO1_TIMCMP0 (IMXRT_FLEXIO1_b.offset100)
  2667. #define FLEXIO1_TIMCMP1 (IMXRT_FLEXIO1_b.offset104)
  2668. #define FLEXIO1_TIMCMP2 (IMXRT_FLEXIO1_b.offset108)
  2669. #define FLEXIO1_TIMCMP3 (IMXRT_FLEXIO1_b.offset10C)
  2670. #define FLEXIO1_SHIFTBUFNBS0 (IMXRT_FLEXIO1_b.offset280)
  2671. #define FLEXIO1_SHIFTBUFNBS1 (IMXRT_FLEXIO1_b.offset284)
  2672. #define FLEXIO1_SHIFTBUFNBS2 (IMXRT_FLEXIO1_b.offset288)
  2673. #define FLEXIO1_SHIFTBUFNBS3 (IMXRT_FLEXIO1_b.offset28C)
  2674. #define FLEXIO1_SHIFTBUFHWS0 (IMXRT_FLEXIO1_b.offset300)
  2675. #define FLEXIO1_SHIFTBUFHWS1 (IMXRT_FLEXIO1_b.offset304)
  2676. #define FLEXIO1_SHIFTBUFHWS2 (IMXRT_FLEXIO1_b.offset308)
  2677. #define FLEXIO1_SHIFTBUFHWS3 (IMXRT_FLEXIO1_b.offset30C)
  2678. #define FLEXIO1_SHIFTBUFNIS0 (IMXRT_FLEXIO1_b.offset380)
  2679. #define FLEXIO1_SHIFTBUFNIS1 (IMXRT_FLEXIO1_b.offset384)
  2680. #define FLEXIO1_SHIFTBUFNIS2 (IMXRT_FLEXIO1_b.offset388)
  2681. #define FLEXIO1_SHIFTBUFNIS3 (IMXRT_FLEXIO1_b.offset38C)
  2682. #define IMXRT_FLEXIO2 (*(IMXRT_REGISTER32_t *)0x401B0000)
  2683. #define IMXRT_FLEXIO2_b (*(IMXRT_REGISTER32_t *)0x401B0400)
  2684. #define FLEXIO2_VERID (IMXRT_FLEXIO2.offset000)
  2685. #define FLEXIO2_PARAM (IMXRT_FLEXIO2.offset004)
  2686. #define FLEXIO2_CTRL (IMXRT_FLEXIO2.offset008)
  2687. #define FLEXIO2_PIN (IMXRT_FLEXIO2.offset00C)
  2688. #define FLEXIO2_SHIFTSTAT (IMXRT_FLEXIO2.offset010)
  2689. #define FLEXIO2_SHIFTERR (IMXRT_FLEXIO2.offset014)
  2690. #define FLEXIO2_TIMSTAT (IMXRT_FLEXIO2.offset018)
  2691. #define FLEXIO2_SHIFTSIEN (IMXRT_FLEXIO2.offset020)
  2692. #define FLEXIO2_SHIFTEIEN (IMXRT_FLEXIO2.offset024)
  2693. #define FLEXIO2_TIMIEN (IMXRT_FLEXIO2.offset028)
  2694. #define FLEXIO2_SHIFTSDEN (IMXRT_FLEXIO2.offset030)
  2695. #define FLEXIO2_SHIFTSTATE (IMXRT_FLEXIO2.offset040)
  2696. #define FLEXIO2_SHIFTCTL0 (IMXRT_FLEXIO2.offset080)
  2697. #define FLEXIO2_SHIFTCTL1 (IMXRT_FLEXIO2.offset084)
  2698. #define FLEXIO2_SHIFTCTL2 (IMXRT_FLEXIO2.offset088)
  2699. #define FLEXIO2_SHIFTCTL3 (IMXRT_FLEXIO2.offset08C)
  2700. #define FLEXIO2_SHIFTCFG0 (IMXRT_FLEXIO2.offset100)
  2701. #define FLEXIO2_SHIFTCFG1 (IMXRT_FLEXIO2.offset104)
  2702. #define FLEXIO2_SHIFTCFG2 (IMXRT_FLEXIO2.offset108)
  2703. #define FLEXIO2_SHIFTCFG3 (IMXRT_FLEXIO2.offset10C)
  2704. #define FLEXIO2_SHIFTBUF0 (IMXRT_FLEXIO2.offset200)
  2705. #define FLEXIO2_SHIFTBUF1 (IMXRT_FLEXIO2.offset204)
  2706. #define FLEXIO2_SHIFTBUF2 (IMXRT_FLEXIO2.offset208)
  2707. #define FLEXIO2_SHIFTBUF3 (IMXRT_FLEXIO2.offset20C)
  2708. #define FLEXIO2_SHIFTBUFBIS0 (IMXRT_FLEXIO2.offset280)
  2709. #define FLEXIO2_SHIFTBUFBIS1 (IMXRT_FLEXIO2.offset284)
  2710. #define FLEXIO2_SHIFTBUFBIS2 (IMXRT_FLEXIO2.offset288)
  2711. #define FLEXIO2_SHIFTBUFBIS3 (IMXRT_FLEXIO2.offset28C)
  2712. #define FLEXIO2_SHIFTBUFBYS0 (IMXRT_FLEXIO2.offset300)
  2713. #define FLEXIO2_SHIFTBUFBYS1 (IMXRT_FLEXIO2.offset304)
  2714. #define FLEXIO2_SHIFTBUFBYS2 (IMXRT_FLEXIO2.offset308)
  2715. #define FLEXIO2_SHIFTBUFBYS3 (IMXRT_FLEXIO2.offset30C)
  2716. #define FLEXIO2_SHIFTBUFBBS0 (IMXRT_FLEXIO2.offset380)
  2717. #define FLEXIO2_SHIFTBUFBBS1 (IMXRT_FLEXIO2.offset384)
  2718. #define FLEXIO2_SHIFTBUFBBS2 (IMXRT_FLEXIO2.offset388)
  2719. #define FLEXIO2_SHIFTBUFBBS3 (IMXRT_FLEXIO2.offset38C)
  2720. #define FLEXIO2_TIMCTL0 (IMXRT_FLEXIO2_b.offset000)
  2721. #define FLEXIO2_TIMCTL1 (IMXRT_FLEXIO2_b.offset004)
  2722. #define FLEXIO2_TIMCTL2 (IMXRT_FLEXIO2_b.offset008)
  2723. #define FLEXIO2_TIMCTL3 (IMXRT_FLEXIO2_b.offset00C)
  2724. #define FLEXIO2_TIMCFG0 (IMXRT_FLEXIO2_b.offset080)
  2725. #define FLEXIO2_TIMCFG1 (IMXRT_FLEXIO2_b.offset084)
  2726. #define FLEXIO2_TIMCFG2 (IMXRT_FLEXIO2_b.offset088)
  2727. #define FLEXIO2_TIMCFG3 (IMXRT_FLEXIO2_b.offset08C)
  2728. #define FLEXIO2_TIMCMP0 (IMXRT_FLEXIO2_b.offset100)
  2729. #define FLEXIO2_TIMCMP1 (IMXRT_FLEXIO2_b.offset104)
  2730. #define FLEXIO2_TIMCMP2 (IMXRT_FLEXIO2_b.offset108)
  2731. #define FLEXIO2_TIMCMP3 (IMXRT_FLEXIO2_b.offset10C)
  2732. #define FLEXIO2_SHIFTBUFNBS0 (IMXRT_FLEXIO2_b.offset280)
  2733. #define FLEXIO2_SHIFTBUFNBS1 (IMXRT_FLEXIO2_b.offset284)
  2734. #define FLEXIO2_SHIFTBUFNBS2 (IMXRT_FLEXIO2_b.offset288)
  2735. #define FLEXIO2_SHIFTBUFNBS3 (IMXRT_FLEXIO2_b.offset28C)
  2736. #define FLEXIO2_SHIFTBUFHWS0 (IMXRT_FLEXIO2_b.offset300)
  2737. #define FLEXIO2_SHIFTBUFHWS1 (IMXRT_FLEXIO2_b.offset304)
  2738. #define FLEXIO2_SHIFTBUFHWS2 (IMXRT_FLEXIO2_b.offset308)
  2739. #define FLEXIO2_SHIFTBUFHWS3 (IMXRT_FLEXIO2_b.offset30C)
  2740. #define FLEXIO2_SHIFTBUFNIS0 (IMXRT_FLEXIO2_b.offset380)
  2741. #define FLEXIO2_SHIFTBUFNIS1 (IMXRT_FLEXIO2_b.offset384)
  2742. #define FLEXIO2_SHIFTBUFNIS2 (IMXRT_FLEXIO2_b.offset388)
  2743. #define FLEXIO2_SHIFTBUFNIS3 (IMXRT_FLEXIO2_b.offset38C)
  2744. // FLEXIO3 only present in RT1062
  2745. #define IMXRT_FLEXIO3 (*(IMXRT_REGISTER32_t *)0x42020000)
  2746. #define IMXRT_FLEXIO3_b (*(IMXRT_REGISTER32_t *)0x42020400)
  2747. #define FLEXIO3_VERID (IMXRT_FLEXIO3.offset000)
  2748. #define FLEXIO3_PARAM (IMXRT_FLEXIO3.offset004)
  2749. #define FLEXIO3_CTRL (IMXRT_FLEXIO3.offset008)
  2750. #define FLEXIO3_PIN (IMXRT_FLEXIO3.offset00C)
  2751. #define FLEXIO3_SHIFTSTAT (IMXRT_FLEXIO3.offset010)
  2752. #define FLEXIO3_SHIFTERR (IMXRT_FLEXIO3.offset014)
  2753. #define FLEXIO3_TIMSTAT (IMXRT_FLEXIO3.offset018)
  2754. #define FLEXIO3_SHIFTSIEN (IMXRT_FLEXIO3.offset020)
  2755. #define FLEXIO3_SHIFTEIEN (IMXRT_FLEXIO3.offset024)
  2756. #define FLEXIO3_TIMIEN (IMXRT_FLEXIO3.offset028)
  2757. #define FLEXIO3_SHIFTSDEN (IMXRT_FLEXIO3.offset030)
  2758. #define FLEXIO3_SHIFTSTATE (IMXRT_FLEXIO3.offset040)
  2759. #define FLEXIO3_SHIFTCTL0 (IMXRT_FLEXIO3.offset080)
  2760. #define FLEXIO3_SHIFTCTL1 (IMXRT_FLEXIO3.offset084)
  2761. #define FLEXIO3_SHIFTCTL2 (IMXRT_FLEXIO3.offset088)
  2762. #define FLEXIO3_SHIFTCTL3 (IMXRT_FLEXIO3.offset08C)
  2763. #define FLEXIO3_SHIFTCFG0 (IMXRT_FLEXIO3.offset100)
  2764. #define FLEXIO3_SHIFTCFG1 (IMXRT_FLEXIO3.offset104)
  2765. #define FLEXIO3_SHIFTCFG2 (IMXRT_FLEXIO3.offset108)
  2766. #define FLEXIO3_SHIFTCFG3 (IMXRT_FLEXIO3.offset10C)
  2767. #define FLEXIO3_SHIFTBUF0 (IMXRT_FLEXIO3.offset200)
  2768. #define FLEXIO3_SHIFTBUF1 (IMXRT_FLEXIO3.offset204)
  2769. #define FLEXIO3_SHIFTBUF2 (IMXRT_FLEXIO3.offset208)
  2770. #define FLEXIO3_SHIFTBUF3 (IMXRT_FLEXIO3.offset20C)
  2771. #define FLEXIO3_SHIFTBUFBIS0 (IMXRT_FLEXIO3.offset280)
  2772. #define FLEXIO3_SHIFTBUFBIS1 (IMXRT_FLEXIO3.offset284)
  2773. #define FLEXIO3_SHIFTBUFBIS2 (IMXRT_FLEXIO3.offset288)
  2774. #define FLEXIO3_SHIFTBUFBIS3 (IMXRT_FLEXIO3.offset28C)
  2775. #define FLEXIO3_SHIFTBUFBYS0 (IMXRT_FLEXIO3.offset300)
  2776. #define FLEXIO3_SHIFTBUFBYS1 (IMXRT_FLEXIO3.offset304)
  2777. #define FLEXIO3_SHIFTBUFBYS2 (IMXRT_FLEXIO3.offset308)
  2778. #define FLEXIO3_SHIFTBUFBYS3 (IMXRT_FLEXIO3.offset30C)
  2779. #define FLEXIO3_SHIFTBUFBBS0 (IMXRT_FLEXIO3.offset380)
  2780. #define FLEXIO3_SHIFTBUFBBS1 (IMXRT_FLEXIO3.offset384)
  2781. #define FLEXIO3_SHIFTBUFBBS2 (IMXRT_FLEXIO3.offset388)
  2782. #define FLEXIO3_SHIFTBUFBBS3 (IMXRT_FLEXIO3.offset38C)
  2783. #define FLEXIO3_TIMCTL0 (IMXRT_FLEXIO3_b.offset000)
  2784. #define FLEXIO3_TIMCTL1 (IMXRT_FLEXIO3_b.offset004)
  2785. #define FLEXIO3_TIMCTL2 (IMXRT_FLEXIO3_b.offset008)
  2786. #define FLEXIO3_TIMCTL3 (IMXRT_FLEXIO3_b.offset00C)
  2787. #define FLEXIO3_TIMCFG0 (IMXRT_FLEXIO3_b.offset080)
  2788. #define FLEXIO3_TIMCFG1 (IMXRT_FLEXIO3_b.offset084)
  2789. #define FLEXIO3_TIMCFG2 (IMXRT_FLEXIO3_b.offset088)
  2790. #define FLEXIO3_TIMCFG3 (IMXRT_FLEXIO3_b.offset08C)
  2791. #define FLEXIO3_TIMCMP0 (IMXRT_FLEXIO3_b.offset100)
  2792. #define FLEXIO3_TIMCMP1 (IMXRT_FLEXIO3_b.offset104)
  2793. #define FLEXIO3_TIMCMP2 (IMXRT_FLEXIO3_b.offset108)
  2794. #define FLEXIO3_TIMCMP3 (IMXRT_FLEXIO3_b.offset10C)
  2795. #define FLEXIO3_SHIFTBUFNBS0 (IMXRT_FLEXIO3_b.offset280)
  2796. #define FLEXIO3_SHIFTBUFNBS1 (IMXRT_FLEXIO3_b.offset284)
  2797. #define FLEXIO3_SHIFTBUFNBS2 (IMXRT_FLEXIO3_b.offset288)
  2798. #define FLEXIO3_SHIFTBUFNBS3 (IMXRT_FLEXIO3_b.offset28C)
  2799. #define FLEXIO3_SHIFTBUFHWS0 (IMXRT_FLEXIO3_b.offset300)
  2800. #define FLEXIO3_SHIFTBUFHWS1 (IMXRT_FLEXIO3_b.offset304)
  2801. #define FLEXIO3_SHIFTBUFHWS2 (IMXRT_FLEXIO3_b.offset308)
  2802. #define FLEXIO3_SHIFTBUFHWS3 (IMXRT_FLEXIO3_b.offset30C)
  2803. #define FLEXIO3_SHIFTBUFNIS0 (IMXRT_FLEXIO3_b.offset380)
  2804. #define FLEXIO3_SHIFTBUFNIS1 (IMXRT_FLEXIO3_b.offset384)
  2805. #define FLEXIO3_SHIFTBUFNIS2 (IMXRT_FLEXIO3_b.offset388)
  2806. #define FLEXIO3_SHIFTBUFNIS3 (IMXRT_FLEXIO3_b.offset38C)
  2807. #define FLEXIO_CTRL_DOZEN ((uint16_t)(1<<31))
  2808. #define FLEXIO_CTRL_DBGE ((uint16_t)(1<<30))
  2809. #define FLEXIO_CTRL_FASTACC ((uint16_t)(1<<2))
  2810. #define FLEXIO_CTRL_SWRST ((uint16_t)(1<<1))
  2811. #define FLEXIO_CTRL_FLEXEN ((uint16_t)(1<<0))
  2812. #define FLEXIO_SHIFTCTL_TIMSEL(n) ((uint16_t)(((n) & 0x03) << 24))
  2813. #define FLEXIO_SHIFTCTL_TIMPOL ((uint16_t)(1<<23))
  2814. #define FLEXIO_SHIFTCTL_PINCFG(n) ((uint16_t)(((n) & 0x03) << 16))
  2815. #define FLEXIO_SHIFTCTL_PINSEL(n) ((uint16_t)(((n) & 0x1F) << 8))
  2816. #define FLEXIO_SHIFTCTL_PINPOL ((uint16_t)(1<<7))
  2817. #define FLEXIO_SHIFTCTL_SMOD(n) ((uint16_t)(((n) & 0x07) << 0))
  2818. #define FLEXIO_SHIFTCFG_PWIDTH(n) ((uint16_t)(((n) & 0x1F) << 16))
  2819. #define FLEXIO_SHIFTCFG_INSRC ((uint16_t)(1<<8))
  2820. #define FLEXIO_SHIFTCFG_SSTOP(n) ((uint16_t)(((n) & 0x03) << 4))
  2821. #define FLEXIO_SHIFTCFG_SSTART(n) ((uint16_t)(((n) & 0x03) << 0))
  2822. #define FLEXIO_TIMCTL_TRGSEL(n) ((uint16_t)(((n) & 0x3F) << 24))
  2823. #define FLEXIO_TIMCTL_TRGPOL ((uint16_t)(1<<23))
  2824. #define FLEXIO_TIMCTL_TRGSRC ((uint16_t)(1<<22))
  2825. #define FLEXIO_TIMCTL_PINCFG(n) ((uint16_t)(((n) & 0x03) << 16))
  2826. #define FLEXIO_TIMCTL_PINSEL(n) ((uint16_t)(((n) & 0x1F) << 8))
  2827. #define FLEXIO_TIMCTL_PINPOL ((uint16_t)(1<<7))
  2828. #define FLEXIO_TIMCTL_TIMOD(n) ((uint16_t)(((n) & 0x03) << 0))
  2829. #define FLEXIO_TIMCFG_TIMOUT(n) ((uint16_t)(((n) & 0x03) << 24))
  2830. #define FLEXIO_TIMCFG_TIMDEC(n) ((uint16_t)(((n) & 0x03) << 20))
  2831. #define FLEXIO_TIMCFG_TIMRST(n) ((uint16_t)(((n) & 0x07) << 16))
  2832. #define FLEXIO_TIMCFG_TIMDIS(n) ((uint16_t)(((n) & 0x07) << 12))
  2833. #define FLEXIO_TIMCFG_TIMENA(n) ((uint16_t)(((n) & 0x07) << 8))
  2834. #define FLEXIO_TIMCFG_TSTOP(n) ((uint16_t)(((n) & 0x03) << 4))
  2835. #define FLEXIO_TIMCFG_TSTART ((uint16_t)(1<<1))
  2836. // 28.4.1: page 1354
  2837. typedef struct {
  2838. struct {
  2839. volatile uint16_t CNT;
  2840. volatile uint16_t INIT;
  2841. volatile uint16_t CTRL2;
  2842. volatile uint16_t CTRL;
  2843. volatile uint16_t unused1;
  2844. volatile uint16_t VAL0;
  2845. volatile uint16_t FRACVAL1;
  2846. volatile uint16_t VAL1;
  2847. volatile uint16_t FRACVAL2;
  2848. volatile uint16_t VAL2;
  2849. volatile uint16_t FRACVAL3;
  2850. volatile uint16_t VAL3;
  2851. volatile uint16_t FRACVAL4;
  2852. volatile uint16_t VAL4;
  2853. volatile uint16_t FRACVAL5;
  2854. volatile uint16_t VAL5;
  2855. volatile uint16_t FRCTRL;
  2856. volatile uint16_t OCTRL;
  2857. volatile uint16_t STS;
  2858. volatile uint16_t INTEN;
  2859. volatile uint16_t DMAEN;
  2860. volatile uint16_t TCTRL;
  2861. volatile uint16_t DISMAP0;
  2862. volatile uint16_t DISMAP1;
  2863. volatile uint16_t DTCNT0;
  2864. volatile uint16_t DTCNT1;
  2865. volatile uint16_t CAPTCTRLA;
  2866. volatile uint16_t CAPTCOMPA;
  2867. volatile uint16_t CAPTCTRLB;
  2868. volatile uint16_t CAPTCOMPB;
  2869. volatile uint16_t CAPTCTRLX;
  2870. volatile uint16_t CAPTCOMPX;
  2871. volatile uint16_t CVAL0;
  2872. volatile uint16_t CVAL0CYC;
  2873. volatile uint16_t CVAL1;
  2874. volatile uint16_t CVAL1CYC;
  2875. volatile uint16_t CVAL2;
  2876. volatile uint16_t CVAL2CYC;
  2877. volatile uint16_t CVAL3;
  2878. volatile uint16_t CVAL3CYC;
  2879. volatile uint16_t CVAL4;
  2880. volatile uint16_t CVAL4CYC;
  2881. volatile uint16_t CVAL5;
  2882. volatile uint16_t CVAL5CYC;
  2883. volatile uint16_t unused2;
  2884. volatile uint16_t unused3;
  2885. volatile uint16_t unused4;
  2886. volatile uint16_t unused5;
  2887. } SM[4];
  2888. volatile uint16_t OUTEN;
  2889. volatile uint16_t MASK;
  2890. volatile uint16_t SWCOUT;
  2891. volatile uint16_t DTSRCSEL;
  2892. volatile uint16_t MCTRL;
  2893. volatile uint16_t MCTRL2;
  2894. volatile uint16_t FCTRL0;
  2895. volatile uint16_t FSTS0;
  2896. volatile uint16_t FFILT0;
  2897. volatile uint16_t FTST0;
  2898. volatile uint16_t FCTRL20;
  2899. } IMXRT_FLEXPWM_t;
  2900. #define IMXRT_FLEXPWM1 (*(IMXRT_FLEXPWM_t *)0x403DC000)
  2901. #define IMXRT_FLEXPWM2 (*(IMXRT_FLEXPWM_t *)0x403E0000)
  2902. #define IMXRT_FLEXPWM3 (*(IMXRT_FLEXPWM_t *)0x403E4000)
  2903. #define IMXRT_FLEXPWM4 (*(IMXRT_FLEXPWM_t *)0x403E8000)
  2904. #define FLEXPWM1_SM0CNT (IMXRT_FLEXPWM1.SM[0].CNT)
  2905. #define FLEXPWM1_SM0INIT (IMXRT_FLEXPWM1.SM[0].INIT)
  2906. #define FLEXPWM1_SM0CTRL2 (IMXRT_FLEXPWM1.SM[0].CTRL2)
  2907. #define FLEXPWM1_SM0CTRL (IMXRT_FLEXPWM1.SM[0].CTRL)
  2908. #define FLEXPWM1_SM0VAL0 (IMXRT_FLEXPWM1.SM[0].VAL0)
  2909. #define FLEXPWM1_SM0FRACVAL1 (IMXRT_FLEXPWM1.SM[0].FRACVAL1)
  2910. #define FLEXPWM1_SM0VAL1 (IMXRT_FLEXPWM1.SM[0].VAL1)
  2911. #define FLEXPWM1_SM0FRACVAL2 (IMXRT_FLEXPWM1.SM[0].FRACVAL2)
  2912. #define FLEXPWM1_SM0VAL2 (IMXRT_FLEXPWM1.SM[0].VAL2)
  2913. #define FLEXPWM1_SM0FRACVAL3 (IMXRT_FLEXPWM1.SM[0].FRACVAL3)
  2914. #define FLEXPWM1_SM0VAL3 (IMXRT_FLEXPWM1.SM[0].VAL3)
  2915. #define FLEXPWM1_SM0FRACVAL4 (IMXRT_FLEXPWM1.SM[0].FRACVAL4)
  2916. #define FLEXPWM1_SM0VAL4 (IMXRT_FLEXPWM1.SM[0].VAL4)
  2917. #define FLEXPWM1_SM0FRACVAL5 (IMXRT_FLEXPWM1.SM[0].FRACVAL5)
  2918. #define FLEXPWM1_SM0VAL5 (IMXRT_FLEXPWM1.SM[0].VAL5)
  2919. #define FLEXPWM1_SM0FRCTRL (IMXRT_FLEXPWM1.SM[0].FRCTRL)
  2920. #define FLEXPWM1_SM0OCTRL (IMXRT_FLEXPWM1.SM[0].OCTRL)
  2921. #define FLEXPWM1_SM0STS (IMXRT_FLEXPWM1.SM[0].STS)
  2922. #define FLEXPWM1_SM0INTEN (IMXRT_FLEXPWM1.SM[0].INTEN)
  2923. #define FLEXPWM1_SM0DMAEN (IMXRT_FLEXPWM1.SM[0].DMAEN)
  2924. #define FLEXPWM1_SM0TCTRL (IMXRT_FLEXPWM1.SM[0].TCTRL)
  2925. #define FLEXPWM1_SM0DISMAP0 (IMXRT_FLEXPWM1.SM[0].DISMAP0)
  2926. #define FLEXPWM1_SM0DISMAP1 (IMXRT_FLEXPWM1.SM[0].DISMAP1)
  2927. #define FLEXPWM1_SM0DTCNT0 (IMXRT_FLEXPWM1.SM[0].DTCNT0)
  2928. #define FLEXPWM1_SM0DTCNT1 (IMXRT_FLEXPWM1.SM[0].DTCNT1)
  2929. #define FLEXPWM1_SM0CAPTCTRLA (IMXRT_FLEXPWM1.SM[0].CAPTCTRLA)
  2930. #define FLEXPWM1_SM0CAPTCOMPA (IMXRT_FLEXPWM1.SM[0].CAPTCOMPA)
  2931. #define FLEXPWM1_SM0CAPTCTRLB (IMXRT_FLEXPWM1.SM[0].CAPTCTRLB)
  2932. #define FLEXPWM1_SM0CAPTCOMPB (IMXRT_FLEXPWM1.SM[0].CAPTCOMPB)
  2933. #define FLEXPWM1_SM0CAPTCTRLX (IMXRT_FLEXPWM1.SM[0].CAPTCTRLX)
  2934. #define FLEXPWM1_SM0CAPTCOMPX (IMXRT_FLEXPWM1.SM[0].CAPTCOMPX)
  2935. #define FLEXPWM1_SM0CVAL0 (IMXRT_FLEXPWM1.SM[0].CVAL0)
  2936. #define FLEXPWM1_SM0CVAL0CYC (IMXRT_FLEXPWM1.SM[0].CVAL0CYC)
  2937. #define FLEXPWM1_SM0CVAL1 (IMXRT_FLEXPWM1.SM[0].CVAL1)
  2938. #define FLEXPWM1_SM0CVAL1CYC (IMXRT_FLEXPWM1.SM[0].CVAL1CYC)
  2939. #define FLEXPWM1_SM0CVAL2 (IMXRT_FLEXPWM1.SM[0].CVAL2)
  2940. #define FLEXPWM1_SM0CVAL2CYC (IMXRT_FLEXPWM1.SM[0].CVAL2CYC)
  2941. #define FLEXPWM1_SM0CVAL3 (IMXRT_FLEXPWM1.SM[0].CVAL3)
  2942. #define FLEXPWM1_SM0CVAL3CYC (IMXRT_FLEXPWM1.SM[0].CVAL3CYC)
  2943. #define FLEXPWM1_SM0CVAL4 (IMXRT_FLEXPWM1.SM[0].CVAL4)
  2944. #define FLEXPWM1_SM0CVAL4CYC (IMXRT_FLEXPWM1.SM[0].CVAL4CYC)
  2945. #define FLEXPWM1_SM0CVAL5 (IMXRT_FLEXPWM1.SM[0].CVAL5)
  2946. #define FLEXPWM1_SM0CVAL5CYC (IMXRT_FLEXPWM1.SM[0].CVAL5CYC)
  2947. #define FLEXPWM1_SM1CNT (IMXRT_FLEXPWM1.SM[1].CNT)
  2948. #define FLEXPWM1_SM1INIT (IMXRT_FLEXPWM1.SM[1].INIT)
  2949. #define FLEXPWM1_SM1CTRL2 (IMXRT_FLEXPWM1.SM[1].CTRL2)
  2950. #define FLEXPWM1_SM1CTRL (IMXRT_FLEXPWM1.SM[1].CTRL)
  2951. #define FLEXPWM1_SM1VAL0 (IMXRT_FLEXPWM1.SM[1].VAL0)
  2952. #define FLEXPWM1_SM1FRACVAL1 (IMXRT_FLEXPWM1.SM[1].FRACVAL1)
  2953. #define FLEXPWM1_SM1VAL1 (IMXRT_FLEXPWM1.SM[1].VAL1)
  2954. #define FLEXPWM1_SM1FRACVAL2 (IMXRT_FLEXPWM1.SM[1].FRACVAL2)
  2955. #define FLEXPWM1_SM1VAL2 (IMXRT_FLEXPWM1.SM[1].VAL2)
  2956. #define FLEXPWM1_SM1FRACVAL3 (IMXRT_FLEXPWM1.SM[1].FRACVAL3)
  2957. #define FLEXPWM1_SM1VAL3 (IMXRT_FLEXPWM1.SM[1].VAL3)
  2958. #define FLEXPWM1_SM1FRACVAL4 (IMXRT_FLEXPWM1.SM[1].FRACVAL4)
  2959. #define FLEXPWM1_SM1VAL4 (IMXRT_FLEXPWM1.SM[1].VAL4)
  2960. #define FLEXPWM1_SM1FRACVAL5 (IMXRT_FLEXPWM1.SM[1].FRACVAL5)
  2961. #define FLEXPWM1_SM1VAL5 (IMXRT_FLEXPWM1.SM[1].VAL5)
  2962. #define FLEXPWM1_SM1FRCTRL (IMXRT_FLEXPWM1.SM[1].FRCTRL)
  2963. #define FLEXPWM1_SM1OCTRL (IMXRT_FLEXPWM1.SM[1].OCTRL)
  2964. #define FLEXPWM1_SM1STS (IMXRT_FLEXPWM1.SM[1].STS)
  2965. #define FLEXPWM1_SM1INTEN (IMXRT_FLEXPWM1.SM[1].INTEN)
  2966. #define FLEXPWM1_SM1DMAEN (IMXRT_FLEXPWM1.SM[1].DMAEN)
  2967. #define FLEXPWM1_SM1TCTRL (IMXRT_FLEXPWM1.SM[1].TCTRL)
  2968. #define FLEXPWM1_SM1DISMAP0 (IMXRT_FLEXPWM1.SM[1].DISMAP0)
  2969. #define FLEXPWM1_SM1DISMAP1 (IMXRT_FLEXPWM1.SM[1].DISMAP1)
  2970. #define FLEXPWM1_SM1DTCNT0 (IMXRT_FLEXPWM1.SM[1].DTCNT0)
  2971. #define FLEXPWM1_SM1DTCNT1 (IMXRT_FLEXPWM1.SM[1].DTCNT1)
  2972. #define FLEXPWM1_SM1CAPTCTRLA (IMXRT_FLEXPWM1.SM[1].CAPTCTRLA)
  2973. #define FLEXPWM1_SM1CAPTCOMPA (IMXRT_FLEXPWM1.SM[1].CAPTCOMPA)
  2974. #define FLEXPWM1_SM1CAPTCTRLB (IMXRT_FLEXPWM1.SM[1].CAPTCTRLB)
  2975. #define FLEXPWM1_SM1CAPTCOMPB (IMXRT_FLEXPWM1.SM[1].CAPTCOMPB)
  2976. #define FLEXPWM1_SM1CAPTCTRLX (IMXRT_FLEXPWM1.SM[1].CAPTCTRLX)
  2977. #define FLEXPWM1_SM1CAPTCOMPX (IMXRT_FLEXPWM1.SM[1].CAPTCOMPX)
  2978. #define FLEXPWM1_SM1CVAL0 (IMXRT_FLEXPWM1.SM[1].CVAL0)
  2979. #define FLEXPWM1_SM1CVAL0CYC (IMXRT_FLEXPWM1.SM[1].CVAL0CYC)
  2980. #define FLEXPWM1_SM1CVAL1 (IMXRT_FLEXPWM1.SM[1].CVAL1)
  2981. #define FLEXPWM1_SM1CVAL1CYC (IMXRT_FLEXPWM1.SM[1].CVAL1CYC)
  2982. #define FLEXPWM1_SM1CVAL2 (IMXRT_FLEXPWM1.SM[1].CVAL2)
  2983. #define FLEXPWM1_SM1CVAL2CYC (IMXRT_FLEXPWM1.SM[1].CVAL2CYC)
  2984. #define FLEXPWM1_SM1CVAL3 (IMXRT_FLEXPWM1.SM[1].CVAL3)
  2985. #define FLEXPWM1_SM1CVAL3CYC (IMXRT_FLEXPWM1.SM[1].CVAL3CYC)
  2986. #define FLEXPWM1_SM1CVAL4 (IMXRT_FLEXPWM1.SM[1].CVAL4)
  2987. #define FLEXPWM1_SM1CVAL4CYC (IMXRT_FLEXPWM1.SM[1].CVAL4CYC)
  2988. #define FLEXPWM1_SM1CVAL5 (IMXRT_FLEXPWM1.SM[1].CVAL5)
  2989. #define FLEXPWM1_SM1CVAL5CYC (IMXRT_FLEXPWM1.SM[1].CVAL5CYC)
  2990. #define FLEXPWM1_SM2CNT (IMXRT_FLEXPWM1.SM[2].CNT)
  2991. #define FLEXPWM1_SM2INIT (IMXRT_FLEXPWM1.SM[2].INIT)
  2992. #define FLEXPWM1_SM2CTRL2 (IMXRT_FLEXPWM1.SM[2].CTRL2)
  2993. #define FLEXPWM1_SM2CTRL (IMXRT_FLEXPWM1.SM[2].CTRL)
  2994. #define FLEXPWM1_SM2VAL0 (IMXRT_FLEXPWM1.SM[2].VAL0)
  2995. #define FLEXPWM1_SM2FRACVAL1 (IMXRT_FLEXPWM1.SM[2].FRACVAL1)
  2996. #define FLEXPWM1_SM2VAL1 (IMXRT_FLEXPWM1.SM[2].VAL1)
  2997. #define FLEXPWM1_SM2FRACVAL2 (IMXRT_FLEXPWM1.SM[2].FRACVAL2)
  2998. #define FLEXPWM1_SM2VAL2 (IMXRT_FLEXPWM1.SM[2].VAL2)
  2999. #define FLEXPWM1_SM2FRACVAL3 (IMXRT_FLEXPWM1.SM[2].FRACVAL3)
  3000. #define FLEXPWM1_SM2VAL3 (IMXRT_FLEXPWM1.SM[2].VAL3)
  3001. #define FLEXPWM1_SM2FRACVAL4 (IMXRT_FLEXPWM1.SM[2].FRACVAL4)
  3002. #define FLEXPWM1_SM2VAL4 (IMXRT_FLEXPWM1.SM[2].VAL4)
  3003. #define FLEXPWM1_SM2FRACVAL5 (IMXRT_FLEXPWM1.SM[2].FRACVAL5)
  3004. #define FLEXPWM1_SM2VAL5 (IMXRT_FLEXPWM1.SM[2].VAL5)
  3005. #define FLEXPWM1_SM2FRCTRL (IMXRT_FLEXPWM1.SM[2].FRCTRL)
  3006. #define FLEXPWM1_SM2OCTRL (IMXRT_FLEXPWM1.SM[2].OCTRL)
  3007. #define FLEXPWM1_SM2STS (IMXRT_FLEXPWM1.SM[2].STS)
  3008. #define FLEXPWM1_SM2INTEN (IMXRT_FLEXPWM1.SM[2].INTEN)
  3009. #define FLEXPWM1_SM2DMAEN (IMXRT_FLEXPWM1.SM[2].DMAEN)
  3010. #define FLEXPWM1_SM2TCTRL (IMXRT_FLEXPWM1.SM[2].TCTRL)
  3011. #define FLEXPWM1_SM2DISMAP0 (IMXRT_FLEXPWM1.SM[2].DISMAP0)
  3012. #define FLEXPWM1_SM2DISMAP1 (IMXRT_FLEXPWM1.SM[2].DISMAP1)
  3013. #define FLEXPWM1_SM2DTCNT0 (IMXRT_FLEXPWM1.SM[2].DTCNT0)
  3014. #define FLEXPWM1_SM2DTCNT1 (IMXRT_FLEXPWM1.SM[2].DTCNT1)
  3015. #define FLEXPWM1_SM2CAPTCTRLA (IMXRT_FLEXPWM1.SM[2].CAPTCTRLA)
  3016. #define FLEXPWM1_SM2CAPTCOMPA (IMXRT_FLEXPWM1.SM[2].CAPTCOMPA)
  3017. #define FLEXPWM1_SM2CAPTCTRLB (IMXRT_FLEXPWM1.SM[2].CAPTCTRLB)
  3018. #define FLEXPWM1_SM2CAPTCOMPB (IMXRT_FLEXPWM1.SM[2].CAPTCOMPB)
  3019. #define FLEXPWM1_SM2CAPTCTRLX (IMXRT_FLEXPWM1.SM[2].CAPTCTRLX)
  3020. #define FLEXPWM1_SM2CAPTCOMPX (IMXRT_FLEXPWM1.SM[2].CAPTCOMPX)
  3021. #define FLEXPWM1_SM2CVAL0 (IMXRT_FLEXPWM1.SM[2].CVAL0)
  3022. #define FLEXPWM1_SM2CVAL0CYC (IMXRT_FLEXPWM1.SM[2].CVAL0CYC)
  3023. #define FLEXPWM1_SM2CVAL1 (IMXRT_FLEXPWM1.SM[2].CVAL1)
  3024. #define FLEXPWM1_SM2CVAL1CYC (IMXRT_FLEXPWM1.SM[2].CVAL1CYC)
  3025. #define FLEXPWM1_SM2CVAL2 (IMXRT_FLEXPWM1.SM[2].CVAL2)
  3026. #define FLEXPWM1_SM2CVAL2CYC (IMXRT_FLEXPWM1.SM[2].CVAL2CYC)
  3027. #define FLEXPWM1_SM2CVAL3 (IMXRT_FLEXPWM1.SM[2].CVAL3)
  3028. #define FLEXPWM1_SM2CVAL3CYC (IMXRT_FLEXPWM1.SM[2].CVAL3CYC)
  3029. #define FLEXPWM1_SM2CVAL4 (IMXRT_FLEXPWM1.SM[2].CVAL4)
  3030. #define FLEXPWM1_SM2CVAL4CYC (IMXRT_FLEXPWM1.SM[2].CVAL4CYC)
  3031. #define FLEXPWM1_SM2CVAL5 (IMXRT_FLEXPWM1.SM[2].CVAL5)
  3032. #define FLEXPWM1_SM2CVAL5CYC (IMXRT_FLEXPWM1.SM[2].CVAL5CYC)
  3033. #define FLEXPWM1_SM3CNT (IMXRT_FLEXPWM1.SM[3].CNT)
  3034. #define FLEXPWM1_SM3INIT (IMXRT_FLEXPWM1.SM[3].INIT)
  3035. #define FLEXPWM1_SM3CTRL2 (IMXRT_FLEXPWM1.SM[3].CTRL2)
  3036. #define FLEXPWM1_SM3CTRL (IMXRT_FLEXPWM1.SM[3].CTRL)
  3037. #define FLEXPWM1_SM3VAL0 (IMXRT_FLEXPWM1.SM[3].VAL0)
  3038. #define FLEXPWM1_SM3FRACVAL1 (IMXRT_FLEXPWM1.SM[3].FRACVAL1)
  3039. #define FLEXPWM1_SM3VAL1 (IMXRT_FLEXPWM1.SM[3].VAL1)
  3040. #define FLEXPWM1_SM3FRACVAL2 (IMXRT_FLEXPWM1.SM[3].FRACVAL2)
  3041. #define FLEXPWM1_SM3VAL2 (IMXRT_FLEXPWM1.SM[3].VAL2)
  3042. #define FLEXPWM1_SM3FRACVAL3 (IMXRT_FLEXPWM1.SM[3].FRACVAL3)
  3043. #define FLEXPWM1_SM3VAL3 (IMXRT_FLEXPWM1.SM[3].VAL3)
  3044. #define FLEXPWM1_SM3FRACVAL4 (IMXRT_FLEXPWM1.SM[3].FRACVAL4)
  3045. #define FLEXPWM1_SM3VAL4 (IMXRT_FLEXPWM1.SM[3].VAL4)
  3046. #define FLEXPWM1_SM3FRACVAL5 (IMXRT_FLEXPWM1.SM[3].FRACVAL5)
  3047. #define FLEXPWM1_SM3VAL5 (IMXRT_FLEXPWM1.SM[3].VAL5)
  3048. #define FLEXPWM1_SM3FRCTRL (IMXRT_FLEXPWM1.SM[3].FRCTRL)
  3049. #define FLEXPWM1_SM3OCTRL (IMXRT_FLEXPWM1.SM[3].OCTRL)
  3050. #define FLEXPWM1_SM3STS (IMXRT_FLEXPWM1.SM[3].STS)
  3051. #define FLEXPWM1_SM3INTEN (IMXRT_FLEXPWM1.SM[3].INTEN)
  3052. #define FLEXPWM1_SM3DMAEN (IMXRT_FLEXPWM1.SM[3].DMAEN)
  3053. #define FLEXPWM1_SM3TCTRL (IMXRT_FLEXPWM1.SM[3].TCTRL)
  3054. #define FLEXPWM1_SM3DISMAP0 (IMXRT_FLEXPWM1.SM[3].DISMAP0)
  3055. #define FLEXPWM1_SM3DISMAP1 (IMXRT_FLEXPWM1.SM[3].DISMAP1)
  3056. #define FLEXPWM1_SM3DTCNT0 (IMXRT_FLEXPWM1.SM[3].DTCNT0)
  3057. #define FLEXPWM1_SM3DTCNT1 (IMXRT_FLEXPWM1.SM[3].DTCNT1)
  3058. #define FLEXPWM1_SM3CAPTCTRLA (IMXRT_FLEXPWM1.SM[3].CAPTCTRLA)
  3059. #define FLEXPWM1_SM3CAPTCOMPA (IMXRT_FLEXPWM1.SM[3].CAPTCOMPA)
  3060. #define FLEXPWM1_SM3CAPTCTRLB (IMXRT_FLEXPWM1.SM[3].CAPTCTRLB)
  3061. #define FLEXPWM1_SM3CAPTCOMPB (IMXRT_FLEXPWM1.SM[3].CAPTCOMPB)
  3062. #define FLEXPWM1_SM3CAPTCTRLX (IMXRT_FLEXPWM1.SM[3].CAPTCTRLX)
  3063. #define FLEXPWM1_SM3CAPTCOMPX (IMXRT_FLEXPWM1.SM[3].CAPTCOMPX)
  3064. #define FLEXPWM1_SM3CVAL0 (IMXRT_FLEXPWM1.SM[3].CVAL0)
  3065. #define FLEXPWM1_SM3CVAL0CYC (IMXRT_FLEXPWM1.SM[3].CVAL0CYC)
  3066. #define FLEXPWM1_SM3CVAL1 (IMXRT_FLEXPWM1.SM[3].CVAL1)
  3067. #define FLEXPWM1_SM3CVAL1CYC (IMXRT_FLEXPWM1.SM[3].CVAL1CYC)
  3068. #define FLEXPWM1_SM3CVAL2 (IMXRT_FLEXPWM1.SM[3].CVAL2)
  3069. #define FLEXPWM1_SM3CVAL2CYC (IMXRT_FLEXPWM1.SM[3].CVAL2CYC)
  3070. #define FLEXPWM1_SM3CVAL3 (IMXRT_FLEXPWM1.SM[3].CVAL3)
  3071. #define FLEXPWM1_SM3CVAL3CYC (IMXRT_FLEXPWM1.SM[3].CVAL3CYC)
  3072. #define FLEXPWM1_SM3CVAL4 (IMXRT_FLEXPWM1.SM[3].CVAL4)
  3073. #define FLEXPWM1_SM3CVAL4CYC (IMXRT_FLEXPWM1.SM[3].CVAL4CYC)
  3074. #define FLEXPWM1_SM3CVAL5 (IMXRT_FLEXPWM1.SM[3].CVAL5)
  3075. #define FLEXPWM1_SM3CVAL5CYC (IMXRT_FLEXPWM1.SM[3].CVAL5CYC)
  3076. #define FLEXPWM1_OUTEN (IMXRT_FLEXPWM1.OUTEN)
  3077. #define FLEXPWM1_MASK (IMXRT_FLEXPWM1.MASK)
  3078. #define FLEXPWM1_SWCOUT (IMXRT_FLEXPWM1.SWCOUT)
  3079. #define FLEXPWM1_DTSRCSEL (IMXRT_FLEXPWM1.DTSRCSEL)
  3080. #define FLEXPWM1_MCTRL (IMXRT_FLEXPWM1.MCTRL)
  3081. #define FLEXPWM1_MCTRL2 (IMXRT_FLEXPWM1.MCTRL2)
  3082. #define FLEXPWM1_FCTRL0 (IMXRT_FLEXPWM1.FCTRL0)
  3083. #define FLEXPWM1_FSTS0 (IMXRT_FLEXPWM1.FSTS0)
  3084. #define FLEXPWM1_FFILT0 (IMXRT_FLEXPWM1.FFILT0)
  3085. #define FLEXPWM1_FTST0 (IMXRT_FLEXPWM1.FTST0)
  3086. #define FLEXPWM1_FCTRL20 (IMXRT_FLEXPWM1.FCTRL20)
  3087. #define FLEXPWM2_SM0CNT (IMXRT_FLEXPWM2.SM[0].CNT)
  3088. #define FLEXPWM2_SM0INIT (IMXRT_FLEXPWM2.SM[0].INIT)
  3089. #define FLEXPWM2_SM0CTRL2 (IMXRT_FLEXPWM2.SM[0].CTRL2)
  3090. #define FLEXPWM2_SM0CTRL (IMXRT_FLEXPWM2.SM[0].CTRL)
  3091. #define FLEXPWM2_SM0VAL0 (IMXRT_FLEXPWM2.SM[0].VAL0)
  3092. #define FLEXPWM2_SM0FRACVAL1 (IMXRT_FLEXPWM2.SM[0].FRACVAL1)
  3093. #define FLEXPWM2_SM0VAL1 (IMXRT_FLEXPWM2.SM[0].VAL1)
  3094. #define FLEXPWM2_SM0FRACVAL2 (IMXRT_FLEXPWM2.SM[0].FRACVAL2)
  3095. #define FLEXPWM2_SM0VAL2 (IMXRT_FLEXPWM2.SM[0].VAL2)
  3096. #define FLEXPWM2_SM0FRACVAL3 (IMXRT_FLEXPWM2.SM[0].FRACVAL3)
  3097. #define FLEXPWM2_SM0VAL3 (IMXRT_FLEXPWM2.SM[0].VAL3)
  3098. #define FLEXPWM2_SM0FRACVAL4 (IMXRT_FLEXPWM2.SM[0].FRACVAL4)
  3099. #define FLEXPWM2_SM0VAL4 (IMXRT_FLEXPWM2.SM[0].VAL4)
  3100. #define FLEXPWM2_SM0FRACVAL5 (IMXRT_FLEXPWM2.SM[0].FRACVAL5)
  3101. #define FLEXPWM2_SM0VAL5 (IMXRT_FLEXPWM2.SM[0].VAL5)
  3102. #define FLEXPWM2_SM0FRCTRL (IMXRT_FLEXPWM2.SM[0].FRCTRL)
  3103. #define FLEXPWM2_SM0OCTRL (IMXRT_FLEXPWM2.SM[0].OCTRL)
  3104. #define FLEXPWM2_SM0STS (IMXRT_FLEXPWM2.SM[0].STS)
  3105. #define FLEXPWM2_SM0INTEN (IMXRT_FLEXPWM2.SM[0].INTEN)
  3106. #define FLEXPWM2_SM0DMAEN (IMXRT_FLEXPWM2.SM[0].DMAEN)
  3107. #define FLEXPWM2_SM0TCTRL (IMXRT_FLEXPWM2.SM[0].TCTRL)
  3108. #define FLEXPWM2_SM0DISMAP0 (IMXRT_FLEXPWM2.SM[0].DISMAP0)
  3109. #define FLEXPWM2_SM0DISMAP1 (IMXRT_FLEXPWM2.SM[0].DISMAP1)
  3110. #define FLEXPWM2_SM0DTCNT0 (IMXRT_FLEXPWM2.SM[0].DTCNT0)
  3111. #define FLEXPWM2_SM0DTCNT1 (IMXRT_FLEXPWM2.SM[0].DTCNT1)
  3112. #define FLEXPWM2_SM0CAPTCTRLA (IMXRT_FLEXPWM2.SM[0].CAPTCTRLA)
  3113. #define FLEXPWM2_SM0CAPTCOMPA (IMXRT_FLEXPWM2.SM[0].CAPTCOMPA)
  3114. #define FLEXPWM2_SM0CAPTCTRLB (IMXRT_FLEXPWM2.SM[0].CAPTCTRLB)
  3115. #define FLEXPWM2_SM0CAPTCOMPB (IMXRT_FLEXPWM2.SM[0].CAPTCOMPB)
  3116. #define FLEXPWM2_SM0CAPTCTRLX (IMXRT_FLEXPWM2.SM[0].CAPTCTRLX)
  3117. #define FLEXPWM2_SM0CAPTCOMPX (IMXRT_FLEXPWM2.SM[0].CAPTCOMPX)
  3118. #define FLEXPWM2_SM0CVAL0 (IMXRT_FLEXPWM2.SM[0].CVAL0)
  3119. #define FLEXPWM2_SM0CVAL0CYC (IMXRT_FLEXPWM2.SM[0].CVAL0CYC)
  3120. #define FLEXPWM2_SM0CVAL1 (IMXRT_FLEXPWM2.SM[0].CVAL1)
  3121. #define FLEXPWM2_SM0CVAL1CYC (IMXRT_FLEXPWM2.SM[0].CVAL1CYC)
  3122. #define FLEXPWM2_SM0CVAL2 (IMXRT_FLEXPWM2.SM[0].CVAL2)
  3123. #define FLEXPWM2_SM0CVAL2CYC (IMXRT_FLEXPWM2.SM[0].CVAL2CYC)
  3124. #define FLEXPWM2_SM0CVAL3 (IMXRT_FLEXPWM2.SM[0].CVAL3)
  3125. #define FLEXPWM2_SM0CVAL3CYC (IMXRT_FLEXPWM2.SM[0].CVAL3CYC)
  3126. #define FLEXPWM2_SM0CVAL4 (IMXRT_FLEXPWM2.SM[0].CVAL4)
  3127. #define FLEXPWM2_SM0CVAL4CYC (IMXRT_FLEXPWM2.SM[0].CVAL4CYC)
  3128. #define FLEXPWM2_SM0CVAL5 (IMXRT_FLEXPWM2.SM[0].CVAL5)
  3129. #define FLEXPWM2_SM0CVAL5CYC (IMXRT_FLEXPWM2.SM[0].CVAL5CYC)
  3130. #define FLEXPWM2_SM1CNT (IMXRT_FLEXPWM2.SM[1].CNT)
  3131. #define FLEXPWM2_SM1INIT (IMXRT_FLEXPWM2.SM[1].INIT)
  3132. #define FLEXPWM2_SM1CTRL2 (IMXRT_FLEXPWM2.SM[1].CTRL2)
  3133. #define FLEXPWM2_SM1CTRL (IMXRT_FLEXPWM2.SM[1].CTRL)
  3134. #define FLEXPWM2_SM1VAL0 (IMXRT_FLEXPWM2.SM[1].VAL0)
  3135. #define FLEXPWM2_SM1FRACVAL1 (IMXRT_FLEXPWM2.SM[1].FRACVAL1)
  3136. #define FLEXPWM2_SM1VAL1 (IMXRT_FLEXPWM2.SM[1].VAL1)
  3137. #define FLEXPWM2_SM1FRACVAL2 (IMXRT_FLEXPWM2.SM[1].FRACVAL2)
  3138. #define FLEXPWM2_SM1VAL2 (IMXRT_FLEXPWM2.SM[1].VAL2)
  3139. #define FLEXPWM2_SM1FRACVAL3 (IMXRT_FLEXPWM2.SM[1].FRACVAL3)
  3140. #define FLEXPWM2_SM1VAL3 (IMXRT_FLEXPWM2.SM[1].VAL3)
  3141. #define FLEXPWM2_SM1FRACVAL4 (IMXRT_FLEXPWM2.SM[1].FRACVAL4)
  3142. #define FLEXPWM2_SM1VAL4 (IMXRT_FLEXPWM2.SM[1].VAL4)
  3143. #define FLEXPWM2_SM1FRACVAL5 (IMXRT_FLEXPWM2.SM[1].FRACVAL5)
  3144. #define FLEXPWM2_SM1VAL5 (IMXRT_FLEXPWM2.SM[1].VAL5)
  3145. #define FLEXPWM2_SM1FRCTRL (IMXRT_FLEXPWM2.SM[1].FRCTRL)
  3146. #define FLEXPWM2_SM1OCTRL (IMXRT_FLEXPWM2.SM[1].OCTRL)
  3147. #define FLEXPWM2_SM1STS (IMXRT_FLEXPWM2.SM[1].STS)
  3148. #define FLEXPWM2_SM1INTEN (IMXRT_FLEXPWM2.SM[1].INTEN)
  3149. #define FLEXPWM2_SM1DMAEN (IMXRT_FLEXPWM2.SM[1].DMAEN)
  3150. #define FLEXPWM2_SM1TCTRL (IMXRT_FLEXPWM2.SM[1].TCTRL)
  3151. #define FLEXPWM2_SM1DISMAP0 (IMXRT_FLEXPWM2.SM[1].DISMAP0)
  3152. #define FLEXPWM2_SM1DISMAP1 (IMXRT_FLEXPWM2.SM[1].DISMAP1)
  3153. #define FLEXPWM2_SM1DTCNT0 (IMXRT_FLEXPWM2.SM[1].DTCNT0)
  3154. #define FLEXPWM2_SM1DTCNT1 (IMXRT_FLEXPWM2.SM[1].DTCNT1)
  3155. #define FLEXPWM2_SM1CAPTCTRLA (IMXRT_FLEXPWM2.SM[1].CAPTCTRLA)
  3156. #define FLEXPWM2_SM1CAPTCOMPA (IMXRT_FLEXPWM2.SM[1].CAPTCOMPA)
  3157. #define FLEXPWM2_SM1CAPTCTRLB (IMXRT_FLEXPWM2.SM[1].CAPTCTRLB)
  3158. #define FLEXPWM2_SM1CAPTCOMPB (IMXRT_FLEXPWM2.SM[1].CAPTCOMPB)
  3159. #define FLEXPWM2_SM1CAPTCTRLX (IMXRT_FLEXPWM2.SM[1].CAPTCTRLX)
  3160. #define FLEXPWM2_SM1CAPTCOMPX (IMXRT_FLEXPWM2.SM[1].CAPTCOMPX)
  3161. #define FLEXPWM2_SM1CVAL0 (IMXRT_FLEXPWM2.SM[1].CVAL0)
  3162. #define FLEXPWM2_SM1CVAL0CYC (IMXRT_FLEXPWM2.SM[1].CVAL0CYC)
  3163. #define FLEXPWM2_SM1CVAL1 (IMXRT_FLEXPWM2.SM[1].CVAL1)
  3164. #define FLEXPWM2_SM1CVAL1CYC (IMXRT_FLEXPWM2.SM[1].CVAL1CYC)
  3165. #define FLEXPWM2_SM1CVAL2 (IMXRT_FLEXPWM2.SM[1].CVAL2)
  3166. #define FLEXPWM2_SM1CVAL2CYC (IMXRT_FLEXPWM2.SM[1].CVAL2CYC)
  3167. #define FLEXPWM2_SM1CVAL3 (IMXRT_FLEXPWM2.SM[1].CVAL3)
  3168. #define FLEXPWM2_SM1CVAL3CYC (IMXRT_FLEXPWM2.SM[1].CVAL3CYC)
  3169. #define FLEXPWM2_SM1CVAL4 (IMXRT_FLEXPWM2.SM[1].CVAL4)
  3170. #define FLEXPWM2_SM1CVAL4CYC (IMXRT_FLEXPWM2.SM[1].CVAL4CYC)
  3171. #define FLEXPWM2_SM1CVAL5 (IMXRT_FLEXPWM2.SM[1].CVAL5)
  3172. #define FLEXPWM2_SM1CVAL5CYC (IMXRT_FLEXPWM2.SM[1].CVAL5CYC)
  3173. #define FLEXPWM2_SM2CNT (IMXRT_FLEXPWM2.SM[2].CNT)
  3174. #define FLEXPWM2_SM2INIT (IMXRT_FLEXPWM2.SM[2].INIT)
  3175. #define FLEXPWM2_SM2CTRL2 (IMXRT_FLEXPWM2.SM[2].CTRL2)
  3176. #define FLEXPWM2_SM2CTRL (IMXRT_FLEXPWM2.SM[2].CTRL)
  3177. #define FLEXPWM2_SM2VAL0 (IMXRT_FLEXPWM2.SM[2].VAL0)
  3178. #define FLEXPWM2_SM2FRACVAL1 (IMXRT_FLEXPWM2.SM[2].FRACVAL1)
  3179. #define FLEXPWM2_SM2VAL1 (IMXRT_FLEXPWM2.SM[2].VAL1)
  3180. #define FLEXPWM2_SM2FRACVAL2 (IMXRT_FLEXPWM2.SM[2].FRACVAL2)
  3181. #define FLEXPWM2_SM2VAL2 (IMXRT_FLEXPWM2.SM[2].VAL2)
  3182. #define FLEXPWM2_SM2FRACVAL3 (IMXRT_FLEXPWM2.SM[2].FRACVAL3)
  3183. #define FLEXPWM2_SM2VAL3 (IMXRT_FLEXPWM2.SM[2].VAL3)
  3184. #define FLEXPWM2_SM2FRACVAL4 (IMXRT_FLEXPWM2.SM[2].FRACVAL4)
  3185. #define FLEXPWM2_SM2VAL4 (IMXRT_FLEXPWM2.SM[2].VAL4)
  3186. #define FLEXPWM2_SM2FRACVAL5 (IMXRT_FLEXPWM2.SM[2].FRACVAL5)
  3187. #define FLEXPWM2_SM2VAL5 (IMXRT_FLEXPWM2.SM[2].VAL5)
  3188. #define FLEXPWM2_SM2FRCTRL (IMXRT_FLEXPWM2.SM[2].FRCTRL)
  3189. #define FLEXPWM2_SM2OCTRL (IMXRT_FLEXPWM2.SM[2].OCTRL)
  3190. #define FLEXPWM2_SM2STS (IMXRT_FLEXPWM2.SM[2].STS)
  3191. #define FLEXPWM2_SM2INTEN (IMXRT_FLEXPWM2.SM[2].INTEN)
  3192. #define FLEXPWM2_SM2DMAEN (IMXRT_FLEXPWM2.SM[2].DMAEN)
  3193. #define FLEXPWM2_SM2TCTRL (IMXRT_FLEXPWM2.SM[2].TCTRL)
  3194. #define FLEXPWM2_SM2DISMAP0 (IMXRT_FLEXPWM2.SM[2].DISMAP0)
  3195. #define FLEXPWM2_SM2DISMAP1 (IMXRT_FLEXPWM2.SM[2].DISMAP1)
  3196. #define FLEXPWM2_SM2DTCNT0 (IMXRT_FLEXPWM2.SM[2].DTCNT0)
  3197. #define FLEXPWM2_SM2DTCNT1 (IMXRT_FLEXPWM2.SM[2].DTCNT1)
  3198. #define FLEXPWM2_SM2CAPTCTRLA (IMXRT_FLEXPWM2.SM[2].CAPTCTRLA)
  3199. #define FLEXPWM2_SM2CAPTCOMPA (IMXRT_FLEXPWM2.SM[2].CAPTCOMPA)
  3200. #define FLEXPWM2_SM2CAPTCTRLB (IMXRT_FLEXPWM2.SM[2].CAPTCTRLB)
  3201. #define FLEXPWM2_SM2CAPTCOMPB (IMXRT_FLEXPWM2.SM[2].CAPTCOMPB)
  3202. #define FLEXPWM2_SM2CAPTCTRLX (IMXRT_FLEXPWM2.SM[2].CAPTCTRLX)
  3203. #define FLEXPWM2_SM2CAPTCOMPX (IMXRT_FLEXPWM2.SM[2].CAPTCOMPX)
  3204. #define FLEXPWM2_SM2CVAL0 (IMXRT_FLEXPWM2.SM[2].CVAL0)
  3205. #define FLEXPWM2_SM2CVAL0CYC (IMXRT_FLEXPWM2.SM[2].CVAL0CYC)
  3206. #define FLEXPWM2_SM2CVAL1 (IMXRT_FLEXPWM2.SM[2].CVAL1)
  3207. #define FLEXPWM2_SM2CVAL1CYC (IMXRT_FLEXPWM2.SM[2].CVAL1CYC)
  3208. #define FLEXPWM2_SM2CVAL2 (IMXRT_FLEXPWM2.SM[2].CVAL2)
  3209. #define FLEXPWM2_SM2CVAL2CYC (IMXRT_FLEXPWM2.SM[2].CVAL2CYC)
  3210. #define FLEXPWM2_SM2CVAL3 (IMXRT_FLEXPWM2.SM[2].CVAL3)
  3211. #define FLEXPWM2_SM2CVAL3CYC (IMXRT_FLEXPWM2.SM[2].CVAL3CYC)
  3212. #define FLEXPWM2_SM2CVAL4 (IMXRT_FLEXPWM2.SM[2].CVAL4)
  3213. #define FLEXPWM2_SM2CVAL4CYC (IMXRT_FLEXPWM2.SM[2].CVAL4CYC)
  3214. #define FLEXPWM2_SM2CVAL5 (IMXRT_FLEXPWM2.SM[2].CVAL5)
  3215. #define FLEXPWM2_SM2CVAL5CYC (IMXRT_FLEXPWM2.SM[2].CVAL5CYC)
  3216. #define FLEXPWM2_SM3CNT (IMXRT_FLEXPWM2.SM[3].CNT)
  3217. #define FLEXPWM2_SM3INIT (IMXRT_FLEXPWM2.SM[3].INIT)
  3218. #define FLEXPWM2_SM3CTRL2 (IMXRT_FLEXPWM2.SM[3].CTRL2)
  3219. #define FLEXPWM2_SM3CTRL (IMXRT_FLEXPWM2.SM[3].CTRL)
  3220. #define FLEXPWM2_SM3VAL0 (IMXRT_FLEXPWM2.SM[3].VAL0)
  3221. #define FLEXPWM2_SM3FRACVAL1 (IMXRT_FLEXPWM2.SM[3].FRACVAL1)
  3222. #define FLEXPWM2_SM3VAL1 (IMXRT_FLEXPWM2.SM[3].VAL1)
  3223. #define FLEXPWM2_SM3FRACVAL2 (IMXRT_FLEXPWM2.SM[3].FRACVAL2)
  3224. #define FLEXPWM2_SM3VAL2 (IMXRT_FLEXPWM2.SM[3].VAL2)
  3225. #define FLEXPWM2_SM3FRACVAL3 (IMXRT_FLEXPWM2.SM[3].FRACVAL3)
  3226. #define FLEXPWM2_SM3VAL3 (IMXRT_FLEXPWM2.SM[3].VAL3)
  3227. #define FLEXPWM2_SM3FRACVAL4 (IMXRT_FLEXPWM2.SM[3].FRACVAL4)
  3228. #define FLEXPWM2_SM3VAL4 (IMXRT_FLEXPWM2.SM[3].VAL4)
  3229. #define FLEXPWM2_SM3FRACVAL5 (IMXRT_FLEXPWM2.SM[3].FRACVAL5)
  3230. #define FLEXPWM2_SM3VAL5 (IMXRT_FLEXPWM2.SM[3].VAL5)
  3231. #define FLEXPWM2_SM3FRCTRL (IMXRT_FLEXPWM2.SM[3].FRCTRL)
  3232. #define FLEXPWM2_SM3OCTRL (IMXRT_FLEXPWM2.SM[3].OCTRL)
  3233. #define FLEXPWM2_SM3STS (IMXRT_FLEXPWM2.SM[3].STS)
  3234. #define FLEXPWM2_SM3INTEN (IMXRT_FLEXPWM2.SM[3].INTEN)
  3235. #define FLEXPWM2_SM3DMAEN (IMXRT_FLEXPWM2.SM[3].DMAEN)
  3236. #define FLEXPWM2_SM3TCTRL (IMXRT_FLEXPWM2.SM[3].TCTRL)
  3237. #define FLEXPWM2_SM3DISMAP0 (IMXRT_FLEXPWM2.SM[3].DISMAP0)
  3238. #define FLEXPWM2_SM3DISMAP1 (IMXRT_FLEXPWM2.SM[3].DISMAP1)
  3239. #define FLEXPWM2_SM3DTCNT0 (IMXRT_FLEXPWM2.SM[3].DTCNT0)
  3240. #define FLEXPWM2_SM3DTCNT1 (IMXRT_FLEXPWM2.SM[3].DTCNT1)
  3241. #define FLEXPWM2_SM3CAPTCTRLA (IMXRT_FLEXPWM2.SM[3].CAPTCTRLA)
  3242. #define FLEXPWM2_SM3CAPTCOMPA (IMXRT_FLEXPWM2.SM[3].CAPTCOMPA)
  3243. #define FLEXPWM2_SM3CAPTCTRLB (IMXRT_FLEXPWM2.SM[3].CAPTCTRLB)
  3244. #define FLEXPWM2_SM3CAPTCOMPB (IMXRT_FLEXPWM2.SM[3].CAPTCOMPB)
  3245. #define FLEXPWM2_SM3CAPTCTRLX (IMXRT_FLEXPWM2.SM[3].CAPTCTRLX)
  3246. #define FLEXPWM2_SM3CAPTCOMPX (IMXRT_FLEXPWM2.SM[3].CAPTCOMPX)
  3247. #define FLEXPWM2_SM3CVAL0 (IMXRT_FLEXPWM2.SM[3].CVAL0)
  3248. #define FLEXPWM2_SM3CVAL0CYC (IMXRT_FLEXPWM2.SM[3].CVAL0CYC)
  3249. #define FLEXPWM2_SM3CVAL1 (IMXRT_FLEXPWM2.SM[3].CVAL1)
  3250. #define FLEXPWM2_SM3CVAL1CYC (IMXRT_FLEXPWM2.SM[3].CVAL1CYC)
  3251. #define FLEXPWM2_SM3CVAL2 (IMXRT_FLEXPWM2.SM[3].CVAL2)
  3252. #define FLEXPWM2_SM3CVAL2CYC (IMXRT_FLEXPWM2.SM[3].CVAL2CYC)
  3253. #define FLEXPWM2_SM3CVAL3 (IMXRT_FLEXPWM2.SM[3].CVAL3)
  3254. #define FLEXPWM2_SM3CVAL3CYC (IMXRT_FLEXPWM2.SM[3].CVAL3CYC)
  3255. #define FLEXPWM2_SM3CVAL4 (IMXRT_FLEXPWM2.SM[3].CVAL4)
  3256. #define FLEXPWM2_SM3CVAL4CYC (IMXRT_FLEXPWM2.SM[3].CVAL4CYC)
  3257. #define FLEXPWM2_SM3CVAL5 (IMXRT_FLEXPWM2.SM[3].CVAL5)
  3258. #define FLEXPWM2_SM3CVAL5CYC (IMXRT_FLEXPWM2.SM[3].CVAL5CYC)
  3259. #define FLEXPWM2_OUTEN (IMXRT_FLEXPWM2.OUTEN)
  3260. #define FLEXPWM2_MASK (IMXRT_FLEXPWM2.MASK)
  3261. #define FLEXPWM2_SWCOUT (IMXRT_FLEXPWM2.SWCOUT)
  3262. #define FLEXPWM2_DTSRCSEL (IMXRT_FLEXPWM2.DTSRCSEL)
  3263. #define FLEXPWM2_MCTRL (IMXRT_FLEXPWM2.MCTRL)
  3264. #define FLEXPWM2_MCTRL2 (IMXRT_FLEXPWM2.MCTRL2)
  3265. #define FLEXPWM2_FCTRL0 (IMXRT_FLEXPWM2.FCTRL0)
  3266. #define FLEXPWM2_FSTS0 (IMXRT_FLEXPWM2.FSTS0)
  3267. #define FLEXPWM2_FFILT0 (IMXRT_FLEXPWM2.FFILT0)
  3268. #define FLEXPWM2_FTST0 (IMXRT_FLEXPWM2.FTST0)
  3269. #define FLEXPWM2_FCTRL20 (IMXRT_FLEXPWM2.FCTRL20)
  3270. #define FLEXPWM3_SM0CNT (IMXRT_FLEXPWM3.SM[0].CNT)
  3271. #define FLEXPWM3_SM0INIT (IMXRT_FLEXPWM3.SM[0].INIT)
  3272. #define FLEXPWM3_SM0CTRL2 (IMXRT_FLEXPWM3.SM[0].CTRL2)
  3273. #define FLEXPWM3_SM0CTRL (IMXRT_FLEXPWM3.SM[0].CTRL)
  3274. #define FLEXPWM3_SM0VAL0 (IMXRT_FLEXPWM3.SM[0].VAL0)
  3275. #define FLEXPWM3_SM0FRACVAL1 (IMXRT_FLEXPWM3.SM[0].FRACVAL1)
  3276. #define FLEXPWM3_SM0VAL1 (IMXRT_FLEXPWM3.SM[0].VAL1)
  3277. #define FLEXPWM3_SM0FRACVAL2 (IMXRT_FLEXPWM3.SM[0].FRACVAL2)
  3278. #define FLEXPWM3_SM0VAL2 (IMXRT_FLEXPWM3.SM[0].VAL2)
  3279. #define FLEXPWM3_SM0FRACVAL3 (IMXRT_FLEXPWM3.SM[0].FRACVAL3)
  3280. #define FLEXPWM3_SM0VAL3 (IMXRT_FLEXPWM3.SM[0].VAL3)
  3281. #define FLEXPWM3_SM0FRACVAL4 (IMXRT_FLEXPWM3.SM[0].FRACVAL4)
  3282. #define FLEXPWM3_SM0VAL4 (IMXRT_FLEXPWM3.SM[0].VAL4)
  3283. #define FLEXPWM3_SM0FRACVAL5 (IMXRT_FLEXPWM3.SM[0].FRACVAL5)
  3284. #define FLEXPWM3_SM0VAL5 (IMXRT_FLEXPWM3.SM[0].VAL5)
  3285. #define FLEXPWM3_SM0FRCTRL (IMXRT_FLEXPWM3.SM[0].FRCTRL)
  3286. #define FLEXPWM3_SM0OCTRL (IMXRT_FLEXPWM3.SM[0].OCTRL)
  3287. #define FLEXPWM3_SM0STS (IMXRT_FLEXPWM3.SM[0].STS)
  3288. #define FLEXPWM3_SM0INTEN (IMXRT_FLEXPWM3.SM[0].INTEN)
  3289. #define FLEXPWM3_SM0DMAEN (IMXRT_FLEXPWM3.SM[0].DMAEN)
  3290. #define FLEXPWM3_SM0TCTRL (IMXRT_FLEXPWM3.SM[0].TCTRL)
  3291. #define FLEXPWM3_SM0DISMAP0 (IMXRT_FLEXPWM3.SM[0].DISMAP0)
  3292. #define FLEXPWM3_SM0DISMAP1 (IMXRT_FLEXPWM3.SM[0].DISMAP1)
  3293. #define FLEXPWM3_SM0DTCNT0 (IMXRT_FLEXPWM3.SM[0].DTCNT0)
  3294. #define FLEXPWM3_SM0DTCNT1 (IMXRT_FLEXPWM3.SM[0].DTCNT1)
  3295. #define FLEXPWM3_SM0CAPTCTRLA (IMXRT_FLEXPWM3.SM[0].CAPTCTRLA)
  3296. #define FLEXPWM3_SM0CAPTCOMPA (IMXRT_FLEXPWM3.SM[0].CAPTCOMPA)
  3297. #define FLEXPWM3_SM0CAPTCTRLB (IMXRT_FLEXPWM3.SM[0].CAPTCTRLB)
  3298. #define FLEXPWM3_SM0CAPTCOMPB (IMXRT_FLEXPWM3.SM[0].CAPTCOMPB)
  3299. #define FLEXPWM3_SM0CAPTCTRLX (IMXRT_FLEXPWM3.SM[0].CAPTCTRLX)
  3300. #define FLEXPWM3_SM0CAPTCOMPX (IMXRT_FLEXPWM3.SM[0].CAPTCOMPX)
  3301. #define FLEXPWM3_SM0CVAL0 (IMXRT_FLEXPWM3.SM[0].CVAL0)
  3302. #define FLEXPWM3_SM0CVAL0CYC (IMXRT_FLEXPWM3.SM[0].CVAL0CYC)
  3303. #define FLEXPWM3_SM0CVAL1 (IMXRT_FLEXPWM3.SM[0].CVAL1)
  3304. #define FLEXPWM3_SM0CVAL1CYC (IMXRT_FLEXPWM3.SM[0].CVAL1CYC)
  3305. #define FLEXPWM3_SM0CVAL2 (IMXRT_FLEXPWM3.SM[0].CVAL2)
  3306. #define FLEXPWM3_SM0CVAL2CYC (IMXRT_FLEXPWM3.SM[0].CVAL2CYC)
  3307. #define FLEXPWM3_SM0CVAL3 (IMXRT_FLEXPWM3.SM[0].CVAL3)
  3308. #define FLEXPWM3_SM0CVAL3CYC (IMXRT_FLEXPWM3.SM[0].CVAL3CYC)
  3309. #define FLEXPWM3_SM0CVAL4 (IMXRT_FLEXPWM3.SM[0].CVAL4)
  3310. #define FLEXPWM3_SM0CVAL4CYC (IMXRT_FLEXPWM3.SM[0].CVAL4CYC)
  3311. #define FLEXPWM3_SM0CVAL5 (IMXRT_FLEXPWM3.SM[0].CVAL5)
  3312. #define FLEXPWM3_SM0CVAL5CYC (IMXRT_FLEXPWM3.SM[0].CVAL5CYC)
  3313. #define FLEXPWM3_SM1CNT (IMXRT_FLEXPWM3.SM[1].CNT)
  3314. #define FLEXPWM3_SM1INIT (IMXRT_FLEXPWM3.SM[1].INIT)
  3315. #define FLEXPWM3_SM1CTRL2 (IMXRT_FLEXPWM3.SM[1].CTRL2)
  3316. #define FLEXPWM3_SM1CTRL (IMXRT_FLEXPWM3.SM[1].CTRL)
  3317. #define FLEXPWM3_SM1VAL0 (IMXRT_FLEXPWM3.SM[1].VAL0)
  3318. #define FLEXPWM3_SM1FRACVAL1 (IMXRT_FLEXPWM3.SM[1].FRACVAL1)
  3319. #define FLEXPWM3_SM1VAL1 (IMXRT_FLEXPWM3.SM[1].VAL1)
  3320. #define FLEXPWM3_SM1FRACVAL2 (IMXRT_FLEXPWM3.SM[1].FRACVAL2)
  3321. #define FLEXPWM3_SM1VAL2 (IMXRT_FLEXPWM3.SM[1].VAL2)
  3322. #define FLEXPWM3_SM1FRACVAL3 (IMXRT_FLEXPWM3.SM[1].FRACVAL3)
  3323. #define FLEXPWM3_SM1VAL3 (IMXRT_FLEXPWM3.SM[1].VAL3)
  3324. #define FLEXPWM3_SM1FRACVAL4 (IMXRT_FLEXPWM3.SM[1].FRACVAL4)
  3325. #define FLEXPWM3_SM1VAL4 (IMXRT_FLEXPWM3.SM[1].VAL4)
  3326. #define FLEXPWM3_SM1FRACVAL5 (IMXRT_FLEXPWM3.SM[1].FRACVAL5)
  3327. #define FLEXPWM3_SM1VAL5 (IMXRT_FLEXPWM3.SM[1].VAL5)
  3328. #define FLEXPWM3_SM1FRCTRL (IMXRT_FLEXPWM3.SM[1].FRCTRL)
  3329. #define FLEXPWM3_SM1OCTRL (IMXRT_FLEXPWM3.SM[1].OCTRL)
  3330. #define FLEXPWM3_SM1STS (IMXRT_FLEXPWM3.SM[1].STS)
  3331. #define FLEXPWM3_SM1INTEN (IMXRT_FLEXPWM3.SM[1].INTEN)
  3332. #define FLEXPWM3_SM1DMAEN (IMXRT_FLEXPWM3.SM[1].DMAEN)
  3333. #define FLEXPWM3_SM1TCTRL (IMXRT_FLEXPWM3.SM[1].TCTRL)
  3334. #define FLEXPWM3_SM1DISMAP0 (IMXRT_FLEXPWM3.SM[1].DISMAP0)
  3335. #define FLEXPWM3_SM1DISMAP1 (IMXRT_FLEXPWM3.SM[1].DISMAP1)
  3336. #define FLEXPWM3_SM1DTCNT0 (IMXRT_FLEXPWM3.SM[1].DTCNT0)
  3337. #define FLEXPWM3_SM1DTCNT1 (IMXRT_FLEXPWM3.SM[1].DTCNT1)
  3338. #define FLEXPWM3_SM1CAPTCTRLA (IMXRT_FLEXPWM3.SM[1].CAPTCTRLA)
  3339. #define FLEXPWM3_SM1CAPTCOMPA (IMXRT_FLEXPWM3.SM[1].CAPTCOMPA)
  3340. #define FLEXPWM3_SM1CAPTCTRLB (IMXRT_FLEXPWM3.SM[1].CAPTCTRLB)
  3341. #define FLEXPWM3_SM1CAPTCOMPB (IMXRT_FLEXPWM3.SM[1].CAPTCOMPB)
  3342. #define FLEXPWM3_SM1CAPTCTRLX (IMXRT_FLEXPWM3.SM[1].CAPTCTRLX)
  3343. #define FLEXPWM3_SM1CAPTCOMPX (IMXRT_FLEXPWM3.SM[1].CAPTCOMPX)
  3344. #define FLEXPWM3_SM1CVAL0 (IMXRT_FLEXPWM3.SM[1].CVAL0)
  3345. #define FLEXPWM3_SM1CVAL0CYC (IMXRT_FLEXPWM3.SM[1].CVAL0CYC)
  3346. #define FLEXPWM3_SM1CVAL1 (IMXRT_FLEXPWM3.SM[1].CVAL1)
  3347. #define FLEXPWM3_SM1CVAL1CYC (IMXRT_FLEXPWM3.SM[1].CVAL1CYC)
  3348. #define FLEXPWM3_SM1CVAL2 (IMXRT_FLEXPWM3.SM[1].CVAL2)
  3349. #define FLEXPWM3_SM1CVAL2CYC (IMXRT_FLEXPWM3.SM[1].CVAL2CYC)
  3350. #define FLEXPWM3_SM1CVAL3 (IMXRT_FLEXPWM3.SM[1].CVAL3)
  3351. #define FLEXPWM3_SM1CVAL3CYC (IMXRT_FLEXPWM3.SM[1].CVAL3CYC)
  3352. #define FLEXPWM3_SM1CVAL4 (IMXRT_FLEXPWM3.SM[1].CVAL4)
  3353. #define FLEXPWM3_SM1CVAL4CYC (IMXRT_FLEXPWM3.SM[1].CVAL4CYC)
  3354. #define FLEXPWM3_SM1CVAL5 (IMXRT_FLEXPWM3.SM[1].CVAL5)
  3355. #define FLEXPWM3_SM1CVAL5CYC (IMXRT_FLEXPWM3.SM[1].CVAL5CYC)
  3356. #define FLEXPWM3_SM2CNT (IMXRT_FLEXPWM3.SM[2].CNT)
  3357. #define FLEXPWM3_SM2INIT (IMXRT_FLEXPWM3.SM[2].INIT)
  3358. #define FLEXPWM3_SM2CTRL2 (IMXRT_FLEXPWM3.SM[2].CTRL2)
  3359. #define FLEXPWM3_SM2CTRL (IMXRT_FLEXPWM3.SM[2].CTRL)
  3360. #define FLEXPWM3_SM2VAL0 (IMXRT_FLEXPWM3.SM[2].VAL0)
  3361. #define FLEXPWM3_SM2FRACVAL1 (IMXRT_FLEXPWM3.SM[2].FRACVAL1)
  3362. #define FLEXPWM3_SM2VAL1 (IMXRT_FLEXPWM3.SM[2].VAL1)
  3363. #define FLEXPWM3_SM2FRACVAL2 (IMXRT_FLEXPWM3.SM[2].FRACVAL2)
  3364. #define FLEXPWM3_SM2VAL2 (IMXRT_FLEXPWM3.SM[2].VAL2)
  3365. #define FLEXPWM3_SM2FRACVAL3 (IMXRT_FLEXPWM3.SM[2].FRACVAL3)
  3366. #define FLEXPWM3_SM2VAL3 (IMXRT_FLEXPWM3.SM[2].VAL3)
  3367. #define FLEXPWM3_SM2FRACVAL4 (IMXRT_FLEXPWM3.SM[2].FRACVAL4)
  3368. #define FLEXPWM3_SM2VAL4 (IMXRT_FLEXPWM3.SM[2].VAL4)
  3369. #define FLEXPWM3_SM2FRACVAL5 (IMXRT_FLEXPWM3.SM[2].FRACVAL5)
  3370. #define FLEXPWM3_SM2VAL5 (IMXRT_FLEXPWM3.SM[2].VAL5)
  3371. #define FLEXPWM3_SM2FRCTRL (IMXRT_FLEXPWM3.SM[2].FRCTRL)
  3372. #define FLEXPWM3_SM2OCTRL (IMXRT_FLEXPWM3.SM[2].OCTRL)
  3373. #define FLEXPWM3_SM2STS (IMXRT_FLEXPWM3.SM[2].STS)
  3374. #define FLEXPWM3_SM2INTEN (IMXRT_FLEXPWM3.SM[2].INTEN)
  3375. #define FLEXPWM3_SM2DMAEN (IMXRT_FLEXPWM3.SM[2].DMAEN)
  3376. #define FLEXPWM3_SM2TCTRL (IMXRT_FLEXPWM3.SM[2].TCTRL)
  3377. #define FLEXPWM3_SM2DISMAP0 (IMXRT_FLEXPWM3.SM[2].DISMAP0)
  3378. #define FLEXPWM3_SM2DISMAP1 (IMXRT_FLEXPWM3.SM[2].DISMAP1)
  3379. #define FLEXPWM3_SM2DTCNT0 (IMXRT_FLEXPWM3.SM[2].DTCNT0)
  3380. #define FLEXPWM3_SM2DTCNT1 (IMXRT_FLEXPWM3.SM[2].DTCNT1)
  3381. #define FLEXPWM3_SM2CAPTCTRLA (IMXRT_FLEXPWM3.SM[2].CAPTCTRLA)
  3382. #define FLEXPWM3_SM2CAPTCOMPA (IMXRT_FLEXPWM3.SM[2].CAPTCOMPA)
  3383. #define FLEXPWM3_SM2CAPTCTRLB (IMXRT_FLEXPWM3.SM[2].CAPTCTRLB)
  3384. #define FLEXPWM3_SM2CAPTCOMPB (IMXRT_FLEXPWM3.SM[2].CAPTCOMPB)
  3385. #define FLEXPWM3_SM2CAPTCTRLX (IMXRT_FLEXPWM3.SM[2].CAPTCTRLX)
  3386. #define FLEXPWM3_SM2CAPTCOMPX (IMXRT_FLEXPWM3.SM[2].CAPTCOMPX)
  3387. #define FLEXPWM3_SM2CVAL0 (IMXRT_FLEXPWM3.SM[2].CVAL0)
  3388. #define FLEXPWM3_SM2CVAL0CYC (IMXRT_FLEXPWM3.SM[2].CVAL0CYC)
  3389. #define FLEXPWM3_SM2CVAL1 (IMXRT_FLEXPWM3.SM[2].CVAL1)
  3390. #define FLEXPWM3_SM2CVAL1CYC (IMXRT_FLEXPWM3.SM[2].CVAL1CYC)
  3391. #define FLEXPWM3_SM2CVAL2 (IMXRT_FLEXPWM3.SM[2].CVAL2)
  3392. #define FLEXPWM3_SM2CVAL2CYC (IMXRT_FLEXPWM3.SM[2].CVAL2CYC)
  3393. #define FLEXPWM3_SM2CVAL3 (IMXRT_FLEXPWM3.SM[2].CVAL3)
  3394. #define FLEXPWM3_SM2CVAL3CYC (IMXRT_FLEXPWM3.SM[2].CVAL3CYC)
  3395. #define FLEXPWM3_SM2CVAL4 (IMXRT_FLEXPWM3.SM[2].CVAL4)
  3396. #define FLEXPWM3_SM2CVAL4CYC (IMXRT_FLEXPWM3.SM[2].CVAL4CYC)
  3397. #define FLEXPWM3_SM2CVAL5 (IMXRT_FLEXPWM3.SM[2].CVAL5)
  3398. #define FLEXPWM3_SM2CVAL5CYC (IMXRT_FLEXPWM3.SM[2].CVAL5CYC)
  3399. #define FLEXPWM3_SM3CNT (IMXRT_FLEXPWM3.SM[3].CNT)
  3400. #define FLEXPWM3_SM3INIT (IMXRT_FLEXPWM3.SM[3].INIT)
  3401. #define FLEXPWM3_SM3CTRL2 (IMXRT_FLEXPWM3.SM[3].CTRL2)
  3402. #define FLEXPWM3_SM3CTRL (IMXRT_FLEXPWM3.SM[3].CTRL)
  3403. #define FLEXPWM3_SM3VAL0 (IMXRT_FLEXPWM3.SM[3].VAL0)
  3404. #define FLEXPWM3_SM3FRACVAL1 (IMXRT_FLEXPWM3.SM[3].FRACVAL1)
  3405. #define FLEXPWM3_SM3VAL1 (IMXRT_FLEXPWM3.SM[3].VAL1)
  3406. #define FLEXPWM3_SM3FRACVAL2 (IMXRT_FLEXPWM3.SM[3].FRACVAL2)
  3407. #define FLEXPWM3_SM3VAL2 (IMXRT_FLEXPWM3.SM[3].VAL2)
  3408. #define FLEXPWM3_SM3FRACVAL3 (IMXRT_FLEXPWM3.SM[3].FRACVAL3)
  3409. #define FLEXPWM3_SM3VAL3 (IMXRT_FLEXPWM3.SM[3].VAL3)
  3410. #define FLEXPWM3_SM3FRACVAL4 (IMXRT_FLEXPWM3.SM[3].FRACVAL4)
  3411. #define FLEXPWM3_SM3VAL4 (IMXRT_FLEXPWM3.SM[3].VAL4)
  3412. #define FLEXPWM3_SM3FRACVAL5 (IMXRT_FLEXPWM3.SM[3].FRACVAL5)
  3413. #define FLEXPWM3_SM3VAL5 (IMXRT_FLEXPWM3.SM[3].VAL5)
  3414. #define FLEXPWM3_SM3FRCTRL (IMXRT_FLEXPWM3.SM[3].FRCTRL)
  3415. #define FLEXPWM3_SM3OCTRL (IMXRT_FLEXPWM3.SM[3].OCTRL)
  3416. #define FLEXPWM3_SM3STS (IMXRT_FLEXPWM3.SM[3].STS)
  3417. #define FLEXPWM3_SM3INTEN (IMXRT_FLEXPWM3.SM[3].INTEN)
  3418. #define FLEXPWM3_SM3DMAEN (IMXRT_FLEXPWM3.SM[3].DMAEN)
  3419. #define FLEXPWM3_SM3TCTRL (IMXRT_FLEXPWM3.SM[3].TCTRL)
  3420. #define FLEXPWM3_SM3DISMAP0 (IMXRT_FLEXPWM3.SM[3].DISMAP0)
  3421. #define FLEXPWM3_SM3DISMAP1 (IMXRT_FLEXPWM3.SM[3].DISMAP1)
  3422. #define FLEXPWM3_SM3DTCNT0 (IMXRT_FLEXPWM3.SM[3].DTCNT0)
  3423. #define FLEXPWM3_SM3DTCNT1 (IMXRT_FLEXPWM3.SM[3].DTCNT1)
  3424. #define FLEXPWM3_SM3CAPTCTRLA (IMXRT_FLEXPWM3.SM[3].CAPTCTRLA)
  3425. #define FLEXPWM3_SM3CAPTCOMPA (IMXRT_FLEXPWM3.SM[3].CAPTCOMPA)
  3426. #define FLEXPWM3_SM3CAPTCTRLB (IMXRT_FLEXPWM3.SM[3].CAPTCTRLB)
  3427. #define FLEXPWM3_SM3CAPTCOMPB (IMXRT_FLEXPWM3.SM[3].CAPTCOMPB)
  3428. #define FLEXPWM3_SM3CAPTCTRLX (IMXRT_FLEXPWM3.SM[3].CAPTCTRLX)
  3429. #define FLEXPWM3_SM3CAPTCOMPX (IMXRT_FLEXPWM3.SM[3].CAPTCOMPX)
  3430. #define FLEXPWM3_SM3CVAL0 (IMXRT_FLEXPWM3.SM[3].CVAL0)
  3431. #define FLEXPWM3_SM3CVAL0CYC (IMXRT_FLEXPWM3.SM[3].CVAL0CYC)
  3432. #define FLEXPWM3_SM3CVAL1 (IMXRT_FLEXPWM3.SM[3].CVAL1)
  3433. #define FLEXPWM3_SM3CVAL1CYC (IMXRT_FLEXPWM3.SM[3].CVAL1CYC)
  3434. #define FLEXPWM3_SM3CVAL2 (IMXRT_FLEXPWM3.SM[3].CVAL2)
  3435. #define FLEXPWM3_SM3CVAL2CYC (IMXRT_FLEXPWM3.SM[3].CVAL2CYC)
  3436. #define FLEXPWM3_SM3CVAL3 (IMXRT_FLEXPWM3.SM[3].CVAL3)
  3437. #define FLEXPWM3_SM3CVAL3CYC (IMXRT_FLEXPWM3.SM[3].CVAL3CYC)
  3438. #define FLEXPWM3_SM3CVAL4 (IMXRT_FLEXPWM3.SM[3].CVAL4)
  3439. #define FLEXPWM3_SM3CVAL4CYC (IMXRT_FLEXPWM3.SM[3].CVAL4CYC)
  3440. #define FLEXPWM3_SM3CVAL5 (IMXRT_FLEXPWM3.SM[3].CVAL5)
  3441. #define FLEXPWM3_SM3CVAL5CYC (IMXRT_FLEXPWM3.SM[3].CVAL5CYC)
  3442. #define FLEXPWM3_OUTEN (IMXRT_FLEXPWM3.OUTEN)
  3443. #define FLEXPWM3_MASK (IMXRT_FLEXPWM3.MASK)
  3444. #define FLEXPWM3_SWCOUT (IMXRT_FLEXPWM3.SWCOUT)
  3445. #define FLEXPWM3_DTSRCSEL (IMXRT_FLEXPWM3.DTSRCSEL)
  3446. #define FLEXPWM3_MCTRL (IMXRT_FLEXPWM3.MCTRL)
  3447. #define FLEXPWM3_MCTRL2 (IMXRT_FLEXPWM3.MCTRL2)
  3448. #define FLEXPWM3_FCTRL0 (IMXRT_FLEXPWM3.FCTRL0)
  3449. #define FLEXPWM3_FSTS0 (IMXRT_FLEXPWM3.FSTS0)
  3450. #define FLEXPWM3_FFILT0 (IMXRT_FLEXPWM3.FFILT0)
  3451. #define FLEXPWM3_FTST0 (IMXRT_FLEXPWM3.FTST0)
  3452. #define FLEXPWM3_FCTRL20 (IMXRT_FLEXPWM3.FCTRL20)
  3453. #define FLEXPWM4_SM0CNT (IMXRT_FLEXPWM4.SM[0].CNT)
  3454. #define FLEXPWM4_SM0INIT (IMXRT_FLEXPWM4.SM[0].INIT)
  3455. #define FLEXPWM4_SM0CTRL2 (IMXRT_FLEXPWM4.SM[0].CTRL2)
  3456. #define FLEXPWM4_SM0CTRL (IMXRT_FLEXPWM4.SM[0].CTRL)
  3457. #define FLEXPWM4_SM0VAL0 (IMXRT_FLEXPWM4.SM[0].VAL0)
  3458. #define FLEXPWM4_SM0FRACVAL1 (IMXRT_FLEXPWM4.SM[0].FRACVAL1)
  3459. #define FLEXPWM4_SM0VAL1 (IMXRT_FLEXPWM4.SM[0].VAL1)
  3460. #define FLEXPWM4_SM0FRACVAL2 (IMXRT_FLEXPWM4.SM[0].FRACVAL2)
  3461. #define FLEXPWM4_SM0VAL2 (IMXRT_FLEXPWM4.SM[0].VAL2)
  3462. #define FLEXPWM4_SM0FRACVAL3 (IMXRT_FLEXPWM4.SM[0].FRACVAL3)
  3463. #define FLEXPWM4_SM0VAL3 (IMXRT_FLEXPWM4.SM[0].VAL3)
  3464. #define FLEXPWM4_SM0FRACVAL4 (IMXRT_FLEXPWM4.SM[0].FRACVAL4)
  3465. #define FLEXPWM4_SM0VAL4 (IMXRT_FLEXPWM4.SM[0].VAL4)
  3466. #define FLEXPWM4_SM0FRACVAL5 (IMXRT_FLEXPWM4.SM[0].FRACVAL5)
  3467. #define FLEXPWM4_SM0VAL5 (IMXRT_FLEXPWM4.SM[0].VAL5)
  3468. #define FLEXPWM4_SM0FRCTRL (IMXRT_FLEXPWM4.SM[0].FRCTRL)
  3469. #define FLEXPWM4_SM0OCTRL (IMXRT_FLEXPWM4.SM[0].OCTRL)
  3470. #define FLEXPWM4_SM0STS (IMXRT_FLEXPWM4.SM[0].STS)
  3471. #define FLEXPWM4_SM0INTEN (IMXRT_FLEXPWM4.SM[0].INTEN)
  3472. #define FLEXPWM4_SM0DMAEN (IMXRT_FLEXPWM4.SM[0].DMAEN)
  3473. #define FLEXPWM4_SM0TCTRL (IMXRT_FLEXPWM4.SM[0].TCTRL)
  3474. #define FLEXPWM4_SM0DISMAP0 (IMXRT_FLEXPWM4.SM[0].DISMAP0)
  3475. #define FLEXPWM4_SM0DISMAP1 (IMXRT_FLEXPWM4.SM[0].DISMAP1)
  3476. #define FLEXPWM4_SM0DTCNT0 (IMXRT_FLEXPWM4.SM[0].DTCNT0)
  3477. #define FLEXPWM4_SM0DTCNT1 (IMXRT_FLEXPWM4.SM[0].DTCNT1)
  3478. #define FLEXPWM4_SM0CAPTCTRLA (IMXRT_FLEXPWM4.SM[0].CAPTCTRLA)
  3479. #define FLEXPWM4_SM0CAPTCOMPA (IMXRT_FLEXPWM4.SM[0].CAPTCOMPA)
  3480. #define FLEXPWM4_SM0CAPTCTRLB (IMXRT_FLEXPWM4.SM[0].CAPTCTRLB)
  3481. #define FLEXPWM4_SM0CAPTCOMPB (IMXRT_FLEXPWM4.SM[0].CAPTCOMPB)
  3482. #define FLEXPWM4_SM0CAPTCTRLX (IMXRT_FLEXPWM4.SM[0].CAPTCTRLX)
  3483. #define FLEXPWM4_SM0CAPTCOMPX (IMXRT_FLEXPWM4.SM[0].CAPTCOMPX)
  3484. #define FLEXPWM4_SM0CVAL0 (IMXRT_FLEXPWM4.SM[0].CVAL0)
  3485. #define FLEXPWM4_SM0CVAL0CYC (IMXRT_FLEXPWM4.SM[0].CVAL0CYC)
  3486. #define FLEXPWM4_SM0CVAL1 (IMXRT_FLEXPWM4.SM[0].CVAL1)
  3487. #define FLEXPWM4_SM0CVAL1CYC (IMXRT_FLEXPWM4.SM[0].CVAL1CYC)
  3488. #define FLEXPWM4_SM0CVAL2 (IMXRT_FLEXPWM4.SM[0].CVAL2)
  3489. #define FLEXPWM4_SM0CVAL2CYC (IMXRT_FLEXPWM4.SM[0].CVAL2CYC)
  3490. #define FLEXPWM4_SM0CVAL3 (IMXRT_FLEXPWM4.SM[0].CVAL3)
  3491. #define FLEXPWM4_SM0CVAL3CYC (IMXRT_FLEXPWM4.SM[0].CVAL3CYC)
  3492. #define FLEXPWM4_SM0CVAL4 (IMXRT_FLEXPWM4.SM[0].CVAL4)
  3493. #define FLEXPWM4_SM0CVAL4CYC (IMXRT_FLEXPWM4.SM[0].CVAL4CYC)
  3494. #define FLEXPWM4_SM0CVAL5 (IMXRT_FLEXPWM4.SM[0].CVAL5)
  3495. #define FLEXPWM4_SM0CVAL5CYC (IMXRT_FLEXPWM4.SM[0].CVAL5CYC)
  3496. #define FLEXPWM4_SM1CNT (IMXRT_FLEXPWM4.SM[1].CNT)
  3497. #define FLEXPWM4_SM1INIT (IMXRT_FLEXPWM4.SM[1].INIT)
  3498. #define FLEXPWM4_SM1CTRL2 (IMXRT_FLEXPWM4.SM[1].CTRL2)
  3499. #define FLEXPWM4_SM1CTRL (IMXRT_FLEXPWM4.SM[1].CTRL)
  3500. #define FLEXPWM4_SM1VAL0 (IMXRT_FLEXPWM4.SM[1].VAL0)
  3501. #define FLEXPWM4_SM1FRACVAL1 (IMXRT_FLEXPWM4.SM[1].FRACVAL1)
  3502. #define FLEXPWM4_SM1VAL1 (IMXRT_FLEXPWM4.SM[1].VAL1)
  3503. #define FLEXPWM4_SM1FRACVAL2 (IMXRT_FLEXPWM4.SM[1].FRACVAL2)
  3504. #define FLEXPWM4_SM1VAL2 (IMXRT_FLEXPWM4.SM[1].VAL2)
  3505. #define FLEXPWM4_SM1FRACVAL3 (IMXRT_FLEXPWM4.SM[1].FRACVAL3)
  3506. #define FLEXPWM4_SM1VAL3 (IMXRT_FLEXPWM4.SM[1].VAL3)
  3507. #define FLEXPWM4_SM1FRACVAL4 (IMXRT_FLEXPWM4.SM[1].FRACVAL4)
  3508. #define FLEXPWM4_SM1VAL4 (IMXRT_FLEXPWM4.SM[1].VAL4)
  3509. #define FLEXPWM4_SM1FRACVAL5 (IMXRT_FLEXPWM4.SM[1].FRACVAL5)
  3510. #define FLEXPWM4_SM1VAL5 (IMXRT_FLEXPWM4.SM[1].VAL5)
  3511. #define FLEXPWM4_SM1FRCTRL (IMXRT_FLEXPWM4.SM[1].FRCTRL)
  3512. #define FLEXPWM4_SM1OCTRL (IMXRT_FLEXPWM4.SM[1].OCTRL)
  3513. #define FLEXPWM4_SM1STS (IMXRT_FLEXPWM4.SM[1].STS)
  3514. #define FLEXPWM4_SM1INTEN (IMXRT_FLEXPWM4.SM[1].INTEN)
  3515. #define FLEXPWM4_SM1DMAEN (IMXRT_FLEXPWM4.SM[1].DMAEN)
  3516. #define FLEXPWM4_SM1TCTRL (IMXRT_FLEXPWM4.SM[1].TCTRL)
  3517. #define FLEXPWM4_SM1DISMAP0 (IMXRT_FLEXPWM4.SM[1].DISMAP0)
  3518. #define FLEXPWM4_SM1DISMAP1 (IMXRT_FLEXPWM4.SM[1].DISMAP1)
  3519. #define FLEXPWM4_SM1DTCNT0 (IMXRT_FLEXPWM4.SM[1].DTCNT0)
  3520. #define FLEXPWM4_SM1DTCNT1 (IMXRT_FLEXPWM4.SM[1].DTCNT1)
  3521. #define FLEXPWM4_SM1CAPTCTRLA (IMXRT_FLEXPWM4.SM[1].CAPTCTRLA)
  3522. #define FLEXPWM4_SM1CAPTCOMPA (IMXRT_FLEXPWM4.SM[1].CAPTCOMPA)
  3523. #define FLEXPWM4_SM1CAPTCTRLB (IMXRT_FLEXPWM4.SM[1].CAPTCTRLB)
  3524. #define FLEXPWM4_SM1CAPTCOMPB (IMXRT_FLEXPWM4.SM[1].CAPTCOMPB)
  3525. #define FLEXPWM4_SM1CAPTCTRLX (IMXRT_FLEXPWM4.SM[1].CAPTCTRLX)
  3526. #define FLEXPWM4_SM1CAPTCOMPX (IMXRT_FLEXPWM4.SM[1].CAPTCOMPX)
  3527. #define FLEXPWM4_SM1CVAL0 (IMXRT_FLEXPWM4.SM[1].CVAL0)
  3528. #define FLEXPWM4_SM1CVAL0CYC (IMXRT_FLEXPWM4.SM[1].CVAL0CYC)
  3529. #define FLEXPWM4_SM1CVAL1 (IMXRT_FLEXPWM4.SM[1].CVAL1)
  3530. #define FLEXPWM4_SM1CVAL1CYC (IMXRT_FLEXPWM4.SM[1].CVAL1CYC)
  3531. #define FLEXPWM4_SM1CVAL2 (IMXRT_FLEXPWM4.SM[1].CVAL2)
  3532. #define FLEXPWM4_SM1CVAL2CYC (IMXRT_FLEXPWM4.SM[1].CVAL2CYC)
  3533. #define FLEXPWM4_SM1CVAL3 (IMXRT_FLEXPWM4.SM[1].CVAL3)
  3534. #define FLEXPWM4_SM1CVAL3CYC (IMXRT_FLEXPWM4.SM[1].CVAL3CYC)
  3535. #define FLEXPWM4_SM1CVAL4 (IMXRT_FLEXPWM4.SM[1].CVAL4)
  3536. #define FLEXPWM4_SM1CVAL4CYC (IMXRT_FLEXPWM4.SM[1].CVAL4CYC)
  3537. #define FLEXPWM4_SM1CVAL5 (IMXRT_FLEXPWM4.SM[1].CVAL5)
  3538. #define FLEXPWM4_SM1CVAL5CYC (IMXRT_FLEXPWM4.SM[1].CVAL5CYC)
  3539. #define FLEXPWM4_SM2CNT (IMXRT_FLEXPWM4.SM[2].CNT)
  3540. #define FLEXPWM4_SM2INIT (IMXRT_FLEXPWM4.SM[2].INIT)
  3541. #define FLEXPWM4_SM2CTRL2 (IMXRT_FLEXPWM4.SM[2].CTRL2)
  3542. #define FLEXPWM4_SM2CTRL (IMXRT_FLEXPWM4.SM[2].CTRL)
  3543. #define FLEXPWM4_SM2VAL0 (IMXRT_FLEXPWM4.SM[2].VAL0)
  3544. #define FLEXPWM4_SM2FRACVAL1 (IMXRT_FLEXPWM4.SM[2].FRACVAL1)
  3545. #define FLEXPWM4_SM2VAL1 (IMXRT_FLEXPWM4.SM[2].VAL1)
  3546. #define FLEXPWM4_SM2FRACVAL2 (IMXRT_FLEXPWM4.SM[2].FRACVAL2)
  3547. #define FLEXPWM4_SM2VAL2 (IMXRT_FLEXPWM4.SM[2].VAL2)
  3548. #define FLEXPWM4_SM2FRACVAL3 (IMXRT_FLEXPWM4.SM[2].FRACVAL3)
  3549. #define FLEXPWM4_SM2VAL3 (IMXRT_FLEXPWM4.SM[2].VAL3)
  3550. #define FLEXPWM4_SM2FRACVAL4 (IMXRT_FLEXPWM4.SM[2].FRACVAL4)
  3551. #define FLEXPWM4_SM2VAL4 (IMXRT_FLEXPWM4.SM[2].VAL4)
  3552. #define FLEXPWM4_SM2FRACVAL5 (IMXRT_FLEXPWM4.SM[2].FRACVAL5)
  3553. #define FLEXPWM4_SM2VAL5 (IMXRT_FLEXPWM4.SM[2].VAL5)
  3554. #define FLEXPWM4_SM2FRCTRL (IMXRT_FLEXPWM4.SM[2].FRCTRL)
  3555. #define FLEXPWM4_SM2OCTRL (IMXRT_FLEXPWM4.SM[2].OCTRL)
  3556. #define FLEXPWM4_SM2STS (IMXRT_FLEXPWM4.SM[2].STS)
  3557. #define FLEXPWM4_SM2INTEN (IMXRT_FLEXPWM4.SM[2].INTEN)
  3558. #define FLEXPWM4_SM2DMAEN (IMXRT_FLEXPWM4.SM[2].DMAEN)
  3559. #define FLEXPWM4_SM2TCTRL (IMXRT_FLEXPWM4.SM[2].TCTRL)
  3560. #define FLEXPWM4_SM2DISMAP0 (IMXRT_FLEXPWM4.SM[2].DISMAP0)
  3561. #define FLEXPWM4_SM2DISMAP1 (IMXRT_FLEXPWM4.SM[2].DISMAP1)
  3562. #define FLEXPWM4_SM2DTCNT0 (IMXRT_FLEXPWM4.SM[2].DTCNT0)
  3563. #define FLEXPWM4_SM2DTCNT1 (IMXRT_FLEXPWM4.SM[2].DTCNT1)
  3564. #define FLEXPWM4_SM2CAPTCTRLA (IMXRT_FLEXPWM4.SM[2].CAPTCTRLA)
  3565. #define FLEXPWM4_SM2CAPTCOMPA (IMXRT_FLEXPWM4.SM[2].CAPTCOMPA)
  3566. #define FLEXPWM4_SM2CAPTCTRLB (IMXRT_FLEXPWM4.SM[2].CAPTCTRLB)
  3567. #define FLEXPWM4_SM2CAPTCOMPB (IMXRT_FLEXPWM4.SM[2].CAPTCOMPB)
  3568. #define FLEXPWM4_SM2CAPTCTRLX (IMXRT_FLEXPWM4.SM[2].CAPTCTRLX)
  3569. #define FLEXPWM4_SM2CAPTCOMPX (IMXRT_FLEXPWM4.SM[2].CAPTCOMPX)
  3570. #define FLEXPWM4_SM2CVAL0 (IMXRT_FLEXPWM4.SM[2].CVAL0)
  3571. #define FLEXPWM4_SM2CVAL0CYC (IMXRT_FLEXPWM4.SM[2].CVAL0CYC)
  3572. #define FLEXPWM4_SM2CVAL1 (IMXRT_FLEXPWM4.SM[2].CVAL1)
  3573. #define FLEXPWM4_SM2CVAL1CYC (IMXRT_FLEXPWM4.SM[2].CVAL1CYC)
  3574. #define FLEXPWM4_SM2CVAL2 (IMXRT_FLEXPWM4.SM[2].CVAL2)
  3575. #define FLEXPWM4_SM2CVAL2CYC (IMXRT_FLEXPWM4.SM[2].CVAL2CYC)
  3576. #define FLEXPWM4_SM2CVAL3 (IMXRT_FLEXPWM4.SM[2].CVAL3)
  3577. #define FLEXPWM4_SM2CVAL3CYC (IMXRT_FLEXPWM4.SM[2].CVAL3CYC)
  3578. #define FLEXPWM4_SM2CVAL4 (IMXRT_FLEXPWM4.SM[2].CVAL4)
  3579. #define FLEXPWM4_SM2CVAL4CYC (IMXRT_FLEXPWM4.SM[2].CVAL4CYC)
  3580. #define FLEXPWM4_SM2CVAL5 (IMXRT_FLEXPWM4.SM[2].CVAL5)
  3581. #define FLEXPWM4_SM2CVAL5CYC (IMXRT_FLEXPWM4.SM[2].CVAL5CYC)
  3582. #define FLEXPWM4_SM3CNT (IMXRT_FLEXPWM4.SM[3].CNT)
  3583. #define FLEXPWM4_SM3INIT (IMXRT_FLEXPWM4.SM[3].INIT)
  3584. #define FLEXPWM4_SM3CTRL2 (IMXRT_FLEXPWM4.SM[3].CTRL2)
  3585. #define FLEXPWM4_SM3CTRL (IMXRT_FLEXPWM4.SM[3].CTRL)
  3586. #define FLEXPWM4_SM3VAL0 (IMXRT_FLEXPWM4.SM[3].VAL0)
  3587. #define FLEXPWM4_SM3FRACVAL1 (IMXRT_FLEXPWM4.SM[3].FRACVAL1)
  3588. #define FLEXPWM4_SM3VAL1 (IMXRT_FLEXPWM4.SM[3].VAL1)
  3589. #define FLEXPWM4_SM3FRACVAL2 (IMXRT_FLEXPWM4.SM[3].FRACVAL2)
  3590. #define FLEXPWM4_SM3VAL2 (IMXRT_FLEXPWM4.SM[3].VAL2)
  3591. #define FLEXPWM4_SM3FRACVAL3 (IMXRT_FLEXPWM4.SM[3].FRACVAL3)
  3592. #define FLEXPWM4_SM3VAL3 (IMXRT_FLEXPWM4.SM[3].VAL3)
  3593. #define FLEXPWM4_SM3FRACVAL4 (IMXRT_FLEXPWM4.SM[3].FRACVAL4)
  3594. #define FLEXPWM4_SM3VAL4 (IMXRT_FLEXPWM4.SM[3].VAL4)
  3595. #define FLEXPWM4_SM3FRACVAL5 (IMXRT_FLEXPWM4.SM[3].FRACVAL5)
  3596. #define FLEXPWM4_SM3VAL5 (IMXRT_FLEXPWM4.SM[3].VAL5)
  3597. #define FLEXPWM4_SM3FRCTRL (IMXRT_FLEXPWM4.SM[3].FRCTRL)
  3598. #define FLEXPWM4_SM3OCTRL (IMXRT_FLEXPWM4.SM[3].OCTRL)
  3599. #define FLEXPWM4_SM3STS (IMXRT_FLEXPWM4.SM[3].STS)
  3600. #define FLEXPWM4_SM3INTEN (IMXRT_FLEXPWM4.SM[3].INTEN)
  3601. #define FLEXPWM4_SM3DMAEN (IMXRT_FLEXPWM4.SM[3].DMAEN)
  3602. #define FLEXPWM4_SM3TCTRL (IMXRT_FLEXPWM4.SM[3].TCTRL)
  3603. #define FLEXPWM4_SM3DISMAP0 (IMXRT_FLEXPWM4.SM[3].DISMAP0)
  3604. #define FLEXPWM4_SM3DISMAP1 (IMXRT_FLEXPWM4.SM[3].DISMAP1)
  3605. #define FLEXPWM4_SM3DTCNT0 (IMXRT_FLEXPWM4.SM[3].DTCNT0)
  3606. #define FLEXPWM4_SM3DTCNT1 (IMXRT_FLEXPWM4.SM[3].DTCNT1)
  3607. #define FLEXPWM4_SM3CAPTCTRLA (IMXRT_FLEXPWM4.SM[3].CAPTCTRLA)
  3608. #define FLEXPWM4_SM3CAPTCOMPA (IMXRT_FLEXPWM4.SM[3].CAPTCOMPA)
  3609. #define FLEXPWM4_SM3CAPTCTRLB (IMXRT_FLEXPWM4.SM[3].CAPTCTRLB)
  3610. #define FLEXPWM4_SM3CAPTCOMPB (IMXRT_FLEXPWM4.SM[3].CAPTCOMPB)
  3611. #define FLEXPWM4_SM3CAPTCTRLX (IMXRT_FLEXPWM4.SM[3].CAPTCTRLX)
  3612. #define FLEXPWM4_SM3CAPTCOMPX (IMXRT_FLEXPWM4.SM[3].CAPTCOMPX)
  3613. #define FLEXPWM4_SM3CVAL0 (IMXRT_FLEXPWM4.SM[3].CVAL0)
  3614. #define FLEXPWM4_SM3CVAL0CYC (IMXRT_FLEXPWM4.SM[3].CVAL0CYC)
  3615. #define FLEXPWM4_SM3CVAL1 (IMXRT_FLEXPWM4.SM[3].CVAL1)
  3616. #define FLEXPWM4_SM3CVAL1CYC (IMXRT_FLEXPWM4.SM[3].CVAL1CYC)
  3617. #define FLEXPWM4_SM3CVAL2 (IMXRT_FLEXPWM4.SM[3].CVAL2)
  3618. #define FLEXPWM4_SM3CVAL2CYC (IMXRT_FLEXPWM4.SM[3].CVAL2CYC)
  3619. #define FLEXPWM4_SM3CVAL3 (IMXRT_FLEXPWM4.SM[3].CVAL3)
  3620. #define FLEXPWM4_SM3CVAL3CYC (IMXRT_FLEXPWM4.SM[3].CVAL3CYC)
  3621. #define FLEXPWM4_SM3CVAL4 (IMXRT_FLEXPWM4.SM[3].CVAL4)
  3622. #define FLEXPWM4_SM3CVAL4CYC (IMXRT_FLEXPWM4.SM[3].CVAL4CYC)
  3623. #define FLEXPWM4_SM3CVAL5 (IMXRT_FLEXPWM4.SM[3].CVAL5)
  3624. #define FLEXPWM4_SM3CVAL5CYC (IMXRT_FLEXPWM4.SM[3].CVAL5CYC)
  3625. #define FLEXPWM4_OUTEN (IMXRT_FLEXPWM4.OUTEN)
  3626. #define FLEXPWM4_MASK (IMXRT_FLEXPWM4.MASK)
  3627. #define FLEXPWM4_SWCOUT (IMXRT_FLEXPWM4.SWCOUT)
  3628. #define FLEXPWM4_DTSRCSEL (IMXRT_FLEXPWM4.DTSRCSEL)
  3629. #define FLEXPWM4_MCTRL (IMXRT_FLEXPWM4.MCTRL)
  3630. #define FLEXPWM4_MCTRL2 (IMXRT_FLEXPWM4.MCTRL2)
  3631. #define FLEXPWM4_FCTRL0 (IMXRT_FLEXPWM4.FCTRL0)
  3632. #define FLEXPWM4_FSTS0 (IMXRT_FLEXPWM4.FSTS0)
  3633. #define FLEXPWM4_FFILT0 (IMXRT_FLEXPWM4.FFILT0)
  3634. #define FLEXPWM4_FTST0 (IMXRT_FLEXPWM4.FTST0)
  3635. #define FLEXPWM4_FCTRL20 (IMXRT_FLEXPWM4.FCTRL20)
  3636. // page 1361
  3637. #define FLEXPWM_SMCTRL2_DBGEN ((uint16_t)(1<<15))
  3638. #define FLEXPWM_SMCTRL2_WAITEN ((uint16_t)(1<<14))
  3639. #define FLEXPWM_SMCTRL2_INDEP ((uint16_t)(1<<13))
  3640. #define FLEXPWM_SMCTRL2_PWM23_INIT ((uint16_t)(1<<12))
  3641. #define FLEXPWM_SMCTRL2_PWM45_INIT ((uint16_t)(1<<11))
  3642. #define FLEXPWM_SMCTRL2_PWMX_INIT ((uint16_t)(1<<10))
  3643. #define FLEXPWM_SMCTRL2_INIT_SEL(n) ((uint16_t)(((n) & 0x03) << 8))
  3644. #define FLEXPWM_SMCTRL2_FRCEN ((uint16_t)(1<<7))
  3645. #define FLEXPWM_SMCTRL2_FORCE ((uint16_t)(1<<6))
  3646. #define FLEXPWM_SMCTRL2_FORCE_SEL(n) ((uint16_t)(((n) & 0x07) << 3))
  3647. #define FLEXPWM_SMCTRL2_RELOAD_SEL ((uint16_t)(1<<2))
  3648. #define FLEXPWM_SMCTRL2_CLK_SEL(n) ((uint16_t)(((n) & 0x03) << 0))
  3649. #define FLEXPWM_SMCTRL_LDFQ(n) ((uint16_t)(((n) & 0x0F) << 12))
  3650. #define FLEXPWM_SMCTRL_HALF ((uint16_t)(1<<11))
  3651. #define FLEXPWM_SMCTRL_FULL ((uint16_t)(1<<10))
  3652. #define FLEXPWM_SMCTRL_DT(n) ((uint16_t)(((n) & 0x03) << 8))
  3653. #define FLEXPWM_SMCTRL_COMPMODE ((uint16_t)(1<<7))
  3654. #define FLEXPWM_SMCTRL_PRSC(n) ((uint16_t)(((n) & 0x0F) << 4))
  3655. #define FLEXPWM_SMCTRL_SPLIT ((uint16_t)(1<<3))
  3656. #define FLEXPWM_SMCTRL_LDMOD ((uint16_t)(1<<2))
  3657. #define FLEXPWM_SMCTRL_DBLX ((uint16_t)(1<<1))
  3658. #define FLEXPWM_SMCTRL_DBLEN ((uint16_t)(1<<0))
  3659. #define FLEXPWM_SMFRCTRL_TEST ((uint16_t)(1<<15))
  3660. #define FLEXPWM_SMFRCTRL_FRAC_PU ((uint16_t)(1<<8))
  3661. #define FLEXPWM_SMFRCTRL_FRAC45_EN ((uint16_t)(1<<4))
  3662. #define FLEXPWM_SMFRCTRL_FRAC23_EN ((uint16_t)(1<<2))
  3663. #define FLEXPWM_SMFRCTRL_FRAC1_EN ((uint16_t)(1<<1))
  3664. #define FLEXPWM_SMOCTRL_PWMA_IN ((uint16_t)(1<<15))
  3665. #define FLEXPWM_SMOCTRL_PWMB_IN ((uint16_t)(1<<14))
  3666. #define FLEXPWM_SMOCTRL_PWMX_IN ((uint16_t)(1<<13))
  3667. #define FLEXPWM_SMOCTRL_POLA ((uint16_t)(1<<10))
  3668. #define FLEXPWM_SMOCTRL_POLB ((uint16_t)(1<<9))
  3669. #define FLEXPWM_SMOCTRL_POLX ((uint16_t)(1<<8))
  3670. #define FLEXPWM_SMOCTRL_PWMAFS(n) ((uint16_t)(((n) & 0x03) << 4))
  3671. #define FLEXPWM_SMOCTRL_PWMBFS(n) ((uint16_t)(((n) & 0x03) << 2))
  3672. #define FLEXPWM_SMOCTRL_PWMXFS(n) ((uint16_t)(((n) & 0x03) << 0))
  3673. #define FLEXPWM_SMSTS_RUF ((uint16_t)(1<<14))
  3674. #define FLEXPWM_SMSTS_REF ((uint16_t)(1<<13))
  3675. #define FLEXPWM_SMSTS_RF ((uint16_t)(1<<12))
  3676. #define FLEXPWM_SMSTS_CFA1 ((uint16_t)(1<<11))
  3677. #define FLEXPWM_SMSTS_CFA0 ((uint16_t)(1<<10))
  3678. #define FLEXPWM_SMSTS_CFB1 ((uint16_t)(1<<9))
  3679. #define FLEXPWM_SMSTS_CFB0 ((uint16_t)(1<<8))
  3680. #define FLEXPWM_SMSTS_CFX1 ((uint16_t)(1<<7))
  3681. #define FLEXPWM_SMSTS_CFX0 ((uint16_t)(1<<6))
  3682. #define FLEXPWM_SMSTS_CMPF(n) ((uint16_t)(((n) & 0x3F) << 0))
  3683. #define FLEXPWM_SMINTEN_REIE ((uint16_t)(1<<13))
  3684. #define FLEXPWM_SMINTEN_RIE ((uint16_t)(1<<12))
  3685. #define FLEXPWM_SMINTEN_CA1IE ((uint16_t)(1<<11))
  3686. #define FLEXPWM_SMINTEN_CA0IE ((uint16_t)(1<<10))
  3687. #define FLEXPWM_SMINTEN_CB1IE ((uint16_t)(1<<9))
  3688. #define FLEXPWM_SMINTEN_CB0IE ((uint16_t)(1<<8))
  3689. #define FLEXPWM_SMINTEN_CX1IE ((uint16_t)(1<<7))
  3690. #define FLEXPWM_SMINTEN_CX0IE ((uint16_t)(1<<6))
  3691. #define FLEXPWM_SMINTEN_CMPIE(n) ((uint16_t)(((n) & 0x3F) << 0))
  3692. #define FLEXPWM_SMDMAEN_VALDE ((uint16_t)(1<<9))
  3693. #define FLEXPWM_SMDMAEN_FAND ((uint16_t)(1<<8))
  3694. #define FLEXPWM_SMDMAEN_CAPTDE(n) ((uint16_t)(((n) & 0x03) << 6))
  3695. #define FLEXPWM_SMDMAEN_CA1DE ((uint16_t)(1<<5))
  3696. #define FLEXPWM_SMDMAEN_CA0DE ((uint16_t)(1<<4))
  3697. #define FLEXPWM_SMDMAEN_CB1DE ((uint16_t)(1<<3))
  3698. #define FLEXPWM_SMDMAEN_CB0DE ((uint16_t)(1<<2))
  3699. #define FLEXPWM_SMDMAEN_CX1DE ((uint16_t)(1<<1))
  3700. #define FLEXPWM_SMDMAEN_CX0DE ((uint16_t)(1<<0))
  3701. #define FLEXPWM_SMTCTRL_PWAOT0 ((uint16_t)(1<<15))
  3702. #define FLEXPWM_SMTCTRL_PWBOT1 ((uint16_t)(1<<14))
  3703. #define FLEXPWM_SMTCTRL_TRGFRQ ((uint16_t)(1<<12))
  3704. #define FLEXPWM_SMTCTRL_OUT_TRIG_EN(n) ((uint16_t)(((n) & 0x1F) << 0))
  3705. #define FLEXPWM_SMDISMAP0_DIS0X(n) ((uint16_t)(((n) & 0x0F) << 8))
  3706. #define FLEXPWM_SMDISMAP0_DIS0B(n) ((uint16_t)(((n) & 0x0F) << 4))
  3707. #define FLEXPWM_SMDISMAP0_DIS0A(n) ((uint16_t)(((n) & 0x0F) << 0))
  3708. #define FLEXPWM_SMDISMAP1_DIS1X(n) ((uint16_t)(((n) & 0x0F) << 8))
  3709. #define FLEXPWM_SMDISMAP1_DIS1B(n) ((uint16_t)(((n) & 0x0F) << 4))
  3710. #define FLEXPWM_SMDISMAP1_DIS1A(n) ((uint16_t)(((n) & 0x0F) << 0))
  3711. #define FLEXPWM_SMCAPTCTRLA_CA1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  3712. #define FLEXPWM_SMCAPTCTRLA_CA0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  3713. #define FLEXPWM_SMCAPTCTRLA_CFAWM(n) ((uint16_t)(((n) & 0x03) << 8))
  3714. #define FLEXPWM_SMCAPTCTRLA_EDGCNTA_EN ((uint16_t)(1<<7))
  3715. #define FLEXPWM_SMCAPTCTRLA_INP_SELA ((uint16_t)(1<<6))
  3716. #define FLEXPWM_SMCAPTCTRLA_EDGA1(n) ((uint16_t)(((n) & 0x03) << 4))
  3717. #define FLEXPWM_SMCAPTCTRLA_EDGA0(n) ((uint16_t)(((n) & 0x03) << 2))
  3718. #define FLEXPWM_SMCAPTCTRLA_ONESHOTA ((uint16_t)(1<<1))
  3719. #define FLEXPWM_SMCAPTCTRLA_ARMA ((uint16_t)(1<<0))
  3720. #define FLEXPWM_SMCAPTCOMPA_EDGCNTA(n) ((uint16_t)(((n) & 0xFF) << 8))
  3721. #define FLEXPWM_SMCAPTCOMPA_EDGCMPA(n) ((uint16_t)(((n) & 0xFF) << 0))
  3722. #define FLEXPWM_SMCAPTCTRLB_CB1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  3723. #define FLEXPWM_SMCAPTCTRLB_CB0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  3724. #define FLEXPWM_SMCAPTCTRLB_CFBWM(n) ((uint16_t)(((n) & 0x03) << 8))
  3725. #define FLEXPWM_SMCAPTCTRLB_EDGCNTB_EN ((uint16_t)(1<<7))
  3726. #define FLEXPWM_SMCAPTCTRLB_INP_SELB ((uint16_t)(1<<6))
  3727. #define FLEXPWM_SMCAPTCTRLB_EDGB1(n) ((uint16_t)(((n) & 0x03) << 4))
  3728. #define FLEXPWM_SMCAPTCTRLB_EDGB0(n) ((uint16_t)(((n) & 0x03) << 2))
  3729. #define FLEXPWM_SMCAPTCTRLB_ONESHOTB ((uint16_t)(1<<1))
  3730. #define FLEXPWM_SMCAPTCTRLB_ARMB ((uint16_t)(1<<0))
  3731. #define FLEXPWM_SMCAPTCOMPB_EDGCNTB(n) ((uint16_t)(((n) & 0xFF) << 8))
  3732. #define FLEXPWM_SMCAPTCOMPB_EDGCMPB(n) ((uint16_t)(((n) & 0xFF) << 0))
  3733. #define FLEXPWM_SMCAPTCTRLX_CX1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  3734. #define FLEXPWM_SMCAPTCTRLX_CX0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  3735. #define FLEXPWM_SMCAPTCTRLX_CFXWM(n) ((uint16_t)(((n) & 0x03) << 8))
  3736. #define FLEXPWM_SMCAPTCTRLX_EDGCNTX_EN ((uint16_t)(1<<7))
  3737. #define FLEXPWM_SMCAPTCTRLX_INP_SELX ((uint16_t)(1<<6))
  3738. #define FLEXPWM_SMCAPTCTRLX_EDGX1(n) ((uint16_t)(((n) & 0x03) << 4))
  3739. #define FLEXPWM_SMCAPTCTRLX_EDGX0(n) ((uint16_t)(((n) & 0x03) << 2))
  3740. #define FLEXPWM_SMCAPTCTRLX_ONESHOTX ((uint16_t)(1<<1))
  3741. #define FLEXPWM_SMCAPTCTRLX_ARMX ((uint16_t)(1<<0))
  3742. #define FLEXPWM_SMCAPTCOMPX_EDGCNTX(n) ((uint16_t)(((n) & 0xFF) << 8))
  3743. #define FLEXPWM_SMCAPTCOMPX_EDGCMPX(n) ((uint16_t)(((n) & 0xFF) << 0))
  3744. #define FLEXPWM_OUTEN_PWMA_EN(n) ((uint16_t)(((n) & 0x0F) << 8))
  3745. #define FLEXPWM_OUTEN_PWMB_EN(n) ((uint16_t)(((n) & 0x0F) << 4))
  3746. #define FLEXPWM_OUTEN_PWMX_EN(n) ((uint16_t)(((n) & 0x0F) << 0))
  3747. #define FLEXPWM_MASK_UPDATE_MASK(n) ((uint16_t)(((n) & 0x0F) << 12))
  3748. #define FLEXPWM_MASK_MASKA(n) ((uint16_t)(((n) & 0x0F) << 8))
  3749. #define FLEXPWM_MASK_MASKB(n) ((uint16_t)(((n) & 0x0F) << 4))
  3750. #define FLEXPWM_MASK_MASKX(n) ((uint16_t)(((n) & 0x0F) << 0))
  3751. #define FLEXPWM_SWCOUT_SM3OUT23 ((uint16_t)(1<<7))
  3752. #define FLEXPWM_SWCOUT_SM3OUT45 ((uint16_t)(1<<6))
  3753. #define FLEXPWM_SWCOUT_SM2OUT23 ((uint16_t)(1<<5))
  3754. #define FLEXPWM_SWCOUT_SM2OUT45 ((uint16_t)(1<<4))
  3755. #define FLEXPWM_SWCOUT_SM1OUT23 ((uint16_t)(1<<3))
  3756. #define FLEXPWM_SWCOUT_SM1OUT45 ((uint16_t)(1<<2))
  3757. #define FLEXPWM_SWCOUT_SM0OUT23 ((uint16_t)(1<<1))
  3758. #define FLEXPWM_SWCOUT_SM0OUT45 ((uint16_t)(1<<0))
  3759. #define FLEXPWM_DTSRCSEL_SM3SEL23(n) ((uint16_t)(((n) & 0x03) << 14))
  3760. #define FLEXPWM_DTSRCSEL_SM3SEL45(n) ((uint16_t)(((n) & 0x03) << 12))
  3761. #define FLEXPWM_DTSRCSEL_SM2SEL23(n) ((uint16_t)(((n) & 0x03) << 10))
  3762. #define FLEXPWM_DTSRCSEL_SM2SEL45(n) ((uint16_t)(((n) & 0x03) << 8))
  3763. #define FLEXPWM_DTSRCSEL_SM1SEL23(n) ((uint16_t)(((n) & 0x03) << 6))
  3764. #define FLEXPWM_DTSRCSEL_SM1SEL45(n) ((uint16_t)(((n) & 0x03) << 4))
  3765. #define FLEXPWM_DTSRCSEL_SM0SEL23(n) ((uint16_t)(((n) & 0x03) << 2))
  3766. #define FLEXPWM_DTSRCSEL_SM0SEL45(n) ((uint16_t)(((n) & 0x03) << 0))
  3767. #define FLEXPWM_MCTRL_IPOL(n) ((uint16_t)(((n) & 0x0F) << 12))
  3768. #define FLEXPWM_MCTRL_RUN(n) ((uint16_t)(((n) & 0x0F) << 8))
  3769. #define FLEXPWM_MCTRL_CLDOK(n) ((uint16_t)(((n) & 0x0F) << 4))
  3770. #define FLEXPWM_MCTRL_LDOK(n) ((uint16_t)(((n) & 0x0F) << 0))
  3771. #define FLEXPWM_MCTRL2_MONPLL(n) ((uint16_t)(((n) & 0x03) << 0))
  3772. #define FLEXPWM_FCTRL0_FLVL(n) ((uint16_t)(((n) & 0x0F) << 12))
  3773. #define FLEXPWM_FCTRL0_FAUTO(n) ((uint16_t)(((n) & 0x0F) << 8))
  3774. #define FLEXPWM_FCTRL0_FSAFE(n) ((uint16_t)(((n) & 0x0F) << 4))
  3775. #define FLEXPWM_FCTRL0_FIE(n) ((uint16_t)(((n) & 0x0F) << 0))
  3776. #define FLEXPWM_FSTS0_FHALF(n) ((uint16_t)(((n) & 0x0F) << 12))
  3777. #define FLEXPWM_FSTS0_FFPIN(n) ((uint16_t)(((n) & 0x0F) << 8))
  3778. #define FLEXPWM_FSTS0_FFULL(n) ((uint16_t)(((n) & 0x0F) << 4))
  3779. #define FLEXPWM_FSTS0_FFLAG(n) ((uint16_t)(((n) & 0x0F) << 0))
  3780. #define FLEXPWM_FFILT0_GSTR ((uint16_t)(1<<15))
  3781. #define FLEXPWM_FFILT0_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  3782. #define FLEXPWM_FFILT0_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  3783. #define FLEXPWM_FTST0_FTEST ((uint16_t)(1<<0))
  3784. #define FLEXPWM_FCTRL20_NOCOMB(n) ((uint16_t)(((n) & 0x0F) << 0))
  3785. // 29.3.1.1: page 1468
  3786. #define IMXRT_FLEXRAM (*(IMXRT_REGISTER32_t *)0x400B0000)
  3787. #define FLEXRAM_TCM_CTRL (IMXRT_FLEXRAM.offset000)
  3788. #define FLEXRAM_INT_STATUS (IMXRT_FLEXRAM.offset010)
  3789. #define FLEXRAM_INT_STAT_EN (IMXRT_FLEXRAM.offset014)
  3790. #define FLEXRAM_INT_SIG_EN (IMXRT_FLEXRAM.offset018)
  3791. #define FLEXRAM_TCM_CTRL_FORCE_CLK_ON ((uint32_t)(1<<2))
  3792. #define FLEXRAM_TCM_CTRL_TCM_RWAIT_EN ((uint32_t)(1<<1))
  3793. #define FLEXRAM_TCM_CTRL_TCM_WWAIT_EN ((uint32_t)(1<<0))
  3794. #define FLEXRAM_INT_STATUS_OCRAM_ERR_STATUS ((uint32_t)(1<<5))
  3795. #define FLEXRAM_INT_STATUS_DTCM_ERR_STATUS ((uint32_t)(1<<4))
  3796. #define FLEXRAM_INT_STATUS_ITCM_ERR_STATUS ((uint32_t)(1<<3))
  3797. #define FLEXRAM_INT_STAT_EN_OCRAM_ERR_STAT_EN ((uint32_t)(1<<5))
  3798. #define FLEXRAM_INT_STAT_EN_DTCM_ERR_STAT_EN ((uint32_t)(1<<4))
  3799. #define FLEXRAM_INT_STAT_EN_ITCM_ERR_STAT_EN ((uint32_t)(1<<3))
  3800. #define FLEXRAM_INT_SIG_EN_OCRAM_ERR_SIG_EN ((uint32_t)(1<<5))
  3801. #define FLEXRAM_INT_SIG_EN_DTCM_ERR_SIG_EN ((uint32_t)(1<<4))
  3802. #define FLEXRAM_INT_SIG_EN_ITCM_ERR_SIG_EN ((uint32_t)(1<<3))
  3803. // 30.5.2.1: page 1481
  3804. #define IMXRT_FLEXSPI (*(IMXRT_REGISTER32_t *)0x402A8000)
  3805. #define FLEXSPI_MCR0 (IMXRT_FLEXSPI.offset000)
  3806. #define FLEXSPI_MCR0_AHBGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  3807. #define FLEXSPI_MCR0_AHBGRANTWAIT_MASK ((uint32_t)(0xFF << 24))
  3808. #define FLEXSPI_MCR0_IPGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 16))
  3809. #define FLEXSPI_MCR0_IPGRANTWAIT_MASK ((uint32_t)(0xFF << 16))
  3810. #define FLEXSPI_MCR0_SCKFREERUNEN ((uint32_t)(1<<14))
  3811. #define FLEXSPI_MCR0_COMBINATIONEN ((uint32_t)(1<<13))
  3812. #define FLEXSPI_MCR0_DOZEEN ((uint32_t)(1<<12))
  3813. #define FLEXSPI_MCR0_HSEN ((uint32_t)(1<<11))
  3814. #define FLEXSPI_MCR0_ATDFEN ((uint32_t)(1<<7))
  3815. #define FLEXSPI_MCR0_ARDFEN ((uint32_t)(1<<6))
  3816. #define FLEXSPI_MCR0_RXCLKSRC(n) ((uint32_t)(((n) & 0x03) << 4))
  3817. #define FLEXSPI_MCR0_RXCLKSRC_MASK ((uint32_t)(0x03 << 4))
  3818. #define FLEXSPI_MCR0_MDIS ((uint32_t)(1<<1))
  3819. #define FLEXSPI_MCR0_SWRESET ((uint32_t)(1<<0))
  3820. #define FLEXSPI_MCR1 (IMXRT_FLEXSPI.offset004)
  3821. #define FLEXSPI_MCR1_SEQWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  3822. #define FLEXSPI_MCR1_AHBBUSWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  3823. #define FLEXSPI_MCR2 (IMXRT_FLEXSPI.offset008)
  3824. #define FLEXSPI_MCR2_RESUMEWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  3825. #define FLEXSPI_MCR2_RESUMEWAIT_MASK ((uint32_t)(0xFF << 24))
  3826. #define FLEXSPI_MCR2_SCKBDIFFOPT ((uint32_t)(1<<19))
  3827. #define FLEXSPI_MCR2_SAMEDEVICEEN ((uint32_t)(1<<15))
  3828. #define FLEXSPI_MCR2_CLRLEARNPHASE ((uint32_t)(1<<14))
  3829. #define FLEXSPI_MCR2_CLRAHBBUFOPT ((uint32_t)(1<<11))
  3830. #define FLEXSPI_AHBCR (IMXRT_FLEXSPI.offset00C)
  3831. #define FLEXSPI_AHBCR_READADDROPT ((uint32_t)(1<<6))
  3832. #define FLEXSPI_AHBCR_PREFETCHEN ((uint32_t)(1<<5))
  3833. #define FLEXSPI_AHBCR_BUFFERABLEEN ((uint32_t)(1<<4))
  3834. #define FLEXSPI_AHBCR_CACHABLEEN ((uint32_t)(1<<3))
  3835. #define FLEXSPI_AHBCR_APAREN ((uint32_t)(1<<0))
  3836. #define FLEXSPI_INTEN (IMXRT_FLEXSPI.offset010)
  3837. #define FLEXSPI_INTEN_SEQTIMEOUTEN ((uint32_t)(1<<11))
  3838. #define FLEXSPI_INTEN_AHBBUSTIMEOUTEN ((uint32_t)(1<<10))
  3839. #define FLEXSPI_INTEN_SCKSTOPBYWREN ((uint32_t)(1<<9))
  3840. #define FLEXSPI_INTEN_SCKSTOPBYRDEN ((uint32_t)(1<<8))
  3841. #define FLEXSPI_INTEN_IPTXWEEN ((uint32_t)(1<<6))
  3842. #define FLEXSPI_INTEN_IPRXWAEN ((uint32_t)(1<<5))
  3843. #define FLEXSPI_INTEN_AHBCMDERREN ((uint32_t)(1<<4))
  3844. #define FLEXSPI_INTEN_IPCMDERREN ((uint32_t)(1<<3))
  3845. #define FLEXSPI_INTEN_AHBCMDGEEN ((uint32_t)(1<<2))
  3846. #define FLEXSPI_INTEN_IPCMDGEEN ((uint32_t)(1<<1))
  3847. #define FLEXSPI_INTEN_IPCMDDONEEN ((uint32_t)(1<<0))
  3848. #define FLEXSPI_INTR (IMXRT_FLEXSPI.offset014)
  3849. #define FLEXSPI_INTR_SEQTIMEOUT ((uint32_t)(1<<11))
  3850. #define FLEXSPI_INTR_AHBBUSTIMEOUT ((uint32_t)(1<<10))
  3851. #define FLEXSPI_INTR_SCKSTOPBYWR ((uint32_t)(1<<9))
  3852. #define FLEXSPI_INTR_SCKSTOPBYRD ((uint32_t)(1<<8))
  3853. #define FLEXSPI_INTR_IPTXWE ((uint32_t)(1<<6))
  3854. #define FLEXSPI_INTR_IPRXWA ((uint32_t)(1<<5))
  3855. #define FLEXSPI_INTR_AHBCMDERR ((uint32_t)(1<<4))
  3856. #define FLEXSPI_INTR_IPCMDERR ((uint32_t)(1<<3))
  3857. #define FLEXSPI_INTR_AHBCMDGE ((uint32_t)(1<<2))
  3858. #define FLEXSPI_INTR_IPCMDGE ((uint32_t)(1<<1))
  3859. #define FLEXSPI_INTR_IPCMDDONE ((uint32_t)(1<<0))
  3860. #define FLEXSPI_LUTKEY (IMXRT_FLEXSPI.offset018)
  3861. #define FLEXSPI_LUTKEY_VALUE ((uint32_t)0x5AF05AF0)
  3862. #define FLEXSPI_LUTCR (IMXRT_FLEXSPI.offset01C)
  3863. #define FLEXSPI_LUTCR_UNLOCK ((uint32_t)(1<<1))
  3864. #define FLEXSPI_LUTCR_LOCK ((uint32_t)(1<<0))
  3865. #define FLEXSPI_AHBRXBUF0CR0 (IMXRT_FLEXSPI.offset020)
  3866. #define FLEXSPI_AHBRXBUF1CR0 (IMXRT_FLEXSPI.offset024)
  3867. #define FLEXSPI_AHBRXBUF2CR0 (IMXRT_FLEXSPI.offset028)
  3868. #define FLEXSPI_AHBRXBUF3CR0 (IMXRT_FLEXSPI.offset02C)
  3869. #define FLEXSPI_AHBRXBUFCR0_PREFETCHEN ((uint32_t)(1<<31))
  3870. #define FLEXSPI_AHBRXBUFCR0_PRIORITY(n) ((uint32_t)(((n) & 0x03) << 24))
  3871. #define FLEXSPI_AHBRXBUFCR0_PRIORITY_MASK ((uint32_t)((0x03) << 24))
  3872. #define FLEXSPI_AHBRXBUFCR0_MSTRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  3873. #define FLEXSPI_AHBRXBUFCR0_MSTRID_MASK ((uint32_t)((0x0F) << 16))
  3874. #define FLEXSPI_AHBRXBUFCR0_BUFSZ(n) ((uint32_t)(((n) & 0xFF) << 0))
  3875. #define FLEXSPI_AHBRXBUFCR0_BUFSZ_MASK ((uint32_t)((0xFF) << 0))
  3876. #define FLEXSPI_FLSHA1CR0 (IMXRT_FLEXSPI.offset060)
  3877. #define FLEXSPI_FLSHA2CR0 (IMXRT_FLEXSPI.offset064)
  3878. #define FLEXSPI_FLSHB1CR0 (IMXRT_FLEXSPI.offset068)
  3879. #define FLEXSPI_FLSHB2CR0 (IMXRT_FLEXSPI.offset06C)
  3880. #define FLEXSPI_FLSHCR0_FLSHSZ(n) ((uint32_t)(((n) & 0x7FFFFF) << 0))
  3881. #define FLEXSPI_FLSHCR0_FLSHSZ_MASK ((uint32_t)((0x7FFFFF) << 0))
  3882. #define FLEXSPI_FLSHA1CR1 (IMXRT_FLEXSPI.offset070)
  3883. #define FLEXSPI_FLSHA2CR1 (IMXRT_FLEXSPI.offset074)
  3884. #define FLEXSPI_FLSHB1CR1 (IMXRT_FLEXSPI.offset078)
  3885. #define FLEXSPI_FLSHB2CR1 (IMXRT_FLEXSPI.offset07C)
  3886. #define FLEXSPI_FLSHCR1_CSINTERVAL(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  3887. #define FLEXSPI_FLSHCR1_CSINTERVAL_MASK ((uint32_t)((0xFFFF) << 16))
  3888. #define FLEXSPI_FLSHCR1_CSINTERVALUNIT ((uint32_t)(1<<15))
  3889. #define FLEXSPI_FLSHCR1_CAS(n) ((uint32_t)(((n) & 0x0F) << 11))
  3890. #define FLEXSPI_FLSHCR1_WA ((uint32_t)(1<<10))
  3891. #define FLEXSPI_FLSHCR1_TCSH(n) ((uint32_t)(((n) & 0x1F) << 5))
  3892. #define FLEXSPI_FLSHCR1_TCSH_MASK ((uint32_t)((0x1F) << 5))
  3893. #define FLEXSPI_FLSHCR1_TCSS(n) ((uint32_t)(((n) & 0x1F) << 0))
  3894. #define FLEXSPI_FLSHCR1_TCSS_MASK ((uint32_t)((0x1F) << 0))
  3895. #define FLEXSPI_FLSHA1CR2 (IMXRT_FLEXSPI.offset080)
  3896. #define FLEXSPI_FLSHA2CR2 (IMXRT_FLEXSPI.offset084)
  3897. #define FLEXSPI_FLSHB1CR2 (IMXRT_FLEXSPI.offset088)
  3898. #define FLEXSPI_FLSHB2CR2 (IMXRT_FLEXSPI.offset08C)
  3899. #define FLEXSPI_FLSHCR2_CLRINSTRPTR ((uint32_t)(1<<31))
  3900. #define FLEXSPI_FLSHCR2_AWRWAITUNIT(n) ((uint32_t)(((n) & 0x07) << 28))
  3901. #define FLEXSPI_FLSHCR2_AWRWAIT(n) ((uint32_t)(((n) & 0xFFF) << 16))
  3902. #define FLEXSPI_FLSHCR2_AWRSEQNUM(n) ((uint32_t)(((n) & 0x07) << 13))
  3903. #define FLEXSPI_FLSHCR2_AWRSEQID(n) ((uint32_t)(((n) & 0x0F) << 8))
  3904. #define FLEXSPI_FLSHCR2_ARDSEQNUM(n) ((uint32_t)(((n) & 0x07) << 5))
  3905. #define FLEXSPI_FLSHCR2_ARDSEQID(n) ((uint32_t)(((n) & 0x0F) << 0))
  3906. #define FLEXSPI_FLSHCR4 (IMXRT_FLEXSPI.offset094)
  3907. #define FLEXSPI_FLSHCR4_WMENB ((uint32_t)(1<<3))
  3908. #define FLEXSPI_FLSHCR4_WMENA ((uint32_t)(1<<2))
  3909. #define FLEXSPI_FLSHCR4_WMOPT1 ((uint32_t)(1<<0))
  3910. #define FLEXSPI_IPCR0 (IMXRT_FLEXSPI.offset0A0)
  3911. #define FLEXSPI_IPCR0_SFAR(n) ((uint32_t)(n))
  3912. #define FLEXSPI_IPCR1 (IMXRT_FLEXSPI.offset0A4)
  3913. #define FLEXSPI_IPCR1_IPAREN ((uint32_t)(1<<31))
  3914. #define FLEXSPI_IPCR1_ISEQNUM(n) ((uint32_t)(((n) & 0x07) << 24))
  3915. #define FLEXSPI_IPCR1_ISEQID(n) ((uint32_t)(((n) & 0x0F) << 16))
  3916. #define FLEXSPI_IPCR1_IDATSZ(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  3917. #define FLEXSPI_IPCMD (IMXRT_FLEXSPI.offset0B0)
  3918. #define FLEXSPI_IPCMD_TRG ((uint32_t)(1<<0))
  3919. #define FLEXSPI_IPRXFCR (IMXRT_FLEXSPI.offset0B8)
  3920. #define FLEXSPI_IPRXFCR_RXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  3921. #define FLEXSPI_IPRXFCR_RXDMAEN ((uint32_t)(1<<1))
  3922. #define FLEXSPI_IPRXFCR_CLRIPRXF ((uint32_t)(1<<0))
  3923. #define FLEXSPI_IPTXFCR (IMXRT_FLEXSPI.offset0BC)
  3924. #define FLEXSPI_IPTXFCR_TXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  3925. #define FLEXSPI_IPTXFCR_TXDMAEN ((uint32_t)(1<<1))
  3926. #define FLEXSPI_IPTXFCR_CLRIPTXF ((uint32_t)(1<<0))
  3927. #define FLEXSPI_DLLACR (IMXRT_FLEXSPI.offset0C0)
  3928. #define FLEXSPI_DLLBCR (IMXRT_FLEXSPI.offset0C4)
  3929. #define FLEXSPI_DLLCR_OVRDVAL(n) ((uint32_t)(((n) & 0x3F) << 9))
  3930. #define FLEXSPI_DLLCR_OVRDEN ((uint32_t)(1<<8))
  3931. #define FLEXSPI_DLLCR_SLVDLYTARGET(n) ((uint32_t)(((n) & 0x0F) << 3))
  3932. #define FLEXSPI_DLLCR_DLLRESET ((uint32_t)(1<<1))
  3933. #define FLEXSPI_DLLCR_DLLEN ((uint32_t)(1<<0))
  3934. #define FLEXSPI_STS0 (IMXRT_FLEXSPI.offset0E0)
  3935. #define FLEXSPI_STS0_ARBCMDSRC(n) ((uint32_t)(((n) & 0x03) << 2))
  3936. #define FLEXSPI_STS0_ARBIDLE ((uint32_t)(1<<1))
  3937. #define FLEXSPI_STS0_SEQIDLE ((uint32_t)(1<<0))
  3938. #define FLEXSPI_STS1 (IMXRT_FLEXSPI.offset0E4)
  3939. #define FLEXSPI_STS1_IPCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 24))
  3940. #define FLEXSPI_STS1_IPCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  3941. #define FLEXSPI_STS1_AHBCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 8))
  3942. #define FLEXSPI_STS1_AHBCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 0))
  3943. #define FLEXSPI_STS2 (IMXRT_FLEXSPI.offset0E8)
  3944. #define FLEXSPI_STS2_BREFSEL(n) ((uint32_t)(((n) & 0x3F) << 24))
  3945. #define FLEXSPI_STS2_BSLVSEL(n) ((uint32_t)(((n) & 0x3F) << 18))
  3946. #define FLEXSPI_STS2_BREFLOCK ((uint32_t)(1<<17))
  3947. #define FLEXSPI_STS2_BSLVLOCK ((uint32_t)(1<<16))
  3948. #define FLEXSPI_STS2_AREFSEL(n) ((uint32_t)(((n) & 0x3F) << 8))
  3949. #define FLEXSPI_STS2_ASLVSEL(n) ((uint32_t)(((n) & 0x3F) << 2))
  3950. #define FLEXSPI_STS2_AREFLOCK ((uint32_t)(1<<1))
  3951. #define FLEXSPI_STS2_ASLVLOCK ((uint32_t)(1<<0))
  3952. #define FLEXSPI_AHBSPNDSTS (IMXRT_FLEXSPI.offset0EC)
  3953. #define FLEXSPI_AHBSPNDSTS_DATLFT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  3954. #define FLEXSPI_AHBSPNDSTS_BUFID(n) ((uint32_t)(((n) & 0x7) << 1))
  3955. #define FLEXSPI_AHBSPNDSTS_ACTIVE ((uint32_t)(1<<0))
  3956. #define FLEXSPI_IPRXFSTS (IMXRT_FLEXSPI.offset0F0)
  3957. #define FLEXSPI_IPRXFSTS_RDCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  3958. #define FLEXSPI_IPRXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  3959. #define FLEXSPI_IPTXFSTS (IMXRT_FLEXSPI.offset0F4)
  3960. #define FLEXSPI_IPTXFSTS_WRCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  3961. #define FLEXSPI_IPTXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  3962. #define FLEXSPI_RFDR0 (IMXRT_FLEXSPI.offset100)
  3963. #define FLEXSPI_RFDR1 (IMXRT_FLEXSPI.offset104)
  3964. #define FLEXSPI_RFDR2 (IMXRT_FLEXSPI.offset108)
  3965. #define FLEXSPI_RFDR3 (IMXRT_FLEXSPI.offset10C)
  3966. #define FLEXSPI_RFDR4 (IMXRT_FLEXSPI.offset110)
  3967. #define FLEXSPI_RFDR5 (IMXRT_FLEXSPI.offset114)
  3968. #define FLEXSPI_RFDR6 (IMXRT_FLEXSPI.offset118)
  3969. #define FLEXSPI_RFDR7 (IMXRT_FLEXSPI.offset11C)
  3970. #define FLEXSPI_RFDR8 (IMXRT_FLEXSPI.offset120)
  3971. #define FLEXSPI_RFDR9 (IMXRT_FLEXSPI.offset124)
  3972. #define FLEXSPI_RFDR10 (IMXRT_FLEXSPI.offset128)
  3973. #define FLEXSPI_RFDR11 (IMXRT_FLEXSPI.offset12C)
  3974. #define FLEXSPI_RFDR12 (IMXRT_FLEXSPI.offset130)
  3975. #define FLEXSPI_RFDR13 (IMXRT_FLEXSPI.offset134)
  3976. #define FLEXSPI_RFDR14 (IMXRT_FLEXSPI.offset138)
  3977. #define FLEXSPI_RFDR15 (IMXRT_FLEXSPI.offset13C)
  3978. #define FLEXSPI_RFDR16 (IMXRT_FLEXSPI.offset140)
  3979. #define FLEXSPI_RFDR17 (IMXRT_FLEXSPI.offset144)
  3980. #define FLEXSPI_RFDR18 (IMXRT_FLEXSPI.offset148)
  3981. #define FLEXSPI_RFDR19 (IMXRT_FLEXSPI.offset14C)
  3982. #define FLEXSPI_RFDR20 (IMXRT_FLEXSPI.offset150)
  3983. #define FLEXSPI_RFDR21 (IMXRT_FLEXSPI.offset154)
  3984. #define FLEXSPI_RFDR22 (IMXRT_FLEXSPI.offset158)
  3985. #define FLEXSPI_RFDR23 (IMXRT_FLEXSPI.offset15C)
  3986. #define FLEXSPI_RFDR24 (IMXRT_FLEXSPI.offset160)
  3987. #define FLEXSPI_RFDR25 (IMXRT_FLEXSPI.offset164)
  3988. #define FLEXSPI_RFDR26 (IMXRT_FLEXSPI.offset168)
  3989. #define FLEXSPI_RFDR27 (IMXRT_FLEXSPI.offset16C)
  3990. #define FLEXSPI_RFDR28 (IMXRT_FLEXSPI.offset170)
  3991. #define FLEXSPI_RFDR29 (IMXRT_FLEXSPI.offset174)
  3992. #define FLEXSPI_RFDR30 (IMXRT_FLEXSPI.offset178)
  3993. #define FLEXSPI_RFDR31 (IMXRT_FLEXSPI.offset17C)
  3994. #define FLEXSPI_TFDR0 (IMXRT_FLEXSPI.offset180)
  3995. #define FLEXSPI_TFDR1 (IMXRT_FLEXSPI.offset184)
  3996. #define FLEXSPI_TFDR2 (IMXRT_FLEXSPI.offset188)
  3997. #define FLEXSPI_TFDR3 (IMXRT_FLEXSPI.offset18C)
  3998. #define FLEXSPI_TFDR4 (IMXRT_FLEXSPI.offset190)
  3999. #define FLEXSPI_TFDR5 (IMXRT_FLEXSPI.offset194)
  4000. #define FLEXSPI_TFDR6 (IMXRT_FLEXSPI.offset198)
  4001. #define FLEXSPI_TFDR7 (IMXRT_FLEXSPI.offset19C)
  4002. #define FLEXSPI_TFDR8 (IMXRT_FLEXSPI.offset1A0)
  4003. #define FLEXSPI_TFDR9 (IMXRT_FLEXSPI.offset1A4)
  4004. #define FLEXSPI_TFDR10 (IMXRT_FLEXSPI.offset1A8)
  4005. #define FLEXSPI_TFDR11 (IMXRT_FLEXSPI.offset1AC)
  4006. #define FLEXSPI_TFDR12 (IMXRT_FLEXSPI.offset1B0)
  4007. #define FLEXSPI_TFDR13 (IMXRT_FLEXSPI.offset1B4)
  4008. #define FLEXSPI_TFDR14 (IMXRT_FLEXSPI.offset1B8)
  4009. #define FLEXSPI_TFDR15 (IMXRT_FLEXSPI.offset1BC)
  4010. #define FLEXSPI_TFDR16 (IMXRT_FLEXSPI.offset1C0)
  4011. #define FLEXSPI_TFDR17 (IMXRT_FLEXSPI.offset1C4)
  4012. #define FLEXSPI_TFDR18 (IMXRT_FLEXSPI.offset1C8)
  4013. #define FLEXSPI_TFDR19 (IMXRT_FLEXSPI.offset1CC)
  4014. #define FLEXSPI_TFDR20 (IMXRT_FLEXSPI.offset1D0)
  4015. #define FLEXSPI_TFDR21 (IMXRT_FLEXSPI.offset1D4)
  4016. #define FLEXSPI_TFDR22 (IMXRT_FLEXSPI.offset1D8)
  4017. #define FLEXSPI_TFDR23 (IMXRT_FLEXSPI.offset1DC)
  4018. #define FLEXSPI_TFDR24 (IMXRT_FLEXSPI.offset1E0)
  4019. #define FLEXSPI_TFDR25 (IMXRT_FLEXSPI.offset1E4)
  4020. #define FLEXSPI_TFDR26 (IMXRT_FLEXSPI.offset1E8)
  4021. #define FLEXSPI_TFDR27 (IMXRT_FLEXSPI.offset1EC)
  4022. #define FLEXSPI_TFDR28 (IMXRT_FLEXSPI.offset1F0)
  4023. #define FLEXSPI_TFDR29 (IMXRT_FLEXSPI.offset1F4)
  4024. #define FLEXSPI_TFDR30 (IMXRT_FLEXSPI.offset1F8)
  4025. #define FLEXSPI_TFDR31 (IMXRT_FLEXSPI.offset1FC)
  4026. #define FLEXSPI_LUT0 (IMXRT_FLEXSPI.offset200)
  4027. #define FLEXSPI_LUT1 (IMXRT_FLEXSPI.offset204)
  4028. #define FLEXSPI_LUT2 (IMXRT_FLEXSPI.offset208)
  4029. #define FLEXSPI_LUT3 (IMXRT_FLEXSPI.offset20C)
  4030. #define FLEXSPI_LUT4 (IMXRT_FLEXSPI.offset210)
  4031. #define FLEXSPI_LUT5 (IMXRT_FLEXSPI.offset214)
  4032. #define FLEXSPI_LUT6 (IMXRT_FLEXSPI.offset218)
  4033. #define FLEXSPI_LUT7 (IMXRT_FLEXSPI.offset21C)
  4034. #define FLEXSPI_LUT8 (IMXRT_FLEXSPI.offset220)
  4035. #define FLEXSPI_LUT9 (IMXRT_FLEXSPI.offset224)
  4036. #define FLEXSPI_LUT10 (IMXRT_FLEXSPI.offset228)
  4037. #define FLEXSPI_LUT11 (IMXRT_FLEXSPI.offset22C)
  4038. #define FLEXSPI_LUT12 (IMXRT_FLEXSPI.offset230)
  4039. #define FLEXSPI_LUT13 (IMXRT_FLEXSPI.offset234)
  4040. #define FLEXSPI_LUT14 (IMXRT_FLEXSPI.offset238)
  4041. #define FLEXSPI_LUT15 (IMXRT_FLEXSPI.offset23C)
  4042. #define FLEXSPI_LUT16 (IMXRT_FLEXSPI.offset240)
  4043. #define FLEXSPI_LUT17 (IMXRT_FLEXSPI.offset244)
  4044. #define FLEXSPI_LUT18 (IMXRT_FLEXSPI.offset248)
  4045. #define FLEXSPI_LUT19 (IMXRT_FLEXSPI.offset24C)
  4046. #define FLEXSPI_LUT20 (IMXRT_FLEXSPI.offset250)
  4047. #define FLEXSPI_LUT21 (IMXRT_FLEXSPI.offset254)
  4048. #define FLEXSPI_LUT22 (IMXRT_FLEXSPI.offset258)
  4049. #define FLEXSPI_LUT23 (IMXRT_FLEXSPI.offset25C)
  4050. #define FLEXSPI_LUT24 (IMXRT_FLEXSPI.offset260)
  4051. #define FLEXSPI_LUT25 (IMXRT_FLEXSPI.offset264)
  4052. #define FLEXSPI_LUT26 (IMXRT_FLEXSPI.offset268)
  4053. #define FLEXSPI_LUT27 (IMXRT_FLEXSPI.offset26C)
  4054. #define FLEXSPI_LUT28 (IMXRT_FLEXSPI.offset270)
  4055. #define FLEXSPI_LUT29 (IMXRT_FLEXSPI.offset274)
  4056. #define FLEXSPI_LUT30 (IMXRT_FLEXSPI.offset278)
  4057. #define FLEXSPI_LUT31 (IMXRT_FLEXSPI.offset27C)
  4058. #define FLEXSPI_LUT32 (IMXRT_FLEXSPI.offset280)
  4059. #define FLEXSPI_LUT33 (IMXRT_FLEXSPI.offset284)
  4060. #define FLEXSPI_LUT34 (IMXRT_FLEXSPI.offset288)
  4061. #define FLEXSPI_LUT35 (IMXRT_FLEXSPI.offset28C)
  4062. #define FLEXSPI_LUT36 (IMXRT_FLEXSPI.offset290)
  4063. #define FLEXSPI_LUT37 (IMXRT_FLEXSPI.offset294)
  4064. #define FLEXSPI_LUT38 (IMXRT_FLEXSPI.offset298)
  4065. #define FLEXSPI_LUT39 (IMXRT_FLEXSPI.offset29C)
  4066. #define FLEXSPI_LUT40 (IMXRT_FLEXSPI.offset2A0)
  4067. #define FLEXSPI_LUT41 (IMXRT_FLEXSPI.offset2A4)
  4068. #define FLEXSPI_LUT42 (IMXRT_FLEXSPI.offset2A8)
  4069. #define FLEXSPI_LUT43 (IMXRT_FLEXSPI.offset2AC)
  4070. #define FLEXSPI_LUT44 (IMXRT_FLEXSPI.offset2B0)
  4071. #define FLEXSPI_LUT45 (IMXRT_FLEXSPI.offset2B4)
  4072. #define FLEXSPI_LUT46 (IMXRT_FLEXSPI.offset2B8)
  4073. #define FLEXSPI_LUT47 (IMXRT_FLEXSPI.offset2BC)
  4074. #define FLEXSPI_LUT48 (IMXRT_FLEXSPI.offset2C0)
  4075. #define FLEXSPI_LUT49 (IMXRT_FLEXSPI.offset2C4)
  4076. #define FLEXSPI_LUT50 (IMXRT_FLEXSPI.offset2C8)
  4077. #define FLEXSPI_LUT51 (IMXRT_FLEXSPI.offset2CC)
  4078. #define FLEXSPI_LUT52 (IMXRT_FLEXSPI.offset2D0)
  4079. #define FLEXSPI_LUT53 (IMXRT_FLEXSPI.offset2D4)
  4080. #define FLEXSPI_LUT54 (IMXRT_FLEXSPI.offset2D8)
  4081. #define FLEXSPI_LUT55 (IMXRT_FLEXSPI.offset2DC)
  4082. #define FLEXSPI_LUT56 (IMXRT_FLEXSPI.offset2E0)
  4083. #define FLEXSPI_LUT57 (IMXRT_FLEXSPI.offset2E4)
  4084. #define FLEXSPI_LUT58 (IMXRT_FLEXSPI.offset2E8)
  4085. #define FLEXSPI_LUT59 (IMXRT_FLEXSPI.offset2EC)
  4086. #define FLEXSPI_LUT60 (IMXRT_FLEXSPI.offset2F0)
  4087. #define FLEXSPI_LUT61 (IMXRT_FLEXSPI.offset2F4)
  4088. #define FLEXSPI_LUT62 (IMXRT_FLEXSPI.offset2F8)
  4089. #define FLEXSPI_LUT63 (IMXRT_FLEXSPI.offset2FC)
  4090. #define FLEXSPI_LUT_OPCODE1(n) ((uint32_t)(((n) & 0x3F) << 26))
  4091. #define FLEXSPI_LUT_NUM_PADS1(n) ((uint32_t)(((n) & 0x03) << 24))
  4092. #define FLEXSPI_LUT_OPERAND1(n) ((uint32_t)(((n) & 0xFF) << 16))
  4093. #define FLEXSPI_LUT_OPCODE0(n) ((uint32_t)(((n) & 0x3F) << 10))
  4094. #define FLEXSPI_LUT_NUM_PADS0(n) ((uint32_t)(((n) & 0x03) << 8))
  4095. #define FLEXSPI_LUT_OPERAND0(n) ((uint32_t)(((n) & 0xFF) << 0))
  4096. #define FLEXSPI_LUT_INSTRUCTION(opcode, pads, operand) ((uint32_t)(\
  4097. (((opcode) & 0x3F) << 10) | (((pads) & 0x03) << 8) | ((operand) & 0xFF)))
  4098. // 30.7.8: page 1532
  4099. #define FLEXSPI_LUT_OPCODE_CMD_SDR 0x01
  4100. #define FLEXSPI_LUT_OPCODE_CMD_DDR 0x21
  4101. #define FLEXSPI_LUT_OPCODE_RADDR_SDR 0x02
  4102. #define FLEXSPI_LUT_OPCODE_RADDR_DDR 0x22
  4103. #define FLEXSPI_LUT_OPCODE_CADDR_SDR 0x03
  4104. #define FLEXSPI_LUT_OPCODE_CADDR_DDR 0x23
  4105. #define FLEXSPI_LUT_OPCODE_MODE1_SDR 0x04
  4106. #define FLEXSPI_LUT_OPCODE_MODE1_DDR 0x24
  4107. #define FLEXSPI_LUT_OPCODE_MODE2_SDR 0x05
  4108. #define FLEXSPI_LUT_OPCODE_MODE2_DDR 0x25
  4109. #define FLEXSPI_LUT_OPCODE_MODE4_SDR 0x06
  4110. #define FLEXSPI_LUT_OPCODE_MODE4_DDR 0x26
  4111. #define FLEXSPI_LUT_OPCODE_MODE8_SDR 0x07
  4112. #define FLEXSPI_LUT_OPCODE_MODE8_DDR 0x27
  4113. #define FLEXSPI_LUT_OPCODE_WRITE_SDR 0x08
  4114. #define FLEXSPI_LUT_OPCODE_WRITE_DDR 0x28
  4115. #define FLEXSPI_LUT_OPCODE_READ_SDR 0x09
  4116. #define FLEXSPI_LUT_OPCODE_READ_DDR 0x29
  4117. #define FLEXSPI_LUT_OPCODE_LEARN_SDR 0x0A
  4118. #define FLEXSPI_LUT_OPCODE_LEARN_DDR 0x2A
  4119. #define FLEXSPI_LUT_OPCODE_DATSZ_SDR 0x0B
  4120. #define FLEXSPI_LUT_OPCODE_DATSZ_DDR 0x2B
  4121. #define FLEXSPI_LUT_OPCODE_DUMMY_SDR 0x0C
  4122. #define FLEXSPI_LUT_OPCODE_DUMMY_DDR 0x2C
  4123. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_SDR 0x0D
  4124. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_DDR 0x2D
  4125. #define FLEXSPI_LUT_OPCODE_JMP_ON_CS 0x1F
  4126. #define FLEXSPI_LUT_OPCODE_STOP 0x00
  4127. #define FLEXSPI_LUT_NUM_PADS_1 0x00
  4128. #define FLEXSPI_LUT_NUM_PADS_2 0x01
  4129. #define FLEXSPI_LUT_NUM_PADS_4 0x02
  4130. #define FLEXSPI_LUT_NUM_PADS_8 0x03
  4131. // 31.5: page 1595
  4132. #define IMXRT_GPC (*(IMXRT_REGISTER32_t *)0x400F4000)
  4133. #define GPC_CNTR (IMXRT_GPC.offset000)
  4134. #define GPC_IMR1 (IMXRT_GPC.offset008)
  4135. #define GPC_IMR2 (IMXRT_GPC.offset00C)
  4136. #define GPC_IMR3 (IMXRT_GPC.offset010)
  4137. #define GPC_IMR4 (IMXRT_GPC.offset014)
  4138. #define GPC_ISR1 (IMXRT_GPC.offset018)
  4139. #define GPC_ISR2 (IMXRT_GPC.offset01C)
  4140. #define GPC_ISR3 (IMXRT_GPC.offset020)
  4141. #define GPC_ISR4 (IMXRT_GPC.offset024)
  4142. #define GPC_IMR5 (IMXRT_GPC.offset034)
  4143. #define GPC_ISR5 (IMXRT_GPC.offset038)
  4144. #define GPC_CNTR_PDRAM0_PGE ((uint32_t)(1<<22))
  4145. #define GPC_CNTR_MEGA_PUP_REQ ((uint32_t)(1<<3))
  4146. #define GPC_CNTR_MEGA_PDN_REQ ((uint32_t)(1<<2))
  4147. // page 1602
  4148. #define PGC_MEGA_CTRL (IMXRT_GPC.offset220)
  4149. #define PGC_MEGA_PUPSCR (IMXRT_GPC.offset224)
  4150. #define PGC_MEGA_PDNSCR (IMXRT_GPC.offset228)
  4151. #define PGC_MEGA_SR (IMXRT_GPC.offset22C)
  4152. #define PGC_CPU_CTRL (IMXRT_GPC.offset2A0)
  4153. #define PGC_CPU_PUPSCR (IMXRT_GPC.offset2A4)
  4154. #define PGC_CPU_PDNSCR (IMXRT_GPC.offset2A8)
  4155. #define PGC_CPU_SR (IMXRT_GPC.offset2AC)
  4156. #define PGC_MEGA_CTRL_PCR ((uint32_t)(1<<0))
  4157. #define PGC_MEGA_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  4158. #define PGC_MEGA_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  4159. #define PGC_MEGA_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  4160. #define PGC_MEGA_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  4161. #define PGC_MEGA_SR_PSR ((uint32_t)(1<<0))
  4162. #define PGC_CPU_CTRL_PCR ((uint32_t)(1<<0))
  4163. #define PGC_CPU_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  4164. #define PGC_CPU_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  4165. #define PGC_CPU_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  4166. #define PGC_CPU_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  4167. #define PGC_CPU_SR_PSR ((uint32_t)(1<<0))
  4168. // 32.4.1: page 1620
  4169. #define IMXRT_GPIO1 (*(IMXRT_REGISTER32_t *)0x401B8000)
  4170. #define GPIO1_DR (IMXRT_GPIO1.offset000)
  4171. #define GPIO1_GDIR (IMXRT_GPIO1.offset004)
  4172. #define GPIO1_PSR (IMXRT_GPIO1.offset008)
  4173. #define GPIO1_ICR1 (IMXRT_GPIO1.offset00C)
  4174. #define GPIO1_ICR2 (IMXRT_GPIO1.offset010)
  4175. #define GPIO1_IMR (IMXRT_GPIO1.offset014)
  4176. #define GPIO1_ISR (IMXRT_GPIO1.offset018)
  4177. #define GPIO1_EDGE_SEL (IMXRT_GPIO1.offset01C)
  4178. #define GPIO1_DR_SET (IMXRT_GPIO1.offset084)
  4179. #define GPIO1_DR_CLEAR (IMXRT_GPIO1.offset088)
  4180. #define GPIO1_DR_TOGGLE (IMXRT_GPIO1.offset08C)
  4181. #define IMXRT_GPIO2 (*(IMXRT_REGISTER32_t *)0x401BC000)
  4182. #define GPIO2_DR (IMXRT_GPIO2.offset000)
  4183. #define GPIO2_GDIR (IMXRT_GPIO2.offset004)
  4184. #define GPIO2_PSR (IMXRT_GPIO2.offset008)
  4185. #define GPIO2_ICR1 (IMXRT_GPIO2.offset00C)
  4186. #define GPIO2_ICR2 (IMXRT_GPIO2.offset010)
  4187. #define GPIO2_IMR (IMXRT_GPIO2.offset014)
  4188. #define GPIO2_ISR (IMXRT_GPIO2.offset018)
  4189. #define GPIO2_EDGE_SEL (IMXRT_GPIO2.offset01C)
  4190. #define GPIO2_DR_SET (IMXRT_GPIO2.offset084)
  4191. #define GPIO2_DR_CLEAR (IMXRT_GPIO2.offset088)
  4192. #define GPIO2_DR_TOGGLE (IMXRT_GPIO2.offset08C)
  4193. #define IMXRT_GPIO3 (*(IMXRT_REGISTER32_t *)0x401C0000)
  4194. #define GPIO3_DR (IMXRT_GPIO3.offset000)
  4195. #define GPIO3_GDIR (IMXRT_GPIO3.offset004)
  4196. #define GPIO3_PSR (IMXRT_GPIO3.offset008)
  4197. #define GPIO3_ICR1 (IMXRT_GPIO3.offset00C)
  4198. #define GPIO3_ICR2 (IMXRT_GPIO3.offset010)
  4199. #define GPIO3_IMR (IMXRT_GPIO3.offset014)
  4200. #define GPIO3_ISR (IMXRT_GPIO3.offset018)
  4201. #define GPIO3_EDGE_SEL (IMXRT_GPIO3.offset01C)
  4202. #define GPIO3_DR_SET (IMXRT_GPIO3.offset084)
  4203. #define GPIO3_DR_CLEAR (IMXRT_GPIO3.offset088)
  4204. #define GPIO3_DR_TOGGLE (IMXRT_GPIO3.offset08C)
  4205. #define IMXRT_GPIO4 (*(IMXRT_REGISTER32_t *)0x401C4000)
  4206. #define GPIO4_DR (IMXRT_GPIO4.offset000)
  4207. #define GPIO4_GDIR (IMXRT_GPIO4.offset004)
  4208. #define GPIO4_PSR (IMXRT_GPIO4.offset008)
  4209. #define GPIO4_ICR1 (IMXRT_GPIO4.offset00C)
  4210. #define GPIO4_ICR2 (IMXRT_GPIO4.offset010)
  4211. #define GPIO4_IMR (IMXRT_GPIO4.offset014)
  4212. #define GPIO4_ISR (IMXRT_GPIO4.offset018)
  4213. #define GPIO4_EDGE_SEL (IMXRT_GPIO4.offset01C)
  4214. #define GPIO4_DR_SET (IMXRT_GPIO4.offset084)
  4215. #define GPIO4_DR_CLEAR (IMXRT_GPIO4.offset088)
  4216. #define GPIO4_DR_TOGGLE (IMXRT_GPIO4.offset08C)
  4217. #define IMXRT_GPIO5 (*(IMXRT_REGISTER32_t *)0x400C0000)
  4218. #define GPIO5_DR (IMXRT_GPIO5.offset000)
  4219. #define GPIO5_GDIR (IMXRT_GPIO5.offset004)
  4220. #define GPIO5_PSR (IMXRT_GPIO5.offset008)
  4221. #define GPIO5_ICR1 (IMXRT_GPIO5.offset00C)
  4222. #define GPIO5_ICR2 (IMXRT_GPIO5.offset010)
  4223. #define GPIO5_IMR (IMXRT_GPIO5.offset014)
  4224. #define GPIO5_ISR (IMXRT_GPIO5.offset018)
  4225. #define GPIO5_EDGE_SEL (IMXRT_GPIO5.offset01C)
  4226. #define GPIO5_DR_SET (IMXRT_GPIO5.offset084)
  4227. #define GPIO5_DR_CLEAR (IMXRT_GPIO5.offset088)
  4228. #define GPIO5_DR_TOGGLE (IMXRT_GPIO5.offset08C)
  4229. // 33.6: page 1651
  4230. #define IMXRT_GPT1 (*(IMXRT_REGISTER32_t *)0x401EC000)
  4231. #define GPT1_CR (IMXRT_GPT1.offset000)
  4232. #define GPT1_PR (IMXRT_GPT1.offset004)
  4233. #define GPT1_SR (IMXRT_GPT1.offset008)
  4234. #define GPT1_IR (IMXRT_GPT1.offset00C)
  4235. #define GPT1_OCR1 (IMXRT_GPT1.offset010)
  4236. #define GPT1_OCR2 (IMXRT_GPT1.offset014)
  4237. #define GPT1_OCR3 (IMXRT_GPT1.offset018)
  4238. #define GPT1_ICR1 (IMXRT_GPT1.offset01C)
  4239. #define GPT1_ICR2 (IMXRT_GPT1.offset020)
  4240. #define GPT1_CNT (IMXRT_GPT1.offset024)
  4241. #define IMXRT_GPT2 (*(IMXRT_REGISTER32_t *)0x401F0000)
  4242. #define GPT2_CR (IMXRT_GPT2.offset000)
  4243. #define GPT2_PR (IMXRT_GPT2.offset004)
  4244. #define GPT2_SR (IMXRT_GPT2.offset008)
  4245. #define GPT2_IR (IMXRT_GPT2.offset00C)
  4246. #define GPT2_OCR1 (IMXRT_GPT2.offset010)
  4247. #define GPT2_OCR2 (IMXRT_GPT2.offset014)
  4248. #define GPT2_OCR3 (IMXRT_GPT2.offset018)
  4249. #define GPT2_ICR1 (IMXRT_GPT2.offset01C)
  4250. #define GPT2_ICR2 (IMXRT_GPT2.offset020)
  4251. #define GPT2_CNT (IMXRT_GPT2.offset024)
  4252. #define GPT_CR_FO3 ((uint32_t)(1<<31))
  4253. #define GPT_CR_FO2 ((uint32_t)(1<<30))
  4254. #define GPT_CR_FO1 ((uint32_t)(1<<29))
  4255. #define GPT_CR_OM3(n) ((uint32_t)(((n) & 0x07) << 26))
  4256. #define GPT_CR_OM2(n) ((uint32_t)(((n) & 0x07) << 23))
  4257. #define GPT_CR_OM1(n) ((uint32_t)(((n) & 0x07) << 20))
  4258. #define GPT_CR_IM2(n) ((uint32_t)(((n) & 0x03) << 18))
  4259. #define GPT_CR_IM1(n) ((uint32_t)(((n) & 0x03) << 16))
  4260. #define GPT_CR_SWR ((uint32_t)(1<<15))
  4261. #define GPT_CR_EN_24M ((uint32_t)(1<<10))
  4262. #define GPT_CR_FRR ((uint32_t)(1<<9))
  4263. #define GPT_CR_CLKSRC(n) ((uint32_t)(((n) & 0x07) << 6))
  4264. #define GPT_CR_STOPEN ((uint32_t)(1<<5))
  4265. #define GPT_CR_DOZEEN ((uint32_t)(1<<4))
  4266. #define GPT_CR_WAITEN ((uint32_t)(1<<3))
  4267. #define GPT_CR_DBGEN ((uint32_t)(1<<2))
  4268. #define GPT_CR_ENMOD ((uint32_t)(1<<1))
  4269. #define GPT_CR_EN ((uint32_t)(1<<0))
  4270. #define GPT_PR_PRESCALER24M(n) ((uint32_t)(((n) & 0x0F) << 12))
  4271. #define GPT_PR_PRESCALER(n) ((uint32_t)(((n) & 0xFFF) << 0))
  4272. #define GPT_SR_ROV ((uint32_t)(1<<5))
  4273. #define GPT_SR_IF2 ((uint32_t)(1<<4))
  4274. #define GPT_SR_IF1 ((uint32_t)(1<<3))
  4275. #define GPT_SR_OF3 ((uint32_t)(1<<2))
  4276. #define GPT_SR_OF2 ((uint32_t)(1<<1))
  4277. #define GPT_SR_OF1 ((uint32_t)(1<<0))
  4278. #define GPT_IR_ROVIE ((uint32_t)(1<<5))
  4279. #define GPT_IR_IF2IE ((uint32_t)(1<<4))
  4280. #define GPT_IR_IF1IE ((uint32_t)(1<<3))
  4281. #define GPT_IR_OF3IE ((uint32_t)(1<<2))
  4282. #define GPT_IR_OF2IE ((uint32_t)(1<<1))
  4283. #define GPT_IR_OF1IE ((uint32_t)(1<<0))
  4284. // 34.4: page 1671
  4285. #define IMXRT_IOMUXC_GPR (*(IMXRT_REGISTER32_t *)0x400AC000)
  4286. #define IOMUXC_GPR_GPR0 (IMXRT_IOMUXC_GPR.offset000)
  4287. #define IOMUXC_GPR_GPR1 (IMXRT_IOMUXC_GPR.offset004)
  4288. #define IOMUXC_GPR_GPR2 (IMXRT_IOMUXC_GPR.offset008)
  4289. #define IOMUXC_GPR_GPR3 (IMXRT_IOMUXC_GPR.offset00C)
  4290. #define IOMUXC_GPR_GPR4 (IMXRT_IOMUXC_GPR.offset010)
  4291. #define IOMUXC_GPR_GPR5 (IMXRT_IOMUXC_GPR.offset014)
  4292. #define IOMUXC_GPR_GPR6 (IMXRT_IOMUXC_GPR.offset018)
  4293. #define IOMUXC_GPR_GPR7 (IMXRT_IOMUXC_GPR.offset01C)
  4294. #define IOMUXC_GPR_GPR8 (IMXRT_IOMUXC_GPR.offset020)
  4295. #define IOMUXC_GPR_GPR9 (IMXRT_IOMUXC_GPR.offset024)
  4296. #define IOMUXC_GPR_GPR10 (IMXRT_IOMUXC_GPR.offset028)
  4297. #define IOMUXC_GPR_GPR11 (IMXRT_IOMUXC_GPR.offset02C)
  4298. #define IOMUXC_GPR_GPR12 (IMXRT_IOMUXC_GPR.offset030)
  4299. #define IOMUXC_GPR_GPR13 (IMXRT_IOMUXC_GPR.offset034)
  4300. #define IOMUXC_GPR_GPR14 (IMXRT_IOMUXC_GPR.offset038)
  4301. #define IOMUXC_GPR_GPR15 (IMXRT_IOMUXC_GPR.offset03C)
  4302. #define IOMUXC_GPR_GPR16 (IMXRT_IOMUXC_GPR.offset040)
  4303. #define IOMUXC_GPR_GPR17 (IMXRT_IOMUXC_GPR.offset044)
  4304. #define IOMUXC_GPR_GPR18 (IMXRT_IOMUXC_GPR.offset048)
  4305. #define IOMUXC_GPR_GPR19 (IMXRT_IOMUXC_GPR.offset04C)
  4306. #define IOMUXC_GPR_GPR20 (IMXRT_IOMUXC_GPR.offset050)
  4307. #define IOMUXC_GPR_GPR21 (IMXRT_IOMUXC_GPR.offset054)
  4308. #define IOMUXC_GPR_GPR22 (IMXRT_IOMUXC_GPR.offset058)
  4309. #define IOMUXC_GPR_GPR23 (IMXRT_IOMUXC_GPR.offset05C)
  4310. #define IOMUXC_GPR_GPR24 (IMXRT_IOMUXC_GPR.offset060)
  4311. #define IOMUXC_GPR_GPR25 (IMXRT_IOMUXC_GPR.offset064)
  4312. #define IOMUXC_GPR_GPR1_CM7_FORCE_HCLK_EN ((uint32_t)(1<<31))
  4313. #define IOMUXC_GPR_GPR1_ENET_IPG_CLK_S_EN ((uint32_t)(1<<23))
  4314. #define IOMUXC_GPR_GPR1_EXC_MON ((uint32_t)(1<<22))
  4315. #define IOMUXC_GPR_GPR1_SAI3_MCLK_DIR ((uint32_t)(1<<21))
  4316. #define IOMUXC_GPR_GPR1_SAI2_MCLK_DIR ((uint32_t)(1<<20))
  4317. #define IOMUXC_GPR_GPR1_SAI1_MCLK_DIR ((uint32_t)(1<<19))
  4318. #define IOMUXC_GPR_GPR1_ENET1_TX_CLK_DIR ((uint32_t)(1<<17))
  4319. #define IOMUXC_GPR_GPR1_USB_EXP_MODE ((uint32_t)(1<<15))
  4320. #define IOMUXC_GPR_GPR1_ENET1_CLK_SEL ((uint32_t)(1<<13))
  4321. #define IOMUXC_GPR_GPR1_GINT ((uint32_t)(1<<12))
  4322. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  4323. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  4324. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 6))
  4325. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(n) ((uint32_t)(((n) & 0x07) << 3))
  4326. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(n) ((uint32_t)(((n) & 0x07) << 0))
  4327. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(3)
  4328. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(3)
  4329. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(3)
  4330. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(7)
  4331. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(7)
  4332. #define IOMUXC_GPR_GPR2_QTIMER4_TMR_CNTS_FREEZE ((uint32_t)(1<<31))
  4333. #define IOMUXC_GPR_GPR2_QTIMER3_TMR_CNTS_FREEZE ((uint32_t)(1<<30))
  4334. #define IOMUXC_GPR_GPR2_QTIMER2_TMR_CNTS_FREEZE ((uint32_t)(1<<29))
  4335. #define IOMUXC_GPR_GPR2_QTIMER1_TMR_CNTS_FREEZE ((uint32_t)(1<<28))
  4336. #define IOMUXC_GPR_GPR2_MQS_OVERSAMPLE ((uint32_t)(1<<26))
  4337. #define IOMUXC_GPR_GPR2_MQS_EN ((uint32_t)(1<<25))
  4338. #define IOMUXC_GPR_GPR2_MQS_SW_RST ((uint32_t)(1<<24))
  4339. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV(n) ((uint32_t)(((n) & 0xFF) << 16))
  4340. #define IOMUXC_GPR_GPR2_L2_MEM_DEEPSLEEP ((uint32_t)(1<<14))
  4341. #define IOMUXC_GPR_GPR2_L2_MEM_EN_POWERSAVING ((uint32_t)(1<<12))
  4342. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV_MASK IOMUXC_GPR_GPR2_MQS_CLK_DIV(255)
  4343. #define IOMUXC_GPR_GPR3_OCRAM_STATUS(n) ((uint32_t)(((n) & 0x0F) << 16))
  4344. #define IOMUXC_GPR_GPR3_DCP_KEY_SEL ((uint32_t)(1<<4))
  4345. #define IOMUXC_GPR_GPR3_OCRAM_CTL(n) ((uint32_t)(((n) & 0x0F) << 0))
  4346. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_ACK ((uint32_t)(1<<29))
  4347. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_ACK ((uint32_t)(1<<28))
  4348. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_ACK ((uint32_t)(1<<27))
  4349. #define IOMUXC_GPR_GPR4_PIT_STOP_ACK ((uint32_t)(1<<26))
  4350. #define IOMUXC_GPR_GPR4_SEMC_STOP_ACK ((uint32_t)(1<<25))
  4351. #define IOMUXC_GPR_GPR4_SAI3_STOP_ACK ((uint32_t)(1<<23))
  4352. #define IOMUXC_GPR_GPR4_SAI2_STOP_ACK ((uint32_t)(1<<22))
  4353. #define IOMUXC_GPR_GPR4_SAI1_STOP_ACK ((uint32_t)(1<<21))
  4354. #define IOMUXC_GPR_GPR4_ENET_STOP_ACK ((uint32_t)(1<<20))
  4355. #define IOMUXC_GPR_GPR4_TRNG_STOP_ACK ((uint32_t)(1<<19))
  4356. #define IOMUXC_GPR_GPR4_CAN2_STOP_ACK ((uint32_t)(1<<18))
  4357. #define IOMUXC_GPR_GPR4_CAN1_STOP_ACK ((uint32_t)(1<<17))
  4358. #define IOMUXC_GPR_GPR4_EDMA_STOP_ACK ((uint32_t)(1<<16))
  4359. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_REQ ((uint32_t)(1<<13))
  4360. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_REQ ((uint32_t)(1<<12))
  4361. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_REQ ((uint32_t)(1<<11))
  4362. #define IOMUXC_GPR_GPR4_PIT_STOP_REQ ((uint32_t)(1<<10))
  4363. #define IOMUXC_GPR_GPR4_SEMC_STOP_REQ ((uint32_t)(1<<9))
  4364. #define IOMUXC_GPR_GPR4_SAI3_STOP_REQ ((uint32_t)(1<<7))
  4365. #define IOMUXC_GPR_GPR4_SAI2_STOP_REQ ((uint32_t)(1<<6))
  4366. #define IOMUXC_GPR_GPR4_SAI1_STOP_REQ ((uint32_t)(1<<5))
  4367. #define IOMUXC_GPR_GPR4_ENET_STOP_REQ ((uint32_t)(1<<4))
  4368. #define IOMUXC_GPR_GPR4_TRNG_STOP_REQ ((uint32_t)(1<<3))
  4369. #define IOMUXC_GPR_GPR4_CAN2_STOP_REQ ((uint32_t)(1<<2))
  4370. #define IOMUXC_GPR_GPR4_CAN1_STOP_REQ ((uint32_t)(1<<1))
  4371. #define IOMUXC_GPR_GPR4_EDMA_STOP_REQ ((uint32_t)(1<<0))
  4372. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2 ((uint32_t)(1<<29))
  4373. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT1 ((uint32_t)(1<<28))
  4374. #define IOMUXC_GPR_GPR5_ENET_EVENT3IN_SEL ((uint32_t)(1<<25))
  4375. #define IOMUXC_GPR_GPR5_GPT2_CAPIN2_SEL ((uint32_t)(1<<24))
  4376. #define IOMUXC_GPR_GPR5_GPT2_CAPIN1_SEL ((uint32_t)(1<<23))
  4377. #define IOMUXC_GPR_GPR5_WDOG2_MASK ((uint32_t)(1<<7))
  4378. #define IOMUXC_GPR_GPR5_WDOG1_MASK ((uint32_t)(1<<6))
  4379. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_19 ((uint32_t)(1<<31))
  4380. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_18 ((uint32_t)(1<<30))
  4381. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_17 ((uint32_t)(1<<29))
  4382. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_16 ((uint32_t)(1<<28))
  4383. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_15 ((uint32_t)(1<<27))
  4384. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_14 ((uint32_t)(1<<26))
  4385. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_13 ((uint32_t)(1<<25))
  4386. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_12 ((uint32_t)(1<<24))
  4387. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_11 ((uint32_t)(1<<23))
  4388. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_10 ((uint32_t)(1<<22))
  4389. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_9 ((uint32_t)(1<<21))
  4390. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_8 ((uint32_t)(1<<20))
  4391. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_7 ((uint32_t)(1<<19))
  4392. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_6 ((uint32_t)(1<<18))
  4393. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_5 ((uint32_t)(1<<17))
  4394. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_4 ((uint32_t)(1<<16))
  4395. #define IOMUXC_GPR_GPR6_QTIMER4_TRM3_INPUT_SEL ((uint32_t)(1<<15))
  4396. #define IOMUXC_GPR_GPR6_QTIMER4_TRM2_INPUT_SEL ((uint32_t)(1<<14))
  4397. #define IOMUXC_GPR_GPR6_QTIMER4_TRM1_INPUT_SEL ((uint32_t)(1<<13))
  4398. #define IOMUXC_GPR_GPR6_QTIMER4_TRM0_INPUT_SEL ((uint32_t)(1<<12))
  4399. #define IOMUXC_GPR_GPR6_QTIMER3_TRM3_INPUT_SEL ((uint32_t)(1<<11))
  4400. #define IOMUXC_GPR_GPR6_QTIMER3_TRM2_INPUT_SEL ((uint32_t)(1<<10))
  4401. #define IOMUXC_GPR_GPR6_QTIMER3_TRM1_INPUT_SEL ((uint32_t)(1<<9))
  4402. #define IOMUXC_GPR_GPR6_QTIMER3_TRM0_INPUT_SEL ((uint32_t)(1<<8))
  4403. #define IOMUXC_GPR_GPR6_QTIMER2_TRM3_INPUT_SEL ((uint32_t)(1<<7))
  4404. #define IOMUXC_GPR_GPR6_QTIMER2_TRM2_INPUT_SEL ((uint32_t)(1<<6))
  4405. #define IOMUXC_GPR_GPR6_QTIMER2_TRM1_INPUT_SEL ((uint32_t)(1<<5))
  4406. #define IOMUXC_GPR_GPR6_QTIMER2_TRM0_INPUT_SEL ((uint32_t)(1<<4))
  4407. #define IOMUXC_GPR_GPR6_QTIMER1_TRM3_INPUT_SEL ((uint32_t)(1<<3))
  4408. #define IOMUXC_GPR_GPR6_QTIMER1_TRM2_INPUT_SEL ((uint32_t)(1<<2))
  4409. #define IOMUXC_GPR_GPR6_QTIMER1_TRM1_INPUT_SEL ((uint32_t)(1<<1))
  4410. #define IOMUXC_GPR_GPR6_QTIMER1_TRM0_INPUT_SEL ((uint32_t)(1<<0))
  4411. #define IOMUXC_GPR_GPR7_LPUART8_STOP_ACK ((uint32_t)(1<<31))
  4412. #define IOMUXC_GPR_GPR7_LPUART7_STOP_ACK ((uint32_t)(1<<30))
  4413. #define IOMUXC_GPR_GPR7_LPUART6_STOP_ACK ((uint32_t)(1<<29))
  4414. #define IOMUXC_GPR_GPR7_LPUART5_STOP_ACK ((uint32_t)(1<<28))
  4415. #define IOMUXC_GPR_GPR7_LPUART4_STOP_ACK ((uint32_t)(1<<27))
  4416. #define IOMUXC_GPR_GPR7_LPUART3_STOP_ACK ((uint32_t)(1<<26))
  4417. #define IOMUXC_GPR_GPR7_LPUART2_STOP_ACK ((uint32_t)(1<<25))
  4418. #define IOMUXC_GPR_GPR7_LPUART1_STOP_ACK ((uint32_t)(1<<24))
  4419. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_ACK ((uint32_t)(1<<23))
  4420. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_ACK ((uint32_t)(1<<22))
  4421. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_ACK ((uint32_t)(1<<21))
  4422. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_ACK ((uint32_t)(1<<20))
  4423. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_ACK ((uint32_t)(1<<19))
  4424. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_ACK ((uint32_t)(1<<18))
  4425. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_ACK ((uint32_t)(1<<17))
  4426. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_ACK ((uint32_t)(1<<16))
  4427. #define IOMUXC_GPR_GPR7_LPUART8_STOP_REQ ((uint32_t)(1<<15))
  4428. #define IOMUXC_GPR_GPR7_LPUART7_STOP_REQ ((uint32_t)(1<<14))
  4429. #define IOMUXC_GPR_GPR7_LPUART6_STOP_REQ ((uint32_t)(1<<13))
  4430. #define IOMUXC_GPR_GPR7_LPUART5_STOP_REQ ((uint32_t)(1<<12))
  4431. #define IOMUXC_GPR_GPR7_LPUART4_STOP_REQ ((uint32_t)(1<<11))
  4432. #define IOMUXC_GPR_GPR7_LPUART3_STOP_REQ ((uint32_t)(1<<10))
  4433. #define IOMUXC_GPR_GPR7_LPUART2_STOP_REQ ((uint32_t)(1<<9))
  4434. #define IOMUXC_GPR_GPR7_LPUART1_STOP_REQ ((uint32_t)(1<<8))
  4435. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_REQ ((uint32_t)(1<<7))
  4436. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_REQ ((uint32_t)(1<<6))
  4437. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_REQ ((uint32_t)(1<<5))
  4438. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_REQ ((uint32_t)(1<<4))
  4439. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_REQ ((uint32_t)(1<<3))
  4440. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_REQ ((uint32_t)(1<<2))
  4441. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_REQ ((uint32_t)(1<<1))
  4442. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_REQ ((uint32_t)(1<<0))
  4443. #define IOMUXC_GPR_GPR8_LPUART8_IPG_DOZE ((uint32_t)(1<<31))
  4444. #define IOMUXC_GPR_GPR8_LPUART8_IPG_STOP_MODE ((uint32_t)(1<<30))
  4445. #define IOMUXC_GPR_GPR8_LPUART7_IPG_DOZE ((uint32_t)(1<<29))
  4446. #define IOMUXC_GPR_GPR8_LPUART7_IPG_STOP_MODE ((uint32_t)(1<<28))
  4447. #define IOMUXC_GPR_GPR8_LPUART6_IPG_DOZE ((uint32_t)(1<<27))
  4448. #define IOMUXC_GPR_GPR8_LPUART6_IPG_STOP_MODE ((uint32_t)(1<<26))
  4449. #define IOMUXC_GPR_GPR8_LPUART5_IPG_DOZE ((uint32_t)(1<<25))
  4450. #define IOMUXC_GPR_GPR8_LPUART5_IPG_STOP_MODE ((uint32_t)(1<<24))
  4451. #define IOMUXC_GPR_GPR8_LPUART4_IPG_DOZE ((uint32_t)(1<<23))
  4452. #define IOMUXC_GPR_GPR8_LPUART4_IPG_STOP_MODE ((uint32_t)(1<<22))
  4453. #define IOMUXC_GPR_GPR8_LPUART3_IPG_DOZE ((uint32_t)(1<<21))
  4454. #define IOMUXC_GPR_GPR8_LPUART3_IPG_STOP_MODE ((uint32_t)(1<<20))
  4455. #define IOMUXC_GPR_GPR8_LPUART2_IPG_DOZE ((uint32_t)(1<<19))
  4456. #define IOMUXC_GPR_GPR8_LPUART2_IPG_STOP_MODE ((uint32_t)(1<<18))
  4457. #define IOMUXC_GPR_GPR8_LPUART1_IPG_DOZE ((uint32_t)(1<<17))
  4458. #define IOMUXC_GPR_GPR8_LPUART1_IPG_STOP_MODE ((uint32_t)(1<<16))
  4459. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_DOZE ((uint32_t)(1<<15))
  4460. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_STOP_MODE ((uint32_t)(1<<14))
  4461. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_DOZE ((uint32_t)(1<<13))
  4462. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_STOP_MODE ((uint32_t)(1<<12))
  4463. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_DOZE ((uint32_t)(1<<11))
  4464. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_STOP_MODE ((uint32_t)(1<<10))
  4465. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_DOZE ((uint32_t)(1<<9))
  4466. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_STOP_MODE ((uint32_t)(1<<8))
  4467. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_DOZE ((uint32_t)(1<<7))
  4468. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_STOP_MODE ((uint32_t)(1<<6))
  4469. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_DOZE ((uint32_t)(1<<5))
  4470. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_STOP_MODE ((uint32_t)(1<<4))
  4471. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_DOZE ((uint32_t)(1<<3))
  4472. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_STOP_MODE ((uint32_t)(1<<2))
  4473. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_DOZE ((uint32_t)(1<<1))
  4474. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_STOP_MODE ((uint32_t)(1<<0))
  4475. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 25))
  4476. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_EN ((uint32_t)(1<<24))
  4477. #define IOMUXC_GPR_GPR10_LOCK_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<20))
  4478. #define IOMUXC_GPR_GPR10_LOCK_SEC_ERR_RESP ((uint32_t)(1<<18))
  4479. #define IOMUXC_GPR_GPR10_LOCK_DBG_EN ((uint32_t)(1<<17))
  4480. #define IOMUXC_GPR_GPR10_LOCK_NIDEN ((uint32_t)(1<<16))
  4481. #define IOMUXC_GPR_GPR10_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 9))
  4482. #define IOMUXC_GPR_GPR10_OCRAM_TZ_EN ((uint32_t)(1<<8))
  4483. #define IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<4))
  4484. #define IOMUXC_GPR_GPR10_SEC_ERR_RESP ((uint32_t)(1<<2))
  4485. #define IOMUXC_GPR_GPR10_DBG_EN ((uint32_t)(1<<1))
  4486. #define IOMUXC_GPR_GPR10_NIDEN ((uint32_t)(1<<0))
  4487. #define IOMUXC_GPR_GPR11_LOCK_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 24))
  4488. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 22))
  4489. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 20))
  4490. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 18))
  4491. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 16))
  4492. #define IOMUXC_GPR_GPR11_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 8))
  4493. #define IOMUXC_GPR_GPR11_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 6))
  4494. #define IOMUXC_GPR_GPR11_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 4))
  4495. #define IOMUXC_GPR_GPR11_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 2))
  4496. #define IOMUXC_GPR_GPR11_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 0))
  4497. #define IOMUXC_GPR_GPR12_ACMP_IPG_STOP_MODE ((uint32_t)(1<<4))
  4498. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_DOZE ((uint32_t)(1<<3))
  4499. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_STOP_MODE ((uint32_t)(1<<2))
  4500. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_DOZE ((uint32_t)(1<<1))
  4501. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_STOP_MODE ((uint32_t)(1<<0))
  4502. #define IOMUXC_GPR_GPR13_CACHE_USB ((uint32_t)(1<<13))
  4503. #define IOMUXC_GPR_GPR13_CACHE_ENET ((uint32_t)(1<<7))
  4504. #define IOMUXC_GPR_GPR13_AWCACHE_USDHC ((uint32_t)(1<<1))
  4505. #define IOMUXC_GPR_GPR13_ARCACHE_USDHC ((uint32_t)(1<<0))
  4506. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGDTCMSZ(n) ((uint32_t)(((n) & 0x0F) << 20))
  4507. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGITCMSZ(n) ((uint32_t)(((n) & 0x0F) << 16))
  4508. #define IOMUXC_GPR_GPR14_ACMP4_SAMPLE_SYNC_EN ((uint32_t)(1<<11))
  4509. #define IOMUXC_GPR_GPR14_ACMP3_SAMPLE_SYNC_EN ((uint32_t)(1<<10))
  4510. #define IOMUXC_GPR_GPR14_ACMP2_SAMPLE_SYNC_EN ((uint32_t)(1<<9))
  4511. #define IOMUXC_GPR_GPR14_ACMP1_SAMPLE_SYNC_EN ((uint32_t)(1<<8))
  4512. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_UP ((uint32_t)(1<<7))
  4513. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_UP ((uint32_t)(1<<6))
  4514. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_UP ((uint32_t)(1<<5))
  4515. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_UP ((uint32_t)(1<<4))
  4516. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_DN ((uint32_t)(1<<3))
  4517. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_DN ((uint32_t)(1<<2))
  4518. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_DN ((uint32_t)(1<<1))
  4519. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_DN ((uint32_t)(1<<0))
  4520. #define IOMUXC_GPR_GPR16_CM7_INIT_VTOR(n) ((uint32_t)(((n) & 0x1FFFFFF) << 7))
  4521. #define IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL ((uint32_t)(1<<2))
  4522. #define IOMUXC_GPR_GPR16_INIT_DTCM_EN ((uint32_t)(1<<1))
  4523. #define IOMUXC_GPR_GPR16_INIT_ITCM_EN ((uint32_t)(1<<0))
  4524. #define IOMUXC_GPR_GPR18_M7_APC_AC_R0_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4525. #define IOMUXC_GPR_GPR18_LOCK_M7_APC_AC_R0_BOT ((uint32_t)(1<<0))
  4526. #define IOMUXC_GPR_GPR19_M7_APC_AC_R0_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4527. #define IOMUXC_GPR_GPR19_LOCK_M7_APC_AC_R0_TOP ((uint32_t)(1<<0))
  4528. #define IOMUXC_GPR_GPR20_M7_APC_AC_R1_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4529. #define IOMUXC_GPR_GPR20_LOCK_M7_APC_AC_R1_BOT ((uint32_t)(1<<0))
  4530. #define IOMUXC_GPR_GPR21_M7_APC_AC_R1_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4531. #define IOMUXC_GPR_GPR21_LOCK_M7_APC_AC_R1_TOP ((uint32_t)(1<<0))
  4532. #define IOMUXC_GPR_GPR22_M7_APC_AC_R2_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4533. #define IOMUXC_GPR_GPR22_LOCK_M7_APC_AC_R2_BOT ((uint32_t)(1<<0))
  4534. #define IOMUXC_GPR_GPR23_M7_APC_AC_R2_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4535. #define IOMUXC_GPR_GPR23_LOCK_M7_APC_AC_R2_TOP ((uint32_t)(1<<0))
  4536. #define IOMUXC_GPR_GPR24_M7_APC_AC_R3_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4537. #define IOMUXC_GPR_GPR24_LOCK_M7_APC_AC_R3_BOT ((uint32_t)(1<<0))
  4538. #define IOMUXC_GPR_GPR25_M7_APC_AC_R3_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  4539. #define IOMUXC_GPR_GPR25_LOCK_M7_APC_AC_R3_TOP ((uint32_t)(1<<0))
  4540. // 34.5: page 1717
  4541. #define IMXRT_IOMUXC_SNVS (*(IMXRT_REGISTER32_t *)0x400A8000)
  4542. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset000)
  4543. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset004)
  4544. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset008)
  4545. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_TEST_MODE (IMXRT_IOMUXC_SNVS.offset00C)
  4546. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_POR_B (IMXRT_IOMUXC_SNVS.offset010)
  4547. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_ONOFF (IMXRT_IOMUXC_SNVS.offset014)
  4548. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset018)
  4549. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset01C)
  4550. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset020)
  4551. // 34.6: page 1732
  4552. #define IMXRT_IOMUXC_SNVS_GPR (*(IMXRT_REGISTER32_t *)0x400A4000)
  4553. #define IOMUXC_SNVS_GPR_GPR0 (IMXRT_IOMUXC_SNVS_GPR.offset000)
  4554. #define IOMUXC_SNVS_GPR_GPR1 (IMXRT_IOMUXC_SNVS_GPR.offset004)
  4555. #define IOMUXC_SNVS_GPR_GPR2 (IMXRT_IOMUXC_SNVS_GPR.offset008)
  4556. #define IOMUXC_SNVS_GPR_GPR3 (IMXRT_IOMUXC_SNVS_GPR.offset00C)
  4557. // 34.7: page 1736
  4558. #define IMXRT_IOMUXC (*(IMXRT_REGISTER32_t *)0x401F8000)
  4559. #define IMXRT_IOMUXC_b (*(IMXRT_REGISTER32_t *)0x401F8400)
  4560. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset014)
  4561. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset018)
  4562. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset01C)
  4563. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset020)
  4564. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset024)
  4565. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset028)
  4566. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset02C)
  4567. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset030)
  4568. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset034)
  4569. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset038)
  4570. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset03C)
  4571. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset040)
  4572. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset044)
  4573. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset048)
  4574. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset04C)
  4575. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset050)
  4576. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset054)
  4577. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset058)
  4578. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset05C)
  4579. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset060)
  4580. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset064)
  4581. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset068)
  4582. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset06C)
  4583. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset070)
  4584. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset074)
  4585. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset078)
  4586. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset07C)
  4587. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset080)
  4588. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset084)
  4589. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset088)
  4590. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset08C)
  4591. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset090)
  4592. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset094)
  4593. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset098)
  4594. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset09C)
  4595. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset0A0)
  4596. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset0A4)
  4597. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset0A8)
  4598. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset0AC)
  4599. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset0B0)
  4600. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset0B4)
  4601. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset0B8)
  4602. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset0BC)
  4603. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset0C0)
  4604. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset0C4)
  4605. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset0C8)
  4606. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset0CC)
  4607. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset0D0)
  4608. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset0D4)
  4609. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset0D8)
  4610. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset0DC)
  4611. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset0E0)
  4612. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset0E4)
  4613. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset0E8)
  4614. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset0EC)
  4615. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset0F0)
  4616. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset0F4)
  4617. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset0F8)
  4618. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset0FC)
  4619. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset100)
  4620. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset104)
  4621. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset108)
  4622. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset10C)
  4623. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset110)
  4624. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset114)
  4625. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset118)
  4626. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset11C)
  4627. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset120)
  4628. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset124)
  4629. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset128)
  4630. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset12C)
  4631. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset130)
  4632. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset134)
  4633. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset138)
  4634. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset13C)
  4635. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset140)
  4636. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset144)
  4637. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset148)
  4638. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset14C)
  4639. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset150)
  4640. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset154)
  4641. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset158)
  4642. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset15C)
  4643. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset160)
  4644. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset164)
  4645. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset168)
  4646. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset16C)
  4647. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset170)
  4648. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset174)
  4649. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset178)
  4650. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset17C)
  4651. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset180)
  4652. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset184)
  4653. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset188)
  4654. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset18C)
  4655. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset190)
  4656. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset194)
  4657. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset198)
  4658. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset19C)
  4659. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset1A0)
  4660. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset1A4)
  4661. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset1A8)
  4662. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset1AC)
  4663. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset1B0)
  4664. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset1B4)
  4665. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset1B8)
  4666. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset1BC)
  4667. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset1C0)
  4668. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset1C4)
  4669. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset1C8)
  4670. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset1CC)
  4671. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset1D0)
  4672. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset1D4)
  4673. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset1D8)
  4674. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset1DC)
  4675. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset1E0)
  4676. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset1E4)
  4677. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset1E8)
  4678. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset1EC)
  4679. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset1F0)
  4680. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset1F4)
  4681. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset1F8)
  4682. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset1FC)
  4683. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset200)
  4684. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset204)
  4685. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset208)
  4686. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset20C)
  4687. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset210)
  4688. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset214)
  4689. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset218)
  4690. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset21C)
  4691. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset220)
  4692. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset224)
  4693. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset228)
  4694. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset22C)
  4695. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset230)
  4696. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset234)
  4697. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset238)
  4698. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset23C)
  4699. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset240)
  4700. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset244)
  4701. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset248)
  4702. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset24C)
  4703. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset250)
  4704. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset254)
  4705. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset258)
  4706. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset25C)
  4707. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset260)
  4708. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset264)
  4709. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset268)
  4710. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset26C)
  4711. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset270)
  4712. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset274)
  4713. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset278)
  4714. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset27C)
  4715. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset280)
  4716. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset284)
  4717. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset288)
  4718. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset28C)
  4719. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset290)
  4720. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset294)
  4721. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset298)
  4722. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset29C)
  4723. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset2A0)
  4724. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset2A4)
  4725. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset2A8)
  4726. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset2AC)
  4727. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset2B0)
  4728. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset2B4)
  4729. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset2B8)
  4730. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset2BC)
  4731. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset2C0)
  4732. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset2C4)
  4733. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset2C8)
  4734. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset2CC)
  4735. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset2D0)
  4736. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset2D4)
  4737. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset2D8)
  4738. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset2DC)
  4739. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset2E0)
  4740. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset2E4)
  4741. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset2E8)
  4742. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset2EC)
  4743. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset2F0)
  4744. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset2F4)
  4745. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset2F8)
  4746. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset2FC)
  4747. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset300)
  4748. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset304)
  4749. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset308)
  4750. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset30C)
  4751. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset310)
  4752. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset314)
  4753. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset318)
  4754. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset31C)
  4755. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset320)
  4756. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset324)
  4757. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset328)
  4758. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset32C)
  4759. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset330)
  4760. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset334)
  4761. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset338)
  4762. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset33C)
  4763. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset340)
  4764. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset344)
  4765. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset348)
  4766. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset34C)
  4767. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset350)
  4768. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset354)
  4769. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset358)
  4770. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset35C)
  4771. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset360)
  4772. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset364)
  4773. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset368)
  4774. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset36C)
  4775. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset370)
  4776. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset374)
  4777. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset378)
  4778. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset37C)
  4779. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset380)
  4780. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset384)
  4781. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset388)
  4782. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset38C)
  4783. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset390)
  4784. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset394)
  4785. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset398)
  4786. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset39C)
  4787. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset3A0)
  4788. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset3A4)
  4789. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset3A8)
  4790. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset3AC)
  4791. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset3B0)
  4792. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset3B4)
  4793. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset3B8)
  4794. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset3BC)
  4795. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset3C0)
  4796. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset3C4)
  4797. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset3C8)
  4798. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset3CC)
  4799. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset3D0)
  4800. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset3D4)
  4801. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset3D8)
  4802. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset3DC)
  4803. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset3E0)
  4804. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset3E4)
  4805. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset3E8)
  4806. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset3EC)
  4807. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset3F0)
  4808. #define IOMUXC_ANATOP_USB_OTG_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F4)
  4809. #define IOMUXC_ANATOP_USB_UH1_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F8)
  4810. #define IOMUXC_CCM_PMIC_READY_SELECT_INPUT (IMXRT_IOMUXC.offset3FC)
  4811. #define IOMUXC_CSI_DATA02_SELECT_INPUT (IMXRT_IOMUXC_b.offset000)
  4812. #define IOMUXC_CSI_DATA03_SELECT_INPUT (IMXRT_IOMUXC_b.offset004)
  4813. #define IOMUXC_CSI_DATA04_SELECT_INPUT (IMXRT_IOMUXC_b.offset008)
  4814. #define IOMUXC_CSI_DATA05_SELECT_INPUT (IMXRT_IOMUXC_b.offset00C)
  4815. #define IOMUXC_CSI_DATA06_SELECT_INPUT (IMXRT_IOMUXC_b.offset010)
  4816. #define IOMUXC_CSI_DATA07_SELECT_INPUT (IMXRT_IOMUXC_b.offset014)
  4817. #define IOMUXC_CSI_DATA08_SELECT_INPUT (IMXRT_IOMUXC_b.offset018)
  4818. #define IOMUXC_CSI_DATA09_SELECT_INPUT (IMXRT_IOMUXC_b.offset01C)
  4819. #define IOMUXC_CSI_HSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset020)
  4820. #define IOMUXC_CSI_PIXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset024)
  4821. #define IOMUXC_CSI_VSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset028)
  4822. #define IOMUXC_ENET_IPG_CLK_RMII_SELECT_INPUT (IMXRT_IOMUXC_b.offset02C)
  4823. #define IOMUXC_ENET_MDIO_SELECT_INPUT (IMXRT_IOMUXC_b.offset030)
  4824. #define IOMUXC_ENET0_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset034)
  4825. #define IOMUXC_ENET1_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset038)
  4826. #define IOMUXC_ENET_RXEN_SELECT_INPUT (IMXRT_IOMUXC_b.offset03C)
  4827. #define IOMUXC_ENET_RXERR_SELECT_INPUT (IMXRT_IOMUXC_b.offset040)
  4828. #define IOMUXC_ENET0_TIMER_SELECT_INPUT (IMXRT_IOMUXC_b.offset044)
  4829. #define IOMUXC_ENET_TXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset048)
  4830. #define IOMUXC_FLEXCAN1_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset04C)
  4831. #define IOMUXC_FLEXCAN2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset050)
  4832. #define IOMUXC_FLEXPWM1_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset054)
  4833. #define IOMUXC_FLEXPWM1_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset058)
  4834. #define IOMUXC_FLEXPWM1_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset05C)
  4835. #define IOMUXC_FLEXPWM1_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset060)
  4836. #define IOMUXC_FLEXPWM1_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset064)
  4837. #define IOMUXC_FLEXPWM1_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset068)
  4838. #define IOMUXC_FLEXPWM1_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset06C)
  4839. #define IOMUXC_FLEXPWM1_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset070)
  4840. #define IOMUXC_FLEXPWM2_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset074)
  4841. #define IOMUXC_FLEXPWM2_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset078)
  4842. #define IOMUXC_FLEXPWM2_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset07C)
  4843. #define IOMUXC_FLEXPWM2_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset080)
  4844. #define IOMUXC_FLEXPWM2_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset084)
  4845. #define IOMUXC_FLEXPWM2_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset088)
  4846. #define IOMUXC_FLEXPWM2_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  4847. #define IOMUXC_FLEXPWM2_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset090)
  4848. #define IOMUXC_FLEXPWM4_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset094)
  4849. #define IOMUXC_FLEXPWM4_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset098)
  4850. #define IOMUXC_FLEXPWM4_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  4851. #define IOMUXC_FLEXPWM4_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A0)
  4852. #define IOMUXC_FLEXSPIA_DQS_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A4)
  4853. #define IOMUXC_FLEXSPIA_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A8)
  4854. #define IOMUXC_FLEXSPIA_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0AC)
  4855. #define IOMUXC_FLEXSPIA_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B0)
  4856. #define IOMUXC_FLEXSPIA_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B4)
  4857. #define IOMUXC_FLEXSPIB_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B8)
  4858. #define IOMUXC_FLEXSPIB_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0BC)
  4859. #define IOMUXC_FLEXSPIB_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C0)
  4860. #define IOMUXC_FLEXSPIB_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C4)
  4861. #define IOMUXC_FLEXSPIA_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C8)
  4862. #define IOMUXC_LPI2C1_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0CC)
  4863. #define IOMUXC_LPI2C1_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D0)
  4864. #define IOMUXC_LPI2C2_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D4)
  4865. #define IOMUXC_LPI2C2_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D8)
  4866. #define IOMUXC_LPI2C3_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0DC)
  4867. #define IOMUXC_LPI2C3_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E0)
  4868. #define IOMUXC_LPI2C4_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E4)
  4869. #define IOMUXC_LPI2C4_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E8)
  4870. #define IOMUXC_LPSPI1_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0EC)
  4871. #define IOMUXC_LPSPI1_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F0)
  4872. #define IOMUXC_LPSPI1_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F4)
  4873. #define IOMUXC_LPSPI1_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F8)
  4874. #define IOMUXC_LPSPI2_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0FC)
  4875. #define IOMUXC_LPSPI2_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset100)
  4876. #define IOMUXC_LPSPI2_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset104)
  4877. #define IOMUXC_LPSPI2_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset108)
  4878. #define IOMUXC_LPSPI3_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset10C)
  4879. #define IOMUXC_LPSPI3_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset110)
  4880. #define IOMUXC_LPSPI3_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset114)
  4881. #define IOMUXC_LPSPI3_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset118)
  4882. #define IOMUXC_LPSPI4_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset11C)
  4883. #define IOMUXC_LPSPI4_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset120)
  4884. #define IOMUXC_LPSPI4_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset124)
  4885. #define IOMUXC_LPSPI4_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset128)
  4886. #define IOMUXC_LPUART2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset12C)
  4887. #define IOMUXC_LPUART2_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset130)
  4888. #define IOMUXC_LPUART3_CTS_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset134)
  4889. #define IOMUXC_LPUART3_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset138)
  4890. #define IOMUXC_LPUART3_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset13C)
  4891. #define IOMUXC_LPUART4_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset140)
  4892. #define IOMUXC_LPUART4_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset144)
  4893. #define IOMUXC_LPUART5_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset148)
  4894. #define IOMUXC_LPUART5_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset14C)
  4895. #define IOMUXC_LPUART6_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset150)
  4896. #define IOMUXC_LPUART6_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset154)
  4897. #define IOMUXC_LPUART7_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset158)
  4898. #define IOMUXC_LPUART7_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset15C)
  4899. #define IOMUXC_LPUART8_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset160)
  4900. #define IOMUXC_LPUART8_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset164)
  4901. #define IOMUXC_NMI_GLUE_NMI_SELECT_INPUT (IMXRT_IOMUXC_b.offset168)
  4902. #define IOMUXC_QTIMER2_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset16C)
  4903. #define IOMUXC_QTIMER2_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset170)
  4904. #define IOMUXC_QTIMER2_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset174)
  4905. #define IOMUXC_QTIMER2_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset178)
  4906. #define IOMUXC_QTIMER3_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset17C)
  4907. #define IOMUXC_QTIMER3_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset180)
  4908. #define IOMUXC_QTIMER3_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset184)
  4909. #define IOMUXC_QTIMER3_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset188)
  4910. #define IOMUXC_SAI1_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset18C)
  4911. #define IOMUXC_SAI1_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset190)
  4912. #define IOMUXC_SAI1_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset194)
  4913. #define IOMUXC_SAI1_RX_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset198)
  4914. #define IOMUXC_SAI1_RX_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset19C)
  4915. #define IOMUXC_SAI1_RX_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A0)
  4916. #define IOMUXC_SAI1_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A4)
  4917. #define IOMUXC_SAI1_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A8)
  4918. #define IOMUXC_SAI1_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1AC)
  4919. #define IOMUXC_SAI2_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B0)
  4920. #define IOMUXC_SAI2_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B4)
  4921. #define IOMUXC_SAI2_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B8)
  4922. #define IOMUXC_SAI2_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1BC)
  4923. #define IOMUXC_SAI2_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C0)
  4924. #define IOMUXC_SAI2_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C4)
  4925. #define IOMUXC_SPDIF_IN_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C8)
  4926. #define IOMUXC_USB_OTG2_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1CC)
  4927. #define IOMUXC_USB_OTG1_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D0)
  4928. #define IOMUXC_USDHC1_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D4)
  4929. #define IOMUXC_USDHC1_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D8)
  4930. #define IOMUXC_USDHC2_CLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1DC)
  4931. #define IOMUXC_USDHC2_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E0)
  4932. #define IOMUXC_USDHC2_CMD_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E4)
  4933. #define IOMUXC_USDHC2_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E8)
  4934. #define IOMUXC_USDHC2_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset1EC)
  4935. #define IOMUXC_USDHC2_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F0)
  4936. #define IOMUXC_USDHC2_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F4)
  4937. #define IOMUXC_USDHC2_DATA4_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F8)
  4938. #define IOMUXC_USDHC2_DATA5_SELECT_INPUT (IMXRT_IOMUXC_b.offset1FC)
  4939. #define IOMUXC_USDHC2_DATA6_SELECT_INPUT (IMXRT_IOMUXC_b.offset200)
  4940. #define IOMUXC_USDHC2_DATA7_SELECT_INPUT (IMXRT_IOMUXC_b.offset204)
  4941. #define IOMUXC_USDHC2_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset208)
  4942. #define IOMUXC_XBAR1_IN02_SELECT_INPUT (IMXRT_IOMUXC_b.offset20C)
  4943. #define IOMUXC_XBAR1_IN03_SELECT_INPUT (IMXRT_IOMUXC_b.offset210)
  4944. #define IOMUXC_XBAR1_IN04_SELECT_INPUT (IMXRT_IOMUXC_b.offset214)
  4945. #define IOMUXC_XBAR1_IN05_SELECT_INPUT (IMXRT_IOMUXC_b.offset218)
  4946. #define IOMUXC_XBAR1_IN06_SELECT_INPUT (IMXRT_IOMUXC_b.offset21C)
  4947. #define IOMUXC_XBAR1_IN07_SELECT_INPUT (IMXRT_IOMUXC_b.offset220)
  4948. #define IOMUXC_XBAR1_IN08_SELECT_INPUT (IMXRT_IOMUXC_b.offset224)
  4949. #define IOMUXC_XBAR1_IN09_SELECT_INPUT (IMXRT_IOMUXC_b.offset228)
  4950. #define IOMUXC_XBAR1_IN17_SELECT_INPUT (IMXRT_IOMUXC_b.offset22C)
  4951. #define IOMUXC_XBAR1_IN18_SELECT_INPUT (IMXRT_IOMUXC_b.offset230)
  4952. #define IOMUXC_XBAR1_IN20_SELECT_INPUT (IMXRT_IOMUXC_b.offset234)
  4953. #define IOMUXC_XBAR1_IN22_SELECT_INPUT (IMXRT_IOMUXC_b.offset238)
  4954. #define IOMUXC_XBAR1_IN23_SELECT_INPUT (IMXRT_IOMUXC_b.offset23C)
  4955. #define IOMUXC_XBAR1_IN24_SELECT_INPUT (IMXRT_IOMUXC_b.offset240)
  4956. #define IOMUXC_XBAR1_IN14_SELECT_INPUT (IMXRT_IOMUXC_b.offset244)
  4957. #define IOMUXC_XBAR1_IN15_SELECT_INPUT (IMXRT_IOMUXC_b.offset248)
  4958. #define IOMUXC_XBAR1_IN16_SELECT_INPUT (IMXRT_IOMUXC_b.offset24C)
  4959. #define IOMUXC_XBAR1_IN25_SELECT_INPUT (IMXRT_IOMUXC_b.offset250)
  4960. #define IOMUXC_XBAR1_IN19_SELECT_INPUT (IMXRT_IOMUXC_b.offset254)
  4961. #define IOMUXC_XBAR1_IN21_SELECT_INPUT (IMXRT_IOMUXC_b.offset258)
  4962. #define IOMUXC_PAD_SRE ((uint32_t)(1<<0))
  4963. #define IOMUXC_PAD_DSE(n) ((uint32_t)(((n) & 0x07) << 3))
  4964. #define IOMUXC_PAD_SPEED(n) ((uint32_t)(((n) & 0x03) << 6))
  4965. #define IOMUXC_PAD_ODE ((uint32_t)(1<<11))
  4966. #define IOMUXC_PAD_PKE ((uint32_t)(1<<12))
  4967. #define IOMUXC_PAD_PUE ((uint32_t)(1<<13))
  4968. #define IOMUXC_PAD_PUS(n) ((uint32_t)(((n) & 0x03) << 14))
  4969. #define IOMUXC_PAD_HYS ((uint32_t)(1<<16))
  4970. // 35.6: page 2301
  4971. #define IMXRT_KPP (*(IMXRT_REGISTER16_t *)0x401FC000)
  4972. #define KPP_KPCR (IMXRT_KPP.offset000)
  4973. #define KPP_KPSR (IMXRT_KPP.offset002)
  4974. #define KPP_KDDR (IMXRT_KPP.offset004)
  4975. #define KPP_KPDR (IMXRT_KPP.offset006)
  4976. // 36.4: page 2325
  4977. #define IMXRT_LCDIF (*(IMXRT_REGISTER32_t *)0x402B8000)
  4978. #define LCDIF_CTRL (IMXRT_LCDIF.offset000)
  4979. #define LCDIF_CTRL_SET (IMXRT_LCDIF.offset004)
  4980. #define LCDIF_CTRL_CLR (IMXRT_LCDIF.offset008)
  4981. #define LCDIF_CTRL_TOG (IMXRT_LCDIF.offset00C)
  4982. #define LCDIF_CTRL1 (IMXRT_LCDIF.offset010)
  4983. #define LCDIF_CTRL1_SET (IMXRT_LCDIF.offset014)
  4984. #define LCDIF_CTRL1_CLR (IMXRT_LCDIF.offset018)
  4985. #define LCDIF_CTRL1_TOG (IMXRT_LCDIF.offset01C)
  4986. #define LCDIF_CTRL2 (IMXRT_LCDIF.offset020)
  4987. #define LCDIF_CTRL2_SET (IMXRT_LCDIF.offset024)
  4988. #define LCDIF_CTRL2_CLR (IMXRT_LCDIF.offset028)
  4989. #define LCDIF_CTRL2_TOG (IMXRT_LCDIF.offset02C)
  4990. #define LCDIF_TRANSFER_COUNT (IMXRT_LCDIF.offset030)
  4991. #define LCDIF_CUR_BUF (IMXRT_LCDIF.offset040)
  4992. #define LCDIF_NEXT_BUF (IMXRT_LCDIF.offset050)
  4993. #define LCDIF_VDCTRL0 (IMXRT_LCDIF.offset070)
  4994. #define LCDIF_VDCTRL0_SET (IMXRT_LCDIF.offset074)
  4995. #define LCDIF_VDCTRL0_CLR (IMXRT_LCDIF.offset078)
  4996. #define LCDIF_VDCTRL0_TOG (IMXRT_LCDIF.offset07C)
  4997. #define LCDIF_VDCTRL1 (IMXRT_LCDIF.offset080)
  4998. #define LCDIF_VDCTRL2 (IMXRT_LCDIF.offset090)
  4999. #define LCDIF_VDCTRL3 (IMXRT_LCDIF.offset0A0)
  5000. #define LCDIF_VDCTRL4 (IMXRT_LCDIF.offset0B0)
  5001. #define LCDIF_BM_ERROR_STAT (IMXRT_LCDIF.offset190)
  5002. #define LCDIF_CRC_STAT (IMXRT_LCDIF.offset1A0)
  5003. #define LCDIF_STAT (IMXRT_LCDIF.offset1B0)
  5004. #define LCDIF_THRES (IMXRT_LCDIF.offset200)
  5005. #define LCDIF_AS_CTRL (IMXRT_LCDIF.offset210)
  5006. #define LCDIF_AS_BUF (IMXRT_LCDIF.offset220)
  5007. #define LCDIF_AS_NEXT_BUF (IMXRT_LCDIF.offset230)
  5008. #define LCDIF_AS_CLRKEYLOW (IMXRT_LCDIF.offset240)
  5009. #define LCDIF_AS_CLRKEYHIGH (IMXRT_LCDIF.offset250)
  5010. #define LCDIF_PIGEONCTRL0 (IMXRT_LCDIF.offset380)
  5011. #define LCDIF_PIGEONCTRL0_SET (IMXRT_LCDIF.offset384)
  5012. #define LCDIF_PIGEONCTRL0_CLR (IMXRT_LCDIF.offset388)
  5013. #define LCDIF_PIGEONCTRL0_TOG (IMXRT_LCDIF.offset38C)
  5014. #define LCDIF_PIGEONCTRL1 (IMXRT_LCDIF.offset390)
  5015. #define LCDIF_PIGEONCTRL1_SET (IMXRT_LCDIF.offset394)
  5016. #define LCDIF_PIGEONCTRL1_CLR (IMXRT_LCDIF.offset398)
  5017. #define LCDIF_PIGEONCTRL1_TOG (IMXRT_LCDIF.offset39C)
  5018. #define LCDIF_PIGEONCTRL2 (IMXRT_LCDIF.offset3A0)
  5019. #define LCDIF_PIGEONCTRL2_SET (IMXRT_LCDIF.offset3A4)
  5020. #define LCDIF_PIGEONCTRL2_CLR (IMXRT_LCDIF.offset3A8)
  5021. #define LCDIF_PIGEONCTRL2_TOG (IMXRT_LCDIF.offset3AC)
  5022. #define IMXRT_LCDIF_b (*(IMXRT_REGISTER32_t *)0x402B8800)
  5023. #define LCDIF_PIGEON_0_0 (IMXRT_LCDIF_b.offset000)
  5024. #define LCDIF_PIGEON_0_1 (IMXRT_LCDIF_b.offset010)
  5025. #define LCDIF_PIGEON_0_2 (IMXRT_LCDIF_b.offset020)
  5026. #define LCDIF_PIGEON_1_0 (IMXRT_LCDIF_b.offset040)
  5027. #define LCDIF_PIGEON_1_1 (IMXRT_LCDIF_b.offset050)
  5028. #define LCDIF_PIGEON_1_2 (IMXRT_LCDIF_b.offset060)
  5029. #define LCDIF_PIGEON_2_0 (IMXRT_LCDIF_b.offset080)
  5030. #define LCDIF_PIGEON_2_1 (IMXRT_LCDIF_b.offset090)
  5031. #define LCDIF_PIGEON_2_2 (IMXRT_LCDIF_b.offset0A0)
  5032. #define LCDIF_PIGEON_3_0 (IMXRT_LCDIF_b.offset0C0)
  5033. #define LCDIF_PIGEON_3_1 (IMXRT_LCDIF_b.offset0D0)
  5034. #define LCDIF_PIGEON_3_2 (IMXRT_LCDIF_b.offset0E0)
  5035. #define LCDIF_PIGEON_4_0 (IMXRT_LCDIF_b.offset100)
  5036. #define LCDIF_PIGEON_4_1 (IMXRT_LCDIF_b.offset110)
  5037. #define LCDIF_PIGEON_4_2 (IMXRT_LCDIF_b.offset120)
  5038. #define LCDIF_PIGEON_5_0 (IMXRT_LCDIF_b.offset140)
  5039. #define LCDIF_PIGEON_5_1 (IMXRT_LCDIF_b.offset150)
  5040. #define LCDIF_PIGEON_5_2 (IMXRT_LCDIF_b.offset160)
  5041. #define LCDIF_PIGEON_6_0 (IMXRT_LCDIF_b.offset180)
  5042. #define LCDIF_PIGEON_6_1 (IMXRT_LCDIF_b.offset190)
  5043. #define LCDIF_PIGEON_6_2 (IMXRT_LCDIF_b.offset1A0)
  5044. #define LCDIF_PIGEON_7_0 (IMXRT_LCDIF_b.offset1C0)
  5045. #define LCDIF_PIGEON_7_1 (IMXRT_LCDIF_b.offset1D0)
  5046. #define LCDIF_PIGEON_7_2 (IMXRT_LCDIF_b.offset1E0)
  5047. #define LCDIF_PIGEON_8_0 (IMXRT_LCDIF_b.offset200)
  5048. #define LCDIF_PIGEON_8_1 (IMXRT_LCDIF_b.offset210)
  5049. #define LCDIF_PIGEON_8_2 (IMXRT_LCDIF_b.offset220)
  5050. #define LCDIF_PIGEON_9_0 (IMXRT_LCDIF_b.offset240)
  5051. #define LCDIF_PIGEON_9_1 (IMXRT_LCDIF_b.offset250)
  5052. #define LCDIF_PIGEON_9_2 (IMXRT_LCDIF_b.offset260)
  5053. #define LCDIF_PIGEON_10_0 (IMXRT_LCDIF_b.offset280)
  5054. #define LCDIF_PIGEON_10_1 (IMXRT_LCDIF_b.offset290)
  5055. #define LCDIF_PIGEON_10_2 (IMXRT_LCDIF_b.offset2A0)
  5056. #define LCDIF_PIGEON_11_0 (IMXRT_LCDIF_b.offset2C0)
  5057. #define LCDIF_PIGEON_11_1 (IMXRT_LCDIF_b.offset2D0)
  5058. #define LCDIF_PIGEON_11_2 (IMXRT_LCDIF_b.offset2E0)
  5059. // 37.4: page 2371
  5060. #if 0
  5061. typedef struct {
  5062. const uint32_t VERID;
  5063. const uint32_t PARAM;
  5064. const uint32_t unused1;
  5065. const uint32_t unused2;
  5066. volatile uint32_t MCR; (IMXRT_LPI2C1.offset010)
  5067. volatile uint32_t MSR; (IMXRT_LPI2C1.offset014)
  5068. volatile uint32_t MIER; (IMXRT_LPI2C1.offset018)
  5069. volatile uint32_t MDER; (IMXRT_LPI2C1.offset01C)
  5070. volatile uint32_t MCFGR0; (IMXRT_LPI2C1.offset020)
  5071. volatile uint32_t MCFGR1; (IMXRT_LPI2C1.offset024)
  5072. volatile uint32_t MCFGR2; (IMXRT_LPI2C1.offset028)
  5073. volatile uint32_t MCFGR3; (IMXRT_LPI2C1.offset02C)
  5074. volatile uint32_t unused3[4];
  5075. volatile uint32_t MDMR; (IMXRT_LPI2C1.offset040)
  5076. volatile uint32_t unused4;
  5077. volatile uint32_t MCCR0 ; (IMXRT_LPI2C1.offset048)
  5078. volatile uint32_t unused4;
  5079. volatile uint32_t MCCR1; (IMXRT_LPI2C1.offset050)
  5080. volatile uint32_t unused4;
  5081. volatile uint32_t MFCR; (IMXRT_LPI2C1.offset058)
  5082. volatile uint32_t MFSR; (IMXRT_LPI2C1.offset05C)
  5083. volatile uint32_t MTDR; (IMXRT_LPI2C1.offset060)
  5084. volatile uint32_t unused4[3];
  5085. volatile uint32_t MRDR; (IMXRT_LPI2C1.offset070)
  5086. volatile uint32_t unused4[39];
  5087. volatile uint32_t SCR; (IMXRT_LPI2C1.offset110)
  5088. volatile uint32_t SSR; (IMXRT_LPI2C1.offset114)
  5089. volatile uint32_t SIER; (IMXRT_LPI2C1.offset118)
  5090. volatile uint32_t SDER; (IMXRT_LPI2C1.offset11C)
  5091. volatile uint32_t unused4;
  5092. volatile uint32_t SCFGR1; (IMXRT_LPI2C1.offset124)
  5093. volatile uint32_t SCFGR2; (IMXRT_LPI2C1.offset128)
  5094. volatile uint32_t unused4[5];
  5095. volatile uint32_t SAMR; (IMXRT_LPI2C1.offset140)
  5096. volatile uint32_t unused4[3];
  5097. volatile uint32_t SASR; (IMXRT_LPI2C1.offset150)
  5098. volatile uint32_t unused4[3];
  5099. volatile uint32_t STAR; (IMXRT_LPI2C1.offset154)
  5100. volatile uint32_t unused4[3];
  5101. volatile uint32_t STDR; (IMXRT_LPI2C1.offset160)
  5102. volatile uint32_t unused4[3];
  5103. volatile uint32_t SRDR; (IMXRT_LPI2C1.offset170)
  5104. } IMXRT_LPI2C_t;
  5105. #define IMXRT_LPI2C1 (*(IMXRT_LPI2C_t *)0x403F0000)
  5106. #else
  5107. #define IMXRT_LPI2C1 (*(IMXRT_REGISTER32_t *)0x403F0000)
  5108. #define LPI2C1_VERID (IMXRT_LPI2C1.offset000)
  5109. #define LPI2C1_PARAM (IMXRT_LPI2C1.offset004)
  5110. #define LPI2C1_MCR (IMXRT_LPI2C1.offset010)
  5111. #define LPI2C1_MSR (IMXRT_LPI2C1.offset014)
  5112. #define LPI2C1_MIER (IMXRT_LPI2C1.offset018)
  5113. #define LPI2C1_MDER (IMXRT_LPI2C1.offset01C)
  5114. #define LPI2C1_MCFGR0 (IMXRT_LPI2C1.offset020)
  5115. #define LPI2C1_MCFGR1 (IMXRT_LPI2C1.offset024)
  5116. #define LPI2C1_MCFGR2 (IMXRT_LPI2C1.offset028)
  5117. #define LPI2C1_MCFGR3 (IMXRT_LPI2C1.offset02C)
  5118. #define LPI2C1_MDMR (IMXRT_LPI2C1.offset040)
  5119. #define LPI2C1_MCCR0 (IMXRT_LPI2C1.offset048)
  5120. #define LPI2C1_MCCR1 (IMXRT_LPI2C1.offset050)
  5121. #define LPI2C1_MFCR (IMXRT_LPI2C1.offset058)
  5122. #define LPI2C1_MFSR (IMXRT_LPI2C1.offset05C)
  5123. #define LPI2C1_MTDR (IMXRT_LPI2C1.offset060)
  5124. #define LPI2C1_MRDR (IMXRT_LPI2C1.offset070)
  5125. #define LPI2C1_SCR (IMXRT_LPI2C1.offset110)
  5126. #define LPI2C1_SSR (IMXRT_LPI2C1.offset114)
  5127. #define LPI2C1_SIER (IMXRT_LPI2C1.offset118)
  5128. #define LPI2C1_SDER (IMXRT_LPI2C1.offset11C)
  5129. #define LPI2C1_SCFGR1 (IMXRT_LPI2C1.offset124)
  5130. #define LPI2C1_SCFGR2 (IMXRT_LPI2C1.offset128)
  5131. #define LPI2C1_SAMR (IMXRT_LPI2C1.offset140)
  5132. #define LPI2C1_SASR (IMXRT_LPI2C1.offset150)
  5133. #define LPI2C1_STAR (IMXRT_LPI2C1.offset154)
  5134. #define LPI2C1_STDR (IMXRT_LPI2C1.offset160)
  5135. #define LPI2C1_SRDR (IMXRT_LPI2C1.offset170)
  5136. #define IMXRT_LPI2C2 (*(IMXRT_REGISTER32_t *)0x403F4000)
  5137. #define LPI2C2_VERID (IMXRT_LPI2C2.offset000)
  5138. #define LPI2C2_PARAM (IMXRT_LPI2C2.offset004)
  5139. #define LPI2C2_MCR (IMXRT_LPI2C2.offset010)
  5140. #define LPI2C2_MSR (IMXRT_LPI2C2.offset014)
  5141. #define LPI2C2_MIER (IMXRT_LPI2C2.offset018)
  5142. #define LPI2C2_MDER (IMXRT_LPI2C2.offset01C)
  5143. #define LPI2C2_MCFGR0 (IMXRT_LPI2C2.offset020)
  5144. #define LPI2C2_MCFGR1 (IMXRT_LPI2C2.offset024)
  5145. #define LPI2C2_MCFGR2 (IMXRT_LPI2C2.offset028)
  5146. #define LPI2C2_MCFGR3 (IMXRT_LPI2C2.offset02C)
  5147. #define LPI2C2_MDMR (IMXRT_LPI2C2.offset040)
  5148. #define LPI2C2_MCCR0 (IMXRT_LPI2C2.offset048)
  5149. #define LPI2C2_MCCR1 (IMXRT_LPI2C2.offset050)
  5150. #define LPI2C2_MFCR (IMXRT_LPI2C2.offset058)
  5151. #define LPI2C2_MFSR (IMXRT_LPI2C2.offset05C)
  5152. #define LPI2C2_MTDR (IMXRT_LPI2C2.offset060)
  5153. #define LPI2C2_MRDR (IMXRT_LPI2C2.offset070)
  5154. #define LPI2C2_SCR (IMXRT_LPI2C2.offset110)
  5155. #define LPI2C2_SSR (IMXRT_LPI2C2.offset114)
  5156. #define LPI2C2_SIER (IMXRT_LPI2C2.offset118)
  5157. #define LPI2C2_SDER (IMXRT_LPI2C2.offset11C)
  5158. #define LPI2C2_SCFGR1 (IMXRT_LPI2C2.offset124)
  5159. #define LPI2C2_SCFGR2 (IMXRT_LPI2C2.offset128)
  5160. #define LPI2C2_SAMR (IMXRT_LPI2C2.offset140)
  5161. #define LPI2C2_SASR (IMXRT_LPI2C2.offset150)
  5162. #define LPI2C2_STAR (IMXRT_LPI2C2.offset154)
  5163. #define LPI2C2_STDR (IMXRT_LPI2C2.offset160)
  5164. #define LPI2C2_SRDR (IMXRT_LPI2C2.offset170)
  5165. #define IMXRT_LPI2C3 (*(IMXRT_REGISTER32_t *)0x403F8000)
  5166. #define LPI2C3_VERID (IMXRT_LPI2C3.offset000)
  5167. #define LPI2C3_PARAM (IMXRT_LPI2C3.offset004)
  5168. #define LPI2C3_MCR (IMXRT_LPI2C3.offset010)
  5169. #define LPI2C3_MSR (IMXRT_LPI2C3.offset014)
  5170. #define LPI2C3_MIER (IMXRT_LPI2C3.offset018)
  5171. #define LPI2C3_MDER (IMXRT_LPI2C3.offset01C)
  5172. #define LPI2C3_MCFGR0 (IMXRT_LPI2C3.offset020)
  5173. #define LPI2C3_MCFGR1 (IMXRT_LPI2C3.offset024)
  5174. #define LPI2C3_MCFGR2 (IMXRT_LPI2C3.offset028)
  5175. #define LPI2C3_MCFGR3 (IMXRT_LPI2C3.offset02C)
  5176. #define LPI2C3_MDMR (IMXRT_LPI2C3.offset040)
  5177. #define LPI2C3_MCCR0 (IMXRT_LPI2C3.offset048)
  5178. #define LPI2C3_MCCR1 (IMXRT_LPI2C3.offset050)
  5179. #define LPI2C3_MFCR (IMXRT_LPI2C3.offset058)
  5180. #define LPI2C3_MFSR (IMXRT_LPI2C3.offset05C)
  5181. #define LPI2C3_MTDR (IMXRT_LPI2C3.offset060)
  5182. #define LPI2C3_MRDR (IMXRT_LPI2C3.offset070)
  5183. #define LPI2C3_SCR (IMXRT_LPI2C3.offset110)
  5184. #define LPI2C3_SSR (IMXRT_LPI2C3.offset114)
  5185. #define LPI2C3_SIER (IMXRT_LPI2C3.offset118)
  5186. #define LPI2C3_SDER (IMXRT_LPI2C3.offset11C)
  5187. #define LPI2C3_SCFGR1 (IMXRT_LPI2C3.offset124)
  5188. #define LPI2C3_SCFGR2 (IMXRT_LPI2C3.offset128)
  5189. #define LPI2C3_SAMR (IMXRT_LPI2C3.offset140)
  5190. #define LPI2C3_SASR (IMXRT_LPI2C3.offset150)
  5191. #define LPI2C3_STAR (IMXRT_LPI2C3.offset154)
  5192. #define LPI2C3_STDR (IMXRT_LPI2C3.offset160)
  5193. #define LPI2C3_SRDR (IMXRT_LPI2C3.offset170)
  5194. #define IMXRT_LPI2C4 (*(IMXRT_REGISTER32_t *)0x403FC000)
  5195. #define LPI2C4_VERID (IMXRT_LPI2C4.offset000)
  5196. #define LPI2C4_PARAM (IMXRT_LPI2C4.offset004)
  5197. #define LPI2C4_MCR (IMXRT_LPI2C4.offset010)
  5198. #define LPI2C4_MSR (IMXRT_LPI2C4.offset014)
  5199. #define LPI2C4_MIER (IMXRT_LPI2C4.offset018)
  5200. #define LPI2C4_MDER (IMXRT_LPI2C4.offset01C)
  5201. #define LPI2C4_MCFGR0 (IMXRT_LPI2C4.offset020)
  5202. #define LPI2C4_MCFGR1 (IMXRT_LPI2C4.offset024)
  5203. #define LPI2C4_MCFGR2 (IMXRT_LPI2C4.offset028)
  5204. #define LPI2C4_MCFGR3 (IMXRT_LPI2C4.offset02C)
  5205. #define LPI2C4_MDMR (IMXRT_LPI2C4.offset040)
  5206. #define LPI2C4_MCCR0 (IMXRT_LPI2C4.offset048)
  5207. #define LPI2C4_MCCR1 (IMXRT_LPI2C4.offset050)
  5208. #define LPI2C4_MFCR (IMXRT_LPI2C4.offset058)
  5209. #define LPI2C4_MFSR (IMXRT_LPI2C4.offset05C)
  5210. #define LPI2C4_MTDR (IMXRT_LPI2C4.offset060)
  5211. #define LPI2C4_MRDR (IMXRT_LPI2C4.offset070)
  5212. #define LPI2C4_SCR (IMXRT_LPI2C4.offset110)
  5213. #define LPI2C4_SSR (IMXRT_LPI2C4.offset114)
  5214. #define LPI2C4_SIER (IMXRT_LPI2C4.offset118)
  5215. #define LPI2C4_SDER (IMXRT_LPI2C4.offset11C)
  5216. #define LPI2C4_SCFGR1 (IMXRT_LPI2C4.offset124)
  5217. #define LPI2C4_SCFGR2 (IMXRT_LPI2C4.offset128)
  5218. #define LPI2C4_SAMR (IMXRT_LPI2C4.offset140)
  5219. #define LPI2C4_SASR (IMXRT_LPI2C4.offset150)
  5220. #define LPI2C4_STAR (IMXRT_LPI2C4.offset154)
  5221. #define LPI2C4_STDR (IMXRT_LPI2C4.offset160)
  5222. #define LPI2C4_SRDR (IMXRT_LPI2C4.offset170)
  5223. #endif
  5224. #define LPI2C_MCR_RRF ((uint32_t)(1<<9))
  5225. #define LPI2C_MCR_RTF ((uint32_t)(1<<8))
  5226. #define LPI2C_MCR_DBGEN ((uint32_t)(1<<3))
  5227. #define LPI2C_MCR_DOZEN ((uint32_t)(1<<2))
  5228. #define LPI2C_MCR_RST ((uint32_t)(1<<1))
  5229. #define LPI2C_MCR_MEN ((uint32_t)(1<<0))
  5230. #define LPI2C_MSR_BBF ((uint32_t)(1<<25))
  5231. #define LPI2C_MSR_MBF ((uint32_t)(1<<24))
  5232. #define LPI2C_MSR_DMF ((uint32_t)(1<<14))
  5233. #define LPI2C_MSR_PLTF ((uint32_t)(1<<13))
  5234. #define LPI2C_MSR_FEF ((uint32_t)(1<<12))
  5235. #define LPI2C_MSR_ALF ((uint32_t)(1<<11))
  5236. #define LPI2C_MSR_NDF ((uint32_t)(1<<10))
  5237. #define LPI2C_MSR_SDF ((uint32_t)(1<<9))
  5238. #define LPI2C_MSR_EPF ((uint32_t)(1<<8))
  5239. #define LPI2C_MSR_RDF ((uint32_t)(1<<1))
  5240. #define LPI2C_MSR_TDF ((uint32_t)(1<<0))
  5241. #define LPI2C_MIER_DMIE ((uint32_t)(1<<14))
  5242. #define LPI2C_MIER_PLTIE ((uint32_t)(1<<13))
  5243. #define LPI2C_MIER_FEIE ((uint32_t)(1<<12))
  5244. #define LPI2C_MIER_ALIE ((uint32_t)(1<<11))
  5245. #define LPI2C_MIER_NDIE ((uint32_t)(1<<10))
  5246. #define LPI2C_MIER_SDIE ((uint32_t)(1<<9))
  5247. #define LPI2C_MIER_EPIE ((uint32_t)(1<<8))
  5248. #define LPI2C_MIER_RDIE ((uint32_t)(1<<1))
  5249. #define LPI2C_MIER_TDIE ((uint32_t)(1<<0))
  5250. #define LPI2C_MDER_RDDE ((uint32_t)(1<<1))
  5251. #define LPI2C_MDER_TDDE ((uint32_t)(1<<0))
  5252. #define LPI2C_MCFGR0_RDMO ((uint32_t)(1<<9))
  5253. #define LPI2C_MCFGR0_CIRFIFO ((uint32_t)(1<<8))
  5254. #define LPI2C_MCFGR0_HRSEL ((uint32_t)(1<<2))
  5255. #define LPI2C_MCFGR0_HRPOL ((uint32_t)(1<<1))
  5256. #define LPI2C_MCFGR0_HREN ((uint32_t)(1<<0))
  5257. #define LPI2C_MCFGR1_PINCFG(n) ((uint32_t)(((n) & 0x07) << 24))
  5258. #define LPI2C_MCFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  5259. #define LPI2C_MCFGR1_TIMECFG ((uint32_t)(1<<10))
  5260. #define LPI2C_MCFGR1_IGNACK ((uint32_t)(1<<9))
  5261. #define LPI2C_MCFGR1_AUTOSTOP ((uint32_t)(1<<8))
  5262. #define LPI2C_MCFGR1_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 0))
  5263. #define LPI2C_MCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  5264. #define LPI2C_MCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  5265. #define LPI2C_MCFGR2_BUSIDLE(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5266. #define LPI2C_MCFGR3_PINLOW(n) ((uint32_t)(((n) & 0xFFF) << 8))
  5267. #define LPI2C_MDMR_MATCH1(n) ((uint32_t)(((n) & 0xFF) << 16))
  5268. #define LPI2C_MDMR_MATCH0(n) ((uint32_t)(((n) & 0xFF) << 0))
  5269. #define LPI2C_MCCR0_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  5270. #define LPI2C_MCCR0_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  5271. #define LPI2C_MCCR0_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  5272. #define LPI2C_MCCR0_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5273. #define LPI2C_MCCR1_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  5274. #define LPI2C_MCCR1_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  5275. #define LPI2C_MCCR1_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  5276. #define LPI2C_MCCR1_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5277. #define LPI2C_MFCR_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  5278. #define LPI2C_MFCR_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  5279. #define LPI2C_MFSR_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  5280. #define LPI2C_MFSR_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  5281. #define LPI2C_MTDR_CMD(n) ((uint32_t)(((n) & 0x07) << 8))
  5282. #define LPI2C_MTDR_CMD_TRANSMIT ((uint32_t)(0 << 8))
  5283. #define LPI2C_MTDR_CMD_RECEIVE ((uint32_t)(1 << 8))
  5284. #define LPI2C_MTDR_CMD_STOP ((uint32_t)(2 << 8))
  5285. #define LPI2C_MTDR_CMD_DISCARD ((uint32_t)(3 << 8))
  5286. #define LPI2C_MTDR_CMD_START ((uint32_t)(4 << 8))
  5287. #define LPI2C_MTDR_CMD_START_NACK ((uint32_t)(5 << 8))
  5288. #define LPI2C_MTDR_CMD_HS_START ((uint32_t)(6 << 8))
  5289. #define LPI2C_MTDR_CMD_HS_START_NAcK ((uint32_t)(7 << 8))
  5290. #define LPI2C_MTDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  5291. #define LPI2C_MRDR_RXEMPTY ((uint32_t)(1<<14))
  5292. #define LPI2C_MRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  5293. #define LPI2C_SCR_RRF ((uint32_t)(1<<9))
  5294. #define LPI2C_SCR_RTF ((uint32_t)(1<<8))
  5295. #define LPI2C_SCR_FILTDZ ((uint32_t)(1<<5))
  5296. #define LPI2C_SCR_FILTEN ((uint32_t)(1<<4))
  5297. #define LPI2C_SCR_RST ((uint32_t)(1<<1))
  5298. #define LPI2C_SCR_SEN ((uint32_t)(1<<0))
  5299. #define LPI2C_SSR_BBF ((uint32_t)(1<<25))
  5300. #define LPI2C_SSR_SBF ((uint32_t)(1<<24))
  5301. #define LPI2C_SSR_SARF ((uint32_t)(1<<15))
  5302. #define LPI2C_SSR_GCF ((uint32_t)(1<<14))
  5303. #define LPI2C_SSR_AM1F ((uint32_t)(1<<13))
  5304. #define LPI2C_SSR_AM0F ((uint32_t)(1<<12))
  5305. #define LPI2C_SSR_FEF ((uint32_t)(1<<11))
  5306. #define LPI2C_SSR_BEF ((uint32_t)(1<<10))
  5307. #define LPI2C_SSR_SDF ((uint32_t)(1<<9))
  5308. #define LPI2C_SSR_RSF ((uint32_t)(1<<8))
  5309. #define LPI2C_SSR_TAF ((uint32_t)(1<<3))
  5310. #define LPI2C_SSR_AVF ((uint32_t)(1<<2))
  5311. #define LPI2C_SSR_RDF ((uint32_t)(1<<1))
  5312. #define LPI2C_SSR_TDF ((uint32_t)(1<<0))
  5313. #define LPI2C_SIER_SARIE ((uint32_t)(1<<25))
  5314. #define LPI2C_SIER_GCIE ((uint32_t)(1<<24))
  5315. #define LPI2C_SIER_AM1F ((uint32_t)(1<<13))
  5316. #define LPI2C_SIER_AM0IE ((uint32_t)(1<<12))
  5317. #define LPI2C_SIER_FEIE ((uint32_t)(1<<11))
  5318. #define LPI2C_SIER_BEIE ((uint32_t)(1<<10))
  5319. #define LPI2C_SIER_SDIE ((uint32_t)(1<<9))
  5320. #define LPI2C_SIER_RSIE ((uint32_t)(1<<8))
  5321. #define LPI2C_SIER_TAIE ((uint32_t)(1<<3))
  5322. #define LPI2C_SIER_AVIE ((uint32_t)(1<<2))
  5323. #define LPI2C_SIER_RDIE ((uint32_t)(1<<1))
  5324. #define LPI2C_SIER_TDIE ((uint32_t)(1<<0))
  5325. #define LPI2C_SDER_AVDE ((uint32_t)(1<<2))
  5326. #define LPI2C_SDER_RDDE ((uint32_t)(1<<1))
  5327. #define LPI2C_SDER_TDDE ((uint32_t)(1<<0))
  5328. #define LPI2C_SCFGR1_ADDRCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  5329. #define LPI2C_SCFGR1_HSMEN ((uint32_t)(1<<13))
  5330. #define LPI2C_SCFGR1_IGNACK ((uint32_t)(1<<12))
  5331. #define LPI2C_SCFGR1_RXCFG ((uint32_t)(1<<11))
  5332. #define LPI2C_SCFGR1_TXCFG ((uint32_t)(1<<10))
  5333. #define LPI2C_SCFGR1_SAEN ((uint32_t)(1<<9))
  5334. #define LPI2C_SCFGR1_GCEN ((uint32_t)(1<<8))
  5335. #define LPI2C_SCFGR1_ACKSTALL ((uint32_t)(1<<3))
  5336. #define LPI2C_SCFGR1_TXDSTALL ((uint32_t)(1<<2))
  5337. #define LPI2C_SCFGR1_RXSTALL ((uint32_t)(1<<1))
  5338. #define LPI2C_SCFGR1_ADRSTALL ((uint32_t)(1<<0))
  5339. #define LPI2C_SCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  5340. #define LPI2C_SCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  5341. #define LPI2C_SCFGR2_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 8))
  5342. #define LPI2C_SCFGR2_CLKHOLD(n) ((uint32_t)(((n) & 0x0F) << 0))
  5343. #define LPI2C_SAMR_ADDR1(n) ((uint32_t)(((n) & 0x7F) << 17))
  5344. #define LPI2C_SAMR_ADDR0(n) ((uint32_t)(((n) & 0x7F) << 1))
  5345. #define LPI2C_SASR_ANV ((uint32_t)(1<<14))
  5346. #define LPI2C_SASR_RADDR(n) ((uint32_t)(((n) & 0x7FF) << 0))
  5347. #define LPI2C_STAR_TXNACK ((uint32_t)(1<<0))
  5348. #define LPI2C_STDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  5349. #define LPI2C_SRDR_SOF ((uint32_t)(1<<15))
  5350. #define LPI2C_SRDR_RXEMPTY ((uint32_t)(1<<14))
  5351. #define LPI2C_SRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  5352. // 38.3.5.2: page 2422
  5353. #define IMXRT_LPSPI1 (*(IMXRT_REGISTER32_t *)0x40394000)
  5354. #define LPSPI1_VERID (IMXRT_LPSPI1.offset000)
  5355. #define LPSPI1_PARAM (IMXRT_LPSPI1.offset004)
  5356. #define LPSPI1_CR (IMXRT_LPSPI1.offset010)
  5357. #define LPSPI1_SR (IMXRT_LPSPI1.offset014)
  5358. #define LPSPI1_IER (IMXRT_LPSPI1.offset018)
  5359. #define LPSPI1_DER (IMXRT_LPSPI1.offset01C)
  5360. #define LPSPI1_CFGR0 (IMXRT_LPSPI1.offset020)
  5361. #define LPSPI1_CFGR1 (IMXRT_LPSPI1.offset024)
  5362. #define LPSPI1_DMR0 (IMXRT_LPSPI1.offset030)
  5363. #define LPSPI1_DMR1 (IMXRT_LPSPI1.offset034)
  5364. #define LPSPI1_CCR (IMXRT_LPSPI1.offset040)
  5365. #define LPSPI1_FCR (IMXRT_LPSPI1.offset058)
  5366. #define LPSPI1_FSR (IMXRT_LPSPI1.offset05C)
  5367. #define LPSPI1_TCR (IMXRT_LPSPI1.offset060)
  5368. #define LPSPI1_TDR (IMXRT_LPSPI1.offset064)
  5369. #define LPSPI1_RSR (IMXRT_LPSPI1.offset070)
  5370. #define LPSPI1_RDR (IMXRT_LPSPI1.offset074)
  5371. #define IMXRT_LPSPI2 (*(IMXRT_REGISTER32_t *)0x40398000)
  5372. #define LPSPI2_VERID (IMXRT_LPSPI2.offset000)
  5373. #define LPSPI2_PARAM (IMXRT_LPSPI2.offset004)
  5374. #define LPSPI2_CR (IMXRT_LPSPI2.offset010)
  5375. #define LPSPI2_SR (IMXRT_LPSPI2.offset014)
  5376. #define LPSPI2_IER (IMXRT_LPSPI2.offset018)
  5377. #define LPSPI2_DER (IMXRT_LPSPI2.offset01C)
  5378. #define LPSPI2_CFGR0 (IMXRT_LPSPI2.offset020)
  5379. #define LPSPI2_CFGR1 (IMXRT_LPSPI2.offset024)
  5380. #define LPSPI2_DMR0 (IMXRT_LPSPI2.offset030)
  5381. #define LPSPI2_DMR1 (IMXRT_LPSPI2.offset034)
  5382. #define LPSPI2_CCR (IMXRT_LPSPI2.offset040)
  5383. #define LPSPI2_FCR (IMXRT_LPSPI2.offset058)
  5384. #define LPSPI2_FSR (IMXRT_LPSPI2.offset05C)
  5385. #define LPSPI2_TCR (IMXRT_LPSPI2.offset060)
  5386. #define LPSPI2_TDR (IMXRT_LPSPI2.offset064)
  5387. #define LPSPI2_RSR (IMXRT_LPSPI2.offset070)
  5388. #define LPSPI2_RDR (IMXRT_LPSPI2.offset074)
  5389. #define IMXRT_LPSPI3 (*(IMXRT_REGISTER32_t *)0x4039C000)
  5390. #define LPSPI3_VERID (IMXRT_LPSPI3.offset000)
  5391. #define LPSPI3_PARAM (IMXRT_LPSPI3.offset004)
  5392. #define LPSPI3_CR (IMXRT_LPSPI3.offset010)
  5393. #define LPSPI3_SR (IMXRT_LPSPI3.offset014)
  5394. #define LPSPI3_IER (IMXRT_LPSPI3.offset018)
  5395. #define LPSPI3_DER (IMXRT_LPSPI3.offset01C)
  5396. #define LPSPI3_CFGR0 (IMXRT_LPSPI3.offset020)
  5397. #define LPSPI3_CFGR1 (IMXRT_LPSPI3.offset024)
  5398. #define LPSPI3_DMR0 (IMXRT_LPSPI3.offset030)
  5399. #define LPSPI3_DMR1 (IMXRT_LPSPI3.offset034)
  5400. #define LPSPI3_CCR (IMXRT_LPSPI3.offset040)
  5401. #define LPSPI3_FCR (IMXRT_LPSPI3.offset058)
  5402. #define LPSPI3_FSR (IMXRT_LPSPI3.offset05C)
  5403. #define LPSPI3_TCR (IMXRT_LPSPI3.offset060)
  5404. #define LPSPI3_TDR (IMXRT_LPSPI3.offset064)
  5405. #define LPSPI3_RSR (IMXRT_LPSPI3.offset070)
  5406. #define LPSPI3_RDR (IMXRT_LPSPI3.offset074)
  5407. #define IMXRT_LPSPI4 (*(IMXRT_REGISTER32_t *)0x403A0000)
  5408. #define LPSPI4_VERID (IMXRT_LPSPI4.offset000)
  5409. #define LPSPI4_PARAM (IMXRT_LPSPI4.offset004)
  5410. #define LPSPI4_CR (IMXRT_LPSPI4.offset010)
  5411. #define LPSPI4_SR (IMXRT_LPSPI4.offset014)
  5412. #define LPSPI4_IER (IMXRT_LPSPI4.offset018)
  5413. #define LPSPI4_DER (IMXRT_LPSPI4.offset01C)
  5414. #define LPSPI4_CFGR0 (IMXRT_LPSPI4.offset020)
  5415. #define LPSPI4_CFGR1 (IMXRT_LPSPI4.offset024)
  5416. #define LPSPI4_DMR0 (IMXRT_LPSPI4.offset030)
  5417. #define LPSPI4_DMR1 (IMXRT_LPSPI4.offset034)
  5418. #define LPSPI4_CCR (IMXRT_LPSPI4.offset040)
  5419. #define LPSPI4_FCR (IMXRT_LPSPI4.offset058)
  5420. #define LPSPI4_FSR (IMXRT_LPSPI4.offset05C)
  5421. #define LPSPI4_TCR (IMXRT_LPSPI4.offset060)
  5422. #define LPSPI4_TDR (IMXRT_LPSPI4.offset064)
  5423. #define LPSPI4_RSR (IMXRT_LPSPI4.offset070)
  5424. #define LPSPI4_RDR (IMXRT_LPSPI4.offset074)
  5425. #define LPSPI_CR_RRF ((uint32_t)(1<<9))
  5426. #define LPSPI_CR_RTF ((uint32_t)(1<<8))
  5427. #define LPSPI_CR_DBGEN ((uint32_t)(1<<3))
  5428. #define LPSPI_CR_DOZEN ((uint32_t)(1<<2))
  5429. #define LPSPI_CR_RST ((uint32_t)(1<<1))
  5430. #define LPSPI_CR_MEN ((uint32_t)(1<<0))
  5431. #define LPSPI_SR_MBF ((uint32_t)(1<<24))
  5432. #define LPSPI_SR_DMF ((uint32_t)(1<<13))
  5433. #define LPSPI_SR_REF ((uint32_t)(1<<12))
  5434. #define LPSPI_SR_TEF ((uint32_t)(1<<11))
  5435. #define LPSPI_SR_TCF ((uint32_t)(1<<10))
  5436. #define LPSPI_SR_FCF ((uint32_t)(1<<9))
  5437. #define LPSPI_SR_WCF ((uint32_t)(1<<8))
  5438. #define LPSPI_SR_RDF ((uint32_t)(1<<1))
  5439. #define LPSPI_SR_TDF ((uint32_t)(1<<0))
  5440. #define LPSPI_IER_DMIE ((uint32_t)(1<<13))
  5441. #define LPSPI_IER_REIE ((uint32_t)(1<<12))
  5442. #define LPSPI_IER_TEIE ((uint32_t)(1<<11))
  5443. #define LPSPI_IER_TCIE ((uint32_t)(1<<10))
  5444. #define LPSPI_IER_FCIE ((uint32_t)(1<<9))
  5445. #define LPSPI_IER_WCIE ((uint32_t)(1<<8))
  5446. #define LPSPI_IER_RDIE ((uint32_t)(1<<1))
  5447. #define LPSPI_IER_TDIE ((uint32_t)(1<<0))
  5448. #define LPSPI_DER_RDDE ((uint32_t)(1<<1))
  5449. #define LPSPI_DER_TDDE ((uint32_t)(1<<0))
  5450. #define LPSPI_CFGR0_RDMO ((uint32_t)(1<<9))
  5451. #define LPSPI_CFGR0_CIRFIFO ((uint32_t)(1<<8))
  5452. #define LPSPI_CFGR0_HRSEL ((uint32_t)(1<<2))
  5453. #define LPSPI_CFGR0_HRPOL ((uint32_t)(1<<1))
  5454. #define LPSPI_CFGR0_HREN ((uint32_t)(1<<0))
  5455. #define LPSPI_CFGR1_PCSCFG ((uint32_t)(1<<27))
  5456. #define LPSPI_CFGR1_OUTCFG ((uint32_t)(1<<26))
  5457. #define LPSPI_CFGR1_PINCFG(n) ((uint32_t)(((n) & 0x03) << 24))
  5458. #define LPSPI_CFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  5459. #define LPSPI_CFGR1_PCSPOL(n) ((uint32_t)(((n) & 0x0F) << 8))
  5460. #define LPSPI_CFGR1_NOSTALL ((uint32_t)(1<<3))
  5461. #define LPSPI_CFGR1_AUTOPCS ((uint32_t)(1<<2))
  5462. #define LPSPI_CFGR1_SAMPLE ((uint32_t)(1<<1))
  5463. #define LPSPI_CFGR1_MASTER ((uint32_t)(1<<0))
  5464. #define LPSPI_CCR_SCKPCS(n) ((uint32_t)(((n) & 0xFF) << 24))
  5465. #define LPSPI_CCR_PCSSCK(n) ((uint32_t)(((n) & 0xFF) << 16))
  5466. #define LPSPI_CCR_DBT(n) ((uint32_t)(((n) & 0xFF) << 8))
  5467. #define LPSPI_CCR_SCKDIV(n) ((uint32_t)(((n) & 0xFF) << 0))
  5468. #define LPSPI_FCR_RXWATER(n) ((uint32_t)(((n) & 0x0F) << 16))
  5469. #define LPSPI_FCR_TXWATER(n) ((uint32_t)(((n) & 0x0F) << 0))
  5470. #define LPSPI_FSR_RXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 16))
  5471. #define LPSPI_FSR_TXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 0))
  5472. #define LPSPI_TCR_CPOL ((uint32_t)(1<<31))
  5473. #define LPSPI_TCR_CPHA ((uint32_t)(1<<30))
  5474. #define LPSPI_TCR_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 27))
  5475. #define LPSPI_TCR_PCS(n) ((uint32_t)(((n) & 0x03) << 24))
  5476. #define LPSPI_TCR_LSBF ((uint32_t)(1<<23))
  5477. #define LPSPI_TCR_BYSW ((uint32_t)(1<<22))
  5478. #define LPSPI_TCR_CONT ((uint32_t)(1<<21))
  5479. #define LPSPI_TCR_CONTC ((uint32_t)(1<<20))
  5480. #define LPSPI_TCR_RXMSK ((uint32_t)(1<<19))
  5481. #define LPSPI_TCR_TXMSK ((uint32_t)(1<<18))
  5482. #define LPSPI_TCR_WIDTH(n) ((uint32_t)(((n) & 0x03) << 16))
  5483. #define LPSPI_TCR_FRAMESZ(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5484. #define LPSPI_RSR_RXEMPTY ((uint32_t)(1<<1))
  5485. #define LPSPI_RSR_SOF ((uint32_t)(1<<0))
  5486. // 39.3.1.1: page 2466
  5487. typedef struct {
  5488. const uint32_t VERID;
  5489. const uint32_t PARAM;
  5490. volatile uint32_t GLOBAL;
  5491. volatile uint32_t PINCFG;
  5492. volatile uint32_t BAUD;
  5493. volatile uint32_t STAT;
  5494. volatile uint32_t CTRL;
  5495. volatile uint32_t DATA;
  5496. volatile uint32_t MATCH;
  5497. volatile uint32_t MODIR;
  5498. volatile uint32_t FIFO;
  5499. volatile uint32_t WATER;
  5500. } IMXRT_LPUART_t;
  5501. #define IMXRT_LPUART1 (*(IMXRT_LPUART_t *)0x40184000)
  5502. #define LPUART1_VERID (IMXRT_LPUART1.VERID)
  5503. #define LPUART1_PARAM (IMXRT_LPUART1.PARAM)
  5504. #define LPUART1_GLOBAL (IMXRT_LPUART1.GLOBAL)
  5505. #define LPUART1_PINCFG (IMXRT_LPUART1.PINCFG)
  5506. #define LPUART1_BAUD (IMXRT_LPUART1.BAUD)
  5507. #define LPUART1_STAT (IMXRT_LPUART1.STAT)
  5508. #define LPUART1_CTRL (IMXRT_LPUART1.CTRL)
  5509. #define LPUART1_DATA (IMXRT_LPUART1.DATA)
  5510. #define LPUART1_MATCH (IMXRT_LPUART1.MATCH)
  5511. #define LPUART1_MODIR (IMXRT_LPUART1.MODIR)
  5512. #define LPUART1_FIFO (IMXRT_LPUART1.FIFO)
  5513. #define LPUART1_WATER (IMXRT_LPUART1.WATER)
  5514. #define IMXRT_LPUART2 (*(IMXRT_LPUART_t *)0x40188000)
  5515. #define LPUART2_VERID (IMXRT_LPUART2.VERID)
  5516. #define LPUART2_PARAM (IMXRT_LPUART2.PARAM)
  5517. #define LPUART2_GLOBAL (IMXRT_LPUART2.GLOBAL)
  5518. #define LPUART2_PINCFG (IMXRT_LPUART2.PINCFG)
  5519. #define LPUART2_BAUD (IMXRT_LPUART2.BAUD)
  5520. #define LPUART2_STAT (IMXRT_LPUART2.STAT)
  5521. #define LPUART2_CTRL (IMXRT_LPUART2.CTRL)
  5522. #define LPUART2_DATA (IMXRT_LPUART2.DATA)
  5523. #define LPUART2_MATCH (IMXRT_LPUART2.MATCH)
  5524. #define LPUART2_MODIR (IMXRT_LPUART2.MODIR)
  5525. #define LPUART2_FIFO (IMXRT_LPUART2.FIFO)
  5526. #define LPUART2_WATER (IMXRT_LPUART2.WATER)
  5527. #define IMXRT_LPUART3 (*(IMXRT_LPUART_t *)0x4018C000)
  5528. #define LPUART3_VERID (IMXRT_LPUART3.VERID)
  5529. #define LPUART3_PARAM (IMXRT_LPUART3.PARAM)
  5530. #define LPUART3_GLOBAL (IMXRT_LPUART3.GLOBAL)
  5531. #define LPUART3_PINCFG (IMXRT_LPUART3.PINCFG)
  5532. #define LPUART3_BAUD (IMXRT_LPUART3.BAUD)
  5533. #define LPUART3_STAT (IMXRT_LPUART3.STAT)
  5534. #define LPUART3_CTRL (IMXRT_LPUART3.CTRL)
  5535. #define LPUART3_DATA (IMXRT_LPUART3.DATA)
  5536. #define LPUART3_MATCH (IMXRT_LPUART3.MATCH)
  5537. #define LPUART3_MODIR (IMXRT_LPUART3.MODIR)
  5538. #define LPUART3_FIFO (IMXRT_LPUART3.FIFO)
  5539. #define LPUART3_WATER (IMXRT_LPUART3.WATER)
  5540. #define IMXRT_LPUART4 (*(IMXRT_LPUART_t *)0x40190000)
  5541. #define LPUART4_VERID (IMXRT_LPUART4.VERID)
  5542. #define LPUART4_PARAM (IMXRT_LPUART4.PARAM)
  5543. #define LPUART4_GLOBAL (IMXRT_LPUART4.GLOBAL)
  5544. #define LPUART4_PINCFG (IMXRT_LPUART4.PINCFG)
  5545. #define LPUART4_BAUD (IMXRT_LPUART4.BAUD)
  5546. #define LPUART4_STAT (IMXRT_LPUART4.STAT)
  5547. #define LPUART4_CTRL (IMXRT_LPUART4.CTRL)
  5548. #define LPUART4_DATA (IMXRT_LPUART4.DATA)
  5549. #define LPUART4_MATCH (IMXRT_LPUART4.MATCH)
  5550. #define LPUART4_MODIR (IMXRT_LPUART4.MODIR)
  5551. #define LPUART4_FIFO (IMXRT_LPUART4.FIFO)
  5552. #define LPUART4_WATER (IMXRT_LPUART4.WATER)
  5553. #define IMXRT_LPUART5 (*(IMXRT_LPUART_t *)0x40194000)
  5554. #define LPUART5_VERID (IMXRT_LPUART5.VERID)
  5555. #define LPUART5_PARAM (IMXRT_LPUART5.PARAM)
  5556. #define LPUART5_GLOBAL (IMXRT_LPUART5.GLOBAL)
  5557. #define LPUART5_PINCFG (IMXRT_LPUART5.PINCFG)
  5558. #define LPUART5_BAUD (IMXRT_LPUART5.BAUD)
  5559. #define LPUART5_STAT (IMXRT_LPUART5.STAT)
  5560. #define LPUART5_CTRL (IMXRT_LPUART5.CTRL)
  5561. #define LPUART5_DATA (IMXRT_LPUART5.DATA)
  5562. #define LPUART5_MATCH (IMXRT_LPUART5.MATCH)
  5563. #define LPUART5_MODIR (IMXRT_LPUART5.MODIR)
  5564. #define LPUART5_FIFO (IMXRT_LPUART5.FIFO)
  5565. #define LPUART5_WATER (IMXRT_LPUART5.WATER)
  5566. #define IMXRT_LPUART6 (*(IMXRT_LPUART_t *)0x40198000)
  5567. #define LPUART6_VERID (IMXRT_LPUART6.VERID)
  5568. #define LPUART6_PARAM (IMXRT_LPUART6.PARAM)
  5569. #define LPUART6_GLOBAL (IMXRT_LPUART6.GLOBAL)
  5570. #define LPUART6_PINCFG (IMXRT_LPUART6.PINCFG)
  5571. #define LPUART6_BAUD (IMXRT_LPUART6.BAUD)
  5572. #define LPUART6_STAT (IMXRT_LPUART6.STAT)
  5573. #define LPUART6_CTRL (IMXRT_LPUART6.CTRL)
  5574. #define LPUART6_DATA (IMXRT_LPUART6.DATA)
  5575. #define LPUART6_MATCH (IMXRT_LPUART6.MATCH)
  5576. #define LPUART6_MODIR (IMXRT_LPUART6.MODIR)
  5577. #define LPUART6_FIFO (IMXRT_LPUART6.FIFO)
  5578. #define LPUART6_WATER (IMXRT_LPUART6.WATER)
  5579. #define IMXRT_LPUART7 (*(IMXRT_LPUART_t *)0x4019C000)
  5580. #define LPUART7_VERID (IMXRT_LPUART7.VERID)
  5581. #define LPUART7_PARAM (IMXRT_LPUART7.PARAM)
  5582. #define LPUART7_GLOBAL (IMXRT_LPUART7.GLOBAL)
  5583. #define LPUART7_PINCFG (IMXRT_LPUART7.PINCFG)
  5584. #define LPUART7_BAUD (IMXRT_LPUART7.BAUD)
  5585. #define LPUART7_STAT (IMXRT_LPUART7.STAT)
  5586. #define LPUART7_CTRL (IMXRT_LPUART7.CTRL)
  5587. #define LPUART7_DATA (IMXRT_LPUART7.DATA)
  5588. #define LPUART7_MATCH (IMXRT_LPUART7.MATCH)
  5589. #define LPUART7_MODIR (IMXRT_LPUART7.MODIR)
  5590. #define LPUART7_FIFO (IMXRT_LPUART7.FIFO)
  5591. #define LPUART7_WATER (IMXRT_LPUART7.WATER)
  5592. #define IMXRT_LPUART8 (*(IMXRT_LPUART_t *)0x401A0000)
  5593. #define LPUART8_VERID (IMXRT_LPUART8.VERID)
  5594. #define LPUART8_PARAM (IMXRT_LPUART8.PARAM)
  5595. #define LPUART8_GLOBAL (IMXRT_LPUART8.GLOBAL)
  5596. #define LPUART8_PINCFG (IMXRT_LPUART8.PINCFG)
  5597. #define LPUART8_BAUD (IMXRT_LPUART8.BAUD)
  5598. #define LPUART8_STAT (IMXRT_LPUART8.STAT)
  5599. #define LPUART8_CTRL (IMXRT_LPUART8.CTRL)
  5600. #define LPUART8_DATA (IMXRT_LPUART8.DATA)
  5601. #define LPUART8_MATCH (IMXRT_LPUART8.MATCH)
  5602. #define LPUART8_MODIR (IMXRT_LPUART8.MODIR)
  5603. #define LPUART8_FIFO (IMXRT_LPUART8.FIFO)
  5604. #define LPUART8_WATER (IMXRT_LPUART8.WATER)
  5605. #define LPUART_VERID_MAJOR(n) ((uint32_t)(((n) & 0xFF) << 24))
  5606. #define LPUART_VERID_MINOR(n) ((uint32_t)(((n) & 0xFF) << 16))
  5607. #define LPUART_VERID_FEATURE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  5608. #define LPUART_PARAM_RXFIFO(n) ((uint32_t)(((n) & 0xFF) << 8))
  5609. #define LPUART_PARAM_TXFIFO(n) ((uint32_t)(((n) & 0xFF) << 0))
  5610. #define LPUART_GLOBAL_RST ((uint32_t)(1<<1))
  5611. #define LPUART_PINCFG_TRGSEL(n) ((uint32_t)(((n) & 0x03) << 0))
  5612. #define LPUART_BAUD_MAEN1 ((uint32_t)(1<<31))
  5613. #define LPUART_BAUD_MAEN2 ((uint32_t)(1<<30))
  5614. #define LPUART_BAUD_M10 ((uint32_t)(1<<29))
  5615. #define LPUART_BAUD_OSR(n) ((uint32_t)(((n) & 0x1F) << 24))
  5616. #define LPUART_BAUD_TDMAE ((uint32_t)(1<<23))
  5617. #define LPUART_BAUD_RDMAE ((uint32_t)(1<<21))
  5618. #define LPUART_BAUD_MATCFG(n) ((uint32_t)(((n) & 0x03) << 18))
  5619. #define LPUART_BAUD_BOTHEDGE ((uint32_t)(1<<17))
  5620. #define LPUART_BAUD_RESYNCDIS ((uint32_t)(1<<16))
  5621. #define LPUART_BAUD_LBKDIE ((uint32_t)(1<<15))
  5622. #define LPUART_BAUD_RXEDGIE ((uint32_t)(1<<14))
  5623. #define LPUART_BAUD_SBNS ((uint32_t)(1<<13))
  5624. #define LPUART_BAUD_SBR(n) ((uint32_t)(((n) & 0x01FFF) << 0))
  5625. #define LPUART_STAT_LBKDIF ((uint32_t)(1<<31))
  5626. #define LPUART_STAT_RXEDGIF ((uint32_t)(1<<30))
  5627. #define LPUART_STAT_MSBF ((uint32_t)(1<<29))
  5628. #define LPUART_STAT_RXINV ((uint32_t)(1<<28))
  5629. #define LPUART_STAT_RWUID ((uint32_t)(1<<27))
  5630. #define LPUART_STAT_BRK13 ((uint32_t)(1<<26))
  5631. #define LPUART_STAT_LBKDE ((uint32_t)(1<<25))
  5632. #define LPUART_STAT_RAF ((uint32_t)(1<<24))
  5633. #define LPUART_STAT_TDRE ((uint32_t)(1<<23))
  5634. #define LPUART_STAT_TC ((uint32_t)(1<<22))
  5635. #define LPUART_STAT_RDRF ((uint32_t)(1<<21))
  5636. #define LPUART_STAT_IDLE ((uint32_t)(1<<20))
  5637. #define LPUART_STAT_OR ((uint32_t)(1<<19))
  5638. #define LPUART_STAT_NF ((uint32_t)(1<<18))
  5639. #define LPUART_STAT_FE ((uint32_t)(1<<17))
  5640. #define LPUART_STAT_PF ((uint32_t)(1<<16))
  5641. #define LPUART_STAT_MA1F ((uint32_t)(1<<15))
  5642. #define LPUART_STAT_MA2F ((uint32_t)(1<<14))
  5643. #define LPUART_CTRL_R8T9 ((uint32_t)(1<<31))
  5644. #define LPUART_CTRL_R9T8 ((uint32_t)(1<<30))
  5645. #define LPUART_CTRL_TXDIR ((uint32_t)(1<<29))
  5646. #define LPUART_CTRL_TXINV ((uint32_t)(1<<28))
  5647. #define LPUART_CTRL_ORIE ((uint32_t)(1<<27))
  5648. #define LPUART_CTRL_NEIE ((uint32_t)(1<<26))
  5649. #define LPUART_CTRL_FEIE ((uint32_t)(1<<25))
  5650. #define LPUART_CTRL_PEIE ((uint32_t)(1<<24))
  5651. #define LPUART_CTRL_TIE ((uint32_t)(1<<23))
  5652. #define LPUART_CTRL_TCIE ((uint32_t)(1<<22))
  5653. #define LPUART_CTRL_RIE ((uint32_t)(1<<21))
  5654. #define LPUART_CTRL_ILIE ((uint32_t)(1<<20))
  5655. #define LPUART_CTRL_TE ((uint32_t)(1<<19))
  5656. #define LPUART_CTRL_RE ((uint32_t)(1<<18))
  5657. #define LPUART_CTRL_RWU ((uint32_t)(1<<17))
  5658. #define LPUART_CTRL_SBK ((uint32_t)(1<<16))
  5659. #define LPUART_CTRL_MA1IE ((uint32_t)(1<<15))
  5660. #define LPUART_CTRL_MA2IE ((uint32_t)(1<<14))
  5661. #define LPUART_CTRL_M7 ((uint32_t)(1<<11))
  5662. #define LPUART_CTRL_IDLECFG(n) ((uint32_t)(((n) & 0x07) << 8))
  5663. #define LPUART_CTRL_LOOPS ((uint32_t)(1<<7))
  5664. #define LPUART_CTRL_DOZEEN ((uint32_t)(1<<6))
  5665. #define LPUART_CTRL_RSRC ((uint32_t)(1<<5))
  5666. #define LPUART_CTRL_M ((uint32_t)(1<<4))
  5667. #define LPUART_CTRL_WAKE ((uint32_t)(1<<3))
  5668. #define LPUART_CTRL_ILT ((uint32_t)(1<<2))
  5669. #define LPUART_CTRL_PE ((uint32_t)(1<<1))
  5670. #define LPUART_CTRL_PT ((uint32_t)(1<<0))
  5671. #define LPUART_DATA_NOISY ((uint32_t)(1<<15))
  5672. #define LPUART_DATA_PARITYE ((uint32_t)(1<<14))
  5673. #define LPUART_DATA_FRETSC ((uint32_t)(1<<13))
  5674. #define LPUART_DATA_RXEMPT ((uint32_t)(1<<12))
  5675. #define LPUART_DATA_IDLINE ((uint32_t)(1<<11))
  5676. #define LPUART_MATCH_MA2(n) ((uint32_t)(((n) & 0x3FF) << 16))
  5677. #define LPUART_MATCH_MA1(n) ((uint32_t)(((n) & 0x3FF) << 0))
  5678. #define LPUART_MODIR_IREN ((uint32_t)(1<<18))
  5679. #define LPUART_MODIR_TNP(n) ((uint32_t)(((n) & 0x03) << 16))
  5680. #define LPUART_MODIR_RTSWATER(n) ((uint32_t)(((n) & 0x03) << 8))
  5681. #define LPUART_MODIR_TXCTSSRC ((uint32_t)(1<<5))
  5682. #define LPUART_MODIR_TXCTSC ((uint32_t)(1<<4))
  5683. #define LPUART_MODIR_RXRTSE ((uint32_t)(1<<3))
  5684. #define LPUART_MODIR_TXRTSPOL ((uint32_t)(1<<2))
  5685. #define LPUART_MODIR_TXRTSE ((uint32_t)(1<<1))
  5686. #define LPUART_MODIR_TXCTSE ((uint32_t)(1<<0))
  5687. #define LPUART_FIFO_TXEMPT ((uint32_t)(1<<23))
  5688. #define LPUART_FIFO_RXEMPT ((uint32_t)(1<<22))
  5689. #define LPUART_FIFO_TXOF ((uint32_t)(1<<17))
  5690. #define LPUART_FIFO_RXUF ((uint32_t)(1<<16))
  5691. #define LPUART_FIFO_TXFLUSH ((uint32_t)(1<<15))
  5692. #define LPUART_FIFO_RXFLUSH ((uint32_t)(1<<14))
  5693. #define LPUART_FIFO_RXIDEN(n) ((uint32_t)(((n) & 0x07) << 10))
  5694. #define LPUART_FIFO_TXOFE ((uint32_t)(1<<9))
  5695. #define LPUART_FIFO_RXUFE ((uint32_t)(1<<8))
  5696. #define LPUART_FIFO_TXFE ((uint32_t)(1<<7))
  5697. #define LPUART_FIFO_TXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 4))
  5698. #define LPUART_FIFO_RXFE ((uint32_t)(1<<3))
  5699. #define LPUART_FIFO_RXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 0))
  5700. #define LPUART_WATER_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 24))
  5701. #define LPUART_WATER_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  5702. #define LPUART_WATER_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 8))
  5703. #define LPUART_WATER_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  5704. // 40.4: page 2495
  5705. // 41.3: page 2498 TODO...
  5706. // 42.5.1.1: page 2509
  5707. #define IMXRT_OCOTP (*(IMXRT_REGISTER32_t *)0x401F4000)
  5708. #define HW_OCOTP_CTRL (IMXRT_OCOTP.offset000)
  5709. #define HW_OCOTP_CTRL_SET (IMXRT_OCOTP.offset004)
  5710. #define HW_OCOTP_CTRL_CLR (IMXRT_OCOTP.offset008)
  5711. #define HW_OCOTP_CTRL_TOG (IMXRT_OCOTP.offset00C)
  5712. #define HW_OCOTP_TIMING (IMXRT_OCOTP.offset010)
  5713. #define HW_OCOTP_DATA (IMXRT_OCOTP.offset020)
  5714. #define HW_OCOTP_READ_CTRL (IMXRT_OCOTP.offset030)
  5715. #define HW_OCOTP_READ_FUSE_DATA (IMXRT_OCOTP.offset040)
  5716. #define HW_OCOTP_SW_STICKY (IMXRT_OCOTP.offset050)
  5717. #define HW_OCOTP_SCS (IMXRT_OCOTP.offset060)
  5718. #define HW_OCOTP_SCS_SET (IMXRT_OCOTP.offset064)
  5719. #define HW_OCOTP_SCS_CLR (IMXRT_OCOTP.offset068)
  5720. #define HW_OCOTP_SCS_TOG (IMXRT_OCOTP.offset06C)
  5721. #define HW_OCOTP_VERSION (IMXRT_OCOTP.offset090)
  5722. #define HW_OCOTP_TIMING2 (IMXRT_OCOTP.offset100)
  5723. #define HW_OCOTP_CTRL_WR_UNLOCK(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  5724. #define HW_OCOTP_CTRL_RELOAD_SHADOWS ((uint32_t)(1<<10))
  5725. #define HW_OCOTP_CTRL_ERROR ((uint32_t)(1<<9))
  5726. #define HW_OCOTP_CTRL_BUSY ((uint32_t)(1<<8))
  5727. #define HW_OCOTP_CTRL_ADDR(n) ((uint32_t)(((n) & 0x3F) << 0))
  5728. #define HW_OCOTP_TIMING_WAIT(n) ((uint32_t)(((n) & 0x3F) << 22))
  5729. #define HW_OCOTP_TIMING_STROBE_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  5730. #define HW_OCOTP_TIMING_RELAX(n) ((uint32_t)(((n) & 0x0F) << 12))
  5731. #define HW_OCOTP_TIMING_STROBE_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5732. #define HW_OCOTP_READ_CTRL_READ_FUSE ((uint32_t)(1<<0))
  5733. #define HW_OCOTP_SW_STICKY_JTAG_BLOCK_RELEASE ((uint32_t)(1<<4))
  5734. #define HW_OCOTP_SW_STICKY_BLOCK_ROM_PART ((uint32_t)(1<<3))
  5735. #define HW_OCOTP_SW_STICKY_FIELD_RETURN_LOCK ((uint32_t)(1<<2))
  5736. #define HW_OCOTP_SW_STICKY_SRK_REVOKE_LOCK ((uint32_t)(1<<1))
  5737. #define HW_OCOTP_SW_STICKY_BLOCK_DTCP_KEY ((uint32_t)(1<<0))
  5738. #define HW_OCOTP_SCS_LOCK ((uint32_t)(1<<31))
  5739. #define HW_OCOTP_SCS_HAB_JDE ((uint32_t)(1<<0))
  5740. #define HW_OCOTP_TIMING2_RELAX1(n) ((uint32_t)(((n) & 0x7F) << 24))
  5741. #define HW_OCOTP_TIMING2_RELAX_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  5742. #define HW_OCOTP_TIMING2_RELAX_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5743. #define IMXRT_OCOTP_VALUE (*(IMXRT_REGISTER32_t *)0x401F4400)
  5744. #define HW_OCOTP_LOCK (IMXRT_OCOTP_VALUE.offset000)
  5745. #define HW_OCOTP_CFG0 (IMXRT_OCOTP_VALUE.offset010)
  5746. #define HW_OCOTP_CFG1 (IMXRT_OCOTP_VALUE.offset020)
  5747. #define HW_OCOTP_CFG2 (IMXRT_OCOTP_VALUE.offset030)
  5748. #define HW_OCOTP_CFG3 (IMXRT_OCOTP_VALUE.offset040)
  5749. #define HW_OCOTP_CFG4 (IMXRT_OCOTP_VALUE.offset050)
  5750. #define HW_OCOTP_CFG5 (IMXRT_OCOTP_VALUE.offset060)
  5751. #define HW_OCOTP_CFG6 (IMXRT_OCOTP_VALUE.offset070)
  5752. #define HW_OCOTP_MEM0 (IMXRT_OCOTP_VALUE.offset080)
  5753. #define HW_OCOTP MEM1 (IMXRT_OCOTP_VALUE.offset090)
  5754. #define HW_OCOTP_MEM2 (IMXRT_OCOTP_VALUE.offset0A0)
  5755. #define HW_OCOTP_MEM3 (IMXRT_OCOTP_VALUE.offset0B0)
  5756. #define HW_OCOTP_MEM4 (IMXRT_OCOTP_VALUE.offset0C0)
  5757. #define HW_OCOTP_ANA0 (IMXRT_OCOTP_VALUE.offset0D0)
  5758. #define HW_OCOTP_ANA1 (IMXRT_OCOTP_VALUE.offset0E0)
  5759. #define HW_OCOTP_ANA2 (IMXRT_OCOTP_VALUE.offset0F0)
  5760. #define HW_OCOTP_SRK0 (IMXRT_OCOTP_VALUE.offset180)
  5761. #define HW_OCOTP_SRK1 (IMXRT_OCOTP_VALUE.offset190)
  5762. #define HW_OCOTP_SRK2 (IMXRT_OCOTP_VALUE.offset1A0)
  5763. #define HW_OCOTP_SRK3 (IMXRT_OCOTP_VALUE.offset1B0)
  5764. #define HW_OCOTP_SRK4 (IMXRT_OCOTP_VALUE.offset1C0)
  5765. #define HW_OCOTP_SRK5 (IMXRT_OCOTP_VALUE.offset1D0)
  5766. #define HW_OCOTP_SRK6 (IMXRT_OCOTP_VALUE.offset1E0)
  5767. #define HW_OCOTP_SRK7 (IMXRT_OCOTP_VALUE.offset1F0)
  5768. #define HW_OCOTP_SJC_RESP0 (IMXRT_OCOTP_VALUE.offset200)
  5769. #define HW_OCOTP_SJC_RESP1 (IMXRT_OCOTP_VALUE.offset210)
  5770. #define HW_OCOTP_MAC0 (IMXRT_OCOTP_VALUE.offset220)
  5771. #define HW_OCOTP_MAC1 (IMXRT_OCOTP_VALUE.offset230)
  5772. #define HW_OCOTP_MAC2 (IMXRT_OCOTP_VALUE.offset240)
  5773. #define HW_OCOTP_GP3 (IMXRT_OCOTP_VALUE.offset250)
  5774. #define HW_OCOTP_GP1 (IMXRT_OCOTP_VALUE.offset260)
  5775. #define HW_OCOTP_GP2 (IMXRT_OCOTP_VALUE.offset270)
  5776. #define HW_OCOTP_SW_GP1 (IMXRT_OCOTP_VALUE.offset280)
  5777. #define HW_OCOTP_SW_GP20 (IMXRT_OCOTP_VALUE.offset290)
  5778. #define HW_OCOTP_SW_GP21 (IMXRT_OCOTP_VALUE.offset2A0)
  5779. #define HW_OCOTP_SW_GP22 (IMXRT_OCOTP_VALUE.offset2B0)
  5780. #define HW_OCOTP_SW_GP23 (IMXRT_OCOTP_VALUE.offset2C0)
  5781. #define HW_OCOTP_MISC_CONF0 (IMXRT_OCOTP_VALUE.offset2D0)
  5782. #define HW_OCOTP_MISC_CONF1 (IMXRT_OCOTP_VALUE.offset2E0)
  5783. #define HW_OCOTP_SRK_REVOKE (IMXRT_OCOTP_VALUE.offset2F0)
  5784. // 44.8.1: page 2583
  5785. #define IMXRT_PIT (*(IMXRT_REGISTER32_t *)0x40084000)
  5786. #define PIT_MCR (IMXRT_PIT.offset000)
  5787. #define PIT_LTMR64H (IMXRT_PIT.offset0E0)
  5788. #define PIT_LTMR64L (IMXRT_PIT.offset0E4)
  5789. typedef struct {
  5790. volatile uint32_t LDVAL;
  5791. volatile uint32_t CVAL;
  5792. volatile uint32_t TCTRL;
  5793. volatile uint32_t TFLG;
  5794. } IMXRT_PIT_CHANNEL_t;
  5795. #define IMXRT_PIT_CHANNELS ((IMXRT_PIT_CHANNEL_t *)(&(IMXRT_PIT.offset100)))
  5796. #define PIT_LDVAL0 (IMXRT_PIT.offset100)
  5797. #define PIT_CVAL0 (IMXRT_PIT.offset104)
  5798. #define PIT_TCTRL0 (IMXRT_PIT.offset108)
  5799. #define PIT_TFLG0 (IMXRT_PIT.offset10C)
  5800. #define PIT_LDVAL1 (IMXRT_PIT.offset110)
  5801. #define PIT_CVAL1 (IMXRT_PIT.offset114)
  5802. #define PIT_TCTRL1 (IMXRT_PIT.offset118)
  5803. #define PIT_TFLG1 (IMXRT_PIT.offset11C)
  5804. #define PIT_LDVAL2 (IMXRT_PIT.offset120)
  5805. #define PIT_CVAL2 (IMXRT_PIT.offset124)
  5806. #define PIT_TCTRL2 (IMXRT_PIT.offset128)
  5807. #define PIT_TFLG2 (IMXRT_PIT.offset12C)
  5808. #define PIT_LDVAL3 (IMXRT_PIT.offset130)
  5809. #define PIT_CVAL3 (IMXRT_PIT.offset134)
  5810. #define PIT_TCTRL3 (IMXRT_PIT.offset138)
  5811. #define PIT_TFLG3 (IMXRT_PIT.offset13C)
  5812. #define PIT_MCR_MDIS ((uint32_t)(1<<1))
  5813. #define PIT_MCR_FRZ ((uint32_t)(1<<0))
  5814. #define PIT_TCTRL_CHN ((uint32_t)(1<<2))
  5815. #define PIT_TCTRL_TIE ((uint32_t)(1<<1))
  5816. #define PIT_TCTRL_TEN ((uint32_t)(1<<0))
  5817. #define PIT_TFLG_TIF ((uint32_t)(1<<0))
  5818. // 45.7: page 2598
  5819. #define IMXRT_PMU (*(IMXRT_REGISTER32_t *)0x400D8000)
  5820. #define PMU_REG_1P1 (IMXRT_PMU.offset110)
  5821. #define PMU_REG_1P1_SET (IMXRT_PMU.offset114)
  5822. #define PMU_REG_1P1_CLR (IMXRT_PMU.offset118)
  5823. #define PMU_REG_1P1_TOG (IMXRT_PMU.offset11C)
  5824. #define PMU_REG_3P0 (IMXRT_PMU.offset120)
  5825. #define PMU_REG_3P0_SET (IMXRT_PMU.offset124)
  5826. #define PMU_REG_3P0_CLR (IMXRT_PMU.offset128)
  5827. #define PMU_REG_3P0_TOG (IMXRT_PMU.offset12C)
  5828. #define PMU_REG_2P5 (IMXRT_PMU.offset130)
  5829. #define PMU_REG_2P5_SET (IMXRT_PMU.offset134)
  5830. #define PMU_REG_2P5_CLR (IMXRT_PMU.offset138)
  5831. #define PMU_REG_2P5_TOG (IMXRT_PMU.offset13C)
  5832. #define PMU_REG_CORE (IMXRT_PMU.offset140)
  5833. #define PMU_REG_CORE_SET (IMXRT_PMU.offset144)
  5834. #define PMU_REG_CORE_CLR (IMXRT_PMU.offset148)
  5835. #define PMU_REG_CORE_TOG (IMXRT_PMU.offset14C)
  5836. #define PMU_MISC0 (IMXRT_PMU.offset150)
  5837. #define PMU_MISC0_SET (IMXRT_PMU.offset154)
  5838. #define PMU_MISC0_CLR (IMXRT_PMU.offset158)
  5839. #define PMU_MISC0_TOG (IMXRT_PMU.offset15C)
  5840. #define PMU_MISC1 (IMXRT_PMU.offset160)
  5841. #define PMU_MISC1_SET (IMXRT_PMU.offset164)
  5842. #define PMU_MISC1_CLR (IMXRT_PMU.offset168)
  5843. #define PMU_MISC1_TOG (IMXRT_PMU.offset16C)
  5844. #define PMU_MISC2 (IMXRT_PMU.offset170)
  5845. #define PMU_MISC2_SET (IMXRT_PMU.offset174)
  5846. #define PMU_MISC2_CLR (IMXRT_PMU.offset178)
  5847. #define PMU_MISC2_TOG (IMXRT_PMU.offset17C)
  5848. #define PMU_REG_1P1_SELREF_WEAK_LINREG ((uint32_t)(1<<19))
  5849. #define PMU_REG_1P1_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  5850. #define PMU_REG_1P1_OK_VDD1P1 ((uint32_t)(1<<17))
  5851. #define PMU_REG_1P1_BO_VDD1P1 ((uint32_t)(1<<16))
  5852. #define PMU_REG_1P1_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  5853. #define PMU_REG_1P1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  5854. #define PMU_REG_1P1_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  5855. #define PMU_REG_1P1_ENABLE_ILIMIT ((uint32_t)(1<<2))
  5856. #define PMU_REG_1P1_ENABLE_BO ((uint32_t)(1<<1))
  5857. #define PMU_REG_1P1_ENABLE_LINREG ((uint32_t)(1<<0))
  5858. #define PMU_REG_3P0_OK_VDD3P0 ((uint32_t)(1<<17))
  5859. #define PMU_REG_3P0_BO_VDD3P0 ((uint32_t)(1<<16))
  5860. #define PMU_REG_3P0_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x1F) << 8))
  5861. #define PMU_REG_3P0_VBUS_SEL ((uint32_t)(1<<7))
  5862. #define PMU_REG_3P0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  5863. #define PMU_REG_3P0_ENABLE_ILIMIT ((uint32_t)(1<<2))
  5864. #define PMU_REG_3P0_ENABLE_BO ((uint32_t)(1<<1))
  5865. #define PMU_REG_3P0_ENABLE_LINREG ((uint32_t)(1<<0))
  5866. #define PMU_REG_2P5_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  5867. #define PMU_REG_2P5_OK_VDD2P5 ((uint32_t)(1<<17))
  5868. #define PMU_REG_2P5_BO_VDD2P5 ((uint32_t)(1<<16))
  5869. #define PMU_REG_2P5_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  5870. #define PMU_REG_2P5_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  5871. #define PMU_REG_2P5_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  5872. #define PMU_REG_2P5_ENABLE_ILIMIT ((uint32_t)(1<<2))
  5873. #define PMU_REG_2P5_ENABLE_BO ((uint32_t)(1<<1))
  5874. #define PMU_REG_2P5_ENABLE_LINREG ((uint32_t)(1<<0))
  5875. #define PMU_REG_CORE_FET_ODRIVE ((uint32_t)(1<<29))
  5876. #define PMU_REG_CORE_RAMP_RATE(n) ((uint32_t)(((n) & 0x03) << 27))
  5877. #define PMU_REG_CORE_REG2_ADJ(n) ((uint32_t)(((n) & 0x0F) << 23))
  5878. #define PMU_REG_CORE_REG2_TARG(n) ((uint32_t)(((n) & 0x1F) << 18))
  5879. #define PMU_REG_CORE_REG1_ADJ(n) ((uint32_t)(((n) & 0x0F) << 14))
  5880. #define PMU_REG_CORE_REG1_TARG(n) ((uint32_t)(((n) & 0x1F) << 9))
  5881. #define PMU_REG_CORE_REG0_ADJ(n) ((uint32_t)(((n) & 0x0F) << 5))
  5882. #define PMU_REG_CORE_REG0_TARG(n) ((uint32_t)(((n) & 0x1F) << 0))
  5883. #define PMU_MISC0_VID_PLL_PREDIV ((uint32_t)(1<<31))
  5884. #define PMU_MISC0_XTAL_24M_PWD ((uint32_t)(1<<30))
  5885. #define PMU_MISC0_RTC_XTAL_SOURCE ((uint32_t)(1<<29))
  5886. #define PMU_MISC0_CLKGATE_DELAY(n) ((uint32_t)(((n) & 0x07) << 26))
  5887. #define PMU_MISC0_CLKGATE_CTRL ((uint32_t)(1<<25))
  5888. #define PMU_MISC0_OSC_XTALOK_EN ((uint32_t)(1<<16))
  5889. #define PMU_MISC0_OSC_XTALOK ((uint32_t)(1<<15))
  5890. #define PMU_MISC0_OSC_I(n) ((uint32_t)(((n) & 0x03) << 13))
  5891. #define PMU_MISC0_DISCON_HIGH_SNVS ((uint32_t)(1<<12))
  5892. #define PMU_MISC0_STOP_MODE_CONFIG(n) ((uint32_t)(((n) & 0x03) << 10))
  5893. #define PMU_MISC0_REFTOP_VBGUP ((uint32_t)(1<<7))
  5894. #define PMU_MISC0_REFTOP_VBGADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  5895. #define PMU_MISC0_REFTOP_SELFBIASOFF ((uint32_t)(1<<3))
  5896. #define PMU_MISC0_REFTOP_PWD ((uint32_t)(1<<0))
  5897. #define PMU_MISC1_IRQ_DIG_BO ((uint32_t)(1<<31))
  5898. #define PMU_MISC1_IRQ_ANA_BO ((uint32_t)(1<<30))
  5899. #define PMU_MISC1_IRQ_TEMPHIGH ((uint32_t)(1<<29))
  5900. #define PMU_MISC1_IRQ_TEMPLOW ((uint32_t)(1<<28))
  5901. #define PMU_MISC1_IRQ_TEMPPANIC ((uint32_t)(1<<27))
  5902. #define PMU_MISC1_PFD_528_AUTOGATE_EN ((uint32_t)(1<<17))
  5903. #define PMU_MISC1_PFD_480_AUTOGATE_EN ((uint32_t)(1<<16))
  5904. #define PMU_MISC1_LVDSCLK2_IBEN ((uint32_t)(1<<13))
  5905. #define PMU_MISC1_LVDSCLK1_IBEN ((uint32_t)(1<<12))
  5906. #define PMU_MISC1_LVDSCLK2_OBEN ((uint32_t)(1<<11))
  5907. #define PMU_MISC1_LVDSCLK1_OBEN ((uint32_t)(1<<10))
  5908. #define PMU_MISC1_LVDS2_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 5))
  5909. #define PMU_MISC1_LVDS1_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 0))
  5910. #define PMU_MISC2_VIDEO_DIV(n) ((uint32_t)(((n) & 0x03) << 30))
  5911. #define PMU_MISC2_REG2_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 28))
  5912. #define PMU_MISC2_REG1_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 26))
  5913. #define PMU_MISC2_REG0_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 24))
  5914. #define PMU_MISC2_AUDIO_DIV_MSB ((uint32_t)(1<<23))
  5915. #define PMU_MISC2_REG2_OK ((uint32_t)(1<<22))
  5916. #define PMU_MISC2_REG2_ENABLE_BO ((uint32_t)(1<<21))
  5917. #define PMU_MISC2_REG2_BO_STATUS ((uint32_t)(1<<19))
  5918. #define PMU_MISC2_REG2_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 16))
  5919. #define PMU_MISC2_AUDIO_DIV_LSB ((uint32_t)(1<<15))
  5920. #define PMU_MISC2_REG1_ENABLE_BO ((uint32_t)(1<<13))
  5921. #define PMU_MISC2_REG1_BO_STATUS ((uint32_t)(1<<11))
  5922. #define PMU_MISC2_REG1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 8))
  5923. #define PMU_MISC2_PLL3_DISABLE ((uint32_t)(1<<7))
  5924. #define PMU_MISC2_REG0_ENABLE_BO ((uint32_t)(1<<5))
  5925. #define PMU_MISC2_REG0_BO_STATUS ((uint32_t)(1<<3))
  5926. #define PMU_MISC2_REG0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 0))
  5927. // 46.7: page 2656
  5928. #define IMXRT_PXP (*(IMXRT_REGISTER32_t *)0x402B4000)
  5929. #define IMXRT_PXP_b (*(IMXRT_REGISTER32_t *)0x402B4400)
  5930. #define PXP_CTRL (IMXRT_PXP.offset000)
  5931. #define PXP_CTRL_SET (IMXRT_PXP.offset004)
  5932. #define PXP_CTRL_CLR (IMXRT_PXP.offset008)
  5933. #define PXP_CTRL_TOG (IMXRT_PXP.offset00C)
  5934. #define PXP_STAT (IMXRT_PXP.offset010)
  5935. #define PXP_STAT_SET (IMXRT_PXP.offset014)
  5936. #define PXP_STAT_CLR (IMXRT_PXP.offset018)
  5937. #define PXP_STAT_TOG (IMXRT_PXP.offset01C)
  5938. #define PXP_OUT_CTRL (IMXRT_PXP.offset020)
  5939. #define PXP_OUT_CTRL_SET (IMXRT_PXP.offset024)
  5940. #define PXP_OUT_CTRL_CLR (IMXRT_PXP.offset028)
  5941. #define PXP_OUT_CTRL_TOG (IMXRT_PXP.offset02C)
  5942. #define PXP_OUT_BUF (IMXRT_PXP.offset030)
  5943. #define PXP_OUT_BUF2 (IMXRT_PXP.offset040)
  5944. #define PXP_OUT_PITCH (IMXRT_PXP.offset050)
  5945. #define PXP_OUT_LRC (IMXRT_PXP.offset060)
  5946. #define PXP_OUT_PS_ULC (IMXRT_PXP.offset070)
  5947. #define PXP_OUT_PS_LRC (IMXRT_PXP.offset080)
  5948. #define PXP_OUT_AS_ULC (IMXRT_PXP.offset090)
  5949. #define PXP_OUT_AS_LRC (IMXRT_PXP.offset0A0)
  5950. #define PXP_PS_CTRL (IMXRT_PXP.offset0B0)
  5951. #define PXP_PS_CTRL_SET (IMXRT_PXP.offset0B4)
  5952. #define PXP_PS_CTRL_CLR (IMXRT_PXP.offset0B8)
  5953. #define PXP_PS_CTRL_TOG (IMXRT_PXP.offset0BC)
  5954. #define PXP_PS_BUF (IMXRT_PXP.offset0C0)
  5955. #define PXP_PS_UBUF (IMXRT_PXP.offset0D0)
  5956. #define PXP_PS_VBUF (IMXRT_PXP.offset0E0)
  5957. #define PXP_PS_PITCH (IMXRT_PXP.offset0F0)
  5958. #define PXP_PS_BACKGROUND_0 (IMXRT_PXP.offset100)
  5959. #define PXP_PS_SCALE (IMXRT_PXP.offset110)
  5960. #define PXP_PS_OFFSET (IMXRT_PXP.offset120)
  5961. #define PXP_PS_CLRKEYLOW_0 (IMXRT_PXP.offset130)
  5962. #define PXP_PS_CLRKEYHIGH_0 (IMXRT_PXP.offset140)
  5963. #define PXP_AS_CTRL (IMXRT_PXP.offset150)
  5964. #define PXP_AS_BUF (IMXRT_PXP.offset160)
  5965. #define PXP_AS_PITCH (IMXRT_PXP.offset170)
  5966. #define PXP_AS_CLRKEYLOW_0 (IMXRT_PXP.offset180)
  5967. #define PXP_AS_CLRKEYHIGH_0 (IMXRT_PXP.offset190)
  5968. #define PXP_CSC1_COEF0 (IMXRT_PXP.offset1A0)
  5969. #define PXP_CSC1_COEF1 (IMXRT_PXP.offset1B0)
  5970. #define PXP_CSC1_COEF2 (IMXRT_PXP.offset1C0)
  5971. #define PXP_POWER (IMXRT_PXP_b.offset000)
  5972. #define PXP_PORTER_DUFF_CTRL (IMXRT_PXP_b.offset040)
  5973. // 47.5: page 2695
  5974. typedef struct {
  5975. union {
  5976. struct {
  5977. volatile uint16_t COMP1;
  5978. volatile uint16_t COMP2;
  5979. volatile uint16_t CAPT;
  5980. volatile uint16_t LOAD;
  5981. volatile uint16_t HOLD;
  5982. volatile uint16_t CNTR;
  5983. volatile uint16_t CTRL;
  5984. volatile uint16_t SCTRL;
  5985. volatile uint16_t CMPLD1;
  5986. volatile uint16_t CMPLD2;
  5987. volatile uint16_t CSCTRL;
  5988. volatile uint16_t FILT;
  5989. volatile uint16_t DMA;
  5990. volatile uint16_t unused1[3];
  5991. } CH[4];
  5992. struct {
  5993. volatile uint16_t unused2[15];
  5994. volatile uint16_t ENBL;
  5995. };
  5996. };
  5997. } IMXRT_TMR_t;
  5998. #define IMXRT_TMR1 (*(IMXRT_TMR_t *)0x401DC000)
  5999. #define TMR1_COMP10 (IMXRT_TMR1.CH[0].COMP1)
  6000. #define TMR1_COMP20 (IMXRT_TMR1.CH[0].COMP2)
  6001. #define TMR1_CAPT0 (IMXRT_TMR1.CH[0].CAPT)
  6002. #define TMR1_LOAD0 (IMXRT_TMR1.CH[0].LOAD)
  6003. #define TMR1_HOLD0 (IMXRT_TMR1.CH[0].HOLD)
  6004. #define TMR1_CNTR0 (IMXRT_TMR1.CH[0].CNTR)
  6005. #define TMR1_CTRL0 (IMXRT_TMR1.CH[0].CTRL)
  6006. #define TMR1_SCTRL0 (IMXRT_TMR1.CH[0].SCTRL)
  6007. #define TMR1_CMPLD10 (IMXRT_TMR1.CH[0].CMPLD1)
  6008. #define TMR1_CMPLD20 (IMXRT_TMR1.CH[0].CMPLD2)
  6009. #define TMR1_CSCTRL0 (IMXRT_TMR1.CH[0].CSCTRL)
  6010. #define TMR1_FILT0 (IMXRT_TMR1.CH[0].FILT)
  6011. #define TMR1_DMA0 (IMXRT_TMR1.CH[0].DMA)
  6012. #define TMR1_ENBL (IMXRT_TMR1.ENBL)
  6013. #define TMR1_COMP11 (IMXRT_TMR1.CH[1].COMP1)
  6014. #define TMR1_COMP21 (IMXRT_TMR1.CH[1].COMP2)
  6015. #define TMR1_CAPT1 (IMXRT_TMR1.CH[1].CAPT)
  6016. #define TMR1_LOAD1 (IMXRT_TMR1.CH[1].LOAD)
  6017. #define TMR1_HOLD1 (IMXRT_TMR1.CH[1].HOLD)
  6018. #define TMR1_CNTR1 (IMXRT_TMR1.CH[1].CNTR)
  6019. #define TMR1_CTRL1 (IMXRT_TMR1.CH[1].CTRL)
  6020. #define TMR1_SCTRL1 (IMXRT_TMR1.CH[1].SCTRL)
  6021. #define TMR1_CMPLD11 (IMXRT_TMR1.CH[1].CMPLD1)
  6022. #define TMR1_CMPLD21 (IMXRT_TMR1.CH[1].CMPLD2)
  6023. #define TMR1_CSCTRL1 (IMXRT_TMR1.CH[1].CSCTRL)
  6024. #define TMR1_FILT1 (IMXRT_TMR1.CH[1].FILT)
  6025. #define TMR1_DMA1 (IMXRT_TMR1.CH[1].DMA)
  6026. #define TMR1_COMP12 (IMXRT_TMR1.CH[2].COMP1)
  6027. #define TMR1_COMP22 (IMXRT_TMR1.CH[2].COMP2)
  6028. #define TMR1_CAPT2 (IMXRT_TMR1.CH[2].CAPT)
  6029. #define TMR1_LOAD2 (IMXRT_TMR1.CH[2].LOAD)
  6030. #define TMR1_HOLD2 (IMXRT_TMR1.CH[2].HOLD)
  6031. #define TMR1_CNTR2 (IMXRT_TMR1.CH[2].CNTR)
  6032. #define TMR1_CTRL2 (IMXRT_TMR1.CH[2].CTRL)
  6033. #define TMR1_SCTRL2 (IMXRT_TMR1.CH[2].SCTRL)
  6034. #define TMR1_CMPLD12 (IMXRT_TMR1.CH[2].CMPLD1)
  6035. #define TMR1_CMPLD22 (IMXRT_TMR1.CH[2].CMPLD2)
  6036. #define TMR1_CSCTRL2 (IMXRT_TMR1.CH[2].CSCTRL)
  6037. #define TMR1_FILT2 (IMXRT_TMR1.CH[2].FILT)
  6038. #define TMR1_DMA2 (IMXRT_TMR1.CH[2].DMA)
  6039. #define TMR1_COMP13 (IMXRT_TMR1.CH[3].COMP1)
  6040. #define TMR1_COMP23 (IMXRT_TMR1.CH[3].COMP2)
  6041. #define TMR1_CAPT3 (IMXRT_TMR1.CH[3].CAPT)
  6042. #define TMR1_LOAD3 (IMXRT_TMR1.CH[3].LOAD)
  6043. #define TMR1_HOLD3 (IMXRT_TMR1.CH[3].HOLD)
  6044. #define TMR1_CNTR3 (IMXRT_TMR1.CH[3].CNTR)
  6045. #define TMR1_CTRL3 (IMXRT_TMR1.CH[3].CTRL)
  6046. #define TMR1_SCTRL3 (IMXRT_TMR1.CH[3].SCTRL)
  6047. #define TMR1_CMPLD13 (IMXRT_TMR1.CH[3].CMPLD1)
  6048. #define TMR1_CMPLD23 (IMXRT_TMR1.CH[3].CMPLD2)
  6049. #define TMR1_CSCTRL3 (IMXRT_TMR1.CH[3].CSCTRL)
  6050. #define TMR1_FILT3 (IMXRT_TMR1.CH[3].FILT)
  6051. #define TMR1_DMA3 (IMXRT_TMR1.CH[3].DMA)
  6052. #define IMXRT_TMR2 (*(IMXRT_TMR_t *)0x401E0000)
  6053. #define TMR2_COMP10 (IMXRT_TMR2.CH[0].COMP1)
  6054. #define TMR2_COMP20 (IMXRT_TMR2.CH[0].COMP2)
  6055. #define TMR2_CAPT0 (IMXRT_TMR2.CH[0].CAPT)
  6056. #define TMR2_LOAD0 (IMXRT_TMR2.CH[0].LOAD)
  6057. #define TMR2_HOLD0 (IMXRT_TMR2.CH[0].HOLD)
  6058. #define TMR2_CNTR0 (IMXRT_TMR2.CH[0].CNTR)
  6059. #define TMR2_CTRL0 (IMXRT_TMR2.CH[0].CTRL)
  6060. #define TMR2_SCTRL0 (IMXRT_TMR2.CH[0].SCTRL)
  6061. #define TMR2_CMPLD10 (IMXRT_TMR2.CH[0].CMPLD1)
  6062. #define TMR2_CMPLD20 (IMXRT_TMR2.CH[0].CMPLD2)
  6063. #define TMR2_CSCTRL0 (IMXRT_TMR2.CH[0].CSCTRL)
  6064. #define TMR2_FILT0 (IMXRT_TMR2.CH[0].FILT)
  6065. #define TMR2_DMA0 (IMXRT_TMR2.CH[0].DMA)
  6066. #define TMR2_ENBL (IMXRT_TMR2.ENBL)
  6067. #define TMR2_COMP11 (IMXRT_TMR2.CH[1].COMP1)
  6068. #define TMR2_COMP21 (IMXRT_TMR2.CH[1].COMP2)
  6069. #define TMR2_CAPT1 (IMXRT_TMR2.CH[1].CAPT)
  6070. #define TMR2_LOAD1 (IMXRT_TMR2.CH[1].LOAD)
  6071. #define TMR2_HOLD1 (IMXRT_TMR2.CH[1].HOLD)
  6072. #define TMR2_CNTR1 (IMXRT_TMR2.CH[1].CNTR)
  6073. #define TMR2_CTRL1 (IMXRT_TMR2.CH[1].CTRL)
  6074. #define TMR2_SCTRL1 (IMXRT_TMR2.CH[1].SCTRL)
  6075. #define TMR2_CMPLD11 (IMXRT_TMR2.CH[1].CMPLD1)
  6076. #define TMR2_CMPLD21 (IMXRT_TMR2.CH[1].CMPLD2)
  6077. #define TMR2_CSCTRL1 (IMXRT_TMR2.CH[1].CSCTRL)
  6078. #define TMR2_FILT1 (IMXRT_TMR2.CH[1].FILT)
  6079. #define TMR2_DMA1 (IMXRT_TMR2.CH[1].DMA)
  6080. #define TMR2_COMP12 (IMXRT_TMR2.CH[2].COMP1)
  6081. #define TMR2_COMP22 (IMXRT_TMR2.CH[2].COMP2)
  6082. #define TMR2_CAPT2 (IMXRT_TMR2.CH[2].CAPT)
  6083. #define TMR2_LOAD2 (IMXRT_TMR2.CH[2].LOAD)
  6084. #define TMR2_HOLD2 (IMXRT_TMR2.CH[2].HOLD)
  6085. #define TMR2_CNTR2 (IMXRT_TMR2.CH[2].CNTR)
  6086. #define TMR2_CTRL2 (IMXRT_TMR2.CH[2].CTRL)
  6087. #define TMR2_SCTRL2 (IMXRT_TMR2.CH[2].SCTRL)
  6088. #define TMR2_CMPLD12 (IMXRT_TMR2.CH[2].CMPLD1)
  6089. #define TMR2_CMPLD22 (IMXRT_TMR2.CH[2].CMPLD2)
  6090. #define TMR2_CSCTRL2 (IMXRT_TMR2.CH[2].CSCTRL)
  6091. #define TMR2_FILT2 (IMXRT_TMR2.CH[2].FILT)
  6092. #define TMR2_DMA2 (IMXRT_TMR2.CH[2].DMA)
  6093. #define TMR2_COMP13 (IMXRT_TMR2.CH[3].COMP1)
  6094. #define TMR2_COMP23 (IMXRT_TMR2.CH[3].COMP2)
  6095. #define TMR2_CAPT3 (IMXRT_TMR2.CH[3].CAPT)
  6096. #define TMR2_LOAD3 (IMXRT_TMR2.CH[3].LOAD)
  6097. #define TMR2_HOLD3 (IMXRT_TMR2.CH[3].HOLD)
  6098. #define TMR2_CNTR3 (IMXRT_TMR2.CH[3].CNTR)
  6099. #define TMR2_CTRL3 (IMXRT_TMR2.CH[3].CTRL)
  6100. #define TMR2_SCTRL3 (IMXRT_TMR2.CH[3].SCTRL)
  6101. #define TMR2_CMPLD13 (IMXRT_TMR2.CH[3].CMPLD1)
  6102. #define TMR2_CMPLD23 (IMXRT_TMR2.CH[3].CMPLD2)
  6103. #define TMR2_CSCTRL3 (IMXRT_TMR2.CH[3].CSCTRL)
  6104. #define TMR2_FILT3 (IMXRT_TMR2.CH[3].FILT)
  6105. #define TMR2_DMA3 (IMXRT_TMR2.CH[3].DMA)
  6106. #define IMXRT_TMR3 (*(IMXRT_TMR_t *)0x401E4000)
  6107. #define TMR3_COMP10 (IMXRT_TMR3.CH[0].COMP1)
  6108. #define TMR3_COMP20 (IMXRT_TMR3.CH[0].COMP2)
  6109. #define TMR3_CAPT0 (IMXRT_TMR3.CH[0].CAPT)
  6110. #define TMR3_LOAD0 (IMXRT_TMR3.CH[0].LOAD)
  6111. #define TMR3_HOLD0 (IMXRT_TMR3.CH[0].HOLD)
  6112. #define TMR3_CNTR0 (IMXRT_TMR3.CH[0].CNTR)
  6113. #define TMR3_CTRL0 (IMXRT_TMR3.CH[0].CTRL)
  6114. #define TMR3_SCTRL0 (IMXRT_TMR3.CH[0].SCTRL)
  6115. #define TMR3_CMPLD10 (IMXRT_TMR3.CH[0].CMPLD1)
  6116. #define TMR3_CMPLD20 (IMXRT_TMR3.CH[0].CMPLD2)
  6117. #define TMR3_CSCTRL0 (IMXRT_TMR3.CH[0].CSCTRL)
  6118. #define TMR3_FILT0 (IMXRT_TMR3.CH[0].FILT)
  6119. #define TMR3_DMA0 (IMXRT_TMR3.CH[0].DMA)
  6120. #define TMR3_ENBL (IMXRT_TMR3.ENBL)
  6121. #define TMR3_COMP11 (IMXRT_TMR3.CH[1].COMP1)
  6122. #define TMR3_COMP21 (IMXRT_TMR3.CH[1].COMP2)
  6123. #define TMR3_CAPT1 (IMXRT_TMR3.CH[1].CAPT)
  6124. #define TMR3_LOAD1 (IMXRT_TMR3.CH[1].LOAD)
  6125. #define TMR3_HOLD1 (IMXRT_TMR3.CH[1].HOLD)
  6126. #define TMR3_CNTR1 (IMXRT_TMR3.CH[1].CNTR)
  6127. #define TMR3_CTRL1 (IMXRT_TMR3.CH[1].CTRL)
  6128. #define TMR3_SCTRL1 (IMXRT_TMR3.CH[1].SCTRL)
  6129. #define TMR3_CMPLD11 (IMXRT_TMR3.CH[1].CMPLD1)
  6130. #define TMR3_CMPLD21 (IMXRT_TMR3.CH[1].CMPLD2)
  6131. #define TMR3_CSCTRL1 (IMXRT_TMR3.CH[1].CSCTRL)
  6132. #define TMR3_FILT1 (IMXRT_TMR3.CH[1].FILT)
  6133. #define TMR3_DMA1 (IMXRT_TMR3.CH[1].DMA)
  6134. #define TMR3_COMP12 (IMXRT_TMR3.CH[2].COMP1)
  6135. #define TMR3_COMP22 (IMXRT_TMR3.CH[2].COMP2)
  6136. #define TMR3_CAPT2 (IMXRT_TMR3.CH[2].CAPT)
  6137. #define TMR3_LOAD2 (IMXRT_TMR3.CH[2].LOAD)
  6138. #define TMR3_HOLD2 (IMXRT_TMR3.CH[2].HOLD)
  6139. #define TMR3_CNTR2 (IMXRT_TMR3.CH[2].CNTR)
  6140. #define TMR3_CTRL2 (IMXRT_TMR3.CH[2].CTRL)
  6141. #define TMR3_SCTRL2 (IMXRT_TMR3.CH[2].SCTRL)
  6142. #define TMR3_CMPLD12 (IMXRT_TMR3.CH[2].CMPLD1)
  6143. #define TMR3_CMPLD22 (IMXRT_TMR3.CH[2].CMPLD2)
  6144. #define TMR3_CSCTRL2 (IMXRT_TMR3.CH[2].CSCTRL)
  6145. #define TMR3_FILT2 (IMXRT_TMR3.CH[2].FILT)
  6146. #define TMR3_DMA2 (IMXRT_TMR3.CH[2].DMA)
  6147. #define TMR3_COMP13 (IMXRT_TMR3.CH[3].COMP1)
  6148. #define TMR3_COMP23 (IMXRT_TMR3.CH[3].COMP2)
  6149. #define TMR3_CAPT3 (IMXRT_TMR3.CH[3].CAPT)
  6150. #define TMR3_LOAD3 (IMXRT_TMR3.CH[3].LOAD)
  6151. #define TMR3_HOLD3 (IMXRT_TMR3.CH[3].HOLD)
  6152. #define TMR3_CNTR3 (IMXRT_TMR3.CH[3].CNTR)
  6153. #define TMR3_CTRL3 (IMXRT_TMR3.CH[3].CTRL)
  6154. #define TMR3_SCTRL3 (IMXRT_TMR3.CH[3].SCTRL)
  6155. #define TMR3_CMPLD13 (IMXRT_TMR3.CH[3].CMPLD1)
  6156. #define TMR3_CMPLD23 (IMXRT_TMR3.CH[3].CMPLD2)
  6157. #define TMR3_CSCTRL3 (IMXRT_TMR3.CH[3].CSCTRL)
  6158. #define TMR3_FILT3 (IMXRT_TMR3.CH[3].FILT)
  6159. #define TMR3_DMA3 (IMXRT_TMR3.CH[3].DMA)
  6160. #define IMXRT_TMR4 (*(IMXRT_TMR_t *)0x401E8000)
  6161. #define TMR4_COMP10 (IMXRT_TMR4.CH[0].COMP1)
  6162. #define TMR4_COMP20 (IMXRT_TMR4.CH[0].COMP2)
  6163. #define TMR4_CAPT0 (IMXRT_TMR4.CH[0].CAPT)
  6164. #define TMR4_LOAD0 (IMXRT_TMR4.CH[0].LOAD)
  6165. #define TMR4_HOLD0 (IMXRT_TMR4.CH[0].HOLD)
  6166. #define TMR4_CNTR0 (IMXRT_TMR4.CH[0].CNTR)
  6167. #define TMR4_CTRL0 (IMXRT_TMR4.CH[0].CTRL)
  6168. #define TMR4_SCTRL0 (IMXRT_TMR4.CH[0].SCTRL)
  6169. #define TMR4_CMPLD10 (IMXRT_TMR4.CH[0].CMPLD1)
  6170. #define TMR4_CMPLD20 (IMXRT_TMR4.CH[0].CMPLD2)
  6171. #define TMR4_CSCTRL0 (IMXRT_TMR4.CH[0].CSCTRL)
  6172. #define TMR4_FILT0 (IMXRT_TMR4.CH[0].FILT)
  6173. #define TMR4_DMA0 (IMXRT_TMR4.CH[0].DMA)
  6174. #define TMR4_ENBL (IMXRT_TMR4.ENBL)
  6175. #define TMR4_COMP11 (IMXRT_TMR4.CH[1].COMP1)
  6176. #define TMR4_COMP21 (IMXRT_TMR4.CH[1].COMP2)
  6177. #define TMR4_CAPT1 (IMXRT_TMR4.CH[1].CAPT)
  6178. #define TMR4_LOAD1 (IMXRT_TMR4.CH[1].LOAD)
  6179. #define TMR4_HOLD1 (IMXRT_TMR4.CH[1].HOLD)
  6180. #define TMR4_CNTR1 (IMXRT_TMR4.CH[1].CNTR)
  6181. #define TMR4_CTRL1 (IMXRT_TMR4.CH[1].CTRL)
  6182. #define TMR4_SCTRL1 (IMXRT_TMR4.CH[1].SCTRL)
  6183. #define TMR4_CMPLD11 (IMXRT_TMR4.CH[1].CMPLD1)
  6184. #define TMR4_CMPLD21 (IMXRT_TMR4.CH[1].CMPLD2)
  6185. #define TMR4_CSCTRL1 (IMXRT_TMR4.CH[1].CSCTRL)
  6186. #define TMR4_FILT1 (IMXRT_TMR4.CH[1].FILT)
  6187. #define TMR4_DMA1 (IMXRT_TMR4.CH[1].DMA)
  6188. #define TMR4_COMP12 (IMXRT_TMR4.CH[2].COMP1)
  6189. #define TMR4_COMP22 (IMXRT_TMR4.CH[2].COMP2)
  6190. #define TMR4_CAPT2 (IMXRT_TMR4.CH[2].CAPT)
  6191. #define TMR4_LOAD2 (IMXRT_TMR4.CH[2].LOAD)
  6192. #define TMR4_HOLD2 (IMXRT_TMR4.CH[2].HOLD)
  6193. #define TMR4_CNTR2 (IMXRT_TMR4.CH[2].CNTR)
  6194. #define TMR4_CTRL2 (IMXRT_TMR4.CH[2].CTRL)
  6195. #define TMR4_SCTRL2 (IMXRT_TMR4.CH[2].SCTRL)
  6196. #define TMR4_CMPLD12 (IMXRT_TMR4.CH[2].CMPLD1)
  6197. #define TMR4_CMPLD22 (IMXRT_TMR4.CH[2].CMPLD2)
  6198. #define TMR4_CSCTRL2 (IMXRT_TMR4.CH[2].CSCTRL)
  6199. #define TMR4_FILT2 (IMXRT_TMR4.CH[2].FILT)
  6200. #define TMR4_DMA2 (IMXRT_TMR4.CH[2].DMA)
  6201. #define TMR4_COMP13 (IMXRT_TMR4.CH[3].COMP1)
  6202. #define TMR4_COMP23 (IMXRT_TMR4.CH[3].COMP2)
  6203. #define TMR4_CAPT3 (IMXRT_TMR4.CH[3].CAPT)
  6204. #define TMR4_LOAD3 (IMXRT_TMR4.CH[3].LOAD)
  6205. #define TMR4_HOLD3 (IMXRT_TMR4.CH[3].HOLD)
  6206. #define TMR4_CNTR3 (IMXRT_TMR4.CH[3].CNTR)
  6207. #define TMR4_CTRL3 (IMXRT_TMR4.CH[3].CTRL)
  6208. #define TMR4_SCTRL3 (IMXRT_TMR4.CH[3].SCTRL)
  6209. #define TMR4_CMPLD13 (IMXRT_TMR4.CH[3].CMPLD1)
  6210. #define TMR4_CMPLD23 (IMXRT_TMR4.CH[3].CMPLD2)
  6211. #define TMR4_CSCTRL3 (IMXRT_TMR4.CH[3].CSCTRL)
  6212. #define TMR4_FILT3 (IMXRT_TMR4.CH[3].FILT)
  6213. #define TMR4_DMA3 (IMXRT_TMR4.CH[3].DMA)
  6214. #define TMR_CTRL_CM(n) ((uint16_t)(((n) & 0x07) << 13))
  6215. #define TMR_CTRL_PCS(n) ((uint16_t)(((n) & 0x0F) << 9))
  6216. #define TMR_CTRL_SCS(n) ((uint16_t)(((n) & 0x03) << 7))
  6217. #define TMR_CTRL_ONCE ((uint16_t)(1<<6))
  6218. #define TMR_CTRL_LENGTH ((uint16_t)(1<<5))
  6219. #define TMR_CTRL_DIR ((uint16_t)(1<<4))
  6220. #define TMR_CTRL_COINIT ((uint16_t)(1<<3))
  6221. #define TMR_CTRL_OUTMODE(n) ((uint16_t)(((n) & 0x07) << 0))
  6222. #define TMR_SCTRL_TCF ((uint16_t)(1<<15))
  6223. #define TMR_SCTRL_TCFIE ((uint16_t)(1<<14))
  6224. #define TMR_SCTRL_TOF ((uint16_t)(1<<13))
  6225. #define TMR_SCTRL_TOFIE ((uint16_t)(1<<12))
  6226. #define TMR_SCTRL_IEF ((uint16_t)(1<<11))
  6227. #define TMR_SCTRL_IEFIE ((uint16_t)(1<<10))
  6228. #define TMR_SCTRL_IPS ((uint16_t)(1<<9))
  6229. #define TMR_SCTRL_INPUT ((uint16_t)(1<<8))
  6230. #define TMR_SCTRL_CAPTURE_MODE(n) ((uint16_t)(((n) & 0x03) << 6))
  6231. #define TMR_SCTRL_MSTR ((uint16_t)(1<<5))
  6232. #define TMR_SCTRL_EEOF ((uint16_t)(1<<4))
  6233. #define TMR_SCTRL_VAL ((uint16_t)(1<<3))
  6234. #define TMR_SCTRL_FORCE ((uint16_t)(1<<2))
  6235. #define TMR_SCTRL_OPS ((uint16_t)(1<<1))
  6236. #define TMR_SCTRL_OEN ((uint16_t)(1<<0))
  6237. #define TMR_CSCTRL_DBG_EN(n) ((uint16_t)(((n) & 0x03) << 14))
  6238. #define TMR_CSCTRL_FAULT ((uint16_t)(1<<13))
  6239. #define TMR_CSCTRL_ALT_LOAD ((uint16_t)(1<<12))
  6240. #define TMR_CSCTRL_ROC ((uint16_t)(1<<11))
  6241. #define TMR_CSCTRL_TCI ((uint16_t)(1<<10))
  6242. #define TMR_CSCTRL_UP ((uint16_t)(1<<9))
  6243. #define TMR_CSCTRL_TCF2EN ((uint16_t)(1<<7))
  6244. #define TMR_CSCTRL_TCF1EN ((uint16_t)(1<<6))
  6245. #define TMR_CSCTRL_TCF2 ((uint16_t)(1<<5))
  6246. #define TMR_CSCTRL_TCF1 ((uint16_t)(1<<4))
  6247. #define TMR_CSCTRL_CL2(n) ((uint16_t)(((n) & 0x03) << 2))
  6248. #define TMR_CSCTRL_CL1(n) ((uint16_t)(((n) & 0x03) << 0))
  6249. #define TMR_FILT_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  6250. #define TMR_FILT_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  6251. #define TMR_DMA_CMPLD2DE ((uint16_t)(1<<2))
  6252. #define TMR_DMA_CMPLD1DE ((uint16_t)(1<<1))
  6253. #define TMR_DMA_IEFDE ((uint16_t)(1<<0))
  6254. // 48.4.1.1: page 2748
  6255. #define IMXRT_I2S1 (*(IMXRT_REGISTER32_t *)0x40384000)
  6256. #define I2S1_VERID (IMXRT_I2S1.offset000)
  6257. #define I2S1_PARAM (IMXRT_I2S1.offset004)
  6258. #define I2S1_TCSR (IMXRT_I2S1.offset008)
  6259. #define I2S1_TCR1 (IMXRT_I2S1.offset00C)
  6260. #define I2S1_TCR2 (IMXRT_I2S1.offset010)
  6261. #define I2S1_TCR3 (IMXRT_I2S1.offset014)
  6262. #define I2S1_TCR4 (IMXRT_I2S1.offset018)
  6263. #define I2S1_TCR5 (IMXRT_I2S1.offset01C)
  6264. #define I2S1_TDR0 (IMXRT_I2S1.offset020)
  6265. #define I2S1_TDR1 (IMXRT_I2S1.offset024)
  6266. #define I2S1_TDR2 (IMXRT_I2S1.offset028)
  6267. #define I2S1_TDR3 (IMXRT_I2S1.offset02C)
  6268. #define I2S1_TFR0 (IMXRT_I2S1.offset040)
  6269. #define I2S1_TFR1 (IMXRT_I2S1.offset044)
  6270. #define I2S1_TFR2 (IMXRT_I2S1.offset048)
  6271. #define I2S1_TFR3 (IMXRT_I2S1.offset04C)
  6272. #define I2S1_TMR (IMXRT_I2S1.offset060)
  6273. #define I2S1_RCSR (IMXRT_I2S1.offset088)
  6274. #define I2S1_RCR1 (IMXRT_I2S1.offset08C)
  6275. #define I2S1_RCR2 (IMXRT_I2S1.offset090)
  6276. #define I2S1_RCR3 (IMXRT_I2S1.offset094)
  6277. #define I2S1_RCR4 (IMXRT_I2S1.offset098)
  6278. #define I2S1_RCR5 (IMXRT_I2S1.offset09C)
  6279. #define I2S1_RDR0 (IMXRT_I2S1.offset0A0)
  6280. #define I2S1_RDR1 (IMXRT_I2S1.offset0A4)
  6281. #define I2S1_RDR2 (IMXRT_I2S1.offset0A8)
  6282. #define I2S1_RDR3 (IMXRT_I2S1.offset0AC)
  6283. #define I2S1_RFR0 (IMXRT_I2S1.offset0C0)
  6284. #define I2S1_RFR1 (IMXRT_I2S1.offset0C4)
  6285. #define I2S1_RFR2 (IMXRT_I2S1.offset0C8)
  6286. #define I2S1_RFR3 (IMXRT_I2S1.offset0CC)
  6287. #define I2S1_RMR (IMXRT_I2S1.offset0E0)
  6288. #define IMXRT_I2S2 (*(IMXRT_REGISTER32_t *)0x40388000)
  6289. #define I2S2_VERID (IMXRT_I2S2.offset000)
  6290. #define I2S2_PARAM (IMXRT_I2S2.offset004)
  6291. #define I2S2_TCSR (IMXRT_I2S2.offset008)
  6292. #define I2S2_TCR1 (IMXRT_I2S2.offset00C)
  6293. #define I2S2_TCR2 (IMXRT_I2S2.offset010)
  6294. #define I2S2_TCR3 (IMXRT_I2S2.offset014)
  6295. #define I2S2_TCR4 (IMXRT_I2S2.offset018)
  6296. #define I2S2_TCR5 (IMXRT_I2S2.offset01C)
  6297. #define I2S2_TDR0 (IMXRT_I2S2.offset020)
  6298. #define I2S2_TDR1 (IMXRT_I2S2.offset024)
  6299. #define I2S2_TDR2 (IMXRT_I2S2.offset028)
  6300. #define I2S2_TDR3 (IMXRT_I2S2.offset02C)
  6301. #define I2S2_TFR0 (IMXRT_I2S2.offset040)
  6302. #define I2S2_TFR1 (IMXRT_I2S2.offset044)
  6303. #define I2S2_TFR2 (IMXRT_I2S2.offset048)
  6304. #define I2S2_TFR3 (IMXRT_I2S2.offset04C)
  6305. #define I2S2_TMR (IMXRT_I2S2.offset060)
  6306. #define I2S2_RCSR (IMXRT_I2S2.offset088)
  6307. #define I2S2_RCR1 (IMXRT_I2S2.offset08C)
  6308. #define I2S2_RCR2 (IMXRT_I2S2.offset090)
  6309. #define I2S2_RCR3 (IMXRT_I2S2.offset094)
  6310. #define I2S2_RCR4 (IMXRT_I2S2.offset098)
  6311. #define I2S2_RCR5 (IMXRT_I2S2.offset09C)
  6312. #define I2S2_RDR0 (IMXRT_I2S2.offset0A0)
  6313. #define I2S2_RDR1 (IMXRT_I2S2.offset0A4)
  6314. #define I2S2_RDR2 (IMXRT_I2S2.offset0A8)
  6315. #define I2S2_RDR3 (IMXRT_I2S2.offset0AC)
  6316. #define I2S2_RFR0 (IMXRT_I2S2.offset0C0)
  6317. #define I2S2_RFR1 (IMXRT_I2S2.offset0C4)
  6318. #define I2S2_RFR2 (IMXRT_I2S2.offset0C8)
  6319. #define I2S2_RFR3 (IMXRT_I2S2.offset0CC)
  6320. #define I2S2_RMR (IMXRT_I2S2.offset0E0)
  6321. #define IMXRT_I2S3 (*(IMXRT_REGISTER32_t *)0x4038C000)
  6322. #define I2S3_VERID (IMXRT_I2S3.offset000)
  6323. #define I2S3_PARAM (IMXRT_I2S3.offset004)
  6324. #define I2S3_TCSR (IMXRT_I2S3.offset008)
  6325. #define I2S3_TCR1 (IMXRT_I2S3.offset00C)
  6326. #define I2S3_TCR2 (IMXRT_I2S3.offset010)
  6327. #define I2S3_TCR3 (IMXRT_I2S3.offset014)
  6328. #define I2S3_TCR4 (IMXRT_I2S3.offset018)
  6329. #define I2S3_TCR5 (IMXRT_I2S3.offset01C)
  6330. #define I2S3_TDR0 (IMXRT_I2S3.offset020)
  6331. #define I2S3_TDR1 (IMXRT_I2S3.offset024)
  6332. #define I2S3_TDR2 (IMXRT_I2S3.offset028)
  6333. #define I2S3_TDR3 (IMXRT_I2S3.offset02C)
  6334. #define I2S3_TFR0 (IMXRT_I2S3.offset040)
  6335. #define I2S3_TFR1 (IMXRT_I2S3.offset044)
  6336. #define I2S3_TFR2 (IMXRT_I2S3.offset048)
  6337. #define I2S3_TFR3 (IMXRT_I2S3.offset04C)
  6338. #define I2S3_TMR (IMXRT_I2S3.offset060)
  6339. #define I2S3_RCSR (IMXRT_I2S3.offset088)
  6340. #define I2S3_RCR1 (IMXRT_I2S3.offset08C)
  6341. #define I2S3_RCR2 (IMXRT_I2S3.offset090)
  6342. #define I2S3_RCR3 (IMXRT_I2S3.offset094)
  6343. #define I2S3_RCR4 (IMXRT_I2S3.offset098)
  6344. #define I2S3_RCR5 (IMXRT_I2S3.offset09C)
  6345. #define I2S3_RDR0 (IMXRT_I2S3.offset0A0)
  6346. #define I2S3_RDR1 (IMXRT_I2S3.offset0A4)
  6347. #define I2S3_RDR2 (IMXRT_I2S3.offset0A8)
  6348. #define I2S3_RDR3 (IMXRT_I2S3.offset0AC)
  6349. #define I2S3_RFR0 (IMXRT_I2S3.offset0C0)
  6350. #define I2S3_RFR1 (IMXRT_I2S3.offset0C4)
  6351. #define I2S3_RFR2 (IMXRT_I2S3.offset0C8)
  6352. #define I2S3_RFR3 (IMXRT_I2S3.offset0CC)
  6353. #define I2S3_RMR (IMXRT_I2S3.offset0E0)
  6354. // 49.3.1.1: page 2784
  6355. #define IMXRT_SEMC (*(IMXRT_REGISTER32_t *)0x402F0000)
  6356. #define SEMC_MCR (IMXRT_SEMC.offset000)
  6357. #define SEMC_IOCR (IMXRT_SEMC.offset004)
  6358. #define SEMC_BMCR0 (IMXRT_SEMC.offset008)
  6359. #define SEMC_BMCR1 (IMXRT_SEMC.offset00C)
  6360. #define SEMC_BR0 (IMXRT_SEMC.offset010)
  6361. #define SEMC_BR1 (IMXRT_SEMC.offset014)
  6362. #define SEMC_BR2 (IMXRT_SEMC.offset018)
  6363. #define SEMC_BR3 (IMXRT_SEMC.offset01C)
  6364. #define SEMC_BR4 (IMXRT_SEMC.offset020)
  6365. #define SEMC_BR5 (IMXRT_SEMC.offset024)
  6366. #define SEMC_BR6 (IMXRT_SEMC.offset028)
  6367. #define SEMC_BR7 (IMXRT_SEMC.offset02C)
  6368. #define SEMC_BR8 (IMXRT_SEMC.offset030)
  6369. #define SEMC_INTEN (IMXRT_SEMC.offset038)
  6370. #define SEMC_INTR (IMXRT_SEMC.offset03C)
  6371. #define SEMC_SDRAMCR0 (IMXRT_SEMC.offset040)
  6372. #define SEMC_SDRAMCR1 (IMXRT_SEMC.offset044)
  6373. #define SEMC_SDRAMCR2 (IMXRT_SEMC.offset048)
  6374. #define SEMC_SDRAMCR3 (IMXRT_SEMC.offset04C)
  6375. #define SEMC_NANDCR0 (IMXRT_SEMC.offset050)
  6376. #define SEMC_NANDCR1 (IMXRT_SEMC.offset054)
  6377. #define SEMC_NANDCR2 (IMXRT_SEMC.offset058)
  6378. #define SEMC_NANDCR3 (IMXRT_SEMC.offset05C)
  6379. #define SEMC_ORCR0 (IMXRT_SEMC.offset060)
  6380. #define SEMC_ORCR1 (IMXRT_SEMC.offset064)
  6381. #define SEMC_ORCR2 (IMXRT_SEMC.offset068)
  6382. #define SEMC_ORCR3 (IMXRT_SEMC.offset06C)
  6383. #define SEMC_SRAMCR0 (IMXRT_SEMC.offset070)
  6384. #define SEMC_SRAMCR1 (IMXRT_SEMC.offset074)
  6385. #define SEMC_SRAMCR2 (IMXRT_SEMC.offset078)
  6386. #define SEMC_SRAMCR3 (IMXRT_SEMC.offset07C)
  6387. #define SEMC_DBICR0 (IMXRT_SEMC.offset080)
  6388. #define SEMC_DBICR1 (IMXRT_SEMC.offset084)
  6389. #define SEMC_IPCR0 (IMXRT_SEMC.offset090)
  6390. #define SEMC_IPCR1 (IMXRT_SEMC.offset094)
  6391. #define SEMC_IPCR2 (IMXRT_SEMC.offset098)
  6392. #define SEMC_IPCMD (IMXRT_SEMC.offset09C)
  6393. #define SEMC_IPTXDAT (IMXRT_SEMC.offset0A0)
  6394. #define SEMC_IPRXDAT (IMXRT_SEMC.offset0B0)
  6395. #define SEMC_STS0 (IMXRT_SEMC.offset0C0)
  6396. #define SEMC_STS1 (IMXRT_SEMC.offset0C4)
  6397. #define SEMC_STS2 (IMXRT_SEMC.offset0C8)
  6398. #define SEMC_STS3 (IMXRT_SEMC.offset0CC)
  6399. #define SEMC_STS4 (IMXRT_SEMC.offset0D0)
  6400. #define SEMC_STS5 (IMXRT_SEMC.offset0D4)
  6401. #define SEMC_STS6 (IMXRT_SEMC.offset0D8)
  6402. #define SEMC_STS7 (IMXRT_SEMC.offset0DC)
  6403. #define SEMC_STS8 (IMXRT_SEMC.offset0E0)
  6404. #define SEMC_STS9 (IMXRT_SEMC.offset0E4)
  6405. #define SEMC_STS10 (IMXRT_SEMC.offset0E8)
  6406. #define SEMC_STS11 (IMXRT_SEMC.offset0EC)
  6407. #define SEMC_STS12 (IMXRT_SEMC.offset0F0)
  6408. #define SEMC_STS13 (IMXRT_SEMC.offset0F4)
  6409. #define SEMC_STS14 (IMXRT_SEMC.offset0F8)
  6410. #define SEMC_STS15 (IMXRT_SEMC.offset0FC)
  6411. // 50.6.1: page 2895
  6412. #define IMXRT_SNVS (*(IMXRT_REGISTER32_t *)0x400D4000)
  6413. #define SNVS_HPLR (IMXRT_SNVS.offset000)
  6414. #define SNVS_HPCOMR (IMXRT_SNVS.offset004)
  6415. #define SNVS_HPCR (IMXRT_SNVS.offset008)
  6416. #define SNVS_HPSR (IMXRT_SNVS.offset014)
  6417. #define SNVS_HPRTCMR (IMXRT_SNVS.offset024)
  6418. #define SNVS_HPRTCLR (IMXRT_SNVS.offset028)
  6419. #define SNVS_HPTAMR (IMXRT_SNVS.offset02C)
  6420. #define SNVS_HPTALR (IMXRT_SNVS.offset030)
  6421. #define SNVS_LPLR (IMXRT_SNVS.offset034)
  6422. #define SNVS_LPCR (IMXRT_SNVS.offset038)
  6423. #define SNVS_LPSR (IMXRT_SNVS.offset04C)
  6424. #define SNVS_LPSMCMR (IMXRT_SNVS.offset05C)
  6425. #define SNVS_LPSMCLR (IMXRT_SNVS.offset060)
  6426. #define SNVS_LPGPR (IMXRT_SNVS.offset068)
  6427. #define IMXRT_SNVS_b (*(IMXRT_REGISTER32_t *)0x400D4800)
  6428. #define SNVS_HPVIDR1 (IMXRT_SNVS_b.offset3F8)
  6429. #define SNVS_HPVIDR2 (IMXRT_SNVS_b.offset3FC)
  6430. // 51.5: page 2938
  6431. #define IMXRT_SPDIF (*(IMXRT_REGISTER32_t *)0x400D4000)
  6432. #define SPDIF_SCR (IMXRT_SPDIF.offset000)
  6433. #define SPDIF_SRCD (IMXRT_SPDIF.offset004)
  6434. #define SPDIF_SRPC (IMXRT_SPDIF.offset008)
  6435. #define SPDIF_SIE (IMXRT_SPDIF.offset00C)
  6436. #define SPDIF_SIS (IMXRT_SPDIF.offset010)
  6437. #define SPDIF_SIC (IMXRT_SPDIF.offset010)
  6438. #define SPDIF_SRL (IMXRT_SPDIF.offset014)
  6439. #define SPDIF_SRR (IMXRT_SPDIF.offset018)
  6440. #define SPDIF_SRCSH (IMXRT_SPDIF.offset01C)
  6441. #define SPDIF_SRCSL (IMXRT_SPDIF.offset020)
  6442. #define SPDIF_SRU (IMXRT_SPDIF.offset024)
  6443. #define SPDIF_SRQ (IMXRT_SPDIF.offset028)
  6444. #define SPDIF_STL (IMXRT_SPDIF.offset02C)
  6445. #define SPDIF_STR (IMXRT_SPDIF.offset030)
  6446. #define SPDIF_STCSCH (IMXRT_SPDIF.offset034)
  6447. #define SPDIF_STCSCL (IMXRT_SPDIF.offset038)
  6448. #define SPDIF_SRFM (IMXRT_SPDIF.offset044)
  6449. #define SPDIF_STC (IMXRT_SPDIF.offset050)
  6450. // 52.7: page 2969
  6451. #define IMXRT_SRC (*(IMXRT_REGISTER32_t *)0x400F8000)
  6452. #define SRC_SCR (IMXRT_SRC.offset000)
  6453. #define SRC_SBMR1 (IMXRT_SRC.offset004)
  6454. #define SRC_SRSR (IMXRT_SRC.offset008)
  6455. #define SRC_SBMR2 (IMXRT_SRC.offset01C)
  6456. #define SRC_GPR1 (IMXRT_SRC.offset020)
  6457. #define SRC_GPR2 (IMXRT_SRC.offset024)
  6458. #define SRC_GPR3 (IMXRT_SRC.offset028)
  6459. #define SRC_GPR4 (IMXRT_SRC.offset02C)
  6460. #define SRC_GPR5 (IMXRT_SRC.offset030)
  6461. #define SRC_GPR6 (IMXRT_SRC.offset034)
  6462. #define SRC_GPR7 (IMXRT_SRC.offset038)
  6463. #define SRC_GPR8 (IMXRT_SRC.offset03C)
  6464. #define SRC_GPR9 (IMXRT_SRC.offset040)
  6465. #define SRC_GPR10 (IMXRT_SRC.offset044)
  6466. // 53.3: page 2986
  6467. #define IMXRT_TEMPMON (*(IMXRT_REGISTER32_t *)0x400F8180)
  6468. #define TEMPMON_TEMPSENSE0 (IMXRT_TEMPMON.offset000)
  6469. #define TEMPMON_TEMPSENSE0_SET (IMXRT_TEMPMON.offset004)
  6470. #define TEMPMON_TEMPSENSE0_CLR (IMXRT_TEMPMON.offset008)
  6471. #define TEMPMON_TEMPSENSE0_TOG (IMXRT_TEMPMON.offset08c)
  6472. #define TEMPMON_TEMPSENSE1 (IMXRT_TEMPMON.offset090)
  6473. #define TEMPMON_TEMPSENSE1_SET (IMXRT_TEMPMON.offset094)
  6474. #define TEMPSENSE1_CLR (IMXRT_TEMPMON.offset098)
  6475. #define TEMPSENSE1_TOG (IMXRT_TEMPMON.offset09C)
  6476. #define TEMPMON_TEMPSENSE2 (IMXRT_TEMPMON.offset100)
  6477. #define TEMPMON_TEMPSENSE2_SET (IMXRT_TEMPMON.offset104)
  6478. #define TEMPMON_TEMPSENSE2_CLR (IMXRT_TEMPMON.offset108)
  6479. #define TEMPMON_TEMPSENSE2_TOG (IMXRT_TEMPMON.offset10C)
  6480. // 54.3: page 2998
  6481. #define IMXRT_TSC (*(IMXRT_REGISTER32_t *)0x400E0000)
  6482. #define TSC_BASIC_SETTING (IMXRT_TSC.offset000)
  6483. #define TSC_PS_INPUT_BUFFER_ADDR (IMXRT_TSC.offset010)
  6484. #define TSC_FLOW_CONTROL (IMXRT_TSC.offset020)
  6485. #define TSC_MEASEURE_VALUE (IMXRT_TSC.offset030)
  6486. #define TSC_INT_EN (IMXRT_TSC.offset040)
  6487. #define TSC_INT_SIG_EN (IMXRT_TSC.offset050)
  6488. #define TSC_INT_STATUS (IMXRT_TSC.offset060)
  6489. #define TSC_DEBUG_MODE (IMXRT_TSC.offset070)
  6490. #define TSC_DEBUG_MODE2 (IMXRT_TSC.offset080)
  6491. // 55.4.1.1: page 3022
  6492. #define IMXRT_USB1 (*(IMXRT_REGISTER32_t *)0x402E0000)
  6493. #define USB1_ID (IMXRT_USB1.offset000)
  6494. #define USB1_HWGENERAL (IMXRT_USB1.offset004)
  6495. #define USB1_HWHOST (IMXRT_USB1.offset008)
  6496. #define USB1_HWDEVICE (IMXRT_USB1.offset00C)
  6497. #define USB1_HWTXBUF (IMXRT_USB1.offset010)
  6498. #define USB1_HWRXBUF (IMXRT_USB1.offset014)
  6499. #define USB1_GPTIMER0LD (IMXRT_USB1.offset080)
  6500. #define USB1_GPTIMER0CTRL (IMXRT_USB1.offset084)
  6501. #define USB1_GPTIMER1LD (IMXRT_USB1.offset088)
  6502. #define USB1_GPTIMER1CTRL (IMXRT_USB1.offset08C)
  6503. #define USB1_SBUSCFG (IMXRT_USB1.offset090)
  6504. #define USB1_HCIVERSION (IMXRT_USB1.offset100)
  6505. #define USB1_HCSPARAMS (IMXRT_USB1.offset104)
  6506. #define USB1_HCCPARAMS (IMXRT_USB1.offset108)
  6507. #define USB1_DCIVERSION (IMXRT_USB1.offset120)
  6508. #define USB1_DCCPARAMS (IMXRT_USB1.offset124)
  6509. #define USB1_USBCMD (IMXRT_USB1.offset140)
  6510. #define USB1_USBSTS (IMXRT_USB1.offset144)
  6511. #define USB1_USBINTR (IMXRT_USB1.offset148)
  6512. #define USB1_FRINDEX (IMXRT_USB1.offset14C)
  6513. #define USB1_PERIODICLISTBASE (IMXRT_USB1.offset154)
  6514. #define USB1_DEVICEADDR (IMXRT_USB1.offset154)
  6515. #define USB1_ASYNCLISTADDR (IMXRT_USB1.offset158)
  6516. #define USB1_ENDPOINTLISTADDR (IMXRT_USB1.offset158)
  6517. #define USB1_BURSTSIZE (IMXRT_USB1.offset160)
  6518. #define USB1_TXFILLTUNING (IMXRT_USB1.offset164)
  6519. #define USB1_ENDPTNAK (IMXRT_USB1.offset178)
  6520. #define USB1_ENDPTNAKEN (IMXRT_USB1.offset17C)
  6521. #define USB1_CONFIGFLAG (IMXRT_USB1.offset180)
  6522. #define USB1_PORTSC1 (IMXRT_USB1.offset184)
  6523. #define USB1_OTGSC (IMXRT_USB1.offset1A4)
  6524. #define USB1_USBMODE (IMXRT_USB1.offset1A8)
  6525. #define USB1_ENDPTSETUPSTAT (IMXRT_USB1.offset1AC)
  6526. #define USB1_ENDPTPRIME (IMXRT_USB1.offset1B0)
  6527. #define USB1_ENDPTFLUSH (IMXRT_USB1.offset1B4)
  6528. #define USB1_ENDPTSTATUS (IMXRT_USB1.offset1B8)
  6529. #define USB1_ENDPTCOMPLETE (IMXRT_USB1.offset1BC)
  6530. #define USB1_ENDPTCTRL0 (IMXRT_USB1.offset1C0)
  6531. #define USB1_ENDPTCTRL1 (IMXRT_USB1.offset1C4)
  6532. #define USB1_ENDPTCTRL2 (IMXRT_USB1.offset1C8)
  6533. #define USB1_ENDPTCTRL3 (IMXRT_USB1.offset1CC)
  6534. #define USB1_ENDPTCTRL4 (IMXRT_USB1.offset1D0)
  6535. #define USB1_ENDPTCTRL5 (IMXRT_USB1.offset1D4)
  6536. #define USB1_ENDPTCTRL6 (IMXRT_USB1.offset1D8)
  6537. #define USB1_ENDPTCTRL7 (IMXRT_USB1.offset1DC)
  6538. #define IMXRT_USB2 (*(IMXRT_REGISTER32_t *)0x402DC000)
  6539. #define USB2_ID (IMXRT_USB2.offset000)
  6540. #define USB2_HWGENERAL (IMXRT_USB2.offset004)
  6541. #define USB2_HWHOST (IMXRT_USB2.offset008)
  6542. #define USB2_HWDEVICE (IMXRT_USB2.offset00C)
  6543. #define USB2_HWTXBUF (IMXRT_USB2.offset010)
  6544. #define USB2_HWRXBUF (IMXRT_USB2.offset014)
  6545. #define USB2_GPTIMER0LD (IMXRT_USB2.offset080)
  6546. #define USB2_GPTIMER0CTRL (IMXRT_USB2.offset084)
  6547. #define USB2_GPTIMER1LD (IMXRT_USB2.offset088)
  6548. #define USB2_GPTIMER1CTRL (IMXRT_USB2.offset08C)
  6549. #define USB2_SBUSCFG (IMXRT_USB2.offset090)
  6550. #define USB2_HCIVERSION (IMXRT_USB2.offset100)
  6551. #define USB2_HCSPARAMS (IMXRT_USB2.offset104)
  6552. #define USB2_HCCPARAMS (IMXRT_USB2.offset108)
  6553. #define USB2_DCIVERSION (IMXRT_USB2.offset120)
  6554. #define USB2_DCCPARAMS (IMXRT_USB2.offset124)
  6555. #define USB2_USBCMD (IMXRT_USB2.offset140)
  6556. #define USB2_USBSTS (IMXRT_USB2.offset144)
  6557. #define USB2_USBINTR (IMXRT_USB2.offset148)
  6558. #define USB2_FRINDEX (IMXRT_USB2.offset14C)
  6559. #define USB2_PERIODICLISTBASE (IMXRT_USB2.offset154)
  6560. #define USB2_DEVICEADDR (IMXRT_USB2.offset154)
  6561. #define USB2_ASYNCLISTADDR (IMXRT_USB2.offset158)
  6562. #define USB2_ENDPOINTLISTADDR (IMXRT_USB2.offset158)
  6563. #define USB2_BURSTSIZE (IMXRT_USB2.offset160)
  6564. #define USB2_TXFILLTUNING (IMXRT_USB2.offset164)
  6565. #define USB2_ENDPTNAK (IMXRT_USB2.offset178)
  6566. #define USB2_ENDPTNAKEN (IMXRT_USB2.offset17C)
  6567. #define USB2_CONFIGFLAG (IMXRT_USB2.offset180)
  6568. #define USB2_PORTSC1 (IMXRT_USB2.offset184)
  6569. #define USB2_OTGSC (IMXRT_USB2.offset1A4)
  6570. #define USB2_USBMODE (IMXRT_USB2.offset1A8)
  6571. #define USB2_ENDPTSETUPSTAT (IMXRT_USB2.offset1AC)
  6572. #define USB2_ENDPTPRIME (IMXRT_USB2.offset1B0)
  6573. #define USB2_ENDPTFLUSH (IMXRT_USB2.offset1B4)
  6574. #define USB2_ENDPTSTATUS (IMXRT_USB2.offset1B8)
  6575. #define USB2_ENDPTCOMPLETE (IMXRT_USB2.offset1BC)
  6576. #define USB2_ENDPTCTRL0 (IMXRT_USB2.offset1C0)
  6577. #define USB2_ENDPTCTRL1 (IMXRT_USB2.offset1C4)
  6578. #define USB2_ENDPTCTRL2 (IMXRT_USB2.offset1C8)
  6579. #define USB2_ENDPTCTRL3 (IMXRT_USB2.offset1CC)
  6580. #define USB2_ENDPTCTRL4 (IMXRT_USB2.offset1D0)
  6581. #define USB2_ENDPTCTRL5 (IMXRT_USB2.offset1D4)
  6582. #define USB2_ENDPTCTRL6 (IMXRT_USB2.offset1D8)
  6583. #define USB2_ENDPTCTRL7 (IMXRT_USB2.offset1DC)
  6584. #define USB_USBCMD_ITC(n) ((uint32_t)(((n) & 0xFF) << 16))
  6585. #define USB_USBCMD_FS_2 ((uint32_t)(1<<15))
  6586. #define USB_USBCMD_SUTW ((uint32_t)(1<<13))
  6587. #define USB_USBCMD_ATDTW ((uint32_t)(1<<12))
  6588. #define USB_USBCMD_ASPE ((uint32_t)(1<<11))
  6589. #define USB_USBCMD_ASP(n) ((uint32_t)(((n) & 0x03) << 8))
  6590. #define USB_USBCMD_IAA ((uint32_t)(1<<6))
  6591. #define USB_USBCMD_ASE ((uint32_t)(1<<5))
  6592. #define USB_USBCMD_PSE ((uint32_t)(1<<4))
  6593. #define USB_USBCMD_FS_1(n) ((uint32_t)(((n) & 0x03) << 2))
  6594. #define USB_USBCMD_RST ((uint32_t)(1<<1))
  6595. #define USB_USBCMD_RS ((uint32_t)(1<<0))
  6596. #define USB_USBSTS_TI1 ((uint32_t)(1<<25))
  6597. #define USB_USBSTS_TI0 ((uint32_t)(1<<24))
  6598. #define USB_USBSTS_NAKI ((uint32_t)(1<<16))
  6599. #define USB_USBSTS_AS ((uint32_t)(1<<15))
  6600. #define USB_USBSTS_PS ((uint32_t)(1<<14))
  6601. #define USB_USBSTS_RCL ((uint32_t)(1<<13))
  6602. #define USB_USBSTS_HCH ((uint32_t)(1<<12))
  6603. #define USB_USBSTS_ULPII ((uint32_t)(1<<10))
  6604. #define USB_USBSTS_SLI ((uint32_t)(1<<8))
  6605. #define USB_USBSTS_SRI ((uint32_t)(1<<7))
  6606. #define USB_USBSTS_URI ((uint32_t)(1<<6))
  6607. #define USB_USBSTS_AAI ((uint32_t)(1<<5))
  6608. #define USB_USBSTS_SEI ((uint32_t)(1<<4))
  6609. #define USB_USBSTS_FRI ((uint32_t)(1<<3))
  6610. #define USB_USBSTS_PCI ((uint32_t)(1<<2))
  6611. #define USB_USBSTS_UEI ((uint32_t)(1<<1))
  6612. #define USB_USBSTS_UI ((uint32_t)(1<<0))
  6613. #define USB_USBINTR_TIE1 ((uint32_t)(1<<25))
  6614. #define USB_USBINTR_TIE0 ((uint32_t)(1<<24))
  6615. #define USB_USBINTR_UPIE ((uint32_t)(1<<19))
  6616. #define USB_USBINTR_UAIE ((uint32_t)(1<<18))
  6617. #define USB_USBINTR_NAKE ((uint32_t)(1<<16))
  6618. #define USB_USBINTR_ULPIE ((uint32_t)(1<<10))
  6619. #define USB_USBINTR_SLE ((uint32_t)(1<<8))
  6620. #define USB_USBINTR_SRE ((uint32_t)(1<<7))
  6621. #define USB_USBINTR_URE ((uint32_t)(1<<6))
  6622. #define USB_USBINTR_AAE ((uint32_t)(1<<5))
  6623. #define USB_USBINTR_SEE ((uint32_t)(1<<4))
  6624. #define USB_USBINTR_FRE ((uint32_t)(1<<3))
  6625. #define USB_USBINTR_PCE ((uint32_t)(1<<2))
  6626. #define USB_USBINTR_UEE ((uint32_t)(1<<1))
  6627. #define USB_USBINTR_UE ((uint32_t)(1<<0))
  6628. #define USB_DEVICEADDR_USBADR(n) ((uint32_t)(((n) & 0x7F) << 25))
  6629. #define USB_DEVICEADDR_USBADRA ((uint32_t)(1<<24))
  6630. #define USB_PORTSC1_PTS_1(n) ((uint32_t)(((n) & 0x03) << 30))
  6631. #define USB_PORTSC1_STS ((uint32_t)(1<<29))
  6632. #define USB_PORTSC1_PTW ((uint32_t)(1<<28))
  6633. #define USB_PORTSC1_PSPD(n) ((uint32_t)(((n) & 0x03) << 26))
  6634. #define USB_PORTSC1_PTS_2 ((uint32_t)(1<<25))
  6635. #define USB_PORTSC1_PFSC ((uint32_t)(1<<24))
  6636. #define USB_PORTSC1_PHCD ((uint32_t)(1<<23))
  6637. #define USB_PORTSC1_WKOC ((uint32_t)(1<<22))
  6638. #define USB_PORTSC1_WKDC ((uint32_t)(1<<21))
  6639. #define USB_PORTSC1_WKCN ((uint32_t)(1<<20))
  6640. #define USB_PORTSC1_PTC(n) ((uint32_t)(((n) & 0x0F) << 16))
  6641. #define USB_PORTSC1_PIC(n) ((uint32_t)(((n) & 0x03) << 14))
  6642. #define USB_PORTSC1_PO ((uint32_t)(1<<13))
  6643. #define USB_PORTSC1_PP ((uint32_t)(1<<12))
  6644. #define USB_PORTSC1_LS(n) ((uint32_t)(((n) & 0x03) << 10))
  6645. #define USB_PORTSC1_HSP ((uint32_t)(1<<9))
  6646. #define USB_PORTSC1_PR ((uint32_t)(1<<8))
  6647. #define USB_PORTSC1_SUSP ((uint32_t)(1<<7))
  6648. #define USB_PORTSC1_FPR ((uint32_t)(1<<6))
  6649. #define USB_PORTSC1_OCC ((uint32_t)(1<<5))
  6650. #define USB_PORTSC1_OCA ((uint32_t)(1<<4))
  6651. #define USB_PORTSC1_PEC ((uint32_t)(1<<3))
  6652. #define USB_PORTSC1_PE ((uint32_t)(1<<2))
  6653. #define USB_PORTSC1_CSC ((uint32_t)(1<<1))
  6654. #define USB_PORTSC1_CCS ((uint32_t)(1<<0))
  6655. #define USB_USBMODE_SDIS ((uint32_t)(1<<4))
  6656. #define USB_USBMODE_SLOM ((uint32_t)(1<<3))
  6657. #define USB_USBMODE_ES ((uint32_t)(1<<2))
  6658. #define USB_USBMODE_CM(n) ((uint32_t)(((n) & 0x03) << 0))
  6659. #define USB_USBMODE_CM_MASK USB_USBMODE_CM(3)
  6660. #define USB_ENDPTCTRL_TXE ((uint32_t)(1<<23))
  6661. #define USB_ENDPTCTRL_TXR ((uint32_t)(1<<22))
  6662. #define USB_ENDPTCTRL_TXI ((uint32_t)(1<<21))
  6663. #define USB_ENDPTCTRL_TXT(n) ((uint32_t)(((n) & 0x03) << 18))
  6664. #define USB_ENDPTCTRL_TXD ((uint32_t)(1<<17))
  6665. #define USB_ENDPTCTRL_TXS ((uint32_t)(1<<16))
  6666. #define USB_ENDPTCTRL_RXE ((uint32_t)(1<<7))
  6667. #define USB_ENDPTCTRL_RXR ((uint32_t)(1<<6))
  6668. #define USB_ENDPTCTRL_RXI ((uint32_t)(1<<5))
  6669. #define USB_ENDPTCTRL_RXT(n) ((uint32_t)(((n) & 0x03) << 2))
  6670. #define USB_ENDPTCTRL_RXD ((uint32_t)(1<<0))
  6671. #define USB_ENDPTCTRL_RXS ((uint32_t)(1<<1))
  6672. // 56.3: page 3283
  6673. #define IMXRT_USBPHY1 (*(IMXRT_REGISTER32_t *)0x400D9000)
  6674. #define USBPHY1_PWD (IMXRT_USBPHY1.offset000)
  6675. #define USBPHY1_PWD_SET (IMXRT_USBPHY1.offset004)
  6676. #define USBPHY1_PWD_CLR (IMXRT_USBPHY1.offset008)
  6677. #define USBPHY1_PWD_TOG (IMXRT_USBPHY1.offset00C)
  6678. #define USBPHY1_TX (IMXRT_USBPHY1.offset010)
  6679. #define USBPHY1_TX_SET (IMXRT_USBPHY1.offset014)
  6680. #define USBPHY1_TX_CLR (IMXRT_USBPHY1.offset018)
  6681. #define USBPHY1_TX_TOG (IMXRT_USBPHY1.offset01C)
  6682. #define USBPHY1_RX (IMXRT_USBPHY1.offset020)
  6683. #define USBPHY1_RX_SET (IMXRT_USBPHY1.offset024)
  6684. #define USBPHY1_RX_CLR (IMXRT_USBPHY1.offset028)
  6685. #define USBPHY1_RX_TOG (IMXRT_USBPHY1.offset02C)
  6686. #define USBPHY1_CTRL (IMXRT_USBPHY1.offset030)
  6687. #define USBPHY1_CTRL_SET (IMXRT_USBPHY1.offset034)
  6688. #define USBPHY1_CTRL_CLR (IMXRT_USBPHY1.offset038)
  6689. #define USBPHY1_CTRL_TOG (IMXRT_USBPHY1.offset03C)
  6690. #define USBPHY1_STATUS (IMXRT_USBPHY1.offset040)
  6691. #define USBPHY1_DEBUG (IMXRT_USBPHY1.offset050)
  6692. #define USBPHY1_DEBUG_SET (IMXRT_USBPHY1.offset054)
  6693. #define USBPHY1_DEBUG_CLR (IMXRT_USBPHY1.offset058)
  6694. #define USBPHY1_DEBUG_TOG (IMXRT_USBPHY1.offset05C)
  6695. #define USBPHY1_DEBUG0_STATUS (IMXRT_USBPHY1.offset060)
  6696. #define USBPHY1_DEBUG1 (IMXRT_USBPHY1.offset070)
  6697. #define USBPHY1_DEBUG1_SET (IMXRT_USBPHY1.offset074)
  6698. #define USBPHY1_DEBUG1_CLR (IMXRT_USBPHY1.offset078)
  6699. #define USBPHY1_DEBUG1_TOG (IMXRT_USBPHY1.offset07C)
  6700. #define USBPHY1_VERSION (IMXRT_USBPHY1.offset080)
  6701. #define IMXRT_USBPHY2 (*(IMXRT_REGISTER32_t *)0x400DA000)
  6702. #define USBPHY2_PWD (IMXRT_USBPHY2.offset000)
  6703. #define USBPHY2_PWD_SET (IMXRT_USBPHY2.offset004)
  6704. #define USBPHY2_PWD_CLR (IMXRT_USBPHY2.offset008)
  6705. #define USBPHY2_PWD_TOG (IMXRT_USBPHY2.offset00C)
  6706. #define USBPHY2_TX (IMXRT_USBPHY2.offset010)
  6707. #define USBPHY2_TX_SET (IMXRT_USBPHY2.offset014)
  6708. #define USBPHY2_TX_CLR (IMXRT_USBPHY2.offset018)
  6709. #define USBPHY2_TX_TOG (IMXRT_USBPHY2.offset01C)
  6710. #define USBPHY2_RX (IMXRT_USBPHY2.offset020)
  6711. #define USBPHY2_RX_SET (IMXRT_USBPHY2.offset024)
  6712. #define USBPHY2_RX_CLR (IMXRT_USBPHY2.offset028)
  6713. #define USBPHY2_RX_TOG (IMXRT_USBPHY2.offset02C)
  6714. #define USBPHY2_CTRL (IMXRT_USBPHY2.offset030)
  6715. #define USBPHY2_CTRL_SET (IMXRT_USBPHY2.offset034)
  6716. #define USBPHY2_CTRL_CLR (IMXRT_USBPHY2.offset038)
  6717. #define USBPHY2_CTRL_TOG (IMXRT_USBPHY2.offset03C)
  6718. #define USBPHY2_STATUS (IMXRT_USBPHY2.offset040)
  6719. #define USBPHY2_DEBUG (IMXRT_USBPHY2.offset050)
  6720. #define USBPHY2_DEBUG_SET (IMXRT_USBPHY2.offset054)
  6721. #define USBPHY2_DEBUG_CLR (IMXRT_USBPHY2.offset058)
  6722. #define USBPHY2_DEBUG_TOG (IMXRT_USBPHY2.offset05C)
  6723. #define USBPHY2_DEBUG0_STATUS (IMXRT_USBPHY2.offset060)
  6724. #define USBPHY2_DEBUG1 (IMXRT_USBPHY2.offset070)
  6725. #define USBPHY2_DEBUG1_SET (IMXRT_USBPHY2.offset074)
  6726. #define USBPHY2_DEBUG1_CLR (IMXRT_USBPHY2.offset078)
  6727. #define USBPHY2_DEBUG1_TOG (IMXRT_USBPHY2.offset07C)
  6728. #define USBPHY2_VERSION (IMXRT_USBPHY2.offset080)
  6729. #define USBPHY_PWD_RXPWDRX ((uint32_t)(1<<20))
  6730. #define USBPHY_PWD_RXPWDDIFF ((uint32_t)(1<<19))
  6731. #define USBPHY_PWD_RXPWD1PT1 ((uint32_t)(1<<18))
  6732. #define USBPHY_PWD_RXPWDENV ((uint32_t)(1<<17))
  6733. #define USBPHY_PWD_TXPWDV2I ((uint32_t)(1<<12))
  6734. #define USBPHY_PWD_TXPWDIBIAS ((uint32_t)(1<<11))
  6735. #define USBPHY_PWD_TXPWDFS ((uint32_t)(1<<10))
  6736. #define USBPHY_TX_USBPHY_TX_EDGECTRL(n) ((uint32_t)(((n) & 0x07) << 26))
  6737. #define USBPHY_TX_TXCAL45DP(n) ((uint32_t)(((n) & 0x0F) << 16))
  6738. #define USBPHY_TX_TXCAL45DN(n) ((uint32_t)(((n) & 0x0F) << 8))
  6739. #define USBPHY_TX_D_CAL(n) ((uint32_t)(((n) & 0x0F) << 0))
  6740. #define USBPHY_RX_RXDBYPASS ((uint32_t)(1<<22))
  6741. #define USBPHY_RX_DISCONADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  6742. #define USBPHY_RX_ENVADJ(n) ((uint32_t)(((n) & 0x07) << 0))
  6743. #define USBPHY_CTRL_SFTRST ((uint32_t)(1<<31))
  6744. #define USBPHY_CTRL_CLKGATE ((uint32_t)(1<<30))
  6745. #define USBPHY_CTRL_UTMI_SUSPENDM ((uint32_t)(1<<29))
  6746. #define USBPHY_CTRL_HOST_FORCE_LS_SE0 ((uint32_t)(1<<28))
  6747. #define USBPHY_CTRL_OTG_ID_VALUE ((uint32_t)(1<<27))
  6748. #define USBPHY_CTRL_FSDLL_RST_EN ((uint32_t)(1<<24))
  6749. #define USBPHY_CTRL_ENVBUSCHG_WKUP ((uint32_t)(1<<23))
  6750. #define USBPHY_CTRL_ENIDCHG_WKUP ((uint32_t)(1<<22))
  6751. #define USBPHY_CTRL_ENDPDMCHG_WKUP ((uint32_t)(1<<21))
  6752. #define USBPHY_CTRL_ENAUTOCLR_PHY_PWD ((uint32_t)(1<<20))
  6753. #define USBPHY_CTRL_ENAUTOCLR_CLKGATE ((uint32_t)(1<<19))
  6754. #define USBPHY_CTRL_ENAUTO_PWRON_PLL ((uint32_t)(1<<18))
  6755. #define USBPHY_CTRL_WAKEUP_IRQ ((uint32_t)(1<<17))
  6756. #define USBPHY_CTRL_ENIRQWAKEUP ((uint32_t)(1<<16))
  6757. #define USBPHY_CTRL_ENUTMILEVEL3 ((uint32_t)(1<<15))
  6758. #define USBPHY_CTRL_ENUTMILEVEL2 ((uint32_t)(1<<14))
  6759. #define USBPHY_CTRL_DATA_ON_LRADC ((uint32_t)(1<<13))
  6760. #define USBPHY_CTRL_DEVPLUGIN_IRQ ((uint32_t)(1<<12))
  6761. #define USBPHY_CTRL_ENIRQDEVPLUGIN ((uint32_t)(1<<11))
  6762. #define USBPHY_CTRL_RESUME_IRQ ((uint32_t)(1<<10))
  6763. #define USBPHY_CTRL_ENIRQRESUMEDETECT ((uint32_t)(1<<9))
  6764. #define USBPHY_CTRL_RESUMEIRQSTICKY ((uint32_t)(1<<8))
  6765. #define USBPHY_CTRL_ENOTGIDDETECT ((uint32_t)(1<<7))
  6766. #define USBPHY_CTRL_OTG_ID_CHG_IRQ ((uint32_t)(1<<6))
  6767. #define USBPHY_CTRL_DEVPLUGIN_POLARITY ((uint32_t)(1<<5))
  6768. #define USBPHY_CTRL_ENDEVPLUGINDETECT ((uint32_t)(1<<4))
  6769. #define USBPHY_CTRL_HOSTDISCONDETECT_IRQ ((uint32_t)(1<<3))
  6770. #define USBPHY_CTRL_ENIRQHOSTDISCON ((uint32_t)(1<<2))
  6771. #define USBPHY_CTRL_ENHOSTDISCONDETECT ((uint32_t)(1<<1))
  6772. #define USBPHY_CTRL_ENOTG_ID_CHG_IRQ ((uint32_t)(1<<0))
  6773. // 57.9.1.1: page 3381
  6774. #define IMXRT_USDHC1 (*(IMXRT_REGISTER32_t *)0x402C0000)
  6775. #define USDHC1_DS_ADDR (IMXRT_USDHC1.offset000)
  6776. #define USDHC1_BLK_ATT (IMXRT_USDHC1.offset004)
  6777. #define USDHC1_CMD_ARG (IMXRT_USDHC1.offset008)
  6778. #define USDHC1_CMD_XFR_TYP (IMXRT_USDHC1.offset00C)
  6779. #define USDHC1_CMD_RSP0 (IMXRT_USDHC1.offset010)
  6780. #define USDHC1_CMD_RSP1 (IMXRT_USDHC1.offset014)
  6781. #define USDHC1_CMD_RSP2 (IMXRT_USDHC1.offset018)
  6782. #define USDHC1_CMD_RSP3 (IMXRT_USDHC1.offset01C)
  6783. #define USDHC1_DATA_BUFF_ACC_PORT (IMXRT_USDHC1.offset020)
  6784. #define USDHC1_PRES_STATE (IMXRT_USDHC1.offset024)
  6785. #define USDHC1_PROT_CTRL (IMXRT_USDHC1.offset028)
  6786. #define USDHC1_SYS_CTRL (IMXRT_USDHC1.offset02C)
  6787. #define USDHC1_INT_STATUS (IMXRT_USDHC1.offset030)
  6788. #define USDHC1_INT_STATUS_EN (IMXRT_USDHC1.offset034)
  6789. #define USDHC1_INT_SIGNAL_EN (IMXRT_USDHC1.offset038)
  6790. #define USDHC1_AUTOCMD12_ERR_STATUS (IMXRT_USDHC1.offset03C)
  6791. #define USDHC1_HOST_CTRL_CAP (IMXRT_USDHC1.offset040)
  6792. #define USDHC1_WTMK_LVL (IMXRT_USDHC1.offset044)
  6793. #define USDHC1_MIX_CTRL (IMXRT_USDHC1.offset048)
  6794. #define USDHC1_FORCE_EVENT (IMXRT_USDHC1.offset050)
  6795. #define USDHC1_ADMA_ERR_STATUS (IMXRT_USDHC1.offset054)
  6796. #define USDHC1_ADMA_SYS_ADDR (IMXRT_USDHC1.offset058)
  6797. #define USDHC1_DLL_CTRL (IMXRT_USDHC1.offset060)
  6798. #define USDHC1_DLL_STATUS (IMXRT_USDHC1.offset064)
  6799. #define USDHC1_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC1.offset068)
  6800. #define USDHC1_VEND_SPEC (IMXRT_USDHC1.offset0C0)
  6801. #define USDHC1_MMC_BOOT (IMXRT_USDHC1.offset0C4)
  6802. #define USDHC1_VEND_SPEC2 (IMXRT_USDHC1.offset0C8)
  6803. #define USDHC1_TUNING_CTRL (IMXRT_USDHC1.offset0CC)
  6804. #define IMXRT_USDHC2 (*(IMXRT_REGISTER32_t *)0x402C4000)
  6805. #define USDHC2_DS_ADDR (IMXRT_USDHC2.offset000)
  6806. #define USDHC2_BLK_ATT (IMXRT_USDHC2.offset004)
  6807. #define USDHC2_CMD_ARG (IMXRT_USDHC2.offset008)
  6808. #define USDHC2_CMD_XFR_TYP (IMXRT_USDHC2.offset00C)
  6809. #define USDHC2_CMD_RSP0 (IMXRT_USDHC2.offset010)
  6810. #define USDHC2_CMD_RSP1 (IMXRT_USDHC2.offset014)
  6811. #define USDHC2_CMD_RSP2 (IMXRT_USDHC2.offset018)
  6812. #define USDHC2_CMD_RSP3 (IMXRT_USDHC2.offset01C)
  6813. #define USDHC2_DATA_BUFF_ACC_PORT (IMXRT_USDHC2.offset020)
  6814. #define USDHC2_PRES_STATE (IMXRT_USDHC2.offset024)
  6815. #define USDHC2_PROT_CTRL (IMXRT_USDHC2.offset028)
  6816. #define USDHC2_SYS_CTRL (IMXRT_USDHC2.offset02C)
  6817. #define USDHC2_INT_STATUS (IMXRT_USDHC2.offset030)
  6818. #define USDHC2_INT_STATUS_EN (IMXRT_USDHC2.offset034)
  6819. #define USDHC2_INT_SIGNAL_EN (IMXRT_USDHC2.offset038)
  6820. #define USDHC2_AUTOCMD12_ERR_STATUS (IMXRT_USDHC2.offset03C)
  6821. #define USDHC2_HOST_CTRL_CAP (IMXRT_USDHC2.offset040)
  6822. #define USDHC2_WTMK_LVL (IMXRT_USDHC2.offset044)
  6823. #define USDHC2_MIX_CTRL (IMXRT_USDHC2.offset048)
  6824. #define USDHC2_FORCE_EVENT (IMXRT_USDHC2.offset050)
  6825. #define USDHC2_ADMA_ERR_STATUS (IMXRT_USDHC2.offset054)
  6826. #define USDHC2_ADMA_SYS_ADDR (IMXRT_USDHC2.offset058)
  6827. #define USDHC2_DLL_CTRL (IMXRT_USDHC2.offset060)
  6828. #define USDHC2_DLL_STATUS (IMXRT_USDHC2.offset064)
  6829. #define USDHC2_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC2.offset068)
  6830. #define USDHC2_VEND_SPEC (IMXRT_USDHC2.offset0C0)
  6831. #define USDHC2_MMC_BOOT (IMXRT_USDHC2.offset0C4)
  6832. #define USDHC2_VEND_SPEC2 (IMXRT_USDHC2.offset0C8)
  6833. #define USDHC2_TUNING_CTRL (IMXRT_USDHC2.offset0CC)
  6834. // 58.7.1.1: page 3461
  6835. #define IMXRT_WDOG1 (*(IMXRT_REGISTER16_t *)0x400B8000)
  6836. #define WDOG1_WCR (IMXRT_WDOG1.offset000)
  6837. #define WDOG1_WSR (IMXRT_WDOG1.offset002)
  6838. #define WDOG1_WRSR (IMXRT_WDOG1.offset004)
  6839. #define WDOG1_WICR (IMXRT_WDOG1.offset006)
  6840. #define WDOG1_WMCR (IMXRT_WDOG1.offset008)
  6841. #define IMXRT_WDOG2 (*(IMXRT_REGISTER16_t *)0x400D0000)
  6842. #define WDOG2_WCR (IMXRT_WDOG2.offset000)
  6843. #define WDOG2_WSR (IMXRT_WDOG2.offset002)
  6844. #define WDOG2_WRSR (IMXRT_WDOG2.offset004)
  6845. #define WDOG2_WICR (IMXRT_WDOG2.offset006)
  6846. #define WDOG2_WMCR (IMXRT_WDOG2.offset008)
  6847. // 59.3.1.1: page 3471
  6848. #define IMXRT_WDOG3 (*(IMXRT_REGISTER32_t *)0x400BC000)
  6849. #define WDOG3_CS (IMXRT_WDOG3.offset000)
  6850. #define WDOG3_CNT (IMXRT_WDOG3.offset004)
  6851. #define WDOG3_TOVAL (IMXRT_WDOG3.offset008)
  6852. #define WDOG3_WIN (IMXRT_WDOG3.offset00C)
  6853. // 60.4: page 3491
  6854. #define IMXRT_XBARA1 (*(IMXRT_REGISTER16_t *)0x403BC000)
  6855. #define XBARA1_SEL0 (IMXRT_XBARA1.offset000)
  6856. #define XBARA1_SEL1 (IMXRT_XBARA1.offset002)
  6857. #define XBARA1_SEL2 (IMXRT_XBARA1.offset004)
  6858. #define XBARA1_SEL3 (IMXRT_XBARA1.offset006)
  6859. #define XBARA1_SEL4 (IMXRT_XBARA1.offset008)
  6860. #define XBARA1_SEL5 (IMXRT_XBARA1.offset00A)
  6861. #define XBARA1_SEL6 (IMXRT_XBARA1.offset00C)
  6862. #define XBARA1_SEL7 (IMXRT_XBARA1.offset00E)
  6863. #define XBARA1_SEL8 (IMXRT_XBARA1.offset010)
  6864. #define XBARA1_SEL9 (IMXRT_XBARA1.offset012)
  6865. #define XBARA1_SEL10 (IMXRT_XBARA1.offset014)
  6866. #define XBARA1_SEL11 (IMXRT_XBARA1.offset016)
  6867. #define XBARA1_SEL12 (IMXRT_XBARA1.offset018)
  6868. #define XBARA1_SEL13 (IMXRT_XBARA1.offset01A)
  6869. #define XBARA1_SEL14 (IMXRT_XBARA1.offset01C)
  6870. #define XBARA1_SEL15 (IMXRT_XBARA1.offset01E)
  6871. #define XBARA1_SEL16 (IMXRT_XBARA1.offset020)
  6872. #define XBARA1_SEL17 (IMXRT_XBARA1.offset022)
  6873. #define XBARA1_SEL18 (IMXRT_XBARA1.offset024)
  6874. #define XBARA1_SEL19 (IMXRT_XBARA1.offset026)
  6875. #define XBARA1_SEL20 (IMXRT_XBARA1.offset028)
  6876. #define XBARA1_SEL21 (IMXRT_XBARA1.offset02A)
  6877. #define XBARA1_SEL22 (IMXRT_XBARA1.offset02C)
  6878. #define XBARA1_SEL23 (IMXRT_XBARA1.offset02E)
  6879. #define XBARA1_SEL24 (IMXRT_XBARA1.offset030)
  6880. #define XBARA1_SEL25 (IMXRT_XBARA1.offset032)
  6881. #define XBARA1_SEL26 (IMXRT_XBARA1.offset034)
  6882. #define XBARA1_SEL27 (IMXRT_XBARA1.offset036)
  6883. #define XBARA1_SEL28 (IMXRT_XBARA1.offset038)
  6884. #define XBARA1_SEL29 (IMXRT_XBARA1.offset03A)
  6885. #define XBARA1_CTRL0 (IMXRT_XBARA1.offset03C)
  6886. #define XBARA1_CTRL1 (IMXRT_XBARA1.offset03E)
  6887. // 61.3: page 3537
  6888. #define IMXRT_XBARB2 (*(IMXRT_REGISTER16_t *)0x403C0000)
  6889. #define XBARB2_SEL0 (IMXRT_XBARB2.offset000)
  6890. #define XBARB2_SEL1 (IMXRT_XBARB2.offset002)
  6891. #define XBARB2_SEL2 (IMXRT_XBARB2.offset004)
  6892. #define XBARB2_SEL3 (IMXRT_XBARB2.offset006)
  6893. #define XBARB2_SEL4 (IMXRT_XBARB2.offset008)
  6894. #define XBARB2_SEL5 (IMXRT_XBARB2.offset00A)
  6895. #define XBARB2_SEL6 (IMXRT_XBARB2.offset00C)
  6896. #define XBARB2_SEL7 (IMXRT_XBARB2.offset00E)
  6897. #define IMXRT_XBARB3 (*(IMXRT_REGISTER16_t *)0x403C4000)
  6898. #define XBARB3_SEL0 (IMXRT_XBARB3.offset000)
  6899. #define XBARB3_SEL1 (IMXRT_XBARB3.offset002)
  6900. #define XBARB3_SEL2 (IMXRT_XBARB3.offset004)
  6901. #define XBARB3_SEL3 (IMXRT_XBARB3.offset006)
  6902. #define XBARB3_SEL4 (IMXRT_XBARB3.offset008)
  6903. #define XBARB3_SEL5 (IMXRT_XBARB3.offset00A)
  6904. #define XBARB3_SEL6 (IMXRT_XBARB3.offset00C)
  6905. #define XBARB3_SEL7 (IMXRT_XBARB3.offset00E)
  6906. // 62.5: page 3548
  6907. #define IMXRT_XTALOSC24M (*(IMXRT_REGISTER32_t *)0x400D8000)
  6908. #define XTALOSC24M_MISC0 (IMXRT_XTALOSC24M.offset150)
  6909. #define XTALOSC24M_LOWPWR_CTRL (IMXRT_XTALOSC24M.offset270)
  6910. #define XTALOSC24M_LOWPWR_CTRL_SET (IMXRT_XTALOSC24M.offset274)
  6911. #define XTALOSC24M_LOWPWR_CTRL_CLR (IMXRT_XTALOSC24M.offset278)
  6912. #define XTALOSC24M_LOWPWR_CTRL_TOG (IMXRT_XTALOSC24M.offset27C)
  6913. #define XTALOSC24M_OSC_CONFIG0 (IMXRT_XTALOSC24M.offset2A0)
  6914. #define XTALOSC24M_OSC_CONFIG0_SET (IMXRT_XTALOSC24M.offset2A4)
  6915. #define XTALOSC24M_OSC_CONFIG0_CLR (IMXRT_XTALOSC24M.offset2A8)
  6916. #define XTALOSC24M_OSC_CONFIG0_TOG (IMXRT_XTALOSC24M.offset2AC)
  6917. #define XTALOSC24M_OSC_CONFIG1 (IMXRT_XTALOSC24M.offset2B0)
  6918. #define XTALOSC24M_OSC_CONFIG1_SET (IMXRT_XTALOSC24M.offset2B4)
  6919. #define XTALOSC24M_OSC_CONFIG1_CLR (IMXRT_XTALOSC24M.offset2B8)
  6920. #define XTALOSC24M_OSC_CONFIG1_TOG (IMXRT_XTALOSC24M.offset2BC)
  6921. #define XTALOSC24M_OSC_CONFIG2 (IMXRT_XTALOSC24M.offset2C0)
  6922. #define XTALOSC24M_OSC_CONFIG2_SET (IMXRT_XTALOSC24M.offset2C4)
  6923. #define XTALOSC24M_OSC_CONFIG2_CLR (IMXRT_XTALOSC24M.offset2C8)
  6924. #define XTALOSC24M_OSC_CONFIG2_TOG (IMXRT_XTALOSC24M.offset2CC)
  6925. // 0 = highest priority
  6926. // Cortex-M7: 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240
  6927. #define NVIC_SET_PRIORITY(irqnum, priority) (*((volatile uint8_t *)0xE000E400 + (irqnum)) = (uint8_t)(priority))
  6928. #define NVIC_GET_PRIORITY(irqnum) (*((uint8_t *)0xE000E400 + (irqnum)))
  6929. #define __disable_irq() __asm__ volatile("CPSID i":::"memory");
  6930. #define __enable_irq() __asm__ volatile("CPSIE i":::"memory");
  6931. // System Control Space (SCS), ARMv7 ref manual, B3.2, page 708
  6932. #define SCB_CPUID (*(const uint32_t *)0xE000ED00) // CPUID Base Register
  6933. #define SCB_ICSR (*(volatile uint32_t *)0xE000ED04) // Interrupt Control and State
  6934. #define SCB_ICSR_NMIPENDSET ((uint32_t)(1<<31))
  6935. #define SCB_ICSR_PENDSVSET ((uint32_t)(1<<28))
  6936. #define SCB_ICSR_PENDSVCLR ((uint32_t)(1<<27))
  6937. #define SCB_ICSR_PENDSTSET ((uint32_t)(1<<26))
  6938. #define SCB_ICSR_PENDSTCLR ((uint32_t)(1<<25))
  6939. #define SCB_ICSR_ISRPREEMPT ((uint32_t)(1<<23))
  6940. #define SCB_ICSR_ISRPENDING ((uint32_t)(1<<22))
  6941. #define SCB_ICSR_RETTOBASE ((uint32_t)(1<<11))
  6942. #define SCB_VTOR (*(volatile uint32_t *)0xE000ED08) // Vector Table Offset
  6943. #define SCB_AIRCR (*(volatile uint32_t *)0xE000ED0C) // Application Interrupt & Reset
  6944. #define SCB_SCR (*(volatile uint32_t *)0xE000ED10) // System Control Register
  6945. #define SCB_SCR_SEVONPEND ((uint8_t)0x10) // Send Event on Pending bit
  6946. #define SCB_SCR_SLEEPDEEP ((uint8_t)0x04) // Sleep or Deep Sleep
  6947. #define SCB_SCR_SLEEPONEXIT ((uint8_t)0x02) // Sleep-on-exit
  6948. #define SCB_CCR (*(volatile uint32_t *)0xE000ED14) // Configuration and Control
  6949. #define SCB_CCR_BP ((uint32_t)(1<<18)) // Branch prediction enable
  6950. #define SCB_CCR_IC ((uint32_t)(1<<17)) // Instruction caches enable
  6951. #define SCB_CCR_DC ((uint32_t)(1<<16))
  6952. #define SCB_CCR_STKALIGN ((uint32_t)(1<<9))
  6953. #define SCB_CCR_BFHFNMIGN ((uint32_t)(1<<8))
  6954. #define SCB_CCR_DIV_0_TRP ((uint32_t)(1<<4))
  6955. #define SCB_CCR_UNALIGN_TRP ((uint32_t)(1<<3))
  6956. #define SCB_CCR_USERSETMPEND ((uint32_t)(1<<1))
  6957. #define SCB_CCR_NONBASETHRDENA ((uint32_t)(1<<0))
  6958. #define SCB_SHPR1 (*(volatile uint32_t *)0xE000ED18) // System Handler Priority 1
  6959. #define SCB_SHPR2 (*(volatile uint32_t *)0xE000ED1C) // System Handler Priority 2
  6960. #define SCB_SHPR3 (*(volatile uint32_t *)0xE000ED20) // System Handler Priority 3
  6961. #define SCB_SHCSR (*(volatile uint32_t *)0xE000ED24) // System Handler Control & State
  6962. #define SCB_CFSR (*(volatile uint32_t *)0xE000ED28) // Configurable Fault Status
  6963. #define SCB_HFSR (*(volatile uint32_t *)0xE000ED2C) // HardFault Status
  6964. #define SCB_DFSR (*(volatile uint32_t *)0xE000ED30) // Debug Fault Status
  6965. #define SCB_MMFAR (*(volatile uint32_t *)0xE000ED34) // MemManage Fault Address
  6966. #define SCB_BFAR (*(volatile uint32_t *)0xE000ED38) // Bus Fault Address
  6967. #define SCB_AFAR (*(volatile uint32_t *)0xE000ED3C) // Aux Fault Address
  6968. #define SCB_CPACR (*(volatile uint32_t *)0xE000ED88) // Coprocessor Access Control
  6969. #define SCB_FPCCR (*(volatile uint32_t *)0xE000EF34) // FP Context Control
  6970. #define SCB_FPCAR (*(volatile uint32_t *)0xE000EF38) // FP Context Address
  6971. #define SCB_FPDSCR (*(volatile uint32_t *)0xE000EF3C) // FP Default Status Control
  6972. #define SCB_MVFR0 (*(volatile uint32_t *)0xE000EF40) // Media & FP Feature 0
  6973. #define SCB_MVFR1 (*(volatile uint32_t *)0xE000EF44) // Media & FP Feature 1
  6974. #define SCB_MVFR2 (*(volatile uint32_t *)0xE000EF48) // Media & FP Feature 2
  6975. #define SYST_CSR (*(volatile uint32_t *)0xE000E010) // SysTick Control and Status
  6976. #define SYST_CSR_COUNTFLAG ((uint32_t)(1<<16))
  6977. #define SYST_CSR_CLKSOURCE ((uint32_t)(1<<2))
  6978. #define SYST_CSR_TICKINT ((uint32_t)(1<<1))
  6979. #define SYST_CSR_ENABLE ((uint32_t)(1<<0))
  6980. #define SYST_RVR (*(volatile uint32_t *)0xE000E014) // SysTick Reload Value Register
  6981. #define SYST_CVR (*(volatile uint32_t *)0xE000E018) // SysTick Current Value Register
  6982. #define SYST_CALIB (*(const uint32_t *)0xE000E01C) // SysTick Calibration Value
  6983. // Nested Vectored Interrupt Controller, Table 3-4 & ARMv7 ref, appendix B3.4 (page 750)
  6984. #define NVIC_ISER0 (*(volatile uint32_t *)0xE000E100)
  6985. #define NVIC_ISER1 (*(volatile uint32_t *)0xE000E104)
  6986. #define NVIC_ISER2 (*(volatile uint32_t *)0xE000E108)
  6987. #define NVIC_ISER3 (*(volatile uint32_t *)0xE000E10C)
  6988. #define NVIC_ICER0 (*(volatile uint32_t *)0xE000E180)
  6989. #define NVIC_ICER1 (*(volatile uint32_t *)0xE000E184)
  6990. #define NVIC_ICER2 (*(volatile uint32_t *)0xE000E188)
  6991. #define NVIC_ICER3 (*(volatile uint32_t *)0xE000E18C)
  6992. #define NVIC_STIR (*(volatile uint32_t *)0xE000EF00)
  6993. #define NVIC_ENABLE_IRQ(n) (*(&NVIC_ISER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  6994. #define NVIC_DISABLE_IRQ(n) (*(&NVIC_ICER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  6995. #define NVIC_SET_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) = (1 << ((n) & 31)))
  6996. #define NVIC_CLEAR_PENDING(n) (*((volatile uint32_t *)0xE000E280 + ((n) >> 5)) = (1 << ((n) & 31)))
  6997. #define NVIC_IS_ENABLED(n) (*(&NVIC_ISER0 + ((n) >> 5)) & (1 << ((n) & 31)))
  6998. #define NVIC_IS_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) & (1 << ((n) & 31)))
  6999. #define NVIC_IS_ACTIVE(n) (*((volatile uint32_t *)0xE000E300 + ((n) >> 5)) & (1 << ((n) & 31)))
  7000. #define NVIC_TRIGGER_IRQ(n) NVIC_STIR=(n)
  7001. #define ARM_DEMCR (*(volatile uint32_t *)0xE000EDFC) // Debug Exception and Monitor Control
  7002. #define ARM_DEMCR_TRCENA (1 << 24) // Enable debugging & monitoring blocks
  7003. #define ARM_DWT_CTRL (*(volatile uint32_t *)0xE0001000) // DWT control register
  7004. #define ARM_DWT_CTRL_CYCCNTENA (1 << 0) // Enable cycle count
  7005. #define ARM_DWT_CYCCNT (*(volatile uint32_t *)0xE0001004) // Cycle count register
  7006. #define SCB_MPU_TYPE (*(volatile uint32_t *)0xE000ED90) //
  7007. #define SCB_MPU_CTRL (*(volatile uint32_t *)0xE000ED94) //
  7008. #define SCB_MPU_CTRL_PRIVDEFENA ((uint32_t)(1<<2)) // Enables default memory map
  7009. #define SCB_MPU_CTRL_HFNMIENA ((uint32_t)(1<<1)) // Use MPU for HardFault & NMI
  7010. #define SCB_MPU_CTRL_ENABLE ((uint32_t)(1<<0)) // Enables MPU
  7011. #define SCB_MPU_RNR (*(volatile uint32_t *)0xE000ED98) //
  7012. #define SCB_MPU_RBAR (*(volatile uint32_t *)0xE000ED9C) //
  7013. #define SCB_MPU_RBAR_ADDR_MASK ((uint32_t)(0xFFFFFFE0))
  7014. #define SCB_MPU_RBAR_VALID ((uint32_t)(1<<4))
  7015. #define SCB_MPU_RBAR_REGION(n) ((uint32_t)((n) & 15))
  7016. #define SCB_MPU_RASR (*(volatile uint32_t *)0xE000EDA0) // ARM DDI0403E, pg 696
  7017. #define SCB_MPU_RASR_XN ((uint32_t)(1<<28))
  7018. #define SCB_MPU_RASR_AP(n) ((uint32_t)(((n) & 7) << 24))
  7019. #define SCB_MPU_RASR_TEX(n) ((uint32_t)(((n) & 7) << 19))
  7020. #define SCB_MPU_RASR_S ((uint32_t)(1<<18))
  7021. #define SCB_MPU_RASR_C ((uint32_t)(1<<17))
  7022. #define SCB_MPU_RASR_B ((uint32_t)(1<<16))
  7023. #define SCB_MPU_RASR_SRD(n) ((uint32_t)(((n) & 255) << 8))
  7024. #define SCB_MPU_RASR_SIZE(n) ((uint32_t)(((n) & 31) << 1))
  7025. #define SCB_MPU_RASR_ENABLE ((uint32_t)(1<<0))
  7026. #define SCB_MPU_RBAR_A1 (*(volatile uint32_t *)0xE000EDA4) //
  7027. #define SCB_MPU_RASR_A1 (*(volatile uint32_t *)0xE000EDA8) //
  7028. #define SCB_MPU_RBAR_A2 (*(volatile uint32_t *)0xE000EDAC) //
  7029. #define SCB_MPU_RASR_A2 (*(volatile uint32_t *)0xE000EDB0) //
  7030. #define SCB_MPU_RBAR_A3 (*(volatile uint32_t *)0xE000EDB4) //
  7031. #define SCB_MPU_RASR_A3 (*(volatile uint32_t *)0xE000EDB8) //
  7032. #define SCB_CACHE_ICIALLU (*(volatile uint32_t *)0xE000EF50)
  7033. #define SCB_CACHE_ICIMVAU (*(volatile uint32_t *)0xE000EF58)
  7034. #define SCB_CACHE_DCIMVAC (*(volatile uint32_t *)0xE000EF5C)
  7035. #define SCB_CACHE_DCISW (*(volatile uint32_t *)0xE000EF60)
  7036. #define SCB_CACHE_DCCMVAU (*(volatile uint32_t *)0xE000EF64)
  7037. #define SCB_CACHE_DCCMVAC (*(volatile uint32_t *)0xE000EF68)
  7038. #define SCB_CACHE_DCCSW (*(volatile uint32_t *)0xE000EF6C)
  7039. #define SCB_CACHE_DCCIMVAC (*(volatile uint32_t *)0xE000EF70)
  7040. #define SCB_CACHE_DCCISW (*(volatile uint32_t *)0xE000EF74)
  7041. #define SCB_CACHE_BPIALL (*(volatile uint32_t *)0xE000EF78)