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.

DRV8876: Motor spinning in forward directions on micro controller reset

Part Number: DRV8876

Hello i am using a DRV8876 to control a brushed DC motor. I am having problems wherein upon during resetting or the pins are not initialized of the micro- controller the motor will spin in the forward direction. I thought this should not be able to happen since on the datasheet it is specifically said that digitals pins of the DRV8876 are internally pulled down. In my pcb there two set of the schematic below.

All digital pins are connected to a microcontroller exept for Vref wherein it is connected to a digital potentiometer

  • Hi Drake,

    We have not experienced this.

    Can you provide scope captures of nSLEEP, EN/IN1, PH/IN2, and PMODE during this time?

    nSLEEP low should keep the outputs disabled.

  • Hi Rick,

    I do apologize for the late reply.

    Unfortunately though, due to the very strict lock-down in my area, I am not able to have access on a oscilloscope.

    If you dont mind measurements done with a multi meter

                        RESET       INITIALIZED

    nSLEEP       1.724v          0.004

    EN/IN1          1.626           0.006

    PH/IN2          1.624           0.006

    PMODE        0.473           0.005

    Logic level is 3.3volts, Motor voltage is 6.04volts. Judging from that table it does makes sense why its turning forward. Which shouldn't be the case

  • Hi Drake,

    Thank you for the DMM readings. These help.

    Why are nSLEEP, EN/IN1, and PH/IN2 in the 1.6V to 1.7V range when the device is in reset?

    At 1.7V, the device can be awake and in PH/EN mode. This could cause the motor to spin.

    When the mcu is reset, do the GPIOs have an internal pullup enabled?

    Adding a external 10k pulldown to GND on the nSLEEP pin should keep the device in sleep mode until the mcu is initialized. 

    Please let us know the reason for the midrail voltage on the inputs when the mcu is reset.

  • Hi Rick,

    The mCU im am using is the ATSAM3x8E if you are familiar with the arduino its the same chip the Arduino Due uses. The datasheet has no mention of the I/O at ressets is pulled up.

    I have measured those values while pressing down on my reset button. I cannot really do some extensive testing but it seems that at reset the I/O (also other I/O) my multi meter reads 1.6v .

    Ill try placing a pulldown at nSLEEP and will comeback with the results.

  • Hi Drake,

    On page 9 of the datasheet, there is a description of the PIO reset:

    Schmitt Trigger(3)
    Reset State:
    - PIO Input
    - Internal pull-up enabled

    Also, on page 28 there is a statement: Typical pull-up value is 100 kΩ for all I/Os

    This is consistent with what you are seeing. The nSLEEP typical pulldown is 100k.

    It is expected that placing the external pulldown resistor will cause the DRV8876 to enter sleep.

    Good luck.

  • Hi Rick,

    But also on page 622 a line says

    "After reset, all of the pull-ups are enabled, i.e. PIO_PUSR resets at the value 0x0"

    This lead me to believe that during a reset the pull-ups are disabled.

    Well anyway it all good right now !  Glad that the oscilloscope was not needed, and a DMM was enough to debug. Thanks you very much for the help.

    Have a great day !