Part Number: TMS320F2800137
Other Parts Discussed in Thread: SYSCONFIG
I have taken GPIO40 as a input for calculating the time period of a pulse. First I initialize using XBAR input1select. I also configure ECAP1_ISR like
InputXbarRegs.INPUT1SELECT=40; (Please check it)
EALLOW;
PieVectTable.ECAP1_INT= &eCAP1_isr;
EDIS;
PieCtrlRegs.PIEIER4.bit.INTx1 = 1; // Enable ECAP1_INT in PIE group 4
IER |= 0x0008;
I also configure ECAP such as
Configure eCAP1 unit for capture
//---------------------------------------------------------------------
ECap1Regs.ECEINT.all = 0; // Disable all eCAP interrupts
ECap1Regs.ECCTL1.bit.CAPLDEN = 0; // Disabled loading of capture results
ECap1Regs.ECCTL2.bit.TSCTRSTOP = 0; // Stop the counter
ECap1Regs.TSCTR = 0; // Clear the counter
ECap1Regs.CTRPHS = 0; // Clear the counter phase register
ECap1Regs.ECCTL0.INPUTSEL=0; (Please check it)
ECap1Regs.ECCTL2.all = 0x0096; // ECAP control register 2
ECap1Regs.ECCTL1.all = 0x01C4;
ECap1Regs.ECEINT.all = 0x0008;
interrupt void eCAP1_isr(void)
{
ECap1Regs.ECCLR.bit.INT = 1; // Clear the ECAP1 interrupt flag
ECap1Regs.ECCLR.bit.CEVT3 = 1; // Clear the CEVT3 flag
*******************************************************
PieCtrlRegs.PIEACK.all = PIEACK_GROUP4; // Must acknowledge the PIE group 4
}
After configuration, I have given a pulse of 200Hz to GPIO40. I am able to READ the value 0 OR 1 using GPIO DAT registor but i am not able to go into interrupt void eCAP1_isr.
Kindly help for the same