cancel
Showing results for 
Search instead for 
Did you mean: 

CAN bus communication issue between two NUCLEO-H533RE boards

BESNIEM
Associate II

Hello, I wrote a program to test the CAN bus.
In its current version, I am using standard CAN at 1 Mb with 8-byte frames.
I transmit 16 frames with a 5 ms delay between each transmission.
To identify the last frame in the block, I send a frame with a zero data length

I am facing several issues.

When I configure the CAN bus in INTERNAL_LOOPBACK mode, if I do not enable automatic retransmission, some frames that are reported as successfully transmitted are not received.

In NORMAL mode, no frame is flagged as an error on the transmitting Nucleo board, but some frames are never received on the receiving Nucleo, while others are received multiple times.

The last issue is that I can only communicate up to 4 Mb. At 8 Mb, transmission and reception errors are reported.

 

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

Hello @BESNIEM and welcome to the ST community,

I think better to simplify your code and reproduce the behavior.

You can also refer to the following knowledge base articles:

STM32 FDCAN running at 8 Mb/s on NUCLEO boards

How to use FDCAN to create a simple communication with a basic filter

FAQ: Fixing STM32 FDCAN communication disruptions - APB bus, kernel, and time quanta clocks

 

 

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

4 REPLIES 4
mƎALLEm
ST Employee

Hello @BESNIEM and welcome to the ST community,

I think better to simplify your code and reproduce the behavior.

You can also refer to the following knowledge base articles:

STM32 FDCAN running at 8 Mb/s on NUCLEO boards

How to use FDCAN to create a simple communication with a basic filter

FAQ: Fixing STM32 FDCAN communication disruptions - APB bus, kernel, and time quanta clocks

 

 

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.
BESNIEM
Associate II

thanks for your reply.

i will look at your links

BESNIEM
Associate II

Hello,

Thanks to the provided links, I was able to achieve 8 Mbps speeds by increasing the peripheral and CAN clocks and enabling txDelayCompensation.

I will look into the third link regarding my lost/repeated frame issues.

Regards

BESNIEM
Associate II

The links you posted helped me solve all my problems.

Thank you.

Attached is a working version of my original program.

Regards