Hi;
I am trying to modify project_lab11 for the TMS320F28027F LaunchPad with the DRV8301 revB motor driver and a bldc motor.
The modification should allow the "enable_run" flag to be set high when the motor is being driven at a particular speed by another motor.
So far, I have located the point within the .c files ISR where I wish to insert my code.
My code uses a set of equations that converts the terminal voltage of the floating phase into a back emf, and then calculates the angular rotation of the rotor from there.
int Vc = gAdcData.V.value[2];
int VBus = gAdcData.dcBus;
These are the two variables I will be using, however in order for them to work with my equations; I need to convert their value a regular float...
Any suggestions?
Also I have made the assumption that Vc is always updated in the ISR to be the floating terminal.
Thank you!