MC68336/376
CAN 2.0B CONTROLLER MODULE (TouCAN)
MOTOROLA
USER’S MANUAL
Rev. 15 Oct 2000
13-14
1. The frame is transferred to the first (lowest entry) matching receive message
buffer.
2. The value of the free-running timer (captured at the beginning of the identifier
field on the CAN bus) is written into the time stamp field in the message buffer.
3. The ID field, data field and RX length field are stored.
4. The code field is updated.
5. The status flag is set in the IFLAG register.
The user should read a received frame from its message buffer in the following order:
1. Control/status word (mandatory, as it activates the internal lock for this buffer)
2. ID (optional, since it is needed only if a mask was used)
3. Data field word(s)
4. Free-running timer (optional, as it releases the internal lock)
If a read of the free running timer is not performed, that message buffer remains locked
until the read process starts for another message buffer. Only a single message buffer
is locked at a time. When reading a received message, the only mandatory read oper-
ation is that of the control/status word. This assures data coherency.
If the BUSY bit is set in the message buffer code, the CPU32 should defer accessing
that buffer until this bit is negated. Refer to Table 13-2.
NOTE
The CPU32 should check the status of a message buffer by reading
the status flag in the IFLAG register and not by reading the control/
status word code field for that message buffer. This prevents the
buffer from being locked inadvertently.
Because the received identifier field is always stored in the matching receive message
buffer, the contents of the identifier field in a receive message buffer may change if
one or more of the ID bits are masked.
13.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 should never be written into a receive message buffer. If this is done 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 will be requested.
13.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 lock/release/busy