2024-12-12 10:00 AM - edited 2024-12-12 10:00 AM
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
2024-12-12 10:20 AM
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;
2024-12-12 10:23 AM
2024-12-12 11:48 AM - edited 2024-12-12 11:54 AM
Hello,
Could you please share your ioc file?
Chenge FrameFormat to FDCAN_FRAME_CLASSIC;
Could you also please states on Y1? could you please share its datasheet?
2024-12-12 12:28 PM
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