From 90217744f02fe0a6f741807d70005093b90443ed Mon Sep 17 00:00:00 2001 From: Sebastiaan Dammann Date: Sun, 20 Dec 2020 15:19:51 +0100 Subject: [PATCH] Add BigTreeTech SKR CR6 board --- Marlin/Configuration.h | 152 ++++++++--------- Marlin/Configuration_adv.h | 140 ++++++++-------- Marlin/src/core/boards.h | 1 + Marlin/src/gcode/calibrate/G28.cpp | 3 +- Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 184 +++++++++++++++++++++ buildroot/tests/STM32F103RE_btt_USB-tests | 11 ++ platformio.ini | 2 +- 8 files changed, 347 insertions(+), 148 deletions(-) create mode 100644 Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5fe746a77ff3..814a18260398 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -103,14 +103,14 @@ * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ -#define SERIAL_PORT 0 +#define SERIAL_PORT -1 /** * Select a secondary serial port on the board to use for communication with the host. * Currently Ethernet (-2) is only supported on Teensy 4.1 boards. * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] */ -//#define SERIAL_PORT_2 -1 +//#define SERIAL_PORT_2 2 /** * This setting determines the communication speed of the printer. @@ -121,14 +121,14 @@ * * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ -#define BAUDRATE 250000 +#define BAUDRATE 115200 // Enable the Bluetooth serial interface on AT90USB devices //#define BLUETOOTH // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define MOTHERBOARD BOARD_BTT_SKR_CR6 #endif // Name displayed in the LCD "Ready" message and Info menu @@ -416,7 +416,7 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_6 0 #define TEMP_SENSOR_7 0 -#define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 @@ -466,7 +466,7 @@ #define HEATER_5_MAXTEMP 275 #define HEATER_6_MAXTEMP 275 #define HEATER_7_MAXTEMP 275 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 120 //=========================================================================== //============================= PID Settings ================================ @@ -481,7 +481,7 @@ #if ENABLED(PIDTEMP) //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) - //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) // Set/get with gcode: M301 E[extruder number, 0-2] @@ -492,9 +492,9 @@ #define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Kd_LIST { 114.00, 114.00 } #else - #define DEFAULT_Kp 22.20 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114.00 + #define DEFAULT_Kp 14.32 + #define DEFAULT_Ki 0.81 + #define DEFAULT_Kd 63.12 #endif #endif // PIDTEMP @@ -515,7 +515,7 @@ * heater. If your configuration is significantly different than this and you don't understand * the issues involved, don't use bed PID until someone else verifies that your hardware works. */ -//#define PIDTEMPBED +#define PIDTEMPBED //#define BED_LIMIT_SWITCHING @@ -565,7 +565,7 @@ * Note: For Bowden Extruders make this large enough to allow load/unload. */ #define PREVENT_LENGTHY_EXTRUDE -#define EXTRUDE_MAXLENGTH 200 +#define EXTRUDE_MAXLENGTH 600 //=========================================================================== //======================== Thermal Runaway Protection ======================= @@ -586,7 +586,7 @@ #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders #define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed -#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber +//#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber //=========================================================================== //============================= Mechanical Settings ========================= @@ -673,15 +673,15 @@ * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ -#define X_DRIVER_TYPE A4988 -#define Y_DRIVER_TYPE A4988 -#define Z_DRIVER_TYPE A4988 +#define X_DRIVER_TYPE TMC2209 +#define Y_DRIVER_TYPE TMC2209 +#define Z_DRIVER_TYPE TMC2209 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 //#define Z3_DRIVER_TYPE A4988 //#define Z4_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE TMC2209 //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 @@ -706,7 +706,7 @@ * * :[2,3,4,5,6,7] */ -//#define ENDSTOP_NOISE_THRESHOLD 2 +#define ENDSTOP_NOISE_THRESHOLD 2 // Check for stuck or disconnected endstops during homing moves. //#define DETECT_BROKEN_ENDSTOP @@ -736,14 +736,14 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 93 } /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } +#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } //#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 #if ENABLED(LIMITED_MAX_FR_EDITING) @@ -756,7 +756,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } +#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 1000 } //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) @@ -771,9 +771,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk limits (mm/s) @@ -783,7 +783,7 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -//#define CLASSIC_JERK +#define CLASSIC_JERK #if ENABLED(CLASSIC_JERK) #define DEFAULT_XJERK 10.0 #define DEFAULT_YJERK 10.0 @@ -791,7 +791,7 @@ //#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves - //#define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2 + #define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2 #if ENABLED(LIMITED_JERK_EDITING) #define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits #endif @@ -839,7 +839,7 @@ #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN // Force the use of the probe for Z-axis homing -//#define USE_PROBE_FOR_Z_HOMING +#define USE_PROBE_FOR_Z_HOMING /** * Z_MIN_PROBE_PIN @@ -883,7 +883,7 @@ * Use the nozzle as the probe, as with a conductive * nozzle system or a piezo-electric smart effector. */ -//#define NOZZLE_AS_PROBE +#define NOZZLE_AS_PROBE /** * Z Servo Probe, such as an endstop switch on a rotating arm. @@ -991,7 +991,7 @@ * | [-] | * O-- FRONT --+ */ -#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } +#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0.2 } // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. @@ -1001,7 +1001,7 @@ #define XY_PROBE_SPEED (133*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) -#define Z_PROBE_SPEED_FAST (4*60) +#define Z_PROBE_SPEED_FAST ((4 * 60) / 2) // Feedrate (mm/min) for the "accurate" probe of each point #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) @@ -1011,7 +1011,7 @@ * A switch indicating proper deployment, or an optical * switch triggered when the carriage is near the bed. */ -//#define PROBE_ACTIVATION_SWITCH +#define PROBE_ACTIVATION_SWITCH #if ENABLED(PROBE_ACTIVATION_SWITCH) #define PROBE_ACTIVATION_SWITCH_STATE LOW // State indicating probe is active //#define PROBE_ACTIVATION_SWITCH_PIN PC6 // Override default pin @@ -1022,11 +1022,11 @@ * Useful for a strain gauge or piezo sensor that needs to factor out * elements such as cables pulling on the carriage. */ -//#define PROBE_TARE +#define PROBE_TARE #if ENABLED(PROBE_TARE) #define PROBE_TARE_TIME 200 // (ms) Time to hold tare pin #define PROBE_TARE_DELAY 200 // (ms) Delay after tare before - #define PROBE_TARE_STATE HIGH // State to write pin for tare + #define PROBE_TARE_STATE LOW // State to write pin for tare //#define PROBE_TARE_PIN PA5 // Override default pin #if ENABLED(PROBE_ACTIVATION_SWITCH) //#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active @@ -1042,7 +1042,7 @@ * A total of 2 does fast/slow probes with a weighted average. * A total of 3 or more adds more slow probes, taking the average. */ -//#define MULTIPLE_PROBING 2 +#define MULTIPLE_PROBING 2 //#define EXTRA_PROBING 1 /** @@ -1060,8 +1060,8 @@ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ #define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points -#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +#define Z_CLEARANCE_BETWEEN_PROBES 7 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 7 // Z Clearance between multiple probes //#define Z_AFTER_PROBING 5 // Z position after probing is done #define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping @@ -1071,7 +1071,7 @@ #define Z_PROBE_OFFSET_RANGE_MAX 20 // Enable the M48 repeatability test to test probe accuracy -//#define Z_MIN_PROBE_REPEATABILITY_TEST +#define Z_MIN_PROBE_REPEATABILITY_TEST // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW @@ -1086,16 +1086,16 @@ * These options are most useful for the BLTouch probe, but may also improve * readings with inductive probes and piezo sensors. */ -//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#define PROBING_HEATERS_OFF // Turn heaters off when probing #if ENABLED(PROBING_HEATERS_OFF) //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) #endif -//#define PROBING_FANS_OFF // Turn fans off when probing +#define PROBING_FANS_OFF // Turn fans off when probing //#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors // Require minimum nozzle and/or bed temperature for probing. -//#define PREHEAT_BEFORE_PROBING +#define PREHEAT_BEFORE_PROBING #if ENABLED(PREHEAT_BEFORE_PROBING) #define PROBING_NOZZLE_TEMP 120 // (°C) Only applies to E0 at this time #define PROBING_BED_TEMP 50 @@ -1125,14 +1125,14 @@ // @section machine // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false +#define INVERT_X_DIR true +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false +#define INVERT_E0_DIR true #define INVERT_E1_DIR false #define INVERT_E2_DIR false #define INVERT_E3_DIR false @@ -1147,10 +1147,10 @@ //#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated. Also enable NO_MOTION_BEFORE_HOMING for extra safety. //#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. -//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... +#define Z_HOMING_HEIGHT 5 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding. -//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z +#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z // Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1] @@ -1161,16 +1161,16 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 200 -#define Y_BED_SIZE 200 +#define X_BED_SIZE 235 +#define Y_BED_SIZE 235 // Travel limits (mm) after homing, corresponding to endstop positions. -#define X_MIN_POS 0 -#define Y_MIN_POS 0 +#define X_MIN_POS -5 +#define Y_MIN_POS -2 #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 200 +#define Z_MAX_POS 250 /** * Software Endstops @@ -1214,12 +1214,12 @@ * RAMPS-based boards use SERVO3_PIN for the first runout sensor. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. */ -//#define FILAMENT_RUNOUT_SENSOR +#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. - #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. + #define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. @@ -1313,7 +1313,7 @@ */ //#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR -//#define AUTO_BED_LEVELING_BILINEAR +#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_UBL //#define MESH_BED_LEVELING @@ -1323,7 +1323,7 @@ * leveling immediately after G28. */ //#define RESTORE_LEVELING_AFTER_G28 -//#define ENABLE_LEVELING_AFTER_G28 +#define ENABLE_LEVELING_AFTER_G28 /** * Auto-leveling needs preheating @@ -1339,7 +1339,7 @@ * Turn on with the command 'M111 S32'. * NOTE: Requires a lot of PROGMEM! */ -//#define DEBUG_LEVELING_FEATURE +#define DEBUG_LEVELING_FEATURE #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, @@ -1359,7 +1359,7 @@ /** * Enable the G26 Mesh Validation Pattern tool. */ - //#define G26_MESH_VALIDATION + #define G26_MESH_VALIDATION #if ENABLED(G26_MESH_VALIDATION) #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. @@ -1374,17 +1374,17 @@ #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. - #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_X 4 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X // Probe along the Y axis, advancing X after each column - //#define PROBE_Y_FIRST + #define PROBE_Y_FIRST #if ENABLED(AUTO_BED_LEVELING_BILINEAR) // Beyond the probed grid, continue the implied tilt? // Default is to maintain the height of the nearest edge. - //#define EXTRAPOLATE_BEYOND_GRID + #define EXTRAPOLATE_BEYOND_GRID // // Experimental Subdivision of the grid by Catmull-Rom method. @@ -1434,12 +1434,12 @@ * Add a bed leveling sub-menu for ABL or MBL. * Include a guided procedure if manual probing is enabled. */ -//#define LCD_BED_LEVELING +#define LCD_BED_LEVELING #if ENABLED(LCD_BED_LEVELING) #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment - //#define MESH_EDIT_MENU // Add a menu to edit mesh points + #define MESH_EDIT_MENU // Add a menu to edit mesh points #endif // Add a menu item to move between bed corners for manual bed adjustment @@ -1484,7 +1484,7 @@ // - Move the Z probe (or nozzle) to a defined XY point before Z Homing. // - Prevent Z homing when the Z probe is outside bed area. // -//#define Z_SAFE_HOMING +#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing @@ -1569,12 +1569,12 @@ * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) */ -//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #if ENABLED(EEPROM_SETTINGS) - //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. + #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. #endif // @@ -1601,13 +1601,13 @@ // Preheat Constants #define PREHEAT_1_LABEL "PLA" -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_TEMP_HOTEND 190 +#define PREHEAT_1_TEMP_BED 60 #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 -#define PREHEAT_2_LABEL "ABS" -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_LABEL "PETG" +#define PREHEAT_2_TEMP_HOTEND 235 +#define PREHEAT_2_TEMP_BED 90 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 /** @@ -1621,7 +1621,7 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z_raise } @@ -1826,7 +1826,7 @@ * SD Card support is disabled by default. If your controller has an SD slot, * you must uncomment the following option or it won't work. */ -//#define SDSUPPORT +#define SDSUPPORT /** * SD CARD: SPI SPEED @@ -1906,7 +1906,7 @@ // // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // -//#define INDIVIDUAL_AXIS_HOMING_MENU +#define INDIVIDUAL_AXIS_HOMING_MENU // // SPEAKER/BUZZER @@ -1923,8 +1923,8 @@ // Note: Test audio output with the G-Code: // M300 S P // -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 -//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 +#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +#define LCD_FEEDBACK_FREQUENCY_HZ 5000 //============================================================================= //======================== LCD / Controller Selection ========================= @@ -2173,7 +2173,7 @@ // This is RAMPS-compatible using a single 10-pin connector. // (For CR-10 owners who want to replace the Melzi Creality board but retain the display) // -//#define CR10_STOCKDISPLAY +#define CR10_STOCKDISPLAY // // Ender-2 OEM display, a variant of the MKS_MINI_12864 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 51c2b8f99419..fda880adbf9c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -186,7 +186,7 @@ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD */ #if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_PERIOD 60 // Seconds #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops @@ -206,7 +206,7 @@ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set * below 2. */ - #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_PERIOD 60 // Seconds #define WATCH_TEMP_INCREASE 2 // Degrees Celsius #endif @@ -220,7 +220,7 @@ /** * As described above, except for the bed (M140/M190/M303). */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_PERIOD 180 // Seconds #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius #endif @@ -395,16 +395,16 @@ * The fan turns on automatically whenever any driver is enabled and turns * off (or reduces to idle speed) shortly after drivers are turned off. */ -//#define USE_CONTROLLER_FAN +#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered + #define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors - //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings + #define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #endif @@ -430,7 +430,7 @@ * * Define one or both of these to override the default 0-255 range. */ -//#define FAN_MIN_PWM 50 +#define FAN_MIN_PWM 50 //#define FAN_MAX_PWM 128 /** @@ -661,7 +661,7 @@ //#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing -//#define QUICK_HOME // If G28 contains XY do a diagonal move first +#define QUICK_HOME // If G28 contains XY do a diagonal move first //#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X //#define HOME_Z_FIRST // Home Z first. Requires a Z-MIN endstop (not a probe). //#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first @@ -1080,14 +1080,14 @@ // Add Probe Z Offset calibration to the Z Probe Offsets menu #if HAS_BED_PROBE - //#define PROBE_OFFSET_WIZARD + #define PROBE_OFFSET_WIZARD #if ENABLED(PROBE_OFFSET_WIZARD) // // Enable to init the Probe Z-Offset when starting the Wizard. // Use a height slightly above the estimated nozzle-to-probe Z offset. // For example, with an offset of -5, consider a starting height of -4. // - //#define PROBE_OFFSET_WIZARD_START_Z -4.0 + #define PROBE_OFFSET_WIZARD_START_Z -0.5 // Set a convenient position to do the calibration (probing point and nozzle/bed-distance) //#define PROBE_OFFSET_WIZARD_XY_POS { X_CENTER, Y_CENTER } @@ -1095,7 +1095,7 @@ #endif // Include a page of printer information in the LCD Main Menu - //#define LCD_INFO_MENU + #define LCD_INFO_MENU #if ENABLED(LCD_INFO_MENU) //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages #endif @@ -1104,7 +1104,7 @@ //#define TURBO_BACK_MENU_ITEM // Add a mute option to the LCD menu - //#define SOUND_MENU_ITEM + #define SOUND_MENU_ITEM /** * LED Control Menu @@ -1144,7 +1144,7 @@ //#define LCD_TIMEOUT_TO_STATUS 15000 // Add an 'M73' G-code to set the current percentage -//#define LCD_SET_PROGRESS_MANUALLY +#define LCD_SET_PROGRESS_MANUALLY // Show the E position (filament used) during printing //#define LCD_SHOW_E_TOTAL @@ -1154,10 +1154,10 @@ #endif #if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) - //#define SHOW_REMAINING_TIME // Display estimated time to completion + #define SHOW_REMAINING_TIME // Display estimated time to completion #if ENABLED(SHOW_REMAINING_TIME) //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation - //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time + #define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time #endif #if HAS_MARLINUI_U8GLIB @@ -1203,7 +1203,7 @@ //#define BROWSE_MEDIA_ON_INSERT // Open the file browser when media is inserted - #define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") + #define EVENT_GCODE_SD_ABORT "G27\nM84" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") #if ENABLED(PRINTER_EVENT_LEDS) #define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination @@ -1217,9 +1217,9 @@ * an option on the LCD screen to continue the print from the last-known * point in the file. */ - //#define POWER_LOSS_RECOVERY + #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) + #define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss //#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) @@ -1258,7 +1258,7 @@ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) */ - //#define SDCARD_SORT_ALPHA + #define SDCARD_SORT_ALPHA // SD Card Sorting options #if ENABLED(SDCARD_SORT_ALPHA) @@ -1278,10 +1278,10 @@ //#define UTF_FILENAME_SUPPORT // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT + #define LONG_FILENAME_HOST_SUPPORT // Enable this option to scroll long filenames in the SD card menu - //#define SCROLL_LONG_FILENAMES + #define SCROLL_LONG_FILENAMES // Leave the heaters on after Stop Print (not recommended!) //#define SD_ABORT_NO_COOLDOWN @@ -1449,13 +1449,13 @@ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) - //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. + #define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM. // Frivolous Game Options - //#define MARLIN_BRICKOUT - //#define MARLIN_INVADERS - //#define MARLIN_SNAKE - //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu + #define MARLIN_BRICKOUT + #define MARLIN_INVADERS + #define MARLIN_SNAKE + #define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu #endif // HAS_MARLINUI_U8GLIB @@ -1630,15 +1630,15 @@ * * Warning: Does not respect endstops! */ -//#define BABYSTEPPING +#define BABYSTEPPING #if ENABLED(BABYSTEPPING) //#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR //#define BABYSTEP_WITHOUT_HOMING //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way - //#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps - #define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep + #define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps + #define BABYSTEP_MULTIPLICATOR_Z 0.01 // (steps or mm) Steps or millimeter distance for each Z babystep #define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. @@ -1653,10 +1653,10 @@ //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 - //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets - //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor #endif #endif @@ -1677,12 +1677,12 @@ * * See https://marlinfw.org/docs/features/lin_advance.html for full instructions. */ -//#define LIN_ADVANCE +#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + #define LIN_ADVANCE_K 0.85 // Unit: mm compression per 1mm/s extruder speed //#define LA_DEBUG // If enabled, this will generate debug information output over USB. - //#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration + #define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration #endif // @section leveling @@ -1927,7 +1927,7 @@ // The ASCII buffer for serial input #define MAX_CMD_SIZE 96 -#define BUFSIZE 4 +#define BUFSIZE 32 // Transmission to Host Buffer Size // To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. @@ -1936,13 +1936,13 @@ // For debug-echo: 128 bytes for the optimal speed. // Other output doesn't need to be that speedy. // :[0, 2, 4, 8, 16, 32, 64, 128, 256] -#define TX_BUFFER_SIZE 0 +#define TX_BUFFER_SIZE 32 // Host Receive Buffer Size // Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. // To use flow control, set this buffer size to at least 1024 bytes. // :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] -//#define RX_BUFFER_SIZE 1024 +#define RX_BUFFER_SIZE 1024 #if RX_BUFFER_SIZE >= 1024 // Enable to have the controller send XON/XOFF control characters to @@ -1971,7 +1971,7 @@ * Currently handles M108, M112, M410, M876 * NOTE: Not yet implemented for all platforms. */ -//#define EMERGENCY_PARSER +#define EMERGENCY_PARSER // Bad Serial-connections can miss a received command by sending an 'ok' // Therefore some clients abort after 30 seconds in a timeout. @@ -2114,12 +2114,12 @@ * Requires NOZZLE_PARK_FEATURE. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. */ -//#define ADVANCED_PAUSE_FEATURE +#define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. - #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. // This short retract is done immediately, before parking the nozzle. - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 40 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. // For Bowden, the full length of the tube and nozzle. @@ -2128,7 +2128,7 @@ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. // 0 to disable start loading and skip to fast load only - #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. // For Bowden, the full length of the tube and nozzle. @@ -2148,14 +2148,14 @@ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload - #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define PAUSE_PARK_NOZZLE_TIMEOUT 90 // (seconds) Time limit before the nozzle is turned off for safety. #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. - //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. //#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change - //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + #define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif @@ -2296,7 +2296,7 @@ #define INTERPOLATE true #if AXIS_IS_TMC(X) - #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_CURRENT 500 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 @@ -2314,7 +2314,7 @@ #endif #if AXIS_IS_TMC(Y) - #define Y_CURRENT 800 + #define Y_CURRENT 600 #define Y_CURRENT_HOME Y_CURRENT #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 @@ -2332,7 +2332,7 @@ #endif #if AXIS_IS_TMC(Z) - #define Z_CURRENT 800 + #define Z_CURRENT 900 #define Z_CURRENT_HOME Z_CURRENT #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 @@ -2473,15 +2473,15 @@ * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers * on the same serial port, either here or in your board's pins file. */ - //#define X_SLAVE_ADDRESS 0 - //#define Y_SLAVE_ADDRESS 0 - //#define Z_SLAVE_ADDRESS 0 + #define X_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 1 + #define Z_SLAVE_ADDRESS 2 //#define X2_SLAVE_ADDRESS 0 //#define Y2_SLAVE_ADDRESS 0 //#define Z2_SLAVE_ADDRESS 0 //#define Z3_SLAVE_ADDRESS 0 //#define Z4_SLAVE_ADDRESS 0 - //#define E0_SLAVE_ADDRESS 0 + #define E0_SLAVE_ADDRESS 3 //#define E1_SLAVE_ADDRESS 0 //#define E2_SLAVE_ADDRESS 0 //#define E3_SLAVE_ADDRESS 0 @@ -2523,15 +2523,15 @@ * { , , hysteresis_start[1..8] } */ #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) - //#define CHOPPER_TIMING_X CHOPPER_DEFAULT_12V // For X Axes (override below) + #define CHOPPER_TIMING_X CHOPPER_DEFAULT_24V // For X Axes (override below) //#define CHOPPER_TIMING_X2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Y CHOPPER_DEFAULT_12V // For Y Axes (override below) + #define CHOPPER_TIMING_Y CHOPPER_DEFAULT_24V // For Y Axes (override below) //#define CHOPPER_TIMING_Y2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Z CHOPPER_DEFAULT_12V // For Z Axes (override below) + #define CHOPPER_TIMING_Z CHOPPER_DEFAULT_24V // For Z Axes (override below) //#define CHOPPER_TIMING_Z2 CHOPPER_DEFAULT_12V //#define CHOPPER_TIMING_Z3 CHOPPER_DEFAULT_12V //#define CHOPPER_TIMING_Z4 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E CHOPPER_DEFAULT_12V // For Extruders (override below) + #define CHOPPER_TIMING_E CHOPPER_DEFAULT_24V // For Extruders (override below) //#define CHOPPER_TIMING_E1 CHOPPER_DEFAULT_12V //#define CHOPPER_TIMING_E2 CHOPPER_DEFAULT_12V //#define CHOPPER_TIMING_E3 CHOPPER_DEFAULT_12V @@ -2551,7 +2551,7 @@ * M912 - Clear stepper driver overtemperature pre-warn condition flag. * M122 - Report driver parameters (Requires TMC_DEBUG) */ - //#define MONITOR_DRIVER_STATUS + #define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) #define CURRENT_STEP_DOWN 50 // [mA] @@ -3295,27 +3295,27 @@ /** * User-defined menu items that execute custom GCode */ -//#define CUSTOM_USER_MENUS +#define CUSTOM_USER_MENUS #if ENABLED(CUSTOM_USER_MENUS) //#define CUSTOM_USER_MENU_TITLE "Custom Commands" #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK //#define USER_SCRIPT_RETURN // Return to status screen after a script - #define USER_DESC_1 "Home & UBL Info" - #define USER_GCODE_1 "G28\nG29 W" + #define USER_DESC_1 "Shutdown / present" + #define USER_GCODE_1 "G0 X125 Y125 Z180" - #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL - #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + //#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) - #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL - #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + //#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) - #define USER_DESC_4 "Heat Bed/Home/Level" - #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + //#define USER_DESC_4 "Heat Bed/Home/Level" + //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" - #define USER_DESC_5 "Home & Info" - #define USER_GCODE_5 "G28\nM503" + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" #endif /** @@ -3670,12 +3670,12 @@ // // M42 - Set pin states // -//#define DIRECT_PIN_CONTROL +#define DIRECT_PIN_CONTROL // // M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe // -//#define PINS_DEBUGGING +#define PINS_DEBUGGING // Enable Marlin dev mode which adds some special commands //#define MARLIN_DEV_MODE diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 15362c49084e..ec39ad4e7188 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -335,6 +335,7 @@ #define BOARD_FLY_MINI 4042 // FLY MINI (STM32F103RCT6) #define BOARD_FLSUN_HISPEED 4043 // FLSUN HiSpeedV1 (STM32F103VET6) #define BOARD_BEAST 4044 // STM32F103RET6 Libmaple-based controller +#define BOARD_BTT_SKR_CR6 4045 // BigTreeTech SKR CR6 v1.0 (STM32F103RE) // // ARM Cortex-M4F diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 23c4d56d936a..c181d528d536 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -241,7 +241,7 @@ void GcodeSuite::G28() { // Disable the leveling matrix before homing #if HAS_LEVELING - const bool leveling_restore_state = ENABLED(ENABLE_LEVELING_AFTER_G28) || TERN0(RESTORE_LEVELING_AFTER_G28, planner.leveling_active); + const bool leveling_restore_state = TERN0(RESTORE_LEVELING_AFTER_G28, planner.leveling_active); TERN_(PROBE_MANUALLY, g29_in_progress = false); // Cancel the active G29 session set_bed_leveling_enabled(false); #endif @@ -436,6 +436,7 @@ void GcodeSuite::G28() { #endif TERN_(RESTORE_LEVELING_AFTER_G28, set_bed_leveling_enabled(leveling_restore_state)); + TERN_(ENABLE_LEVELING_AFTER_G28, set_bed_leveling_enabled(true)); restore_feedrate_and_scaling(); diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 9d1dab10f60c..dbafed2d4e92 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -542,6 +542,8 @@ #include "stm32f1/pins_FLSUN_HISPEED.h" // STM32F1 env:flsun_hispeed #elif MB(BEAST) #include "stm32f1/pins_BEAST.h" // STM32F1 env:STM32F103RE +#elif MB(BTT_SKR_CR6) + #include "stm32f1/pins_BTT_SKR_CR6.h" // STM32F1 env:STM32F103RC_btt_512K_USB // // ARM Cortex-M4F diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h new file mode 100644 index 000000000000..de571cf14eb4 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -0,0 +1,184 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * BigTreeTech SKR CR-6 (STM32F103RET6) board pin assignments + */ + +#define DEFAULT_MACHINE_NAME "Creality3D" +#define BOARD_INFO_NAME "BTT SKR CR-6" + +#if NOT_TARGET(__STM32F1__) + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" +#endif + + +// +// EEPROM +// + +#if NO_EEPROM_SELECTED + #define I2C_EEPROM +#endif + +/* I2C */ +#if ENABLED(I2C_EEPROM) + #define IIC_EEPROM_SDA PB7 + #define IIC_EEPROM_SCL PB6 + + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#elif ENABLED(SDCARD_EEPROM_EMULATION) + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif + +#define E2END (MARLIN_EEPROM_SIZE - 1) // 2KB + + +// +// Limit Switches +// + +#define X_STOP_PIN PC0 +#define Y_STOP_PIN PC1 +#define Z_STOP_PIN PC14 + +#define FIL_RUNOUT_PIN PC15 + +// +// Probe +// +#define PROBE_TARE_PIN PA1 +#define PROBE_ACTIVATION_SWITCH_PIN PC2 // Optoswitch to Enable Z Probe + +// +// Steppers +// +#define X_ENABLE_PIN PB14 +#define X_STEP_PIN PB13 +#define X_DIR_PIN PB12 + +#define Y_ENABLE_PIN PB11 +#define Y_STEP_PIN PB10 +#define Y_DIR_PIN PB2 + +#define Z_ENABLE_PIN PB1 +#define Z_STEP_PIN PB0 +#define Z_DIR_PIN PC5 + +#define E0_ENABLE_PIN PD2 +#define E0_STEP_PIN PB3 +#define E0_DIR_PIN PB4 + +// +// Release PB4 (Z_STEP_PIN) from JTAG NRST role +// +#define DISABLE_DEBUG + +// +// Temperature Sensors +// +#define TEMP_0_PIN PA0 // TH1 +#define TEMP_BED_PIN PC3 // TB1 + +// +// Heaters / Fans +// + +#define HEATER_0_PIN PC8 // HEATER1 +#define HEATER_BED_PIN PC9 // HOT BED + +#define FAN_PIN PC6 // FAN +#define FAN_SOFT_PWM + +#define CONTROLLER_FAN_PIN PC7 + +// +// Display +// + +#if ENABLED(CR10_STOCKDISPLAY) + + #define BTN_ENC PA15 + #define BTN_EN1 PA9 + #define BTN_EN2 PA10 + + #define LCD_PINS_RS PB8 + #define LCD_PINS_ENABLE PB15 + #define LCD_PINS_D4 PB9 + + #define BEEPER_PIN PB5 + +#endif + +// +// USB connect control +// +#define USB_CONNECT_PIN PA14 +#define USB_CONNECT_INVERTING false + +/** + * TMC2209 stepper drivers + * Hardware serial communication ports. + */ +#if HAS_TMC220x + + // + // TMC2208 mode + // + // #define TMC2208_STANDALONE + + #define X_HARDWARE_SERIAL MSerial4 + #define Y_HARDWARE_SERIAL MSerial4 + #define Z_HARDWARE_SERIAL MSerial4 + #define E0_HARDWARE_SERIAL MSerial4 + + // + // TMC2208 Software serial + // + // #define HAVE_SW_SERIAL + + // Reduce baud rate to improve software serial reliability + // #define TMC_BAUD_RATE 19200 + +#endif + +// +// SD Card +// +#define HAS_ONBOARD_SD + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#define ON_BOARD_SPI_DEVICE 1 // SPI1 +#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card + +#define SD_DETECT_PIN PC4 + +// +// Misc. Functions +// + +#define LED_CONTROL_PIN PA13 +#define NEOPIXEL_PIN PA8 diff --git a/buildroot/tests/STM32F103RE_btt_USB-tests b/buildroot/tests/STM32F103RE_btt_USB-tests index e35d68898cf4..349ebe916dc6 100755 --- a/buildroot/tests/STM32F103RE_btt_USB-tests +++ b/buildroot/tests/STM32F103RE_btt_USB-tests @@ -15,5 +15,16 @@ opt_set SERIAL_PORT 1 opt_set SERIAL_PORT_2 -1 exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration" "$3" +restore_configs +opt_set SERIAL_PORT -1 +opt_set SERIAL_PORT_2 2 +opt_set MOTHERBOARD BOARD_BTT_SKR_CR6 +opt_disable NOZZLE_TO_PROBE_OFFSET +opt_enable CR10_STOCKDISPLAY +opt_enable PROBING_HEATERS_OFF PREHEAT_BEFORE_PROBING +opt_enable NOZZLE_AS_PROBE Z_SAFE_HOMING Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +opt_enable PROBE_ACTIVATION_SWITCH PROBE_ACTIVATION_SWITCH_PIN PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE +exec_test $1 $2 "BigTreeTech SKR CR6 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3" + # clean up restore_configs diff --git a/platformio.ini b/platformio.ini index e7f22e3f09e7..f23841c68384 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,7 @@ [platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards -default_envs = mega2560 +default_envs = STM32F103RE_btt_USB include_dir = Marlin #