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.

TMS320F28069M: ECAP2: Can't interrupt on 1 event, but can interrupt on 2 or more events.

Part Number: TMS320F28069M

Hi,

I'm using ECAP2 module to capture a fairly slow PWM signal (50Hz) on GIO25.

My signal consists of a falling edge, a 1.25ms delay, a rising edge and another 8.75ms delay before another falling edge.

I have the ECAP2 module setup in oneshot mode, with the event polarities polarities set as needed.

StopWrap is set to 3 events and the interrupt is set to 3 events.  This system works well and I can measure my signal with great precision. I can also capture on only two events with success.

However when I want to simply enable on 1 event (the falling edge of the first capture event) I set Wrap to 1, Interrupt to 1 event and despite the CAP2.ECEINT and CAP2.ECFLG showing a 1 for the first capture event, no interrupt is generated.

I was unable to find any errata on this issue and wondering if anyone has encountered something like this before.

Thanks

Stomp!.

  • Hi Stomp,

    Do you mind clarifying a few things for me. For the case where you need to interrupt on 1 capture/1 event, CEVT1 is set to 1 and all other bits of ECEINT register is set to 0, STOP_WRAP is set to 0?

    What is the status of ECFLG.CEVT1 and ECFLG.INT?
  • Hi Stomp,

    It's been a few days since we heard back from you. Is your issue resolved?
  • Hi Frank,

    The CEVT1 and ECEINT is set correctly, but I saw some randomness in the timing of the flags in the ECFLG register.

    I can say with confidence that that between the enable CEVT1 interrupt instruction and clear-then-enable global interrupts in the F28069 device my interrupt was occurring and I was clearing it.

    What compounded the problem is that I was using a PWM channel to generate a "mock" signal for unit testing purposes. Just so happens that due to the precise repetitive nature of the unit test, I always had the same flaw in the interrupt enable code. Totally my issue and a change in timing operations sees the unit working correct.

    Thanks for taking my question!.

    Cheers
    Stomp!
  • Hi Stomp,

    Glad to hear you resolved the issue! Let us know if you run into any more problems