Other Parts Discussed in Thread: MOTORWARE, TMDSCNCD28027F, DRV8301, DRV8312, BOOSTXL-DRV8301
Greetings -
I am working my way through the MotorWare Lab 2b in CCS.
I am at the point of attempting to start the motor identification process. I can change gMotorVars.Flag_enableSys to '1' and observe the results of the update. I can also update gMotorVars.Flag_Run_Identify to '1'. On setting the Flag_Run_Identify flag, the drive immediately changes gMotorVars.CtrlState from 'CTRL_State_Idle' to 'CTRL_State_Offline'.
I have turned off optimizations so that the debugger might give me more clear information. The below code comes from 'ctrl.c', starting at line 719:
if(EST_isMotorIdentified(obj->estHandle))
{
if(CTRL_getFlag_enableOffset(handle))
{
// set the next controller state
CTRL_setState(handle,CTRL_State_OffLine);
}
else
{
// set the next controller state
CTRL_setState(handle,CTRL_State_OnLine);
}
}
else
{
// set the next controller state
CTRL_setState(handle,CTRL_State_OffLine); // <------- this is being executed
}
I am setting the breakpoint at 'if(EST_isMotorIdentified...', but - on stepping through - it appears that the 'EST_isMotorIdentified()' is not being executed at all. The stepping function simply goes from the if statement into 'CTRL_setState(handle, CTRL_State_Offline)'. Any insight would be greatly appreciated.
j