I. Basic Content
After understanding the single filter mode of ECAN-E02, it is easier to understand the dual filter mode of ECAN-E02.
(1) ID represents the frame ID, that is, the frame ID of CAN. The standard frame ID is 11 bits (7FF) and the extended frame ID is 29 bits (1FFFFFFF)
(2) DB represents data, that is, 8-bit byte data (there are only 2 DBs here, which means that only the first two bytes can be filtered) (counting from left to right) (FF FF) (DB1 represents 0-7, indicating a combination of 8421 8421, so the maximum can only be FF, DB2 and so on, the maximum filter is FF FF)
(3) CODE represents the condition, that is, the message must first meet the condition
(4) MASK represents the judgment condition
(5) The filtering method is ST Code Mask (standard data frame) and ET Code Mask (extended data frame).
Next, we analyze the dual filter mode of ECAN-E02.
(1) CodeHigh represents a 16-31-bit number, and CodeLow represents a 0-15-bit number.
(2) Similarly, MaskHigh represents a 16-31-bit number, and MaskLow represents a 0-15-bit number.
(3) The interface of ECAN-E02 has been updated and changed. Numbers can be automatically generated through the point interface. Therefore, for ST, RTR represents the remote frame, ID00-ID10 represents the 11-bit standard frame ID, DB1[0-7] represents the 8-bit first byte of the data frame, and DB2[0-7] represents the 8-bit second byte of the data frame (“XX” means no setting is required)
(4) For ET, RTR represents the remote frame, and ID00-ID28 represents the 29-bit extended frame ID (“XX” means no setting is required)
2. Dual filter mode
Next, observe the dual filter interface of ECAN-E02
As shown in the figure above, the same color is a group of filters, so a double filter is formed. The sent message only needs to pass through one group of filters.
1. The following is an analysis of the dual filter mechanism, and a further detailed and vivid understanding is obtained through test cases. Use the web page to configure the dual filter mode. CodeHigh (Hex) is configured to 0xFFE0, CodeLow (Hex) is configured to 0x001F, MaskHigh (Hex) is configured to 0x0000, MaskLow (Hex) is configured to 0x0000, save the parameters, and restart the device;
Use the network debugging assistant to connect to the device channel 1 server, and use the CAN analyzer to connect to the channel 1 CAN interface. The network debugging assistant will only receive standard data frames (0x0f000000000000000) with ID 7FF and the first data 0x0F, standard remote frames with ID 0, and extended frames with IDs between 1FFc0000-1FFC1FFF and 3E000-3FFFF.
First, analyze the standard frame and observe the three lines of ST Code Mask. You can find that Mask is 0, which means that the Code condition must be met. First observe filter 1 (light yellow). For frame ID, ID00-ID10 are all 1, so only frame ID 7FF can be received. Next, pay attention to the DB part. DB1[0-3] is all 1, indicating that 0-3 of the first byte of the data segment is high, that is, the value is F. Therefore, only the standard data frame with ID 7FF and the first data 0x0F (0x0f00000000000000) will be received. Next, observe filter 2 (dark yellow). You can find that RTR is 1 and frame ID is 0, so the standard remote frame with frame ID 0 can be filtered. Therefore, in summary, only the standard data frame with ID 7FF and the first data 0x0F (0x0f00000000000000) and the standard remote frame with ID 0 will be received.
Next, we analyze the extended frame part and observe the three lines of ET Code Mask, which are divided into two dual filter modes with extended frame IDs of 13-28. By analyzing the first extended frame ID on the left, we can find that the ID18-28 bits are high bits, so the extended frame ID of 1FFC0000 can be received. The last four bits marked in red are not in this filter table, so they cannot be filtered. Therefore, the first filter can receive extended frames with extended frame IDs of 1FFC0000-1FFCFFFF
Next, we analyze the second extended frame filter and find that the extended frame ID of 0003E000 can be received. At the same time, because bits 0-12 cannot be configured, they cannot be judged. Therefore, the second filter can receive extended frame IDs of 0003E000-0003FFFF.
The above is a detailed explanation of the dual filter.