cancel
Showing results for 
Search instead for 
Did you mean: 

double FIQ (STR711F)

bobb
Associate II
Posted on March 15, 2006 at 13:25

double FIQ (STR711F)

2 REPLIES 2
bobb
Associate II
Posted on March 15, 2006 at 12:34

Hello, I am using TIM0 PWM OCMPB interrupt to cause FIQ T0TIMI_FIQChannel interrupt. I am using the IAR compiler with their routines to activate and service the interrupt. I am seeing a double interrupt like the flags are not being cleared, yet after the second of each OCMPB interrupt, it would appear to be cleared till the next expected time. Here is the interrupt code:

void FIQ_Handler(void)

{

GPIO1->PD = ((GPIO1->PD) ^ P1_6);

EIC_FIQPendingBitClear(T0TIMI_FIQChannel);

TIM0->SR &= ~TIM_OCFB; // reset interrupt flag

GPIO1->PD = ((GPIO1->PD) ^ P1_6);

}

Any clues as to why it appears the flags are not cleared the first time, but cleared the second ?

Thanks,

Bob B

bobb
Associate II
Posted on March 15, 2006 at 13:25

I found the problem. You need to clear the timer interrupt first before clearing the FIQ pending flag, otherwise the interrupt source would still be active when FIQ pending flag was cleared and it would immediately be reactivated. Need to reset the source first.