Datasheet
V850ES/JG3-H, V850ES/JH3-H CHAPTER 20 CAN CONTROLLER
R01UH0042EJ0500 Rev.5.00 Page 986 of 1513
Aug 12, 2011
20.9.4 Mask function
For some message buffers that are used for reception, whether one of four global reception masks is applied can be
selected.
Load resulting from comparing message identifiers is reduced by masking some bits, and, as a result, some different
identifiers can be received in a buffer.
By using the mask function, the identifier of a message received from the CAN bus can be compared with the identifier
set to a message buffer in advance. Regardless of whether the masked ID is set to 0 or 1, the received message can be
stored in the defined message 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 ID25 ID24 ID23 ID22 ID21 ID20 ID19 ID18
x 0 0 0 1 x 1 x x x x
Remark x = don’t care
<2> Identifier to be configured in message buffer 14 (example)
(Using C0MIDL14 and C0MIDH14 registers)
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
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.
Remark x = don’t care
Remark Message buffer 14 is set as a standard format identifier that is linked to mask 1 (C0MCONF14.MT2 to
C0MCONF14.MT0 bits are set to 010B).