
FlexCAN Module
MPC5644A Microcontroller Reference Manual, Rev. 6
1424
Freescale Semiconductor
2. Read the ID field (optional – needed only if a mask was used)
3. Read the Data field
4. Read the Free Running Timer (optional – releases the internal lock)
Upon reading the Control and Status word, if the BUSY bit is set in the Code field, then the CPU should
defer the access to the message buffer until this bit is negated. Reading the Free Running Timer is not
mandatory. If not executed the message buffer remains locked, unless the CPU reads the C/S word of
another message buffer. Note that only a single message buffer is locked at a time. The only mandatory
CPU read operation is the one on the Control and Status word to assure data coherency (see
).
The CPU should synchronize to frame reception by the status flag bit for the specific message buffer in the
corresponding IFRL or IFRH register and not by the Code field of that message buffer. Polling the Code
field does not work because once a frame was received and the CPU services the message buffer (by
reading the C/S word followed by unlocking the message buffer), the Code field will not return to EMPTY.
It will remain FULL, as explained in
. If the CPU tries to workaround this behavior by writing
to the C/S word to force an EMPTY code after reading the message buffer, the message buffer is actually
deactivated from any currently ongoing matching process. As a result, a newly received frame matching
the ID of that message buffer may be lost. In summary:
never do polling by reading directly the C/S
word of the message buffers. Instead, read the corresponding IFRL or IFRH register.
Note that the received ID field is always stored in the matching message buffer, thus the contents of the ID
field in a message buffer may change if the match was due to masking. Note also that FlexCAN does
receive frames transmitted by itself if there exists an Rx matching message buffer, provided
MCR[SRX_DIS] is not asserted. If MCR[SRX_DIS] is asserted, FlexCAN will not store frames
transmitted by itself in any message buffer, even if it contains a matching message buffer, and no interrupt
flag or interrupt signal will be generated due to the frame reception.
To be able to receive CAN frames through the FIFO, the CPU must enable and configure the FIFO during
Freeze Mode (see
). Upon receiving the frames available interrupt from FIFO, the
CPU should service the received frame using the following procedure:
1. Read the Control and Status word (optional – needed only if a mask was used for IDE and RTR
bits)
2. Read the ID field (optional – needed only if a mask was used)
3. Read the Data field
4. Clear the frames available interrupt (mandatory – release the buffer and allow the CPU to read the
next FIFO entry)
32.5.5
Matching process
The matching process is an algorithm executed by the MBM that scans the message buffer memory
looking for Rx message buffers programmed with the same ID as the one received from the CAN bus. If
the FIFO is enabled, the 8-entry ID table from FIFO is scanned first and then, if a match is not found within
the FIFO table, the other message buffers are scanned. In the event that the FIFO is full, the matching
algorithm will always look for a matching message buffer outside the FIFO region.
Содержание MPC5644A
Страница 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Страница 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Страница 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Страница 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Страница 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Страница 130: ...Device Performance Optimization MPC5644A Microcontroller Reference Manual Rev 6 130 Freescale Semiconductor...
Страница 204: ...Multi Layer AHB Crossbar Switch XBAR MPC5644A Microcontroller Reference Manual Rev 6 204 Freescale Semiconductor...
Страница 212: ...Peripheral Bridge PBRIDGE MPC5644A Microcontroller Reference Manual Rev 6 212 Freescale Semiconductor...
Страница 558: ...System Integration Unit SIU MPC5644A Microcontroller Reference Manual Rev 6 558 Freescale Semiconductor...
Страница 582: ...Frequency modulated phase locked loop FMPLL MPC5644A Microcontroller Reference Manual Rev 6 582 Freescale Semiconductor...
Страница 766: ...Enhanced Time Processing Unit eTPU2 MPC5644A Microcontroller Reference Manual Rev 6 766 Freescale Semiconductor...
Страница 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Страница 1236: ...System Information Module and Trim SIM MPC5644A Microcontroller Reference Manual Rev 6 1236 Freescale Semiconductor...
Страница 1250: ...Cyclic Redundancy Checker CRC Unit MPC5644A Microcontroller Reference Manual Rev 6 1250 Freescale Semiconductor...
Страница 1336: ...Deserial Serial Peripheral Interface DSPI MPC5644A Microcontroller Reference Manual Rev 6 1336 Freescale Semiconductor...
Страница 1388: ...Enhanced Serial Communication Interface ESCI MPC5644A Microcontroller Reference Manual Rev 6 1388 Freescale Semiconductor...
Страница 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...
Страница 1624: ...FlexRay Communication Controller FlexRay MPC5644A Microcontroller Reference Manual Rev 6 1624 Freescale Semiconductor...
Страница 1670: ...JTAG Controller JTAGC MPC5644A Microcontroller Reference Manual Rev 6 1670 Freescale Semiconductor...
Страница 1692: ...Nexus Port Controller NPC MPC5644A Microcontroller Reference Manual Rev 6 1692 Freescale Semiconductor...
Страница 1701: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 Freescale Semiconductor 1701...
Страница 1702: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 1702 Freescale Semiconductor...