TMCStepper
TMC2208Stepper.cpp
Go to the documentation of this file.
1 #include "TMCStepper.h"
2 #include "TMC_MACROS.h"
3 #include "SERIAL_SWITCH.h"
4 
5 // Protected
6 // addr needed for TMC2209
7 TMC2208Stepper::TMC2208Stepper(Stream * SerialPort, float RS, uint8_t addr) :
8  TMCStepper(RS),
9  slave_address(addr)
10  {
11  HWSerial = SerialPort;
12  defaults();
13  }
14 
15 TMC2208Stepper::TMC2208Stepper(Stream * SerialPort, float RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2) :
16  TMC2208Stepper(SerialPort, RS)
17  {
18  SSwitch *SMulObj = new SSwitch(mul_pin1, mul_pin2, addr);
19  sswitch = SMulObj;
20  }
21 
22 #if SW_CAPABLE_PLATFORM
23  // Protected
24  // addr needed for TMC2209
25  TMC2208Stepper::TMC2208Stepper(uint16_t SW_RX_pin, uint16_t SW_TX_pin, float RS, uint8_t addr) :
26  TMCStepper(RS),
27  RXTX_pin(SW_RX_pin == SW_TX_pin ? SW_RX_pin : 0),
28  slave_address(addr)
29  {
30  SoftwareSerial *SWSerialObj = new SoftwareSerial(SW_RX_pin, SW_TX_pin);
31  SWSerial = SWSerialObj;
32  defaults();
33  }
34 
35  void TMC2208Stepper::beginSerial(uint32_t baudrate) {
36  if (SWSerial != nullptr)
37  {
38  SWSerial->begin(baudrate);
39  SWSerial->stopListening();
40  }
41  #if defined(ARDUINO_ARCH_AVR)
42  if (RXTX_pin > 0) {
43  digitalWrite(RXTX_pin, HIGH);
44  pinMode(RXTX_pin, OUTPUT);
45  }
46  #endif
47  }
48 #endif
49 
51  #if SW_CAPABLE_PLATFORM
52  beginSerial(115200);
53  #endif
54  pdn_disable(true);
55  mstep_reg_select(true);
56 
57 }
58 
60  GCONF_register.i_scale_analog = 1;
61  GCONF_register.internal_rsense = 0; // OTP
62  GCONF_register.en_spreadcycle = 0; // OTP
63  GCONF_register.multistep_filt = 1; // OTP
64  IHOLD_IRUN_register.iholddelay = 1; // OTP
65  TPOWERDOWN_register.sr = 20;
66  CHOPCONF_register.sr = 0x10000053;
67  PWMCONF_register.sr = 0xC10D0024;
68  //MSLUT0_register.sr = ???;
69  //MSLUT1_register.sr = ???;
70  //MSLUT2_register.sr = ???;
71  //MSLUT3_register.sr = ???;
72  //MSLUT4_register.sr = ???;
73  //MSLUT5_register.sr = ???;
74  //MSLUT6_register.sr = ???;
75  //MSLUT7_register.sr = ???;
76  //MSLUTSTART_register.start_sin90 = 247;
77 }
78 
80  GCONF(GCONF_register.sr);
81  IHOLD_IRUN(IHOLD_IRUN_register.sr);
82  SLAVECONF(SLAVECONF_register.sr);
83  TPOWERDOWN(TPOWERDOWN_register.sr);
84  TPWMTHRS(TPWMTHRS_register.sr);
85  VACTUAL(VACTUAL_register.sr);
86  CHOPCONF(CHOPCONF_register.sr);
87  PWMCONF(PWMCONF_register.sr);
88 }
89 
90 bool TMC2208Stepper::isEnabled() { return !enn() && toff(); }
91 
92 uint8_t TMC2208Stepper::calcCRC(uint8_t datagram[], uint8_t len) {
93  uint8_t crc = 0;
94  for (uint8_t i = 0; i < len; i++) {
95  uint8_t currentByte = datagram[i];
96  for (uint8_t j = 0; j < 8; j++) {
97  if ((crc >> 7) ^ (currentByte & 0x01)) {
98  crc = (crc << 1) ^ 0x07;
99  } else {
100  crc = (crc << 1);
101  }
102  crc &= 0xff;
103  currentByte = currentByte >> 1;
104  }
105  }
106  return crc;
107 }
108 
109 template<class SERIAL_TYPE>
110 int16_t TMC2208Stepper::serial_read(SERIAL_TYPE &serPtr) {
111  return serPtr.read();
112 }
113 template<class SERIAL_TYPE>
114 uint8_t TMC2208Stepper::serial_write(SERIAL_TYPE &serPtr, const uint8_t data) {
115  return serPtr.write(data);
116 }
117 
118 void TMC2208Stepper::write(uint8_t addr, uint32_t regVal) {
119  uint8_t len = 7;
120  addr |= TMC_WRITE;
121  uint8_t datagram[] = {TMC2208_SYNC, slave_address, addr, (uint8_t)(regVal>>24), (uint8_t)(regVal>>16), (uint8_t)(regVal>>8), (uint8_t)(regVal>>0), 0x00};
122 
123  datagram[len] = calcCRC(datagram, len);
124 
125  #if SW_CAPABLE_PLATFORM
126  if (SWSerial != nullptr) {
127  for(uint8_t i=0; i<=len; i++){
128  bytesWritten += serial_write(*SWSerial, datagram[i]);
129  }
130  } else
131  #endif
132  {
133  if (sswitch != nullptr)
134  sswitch->active();
135 
136  for(uint8_t i=0; i<=len; i++){
137  bytesWritten += serial_write(*HWSerial, datagram[i]);
138  }
139  }
140  delay(replyDelay);
141 }
142 
143 template<typename SERIAL_TYPE>
144 uint64_t TMC2208Stepper::_sendDatagram(SERIAL_TYPE &serPtr, uint8_t datagram[], const uint8_t len, uint16_t timeout) {
145  while (serPtr.available() > 0) serial_read(serPtr); // Flush
146 
147  #if defined(ARDUINO_ARCH_AVR)
148  if (RXTX_pin > 0) {
149  digitalWrite(RXTX_pin, HIGH);
150  pinMode(RXTX_pin, OUTPUT);
151  }
152  #endif
153 
154  for(int i=0; i<=len; i++) serial_write(serPtr, datagram[i]);
155 
156  #if defined(ARDUINO_ARCH_AVR)
157  if (RXTX_pin > 0) {
158  pinMode(RXTX_pin, INPUT_PULLUP);
159  }
160  #endif
161 
162  delay(this->replyDelay);
163 
164  // scan for the rx frame and read it
165  uint32_t ms = millis();
166  uint32_t sync_target = (static_cast<uint32_t>(datagram[0])<<16) | 0xFF00 | datagram[2];
167  uint32_t sync = 0;
168 
169  do {
170  uint32_t ms2 = millis();
171  if (ms2 != ms) {
172  // 1ms tick
173  ms = ms2;
174  timeout--;
175  }
176  if (!timeout) return 0;
177 
178  int16_t res = serial_read(serPtr);
179  if (res < 0) continue;
180 
181  sync <<= 8;
182  sync |= res & 0xFF;
183  sync &= 0xFFFFFF;
184 
185  } while (sync != sync_target);
186 
187  uint64_t out = sync;
188  ms = millis();
189  timeout = this->abort_window;
190 
191  for(uint8_t i=0; i<5;) {
192  uint32_t ms2 = millis();
193  if (ms2 != ms) {
194  // 1ms tick
195  ms = ms2;
196  timeout--;
197  }
198  if (!timeout) return 0;
199 
200  int16_t res = serial_read(serPtr);
201  if (res < 0) continue;
202 
203  out <<= 8;
204  out |= res & 0xFF;
205 
206  i++;
207  }
208 
209  #if defined(ARDUINO_ARCH_AVR)
210  if (RXTX_pin > 0) {
211  digitalWrite(RXTX_pin, HIGH);
212  pinMode(RXTX_pin, OUTPUT);
213  }
214  #endif
215 
216  while (serPtr.available() > 0) serial_read(serPtr); // Flush
217 
218  return out;
219 }
220 
221 uint32_t TMC2208Stepper::read(uint8_t addr) {
222  constexpr uint8_t len = 3;
223  addr |= TMC_READ;
224  uint8_t datagram[] = {TMC2208_SYNC, slave_address, addr, 0x00};
225  datagram[len] = calcCRC(datagram, len);
226  uint64_t out = 0x00000000UL;
227 
228  for (uint8_t i = 0; i < max_retries; i++) {
229  #if SW_CAPABLE_PLATFORM
230  if (SWSerial != nullptr) {
231  SWSerial->listen();
232  out = _sendDatagram(*SWSerial, datagram, len, abort_window);
233  SWSerial->stopListening();
234  } else
235  #endif
236  {
237  if (sswitch != nullptr)
238  sswitch->active();
239 
240  out = _sendDatagram(*HWSerial, datagram, len, abort_window);
241  }
242 
243  delay(replyDelay);
244 
245  CRCerror = false;
246  uint8_t out_datagram[] = {
247  static_cast<uint8_t>(out>>56),
248  static_cast<uint8_t>(out>>48),
249  static_cast<uint8_t>(out>>40),
250  static_cast<uint8_t>(out>>32),
251  static_cast<uint8_t>(out>>24),
252  static_cast<uint8_t>(out>>16),
253  static_cast<uint8_t>(out>> 8),
254  static_cast<uint8_t>(out>> 0)
255  };
256  uint8_t crc = calcCRC(out_datagram, 7);
257  if ((crc != static_cast<uint8_t>(out)) || crc == 0 ) {
258  CRCerror = true;
259  out = 0;
260  } else {
261  break;
262  }
263  }
264 
265  return out>>8;
266 }
267 
269  return read(IFCNT_t::address);
270 }
271 
272 void TMC2208Stepper::SLAVECONF(uint16_t input) {
273  SLAVECONF_register.sr = input&0xF00;
274  write(SLAVECONF_register.address, SLAVECONF_register.sr);
275 }
277  return SLAVECONF_register.sr;
278 }
279 void TMC2208Stepper::senddelay(uint8_t B) { SLAVECONF_register.senddelay = B; write(SLAVECONF_register.address, SLAVECONF_register.sr); }
280 uint8_t TMC2208Stepper::senddelay() { return SLAVECONF_register.senddelay; }
281 
282 void TMC2208Stepper::OTP_PROG(uint16_t input) {
283  write(OTP_PROG_t::address, input);
284 }
285 
287  return read(OTP_READ_t::address);
288 }
289 
292 }
293 bool TMC2208Stepper::enn() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.enn; }
294 bool TMC2208Stepper::ms1() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.ms1; }
295 bool TMC2208Stepper::ms2() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.ms2; }
296 bool TMC2208Stepper::diag() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.diag; }
297 bool TMC2208Stepper::pdn_uart() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.pdn_uart; }
298 bool TMC2208Stepper::step() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.step; }
299 bool TMC2208Stepper::sel_a() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.sel_a; }
300 bool TMC2208Stepper::dir() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.dir; }
301 uint8_t TMC2208Stepper::version() { TMC2208_n::IOIN_t r{0}; r.sr = IOIN(); return r.version; }
302 
305 }
306 bool TMC2224Stepper::enn() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.enn; }
307 bool TMC2224Stepper::ms1() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.ms1; }
308 bool TMC2224Stepper::ms2() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.ms2; }
309 bool TMC2224Stepper::pdn_uart() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.pdn_uart; }
310 bool TMC2224Stepper::spread() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.spread; }
311 bool TMC2224Stepper::step() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.step; }
312 bool TMC2224Stepper::sel_a() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.sel_a; }
313 bool TMC2224Stepper::dir() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.dir; }
314 uint8_t TMC2224Stepper::version() { TMC2224_n::IOIN_t r{0}; r.sr = IOIN(); return r.version; }
315 
317  return read(FACTORY_CONF_register.address);
318 }
319 void TMC2208Stepper::FACTORY_CONF(uint16_t input) {
320  FACTORY_CONF_register.sr = input;
321  write(FACTORY_CONF_register.address, FACTORY_CONF_register.sr);
322 }
323 void TMC2208Stepper::fclktrim(uint8_t B){ FACTORY_CONF_register.fclktrim = B; write(FACTORY_CONF_register.address, FACTORY_CONF_register.sr); }
324 void TMC2208Stepper::ottrim(uint8_t B) { FACTORY_CONF_register.ottrim = B; write(FACTORY_CONF_register.address, FACTORY_CONF_register.sr); }
325 uint8_t TMC2208Stepper::fclktrim() { FACTORY_CONF_t r{0}; r.sr = FACTORY_CONF(); return r.fclktrim; }
326 uint8_t TMC2208Stepper::ottrim() { FACTORY_CONF_t r{0}; r.sr = FACTORY_CONF(); return r.ottrim; }
327 
328 void TMC2208Stepper::VACTUAL(uint32_t input) {
329  VACTUAL_register.sr = input;
330  write(VACTUAL_register.address, VACTUAL_register.sr);
331 }
333  return VACTUAL_register.sr;
334 }
335 
338 }
341  r.sr = PWM_SCALE();
342  return r.pwm_scale_sum;
343 }
344 
347  r.sr = PWM_SCALE();
348  return r.pwm_scale_auto;
349  // Not two's complement? 9nth bit determines sign
350  /*
351  uint32_t d = PWM_SCALE();
352  int16_t response = (d>>PWM_SCALE_AUTO_bp)&0xFF;
353  if (((d&PWM_SCALE_AUTO_bm) >> 24) & 0x1) return -response;
354  else return response;
355  */
356 }
357 
358 // R: PWM_AUTO
360  return read(PWM_AUTO_t::address);
361 }
362 uint8_t TMC2208Stepper::pwm_ofs_auto() { PWM_AUTO_t r{0}; r.sr = PWM_AUTO(); return r.pwm_ofs_auto; }
363 uint8_t TMC2208Stepper::pwm_grad_auto() { PWM_AUTO_t r{0}; r.sr = PWM_AUTO(); return r.pwm_grad_auto; }
TMC2208Stepper::TMC2208_SYNC
static constexpr uint8_t TMC2208_SYNC
Definition: TMCStepper.h:999
TMC2224_n::IOIN_t::sr
uint32_t sr
Definition: TMC2208_bitfields.h:52
TMC2208_n::PWM_SCALE_t
Definition: TMC2208_bitfields.h:168
TMC2208Stepper::IOIN
uint32_t IOIN()
Definition: TMC2208Stepper.cpp:290
TMC2208Stepper::pwm_grad_auto
uint8_t pwm_grad_auto()
Definition: TMC2208Stepper.cpp:363
TMC2208Stepper::PWMCONF
uint32_t PWMCONF()
Definition: PWMCONF.cpp:54
TMC2208Stepper::OTP_PROG_t::address
constexpr static uint8_t address
Definition: TMCStepper.h:977
TMCStepper
Definition: TMCStepper.h:51
TMC2208_n::IOIN_t::sr
uint32_t sr
Definition: TMC2208_bitfields.h:29
PWM_AUTO_t::sr
uint32_t sr
Definition: TMC5160_bitfields.h:52
TMC2208Stepper::ms2
bool ms2()
Definition: TMC2208Stepper.cpp:295
TMC2208_n::PWM_SCALE_t::address
constexpr static uint8_t address
Definition: TMC2208_bitfields.h:169
TMC2208Stepper::enn
bool enn()
Definition: TMC2208Stepper.cpp:293
TMC2208Stepper::replyDelay
static constexpr uint8_t replyDelay
Definition: TMCStepper.h:1001
TMC2208Stepper::sel_a
bool sel_a()
Definition: TMC2208Stepper.cpp:299
TMC2208Stepper::read
uint32_t read(uint8_t)
Definition: TMC2208Stepper.cpp:221
TMC2208Stepper::push
void push()
Definition: TMC2208Stepper.cpp:79
TMC2208Stepper::OTP_READ
uint32_t OTP_READ()
Definition: TMC2208Stepper.cpp:286
TMC2208Stepper::HWSerial
Stream * HWSerial
Definition: TMCStepper.h:985
TMC2224Stepper::dir
bool dir()
Definition: TMC2208Stepper.cpp:313
SSwitch
Definition: SERIAL_SWITCH.h:6
TMC2208Stepper::TMC2208Stepper
TMC2208Stepper(Stream *SerialPort, float RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2)
Definition: TMC2208Stepper.cpp:15
TMC2208Stepper::senddelay
uint8_t senddelay()
Definition: TMC2208Stepper.cpp:280
TMC2208Stepper::pwm_scale_sum
uint8_t pwm_scale_sum()
Definition: TMC2208Stepper.cpp:339
FACTORY_CONF_t::sr
uint16_t sr
Definition: TMC2208_bitfields.h:73
TMC2208Stepper::pdn_uart
bool pdn_uart()
Definition: TMC2208Stepper.cpp:297
TMC2208Stepper::bytesWritten
uint16_t bytesWritten
Definition: TMCStepper.h:965
TMC2208Stepper::version
uint8_t version()
Definition: TMC2208Stepper.cpp:301
TMC2208_n::IOIN_t
Definition: TMC2208_bitfields.h:26
TMC2208Stepper::PWM_AUTO
uint32_t PWM_AUTO()
Definition: TMC2208Stepper.cpp:359
TMC2224Stepper::step
bool step()
Definition: TMC2208Stepper.cpp:311
TMCStepper.h
TMC2208Stepper::beginSerial
void beginSerial(uint32_t)=delete
TMC2208Stepper::SLAVECONF
uint16_t SLAVECONF()
Definition: TMC2208Stepper.cpp:276
TMC2224Stepper::pdn_uart
bool pdn_uart()
Definition: TMC2208Stepper.cpp:309
TMC2224Stepper::version
uint8_t version()
Definition: TMC2208Stepper.cpp:314
TMCStepper::TMC_READ
static constexpr uint8_t TMC_READ
Definition: TMCStepper.h:113
TMC2208Stepper::ottrim
uint8_t ottrim()
Definition: TMC2208Stepper.cpp:326
TMC2208Stepper::IFCNT
uint8_t IFCNT()
Definition: TMC2208Stepper.cpp:268
PWM_AUTO_t
Definition: TMC5160_bitfields.h:49
TMC2208Stepper::dir
bool dir()
Definition: TMC2208Stepper.cpp:300
TMC2208Stepper::sswitch
SSwitch * sswitch
Definition: TMCStepper.h:991
TMC2224Stepper::sel_a
bool sel_a()
Definition: TMC2208Stepper.cpp:312
TMC2208Stepper::isEnabled
bool isEnabled()
Definition: TMC2208Stepper.cpp:90
TMC2208_n::PWM_SCALE_t::sr
uint32_t sr
Definition: TMC2208_bitfields.h:171
TMC_MACROS.h
TMC2208Stepper::pwm_ofs_auto
uint8_t pwm_ofs_auto()
Definition: TMC2208Stepper.cpp:362
TMC2208Stepper::max_retries
static constexpr uint8_t max_retries
Definition: TMCStepper.h:1003
TMC2208Stepper::pwm_scale_auto
int16_t pwm_scale_auto()
Definition: TMC2208Stepper.cpp:345
TMC2208Stepper::PWM_SCALE
uint32_t PWM_SCALE()
Definition: TMC2208Stepper.cpp:336
TMCStepper::TMC_WRITE
static constexpr uint8_t TMC_WRITE
Definition: TMCStepper.h:114
TMC2208Stepper::pdn_disable
bool pdn_disable()
Definition: GCONF.cpp:91
TMC2224_n::IOIN_t
Definition: TMC2208_bitfields.h:49
TMC2208Stepper::toff
uint8_t toff()
Definition: CHOPCONF.cpp:72
PWM_AUTO_t::address
constexpr static uint8_t address
Definition: TMC5160_bitfields.h:50
TMC2224Stepper::spread
bool spread()
Definition: TMC2208Stepper.cpp:310
TMC2208Stepper::calcCRC
uint8_t calcCRC(uint8_t datagram[], uint8_t len)
Definition: TMC2208Stepper.cpp:92
TMC2208Stepper::GCONF
uint32_t GCONF()
Definition: GCONF.cpp:67
TMC2224Stepper::ms2
bool ms2()
Definition: TMC2208Stepper.cpp:308
SSwitch::active
void active()
Definition: SERIAL_SWITCH.cpp:12
TMC2208Stepper::CHOPCONF
uint32_t CHOPCONF()
Definition: CHOPCONF.cpp:58
SERIAL_SWITCH.h
TMC2224_n::IOIN_t::address
constexpr static uint8_t address
Definition: TMC2208_bitfields.h:50
TMC2208Stepper::FACTORY_CONF
uint16_t FACTORY_CONF()
Definition: TMC2208Stepper.cpp:316
FACTORY_CONF_t
Definition: TMC2208_bitfields.h:70
TMC2224Stepper::IOIN
uint32_t IOIN()
Definition: TMC2208Stepper.cpp:303
TMC2208Stepper
Definition: TMCStepper.h:806
TMC2208Stepper::mstep_reg_select
bool mstep_reg_select()
Definition: GCONF.cpp:92
TMC2208Stepper::write
void write(uint8_t, uint32_t)
Definition: TMC2208Stepper.cpp:118
TMCStepper::TPOWERDOWN
uint8_t TPOWERDOWN()
Definition: TMCStepper.cpp:123
TMC2208_n::IOIN_t::address
constexpr static uint8_t address
Definition: TMC2208_bitfields.h:27
TMC2208Stepper::OTP_READ_t::address
constexpr static uint8_t address
Definition: TMCStepper.h:978
TMC2208Stepper::defaults
void defaults()
Definition: TMC2208Stepper.cpp:59
TMC2208Stepper::slave_address
const uint8_t slave_address
Definition: TMCStepper.h:997
TMC2224Stepper::ms1
bool ms1()
Definition: TMC2208Stepper.cpp:307
TMC2208Stepper::_sendDatagram
uint64_t _sendDatagram(SERIAL_TYPE &, uint8_t[], const uint8_t, uint16_t)
Definition: TMC2208Stepper.cpp:144
TMC2208Stepper::diag
bool diag()
Definition: TMC2208Stepper.cpp:296
TMC2208Stepper::serial_read
int16_t serial_read(SERIAL_TYPE &serPtr) __attribute__((weak))
Definition: TMC2208Stepper.cpp:110
TMC2208Stepper::begin
void begin()
Definition: TMC2208Stepper.cpp:50
TMC2208Stepper::IFCNT_t::address
constexpr static uint8_t address
Definition: TMCStepper.h:976
TMC2208Stepper::VACTUAL
uint32_t VACTUAL()
Definition: TMC2208Stepper.cpp:332
TMC2208Stepper::fclktrim
uint8_t fclktrim()
Definition: TMC2208Stepper.cpp:325
TMC2208Stepper::serial_write
uint8_t serial_write(SERIAL_TYPE &serPtr, const uint8_t data) __attribute__((weak))
Definition: TMC2208Stepper.cpp:114
TMC2208Stepper::OTP_PROG
void OTP_PROG(uint16_t input)
Definition: TMC2208Stepper.cpp:282
TMCStepper::IHOLD_IRUN
uint32_t IHOLD_IRUN()
Definition: IHOLD_IRUN.cpp:8
TMC2208Stepper::abort_window
static constexpr uint8_t abort_window
Definition: TMCStepper.h:1002
TMC2208Stepper::ms1
bool ms1()
Definition: TMC2208Stepper.cpp:294
TMC2224Stepper::enn
bool enn()
Definition: TMC2208Stepper.cpp:306
TMCStepper::TPWMTHRS
uint32_t TPWMTHRS()
Definition: TMCStepper.cpp:133
TMC2208Stepper::CRCerror
bool CRCerror
Definition: TMCStepper.h:967
TMC2208Stepper::step
bool step()
Definition: TMC2208Stepper.cpp:298