Controller area network (bxCAN)
Filter priority rules
Depending on the filter combination it may occur that an identifier passes successfully
through several filters. In this case the filter match value stored in the receive mailbox is
chosen according to the following priority rules:
•
A 32-bit filter takes priority over a 16-bit filter.
•
For filters of equal scale, priority is given to the
Mask mode
•
For filters of equal scale and mode, priority is given by the filter number (the lower the
number, the higher the priority).
Filter bank
Num
The example above shows the filtering principle of the bxCAN. On reception of a message,
the identifier is compared first with the filters configured in identifier list mode. If there is a
match, the message is stored in the associated FIFO and the index of the matching filter is
stored in the Filter Match Index. As shown in the example, the identifier matches with
Identifier #2 thus the message content and FMI 2 is stored in the FIFO.
If there is no match, the incoming identifier is then compared with the filters configured in
mask mode.
If the identifier does not match any of the identifiers configured in the filters, the message is
discarded by hardware without disturbing the software.
806/1381
Figure 307. Filtering mechanism - Example
Three filter banks in 32-bit Unidentified List mode,
the remaining in 32-bit Identifier Mask mode
Identifier
Identifier
0
0
Identifier
1
Identifier
4
2
3
Identifier
5
Identifier
1
2
Mask
Identifier
3
4
Mask
No Match
Found
Message Discarded
Identifier
Message Received
Data
Ctrl
Identifier #4 Match
RM0033 Rev 9
List mode over the
Receive FIFO
Message
Stored
Filter number stored in the
FMI
Filter Match Index field
within the CAN_RDTxR
register
RM0033
Identifier
Need help?
Do you have a question about the STM32F207 Series and is the answer not in the manual?