I'm am attempting to modify motorware 115 lab 11 for use in our application. Everything works like it should however when I attempt to run standalone (no debugger, launchpad switch S1-3 in off position) the motor growls then sometimes the BOOSTXL-DRV8305 faults. When I download with the debugger everything works as it should.
To isolate the problem I did the following:
Started with a brand new motorware install.
Modified user.h with my motor parameters.
Included gpio.h into proj_lab11.c.
Changed Speed KP/KI to 4.0 and 0.005. - suitable for my motor
Added this snippet at the start of the while(gMotorVars.Flag_enablesys) loop:
if(GPIO_read(halHandle->gpioHandle,GPIO_Number_12)==1)
{
gMotorVars.SpeedRef_krpm=_IQ(1.0f);
gMotorVars.Flag_Run_Identify=true;
}
else
{
gMotorVars.SpeedRef_krpm=_IQ(0.0f);
gMotorVars.Flag_Run_Identify=false;
}
When running with the debugger, or after a debugger download I can press S3 on the LAUNCHXL-F28027F and the motor will nicely run at 1krpm in response to the button. At this point I power everything down, move S1-3 to the off position and power up. Now, in response to pressing S3 the motor will just growl and not run properly.
What is wrong here? I tried a similar thing with lab10 and it worked properly.
