38.7.2.3 Filtering on Data Bytes

When the filter is configured to receive standard frames, the EID part of the filter and mask object can be selected to filter the data bytes. The DNCNT[4:0] bits in the C1CONL register are used to select how many bits in the data bytes are compared. Table 38-7 explains how many data bits are compared and which filter bits and data bits are compared.

If DNCNTx is:
  • 0’, then data byte filtering is disabled.
  • Nonzero, the filtering will commence on as many data bits as specified in DNCNTx. A filter hit will require matching of the SIDx bits and a match of n data bits with the filter’s EID[0:17] bits. Data Byte 0[7] is always compared to EID[0], Data Byte 0[6] to EID[1], Data Byte 2[6] to EID[17].
  • Greater than 18, indicating that the user-selected number of bits is greater than the total number of EIDx bits. The filter comparison will terminate with the 18th bit of the data.
  • Greater than 16 and the received message has DLC = 2, indicating a payload of two data bytes. The filter comparison will terminate with the 16th bit of the data.
  • Greater than 8 and the received message has DLC = 1, indicating a payload of one data byte. The filter comparison will terminate with the 8th bit of the data.
  • Greater than 0 and the received message has DLC = 0, indicating no data payload. The filter comparison will terminate with the identifier.
Table 38-7. Data Byte Filter Configuration
DNCNT[4:0] Received Message Data Bits to be Compared Byte [bits] EIDx Bits Used for Acceptance Filter
00000 No Comparison No Comparison
00001 Data Byte 0[7] EID[0]
00010 Data byte 0[7:6] EID[0:1]
00011 Data byte 0[7:5] EID[0:2]
00100 Data byte 0[7:4] EID[0:3]
00101 Data byte 0[7:3] EID[0:4]
00110 Data byte 0[7:2] EID[0:5]
00111 Data byte 0[7:1] EID[0:6]
01000 Data byte 0[7:0] EID[0:7]
01001 Data byte 0[7:0] and Data Byte 1[7] EID[0:8]
01010 Data byte 0[7:0] and Data Byte 1[7:6] EID[0:9]
01011 Data byte 0[7:0] and Data Byte 1[7:5] EID[0:10]
01100 Data byte 0[7:0] and Data Byte 1[7:4] EID[0:11]
01101 Data byte 0[7:0] and Data Byte 1[7:3] EID[0:12]
01110 Data byte 0[7:0] and Data Byte 1[7:2] EID[0:13]
01111 Data byte 0[7:0] and Data Byte 1[7:1] EID[0:14]
10000 Data byte 0[7:0] and Data Byte 1[7:0] EID[0:15]
10001 Byte 0[7:0] and Byte 1[7:0] and Byte 2[7] EID[0:16]
10010 to 11111 Byte 0[7:0] and Byte 1[7:0] and Byte 2[7:6] EID[0:17]

Figure 38-14 illustrates how the first 18 data bits of the received message data payload are compared with the corresponding EIDx bits of the message acceptance filter (EID[17:0] bits in the C1FLTOBJxH/L registers). The IDE bit of the received message must be ‘0’.

Figure 38-14. CAN Operation with DeviceNet Filtering