Mask Function - NEC V850ES/F 3-L Series User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

Chapter 18

18.9.4 Mask function

Note
606
For any message buffer, which is used for reception, the assignment to one of
four global reception masks (or no mask) can be selected.
By using the mask function, the message ID comparison can be reduced by
masked bits, herewith allowing the reception of several different IDs into one
buffer.
While the mask function is in effect, an identifier bit that is defined to be 1 by a
mask in the received message is not compared with the corresponding
identifier bit in the message buffer.
However, this comparison is performed for any bit whose value is defined as 0
by the mask.
For example, let us assume that all messages that have a standard-format ID,
in which bits ID27 to ID25 are 0 and bits ID24 and ID22 are 1, are to be stored
in message buffer 14. The procedure for this example is shown below.
1. Identifier to be stored in message buffer
ID28
ID27
ID26
x
0
0
2. Identifier to be configured in message buffer 14 (example)
(Using CnMIDL14 and CnMIDH14 registers)
ID28
ID27
ID26
x
0
0
ID17
ID16
ID15
x
x
x
ID6
ID5
ID4
x
x
x
1.
ID with the ID27 to ID25 bits cleared to 0 and the ID24 and ID22 bits set to
1 is registered (initialized) to message buffer 14.
2.
Message buffer 14 is set as a standard format identifier that is linked to
mask 1 (MT[2:0] of CnMCONF14 register are set to 010
Mask setting for CAN module 0(mask 1) (example)
(Using CAN0 address mask 1 registers L and H (C0MASKL1 and C0MASKH1))
CMID28 CMID27
CMID26 CMID25
1
0
0
CMID17 CMID16
CMID15 CMID14
1
1
1
CMID6
CMID5
CMID4
1
1
1
1: Not compared (masked)
0: Compared
User's Manual U18743EE1V2UM00
ID25
ID24
ID23
ID22
0
1
x
ID25
ID24
ID23
ID22
0
1
x
ID14
ID13
ID12
ID11
x
x
x
ID3
ID2
ID1
ID0
x
x
x
CMID24 CMID23 CMID22
0
0
1
CMID13 CMID12 CMID11
1
1
1
CMID3
CMID2
CMID1
CMID0
1
1
1
CAN Controller (CAN)
ID21
ID20
ID19
1
x
x
x
ID21
ID20
ID19
1
x
x
x
ID10
ID9
ID8
x
x
x
x
x
).
B
CMID21 CMID20 CMID19
0
1
1
1
CMID10
CMID9
CMID8
1
1
1
1
1
ID18
x
ID18
x
ID7
x
CMID18
1
CMID7
1

Advertisement

Table of Contents
loading

Table of Contents