Skip to main content
TES.1
Associate
April 3, 2023
Question

CAN bus not responding at 1Mbps bit rate

  • April 3, 2023
  • 12 replies
  • 4858 views

I'm using STM32F446RC controller CAN BUS 1. Trying to operate CAN BUS at 1mbps speed when using 100kbps bit rate it is working fine but not at 1Mbps bit rate. Is there any solution for this.

This topic has been closed for replies.

12 replies

mƎALLEm
ST Technical Moderator
April 3, 2023

Hi,

The cell can support up to 1Mbps communication.

So please check your bitrate according to the parameters in your application: Clocks, prescalers, BS1, BS2 ..

Could you please provide more details about your HW: provide schematic + bus length

Did you try 1Mbps in loopback mode?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TES.1
TES.1Author
Associate
April 4, 2023

Hello @Community member​ ,

I tried it in loopback mode also but it does not works. I am using main clock 180 MHz with other settings given below. I am attaching schematic and parametre details as bleow.0693W00000bhSeNQAU.png0693W00000bhSbdQAE.jpg

TES.1
TES.1Author
Associate
April 4, 2023

Given below are the details for CAN at 1 Mbps baud rate with Clock at 180MHz.0693W00000bhSfaQAE.jpg

mƎALLEm
ST Technical Moderator
April 4, 2023

Hi,

The value 1 is very small for BS1 and BS2. You should select a prescaler value as less as possible and BS1 and BS2 values as greater as possible with BS1 > BS2 where BS1 is around 80% of the sum (BS1+BS2).

So please try these values with a simple point at ~75%:

0693W00000bhTbyQAE.png

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TES.1
TES.1Author
Associate
April 4, 2023

Hello, @Community member​ 

I have tried these above mentioned parameters but still it does not work. It is working well at lower baud rates like 100kbps and 200kbps but not at 1mbps.

mƎALLEm
ST Technical Moderator
April 4, 2023

Are you using an external crystal (HSE) or using HSI?

And even with above new parameters loopback mode is not working?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TES.1
TES.1Author
Associate
April 5, 2023

Hi @Community member​ 

No, new parameters are not even working in loopback mode. I am using HSE Clock but even tried it with HSI but nothing works.

I have checked that if I use 60 MHz clock for 100kbps baud rate below parameters (attaching below) with HSE clock and HSI it works good in Normal and Loopback mode but if I use same clock 60MHz (tried with HSE and HSI both) for 1Mbps with parameters below given (attaching them also) even this does not work.0693W00000bhYEpQAM.jpg0693W00000bhYEkQAM.jpg

mƎALLEm
ST Technical Moderator
April 5, 2023

Hi,

Could you please send you system clock configuration?

Could you also tell which board you are using?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TES.1
TES.1Author
Associate
April 5, 2023

@Community member​ 

I am using custom pcb which has STM32F446RCTx controller.

0693W00000bhZ7LQAU.jpg

mƎALLEm
ST Technical Moderator
April 5, 2023

Hi,

Thank you for the sharing.

I did a test with almost your clock config (except the crystal at 25MHz) with STM32446E-EVAL board and with the same example of CAN loopback provided by STM32CubeF4 under Projects\STM32446E_EVAL\Examples\CAN\CAN_Loopback\ and didn't have any problem.

0693W00000bha4rQAA.pngI tried also your latest parameters and also no issue with this.

So I suspect an issue with your MCU. Is it a genuine MCU? Could you please share a clear photo of your MCU?

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