36v4 UVLO bit always set

Hi,
i have 36v4 connected to Teensy 4.0. i am running arduino BasicSteppingSpi example. i have modified it slightly per my connections.

i do not have motor connected. i always receive 0x20 status.

i thought perhaps i fried my first 36v4 so i ordered a second one. same result and second one i have not connected motor and only run BasicSteppingSpi example.

measuring with DVM referenced to GND:
IOREF = 3.27V
GND = 0.0V
!SLEEP = 3.27V
VIN = 24.1V

-----below is printf log-----

readStatus 0x20
readFaults 0x20
post readStatus 0x20
post readFaults 0x20
readStatus 0x20
readFaults 0x20
post readStatus 0x20
post readFaults 0x20
readStatus 0x20
readFaults 0x20
post readStatus 0x20
post readFaults 0x20
readStatus 0x20
readFaults 0x20
post readStatus 0x20
post readFaults 0x20

-----------------------------

----below is example i have modified-----

/ This example shows basic use of a Pololu High Power Stepper Motor Driver.
//
// It shows how to initialize the driver, configure various settings, and enable
// the driver.  It shows how to step the motor and switch directions using the
// driver's SPI interface through the library's step() and setDirection() member
// functions.
//
// Since SPI is used to trigger steps and set the direction, connecting the
// driver's STEP and DIR pins is optional for this example.  However, note that
// using SPI control adds some overhead compared to using the STEP and DIR pins.
// In addition, since the library caches SPI register values, SPI control is
// more likely to re-enable the driver with the wrong settings (e.g. current
// limit) after a power interruption, although using the verifySettings() and
// applySettings() functions appropriately can help prevent this.
//
// Before using this example, be sure to change the setCurrentMilliamps36v4 line
// to have an appropriate current limit for your system.  Also, see this
// library's documentation for information about how to connect the driver:
//   http://pololu.github.io/high-power-stepper-driver

#include <SPI.h>
#include <HighPowerStepperDriver.h>

//const uint8_t CSPin = 4;
const uint8_t CSPin = 10;

// This period is the length of the delay between steps, which controls the
// stepper motor's speed.  You can increase the delay to make the stepper motor
// go slower.  If you decrease the delay, the stepper motor will go faster, but
// there is a limit to how fast it can go before it starts missing steps.
const uint16_t StepPeriodUs = 2000;

HighPowerStepperDriver sd;
const int LeftStepperSleep = 8;

void setup()
{
  pinMode(LeftStepperSleep, OUTPUT);
  digitalWrite(LeftStepperSleep, HIGH);   // 

  SPI.begin();
  sd.setChipSelectPin(CSPin);

  // Give the driver some time to power up.
  delay(1);

  // Reset the driver to its default settings and clear latched status
  // conditions.
  sd.resetSettings();
  sd.clearStatus();

  // Select auto mixed decay.  TI's DRV8711 documentation recommends this mode
  // for most applications, and we find that it usually works well.
  sd.setDecayMode(HPSDDecayMode::AutoMixed);

  // Set the current limit. You should change the number here to an appropriate
  // value for your particular system.
  sd.setCurrentMilliamps36v4(500);

  // Set the number of microsteps that correspond to one full step.
  sd.setStepMode(HPSDStepMode::MicroStep32);

//sd.clearFaults();
//sd.clearStatus();

  
  // Enable the motor outputs.
  sd.enableDriver();



//    digitalWrite(LeftStepperSleep, HIGH);   // 

}

void loop()
{
  // Step in the default direction 1000 times.
  sd.setDirection(0);
  for(unsigned int x = 0; x < 1000; x++)
  {
    sd.step();
    delayMicroseconds(StepPeriodUs);
  }
Serial.printf("readStatus 0x%x  \n",sd.readStatus());
Serial.printf("readFaults 0x%x  \n",sd.readFaults());
sd.clearFaults();
sd.clearStatus();
Serial.printf("post readStatus 0x%x  \n",sd.readStatus());
Serial.printf("post readFaults 0x%x  \n",sd.readFaults());
  // Wait for 300 ms.
  delay(300);

  // Step in the other direction 1000 times.
  sd.setDirection(1);
  for(unsigned int x = 0; x < 1000; x++)
  {
    sd.step();
    delayMicroseconds(StepPeriodUs);
  }

  // Wait for 300 ms.
  delay(300);
}

