DSP2803x_Lin.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. //###########################################################################
  2. //
  3. // FILE: DSP2803x_LIN.h
  4. //
  5. // TITLE: DSP2803x Device LIN Register Definitions.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2803x C/C++ Header Files and Peripheral Examples V130 $
  9. // $Release Date: May 8, 2015 $
  10. // $Copyright: Copyright (C) 2009-2015 Texas Instruments Incorporated -
  11. // http://www.ti.com/ ALL RIGHTS RESERVED $
  12. //###########################################################################
  13. #ifndef DSP2803x_LIN_H
  14. #define DSP2803x_LIN_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /* --------------------------------------------------- */
  19. /* LIN Registers */
  20. /* ----------------------------------------------------*/
  21. /* Global Control Register 0 (SCIGCR0) bit definitions */
  22. struct SCIGCR0_BITS { // bit description
  23. Uint16 RESET:1; // 0 LIN Module reset bit
  24. Uint16 rsvd1:15; // 15:1 reserved
  25. Uint16 rsvd2:16; // 31:16 reserved
  26. };
  27. /* Allow access to the bit fields or entire register */
  28. union SCIGCR0_REG {
  29. Uint32 all;
  30. struct SCIGCR0_BITS bit;
  31. };
  32. /* Global Control Register 1 (SCIGCR1) bit definitions */
  33. struct SCIGCR1_BITS { // bit description
  34. Uint16 COMMMODE:1; // 0 SCI/LIN communications mode bit
  35. Uint16 TIMINGMODE:1; // 1 SCI timing mode bit. Should be set to 1 for SCI mode.
  36. Uint16 PARITYENA:1; // 2 Parity enable
  37. Uint16 PARITY:1; // 3 SCI parity odd/even selection
  38. Uint16 STOP:1; // 4 SCI number of stop bits
  39. Uint16 CLK_MASTER:1; // 5 LIN Master/Slave selection and SCI clock enable
  40. Uint16 LINMODE:1; // 6 LIN Mode enable/disable
  41. Uint16 SWnRST:1; // 7 Software reset
  42. Uint16 SLEEP:1; // 8 SCI sleep (SCI compatibility mode)
  43. Uint16 ADAPT:1; // 9 Automatic baudrate adjustment control(LIN mode)
  44. Uint16 MBUFMODE:1; // 10 Multi-buffer mode
  45. Uint16 CTYPE:1; // 11 Checksum type (LIN mode)
  46. Uint16 HGENCTRL:1; // 12 Mask filtering comparison control (LIN mode)
  47. Uint16 STOPEXTFRAME:1;// 13 Stop extended frame communication (LIN mode)
  48. Uint16 rsvd2:2; // 15:14 Reserved
  49. Uint16 LOOPBACK:1; // 16 Digital loopback mode
  50. Uint16 CONT:1; // 17 Continue on suspend
  51. Uint16 rsvd3:6; // 23:18 reserved
  52. Uint16 RXENA:1; // 24 SCI mode receiver enable
  53. Uint16 TXENA:1; // 25 SCI mode transmitter enable
  54. Uint16 rsvd4:6; // 31:26 reserved
  55. };
  56. /* Allow access to the bit fields or entire register */
  57. union SCIGCR1_REG {
  58. Uint32 all;
  59. struct SCIGCR1_BITS bit;
  60. };
  61. /* Global Control Register 2 (SCIGCR2) bit definitions */
  62. struct SCIGCR2_BITS { // bit description
  63. Uint16 POWERDOWN:1; // 0 Low-power mode PowerDown bit
  64. Uint16 rsvd1:7; // 7:1 reserved
  65. Uint16 GENWU:1; // 8 Generate Wakeup
  66. Uint16 rsvd2:7; // 15:9 reserved
  67. Uint16 SC:1; // 16 Send Checksum (LIN mode)
  68. Uint16 CC:1; // 17 Compare Checksum (LIN mode)
  69. Uint16 rsvd3:14; // 31:18 reserved
  70. };
  71. /* Allow access to the bit fields or entire register */
  72. union SCIGCR2_REG {
  73. Uint32 all;
  74. struct SCIGCR2_BITS bit;
  75. };
  76. /* SCI Set Interrupt Register (SCISETINT) bit definitions */
  77. struct SCISETINT_BITS { // bit description
  78. Uint16 SETBRKDTINT:1; // 0 Set Break-detect Interrupt (SCI compatible mode)
  79. Uint16 SETWAKEUPINT:1; // 1 Set Wake-up Interrupt
  80. Uint16 rsvd1:2; // 3:2 reserved
  81. Uint16 SETTIMEOUTINT:1; // 4 Set Timeout Interrupt (LIN only)
  82. Uint16 rsvd2:1; // 5 reserved
  83. Uint16 SETTOAWUSINT:1; // 6 Set Timeout After Wakeup Signal Interrupt (LIN only)
  84. Uint16 SETTOA3WUSINT:1; // 7 Set Timeout After 3 Wakeup Signals Interrupt (LIN only)
  85. Uint16 SETTXINT:1; // 8 Set Transmitter Interrupt
  86. Uint16 SETRXINT:1; // 9 Receiver Interrupt Enable
  87. Uint16 rsvd3:3; // 12:10 reserved
  88. Uint16 SETIDINT:1; // 13 Set Identifier Interrupt (LIN only)
  89. Uint16 rsvd4:2; // 15:14 reserved
  90. Uint16 rsvd5:2; // 17:16 reserved
  91. Uint16 rsvd6:1; // 18 reserved
  92. Uint16 rsvd7:5; // 23:19 reserved
  93. Uint16 SETPEINT:1; // 24 Set Parity Interrupt
  94. Uint16 SETOEINT:1; // 25 Set Overrun-Error Interrupt
  95. Uint16 SETFEINT:1; // 26 Set Framing-Error Interrupt
  96. Uint16 SETNREINT:1; // 27 Set No-Response-Error Interrupt (LIN only)
  97. Uint16 SETISFEINT:1; // 28 Set Inconsistent-Synch-Field-Error Interrupt (LIN only)
  98. Uint16 SETCEINT:1; // 29 Set Checksum-error Interrupt (LIN only)
  99. Uint16 SETPBEINT:1; // 30 Set Physical Bus Error Interrupt (LIN only)
  100. Uint16 SETBEINT:1; // 31 Set Bit Error Interrupt (LIN only)
  101. };
  102. /* Allow access to the bit fields or entire register */
  103. union SCISETINT_REG {
  104. Uint32 all;
  105. struct SCISETINT_BITS bit;
  106. };
  107. /* SCI Clear Interrupt (SCICLEARINT) Register bit definitions */
  108. struct SCICLEARINT_BITS { // bit description
  109. Uint16 CLRBRKDTINT:1; // 0 Clear Break-detect Interrupt (SCI compatible mode)
  110. Uint16 CLRWAKEUPINT:1; // 1 Clear Wake-up Interrupt
  111. Uint16 rsvd1:2; // 3:2 reserved
  112. Uint16 CLRTIMEOUTINT:1; // 4 Clear Timeout Interrupt (LIN only)
  113. Uint16 rsvd2:1; // 5 reserved
  114. Uint16 CLRTOAWUSINT:1; // 6 Clear Timeout After Wakeup Signal Interrupt (LIN only)
  115. Uint16 CLRTOA3WUSINT:1; // 7 Clear Timeout After 3 Wakeup Signals Interrupt (LIN only)
  116. Uint16 CLRTXINT:1; // 8 Clear Transmitter Interrupt
  117. Uint16 CLRRXINT:1; // 9 Clear Receiver Interrupt
  118. Uint16 rsvd3:3; // 12:10 reserved
  119. Uint16 CLRIDINT:1; // 13 Clear Identifier Interrupt (LIN only)
  120. Uint16 rsvd4:2; // 15:14 reserved
  121. Uint16 rsvd5:2; // 17:16 reserved
  122. Uint16 rsvd6:1; // 18 reserved
  123. Uint16 rsvd7:5; // 23:19 reserved
  124. Uint16 CLRPEINT:1; // 24 Clear Parity Interrupt
  125. Uint16 CLROEINT:1; // 25 Clear Overrun-Error Interrupt
  126. Uint16 CLRFEINT:1; // 26 Clear Framing-Error Interrupt
  127. Uint16 CLRNREINT:1; // 27 Clear No-Response-Error Interrupt (LIN only)
  128. Uint16 CLRISFEINT:1; // 28 Clear Inconsistent-Synch-Field-Error Interrupt (LIN only)
  129. Uint16 CLRCEINT:1; // 29 Clear Checksum-error Interrupt (LIN only)
  130. Uint16 CLRPBEINT:1; // 30 Clear Physical Bus Error Interrupt (LIN only)
  131. Uint16 CLRBEINT:1; // 31 Clear Bit Error Interrupt (LIN only)
  132. };
  133. /* Allow access to the bit fields or entire register */
  134. union SCICLEARINT_REG {
  135. Uint32 all;
  136. struct SCICLEARINT_BITS bit;
  137. };
  138. /* SCI Set Interrupt Level Register (SCISETINTLVL) bit definitions */
  139. struct SCISETINTLVL_BITS { // bit description
  140. Uint16 SETBRKDTINTLVL:1; // 0 Set Break-detect Interrupt Level (SCI compatible mode)
  141. Uint16 SETWAKEUPINTLVL:1; // 1 Set Wake-up Interrupt Level
  142. Uint16 rsvd1:2; // 3:2 reserved
  143. Uint16 SETTIMEOUTINTLVL:1; // 4 Set Timeout Interrupt Level (LIN only)
  144. Uint16 rsvd2:1; // 5 reserved
  145. Uint16 SETTOAWUSINTLVL:1; // 6 Set Timeout After Wakeup Signal Interrupt Level (LIN only)
  146. Uint16 SETTOA3WUSINTLVL:1; // 7 Set Timeout After 3 Wakeup Signals Interrupt Level (LIN only)
  147. Uint16 SETTXINTLVL:1; // 8 Set Transmitter Interrupt Level
  148. Uint16 SETRXINTLVL:1; // 9 Receiver Interrupt Enable Level
  149. Uint16 rsvd3:3; // 12:10 reserved
  150. Uint16 SETIDINTLVL:1; // 13 Set Identifier Interrupt Level (LIN only)
  151. Uint16 rsvd4:2; // 15:14 reserved
  152. Uint16 rsvd5:2; // 17:16 reserved
  153. Uint16 rsvd6:1; // 18 reserved
  154. Uint16 rsvd7:5; // 23:19 reserved
  155. Uint16 SETPEINTLVL:1; // 24 Set Parity Interrupt Level
  156. Uint16 SETOEINTLVL:1; // 25 Set Overrun-Error Interrupt Level
  157. Uint16 SETFEINTLVL:1; // 26 Set Framing-Error Interrupt Level
  158. Uint16 SETNREINTLVL:1; // 27 Set No-Response-Error Interrupt Level (LIN only)
  159. Uint16 SETISFEINTLVL:1; // 28 Set Inconsistent-Synch-Field-Error Interrupt Level (LIN only)
  160. Uint16 SETCEINTLVL:1; // 29 Set Checksum-error Interrupt Level (LIN only)
  161. Uint16 SETPBEINTLVL:1; // 30 Set Physical Bus Error Interrupt Level (LIN only)
  162. Uint16 SETBEINTLVL:1; // 31 Set Bit Error Interrupt Level(LIN only)
  163. };
  164. /* Allow access to the bit fields or entire register */
  165. union SCISETINTLVL_REG {
  166. Uint32 all;
  167. struct SCISETINTLVL_BITS bit;
  168. };
  169. /* SCI Clear Interrupt Level (SCICLEARINTLVL) Register bit definitions */
  170. struct SCICLEARINTLVL_BITS { // bit description
  171. Uint16 CLRBRKDTINTLVL:1; // 0 Clear Break-detect Interrupt Level (SCI compatible mode)
  172. Uint16 CLRWAKEUPINTLVL:1; // 1 Clear Wake-up Interrupt Level
  173. Uint16 rsvd1:2; // 3:2 reserved
  174. Uint16 CLRTIMEOUTINTLVL:1; // 4 Clear Timeout Interrupt Level (LIN only)
  175. Uint16 rsvd2:1; // 5 reserved
  176. Uint16 CLRTOAWUSINTLVL:1; // 6 Clear Timeout After Wakeup Signal Interrupt Level (LIN only)
  177. Uint16 CLRTOA3WUSINTLVL:1; // 7 Clear Timeout After 3 Wakeup Signals Interrupt Level (LIN only)
  178. Uint16 CLRTXINTLVL:1; // 8 Clear Transmitter Interrupt Level
  179. Uint16 CLRRXINTLVL:1; // 9 Clear Receiver Interrupt Level
  180. Uint16 rsvd3:3; // 12:10 reserved
  181. Uint16 CLRIDINTLVL:1; // 13 Clear Identifier Interrupt Level (LIN only)
  182. Uint16 rsvd4:2; // 15:14 reserved
  183. Uint16 rsvd5:2; // 17:16 reserved
  184. Uint16 rsvd6:1; // 18 reserved
  185. Uint16 rsvd7:5; // 23:19 reserved
  186. Uint16 CLRPEINTLVL:1; // 24 Clear Parity Interrupt Level
  187. Uint16 CLROEINTLVL:1; // 25 Clear Overrun-Error Interrupt Level
  188. Uint16 CLRFEINTLVL:1; // 26 Clear Framing-Error Interrupt Level
  189. Uint16 CLRNREINTLVL:1; // 27 Clear No-Response-Error Interrupt Level (LIN only)
  190. Uint16 CLRISFEINTLVL:1; // 28 Clear Inconsistent-Synch-Field-Error Interrupt Level (LIN only)
  191. Uint16 CLRCEINTLVL:1; // 29 Clear Checksum-error Interrupt Level (LIN only)
  192. Uint16 CLRPBEINTLVL:1; // 30 Clear Physical Bus Error Interrupt Level (LIN only)
  193. Uint16 CLRBEINTLVL:1; // 31 Clear Bit Error Interrupt Level (LIN only)
  194. };
  195. /* Allow access to the bit fields or entire register */
  196. union SCICLEARINTLVL_REG {
  197. Uint32 all;
  198. struct SCICLEARINTLVL_BITS bit;
  199. };
  200. /* SCI Flags Register (SCIFLR) bit definitions */
  201. struct SCIFLR_BITS { // bit description
  202. Uint16 BRKDT:1; // 0 Break-detect Flag (SCI compatible mode)
  203. Uint16 WAKEUP:1; // 1 Wake-up Flag
  204. Uint16 IDLE:1; // 2 SCI receiver in idle state (SCI compatible mode)
  205. Uint16 BUSY:1; // 3 Busy Flag
  206. Uint16 TIMEOUT:1; // 4 LIN Bus IDLE timeout Flag (LIN only)
  207. Uint16 rsvd2:1; // 5 reserved
  208. Uint16 TOAWUS:1; // 6 Timeout After Wakeup Signal Flag (LIN only)
  209. Uint16 TOA3WUS:1; // 7 Timeout After 3 Wakeup Signals Flag (LIN only)
  210. Uint16 TXRDY:1; // 8 Transmitter Buffer Ready Flag
  211. Uint16 RXRDY:1; // 9 Receiver Buffer Ready Flag
  212. Uint16 TXWAKE:1; // 10 SCI Transmitter Wakeup Method Select
  213. Uint16 TXEMPTY:1; // 11 Transmitter Empty Clag
  214. Uint16 RXWAKE:1; // 12 Receiver Wakeup Detect Flag
  215. Uint16 IDTXFLAG:1; // 13 Identifier On Transmit Flag (LIN only)
  216. Uint16 IDRXFLAG:1; // 14 Identifier on Receive Flag
  217. Uint16 rsvd3:1; // 15
  218. Uint16 rsvd4:8; // 23:16 reserved
  219. Uint16 PE:1; // 24 Parity Error Flag
  220. Uint16 OE:1; // 25 Overrun Error Flag
  221. Uint16 FE:1; // 26 Framing Error Flag
  222. Uint16 NRE:1; // 27 No-Response Error Flag (LIN only)
  223. Uint16 ISFE:1; // 28 Inconsistent Synch Field Error Flag (LIN only)
  224. Uint16 CE:1; // 29 Checksum Error Flag (LIN only)
  225. Uint16 PBE:1; // 30 Physical Bus Error Flag (LIN only)
  226. Uint16 BE:1; // 31 Bit Error Flag (LIN only)
  227. };
  228. /* Allow access to the bit fields or entire register */
  229. union SCIFLR_REG {
  230. Uint32 all;
  231. struct SCIFLR_BITS bit;
  232. };
  233. /* SCI Interrupt Vector Offset 0 (SCIINTVECT0) bit definitions */
  234. struct SCIINTVECT0_BITS { // bit description
  235. Uint16 INTVECT0:5; // 4:0 Interrupt vector offset for INT0
  236. Uint16 rsvd1:11; // 15:5 reserved
  237. Uint16 rsvd2:16; // 31:16 reserved
  238. };
  239. /* Allow access to the bit fields or entire register */
  240. union SCIINTVECT0_REG {
  241. Uint32 all;
  242. struct SCIINTVECT0_BITS bit;
  243. };
  244. /* SCI Interrupt Vector Offset 1 (SCIINTVECT1) bit definitions */
  245. struct SCIINTVECT1_BITS { // bit description
  246. Uint16 INTVECT1:5; // 4:0 Interrupt vector offset for INT1
  247. Uint16 rsvd1:11; // 15:5 reserved
  248. Uint16 rsvd2:16; // 31:16 reserved
  249. };
  250. /* Allow access to the bit fields or entire register */
  251. union SCIINTVECT1_REG {
  252. Uint32 all;
  253. struct SCIINTVECT1_BITS bit;
  254. };
  255. /* SCI Format Control Register (SCIFORMAT) bit definitions */
  256. struct SCIFORMAT_BITS { // bit description
  257. Uint16 CHAR:3; // 2:0 Character Length Control Bits
  258. Uint16 rsvd1:13; // 15:3 reserved
  259. Uint16 LENGTH:3; // 18:16 Frame Length Control Bits
  260. Uint16 rsvd2:13; // 31:19 reserved
  261. };
  262. /* Allow access to the bit fields or entire register */
  263. union SCIFORMAT_REG {
  264. Uint32 all;
  265. struct SCIFORMAT_BITS bit;
  266. };
  267. /* Baud Rate Selection Register (BRSR) bit definitions */
  268. struct BRSR_BITS { // bit description
  269. Uint16 SCI_LIN_PSL :16; // 15:0 SCI/LIN Prescaler Low
  270. Uint16 SCI_LIN_PSH :8; // 23:16 SCI/LIN Prescaler High
  271. Uint16 M:4; // 27:24 SCI/LIN Fractional Divider Selection
  272. Uint16 rsvd1:4; // 31:28 reserved
  273. };
  274. /* Allow access to the bit fields or entire register */
  275. union BRSR_REG {
  276. Uint32 all;
  277. struct BRSR_BITS bit;
  278. };
  279. /* SCI Pin I/O Control Register 2 (SCIPIO2) bit definitions */
  280. struct SCIPIO2_BITS { // bit description
  281. Uint16 rsvd1:1; // 0 reserved
  282. Uint16 RXIN:1; // 1 SCIRX pin value
  283. Uint16 TXIN:1; // 2 SCITX pin value
  284. Uint16 rsvd2:13; // 15:3 reserved
  285. Uint16 rsvd3:16; // 31:16 reserved
  286. };
  287. /* Allow access to the bit fields or entire register */
  288. union SCIPIO2_REG {
  289. Uint32 all;
  290. struct SCIPIO2_BITS bit;
  291. };
  292. /* LIN Compare Register (LINCOMP) bit definitions */
  293. struct LINCOMP_BITS { // bit description
  294. Uint16 SBREAK:3; // 2:0 Synch Break Extend
  295. Uint16 rsvd1:5; // 7:3 reserved
  296. Uint16 SDEL:2; // 9:8 Sync Delimiter Compare
  297. Uint16 rsvd2:6; // 15:10 reserved
  298. Uint16 rsvd3:16; // 31:16 reserved
  299. };
  300. /* Allow access to the bit fields or entire register */
  301. union LINCOMP_REG {
  302. Uint32 all;
  303. struct LINCOMP_BITS bit;
  304. };
  305. /* LIN Receive Data 0 Register (LINRD0) bit definitions */
  306. struct LINRD0_BITS { // bit description
  307. Uint16 RD3:8; // 7:0 Receive Buffer 3
  308. Uint16 RD2:8; // 15:8 Receive Buffer 2
  309. Uint16 RD1:8; // 23:16 Receive Buffer 1
  310. Uint16 RD0:8; // 31:24 Receive Buffer 0
  311. };
  312. /* Allow access to the bit fields or entire register */
  313. union LINRD0_REG {
  314. Uint32 all;
  315. struct LINRD0_BITS bit;
  316. };
  317. /* LIN Receive Data 1 Register (LINRD1) bit definitions */
  318. struct LINRD1_BITS { // bit description
  319. Uint16 RD7:8; // 7:0 Receive Buffer 7
  320. Uint16 RD6:8; // 15:8 Receive Buffer 6
  321. Uint16 RD5:8; // 23:16 Receive Buffer 5
  322. Uint16 RD4:8; // 31:24 Receive Buffer 4
  323. };
  324. /* Allow access to the bit fields or entire register */
  325. union LINRD1_REG {
  326. Uint32 all;
  327. struct LINRD1_BITS bit;
  328. };
  329. /* LIN Acceptance Mask Register (LINMASK) bit definitions */
  330. struct LINMASK_BITS { // bit description
  331. Uint16 TXIDMASK:8; // 7:0 TX ID Mask bits (LIN only)
  332. Uint16 rsvd1:8; // 15:8 reserved
  333. Uint16 RXIDMASK:8; // 23:16 RX ID Mask bits (LIN only)
  334. Uint16 rsvd2:8; // 31:24 reserved
  335. };
  336. /* Allow access to the bit fields or entire register */
  337. union LINMASK_REG {
  338. Uint32 all;
  339. struct LINMASK_BITS bit;
  340. };
  341. /* LIN ID Register (LINID) bit definitions */
  342. struct LINID_BITS { // bit description
  343. Uint16 IDBYTE:8; // 7:0 LIN message ID (LIN only)
  344. Uint16 IDSLAVETASKBYTE:8; // 15:8 Received ID comparison ID (LIN only)
  345. Uint16 RECEIVEDID:8; // 23:16 Current Message ID (LIN only)
  346. Uint16 rsvd1:8; // 31:24 reserved
  347. };
  348. /* Allow access to the bit fields or entire register */
  349. union LINID_REG {
  350. Uint32 all;
  351. struct LINID_BITS bit;
  352. };
  353. /* LIN Transmit Data 0 Register (LINTD0) bit definitions */
  354. struct LINTD0_BITS { // bit description
  355. Uint16 TD3:8; // 7:0 Transmit Buffer 3
  356. Uint16 TD2:8; // 15:8 Transmit Buffer 2
  357. Uint16 TD1:8; // 23:16 Transmit Buffer 1
  358. Uint16 TD0:8; // 31:24 Transmit Buffer 0
  359. };
  360. /* Allow access to the bit fields or entire register */
  361. union LINTD0_REG {
  362. Uint32 all;
  363. struct LINTD0_BITS bit;
  364. };
  365. /* LIN Transmit Data 1 Register (LINTD1) bit definitions */
  366. struct LINTD1_BITS { // bit description
  367. Uint16 TD7:8; // 7:0 Transmit Buffer 7
  368. Uint16 TD6:8; // 15:8 Transmit Buffer 6
  369. Uint16 TD5:8; // 23:16 Transmit Buffer 5
  370. Uint16 TD4:8; // 31:24 Transmit Buffer 4
  371. };
  372. /* Allow access to the bit fields or entire register */
  373. union LINTD1_REG {
  374. Uint32 all;
  375. struct LINTD1_BITS bit;
  376. };
  377. /* IODFT for LIN (IODFTCTRL) bit definitions */
  378. struct IODFTCTRL_BITS { // bit description
  379. Uint16 RXPENA:1; // 0 Analog Loopback Via Receive Pin Enable
  380. Uint16 LPBENA:1; // 1 Module Loopback Enable
  381. Uint16 rsvd1:6; // 7:2 reserved
  382. Uint16 IODFTENA:4; // 11:8 IO DFT Enable Key
  383. Uint16 rsvd2:4; // 15:12 Reserved
  384. Uint16 TXSHIFT:3; // 18:16 Transmit Delay Shift
  385. Uint16 PINSAMPLEMASK:2; // 20:19 TX Pin Sample Mask
  386. Uint16 rsvd3:3; // 23:21 Reserved
  387. Uint16 BRKDTERRENA:1; // 24 Break Detect Error Enable (SCI compatibility mode)
  388. Uint16 PERRENA:1; // 25 Parity Error Enable (SCI compatibility mode)
  389. Uint16 FERRENA:1; // 26 Frame Error Enable (SCI compatibility mode)
  390. Uint16 rsvd:1; // 27 reserved
  391. Uint16 ISFERRENA:1; // 28 Inconsistent Synch Field Error Enable (LIN mode)
  392. Uint16 CERRENA:1; // 29 Checksum Error Enable(LIN mode)
  393. Uint16 PBERRENA:1; // 30 Physical Bus Error Enable (LIN mode)
  394. Uint16 BERRENA:1; // 31 Bit Error Enable (LIN mode)
  395. };
  396. /* Allow access to the bit fields or entire register */
  397. union IODFTCTRL_REG {
  398. Uint32 all;
  399. struct IODFTCTRL_BITS bit;
  400. };
  401. /**************************************/
  402. /* LIN register file */
  403. /**************************************/
  404. struct LIN_REGS {
  405. union SCIGCR0_REG SCIGCR0; // Global Control Register 0
  406. union SCIGCR1_REG SCIGCR1; // Global Control Register 1
  407. union SCIGCR2_REG SCIGCR2; // Global Control Register 2
  408. union SCISETINT_REG SCISETINT; // Interrupt Enable Register
  409. union SCICLEARINT_REG SCICLEARINT; // Interrupt Disable Register
  410. union SCISETINTLVL_REG SCISETINTLVL; // Set Interrupt Level Register
  411. union SCICLEARINTLVL_REG SCICLEARINTLVL; // Clear Interrupt Level Register
  412. union SCIFLR_REG SCIFLR; // Flag Register
  413. union SCIINTVECT0_REG SCIINTVECT0; // Interrupt Vector Offset Register 0
  414. union SCIINTVECT1_REG SCIINTVECT1; // Interrupt Vector Offset Register 1
  415. union SCIFORMAT_REG SCIFORMAT; // Length Control Register
  416. union BRSR_REG BRSR; // Baud Rate Selection Register
  417. Uint32 SCIED; // Emulation buffer Register
  418. Uint32 SCIRD; // Receiver data buffer Register
  419. Uint32 SCITD; // Transmit data buffer Register
  420. Uint32 rsvd1[2]; // reserved
  421. union SCIPIO2_REG SCIPIO2; // Pin control Register 2
  422. Uint32 rsvd2[6]; // reserved
  423. union LINCOMP_REG LINCOMP; // Compare register
  424. union LINRD0_REG LINRD0; // Receive data register 0
  425. union LINRD1_REG LINRD1; // Receive data register 1
  426. union LINMASK_REG LINMASK; // Acceptance mask register
  427. union LINID_REG LINID; // LIN ID Register
  428. union LINTD0_REG LINTD0; // Transmit Data Register 0
  429. union LINTD1_REG LINTD1; // Transmit Data Register 1
  430. Uint32 MBRSR; // Baud Rate Selection Register
  431. Uint32 rsvd3[4]; // reserved
  432. union IODFTCTRL_REG IODFTCTRL; // IODFT for LIN
  433. };
  434. //---------------------------------------------------------------------------
  435. // LIN External References & Function Declarations:
  436. //
  437. extern volatile struct LIN_REGS LinaRegs;
  438. #ifdef __cplusplus
  439. }
  440. #endif /* extern "C" */
  441. #endif // end of DSP2803x_LIN.H definition
  442. //===========================================================================
  443. // End of file.
  444. //===========================================================================