S12G128 Overflow Interrupt Timer

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

S12G128 Overflow Interrupt Timer

跳至解决方案
701 次查看
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 解答
468 次查看
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 回复数
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 项奖励
468 次查看
rayhall
Contributor V

Zhang Jun

Thank you.

Ray.

0 项奖励
468 次查看
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 项奖励