714
Chapter 19
CAN Controller (CAN)
Preliminary User’s Manual U17566EE1V2UM00
19.9.1
Resetting error counter CNERC of CAN module
If it is necessary to reset the CnERC and CnINFO registers when re-
initialization or forced recovery from the bus-off status is made, set the
CnCTRL.CCERC bit to 1 in the initialization mode. When this bit is set to 1, the
CnERC and CnINFO registers are cleared to their default values.
19.10 Message Reception
19.10.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
(CnMCONFm.MA0 bit is set to 1.)
• Set as a receive message buffer
(CnMCONFm.MT2 to CnMCONFm.MT0 bits are set to 001B, 010B, 011B,
100B, or 101B.)
• Ready for reception
(CnMCTRLm.RDY bit is set to 1.)
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 message is always stored in the unmasked receive message buffer
even if this unmasked receive buffer has already received a message earlier.
Priority
Storing Condition If Same ID Is Set
1 (high)
Unmasked message buffer
DN bit = 0
DN bit = 1 and OWS bit = 1
2
Message buffer linked to mask 1
DN bit = 0
DN bit = 1 and OWS bit = 1
3
Message buffer linked to mask 2
DN bit = 0
DN bit = 1 and OWS bit = 1
4
Message buffer linked to mask 3
DN bit = 0
DN bit = 1 and OWS bit = 1
5 (low)
Message buffer linked to mask 4
DN bit = 0
DN bit = 1 and OWS bit = 1
electronic components distributor