
FlexCAN Module
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
1427
•
If the CODE field that was read is different from the value that was written, the CPU must read the
corresponding IFRL or IFRH register to check if the frame was transmitted or it is being currently
transmitted. If the corresponding IFRL or IFRH is set, the frame was transmitted. If the
corresponding IFRL or IFRH is reset, the CPU must wait for it to be set, and then the CPU must
read the CODE field to check if the message buffer was aborted (CODE = 1001) or it was
transmitted (CODE = 1000).
NOTE
An Abort request to a TxMB can block any write operation into its CODE
field. As a consequence, the TxMB cannot be aborted or deactivated
anymore until it completes the transmission by winning the CAN bus
arbitration.
32.5.6.2
Message buffer deactivation
Deactivation is mechanism provided to maintain data coherence when the CPU writes to the Control and
Status word of active message buffers out of Freeze Mode. Any CPU write access to the Control and Status
word of a message buffer causes that message buffer to be excluded from the transmit or receive processes
during the current matching or arbitration round. The deactivation is temporary, affecting only for the
current match/arbitration round.
The purpose of deactivation is data coherency. The match/arbitration process scans the message buffers to
decide which message buffer to transmit or receive. If the CPU updates the message buffer in the middle
of a match or arbitration process, the data of that message buffer may no longer be coherent, therefore
deactivation of that message buffer is done.
Even with the coherence mechanism described above, writing to the Control and Status word of active
message buffers when not in Freeze Mode may produce undesirable results. Examples are:
•
Matching and arbitration are one-pass processes. If message buffers are deactivated after they are
scanned, no re-evaluation is done to determine a new match/winner. If an Rx message buffer with
a matching ID is deactivated during the matching process after it was scanned, then this message
buffer is marked as invalid to receive the frame, and FlexCAN will keep looking for another
matching message buffer within the ones it has not scanned yet. If it can not find one, then the
message will be lost. Suppose, for example, that two message buffers have a matching ID to a
received frame, and the user deactivated the first matching message buffer after FlexCAN has
scanned the second. The received frame will be lost even if the second matching message buffer
was “free to receive”.
•
If a Tx message buffer containing the lowest ID is deactivated after FlexCAN has scanned it, then
FlexCAN will look for another winner within the message buffers that it has not scanned yet.
Therefore, it may transmit a message buffer with ID that may not be the lowest at the time because
a lower ID might be present in one of the message buffers that it had already scanned before the
deactivation.
•
There is a point in time until which the deactivation of a Tx message buffer causes it not to be
transmitted (end of move-out). After this point, it is transmitted but no interrupt is issued and the
Code field is not updated. In order to avoid this situation, the abort procedures described in
Section 32.5.6.1, Transmission abort mechanism
should be used.
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...