Enhanced Serial Communication Interface (eSCI)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
20-38
Freescale Semiconductor
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.
20.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.
It is possible to set up a DMA channel to handle all the tasks required to send a TX frame. For this
operation, the TX DMA channel must be activated by setting the ESCI
x
_CR2[TXDMA] bit. The control
information for the LIN frame (ID, message length, TX/RX type, timeout, etc.) and the data bytes are
stored at an appropriate memory location. The DMA controller is then set up to transfer this block of
memory to a location (the ESCI
x
_LTR). After transmission is complete, either the DMA controller or the
LIN hardware can generate an interrupt to the CPU.
NOTE
In contrast to the standard software implementation where each byte
transmission requires several interrupts, the DMA controller and eSCI
handle communication, bit error and physical bus error checking,
checksum, and CRC generation (checking on the RX side).
Summary of Contents for MPC5565
Page 18: ...MPC5565 Microcontroller Reference Manual Devices Supported MPC5565 MPC5565 RM Rev 1 0 09 2007...
Page 34: ...MPC5565 Reference Manual Rev 1 0 Freescale Semiconductor 15...
Page 35: ...MPC5565 Reference Manual Rev 1 0 16 Freescale Semiconductor...
Page 553: ...Flash Memory MPC5565 Microcontroller Reference Manual Rev 1 0 13 38 Freescale Semiconductor...
Page 559: ...SRAM MPC5565 Microcontroller Reference Manual Rev 1 0 14 6 Freescale Semiconductor...
Page 973: ...Preface MPC5565 Microcontroller Reference Manual Rev 1 0 21 36 Freescale Semiconductor...
Page 1153: ...Calibration MPC5565 Microcontroller Reference Manual Rev 1 0 B 8 Freescale Semiconductor...