cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446ZCT6 CAN Bus goes to Bus-Off state

Akhila_17
Associate II

Hi everyone,

I am facing an issue with CAN communication on STM32F446ZCT6, where the CAN controller frequently enters the Bus-Off state.

Hardware Details

  • MCU: STM32F446ZCT6

  • CAN Transceiver: (TJA1042T)

I am working with CAN communication on STM32F446ZCT6, and the CAN controller is frequently going into the Bus-Off state. I am using the HSI clock, configured from 8 MHz to 42 MHz, with the CAN clock derived from APB1 = 42 MHz I have enabled Auto Bus-Off Management and tested multiple bitrates (500 kbps, 250 kbps, and 125 kbps), but the issue still occurs. I see bit errors and acknowledgment errors, which eventually cause Bus-Off.
Can you please help me to solve this issue.

2 REPLIES 2
mƎALLEm
ST Employee

Hello,

1- HSI clock is not recommended for the CAN communication. Please use a crystal.

2- Are there other nodes which are connected to the CAN bus? if there is no other CAN nodes connected to the bus that's normal. You need at least one node to acknowledge the sent frames.

3- What is the level voltage on STB pin of the CAN transceiver? STB pin should be set to LOW for normal mode. According to the datasheet:

mALLEm_0-1769417468018.png

Please read also the knowledge base articles:

Using CAN (bxCAN) in Normal mode with STM32 microcontrollers (Part 1)

Using CAN (bxCAN) in Normal mode with STM32 microcontrollers (Part 2)

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Ozone
Principal III

As mentioned, using HSI and the resulting clock deviations are most likely the cause.
> I see bit errors and acknowledgment errors, which eventually cause Bus-Off.

If I remember correctly, each failed (non-acknowledged) Tx attempt increases the TEC by 8. 
However, if you left the error-passive limit unchanged (128), the bus-off state can only be caused by additional Rx errors.

A bad wiring or improper bus termination could play a role as well.
But using HSI is not a good idea, I think you need to focus on that first.