
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
User’s Manual
21-16
V2.2, 2004-01
TwinCAN_X1, V2.1
21.1.4.1
Arbitration and Acceptance Mask Register
The arbitration register MSGARn is used to filter the incoming messages and to provide
the outgoing messages with an identifier. The acceptance mask register MSGAMRn
may be used to disable some identifier bits of an incoming message for the acceptance
test.
The identifier of a received message is compared (bitwise XOR) to the identifiers of all
message objects stored in the internal CAN controller memory. The compare operation
starts at object 0 and takes into account all objects with
•
a valid message flag (MSGVAL = ‘10’),
•
a suitable NODE declaration (register MSGCFGn),
•
a cleared DIR control bit (receive message object) for data frame reception,
•
DIR = ‘1’ (transmit message object) for remote frame reception,
•
a matching identifier length declaration (XTD = ‘1’ marks extended 29-bit identifiers,
XTD = ‘0’ indicates standard 11 bit identifiers).
The result of the compare operation is bit-by-bit ANDED with the contents of the
acceptance mask register (
). If concordance is detected, the received
message is stored into the CAN controller’s message object. The compare operation is
finished after analyzing message object 31.
Note: Depending on the allocated identifiers and the corresponding mask register
contents, multiple message objects may fulfill the selection criteria described
above. In this case, the received frame is stored in the fitting message object with
the lowest message number.
Figure 21-10 Acceptance Filtering for Received Message Identifiers
MCA05480
Acceptance Mask
of Message Object n
Result = 0:
ID of the received frame
fits to message object n
Result > 0:
ID of the received frame does
not fit to message object n
=1
&
Identifier
of Message Object n
Identifier
of Received Frame
Bitwise
XOR
Bitwise
AND
‘0’ = Bit Match
‘1’ = No Match