1 serial message buffers (smbs), 2 transmit message buffer deactivation, 3 receive message buffer deactivation – Freescale Semiconductor MCF5480 User Manual

Page 596: Serial message buffers (smbs) -26, Transmit message buffer deactivation -26, Receive message buffer deactivation -26

Advertising
background image

MCF548x Reference Manual, Rev. 3

21-26

Freescale Semiconductor

lost. Two or more receive MBs that hold a matching ID to a received frame do not assure reception in the

FlexCAN if the user has deactivated the matching MB after FlexCAN has scanned the second.

21.4.6.1

Serial Message Buffers (SMBs)

To allow double buffering of messages, the FlexCAN has two shadow buffers called serial message

buffers. These two buffers are used by the FlexCAN for buffering both received messages and messages

to be transmitted. Only one SMB is active at a time, and its function depends upon the operation of the

FlexCAN at that time. At no time does the user have access to or visibility of these two buffers.

21.4.6.2

Transmit Message Buffer Deactivation

Any write access to the control/status word of a transmit message buffer during the process of selecting a

message buffer for transmission immediately deactivates that message buffer, removing it from the

transmission process.
If the user deactivates the transmit MB while a message is being transferred from a transmit message buffer

to a SMB, the message will not be transmitted.
If the user deactivates the transmit message buffer after the message is transferred to the SMB, the message

will be transmitted, but no interrupt will be requested and the transmit code will not be updated.
If a message buffer containing the lowest ID is deactivated while that message is undergoing the internal

arbitration process to determine which message should be sent, then that message may not be transmitted.

21.4.6.3

Receive Message Buffer Deactivation

Any write access to the control/status word of a receive message buffer during the process of selecting a

message buffer for reception immediately deactivates that message buffer, removing it from the reception

process.
If a receive message buffer is deactivated while a message is being transferred into it, the transfer is halted

and no interrupt is requested. If this occurs, that receive message buffer may contain mixed data from two

different frames.
Data should never be written into a receive message buffer. If this is done while a message is being

transferred from an SMB, the control/status word will reflect a full or overrun condition, but no interrupt

will be requested.
Even with the coherence mechanism described above, writing to the control and status word of active MBs

when not in freeze mode may produce undesirable results. Examples are the following:

Matching and arbitration are one-pass processes. If MBs are deactivated after they are scanned, no

re-evaluation is done to determine a new match/winner. If an Rx MB with a matching ID is

deactivated during the matching process after it was scanned, then this MB is marked as invalid to

receive the frame, and FlexCAN will keep looking for another matching MB 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

MBs have a matching ID to a received frame, and the user deactivated the first matching MB after

FlexCAN has scanned the second. The received frame will be lost even if the second matching MB

was “free to receive”.

If a Tx MB containing the lowest ID is deactivated after FlexCAN has scanned it, then FlexCAN

will look for another winner within the MBs that it has not scanned yet. Therefore, it may transmit

an MB with ID that may not be the lowest at the time, because a lower ID might be present in one

of the MBs that it had already scanned before the deactivation.

Advertising
This manual is related to the following products: