Skip to main content
Shubh150
Associate II
March 8, 2024
Solved

Unable to establish FDCAN communication between two different NUCLEO boards.

  • March 8, 2024
  • 3 replies
  • 3218 views

I am trying to establsih communication between a NUCLEO G474RE and a NUCLEO H7A3ZI-Q thorugh FDCAN. I have successfully accomplished FDCAN communication for both the boards individually using Normal mode as these boards have multiple FDCAN peripherals. I am using two ADM3050E FDCAN transceivers for communication. Now, I have set the baud rate and clock speed of FDCAN same for both boards, yet I have been unsuccessful. So, I wanted to know what I am doing wrong. Please find atteched zip files containing my projects.

Best answer by mƎALLEm

Hello,

As promised, I setup two projects (in attachment) with NUCLEO-G474RE and NUCLEO-H7A3ZI-Q based on this example with some modifications (ex: using RNG to generate random data to send from both sides):

https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Examples/FDCAN/FDCAN_Classic_Frame_Networking

I'm using MCP2562FD transceiver.

Each time you push a key on a board, the data is received from the other one and vice versa. A LED toggles each time you receive a frame.

A photo of my setup:

Setup.jpg

Hope it helps you and other users.

3 replies

mƎALLEm
Technical Moderator
March 8, 2024

Hello,

Start by using HSE as system clock source instead of HSI for STM32G4.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Karl Yamashita
Principal
March 8, 2024

You have code commented out so no telling what you're doing right now between the two boards. Set the code as you'd expect the two boards to communicate correctly. Then we can further evaluate what is happening. 

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
Shubh150
Shubh150Author
Associate II
March 9, 2024

Thank you for your reply, Let me clear up on what I am trying to do. I am trying to transmit from G474 and receive on H7. These codes were initially configured to transmit and receive both, hence the commenting of code.

mƎALLEm
Technical Moderator
March 9, 2024

Did you change the clock source from HSI to HSE?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
mƎALLEm
mƎALLEmAnswer
Technical Moderator
March 14, 2024

Hello,

As promised, I setup two projects (in attachment) with NUCLEO-G474RE and NUCLEO-H7A3ZI-Q based on this example with some modifications (ex: using RNG to generate random data to send from both sides):

https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Examples/FDCAN/FDCAN_Classic_Frame_Networking

I'm using MCP2562FD transceiver.

Each time you push a key on a board, the data is received from the other one and vice versa. A LED toggles each time you receive a frame.

A photo of my setup:

Setup.jpg

Hope it helps you and other users.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Shubh150
Shubh150Author
Associate II
March 14, 2024

Thanks a bunch for this, I will apply this on my system and get back to you as soon as possible.