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.

TMS320F28335: Differential time mode for ECAP

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Hi team,

Here's an issue from the customer may need your help:

The customer has designed a test program for ECAP that mainly contains a 100 kHz PWM program. The idea is to calculate the PWM period by capturing the rising edge of the PWM through the DSP's own ECAP1 module, where the Event 1 polarity rising edge, Event 2 polarity rising edge of ECAP1 are set, the Event 2 interrupt is enabled, and in the interrupt program, T1=CAP1, T2=CAP2,  T=CAP2-CAP1.

When testing the differential and absolute time modes of ECAP: 

1) Watch the window by using the CCS variable while the program is running, T=1500;

2) when setting the Event 1 counter to differential mode, use the CCS variable watch window, T1=1499.

Why does the captured time period in differential time mode have one less time period than the calculated time period in absolute time mode? 

Could you help check this case? Thanks.

Best Regards,

Cherry