S12G128 Overflow Interrupt Timer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12G128 Overflow Interrupt Timer

Jump to solution
646 Views
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.

Labels (1)
0 Kudos
1 Solution
413 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
414 Views
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 Kudos
413 Views
rayhall
Contributor V

Zhang Jun

Thank you.

Ray.

0 Kudos
413 Views
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 Kudos