cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 FDCAN Interrupt does not trigger

SPate.8
Associate

The FDCAN (in my case fdcan2) for a custom board based on STM32G474RCT that I am working on does not seem to work as expected. The transmission of messages is working OK. I can receive the test message from the board over to the host PC CAN sniffer at 250K baud. I have tried to use the example project for the Classic CAN Networking using FDCAN.

So though transmission is working, reception requires an interrupt which never comes. I have traces from the oscilloscope that confirm the GPIO pin responsible for FDCAN2 Rx is receiving signal from the on board CAN Transceiver, but the controller does not respond reception with the interrupt call.

I have attached the bare minimum example as a STM32CubeIDE project to help find a solution in my situation.

Thanks for having a look.

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

As you are waiting to receive Standard ID (according to your filter config), you didn't set the standard filter number:

  hfdcan2.Init.StdFiltersNbr = 0;

You need to set it to a value different from 0. 

You have the same issue as this thread.

Hope it helps.

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
SofLit
ST Employee

Hello,

As you are waiting to receive Standard ID (according to your filter config), you didn't set the standard filter number:

  hfdcan2.Init.StdFiltersNbr = 0;

You need to set it to a value different from 0. 

You have the same issue as this thread.

Hope it helps.

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.