Hi,
In my board, I use pins below pins as below;
I use ePWM1,2,3,4 as PWM channels. All of them up-down count mode.
ePWM5 and 6 -> SPI | ePWM7-> UART | ePWM8 as boot pin configuration. Pins are connected to 3.3V with pull-up resistor.
I need additional time-base submodule with double frequnency of my main ePWMs.
I chosed ePWM8 to use that purpose. It is needed to use SYNCPER signal to sync my main ePWM with CMPSS.
1) Can I properly use ePWM8 in sync. chain while other ePWMs (5,6,7) aren't configured as ePWM in my software? I don't have any configuration lines for ePWM at my software!
2) I added phase shift as 2 to to others ePWMS2,3,4,8 in order to fully sync them to ePWM1. Does the value 2 enough or do I need to increment it in chain? That means, do I need to write 4 as phase shift to ePWM4-5-6 and do I need to write 6 to ePWM7-8 group?
As I configured below, my ePWM8 isn't sync to ePWM1. I think I need to increase phase shift with a few nanoseconds!
I created sync chain using following codes.
void SYNC_init(void)
{
SysCtl_setSyncOutputConfig(SYSCTL_SYNC_OUT_SRC_EPWM1SYNCOUT);
//
// For EPWM1, the sync input is: SYSCTL_SYNC_IN_SRC_EXTSYNCIN1
//
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_EPWM4, SYSCTL_SYNC_IN_SRC_EPWM1SYNCOUT);
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_EPWM7, SYSCTL_SYNC_IN_SRC_EPWM1SYNCOUT);
}
EPWM_setSyncOutPulseMode(EPWM1_BASE, EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO);
EPWM_enablePhaseShiftLoad(EPWM3_BASE);
EPWM_setPhaseShift(EPWM3_BASE, 2); // 2 is to sync fully!
EPWM_setSyncOutPulseMode(EPWM3_BASE, EPWM_SYNC_OUT_PULSE_ON_EPWMxSYNCIN);
EPWM_setCountModeAfterSync(EPWM3_BASE, EPWM_COUNT_MODE_UP_AFTER_SYNC);
I added 2 ! to all my ePWMs and it works for my eEPWMs that drive power switch.
