Hi, I have a problem.
When I used the "Example_2806xECap_Capture_Pwm" code, I close the fail function.
And in debugger mode, I can see the "ECap1PassCount" value has change in watch window
But when I follow the "Example_2806xECap_Capture_Pwm" code to make a eCap2 interrupt.
I modify ECap1Regs to ECap2Regs , PIE vector and enable eCAP interrupt like this
PieVectTable.ECAP2_INT = &ecap2_isr;
PieCtrlRegs.PIEIER4.bit.INTx2 = 1;
And add eCap2 interrupt function like this
__interrupt void ecap2_isr(void)
{
ECap2IntCount++;
ECap2Regs.ECCLR.bit.CEVT4 = 1;
ECap2Regs.ECCLR.bit.INT = 1;
ECap2Regs.ECCTL2.bit.REARM = 1;
// Acknowledge this interrupt to receive more interrupts from group 4
PieCtrlRegs.PIEACK.all = PIEACK_GROUP4;
}
Before debug, the fail function is close
In debugger mode, "ECap2IntCount" value has no change in watch window.
What' wrong with it?
Where I missed?
Can anyone help me? Thanks.