How to calculate PIT PIT_LDVALn register value

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

How to calculate PIT PIT_LDVALn register value

ソリューションへジャンプ
1,140件の閲覧回数
irmantasbudrys
Contributor III

Hello All,

 

I am using FRDM DEV BRD KEAZ128 and S32. Bus frequency is 24MHz. Lets say I want interrupt every 1ms. Could you explain me how to calculate PIT_LDVALn register value to generate this interrupt? 

Best Regards,

IB

0 件の賞賛
返信
1 解決策
956件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Irmantas Budrys,

   

     Actually, the calculation is very simple.

    You also can refer to the KEA128 reference manual, chapter 28.5 Initialization and application information.

   If your bus clock is 24Mhz, then you want to get 1ms, the pit clock is the bus clock, so:

  PIT_LDVALn = 1ms /bus clock =24000= 0x5dc0.

Wish it helps you!

If you still have problem, please contact me!


Have a great day,
Kerry

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

元の投稿で解決策を見る

1 返信
957件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Irmantas Budrys,

   

     Actually, the calculation is very simple.

    You also can refer to the KEA128 reference manual, chapter 28.5 Initialization and application information.

   If your bus clock is 24Mhz, then you want to get 1ms, the pit clock is the bus clock, so:

  PIT_LDVALn = 1ms /bus clock =24000= 0x5dc0.

Wish it helps you!

If you still have problem, please contact me!


Have a great day,
Kerry

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