GPT Timer delay

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

GPT Timer delay

2,973件の閲覧回数
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,959件の閲覧回数
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,939件の閲覧回数
Ajul
Contributor I

Hi VaneB,

We are using AIPS_SLOW_CLK.

The configuration is attached below.

Using Autosar version 4.4.0v

 

 

 

0 件の賞賛
返信

2,916件の閲覧回数
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 件の賞賛
返信