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.

TMS320F28075: ECAP1 counter resetting when EPWM1A action occurs

Part Number: TMS320F28075

I'm trying to track a toothed gear using the ECAP module and send out a pulse at specific times using the EPWM module. However, when the EPWM triggers, the ECAP's recorded event time is incorrect. 

I've configured the ECAP like so:

    ECAP_stopCounter(ECAP1_BASE);
    ECAP_enableCaptureMode(ECAP1_BASE);

    ECAP_setCaptureMode(ECAP1_BASE, ECAP_CONTINUOUS_CAPTURE_MODE, ECAP_EVENT_1);
    ECAP_setEventPolarity(ECAP1_BASE, ECAP_EVENT_1, ECAP_EVNT_RISING_EDGE); 
    ECAP_enableCounterResetOnEvent(ECAP1_BASE, ECAP_EVENT_1);

    ECAP_enableLoadCounter(ECAP1_BASE);
    ECAP_setSyncOutMode(ECAP1_BASE, ECAP_SYNC_OUT_SYNCI); 
    ECAP_startCounter(ECAP1_BASE);
    ECAP_enableTimeStampCapture(ECAP1_BASE);
    ECAP_reArm(ECAP1_BASE);

    ECAP_enableInterrupt(ECAP1_BASE, (ECAP_ISR_SOURCE_CAPTURE_EVENT_1 |
                                      ECAP_ISR_SOURCE_COUNTER_OVERFLOW));

    Interrupt_enable(INT_ECAP1);

And then in the interrupt for the ECAP, I take the measurement of the event using the following code:

periodCount = ECAP_getEventTimeStamp(ECAP1_BASE, ECAP_EVENT_1);

The interrupt works as expected.

However, I set up a pulse on the EPWM module, when that pulse executes I get an incorrect period measurement for the ECAP module. I use the following code to set up the pulse:

            EPWM_setActionQualifierAction(EPWM1_BASE,
                                EPWM_AQ_OUTPUT_A,
                                EPWM_AQ_OUTPUT_HIGH,
                                EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);

I set up an array to record each measurement that the ECAP takes. The toothed gear's speed is not changing. When the EPWM's action executes, the ECAP timing is incorrect. You can see this in the following array:

I'm pretty lost here. I know the ECAP and EPWM can sync their clocks, but I don't get how they would be related to each other like this? Can anyone explain this?

Edit: I forgot to mention, when the ECAP's timing is incorrect, the interrupt does not fire. Only its event time is incorrect.