diff --git a/components/tmc/ic/ztmc5130.cpp b/components/tmc/ic/ztmc5130.cpp index ee2adac..651dfa6 100644 --- a/components/tmc/ic/ztmc5130.cpp +++ b/components/tmc/ic/ztmc5130.cpp @@ -40,10 +40,6 @@ void TMC51X0::initialize(cfg_t *cfg) { m_ennpin->initAsOutput(cfg->ennPin, ZGPIO::kMode_nopull, false, true); ZASSERT(m_ennpin); } - if (cfg->spi_mode_select != PinNull) { - m_spi_mode_select_gpio = new ZGPIO(); - m_spi_mode_select_gpio->initAsOutput(cfg->spi_mode_select, ZGPIO::kMode_nopull, false, false); - } m_hspi = cfg->spi; enable(false); @@ -131,7 +127,7 @@ uint8_t TMC51X0::reset() { // TMC5130_AMAX setAcceleration(100); setDeceleration(100); - setIHOLD_IRUN(2, 10, 1); + setIHOLD_IRUN(0, 4, 1); enable(false); return 0; } diff --git a/components/tmc/ic/ztmc5130.hpp b/components/tmc/ic/ztmc5130.hpp index ed5adcf..7802888 100644 --- a/components/tmc/ic/ztmc5130.hpp +++ b/components/tmc/ic/ztmc5130.hpp @@ -80,10 +80,8 @@ class TMC51X0 : public IStepperMotor { typedef struct { SPI_HandleTypeDef *spi; Pin_t csgpio = PinNull; // - Pin_t resetPin = PinNull; // - Pin_t fREEZEPin = PinNull; // Pin_t ennPin = PinNull; // - Pin_t spi_mode_select = PinNull; // + } cfg_t; protected: @@ -91,7 +89,6 @@ class TMC51X0 : public IStepperMotor { ZGPIO *m_csnpin = NULL; ZGPIO *m_ennpin = NULL; - ZGPIO *m_spi_mode_select_gpio = NULL; SPI_HandleTypeDef *m_hspi = NULL; // uint8_t m_channel;