Hi.,
I need the favor from you.
I'm using DRV8711 for my project.My requirement is to stop the stepper motor few seconds in running sequence.(Stall detection)
I'm using 5 positions of stepper motor.In the second position, I added a mechanical stopper to stop the motor. Therefore, I created an interrupt when the mechanical stopper stopped the motor.
void Stepper_GPIOIntHandler (void)
{
GPIOIntClear(GPIO_PORTP_BASE,GPIO_PIN_1);
if(GPIOPinRead(GPIO_PORTP_BASE,GPIO_PIN_1))
{
g_Cal_RSU_SuctionArm_Motor.Stall = 1;
}
else
{
if(STALL_Flag==1)
{
g_Cal_RSU_SuctionArm_Motor.Stall = 0;
Motor_Stop_Sequence();
RSU_STALL_Flag = 0;
}
}
}
when the interrupt came the stepper sequence changed STALL=1(motor running) into STALL=0(motor stop),but i need to stop the stepper after stall=0,i used stop sequence but this is not working.
I need to stop the motor few seconds after that the motor will move to next position.
My stop sequence is
void Motor_Stop_Sequence(void)
{
Stepper_SleepMode_Input_Low;
Stepper_Step_Input_Low;
}
Note:In this above code the motor will freefall . Not moving the next position.Please suggest how to stop the motor.
Please review my above stop sequence is right? kindly give a solution for after stall 0 to stop the stepper for few seconds after that stepper will go to the next sequence.
Objective:
When the mechanical stopper stops the motor,the stall detection will enable.
Thank you