This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

External Interrupt Triggering Only Once

Hi, 

I am trying to have an external interrupt to trigger a routine; however it only does it once. I followed the example from control suite, but still I think I am missing something. I am acknowledging the interrupt at the end of the routine. 

Here is my Code:

void main(void)
{

InitSysCtrl(); //Initialize System Control:
InitSpiGpio(); //Configure SPI pins using GPIO regs
InitECanaGpio(); //Configure CAN pins
InitPieCtrl(); // Initialize PIE control registers to their default state.
InitPieVectTable(); // This function is found in F2806x_PieVect.c.
InitECana(); // Initialize eCAN-A module

Gpio_setup();
spia_FIFO_init();
spia_init();
ConfigureTXMBox();
CANInterruptConfig();
ConfigureRXMBox();
ConfigInterruptADC();

//input pin for Channel1 ADD busy line
GpioCtrlRegs.GPAPUD.bit.GPIO20 = 1;
GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO20 = 0;
GpioCtrlRegs.GPAQSEL2.bit.GPIO20 = 0; //test

PieCtrlRegs.PIEIER9.bit.INTx6 = 1; //ECAN1INTA
IER = 0x0101; //enable core line INT1
EINT; //enable global interrupt INTM
ERTM; // Enable real time DBGM

for(;;)
{


}


}

void ConfigInterruptADC()
{
EALLOW;
PieVectTable.XINT1 = &ADC_isr;
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Group 1 INT4
GpioIntRegs.GPIOXINT1SEL.bit.GPIOSEL = 20; // XINT1 is GPIO20
//XIntruptRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt
XIntruptRegs.XINT1CR.bit.POLARITY = 0; //test
XIntruptRegs.XINT1CR.bit.ENABLE = 1; // Enable XINT1
EDIS;

DMABufptr1 = & DMABuf1[0];
interrupt_count = 0;
}

interrupt void ADC_isr(void)
{
*DMABufptr1 = ADCExecuteConversion(CHANNEL1);
if(DMABufptr1 != &DMABuf1[2000])
{
DMABufptr1++;
//PieCtrlRegs.PIEACK.bit.ACK4 = 1;
}
if(DMABufptr1 == &DMABuf1[2000])
{
TransmittBuffer();
DMABufptr1 = &DMABuf1[0];
//PieCtrlRegs.PIEACK.bit.ACK4 = 1;
}
interrupt_count++;
PieCtrlRegs.PIEACK.bit.ACK4 = 1;
}