MC68F375
CAN 2.0B CONTROLLER MODULE
MOTOROLA
REFERENCE MANUAL
Rev. 25 June 03
7-15
7.5.4.1 Receive Message Buffer Deactivation
Any write access to the control/status word of a receive message buffer during the pro-
cess 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 must never be written into a receive message buffer. If this occurs while a mes-
sage is being transferred from a serial message buffer, the control/status word will
reflect a full or overrun condition, but no interrupt is requested.
7.5.4.2 Locking and Releasing Message Buffers
The lock/release/busy mechanism is designed to guarantee data coherency during the
receive process. The following examples demonstrate how the the lock/release/busy
mechanism affects TouCAN operation.
1. Reading a control/status word of a message buffer triggers a lock for that mes-
sage buffer. A new received message frame which matches the message buff-
er 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 is not immediately transferred into that mes-
sage buffer, but remains in the serial message buffer. 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 serial message buffer, then this frame is 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 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 is indi-
cated. 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 does 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 be followed by a read of the control/status word of
another buffer, or by a read of the free-running timer, to ensure that the locked buffer
is unlocked.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.