
CHAPTER 19 CAN CONTROLLER
User’s Manual U16541EJ4V0UD
784
19.9 Message Reception
19.9.1 Message reception
In all the operation modes, when a message is received, a message buffer that is to store the message is searched
from all the message buffers satisfying the following conditions.
Used as a message buffer
(C0MCONFm.MA0 bit is set to 1.)
Set as a receive message buffer
(C0MCONFm.MT2 to C0MCONFm.MT0 bits are set to 001B, 010B, 011B, 100B, or 101B.)
Ready for reception
(C0MCTRLm.RDY bit is set to 1.)
Remark
m = 00 to 31
When two or more message buffers of the CAN module receive a message, the message is stored according to
the priority explained below. The message is always stored in the message buffer with the highest priority, not in a
message buffer with a low priority. For example, when an unmasked receive message buffer and a receive message
buffer linked to mask 1 have the same ID, the received message is not stored in the message buffer linked to mask 1
that has not received a message, even if a message has already been received in the unmasked receive message
buffer. In other words, when a condition has been set to store a message in two or more message buffers with
different priorities, the message buffer with the highest priority always stores the message; the message is not stored
in message buffers with a lower priority. This also applies when the message buffer with the highest priority is unable
to receive and store a message (i.e., when the DN bit = 1 indicating that a message has already been received, but
rewriting is disabled because the OWS bit = 0). In this case, the message is not actually received and stored in the
candidate message buffer with the highest priority, but neither is it stored in a message buffer with a lower priority.
Priority
Storing Condition If Same ID Is Set
DN bit = 0
1 (high)
Unmasked message buffer
DN bit = 1 and OWS bit = 1
DN bit = 0
2
Message buffer linked to mask 1
DN bit = 1 and OWS bit = 1
DN bit = 0
3
Message buffer linked to mask 2
DN bit = 1 and OWS bit = 1
DN bit = 0
4
Message buffer linked to mask 3
DN bit = 1 and OWS bit = 1
DN bit = 0
5 (low)
Message buffer linked to mask 4
DN bit = 1 and OWS bit = 1