This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IRQ & FIQ

Hello, I'm Juan Manuel and I'm trying to use the FIQ in the ADUC7026, but I've got a problem using it.
First, I configured the device (external IRQ0 on the evaluation board AD), then enabled the IRQ. The main program works ok, until I press the button, I mean I do an IRQ0, so ADUC7026 execute FIQ_Handler()__fiq, and then stays there forever, it doesn't go back to the
main program. What Am I doing wrong?
Here's the code:



 //TIMER 0
 T0LD=209;
 T0CON=0xC0;

 //ADC CONFIGURATION
 ADCCON = 0x20;  // Power-on the ADC
 Delay(50000);// Wait Minimum time to Start Conversion
 ADCCP = 0x04;          // conversion on ADC4
 ADCCN= 0x03;   // conversion on ADC3 DIFFERENTIAL MODE
 ADCCON= 0x02AA; // Timer 1 - DIFFRENTIAL MODE
 REFCON = 0x01;

FIQEN = XIRQ0_BIT;

...

void FIQ_Handler() __fiq
{
        seleccion++;  //Just Increment this                                  global variable

        if(seleccion==6)
          seleccion=0;
        return ;
}