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.
Im using irq0 to generate an interrupt. when i debug the code, the values for SMR and SVR register are correct (as i can see in the AIC window). But the ISR is never serviced. and the pending flag for this interrupt is raised. plz help
__irq void PIO_ISR (void) { a1++; //this is a global variable *AT91C_AIC_EOICR = 0; }
the following code is part of main
AT91C_BASE_AIC->AIC_SMR[2]=0X00000067; //SET THIS FR INTERRUPT CONDITION // 0X 0000 0067 THIS IS FR 7 PRIORITY AND //POSITIVE EDGE TRIGGERED MODE AT91C_BASE_AIC->AIC_IECR=0X40000004; //THIS IS INT ENABLE. //WE ENABLE IT FR SOURCE 30 AT91C_BASE_AIC->AIC_SVR[2]=(unsigned long) PIO_ISR; //GIVE ADDRESS OF INTERRUPT HERE
correction:
the the index of AIC_SMR and AIC_SVR is 30 (not 2).