Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
563
/
631
Identifier list mode
The filter ID is used to store the identifier format. At this time, there is no mask for comparison, and the mask bit can
be used to store one more filter ID. However, at this time, the identifier of the message needs to be exactly the same
as the filter ID format, otherwise it will fail to pass the filter.
Filter matching sequence number
After CAN core received an valid message it will matching the message ID with filters one by one until there is one
filter pass or all filters failed. If this message failed to pass any enabled filter then it will be discarded. Otherwise
when CAN core finds the first filter that the ID can pass, it pack filter index with the CAN message and stores inside
receive FIFO in SRAM according to filter setting (CAN_FFA1 decides store in which FIFO). User can find filter
index in FMI [7:0] bits of CAN_RMDTx register. This filter matching index can help to identify which types of
message it is in this receive FIFO.
The filter matching sequence number can be used two ways. The first one is comparing the filter matching sequence
number with a series of expected values. The another is using the filter matching sequence number as an index to
access the target address. When numbering filters, whether the filter group is active or not is not considered. In
addition, each FIFO numbers its associated filter. Please refer to the example below.
For the filter in mask mode, the software only needs to compare the mask bits that are needed (bits that must be
matched). For the filter in identifier list mode (non-screening filter), the software does not need to directly compare
with the identifier.
Table 25-1 Examples of filter numbers
Point to FIFOx
Filter group
Filter mode
FIFO0 filter number
FIFO
0
32 bit mask mode
0
2
16 bit mask mode
1/2
5
32 bit list mode
3/4
7
16 bit list mode
5/6/7/8
9
32 bit list mode
9/10
11
16 bit list mode
11/12/13/14
13
32 bit mask mode
15
Point to FIFOx
Filter group
Filter mode
FIFO1 filter number
FIFO1
1
32 bit list mode
0/1
3
16 bit list mode
2/3/4/5
4
32 bit mask mode
6
6
16 bit mask mode
7/8
8
32 bit mask mode
9
10
16 bit mask mode
10/11
12
32 bit list mode
12/13
Filter priority rule
According to different configurations of filters, it is possible that a message identifier can be filtered by multiple
filters; In this case, the filter matching serial number stored in the receiving mailbox is first determined according to
bit width,32-bit-wide filters have higher priority than 16-bit-wide filters. For filters with the same bit width, then the