BAT32G1x9 user manual | Chapter 22 CAN control
929 / 1149
Rev.1.02
22.9.4
Blocking function
For any packet buffer used for reception, you can choose to allocate a quarter of the receive mask (or
no mask).
By using the masking function, packet ID comparisons can be reduced by masking bits, allowing
multiple different IDs to be received into a buffer.
When the mask function is in effect, the identifier bit in the received message whose mask is defined
as "1" is not compared to the corresponding identifier bit in the message buffer.
However, this comparison is performed in bits defined as 0 by the mask.
For example, all messages with standard format IDs (where the BITs 25 to ID27 are "0", ID22 and
ID24 bits are "1") will be stored in the packet buffer 14. The procedure for this example is as follows.
<1> Identifier is stored in the message cache
ID28
ID27
ID26
ID25
ID24
ID23
ID22
ID21
ID20
ID19
ID18
x
0
0
0
1
x
1
x
x
x
x
x = Leave it alone
<2> identifier is configured into packet cache 14 (example).
(Use the CAN 0 message ID registers L14 and H14 (CnMIDL14 and CnMIDH14)).
ID28
ID27
ID26
ID25
ID24
ID23
ID22
ID21
ID20
ID19
ID18
x
0
0
0
1
x
1
x
x
x
x
ID17
ID16
ID15
ID14
ID13
ID12
ID11
ID10
ID9
ID8
ID7
x
x
x
x
x
x
x
x
x
x
x
ID6
ID5
ID4
ID3
ID2
ID1
ID0
x
x
x
x
x
x
x
IDs from ID25 to ID27 are cleared as "0", ID24 and ID22 are set to "1", registered (initialized) to packet
buffer 14.
Note
Message buffer 14 is set to the standard format identifier linked to mask 1 (MT[2:0] of the
CnMCONF14 register is set to 010B )
。
<3> CAN Module 1 mask1 (example).
(Using CAN module mask 1 registers L and H (CnMASK1L and CnMASK1H)).
CMID28 CMID27 CMID26 CMID25 CMID24 CMID23 CMID22 CMID21 CMID20 CMID19 CMID18
1
0
0
0
0
1
0
1
1
1
1
CMID17 CMID16 CMID15 CMID14 CMID13 CMID12 CMID11 CMID10
CMID9
CMID8
CMID7
1
1
1
1
1
1
1
1
1
1
1
CMID6
CMID5
CMID4
CMID3
CMID2
CMID1
CMID0
1
1
1
1
1
1
1
1: No comparison (masking).
0: Compare
THE CMID24 to CMID27 and CMID22 bits are cleared as "0", and the CMID0 to CMID21, CMID23,
and CMID28 bits are set to "1".