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.

Sync Capabilities of eCAP Peripherals to Timer modules on TMS320F28335

Other Parts Discussed in Thread: TMS320F28335

I'm looking into using the eCAP peripheral to determine the precise time of an external event on the TMS320F28335.  The system is currently settup to use Timer1 for the main loop and for time calculations.  

 

Is there a way to either sync the eCAP timers to timer1 or start at the same time; or determine the exact difference between them for precise time measurements with respect to the system time?

 

The stated software sync appears to only force a sync between the ePWM modules and the eCAP modules.

  • Jeffrey,

    Both eCAP and the CPU Timers are clocked off of SYSCLK, so they should already be "in sync" to an extent.  The timer value in the eCAP module can effectively be reset by asserting the SWSYNC bit in the ECCTL2 register.  In a similar fashion, CPU timer values can be reloaded by asserting the TRB in the TIMERxTCR register.  Doing both of these operations should "sync" the two peripherals such that their values are close (there will be some difference because of the delay in between when each statement is executed, but the delay should be constant).

    Does that help? or did I not fully understand your question?

    Trey