RTEMS 6.1-rc4
Loading...
Searching...
No Matches
reg_lin.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/* The header file is generated by make_header.py from LIN.json */
12/* Current script's version can be found at: */
13/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
14
15/*
16 * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
17 *
18 * Czech Technical University in Prague
19 * Zikova 1903/4
20 * 166 36 Praha 6
21 * Czech Republic
22 *
23 * All rights reserved.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are met:
27 *
28 * 1. Redistributions of source code must retain the above copyright notice, this
29 * list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
31 * this list of conditions and the following disclaimer in the documentation
32 * and/or other materials provided with the distribution.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 * The views and conclusions contained in the software and documentation are those
46 * of the authors and should not be interpreted as representing official policies,
47 * either expressed or implied, of the FreeBSD Project.
48*/
49#ifndef LIBBSP_ARM_TMS570_LIN
50#define LIBBSP_ARM_TMS570_LIN
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t GCR0; /*SCI Global Control Register 0*/
56 uint32_t GCR1; /*SCI Global Control Register 1*/
57 uint32_t GCR2; /*SCI Global Control Register 2*/
58 uint32_t SETINT; /*SCI Set Interrupt Register*/
59 uint32_t CLEARINT; /*SCI Clear Interrupt Register*/
60 uint32_t SETINTLVL; /*SCI Set Interrupt Level Register*/
61 uint32_t CLEARINTLVL; /*SCI Clear Interrupt Level Register*/
62 uint32_t FLR; /*SCI Flags Register*/
63 uint32_t INTVECT0; /*SCI Interrupt Vector Offset 0*/
64 uint32_t INTVECT1; /*SCI Interrupt Vector Offset 1*/
65 uint32_t FORMAT; /*SCI Format Control Register*/
66 uint32_t BRS; /*Baud Rate Selection Register*/
67 uint32_t ED; /*Receiver Emulation Data Buffer*/
68 uint32_t RD; /*Receiver Data Buffer*/
69 uint32_t TD; /*Transmit Data Buffer*/
70 uint32_t PIO0; /*SCI Pin I/O Control Register 0*/
71 uint32_t PIO1; /*SCI Pin I/O Control Register 1*/
72 uint32_t PIO2; /*SCI Pin I/O Control Register 2*/
73 uint32_t PIO3; /*SCI Pin I/O Control Register 3*/
74 uint32_t PIO4; /*SCI Pin I/O Control Register 4*/
75 uint32_t PIO5; /*SCI Pin I/O Control Register 5*/
76 uint32_t PIO6; /*SCI Pin I/O Control Register 6*/
77 uint32_t PIO7; /*SCI Pin I/O Control Register 7*/
78 uint32_t PIO8; /*SCI Pin I/O Control Register 8*/
79 uint32_t COMP; /*LIN Compare Register*/
80 uint32_t RD0; /*LIN Receive Buffer 0 Register*/
81 uint32_t RD1; /*LIN Receive Buffer 1 Register*/
82 uint32_t MASK; /*LIN Mask Register*/
83 uint32_t ID; /*LIN Identification Register*/
84 uint32_t TD0; /*LIN Transmit Buffer 0*/
85 uint32_t TD1; /*LIN Transmit Buffer 1*/
86 uint32_t MBRSR; /*Maximum Baud Rate Selection Register*/
87 uint8_t reserved1 [16];
88 uint32_t IODFTCTRL; /*Input/Output Error Enable Register*/
90
91
92/*----------------------TMS570_LIN_GCR0----------------------*/
93/* field: Reserved - Read returns 0. Writes have no effect. */
94#define TMS570_LIN_GCR0_Reserved(val) BSP_FLD32(val,1, 31)
95#define TMS570_LIN_GCR0_Reserved_GET(reg) BSP_FLD32GET(reg,1, 31)
96#define TMS570_LIN_GCR0_Reserved_SET(reg,val) BSP_FLD32SET(reg, val,1, 31)
97
98/* field: RESET - This bit resets the SCI module. */
99#define TMS570_LIN_GCR0_RESET BSP_BIT32(0)
100
101
102/*----------------------TMS570_LIN_GCR1----------------------*/
103/* field: TXENA - Transmit enable. */
104#define TMS570_LIN_GCR1_TXENA BSP_BIT32(25)
105
106/* field: RXENA - Receive enable. RXENA allows or prevents the transfer of data from SCIRXSHF to SCIRD. */
107#define TMS570_LIN_GCR1_RXENA BSP_BIT32(24)
108
109/* field: CONT - Continue on suspend. */
110#define TMS570_LIN_GCR1_CONT BSP_BIT32(17)
111
112/* field: LOOP_BACK - Loopback bit. The self-checking option for the SCI can be selected with this bit. */
113#define TMS570_LIN_GCR1_LOOP_BACK BSP_BIT32(16)
114
115/* field: POWERDOWN - If the POWERDOWN bit is set while the receiver is actively receiving data and the wake-up */
116#define TMS570_LIN_GCR1_POWERDOWN BSP_BIT32(9)
117
118/* field: SLEEP - SCI sleep. In a multiprocessor configuration, this bit controls the receive sleep function. */
119#define TMS570_LIN_GCR1_SLEEP BSP_BIT32(8)
120
121/* field: SWnRST - Software reset (active low). This bit is effective in LIN and SCI modes. */
122#define TMS570_LIN_GCR1_SWnRST BSP_BIT32(7)
123
124/* field: CLOCK - CLOCK */
125#define TMS570_LIN_GCR1_CLOCK BSP_BIT32(5)
126
127/* field: STOP - SCI number of stop bits per frame. */
128#define TMS570_LIN_GCR1_STOP BSP_BIT32(4)
129
130/* field: PARITY - SCI parity odd/even selection. If the PARITY ENA bit is set, PARITY designates odd or even parity. */
131#define TMS570_LIN_GCR1_PARITY BSP_BIT32(3)
132
133/* field: PARITY_ENA - Parity enable. This bit enables or disables the parity function. */
134#define TMS570_LIN_GCR1_PARITY_ENA BSP_BIT32(2)
135
136/* field: TIMING_MODE - SCI timing mode bit. */
137#define TMS570_LIN_GCR1_TIMING_MODE BSP_BIT32(1)
138
139/* field: COMM_MODE - SCI communication mode bit. */
140#define TMS570_LIN_GCR1_COMM_MODE BSP_BIT32(0)
141
142
143/*----------------------TMS570_LIN_GCR2----------------------*/
144/* field: CC - Compare checksum. LIN mode only. */
145#define TMS570_LIN_GCR2_CC BSP_BIT32(17)
146
147/* field: SC - Send checksum byte. This bit is effective in LIN mode only. */
148#define TMS570_LIN_GCR2_SC BSP_BIT32(16)
149
150/* field: GEN_WU - Generate wakeup signal. This bit is effective in LIN mode only. */
151#define TMS570_LIN_GCR2_GEN_WU BSP_BIT32(8)
152
153/* field: POWERDOWN - Power down. This bit is effective in LIN or SCI mode. */
154#define TMS570_LIN_GCR2_POWERDOWN BSP_BIT32(0)
155
156
157/*---------------------TMS570_LIN_SETINT---------------------*/
158/* field: SET_FE_INT - */
159#define TMS570_LIN_SETINT_SET_FE_INT BSP_BIT32(26)
160
161/* field: SET_OE_INT - SET OE INT */
162#define TMS570_LIN_SETINT_SET_OE_INT BSP_BIT32(25)
163
164/* field: SET_PE_INT - Set parity interrupt. */
165#define TMS570_LIN_SETINT_SET_PE_INT BSP_BIT32(24)
166
167/* field: SET_RX_DMA_ALL - SET RX DMA ALL */
168#define TMS570_LIN_SETINT_SET_RX_DMA_ALL BSP_BIT32(18)
169
170/* field: SET_RX_DMA - SET RX DMA */
171#define TMS570_LIN_SETINT_SET_RX_DMA BSP_BIT32(17)
172
173/* field: SET_TX_DMA - Set transmit DMA. To enable DMA requests for the transmitter, this bit must be set. */
174#define TMS570_LIN_SETINT_SET_TX_DMA BSP_BIT32(16)
175
176/* field: SET_RX_INT - SET RX INT */
177#define TMS570_LIN_SETINT_SET_RX_INT BSP_BIT32(9)
178
179/* field: SET_TX_INT - Set transmitter interrupt. */
180#define TMS570_LIN_SETINT_SET_TX_INT BSP_BIT32(8)
181
182/* field: SET_WAKEUP_INT - Set wakeup interrupt. */
183#define TMS570_LIN_SETINT_SET_WAKEUP_INT BSP_BIT32(1)
184
185/* field: SET_BRKDT_INT - Set breakdetect interrupt. */
186#define TMS570_LIN_SETINT_SET_BRKDT_INT BSP_BIT32(0)
187
188
189/*--------------------TMS570_LIN_CLEARINT--------------------*/
190/* field: CLR_FE_INT - Clear framing-error interrupt. This bit disables the framing-error interrupt when set. */
191#define TMS570_LIN_CLEARINT_CLR_FE_INT BSP_BIT32(26)
192
193/* field: CLR_CE_INT - Clear overrun-error interrupt. This bit disables the SCI overrun error interrupt when set. */
194#define TMS570_LIN_CLEARINT_CLR_CE_INT BSP_BIT32(25)
195
196/* field: CLR_PE_INT - Clear parity interrupt. This bit disables the parity error interrupt when set. */
197#define TMS570_LIN_CLEARINT_CLR_PE_INT BSP_BIT32(24)
198
199/* field: CLR_RX_DMA_ALL - Clear receive DMA all. This bit clears the receive DMA request for address frames when set. */
200#define TMS570_LIN_CLEARINT_CLR_RX_DMA_ALL BSP_BIT32(18)
201
202/* field: CLR_RX_DMA - Clear receive DMA request. This bit disables the receive DMA request when set. */
203#define TMS570_LIN_CLEARINT_CLR_RX_DMA BSP_BIT32(17)
204
205/* field: CLR_TX_DMA - CLR TX DMA */
206#define TMS570_LIN_CLEARINT_CLR_TX_DMA BSP_BIT32(16)
207
208/* field: CLR_RX_INT - Clear receiver interrupt. This bit disables the receiver interrupt when set. */
209#define TMS570_LIN_CLEARINT_CLR_RX_INT BSP_BIT32(9)
210
211/* field: CLR_TX_INT - Clear transmitter interrupt. This bit disables the transmitter interrupt when set. */
212#define TMS570_LIN_CLEARINT_CLR_TX_INT BSP_BIT32(8)
213
214/* field: CLR_WAKEUP_INT - Clear wakeup interrupt. This bit disables the wakeup interrupt when set. */
215#define TMS570_LIN_CLEARINT_CLR_WAKEUP_INT BSP_BIT32(1)
216
217/* field: CLR_BRKDT_INT - Clear breakdetect interrupt. This bit disables the break-detect interrupt when set. */
218#define TMS570_LIN_CLEARINT_CLR_BRKDT_INT BSP_BIT32(0)
219
220
221/*--------------------TMS570_LIN_SETINTLVL--------------------*/
222/* field: SET_FE_INT_LVL - Set framing-error interrupt level. */
223#define TMS570_LIN_SETINTLVL_SET_FE_INT_LVL BSP_BIT32(26)
224
225/* field: SET_CE_INT_LVL - Set overrun-error interrupt level. */
226#define TMS570_LIN_SETINTLVL_SET_CE_INT_LVL BSP_BIT32(25)
227
228/* field: SET_PE_INT_LVL - Set parity error interrupt level. */
229#define TMS570_LIN_SETINTLVL_SET_PE_INT_LVL BSP_BIT32(24)
230
231/* field: SET_RX_DMA_ALL_LVL - Set receive DMA all interrupt levels. */
232#define TMS570_LIN_SETINTLVL_SET_RX_DMA_ALL_LVL BSP_BIT32(18)
233
234/* field: SET_RX_INT_LVL - Set receiver interrupt level. */
235#define TMS570_LIN_SETINTLVL_SET_RX_INT_LVL BSP_BIT32(9)
236
237/* field: SET_TX_INT_LVL - Set transmitter interrupt level. */
238#define TMS570_LIN_SETINTLVL_SET_TX_INT_LVL BSP_BIT32(8)
239
240/* field: SET_WAKEUP_INT_LVL - Set wakeup interrupt level. */
241#define TMS570_LIN_SETINTLVL_SET_WAKEUP_INT_LVL BSP_BIT32(1)
242
243/* field: SET_BRKDT_INT_LVL - SET BRKDT INT LVL */
244#define TMS570_LIN_SETINTLVL_SET_BRKDT_INT_LVL BSP_BIT32(0)
245
246
247/*-------------------TMS570_LIN_CLEARINTLVL-------------------*/
248/* field: CLR_FE_INT_LVL - Clear framing-error interrupt. */
249#define TMS570_LIN_CLEARINTLVL_CLR_FE_INT_LVL BSP_BIT32(26)
250
251/* field: CLR_CE_INT_LVL - CLR CE INT LVL */
252#define TMS570_LIN_CLEARINTLVL_CLR_CE_INT_LVL BSP_BIT32(25)
253
254/* field: CLR_CE_INT_LVL - CLR CE INT LVL */
255#define TMS570_LIN_CLEARINTLVL_CLR_CE_INT_LVL BSP_BIT32(25)
256
257/* field: CLR_PE_INT_LVL - */
258#define TMS570_LIN_CLEARINTLVL_CLR_PE_INT_LVL BSP_BIT32(24)
259
260/* field: CLR_RX_DMA_ALL_LVL - Clear receive DMA interrupt level. */
261#define TMS570_LIN_CLEARINTLVL_CLR_RX_DMA_ALL_LVL BSP_BIT32(18)
262
263/* field: CLR_RX_INT_LVL - Clear receiver interrupt. */
264#define TMS570_LIN_CLEARINTLVL_CLR_RX_INT_LVL BSP_BIT32(9)
265
266/* field: 8 - CLR TX INT LVL Clear transmitter interrupt. */
267#define TMS570_LIN_CLEARINTLVL_8 BSP_BIT32(8)
268
269/* field: CLR_WAKEUP_INT_LVL - Clear wakeup interrupt. */
270#define TMS570_LIN_CLEARINTLVL_CLR_WAKEUP_INT_LVL BSP_BIT32(1)
271
272/* field: CLR_BRKDT_INT_LVL - Clear breakdetect interrupt. */
273#define TMS570_LIN_CLEARINTLVL_CLR_BRKDT_INT_LVL BSP_BIT32(0)
274
275
276/*-----------------------TMS570_LIN_FLR-----------------------*/
277/* field: FE - Framing error flag. This bit is effective in LIN or SCI-compatible mode. */
278#define TMS570_LIN_FLR_FE BSP_BIT32(26)
279
280/* field: OE - Overrun error flag. */
281#define TMS570_LIN_FLR_OE BSP_BIT32(25)
282
283/* field: PE - Parity error flag. This bit is set when a parity error is detected in the received data. */
284#define TMS570_LIN_FLR_PE BSP_BIT32(24)
285
286/* field: RXWAKE - Receiver wakeup detect flag. */
287#define TMS570_LIN_FLR_RXWAKE BSP_BIT32(12)
288
289/* field: TX_EMPTY - Transmitter empty flag. */
290#define TMS570_LIN_FLR_TX_EMPTY BSP_BIT32(11)
291
292/* field: TXWAKE - Transmitter wakeup method select. */
293#define TMS570_LIN_FLR_TXWAKE BSP_BIT32(10)
294
295/* field: RXRDY - Receiver ready flag. */
296#define TMS570_LIN_FLR_RXRDY BSP_BIT32(9)
297
298/* field: TXRDY - Transmitter buffer register ready flag. */
299#define TMS570_LIN_FLR_TXRDY BSP_BIT32(8)
300
301/* field: BUSY - Bus busy flag. TThis bit indicates whether the receiver is in the process of receiving a frame. */
302#define TMS570_LIN_FLR_BUSY BSP_BIT32(3)
303
304/* field: IDLE - SCI receiver in idle state. */
305#define TMS570_LIN_FLR_IDLE BSP_BIT32(2)
306
307/* field: WAKEUP - Wakeup flag. */
308#define TMS570_LIN_FLR_WAKEUP BSP_BIT32(1)
309
310/* field: BRKDT - SCI break-detect flag. This bit is set when the SCI detects a break condition on the LINRX pin. */
311#define TMS570_LIN_FLR_BRKDT BSP_BIT32(0)
312
313
314/*--------------------TMS570_LIN_INTVECT0--------------------*/
315/* field: INVECT0 - Interrupt vector offset for INT0. This register indicates the offset for interrupt line INT0. */
316#define TMS570_LIN_INTVECT0_INVECT0(val) BSP_FLD32(val,0, 3)
317#define TMS570_LIN_INTVECT0_INVECT0_GET(reg) BSP_FLD32GET(reg,0, 3)
318#define TMS570_LIN_INTVECT0_INVECT0_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
319
320
321/*--------------------TMS570_LIN_INTVECT1--------------------*/
322/* field: INVECT1 - Interrupt vector offset for INT1. This register indicates the offset for interrupt line INT1. */
323#define TMS570_LIN_INTVECT1_INVECT1(val) BSP_FLD32(val,0, 3)
324#define TMS570_LIN_INTVECT1_INVECT1_GET(reg) BSP_FLD32GET(reg,0, 3)
325#define TMS570_LIN_INTVECT1_INVECT1_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
326
327
328/*---------------------TMS570_LIN_FORMAT---------------------*/
329/* field: CHAR - Character length control bits. These bits set the SCI character length from 1 to 8 bits. */
330#define TMS570_LIN_FORMAT_CHAR(val) BSP_FLD32(val,0, 2)
331#define TMS570_LIN_FORMAT_CHAR_GET(reg) BSP_FLD32GET(reg,0, 2)
332#define TMS570_LIN_FORMAT_CHAR_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
333
334
335/*-----------------------TMS570_LIN_BRS-----------------------*/
336/* field: BAUD - SCI 24-bit baud selection. */
337#define TMS570_LIN_BRS_BAUD(val) BSP_FLD32(val,0, 23)
338#define TMS570_LIN_BRS_BAUD_GET(reg) BSP_FLD32GET(reg,0, 23)
339#define TMS570_LIN_BRS_BAUD_SET(reg,val) BSP_FLD32SET(reg, val,0, 23)
340
341
342/*-----------------------TMS570_LIN_ED-----------------------*/
343/* field: ED - Emulator data. Reading SCIED[7:0] does not clear the RXRDY flag, unlike reading SCIRD. */
344#define TMS570_LIN_ED_ED(val) BSP_FLD32(val,0, 7)
345#define TMS570_LIN_ED_ED_GET(reg) BSP_FLD32GET(reg,0, 7)
346#define TMS570_LIN_ED_ED_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
347
348
349/*-----------------------TMS570_LIN_RD-----------------------*/
350/* field: RD - Receiver data. */
351#define TMS570_LIN_RD_RD(val) BSP_FLD32(val,0, 7)
352#define TMS570_LIN_RD_RD_GET(reg) BSP_FLD32GET(reg,0, 7)
353#define TMS570_LIN_RD_RD_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
354
355
356/*-----------------------TMS570_LIN_TD-----------------------*/
357/* field: TD - Transmit data. Data to be transmitted is written to the SCITD register. */
358#define TMS570_LIN_TD_TD(val) BSP_FLD32(val,0, 7)
359#define TMS570_LIN_TD_TD_GET(reg) BSP_FLD32GET(reg,0, 7)
360#define TMS570_LIN_TD_TD_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
361
362
363/*----------------------TMS570_LIN_PIO0----------------------*/
364/* field: TX_FUNC - Transfer function. This bit defines the function of pin SCITX. */
365#define TMS570_LIN_PIO0_TX_FUNC BSP_BIT32(2)
366
367/* field: RX_FUNC - Receive function.This bit defines the function of pin SCIRX. */
368#define TMS570_LIN_PIO0_RX_FUNC BSP_BIT32(1)
369
370
371/*----------------------TMS570_LIN_PIO1----------------------*/
372/* field: TX_DIR - Transmit pin direction. */
373#define TMS570_LIN_PIO1_TX_DIR BSP_BIT32(2)
374
375/* field: RX_DIR - Receive pin direction. */
376#define TMS570_LIN_PIO1_RX_DIR BSP_BIT32(1)
377
378
379/*----------------------TMS570_LIN_PIO2----------------------*/
380/* field: TX_IN - Transmit pin in. This bit contains the current value on the SCITX pin. */
381#define TMS570_LIN_PIO2_TX_IN BSP_BIT32(2)
382
383/* field: RX_IN - Receive pin in. This bit contains the current value on the SCIRX pin. */
384#define TMS570_LIN_PIO2_RX_IN BSP_BIT32(1)
385
386
387/*----------------------TMS570_LIN_PIO3----------------------*/
388/* field: TX_OUT - Transmit pin out. */
389#define TMS570_LIN_PIO3_TX_OUT BSP_BIT32(2)
390
391/* field: RX_OUT - Receive pin out. */
392#define TMS570_LIN_PIO3_RX_OUT BSP_BIT32(1)
393
394
395/*----------------------TMS570_LIN_PIO4----------------------*/
396/* field: TX_SET - Transmit pin set. */
397#define TMS570_LIN_PIO4_TX_SET BSP_BIT32(2)
398
399/* field: RX_SET - Receive pin set. */
400#define TMS570_LIN_PIO4_RX_SET BSP_BIT32(1)
401
402
403/*----------------------TMS570_LIN_PIO5----------------------*/
404/* field: TX_CLR - Transmit pin clear. */
405#define TMS570_LIN_PIO5_TX_CLR BSP_BIT32(2)
406
407/* field: RX_CLR - Receive pin clear. */
408#define TMS570_LIN_PIO5_RX_CLR BSP_BIT32(1)
409
410
411/*----------------------TMS570_LIN_PIO6----------------------*/
412/* field: TX_PDR - Transmit pin open drain enable. */
413#define TMS570_LIN_PIO6_TX_PDR BSP_BIT32(2)
414
415/* field: RX_PDR - Receive pin open drain enable. */
416#define TMS570_LIN_PIO6_RX_PDR BSP_BIT32(1)
417
418
419/*----------------------TMS570_LIN_PIO7----------------------*/
420/* field: TX_PD - Transmit pin pull control disable. This bit disables pull control capability on the input pin SCITX. */
421#define TMS570_LIN_PIO7_TX_PD BSP_BIT32(2)
422
423/* field: RX_PD - Receive pin pull control disable. This bit disables pull control capability on the input pin SCIRX. */
424#define TMS570_LIN_PIO7_RX_PD BSP_BIT32(1)
425
426
427/*----------------------TMS570_LIN_PIO8----------------------*/
428/* field: TX_PSL - TX pin pull select. This bit selects pull type in the input pin SCITX. */
429#define TMS570_LIN_PIO8_TX_PSL BSP_BIT32(2)
430
431/* field: RX_PSL - RX pin pull select. This bit selects pull type in the input pin SCIRX. */
432#define TMS570_LIN_PIO8_RX_PSL BSP_BIT32(1)
433
434
435/*----------------------TMS570_LIN_COMP----------------------*/
436/* field: SDEL - 2-bit synch delimiter compare. These bits are effective in LIN mode only. */
437#define TMS570_LIN_COMP_SDEL(val) BSP_FLD32(val,8, 9)
438#define TMS570_LIN_COMP_SDEL_GET(reg) BSP_FLD32GET(reg,8, 9)
439#define TMS570_LIN_COMP_SDEL_SET(reg,val) BSP_FLD32SET(reg, val,8, 9)
440
441/* field: SBREAK - Synch break extend. These bits are effective in LIN mode only. */
442#define TMS570_LIN_COMP_SBREAK(val) BSP_FLD32(val,0, 2)
443#define TMS570_LIN_COMP_SBREAK_GET(reg) BSP_FLD32GET(reg,0, 2)
444#define TMS570_LIN_COMP_SBREAK_SET(reg,val) BSP_FLD32SET(reg, val,0, 2)
445
446
447/*-----------------------TMS570_LIN_RD0-----------------------*/
448/* field: RD0 - Receive buffer 0. Byte 0 of the response data byte. */
449#define TMS570_LIN_RD0_RD0(val) BSP_FLD32(val,24, 31)
450#define TMS570_LIN_RD0_RD0_GET(reg) BSP_FLD32GET(reg,24, 31)
451#define TMS570_LIN_RD0_RD0_SET(reg,val) BSP_FLD32SET(reg, val,24, 31)
452
453/* field: RD1 - Receive buffer 1. Byte 1 of the response data byte. */
454#define TMS570_LIN_RD0_RD1(val) BSP_FLD32(val,16, 23)
455#define TMS570_LIN_RD0_RD1_GET(reg) BSP_FLD32GET(reg,16, 23)
456#define TMS570_LIN_RD0_RD1_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
457
458/* field: RD2 - Receive buffer 2. Byte 2 of the response data byte. */
459#define TMS570_LIN_RD0_RD2(val) BSP_FLD32(val,8, 15)
460#define TMS570_LIN_RD0_RD2_GET(reg) BSP_FLD32GET(reg,8, 15)
461#define TMS570_LIN_RD0_RD2_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
462
463/* field: RD3 - Receive buffer 3. Byte 3 of the response data byte. */
464#define TMS570_LIN_RD0_RD3(val) BSP_FLD32(val,0, 7)
465#define TMS570_LIN_RD0_RD3_GET(reg) BSP_FLD32GET(reg,0, 7)
466#define TMS570_LIN_RD0_RD3_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
467
468
469/*-----------------------TMS570_LIN_RD1-----------------------*/
470/* field: RD4 - Receive buffer 4. Byte 4 of the response data byte. */
471#define TMS570_LIN_RD1_RD4(val) BSP_FLD32(val,24, 31)
472#define TMS570_LIN_RD1_RD4_GET(reg) BSP_FLD32GET(reg,24, 31)
473#define TMS570_LIN_RD1_RD4_SET(reg,val) BSP_FLD32SET(reg, val,24, 31)
474
475/* field: RD5 - Receive buffer 5. Byte 5 of the response data byte. */
476#define TMS570_LIN_RD1_RD5(val) BSP_FLD32(val,16, 23)
477#define TMS570_LIN_RD1_RD5_GET(reg) BSP_FLD32GET(reg,16, 23)
478#define TMS570_LIN_RD1_RD5_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
479
480/* field: RD6 - Receive buffer 6. Byte 6 of the response data byte. */
481#define TMS570_LIN_RD1_RD6(val) BSP_FLD32(val,8, 15)
482#define TMS570_LIN_RD1_RD6_GET(reg) BSP_FLD32GET(reg,8, 15)
483#define TMS570_LIN_RD1_RD6_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
484
485/* field: RD7 - Receive buffer 7. Byte 7 of the response data byte. */
486#define TMS570_LIN_RD1_RD7(val) BSP_FLD32(val,0, 7)
487#define TMS570_LIN_RD1_RD7_GET(reg) BSP_FLD32GET(reg,0, 7)
488#define TMS570_LIN_RD1_RD7_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
489
490
491/*----------------------TMS570_LIN_MASK----------------------*/
492/* field: RX_ID_MASK - Receive ID mask. These bits are effective in LIN mode only. */
493#define TMS570_LIN_MASK_RX_ID_MASK(val) BSP_FLD32(val,16, 23)
494#define TMS570_LIN_MASK_RX_ID_MASK_GET(reg) BSP_FLD32GET(reg,16, 23)
495#define TMS570_LIN_MASK_RX_ID_MASK_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
496
497/* field: TX_ID_MASK - Transmit ID mask. These bits are effective in LIN mode only. */
498#define TMS570_LIN_MASK_TX_ID_MASK(val) BSP_FLD32(val,0, 7)
499#define TMS570_LIN_MASK_TX_ID_MASK_GET(reg) BSP_FLD32GET(reg,0, 7)
500#define TMS570_LIN_MASK_TX_ID_MASK_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
501
502
503/*-----------------------TMS570_LIN_ID-----------------------*/
504/* field: RECEIVED_ID - Received identification. These bits are effective in LIN mode only. */
505#define TMS570_LIN_ID_RECEIVED_ID(val) BSP_FLD32(val,16, 23)
506#define TMS570_LIN_ID_RECEIVED_ID_GET(reg) BSP_FLD32GET(reg,16, 23)
507#define TMS570_LIN_ID_RECEIVED_ID_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
508
509/* field: ID_SLAVETASK_BYTE - ID-SlaveTask Byte. These bits are effective in LIN mode only. */
510#define TMS570_LIN_ID_ID_SLAVETASK_BYTE(val) BSP_FLD32(val,8, 15)
511#define TMS570_LIN_ID_ID_SLAVETASK_BYTE_GET(reg) BSP_FLD32GET(reg,8, 15)
512#define TMS570_LIN_ID_ID_SLAVETASK_BYTE_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
513
514/* field: ID_BYTE - ID byte. This field is effective in LIN mode only. This byte is the LIN mode message ID. */
515#define TMS570_LIN_ID_ID_BYTE(val) BSP_FLD32(val,0, 7)
516#define TMS570_LIN_ID_ID_BYTE_GET(reg) BSP_FLD32GET(reg,0, 7)
517#define TMS570_LIN_ID_ID_BYTE_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
518
519
520/*-----------------------TMS570_LIN_TD0-----------------------*/
521/* field: TD0 - 8-Bit transmit buffer 0. */
522#define TMS570_LIN_TD0_TD0(val) BSP_FLD32(val,24, 31)
523#define TMS570_LIN_TD0_TD0_GET(reg) BSP_FLD32GET(reg,24, 31)
524#define TMS570_LIN_TD0_TD0_SET(reg,val) BSP_FLD32SET(reg, val,24, 31)
525
526/* field: TD1 - 8-Bit transmit buffer 1. */
527#define TMS570_LIN_TD0_TD1(val) BSP_FLD32(val,16, 23)
528#define TMS570_LIN_TD0_TD1_GET(reg) BSP_FLD32GET(reg,16, 23)
529#define TMS570_LIN_TD0_TD1_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
530
531/* field: TD2 - 8-Bit transmit buffer 2. */
532#define TMS570_LIN_TD0_TD2(val) BSP_FLD32(val,8, 15)
533#define TMS570_LIN_TD0_TD2_GET(reg) BSP_FLD32GET(reg,8, 15)
534#define TMS570_LIN_TD0_TD2_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
535
536/* field: TD3 - 8-Bit transmit buffer 3. */
537#define TMS570_LIN_TD0_TD3(val) BSP_FLD32(val,0, 7)
538#define TMS570_LIN_TD0_TD3_GET(reg) BSP_FLD32GET(reg,0, 7)
539#define TMS570_LIN_TD0_TD3_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
540
541
542/*-----------------------TMS570_LIN_TD1-----------------------*/
543/* field: TD4 - 8-Bit transmit buffer 4. */
544#define TMS570_LIN_TD1_TD4(val) BSP_FLD32(val,24, 31)
545#define TMS570_LIN_TD1_TD4_GET(reg) BSP_FLD32GET(reg,24, 31)
546#define TMS570_LIN_TD1_TD4_SET(reg,val) BSP_FLD32SET(reg, val,24, 31)
547
548/* field: TD5 - 8-Bit transmit buffer 5. */
549#define TMS570_LIN_TD1_TD5(val) BSP_FLD32(val,16, 23)
550#define TMS570_LIN_TD1_TD5_GET(reg) BSP_FLD32GET(reg,16, 23)
551#define TMS570_LIN_TD1_TD5_SET(reg,val) BSP_FLD32SET(reg, val,16, 23)
552
553/* field: TD6 - 8-Bit transmit buffer 6. */
554#define TMS570_LIN_TD1_TD6(val) BSP_FLD32(val,8, 15)
555#define TMS570_LIN_TD1_TD6_GET(reg) BSP_FLD32GET(reg,8, 15)
556#define TMS570_LIN_TD1_TD6_SET(reg,val) BSP_FLD32SET(reg, val,8, 15)
557
558/* field: TD7 - 8-Bit transmit buffer 7. */
559#define TMS570_LIN_TD1_TD7(val) BSP_FLD32(val,0, 7)
560#define TMS570_LIN_TD1_TD7_GET(reg) BSP_FLD32GET(reg,0, 7)
561#define TMS570_LIN_TD1_TD7_SET(reg,val) BSP_FLD32SET(reg, val,0, 7)
562
563
564/*----------------------TMS570_LIN_MBRSR----------------------*/
565/* field: MBR - Maximum baud rate prescaler. This bit is effective in LIN mode only. */
566#define TMS570_LIN_MBRSR_MBR(val) BSP_FLD32(val,0, 12)
567#define TMS570_LIN_MBRSR_MBR_GET(reg) BSP_FLD32GET(reg,0, 12)
568#define TMS570_LIN_MBRSR_MBR_SET(reg,val) BSP_FLD32SET(reg, val,0, 12)
569
570
571/*--------------------TMS570_LIN_IODFTCTRL--------------------*/
572/* field: FEN - Frame error enable. This bit is used to create a frame error. */
573#define TMS570_LIN_IODFTCTRL_FEN BSP_BIT32(26)
574
575/* field: PEN - Parity error enable. This bit is used to create a parity error. */
576#define TMS570_LIN_IODFTCTRL_PEN BSP_BIT32(25)
577
578/* field: BRKD_TENA - Break detect error enable. This bit is used to create a BRKDT error. */
579#define TMS570_LIN_IODFTCTRL_BRKD_TENA BSP_BIT32(24)
580
581/* field: PIN_SAMPLE_MASK - Pin sample mask. */
582#define TMS570_LIN_IODFTCTRL_PIN_SAMPLE_MASK(val) BSP_FLD32(val,19, 20)
583#define TMS570_LIN_IODFTCTRL_PIN_SAMPLE_MASK_GET(reg) BSP_FLD32GET(reg,19, 20)
584#define TMS570_LIN_IODFTCTRL_PIN_SAMPLE_MASK_SET(reg,val) BSP_FLD32SET(reg, val,19, 20)
585
586/* field: TX_SHIFT - Transmit shift. */
587#define TMS570_LIN_IODFTCTRL_TX_SHIFT(val) BSP_FLD32(val,16, 18)
588#define TMS570_LIN_IODFTCTRL_TX_SHIFT_GET(reg) BSP_FLD32GET(reg,16, 18)
589#define TMS570_LIN_IODFTCTRL_TX_SHIFT_SET(reg,val) BSP_FLD32SET(reg, val,16, 18)
590
591/* field: IODFTENA - IODFT enable key. Write access permitted in Privilege mode only. */
592#define TMS570_LIN_IODFTCTRL_IODFTENA(val) BSP_FLD32(val,8, 11)
593#define TMS570_LIN_IODFTCTRL_IODFTENA_GET(reg) BSP_FLD32GET(reg,8, 11)
594#define TMS570_LIN_IODFTCTRL_IODFTENA_SET(reg,val) BSP_FLD32SET(reg, val,8, 11)
595
596/* field: LPBENA - Module loopback enable. Write access permitted in Privilege mode only. */
597#define TMS570_LIN_IODFTCTRL_LPBENA BSP_BIT32(1)
598
599/* field: RXPENA - Module analog loopback through receive pin enable. */
600#define TMS570_LIN_IODFTCTRL_RXPENA BSP_BIT32(0)
601
602
603
604#endif /* LIBBSP_ARM_TMS570_LIN */
This header file provides utility macros for BSPs.
Definition: reg_lin.h:54