Add TMC2209 support (#14249)
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
|
||||
#define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2208) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160))
|
||||
#define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2208) || AXIS_DRIVER_TYPE(ST, TMC2209) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160))
|
||||
#define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N))
|
||||
|
||||
#define M91x_SOME_X (M91x_USE(X) || M91x_USE(X2))
|
||||
@ -41,7 +41,7 @@
|
||||
#define M91x_SOME_E (M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) || M91x_USE_E(5))
|
||||
|
||||
#if !M91x_SOME_X && !M91x_SOME_Y && !M91x_SOME_Z && !M91x_SOME_E
|
||||
#error "MONITOR_DRIVER_STATUS requires at least one TMC2130, TMC2208, or TMC2660."
|
||||
#error "MONITOR_DRIVER_STATUS requires at least one TMC2130, 2160, 2208, 2209, 2660, 5130, or 5160."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -313,39 +313,39 @@
|
||||
bool report = true;
|
||||
const uint8_t index = parser.byteval('I');
|
||||
LOOP_XYZ(i) if (parser.seen(axis_codes[i])) {
|
||||
const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63);
|
||||
const int16_t value = parser.value_int();
|
||||
report = false;
|
||||
switch (i) {
|
||||
#if X_SENSORLESS
|
||||
case X_AXIS:
|
||||
#if AXIS_HAS_STALLGUARD(X)
|
||||
if (index < 2) stepperX.sgt(value);
|
||||
if (index < 2) stepperX.homing_threshold(value);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(X2)
|
||||
if (!(index & 1)) stepperX2.sgt(value);
|
||||
if (!(index & 1)) stepperX2.homing_threshold(value);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if Y_SENSORLESS
|
||||
case Y_AXIS:
|
||||
#if AXIS_HAS_STALLGUARD(Y)
|
||||
if (index < 2) stepperY.sgt(value);
|
||||
if (index < 2) stepperY.homing_threshold(value);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Y2)
|
||||
if (!(index & 1)) stepperY2.sgt(value);
|
||||
if (!(index & 1)) stepperY2.homing_threshold(value);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if Z_SENSORLESS
|
||||
case Z_AXIS:
|
||||
#if AXIS_HAS_STALLGUARD(Z)
|
||||
if (index < 2) stepperZ.sgt(value);
|
||||
if (index < 2) stepperZ.homing_threshold(value);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Z2)
|
||||
if (index == 0 || index == 2) stepperZ2.sgt(value);
|
||||
if (index == 0 || index == 2) stepperZ2.homing_threshold(value);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Z3)
|
||||
if (index == 0 || index == 3) stepperZ3.sgt(value);
|
||||
if (index == 0 || index == 3) stepperZ3.homing_threshold(value);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
|
@ -139,7 +139,7 @@
|
||||
* M119 - Report endstops status.
|
||||
* M120 - Enable endstops detection.
|
||||
* M121 - Disable endstops detection.
|
||||
* M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660 or L6470)
|
||||
* M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
|
||||
* M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
|
||||
* M126 - Solenoid Air Valve Open. (Requires BARICUDA)
|
||||
* M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
|
||||
@ -218,7 +218,7 @@
|
||||
* M504 - Validate EEPROM contents. (Requires EEPROM_SETTINGS)
|
||||
* M524 - Abort the current SD print job started with M24. (Requires SDSUPPORT)
|
||||
* M540 - Enable/disable SD card abort on endstop hit: "M540 S<state>". (Requires SD_ABORT_ON_ENDSTOP_HIT)
|
||||
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130 or TMC2208)
|
||||
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
|
||||
* M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
|
||||
* M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
|
||||
* M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
|
||||
@ -241,13 +241,13 @@
|
||||
* M869 - Report position encoder module error.
|
||||
* M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER)
|
||||
* M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
|
||||
* M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660 or L6470)
|
||||
* M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
|
||||
* M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
|
||||
* M908 - Control digital trimpot directly. (Requires DAC_STEPPER_CURRENT or DIGIPOTSS_PIN)
|
||||
* M909 - Print digipot/DAC current value. (Requires DAC_STEPPER_CURRENT)
|
||||
* M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires DAC_STEPPER_CURRENT)
|
||||
* M911 - Report stepper driver overtemperature pre-warn condition. (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660)
|
||||
* M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660)
|
||||
* M911 - Report stepper driver overtemperature pre-warn condition. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
|
||||
* M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
|
||||
* M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD)
|
||||
* M914 - Set StallGuard sensitivity. (Requires SENSORLESS_HOMING or SENSORLESS_PROBING)
|
||||
* M916 - L6470 tuning: Increase KVAL_HOLD until thermal warning. (Requires at least one _DRIVER_TYPE L6470)
|
||||
|
Reference in New Issue
Block a user