Hi Team
Now I configure Timer0 as the center aligned PWM mode. The cycle value is set to 1000 and the frequency division coefficient is 1. But now the PWM cycle is 20us, not 10us as I want. Theoretically, the cycle should be 1000 * 2 * 0.005us=10us (one clock of 200MHz clock frequency is 0.005us).
This is my configuration:
EPWM_ setTimeBasePeriod(EPWM1_BASE, 1000U);
EPWM_ setPhaseShift(EPWM1_BASE, 0U);
EPWM_ setTimeBaseCounter(EPWM1_BASE, 0U);
EPWM_ setTimeBaseCounterMode(EPWM1_BASE, EPWM_COUNTER_MODE_UP_DOWN);
EPWM_ disablePhaseShiftLoad(EPWM1_BASE);
EPWM_ setSyncOutPulseMode(EPWM1_BASE,EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO);
EPWM_ setClockPrescaler(EPWM1_BASE,EPWM_CLOCK_DIVIDER_1,EPWM_HSCLOCK_DIVIDER_1);
Could you tell me what is the problem?