From 060e7a3565be6a37da887c255111432afb45309b Mon Sep 17 00:00:00 2001 From: silentninja1 Date: Tue, 24 Jul 2018 15:44:50 -0400 Subject: [PATCH 01/15] Silentninja1 idex crash fix (#11329) * Move home all axis prototype to allow access from UBL.h * Remove home all axis command as it exists in marlin.h now * Reverse order of tool change and home Race condition causes E0 carriage to move on E1 commands and crash into parked head if order is reversed. Needs more research into permanent fix, but this will prevent damage to machines in the meantime. --- Marlin/Marlin.h | 2 ++ Marlin/ubl.h | 1 - Marlin/ubl_G29.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index d5cae084ea96..27d7e49e5cba 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -301,6 +301,8 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ]; void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false); +void home_all_axes(); + void report_current_position(); #if IS_KINEMATIC diff --git a/Marlin/ubl.h b/Marlin/ubl.h index 873e5e6ec45e..03380af45281 100644 --- a/Marlin/ubl.h +++ b/Marlin/ubl.h @@ -54,7 +54,6 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP }; // External references char *ftostr43sign(const float&, char); -void home_all_axes(); extern uint8_t ubl_cnt; diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 0286a7685843..2345da715e59 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -296,10 +296,10 @@ // Check for commands that require the printer to be homed if (may_move) { - if (axis_unhomed_error()) home_all_axes(); #if ENABLED(DUAL_X_CARRIAGE) if (active_extruder != 0) tool_change(0); #endif + if (axis_unhomed_error()) home_all_axes(); } // Invalidate Mesh Points. This command is a little bit asymmetrical because From ed0e72bf441262ba98b615d09179193f06dfe036 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Jul 2018 21:02:10 -0500 Subject: [PATCH 02/15] Fix spelling in configs --- Marlin/Configuration.h | 2 +- Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h | 2 +- Marlin/example_configurations/AliExpress/CL-260/Configuration.h | 2 +- Marlin/example_configurations/Anet/A6/Configuration.h | 2 +- Marlin/example_configurations/Anet/A8/Configuration.h | 2 +- .../example_configurations/BIBO/TouchX/Cyclops/Configuration.h | 2 +- .../example_configurations/BIBO/TouchX/default/Configuration.h | 2 +- Marlin/example_configurations/BQ/Hephestos/Configuration.h | 2 +- Marlin/example_configurations/BQ/Hephestos_2/Configuration.h | 2 +- Marlin/example_configurations/BQ/WITBOX/Configuration.h | 2 +- Marlin/example_configurations/Cartesio/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-10/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-10S/Configuration.h | 2 +- .../example_configurations/Creality/CR-10mini/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-8/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-2/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-3/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-4/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 2 +- Marlin/example_configurations/Felix/DUAL/Configuration.h | 2 +- .../example_configurations/FolgerTech/i3-2020/Configuration.h | 2 +- Marlin/example_configurations/Geeetech/GT2560/Configuration.h | 2 +- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro B/bltouch/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro B/noprobe/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro C/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro W/Configuration.h | 2 +- Marlin/example_configurations/Infitary/i3-M508/Configuration.h | 2 +- Marlin/example_configurations/JGAurora/A5/Configuration.h | 2 +- Marlin/example_configurations/Malyan/M150/Configuration.h | 2 +- .../example_configurations/Micromake/C1/basic/Configuration.h | 2 +- .../Micromake/C1/enhanced/Configuration.h | 2 +- Marlin/example_configurations/RepRapPro/Huxley/Configuration.h | 2 +- .../RepRapWorld/Megatronics/Configuration.h | 2 +- Marlin/example_configurations/RigidBot/Configuration.h | 2 +- Marlin/example_configurations/SCARA/Configuration.h | 2 +- Marlin/example_configurations/Sanguinololu/Configuration.h | 2 +- Marlin/example_configurations/TinyBoy2/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X1/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X3A/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X5S/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/XY100/Configuration.h | 2 +- Marlin/example_configurations/Velleman/K8200/Configuration.h | 2 +- Marlin/example_configurations/Velleman/K8400/Configuration.h | 2 +- .../Velleman/K8400/Dual-head/Configuration.h | 2 +- .../example_configurations/Wanhao/Duplicator 6/Configuration.h | 2 +- Marlin/example_configurations/adafruit/ST7565/Configuration.h | 2 +- .../delta/FLSUN/auto_calibrate/Configuration.h | 2 +- .../example_configurations/delta/FLSUN/kossel/Configuration.h | 2 +- .../delta/FLSUN/kossel_mini/Configuration.h | 2 +- .../example_configurations/delta/Hatchbox_Alpha/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_pro/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_xl/Configuration.h | 2 +- Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 2 +- Marlin/example_configurations/wt150/Configuration.h | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 0f1a0a05730b..039f71161a60 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 366e31d2989c..10af71defefa 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 2e232308d8f7..bb888ca17e42 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 2ccd65c5ee1f..ecda01d00262 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index bf2eb2b9d8da..cb2e41053c98 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index aa0939ae5538..785632d154cc 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index c929cc2d5186..c4e3beee0a69 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index ac477d826887..710f151f861b 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index 33e1007e3384..d09db1c5deff 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -95,7 +95,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index bf04c6d69693..783d77fbaa2c 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index c4cdb1651a7b..edf7b900073d 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index c3b488d5d14d..cb8f06a7389e 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index c66325202856..38e3c2e6390b 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 1cb729233865..00406c6dee9d 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -96,7 +96,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index e7280db80143..4d96f87c947e 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index 9f0460bff72f..a16e035a5fd2 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration.h b/Marlin/example_configurations/Creality/Ender-3/Configuration.h index 2832d3ae032c..f49d9cbe066a 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index fa652d539d7c..f35e78f8766a 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 51be31ddf254..5dde0ea86ec4 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index b964c31a880d..92fe44181aa8 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index 39c8a2fd4ca7..ed7bc534f4aa 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index c17d2abb62df..e6424e38a9ca 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index 72753972ffff..4b40c03f354e 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 6847fb68479d..5dfe445a46b0 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index da021c22a668..d0aa6e5a28d9 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h index 6a1d33946772..85a79551e965 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h index 27bb1f256c98..edf9bb27bd46 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index 24c1bf135d44..89eb56f2432a 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index 3609ffa3beeb..ab3b34479f6c 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -92,7 +92,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index bf90e86fbe8b..862668a1be02 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -92,7 +92,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 1d25c1de5e43..f9057b9c7b1b 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index 99c53c8d6de2..ad5f6bf0c6f5 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 05ada2c42405..80745d7cc495 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 3aed18ed0fe3..a9206ce45aed 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index b933580a0613..be75b513a0ba 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index c1f54f804b20..57711b657ca9 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -118,7 +118,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 5e24dd47e5ce..b0b4f37b6bbc 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 1bf83976fb3c..949c06353bac 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -103,7 +103,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 5ae282e082ec..9f6008b77c6b 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration.h b/Marlin/example_configurations/Tronxy/X3A/Configuration.h index f58475c7f42e..19dc28d37192 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index 6be340c7f637..f920c27e78b3 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index 5e366e4e7206..f0928219bd7e 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index ee0ba9a35d0b..6ed7c4f7b849 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -103,7 +103,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index eef03492f654..9b249993c936 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index b2ba095927db..dc7d416b501d 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index a1902b02c9c8..252e328a3061 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 11b2ad30d7fb..5854b7aa5e4c 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 70f2810dd432..46882971037a 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index a580ed913045..d8edecc5d7ca 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index cbcf15b3d2b6..11676cb6c943 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 983b9c3d4e05..445518951bc2 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -92,7 +92,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 52ea4b6198f9..5b534aed5856 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index ec0d81d13e4f..857f9ac10996 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index a0f7b3118718..b84d4124aaa4 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -91,7 +91,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 8784e9060071..3ab120663b83 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index b5e1cb0a031f..de6dfbca452b 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 9e099221622d..dccd1df12618 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index c487d8f14e0b..8e311377046c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 2f7a64ba60f1..6c72089deebc 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -87,7 +87,7 @@ * by the standard Marlin logo with version number and web URL. * * We encourage you to take advantage of this new feature and we also - * respecfully request that you retain the unmodified Marlin boot screen. + * respectfully request that you retain the unmodified Marlin boot screen. */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. From 57ce81f067ebb3e7fcccef5d6dc344325b2794ae Mon Sep 17 00:00:00 2001 From: silentninja1 Date: Wed, 25 Jul 2018 03:21:05 -0400 Subject: [PATCH 03/15] [1.1.x] Fix LCD axis move E index (#11328) --- Marlin/ultralcd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index ac78b5bc10ce..258f90fa9025 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2919,7 +2919,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #if EXTRUDERS > 1 const int8_t old_extruder = active_extruder; - active_extruder = manual_move_e_index; + if (manual_move_axis == E_AXIS) active_extruder = manual_move_e_index; #endif // Set movement on a single axis @@ -2945,7 +2945,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #else - planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]), manual_move_e_index); + planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]), manual_move_axis == E_AXIS ? manual_move_e_index : active_extruder); manual_move_axis = (int8_t)NO_AXIS; #endif From 6d6bdc65177bc1d5bbf98297901ddbd5ed2a6b8a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Jul 2018 19:54:08 -0500 Subject: [PATCH 04/15] Add *_DRIVER_TYPE to example configs --- .../AlephObjects/TAZ4/Configuration.h | 23 ++++ .../AlephObjects/TAZ4/Configuration_adv.h | 111 +++++------------- .../AliExpress/CL-260/Configuration.h | 23 ++++ .../Anet/A6/Configuration.h | 23 ++++ .../Anet/A6/Configuration_adv.h | 111 +++++------------- .../Anet/A8/Configuration.h | 23 ++++ .../Anet/A8/Configuration_adv.h | 111 +++++------------- .../BIBO/TouchX/Cyclops/Configuration.h | 23 ++++ .../BIBO/TouchX/Cyclops/Configuration_adv.h | 111 +++++------------- .../BIBO/TouchX/default/Configuration.h | 23 ++++ .../BIBO/TouchX/default/Configuration_adv.h | 111 +++++------------- .../BQ/Hephestos/Configuration.h | 23 ++++ .../BQ/Hephestos/Configuration_adv.h | 111 +++++------------- .../BQ/Hephestos_2/Configuration.h | 23 ++++ .../BQ/Hephestos_2/Configuration_adv.h | 111 +++++------------- .../BQ/WITBOX/Configuration.h | 23 ++++ .../BQ/WITBOX/Configuration_adv.h | 111 +++++------------- .../Cartesio/Configuration.h | 23 ++++ .../Cartesio/Configuration_adv.h | 111 +++++------------- .../Creality/CR-10/Configuration.h | 23 ++++ .../Creality/CR-10/Configuration_adv.h | 111 +++++------------- .../Creality/CR-10S/Configuration.h | 23 ++++ .../Creality/CR-10S/Configuration_adv.h | 111 +++++------------- .../Creality/CR-10mini/Configuration.h | 23 ++++ .../Creality/CR-10mini/Configuration_adv.h | 111 +++++------------- .../Creality/CR-8/Configuration.h | 23 ++++ .../Creality/CR-8/Configuration_adv.h | 111 +++++------------- .../Creality/Ender-2/Configuration.h | 23 ++++ .../Creality/Ender-2/Configuration_adv.h | 111 +++++------------- .../Creality/Ender-3/Configuration.h | 23 ++++ .../Creality/Ender-3/Configuration_adv.h | 111 +++++------------- .../Creality/Ender-4/Configuration.h | 23 ++++ .../Creality/Ender-4/Configuration_adv.h | 111 +++++------------- .../Felix/Configuration.h | 23 ++++ .../Felix/Configuration_adv.h | 111 +++++------------- .../Felix/DUAL/Configuration.h | 23 ++++ .../FolgerTech/i3-2020/Configuration.h | 23 ++++ .../FolgerTech/i3-2020/Configuration_adv.h | 111 +++++------------- .../Geeetech/GT2560/Configuration.h | 23 ++++ .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 23 ++++ .../Prusa i3 Pro B/bltouch/Configuration.h | 23 ++++ .../Prusa i3 Pro B/noprobe/Configuration.h | 23 ++++ .../Geeetech/Prusa i3 Pro C/Configuration.h | 23 ++++ .../Prusa i3 Pro C/Configuration_adv.h | 111 +++++------------- .../Geeetech/Prusa i3 Pro W/Configuration.h | 23 ++++ .../Prusa i3 Pro W/Configuration_adv.h | 111 +++++------------- .../Infitary/i3-M508/Configuration.h | 23 ++++ .../Infitary/i3-M508/Configuration_adv.h | 111 +++++------------- .../JGAurora/A5/Configuration.h | 23 ++++ .../JGAurora/A5/Configuration_adv.h | 111 +++++------------- .../Malyan/M150/Configuration.h | 23 ++++ .../Malyan/M150/Configuration_adv.h | 111 +++++------------- .../Micromake/C1/basic/Configuration.h | 23 ++++ .../Micromake/C1/enhanced/Configuration.h | 23 ++++ .../Micromake/C1/enhanced/Configuration_adv.h | 111 +++++------------- .../RepRapPro/Huxley/Configuration.h | 23 ++++ .../RepRapWorld/Megatronics/Configuration.h | 23 ++++ .../RigidBot/Configuration.h | 23 ++++ .../RigidBot/Configuration_adv.h | 111 +++++------------- .../SCARA/Configuration.h | 23 ++++ .../SCARA/Configuration_adv.h | 111 +++++------------- .../Sanguinololu/Configuration.h | 23 ++++ .../Sanguinololu/Configuration_adv.h | 111 +++++------------- .../TinyBoy2/Configuration.h | 23 ++++ .../TinyBoy2/Configuration_adv.h | 111 +++++------------- .../Tronxy/X1/Configuration.h | 23 ++++ .../Tronxy/X3A/Configuration.h | 23 ++++ .../Tronxy/X3A/Configuration_adv.h | 111 +++++------------- .../Tronxy/X5S/Configuration.h | 23 ++++ .../Tronxy/XY100/Configuration.h | 23 ++++ .../Velleman/K8200/Configuration.h | 23 ++++ .../Velleman/K8200/Configuration_adv.h | 111 +++++------------- .../Velleman/K8400/Configuration.h | 23 ++++ .../Velleman/K8400/Configuration_adv.h | 111 +++++------------- .../Velleman/K8400/Dual-head/Configuration.h | 23 ++++ .../Wanhao/Duplicator 6/Configuration.h | 23 ++++ .../Wanhao/Duplicator 6/Configuration_adv.h | 111 +++++------------- .../adafruit/ST7565/Configuration.h | 23 ++++ .../FLSUN/auto_calibrate/Configuration.h | 23 ++++ .../FLSUN/auto_calibrate/Configuration_adv.h | 111 +++++------------- .../delta/FLSUN/kossel/Configuration.h | 23 ++++ .../delta/FLSUN/kossel/Configuration_adv.h | 111 +++++------------- .../delta/FLSUN/kossel_mini/Configuration.h | 23 ++++ .../FLSUN/kossel_mini/Configuration_adv.h | 111 +++++------------- .../delta/Hatchbox_Alpha/Configuration.h | 23 ++++ .../delta/generic/Configuration.h | 23 ++++ .../delta/generic/Configuration_adv.h | 111 +++++------------- .../delta/kossel_mini/Configuration.h | 23 ++++ .../delta/kossel_mini/Configuration_adv.h | 111 +++++------------- .../delta/kossel_pro/Configuration.h | 23 ++++ .../delta/kossel_pro/Configuration_adv.h | 111 +++++------------- .../delta/kossel_xl/Configuration.h | 23 ++++ .../delta/kossel_xl/Configuration_adv.h | 111 +++++------------- .../gCreate/gMax1.5+/Configuration.h | 23 ++++ .../gCreate/gMax1.5+/Configuration_adv.h | 111 +++++------------- .../makibox/Configuration.h | 23 ++++ .../makibox/Configuration_adv.h | 111 +++++------------- .../tvrrug/Round2/Configuration.h | 23 ++++ .../tvrrug/Round2/Configuration_adv.h | 111 +++++------------- .../wt150/Configuration.h | 23 ++++ .../wt150/Configuration_adv.h | 111 +++++------------- 101 files changed, 2495 insertions(+), 3612 deletions(-) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 10af71defefa..1acfd2cb32b3 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -549,6 +549,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index a7eb424c6843..6350e4c5365d 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index bb888ca17e42..822d26d08268 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index ecda01d00262..5d4acca02480 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -549,6 +549,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 1e0bcfa07091..48c1ddd6affc 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index cb2e41053c98..25c66fd01557 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -536,6 +536,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 4dd7a2da0ddd..47de7d2dc4a7 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 785632d154cc..4f3a85bf7fb7 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h index 779d21e10e69..ce9b61ba606f 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index c4e3beee0a69..841416ebfc21 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h index 78414e909a07..7ce5f3e905e2 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index 710f151f861b..acbfe8629df0 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -517,6 +517,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index b6d465bd147a..bb6b2c6d9c72 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index d09db1c5deff..f3b717798f50 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -530,6 +530,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index 46f5c1657d41..0a5900c26932 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -821,15 +821,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -840,7 +840,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -852,7 +852,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1020,23 +1020,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1087,34 +1076,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1122,22 +1093,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1292,25 +1248,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 783d77fbaa2c..83172803b5ef 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -517,6 +517,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index b6d465bd147a..bb6b2c6d9c72 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index edf7b900073d..86798c641930 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -528,6 +528,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index e06597f9e124..9dde4c25bf4d 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index cb8f06a7389e..0e8f7be92828 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -539,6 +539,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index b50d2c879738..6c7e72a6c344 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index 38e3c2e6390b..efe0a4f0f099 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index e56ab3b57a35..eba0dfbaea1a 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 00406c6dee9d..4e170e2d25ef 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -548,6 +548,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index 7c6fb3e50ccd..132133340e3a 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index 4d96f87c947e..a72acb4a3863 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -539,6 +539,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h index f4f05659cd0d..9e4436d028bc 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index a16e035a5fd2..ce81b0dd9cde 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -533,6 +533,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index 97d88e9ab901..4763a673a51a 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration.h b/Marlin/example_configurations/Creality/Ender-3/Configuration.h index f49d9cbe066a..13cc908770a7 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration.h @@ -533,6 +533,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h index 6651644ededf..e6b7c8826565 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index f35e78f8766a..ef0712ed82af 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -539,6 +539,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index f4f05659cd0d..9e4436d028bc 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 5dde0ea86ec4..25a8a19da517 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -510,6 +510,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 3159518c3b1c..9e8ed12df1e1 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 92fe44181aa8..5a1bc935c736 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -510,6 +510,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index ed7bc534f4aa..92441e284907 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -534,6 +534,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index de5681f2f3e0..ac98509afad8 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index e6424e38a9ca..9674a7d80a49 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -544,6 +544,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index 4b40c03f354e..b961bf06774a 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 5dfe445a46b0..f63f1e0cbc49 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -544,6 +544,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index d0aa6e5a28d9..8bb21e5ffda5 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -544,6 +544,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h index 85a79551e965..217caaa0fdf7 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h index fae2fc983173..d3988eed0c0f 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h index edf9bb27bd46..fe5191f3e46c 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h index fae2fc983173..d3988eed0c0f 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index 89eb56f2432a..6f0bd82fe0fb 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -533,6 +533,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 130b9c03f7a3..4ad5fa8b904f 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index ab3b34479f6c..b69296a58194 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -541,6 +541,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 365fb8229e97..895572780529 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index 862668a1be02..a0df35f3a6b0 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -538,6 +538,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index d97caf5c426b..cb7b5ef4af43 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index f9057b9c7b1b..7efb417f620e 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index ad5f6bf0c6f5..b1fa0845324d 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index 7f61e6207904..ad71b967bc7d 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 80745d7cc495..7a0af568629f 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index a9206ce45aed..626096c719bf 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index be75b513a0ba..1ad8d2177e75 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -525,6 +525,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index f444b71d489c..f0089d4981eb 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 57711b657ca9..2631faee27a1 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -542,6 +542,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 5faf8cfb74e6..17886f9b8320 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index b0b4f37b6bbc..8d2bb1a41eb4 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 901e9c73169a..b97b94847f96 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 949c06353bac..6e693f23325b 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -580,6 +580,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index fa0f5bc7946e..ad8334662919 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 9f6008b77c6b..00d5f8680364 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration.h b/Marlin/example_configurations/Tronxy/X3A/Configuration.h index 19dc28d37192..91df8b254dca 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h b/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h index bf956fdc0c0d..1405715e74fa 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index f920c27e78b3..d175788c26aa 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index f0928219bd7e..c5651cbfe286 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -540,6 +540,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 6ed7c4f7b849..086504050085 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -559,6 +559,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index e2767fa4c24e..c262be92ace8 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -816,15 +816,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -835,7 +835,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -847,7 +847,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1015,23 +1015,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1082,34 +1071,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1117,22 +1088,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1287,25 +1243,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index 9b249993c936..2655b5581b77 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 00bf18f4e2c2..a2fdfcdcf53f 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index dc7d416b501d..8a4ff2072a30 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index 252e328a3061..5e84bfd92a69 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -539,6 +539,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index e5309e85e1a1..1ddec9f73df1 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 5854b7aa5e4c..7b273b1ab21b 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 46882971037a..95a22a079ce8 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -605,6 +605,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 8bf83eca88b7..ad407ccd768c 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index d8edecc5d7ca..bd71f195301e 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -605,6 +605,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index 0340e4165e10..2a298e5331d5 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 11676cb6c943..16ddf91eb6d2 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -605,6 +605,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index dfbecd42a567..570cdbf131e1 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 445518951bc2..ff25f18a69c4 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -610,6 +610,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 5b534aed5856..03b7311adc9c 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -595,6 +595,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index dfbecd42a567..570cdbf131e1 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 857f9ac10996..fe872ff17707 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -595,6 +595,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index dfbecd42a567..570cdbf131e1 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index b84d4124aaa4..624f40748807 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -581,6 +581,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index ee4c7874f3f4..67928c251a47 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -820,15 +820,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -839,7 +839,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -851,7 +851,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1019,23 +1019,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1086,34 +1075,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1121,22 +1092,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1291,25 +1247,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 3ab120663b83..1f2504d44bb7 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -599,6 +599,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index d3ef9a9fbe6b..b69e024e3ced 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -815,15 +815,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -834,7 +834,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -846,7 +846,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1014,23 +1014,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1081,34 +1070,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1116,22 +1087,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1286,25 +1242,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index de6dfbca452b..f64f520f1740 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -542,6 +542,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 3906ee734950..08f3d1f9b68e 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index dccd1df12618..465f45375a6b 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -532,6 +532,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index dae1a41fe228..5754e7f4abb4 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 8e311377046c..e9eaee6570a3 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -518,6 +518,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 929ffad9fc25..8c50d0f96d8c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -813,15 +813,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -832,7 +832,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -844,7 +844,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1012,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1079,34 +1068,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1085,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1240,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 6c72089deebc..738557d6740c 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -534,6 +534,29 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 7161e6bf476a..48d84d63f1f8 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -814,15 +814,15 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -833,7 +833,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -845,7 +845,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1013,23 +1013,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1080,34 +1069,16 @@ // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1115,22 +1086,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1285,25 +1241,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off From 7bad507d707e01706199697fc38741e45a2486a5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Jul 2018 19:50:49 -0500 Subject: [PATCH 05/15] Simplify stepper driver config --- .travis.yml | 10 +- Marlin/Conditionals_post.h | 79 ++++++-- Marlin/Configuration.h | 23 +++ Marlin/Configuration_adv.h | 121 ++++-------- Marlin/MarlinConfig.h | 1 + Marlin/Marlin_main.cpp | 164 ++++++++-------- Marlin/SanityCheck.h | 331 ++++++++++----------------------- Marlin/configuration_store.cpp | 193 ++++++++++--------- Marlin/drivers.h | 60 ++++++ Marlin/macros.h | 2 +- Marlin/pins_EINSY_RAMBO.h | 6 +- Marlin/pins_EINSY_RETRO.h | 6 +- Marlin/pins_RAMPS.h | 2 +- Marlin/stepper_indirection.cpp | 260 +++++++++++++------------- Marlin/stepper_indirection.h | 96 +++++----- Marlin/tmc_util.cpp | 92 ++++----- Marlin/tmc_util.h | 6 +- 17 files changed, 698 insertions(+), 754 deletions(-) create mode 100644 Marlin/drivers.h diff --git a/.travis.yml b/.travis.yml index f38feca87bf6..52940cfd170a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -359,14 +359,20 @@ script: # - use_example_configs SCARA - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER - - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130 + - opt_set X_DRIVER_TYPE TMC2130 + - opt_set Y_DRIVER_TYPE TMC2130 + - opt_set Z_DRIVER_TYPE TMC2130 + - opt_set E0_DRIVER_TYPE TMC2130 - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING - build_marlin # # TMC2208 Config # - restore_configs - - opt_enable_adv HAVE_TMC2208 X_IS_TMC2208 Y_IS_TMC2208 Z_IS_TMC2208 + - opt_set X_DRIVER_TYPE TMC2208 + - opt_set Y_DRIVER_TYPE TMC2208 + - opt_set Z_DRIVER_TYPE TMC2208 + - opt_set E0_DRIVER_TYPE TMC2208 - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG - build_marlin # diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 8860712578ae..26b243717884 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -400,6 +400,63 @@ #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) +/** + * Driver Timings + * NOTE: Driver timing order is longest-to-shortest duration. + * Preserve this ordering when adding new drivers. + */ +#ifndef MINIMUM_STEPPER_DIR_DELAY + #if HAS_DRIVER(TB6560) + #define MINIMUM_STEPPER_DIR_DELAY 15000 + #elif HAS_DRIVER(TB6600) + #define MINIMUM_STEPPER_DIR_DELAY 1500 + #elif HAS_DRIVER(DRV8825) + #define MINIMUM_STEPPER_DIR_DELAY 650 + #elif HAS_DRIVER(LV8729) + #define MINIMUM_STEPPER_DIR_DELAY 500 + #elif HAS_DRIVER(A4988) + #define MINIMUM_STEPPER_DIR_DELAY 200 + #elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) + #define MINIMUM_STEPPER_DIR_DELAY 20 + #else + #define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire + #endif +#endif + +#ifndef MINIMUM_STEPPER_PULSE + #if HAS_DRIVER(TB6560) + #define MINIMUM_STEPPER_PULSE 30 + #elif HAS_DRIVER(TB6600) + #define MINIMUM_STEPPER_PULSE 3 + #elif HAS_DRIVER(DRV8825) + #define MINIMUM_STEPPER_PULSE 2 + #elif HAS_DRIVER(A4988) || HAS_DRIVER(LV8729) + #define MINIMUM_STEPPER_PULSE 1 + #elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) + #define MINIMUM_STEPPER_PULSE 0 + #else + #define MINIMUM_STEPPER_PULSE 2 + #endif +#endif + +#ifndef MAXIMUM_STEPPER_RATE + #if HAS_DRIVER(TB6560) + #define MAXIMUM_STEPPER_RATE 15000 + #elif HAS_DRIVER(LV8729) + #define MAXIMUM_STEPPER_RATE 130000 + #elif HAS_DRIVER(TB6600) + #define MAXIMUM_STEPPER_RATE 150000 + #elif HAS_DRIVER(DRV8825) + #define MAXIMUM_STEPPER_RATE 250000 + #elif HAS_TRINAMIC || HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) + #define MAXIMUM_STEPPER_RATE 400000 + #elif HAS_DRIVER(A4988) + #define MAXIMUM_STEPPER_RATE 500000 + #else + #define MAXIMUM_STEPPER_RATE 250000 + #endif +#endif + /** * X_DUAL_ENDSTOPS endstop reassignment */ @@ -661,27 +718,19 @@ #define HAS_SOLENOID_4 (PIN_EXISTS(SOL4)) // Trinamic Stepper Drivers -#define HAS_TRINAMIC (ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) || ENABLED(IS_TRAMS)) -#define X_IS_TRINAMIC (ENABLED( X_IS_TMC2130) || ENABLED( X_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define X2_IS_TRINAMIC (ENABLED(X2_IS_TMC2130) || ENABLED(X2_IS_TMC2208)) -#define Y_IS_TRINAMIC (ENABLED( Y_IS_TMC2130) || ENABLED( Y_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define Y2_IS_TRINAMIC (ENABLED(Y2_IS_TMC2130) || ENABLED(Y2_IS_TMC2208)) -#define Z_IS_TRINAMIC (ENABLED( Z_IS_TMC2130) || ENABLED( Z_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define Z2_IS_TRINAMIC (ENABLED(Z2_IS_TMC2130) || ENABLED(Z2_IS_TMC2208)) -#define E0_IS_TRINAMIC (ENABLED(E0_IS_TMC2130) || ENABLED(E0_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define E1_IS_TRINAMIC (ENABLED(E1_IS_TMC2130) || ENABLED(E1_IS_TMC2208)) -#define E2_IS_TRINAMIC (ENABLED(E2_IS_TMC2130) || ENABLED(E2_IS_TMC2208)) -#define E3_IS_TRINAMIC (ENABLED(E3_IS_TMC2130) || ENABLED(E3_IS_TMC2208)) -#define E4_IS_TRINAMIC (ENABLED(E4_IS_TMC2130) || ENABLED(E4_IS_TMC2208)) +#define HAS_STEALTHCHOP (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208)) +#define HAS_STALLGUARD (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2660)) +#define AXIS_HAS_STEALTHCHOP(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2208) ) +#define AXIS_HAS_STALLGUARD(ST) ( AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2660) ) #if ENABLED(SENSORLESS_HOMING) // Disable Z axis sensorless homing if a probe is used to home the Z axis #if HOMING_Z_WITH_PROBE #undef Z_HOMING_SENSITIVITY #endif - #define X_SENSORLESS (ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)) - #define Y_SENSORLESS (ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY)) - #define Z_SENSORLESS (ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY)) + #define X_SENSORLESS (AXIS_HAS_STALLGUARD(X) && defined(X_HOMING_SENSITIVITY)) + #define Y_SENSORLESS (AXIS_HAS_STALLGUARD(Y) && defined(Y_HOMING_SENSITIVITY)) + #define Z_SENSORLESS (AXIS_HAS_STALLGUARD(Z) && defined(Z_HOMING_SENSITIVITY)) #endif // Endstops and bed probe diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 039f71161a60..decca5dc055f 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -529,6 +529,29 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 78414e909a07..efa9929dd7b8 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -813,15 +813,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -831,8 +833,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -843,8 +847,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1012,23 +1018,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1074,39 +1069,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1114,22 +1091,7 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1284,25 +1246,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 */ - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAS_DRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1348,7 +1297,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index f0aa13044344..5b049a387fb9 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -25,6 +25,7 @@ #include "boards.h" #include "macros.h" +#include "drivers.h" #include "Version.h" #include "Configuration.h" #include "Conditionals_LCD.h" diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7745c0a2ab0d..04f011e7349f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -136,7 +136,7 @@ * M119 - Report endstops status. * M120 - Enable endstops detection. * M121 - Disable endstops detection. - * M122 - Debug stepper (Requires HAVE_TMC2130 or HAVE_TMC2208) + * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660) * 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) @@ -223,13 +223,13 @@ * M868 - Report or set position encoder module error correction threshold. * M869 - Report position encoder module error. * 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 HAVE_TMC2130 or HAVE_TMC2208) + * 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) * 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 HAVE_TMC2130 or HAVE_TMC2208) - * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires HAVE_TMC2130 or HAVE_TMC2208) + * 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) * M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD) * M914 - Set SENSORLESS_HOMING sensitivity. (Requires SENSORLESS_HOMING) * @@ -10988,45 +10988,45 @@ inline void gcode_M502() { report = false; switch (i) { case X_AXIS: - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) if (index < 2) TMC_SET_CURRENT(X); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) if (!(index & 1)) TMC_SET_CURRENT(X2); #endif break; case Y_AXIS: - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) if (index < 2) TMC_SET_CURRENT(Y); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) if (!(index & 1)) TMC_SET_CURRENT(Y2); #endif break; case Z_AXIS: - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) if (index < 2) TMC_SET_CURRENT(Z); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) if (!(index & 1)) TMC_SET_CURRENT(Z2); #endif break; case E_AXIS: { if (get_target_extruder_from_command(906)) return; switch (target_extruder) { - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) case 0: TMC_SET_CURRENT(E0); break; #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) case 1: TMC_SET_CURRENT(E1); break; #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) case 2: TMC_SET_CURRENT(E2); break; #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) case 3: TMC_SET_CURRENT(E3); break; #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) case 4: TMC_SET_CURRENT(E4); break; #endif } @@ -11035,73 +11035,69 @@ inline void gcode_M502() { } if (report) { - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) TMC_SAY_CURRENT(X); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) TMC_SAY_CURRENT(X2); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) TMC_SAY_CURRENT(Y); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) TMC_SAY_CURRENT(Y2); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) TMC_SAY_CURRENT(Z); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) TMC_SAY_CURRENT(Z2); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) TMC_SAY_CURRENT(E0); #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) TMC_SAY_CURRENT(E1); #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) TMC_SAY_CURRENT(E2); #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) TMC_SAY_CURRENT(E3); #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) TMC_SAY_CURRENT(E4); #endif } } - #define M91x_USE(A) (ENABLED(A##_IS_TMC2130) || (ENABLED(A##_IS_TMC2208) && PIN_EXISTS(A##_SERIAL_RX))) + #define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && PIN_EXISTS(ST##_SERIAL_RX))) #define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N)) - #define M91x_USE_X (ENABLED(IS_TRAMS) || M91x_USE(X)) - #define M91x_USE_Y (ENABLED(IS_TRAMS) || M91x_USE(Y)) - #define M91x_USE_Z (ENABLED(IS_TRAMS) || M91x_USE(Z)) - #define M91x_USE_E0 (ENABLED(IS_TRAMS) || M91x_USE_E(0)) /** * M911: Report TMC stepper driver overtemperature pre-warn flag * This flag is held by the library, persisting until cleared by M912 */ inline void gcode_M911() { - #if M91x_USE_X + #if M91x_USE(X) tmc_report_otpw(stepperX, TMC_X); #endif #if M91x_USE(X2) tmc_report_otpw(stepperX2, TMC_X2); #endif - #if M91x_USE_Y + #if M91x_USE(Y) tmc_report_otpw(stepperY, TMC_Y); #endif #if M91x_USE(Y2) tmc_report_otpw(stepperY2, TMC_Y2); #endif - #if M91x_USE_Z + #if M91x_USE(Z) tmc_report_otpw(stepperZ, TMC_Z); #endif #if M91x_USE(Z2) tmc_report_otpw(stepperZ2, TMC_Z2); #endif - #if M91x_USE_E0 + #if M91x_USE_E(0) tmc_report_otpw(stepperE0, TMC_E0); #endif #if M91x_USE_E(1) @@ -11137,9 +11133,9 @@ inline void gcode_M502() { hasE = parser.seen(axis_codes[E_AXIS]), hasNone = !hasX && !hasY && !hasZ && !hasE; - #if M91x_USE_X || M91x_USE(X2) + #if M91x_USE(X) || M91x_USE(X2) const uint8_t xval = parser.byteval(axis_codes[X_AXIS], 10); - #if M91x_USE_X + #if M91x_USE(X) if (hasNone || xval == 1 || (hasX && xval == 10)) tmc_clear_otpw(stepperX, TMC_X); #endif #if M91x_USE(X2) @@ -11147,9 +11143,9 @@ inline void gcode_M502() { #endif #endif - #if M91x_USE_Y || M91x_USE(Y2) + #if M91x_USE(Y) || M91x_USE(Y2) const uint8_t yval = parser.byteval(axis_codes[Y_AXIS], 10); - #if M91x_USE_Y + #if M91x_USE(Y) if (hasNone || yval == 1 || (hasY && yval == 10)) tmc_clear_otpw(stepperY, TMC_Y); #endif #if M91x_USE(Y2) @@ -11157,9 +11153,9 @@ inline void gcode_M502() { #endif #endif - #if M91x_USE_Z || M91x_USE(Z2) + #if M91x_USE(Z) || M91x_USE(Z2) const uint8_t zval = parser.byteval(axis_codes[Z_AXIS], 10); - #if M91x_USE_Z + #if M91x_USE(Z) if (hasNone || zval == 1 || (hasZ && zval == 10)) tmc_clear_otpw(stepperZ, TMC_Z); #endif #if M91x_USE(Z2) @@ -11167,9 +11163,9 @@ inline void gcode_M502() { #endif #endif - #if M91x_USE_E0 || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) + #if M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) const uint8_t eval = parser.byteval(axis_codes[E_AXIS], 10); - #if M91x_USE_E0 + #if M91x_USE_E(0) if (hasNone || eval == 0 || (hasE && eval == 10)) tmc_clear_otpw(stepperE0, TMC_E0); #endif #if M91x_USE_E(1) @@ -11203,45 +11199,45 @@ inline void gcode_M502() { report = false; switch (i) { case X_AXIS: - #if X_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X) if (index < 2) TMC_SET_PWMTHRS(X,X); #endif - #if X2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X2) if (!(index & 1)) TMC_SET_PWMTHRS(X,X2); #endif break; case Y_AXIS: - #if Y_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y) if (index < 2) TMC_SET_PWMTHRS(Y,Y); #endif - #if Y2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y2) if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2); #endif break; case Z_AXIS: - #if Z_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z) if (index < 2) TMC_SET_PWMTHRS(Z,Z); #endif - #if Z2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z2) if (!(index & 1)) TMC_SET_PWMTHRS(Z,Z2); #endif break; case E_AXIS: { if (get_target_extruder_from_command(913)) return; switch (target_extruder) { - #if E0_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E0) case 0: TMC_SET_PWMTHRS_E(0); break; #endif - #if E_STEPPERS > 1 && E1_IS_TRINAMIC + #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1) case 1: TMC_SET_PWMTHRS_E(1); break; #endif - #if E_STEPPERS > 2 && E2_IS_TRINAMIC + #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2) case 2: TMC_SET_PWMTHRS_E(2); break; #endif - #if E_STEPPERS > 3 && E3_IS_TRINAMIC + #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3) case 3: TMC_SET_PWMTHRS_E(3); break; #endif - #if E_STEPPERS > 4 && E4_IS_TRINAMIC + #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4) case 4: TMC_SET_PWMTHRS_E(4); break; #endif } @@ -11250,37 +11246,37 @@ inline void gcode_M502() { } if (report) { - #if X_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X) TMC_SAY_PWMTHRS(X,X); #endif - #if X2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X2) TMC_SAY_PWMTHRS(X,X2); #endif - #if Y_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y) TMC_SAY_PWMTHRS(Y,Y); #endif - #if Y2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y2) TMC_SAY_PWMTHRS(Y,Y2); #endif - #if Z_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z) TMC_SAY_PWMTHRS(Z,Z); #endif - #if Z2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z2) TMC_SAY_PWMTHRS(Z,Z2); #endif - #if E0_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E0) TMC_SAY_PWMTHRS_E(0); #endif - #if E_STEPPERS > 1 && E1_IS_TRINAMIC + #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1) TMC_SAY_PWMTHRS_E(1); #endif - #if E_STEPPERS > 2 && E2_IS_TRINAMIC + #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2) TMC_SAY_PWMTHRS_E(2); #endif - #if E_STEPPERS > 3 && E3_IS_TRINAMIC + #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3) TMC_SAY_PWMTHRS_E(3); #endif - #if E_STEPPERS > 4 && E4_IS_TRINAMIC + #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4) TMC_SAY_PWMTHRS_E(4); #endif } @@ -11303,30 +11299,30 @@ inline void gcode_M502() { switch (i) { #if X_SENSORLESS case X_AXIS: - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(X) if (index < 2) TMC_SET_SGT(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(X2) if (!(index & 1)) TMC_SET_SGT(X2); #endif break; #endif #if Y_SENSORLESS case Y_AXIS: - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Y) if (index < 2) TMC_SET_SGT(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Y2) if (!(index & 1)) TMC_SET_SGT(Y2); #endif break; #endif #if Z_SENSORLESS case Z_AXIS: - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Z) if (index < 2) TMC_SET_SGT(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Z2) if (!(index & 1)) TMC_SET_SGT(Z2); #endif break; @@ -11336,26 +11332,26 @@ inline void gcode_M502() { if (report) { #if X_SENSORLESS - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(X) TMC_SAY_SGT(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(X2) TMC_SAY_SGT(X2); #endif #endif #if Y_SENSORLESS - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Y) TMC_SAY_SGT(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Y2) TMC_SAY_SGT(Y2); #endif #endif #if Z_SENSORLESS - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Z) TMC_SAY_SGT(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Z2) TMC_SAY_SGT(Z2); #endif #endif @@ -11376,11 +11372,11 @@ inline void gcode_M502() { return; } - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) const uint16_t Z_current_1 = stepperZ.getCurrent(); stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) const uint16_t Z2_current_1 = stepperZ2.getCurrent(); stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER); #endif @@ -11391,10 +11387,10 @@ inline void gcode_M502() { do_blocking_move_to_z(Z_MAX_POS+_z); - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) stepperZ.setCurrent(Z_current_1, R_SENSE, HOLD_MULTIPLIER); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) stepperZ2.setCurrent(Z2_current_1, R_SENSE, HOLD_MULTIPLIER); #endif @@ -12619,7 +12615,7 @@ void process_parsed_command() { #endif #endif - #if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) #if ENABLED(TMC_DEBUG) case 122: gcode_M122(); break; // M122: Debug TMC steppers #endif @@ -14445,10 +14441,10 @@ void setup() { SERIAL_ECHO_START(); // Prepare communication for TMC drivers - #if ENABLED(HAVE_TMC2130) + #if HAS_DRIVER(TMC2130) tmc_init_cs_pins(); #endif - #if ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2208) tmc2208_serial_begin(); #endif diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index abc2a63c522e..47d6a29776e2 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -265,10 +265,28 @@ #elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT) #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration." #elif defined(HAVE_TMCDRIVER) - #error "HAVE_TMCDRIVER is now HAVE_TMC26X. Please update your Configuration_adv.h." + #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h." +#elif defined(HAVE_TMC26X) + #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h." +#elif defined(HAVE_TMC2130) + #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h." +#elif defined(HAVE_L6470DRIVER) + #error "HAVE_L6470DRIVER is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h." #elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) \ || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) - #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h." + #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h." +#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) \ + || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) + #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h." +#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) \ + || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) + #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h." +#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) \ + || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) + #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h." +#elif defined(X_IS_L6470) || defined(X2_IS_L6470) || defined(Y_IS_L6470) || defined(Y2_IS_L6470) || defined(Z_IS_L6470) || defined(Z2_IS_L6470) \ + || defined(E0_IS_L6470) || defined(E1_IS_L6470) || defined(E2_IS_L6470) || defined(E3_IS_L6470) || defined(E4_IS_L6470) + #error "[AXIS]_IS_L6470 is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h." #elif defined(AUTOMATIC_CURRENT_CONTROL) #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." #elif defined(FILAMENT_CHANGE_LOAD_LENGTH) @@ -1416,247 +1434,96 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #endif /** - * Make sure HAVE_TMC26X is warranted - */ -#if ENABLED(HAVE_TMC26X) && !( \ - ENABLED( X_IS_TMC26X) \ - || ENABLED(X2_IS_TMC26X) \ - || ENABLED( Y_IS_TMC26X) \ - || ENABLED(Y2_IS_TMC26X) \ - || ENABLED( Z_IS_TMC26X) \ - || ENABLED(Z2_IS_TMC26X) \ - || ENABLED(E0_IS_TMC26X) \ - || ENABLED(E1_IS_TMC26X) \ - || ENABLED(E2_IS_TMC26X) \ - || ENABLED(E3_IS_TMC26X) \ - || ENABLED(E4_IS_TMC26X) \ - ) - #error "HAVE_TMC26X requires at least one TMC26X stepper to be set." -#endif - -/** - * TMC2130 Requirements - */ -#if ENABLED(HAVE_TMC2130) - #if !( ENABLED( X_IS_TMC2130) \ - || ENABLED(X2_IS_TMC2130) \ - || ENABLED( Y_IS_TMC2130) \ - || ENABLED(Y2_IS_TMC2130) \ - || ENABLED( Z_IS_TMC2130) \ - || ENABLED(Z2_IS_TMC2130) \ - || ENABLED(E0_IS_TMC2130) \ - || ENABLED(E1_IS_TMC2130) \ - || ENABLED(E2_IS_TMC2130) \ - || ENABLED(E3_IS_TMC2130) \ - || ENABLED(E4_IS_TMC2130) ) - #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set." - #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) - #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." - #endif - - #if ENABLED(X_IS_TMC2130) && !PIN_EXISTS(X_CS) - #error "X_CS_PIN is required for X_IS_TMC2130. Define X_CS_PIN in Configuration_adv.h." - #elif ENABLED(X2_IS_TMC2130) && !PIN_EXISTS(X2_CS) - #error "X2_CS_PIN is required for X2_IS_TMC2130. Define X2_CS_PIN in Configuration_adv.h." - #elif ENABLED(Y_IS_TMC2130) && !PIN_EXISTS(Y_CS) - #error "Y_CS_PIN is required for Y_IS_TMC2130. Define Y_CS_PIN in Configuration_adv.h." - #elif ENABLED(Y2_IS_TMC2130) && !PIN_EXISTS(Y2_CS) - #error "Y2_CS_PIN is required for Y2_IS_TMC2130. Define Y2_CS_PIN in Configuration_adv.h." - #elif ENABLED(Z_IS_TMC2130) && !PIN_EXISTS(Z_CS) - #error "Z_CS_PIN is required for Z_IS_TMC2130. Define Z_CS_PIN in Configuration_adv.h." - #elif ENABLED(Z2_IS_TMC2130) && !PIN_EXISTS(Z2_CS) - #error "Z2_CS_PIN is required for Z2_IS_TMC2130. Define Z2_CS_PIN in Configuration_adv.h." - #elif ENABLED(E0_IS_TMC2130) && !PIN_EXISTS(E0_CS) - #error "E0_CS_PIN is required for E0_IS_TMC2130. Define E0_CS_PIN in Configuration_adv.h." - #elif ENABLED(E1_IS_TMC2130) && !PIN_EXISTS(E1_CS) - #error "E1_CS_PIN is required for E1_IS_TMC2130. Define E1_CS_PIN in Configuration_adv.h." - #elif ENABLED(E2_IS_TMC2130) && !PIN_EXISTS(E2_CS) - #error "E2_CS_PIN is required for E2_IS_TMC2130. Define E2_CS_PIN in Configuration_adv.h." - #elif ENABLED(E3_IS_TMC2130) && !PIN_EXISTS(E3_CS) - #error "E3_CS_PIN is required for E3_IS_TMC2130. Define E3_CS_PIN in Configuration_adv.h." - #elif ENABLED(E4_IS_TMC2130) && !PIN_EXISTS(E4_CS) - #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h." - #endif - - #if ENABLED(SENSORLESS_HOMING) - // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop - // is necessary in order to reset the stallGuard indication between the initial movement of all three - // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of - // clearing the stallGuard activated status is found. - #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP) - #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP." - #elif X_SENSORLESS && X_HOME_DIR == -1 && (DISABLED(X_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMIN)) - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN." - #elif X_SENSORLESS && X_HOME_DIR == 1 && (DISABLED(X_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMAX)) - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMAX when homing to X_MAX." - #elif Y_SENSORLESS && Y_HOME_DIR == -1 && (DISABLED(Y_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMIN)) - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMIN when homing to Y_MIN." - #elif Y_SENSORLESS && Y_HOME_DIR == 1 && (DISABLED(Y_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMAX)) - #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMAX when homing to Y_MAX." - #elif Z_SENSORLESS && Z_HOME_DIR == -1 && (DISABLED(Z_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMIN)) - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN." - #elif Z_SENSORLESS && Z_HOME_DIR == 1 && (DISABLED(Z_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMAX)) - #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMAX when homing to Z_MAX." - #elif ENABLED(ENDSTOP_NOISE_FILTER) - #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_FILTER." - #endif - #endif - - // Sensorless homing is required for both combined steppers in an H-bot - #if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS - #error "CoreXY requires both X and Y to use sensorless homing if either does." - #elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS - #error "CoreXZ requires both X and Z to use sensorless homing if either does." - #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS - #error "CoreYZ requires both Y and Z to use sensorless homing if either does." + * Check existing CS pins against enabled TMC SPI drivers. + */ +#if AXIS_DRIVER_TYPE(X, TMC2130) && !PIN_EXISTS(X_CS) + #error "X_CS_PIN is required for TMC2130. Define X_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(X2, TMC2130) && !PIN_EXISTS(X2_CS) + #error "X2_CS_PIN is required for X2. Define X2_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(Y, TMC2130) && !PIN_EXISTS(Y_CS) + #error "Y_CS_PIN is required for TMC2130. Define Y_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(Y2, TMC2130) && !PIN_EXISTS(Y2_CS) + #error "Y2_CS_PIN is required for TMC2130. Define Y2_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(Z, TMC2130) && !PIN_EXISTS(Z_CS) + #error "Z_CS_PIN is required for TMC2130. Define Z_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(Z2, TMC2130) && !PIN_EXISTS(Z2_CS) + #error "Z2_CS_PIN is required for TMC2130. Define Z2_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(E0, TMC2130) && !PIN_EXISTS(E0_CS) + #error "E0_CS_PIN is required for TMC2130. Define E0_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(E1, TMC2130) && !PIN_EXISTS(E1_CS) + #error "E1_CS_PIN is required for TMC2130. Define E1_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(E2, TMC2130) && !PIN_EXISTS(E2_CS) + #error "E2_CS_PIN is required for TMC2130. Define E2_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(E3, TMC2130) && !PIN_EXISTS(E3_CS) + #error "E3_CS_PIN is required for TMC2130. Define E3_CS_PIN in Configuration_adv.h." +#elif AXIS_DRIVER_TYPE(E4, TMC2130) && !PIN_EXISTS(E4_CS) + #error "E4_CS_PIN is required for TMC2130. Define E4_CS_PIN in Configuration_adv.h." +#endif + +/** + * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI) + */ +#if HAS_DRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \ + defined(X_HARDWARE_SERIAL ) \ + || defined(X2_HARDWARE_SERIAL) \ + || defined(Y_HARDWARE_SERIAL ) \ + || defined(Y2_HARDWARE_SERIAL) \ + || defined(Z_HARDWARE_SERIAL ) \ + || defined(Z2_HARDWARE_SERIAL) \ + || defined(E0_HARDWARE_SERIAL) \ + || defined(E1_HARDWARE_SERIAL) \ + || defined(E2_HARDWARE_SERIAL) \ + || defined(E3_HARDWARE_SERIAL) \ + || defined(E4_HARDWARE_SERIAL) ) + #error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE." +#endif + +#if ENABLED(SENSORLESS_HOMING) + // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop + // is necessary in order to reset the stallGuard indication between the initial movement of all three + // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of + // clearing the stallGuard activated status is found. + #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP) + #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP." + #elif X_SENSORLESS && X_HOME_DIR == -1 && (DISABLED(X_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMIN)) + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN." + #elif X_SENSORLESS && X_HOME_DIR == 1 && (DISABLED(X_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_XMAX)) + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMAX when homing to X_MAX." + #elif Y_SENSORLESS && Y_HOME_DIR == -1 && (DISABLED(Y_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMIN)) + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMIN when homing to Y_MIN." + #elif Y_SENSORLESS && Y_HOME_DIR == 1 && (DISABLED(Y_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_YMAX)) + #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_YMAX when homing to Y_MAX." + #elif Z_SENSORLESS && Z_HOME_DIR == -1 && (DISABLED(Z_MIN_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMIN)) + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMIN when homing to Z_MIN." + #elif Z_SENSORLESS && Z_HOME_DIR == 1 && (DISABLED(Z_MAX_ENDSTOP_INVERTING) || DISABLED(ENDSTOPPULLUP_ZMAX)) + #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING and ENDSTOPPULLUP_ZMAX when homing to Z_MAX." + #elif ENABLED(ENDSTOP_NOISE_FILTER) + #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_FILTER." #endif +#endif -#elif ENABLED(SENSORLESS_HOMING) - - #error "SENSORLESS_HOMING requires TMC2130 stepper drivers." - -#endif - -/** - * TMC2208 Requirements - */ -#if ENABLED(HAVE_TMC2208) - #if !( ENABLED( X_IS_TMC2208) \ - || ENABLED(X2_IS_TMC2208) \ - || ENABLED( Y_IS_TMC2208) \ - || ENABLED(Y2_IS_TMC2208) \ - || ENABLED( Z_IS_TMC2208) \ - || ENABLED(Z2_IS_TMC2208) \ - || ENABLED(E0_IS_TMC2208) \ - || ENABLED(E1_IS_TMC2208) \ - || ENABLED(E2_IS_TMC2208) \ - || ENABLED(E3_IS_TMC2208) \ - || ENABLED(E4_IS_TMC2208 ) ) - #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set." - // Software UART and ENDSTOP_INTERRUPTS both use Pin Change interrupts (PCI) - #elif ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && \ - !( defined( X_HARDWARE_SERIAL) \ - || defined(X2_HARDWARE_SERIAL) \ - || defined( Y_HARDWARE_SERIAL) \ - || defined(Y2_HARDWARE_SERIAL) \ - || defined( Z_HARDWARE_SERIAL) \ - || defined(Z2_HARDWARE_SERIAL) \ - || defined(E0_HARDWARE_SERIAL) \ - || defined(E1_HARDWARE_SERIAL) \ - || defined(E2_HARDWARE_SERIAL) \ - || defined(E3_HARDWARE_SERIAL) \ - || defined(E4_HARDWARE_SERIAL) ) - #error "Select *_HARDWARE_SERIAL to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE." - #endif +// Sensorless homing is required for both combined steppers in an H-bot +#if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS + #error "CoreXY requires both X and Y to use sensorless homing if either does." +#elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS + #error "CoreXZ requires both X and Z to use sensorless homing if either does." +#elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS + #error "CoreYZ requires both Y and Z to use sensorless homing if either does." #endif #if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." #endif - -#if ENABLED(TMC_Z_CALIBRATION) && !Z_IS_TRINAMIC && !Z2_IS_TRINAMIC +#if ENABLED(TMC_Z_CALIBRATION) && !AXIS_IS_TMC(Z) && !AXIS_IS_TMC(Z2) #error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis" #endif -/** - * Make sure HAVE_L6470DRIVER is warranted - */ -#if ENABLED(HAVE_L6470DRIVER) && !( \ - ENABLED( X_IS_L6470) \ - || ENABLED(X2_IS_L6470) \ - || ENABLED( Y_IS_L6470) \ - || ENABLED(Y2_IS_L6470) \ - || ENABLED( Z_IS_L6470) \ - || ENABLED(Z2_IS_L6470) \ - || ENABLED(E0_IS_L6470) \ - || ENABLED(E1_IS_L6470) \ - || ENABLED(E2_IS_L6470) \ - || ENABLED(E3_IS_L6470) \ - || ENABLED(E4_IS_L6470) \ - ) - #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set." -#endif - -/** - * Check that each axis has only one driver selected - */ -#if 1 < 0 \ - + ENABLED(X_IS_TMC26X) \ - + ENABLED(X_IS_TMC2130) \ - + ENABLED(X_IS_TMC2208) \ - + ENABLED(X_IS_L6470) - #error "Please enable only one stepper driver for the X axis." -#endif -#if 1 < 0 \ - + ENABLED(X2_IS_TMC26X) \ - + ENABLED(X2_IS_TMC2130) \ - + ENABLED(X2_IS_TMC2208) \ - + ENABLED(X2_IS_L6470) - #error "Please enable only one stepper driver for the X2 axis." -#endif -#if 1 < 0 \ - + ENABLED(Y_IS_TMC26X) \ - + ENABLED(Y_IS_TMC2130) \ - + ENABLED(Y_IS_TMC2208) \ - + ENABLED(Y_IS_L6470) - #error "Please enable only one stepper driver for the Y axis." -#endif -#if 1 < 0 \ - + ENABLED(Y2_IS_TMC26X) \ - + ENABLED(Y2_IS_TMC2130) \ - + ENABLED(Y2_IS_TMC2208) \ - + ENABLED(Y2_IS_L6470) - #error "Please enable only one stepper driver for the Y2 axis." -#endif -#if 1 < 0 \ - + ENABLED(Z_IS_TMC26X) \ - + ENABLED(Z_IS_TMC2130) \ - + ENABLED(Z_IS_TMC2208) \ - + ENABLED(Z_IS_L6470) - #error "Please enable only one stepper driver for the Z axis." -#endif -#if 1 < 0 \ - + ENABLED(Z2_IS_TMC26X) \ - + ENABLED(Z2_IS_TMC2130) \ - + ENABLED(Z2_IS_TMC2208) \ - + ENABLED(Z2_IS_L6470) - #error "Please enable only one stepper driver for the Z2 axis." -#endif -#if 1 < 0 \ - + ENABLED(E0_IS_TMC26X) \ - + ENABLED(E0_IS_TMC2130) \ - + ENABLED(E0_IS_TMC2208) \ - + ENABLED(E0_IS_L6470) - #error "Please enable only one stepper driver for the E0 axis." -#endif -#if 1 < 0 \ - + ENABLED(E1_IS_TMC26X) \ - + ENABLED(E1_IS_TMC2130) \ - + ENABLED(E1_IS_TMC2208) \ - + ENABLED(E1_IS_L6470) - #error "Please enable only one stepper driver for the E1 axis." -#endif -#if 1 < 0 \ - + ENABLED(E2_IS_TMC26X) \ - + ENABLED(E2_IS_TMC2130) \ - + ENABLED(E2_IS_TMC2208) \ - + ENABLED(E2_IS_L6470) - #error "Please enable only one stepper driver for the E2 axis." -#endif -#if 1 < 0 \ - + ENABLED(E3_IS_TMC26X) \ - + ENABLED(E3_IS_TMC2130) \ - + ENABLED(E3_IS_TMC2208) \ - + ENABLED(E3_IS_L6470) - #error "Please enable only one stepper driver for the E3 axis." -#endif -#if 1 < 0 \ - + ENABLED(E4_IS_TMC26X) \ - + ENABLED(E4_IS_TMC2130) \ - + ENABLED(E4_IS_TMC2208) \ - + ENABLED(E4_IS_L6470) - #error "Please enable only one stepper driver for the E4 axis." +#if ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD + #error "SENSORLESS_HOMING requires TMC2130 or TMC2660 stepper drivers." #endif +#if ENABLED(STEALTHCHOP) && !HAS_STEALTHCHOP + #error "STEALTHCHOP requires TMC2130 or TMC2208 stepper drivers." + #endif /** * Digipot requirement diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index b3583ab12687..c042a418f821 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -696,57 +696,57 @@ void MarlinSettings::postprocess() { uint16_t tmc_stepper_current[TMC_AXES] = { #if HAS_TRINAMIC - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) stepperX.getCurrent(), #else 0, #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) stepperY.getCurrent(), #else 0, #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) stepperZ.getCurrent(), #else 0, #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) stepperX2.getCurrent(), #else 0, #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) stepperY2.getCurrent(), #else 0, #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) stepperZ2.getCurrent(), #else 0, #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) stepperE0.getCurrent(), #else 0, #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) stepperE1.getCurrent(), #else 0, #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) stepperE2.getCurrent(), #else 0, #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) stepperE3.getCurrent(), #else 0, #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) stepperE4.getCurrent() #else 0 @@ -765,57 +765,57 @@ void MarlinSettings::postprocess() { uint32_t tmc_hybrid_threshold[TMC_AXES] = { #if ENABLED(HYBRID_THRESHOLD) - #if X_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X) TMC_GET_PWMTHRS(X, X), #else X_HYBRID_THRESHOLD, #endif - #if Y_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y) TMC_GET_PWMTHRS(Y, Y), #else Y_HYBRID_THRESHOLD, #endif - #if Z_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z) TMC_GET_PWMTHRS(Z, Z), #else Z_HYBRID_THRESHOLD, #endif - #if X2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X2) TMC_GET_PWMTHRS(X, X2), #else X2_HYBRID_THRESHOLD, #endif - #if Y2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y2) TMC_GET_PWMTHRS(Y, Y2), #else Y2_HYBRID_THRESHOLD, #endif - #if Z2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z2) TMC_GET_PWMTHRS(Z, Z2), #else Z2_HYBRID_THRESHOLD, #endif - #if E0_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E0) TMC_GET_PWMTHRS(E, E0), #else E0_HYBRID_THRESHOLD, #endif - #if E1_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E1) TMC_GET_PWMTHRS(E, E1), #else E1_HYBRID_THRESHOLD, #endif - #if E2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E2) TMC_GET_PWMTHRS(E, E2), #else E2_HYBRID_THRESHOLD, #endif - #if E3_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E3) TMC_GET_PWMTHRS(E, E3), #else E3_HYBRID_THRESHOLD, #endif - #if E4_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E4) TMC_GET_PWMTHRS(E, E4) #else E4_HYBRID_THRESHOLD @@ -833,17 +833,17 @@ void MarlinSettings::postprocess() { // int16_t tmc_sgt[XYZ] = { #if ENABLED(SENSORLESS_HOMING) - #if defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if X_SENSORLESS stepperX.sgt(), #else 0, #endif - #if defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if Y_SENSORLESS stepperY.sgt(), #else 0, #endif - #if defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if Z_SENSORLESS stepperZ.sgt() #else 0 @@ -1325,37 +1325,37 @@ void MarlinSettings::postprocess() { uint16_t currents[TMC_AXES]; EEPROM_READ(currents); if (!validating) { - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) SET_CURR(X); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) SET_CURR(Y); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) SET_CURR(Z); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) SET_CURR(X2); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) SET_CURR(Y2); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) SET_CURR(Z2); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) SET_CURR(E0); #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) SET_CURR(E1); #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) SET_CURR(E2); #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) SET_CURR(E3); #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) SET_CURR(E4); #endif } @@ -1369,37 +1369,37 @@ void MarlinSettings::postprocess() { uint32_t tmc_hybrid_threshold[TMC_AXES]; EEPROM_READ(tmc_hybrid_threshold); if (!validating) { - #if X_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X) TMC_SET_PWMTHRS(X, X); #endif - #if Y_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y) TMC_SET_PWMTHRS(Y, Y); #endif - #if Z_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z) TMC_SET_PWMTHRS(Z, Z); #endif - #if X2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(X2) TMC_SET_PWMTHRS(X, X2); #endif - #if Y2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Y2) TMC_SET_PWMTHRS(Y, Y2); #endif - #if Z2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(Z2) TMC_SET_PWMTHRS(Z, Z2); #endif - #if E0_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E0) TMC_SET_PWMTHRS(E, E0); #endif - #if E1_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E1) TMC_SET_PWMTHRS(E, E1); #endif - #if E2_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E2) TMC_SET_PWMTHRS(E, E2); #endif - #if E3_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E3) TMC_SET_PWMTHRS(E, E3); #endif - #if E4_IS_TRINAMIC + #if AXIS_HAS_STEALTHCHOP(E4) TMC_SET_PWMTHRS(E, E4); #endif } @@ -1419,26 +1419,26 @@ void MarlinSettings::postprocess() { #if ENABLED(SENSORLESS_HOMING) if (!validating) { #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(X) stepperX.sgt(tmc_sgt[0]); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(X2) stepperX2.sgt(tmc_sgt[0]); #endif #endif #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Y) stepperY.sgt(tmc_sgt[1]); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Y2) stepperY2.sgt(tmc_sgt[1]); #endif #endif #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_HAS_STALLGUARD(Z) stepperZ.sgt(tmc_sgt[2]); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_HAS_STALLGUARD(Z2) stepperZ2.sgt(tmc_sgt[2]); #endif #endif @@ -2428,61 +2428,61 @@ void MarlinSettings::reset() { #if HAS_TRINAMIC /** - * TMC2130 / TMC2208 / TRAMS stepper driver current + * TMC2130 / TMC2208 stepper driver current */ if (!forReplay) { CONFIG_ECHO_START; SERIAL_ECHOLNPGM("Stepper driver current:"); } CONFIG_ECHO_START; - #if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) say_M906(); #endif - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) SERIAL_ECHOPAIR(" X", stepperX.getCurrent()); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) SERIAL_ECHOPAIR(" Y", stepperY.getCurrent()); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) SERIAL_ECHOPAIR(" Z", stepperZ.getCurrent()); #endif - #if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) SERIAL_EOL(); #endif - #if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) say_M906(); SERIAL_ECHOPGM(" I1"); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) SERIAL_ECHOPAIR(" X", stepperX2.getCurrent()); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) SERIAL_ECHOPAIR(" Y", stepperY2.getCurrent()); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) SERIAL_ECHOPAIR(" Z", stepperZ2.getCurrent()); #endif - #if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) SERIAL_EOL(); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) say_M906(); SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getCurrent()); #endif - #if E_STEPPERS > 1 && E1_IS_TRINAMIC + #if E_STEPPERS > 1 && AXIS_IS_TMC(E1) say_M906(); SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getCurrent()); #endif - #if E_STEPPERS > 2 && E2_IS_TRINAMIC + #if E_STEPPERS > 2 && AXIS_IS_TMC(E2) say_M906(); SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getCurrent()); #endif - #if E_STEPPERS > 3 && E3_IS_TRINAMIC + #if E_STEPPERS > 3 && AXIS_IS_TMC(E3) say_M906(); SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getCurrent()); #endif - #if E_STEPPERS > 4 && E4_IS_TRINAMIC + #if E_STEPPERS > 4 && AXIS_IS_TMC(E4) say_M906(); SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getCurrent()); #endif @@ -2497,54 +2497,54 @@ void MarlinSettings::reset() { SERIAL_ECHOLNPGM("Hybrid Threshold:"); } CONFIG_ECHO_START; - #if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) say_M913(); #endif - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) SERIAL_ECHOPAIR(" X", TMC_GET_PWMTHRS(X, X)); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) SERIAL_ECHOPAIR(" Y", TMC_GET_PWMTHRS(Y, Y)); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) SERIAL_ECHOPAIR(" Z", TMC_GET_PWMTHRS(Z, Z)); #endif - #if X_IS_TRINAMIC || Y_IS_TRINAMIC || Z_IS_TRINAMIC + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) SERIAL_EOL(); #endif - #if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) say_M913(); SERIAL_ECHOPGM(" I1"); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) SERIAL_ECHOPAIR(" X", TMC_GET_PWMTHRS(X, X2)); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) SERIAL_ECHOPAIR(" Y", TMC_GET_PWMTHRS(Y, Y2)); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) SERIAL_ECHOPAIR(" Z", TMC_GET_PWMTHRS(Z, Z2)); #endif - #if X2_IS_TRINAMIC || Y2_IS_TRINAMIC || Z2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) SERIAL_EOL(); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) say_M913(); SERIAL_ECHOLNPAIR(" T0 E", TMC_GET_PWMTHRS(E, E0)); #endif - #if E_STEPPERS > 1 && E1_IS_TRINAMIC + #if E_STEPPERS > 1 && AXIS_IS_TMC(E1) say_M913(); SERIAL_ECHOLNPAIR(" T1 E", TMC_GET_PWMTHRS(E, E1)); #endif - #if E_STEPPERS > 2 && E2_IS_TRINAMIC + #if E_STEPPERS > 2 && AXIS_IS_TMC(E2) say_M913(); SERIAL_ECHOLNPAIR(" T2 E", TMC_GET_PWMTHRS(E, E2)); #endif - #if E_STEPPERS > 3 && E3_IS_TRINAMIC + #if E_STEPPERS > 3 && AXIS_IS_TMC(E3) say_M913(); SERIAL_ECHOLNPAIR(" T3 E", TMC_GET_PWMTHRS(E, E3)); #endif - #if E_STEPPERS > 4 && E4_IS_TRINAMIC + #if E_STEPPERS > 4 && AXIS_IS_TMC(E4) say_M913(); SERIAL_ECHOLNPAIR(" T4 E", TMC_GET_PWMTHRS(E, E4)); #endif @@ -2560,36 +2560,33 @@ void MarlinSettings::reset() { SERIAL_ECHOLNPGM("Sensorless homing threshold:"); } CONFIG_ECHO_START; - #define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS))) - #define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS))) - #define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS))) - #if HAS_X_SENSORLESS || HAS_Y_SENSORLESS || HAS_Z_SENSORLESS + #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS say_M914(); - #if HAS_X_SENSORLESS + #if X_SENSORLESS SERIAL_ECHOPAIR(" X", stepperX.sgt()); #endif - #if HAS_Y_SENSORLESS + #if Y_SENSORLESS SERIAL_ECHOPAIR(" Y", stepperY.sgt()); #endif - #if HAS_Z_SENSORLESS + #if Z_SENSORLESS SERIAL_ECHOPAIR(" Z", stepperZ.sgt()); #endif SERIAL_EOL(); #endif - #define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && ENABLED(X2_IS_TMC2130)) - #define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && ENABLED(Y2_IS_TMC2130)) - #define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && ENABLED(Z2_IS_TMC2130)) - #if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS + #define X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(X2)) + #define Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)) + #define Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)) + #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS say_M914(); SERIAL_ECHOPGM(" I1"); - #if HAS_X2_SENSORLESS + #if X2_SENSORLESS SERIAL_ECHOPAIR(" X", stepperX2.sgt()); #endif - #if HAS_Y2_SENSORLESS + #if Y2_SENSORLESS SERIAL_ECHOPAIR(" Y", stepperY2.sgt()); #endif - #if HAS_Z2_SENSORLESS + #if Z2_SENSORLESS SERIAL_ECHOPAIR(" Z", stepperZ2.sgt()); #endif SERIAL_EOL(); diff --git a/Marlin/drivers.h b/Marlin/drivers.h new file mode 100644 index 000000000000..7405b924e1d6 --- /dev/null +++ b/Marlin/drivers.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 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 . + * + */ +#ifndef _DRIVERS_H_ +#define _DRIVERS_H_ + +#define A4988 0x001 +#define DRV8825 0x002 +#define LV8729 0x003 +#define L6470 0x104 +#define TB6560 0x005 +#define TB6600 0x006 +#define TMC2100 0x007 +#define TMC2130 0x108 +#define TMC2130_STANDALONE 0x008 +#define TMC2208 0x109 +#define TMC2208_STANDALONE 0x009 +#define TMC26X 0x10A +#define TMC26X_STANDALONE 0x00A +#define TMC2660 0x10B +#define TMC2660_STANDALONE 0x00B + +#define AXIS_DRIVER_TYPE(A, T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) ) + +#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE( X,T) || AXIS_DRIVER_TYPE(X2,T) || \ + AXIS_DRIVER_TYPE( Y,T) || AXIS_DRIVER_TYPE(Y2,T) || \ + AXIS_DRIVER_TYPE( Z,T) || AXIS_DRIVER_TYPE(Z2,T) || \ + AXIS_DRIVER_TYPE(E0,T) || \ + AXIS_DRIVER_TYPE(E1,T) || \ + AXIS_DRIVER_TYPE(E2,T) || \ + AXIS_DRIVER_TYPE(E3,T) || \ + AXIS_DRIVER_TYPE(E4,T) ) + +// Test for supported TMC drivers that require advanced configuration +// Does not match standalone configurations +#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) ) + +#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A, TMC2130) || \ + AXIS_DRIVER_TYPE(A, TMC2208) || \ + AXIS_DRIVER_TYPE(A, TMC2660) ) + +#endif // _DRIVERS_H_ diff --git a/Marlin/macros.h b/Marlin/macros.h index 45c4334ae2e7..9479788aa22d 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -231,4 +231,4 @@ #define FMOD(x, y) fmodf(x, y) #define HYPOT(x,y) SQRT(HYPOT2(x,y)) -#endif //__MACROS_H +#endif // MACROS_H diff --git a/Marlin/pins_EINSY_RAMBO.h b/Marlin/pins_EINSY_RAMBO.h index b3c1d1caa010..428dc047c8c0 100644 --- a/Marlin/pins_EINSY_RAMBO.h +++ b/Marlin/pins_EINSY_RAMBO.h @@ -33,10 +33,8 @@ // // TMC2130 Configuration_adv defaults for EinsyRambo // -#if DISABLED(HAVE_TMC2130) - #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRambo." -#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130) - #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRambo." +#if !AXIS_DRIVER_TYPE(X, TMC2130) || !AXIS_DRIVER_TYPE(Y, TMC2130) || !AXIS_DRIVER_TYPE(Z, TMC2130) || !AXIS_DRIVER_TYPE(E0, TMC2130) + #error "You must set ([XYZ]|E0)_DRIVER_TYPE to TMC2130 in Configuration.h for EinsyRambo." #endif // TMC2130 Diag Pins (currently just for reference) diff --git a/Marlin/pins_EINSY_RETRO.h b/Marlin/pins_EINSY_RETRO.h index df4f1c20beba..a100d9329e33 100644 --- a/Marlin/pins_EINSY_RETRO.h +++ b/Marlin/pins_EINSY_RETRO.h @@ -33,10 +33,8 @@ // // TMC2130 Configuration_adv defaults for EinsyRetro // -#if DISABLED(HAVE_TMC2130) - #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRetro." -#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130) - #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRetro." +#if !AXIS_DRIVER_TYPE(X, TMC2130) || !AXIS_DRIVER_TYPE(Y, TMC2130) || !AXIS_DRIVER_TYPE(Z, TMC2130) || !AXIS_DRIVER_TYPE(E0, TMC2130) + #error "You must set ([XYZ]|E0)_DRIVER_TYPE to TMC2130 in Configuration.h for EinsyRetro." #endif // TMC2130 Diag Pins (currently just for reference) diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 2dfc3aa2f615..20d1cba520c2 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -138,7 +138,7 @@ #endif #endif -#if ENABLED(HAVE_TMC2208) +#if HAS_DRIVER(TMC2208) /** * TMC2208 stepper drivers * diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp index 32ef99a71029..a45146b289c3 100644 --- a/Marlin/stepper_indirection.cpp +++ b/Marlin/stepper_indirection.cpp @@ -38,43 +38,43 @@ // // TMC26X Driver objects and inits // -#if ENABLED(HAVE_TMC26X) +#if HAS_DRIVER(TMC26X) #include #include #define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) - #if ENABLED(X_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X, TMC26X) _TMC26X_DEFINE(X); #endif - #if ENABLED(X2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X2, TMC26X) _TMC26X_DEFINE(X2); #endif - #if ENABLED(Y_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y, TMC26X) _TMC26X_DEFINE(Y); #endif - #if ENABLED(Y2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y2, TMC26X) _TMC26X_DEFINE(Y2); #endif - #if ENABLED(Z_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z, TMC26X) _TMC26X_DEFINE(Z); #endif - #if ENABLED(Z2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z2, TMC26X) _TMC26X_DEFINE(Z2); #endif - #if ENABLED(E0_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E0, TMC26X) _TMC26X_DEFINE(E0); #endif - #if ENABLED(E1_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E1, TMC26X) _TMC26X_DEFINE(E1); #endif - #if ENABLED(E2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E2, TMC26X) _TMC26X_DEFINE(E2); #endif - #if ENABLED(E3_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E3, TMC26X) _TMC26X_DEFINE(E3); #endif - #if ENABLED(E4_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E4, TMC26X) _TMC26X_DEFINE(E4); #endif @@ -84,46 +84,46 @@ }while(0) void tmc26x_init_to_defaults() { - #if ENABLED(X_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X, TMC26X) _TMC26X_INIT(X); #endif - #if ENABLED(X2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X2, TMC26X) _TMC26X_INIT(X2); #endif - #if ENABLED(Y_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y, TMC26X) _TMC26X_INIT(Y); #endif - #if ENABLED(Y2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y2, TMC26X) _TMC26X_INIT(Y2); #endif - #if ENABLED(Z_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z, TMC26X) _TMC26X_INIT(Z); #endif - #if ENABLED(Z2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z2, TMC26X) _TMC26X_INIT(Z2); #endif - #if ENABLED(E0_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E0, TMC26X) _TMC26X_INIT(E0); #endif - #if ENABLED(E1_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E1, TMC26X) _TMC26X_INIT(E1); #endif - #if ENABLED(E2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E2, TMC26X) _TMC26X_INIT(E2); #endif - #if ENABLED(E3_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E3, TMC26X) _TMC26X_INIT(E3); #endif - #if ENABLED(E4_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E4, TMC26X) _TMC26X_INIT(E4); #endif } -#endif // HAVE_TMC26X +#endif // TMC26X // // TMC2130 Driver objects and inits // -#if ENABLED(HAVE_TMC2130) +#if HAS_DRIVER(TMC2130) #include #include @@ -141,37 +141,37 @@ #endif // Stepper objects of TMC2130 steppers used - #if ENABLED(X_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X, TMC2130) _TMC2130_DEFINE(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X2, TMC2130) _TMC2130_DEFINE(X2); #endif - #if ENABLED(Y_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y, TMC2130) _TMC2130_DEFINE(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y2, TMC2130) _TMC2130_DEFINE(Y2); #endif - #if ENABLED(Z_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z, TMC2130) _TMC2130_DEFINE(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z2, TMC2130) _TMC2130_DEFINE(Z2); #endif - #if ENABLED(E0_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E0, TMC2130) _TMC2130_DEFINE(E0); #endif - #if ENABLED(E1_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E1, TMC2130) _TMC2130_DEFINE(E1); #endif - #if ENABLED(E2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E2, TMC2130) _TMC2130_DEFINE(E2); #endif - #if ENABLED(E3_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E3, TMC2130) _TMC2130_DEFINE(E3); #endif - #if ENABLED(E4_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E4, TMC2130) _TMC2130_DEFINE(E4); #endif @@ -208,75 +208,74 @@ #define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) void tmc2130_init_to_defaults() { - #if ENABLED(X_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X, TMC2130) _TMC2130_INIT( X, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X2, TMC2130) _TMC2130_INIT(X2, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(Y_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y, TMC2130) _TMC2130_INIT( Y, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y2, TMC2130) _TMC2130_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Z_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z, TMC2130) _TMC2130_INIT( Z, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z2, TMC2130) _TMC2130_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(E0_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E0, TMC2130) _TMC2130_INIT(E0, planner.axis_steps_per_mm[E_AXIS]); #endif - #if ENABLED(E1_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E1, TMC2130) { constexpr int extruder = 1; _TMC2130_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E2, TMC2130) { constexpr int extruder = 2; _TMC2130_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E3_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E3, TMC2130) { constexpr int extruder = 3; _TMC2130_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E4_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E4, TMC2130) { constexpr int extruder = 4; _TMC2130_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif #if ENABLED(SENSORLESS_HOMING) #define TMC_INIT_SGT(P,Q) stepper##Q.sgt(P##_HOMING_SENSITIVITY); #if X_SENSORLESS - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_DRIVER_TYPE(X, TMC2130) stepperX.sgt(X_HOMING_SENSITIVITY); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X2, TMC2130) stepperX2.sgt(X_HOMING_SENSITIVITY); #endif #endif #if Y_SENSORLESS - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_DRIVER_TYPE(Y, TMC2130) stepperY.sgt(Y_HOMING_SENSITIVITY); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y2, TMC2130) stepperY2.sgt(Y_HOMING_SENSITIVITY); #endif #endif #if Z_SENSORLESS - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if AXIS_DRIVER_TYPE(Z, TMC2130) stepperZ.sgt(Z_HOMING_SENSITIVITY); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z2, TMC2130) stepperZ2.sgt(Z_HOMING_SENSITIVITY); #endif #endif #endif } - -#endif // HAVE_TMC2130 +#endif // TMC2130 // // TMC2208 Driver objects and inits // -#if ENABLED(HAVE_TMC2208) +#if HAS_DRIVER(TMC2208) #undef HardwareSerial_h // undo Marlin trickery #include @@ -293,77 +292,77 @@ TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1) // Stepper objects of TMC2208 steppers used - #if ENABLED(X_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X, TMC2208) #ifdef X_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(X); #else _TMC2208_DEFINE_SOFTWARE(X); #endif #endif - #if ENABLED(X2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X2, TMC2208) #ifdef X2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(X2); #else _TMC2208_DEFINE_SOFTWARE(X2); #endif #endif - #if ENABLED(Y_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y, TMC2208) #ifdef Y_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Y); #else _TMC2208_DEFINE_SOFTWARE(Y); #endif #endif - #if ENABLED(Y2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y2, TMC2208) #ifdef Y2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Y2); #else _TMC2208_DEFINE_SOFTWARE(Y2); #endif #endif - #if ENABLED(Z_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z, TMC2208) #ifdef Z_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Z); #else _TMC2208_DEFINE_SOFTWARE(Z); #endif #endif - #if ENABLED(Z2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z2, TMC2208) #ifdef Z2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Z2); #else _TMC2208_DEFINE_SOFTWARE(Z2); #endif #endif - #if ENABLED(E0_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E0, TMC2208) #ifdef E0_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E0); #else _TMC2208_DEFINE_SOFTWARE(E0); #endif #endif - #if ENABLED(E1_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E1, TMC2208) #ifdef E1_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E1); #else _TMC2208_DEFINE_SOFTWARE(E1); #endif #endif - #if ENABLED(E2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E2, TMC2208) #ifdef E2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E2); #else _TMC2208_DEFINE_SOFTWARE(E2); #endif #endif - #if ENABLED(E3_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E3, TMC2208) #ifdef E3_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E3); #else _TMC2208_DEFINE_SOFTWARE(E3); #endif #endif - #if ENABLED(E4_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E4, TMC2208) #ifdef E4_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E4); #else @@ -372,37 +371,37 @@ #endif void tmc2208_serial_begin() { - #if ENABLED(X_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X, TMC2208) X_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(X2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X2, TMC2208) X2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Y_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y, TMC2208) Y_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Y2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y2, TMC2208) Y2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Z_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z, TMC2208) Z_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Z2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z2, TMC2208) Z2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E0_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E0, TMC2208) E0_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E1_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E1, TMC2208) E1_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E2, TMC2208) E2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E3_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E3, TMC2208) E3_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E4_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E4, TMC2208) E4_HARDWARE_SERIAL.begin(115200); #endif } @@ -446,93 +445,94 @@ #define _TMC2208_INIT(ST, SPMM) tmc2208_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) void tmc2208_init_to_defaults() { - #if ENABLED(X_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X, TMC2208) _TMC2208_INIT(X, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(X2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(X2, TMC2208) _TMC2208_INIT(X2, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(Y_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y, TMC2208) _TMC2208_INIT(Y, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Y2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Y2, TMC2208) _TMC2208_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Z_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z, TMC2208) _TMC2208_INIT(Z, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(Z2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(Z2, TMC2208) _TMC2208_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(E0_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E0, TMC2208) _TMC2208_INIT(E0, planner.axis_steps_per_mm[E_AXIS]); #endif - #if ENABLED(E1_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E1, TMC2208) { constexpr int extruder = 1; _TMC2208_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E2_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E2, TMC2208) { constexpr int extruder = 2; _TMC2208_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E3_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E3, TMC2208) { constexpr int extruder = 3; _TMC2208_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E4_IS_TMC2208) + #if AXIS_DRIVER_TYPE(E4, TMC2208) { constexpr int extruder = 4; _TMC2208_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif } - -#endif // HAVE_TMC2208 +#endif // TMC2208 void restore_stepper_drivers() { - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) stepperX.push(); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) stepperX2.push(); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) stepperY.push(); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) stepperY2.push(); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) stepperZ.push(); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) stepperZ2.push(); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) stepperE0.push(); #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) stepperE1.push(); #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) stepperE2.push(); #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) stepperE3.push(); #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) stepperE4.push(); #endif } void reset_stepper_drivers() { - #if ENABLED(HAVE_TMC26X) + #if HAS_DRIVER(TMC26X) tmc26x_init_to_defaults(); #endif - #if ENABLED(HAVE_TMC2130) + #if HAS_DRIVER(TMC2130) + delay(100); tmc2130_init_to_defaults(); #endif - #if ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2208) + delay(100); tmc2208_init_to_defaults(); #endif #ifdef TMC_ADV TMC_ADV() #endif - #if ENABLED(HAVE_L6470DRIVER) + #if HAS_DRIVER(L6470) L6470_init_to_defaults(); #endif } @@ -540,7 +540,7 @@ void reset_stepper_drivers() { // // L6470 Driver objects and inits // -#if ENABLED(HAVE_L6470DRIVER) +#if HAS_DRIVER(L6470) #include #include @@ -548,37 +548,37 @@ void reset_stepper_drivers() { #define _L6470_DEFINE(ST) L6470 stepper##ST(ST##_ENABLE_PIN) // L6470 Stepper objects - #if ENABLED(X_IS_L6470) + #if AXIS_DRIVER_TYPE(X, L6470) _L6470_DEFINE(X); #endif - #if ENABLED(X2_IS_L6470) + #if AXIS_DRIVER_TYPE(X2, L6470) _L6470_DEFINE(X2); #endif - #if ENABLED(Y_IS_L6470) + #if AXIS_DRIVER_TYPE(Y, L6470) _L6470_DEFINE(Y); #endif - #if ENABLED(Y2_IS_L6470) + #if AXIS_DRIVER_TYPE(Y2, L6470) _L6470_DEFINE(Y2); #endif - #if ENABLED(Z_IS_L6470) + #if AXIS_DRIVER_TYPE(Z, L6470) _L6470_DEFINE(Z); #endif - #if ENABLED(Z2_IS_L6470) + #if AXIS_DRIVER_TYPE(Z2, L6470) _L6470_DEFINE(Z2); #endif - #if ENABLED(E0_IS_L6470) + #if AXIS_DRIVER_TYPE(E0, L6470) _L6470_DEFINE(E0); #endif - #if ENABLED(E1_IS_L6470) + #if AXIS_DRIVER_TYPE(E1, L6470) _L6470_DEFINE(E1); #endif - #if ENABLED(E2_IS_L6470) + #if AXIS_DRIVER_TYPE(E2, L6470) _L6470_DEFINE(E2); #endif - #if ENABLED(E3_IS_L6470) + #if AXIS_DRIVER_TYPE(E3, L6470) _L6470_DEFINE(E3); #endif - #if ENABLED(E4_IS_L6470) + #if AXIS_DRIVER_TYPE(E4, L6470) _L6470_DEFINE(E4); #endif @@ -591,39 +591,39 @@ void reset_stepper_drivers() { }while(0) void L6470_init_to_defaults() { - #if ENABLED(X_IS_L6470) + #if AXIS_DRIVER_TYPE(X, L6470) _L6470_INIT(X); #endif - #if ENABLED(X2_IS_L6470) + #if AXIS_DRIVER_TYPE(X2, L6470) _L6470_INIT(X2); #endif - #if ENABLED(Y_IS_L6470) + #if AXIS_DRIVER_TYPE(Y, L6470) _L6470_INIT(Y); #endif - #if ENABLED(Y2_IS_L6470) + #if AXIS_DRIVER_TYPE(Y2, L6470) _L6470_INIT(Y2); #endif - #if ENABLED(Z_IS_L6470) + #if AXIS_DRIVER_TYPE(Z, L6470) _L6470_INIT(Z); #endif - #if ENABLED(Z2_IS_L6470) + #if AXIS_DRIVER_TYPE(Z2, L6470) _L6470_INIT(Z2); #endif - #if ENABLED(E0_IS_L6470) + #if AXIS_DRIVER_TYPE(E0, L6470) _L6470_INIT(E0); #endif - #if ENABLED(E1_IS_L6470) + #if AXIS_DRIVER_TYPE(E1, L6470) _L6470_INIT(E1); #endif - #if ENABLED(E2_IS_L6470) + #if AXIS_DRIVER_TYPE(E2, L6470) _L6470_INIT(E2); #endif - #if ENABLED(E3_IS_L6470) + #if AXIS_DRIVER_TYPE(E3, L6470) _L6470_INIT(E3); #endif - #if ENABLED(E4_IS_L6470) + #if AXIS_DRIVER_TYPE(E4, L6470) _L6470_INIT(E4); #endif } -#endif // HAVE_L6470DRIVER +#endif // L6470 diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 3e67118d867b..54a17c51e1c2 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -47,25 +47,25 @@ #include "MarlinConfig.h" // TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI -#if ENABLED(HAVE_TMC26X) +#if HAS_DRIVER(TMC26X) #include #include void tmc26x_init_to_defaults(); #endif -#if ENABLED(HAVE_TMC2130) +#if HAS_DRIVER(TMC2130) #include void tmc2130_init_to_defaults(); #endif -#if ENABLED(HAVE_TMC2208) +#if HAS_DRIVER(TMC2208) #include void tmc2208_serial_begin(); void tmc2208_init_to_defaults(); #endif // L6470 has STEP on normal pins, but DIR/ENABLE via SPI -#if ENABLED(HAVE_L6470DRIVER) +#if HAS_DRIVER(L6470) #include #include void L6470_init_to_defaults(); @@ -75,7 +75,7 @@ void restore_stepper_drivers(); // Called by PSU_ON void reset_stepper_drivers(); // Called by settings.load / settings.reset // X Stepper -#if ENABLED(X_IS_L6470) +#if AXIS_DRIVER_TYPE(X, L6470) extern L6470 stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) do{ if (STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree(); }while(0) @@ -84,15 +84,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE) #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) #else - #if ENABLED(X_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X, TMC26X) extern TMC26XStepper stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) #define X_ENABLE_READ stepperX.isEnabled() #else - #if ENABLED(X_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X, TMC2130) extern TMC2130Stepper stepperX; - #elif ENABLED(X_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(X, TMC2208) extern TMC2208Stepper stepperX; #endif #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) @@ -108,7 +108,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X_STEP_READ READ(X_STEP_PIN) // Y Stepper -#if ENABLED(Y_IS_L6470) +#if AXIS_DRIVER_TYPE(Y, L6470) extern L6470 stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) do{ if (STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree(); }while(0) @@ -117,15 +117,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE) #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) #else - #if ENABLED(Y_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y, TMC26X) extern TMC26XStepper stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) #define Y_ENABLE_READ stepperY.isEnabled() #else - #if ENABLED(Y_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y, TMC2130) extern TMC2130Stepper stepperY; - #elif ENABLED(Y_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(Y, TMC2208) extern TMC2208Stepper stepperY; #endif #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) @@ -141,7 +141,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y_STEP_READ READ(Y_STEP_PIN) // Z Stepper -#if ENABLED(Z_IS_L6470) +#if AXIS_DRIVER_TYPE(Z, L6470) extern L6470 stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree(); }while(0) @@ -150,15 +150,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE) #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) #else - #if ENABLED(Z_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z, TMC26X) extern TMC26XStepper stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) #define Z_ENABLE_READ stepperZ.isEnabled() #else - #if ENABLED(Z_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z, TMC2130) extern TMC2130Stepper stepperZ; - #elif ENABLED(Z_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(Z, TMC2208) extern TMC2208Stepper stepperZ; #endif #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) @@ -175,7 +175,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // X2 Stepper #if HAS_X2_ENABLE - #if ENABLED(X2_IS_L6470) + #if AXIS_DRIVER_TYPE(X2, L6470) extern L6470 stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) do{ if (STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree(); }while(0) @@ -184,15 +184,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE) #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) #else - #if ENABLED(X2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(X2, TMC26X) extern TMC26XStepper stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) #define X2_ENABLE_READ stepperX2.isEnabled() #else - #if ENABLED(X2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X2, TMC2130) extern TMC2130Stepper stepperX2; - #elif ENABLED(X2_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(X2, TMC2208) extern TMC2208Stepper stepperX2; #endif #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) @@ -210,7 +210,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // Y2 Stepper #if HAS_Y2_ENABLE - #if ENABLED(Y2_IS_L6470) + #if AXIS_DRIVER_TYPE(Y2, L6470) extern L6470 stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) do{ if (STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree(); }while(0) @@ -219,15 +219,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE) #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) #else - #if ENABLED(Y2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Y2, TMC26X) extern TMC26XStepper stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) #define Y2_ENABLE_READ stepperY2.isEnabled() #else - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y2, TMC2130) extern TMC2130Stepper stepperY2; - #elif ENABLED(Y2_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(Y2, TMC2208) extern TMC2208Stepper stepperY2; #endif #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) @@ -245,7 +245,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // Z2 Stepper #if HAS_Z2_ENABLE - #if ENABLED(Z2_IS_L6470) + #if AXIS_DRIVER_TYPE(Z2, L6470) extern L6470 stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree(); }while(0) @@ -254,15 +254,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE) #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) #else - #if ENABLED(Z2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(Z2, TMC26X) extern TMC26XStepper stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) #define Z2_ENABLE_READ stepperZ2.isEnabled() #else - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z2, TMC2130) extern TMC2130Stepper stepperZ2; - #elif ENABLED(Z2_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(Z2, TMC2208) extern TMC2208Stepper stepperZ2; #endif #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) @@ -279,7 +279,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #endif // E0 Stepper -#if ENABLED(E0_IS_L6470) +#if AXIS_DRIVER_TYPE(E0, L6470) extern L6470 stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) do{ if (STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree(); }while(0) @@ -288,15 +288,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE) #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) #else - #if ENABLED(E0_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E0, TMC26X) extern TMC26XStepper stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) #define E0_ENABLE_READ stepperE0.isEnabled() #else - #if ENABLED(E0_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E0, TMC2130) extern TMC2130Stepper stepperE0; - #elif ENABLED(E0_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(E0, TMC2208) extern TMC2208Stepper stepperE0; #endif #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) @@ -312,7 +312,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E0_STEP_READ READ(E0_STEP_PIN) // E1 Stepper -#if ENABLED(E1_IS_L6470) +#if AXIS_DRIVER_TYPE(E1, L6470) extern L6470 stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) do{ if (STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree(); }while(0) @@ -321,15 +321,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE) #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) #else - #if ENABLED(E1_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E1, TMC26X) extern TMC26XStepper stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) #define E1_ENABLE_READ stepperE1.isEnabled() #else - #if ENABLED(E1_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E1, TMC2130) extern TMC2130Stepper stepperE1; - #elif ENABLED(E1_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(E1, TMC2208) extern TMC2208Stepper stepperE1; #endif #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) @@ -345,7 +345,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E1_STEP_READ READ(E1_STEP_PIN) // E2 Stepper -#if ENABLED(E2_IS_L6470) +#if AXIS_DRIVER_TYPE(E2, L6470) extern L6470 stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) do{ if (STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree(); }while(0) @@ -354,15 +354,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE) #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) #else - #if ENABLED(E2_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E2, TMC26X) extern TMC26XStepper stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) #define E2_ENABLE_READ stepperE2.isEnabled() #else - #if ENABLED(E2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E2, TMC2130) extern TMC2130Stepper stepperE2; - #elif ENABLED(E2_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(E2, TMC2208) extern TMC2208Stepper stepperE2; #endif #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) @@ -378,7 +378,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E2_STEP_READ READ(E2_STEP_PIN) // E3 Stepper -#if ENABLED(E3_IS_L6470) +#if AXIS_DRIVER_TYPE(E3, L6470) extern L6470 stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) do{ if (STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree(); }while(0) @@ -387,15 +387,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE) #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) #else - #if ENABLED(E3_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E3, TMC26X) extern TMC26XStepper stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) #define E3_ENABLE_READ stepperE3.isEnabled() #else - #if ENABLED(E3_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E3, TMC2130) extern TMC2130Stepper stepperE3; - #elif ENABLED(E3_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(E3, TMC2208) extern TMC2208Stepper stepperE3; #endif #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) @@ -411,7 +411,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E3_STEP_READ READ(E3_STEP_PIN) // E4 Stepper -#if ENABLED(E4_IS_L6470) +#if AXIS_DRIVER_TYPE(E4, L6470) extern L6470 stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) do{ if (STATE) stepperE4.Step_Clock(stepperE4.getStatus() & STATUS_HIZ); else stepperE4.softFree(); }while(0) @@ -420,15 +420,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE) #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) #else - #if ENABLED(E4_IS_TMC26X) + #if AXIS_DRIVER_TYPE(E4, TMC26X) extern TMC26XStepper stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) #define E4_ENABLE_READ stepperE4.isEnabled() #else - #if ENABLED(E4_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E4, TMC2130) extern TMC2130Stepper stepperE4; - #elif ENABLED(E4_IS_TMC2208) + #elif AXIS_DRIVER_TYPE(E4, TMC2208) extern TMC2208Stepper stepperE4; #endif #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) diff --git a/Marlin/tmc_util.cpp b/Marlin/tmc_util.cpp index 662fbc176c9d..2e9ba5575cfd 100644 --- a/Marlin/tmc_util.cpp +++ b/Marlin/tmc_util.cpp @@ -50,7 +50,7 @@ bool report_tmc_status = false; bool is_ot; bool is_error; }; - #if ENABLED(HAVE_TMC2130) + #if HAS_DRIVER(TMC2130) static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); } static uint8_t get_status_response(TMC2130Stepper &st) { return st.status_response & 0xF; } static TMC_driver_data get_driver_data(TMC2130Stepper &st) { @@ -68,7 +68,7 @@ bool report_tmc_status = false; return data; } #endif - #if ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2208) static uint32_t get_pwm_scale(TMC2208Stepper &st) { return st.pwm_scale_sum(); } static uint8_t get_status_response(TMC2208Stepper &st) { uint32_t drv_status = st.DRV_STATUS(); @@ -157,21 +157,21 @@ bool report_tmc_status = false; } } - #define HAS_HW_COMMS(ST) ENABLED(ST##_IS_TMC2130)|| (ENABLED(ST##_IS_TMC2208) && defined(ST##_HARDWARE_SERIAL)) + #define HAS_HW_COMMS(ST) AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL)) void monitor_tmc_driver() { static millis_t next_cOT = 0; if (ELAPSED(millis(), next_cOT)) { next_cOT = millis() + 500; - #if HAS_HW_COMMS(X) || ENABLED(IS_TRAMS) + #if HAS_HW_COMMS(X) static uint8_t x_otpw_cnt = 0; monitor_tmc_driver(stepperX, TMC_X, x_otpw_cnt); #endif - #if HAS_HW_COMMS(Y) || ENABLED(IS_TRAMS) + #if HAS_HW_COMMS(Y) static uint8_t y_otpw_cnt = 0; monitor_tmc_driver(stepperY, TMC_Y, y_otpw_cnt); #endif - #if HAS_HW_COMMS(Z) || ENABLED(IS_TRAMS) + #if HAS_HW_COMMS(Z) static uint8_t z_otpw_cnt = 0; monitor_tmc_driver(stepperZ, TMC_Z, z_otpw_cnt); #endif @@ -187,7 +187,7 @@ bool report_tmc_status = false; static uint8_t z2_otpw_cnt = 0; monitor_tmc_driver(stepperZ2, TMC_Z, z2_otpw_cnt); #endif - #if HAS_HW_COMMS(E0) || ENABLED(IS_TRAMS) + #if HAS_HW_COMMS(E0) static uint8_t e0_otpw_cnt = 0; monitor_tmc_driver(stepperE0, TMC_E0, e0_otpw_cnt); #endif @@ -309,7 +309,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { SERIAL_EOL(); } - #if ENABLED(HAVE_TMC2130) + #if HAS_DRIVER(TMC2130) static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) { switch (i) { case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break; @@ -329,7 +329,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { } #endif - #if ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2208) static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) { switch (i) { case TMC_TSTEP: { uint32_t data = 0; st.TSTEP(&data); SERIAL_PROTOCOL(data); break; } @@ -418,52 +418,52 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { } static void tmc_debug_loop(const TMC_debug_enum i) { - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) tmc_status(stepperX, TMC_X, i, planner.axis_steps_per_mm[X_AXIS]); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) tmc_status(stepperX2, TMC_X2, i, planner.axis_steps_per_mm[X_AXIS]); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) tmc_status(stepperY, TMC_Y, i, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) tmc_status(stepperY2, TMC_Y2, i, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) tmc_status(stepperZ, TMC_Z, i, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) tmc_status(stepperZ2, TMC_Z2, i, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) tmc_status(stepperE0, TMC_E0, i, planner.axis_steps_per_mm[E_AXIS]); #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) tmc_status(stepperE1, TMC_E1, i, planner.axis_steps_per_mm[E_AXIS #if ENABLED(DISTINCT_E_FACTORS) + 1 #endif ]); #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) tmc_status(stepperE2, TMC_E2, i, planner.axis_steps_per_mm[E_AXIS #if ENABLED(DISTINCT_E_FACTORS) + 2 #endif ]); #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) tmc_status(stepperE3, TMC_E3, i, planner.axis_steps_per_mm[E_AXIS #if ENABLED(DISTINCT_E_FACTORS) + 3 #endif ]); #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) tmc_status(stepperE4, TMC_E4, i, planner.axis_steps_per_mm[E_AXIS #if ENABLED(DISTINCT_E_FACTORS) + 4 @@ -475,40 +475,40 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { } static void drv_status_loop(const TMC_drv_status_enum i) { - #if X_IS_TRINAMIC + #if AXIS_IS_TMC(X) tmc_parse_drv_status(stepperX, TMC_X, i); #endif - #if X2_IS_TRINAMIC + #if AXIS_IS_TMC(X2) tmc_parse_drv_status(stepperX2, TMC_X2, i); #endif - #if Y_IS_TRINAMIC + #if AXIS_IS_TMC(Y) tmc_parse_drv_status(stepperY, TMC_Y, i); #endif - #if Y2_IS_TRINAMIC + #if AXIS_IS_TMC(Y2) tmc_parse_drv_status(stepperY2, TMC_Y2, i); #endif - #if Z_IS_TRINAMIC + #if AXIS_IS_TMC(Z) tmc_parse_drv_status(stepperZ, TMC_Z, i); #endif - #if Z2_IS_TRINAMIC + #if AXIS_IS_TMC(Z2) tmc_parse_drv_status(stepperZ2, TMC_Z2, i); #endif - #if E0_IS_TRINAMIC + #if AXIS_IS_TMC(E0) tmc_parse_drv_status(stepperE0, TMC_E0, i); #endif - #if E1_IS_TRINAMIC + #if AXIS_IS_TMC(E1) tmc_parse_drv_status(stepperE1, TMC_E1, i); #endif - #if E2_IS_TRINAMIC + #if AXIS_IS_TMC(E2) tmc_parse_drv_status(stepperE2, TMC_E2, i); #endif - #if E3_IS_TRINAMIC + #if AXIS_IS_TMC(E3) tmc_parse_drv_status(stepperE3, TMC_E3, i); #endif - #if E4_IS_TRINAMIC + #if AXIS_IS_TMC(E4) tmc_parse_drv_status(stepperE4, TMC_E4, i); #endif @@ -551,7 +551,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { TMC_REPORT("Stallguard thrs", TMC_SGT); DRV_REPORT("DRVSTATUS", TMC_DRV_CODES); - #if ENABLED(HAVE_TMC2130) + #if HAS_DRIVER(TMC2130) DRV_REPORT("stallguard\t", TMC_STALLGUARD); DRV_REPORT("sg_result\t", TMC_SG_RESULT); DRV_REPORT("fsactive\t", TMC_FSACTIVE); @@ -563,7 +563,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { DRV_REPORT("s2ga\t", TMC_S2GA); DRV_REPORT("otpw\t", TMC_DRV_OTPW); DRV_REPORT("ot\t", TMC_OT); - #if ENABLED(HAVE_TMC2208) + #if HAS_DRIVER(TMC2208) DRV_REPORT("157C\t", TMC_T157); DRV_REPORT("150C\t", TMC_T150); DRV_REPORT("143C\t", TMC_T143); @@ -589,43 +589,43 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { #endif // SENSORLESS_HOMING -#if ENABLED(HAVE_TMC2130) +#if HAS_DRIVER(TMC2130) #define SET_CS_PIN(st) OUT_WRITE(st##_CS_PIN, HIGH) void tmc_init_cs_pins() { - #if ENABLED(X_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X, TMC2130) SET_CS_PIN(X); #endif - #if ENABLED(Y_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y, TMC2130) SET_CS_PIN(Y); #endif - #if ENABLED(Z_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z, TMC2130) SET_CS_PIN(Z); #endif - #if ENABLED(X2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(X2, TMC2130) SET_CS_PIN(X2); #endif - #if ENABLED(Y2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Y2, TMC2130) SET_CS_PIN(Y2); #endif - #if ENABLED(Z2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(Z2, TMC2130) SET_CS_PIN(Z2); #endif - #if ENABLED(E0_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E0, TMC2130) SET_CS_PIN(E0); #endif - #if ENABLED(E1_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E1, TMC2130) SET_CS_PIN(E1); #endif - #if ENABLED(E2_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E2, TMC2130) SET_CS_PIN(E2); #endif - #if ENABLED(E3_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E3, TMC2130) SET_CS_PIN(E3); #endif - #if ENABLED(E4_IS_TMC2130) + #if AXIS_DRIVER_TYPE(E4, TMC2130) SET_CS_PIN(E4); #endif } -#endif // HAVE_TMC2130 +#endif // TMC2130 #endif // HAS_TRINAMIC diff --git a/Marlin/tmc_util.h b/Marlin/tmc_util.h index 08d461e42430..7efe67a50219 100644 --- a/Marlin/tmc_util.h +++ b/Marlin/tmc_util.h @@ -25,11 +25,11 @@ #include "MarlinConfig.h" -#if ENABLED(HAVE_TMC2130) +#if HAS_DRIVER(TMC2130) #include #endif -#if ENABLED(HAVE_TMC2208) +#if HAS_DRIVER(TMC2208) #include #endif @@ -100,7 +100,7 @@ void monitor_tmc_driver(); void tmc_sensorless_homing(TMC2130Stepper &st, const bool enable=true); #endif -#if ENABLED(HAVE_TMC2130) +#if HAS_DRIVER(TMC2130) void tmc_init_cs_pins(); #endif From e5b928f574fce5d8cb924f97db0a4c29285efd6f Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Thu, 26 Jul 2018 01:00:28 +0200 Subject: [PATCH 06/15] [1.1.x] Typo fix (#11366) Typo fix --- Marlin/Configuration.h | 2 +- Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h | 2 +- Marlin/example_configurations/AliExpress/CL-260/Configuration.h | 2 +- Marlin/example_configurations/Anet/A6/Configuration.h | 2 +- Marlin/example_configurations/Anet/A8/Configuration.h | 2 +- .../example_configurations/BIBO/TouchX/Cyclops/Configuration.h | 2 +- .../example_configurations/BIBO/TouchX/default/Configuration.h | 2 +- Marlin/example_configurations/BQ/Hephestos/Configuration.h | 2 +- Marlin/example_configurations/BQ/Hephestos_2/Configuration.h | 2 +- Marlin/example_configurations/BQ/WITBOX/Configuration.h | 2 +- Marlin/example_configurations/Cartesio/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-10/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-10S/Configuration.h | 2 +- .../example_configurations/Creality/CR-10mini/Configuration.h | 2 +- Marlin/example_configurations/Creality/CR-8/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-2/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-3/Configuration.h | 2 +- Marlin/example_configurations/Creality/Ender-4/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 2 +- Marlin/example_configurations/Felix/DUAL/Configuration.h | 2 +- .../example_configurations/FolgerTech/i3-2020/Configuration.h | 2 +- Marlin/example_configurations/Geeetech/GT2560/Configuration.h | 2 +- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro B/bltouch/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro B/noprobe/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro C/Configuration.h | 2 +- .../Geeetech/Prusa i3 Pro W/Configuration.h | 2 +- Marlin/example_configurations/Infitary/i3-M508/Configuration.h | 2 +- Marlin/example_configurations/JGAurora/A5/Configuration.h | 2 +- Marlin/example_configurations/Malyan/M150/Configuration.h | 2 +- .../example_configurations/Micromake/C1/basic/Configuration.h | 2 +- .../Micromake/C1/enhanced/Configuration.h | 2 +- Marlin/example_configurations/RepRapPro/Huxley/Configuration.h | 2 +- .../RepRapWorld/Megatronics/Configuration.h | 2 +- Marlin/example_configurations/RigidBot/Configuration.h | 2 +- Marlin/example_configurations/SCARA/Configuration.h | 2 +- Marlin/example_configurations/Sanguinololu/Configuration.h | 2 +- Marlin/example_configurations/TinyBoy2/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X1/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X3A/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/X5S/Configuration.h | 2 +- Marlin/example_configurations/Tronxy/XY100/Configuration.h | 2 +- Marlin/example_configurations/Velleman/K8200/Configuration.h | 2 +- Marlin/example_configurations/Velleman/K8400/Configuration.h | 2 +- .../Velleman/K8400/Dual-head/Configuration.h | 2 +- .../example_configurations/Wanhao/Duplicator 6/Configuration.h | 2 +- Marlin/example_configurations/adafruit/ST7565/Configuration.h | 2 +- .../delta/FLSUN/auto_calibrate/Configuration.h | 2 +- .../example_configurations/delta/FLSUN/kossel/Configuration.h | 2 +- .../delta/FLSUN/kossel_mini/Configuration.h | 2 +- .../example_configurations/delta/Hatchbox_Alpha/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_pro/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_xl/Configuration.h | 2 +- Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 2 +- Marlin/example_configurations/wt150/Configuration.h | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index decca5dc055f..cf85738da53e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 1acfd2cb32b3..d5a302e0ae86 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -1866,7 +1866,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 822d26d08268..f1afc6af6b13 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 5d4acca02480..2ac0e8c1c3bc 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -2001,7 +2001,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index 25c66fd01557..1d26a2a5d9d9 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -1855,7 +1855,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 4f3a85bf7fb7..40f2d8b27a6c 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index 841416ebfc21..a32c6ddf42b1 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index acbfe8629df0..9c1cb4961c8a 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -1834,7 +1834,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index f3b717798f50..03449a6fcc03 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -1844,7 +1844,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 83172803b5ef..fc3221bce539 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -1834,7 +1834,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 86798c641930..14127010a1fa 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1845,7 +1845,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 0e8f7be92828..84a7e692d070 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -1856,7 +1856,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index efe0a4f0f099..e519a849c2f8 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -1847,7 +1847,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 4e170e2d25ef..794f9c19ab88 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -1865,7 +1865,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index a72acb4a3863..75c634525433 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -1856,7 +1856,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index ce81b0dd9cde..e4749cdb65c1 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration.h b/Marlin/example_configurations/Creality/Ender-3/Configuration.h index 13cc908770a7..3f0c648e3744 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index ef0712ed82af..327b5632e79d 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -1856,7 +1856,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 25a8a19da517..aff29d6895cf 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1828,7 +1828,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 5a1bc935c736..4e4e2a5ae44d 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1828,7 +1828,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index 92441e284907..a010bfd17c84 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -1852,7 +1852,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 9674a7d80a49..a71735209246 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -1861,7 +1861,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index b961bf06774a..3e44e815597f 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index f63f1e0cbc49..3ccc6ac047c0 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1862,7 +1862,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 8bb21e5ffda5..c685cdb333c8 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1861,7 +1861,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h index 217caaa0fdf7..3fa2a2acd3d8 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h index fe5191f3e46c..e5915ec90921 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index 6f0bd82fe0fb..ad45383c35e4 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index b69296a58194..42ac3cde6d63 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -1857,7 +1857,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index a0df35f3a6b0..f3f3bda28dfe 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -1874,7 +1874,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 7efb417f620e..23444ccb356e 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index b1fa0845324d..edefea9c136e 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 7a0af568629f..e442a4f66ddf 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -1895,7 +1895,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 626096c719bf..083a056f3bec 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 1ad8d2177e75..1adc9f018296 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 2631faee27a1..99f14d09c29d 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1859,7 +1859,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 8d2bb1a41eb4..4ae5c24d1655 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -1877,7 +1877,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 6e693f23325b..3ed62daac778 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1905,7 +1905,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 00d5f8680364..72dbae42344b 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration.h b/Marlin/example_configurations/Tronxy/X3A/Configuration.h index 91df8b254dca..f736b25bd83b 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration.h @@ -1850,7 +1850,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index d175788c26aa..7a3dcd212c69 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index c5651cbfe286..511f1b26a04b 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -1857,7 +1857,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 086504050085..8cc1714aa083 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -1881,7 +1881,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index 2655b5581b77..2a8d5bf98950 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index 8a4ff2072a30..d9a6ed0df451 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -1846,7 +1846,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index 5e84bfd92a69..6cac8b1ce174 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -1859,7 +1859,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 7b273b1ab21b..b293157a61cc 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1852,7 +1852,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 95a22a079ce8..c579abc67849 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -1982,7 +1982,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index bd71f195301e..1c037b18af61 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -1981,7 +1981,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 16ddf91eb6d2..07953246590c 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -1980,7 +1980,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index ff25f18a69c4..1df8b596165b 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -1983,7 +1983,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 03b7311adc9c..920a0d2b2479 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1968,7 +1968,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index fe872ff17707..f868d837f50a 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1970,7 +1970,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 624f40748807..652cb24394e3 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1971,7 +1971,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 1f2504d44bb7..ca2e9f4a02b6 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1971,7 +1971,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index f64f520f1740..6ece6deae7c8 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -1860,7 +1860,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 465f45375a6b..a704f296dee2 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1849,7 +1849,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index e9eaee6570a3..5ef59db0932c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1841,7 +1841,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 738557d6740c..2823590d91a1 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1851,7 +1851,7 @@ * For Neopixel LED an overall brightness parameter is also available. * * *** CAUTION *** - * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * LED Strips require a MOSFET Chip between PWM lines and LEDs, * as the Arduino cannot handle the current the LEDs will require. * Failure to follow this precaution can destroy your Arduino! * NOTE: A separate 5V power supply is required! The Neopixel LED needs From 349cf3ee5ad30b05c5c9b215b4ebe2fcda6eb34a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Jul 2018 18:06:25 -0500 Subject: [PATCH 07/15] Sync enqueue_and_echo_command with 2.0.x --- Marlin/Marlin.h | 4 ++-- Marlin/Marlin_main.cpp | 4 ++-- Marlin/malyanlcd.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 27d7e49e5cba..ef1a0cc9ee79 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -193,8 +193,8 @@ extern bool Running; inline bool IsRunning() { return Running; } inline bool IsStopped() { return !Running; } -bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); // Add a single command to the end of the buffer. Return false on failure. -void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command. +bool enqueue_and_echo_command(const char* cmd); // Add a single command to the end of the buffer. Return false on failure. +void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command. void clear_command_queue(); #if ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 04f011e7349f..2b244b268565 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -871,8 +871,8 @@ inline bool _enqueuecommand(const char* cmd, bool say_ok=false) { /** * Enqueue with Serial Echo */ -bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { - if (_enqueuecommand(cmd, say_ok)) { +bool enqueue_and_echo_command(const char* cmd) { + if (_enqueuecommand(cmd)) { SERIAL_ECHO_START(); SERIAL_ECHOPAIR(MSG_ENQUEUEING, cmd); SERIAL_CHAR('"'); diff --git a/Marlin/malyanlcd.cpp b/Marlin/malyanlcd.cpp index 606005ff9bbb..74a5b611d866 100644 --- a/Marlin/malyanlcd.cpp +++ b/Marlin/malyanlcd.cpp @@ -332,7 +332,7 @@ void process_lcd_s_command(const char* command) { case 'H': // Home all axis - enqueue_and_echo_command("G28", false); + enqueue_and_echo_command("G28"); break; case 'L': { From 637489ae17d9db53a920f1df574ac507ea116559 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Jul 2018 18:16:33 -0500 Subject: [PATCH 08/15] Tweak some SoftPWM code --- Marlin/temperature.cpp | 97 +++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 62 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 5f2f69c5130c..94eebfb63aa9 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -260,19 +260,29 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; workKp = 0, workKi = 0, workKd = 0, max = 0, min = 10000; - #define HAS_TP_BED (ENABLED(THERMAL_PROTECTION_BED) && ENABLED(PIDTEMPBED)) - #if HAS_TP_BED && ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(PIDTEMP) - #define TV(B,H) (hotend < 0 ? (B) : (H)) - #elif HAS_TP_BED - #define TV(B,H) (B) + #if HAS_PID_FOR_BOTH + #define GHV(B,H) (hotend < 0 ? (B) : (H)) + #define SHV(S,B,H) if (hotend < 0) S##_bed = B; else S [hotend] = H; + #elif ENABLED(PIDTEMPBED) + #define GHV(B,H) B + #define SHV(S,B,H) (S##_bed = B) #else - #define TV(B,H) (H) + #define GHV(B,H) H + #define SHV(S,B,H) (S [hotend] = H) #endif #if WATCH_THE_BED || WATCH_HOTENDS - const uint16_t watch_temp_period = TV(WATCH_BED_TEMP_PERIOD, WATCH_TEMP_PERIOD); - const uint8_t watch_temp_increase = TV(WATCH_BED_TEMP_INCREASE, WATCH_TEMP_INCREASE); - const float watch_temp_target = target - float(watch_temp_increase + TV(TEMP_BED_HYSTERESIS, TEMP_HYSTERESIS) + 1); + #define HAS_TP_BED (ENABLED(THERMAL_PROTECTION_BED) && ENABLED(PIDTEMPBED)) + #if HAS_TP_BED && ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(PIDTEMP) + #define GTV(B,H) (hotend < 0 ? (B) : (H)) + #elif HAS_TP_BED + #define GTV(B,H) (B) + #else + #define GTV(B,H) (H) + #endif + const uint16_t watch_temp_period = GTV(WATCH_BED_TEMP_PERIOD, WATCH_TEMP_PERIOD); + const uint8_t watch_temp_increase = GTV(WATCH_BED_TEMP_INCREASE, WATCH_TEMP_INCREASE); + const float watch_temp_target = target - float(watch_temp_increase + GTV(TEMP_BED_HYSTERESIS, TEMP_HYSTERESIS) + 1); millis_t temp_change_ms = next_temp_ms + watch_temp_period * 1000UL; float next_watch_temp = 0.0; bool heated = false; @@ -302,16 +312,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; disable_all_heaters(); // switch off all heaters. - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_amount_bed = bias = d = (MAX_BED_POWER) >> 1; - else - soft_pwm_amount[hotend] = bias = d = (PID_MAX) >> 1; - #elif ENABLED(PIDTEMP) - soft_pwm_amount[hotend] = bias = d = (PID_MAX) >> 1; - #else - soft_pwm_amount_bed = bias = d = (MAX_BED_POWER) >> 1; - #endif + SHV(soft_pwm_amount, bias = d = (MAX_BED_POWER) >> 1, bias = d = (PID_MAX) >> 1); wait_for_heatup = true; // Can be interrupted with M108 @@ -324,15 +325,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; updateTemperaturesFromRawValues(); // Get the current temperature and constrain it - current = - #if HAS_PID_FOR_BOTH - hotend < 0 ? current_temperature_bed : current_temperature[hotend] - #elif ENABLED(PIDTEMP) - current_temperature[hotend] - #else - current_temperature_bed - #endif - ; + current = GHV(current_temperature_bed, current_temperature[hotend]); NOLESS(max, current); NOMORE(min, current); @@ -346,16 +339,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; if (heating && current > target) { if (ELAPSED(ms, t2 + 5000UL)) { heating = false; - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_amount_bed = (bias - d) >> 1; - else - soft_pwm_amount[hotend] = (bias - d) >> 1; - #elif ENABLED(PIDTEMP) - soft_pwm_amount[hotend] = (bias - d) >> 1; - #elif ENABLED(PIDTEMPBED) - soft_pwm_amount_bed = (bias - d) >> 1; - #endif + SHV(soft_pwm_amount, (bias - d) >> 1, (bias - d) >> 1); t1 = ms; t_high = t1 - t2; max = target; @@ -368,15 +352,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; t2 = ms; t_low = t2 - t1; if (cycles > 0) { - long max_pow = - #if HAS_PID_FOR_BOTH - hotend < 0 ? MAX_BED_POWER : PID_MAX - #elif ENABLED(PIDTEMP) - PID_MAX - #else - MAX_BED_POWER - #endif - ; + const long max_pow = GHV(MAX_BED_POWER, PID_MAX); bias += (d * (t_high - t_low)) / (t_low + t_high); bias = constrain(bias, 20, max_pow - 20); d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias; @@ -415,16 +391,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; */ } } - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_amount_bed = (bias + d) >> 1; - else - soft_pwm_amount[hotend] = (bias + d) >> 1; - #elif ENABLED(PIDTEMP) - soft_pwm_amount[hotend] = (bias + d) >> 1; - #else - soft_pwm_amount_bed = (bias + d) >> 1; - #endif + SHV(soft_pwm_amount, (bias + d) >> 1, (bias + d) >> 1); cycles++; min = target; } @@ -453,10 +420,10 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; if ( #if WATCH_THE_BED && WATCH_HOTENDS true - #elif WATCH_THE_BED - hotend < 0 - #else + #elif WATCH_HOTENDS hotend >= 0 + #else + hotend < 0 #endif ) { if (!heated) { // If not yet reached target... @@ -487,7 +454,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED); #if HAS_PID_FOR_BOTH - const char* estring = hotend < 0 ? "bed" : ""; + const char* estring = GHV("bed", ""); SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Kp ", workKp); SERIAL_EOL(); SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Ki ", workKi); SERIAL_EOL(); SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Kd ", workKd); SERIAL_EOL(); @@ -575,7 +542,13 @@ int Temperature::getHeaterPower(const int heater) { uint8_t fanDone = 0; for (uint8_t f = 0; f < COUNT(fanPin); f++) { - pin_t pin = pgm_read_byte(&fanPin[f]); + const pin_t pin = + #ifdef ARDUINO + pgm_read_byte(&fanPin[f]) + #else + fanPin[f] + #endif + ; const uint8_t bit = pgm_read_byte(&fanBit[f]); if (pin >= 0 && !TEST(fanDone, bit)) { uint8_t newFanSpeed = TEST(fanState, bit) ? EXTRUDER_AUTO_FAN_SPEED : 0; From 2af06b82b4fa7cbb34e2cc6654fe5266baa88916 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Jul 2018 18:18:33 -0500 Subject: [PATCH 09/15] Specify some extra CR-10S pins --- Marlin/example_configurations/Creality/CR-10S/Configuration.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index e519a849c2f8..b65a7b315540 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -125,6 +125,10 @@ // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define PIN_EXP1 65 // A11 + #define PIN_EXP2 66 // A12 + #define PIN_EXP3 11 // SERVO0_PIN + #define PIN_EXP4 12 // PS_ON_PIN #endif // Optional custom name for your RepStrap or other custom machine From b5ed4a1a8c800bf349199aaa8db03038bf1ea944 Mon Sep 17 00:00:00 2001 From: vitekn Date: Thu, 26 Jul 2018 10:03:30 +0300 Subject: [PATCH 10/15] Fix thermistor type in Anet A6 config (#11346) I have Anet a6 and my thermistor is NTC 3950. If the default is 5 (ATC Semitec 104GT-2) it gives overheat upto 330 degrees (real) instead of 250 (displayed). I don't know for sure if all the A6 have such thermistor but I think it's safer to have underheat than overheat. And 3950 looks more spread among A6 searching on Internet. The same is true for the bed though it has small difference at the beginning of scale, actually +-2 degrees. --- Marlin/example_configurations/Anet/A6/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 2ac0e8c1c3bc..464b40867ea9 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -303,12 +303,12 @@ * * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } */ -#define TEMP_SENSOR_0 5 +#define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_3 0 #define TEMP_SENSOR_4 0 -#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_BED 11 #define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 From 56fbe3361b7acffa2859c07b442236592dd41730 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 26 Jul 2018 03:58:33 -0500 Subject: [PATCH 11/15] Ensure ADC conversion is complete before reading (#11370) Co-Authored-By: gloomyandy --- Marlin/HAL.h | 3 +- Marlin/temperature.cpp | 224 ++++++++++++++++++++++------------------- Marlin/temperature.h | 2 + 3 files changed, 125 insertions(+), 104 deletions(-) diff --git a/Marlin/HAL.h b/Marlin/HAL.h index bb985881c9a1..e9dd09c1750f 100644 --- a/Marlin/HAL.h +++ b/Marlin/HAL.h @@ -327,7 +327,8 @@ inline void HAL_adc_init(void) { #define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin) #endif -#define HAL_READ_ADC ADC +#define HAL_READ_ADC() ADC +#define HAL_ADC_READY() !TEST(ADCSRA, ADSC) #define GET_PIN_MAP_PIN(index) index #define GET_PIN_MAP_INDEX(pin) pin diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 94eebfb63aa9..1e765a242ad1 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1743,6 +1743,87 @@ void Temperature::set_current_temp_raw() { } #endif // PINS_DEBUGGING +void Temperature::readings_ready() { + // Update the raw values if they've been read. Else we could be updating them during reading. + if (!temp_meas_ready) set_current_temp_raw(); + + // Filament Sensor - can be read any time since IIR filtering is used + #if ENABLED(FILAMENT_WIDTH_SENSOR) + current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach + #endif + + ZERO(raw_temp_value); + + #if HAS_HEATED_BED + raw_temp_bed_value = 0; + #endif + + #if HAS_TEMP_CHAMBER + raw_temp_chamber_value = 0; + #endif + + #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) > (HEATER_##N##_RAW_HI_TEMP) ? -1 : 1) + + int constexpr temp_dir[] = { + #if ENABLED(HEATER_0_USES_MAX6675) + 0 + #else + TEMPDIR(0) + #endif + #if HOTENDS > 1 + , TEMPDIR(1) + #if HOTENDS > 2 + , TEMPDIR(2) + #if HOTENDS > 3 + , TEMPDIR(3) + #if HOTENDS > 4 + , TEMPDIR(4) + #endif // HOTENDS > 4 + #endif // HOTENDS > 3 + #endif // HOTENDS > 2 + #endif // HOTENDS > 1 + }; + + for (uint8_t e = 0; e < COUNT(temp_dir); e++) { + const int16_t tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir; + const bool heater_on = 0 < + #if ENABLED(PIDTEMP) + soft_pwm_amount[e] + #else + target_temperature[e] + #endif + ; + if (rawtemp > maxttemp_raw[e] * tdir && heater_on) max_temp_error(e); + if (rawtemp < minttemp_raw[e] * tdir && !is_preheating(e) && heater_on) { + #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED + if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) + #endif + min_temp_error(e); + } + #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED + else + consecutive_low_temperature_error[e] = 0; + #endif + } + + #if HAS_HEATED_BED + #if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP + #define GEBED <= + #else + #define GEBED >= + #endif + const bool bed_on = 0 < + #if ENABLED(PIDTEMPBED) + soft_pwm_amount_bed + #else + target_temperature_bed + #endif + ; + if (current_temperature_bed_raw GEBED bed_maxttemp_raw && bed_on) max_temp_error(-1); + if (bed_minttemp_raw GEBED current_temperature_bed_raw && bed_on) min_temp_error(-1); + #endif +} + /** * Timer 0 is shared with millies so don't change the prescaler. * @@ -2060,6 +2141,12 @@ void Temperature::isr() { * * This gives each ADC 0.9765ms to charge up. */ + #define ACCUMULATE_ADC(var) do{ \ + if (!HAL_ADC_READY()) next_sensor_state = adc_sensor_state; \ + else var += HAL_READ_ADC(); \ + }while(0) + + ADCSensorState next_sensor_state = adc_sensor_state < SensorsReady ? (ADCSensorState)(int(adc_sensor_state) + 1) : StartSampling; switch (adc_sensor_state) { @@ -2069,21 +2156,30 @@ void Temperature::isr() { constexpr int8_t extra_loops = MIN_ADC_ISR_LOOPS - (int8_t)SensorsReady; static uint8_t delay_count = 0; if (extra_loops > 0) { - if (delay_count == 0) delay_count = extra_loops; // Init this delay - if (--delay_count) // While delaying... - adc_sensor_state = (ADCSensorState)(int(SensorsReady) - 1); // retain this state (else, next state will be 0) + if (delay_count == 0) delay_count = extra_loops; // Init this delay + if (--delay_count) // While delaying... + next_sensor_state = SensorsReady; // retain this state (else, next state will be 0) break; } - else - adc_sensor_state = (ADCSensorState)0; // Fall-through to start first sensor now + else { + adc_sensor_state = StartSampling; // Fall-through to start sampling + next_sensor_state = (ADCSensorState)(int(StartSampling) + 1); + } } + case StartSampling: // Start of sampling loops. Do updates/checks. + if (++temp_count >= OVERSAMPLENR) { // 10 * 16 * 1/(16000000/64/256) = 164ms. + temp_count = 0; + readings_ready(); + } + break; + #if HAS_TEMP_ADC_0 case PrepareTemp_0: HAL_START_ADC(TEMP_0_PIN); break; case MeasureTemp_0: - raw_temp_value[0] += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_value[0]); break; #endif @@ -2092,7 +2188,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_BED_PIN); break; case MeasureTemp_BED: - raw_temp_bed_value += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_bed_value); break; #endif @@ -2101,7 +2197,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_CHAMBER_PIN); break; case MeasureTemp_CHAMBER: - raw_temp_chamber_value += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_chamber_value); break; #endif @@ -2110,7 +2206,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_1_PIN); break; case MeasureTemp_1: - raw_temp_value[1] += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_value[1]); break; #endif @@ -2119,7 +2215,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_2_PIN); break; case MeasureTemp_2: - raw_temp_value[2] += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_value[2]); break; #endif @@ -2128,7 +2224,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_3_PIN); break; case MeasureTemp_3: - raw_temp_value[3] += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_value[3]); break; #endif @@ -2137,7 +2233,7 @@ void Temperature::isr() { HAL_START_ADC(TEMP_4_PIN); break; case MeasureTemp_4: - raw_temp_value[4] += HAL_READ_ADC; + ACCUMULATE_ADC(raw_temp_value[4]); break; #endif @@ -2146,9 +2242,11 @@ void Temperature::isr() { HAL_START_ADC(FILWIDTH_PIN); break; case Measure_FILWIDTH: - if (HAL_READ_ADC > 102) { // Make sure ADC is reading > 0.5 volts, otherwise don't read. + if (!HAL_ADC_READY()) + next_sensor_state = adc_sensor_state; // redo this state + else if (HAL_READ_ADC() > 102) { // Make sure ADC is reading > 0.5 volts, otherwise don't read. raw_filwidth_value -= (raw_filwidth_value >> 7); // Subtract 1/128th of the raw_filwidth_value - raw_filwidth_value += ((unsigned long)HAL_READ_ADC << 7); // Add new ADC reading, scaled by 128 + raw_filwidth_value += ((unsigned long)HAL_READ_ADC() << 7); // Add new ADC reading, scaled by 128 } break; #endif @@ -2158,8 +2256,10 @@ void Temperature::isr() { HAL_START_ADC(ADC_KEYPAD_PIN); break; case Measure_ADC_KEY: - if (ADCKey_count < 16) { - raw_ADCKey_value = HAL_READ_ADC; + if (!HAL_ADC_READY()) + next_sensor_state = adc_sensor_state; // redo this state + else if (ADCKey_count < 16) { + raw_ADCKey_value = HAL_READ_ADC(); if (raw_ADCKey_value > 900) { //ADC Key release ADCKey_count = 0; @@ -2177,94 +2277,12 @@ void Temperature::isr() { } // switch(adc_sensor_state) - if (!adc_sensor_state && ++temp_count >= OVERSAMPLENR) { // 10 * 16 * 1/(16000000/64/256) = 164ms. - - temp_count = 0; - - // Update the raw values if they've been read. Else we could be updating them during reading. - if (!temp_meas_ready) set_current_temp_raw(); - - // Filament Sensor - can be read any time since IIR filtering is used - #if ENABLED(FILAMENT_WIDTH_SENSOR) - current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach - #endif - - ZERO(raw_temp_value); - - #if HAS_HEATED_BED - raw_temp_bed_value = 0; - #endif - - #if HAS_TEMP_CHAMBER - raw_temp_chamber_value = 0; - #endif - - #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) > (HEATER_##N##_RAW_HI_TEMP) ? -1 : 1) - - int constexpr temp_dir[] = { - #if ENABLED(HEATER_0_USES_MAX6675) - 0 - #else - TEMPDIR(0) - #endif - #if HOTENDS > 1 - , TEMPDIR(1) - #if HOTENDS > 2 - , TEMPDIR(2) - #if HOTENDS > 3 - , TEMPDIR(3) - #if HOTENDS > 4 - , TEMPDIR(4) - #endif // HOTENDS > 4 - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - }; - - for (uint8_t e = 0; e < COUNT(temp_dir); e++) { - const int16_t tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir; - const bool heater_on = 0 < - #if ENABLED(PIDTEMP) - soft_pwm_amount[e] - #else - target_temperature[e] - #endif - ; - if (rawtemp > maxttemp_raw[e] * tdir && heater_on) max_temp_error(e); - if (rawtemp < minttemp_raw[e] * tdir && !is_preheating(e) && heater_on) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error(e); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[e] = 0; - #endif - } - - #if HAS_HEATED_BED - #if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP - #define GEBED <= - #else - #define GEBED >= - #endif - const bool bed_on = 0 < - #if ENABLED(PIDTEMPBED) - soft_pwm_amount_bed - #else - target_temperature_bed - #endif - ; - if (current_temperature_bed_raw GEBED bed_maxttemp_raw && bed_on) max_temp_error(-1); - if (bed_minttemp_raw GEBED current_temperature_bed_raw && bed_on) min_temp_error(-1); - #endif - - } // temp_count >= OVERSAMPLENR + // Go to the next state + adc_sensor_state = next_sensor_state; - // Go to the next state, up to SensorsReady - adc_sensor_state = (ADCSensorState)(int(adc_sensor_state) + 1); - if (adc_sensor_state > SensorsReady) adc_sensor_state = (ADCSensorState)0; + // + // Additional ~1KHz Tasks + // #if ENABLED(BABYSTEPPING) LOOP_XYZ(axis) { diff --git a/Marlin/temperature.h b/Marlin/temperature.h index 1112e1799eaf..cc6df0bdf716 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -59,6 +59,7 @@ * States for ADC reading in the ISR */ enum ADCSensorState : char { + StartSampling, #if HAS_TEMP_ADC_0 PrepareTemp_0, MeasureTemp_0, @@ -329,6 +330,7 @@ class Temperature { /** * Called from the Temperature ISR */ + static void readings_ready(); static void isr(); /** From 2f76ec5c6aac59649a552ab68b354cc02d30e18c Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Thu, 26 Jul 2018 12:03:39 +0200 Subject: [PATCH 12/15] [1.1.x]-different-bltouch-init (#11358) --- Marlin/Marlin_main.cpp | 47 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 2b244b268565..e5d3fbe54a82 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2967,16 +2967,9 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa if (is_home_dir) { - if (axis == Z_AXIS) { - #if HOMING_Z_WITH_PROBE - #if ENABLED(BLTOUCH) - set_bltouch_deployed(true); - #endif - #if QUIET_PROBING - probing_pause(true); - #endif - #endif - } + #if HOMING_Z_WITH_PROBE && QUIET_PROBING + if (axis == Z_AXIS) probing_pause(true); + #endif // Disable stealthChop if used. Enable diag1 pin on driver. #if ENABLED(SENSORLESS_HOMING) @@ -3003,16 +2996,9 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa if (is_home_dir) { - if (axis == Z_AXIS) { - #if HOMING_Z_WITH_PROBE - #if QUIET_PROBING - probing_pause(false); - #endif - #if ENABLED(BLTOUCH) - set_bltouch_deployed(false); - #endif - #endif - } + #if HOMING_Z_WITH_PROBE && QUIET_PROBING + if (axis == Z_AXIS) probing_pause(false); + #endif endstops.validate_homing_move(); @@ -3095,6 +3081,10 @@ static void homeaxis(const AxisEnum axis) { if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:"); #endif do_homing_move(axis, 1.5f * max_length(axis) * axis_home_dir); + #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) + // BLTOUCH needs to be stowed after trigger to let rearm itself + if (axis == Z_AXIS) set_bltouch_deployed(false); + #endif // When homing Z with probe respect probe clearance const float bump = axis_home_dir * ( @@ -3120,9 +3110,19 @@ static void homeaxis(const AxisEnum axis) { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 2 Slow:"); #endif + + #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) + // BLTOUCH needs to deploy everytime + if (axis == Z_AXIS && set_bltouch_deployed(true)) return; + #endif do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis)); } + // Put away the Z probe + #if HOMING_Z_WITH_PROBE + if (axis == Z_AXIS && STOW_PROBE()) return; + #endif + /** * Home axes that have dual endstops... differently */ @@ -3198,11 +3198,6 @@ static void homeaxis(const AxisEnum axis) { #endif - // Put away the Z probe - #if HOMING_Z_WITH_PROBE - if (axis == Z_AXIS && STOW_PROBE()) return; - #endif - // Clear retracted status if homing the Z axis #if ENABLED(FWRETRACT) if (axis == Z_AXIS) fwretract.hop_amount = 0.0; @@ -4107,6 +4102,7 @@ inline void gcode_G28(const bool always_home_all) { #endif #if ENABLED(BLTOUCH) + // Make sure any BLTouch error condition is cleared bltouch_command(BLTOUCH_RESET); set_bltouch_deployed(false); #endif @@ -14610,7 +14606,6 @@ void setup() { #if ENABLED(BLTOUCH) // Make sure any BLTouch error condition is cleared bltouch_command(BLTOUCH_RESET); - set_bltouch_deployed(true); set_bltouch_deployed(false); #endif From c30f636d224279a3316a2abae2e649a2cdc3afbe Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 26 Jul 2018 05:10:11 -0500 Subject: [PATCH 13/15] Improve drivers.h macros (#11372) --- Marlin/drivers.h | 69 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/Marlin/drivers.h b/Marlin/drivers.h index 7405b924e1d6..0aa424c67dc9 100644 --- a/Marlin/drivers.h +++ b/Marlin/drivers.h @@ -22,6 +22,8 @@ #ifndef _DRIVERS_H_ #define _DRIVERS_H_ +#include "MarlinConfig.h" + #define A4988 0x001 #define DRV8825 0x002 #define LV8729 0x003 @@ -38,23 +40,66 @@ #define TMC2660 0x10B #define TMC2660_STANDALONE 0x00B -#define AXIS_DRIVER_TYPE(A, T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) ) +#define AXIS_DRIVER_TYPE(A,T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) ) + +#define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T) +#define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T) +#define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T) + +#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE) + #define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T) +#else + #define AXIS_DRIVER_TYPE_X2(T) false +#endif +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T) +#else + #define AXIS_DRIVER_TYPE_Y2(T) false +#endif +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + #define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T) +#else + #define AXIS_DRIVER_TYPE_Z2(T) false +#endif +#if E_STEPPERS > 0 + #define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T) +#else + #define AXIS_DRIVER_TYPE_E0(T) false +#endif +#if E_STEPPERS > 1 + #define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T) +#else + #define AXIS_DRIVER_TYPE_E1(T) false +#endif +#if E_STEPPERS > 2 + #define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T) +#else + #define AXIS_DRIVER_TYPE_E2(T) false +#endif +#if E_STEPPERS > 3 + #define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T) +#else + #define AXIS_DRIVER_TYPE_E3(T) false +#endif +#if E_STEPPERS > 4 + #define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T) +#else + #define AXIS_DRIVER_TYPE_E4(T) false +#endif -#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE( X,T) || AXIS_DRIVER_TYPE(X2,T) || \ - AXIS_DRIVER_TYPE( Y,T) || AXIS_DRIVER_TYPE(Y2,T) || \ - AXIS_DRIVER_TYPE( Z,T) || AXIS_DRIVER_TYPE(Z2,T) || \ - AXIS_DRIVER_TYPE(E0,T) || \ - AXIS_DRIVER_TYPE(E1,T) || \ - AXIS_DRIVER_TYPE(E2,T) || \ - AXIS_DRIVER_TYPE(E3,T) || \ - AXIS_DRIVER_TYPE(E4,T) ) +#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \ + AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \ + AXIS_DRIVER_TYPE_Z(T) || AXIS_DRIVER_TYPE_Z2(T) || \ + AXIS_DRIVER_TYPE_E0(T) || AXIS_DRIVER_TYPE_E1(T) || \ + AXIS_DRIVER_TYPE_E2(T) || AXIS_DRIVER_TYPE_E3(T) || \ + AXIS_DRIVER_TYPE_E4(T) ) // Test for supported TMC drivers that require advanced configuration // Does not match standalone configurations #define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) ) -#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A, TMC2130) || \ - AXIS_DRIVER_TYPE(A, TMC2208) || \ - AXIS_DRIVER_TYPE(A, TMC2660) ) +#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \ + AXIS_DRIVER_TYPE_##A(TMC2208) || \ + AXIS_DRIVER_TYPE_##A(TMC2660) ) #endif // _DRIVERS_H_ From b6f24992ee7f572e33596b13c81637d957e9abe2 Mon Sep 17 00:00:00 2001 From: bleughb <36889022+bleughb@users.noreply.github.com> Date: Thu, 26 Jul 2018 11:19:05 +0100 Subject: [PATCH 14/15] [1.1.x] Update fastio_1280.h pin mapping comments (#11374) --- Marlin/fastio_1280.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/fastio_1280.h b/Marlin/fastio_1280.h index b95ddffbadba..09bac1fd1109 100644 --- a/Marlin/fastio_1280.h +++ b/Marlin/fastio_1280.h @@ -23,8 +23,9 @@ /** * Pin mapping for the 1280 and 2560 * - * Logical Pin: 22 23 24 25 26 27 28 29 53 52 51 50 10 11 12 13 37 36 35 34 33 32 31 30 21 20 19 18 81 82 83 38 00 01 78 05 02 03 79 80 54 55 56 57 58 59 60 61 41 40 39 71 70 04 17 16 84 06 07 08 09 85 15 14 72 73 75 76 77 74 62 63 64 65 66 67 68 69 49 48 47 46 45 44 43 42 - * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5 H0 H1 H2 H3 H4 H5 H6 H7 J0 J1 J2 J3 J4 J5 J6 J7 K0 K1 K2 K3 K4 K5 K6 K7 L0 L1 L2 L3 L4 L5 L6 L7 + * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100 + * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx + * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx */ #ifndef _FASTIO_1280 From cab2e0877e3bd129cd972d97fea42953c6279dfb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 26 Jul 2018 20:17:02 -0500 Subject: [PATCH 15/15] Update DELAY_10US --- Marlin/ultralcd_st7565_u8glib_VIKI.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd_st7565_u8glib_VIKI.h b/Marlin/ultralcd_st7565_u8glib_VIKI.h index 9ab142b2e89d..adb48ea6b2ac 100644 --- a/Marlin/ultralcd_st7565_u8glib_VIKI.h +++ b/Marlin/ultralcd_st7565_u8glib_VIKI.h @@ -89,7 +89,7 @@ #if HARDWARE_SPI // using the hardware SPI #define ST7565_WRITE_BYTE(a) { SPDR = a; while (!TEST(SPSR, SPIF)); U8G_DELAY(); } - #define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) {SPDR = *ptr++; while (!TEST(SPSR, SPIF));} DELAY_10US; } + #define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) {SPDR = *ptr++; while (!TEST(SPSR, SPIF));} U8G_DELAY(); } #else // !HARDWARE_SPI @@ -112,7 +112,7 @@ } #define ST7565_WRITE_BYTE(a) { ST7565_SWSPI_SND_8BIT((uint8_t)a); U8G_DELAY(); } - #define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) { ST7565_SWSPI_SND_8BIT(*ptr++); } DELAY_10US; } + #define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) { ST7565_SWSPI_SND_8BIT(*ptr++); } U8G_DELAY(); } #endif // !HARDWARE_SPI