2025-05-10 1:52 PM
I am using a custom PCB with stm32g474 and I am trying to get the CAN peripheral working. I believe I have everything set up correctly (bit rate, RAM etc) but when I call HAL_FDCAN_AddMessageToTxFifoQ(), FIFO is full error is raised after 3 iterations.
Any help is appreciated.
2025-05-11 2:57 AM
Can You confirm that You have a working CAN-bus (2x120R Termination, and at least 1 other node that is working, for example a CANBus dongle)?
Why do You use a isolated CANBus driver when You use the same ground (and 5V) on both side of the isolation?
2025-05-12 1:16 AM
Hello @ChaitanyaParate
Could you describe your setup with more details please, your FDCAN peripheral is communicating with which device?
Did you check to compare your configuration and setup with the example below:
2025-05-12 1:37 AM
Hello,
Same question as @MHoll.2
+ Could you please explain this hardware?:
Why are you using a 1.5k on CAN_H and CAN_L lines? and how are you connecting these two lines externally?
Also explain the diference between the two attached software: FDCAN_receive.zip and FDCAN_F.zip.
2025-05-12 1:42 AM
I will conform the working CAN-bus.
Can you please give the correct circuit for ADM3050EBRIZ transceiver. Or any other IC I can use instead.
2025-05-12 1:57 AM - edited 2025-05-12 2:01 AM
ADM3050EBRIZ looks good even excellent as it has the isolation capability between both sides digital and the bus.
So question still: what did you connect to the CAN bus apart that node (STM32G474+ADM3050)? and why is there a 1.5k ohm connected on the CAN_H and CAN_L on the tranceiver pins? it should be 120 ohm.
Also only two 120ohm are termination the bus.
Refer to this article: STM32 FDCAN running at 8 Mb/s on NUCLEO boards
2025-05-12 4:30 AM
2025-05-12 4:38 AM - edited 2025-05-12 4:40 AM
And what are the two schematics you've attached? the two CAN nodes that are connected on the bus?
What is the relation of the firmware you've attached from the beginning to these boards? one project for each board? If yes, you need to tell which project corresponds to which board.
Please be accurate in the information you provide to avoid unnecessary ping pongs.
2025-05-12 5:00 AM
These 2 schematics are the PCBs I am communicating between.
FDCAN_receive.zip -----------> Braking VCU 2024-2025
FDCAN_F.zip (transmit) -------------> LVCU 2024-2025
2025-05-12 6:02 AM
OK now the picture is clear. I don't see an issue in your CAN configuration.
Meanwhile:
1- It's recommended to use HSE with an external crystal instead of using HSI. But in your project you are selectiong HSI as clock source for PLL for both projects:
2- From your schematics you still using a 10K resistor in series with the crystal while I said in your previous post here this is a big value for a series resistor. You need to calculate it or simply shunt it.
So please use the external resistor with a very low resistor value.
3- I also recommend to check the CAN_H and CAN_L connections. Connect the cable between the boards and use a continuity tester and check the connection of CAN_H/CAN_L on the transceivers' pins. Not on the cable or the connector but on the transceivers' pins.