Tool/software:
Hello, expert:
I encountered the following problems during the process of using universal_motorcontrol_lab_f28002x in MotorContorl_SDK 5.04:
In the main function:
runMotor1OffsetsCalculation(motorHandle_M1);
The following functions were used to configure Dacs for the high and low side cathodes of the CMPSS module:
HAL_setMtrCMPSSDACValue(obj->halMtrHandle,
objSets->dacCMPValH, objSets->dacCMPValL);
It seems that there is no problem here, but in the following main loop of the program:
while(systemVars.flagEnableSystem == true)
{
//.......
runMotor1Control(motorHandle_M1);
//......
}
The above code has been called:
HAL_setMtrCMPSSDACValue(obj->halMtrHandle,
objSets->dacCMPValH, objSets->dacCMPValL);
Is there any problem with doing this? Isn't it enough to configure the DAC of CMPSS only once before the program enters an infinite loop? Why is it necessary to configure multiple times in the loop?