We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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 ; }
Without knowing about your specific chip - shouldn't you acknowledge the interrupt somewhere in the FIQ handler, to deassert the interrupt condition?
How do you tell your processor that you have taken care of the interrupt condition?
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
if you are using the VIC (I suppose the chip has a vector interrupt controller): -You have to initialize it. or if you don't use the VIC: -You need to write the Vector Address.