GPT Timer delay

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GPT Timer delay

2,995 次查看
Ajul
Contributor I

Hi , Currently We are working on NXPs32k324 controller .

We are using GPT ,PIT0_CH2 for getting timer delay.

GPT clock is running at 40MHZ. 

when we gave the tick for getting second and ms delay we are getting accurate result.

But in the case of micro second we are not getting accurate value we calculated tick for getting 400micro second delay  but we are getting a delay of 478 micro second also for 200 microsecond we are getting 319micro second could you please suggest a solution ?

 

0 项奖励
回复
3 回复数

2,981 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Ajul 

Could you provide the configuration you use for AIPS_SLOW_CLK and PLL_PHI0_CLK or FIRC_CLK?

Also, Could you tell me the RTD version you are using? 

 

B.R.

VaneB

0 项奖励
回复

2,961 次查看
Ajul
Contributor I

Hi VaneB,

We are using AIPS_SLOW_CLK.

The configuration is attached below.

Using Autosar version 4.4.0v

 

 

 

0 项奖励
回复

2,938 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Ajul 

I made a simple test code with the PIT0 CH 2 of the S32K3X4EVB-Q172, where it toggles a GPIO pin when the PIT notification is called every 400µs and 200µs. 

VaneB_0-1687986481737.png

VaneB_1-1687986491505.png

As you can see in the images, time remains relatively constant, it only has a slight deviation. 

Your delay variation may be due to your FXOSC or, in the case of using the S32K internal oscillators, these are not precise. I recommend you verify this part and additionally, I share a screenshot of how I have AIPS_SLOW_CLK configured.

VaneB_2-1687986921942.png

0 项奖励
回复