GD32VF103 User Manual
435
Filter number
Each filter within a filter bank is numbered from 0 to a maximum dependent on the mode and
the scale of each of the filter banks.
For example, there are two filter banks. Bank 0 is configured as 32-bit mask mode. Bank 1 is
configured as 32-bit list mode. The filter number is shown in
Table 20-1. 32-bit filter number
Table 20-1. 32-bit filter number
Filter
Bank
Filter Data Register
Filter
Number
0
F0DATA0-32bit-ID
0
F0DATA1-32bit-Mask
1
F1DATA0-32bit-ID
1
F1DATA1-32bit-ID
2
Associated FIFO
28 banks can be associated with FIFO0 or FIFO1. If the bank is associated with FIFO0, the
frames passed through the bank will fill the FIFO0.
Active
The filter bank needs to be configured activation if the application wants the bank working
and while filters not used by the application should be left deactivated.
Filtering index
Each filter number corresponds to a filtering rule. When the frame from the CAN bus passes
the filters, a filter number must associate with the frame. The filter number is called filtering
index. It stores in the FI bits in CAN_RFIFOMPx when the frame is read by the application.
Each FIFO numbers the filters within the banks associated with the FIFO itself whether the
bank is active or not.
The example about filtering index is shown in
Table 20-2. Filtering index
Filter
Bank
FIFO0
Active
Filter
Nunber
Filter
Bank
FIFO1
Active
Filter
Nunber
0
F0DATA0-32bit-ID
Yes
0
2
F2DATA0[15:0]-16bit-ID
Yes
0
F0DATA1-32bit-Mask
F2DATA0[31:16]-16bit-Mask
1
F1DATA0-32bit-ID
Yes
1
F2DATA1[15:0]-16bit-ID
1
F1DATA1-32bit-ID
2
F2DATA1[31:16]-16bit-Mask
3
F3DATA0[15:0]-16bit-ID
No
3
4
F4DATA0-32bit-ID
No
2
F3DATA0[31:16]-16bit-
Mask
F4DATA1-32bit-Mask