-------------------------------------------------

I think i solved my own problem. if i turn on 24v power supply i get continuous UVLO. Then i assert RESET (RESET = 5V (V5 OUT) ) , un assert (RESET = No connect), then UVLO goes to 0 :slight_smile:

P.S. Assume reset should occur before configuring DRV8711, else you might get full current.

my example below.

// This example shows basic use of a Pololu High Power Stepper Motor Driver.
//
// It shows how to initialize the driver, configure various settings, and enable
// the driver.  It shows how to step the motor and switch directions using the
// driver's SPI interface through the library's step() and setDirection() member
// functions.
//
// Since SPI is used to trigger steps and set the direction, connecting the
// driver's STEP and DIR pins is optional for this example.  However, note that
// using SPI control adds some overhead compared to using the STEP and DIR pins.
// In addition, since the library caches SPI register values, SPI control is
// more likely to re-enable the driver with the wrong settings (e.g. current
// limit) after a power interruption, although using the verifySettings() and
// applySettings() functions appropriately can help prevent this.
//
// Before using this example, be sure to change the setCurrentMilliamps36v4 line
// to have an appropriate current limit for your system.  Also, see this
// library's documentation for information about how to connect the driver:
//   http://pololu.github.io/high-power-stepper-driver

#include <SPI.h>
#include <HighPowerStepperDriver.h>

//const uint8_t CSPin = 4;
const uint8_t CSPin = 10;

// This period is the length of the delay between steps, which controls the
// stepper motor's speed.  You can increase the delay to make the stepper motor
// go slower.  If you decrease the delay, the stepper motor will go faster, but
// there is a limit to how fast it can go before it starts missing steps.
const uint16_t StepPeriodUs = 2000;

HighPowerStepperDriver sd;
const int LeftStepperSleep = 8;
const int LeftStepperReset = 6;

void setup()
{
  pinMode(LeftStepperSleep, OUTPUT);
  digitalWrite(LeftStepperSleep, HIGH);   // 

  pinMode(LeftStepperReset, OUTPUT);
  digitalWrite(LeftStepperReset, HIGH);   // 
  delayMicroseconds(1000);
  digitalWrite(LeftStepperReset, LOW);   // 
  delayMicroseconds(1000);

  SPI.begin();
  sd.setChipSelectPin(CSPin);

  // Give the driver some time to power up.
  delay(1);

  // Reset the driver to its default settings and clear latched status
  // conditions.
  sd.resetSettings();
  sd.clearStatus();

  // Select auto mixed decay.  TI's DRV8711 documentation recommends this mode
  // for most applications, and we find that it usually works well.
  sd.setDecayMode(HPSDDecayMode::AutoMixed);

  // Set the current limit. You should change the number here to an appropriate
  // value for your particular system.
  sd.setCurrentMilliamps36v4(1000);

  // Set the number of microsteps that correspond to one full step.
  sd.setStepMode(HPSDStepMode::MicroStep32);

//sd.clearFaults();
//sd.clearStatus();

  
  // Enable the motor outputs.
  sd.enableDriver();



//    digitalWrite(LeftStepperSleep, HIGH);   // 

}

void loop()
{
  // Step in the default direction 1000 times.
  sd.setDirection(0);
  for(unsigned int x = 0; x < 1000; x++)
  {
    sd.step();
    delayMicroseconds(StepPeriodUs);
  }
Serial.printf("readStatus 0x%x  \n",sd.readStatus());
Serial.printf("readFaults 0x%x  \n",sd.readFaults());
sd.clearFaults();
sd.clearStatus();
Serial.printf("post readStatus 0x%x  \n",sd.readStatus());
Serial.printf("post readFaults 0x%x  \n",sd.readFaults());
  // Wait for 300 ms.
  delay(300);

  // Step in the other direction 1000 times.
  sd.setDirection(1);
  for(unsigned int x = 0; x < 1000; x++)
  {
    sd.step();
    delayMicroseconds(StepPeriodUs);
  }

  // Wait for 300 ms.
  delay(300);
}

Hello.

It sounds like you already resolved the issue; thanks for letting us know!

- Amanda