Skip to main content
Visitor II
July 25, 2025
Question

Behaviour of conflicting CAN filters

  • July 25, 2025
  • 1 reply
  • 243 views

There are two situations where I'm unclear on how CAN filters would behave.

 

1. Direct Conflict

One filter says reject 0x0 to 0x123

One filter says send 0x0 to 0x123 to FIFO0

 

2. Different behaviour for a subset of messages

One filter says send 0x0 to 0x123 to FIFO0

One filter says send 0x0 to 0x012 to FIFO1

 

Is there a filter priority, or is this undefined behaviour? I assume this depends on the CAN controller, so in my case I'm using the STM32G474, but I'm curious if most controllers have similar behaviour here.

    This topic has been closed for replies.

    1 reply

    Graduate II
    July 25, 2025

    @kunafa_eater123 wrote:

    There are two situations where I'm unclear on how CAN filters would behave.

     

    1. Direct Conflict

    One filter says reject 0x0 to 0x123

    One filter says send 0x0 to 0x123 to FIFO0

     

    2. Different behaviour for a subset of messages

    One filter says send 0x0 to 0x123 to FIFO0

    One filter says send 0x0 to 0x012 to FIFO1

     

    Is there a filter priority, or is this undefined behaviour? I assume this depends on the CAN controller, so in my case I'm using the STM32G474, but I'm curious if most controllers have similar behaviour here.


    So where does it show "filter says"?

    Visitor II
    July 25, 2025

    I'm not sure what you mean? In my case I'm using the HAL: `HAL_CAN_ConfigFilter`

    Graduate II
    July 25, 2025

    I'm quoting what you've wrote. So what documentation or whatever did you get "One filter says..."?