I have made a delay function where I use Timer 1. It seems to work fine|
until the first timer underflow.
I can see that the Timer1 flag is set in the interrupt flag register,
but the flag is not reset when the interrupt
is taken. The other interrupts I use in my program resets their
interrupt flags when the interrupts are
I have also tried to reset the TINT1 flag in the IFR register by
writing a "1" to the TINIT1 bit, but the flag is not
This flag can also be set by DMA channel 1. I have disabled the DMA
channel and also set the INTOSEL value
in the DMPREC register to 0 ( bit 7 and 6 ). Thus, the interrupt flag
is set by the Timer 1 interrupt and not the
DMA channel 1.
I have also tried to use Timer 0 instead of Timer 1 in my delay
function, and this works fine.
Have anyone used the Timer 1 register in the 5402 ? There has to be a
difference between Timer 0 and
Timer 1 since my delay function works fine with Timer 0 and not with
Timer 1 !
5402, problems using timer 1
Started by ●November 10, 1999