Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
Hii all,
I am started working on C28x picolo F28027 custom board on CCS V6, here i am trying to enable the external interrupt but control is going to isr_interupt handler only once, if i want to go one more time to the isr i have to reboot the controller. i.e., i realized pullup has to enable to that particular pin (here GPIO0).
After enabling the pullup register, now interrupt is not even generating once while i connect the GPIO0 pin to 3.3v source, I am using the Example code from ControlSuite.
Here, is my attached code below,
void main(void)
{
InitSysCtrl();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW;
PieVectTable.XINT1 = &xint1_isr;
EDIS
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Gropu 1 INT4
IER |= M_INT1; // Enable CPU INT1
EINT; // Enable Global Interrupts
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0; // GPIOPullup
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0; // GPIO
GpioCtrlRegs.GPADIR.bit.GPIO0 = 0; // input
GpioCtrlRegs.GPAQSEL1.bit.GPIO0 = 0; // XINT1 Synch to SYSCLKOUT only
EDIS;
EALLOW;
GpioIntRegs.GPIOXINT1SEL.bit.GPIOSEL = 0; // XINT1 is GPIO0
EDIS;
XIntruptRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt
XIntruptRegs.XINT1CR.bit.ENABLE = 1; // Enable XINT1
for(;;);
}
interrupt void xint1_isr(void)
{
Xint1Count++;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
-----------------------------------------------------------------
Please get me out of this problem,
Thanks in Advance.
Regards,
Narasimha