I am using STM32G0B1CBT3 controller and would like to send and receive data in classic mode. I have configured all necessary parameters using cubemx but the buffer is getting full when I call this function HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan1, &TxHeader, TxData).
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
Your sample point needs to be between 75% and 85%. So please decrease the prescaler as much as possible and increase BS1 and BS2 in such way: BS1 ~= (75% to 85%)x(BS1+BS2).
Thank You for your reply. Now buffer overflow error is solve by making changes in transceiver but still I am experiencing CAN frame receive and transmit issue.
Not able to transmit and receive CAN frames using CANFD classic mode on STM32G0B1CBT3
Following are the answers for your questions
1- What board are you using? custom or ST board example: NUCLEO-G0B1?
Ans : I am using custom Board with STM32G0B1CBT3
2- Are you using a CAN transceiver?
Ans : Yes, TCAN1044AVDRQ1e
3- Did you connect another CAN node on the bus?
Ans : At another end I have connected PCAN USB adapter and checking CAN messages on Busmaster/PCAN View
4- This CAN timing is not optimized for good operation:
Ans : Tried to optimize the prescaler but no success.
If it works then it's hardware issue. If it doesn't work, then something in your code.
If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source