如何修复 Marlin random driver error detected coil short circuit crash (Trinamic TMC)
问题:
在 Marlin 3D 打印机固件中使用 Trinamic 驱动器时,你可能会偶尔遇到类似这样的错误
example-4.txt
Recv:
Recv: E driver error detected: 0x10136000
Recv: coil short circuit
Recv: X Y Z E
Recv: Enabled true true true true
Recv: Set current 2000 2000 2000 1000
Recv: RMS current 1999 1999 1999 990
Recv: MAX current 2819 2819 2819 1396
Recv: Run current 31/31 31/31 31/31 19/31
Recv: Hold current 15/31 15/31 15/31 9/31
Recv: Global scaler 167/256 167/256 167/256 133/256
Recv: CS actual 31/31 31/31 22/31 19/31
Recv: PWM scale 196716 33095745 65576 33488924
Recv: vsense
Recv: stealthChop true true true true
Recv: msteps 128 128 128 128
Recv: interp true true true true
Recv: tstep 171 678 max 1580
Recv: PWM thresh. 24 24 411 13
Recv: [mm/s] 102 102 3 41
Recv: OT prewarn false false false false
Recv: triggered
Recv: OTP false false false false
Recv: off time 4 4 4 4
Recv: blank time 24 24 24 24
Recv: hysteresis
Recv: -end 2 2 2 2
Recv: -start 1 1 1 1
Recv: Stallguard thrs 0 0 0 0
Recv: uStep count 62 32 227 497
Recv: DRVSTATUS X Y Z E
Recv: sg_result 0 0 395 0
Recv: stallguard
Recv: fsactive
Recv: stst * * *
Recv: olb
Recv: ola
Recv: s2gb *
Recv: s2ga
Recv: otpw
Recv: ot
Recv: Driver registers:
Recv: X 0x00:1F:40:00
Recv: Y 0x00:1F:40:00
Recv: Z 0x80:16:41:8B
Recv: E 0x10:13:60:00
Recv:
Recv:
Recv: echo:Driver error
Recv: Error:Printer halted. kill() called!
Changing monitoring state from "Printing" to "Error"解决方案
**如果错误总是在每次打印开始时发生,请务必检查你的步进电机设置是否有实际短路!**使用 LCR 表测量电感以确定,它应该在你的电机的额定值左右!有关典型步进电机电感的信息,请参见此文章。
如果错误偶尔发生,数据手册建议你使用更保守的短路检测设置。
你需要在 Marlin/src/module/stepper/trinamic.cpp 中进行此更改。
转到你正在使用的驱动器类型的部分。在我的示例中,这将是
example-3.cpp
// ...
void tmc_init(/* ... */) {
// 注意:tmc_init() 是我们需要插入代码的函数!
}
#endif现在插入,就在 TERN(HYBRID_THRESHOLD, /* ... */) 行之前(如果这样的行不存在,在函数末尾插入:
example-2.cpp
st.shortfilter(3); // 3us SHORT 滤波器
st.s2vs_level(15); // 最低灵敏度电源电压短路保护
st.s2g_level(15); // 最低灵敏度对地短路保护
st.shortdelay(1); // 1.5us 而不是 0.75us 短路延迟
这是使用此设置可能的最保守设置。
现在重试你的打印。
如果这仍然没有帮助,你可以完全禁用短路保护。注意短路保护的存在是为了防止损坏你的步进电机、主板和电缆,所以你应该只在没有其他选择时禁用它!
为了完全禁用短路保护,插入此代码块而不是上面的保守设置代码块:
example-1.cpp
st.diss2g(true);
st.diss2vs(true);在 Marlin 版本 2.0.9.1 上测试
Check out similar posts by category:
3D Printing, Embedded
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow