s32k344 Clock settings

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k344 Clock settings

2,150 Views
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 Kudos
Reply
7 Replies

2,126 Views
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 Kudos
Reply

2,106 Views
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 Kudos
Reply

2,087 Views
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 Kudos
Reply

2,068 Views
AhmadTurkmani
Contributor II

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

0 Kudos
Reply

2,055 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @AhmadTurkmani 

So, does the behavior mentioned above still occur?

0 Kudos
Reply

2,051 Views
AhmadTurkmani
Contributor II

Yes, I’m still experiencing the same problem

0 Kudos
Reply

1,969 Views
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 Kudos
Reply