Controller area network (bxCAN)
RM0090
1080/1731
DocID018909 Rev 11
Figure 342. Filter bank scale configuration - register organization
Filter match index
Once a message has been received in the FIFO it is available to the application. Typically,
application data is copied into SRAM locations. To copy the data to the right location the
application has to identify the data by means of the identifier. To avoid this, and to ease the
access to the SRAM locations, the CAN controller provides a Filter Match Index.
This index is stored in the mailbox together with the message according to the filter priority
rules. Thus each received message has its associated filter match index.
The Filter Match index can be used in two ways:
•
Compare the Filter Match index with a list of expected values.
•
Use the Filter Match Index as an index on an array to access the data destination
location.
For nonmasked filters, the software no longer has to compare the identifier.
If the filter is masked the software reduces the comparison to the masked bits only.
The index value of the filter number does not take into account the activation state of the
filter banks. In addition, two independent numbering schemes are used, one for each FIFO.
Refer to
for an example.
One
3
2-Bit Filter - Identifier Ma
s
k
Two 16-Bit Filter
s
- Identifier Ma
s
k
CAN_FxR1[31:24]
CAN_FxR2[31:24]
CAN_FxR1[15:8]
CAN_FxR1[31:24]
CAN_FxR1[7:0]
CAN_FxR1[23:16]
x = filter
b
ank num
b
er
F
S
Cx
= 1
F
S
Cx
=
0
1
These
b
its are located in the CAN_FS1R register
F
ilter Ba
nk
S
cale
ID
Mask
ID
Mask
STID[10:3]
STID[2:0]
EXID[12:5]
Mapping
STID[10:3]
ID
Mask
Mapping
RTR
Two
3
2-Bit Filter
s
- Identifier Li
s
t
ID
ID
STID[10:3]
STID[2:0]
EXID[12:5]
Mapping
Four 16-Bit Filter
s
- Identifier Li
s
t
ID
ID
STID[10:3]
ID
ID
Mapping
n
n+1
n+2
n+
3
n+1
F
ilter Ban
k
Mod
e
2
n
n
n+1
EXID[4:0]
IDE
EXID[17:13]
EXID[17:13]
STID[2:0] RTR IDE EXID[17:15]
FB
Mx
= 0
FB
Mx
= 1
Filter
2
These
b
its are located in the CAN_FM1R register
n
Num.
FB
Mx
= 0
FB
Mx
= 1
Con
fi
g
. Bit
s
1
STID[2:0] RTR IDE EXID[17:15]
0
RTR
EXID[4:0]
IDE
0
CAN_FxR1[23:16]
CAN_FxR1[15:8]
CAN_FxR1[7:0]
CAN_FxR2[7:0]
CAN_FxR2[15:8]
CAN_FxR2[23:16]
CAN_FxR1[31:24]
CAN_FxR2[31:24]
CAN_FxR1[23:16]
CAN_FxR1[15:8]
CAN_FxR1[7:0]
CAN_FxR2[7:0]
CAN_FxR2[15:8]
CAN_FxR2[23:16]
CAN_FxR2[15:8]
CAN_FxR2[31:24]
CAN_FxR2[7:0]
CAN_FxR2[23:16]
CAN_FxR1[15:8]
CAN_FxR1[31:24]
CAN_FxR1[7:0]
CAN_FxR1[23:16]
CAN_FxR2[15:8]
CAN_FxR2[31:24]
CAN_FxR2[7:0]
CAN_FxR2[23:16]
ID=Identifier