MPC5604B/C Microcontroller Reference Manual, Rev. 8
Freescale Semiconductor 413
21.8.2.2 Slave mode
In Slave mode the application uses the message buffer to handle the LIN messages. Slave mode is selected
when LINCR1[MME] = 0.
21.8.2.2.1 Data transmission (transceiver as publisher)
When LINFlex receives the identifier, the LINSR[HRF] is set and, if LINIER[HRIE] = 1, 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 BIDR[DFL] and trigger the data transmission by setting the
LINCR2[DTRQ] bit.
One or several identifier filters can be configured for transmission by setting the IFCRx[DIR] bit 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 21-30).
Using a filter avoids the software having to configure the direction, the data field length and the checksum
type in the BIDR. The software fills the BDAR and triggers the data transmission by programming
LINCR2[DTRQ] = 1.
If LINFlex cannot provide enough TX identifier filters to handle all identifiers the software has to transmit
data for, then a filter can be configured in mask mode (see Section 21.8.2.3, Slave mode with identifier
filtering) in order to manage several identifiers with one filter only.
21.8.2.2.2 Data reception (transceiver as subscriber)
When LINFlex receives the identifier, the LINSR[HRF] bit is set and, if LINIER[HRIE] = 1, an RX
interrupt is generated. The software must read the received identifier in the BIDR and specify the data field
length using the BIDR[DFL] field before receiving the stop bit of the first byte of data field.
When the checksum reception is completed, an RX interrupt is generated to allow the software to read the
received data in the BDR registers.
One or several identifier filters can be configured for reception by programming IFCRx[DIR] = 0 and
activated by setting one or several bits in the IFER.
When at least one identifier filter is configured in reception and activated, and if the received identifier
matches the filter, an RX interrupt is generated after the checksum reception only.
Typically, the application has to copy the data from the BDAR to SRAM locations. 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