English
Language : 

PXS20RM Datasheet, PDF (985/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
LIN Controller (LINFlexD)
31.7.1.2 Data transmission (transceiver as publisher)
When the master node is publisher of the data corresponding to the identifier sent in the header, then the
slave task of the master has to send the data in the Response part of the LIN frame. Therefore, the software
must provide the data to LINFlexD before requesting the header transmission. The software stores the data
in the message buffer BDR. According to the data field length LINFlexD transmits the data and the
checksum. The software uses the BIDR[CCS] bit to configure the checksum type (classic or enhanced) for
each message.
The direction of the message buffer is controlled by the BIDR[DIR] bit. When the software sets this bit
the response is sent by LINFlexD (publisher). Clearing this bit configures the message buffer as subscriber.
31.7.1.3 Data reception (transceiver as subscriber)
To receive data from a slave node, the master sends a header with the corresponding identifier. LINFlexD
stores the data received from the slave in the message buffer and stores the message status in the LINSR.
31.7.1.4 Error detection and handling
LINFlexD is able to detect and handle LIN communication errors. A code stored in the LIN error status
register (LINESR) signals the errors to the software.
Table 31-1 lists the errors detected in Master mode and the LINFlexD controller’s response to these errors.
Table 31-1. Errors in Master mode
Error
Description
LINFlexD response to error
Bit error
Framing error
Checksum error
Response and frame
timeout
During transmission, the value read back • Stops the transmission of the frame after
from the bus differs from the transmitted value the corrupted bit
• Generates an interrupt if LINIER[BEIE] is
set
• Returns to idle state
A dominant state has been sampled on the
stop bit of the currently received character
(sync field, identifier, or data field)
If encountered during reception:
• Discards the current frame
• Generates an interrupt if LINIER[FEIE] is
set
• Returns immediately to idle state
The computed checksum does not match the If encountered during reception:
received checksum
• Discards the current frame
• Generates an interrupt if LINIER[CEIE] is
set
• Returns to idle state
Refer to Section 31.12.1, 8-bit timeout counter, for more details
31.7.2 Slave mode
In Slave mode the software uses the message buffer to handle the LIN messages.
Slave mode is selected when the LINCR1[MME] is cleared.
Freescale Semiconductor
PXS20 Microcontroller Reference Manual, Rev. 1
31-9