LIN Controller (LINFlex)MPC5606S Microcontroller Reference Manual, Rev. 7Freescale Semiconductor 871During reception, a Framing Error leads LINFlex to discard the current frame. LINFlex returnsimmediately 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 idlestate. An interrupt is generated if the CEIE bit in the LINIER is set.23.8.2.1.7 OverrunOnce 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 lostdepends on the configuration of the RX message buffer:• If the buffer lock function is disabled (LINCR1[RBLM] = 0) the last message stored in the bufferis overwritten by the new incoming message. In this case the latest message is always available tothe application.• If the buffer lock function is enabled (LINCR1[RBLM] = 0) the most recent message is discardedand the previous message is available in the buffer.23.8.2.2 Slave modeIn Slave mode the application uses the message buffer to handle the LIN messages. Slave mode is selectedwhen 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 LINIERis set, an RX interrupt is generated. The software must read the received identifier in the BIDR, fill theBDR registers, specify the data field length using the DFL[0:2] bits in the BIDR and trigger the datatransmission by setting the DTRQ bit in LINCR2.One or several identifier filters can be configured for transmission by setting the DIR bit in the IFCRxregister(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 identifiermatches 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 theright location, the application has to identify the data by means of the identifier. To avoid this and to easethe access to the SRAM locations, the LINFlex controller provides a Filter Match Index. This index valueis 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 rightdata 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 checksumtype in the BDIR. The software fills the BDAR and triggers the data transmission by setting the DTRQ bitin LINCR2.