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.

CC2640: PWM设置参数不能大于0x4FFF的问题。一旦大于,就会打开失败,返回null。

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);
}