Clear tmc error flags on init
parent
abf25c2b3e
commit
a71e8045b1
|
|
@ -29,6 +29,9 @@ bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, Mot
|
||||||
///clear reset_flag as we are (re)initializing
|
///clear reset_flag as we are (re)initializing
|
||||||
errorFlags.reset_flag = false;
|
errorFlags.reset_flag = false;
|
||||||
|
|
||||||
|
// clear all error flags if possible ny reading GSTAT
|
||||||
|
ReadRegister(params, Registers::GSTAT);
|
||||||
|
|
||||||
///apply chopper parameters
|
///apply chopper parameters
|
||||||
const uint32_t chopconf = (uint32_t)(TOFF_DEFAULT & TOFF_MASK) << 0U //toff
|
const uint32_t chopconf = (uint32_t)(TOFF_DEFAULT & TOFF_MASK) << 0U //toff
|
||||||
| (uint32_t)(5U & 0x07U) << 4U //hstrt
|
| (uint32_t)(5U & 0x07U) << 4U //hstrt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue