tmc: Only check for tmc2130 reset via CS_ACTUAL if IHOLD > 0

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-03-15 13:48:58 -04:00
parent b4437f8eee
commit 22753f3b38
1 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,9 @@ class TMCErrorCheck:
irun = self.fields.get_field(self.irun_field) irun = self.fields.get_field(self.irun_field)
if self.check_timer is None or irun < 4: if self.check_timer is None or irun < 4:
break break
if (self.irun_field == "IRUN"
and not self.fields.get_field("IHOLD")):
break
# CS_ACTUAL field of zero - indicates a driver reset # CS_ACTUAL field of zero - indicates a driver reset
count += 1 count += 1
if count >= 3: if count >= 3: