16-16
MPC561/MPC563 Reference Manual
MOTOROLA
TouCAN Operation
NOTE
Steps 1 and 3 are mandatory for data coherency.
Once these steps are performed, the message buffer functions as an active receive buffer
and participates in the internal matching process, which takes place every time the TouCAN
receives an error-free frame. In this process, all active receive buffers compare their ID
value to the newly received one. If a match is detected, the following actions occur:
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 the free running timer is not read, 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 a received message is read, the only mandatory read operation is that of the
control/status word. This ensures data coherency.
If the BUSY bit is set in the message buffer code, the CPU should defer accessing that
NOTE
The user 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.
16.4.4.1 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.