LIN Controller (LINFlex)
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor 871
 
During reception, a Framing Error leads LINFlex to discard the current frame. LINFlex returns 
immediately to idle state. An interrupt is generated if the FEIE bit in the LINIER is set.
During reception, a Checksum Error leads LINFlex to discard the received frame. LINFlex returns to idle 
state. An interrupt is generated if the CEIE bit in the LINIER is set.
23.8.2.1.7 Overrun
Once the message buffer is full, the next valid message reception leads to an overrun and a message is lost. 
The hardware sets the BOF bit in the LINSR to signal the overrun condition. Which message is lost 
depends on the configuration of the RX message buffer:
• If the buffer lock function is disabled (LINCR1[RBLM] = 0) the last message stored in the buffer 
is overwritten by the new incoming message. In this case the latest message is always available to 
the application.
• If the buffer lock function is enabled (LINCR1[RBLM] = 0) the most recent message is discarded 
and the previous message is available in the buffer.
23.8.2.2 Slave mode
In Slave mode the application uses the message buffer to handle the LIN messages. Slave mode is selected 
when the MME bit in LINCR1 is cleared.
23.8.2.2.1 Data transmission (transceiver as publisher)
When LINFlex receives the identifier, the HRF bit in the LINSR is set and, if the HRIE bit in the LINIER 
is set, an RX interrupt is generated. The software must read the received identifier in the BIDR, fill the 
BDR registers, specify the data field length using the DFL[0:2] bits in the BIDR and trigger the data 
transmission by setting the DTRQ bit in LINCR2.
One or several identifier filters can be configured for transmission by setting the DIR bit in the IFCRx 
register(s) and activated by setting one or several bits in the IFER.
When at least one identifier filter is configured in transmission and activated, and if the received identifier 
matches the filter, a specific TX interrupt (instead of an RX interrupt) is generated.
Typically, the application has to copy the data from SRAM locations to the BDAR. To copy the data to the 
right location, the application has to identify the data by means of the identifier. To avoid this and to ease 
the access to the SRAM locations, the LINFlex controller provides a Filter Match Index. This index value 
is the number of the filter that matched the received identifier.
The software can use the index in the IFMI register to directly access the pointer that points to the right 
data array in the SRAM area and copy this data to the BDAR (see 
Figure 23-31). 
Using a filter avoids the software having to configure the direction, the data field length and the checksum 
type in the BDIR. The software fills the BDAR and triggers the data transmission by setting the DTRQ bit 
in LINCR2.