2025-05-12 1:22 AM - last edited on 2025-05-12 1:40 AM by mƎALLEm
I am working on FDCAN communication using an STM32G0B1CCT6 microcontroller. I am trying to perform a simple Tx/Rx loopback test (and later communication with external tools like Vehicle Spy), but I am facing the following problem:
FDCAN is not transmitting or receiving any message.
I have configured the peripheral in Normal mode with the following settings:
Clock: 64 MHz
Bitrate: 1 Mbps
Prescaler: 16, TimeSeg1: 13, TimeSeg2: 2, SJW: 1
Frame Format: Classic CAN
Auto-Retransmission: Enabled
I also added a filter (Filter 0) to accept all standard IDs into RX FIFO 0, but still no data is received.
FDCAN init and message send/receive functions return HAL_OK, but no actual communication happens on the bus.
I’ve verified the transceiver wiring (ISO1044), and I'm testing using Vehicle Spy and ValueCAN4. I’ve also tried internal loopback, but still no response.
Solved! Go to Solution.
2025-05-13 2:47 AM - edited 2025-05-13 10:16 AM
Hello,
I used your project with a little modification, I can see the frame on Tx pin as well as on Rx.
I used two NUCLEO-G0B1RE boards connected with two transceivers. The same example uploaded to the two boards.
This is what I can see with a CAN analyzer: Blue: Tx, Purple: Rx.
I'm also seeing the message received, which are sent by the other board:
So, either there is something transmitted on Tx but there is an issue with your logic analyzer configuration or you have something on your hardware. So check all your connections, check the GPIO pins used etc..
PS in Normal mode we recommend to use an external crystal instead of using HSI or any internal RC source.
I've attached your project with the modification.
Hope that helps.
2025-05-13 10:31 PM
2025-05-13 10:42 PM
2025-05-16 9:02 PM
Hello,
Yes, my issue is now resolved. The problem was that I needed to keep both the Nominal (Arbitration) Bitrate and Data Bitrate the same in my CAN tool (ValueCAN 4 with Vehicle Spy 3). There was a bug in my setup — I initially had different bitrates configured in the tool, which caused the FDCAN on the STM32G0B1CCT6 not to transmit or receive.
Once I set both the Nominal Bitrate and Data Bitrate to 1 Mbps, communication started working correctly — both Tx and Rx are now functional.
Thank you for the support