tmc2130: Clear reset_flag by reading GSTAT on power-on
This is required as power-on reset will activate DIAG0, which is used as a trigger for SG.pull/170/head
parent
f1d938b57f
commit
50a5f1db4d
|
|
@ -22,7 +22,8 @@ bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, Mot
|
||||||
if (((IOIN >> 24U) != 0x11) | !(IOIN & (1U << 6U)))
|
if (((IOIN >> 24U) != 0x11) | !(IOIN & (1U << 6U)))
|
||||||
return false; // @@TODO return some kind of failure
|
return false; // @@TODO return some kind of failure
|
||||||
|
|
||||||
///clear reset_flag as we are (re)initializing
|
// read GSTAT to clear reset_flag as we are (re)initializing
|
||||||
|
CheckForErrors(params);
|
||||||
errorFlags.reset_flag = false;
|
errorFlags.reset_flag = false;
|
||||||
|
|
||||||
///apply chopper parameters
|
///apply chopper parameters
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue