1
0

hw_epi.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. //*****************************************************************************
  2. //
  3. // hw_epi.h - Macros for use in accessing the EPI registers.
  4. //
  5. // Copyright (c) 2008-2011 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 8264 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __HW_EPI_H__
  25. #define __HW_EPI_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the External Peripheral Interface register
  29. // offsets.
  30. //
  31. //*****************************************************************************
  32. #define EPI_O_CFG 0x00000000 // EPI Configuration
  33. #define EPI_O_BAUD 0x00000004 // EPI Main Baud Rate
  34. #define EPI_O_HB16CFG 0x00000010 // EPI Host-Bus 16 Configuration
  35. #define EPI_O_GPCFG 0x00000010 // EPI General-Purpose
  36. // Configuration
  37. #define EPI_O_SDRAMCFG 0x00000010 // EPI SDRAM Configuration
  38. #define EPI_O_HB8CFG 0x00000010 // EPI Host-Bus 8 Configuration
  39. #define EPI_O_HB8CFG2 0x00000014 // EPI Host-Bus 8 Configuration 2
  40. #define EPI_O_HB16CFG2 0x00000014 // EPI Host-Bus 16 Configuration 2
  41. #define EPI_O_GPCFG2 0x00000014 // EPI General-Purpose
  42. // Configuration 2
  43. #define EPI_O_ADDRMAP 0x0000001C // EPI Address Map
  44. #define EPI_O_RSIZE0 0x00000020 // EPI Read Size 0
  45. #define EPI_O_RADDR0 0x00000024 // EPI Read Address 0
  46. #define EPI_O_RPSTD0 0x00000028 // EPI Non-Blocking Read Data 0
  47. #define EPI_O_RSIZE1 0x00000030 // EPI Read Size 1
  48. #define EPI_O_RADDR1 0x00000034 // EPI Read Address 1
  49. #define EPI_O_RPSTD1 0x00000038 // EPI Non-Blocking Read Data 1
  50. #define EPI_O_STAT 0x00000060 // EPI Status
  51. #define EPI_O_RFIFOCNT 0x0000006C // EPI Read FIFO Count
  52. #define EPI_O_READFIFO 0x00000070 // EPI Read FIFO
  53. #define EPI_O_READFIFO1 0x00000074 // EPI Read FIFO Alias 1
  54. #define EPI_O_READFIFO2 0x00000078 // EPI Read FIFO Alias 2
  55. #define EPI_O_READFIFO3 0x0000007C // EPI Read FIFO Alias 3
  56. #define EPI_O_READFIFO4 0x00000080 // EPI Read FIFO Alias 4
  57. #define EPI_O_READFIFO5 0x00000084 // EPI Read FIFO Alias 5
  58. #define EPI_O_READFIFO6 0x00000088 // EPI Read FIFO Alias 6
  59. #define EPI_O_READFIFO7 0x0000008C // EPI Read FIFO Alias 7
  60. #define EPI_O_FIFOLVL 0x00000200 // EPI FIFO Level Selects
  61. #define EPI_O_WFIFOCNT 0x00000204 // EPI Write FIFO Count
  62. #define EPI_O_IM 0x00000210 // EPI Interrupt Mask
  63. #define EPI_O_RIS 0x00000214 // EPI Raw Interrupt Status
  64. #define EPI_O_MIS 0x00000218 // EPI Masked Interrupt Status
  65. #define EPI_O_EISC 0x0000021C // EPI Error Interrupt Status and
  66. // Clear
  67. //*****************************************************************************
  68. //
  69. // The following are defines for the bit fields in the EPI_O_CFG register.
  70. //
  71. //*****************************************************************************
  72. #define EPI_CFG_BLKEN 0x00000010 // Block Enable
  73. #define EPI_CFG_MODE_M 0x0000000F // Mode Select
  74. #define EPI_CFG_MODE_NONE 0x00000000 // General Purpose
  75. #define EPI_CFG_MODE_SDRAM 0x00000001 // SDRAM
  76. #define EPI_CFG_MODE_HB8 0x00000002 // 8-Bit Host-Bus (HB8)
  77. #define EPI_CFG_MODE_HB16 0x00000003 // 16-Bit Host-Bus (HB16)
  78. //*****************************************************************************
  79. //
  80. // The following are defines for the bit fields in the EPI_O_BAUD register.
  81. //
  82. //*****************************************************************************
  83. #define EPI_BAUD_COUNT1_M 0xFFFF0000 // Baud Rate Counter 1
  84. #define EPI_BAUD_COUNT0_M 0x0000FFFF // Baud Rate Counter 0
  85. #define EPI_BAUD_COUNT1_S 16
  86. #define EPI_BAUD_COUNT0_S 0
  87. //*****************************************************************************
  88. //
  89. // The following are defines for the bit fields in the EPI_O_HB16CFG register.
  90. //
  91. //*****************************************************************************
  92. #define EPI_HB16CFG_XFFEN 0x00800000 // External FIFO FULL Enable
  93. #define EPI_HB16CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable
  94. #define EPI_HB16CFG_WRHIGH 0x00200000 // WRITE Strobe Polarity
  95. #define EPI_HB16CFG_RDHIGH 0x00100000 // READ Strobe Polarity
  96. #define EPI_HB16CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait
  97. #define EPI_HB16CFG_WRWS_M 0x000000C0 // CS0n Write Wait States
  98. #define EPI_HB16CFG_WRWS_0 0x00000000 // No wait states
  99. #define EPI_HB16CFG_WRWS_1 0x00000040 // 1 wait state
  100. #define EPI_HB16CFG_WRWS_2 0x00000080 // 2 wait states
  101. #define EPI_HB16CFG_WRWS_3 0x000000C0 // 3 wait states
  102. #define EPI_HB16CFG_RDWS_M 0x00000030 // CS0n Read Wait States
  103. #define EPI_HB16CFG_RDWS_0 0x00000000 // No wait states
  104. #define EPI_HB16CFG_RDWS_1 0x00000010 // 1 wait state
  105. #define EPI_HB16CFG_RDWS_2 0x00000020 // 2 wait states
  106. #define EPI_HB16CFG_RDWS_3 0x00000030 // 3 wait states
  107. #define EPI_HB16CFG_BSEL 0x00000004 // Byte Select Configuration
  108. #define EPI_HB16CFG_MODE_M 0x00000003 // Host Bus Sub-Mode
  109. #define EPI_HB16CFG_MODE_ADMUX 0x00000000 // ADMUX - AD[15:0]
  110. #define EPI_HB16CFG_MODE_ADNMUX 0x00000001 // ADNONMUX - D[15:0]
  111. #define EPI_HB16CFG_MODE_SRAM 0x00000002 // Continuous Read - D[15:0]
  112. #define EPI_HB16CFG_MODE_XFIFO 0x00000003 // XFIFO - D[15:0]
  113. #define EPI_HB16CFG_MAXWAIT_S 8
  114. //*****************************************************************************
  115. //
  116. // The following are defines for the bit fields in the EPI_O_GPCFG register.
  117. //
  118. //*****************************************************************************
  119. #define EPI_GPCFG_CLKPIN 0x80000000 // Clock Pin
  120. #define EPI_GPCFG_CLKGATE 0x40000000 // Clock Gated
  121. #define EPI_GPCFG_RDYEN 0x10000000 // Ready Enable
  122. #define EPI_GPCFG_FRMPIN 0x08000000 // Framing Pin
  123. #define EPI_GPCFG_FRM50 0x04000000 // 50/50 Frame
  124. #define EPI_GPCFG_FRMCNT_M 0x03C00000 // Frame Count
  125. #define EPI_GPCFG_RW 0x00200000 // Read and Write
  126. #define EPI_GPCFG_WR2CYC 0x00080000 // 2-Cycle Writes
  127. #define EPI_GPCFG_RD2CYC 0x00040000 // 2-Cycle Reads
  128. #define EPI_GPCFG_MAXWAIT_M 0x0000FF00 // Maximum Wait
  129. #define EPI_GPCFG_ASIZE_M 0x00000030 // Address Bus Size
  130. #define EPI_GPCFG_ASIZE_NONE 0x00000000 // No address
  131. #define EPI_GPCFG_ASIZE_4BIT 0x00000010 // Up to 4 bits wide
  132. #define EPI_GPCFG_ASIZE_12BIT 0x00000020 // Up to 12 bits wide. This size
  133. // cannot be used with 24-bit data
  134. #define EPI_GPCFG_ASIZE_20BIT 0x00000030 // Up to 20 bits wide. This size
  135. // cannot be used with data sizes
  136. // other than 8
  137. #define EPI_GPCFG_DSIZE_M 0x00000003 // Size of Data Bus
  138. #define EPI_GPCFG_DSIZE_4BIT 0x00000000 // 8 Bits Wide (EPI0S0 to EPI0S7)
  139. #define EPI_GPCFG_DSIZE_16BIT 0x00000001 // 16 Bits Wide (EPI0S0 to EPI0S15)
  140. #define EPI_GPCFG_DSIZE_24BIT 0x00000002 // 24 Bits Wide (EPI0S0 to EPI0S23)
  141. #define EPI_GPCFG_DSIZE_32BIT 0x00000003 // 32 Bits Wide (EPI0S0 to EPI0S31)
  142. #define EPI_GPCFG_FRMCNT_S 22
  143. #define EPI_GPCFG_MAXWAIT_S 8
  144. //*****************************************************************************
  145. //
  146. // The following are defines for the bit fields in the EPI_O_SDRAMCFG register.
  147. //
  148. //*****************************************************************************
  149. #define EPI_SDRAMCFG_FREQ_M 0xC0000000 // Frequency Range
  150. #define EPI_SDRAMCFG_FREQ_NONE 0x00000000 // 0 - 15 MHz
  151. #define EPI_SDRAMCFG_FREQ_15MHZ 0x40000000 // 15 - 30 MHz
  152. #define EPI_SDRAMCFG_FREQ_30MHZ 0x80000000 // 30 - 50 MHz
  153. #define EPI_SDRAMCFG_FREQ_50MHZ 0xC0000000 // 50 - 100 MHz
  154. #define EPI_SDRAMCFG_RFSH_M 0x07FF0000 // Refresh Counter
  155. #define EPI_SDRAMCFG_SLEEP 0x00000200 // Sleep Mode
  156. #define EPI_SDRAMCFG_SIZE_M 0x00000003 // Size of SDRAM
  157. #define EPI_SDRAMCFG_SIZE_8MB 0x00000000 // 64 megabits (8MB)
  158. #define EPI_SDRAMCFG_SIZE_16MB 0x00000001 // 128 megabits (16MB)
  159. #define EPI_SDRAMCFG_SIZE_32MB 0x00000002 // 256 megabits (32MB)
  160. #define EPI_SDRAMCFG_SIZE_64MB 0x00000003 // 512 megabits (64MB)
  161. #define EPI_SDRAMCFG_RFSH_S 16
  162. //*****************************************************************************
  163. //
  164. // The following are defines for the bit fields in the EPI_O_HB8CFG register.
  165. //
  166. //*****************************************************************************
  167. #define EPI_HB8CFG_XFFEN 0x00800000 // External FIFO FULL Enable
  168. #define EPI_HB8CFG_XFEEN 0x00400000 // External FIFO EMPTY Enable
  169. #define EPI_HB8CFG_WRHIGH 0x00200000 // CS0n WRITE Strobe Polarity
  170. #define EPI_HB8CFG_RDHIGH 0x00100000 // CS0n READ Strobe Polarity
  171. #define EPI_HB8CFG_MAXWAIT_M 0x0000FF00 // Maximum Wait
  172. #define EPI_HB8CFG_WRWS_M 0x000000C0 // Write Wait States
  173. #define EPI_HB8CFG_WRWS_0 0x00000000 // No wait states
  174. #define EPI_HB8CFG_WRWS_1 0x00000040 // 1 wait state
  175. #define EPI_HB8CFG_WRWS_2 0x00000080 // 2 wait states
  176. #define EPI_HB8CFG_WRWS_3 0x000000C0 // 3 wait states
  177. #define EPI_HB8CFG_RDWS_M 0x00000030 // Read Wait States
  178. #define EPI_HB8CFG_RDWS_0 0x00000000 // No wait states
  179. #define EPI_HB8CFG_RDWS_1 0x00000010 // 1 wait state
  180. #define EPI_HB8CFG_RDWS_2 0x00000020 // 2 wait states
  181. #define EPI_HB8CFG_RDWS_3 0x00000030 // 3 wait states
  182. #define EPI_HB8CFG_MODE_M 0x00000003 // Host Bus Sub-Mode
  183. #define EPI_HB8CFG_MODE_MUX 0x00000000 // ADMUX - AD[7:0]
  184. #define EPI_HB8CFG_MODE_NMUX 0x00000001 // ADNONMUX - D[7:0]
  185. #define EPI_HB8CFG_MODE_SRAM 0x00000002 // Continuous Read - D[7:0]
  186. #define EPI_HB8CFG_MODE_FIFO 0x00000003 // XFIFO - D[7:0]
  187. #define EPI_HB8CFG_MAXWAIT_S 8
  188. //*****************************************************************************
  189. //
  190. // The following are defines for the bit fields in the EPI_O_HB8CFG2 register.
  191. //
  192. //*****************************************************************************
  193. #define EPI_HB8CFG2_WORD 0x80000000 // Word Access Mode
  194. #define EPI_HB8CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate
  195. #define EPI_HB8CFG2_CSCFG_M 0x03000000 // Chip Select Configuration
  196. #define EPI_HB8CFG2_CSCFG_ALE 0x00000000 // ALE Configuration
  197. #define EPI_HB8CFG2_CSCFG_CS 0x01000000 // CSn Configuration
  198. #define EPI_HB8CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration
  199. #define EPI_HB8CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration
  200. #define EPI_HB8CFG2_WRHIGH 0x00200000 // CS1n WRITE Strobe Polarity
  201. #define EPI_HB8CFG2_RDHIGH 0x00100000 // CS1n READ Strobe Polarity
  202. #define EPI_HB8CFG2_WRWS_M 0x000000C0 // CS1n Write Wait States
  203. #define EPI_HB8CFG2_WRWS_0 0x00000000 // No wait states
  204. #define EPI_HB8CFG2_WRWS_1 0x00000040 // 1 wait state
  205. #define EPI_HB8CFG2_WRWS_2 0x00000080 // 2 wait states
  206. #define EPI_HB8CFG2_WRWS_3 0x000000C0 // 3 wait states
  207. #define EPI_HB8CFG2_RDWS_M 0x00000030 // CS1n Read Wait States
  208. #define EPI_HB8CFG2_RDWS_0 0x00000000 // No wait states
  209. #define EPI_HB8CFG2_RDWS_1 0x00000010 // 1 wait state
  210. #define EPI_HB8CFG2_RDWS_2 0x00000020 // 2 wait states
  211. #define EPI_HB8CFG2_RDWS_3 0x00000030 // 3 wait states
  212. //*****************************************************************************
  213. //
  214. // The following are defines for the bit fields in the EPI_O_HB16CFG2 register.
  215. //
  216. //*****************************************************************************
  217. #define EPI_HB16CFG2_WORD 0x80000000 // Word Access Mode
  218. #define EPI_HB16CFG2_CSBAUD 0x04000000 // Chip Select Baud Rate
  219. #define EPI_HB16CFG2_CSCFG_M 0x03000000 // Chip Select Configuration
  220. #define EPI_HB16CFG2_CSCFG_ALE 0x00000000 // ALE Configuration
  221. #define EPI_HB16CFG2_CSCFG_CS 0x01000000 // CSn Configuration
  222. #define EPI_HB16CFG2_CSCFG_DCS 0x02000000 // Dual CSn Configuration
  223. #define EPI_HB16CFG2_CSCFG_ADCS 0x03000000 // ALE with Dual CSn Configuration
  224. #define EPI_HB16CFG2_WRHIGH 0x00200000 // CS1n WRITE Strobe Polarity
  225. #define EPI_HB16CFG2_RDHIGH 0x00100000 // CS1n READ Strobe Polarity
  226. #define EPI_HB16CFG2_WRWS_M 0x000000C0 // CS1n Write Wait States
  227. #define EPI_HB16CFG2_WRWS_0 0x00000000 // No wait states
  228. #define EPI_HB16CFG2_WRWS_1 0x00000040 // 1 wait state
  229. #define EPI_HB16CFG2_WRWS_2 0x00000080 // 2 wait states
  230. #define EPI_HB16CFG2_WRWS_3 0x000000C0 // 3 wait states
  231. #define EPI_HB16CFG2_RDWS_M 0x00000030 // CS1n Read Wait States
  232. #define EPI_HB16CFG2_RDWS_0 0x00000000 // No wait states
  233. #define EPI_HB16CFG2_RDWS_1 0x00000010 // 1 wait state
  234. #define EPI_HB16CFG2_RDWS_2 0x00000020 // 2 wait states
  235. #define EPI_HB16CFG2_RDWS_3 0x00000030 // 3 wait states
  236. //*****************************************************************************
  237. //
  238. // The following are defines for the bit fields in the EPI_O_GPCFG2 register.
  239. //
  240. //*****************************************************************************
  241. #define EPI_GPCFG2_WORD 0x80000000 // Word Access Mode
  242. //*****************************************************************************
  243. //
  244. // The following are defines for the bit fields in the EPI_O_ADDRMAP register.
  245. //
  246. //*****************************************************************************
  247. #define EPI_ADDRMAP_EPSZ_M 0x000000C0 // External Peripheral Size
  248. #define EPI_ADDRMAP_EPSZ_256B 0x00000000 // 256 bytes; lower address range:
  249. // 0x00 to 0xFF
  250. #define EPI_ADDRMAP_EPSZ_64KB 0x00000040 // 64 KB; lower address range:
  251. // 0x0000 to 0xFFFF
  252. #define EPI_ADDRMAP_EPSZ_16MB 0x00000080 // 16 MB; lower address range:
  253. // 0x00.0000 to 0xFF.FFFF
  254. #define EPI_ADDRMAP_EPSZ_256MB 0x000000C0 // 256 MB; lower address range:
  255. // 0x000.0000 to 0xFFF.FFFF
  256. #define EPI_ADDRMAP_EPADR_M 0x00000030 // External Peripheral Address
  257. #define EPI_ADDRMAP_EPADR_NONE 0x00000000 // Not mapped
  258. #define EPI_ADDRMAP_EPADR_A000 0x00000010 // At 0xA000.0000
  259. #define EPI_ADDRMAP_EPADR_C000 0x00000020 // At 0xC000.0000
  260. #define EPI_ADDRMAP_ERSZ_M 0x0000000C // External RAM Size
  261. #define EPI_ADDRMAP_ERSZ_256B 0x00000000 // 256 bytes; lower address range:
  262. // 0x00 to 0xFF
  263. #define EPI_ADDRMAP_ERSZ_64KB 0x00000004 // 64 KB; lower address range:
  264. // 0x0000 to 0xFFFF
  265. #define EPI_ADDRMAP_ERSZ_16MB 0x00000008 // 16 MB; lower address range:
  266. // 0x00.0000 to 0xFF.FFFF
  267. #define EPI_ADDRMAP_ERSZ_256MB 0x0000000C // 256 MB; lower address range:
  268. // 0x000.0000 to 0xFFF.FFFF
  269. #define EPI_ADDRMAP_ERADR_M 0x00000003 // External RAM Address
  270. #define EPI_ADDRMAP_ERADR_NONE 0x00000000 // Not mapped
  271. #define EPI_ADDRMAP_ERADR_6000 0x00000001 // At 0x6000.0000
  272. #define EPI_ADDRMAP_ERADR_8000 0x00000002 // At 0x8000.0000
  273. //*****************************************************************************
  274. //
  275. // The following are defines for the bit fields in the EPI_O_RSIZE0 register.
  276. //
  277. //*****************************************************************************
  278. #define EPI_RSIZE0_SIZE_M 0x00000003 // Current Size
  279. #define EPI_RSIZE0_SIZE_8BIT 0x00000001 // Byte (8 bits)
  280. #define EPI_RSIZE0_SIZE_16BIT 0x00000002 // Half-word (16 bits)
  281. #define EPI_RSIZE0_SIZE_32BIT 0x00000003 // Word (32 bits)
  282. //*****************************************************************************
  283. //
  284. // The following are defines for the bit fields in the EPI_O_RADDR0 register.
  285. //
  286. //*****************************************************************************
  287. #define EPI_RADDR0_ADDR_M 0x1FFFFFFF // Current Address
  288. #define EPI_RADDR0_ADDR_S 0
  289. //*****************************************************************************
  290. //
  291. // The following are defines for the bit fields in the EPI_O_RPSTD0 register.
  292. //
  293. //*****************************************************************************
  294. #define EPI_RPSTD0_POSTCNT_M 0x00001FFF // Post Count
  295. #define EPI_RPSTD0_POSTCNT_S 0
  296. //*****************************************************************************
  297. //
  298. // The following are defines for the bit fields in the EPI_O_RSIZE1 register.
  299. //
  300. //*****************************************************************************
  301. #define EPI_RSIZE1_SIZE_M 0x00000003 // Current Size
  302. #define EPI_RSIZE1_SIZE_8BIT 0x00000001 // Byte (8 bits)
  303. #define EPI_RSIZE1_SIZE_16BIT 0x00000002 // Half-word (16 bits)
  304. #define EPI_RSIZE1_SIZE_32BIT 0x00000003 // Word (32 bits)
  305. //*****************************************************************************
  306. //
  307. // The following are defines for the bit fields in the EPI_O_RADDR1 register.
  308. //
  309. //*****************************************************************************
  310. #define EPI_RADDR1_ADDR_M 0x1FFFFFFF // Current Address
  311. #define EPI_RADDR1_ADDR_S 0
  312. //*****************************************************************************
  313. //
  314. // The following are defines for the bit fields in the EPI_O_RPSTD1 register.
  315. //
  316. //*****************************************************************************
  317. #define EPI_RPSTD1_POSTCNT_M 0x00001FFF // Post Count
  318. #define EPI_RPSTD1_POSTCNT_S 0
  319. //*****************************************************************************
  320. //
  321. // The following are defines for the bit fields in the EPI_O_STAT register.
  322. //
  323. //*****************************************************************************
  324. #define EPI_STAT_CELOW 0x00000200 // Clock Enable Low
  325. #define EPI_STAT_XFFULL 0x00000100 // External FIFO Full
  326. #define EPI_STAT_XFEMPTY 0x00000080 // External FIFO Empty
  327. #define EPI_STAT_INITSEQ 0x00000040 // Initialization Sequence
  328. #define EPI_STAT_WBUSY 0x00000020 // Write Busy
  329. #define EPI_STAT_NBRBUSY 0x00000010 // Non-Blocking Read Busy
  330. #define EPI_STAT_ACTIVE 0x00000001 // Register Active
  331. //*****************************************************************************
  332. //
  333. // The following are defines for the bit fields in the EPI_O_RFIFOCNT register.
  334. //
  335. //*****************************************************************************
  336. #define EPI_RFIFOCNT_COUNT_M 0x00000007 // FIFO Count
  337. #define EPI_RFIFOCNT_COUNT_S 0
  338. //*****************************************************************************
  339. //
  340. // The following are defines for the bit fields in the EPI_O_READFIFO register.
  341. //
  342. //*****************************************************************************
  343. #define EPI_READFIFO_DATA_M 0xFFFFFFFF // Reads Data
  344. #define EPI_READFIFO_DATA_S 0
  345. //*****************************************************************************
  346. //
  347. // The following are defines for the bit fields in the EPI_O_READFIFO1
  348. // register.
  349. //
  350. //*****************************************************************************
  351. #define EPI_READFIFO1_DATA_M 0xFFFFFFFF // Reads Data
  352. #define EPI_READFIFO1_DATA_S 0
  353. //*****************************************************************************
  354. //
  355. // The following are defines for the bit fields in the EPI_O_READFIFO2
  356. // register.
  357. //
  358. //*****************************************************************************
  359. #define EPI_READFIFO2_DATA_M 0xFFFFFFFF // Reads Data
  360. #define EPI_READFIFO2_DATA_S 0
  361. //*****************************************************************************
  362. //
  363. // The following are defines for the bit fields in the EPI_O_READFIFO3
  364. // register.
  365. //
  366. //*****************************************************************************
  367. #define EPI_READFIFO3_DATA_M 0xFFFFFFFF // Reads Data
  368. #define EPI_READFIFO3_DATA_S 0
  369. //*****************************************************************************
  370. //
  371. // The following are defines for the bit fields in the EPI_O_READFIFO4
  372. // register.
  373. //
  374. //*****************************************************************************
  375. #define EPI_READFIFO4_DATA_M 0xFFFFFFFF // Reads Data
  376. #define EPI_READFIFO4_DATA_S 0
  377. //*****************************************************************************
  378. //
  379. // The following are defines for the bit fields in the EPI_O_READFIFO5
  380. // register.
  381. //
  382. //*****************************************************************************
  383. #define EPI_READFIFO5_DATA_M 0xFFFFFFFF // Reads Data
  384. #define EPI_READFIFO5_DATA_S 0
  385. //*****************************************************************************
  386. //
  387. // The following are defines for the bit fields in the EPI_O_READFIFO6
  388. // register.
  389. //
  390. //*****************************************************************************
  391. #define EPI_READFIFO6_DATA_M 0xFFFFFFFF // Reads Data
  392. #define EPI_READFIFO6_DATA_S 0
  393. //*****************************************************************************
  394. //
  395. // The following are defines for the bit fields in the EPI_O_READFIFO7
  396. // register.
  397. //
  398. //*****************************************************************************
  399. #define EPI_READFIFO7_DATA_M 0xFFFFFFFF // Reads Data
  400. #define EPI_READFIFO7_DATA_S 0
  401. //*****************************************************************************
  402. //
  403. // The following are defines for the bit fields in the EPI_O_FIFOLVL register.
  404. //
  405. //*****************************************************************************
  406. #define EPI_FIFOLVL_WFERR 0x00020000 // Write Full Error
  407. #define EPI_FIFOLVL_RSERR 0x00010000 // Read Stall Error
  408. #define EPI_FIFOLVL_WRFIFO_M 0x00000070 // Write FIFO
  409. #define EPI_FIFOLVL_WRFIFO_EMPT 0x00000000 // Trigger when there are 1 to 4
  410. // spaces available in the WFIFO
  411. #define EPI_FIFOLVL_WRFIFO_1_4 0x00000020 // Trigger when there are 1 to 3
  412. // spaces available in the WFIFO
  413. #define EPI_FIFOLVL_WRFIFO_1_2 0x00000030 // Trigger when there are 1 to 2
  414. // spaces available in the WFIFO
  415. #define EPI_FIFOLVL_WRFIFO_3_4 0x00000040 // Trigger when there is 1 space
  416. // available in the WFIFO
  417. #define EPI_FIFOLVL_RDFIFO_M 0x00000007 // Read FIFO
  418. #define EPI_FIFOLVL_RDFIFO_EMPT 0x00000000 // Empty
  419. #define EPI_FIFOLVL_RDFIFO_1_8 0x00000001 // Trigger when there are 1 or more
  420. // entries in the NBRFIFO
  421. #define EPI_FIFOLVL_RDFIFO_1_4 0x00000002 // Trigger when there are 2 or more
  422. // entries in the NBRFIFO
  423. #define EPI_FIFOLVL_RDFIFO_1_2 0x00000003 // Trigger when there are 4 or more
  424. // entries in the NBRFIFO
  425. #define EPI_FIFOLVL_RDFIFO_3_4 0x00000004 // Trigger when there are 6 or more
  426. // entries in the NBRFIFO
  427. #define EPI_FIFOLVL_RDFIFO_7_8 0x00000005 // Trigger when there are 7 or more
  428. // entries in the NBRFIFO
  429. #define EPI_FIFOLVL_RDFIFO_FULL 0x00000006 // Trigger when there are 8 entries
  430. // in the NBRFIFO
  431. //*****************************************************************************
  432. //
  433. // The following are defines for the bit fields in the EPI_O_WFIFOCNT register.
  434. //
  435. //*****************************************************************************
  436. #define EPI_WFIFOCNT_WTAV_M 0x00000007 // Available Write Transactions
  437. #define EPI_WFIFOCNT_WTAV_S 0
  438. //*****************************************************************************
  439. //
  440. // The following are defines for the bit fields in the EPI_O_IM register.
  441. //
  442. //*****************************************************************************
  443. #define EPI_IM_WRIM 0x00000004 // Write Interrupt Mask
  444. #define EPI_IM_RDIM 0x00000002 // Read Interrupt Mask
  445. #define EPI_IM_ERRIM 0x00000001 // Error Interrupt Mask
  446. //*****************************************************************************
  447. //
  448. // The following are defines for the bit fields in the EPI_O_RIS register.
  449. //
  450. //*****************************************************************************
  451. #define EPI_RIS_WRRIS 0x00000004 // Write Raw Interrupt Status
  452. #define EPI_RIS_RDRIS 0x00000002 // Read Raw Interrupt Status
  453. #define EPI_RIS_ERRRIS 0x00000001 // Error Raw Interrupt Status
  454. //*****************************************************************************
  455. //
  456. // The following are defines for the bit fields in the EPI_O_MIS register.
  457. //
  458. //*****************************************************************************
  459. #define EPI_MIS_WRMIS 0x00000004 // Write Masked Interrupt Status
  460. #define EPI_MIS_RDMIS 0x00000002 // Read Masked Interrupt Status
  461. #define EPI_MIS_ERRMIS 0x00000001 // Error Masked Interrupt Status
  462. //*****************************************************************************
  463. //
  464. // The following are defines for the bit fields in the EPI_O_EISC register.
  465. //
  466. //*****************************************************************************
  467. #define EPI_EISC_WTFULL 0x00000004 // Write FIFO Full Error
  468. #define EPI_EISC_RSTALL 0x00000002 // Read Stalled Error
  469. #define EPI_EISC_TOUT 0x00000001 // Timeout Error
  470. //*****************************************************************************
  471. //
  472. // The following definitions are deprecated.
  473. //
  474. //*****************************************************************************
  475. #ifndef DEPRECATED
  476. //*****************************************************************************
  477. //
  478. // The following are deprecated defines for the bit fields in the EPI_O_BAUD
  479. // register.
  480. //
  481. //*****************************************************************************
  482. #define EPI_BAUD_COUNT_M 0x0000FFFF // Baud Rate Counter
  483. #define EPI_BAUD_COUNT_S 0
  484. #endif
  485. #endif // __HW_EPI_H__