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 ;
}

Parents
  • I don't think so... I did it as appears in the CD from Analog Devices.
    Look at this example:

    void IRQ_Handler(void) __irq;// IRQ Funtion Prototype
    
    ....
    
    void IRQ_Handler() __irq
    {
            GP4DAT ^= 0x00040000;                   // Complement P4.2
            ADCCP ^= 1;                                             // change channel
            senddata (ADCDAT >> 16);
            return ;
    }
    
    


    It's strange, I don't understand why it doesn't work to me

Reply
  • I don't think so... I did it as appears in the CD from Analog Devices.
    Look at this example:

    void IRQ_Handler(void) __irq;// IRQ Funtion Prototype
    
    ....
    
    void IRQ_Handler() __irq
    {
            GP4DAT ^= 0x00040000;                   // Complement P4.2
            ADCCP ^= 1;                                             // change channel
            senddata (ADCDAT >> 16);
            return ;
    }
    
    


    It's strange, I don't understand why it doesn't work to me

Children