Initialization problem of two timer match interrupts at different time interval

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

Initialization problem of two timer match interrupts at different time interval

605 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vignesh_jay on Thu Jul 11 23:58:52 MST 2013
Hello frnz,
               I am trying to use two match interrupts of same timer (e.g)timer0 in LPC1788,in that each interrupt have to occur every 0.5sec.The thing is that the second interrupt have to [B]occur during middle of 1st interrupt TC value[/B] and to occur every 0.5sec.


   I have tried with two match interrupts of same timer and with different timer.kindly share your ideas with me..


   Thanks
0 Kudos
Reply
1 Reply

585 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbm on Fri Jul 12 01:32:53 MST 2013
1. You don't need two interrupts at 1 sec each. Use one interrupt with 0.5 sec interval or use 0.01 sec interval and count to 100, invoking one routine when counter reaches 50 and another at 100.

2. You can do exactly what you believe you want to do by setting one match register to 1 sec period value and another at 0.5 sec. Set the first in MCR as "interrupt and reset" and the second as "interrupt".
0 Kudos
Reply