cancel
Showing results for 
Search instead for 
Did you mean: 

clock configuration issues when I use CAN

Jad
Associate III

good morning. I want to implement a can loopback on my STM32H755, but when I enable FCAN1, then my clock can't resolve it issues and shows this for FDCAN in the picture below. how could I resolve this problem?

Jad_0-1726221753821.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Jad wrote:

Capture d’écran 2024-09-13 à 13.48.09.pngthan you very much for the quick response

those are the values I found. I do not know how to understand the values and adjustate the timer.


No these are the values for the power consumption.

You need to set the voltage scale according to the system frequency, from DS12919 Rev 2:

SofLit_1-1726228808037.png

Based on that voltage scale (VOS) level, you can know what is the maximum allowed kernel clock frequency you can set for FDCAN:

SofLit_0-1726223170325.png

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.

View solution in original post

9 REPLIES 9
SofLit
ST Employee

Hello,

You need to check the reference manual and check your system frequency as well as what voltage scale (VOS) configuration you set:

SofLit_0-1726223170325.png

Could you please share your ioc file?

 

 

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.
Jad
Associate III

Capture d’écran 2024-09-13 à 13.48.09.pngthan you very much for the quick response

those are the values I found. I do not know how to understand the values and adjustate the timer.


@Jad wrote:

Capture d’écran 2024-09-13 à 13.48.09.pngthan you very much for the quick response

those are the values I found. I do not know how to understand the values and adjustate the timer.


No these are the values for the power consumption.

You need to set the voltage scale according to the system frequency, from DS12919 Rev 2:

SofLit_1-1726228808037.png

Based on that voltage scale (VOS) level, you can know what is the maximum allowed kernel clock frequency you can set for FDCAN:

SofLit_0-1726223170325.png

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.
Jad
Associate III

i want to share to you my doc file but I do not find it. is it because I am using stm IDE and not CUBEMX?

Compress your project in .7z fromat and attach it in this discussion.

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.
Jad
Associate III

here my code juste before wanting to implement fdcan

You set a System clock from HSI at 64MHz.

This frequency corresponds to VOS3 since 64MHz < 200MHz:

SofLit_0-1726232545286.png

And from this table: 

The maximum kernel frequency for FDCAN is 50MHz for VOS3:

SofLit_0-1726223170325.png

And this is the error pop-up from CubeMx is showing indicating that the max FDCAN ker clock is 50MHz which corresponds to what mentioned in the datasheet:

SofLit_1-1726232703114.png

So, need either to increase the system clock by using the PLL or set PLL1 DIVQ1 to 4 so the FDCAN ker clock will be @40MHz.

SofLit_2-1726232944838.png

By the way, I don't recommend HSI as clock source for CAN/FDCAN communication in Normal mode

Hope I answered your question.

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.
Jad
Associate III

Capture d’écran 2024-09-14 à 10.08.13.png

thank you for the response, I put 50 mHz for the fdCAN and I took an external crystal clock. unfortunately, when I access the hal_fdcan document I do not understand why my functions are crossed

Sorry I didn't understand your last question. Which document? What you are showning is the project browser menu. You need to set FDCAN at least in one Core and Activate it and then compile.

SofLit_0-1726328445577.png

If it persists, please open a new thread.

Did your original issue has been solved according the recommendations I provided? if yes please kindly accept as solution the comment that answerd your question.

 

 

 

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.