
276
Chapter 16
CAN Controller
User’s Manual U16504EE1V1UD00
16.12 Mask Function
Receive message buffer 0 and buffer 2 can be switched for masked operation with the mask control
register (MASKC). In this case the message does not hold message identifier and data of the frame.
Instead, it holds identifier and RTR mask information for masked compare operations for the next higher
message buffer number. In case the global mask is selected, it keeps mask information for all higher
message buffer numbers.
A mask does not store any information about identifier length. Therefore the same mask can be used
for both types of frames (standard and extended) during global mask operation.
All unused bytes can be used by the CPU for application needs.
(1)
Identifier Compare with Mask
The identifier compare with mask provides the possibility to exclude some bits from the compari-
son process. That means each bit is ignored when the corresponding bit in the mask definition is
set to one.
The setup of the mask control register (MASKC) defines which receive buffer is used as a mask
and which receive buffer uses which mask for comparison.
The mask does not include any information about the identifier type to be masked. This has to be
defined within the dedicated receive buffer. Therefore a global mask can serve for standard
receive buffers at the same time as for extended receive buffer.
Table 16-22: Mask Function
Name
Address
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
MCON
n0H
RTR
n1H
Unused
MREC0
n2H
ID standard part
MREC1
n3H
ID standard part
0
0
0
0
0
MREC2
n4H
ID extended part
MREC3
n5H
ID extended part
MREC4
n6H
ID extended part
0
0
0
0
0
0
n7H
Unused
n8H
Unused
n9H
Unused
nAH
Unused
nBH
Unused
nCH
Unused
nDH
Unused
nEH
Unused
nFH
Unused