ISD91200 Series Technical Reference Manual
Release Date: Sep 16, 2019
- 293 -
Revision 2.4
5.13.5 LIN (Local Interconnection Network) mode
The UART supports a Local Interconnection Network (LIN) function. LIN mode is selected by setting the
UART_FUNCSEL.LINEN bit. In LIN mode, each byte field is initiated by a start bit with value zero
(dominant), followed by 8 data bits (LSB is first)and ended by 1 stop bit with value one (recessive) in
accordance with the LIN standard (
http://www.lin-subbus.org/
).
Da ta 1
Da ta 2
Da ta N
Che ck
S um
P rote cte d
Ide ntifie r
fie ld
He a de r
Re s pons e
s pa ce
Re s pons e
Inte r-
fra m e
s pa ce
Fra m e
Fra m e s lot
S ynch
fie ld
Bre a k
Fie ld
Figure 5-76 Structure of LIN Frame
The program flow of LIN Bus Transmit transfer (Tx) is shown as following
1.
Set the UART_FUNCSEL.LINEN bit to enable LIN Bus mode.
2.
Set UART_ALTCTL.BRKFL to choose break field length. The break field length is BRKFL+2.
3.
Fill 0x55 to UART_DAT to request synch field transmission.
4.
Request Identifier Field transmission by writing the protected identifier value to UART_DAT
5.
Set the UART_ALTCTL.LINTXEN bit to start transmission (When break filed operation is finished,
LINTX_EN will be cleared automatically).
6.
When the STOP bit of the last byte UART_DAT has been sent to bus, hardware will set flag
UART_FIFOSTS.TXEMPTYF to 1.
7.
Fill N bytes data and Checksum to UART_DAT then repeat step 5 and 6 to transmit the data.
The program flow of LIN Bus Receiver transfer (Rx) is show as following
1.
Set the UART_FUNCSEL.LINEN bit to enable LIN Bus mode.
2.
Set the UART_ALTCTL.LINRXEN bit register to enable LIN Rx mode.
3.
Wait for the flag UART_INTSTS.LINIF to indicate Rx received Break field or not.
4.
Wait for the flag UART_INTSTS.RDAIF read back the UART_DAT register.