Part Number:CC2640
PWM_init();
PWM_Params pwmParams;
PWM_Params_init(&pwmParams);
pwmParams.dutyUnits = PWM_DUTY_US;
pwmParams.dutyValue = 0;
pwmParams.periodUnits = PWM_PERIOD_US;
pwmParams.periodValue = 0x4FFFF;//;//327679; //
hPWM1 = PWM_open(CC2640R2_LAUNCHXL_PWM0,&pwmParams); //CCW
if(hPWM1 == NULL)
{
while(1);
}
Kevin Qiu1:
PWM 输出周期和占空比受底层定时器的限制,在 PWM 模式下,定时器实际上是 24 位,导致最小频率为 48MHz / (2^24-1) = 2.86Hz (349.525ms)
因此达不到0x4FFFF的分辨率
,
Li KuiHai:
是否可以更改为两个定时器串接控制PWM,增加设置值为48位?
,
Kevin Qiu1:
不支持这样的操作