setupInverterPWM(INV_PWM1_BASE,INV_PWM2_BASE,INV_PWM_PERIOD,INV_DEADBAND_PWM_COUNT,INV_DEADBAND_PWM_COUNT);
上面这个函数体里面 EPWM_setTimeBasePeriod(base1,pwm_period_ticks >>1); pwm_period_ticks为什么会右移一位即除以2,难道是PWM的时钟被分频了?但我在代码中没看到的,谢谢!
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.
setupInverterPWM(INV_PWM1_BASE,INV_PWM2_BASE,INV_PWM_PERIOD,INV_DEADBAND_PWM_COUNT,INV_DEADBAND_PWM_COUNT);
上面这个函数体里面 EPWM_setTimeBasePeriod(base1,pwm_period_ticks >>1); pwm_period_ticks为什么会右移一位即除以2,难道是PWM的时钟被分频了?但我在代码中没看到的,谢谢!
你好,我的理解是这样的:
pwm_period_ticks对应的是函数中的periodCount,CPUTimer_setPeriod函数中有介绍:periodCount is the CPU timer period count.
而setupInverterPWM函数中又有说明:PWM clock on F2837x is divided by 2
由此,这里pwm_period_ticks会右移一位除以2.