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.

F28335-HRPWM模块的几个问题



1、SFO_MepDis_V5(n)和SFO_MepEn_V5(n)的作用分别是什么?

2、TI提供的例程“Example_2833xHRPWM_SFO_V5.c”中某段程序的疑问

CMPA_reg_val = ((long)DutyFine * (*ePWM[i]).TBPRD)>>15;
temp = ((long)DutyFine * (*ePWM[i]).TBPRD) ;
temp = temp - ((long)CMPA_reg_val<<15);
CMPAHR_reg_val = (temp*MEP_ScaleFactor[i])>>15;

上面四行程序中,DutyFine、 (*ePWM[i]).TBPRD分别为Q15和Q0格式变量,执行完“temp = ((long)DutyFine * (*ePWM[i]).TBPRD) ”之后,temp为Q15格式变量。第三行程序中,因CMPA_reg_val为Q0格式,那么第三行程序执行完之后,temp不是应该等于0吗?

hrpwm_sfo_v5.zip