cancel
Showing results for 
Search instead for 
Did you mean: 

fdcan communication between nucleo and discovery kit

revvathi
Associate III

the objective of this particular project was to transmit data frames from stm32h750dbk(discovery kit) to stm32g491re(nucleo)
it is debugging and creating live expression for both of the data types in receiving and transmit end of board i have not connected any transceiver between them because it has inbuilt fdcan ports 
i am attaching both the codes for g4 and h7 
the picture of hardware and the live expression result when debugged separately 

temp1.pngtemp2.pngWhatsApp Image 2025-02-11 at 7.56.11 PM.jpeg

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

Hello,

1- You have two issues in the RCC config with H750 Disco board:

 mALLEm_0-1741266772356.png

1-1. You need to use HSE with the external crystal oscilator (25MHz) instead of HSI for CAN communication.

1-2. With a crystal oscillator you need to set Bypass configuration in the RCC.

In final you need this config:

mALLEm_1-1741266772359.png

2- Another issue in the GPIO config on H7:

You set PB9 as CAN_Tx:

mALLEm_2-1741266772362.png

 

while in the schematics, FDCAN1_Tx should be PH13:

mALLEm_3-1741266772366.png

 

That's why every time I ask to check the hardware.

I've modified some parameters in your ioc files and in your projects. I've attached a zip file containing both projects.

As you can see G4 is receiving the CAN messages in live:

mALLEm_4-1741267393148.png

Migrate to CubeIDE V1.18.0/CubeMx 6.14.0.

If you didn't succeed with the modified projects, I'm pretty sure it's an issue in your HW. Therefore I will close the thread after a period of time.

Hope that 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

28 REPLIES 28
mƎALLEm
ST Employee

Hello,

Thank your for sharing the image because it raises a big issue.

You are using CAN in a bad hardware configuration.

From the disco board there is a CAN-FD transceiver (CAN_H/CAN_L) that you connected directly to FDCAN_Tx and FDCAN_Rx in the NUCLEO board!

You need to add a transceiver to the NUCLEO board to establish a CAN bus between two CAN nodes like the following:

SofLit_0-1729078448084.png

You can also refer to this article and the related Github hotspot.

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.

WhatsApp Image 2025-02-11 at 8.27.43 PM.jpeg

IS the connection right now 

mƎALLEm
ST Employee

1- What is the issue?

2- Could you please share the schematics of the transceiver's shield?

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.
revvathi
Associate III

1)transmit data gets initialised to send but at the receiving  side no data is envoked 
2)i didnt get u what do u mean by shield :(

1- Do you mean the data are transmitted were not received? By whom? which is transmitting and which is receiving?

2- The CAN module:

SofLit_0-1739286591863.png

 

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.

1)H7 is transmitting and G4 is receiving 
2)can transciever module used is NXP TJA1050 WhatsApp Image 2025-02-11 at 8.43.01 PM.jpegWhatsApp Image 2025-02-11 at 8.42.58 PM.jpeg

2- Need the schematics of that module not a photo.

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.

Sorry I didn't notice this issue:


@revvathi wrote:

WhatsApp Image 2025-02-11 at 8.27.43 PM.jpeg

IS the connection right now 


You don't need a transceiver for the DISCO board side. It has already a transceiver on board:

SofLit_0-1739287732812.png

Also, refer to the figure I previously shared.

If you are not familiar with CAN bus need to have more information about it.

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.