Controller area network (bxCAN)
Figure 326. Filter bank scale configuration - register organization
One 32-Bit Filter - Identifier Mask
ID
Mask
Mapping STD ID
Mapping Ext ID
Two 32-Bit Filters - Identifier List
ID
ID
Mapping STD ID
Mapping Ext ID
Two 16-Bit Filters - Identifier Mask
ID
Mask
ID
Mask
Mapping
Four 16-Bit Filters - Identifier List
ID
ID
ID
ID
Mapping
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 non masked 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.
934/1163
CAN_FxR1[31:24]
CAN_FxR1[23:16]
CAN_FxR2[31:24]
CAN_FxR2[23:16]
STID[10:3]
STID[2:0]
EXID[20:13]
EXTID[28:21]
CAN_FxR1[31:24]
CAN_FxR1[23:16]
CAN_FxR2[31:24]
CAN_FxR2[23:16]
STID[10:3]
STID[2:0]
EXID[20:13]
EXTID[28:21]
CAN_FxR1[7:0]
CAN_FxR1[15:8]
CAN_FxR1[31:24]
CAN_FxR1[23:16]
CAN_FxR2[15:8]
CAN_FxR2[7:0]
CAN_FxR2[31:24]
CAN_FxR2[23:16]
STID[10:3]
STID[2:0]
CAN_FxR1[15:8]
CAN_FxR1[7:0]
CAN_FxR1[31:24]
CAN_FxR1[23:16]
CAN_FxR2[15:8]
CAN_FxR2[7:0]
CAN_FxR2[31:24]
CAN_FxR2[23:16]
STID[10:3]
STID[2:0]
CAN_FxR1[15:8]
CAN_FxR2[15:8]
EXID[12:5]
CAN_FxR1[15:8]
CAN_FxR2[15:8]
EXID[12:5]
RTR
IDE
EXID[17:15]
RTR
IDE
EXID[17:15]
x = filter bank number
ID=Identifier
1 These bits are located in the CAN_FS1R register
2
These bits are located in the CAN_FM1R register
RM0402 Rev 6
RM0402
Filter
Num.
CAN_FxR1[7:0]
n
CAN_FxR2[7:0]
EXID[4:0]
IDE RTR
0
n
CAN_FxR1[7:0]
CAN_FxR2[7:0]
n+1
EXID[4:0]
IDE RTR
0
n
n+1
n
n+1
n+2
n+3
MSv30398V4
Need help?
Do you have a question about the STM32F412 and is the answer not in the manual?