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: ECAP的差分时间模式与绝对时间模式的计算值差一个周期

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

各位好:

       设计了一个28335的ECAP的测试程序,程序中主要包含一个100Khz的PWM程序,思路是通过DSP自身的ECAP1模块捕捉PWM的上升沿,以此计算PWM的周期,其中设置ECAP1的事件1极性上升沿、事件2极性上升沿,使能事件2中断,中断程序中t1=CAP1;t2=CAP2,T=CAP2-CAP1,在测试ECAP的差分时间模式和绝对时间模式时候,出现了以下现象:

      1、在程序运行过程中,通过CCS变量观察窗口,T=1500;

      2、当设置事件1计数器为差分模式时,通过CCS变量观察窗口,t1=1499;

问题:为什么差分时间模式下的捕捉的时间周期会比绝对时间模式下计算出来时间周期少1个?