Skip to main content
Visitor
October 13, 2026
Question

STM32C542RCT6 CANFD is not working with internal clock

Hi,

I am working on CAN FD communication using the STM32C542RCT6. CAN FD is working properly when I use an external clock source. However, when I switch to the internal clock, the controller starts reporting errors such as Error Passive, followed by Bus-Off.

My suspicion is that the internal clock may have a slight frequency deviation, which could be affecting CAN FD communication. Since this is a new controller, I would like to understand whether the internal clock can reliably support CAN FD communication or whether an external clock is required.

My current CAN FD configuration is:

  • Arbitration bit rate: 500 kbps

  • Data bit rate: 2 Mbps

  • Bit Rate Switching (BRS): Enabled

Could you please clarify whether the internal clock can support this configuration and what could cause the controller to enter Error Passive and Bus-Off states when using it?

2 replies

Andrew Neil
Super User
October 13, 2026

when I switch to the internal clock, the controller starts reporting errors

That is to be expected:

 

My suspicion is that the internal clock may have a slight frequency deviation

So look at the datasheet - the accuracy will be specified there.

Then you can check if it meets CAN’s accuracy requirements ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
LCE
Principal III
October 13, 2026

The internal clock / HSI is only usable for basic operation and some “slow” or clocked interfaces.

For CAN, audio, ethernet and some other peripherals: never ever use HSI.