Hi,
I want to synchronize ECAP1-ECAP4 to same TBCTR(time base counter).
I have followed the below discussion to get my ECAP's working in a synchronization to get the phase difference between the input ECAP pulses.
ECap1Regs.ECCTL2.bit.SYNCI_EN = 1; /* Enable sync in*/ ECap1Regs.ECCTL2.bit.SYNCO_SEL = 0; /* Pass through*/ ECap4Regs.ECCTL2.bit.SYNCI_EN = 1; /* Enable sync in*/ ECap4Regs.ECCTL2.bit.SYNCO_SEL = 0; /* Pass through*/ //Set up ECAP1 and ECAP4 for External Sync EALLOW; InputXbarRegs.INPUT5SELECT = 66U; //0x66GpioDataRegs.GPDDAT.bit.GPIO66 = 0; SyncSocRegs.SYNCSELECT.bit.ECAP1SYNCIN = 5U; //0x101 SyncSocRegs.SYNCSELECT.bit.ECAP4SYNCIN = 5U; //0x101 EDIS; //Synchronize ECAPS 1 through 4ECap1Regs.ECCTL2.bit.SWSYNC = 1; ECap4Regs.ECCTL2.bit.SWSYNC = 1;