若是我想让28027F的EPWM4A和EPWM4B作为PWMDAC输出,观察估算到的转子角度,我应该怎么设置程序来修改通道呢?
已经在EPWM4A和EPWM4B输出端口接了一个截止频率800Hz的低通滤波器
mangui zhang:
set DAC parameters那里修改吧
若是我想让28027F的EPWM4A和EPWM4B作为PWMDAC输出,观察估算到的转子角度,我应该怎么设置程序来修改通道呢?
已经在EPWM4A和EPWM4B输出端口接了一个截止频率800Hz的低通滤波器
bob iuuiy:
回复 mangui zhang:
void HAL_setDacParameters(HAL_Handle handle, HAL_DacData_t *pDacData){ HAL_Obj *obj = (HAL_Obj *)handle;
pDacData->PeriodMax = PWMDAC_getPeriod(obj->pwmDacHandle[PWMDAC_Number_1]);
pDacData->offset[0] = _IQ(0.0); pDacData->offset[1] = _IQ(0.5); pDacData->offset[2] = _IQ(0.5); pDacData->offset[3] = _IQ(0.5);
pDacData->gain[0] = _IQ(1.0); pDacData->gain[1] = _IQ(1.0); pDacData->gain[2] = _IQ(1.0); pDacData->gain[3] = _IQ(1.0);
return;} //end of HAL_setDacParameters() function
应该不在这里面改吧,没什么可以改的呀