
Enhanced Serial Communication Interface (eSCI)
MPC5566 Microcontroller Reference Manual, Rev. 2
21-36
Freescale Semiconductor
The eSCI settings must be made according to the LIN specification. The eSCI must be configured for
2-wire operation (2 wires connected to the LIN transceiver) with 8 data bytes and no parity. Normally a
13-bit break is used, but the eSCI can also be configured for 10-bit breaks as required by the application.
21.4.10.1 Features of the LIN Hardware
The eSCI’s LIN hardware has several features to support different revisions of the LIN slaves. The
ESCI
x
_LTR can be configured to include or not include header bits in the checksum on a frame by frame
basis. This feature supports LIN slaves with different LIN revisions. The LIN control register allows the
application to automatically calculate the parity bits in the ID field and insert double stop flags a bit error.
The BRK13 bit in ESCI
x
_CR2 decides whether to generate 10 or 13 bit break characters.
NOTE
LIN 2.0 requires a 13-bit break character. Set the BRK13 bit to 1. The eSCI
bus works when BRK13 = 0, but the setting does not comply with LIN 2.0.
The application software can disable checksum generation/verification for individual frames to perform
the functions externally and use the LIN hardware to append two CRC bytes (
). Although the
LIN standard does not include CRCs, CRCs are processed as data bytes by the LIN protocol. CRCs are
used in software applications that process very large frames. The eSCI and FlexCAN modules use the same
CRC polynomial, the LIN protocol processes CAN bytes as data bytes.
Figure 21-24. LIN Frame with CRC bytes
To force a resync of the LIN FSM, use the LRES bit in the LIN control register. Typically LIN hardware
automatically discards the frame when a bit error is detected.
21.4.10.2 Generating a TX Frame
The following procedure describes how a basic TX frame is generated.
The frame is controlled via the LIN transmit register (ESCI
x
_LTR). Initially, the application software must
check the TXRDY bit (either using an interrupt, the TX DMA interface, or by polling the LIN status
register). If TXRDY is set, the register is writable. Before each write, TXRDY must be checked (though
this step is performed automatically in DMA mode). The first write to the ESCI
x
_LTR must contain the
LIN ID field. The next write to ESCI
x
_LTR specifies the length of the frame (0 to 255 Bytes). The third
write to ESCI
x
_LTR contains the control byte (frame direction, checksum/CRC settings). Note that
timeout bits are not included in TX frames, since they only refer to LIN slaves. The three previously
mentioned writes to the ESCI
x
_LTR specify the LIN frame data. After the LIN frame data is specified, the
eSCI LIN hardware starts to generate a LIN frame.
First, the eSCI transmits a break field. The sync field is transmitted next. The third field is the ID field.
After these three fields have been broadcast, the ESCIx_LTR accepts data bytes; the LIN hardware
transmits these data bytes as soon as they are available and can be sent out. After the last step the LIN
hardware automatically appends the checksum field.
Break
Sync
ID
Data
Data
CRC1
CRC2
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...