4 locking and releasing message buffers, 7 can protocol related frames, 1 remote frames – Freescale Semiconductor MCF5480 User Manual

Page 597: Locking and releasing message buffers -27, Can protocol related frames -27, Remote frames -27

Advertising
background image

Functional Overview

MCF548x Reference Manual, Rev. 3

Freescale Semiconductor

21-27

There is a point in time until which the deactivation of a Tx MB 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.

21.4.6.4

Locking and Releasing Message Buffers

Besides message buffer deactivation, the lock/release/busy mechanism is designed to guarantee data

coherency during the receive process. The following examples demonstrate how the lock/release/busy

mechanism will affect FlexCAN operation:

1. Reading a control/status word of a message buffer triggers a lock for that message buffer. A new

received message frame that matches the message buffer cannot be written into this message buffer

while it is locked.

2. To release a locked message buffer, the CPU either locks another message buffer (by reading its

control/status word) or globally releases any locked message buffer (by reading the free-running
timer).

3. If a receive frame with a matching ID is received during the time the message buffer is locked, the

receive frame will not be immediately transferred into that message buffer, but will remain in the
SMB. There is no indication when this occurs.

4. When a locked message buffer is released, if a frame with a matching identifier exists within the

SMB, then this frame will be transferred to the matching message buffer.

5. If two or more receive frames with matching IDs are received while a message buffer with a

matching ID is locked, the last received frame with that ID is kept within the serial message
buffer, while all preceding ones are lost. There is no indication of lost messages when this occurs.

6. If the user reads the control/status word of a receive message buffer while a frame is being

transferred from a serial message buffer, the BUSY code will be indicated. The user should wait
until this code is cleared before continuing to read from the message buffer to ensure data
coherency. In this situation, the read of the control/status word will not lock the message buffer.

Polling the control/status word of a receive message buffer can lock it, preventing a message from being

transferred into that buffer. If the control/status word of a receive message buffer is read, it should then be

followed by a read of the control/status word of another buffer, or by reading the free-running timer, to

ensure that the locked buffer is unlocked.

NOTE

Deactivation takes precedence over locking. If the CPU deactivates a locked

Rx MB, then its lock status is negated, and the MB is marked as invalid for

the current matching round. Any pending message on the SMB will not be

transferred to the MB anymore.

21.4.7

CAN Protocol Related Frames

21.4.7.1

Remote Frames

The remote frame is a message frame which is transmitted to request a data frame. The FlexCAN can be

configured to transmit a data frame automatically in response to a remote frame, or to transmit a remote

frame and then wait for the responding data frame to be received.

Advertising
This manual is related to the following products: