Skip to main content
ESchn.1
Associate
May 19, 2023
Solved

FDCAN2 doesn't seem to work with STM32G474e-EVAL board

  • May 19, 2023
  • 11 replies
  • 3392 views

I'm having problems getting my software to work with FDCAN2 on the STM32G474e-EVAL board. It works with FDCAN1, but w/ FDCAN2, messages accumulate in the Tx buffer until I get buffer fill errors.

I built the FDCAN_Com_IT example from the latest STM32GCube firmware bundle and it fails in the exact same manner. Board is terminated correctly and I believe the CAN pins are wired to each other correctly. What could be going wrong here? Thanks.

-es

This topic has been closed for replies.
Best answer by ESchn.1

Ok, finally tracked this problem down. It would appear that some revisions of the STM32G474E-EVAL board default to having the FDCAN2 TX pin disconnected. If you solder the SB5 location on the board closed, the pin will be connected and FDCAN2 will work.

11 replies

mƎALLEm
ST Technical Moderator
May 19, 2023

Hello,

Did you already test the example provided in STM32CubeG4 provided under the path Projects\STM32G474E-EVAL\Examples\FDCAN\FDCAN_Com_IT ? It uses FDCAN1 and FDCAN2. This is to ensure at least the HW part is OK...

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
ESchn.1
ESchn.1Author
Associate
May 19, 2023

Yes. The FDCAN_Com_IT application failed in the same manner (no transmission, buffer fill errors) when tested on two different STM32G474e-EVAL boards, so I'm reasonably sure it's not hardware or I've been profoundly unlucky.

-es

mƎALLEm
ST Technical Moderator
May 19, 2023

That's strange! I will try to run this example when I have this board on hands and get back to you for any feedback.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
ST Technical Moderator
May 23, 2023

Hi @ESchn.1​ ,

I tested FDCAN_Com_IT example and I didn't find any issue.

Please make sure that :

  • Jumper JP1 => fitted
  • Jumper JP2 => fitted
  • Jumper JP4 => fitted
  • Connect the 2 points CN12 CAN connector (CAN-H and CAN-L) of FDCAN1 instance, to the 2 points CN10 CAN connectors (resp. CAN-H and CAN-L) of FDCAN2 instance.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
ESchn.1
ESchn.1Author
Associate
May 23, 2023

Hi Kaouthar,

Thank you for checking on this. I've definitely fitted jumpers JP1, JP2, and JP4 and correctly bridged FDCAN1 and FDCAN2, but I'm still seeing the same failure. What hash did you build the FDCAN_Com_IT example from?

-es

KDJEM.1
ST Technical Moderator
May 23, 2023

Hello @ESchn.1​ ,

I built the FDCAN_Com_IT example from the last STM32CubeG4 1.5.1 package revision by using STM32CubeIDE 1.12.1 toolchain.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
ESchn.1
ESchn.1AuthorBest answer
Associate
July 3, 2023

Ok, finally tracked this problem down. It would appear that some revisions of the STM32G474E-EVAL board default to having the FDCAN2 TX pin disconnected. If you solder the SB5 location on the board closed, the pin will be connected and FDCAN2 will work.

KDJEM.1
ST Technical Moderator
July 4, 2023

Hello @ESchn.1 ,

Glad to know that the issue is already fixed.

Thank you for your sharing the solution :).

Yes, you are right the FDCAN2 TX is initially disconnected in G474EMC-B04 Board revision, SB5 is open by default, contrary to G474E-B04 Board revision 

 Thank you for your contribution in STCommunity. 

 Kaouthar

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