This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8846: DRV8846

Part Number: DRV8846

I connected a stepper motor and applied the control signals as below, The output at the stepper motor is measured constant as 1001. Is there any input parameter I am missing or wrong?

I1=0
I1=0
ADec=0
M0=0
M1=0
Dec0=0
Dec1=0

ENABLE=1
SLEEP=0
DIRCTION=0

loop
{
STEP=1
Delay
STEP=0
Delay
}

DIRCTION=1

loop
{
STEP=1
Delay
STEP=0
Delay
}

  • Hi John,

    You show "SLEEP = 0." To enable the device, nSLEEP pin must be 1. I'm assuming you have the correct signal in hardware since the motor is turning, but I wanted to double check with you on this.

    Now back to your issue - you said that the motor moves at a constant speed. From your code, it looks like you want it turn one direction then reverse direction. Is your issue that this direction change is not happening?

    If so, your MCU code might be getting stuck in your first loop. Also, check the DIR pin with a scope. If your software works correctly, you should see the DIR pin toggling on the scope.
  • When I set nSLEEP to 1 it works. (Earlier the stepper output was measured as the logic 1001; stepper was not moving)