Using all the Output compare and Overflow timer Interrupts at a time

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

Using all the Output compare and Overflow timer Interrupts at a time

1,645 Views
Kalyan
Contributor I
Hi everyone,
i'm working with MC9S12NE64 processor.
right now i'm facing some problem using the timers.
i'm not facing any problem using all the output compare timers (TC4, TC5,TC6 and TC7) together.
but, once i use Overflow timer (Standard overflow timer), the processor is behaving strangely. the Timer overflow is not occuring at the right time.
 
to give more info on the problem;-
 
i'm not programming the TCNT register. and i'm installing the Interrupt handler for the same and assigning TSCR2 = 0x80 and TSCR1 = 0x90.
 
and i'm installing all the handlers for output compare interrupts (12,13,14,15 interrupt vectors) and setting TIOS = 0xF0. in the ISR of individual output compare ports, i'm assigning some value + TCNT. that is for example
                   TC4 = 0x1DFC + TCNT.
                     TC5 = 0x1DFC + TCNT.
                    TC6 = 0x1DFC + TCNT.
                   TC7  = 0x1DFC + TCNT.
 
please let me know if i'm not doing any thing correctly.
and tell me if i can simultaniously use all the output compare timers as well as overflow timer.
 
 
 
 
 
Labels (1)
0 Kudos
1 Reply

319 Views
PsychoDebugger
Contributor I
It can be useful timeout with output compare

0 Kudos