cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN communication issue with STM32H743ZI Nucleo board

DJ_IND
Associate III

Hi,

I am using STM32H743 nucleo board on one of my design. On my board I have installed nucleo board on board to board connector. For FDCAN interface we are using TCAN3414 transceiver IC. Our bit rate is 1MHz and data rate 2MHz for FDCAN communication on board. We are interfacing the FDCAN with DigiSoM board having transceiver TMC2517. After some packet transmission i observed that communication link is down. CAN bus is not working. On resetting the controller communication starts again for sometime and again stops. I tried replacing the STM32H753 board with STM32H743 and i have not observed any communication issue on that particular system. On other system I am already having STM32H753 but still I am facing the same issue. I am using normal wires for GND CANH and CANL connections of length 15cm max. I tried reducing the baud rate till 250kbps but same issue. I have checked the signal quality on oscilloscope which looks fine with ringing effects. We are using MATLAB modelling for all this testing. Below is the cubeMX setting we are using for FDCAN1/2. Can you please help me what may be the issue here. Because on some nucleo boards with STM32H753ZI i have not seen any issue.

DJ_IND_0-1751294920099.png

DJ_IND_1-1751294965389.png

 

 

10 REPLIES 10
mƎALLEm
ST Employee

Hello,

1- What is the clock source you set for the FDCAN interface? HSI or HSE? You need to use HSE+ an accurate clock source like a crystal / with or without PLL for FDCAN.

2- Did you activate the Tx delay compensation? See this thread.

3- Please also refer to this article: STM32 FDCAN running at 8 Mb/s on NUCLEO boards and the related github link.

PS: 


@DJ_IND wrote:

Our bit rate is 1MHz and data rate 2MHz for FDCAN communication on board. We are interfacing the FDCAN with

For bitrates we talk about bit/s not Hz.

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

Hi,

 

I have changed the clock frequency of MCO_CLK to 5MHz using external crystal for STLink IC and it started working (FDCAN bus is intact) . But when I introduce the additional node on the CAN bus I have seen some drops in the packets. Below is the setting for clock and I/O parameters I did for FDCAN. There is one more issue I observed. I tried reverting the clock to 8MHz using STlink firmware upgrade tool. Now in MATLAB it is showing no STM32 MCU detected. I changed the setting back to 5MHz and it started working. Is it reversible once we change freq to 5MHz using external crystal? If yes, then why I am unable to detect MCU with internal clock HSI of 8MHz??

Please comment

 

DJ_IND_0-1751872891002.png

DJ_IND_1-1751872897696.png

DJ_IND_2-1751872909861.png

DJ_IND_3-1751872914334.png

 

 

 

Ozone
Principal

> After some packet transmission i observed that communication link is down. CAN bus is not working. On resetting the controller communication starts again for sometime and again stops.

Instrument your code, and/ or try debugging.
I suspect your communication is not working at all.
Each failed transmission attempt increases the internal error counter, and the CAN peripheral goes into "error passive" and then "bus-off".

Check the CAN specification, this is standard behavior.

Perhpas your timing settings are not correct, or you omitted the termination resistor.
Proper termination get more critical with increasing baudrates.

When you say:


@DJ_IND wrote:

But when I introduce the additional node on the CAN bus I have seen some drops in the packets.


1- Which node? another STM32H743 nucleo board? what are the nodes available on the CAN bus before adding that node? you need to provide all these questions to put us in the picture.

2- Hot plug? 

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

Hi,

 

Initially it was one Nucleo-144 board (say board A) communication with external DigiSOM imx8mN evm board. Here with external 5MHz MCO clock change no drops in the package observed. Then I introduced one more receiver on the CAN bus which is one more nucleo-144 board say board B. So board A is sending 5 different Id's out of which 2 id's are for board B and 3 are for digiSoM board. Whenever i connect board B on the bus i have seen some drops in the bus. I have observed the drops. it cross 1K but still bus communication is intact. There are only two terminations on the bus now one towards Board A and other towards digiSOM. so extrem ends. I am not sure why i am getting drops in packets when I am connecting board B on bus.

 

Apart from that one more query is, I tried reverting the changes for MCO clock to HSI/2 (8MHz) but here I am not able to connect to STM32 board it is saying no stm32 board detected. Is it known issue? 

 

 

 

Hello,

You didn't answer this question: how you did connect the node B to the bus? hot plug? 

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.

HI,

 

It is not hot plug. I have switch off the complete system prior connecting board B node. On power on board A will start transmitting the data. We are doing monitor and tune on board B so it will take sometime for Board B to initialize. By that time digiSoM already started receiving the date. what is your concern regarding hot plug can you please mention?

No hot plug in CAN. You need to establish the CAN bus before powering the nodes on.

Could you please take a picture of your system including the Three nodes connected together?

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.

I highly suggest to read and diggest the CAN specification.

> On power on board A will start transmitting the data. We are doing monitor and tune on board B so it will take sometime for Board B to initialize.

Non-acknowledged transmissions increase the error count, and eventually lead to a (temporary) bus shutdown.

You MUST ensure all nodes are online when starting to transmit.
Or trying to recover after a reasonable wait period.