Skip to main content
kunafa_eater123
Associate
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.

1 reply

Karl Yamashita
Principal
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"?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
kunafa_eater123
Associate
July 25, 2025

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

Karl Yamashita
Principal
July 25, 2025

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

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source