Skip to main content
Visitor II
July 26, 2023
Question

STM32G0B1CET6 FDCAN normal mode is not working

  • July 26, 2023
  • 1 reply
  • 593 views

Normal mode of FDCAN is not working. Attached project file here. Please suggest if any changes are required in the attached files.

This topic has been closed for replies.

1 reply

mƎALLEm
ST Technical Moderator
September 22, 2026

Hello,

1- That depends on what do you mean by is not working: on transmit? on receive? interrupt is not working?? etc ... You should at least connect another node on the CAN bus to let the frames you send to be acknowledged by this node. You need also to ensure you have the same baudrate and all your hardware is OK including the CAN transceivers.

2- You are using HSI for the can communication which is not recommended for CAN communication. You need to use an external accurate clock such as a crystal or crystal oscillator.

Otherwise I don’t see an issue in your code except the HSI source. While this call is not necessary in the interrupt callback:

    if (HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_RX_FIFO0_NEW_MESSAGE, 0) != HAL_OK)
{
/* Notification Error */
Error_Handler();
}

So most probably the issue is in your hardware.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.