PIT IRQ Time

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

PIT IRQ Time

1,426件の閲覧回数
bkohan
Contributor II

We are using the KL17Z128, KDS 3.1 and KSDK 1.2.  We setup the PIT to generate 250 usec interrupt. We toggle a GPIO pin in the interrupt routine.  The time between GPIO toggles is about 252.6 usec.  To get an IRQ period closer to 250 usec we set the period to 248 usec in the PIT "Bean".  Our CPU clock is set for 48MHZ, Bus clock is 24MHZ.  Any ideas on what's going on?

ラベル(1)
タグ(2)
0 件の賞賛
返信
2 返答(返信)

1,208件の閲覧回数
jstark
Contributor II

Have you looked at the code to see what value is being loaded into the Timer Load Value register? For a 24 MHz bus clock, you would want that register to be loaded with the value 5999 ((interrupt interval / peripheral bus clock period) - 1).

If that's the case, then perhaps the system clock is not exactly on frequency.

J.

0 件の賞賛
返信

1,208件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Bob,

Do you use the Processor Expert of KSDK?

If yes, you can configure the cpu clock and timer directly :

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信