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.

Measuring time between two ecap module events

I am trying to measure the time difference between the rising edge of two square waves that are connected to two separate ECAP pins.  I have tried tying the syncout of ECAP1 to the syncin of ECAP2 to get the counters both on the same count but I still end up with around 100 count difference between the two counts when stop the emulation.  Can you twll me how I might accomplish this?  I am using the C2800 peripheral explorer kit with a F28335 control stick. 

  • If you want to measure time between eCap1 and eCap2 then
    just read ECap1Regs.TSCTR when you have eCap2 event is occured.

    pseudo code is here

    eCap2 isr
    {
    // read eCap1's TSCTR
    }
    Make sure eCap1 counter reset on it's capture event.

    Kevin