s32k344 Clock settings

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

s32k344 Clock settings

1,375件の閲覧回数
AhmadTurkmani
Contributor II

hi, im using s32k344, im trying to build a simple project to toggle a led and use timer as my delay.

i have included GPT as a peripheral and configured the settings of it using gpt_example as a reference, after that i added a clock and gave it 40MHZ as shown below

AhmadTurkmani_0-1692624619967.png

now im able to toggle the led but the timer on it is not 1 second although i used this function Gpt_StartTimer(GptConf_GptChannelConfiguration_GptChannelConfiguration_0, 40000000);

my channel tick frequency is also 40MHZ .

i used the function Mcu_GetClockFrequency(PIT0_CLK); to look at the frequency of the clock i got it as 12MHZ.

this is my clocks diagram :

AhmadTurkmani_1-1692624833229.png

im also sharing my code , can you please help me with this issue.

thanks.

 

 

 

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

1,351件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @AhmadTurkmani 

The configuration of the PIT looks correct.

Could you help me by running the Gpt_Example_S32K344 and tell me if you observe the same behavior? Additionally, could you tell me if you are using a custom board?

 

B.R.

VaneB

0 件の賞賛

1,331件の閲覧回数
AhmadTurkmani
Contributor II

Hi @VaneB thanks for replying. Yes im using a custom board , i have another code which works properly on it ( so i dont think its a hardware issue ) , also trying the GPT example code works perfectly.

0 件の賞賛

1,312件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @AhmadTurkmani 

As it is not a HW issue, I suggest you make sure the configurations are correct taking as a reference the GPT example.

0 件の賞賛

1,293件の閲覧回数
AhmadTurkmani
Contributor II

i already did the configurations using the example code as a reference.

0 件の賞賛

1,280件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @AhmadTurkmani 

So, does the behavior mentioned above still occur?

0 件の賞賛

1,276件の閲覧回数
AhmadTurkmani
Contributor II

Yes, I’m still experiencing the same problem

0 件の賞賛

1,194件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @AhmadTurkmani 

Could you change the pin to measure the signal and show an image of it?

From the project attached before, the differences I observed from the Gpt example are:

  • When you call Mcu_Init(), you have defined MCU_PRECOMPILE_SUPPORT as STD_OFF. This causes the function to use the configurations of Mcu_Config_VS_0. 
  • The given value to the value parameter (time-out period (in a number of ticks) after a notification or a wakeup event shall occur) is 12000000.

Could you share the image I previously mentioned to verify the signal behavior? 

0 件の賞賛