Skip to main content
Visitor II
March 29, 2021
Question

FDCAN filters not working on STM32mp157

  • March 29, 2021
  • 2 replies
  • 2248 views

HI,

I'm not able to get the FDCAN filter working on a STM32MP157C-DT2. I'm able to receive valid ID' with no problem, however, invalid ID's are getting through.

Would someone be kind enough to take a quick look at my setup to make sure I did not miss anything. Please see attached code.

Thank you!

    This topic has been closed for replies.

    2 replies

    ST Employee
    May 19, 2022

    Hello,

    when you say "are getting through" do you mean that invalid ID's are not filtered ?

    I see in your code :

    if (HAL_FDCAN_ConfigGlobalFilter(&hfdcan1, FDCAN_REJECT, FDCAN_ACCEPT_IN_RX_FIFO0, FDCAN_REJECT_REMOTE, FDCAN_FILTER_REMOTE))

    so FDCAN_ACCEPT_IN_RX_FIFO0 means that the invalid ID should be stored in FIFO0

    is this what is happening ?

    JM

    ST Employee
    May 19, 2022

    Just noticed the following:

    you have set: hfdcan1.Init.ExtFiltersNbr = 0;

    I think it should be set to 1..

    JM