Chapter 21 LIN Controller (LINFlex)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
523
21.8.2.1.7
Overrun
Once the messages buffer is full (LINSR[RMB] = 1) the next valid message reception leads to an overrun
and message is lost. The hardware signals the overrun condition by setting the BOF bit in the LINESR.
Which message is lost depends on the buffer lock function control bit RBLM.
•
If the buffer lock function control bit is cleared (LINCR1[RBLM] = 0) the old message in the
buffer is overwritten by the most recent message.
•
If buffer lock function control bit is set (LINCR1[RBLM] = 1) the most recent message is
discarded, and the oldest message is available in the buffer.
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 IFCR
x
[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 BDR. 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 BDR (see
).
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 BDR 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
) 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.
Содержание SAFE ASSURE Qorivva MPC5601P
Страница 2: ...MPC5602P Microcontroller Reference Manual Rev 4 2 Freescale Semiconductor ...
Страница 4: ...MPC5602P Microcontroller Reference Manual Rev 4 4 Freescale Semiconductor ...
Страница 62: ...Chapter 2 MPC5602P Memory Map MPC5602P Microcontroller Reference Manual Rev 4 62 Freescale Semiconductor ...
Страница 104: ...Chapter 4 Clock Description MPC5602P Microcontroller Reference Manual Rev 4 104 Freescale Semiconductor ...
Страница 128: ...Chapter 6 Power Control Unit MC_PCU MPC5602P Microcontroller Reference Manual Rev 4 128 Freescale Semiconductor ...
Страница 272: ...Chapter 12 e200z0 and e200z0h Core MPC5602P Microcontroller Reference Manual Rev 4 272 Freescale Semiconductor ...
Страница 280: ...Chapter 14 Crossbar Switch XBAR MPC5602P Microcontroller Reference Manual Rev 4 280 Freescale Semiconductor ...
Страница 306: ...Chapter 16 Internal Static RAM SRAM MPC5602P Microcontroller Reference Manual Rev 4 306 Freescale Semiconductor ...
Страница 380: ...Chapter 17 Flash Memory MPC5602P Microcontroller Reference Manual Rev 4 380 Freescale Semiconductor ...
Страница 532: ...Chapter 21 LIN Controller LINFlex MPC5602P Microcontroller Reference Manual Rev 4 532 Freescale Semiconductor ...
Страница 578: ...Chapter 22 FlexCAN MPC5602P Microcontroller Reference Manual Rev 4 578 Freescale Semiconductor ...
Страница 708: ...Chapter 25 FlexPWM MPC5602P Microcontroller Reference Manual Rev 4 708 Freescale Semiconductor ...
Страница 742: ...Chapter 26 eTimer MPC5602P Microcontroller Reference Manual Rev 4 742 Freescale Semiconductor ...
Страница 760: ...Chapter 27 Functional Safety MPC5602P Microcontroller Reference Manual Rev 4 760 Freescale Semiconductor ...
Страница 782: ...Chapter 28 Fault Collection Unit FCU MPC5602P Microcontroller Reference Manual Rev 4 782 Freescale Semiconductor ...
Страница 788: ...Chapter 29 Wakeup Unit WKPU MPC5602P Microcontroller Reference Manual Rev 4 788 Freescale Semiconductor ...
Страница 798: ...Chapter 30 Periodic Interrupt Timer PIT MPC5602P Microcontroller Reference Manual Rev 4 798 Freescale Semiconductor ...
Страница 816: ...Chapter 32 Cyclic Redundancy Check CRC MPC5602P Microcontroller Reference Manual Rev 4 816 Freescale Semiconductor ...
Страница 848: ...Chapter 33 Boot Assist Module BAM MPC5602P Microcontroller Reference Manual Rev 4 848 Freescale Semiconductor ...
Страница 930: ...Chapter 36 Nexus Development Interface NDI MPC5602P Microcontroller Reference Manual Rev 4 930 Freescale Semiconductor ...