S32K344 CAN FD setup

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K344 CAN FD setup

3,493件の閲覧回数
Ayaz
Contributor IV

Hi

I am currently working on setup the CAN FD on my project, i have some confusion regarding the CAN clock.

Skærmbillede 2024-07-04 124801.png

I am using AIPS_PLAT_CLK to provide a clock to FLEXCAN.

In the reference manual it mentioned that the FLEXCAN uses tow clock source .Skærmbillede 2024-07-04 124727.png

Skærmbillede 2024-07-04 125239.pngIs the FlexCANprotocol clock is same CAN_PE_CLK? what is the clock source for FlexCANprotocol clock and CAN_PE_CLK ? and what the Prescaler division factor role is?

0 件の賞賛
返信
8 返答(返信)

3,462件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ayaz,

The module clock is the control host interface clock, while the PE clock is the functional clock. The module clock is only used for the register access of the peripheral and is usually sourced from a fixed clock source. For the PE clock, you can select whether the internal clock is connected to the output of a crystal oscillator (Oscillator Clock) or to the Peripheral Clock. The oscillator clock should be selected whenever a tight tolerance (up to 0.1%) is required in the CAN bus timing. The crystal oscillator clock has better jitter performance than the peripheral clock.

Julin_AragnM_0-1720113378532.png

The Serial Clock (Sclock) period defines the 'time quantum' used to compose the CAN waveform, so the CAN bitrate is computed based on the frequency of the PE clock.

Please look at the following overview:

Julin_AragnM_1-1720113544095.png

Best regards,
Julián

0 件の賞賛
返信

3,449件の閲覧回数
Ayaz
Contributor IV

Thanks for explanation 

How to select the frequency for the module frequency (CHI) and the PE clock frequency ?

Which clock is this one ?

1000000022.jpg

0 件の賞賛
返信

3,436件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ayaz,

You can look at the source for FlexCAN0_CLK from the Peripheral Clock View:

Julin_AragnM_0-1720131489600.png

Best regards,
Julián

0 件の賞賛
返信

3,421件の閲覧回数
Ayaz
Contributor IV

As I understood there are two different clock frequencies for FlexCAN.

 

1. CHI clock, which can be selected according to the photo you have sent.

2.  how do select the  PE clock frequency?

One last question which clock source is this one? Is it a CHI or PE clock?? should be the same as a module clock?

1000000022.jpg

0 件の賞賛
返信

3,383件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ayaz,

FlexCAN has the following unique clocks:

  • CAN_CHI_CLK—FlexCAN controller host interface clock
  • CAN_PE_CLK—FlexCAN protocol engine clock

Julin_AragnM_2-1720202300211.png

CHI_CLK is fed by AIPS_PLAT_CLK, and PE_CLK can be selected as shown in my previous reply with the peripheral view.

Julin_AragnM_3-1720204036287.png

The one in config tools refers to PE_CLK

Best regards,
Julián

0 件の賞賛
返信

3,364件の閲覧回数
Ayaz
Contributor IV

One last question which clock source is this one? Is it a CHI or PE clock?? should be the same as a module clock?

1000000022.jpg

0 件の賞賛
返信

3,359件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ayaz,

That refers to the PE Clock. Yes, it should be the same as the module clock.

0 件の賞賛
返信

3,355件の閲覧回数
Ayaz
Contributor IV
Thanks for the explanation
0 件の賞賛
返信