Skip to main content
martonmiklos
Associate III
September 1, 2026
Question

Ocassionally wrong CAN bit rate with STM32G0B1CBT3

  • September 1, 2026
  • 14 replies
  • 84 views

I am trying to use a STM32G0B1CBT3 for standard (non-FD CAN communication).

The device is running from a 8 MHz HSE oscillator.

This is the clock topology I am using:

 

As you see the CCS is disabled and the CAN clock and the system clock is running on 64 MHz.

In some cases my CAN frames are transmitted with a bitrate faster than expected:

The edges some times falling totally to the sampling points, the calculated bit times are lower than 4 us:
 


Putting the correct and incorrect frames the difference is more visible:

 

I have tried to route the HSE to the MCO to see how stable is it, but I have not detected any deviation which could cause this deviation.

I also tried to run an overnight test to send a CAN frame continuously and capture the waveform and calculate back the bit times are quite identical:

 

Any hints, ideas would be welcome!

14 replies

Ozone
Principal
September 1, 2026

While I don’t know the G0 MCU in detail, but I would recommend to configure / enable MCO, and measure this output the same way as the CAN signal.
 

martonmiklos
Associate III
September 1, 2026

This was my very first idea as I have written:

I have tried to route the HSE to the MCU to see how stable is it, but I have not detected any deviation which could cause this deviation.

 

 

mƎALLEm
ST Technical Moderator
September 1, 2026

Hello,

Try to capture the bit times in parallel (to the logic analyzer) with an oscilloscope. Do you notice the same bit time difference?

I may suspect an issue with the logic analyzer edge detection.

Is CAN is in Loopback or Normal mode? if in Normal mode, are there any error detected by the CAN nodes?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
waclawek.jan
Super User
September 1, 2026

Due to the resynchronization mechanism of CAN, if several parties start to transmit simultaneously, you can’t determine which of them is deviant and why, purely by observing the bus. You’d need to observe all participant’s Tx, simultaneously, too.

JW