![NXP Semiconductors MPC5566 Reference Manual Download Page 1032](http://html1.mh-extra.com/html/nxp-semiconductors/mpc5566/mpc5566_reference-manual_17218501032.webp)
Enhanced Serial Communication Interface (eSCI)
MPC5566 Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
21-35
21.4.10 Using the LIN Hardware
The eSCI provides special support for the LIN protocol. It can be used to automate most tasks of a LIN
master. In conjunction with the DMA interface it is possible to transmit entire frames (or sequences of
frames) and receive data from LIN slaves without any CPU intervention. There is no special support for
LIN slave mode. If required, LIN slave mode can be implemented in software.
A LIN frame consists of a break character (10 or 13 bits), a sync field, an ID field,
n
data fields (
n
could
be 0) and a checksum field. The data and checksum bytes are either provided by the LIN master (TX frame)
or by the LIN slave (RX frame). The header fields are always generated by the LIN master.
Figure 21-23. Typical LIN frame
The LIN hardware is highly configurable. This configurability allows the eSCI’s LIN hardware to generate
frames for LIN slaves from all revisions of the LIN standard. The settings are adjusted according to the
capabilities of the slave device.
To activate the LIN hardware, the LIN mode bit in the ESCI
x
_LCR needs to be set. Other settings, such
as double stop flags after bit errors and automatic parity bit generation, are also available for use in LIN
mode.
LIN
CKERR
Checksum error detected. If an RX frame has the checksum checking
flag set and the last byte does not match the calculated checksum, the
checksum error (CKERR) flag is set. Clear the CKERR flag by writing
a 1 to the bit.
ESCI
x
_SR[22]
CKIE
LIN
FRC
LIN frame completed. The frame complete (FRC) flag is set after the
last byte of a TX frame is transmitted, or after the last byte of an RX
frame is received. The FRC flag indicates that the next frame can be
set up. Clear the FRC flag by writing a 1 to the bit.
Note:
The last byte of an outgoing TX frame or incoming RX frame
indicates that the checksum comparison occurred.
Note:
It is possible to set the FRC flag before the DMA controller has
completed transferring the last byte from the eSCI port to
system memory. Do not set the FRC flag if the frame will be
processed. For frames that will be processed, use the DMA
controller interrupt.
ESCI
x
_SR[23]
FCIE
LIN
OVFL
ESCIx_LRR overflow. The overflow (OVFL) flag is set when a byte is
received in the ESCI
x
_LRR before the previous byte is read. Since the
system is responsible for reading the register before the next byte
arrives, this condition indicates a problem with CPU load. The OVFL
flag is cleared by writing a 1 to the bit.
ESCI
x
_SR[31]
OFIE
Table 21-21. eSCI Interrupt Flags, Sources, Mask Bits, and Descriptions (continued)
Interrupt
Source
Flag
Description
Source
Local
Enable
Break
Sync
ID
Data
Data
CSum
...
Summary of Contents for MPC5566
Page 81: ...Introduction MPC5566 Microcontroller Reference Manual Rev 2 1 24 Freescale Semiconductor...
Page 135: ...Signal Description MPC5566 Microcontroller Reference Manual Rev 2 2 54 Freescale Semiconductor...
Page 189: ...Reset MPC5566 Microcontroller Reference Manual Rev 2 4 20 Freescale Semiconductor...
Page 603: ...Flash Memory MPC5566 Microcontroller Reference Manual Rev 2 13 38 Freescale Semiconductor...
Page 609: ...SRAM MPC5566 Microcontroller Reference Manual Rev 2 14 6 Freescale Semiconductor...
Page 1073: ...MPC5566 Microcontroller Reference Manual Rev 2 22 36 Freescale Semiconductor...
Page 1185: ...Nexus MPC5566 Microcontroller Reference Manual Rev 2 25 92 Freescale Semiconductor...