Dear all,
Setting
ECap1Regs.ECCTL2.bit.REARM = 1; in capture mode
allows only CAP1 to capture the counter?
The manual says
REARM =1h (R/W)
=> Arms the one-shot sequence as follows:
1) Resets the Mod4 counter to zero
2) Unfreezes the Mod4 counter
3) Enables capture register loads
But it is NOT specified that WHEN THE MOD4 COUNTER RESETS.
I am finding some ways to let only Cap1 capture its counter value. For more specific, I would like to get the counter of ePWM1 module, from the ECap1Regs.CAP1, at the every rising edge of eCAP1 pin.
1. ECap1 module has been synchronized with ePWM1 module by
EALLOW;
SyncSocRegs.SYNCSELECT.bit.ECAP1SYNCIN = 0; // EPWM1Syncout selected
EDIS;
ECap1Regs.CTRPHS = 0;
2. The rising edge on the eCAP1 pin always occurs once, during the period of EPWM1 and ECAP1 module.
3. So, I would like to save all the captured registers to CAP1 and then read it the next switching period.
4. However, because MOD4 counter freely runs in continuous mode (0->1->2->3->0), I have to access CAP1, 2, 3, and 4 according to MOD4 counter value.
5. So, from the technical reference manual, I thought that re-arming the ECAP module would reset the MOD4 counter every capture event, so that I can get the every captured value by reading CAP1 register.
IS THIS RIGHT?
Since I am now waiting for the 28075 on the way, and in a hurry, I would like to get the solution before its arriving.