S12G128 Overflow Interrupt Timer

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

S12G128 Overflow Interrupt Timer

ソリューションへジャンプ
702件の閲覧回数
rayhall
Contributor V

I have set up TIM with a overflow interrupt. The prescaler is set to precision. I want to set the overflow to exactly 10 msec. The prescaler does not give me a way to set to this time. It also seems that I cannot write to TCNT in the interrupt to control the next overflow time. How can I get the 10 msec I require.

 

Ray.

ラベル(1)
0 件の賞賛
1 解決策
469件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ray,

attached is processor expert demo code for 10ms overflow interrupt.

in the sample, system clock is 6.25M

interrupt frequency is 6.25M/65536=95.367Hz  that is around 10ms

can this help you?


Have a great day,
Zhang Jun

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

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
470件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ray,

attached is processor expert demo code for 10ms overflow interrupt.

in the sample, system clock is 6.25M

interrupt frequency is 6.25M/65536=95.367Hz  that is around 10ms

can this help you?


Have a great day,
Zhang Jun

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

0 件の賞賛
469件の閲覧回数
rayhall
Contributor V

Zhang Jun

Thank you.

Ray.

0 件の賞賛
469件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ray,

you are welcome!


Have a great day,
Zhang Jun

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

0 件の賞賛