aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc2660.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-03-14 23:27:49 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-03-15 10:28:03 -0400
commit88d0af3da39b732daeeed5ee442772c55016cef5 (patch)
treeb268a527908730be4644c603f45ef470d8446f7b /klippy/extras/tmc2660.py
parent3233ec08f4a7165d54413e7a24b0021053604053 (diff)
downloadkutter-88d0af3da39b732daeeed5ee442772c55016cef5.tar.gz
kutter-88d0af3da39b732daeeed5ee442772c55016cef5.tar.xz
kutter-88d0af3da39b732daeeed5ee442772c55016cef5.zip
tmc2660: Change stallguard flags to better match tmc2130/tmc5160
The tmc2660 spec has an ambiguous "SG" field that sometimes refers to the "stallGuard" flag and sometimes refers to the "SG_RESULT" field. The tmc2130 and tmc5160 have similar fields that are not ambiguous, so adopt that naming strategy. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/tmc2660.py')
-rw-r--r--klippy/extras/tmc2660.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/klippy/extras/tmc2660.py b/klippy/extras/tmc2660.py
index 9d68adf3..4b85d6df 100644
--- a/klippy/extras/tmc2660.py
+++ b/klippy/extras/tmc2660.py
@@ -58,7 +58,7 @@ Fields["DRVCONF"] = {
}
Fields["READRSP@RDSEL0"] = {
- "SG": 0x01 << 4,
+ "stallGuard": 0x01 << 4,
"ot": 0x01 << 5,
"otpw": 0x01 << 6,
"s2ga": 0x01 << 7,
@@ -70,7 +70,7 @@ Fields["READRSP@RDSEL0"] = {
}
Fields["READRSP@RDSEL1"] = {
- "SG": 0x01 << 4,
+ "stallGuard": 0x01 << 4,
"ot": 0x01 << 5,
"otpw": 0x01 << 6,
"s2ga": 0x01 << 7,
@@ -78,11 +78,11 @@ Fields["READRSP@RDSEL1"] = {
"ola": 0x01 << 9,
"olb": 0x01 << 10,
"stst": 0x01 << 11,
- "SG@RDSEL1": 0x3ff << 14
+ "SG_RESULT": 0x3ff << 14
}
Fields["READRSP@RDSEL2"] = {
- "SG": 0x01 << 4,
+ "stallGuard": 0x01 << 4,
"ot": 0x01 << 5,
"otpw": 0x01 << 6,
"s2ga": 0x01 << 7,
@@ -91,7 +91,7 @@ Fields["READRSP@RDSEL2"] = {
"olb": 0x01 << 10,
"stst": 0x01 << 11,
"SE": 0x1f << 14,
- "SG@RDSEL2": 0x1f << 19
+ "SG_RESULT@RDSEL2": 0x1f << 19
}
SignedFields = ["SGT"]
@@ -103,7 +103,6 @@ FieldFormatters.update({
"VSENSE": (lambda v: "%d(%dmV)" % (v, 165 if v else 305)),
"SDOFF": (lambda v: "1(Step/Dir disabled!)" if v else ""),
"DISS2G": (lambda v: "%d(Short to GND disabled!)" if v else ""),
- "SG": (lambda v: "1(Stall!)" if v else ""),
})