cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN no ACK

Adam_Stastny
Associate III

Hi,

I am trying to use a STM32G491KEU6 with FDCAN, but the communication is failing at line:

if (HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan1, &TxHeader, TxData!= HAL_OK) { ...

I found out that this is a problem that receiver is not sending a ACK bit - cannot it be a software issue? I am using two STM32G491KEU6 with the same code mentioned bellow, while I am also using a TCAN3403DRBRQ1 transceiver on both boards.
The boards seems ok, I can even see a transmittion on the line with oscilloscope, but there is probably no ACK.

Thank you for any help

1 ACCEPTED SOLUTION

Accepted Solutions

Ahh, I found the issue... CAN LOW differential had short circuit to GND - bad soldering. Thank you for your time.

View solution in original post

9 REPLIES 9
SofLit
ST Employee

Hello,

For CAN/FDCAN subject especially when using Normal mode you need to provide more details especially the HW part. So please share schematics.

Also, I recommend to use HSE with an external crystal instead of HSI.

As per your code:

RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;

 

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.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.

I am sending a schematic. In my PCB, there is also a GND on pin 8 STB (by datasheet, this should allow normal mode instead of standby mode).

 

Thx for that recommendation.

Hello,

Could you please share your ioc file?

Chenge FrameFormat to FDCAN_FRAME_CLASSIC;

Could you also please state on Y1? could you please share its datasheet?

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.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.

Yeah, no prob.
Y1 should not be the issue - I am using a classic CAN with the same Y1 and STM32F446RET6 and it works as it should.

Datasheet: https://cz.mouser.com/datasheet/2/122/ecx_53b-3074848.pdf

Ok,

But contrary to what I suggested earlier, here you are still using HSI:

SofLit_0-1734079465979.png

And CAN mode :

SofLit_1-1734079541628.png

-> Try to switch to Classic mode.

And also, are you sure the two nodes have the same config especially the bitrate?

SofLit_0-1734079714354.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.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.

Yeah,
I am using the same code on both devices so there should be a problem.
Anyway, I fixed what you recommended, but still the issue remains.

Hi 

If You are using the TCAN3404-Q1 (from the schematics) You need to set the STB pin to low (internal pullup!)

If You are using the TCAN3403-Q1 (from the first post) then You have to put Pin 5 (Vio) to 3.3V

Martin

As I mentioned, I already did that on my PCBs with a wire - it did not help.

Ahh, I found the issue... CAN LOW differential had short circuit to GND - bad soldering. Thank you for your time.