Compare commits

...

586 Commits

Author SHA1 Message Date
InsanityAutomation 58f497023b Merge branch 'bugfix-2.1.x' into FixPIDMenus 2022-10-16 13:01:52 -04:00
thinkyhead 5809bdd400 [cron] Bump distribution date (2022-10-16) 2022-10-16 06:11:46 +00:00
Dan Royer 5a80fc2617 🐛 Fix and improve Polargraph (#24847)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-10-16 00:03:42 -05:00
ellensp 6d2b792a29 🐛 Fix operators for V axis (#24866)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-10-15 19:40:00 -05:00
thinkyhead 1b46ca1cf8 [cron] Bump distribution date (2022-10-15) 2022-10-15 00:51:19 +00:00
mjbogusz e37a23231a 🩹 Fix TFT LCD in Simulation (#24871) 2022-10-14 18:59:31 -05:00
Scott Lahteine 54a5bf5edf 🎨 MMU2 cleanup 2022-10-14 13:37:12 -05:00
thinkyhead 670a199575 [cron] Bump distribution date (2022-10-13) 2022-10-13 00:32:13 +00:00
Scott Lahteine bbf4bcf5ae 🐛 Fix M876 without emergency parser
Fix regression from 1fb2fffdbf
2022-10-12 18:15:29 -05:00
adam3654 797aafd645 DOGM Display Sleep (#24829) 2022-10-12 18:03:32 -05:00
EvilGremlin 6ad5711807 🩹 Fix temperature include (#24834) 2022-10-12 18:01:28 -05:00
Scott Lahteine b577691b7b 🎨 Misc. variant cleanup 2022-10-12 17:53:42 -05:00
Scott Lahteine 93139e757c 🧑‍💻 Use spaces indent for Python 2022-10-12 17:52:56 -05:00
Scott Lahteine 8627d4e5da 🧑‍💻 Min and max for base types 2022-10-12 15:24:05 -05:00
thinkyhead cab94bb030 [cron] Bump distribution date (2022-10-12) 2022-10-12 00:37:55 +00:00
EvilGremlin 26d01c5f2c MKS SKIPR board (#24791) 2022-10-11 18:31:37 -05:00
InsanityAutomation 5bc856823f Update menu_advanced.cpp 2022-10-11 11:38:01 -04:00
thinkyhead 6b22f8152b [cron] Bump distribution date (2022-10-11) 2022-10-11 00:30:01 +00:00
Scott Lahteine e7cf3c7970 🔨 Update mfinfo for 2.1.x 2022-10-10 18:02:22 -04:00
Scott Lahteine 77227f66c2 🧑‍💻 Min and max for base types 2022-10-10 17:51:33 -04:00
Giuliano Zaro efde96131d ADVANCE_K per-extruder (#24821)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-10-10 14:55:04 -04:00
thinkyhead 051b95c845 [cron] Bump distribution date (2022-10-09) 2022-10-09 18:06:15 +00:00
EvilGremlin f595e40ceb ♻️ Set Progress without LCD (#24767)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-10-09 11:34:48 -04:00
thinkyhead 0d8a695ea9 [cron] Bump distribution date (2022-10-02) 2022-10-02 00:34:34 +00:00
EvilGremlin fcf9f22390 🩹 Fix Color UI touchscreen sleep (#24826) 2022-10-01 15:04:50 -05:00
thinkyhead 43fa749d27 [cron] Bump distribution date (2022-10-01) 2022-10-01 18:05:53 +00:00
Adam 6cc11b76fd 🩹 Fix Switching Toolhead compile (#24814) 2022-10-01 11:49:12 -05:00
ellensp c2f7a568f3 🧑‍💻 Einsy Rambo EXP headers (#24825) 2022-10-01 11:39:10 -05:00
ellensp a8f650079b 🔨 Detect feature parsing error (#24824) 2022-10-01 11:35:47 -05:00
ellensp 91fafec424 Creality v5.2.1 board (#24815)
Followup to #24760
2022-10-01 11:25:00 -05:00
Keith Bennett 11f8244573 🔧 Thermistor (66) sanity-check (#24803) 2022-10-01 11:19:51 -05:00
thinkyhead e1df912dc7 [cron] Bump distribution date (2022-09-30) 2022-09-30 00:41:18 +00:00
Eduardo José Tagle 35594a23de 🐛 Fix DUE compile and errors (#24809) 2022-09-29 17:54:59 -05:00
Scott Lahteine 83922dd4e6 🩹 Fix some vector_3 cast operators 2022-09-29 17:30:53 -05:00
thinkyhead a5c5bb9660 [cron] Bump distribution date (2022-09-28) 2022-09-28 18:10:34 +00:00
Keith Bennett 18b6d6c8ca 🔧 Update Creality 4.2.2 Driver Warning (#24806) 2022-09-28 10:05:06 -05:00
ellensp 2c6ed101c1 🩹 Disable DEBUG_DGUSLCD (#24798) 2022-09-28 10:03:40 -05:00
Yuri D'Elia 644c91ce8b 🎨 Remove non-const compare operators (#24810) 2022-09-28 09:49:30 -05:00
Plynix / Ben Hartiwch 1b3941c0d2 Creality v5.2.1 board (#24760) 2022-09-28 09:46:50 -05:00
thinkyhead e14faf0413 [cron] Bump distribution date (2022-09-27) 2022-09-27 00:30:06 +00:00
discip f84d51ec06 Pt1000 with 2k2 pullup (SKR 3 / EZ) (#24790) 2022-09-26 16:42:52 -05:00
ellensp 8aa3273242 ✏️ Followup for M524 (#24775)
Followup to #24761
2022-09-26 16:25:54 -05:00
Stuart Pittaway 6f68942e83 🚸 UUID fallback to STM32 device SN (#24759)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-09-26 16:18:15 -05:00
Keith Bennett 9881f758d7 📌 Specify MarlinFirmware/U8glib (#24792) 2022-09-26 16:15:14 -05:00
thinkyhead 945d5dbe13 [cron] Bump distribution date (2022-09-23) 2022-09-23 06:23:27 +00:00
Renaud11232 7d08ab4fb7 🔨 Fix LPC1768 autodetect path on Linux (#24773) 2022-09-23 00:20:44 -05:00
ellensp 4a2b08f883 🐛 Fix VW axis fields in types.h (#24780) 2022-09-23 00:16:01 -05:00
thinkyhead 1d2aecaca8 [cron] Bump distribution date (2022-09-22) 2022-09-22 18:13:30 +00:00
Bob Kuhn a4297ff492 Fix UBL regression (#24622)
Fix regression from #24188
2022-09-22 12:54:49 -05:00
ellensp 4f299bf867 📺 FYSETC Mini 12864 2.1 pins for Creality V4 (#24624) 2022-09-22 12:20:17 -05:00
Yuri D'Elia 038042b09e 👷 Array macros to …26 elements (#24789) 2022-09-22 11:54:26 -05:00
thinkyhead 8f4fb42bfb [cron] Bump distribution date (2022-09-18) 2022-09-18 06:07:46 +00:00
FBN 6fdf9bf2ea ✏️ MMU2 followup (#24770)
Followup to #24750
2022-09-17 20:53:07 -05:00
Arkadiusz Miśkiewicz 6c813fcd16 🚸 Emergency Parse M524 (#24761) 2022-09-17 20:51:37 -05:00
Scott Lahteine 1e525c5976 🩹 Fix inverse_accel redefine
Followup to #24737
2022-09-17 20:36:55 -05:00
thinkyhead b1239a42a8 [cron] Bump distribution date (2022-09-17) 2022-09-17 00:24:30 +00:00
Stefan Kalscheuer 06d7d2ada4 Anycubic i3 Mega LCD file menu fix (#24752) 2022-09-16 14:21:13 -05:00
Chris Bagwell 9467b68608 🧑‍💻 STM32G0B1RE Pins Debugging (#24748) 2022-09-16 13:30:04 -05:00
thinkyhead e338420df8 [cron] Bump distribution date (2022-09-16) 2022-09-16 00:27:49 +00:00
FBN d0e7c2c208 🚸 More automatic MMU2 load (#24750) 2022-09-15 18:02:08 -05:00
thinkyhead 1ab6e5cdc9 [cron] Bump distribution date (2022-09-15) 2022-09-15 18:06:16 +00:00
Scott Lahteine 551f5ada94 📌 Can use luc-github/ESP3DLib now
Followup to #24670
2022-09-15 10:28:49 -05:00
thinkyhead e927e58d32 [cron] Bump distribution date (2022-09-14) 2022-09-14 00:26:34 +00:00
Scott Lahteine 8a3ad7abcc 🔨 Fix config-labels.py 2022-09-13 13:29:50 -05:00
thinkyhead 5b0096c350 [cron] Bump distribution date (2022-09-13) 2022-09-13 18:28:57 +00:00
Eduard Sukharev c3b58f1938 🩹 Fix MKS TinyBee + MKS MINI 12864 SD blank on write (#24670) 2022-09-13 12:31:59 -05:00
Eduard Sukharev e003552804 🚸 Sanity check Integrated Babystepping + I2S stream + ESP32 (#24691) 2022-09-13 12:29:59 -05:00
George Fu 50f79823d2 FYSETC SPIDER KING407 (#24696) 2022-09-13 12:28:38 -05:00
ellensp 3c449b220f BTT SKR Mini E3 V3.0.1 (#24722) 2022-09-13 12:27:16 -05:00
thinkyhead c5af435449 [cron] Bump distribution date (2022-09-11) 2022-09-11 00:24:58 +00:00
Scott Lahteine 45cf997341 🌐 Some short menu strings 2022-09-09 19:31:47 -05:00
thinkyhead 0820f94a5a [cron] Bump distribution date (2022-09-10) 2022-09-10 00:27:05 +00:00
XDA-Bam d5cf0b3348 ️ Minor planner optimization (#24737) 2022-09-09 15:51:11 -05:00
kisslorand 0ae64f1140 ✏️ Fix M115 spindle/laser cap (#24747) 2022-09-09 15:36:39 -05:00
hartmannathan c80d1ea97d 📝 Fix example comment (#24744) 2022-09-09 15:35:16 -05:00
Keith Bennett 1013323f18 ️ Only Sync Emulated EEPROM Print Counter (#24731) 2022-09-09 14:22:52 -05:00
Gurmeet Athwal 25736abc0f 🚸 M115 spindle/laser (#24681) 2022-09-09 14:21:19 -05:00
Giuliano Zaro dc0b490bf0 🐛 Fix heater timeout PID output (#24682) 2022-09-09 13:54:29 -05:00
thinkyhead b95d073f02 [cron] Bump distribution date (2022-09-08) 2022-09-08 00:25:55 +00:00
studiodyne 9e5c143b87 M217 G wipe retract length 2022-09-07 17:46:28 -05:00
studiodyne 458e1aea41 XY_COUNTERPART_BACKOFF_MM 2022-09-07 15:41:17 -05:00
studiodyne 0765dfd43f RGB_STARTUP_TEST 2022-09-07 14:16:21 -05:00
Scott Lahteine 4f9ba7e991 🧑‍💻 Microsteps to stepper.cpp 2022-09-06 23:05:42 -05:00
Scott Lahteine 9ab0b18256 📝 Fix comment 2022-09-06 22:34:17 -05:00
thinkyhead 57ee26e909 [cron] Bump distribution date (2022-09-07) 2022-09-07 00:26:05 +00:00
Scott Lahteine d23ab529d8 🔨 Outdent py string 2022-09-06 17:53:36 -05:00
Arkadiusz Miśkiewicz c9ef1277f3 🚸 On pause report "SD printing byte X/Y" (#24709) 2022-09-06 01:48:42 -05:00
JoaquinBerrios 2b23bdce70 ️ BTT SKR V3.0 / EZ = 480MHz (#24721) 2022-09-06 01:39:02 -05:00
thinkyhead 61a543a471 [cron] Bump distribution date (2022-09-06) 2022-09-06 00:26:04 +00:00
dmitrygribenchuk 83aac65664 🔨 Clean up Python imports (#24736) 2022-09-05 13:19:19 -05:00
ButchMonkey c46ed8f57d 🔨 Fix config.ini custom items, and 'all' (#24720) 2022-09-04 23:48:58 -05:00
thinkyhead 9fc3642f2a [cron] Bump distribution date (2022-09-05) 2022-09-05 00:29:22 +00:00
ButchMonkey 328f6d9aff 🔨 Fix configuration.py with encoding UTF-8 (#24719)
- Opening files with Windows-1252 encoding.
2022-09-04 15:10:22 -05:00
Stephen Hawes 35d4791518 Opulo LumenPnP REV04 (#24718) 2022-09-03 20:55:37 -05:00
Giuliano Zaro 094701cc71 🐛 Fix / refactor shared PID (#24673)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-09-03 19:51:53 -05:00
thinkyhead f6d109287f [cron] Bump distribution date (2022-09-04) 2022-09-04 00:26:23 +00:00
Keith Bennett fdf6445a51 🔨 Update SKR 3 env (#24711) 2022-09-03 18:48:21 -05:00
Scott Lahteine 68d4869616 Format some comments 2022-09-03 18:21:23 -05:00
thinkyhead 5f61a896d9 [cron] Bump distribution date (2022-09-03) 2022-09-03 00:22:59 +00:00
EvilGremlin bcb6f6e85e 🔨 Native USB modified env followup (#24669)
Followup to #24619
2022-09-01 21:47:37 -05:00
tombrazier 8e71f7add4 Permit Linear Advance with I2S Streaming (#24684) 2022-09-01 21:04:46 -05:00
thinkyhead 243f7f2834 [cron] Bump distribution date (2022-09-02) 2022-09-02 00:24:02 +00:00
Giuliano Zaro 89f86bc550 🚸 Strict index 2 for M913 / M914 XY (#24680) 2022-09-01 14:16:52 -05:00
Arkadiusz Miśkiewicz 1b03fc3f63 🩹 Report M22 / M23 success / fail (#24706) 2022-09-01 13:48:24 -05:00
thinkyhead aa0904600b [cron] Bump distribution date (2022-08-30) 2022-08-30 00:41:13 +00:00
Scott Lahteine 6542f61aaf 🔖 Config version 02010200 2022-08-29 19:23:53 -05:00
EvilGremlin b229fba98b 🐛 Fix back button (#24694) 2022-08-29 18:52:02 -05:00
thinkyhead 8a3cd2f47b [cron] Bump distribution date (2022-08-27) 2022-08-27 00:22:42 +00:00
Scott Lahteine 9b7b1a3635 ✏️ Fix http:// links 2022-08-25 23:45:07 -05:00
Lefteris Garyfalakis 15a100dafa ✏️ Fix LCD sleep conditional (#24685) 2022-08-25 23:40:31 -05:00
Miguel Risco-Castillo c918e90b8d 🩹 Constrain UBL within mesh bounds (#24631)
Fixes #24630
2022-08-25 23:23:54 -05:00
thinkyhead 2635182dcb [cron] Bump distribution date (2022-08-26) 2022-08-26 00:25:25 +00:00
Keith Bennett ace358327d 🚸 Up to 10 Preheat Constants (#24636) 2022-08-25 18:14:50 -05:00
ellensp eabab4322d 🔧 Fix Auto-Fan / Controller-Fan pin conflict check (#24648) 2022-08-25 18:07:41 -05:00
ellensp 66e61f4de3 🩹 Fix PID debug output (#24647) 2022-08-25 17:51:11 -05:00
Mark 42f8cc4606 🐛 Fix Bed Distance Sensor reading (#24649) 2022-08-25 17:50:03 -05:00
Arkadiusz Miśkiewicz 82d1851743 M20_TIMESTAMP_SUPPORT (#24679)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-25 17:14:54 -05:00
thinkyhead 6053fae1ac [cron] Bump distribution date (2022-08-25) 2022-08-25 18:16:46 +00:00
EvilGremlin 2f91154cbd ♻️ Display sleep minutes, encoder disable option (#24618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-25 12:16:55 -05:00
DejitaruJin 6704c0bc4c 🩹 Fix SainSmart LCD (#24672) 2022-08-25 12:12:13 -05:00
Keith Bennett b19d44ba0b 🩹 Fix Freeze Feature (#24664) 2022-08-25 12:08:03 -05:00
Lefteris Garyfalakis 2a2c161d87 🔨 Suppressible Creality 4.2.2 warning (#24683) 2022-08-25 11:48:35 -05:00
thinkyhead f4a5db52e8 [cron] Bump distribution date (2022-08-24) 2022-08-24 18:11:29 +00:00
Scott Lahteine a76b92bce0 Robin Nano v1 CDC (USB mod)
Followup to #24619
2022-08-24 10:15:57 -05:00
thinkyhead e201f4e656 [cron] Bump distribution date (2022-08-22) 2022-08-22 18:06:10 +00:00
EvilGremlin 2a1c2e26ed Robin Nano v1 CDC (USB mod) (#24619) 2022-08-22 10:31:02 -05:00
Alexey Galakhov 20c72845a0 🐛 Fix JyersUI (#24652) 2022-08-22 10:11:53 -05:00
Keith Bennett d77027276c 🔧 Fix Skew Correction defaults (#24601) 2022-08-22 09:53:51 -05:00
thinkyhead 6e39bd6c85 [cron] Bump distribution date (2022-08-21) 2022-08-21 00:22:59 +00:00
Scott Lahteine 34f3e5bd88 🎨 Some automated cleanup 2022-08-20 06:41:31 -05:00
thinkyhead da3b7ab259 [cron] Bump distribution date (2022-08-20) 2022-08-20 00:22:12 +00:00
Keith Bennett 6909f5fa4f 📺 Add to MKS UI About Screen (#24610) 2022-08-19 13:37:43 -05:00
Keith Bennett 03d9254079 🔧 Remove STM32F4 Print Counter Sanity Check (#24605) 2022-08-19 13:11:15 -05:00
Protomosh 4ae9bf3b9d 🐛 Fix DGUS Reloaded + STM32 (#24600) 2022-08-19 12:57:27 -05:00
Scott Lahteine 306e03b03b 🧑‍💻 Use spaces indent for Python 2022-08-19 11:10:42 -05:00
Scott Lahteine e701e0bb25 🔨 Misc. schema updates 2022-08-19 11:09:07 -05:00
Graham Reed dab60a1cb7 🔨 Fix LPC1768 automatic upload port (#24599) 2022-08-19 10:48:27 -05:00
thinkyhead 1be5a7b5d7 [cron] Bump distribution date (2022-08-19) 2022-08-19 00:25:32 +00:00
Scott Lahteine af1c7e1a81 🩹 Fix strtof interpreting a hex value
Bug introduced in #21532
2022-08-18 13:10:27 -05:00
thinkyhead 1766ee15a3 [cron] Bump distribution date (2022-08-17) 2022-08-17 18:05:53 +00:00
Scott Lahteine ce26fccc3e 🔨 Add args to schema.py 2022-08-17 07:32:43 -05:00
thinkyhead 0100b7be4d [cron] Bump distribution date (2022-08-16) 2022-08-16 18:07:16 +00:00
Scott Lahteine fab4fb7fbb 🎨 Fix '…if_chain' Uncrustify option 2022-08-16 09:47:51 -05:00
Scott Lahteine b8bd331efd 🔨 Misc. config py updates 2022-08-16 09:42:38 -05:00
Scott Lahteine e42cbe7500 🧑‍💻 Add operator== for C++20 2022-08-16 09:42:38 -05:00
thinkyhead c84f839fc7 [cron] Bump distribution date (2022-08-14) 2022-08-14 12:07:06 +00:00
Scott Lahteine c2874ca809 🔨 Update schema ignores, export value 2022-08-14 03:58:03 -05:00
thinkyhead 4bd4c1f3bc [cron] Bump distribution date (2022-08-12) 2022-08-12 00:22:10 +00:00
Keith Bennett 637bff9982 🧑‍💻 Fix UBL Build Mesh preheat items (#24598)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-08-11 13:35:36 -05:00
thinkyhead 8025117ac0 [cron] Bump distribution date (2022-08-08) 2022-08-08 06:06:06 +00:00
Scott Lahteine 1a1db10634 🔨 Fix 'val' value in schema.py 2022-08-07 20:42:33 -05:00
thinkyhead 5b68a3f79b [cron] Bump distribution date (2022-08-07) 2022-08-07 00:27:50 +00:00
Scott Lahteine d33111b215 🎨 Misc. config cleanup 2022-08-06 18:40:25 -05:00
ExtNeon 53b202cf9d SD Endstop Abort G-Code (#24461) 2022-08-06 18:37:03 -05:00
Scott Lahteine 9c86ca3a19 🔧 Schema catch missing pip 2022-08-06 03:53:21 -05:00
thinkyhead e33dafeb80 [cron] Bump distribution date (2022-08-06) 2022-08-06 06:21:59 +00:00
Ivan Kravets 5b4af52d04 🔨 Fix a PlatformIO debug issue (#24569) 2022-08-06 01:17:46 -05:00
Mark 83320f1052 Bed Distance Sensor (#24554) 2022-08-06 01:14:58 -05:00
Keith Bennett 1dc17aa64c 🩹 Fix AUTO_FAN_PIN sanity check (#24593) 2022-08-06 00:59:56 -05:00
Scott Lahteine 68f13ca9cf 🩹 G0/G1 S seen => seenval 2022-08-06 00:57:37 -05:00
qwertymodo 5a2cc41f9c M150 K – Keep unspecified components (#24315) 2022-08-06 00:18:50 -05:00
J.C. Nelson 7f10f8932e 🔨 Trigorilla Pro disk based update (#24591) 2022-08-06 00:17:27 -05:00
Travis Ziegler 1866e25eef 🩹 Fix LPC176x USB Host Shield (#24588) 2022-08-05 21:37:24 -05:00
Scott Lahteine ec4db07a51 👔 Keep "Needs: More Data" open 2022-08-05 19:40:31 -05:00
Scott Lahteine becef39c19 🩹 Fix CONFIGURATION_EMBEDDING
Followup to b7fd046d59
2022-08-05 19:23:49 -05:00
thinkyhead 24a7ed44b3 [cron] Bump distribution date (2022-08-05) 2022-08-05 00:28:07 +00:00
Ruedi Steinmann a167e2e948 🚸 Laser with only PWM pin (#24345) 2022-08-04 18:00:19 -05:00
Scott Lahteine 59c2fe4561 🧑‍💻 MARLIN_TEST_BUILD – for future use (#24077) 2022-08-04 17:56:09 -05:00
Scott Lahteine b7fd046d59 🔧 Add date, version to Config Export 2022-08-04 17:50:41 -05:00
thinkyhead 4c9146cffd [cron] Bump distribution date (2022-08-04) 2022-08-04 12:08:11 +00:00
Scott Lahteine 1bed10c380 🔧 Config INI, dump options (#24528) 2022-08-04 02:38:15 -05:00
Scott Lahteine 1c4fc4603a 🩹 Fix Malyan M300 with S-Curve compile
Fixes #24548
2022-08-04 01:17:56 -05:00
thinkyhead 35d9920ef8 [cron] Bump distribution date (2022-08-02) 2022-08-02 00:25:38 +00:00
ellensp 1ad036c52f 🔧 Update 644p/1284p Serial 1 sanity check (#24575) 2022-08-01 01:17:57 -05:00
Scott Lahteine 7f72e78520 🔨 Simplify scripts with pathlib (#24574) 2022-08-01 01:14:58 -05:00
thinkyhead 6fe317e385 [cron] Bump distribution date (2022-08-01) 2022-08-01 06:14:22 +00:00
Mike La Spina e5f2daa001 🐛 Fix laser menu enable_state (#24557) 2022-08-01 01:03:45 -05:00
thinkyhead 4ba35d3284 [cron] Bump distribution date (2022-07-31) 2022-07-31 06:05:45 +00:00
InsanityAutomation 91f9e1671f Configurable Switching Nozzle dwell (#24304) 2022-07-30 21:55:32 -05:00
tombrazier 232a104a92 Fix, improve Linear Advance (#24533) 2022-07-30 21:39:48 -05:00
tombrazier aba35ec1af 🩹 Use _MIN/_MAX macros for native compatibility (#24570) 2022-07-30 21:05:16 -05:00
DerAndere d8df9ffd61 🐛 Fix kinematic feedrate (#24568) 2022-07-30 20:49:15 -05:00
Keith Bennett f4b6870ad1 Encoder Noise Filter (#24538) 2022-07-30 19:51:25 -05:00
thinkyhead 8938e4d23c [cron] Bump distribution date (2022-07-30) 2022-07-30 00:29:03 +00:00
lukasradek 0f0edd2e37 📝 README Updates (#24564) 2022-07-29 18:56:59 -05:00
Scott Lahteine 7b0eb2d9f8 🚑️ Fix XYZEval = N not setting E 2022-07-29 18:41:03 -05:00
Scott Lahteine 44c1f2ef6b 🎨 Renum boards.h 2022-07-29 08:01:39 -05:00
Scott Lahteine 9cdfaf693c 🐛 Fix M125 for 9 Axis 2022-07-29 02:14:14 -05:00
thinkyhead 6f7d14def3 [cron] Bump distribution date (2022-07-29) 2022-07-29 06:08:47 +00:00
Scott Lahteine a25f321abb 🔨 Separate bugfix-2.1.x CI Tests 2022-07-29 01:01:34 -05:00
Scott Lahteine 7e5d5330d6 🎨 Misc. 'else' cleanup 2022-07-28 20:53:11 -05:00
thinkyhead b4dcdcc885 [cron] Bump distribution date (2022-07-28) 2022-07-28 06:06:27 +00:00
Ludy 2dff08c86b 🌐 Update German language (#24555) 2022-07-27 21:44:21 -05:00
thinkyhead ca8182344f [cron] Bump distribution date (2022-07-27) 2022-07-27 12:08:06 +00:00
Scott Lahteine 21c48d9f92 🧑‍💻 Update planner/stepper includes 2022-07-27 04:25:37 -05:00
Scott Lahteine 90b5645223 🩹 Fix lcd_preheat compile 2022-07-27 03:52:03 -05:00
Scott Lahteine d816c1b38d 🔨 Update build/CI scripts 2022-07-27 03:52:03 -05:00
Scott Lahteine 8ccbac5317 🎨 PIO scripts cleanup 2022-07-27 03:52:03 -05:00
thinkyhead 223bbc9bca [cron] Bump distribution date (2022-07-26) 2022-07-26 00:25:10 +00:00
Keith Bennett 4ffa2e80e4 📺 Fix TFT Classic UI non-Touchscreen 1024x600 (#24541) 2022-07-25 14:02:37 -05:00
Keith Bennett bc0e4c6d50 🩹 Fix JyersUI include (#24540) 2022-07-25 13:48:59 -05:00
Keith Bennett a29fb8088f 📝 Update MPCTEMP G-Code M306 T (#24535)
M306 simply reports current values. M306 T starts autotune process.
2022-07-25 13:47:07 -05:00
thinkyhead 57ca996c31 [cron] Bump distribution date (2022-07-24) 2022-07-24 00:26:50 +00:00
Scott Lahteine 8cf4c0515d 🧑‍💻 Keep state for build_all_examples --limit 2022-07-23 01:30:43 -05:00
thinkyhead 2634d0cc52 [cron] Bump distribution date (2022-07-23) 2022-07-23 06:05:41 +00:00
tombrazier deca553e18 🐛 Fix 2d mesh print (#24536) 2022-07-22 23:32:28 -05:00
Scott Lahteine 007af47768 Reinstate JyersUI 2022-07-22 22:09:08 -05:00
Scott Lahteine 8455408382 🧑‍💻 Give the simulator Stepper access 2022-07-22 21:52:14 -05:00
Scott Lahteine 3b4c759872 🧑‍💻 Fix and improve build_all_examples 2022-07-22 21:51:40 -05:00
Scott Lahteine edeea5a6fb 🔨 Minor build script changes 2022-07-22 21:49:29 -05:00
Scott Lahteine 6577fba768 🩹 Fix TFT image PACKED conflict 2022-07-22 21:46:43 -05:00
thinkyhead 7726e26ac0 [cron] Bump distribution date (2022-07-22) 2022-07-22 18:05:45 +00:00
Scott Lahteine c2972899ca 🩹 Fix MAX31865 approximations
Followup to #24407
2022-07-22 12:38:00 -05:00
thinkyhead 58329b066d [cron] Bump distribution date (2022-07-21) 2022-07-21 00:24:51 +00:00
Scott Lahteine 2419a167ee EXP header pin numbers redux (#24525)
Followup to 504fec98
2022-07-20 16:26:33 -05:00
Frederik Kemner 0138cb0552 🩹 Fix gcode.h include (#24527) 2022-07-20 16:25:15 -05:00
InsanityAutomation aacc2d3dc5 🐛 Fix Archim2 USB Hang (#24314) 2022-07-20 03:08:19 -05:00
thinkyhead 39c5793575 [cron] Bump distribution date (2022-07-20) 2022-07-20 00:21:00 +00:00
InsanityAutomation 258904e86c 🚸 Use Tool 0 for G30 (#24511) 2022-07-19 17:33:49 -05:00
ellensp 57700b4edd 📺 SKR_MINI_SCREEN_ADAPTER for BTT SKR Mini E3 V3 (#24521) 2022-07-19 17:32:08 -05:00
Eduard Sukharev c5b3bacfc9 More ESP32 (MKS TinyBee) tests (#24493) 2022-07-19 17:30:19 -05:00
thinkyhead 999f33b1e7 [cron] Bump distribution date (2022-07-19) 2022-07-19 06:07:36 +00:00
Keith Bennett 4b8a1ec86f 📝 Update Contributing Guide (#24320) 2022-07-18 20:14:58 -05:00
InsanityAutomation bb3c5aa186 🚸 Machine-relative Z_STEPPER_ALIGN_XY (#24261)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-07-18 20:12:27 -05:00
Scott Lahteine 5f2908a117 ♻️ Small sound / buzz refactor (#24520) 2022-07-18 19:53:36 -05:00
Scott Lahteine ed2071aabd 🩹 Fix manual move titles (#24518) 2022-07-18 19:52:47 -05:00
thinkyhead 48e4863cb6 [cron] Bump distribution date (2022-07-18) 2022-07-18 06:06:15 +00:00
tombrazier 3b4a5a1ae8 🩹 Arc/Planner optimization followup (#24509) 2022-07-18 00:51:44 -05:00
Keith Bennett 6d83f7a579 🩹 Fix ProUI + Leveling compile (#24508) 2022-07-17 23:33:23 -05:00
thinkyhead 23926bb4c2 [cron] Bump distribution date (2022-07-17) 2022-07-17 00:24:12 +00:00
Scott Lahteine 8fd6693d53 🔨 Update mfprep comment 2022-07-16 17:16:37 -05:00
Arthur Masson 9706cd0d7d Polargraph M665 settings (#24401) 2022-07-16 16:58:18 -05:00
Scott Lahteine 504fec9823 🚸 Renumber EXP pins to match schematics/RRF/Klipper 2022-07-16 16:40:32 -05:00
Christophe Huriaux 05a7be7b25 eMotion-Tech eMotronic (Micro-Delta rework) (#24488) 2022-07-16 16:35:40 -05:00
Scott Lahteine fa0ad4b594 🔨 Add mftest --default flag 2022-07-16 16:11:33 -05:00
Scott Lahteine e84de791ab 🩹 Fix TFT tImage struct packing 2022-07-16 16:01:28 -05:00
GHGiampy 9be1de54ae 🩹 Add'l ProUI fixes (#24500) 2022-07-15 20:14:15 -05:00
GHGiampy 147fbd9d39 🔨 Remove log2file monitor filter (#24502) 2022-07-15 20:11:47 -05:00
Nikolay-Po 8a1643587b Steinhart-Hart C Coeff for Custom Thermistor (#24428) 2022-07-15 19:56:15 -05:00
thinkyhead 2f219d6824 [cron] Bump distribution date (2022-07-16) 2022-07-16 00:24:41 +00:00
Scott Lahteine 33d261141a 🔨 Also update rm for settings.o 2022-07-15 18:47:25 -05:00
tombrazier fc0615fbd1 ️ Optimize Planner calculations (#24484) 2022-07-15 18:47:20 -05:00
Keith Bennett 48f0d55097 📝 Update board MCU comments (#24486) 2022-07-15 18:47:20 -05:00
GHGiampy 6eef807520 🔨 Fix firmware upload (#24499) 2022-07-15 03:18:57 -05:00
Scott Lahteine 0f5703a837 🔨 PlatformIO "--target upload" == "--target exec" 2022-07-14 21:56:13 -05:00
Scott Lahteine de0706e52c 🔨 Fix Warnings.cpp force-recompile 2022-07-14 21:08:07 -05:00
thinkyhead 7361c03aa4 [cron] Bump distribution date (2022-07-15) 2022-07-15 00:26:29 +00:00
Scott Lahteine e92854b0ed 🔨 Fix and update Makefile
Followup to 89fe5f6d
2022-07-14 02:56:55 -05:00
Keith Bennett 0941e8e869 📌 Pin ESP32SSDP to 1.1.1 (#24489) 2022-07-14 01:31:47 -05:00
Victor Oliveira a61fab7302 Creality3D v4.2.5 / CR200B (#24491) 2022-07-14 01:30:00 -05:00
thinkyhead 0dc46a8d27 [cron] Bump distribution date (2022-07-14) 2022-07-14 06:22:49 +00:00
GHGiampy 30ec700a1d 🩹 Fix ProUI LED compile (#24473) 2022-07-14 00:03:27 -05:00
Miguel Risco-Castillo 8fb54d4621 🚸 Fix and update ProUI (#24477) 2022-07-14 00:00:33 -05:00
toomuchwonder c47575f244 🩹 Fix MKS UI extruder speed (#24476) 2022-07-13 22:17:53 -05:00
Bob Kuhn 3f4e4a4d89 🔥 Drop STM L64** drivers, STEVAL_3DP001V1 (#24427) 2022-07-13 22:16:22 -05:00
Scott Lahteine 2dc543c4f5 🎨 ANY => EITHER 2022-07-13 21:22:53 -05:00
GHGiampy 1d31b6215a 🔨 Abort firmware update on transfer error (#24472) 2022-07-13 20:25:35 -05:00
thinkyhead cee517bc24 [cron] Bump distribution date (2022-07-13) 2022-07-13 00:25:33 +00:00
Scott Lahteine 3c3c9f1a8e 🧑‍💻 Update Mac Sim directions 2022-07-12 13:25:41 -05:00
Scott Lahteine 068624a726 📌 Ask for PlatformIO 6.1.1 or newer (#24435) 2022-07-12 13:02:54 -05:00
thinkyhead ec2864be74 [cron] Bump distribution date (2022-07-12) 2022-07-12 00:22:44 +00:00
Keith Bennett 1bab0243fd MKS Monster8 V2 (#24483) 2022-07-11 13:33:42 -05:00
thinkyhead 57e27339b6 [cron] Bump distribution date (2022-07-11) 2022-07-11 06:06:57 +00:00
Scott Lahteine d60a280bc5 🧑‍💻 Add Sim debug with lldb 2022-07-10 22:00:10 -05:00
thinkyhead 0a7be1ac58 [cron] Bump distribution date (2022-07-10) 2022-07-10 00:26:20 +00:00
Scott Lahteine f101aeb3ec 🐛 Fix SDIO for STM32 (#24470)
Followup to #24271
2022-07-09 11:13:20 -05:00
thinkyhead 62c0ab072c [cron] Bump distribution date (2022-07-09) 2022-07-09 00:18:55 +00:00
Keith Bennett 55b8d1b9d3 🔧 Assert Probe Temp Comp requirements (#24468) 2022-07-08 15:30:03 -05:00
Mike La Spina d924d17209 🐛 Fix laser/fan sync (#24460)
Followup to #22690, 307dfb15
2022-07-08 15:04:14 -05:00
tombrazier 920799e38d ️ Optimize G2-G3 Arcs (#24366) 2022-07-08 14:41:39 -05:00
Jason Smith f65f7a685b 🩹 Fix LCD_BACKLIGHT_TIMEOUT compile (#24463) 2022-07-07 23:43:56 -05:00
thinkyhead 623631286f [cron] Bump distribution date (2022-07-08) 2022-07-08 00:26:22 +00:00
Pauli Jokela abe139192f 🩹 Fix safe homing sanity-check (#24462) 2022-07-07 10:59:23 -05:00
Farva42 5979aab1c7 MAG_MOUNTED_PROBE (#24420)
Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-07-06 21:15:18 -05:00
Scott Lahteine f73fad1b2f 🔥 Remove JyersUI (#24459) 2022-07-06 21:15:18 -05:00
Scott Lahteine 1497c40379 📝 Configurations 02010100 (#24458) 2022-07-06 21:15:18 -05:00
thinkyhead 64aff274b4 [cron] Bump distribution date (2022-07-07) 2022-07-06 21:15:18 -05:00
Meilleur Gars 509dfe92d0 🚸 JyersUI updates (#24451) 2022-07-06 21:15:18 -05:00
Christophe Huriaux 58048e7748 🩹 Fix ST7565 LCD contrast init (#24457) 2022-07-06 21:15:18 -05:00
thinkyhead 9805d2bc38 [cron] Bump distribution date (2022-07-06) 2022-07-06 21:15:18 -05:00
Bob Kuhn a88e847295 🐛 Fix Sensorless Probing compile (#24455) 2022-07-06 21:15:18 -05:00
Eduard Sukharev 55417b28fe 🐛 Fix MKS TinyBee compile (#24454) 2022-07-06 21:15:18 -05:00
Mike La Spina 6a67ad4e4a ️ Fix and improve Inline Laser Power (#22690) 2022-07-06 21:15:18 -05:00
thinkyhead 132c37a651 [cron] Bump distribution date (2022-07-05) 2022-07-05 00:21:32 +00:00
Keith Bennett e08b293b54 BigTreeTech SKR SE BX V3.0 (#24449)
SKR SE BX V3.0 removes the Reverse Driver Protection feature.
2022-07-04 00:31:06 -05:00
Scott Lahteine f39e2bc1e4 🩹 Followup for lchar_t 2022-07-04 00:30:17 -05:00
EvilGremlin e94fa7d5dc 🔨 Fix OpenBLT encode; no-bootloader envs (#24446) 2022-07-03 20:49:23 -05:00
thinkyhead 954b4493d2 [cron] Bump distribution date (2022-07-04) 2022-07-04 00:26:42 +00:00
Keith Bennett fc287b44da 🚸 MPCTEMP: Home before cooling (#24434) 2022-07-03 11:08:43 -05:00
Scott Lahteine 54e7b933cd ♻️ Encapsulate PID in class (#24389) 2022-07-03 10:32:47 -05:00
Keith Bennett 9baeeedd69 🩹 Fix MKS TinyBee ADC Vref (#24432) 2022-07-03 10:08:40 -05:00
Victor Oliveira 3826b13ab1 🔨 Disable stack protector on macOS simulator (#24443) 2022-07-02 19:31:27 -05:00
thinkyhead b8741a59df [cron] Bump distribution date (2022-07-03) 2022-07-03 00:24:56 +00:00
Scott Lahteine 2b6ce3006e 🩹 Followup for lchar_t 2022-07-02 18:33:06 -05:00
Scott Lahteine d956a6ba00 🩹 Followup for lchar_t 2022-07-01 21:14:56 -05:00
Scott Lahteine 9c376f120c 🩹 Remove obsolete split_move 2022-07-01 20:23:01 -05:00
thinkyhead b1bb307dab [cron] Bump distribution date (2022-07-02) 2022-07-02 00:24:49 +00:00
Scott Lahteine cb4a79173b 🩹 Remove poison wchar_t macro 2022-07-01 18:13:38 -05:00
Scott Lahteine 35dbc286bd ✏️ Creality test followup 2022-07-01 07:53:58 -05:00
Moonglow c7923c0397 🐛 Fix M149 (#24430) 2022-06-30 21:51:55 -05:00
tombrazier a811005ab2 🚸 Vertical Max7219::quantity in portrait orientation (#24415) 2022-06-30 21:07:36 -05:00
Scott Lahteine 71368b5fa5 Update path to Ender-3 S1 configs 2022-06-30 20:57:37 -05:00
thinkyhead f76025b79c [cron] Bump distribution date (2022-07-01) 2022-07-01 00:25:21 +00:00
Scott Lahteine f5488f96cc 📝 Index Mobo Rev03 => Opulo Lumen Rev3 2022-06-30 17:31:45 -05:00
thinkyhead 4fb1c42500 [cron] Bump distribution date (2022-06-30) 2022-06-30 00:21:32 +00:00
Scott Lahteine d9ec3795fb 🩹 Fix memset block warning 2022-06-29 17:14:23 -05:00
Keith Bennett cc51bc29e1 🐛 Fix Axis Homing (#24425)
Followup to 4520a51
2022-06-29 08:24:22 -05:00
thinkyhead 914501f67e [cron] Bump distribution date (2022-06-29) 2022-06-29 00:21:53 +00:00
John Lagonikas 31d286750c 🐛 Fix MAX31865 PT1000 normalization (#24407)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-06-28 17:53:05 -05:00
thinkyhead d6fc3d2b69 [cron] Bump distribution date (2022-06-28) 2022-06-28 06:05:50 +00:00
Scott Lahteine 93ffd57383 ♻️ reset_acceleration_rates => refresh_… 2022-06-27 21:28:04 -05:00
Scott Lahteine 307dfb15ca ♻️ Planner flags refactor 2022-06-27 21:28:04 -05:00
Scott Lahteine 884f7c7db9 📝 Note about UBL bad splits 2022-06-27 21:28:04 -05:00
thinkyhead 95b70233f2 [cron] Bump distribution date (2022-06-27) 2022-06-27 00:24:23 +00:00
Scott Lahteine 76d784f75f 🎨 Misc. shorthand operators 2022-06-26 10:01:22 -05:00
Scott Lahteine d8545551fe 🐛 Fix Manual Move axis selection (#24404) 2022-06-26 06:48:24 -05:00
Shlee b46191715d 📝 Add STM32F4 example, Ruby (#24399) 2022-06-26 01:56:57 -05:00
Giuliano Zaro dc5c5bdf82 🌐 Update Italian language (#24398) 2022-06-26 01:52:19 -05:00
Roman Moravčík d976f291fd 🌐 Update Slovak language (#24397) 2022-06-26 01:51:16 -05:00
sgparry 1e66cc39c2 🩹 Fix LCD contrast with K8800 board 2022-06-26 01:49:57 -05:00
tombrazier 2266f1ad67 MAX7219 idle profiler (#24375) 2022-06-26 00:38:23 -05:00
thinkyhead a0125c85d4 [cron] Bump distribution date (2022-06-26) 2022-06-26 00:26:54 +00:00
Scott Lahteine 546b3066c3 🌐 Drop unused delta strings 2022-06-24 22:07:19 -05:00
thinkyhead 0aebcc4ded [cron] Bump distribution date (2022-06-25) 2022-06-25 00:22:43 +00:00
Bob Kuhn 12a869e2ad 🐛 Fix Lerdge build / encrypt (#24391)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-06-23 23:59:50 -05:00
thinkyhead 645c7dc370 [cron] Bump distribution date (2022-06-24) 2022-06-24 00:21:33 +00:00
Victor Oliveira 1a79537645 Classic UI BIQU BX (#24387) 2022-06-23 04:18:36 -05:00
thinkyhead 6355798bfd [cron] Bump distribution date (2022-06-23) 2022-06-23 00:18:49 +00:00
ellensp 58d1b1be28 🩹 Fix DGUS (MKS) compile (#24378) 2022-06-22 05:08:24 -05:00
Victor Oliveira 3c13be165b 🚑️ Fix BIQU BX touch freeze (#24383) 2022-06-22 03:33:03 -05:00
ellensp 8c3ba69c98 🐛 Fix M423 invocation (#24360)
Followup to #23745
2022-06-21 23:14:05 -05:00
tombrazier 757156de72 🩹 LCD strings followup, fix warning (#24328) 2022-06-21 21:45:22 -05:00
InsanityAutomation 757d66e2c5 🐛 Resolve DUE Servo pulse issue (#24305)
Co-authored-by: sjasonsmith <20053467+sjasonsmith@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-06-21 21:09:24 -05:00
DerAndere b06e378703 FOAMCUTTER_XYUV (for RAMPS) (#24325)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-06-21 21:07:17 -05:00
thinkyhead 90d9f1acc9 [cron] Bump distribution date (2022-06-22) 2022-06-22 00:25:14 +00:00
ellensp 22f0496c9b 🚑️ Fix SD mount bug (#24319)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-06-21 17:33:25 -05:00
thinkyhead d0e9ff0e29 [cron] Bump distribution date (2022-06-21) 2022-06-21 06:05:48 +00:00
Scott Lahteine 975c8f4b77 🎨 Simplify move menus with substitution 2022-06-20 21:22:04 -05:00
Scott Lahteine 4520a51bbe 🎨 Use MAP for home axis items 2022-06-20 21:21:48 -05:00
Scott Lahteine 432c879328 🧑‍💻 Fix STATIC_ITEM_N arg order 2022-06-20 21:21:20 -05:00
Scott Lahteine 6cbd7a48d1 🎨 Fix comments, formatting 2022-06-20 21:20:42 -05:00
Scott Lahteine 751c88aa5b 🩹 M919 9-axis update 2022-06-20 21:08:31 -05:00
thinkyhead 76f1f9d3b3 [cron] Bump distribution date (2022-06-18) 2022-06-18 06:07:14 +00:00
luzpaz a526c3d77a 🌐 Fix LCD string, typos (#24324) 2022-06-17 23:19:01 -05:00
tombrazier 1a6a604310 🐛 Fix G2/G3 Arcs stutter / JD speed (#24362) 2022-06-17 23:17:12 -05:00
thinkyhead 0a3c42a87c [cron] Bump distribution date (2022-06-15) 2022-06-15 12:07:28 +00:00
ellensp 70eac0fe4f 👷 CI test without src filter (emulate Arduino) (#24335) 2022-06-15 03:02:32 -05:00
thinkyhead 873f6c0b63 [cron] Bump distribution date (2022-06-14) 2022-06-14 06:05:52 +00:00
Keith Bennett e1b22a5c75 👷 Use Biqu BX for CI test (#24331) 2022-06-13 21:04:49 -05:00
Scott Lahteine 640282b8dc 🧑‍💻 Apply F() to some LCD / TFT strings
Followup to #24228
2022-06-13 20:43:23 -05:00
ellensp 0ff3018fd2 🩹 Fix missing ProUI cpp wrapper (#24313) 2022-06-13 20:38:19 -05:00
thinkyhead 9c6e0428af [cron] Bump distribution date (2022-06-11) 2022-06-11 06:06:31 +00:00
ellensp 43e9fe7f88 🐛 Fix JGAurora A5S A1 build (#24326) 2022-06-11 00:03:20 -05:00
Scott Lahteine 20dea22091 👔 Fewer checkboxes in Bug Report 2022-06-10 23:59:07 -05:00
Steven Haigh ee90ae2c87 🩹 Fix ProUI compile (#24310)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-06-10 21:08:55 -05:00
thinkyhead fb76ce841b [cron] Bump distribution date (2022-06-09) 2022-06-09 06:07:54 +00:00
Scott Lahteine 0ca33429b6 🧑‍💻 Misc. servo code cleanup 2022-06-09 00:51:47 -05:00
Scott Lahteine e4e6abe5af 🧑‍💻 Remove servo macros 2022-06-09 00:51:08 -05:00
thinkyhead 76a0cab782 [cron] Bump distribution date (2022-06-08) 2022-06-08 00:20:44 +00:00
ellensp 3e9fb34892 🩹 Media Change followup (#24302)
Followup to #24015
2022-06-07 01:59:21 -05:00
Scott Lahteine 9e73fd7149 👔 Update mfconfig import 2022-06-06 23:38:06 -05:00
thinkyhead 371ac49fc1 [cron] Bump distribution date (2022-06-07) 2022-06-07 00:30:16 +00:00
tombrazier f6e123430f 🩹 Fix Mesh Leveling + Debug compile (#24297) 2022-06-06 19:23:55 -05:00
lujios 3b142e531c 🩹 Fix G33 Delta Sensorless Probing compile (#24291) 2022-06-06 19:22:17 -05:00
Scott Lahteine d355ad04a0 👔 Fix and comment use_example_configs 2022-06-06 19:06:03 -05:00
thinkyhead a7a730f811 [cron] Bump distribution date (2022-06-06) 2022-06-06 06:06:26 +00:00
Miguel Risco-Castillo c9a9b25d41 🚸 ProUI G-code preview, PID plot (#24282) 2022-06-06 00:09:43 -05:00
Scott Lahteine 41a9dea149 👔 Update Marlin actions for 2.1.x 2022-06-06 00:09:43 -05:00
thinkyhead ec7cc59818 [cron] Bump distribution date (2022-06-05) 2022-06-05 00:25:04 +00:00
John Robertson ca06c6eab9 ️ PWM for ESP32 I2S expander (#24193) 2022-06-04 01:26:08 -05:00
Scott Lahteine d08223429b 🔖 Moving to bugfix-2.1.x 2022-06-04 01:22:02 -05:00
Scott Lahteine 8aca38351c 🧑‍💻 Extend LCD string substitution (#24278) 2022-06-03 22:56:38 -05:00
Scott Lahteine 9c872b214c 🐛 Fix min/max temp evaluation
Fixes #24257
2022-06-03 22:06:32 -05:00
Scott Lahteine 3522d5376c 🩹 Wrap SENSORLESS_STALLGUARD_DELAY 2022-06-03 20:55:15 -05:00
thinkyhead 2c0b8b52d8 [cron] Bump distribution date (2022-06-04) 2022-06-04 00:22:33 +00:00
Scott Lahteine 384ff264d7 🐛 Fix M203 report 2022-06-03 18:39:43 -05:00
Scott Lahteine 2b3ba02f09 🔧 LEVEL_BED_CORNERS => LCD_BED_TRAMMING 2022-06-03 18:16:43 -05:00
Scott Lahteine bcd9bb9628 🩹 Fix const warning
Followup to c16ae2451d
2022-06-03 01:31:01 -05:00
lujios 41f73cb457 ️ Improve Sensorless homing/probing accuracy for G28, G33, M48 (#24220)
Co-authored-by: Robby Candra <robbycandra.mail@gmail.com>
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2022-06-03 00:19:25 -05:00
Tanguy Pruvot 845e2f6fb7 Use default null args in select_screen 2022-06-02 20:12:24 -05:00
Tanguy Pruvot c9b97b8d64 🚑️ Fix SDIO Init bootloop on STM32F1 (#24275) 2022-06-02 19:23:07 -05:00
thinkyhead 833ea4ec29 [cron] Bump distribution date (2022-06-03) 2022-06-03 00:18:25 +00:00
Keith Bennett 12aded95dc 💚 SKR V3 case-sensitive fs fix (#24272) 2022-06-02 07:14:38 -05:00
thinkyhead 0e8e735e4c [cron] Bump distribution date (2022-06-02) 2022-06-02 12:07:36 +00:00
ellensp 49db4ef5e4 🩹 Fix G60/G61 debug code (#24231) 2022-06-02 04:28:07 -05:00
ellensp 08c51a405a 🐛 Init Stepper SPI before PSU Control (#24269) 2022-06-02 04:22:09 -05:00
BIGTREETECH eda61a2cbd BigTreeTech SKR3 - STM32H743 (#24271)
Co-authored-by: Alan.Ma <alansayyeah@gmail.com>
2022-06-02 04:02:06 -05:00
bryan065 f6b425613e 🚸 Custom Menu Items for JyersUI (#24270) 2022-06-02 03:51:39 -05:00
ledzepman71 e260d90d21 📌 Tenlog PSU pin (#24266) 2022-06-02 03:49:48 -05:00
thinkyhead 30a7c4ca52 [cron] Bump distribution date (2022-06-01) 2022-06-01 00:25:07 +00:00
John Robertson 85c0875db2 Laser Safety Timeout (#24189) 2022-05-31 17:09:44 -05:00
Keith Bennett 6f3d7d864f 👔 Configs required to submit a Bug Report (#24256) 2022-05-31 16:28:01 -05:00
thinkyhead 3d70aca6e8 [cron] Bump distribution date (2022-05-31) 2022-05-31 18:24:10 +00:00
Scott Lahteine 58ce5182c2 🎨 Fix spelling, whitespace 2022-05-31 12:44:30 -05:00
ellensp 7dd34848b6 🩹 Fix EXTRUDERS 0 manual move compile (#24255)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-31 12:21:59 -05:00
kisslorand 1a555b3812 Fix axis string 'N' (#24259)
Followup to 167672d
2022-05-31 12:05:57 -05:00
tombrazier ea7bebb568 💥 More M306 M => M306 H (#24258)
Followup to #24253
2022-05-31 12:01:59 -05:00
thinkyhead 68a7a3f88f [cron] Bump distribution date (2022-05-29) 2022-05-29 00:21:51 +00:00
tombrazier 6ecf52f196 🚩 MPC update (#24253) 2022-05-28 17:40:08 -05:00
Miguel Risco-Castillo eec9c800c9 🚸 Fix, improve, update ProUI (#24251) 2022-05-28 17:34:36 -05:00
Scott Lahteine 41a469208a 🚸 Change M201 G to S 2022-05-28 17:09:08 -05:00
Scott Lahteine a59766195c 🎨 Use pos.set method 2022-05-28 15:25:07 -05:00
elimisback 2b4a89eafe 🔨 BTT STM32G0B1RE xfer build (#24245) 2022-05-28 15:24:28 -05:00
Scott Lahteine 26f5c32872 🎨 Misc. boards/pins cleanup 2022-05-28 14:41:50 -05:00
thinkyhead 21d2d22a6f [cron] Bump distribution date (2022-05-28) 2022-05-28 00:22:28 +00:00
Simon Pilepich 4407ff31ec 📝 Fix Mightyboard MOSFET comments (#24183) 2022-05-27 17:08:24 -05:00
Scott Lahteine 1f322b565f ♻️ More updates for multi-axis 2022-05-27 00:46:46 -05:00
Scott Lahteine 1d4f928342 🎨 Combine serial echos 2022-05-27 00:46:46 -05:00
thinkyhead ff201e6552 [cron] Bump distribution date (2022-05-27) 2022-05-27 00:24:11 +00:00
ellensp 460e243693 🔨 Add src_filter for I2C_AMMETER (#24242) 2022-05-26 19:02:42 -05:00
Keith Bennett 740f652b6a ✏️ Fix some motherboard checks (#24238) 2022-05-26 18:07:10 -05:00
thinkyhead 54c9358964 [cron] Bump distribution date (2022-05-25) 2022-05-25 00:24:56 +00:00
ellensp e197695f4c 🎨 Remove MKS custom pins, TinyBee cleanup (#24186) 2022-05-24 15:31:29 -05:00
ellensp eb0c4682d5 📌 Use MarlinSimUI/bugfix-2.0.x (#24232) 2022-05-24 14:49:57 -05:00
thinkyhead 0da862fd1e [cron] Bump distribution date (2022-05-24) 2022-05-24 06:07:20 +00:00
Scott Lahteine 0a8672ae6c 👔 Move actions to default branch 2022-05-24 00:12:23 -05:00
Scott Lahteine 31413a7d77 🧑‍💻 Combined axis strings 2022-05-24 00:12:23 -05:00
ellensp 639b1f64c6 Revert "Firmware upload…" (#24229) 2022-05-23 02:39:50 -05:00
Scott Lahteine 7d9bd3a97c 🎨 Add EXP1/2 headers, adjust TFT pins (#24230) 2022-05-23 02:37:28 -05:00
Keith Bennett f26b8bf8ef 📝 Add logo, helpful links to README (#24226) 2022-05-22 22:00:58 -05:00
ellensp c1ff38c7a0 🚸 Firmware upload destination prompt (using Tk) (#24074) 2022-05-22 22:00:58 -05:00
Robby Candra 15b6159f6a 🩹 Adjust manage_media for slow/late media init (USB FD) (#24015) 2022-05-22 22:00:58 -05:00
Scott Lahteine 04d0d9431b ♻️ Watchdog followup
Followup to 52eefa90e1
2022-05-22 20:47:44 -05:00
Scott Lahteine a5e1d4c50a ♻️ Apply F() to more LCD code (#24228) 2022-05-22 19:56:46 -05:00
Scott Lahteine e88fabafc8 🔨 Fix mfprep string test 2022-05-22 18:42:25 -05:00
InsanityAutomation c6b5bf7c00 🚨 Fix build warnings on Lulzbot Taz (#24227) 2022-05-22 17:47:30 -05:00
Scott Lahteine 167672dcd7 🧑‍💻 Forward-compatible axis strings 2022-05-22 17:45:07 -05:00
Scott Lahteine a93146b71d 🐛 Fix SEGMENT_LEVELED_MOVES with UBL 2022-05-22 17:05:39 -05:00
Keith Bennett d99185be24 🎨 Fix/adjust warnings (#24225) 2022-05-22 16:32:16 -05:00
Scott Lahteine c5126de559 🧑‍💻 MAP macro for axis lists, etc. (#24191) 2022-05-22 16:08:29 -05:00
Scott Lahteine c16ae2451d 🩹 Fix const warning 2022-05-22 14:43:14 -05:00
Keith Bennett e340a61e52 🐛 Fix FLSUN Hispeed FIL_RUNOUT_PIN, MKS Robin Mini TFT pins (#24204) 2022-05-21 18:13:00 -05:00
Arthur Masson af59056c09 🐛 Fix Polargraph G92 command (#24223) 2022-05-21 14:45:30 -05:00
Keith Bennett 4b0b6e22a7 👔 Move GitHub templates, update README (#24199) 2022-05-20 11:48:34 -05:00
Scott Lahteine 2bb9e0d58e 🔧 Remove LCD_SERIAL_PORT defaults, warn on auto-assign (#24170) 2022-05-20 11:27:09 -05:00
Scott Lahteine 52eefa90e1 ♻️ Move watchdog to MarlinHAL 2022-05-20 11:22:57 -05:00
Scott Lahteine 12da2e9288 🎨 Minor HAL cleanup 2022-05-20 11:22:57 -05:00
Scott Lahteine 22c5bd7eae 🔨 Move, tweak maple envs 2022-05-20 11:22:57 -05:00
tombrazier 62057d3204 🐛 Fix Leveling apply/unapply (#24188)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-19 16:15:15 -05:00
Marcio T 00075990d0 🐛 Fix FTDI_EVE_TOUCH_UI reboot loop (#24195) 2022-05-19 10:45:48 -05:00
ellensp 6a880280e4 🔨 Require PIO >= 6.0.1 (#24205) 2022-05-19 09:15:57 -05:00
Scott Lahteine b523ddf1b2 ♻️ Common Bed Leveling object name, accessors (#24214) 2022-05-19 06:05:52 -05:00
Ivan Kravets c814fe98d7 🔨 Use PlatformIO Core 6.0 Dev for CI (#24194) 2022-05-17 16:47:11 -05:00
Miguel Risco-Castillo a65e4edb1c 🚸 ProUI APRIL2022 updates (#24084) 2022-05-17 15:46:04 -05:00
Scott Lahteine 310ff23676 🎨 Misc. E3V2 DWIN cleanup 2022-05-17 15:10:03 -05:00
ellensp 7894cd9d6a 🩹 Fix MarlinUI allow-cold-extrude (#24176)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-17 03:01:32 -05:00
thinkyhead 0b787e8ed3 [cron] Bump distribution date (2022-05-17) 2022-05-17 06:00:50 +00:00
Oliver Jean Eifler 79789571bc 🩹 Suppress ZERO() warning (#24178) 2022-05-16 23:23:03 -05:00
Marcio T e092a02d77 🐛 Fix Due cli/sei (#24182)
Followup to #23357
2022-05-16 21:45:47 -05:00
thinkyhead 66d94aad21 [cron] Bump distribution date (2022-05-15) 2022-05-15 00:01:54 +00:00
Scott Lahteine 86fe4fde40 🎨 HAL_MinSerial.* => MinSerial.* 2022-05-13 23:49:29 -05:00
Keith Bennett 956f7d32fb 🩹 Run TMC test last in setup (#24160) 2022-05-13 19:50:42 -05:00
Miguel Risco-Castillo be0f1088f0 🚸 DWIN/DACAI for Creality 4.2.3 (#24132) 2022-05-13 19:34:30 -05:00
Scott Lahteine 66e32cb0fa 🧑‍💻 Clarify MSerialUSB, drop HardwareSerial workaround 2022-05-13 19:31:07 -05:00
Keith Bennett a62dc7c70c 🚸 Improve MKS SGEN_L V2, Robin Nano V3 pins (#24147) 2022-05-13 19:27:13 -05:00
Dominic 0e4348c718 🐛 Fix AIR_ASSIST (#24162) 2022-05-13 19:18:04 -05:00
Keith Bennett 1397cf0eaa 🔧 Allow board & probe dummy thermistors (#24165) 2022-05-13 19:17:19 -05:00
grauerfuchs eb352b11b9 🐛 Fix Mightyboard LED pin, fan override (#24168) 2022-05-13 19:08:50 -05:00
Scott Lahteine 6c2249451e [cron] Bump distribution date (2022-05-14) 2022-05-13 19:06:25 -05:00
Roxy-3D a7ade2d63e 🔨 BTT Octopus ST-Link programming/debugging 2022-05-13 19:05:56 -05:00
Scott Lahteine c1b53d63fc 🎨 Nextion cleanup 2022-05-13 00:48:19 -05:00
Scott Lahteine e438c77c6a 🚚 Move speed_lookuptable.h 2022-05-13 00:48:19 -05:00
Keith Bennett 8ccc601218 🎨 Clean up warnings / extra check (#24163) 2022-05-13 00:41:38 -05:00
Scott Lahteine b934a4c612 🩹 Fix printer_busy, M73
Followup to "Misc. LCD cleanup"
2022-05-13 00:00:28 -05:00
Scott Lahteine cb31a99319 ✏️ Fix MSG_LOCKSCREEN 2022-05-12 23:29:29 -05:00
ellensp ecc138fc9e 🔧 AVR/DUE Serial Port pin conflict checks (#24148)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-12 23:07:27 -05:00
Scott Lahteine 1e749e4f48 🧑‍💻 Misc. LCD cleanup 2022-05-12 21:40:01 -05:00
Scott Lahteine 38f4d8abfc Add BOARD_CREALITY_V24S1_301F4
Co-Authored-By: Miguel Risco-Castillo <mriscoc@users.noreply.github.com>
2022-05-12 21:18:06 -05:00
Scott Lahteine e039d51d18 🩹 Fix ProUI leveling start message 2022-05-12 20:23:32 -05:00
thinkyhead d1e9f53cb8 [cron] Bump distribution date (2022-05-13) 2022-05-13 00:01:33 +00:00
InsanityAutomation 64ebb78892 Creality CR-10 SmartPro (#24151)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-12 05:38:05 -05:00
Scott Lahteine f1ab24d0ae 🩹 Fix accel dividend 2022-05-12 04:16:31 -05:00
Scott Lahteine 84b9de9a19 🔨 Fix g++ locator for CI 2022-05-12 02:17:16 -05:00
thinkyhead 30eb2aa869 [cron] Bump distribution date (2022-05-12) 2022-05-12 06:00:54 +00:00
Scott Lahteine 672d0d4448 📝 Refer to 'PROGMEM' as 'flash' 2022-05-11 23:37:40 -05:00
Pauli Jokela 04fe50936e SOUND_ON_DEFAULT option (#24102)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-11 21:23:16 -05:00
Scott Lahteine 11c701af9b ✏️ Maple warning followup
Followup to #23661
2022-05-11 20:44:11 -05:00
thinkyhead ba95e85e53 [cron] Bump distribution date (2022-05-10) 2022-05-10 00:01:50 +00:00
Scott Lahteine 918a9cf3d1 🧑‍💻 Clarify acceleration factor 2022-05-09 18:50:25 -05:00
Scott Lahteine 8e24b34160 📌 Define RAMPS_SMART EXP headers, AZSMZ_12864
See #23501
2022-05-09 17:35:32 -05:00
Scott Lahteine 9d32bc3153 ✏️ Fix spurious UTF 2022-05-09 17:34:26 -05:00
Scott Lahteine 3bf768f925 🔨 OpenOCD Debug for VSCode 2022-05-09 17:34:26 -05:00
Mike La Spina 726a38712e 🩹 Fix Fan Tail Speed Init (#24076)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-05-09 17:18:47 -05:00
thinkyhead 4a17589496 [cron] Bump distribution date (2022-05-08) 2022-05-08 06:01:02 +00:00
Scott Lahteine 198ef1e474 🎨 Misc. code cleanup 2022-05-07 22:03:19 -05:00
Scott Lahteine 9e43ec9dcd 🔨 Improved mfprep script 2022-05-07 22:03:19 -05:00
Keith Bennett 1a9e8c047b 🔧 Fix Neo RGB sanity check (#24146) 2022-05-07 21:58:57 -05:00
ellensp e43f4207a0 📌 Use ESP3DLib master branch (#24140) 2022-05-07 21:57:13 -05:00
ellensp 5f4ec82544 ✏️Fix Markforged endstops/G38 (#24141) 2022-05-07 21:56:09 -05:00
thinkyhead 2a88cc0fcd [cron] Bump distribution date (2022-05-07) 2022-05-07 00:01:30 +00:00
Scott Lahteine 505ab1bb62 🔨 Use first g++ in path for 'native' targets 2022-05-05 19:36:51 -05:00
Scott Lahteine 659b4172aa 🔨 Prevent build attribute define conflicts 2022-05-05 19:33:50 -05:00
thinkyhead a5b57a09fd [cron] Bump distribution date (2022-05-06) 2022-05-06 00:01:36 +00:00
Scott Lahteine 6e90272783 🩹 Bring G425 report up to date
Followup to #23112
2022-05-05 14:57:29 -05:00
Scott Lahteine 9d6b4a2e97 🔧 Move LASER_COOLANT_FLOW_METER to LASER_FEATURE 2022-05-05 13:41:03 -05:00
Keith Bennett 3cea0a00b1 🐛 Some EEPROM size fixes (#24113)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-05 02:38:48 -05:00
Stephen Hawes 81a6834876 Add M3426 A<addr> parameter (#24130)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-05 02:37:47 -05:00
Keith Bennett df40181357 💥 Num Axes and Multi-Stepper based on Driver Types (#24120)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
2022-05-04 19:25:02 -05:00
thinkyhead 6237a6a6d3 [cron] Bump distribution date (2022-05-05) 2022-05-05 00:12:10 +00:00
Scott Lahteine 23a26e4033 🌐 Clean up languages 2022-05-04 17:03:25 -05:00
Scott Lahteine 492d91791c 💚 Lock CI testing to PlatformIO 5.2.5 2022-05-04 15:02:00 -05:00
thinkyhead 0a6c58ea71 [cron] Bump distribution date (2022-05-04) 2022-05-04 18:13:21 +00:00
Scott Lahteine 4c8c02f66f 📝 Replace KB with K in pins 2022-05-04 12:47:15 -05:00
thinkyhead b038078541 [cron] Bump distribution date (2022-05-03) 2022-05-03 00:01:42 +00:00
Keith Bennett 43b43491ab 📝 Fix extraneous URL args (#24125) 2022-05-02 18:29:25 -05:00
thinkyhead a1d4942f76 [cron] Bump distribution date (2022-05-01) 2022-05-01 00:01:58 +00:00
Keith Bennett 3bcbd3259f 🔧 Mini LCD followup (#24111) 2022-04-30 00:54:42 -05:00
thinkyhead 60f8287208 [cron] Bump distribution date (2022-04-30) 2022-04-30 00:02:33 +00:00
Scott Lahteine b37d13af72 🔧 Base NUM_AXES on defined DRIVER_TYPEs (#24106) 2022-04-29 15:23:34 -05:00
Keith Bennett 12eb1e0829 📝 Update NEOPIXEL_TYPE comment (#24110) 2022-04-29 15:19:38 -05:00
thinkyhead 5c47476e0c [cron] Bump distribution date (2022-04-29) 2022-04-29 18:14:41 +00:00
tombrazier 60b6df4542 🐛 Fix kinetic ABL mesh after refactor (#24107)
Followup to #23868
2022-04-29 12:54:57 -05:00
thinkyhead e633ef895d [cron] Bump distribution date (2022-04-26) 2022-04-26 06:00:51 +00:00
Giuliano Zaro a0a963fe1d 🩹 Fix "elapsed" text on DOGLCD (#24087) 2022-04-25 22:03:16 -05:00
thinkyhead a8419738be [cron] Bump distribution date (2022-04-24) 2022-04-24 00:01:59 +00:00
Scott Lahteine 7501d253c7 🎨 Tweak NEOPIXEL_LED format 2022-04-23 06:18:56 -05:00
Scott Lahteine d9ccf0a144 📝 Fix 'M150 S' comment 2022-04-23 06:11:03 -05:00
ellensp bd27490adb 🐛 Fix MKS_MINI_12864 build for ESP32 (#24071) 2022-04-23 05:02:13 -05:00
Scott Lahteine ac4fefa49a ♻️ Consolidate DGUSScreenHandler class (#24067) 2022-04-23 05:00:46 -05:00
ellensp 6a05702c20 🐛 Fix BACKLASH_COMPENSATION compile (#24072)
Followup to #23826
2022-04-23 04:16:15 -05:00
thinkyhead 9188f57938 [cron] Bump distribution date (2022-04-23) 2022-04-23 00:01:45 +00:00
ellensp 1a131d17b6 🩹 Fix DGUS_PREHEAT_UI enable with DGUS_LCD_CLASSIC (#24066) 2022-04-22 06:02:47 -05:00
Mateusz Kleina 4a73fa18d8 🐛 Fix ProUI / JyersUI leveling preheat (#24064)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-22 05:12:39 -05:00
Scott Lahteine fe745fdef0 🚸 More ExtUI events for ABL / UBL 2022-04-22 04:48:09 -05:00
tombrazier 5b2071448f 🩹 Fix MPC Edit Menu (#24059)
Followup to #23984

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-22 01:50:38 -05:00
thinkyhead 633fb5f941 [cron] Bump distribution date (2022-04-22) 2022-04-22 00:01:30 +00:00
Scott Lahteine 741eb0c3e9 🚸 Home Y before X on belt printers 2022-04-21 09:05:15 -05:00
Scott Lahteine bf38ef23e5 🐛 Prevent BABYSTEP freeze
See #22830, #13300
2022-04-21 08:58:50 -05:00
Scott Lahteine 91cf4eb977 🐛 Home Z to Max after Z_SAFE_HOMING 2022-04-21 08:58:50 -05:00
Scott Lahteine 01bb11b415 🧑‍💻 IS_ULTRA_LCD => HAS_WIRED_LCD 2022-04-21 07:16:57 -05:00
Scott Lahteine 0ff3035f3a 🚸 Prevent accidental button press 2022-04-21 07:10:05 -05:00
Scott Lahteine 2dcfa140e9 🎨 misc. cleanup 2022-04-21 07:10:05 -05:00
ellensp 367c11dfa2 🐛 Fix STM32 Pins Debugging (#22896) 2022-04-21 04:06:22 -05:00
Scott Lahteine d507ea117e 🩹 Fix ESP32 servos, SD_IGNORE_AT_STARTUP
Fixes #24007
Followup to aaf5bf02
2022-04-21 02:26:31 -05:00
Christian Piper 3905234b0d 🩹 Fix PRINTCOUNTER with EXTRUDERS 0 (#24063)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-21 02:15:07 -05:00
thinkyhead 6fc284231c [cron] Bump distribution date (2022-04-21) 2022-04-21 00:06:20 +00:00
Scott Lahteine a0d28f1770 🎨 Minimize block->steps.set 2022-04-20 04:29:42 -05:00
Scott Lahteine aca0d3dba5 💚 Use PIO-develop for CI 2022-04-20 04:29:26 -05:00
Scott Lahteine d4fd39f05f 🐛 Update M913, M914 report
Followup to #11248, #11249, #23400
2022-04-20 00:56:52 -05:00
Keith Bennett 42be79b3a2 🐛 Fix JyersUI Preheat Items (#24060) 2022-04-19 19:26:25 -05:00
thinkyhead 5844128a77 [cron] Bump distribution date (2022-04-20) 2022-04-20 00:01:47 +00:00
DerAndere 8aaf64d917 💥 Update Motor Current G-codes for extra axes (#23975) 2022-04-18 22:15:15 -05:00
ellensp 5005c7b64c 🐛 Fix Manual Move cold extrude override (#24045)
Followup to #19606

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-18 22:03:42 -05:00
thinkyhead bb5dbd13a8 [cron] Bump distribution date (2022-04-19) 2022-04-19 00:01:38 +00:00
Scott Lahteine 696ae3cc14 ✏️ Remove extra G29 line
Followup to 85a62bbf
2022-04-18 16:41:16 -05:00
Keith Bennett 9d623160a6 🧑‍💻 Preheat menu improvements (#24017)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-18 05:46:58 -05:00
Ludy 3d3898145a 🌐 Update German language, FTDI cleanup (#24047)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-18 04:43:34 -05:00
thinkyhead 3b3dbcbeb4 [cron] Bump distribution date (2022-04-18) 2022-04-18 06:00:58 +00:00
Ludy fc87834cc0 🐛 Fix FTDI::get_utf8_char_and_inc compile (#24048) 2022-04-18 00:01:28 -05:00
John Lagonikas c58c5b09ab 🐛 Fix MPC compile (#24049)
Followup to #23984, #23751

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-17 23:56:52 -05:00
DerAndere 2ee39b62f3 🩹 Fix some parameters w/out values (#24051) 2022-04-17 23:03:39 -05:00
Scott Lahteine fd082df077 🧑‍💻 Handle PLR in manage_media 2022-04-17 21:20:34 -05:00
Scott Lahteine aaf5bf0218 🧑‍💻 Add RESET_STEPPERS_ON_MEDIA_INSERT flag 2022-04-17 21:20:34 -05:00
Scott Lahteine fb54d06582 🎨 Flatten manage_media code 2022-04-17 21:20:34 -05:00
thinkyhead 5eeb6e0bca [cron] Bump distribution date (2022-04-16) 2022-04-16 00:02:34 +00:00
Scott Lahteine b0e974e208 🧑‍💻 Simplify BIGTREE_SKR_2_F429 env 2022-04-15 02:05:02 -05:00
thinkyhead d6cc851c67 [cron] Bump distribution date (2022-04-15) 2022-04-15 06:03:40 +00:00
Giuliano Zaro 14603112a4 🩹 Fix MPC_EDIT_DEFS (#24018) 2022-04-14 23:22:08 -05:00
Robby Candra a52dfc0373 🩹 Fix DEBUG_CARDREADER (#24023) 2022-04-14 23:21:12 -05:00
Moritz Wirger 3e1dd0d640 enwi ESPNP board support (#24029) 2022-04-14 21:43:21 -05:00
ellensp 2e121014b0 ✏️ Fix 9-axis Z axis typo (#24036)
Followup to #23112
2022-04-14 21:38:27 -05:00
Scott Lahteine cbf8622670 🎨 Use LEDColor default C-CTOR 2022-04-14 21:34:28 -05:00
Scott Lahteine 80810f1b18 🚨 Fix some compiler warnings 2022-04-14 21:34:06 -05:00
thinkyhead 29d3f6a024 [cron] Bump distribution date (2022-04-12) 2022-04-12 00:01:44 +00:00
Giuliano Zaro 80d09044f7 🌐 Update Italian language (#24019) 2022-04-10 19:23:53 -05:00
thinkyhead 11c41600a3 [cron] Bump distribution date (2022-04-11) 2022-04-11 00:01:51 +00:00
Scott Lahteine 416fb66118 🧑‍💻 Strip #errors in Configurations deployment 2022-04-10 17:53:52 -05:00
Scott Lahteine 2af7657214 🩹 Use LCD_CONTRAST_INIT in pins files 2022-04-10 07:39:50 -05:00
Scott Lahteine f31d3c6749 🩹 Fix ADVANCED_PAUSE_RESUME_PRIME check
Fixes #23824
2022-04-10 06:31:39 -05:00
LPRtypeCN c53af0df0b 🌐 Update Chinese language (#23865) 2022-04-10 06:19:12 -05:00
Scott Lahteine cec7836959 Autoreport Redundant Sensor option (#24014) 2022-04-10 03:58:58 -05:00
Scott Lahteine e4a8c693b0 🎨 Misc. USB flash code cleanup 2022-04-10 03:45:36 -05:00
Scott Lahteine 7ff5e02f6b 🔨 Fix LPC176x debug build
See #23635
2022-04-10 03:45:36 -05:00
Scott Lahteine f7cb1ce3f4 🩹 Fix PID helper functions 2022-04-10 03:19:07 -05:00
Scott Lahteine 577831bf1a 🩹 Apply 100% leveling correction below the bed
See #24002
2022-04-10 01:49:59 -05:00
thinkyhead 6cb1a4a48b [cron] Bump distribution date (2022-04-10) 2022-04-10 06:25:51 +00:00
tombrazier 3da29b4a04 🚸 Improve MPC tuning, add menu items (#23984)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-10 01:20:05 -05:00
Robert Brenckman 6ee34331b7 🐛 Fix Tool Change priming (#21142)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2022-04-10 00:24:07 -05:00
Scott Lahteine e2353be24f 🎨 Misc. cleanup, string optimization 2022-04-09 22:57:28 -05:00
stream2me 46e282bd6d 🐛 Prefer os.replace, fix TFT_LVGL_UI build (#24001) 2022-04-09 19:46:29 -05:00
Robby Candra 6fa930f043 ⚰️ Clean up dead option (#24006) 2022-04-09 19:44:31 -05:00
Robby Candra b19f745659 ♻️ Bilinear refactor followup (#24009)
Followup to #23868
2022-04-09 19:39:04 -05:00
ellensp febf7e54fe 🔨 Preflight check old abl files (#24010) 2022-04-09 19:37:24 -05:00
Keith Bennett 88f36ac82f ✏️ Fix FYSETC Mini Panel neopixel type (#24011) 2022-04-09 19:21:42 -05:00
InsanityAutomation 02f5e2de9c 🩹 Fix and clean up E3V2 draw (#24013) 2022-04-09 19:19:14 -05:00
Scott Lahteine 6567e0e0aa 🎨 Misc. 9-axis cleanup 2022-04-09 19:17:04 -05:00
995 changed files with 32299 additions and 24368 deletions
+5 -1
View File
@@ -14,6 +14,10 @@ end_of_line = lf
indent_style = space
indent_size = 2
[{*.py,*.conf,*.sublime-project}]
[{*.py}]
indent_style = space
indent_size = 4
[{*.conf,*.sublime-project}]
indent_style = tab
indent_size = 4
+178
View File
@@ -0,0 +1,178 @@
name: 🪲 Report a bug
description: Create a bug report to help improve Marlin Firmware
title: "[BUG] (bug summary)"
body:
- type: markdown
attributes:
value: >
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose).
- type: markdown
attributes:
value: |
**Thank you for reporting a bug in Marlin Firmware!**
## Before Reporting a Bug
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect.
- Test with the [`bugfix-2.1.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip) to see whether the issue still exists.
## Instructions
Please follow the instructions below. Failure to do so may result in your issue being closed. See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/.github/contributing.md) for additional guidelines.
1. Provide a good title starting with [BUG].
2. Fill out all sections of this bug report form.
3. Always attach configuration files so we can build and test your setup.
- type: dropdown
attributes:
label: Did you test the latest `bugfix-2.1.x` code?
description: >-
Always try the latest code to make sure the issue you are reporting is not already fixed. To download
the latest code just [click this link](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip).
options:
- Yes, and the problem still exists.
- No, but I will test it now!
validations:
required: true
- type: markdown
attributes:
value: |
# Bug Details
- type: textarea
attributes:
label: Bug Description
description: >-
Describe the bug in this section. Tell us what you were trying to do and what
happened that you did not expect. Provide a clear and concise description of the
problem and include as many details as possible.
When pasting formatted text don't forget to put ` ``` ` (on its own line) before and after to make it readable.
placeholder: |
Marlin doesn't work.
validations:
required: true
- type: input
attributes:
label: Bug Timeline
description: Is this a new bug or an old issue? When did it first start?
- type: textarea
attributes:
label: Expected behavior
description: >-
What did you expect to happen?
placeholder: I expected it to move left.
- type: textarea
attributes:
label: Actual behavior
description: What actually happened instead?
placeholder: It moved right instead of left.
- type: textarea
attributes:
label: Steps to Reproduce
description: >-
Please describe the steps needed to reproduce the issue.
placeholder: |
1. [First Step] ...
2. [Second Step] ...
3. [and so on] ...
- type: markdown
attributes:
value: |
# Your Setup
- type: input
attributes:
label: Version of Marlin Firmware
description: "See the About Menu on the LCD or the output of `M115`. NOTE: For older releases we only patch critical bugs."
validations:
required: true
- type: input
attributes:
label: Printer model
description: Creality Ender 3, Prusa mini, or Kossel Delta?
- type: input
attributes:
label: Electronics
description: Stock electronics, upgrade board, or something else?
- type: input
attributes:
label: Add-ons
description: Please list any hardware add-ons that could be involved.
- type: dropdown
attributes:
label: Bed Leveling
description: What kind of bed leveling compensation are you using?
options:
- UBL Bilinear mesh
- ABL Bilinear mesh
- ABL Linear grid
- ABL 3-point
- MBL Manual Bed Leveling
- No Bed Leveling
- type: dropdown
attributes:
label: Your Slicer
description: Do you use Slic3r, Prusa Slicer, Simplify3D, IdeaMaker...?
options:
- Slic3r
- Simplify3D
- Prusa Slicer
- IdeaMaker
- Cura
- Other (explain below)
- type: dropdown
attributes:
label: Host Software
description: Do you use OctoPrint, Repetier Host, Pronterface...?
options:
- SD Card (headless)
- Repetier Host
- OctoPrint
- Pronterface
- Cura
- Same as my slicer
- Other (explain below)
- type: markdown
attributes:
value: |
# Attachments
- type: checkboxes
attributes:
label: Don't forget to include
options:
- label: A ZIP file containing your `Configuration.h` and `Configuration_adv.h`.
required: true
- type: markdown
attributes:
value: |
### Optional items to include:
- 'Log output from the host. (`M111 S247` for maximum logging.)'
- Images or videos demonstrating the problem, if it helps to make it clear.
- A G-Code file that exposes the problem, if not affecting _all_ G-code.
- type: textarea
attributes:
label: Additional information & file uploads
description: >-
If you've made any other modifications to the firmware, please describe them in detail.
When pasting formatted text don't forget to put ` ``` ` (on its own line) before and after to make it readable.
+20
View File
@@ -0,0 +1,20 @@
blank_issues_enabled: false
contact_links:
- name: 📖 Marlin Documentation
url: https://marlinfw.org/
about: Lots of documentation on installing and using Marlin.
- name: 👤 MarlinFirmware Facebook group
url: https://www.facebook.com/groups/1049718498464482
about: Please ask and answer questions here.
- name: 🕹 Marlin on Discord
url: https://discord.gg/n5NJ59y
about: Join the Discord server for support and discussion.
- name: 🔗 Marlin Discussion Forum
url: https://reprap.org/forum/list.php?415
about: A searchable web forum hosted by RepRap dot org.
- name: 📺 Marlin Videos on YouTube
url: https://www.youtube.com/results?search_query=marlin+firmware
about: Tutorials and more from Marlin users all around the world. Great for new users!
- name: 💸 Want to donate?
url: https://www.thinkyhead.com/donate-to-marlin
about: Please take a look at the various options to support Marlin Firmware's development financially!
@@ -0,0 +1,44 @@
name: ✨ Request a feature
description: Request a new Marlin Firmware feature
title: "[FR] (feature summary)"
labels: 'T: Feature Request'
body:
- type: markdown
attributes:
value: >
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose).
- type: markdown
attributes:
value: >
**Thank you for requesting a new Marlin Firmware feature!**
## Before Requesting a Feature
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect.
- Check the latest [`bugfix-2.1.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip) to see if the feature already exists.
- Before you proceed with your request, please consider if it is necessary to make it into a firmware feature, or if it may be better suited for a slicer or host feature.
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear description of the problem (e.g., "I need X but Marlin can't do it [...]").
- type: textarea
attributes:
label: Are you looking for hardware support?
description: Tell us the printer, board, or peripheral that needs support.
- type: textarea
attributes:
label: Describe the feature you want
description: A clear description of the feature and how you think it should work.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
+10 -7
View File
@@ -34,8 +34,11 @@ This project and everyone participating in it is governed by the [Marlin Code of
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415)
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
- [Marlin Documentation](https://marlinfw.org) - Official Marlin documentation
- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/)
- RepRap.org [Marlin Forum](https://forums.reprap.org/list.php?415)
- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/)
- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube
If chat is more your speed, you can join the MarlinFirmware Discord server:
@@ -50,13 +53,13 @@ If chat is more your speed, you can join the MarlinFirmware Discord server:
This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster.
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE/bug_report.yml), the information it asks for helps us resolve issues faster.
> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888.
#### How Do I Submit A (Good) Bug Report?
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md).
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](ISSUE_TEMPLATE/bug_report.yml).
Explain the problem and include additional details to help maintainers reproduce the problem:
@@ -88,12 +91,12 @@ Include details about your configuration and environment:
This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed.
Before creating a suggestion, please check [this list](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aopen+is%3Aissue+label%3A%22T%3A+Feature+Request%22) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-feature-request). Fill in [the template](ISSUE_TEMPLATE/feature_request.yml), including the steps that you imagine you would take if the feature you're requesting existed.
#### Before Submitting a Feature Request
* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html).
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aopen+is%3Aissue+label%3A%22T%3A+Feature+Request%22)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
#### How Do I Submit A (Good) Feature Request?
@@ -116,7 +119,7 @@ Unsure where to begin contributing to Marlin? You can start by looking through t
### Pull Requests
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
Pull Requests should always be targeted to working branches (e.g., `bugfix-2.1.x` and/or `bugfix-1.1.x`) and never to release branches (e.g., `2.0.x` and/or `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
* Fill in [the required template](pull_request_template.md).
* Don't include issue numbers in the PR title.
-35
View File
@@ -1,35 +0,0 @@
<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead use one of the following options:
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
-->
### Description
<!-- Description of the bug or requested feature -->
### Steps to Reproduce
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
1. [First Step]
2. [Second Step]
3. [and so on...]
**Expected behavior:** [What you expect to happen]
**Actual behavior:** [What actually happens]
#### Additional Information
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
* Provide pictures or links to videos that clearly demonstrate the issue.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
+16 -6
View File
@@ -1,23 +1,33 @@
### Requirements
<!--
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
Submitting a Pull Request
- Please fill out all sections of this form. You can delete the helpful comments.
- Pull Requests without clear information will take longer and may even be rejected.
- We get a high volume of submissions so please be patient during review.
-->
### Description
<!--
We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
Clearly describe the submitted changes with lots of details. Include images where helpful. Initial reviewers may not be familiar with the subject, so be as thorough as possible. You can use MarkDown syntax to improve readability with bullet lists, code blocks, and so on. PREVIEW and fix up formatting before submitting.
-->
### Requirements
<!-- Does this PR require a specific board, LCD, etc.? -->
### Benefits
<!-- What does this fix or improve? -->
<!-- What does this PR fix or improve? -->
### Configurations
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
<!-- Attach Configurations ZIP and any other files needed to test this PR. -->
### Related Issues
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
<!-- Does this PR fix a bug or fulfill a Feature Request? Link related Issues here. -->
+59
View File
@@ -0,0 +1,59 @@
#
# bump-date.yml
# Bump the distribution date once per day
#
name: Bump Distribution Date
on:
schedule:
- cron: '0 */6 * * *'
jobs:
bump_date:
name: Bump Distribution Date
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out bugfix-2.1.x
uses: actions/checkout@v2
with:
ref: bugfix-2.1.x
- name: Bump Date (bugfix-2.0.x)
run: |
# Inline Bump Script
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
fi
exit 0
- name: Check out bugfix-2.1.x
uses: actions/checkout@v2
with:
ref: bugfix-2.1.x
- name: Bump Date (bugfix-2.1.x)
run: |
# Inline Bump Script
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
fi
exit 0
+34
View File
@@ -0,0 +1,34 @@
#
# check-pr.yml
# Close PRs directed at release branches
#
name: PR Bad Target
on:
pull_request_target:
types: [opened]
branches:
- 1.0.x
- 1.1.x
- 2.0.x
- 2.1.x
jobs:
bad_target:
name: PR Bad Target
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: >
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
Please redo this PR starting with the `bugfix-2.1.x` branch and be careful to target `bugfix-2.1.x` when resubmitting the PR. Patches may also target `bugfix-2.0.x` if they are specifically for 2.0.9.x.
It may help to set your fork's default branch to `bugfix-2.0.x`.
See [this page](https://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
+39
View File
@@ -0,0 +1,39 @@
#
# clean-closed.yml
# Remove obsolete labels when an Issue or PR is closed
#
name: Clean Closed
on:
pull_request:
types: [closed]
issues:
types: [closed]
jobs:
remove_label:
runs-on: ubuntu-latest
strategy:
matrix:
label:
- "S: Don't Merge"
- "S: Hold for 2.1"
- "S: Please Merge"
- "S: Please Test"
- "help wanted"
- "Needs: Discussion"
- "Needs: Documentation"
- "Needs: More Data"
- "Needs: Patch"
- "Needs: Testing"
- "Needs: Work"
steps:
- uses: actions/checkout@v2
- name: Remove Labels
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ github.token }}
labels: ${{ matrix.label }}
+28
View File
@@ -0,0 +1,28 @@
#
# close-stale.yml
# Close open issues after a period of inactivity
#
name: Close Stale Issues
on:
schedule:
- cron: "22 1 * * *"
jobs:
stale:
name: Close Stale Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.'
days-before-stale: 60
days-before-close: 10
stale-issue-label: 'stale-closing-soon'
exempt-all-assignees: true
exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: More Data,Needs: Discussion,Needs: Documentation,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking'
+32
View File
@@ -0,0 +1,32 @@
#
# lock-closed.yml
# Lock closed issues after a period of inactivity
#
name: Lock Closed Issues
on:
schedule:
- cron: '0 1/13 * * *'
jobs:
lock:
name: Lock Closed Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
process-only: 'issues'
issue-lock-inactive-days: '60'
issue-exclude-created-before: ''
issue-exclude-labels: 'no-locking'
issue-lock-labels: ''
issue-lock-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
issue-lock-reason: ''
+16 -9
View File
@@ -8,7 +8,7 @@ name: CI
on:
pull_request:
branches:
- bugfix-2.0.x
- bugfix-2.1.x
paths-ignore:
- config/**
- data/**
@@ -16,7 +16,7 @@ on:
- '**/*.md'
push:
branches:
- bugfix-2.0.x
- bugfix-2.1.x
paths-ignore:
- config/**
- data/**
@@ -45,6 +45,7 @@ jobs:
- teensy35
- teensy41
- SAMD51_grandcentral_m4
- PANDA_PI_V29
# Extended AVR Environments
@@ -59,13 +60,13 @@ jobs:
#- STM32F103RC_btt_maple
- STM32F103RC_btt_USB_maple
- STM32F103RC_fysetc_maple
- STM32F103RC_meeb
- STM32F103RC_meeb_maple
- jgaurora_a5s_a1_maple
- STM32F103VE_longer_maple
#- mks_robin_maple
- mks_robin_lite_maple
- mks_robin_pro_maple
#- mks_robin_nano35_maple
#- mks_robin_nano_v1v2_maple
#- STM32F103RE_creality_maple
- STM32F103VE_ZM3E4V2_USB_maple
@@ -76,9 +77,9 @@ jobs:
- STM32F103RE_btt
- STM32F103RE_btt_USB
- STM32F103RE_creality
- STM32F401RC_creality
- STM32F103VE_longer
- STM32F407VE_black
- STM32F401VE_STEVAL
- BIGTREE_BTT002
- BIGTREE_SKR_PRO
- BIGTREE_GTR_V1_0
@@ -92,12 +93,17 @@ jobs:
- rumba32
- LERDGEX
- LERDGEK
- mks_robin_nano35
- mks_robin_nano_v1v2
#- mks_robin_nano_v1v2_usbmod
#- mks_robin_nano_v1_3_f4_usbmod
- NUCLEO_F767ZI
- REMRAM_V1
- BTT_SKR_SE_BX
- chitu_f103
- Index_Mobo_Rev03
- Opulo_Lumen_REV3
# ESP32 environments
- mks_tinybee
# Put lengthy tests last
@@ -137,8 +143,9 @@ jobs:
- name: Install PlatformIO
run: |
pip install -U https://github.com/platformio/platformio-core/archive/v5.2.5.zip
platformio update
pip install -U platformio
pio upgrade --dev
pio pkg update --global
- name: Run ${{ matrix.test-platform }} Tests
run: |
+22
View File
@@ -0,0 +1,22 @@
#
# unlock-reopened.yml
# Unlock an issue whenever it is re-opened
#
name: "Unlock reopened issue"
on:
issues:
types: [reopened]
jobs:
unlock:
name: Unlock Reopened
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: OSDKDev/unlock-issues@v1.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+1
View File
@@ -147,6 +147,7 @@ vc-fileutils.settings
imgui.ini
eeprom.dat
spi_flash.bin
fs.img
#cmake
CMakeLists.txt
+2 -2
View File
@@ -27,7 +27,7 @@ tests-single-ci:
tests-single-local:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
.PHONY: tests-single-local
@@ -38,7 +38,7 @@ tests-single-local-docker:
.PHONY: tests-single-local-docker
tests-all-local:
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
.PHONY: tests-all-local
+396 -157
View File
@@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 02010000
#define CONFIGURATION_H_VERSION 02010200
//===========================================================================
//============================= Getting Started =============================
@@ -57,15 +57,6 @@
* https://www.thingiverse.com/thing:1278865
*/
//===========================================================================
//========================== DELTA / SCARA / TPARA ==========================
//===========================================================================
//
// Download configurations from the link above and customize for your machine.
// Examples are located in config/examples/delta, .../SCARA, and .../TPARA.
//
//===========================================================================
// @section info
// Author info of this build printed to the host during boot and M115
@@ -121,6 +112,7 @@
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
//#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate
/**
@@ -129,7 +121,7 @@
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
//#define BAUDRATE_2 250000 // Enable to override BAUDRATE
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
/**
* Select a third serial port on the board to use for communication with the host.
@@ -137,7 +129,7 @@
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_3 1
//#define BAUDRATE_3 250000 // Enable to override BAUDRATE
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH
@@ -149,21 +141,45 @@
// Choose your own or use a service like https://www.uuidgenerator.net/version4
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section stepper drivers
/**
* Define the number of coordinated axes.
* See https://github.com/DerAndere1/Marlin/wiki
* Each axis gets its own stepper control and endstop:
* Stepper Drivers
*
* Steppers: *_STEP_PIN, *_ENABLE_PIN, *_DIR_PIN, *_ENABLE_ON
* Endstops: *_STOP_PIN, USE_*MIN_PLUG, USE_*MAX_PLUG
* Axes: *_MIN_POS, *_MAX_POS, INVERT_*_DIR
* Planner: DEFAULT_AXIS_STEPS_PER_UNIT, DEFAULT_MAX_FEEDRATE
* DEFAULT_MAX_ACCELERATION, AXIS_RELATIVE_MODES,
* MICROSTEP_MODES, MANUAL_FEEDRATE
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
*
* :[3, 4, 5, 6, 7, 8, 9]
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
*
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
//#define NUM_AXES 3
#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 Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988
//#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988
//#define W_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
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988
/**
* Additional Axis Settings
@@ -182,27 +198,27 @@
*
* Regardless of these settings the axes are internally named I, J, K, U, V, W.
*/
#if NUM_AXES >= 4
#ifdef I_DRIVER_TYPE
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
#define AXIS4_ROTATES
#endif
#if NUM_AXES >= 5
#ifdef J_DRIVER_TYPE
#define AXIS5_NAME 'B' // :['B', 'C', 'U', 'V', 'W']
#define AXIS5_ROTATES
#endif
#if NUM_AXES >= 6
#ifdef K_DRIVER_TYPE
#define AXIS6_NAME 'C' // :['C', 'U', 'V', 'W']
#define AXIS6_ROTATES
#endif
#if NUM_AXES >= 7
#ifdef U_DRIVER_TYPE
#define AXIS7_NAME 'U' // :['U', 'V', 'W']
//#define AXIS7_ROTATES
#endif
#if NUM_AXES >= 8
#ifdef V_DRIVER_TYPE
#define AXIS8_NAME 'V' // :['V', 'W']
//#define AXIS8_ROTATES
#endif
#if NUM_AXES >= 9
#ifdef W_DRIVER_TYPE
#define AXIS9_NAME 'W' // :['W']
//#define AXIS9_ROTATES
#endif
@@ -226,6 +242,8 @@
//#define SINGLENOZZLE_STANDBY_FAN
#endif
// @section multi-material
/**
* Multi-Material Unit
* Set to one of these predefined models:
@@ -238,6 +256,7 @@
*
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
* See additional options in Configuration_adv.h.
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
*/
//#define MMU_MODEL PRUSA_MMU2
@@ -257,6 +276,7 @@
#define SWITCHING_NOZZLE_SERVO_NR 0
//#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
#endif
/**
@@ -373,7 +393,7 @@
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
// @section machine
// @section psu control
/**
* Power Supply Control
@@ -476,7 +496,7 @@
* 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950
* 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950
* 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950
* 66 : 4.7MΩ Dyze Design High Temperature Thermistor
* 66 : 4.7MΩ Dyze Design / Trianglelab T-D500 500°C High Temperature Thermistor
* 67 : 500kΩ SliceEngineering 450°C Thermistor
* 68 : PT100 amplifier board from Dyze Design
* 70 : 100kΩ bq Hephestos 2
@@ -498,6 +518,7 @@
* 110 : Pt100 with 1kΩ pullup (atypical)
* 147 : Pt100 with 4.7kΩ pullup
* 1010 : Pt1000 with 1kΩ pullup (atypical)
* 1022 : Pt1000 with 2.2kΩ pullup
* 1047 : Pt1000 with 4.7kΩ pullup (E3D)
* 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage.
* NOTE: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21.
@@ -535,22 +556,32 @@
#define DUMMY_THERMISTOR_999_VALUE 100
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
//#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
//#define MAX31865_SENSOR_OHMS_1 100
//#define MAX31865_CALIBRATION_OHMS_1 430
#if TEMP_SENSOR_IS_MAX_TC(0)
#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
#endif
#if TEMP_SENSOR_IS_MAX_TC(1)
#define MAX31865_SENSOR_OHMS_1 100
#define MAX31865_CALIBRATION_OHMS_1 430
#endif
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#if HAS_E_TEMP_SENSOR
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#if TEMP_SENSOR_BED
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif
#define TEMP_CHAMBER_RESIDENCY_TIME 10 // (seconds) Time to wait for chamber to "settle" in M191
#define TEMP_CHAMBER_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#if TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_RESIDENCY_TIME 10 // (seconds) Time to wait for chamber to "settle" in M191
#define TEMP_CHAMBER_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif
/**
* Redundant Temperature Sensor (TEMP_SENSOR_REDUNDANT)
@@ -609,6 +640,8 @@
//============================= PID Settings ================================
//===========================================================================
// @section hotend temp
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model.
// temperature control. Disable both for bang-bang heating.
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
@@ -619,8 +652,9 @@
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
//#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with G-code: M301 E[extruder number, 0-2]
#if ENABLED(PID_PARAMS_PER_HOTEND)
// Specify up to one value per hotend here, according to your setup.
@@ -640,9 +674,13 @@
*
* Use a physical model of the hotend to control temperature. When configured correctly
* this gives better responsiveness and stability than PID and it also removes the need
* for PID_EXTRUSION_SCALING and PID_FAN_SCALING. Use M306 to autotune the model.
* for PID_EXTRUSION_SCALING and PID_FAN_SCALING. Use M306 T to autotune the model.
* @section mpctemp
*/
#if ENABLED(MPCTEMP)
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash)
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
#define MPC_MAX BANG_MAX // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
@@ -662,15 +700,16 @@
//#define MPC_FAN_0_ACTIVE_HOTEND
#endif
#define FILAMENT_HEAT_CAPACITY_PERMM 5.6e-3f // 0.0056 J/K/mm for 1.75mm PLA (0.0149 J/K/mm for 2.85mm PLA).
//#define FILAMENT_HEAT_CAPACITY_PERMM 3.6e-3f // 0.0036 J/K/mm for 1.75mm PETG (0.0094 J/K/mm for 2.85mm PETG).
#define FILAMENT_HEAT_CAPACITY_PERMM { 5.6e-3f } // 0.0056 J/K/mm for 1.75mm PLA (0.0149 J/K/mm for 2.85mm PLA).
//#define FILAMENT_HEAT_CAPACITY_PERMM { 3.6e-3f } // 0.0036 J/K/mm for 1.75mm PETG (0.0094 J/K/mm for 2.85mm PETG).
// Advanced options
#define MPC_SMOOTHING_FACTOR 0.5f // (0.0...1.0) Noisy temperature sensors may need a lower value for stabilization.
#define MPC_MIN_AMBIENT_CHANGE 1.0f // (K/s) Modeled ambient temperature rate of change, when correcting model inaccuracies.
#define MPC_STEADYSTATE 0.5f // (K/s) Temperature change rate for steady state logic to be enforced.
#define MPC_TUNING_POS { X_CENTER, Y_CENTER, 1.0f } // (mm) M306 Autotuning position, ideally bed center just above the surface.
#define MPC_TUNING_POS { X_CENTER, Y_CENTER, 1.0f } // (mm) M306 Autotuning position, ideally bed center at first layer height.
#define MPC_TUNING_END_Z 10.0f // (mm) M306 Autotuning final Z position.
#endif
//===========================================================================
@@ -689,6 +728,7 @@
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
* @section bed temp
*/
//#define PIDTEMPBED
@@ -704,7 +744,7 @@
#if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Sends debug data to the serial port.
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
@@ -732,6 +772,7 @@
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 200W
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use chamber PID until someone else verifies that your hardware works.
* @section chamber temp
*/
//#define PIDTEMPCHAMBER
//#define CHAMBER_LIMIT_SWITCHING
@@ -746,7 +787,7 @@
#if ENABLED(PIDTEMPCHAMBER)
#define MIN_CHAMBER_POWER 0
//#define PID_CHAMBER_DEBUG // Sends debug data to the serial port.
//#define PID_CHAMBER_DEBUG // Print Chamber PID debug data to the serial port.
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
// and placed inside the small Creality printer enclosure tent.
@@ -760,17 +801,16 @@
#endif // PIDTEMPCHAMBER
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
//#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
#endif
// @section extruder
// @section safety
/**
* Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
@@ -838,11 +878,154 @@
#define POLAR_SEGMENTS_PER_SECOND 5
#endif
// @section delta
// Enable for DELTA kinematics and configure below
//#define DELTA
#if ENABLED(DELTA)
// Make delta curves from many straight lines (linear interpolation).
// This is a trade-off between visible corners (not enough segments)
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 200
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
// Delta calibration menu
// uncomment to add three points calibration menu option.
// See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU
// uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION
// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
#endif
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
// Set the steprate for papertest probing
#define PROBE_MANUALLY_STEP 0.05 // (mm)
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 // (mm)
// Maximum reachable area
#define DELTA_MAX_RADIUS 140.0 // (mm)
// Center-to-center distance of the holes in the diagonal push rods.
#define DELTA_DIAGONAL_ROD 250.0 // (mm)
// Distance between bed and nozzle Z home position
#define DELTA_HEIGHT 250.00 // (mm) Get this value from G33 auto calibrate
#define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate
// Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS 124.0 // (mm) Get this value from G33 auto calibrate
// Trim adjustments for individual towers
// tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
// measured in degrees anticlockwise looking from above the printer
#define DELTA_TOWER_ANGLE_TRIM { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate
// Delta radius and diagonal rod adjustments (mm)
//#define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 }
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 }
#endif
// @section scara
/**
* MORGAN_SCARA was developed by QHARLEY in South Africa in 2012-2013.
* Implemented and slightly reworked by JCERNY in June, 2014.
*
* Mostly Printed SCARA is an open source design by Tyler Williams. See:
* https://www.thingiverse.com/thing:2487048
* https://www.thingiverse.com/thing:1241491
*/
//#define MORGAN_SCARA
//#define MP_SCARA
#if EITHER(MORGAN_SCARA, MP_SCARA)
// If movement is choppy try lowering this value
#define SCARA_SEGMENTS_PER_SECOND 200
// Length of inner and outer support arms. Measure arm lengths precisely.
#define SCARA_LINKAGE_1 150 // (mm)
#define SCARA_LINKAGE_2 150 // (mm)
// SCARA tower offset (position of Tower relative to bed zero position)
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
#define SCARA_OFFSET_X 100 // (mm)
#define SCARA_OFFSET_Y -56 // (mm)
#if ENABLED(MORGAN_SCARA)
//#define DEBUG_SCARA_KINEMATICS
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
#elif ENABLED(MP_SCARA)
#define SCARA_OFFSET_THETA1 12 // degrees
#define SCARA_OFFSET_THETA2 131 // degrees
#endif
#endif
// @section tpara
// Enable for TPARA kinematics and configure below
//#define AXEL_TPARA
#if ENABLED(AXEL_TPARA)
#define DEBUG_ROBOT_KINEMATICS
#define ROBOT_SEGMENTS_PER_SECOND 200
// Length of inner and outer support arms. Measure arm lengths precisely.
#define ROBOT_LINKAGE_1 120 // (mm)
#define ROBOT_LINKAGE_2 120 // (mm)
// SCARA tower offset (position of Tower relative to bed zero position)
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
#define ROBOT_OFFSET_X 0 // (mm)
#define ROBOT_OFFSET_Y 0 // (mm)
#define ROBOT_OFFSET_Z 0 // (mm)
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
// Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
#define THETA_HOMING_OFFSET 0
#define PSI_HOMING_OFFSET 0
#endif
// @section machine
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
//#define ARTICULATED_ROBOT_ARM
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
//#define FOAMCUTTER_XYUV
//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================
// @section homing
// @section endstops
// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
@@ -937,47 +1120,6 @@
#define W_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.
/**
* Stepper Drivers
*
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
*
* A4988 is assumed for unspecified drivers.
*
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
*
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
* TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
#define X_DRIVER_TYPE A4988
#define Y_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE A4988
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988
//#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988
//#define W_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
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_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
@@ -1231,6 +1373,27 @@
#define Z_PROBE_RETRACT_X X_MAX_POS
#endif
/**
* Magnetically Mounted Probe
* For probes such as Euclid, Klicky, Klackender, etc.
*/
//#define MAG_MOUNTED_PROBE
#if ENABLED(MAG_MOUNTED_PROBE)
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 245, 114, 20 } } // Move to dock
#define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 245, 114, 0 } } // Place probe beside remover
#define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 230, 114, 0 } } // Side move to remove probe
#define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 210, 114, 20 } } // Side move to remove probe
#define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#endif
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
// When the pin is defined you can use M672 to set/reset the probe sensitivity.
//#define DUET_SMART_EFFECTOR
@@ -1246,9 +1409,37 @@
*/
//#define SENSORLESS_PROBING
//
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
//
/**
* Allen key retractable z-probe as seen on many Kossel delta printers - https://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
* Deploys by touching z-axis belt. Retracts by pushing the probe down.
*/
//#define Z_PROBE_ALLEN_KEY
#if ENABLED(Z_PROBE_ALLEN_KEY)
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10
#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_FEEDRATE)/10
#define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_FEEDRATE
#endif // Z_PROBE_ALLEN_KEY
/**
* Nozzle-to-Probe offsets { X, Y, Z }
@@ -1444,7 +1635,7 @@
#define DISABLE_E false // Disable the extruder when not stepping
#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
// @section machine
// @section motion
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
@@ -1498,7 +1689,7 @@
//#define V_HOME_DIR -1
//#define W_HOME_DIR -1
// @section machine
// @section geometry
// The size of the printable area
#define X_BED_SIZE 200
@@ -1701,6 +1892,15 @@
#define LEVELING_BED_TEMP 50
#endif
/**
* Bed Distance Sensor
*
* Measures the distance from bed to nozzle with accuracy of 0.01mm.
* For information about this sensor https://github.com/markniu/Bed_Distance_sensor
* Uses I2C port, so it requires I2C library markyue/Panda_SoftMasterI2C.
*/
//#define BD_SENSOR
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
@@ -1820,18 +2020,18 @@
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
//#define LCD_BED_TRAMMING
#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
//#define LEVEL_CORNERS_USE_PROBE
#if ENABLED(LEVEL_CORNERS_USE_PROBE)
#define LEVEL_CORNERS_PROBE_TOLERANCE 0.1
#define LEVEL_CORNERS_VERIFY_RAISED // After adjustment triggers the probe, re-probe to verify
//#define LEVEL_CORNERS_AUDIO_FEEDBACK
#if ENABLED(LCD_BED_TRAMMING)
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
//#define BED_TRAMMING_USE_PROBE
#if ENABLED(BED_TRAMMING_USE_PROBE)
#define BED_TRAMMING_PROBE_TOLERANCE 0.1 // (mm)
#define BED_TRAMMING_VERIFY_RAISED // After adjustment triggers the probe, re-probe to verify
//#define BED_TRAMMING_AUDIO_FEEDBACK
#endif
/**
@@ -1851,7 +2051,7 @@
* | 1 2 | | 1 4 | | 1 2 | | 2 |
* LF --------- RF LF --------- RF LF --------- RF LF --------- RF
*/
#define LEVEL_CORNERS_LEVELING_ORDER { LF, RF, RB, LB }
#define BED_TRAMMING_LEVELING_ORDER { LF, RF, RB, LB }
#endif
/**
@@ -1935,9 +2135,8 @@
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
// Or, set the XY skew factor directly:
//#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
@@ -1946,8 +2145,10 @@
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
// Or, set the Z skew factors directly:
//#define XZ_SKEW_FACTOR 0.0
//#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
@@ -1958,7 +2159,7 @@
//============================= Additional Features ===========================
//=============================================================================
// @section extras
// @section eeprom
/**
* EEPROM
@@ -1970,7 +2171,7 @@
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
//#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
@@ -1978,6 +2179,8 @@
//#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
#endif
// @section host
//
// Host Keepalive
//
@@ -1988,6 +2191,8 @@
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
// @section units
//
// G20/G21 Inch mode support
//
@@ -2001,7 +2206,7 @@
// @section temperature
//
// Preheat Constants - Up to 5 are supported without changes
// Preheat Constants - Up to 10 are supported without changes
//
#define PREHEAT_1_LABEL "PLA"
#define PREHEAT_1_TEMP_HOTEND 180
@@ -2015,6 +2220,8 @@
#define PREHEAT_2_TEMP_CHAMBER 35
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
// @section motion
/**
* Nozzle Park
*
@@ -2113,6 +2320,8 @@
#endif
// @section host
/**
* Print Job Timer
*
@@ -2139,6 +2348,8 @@
*/
#define PRINTJOB_TIMER_AUTOSTART
// @section stats
/**
* Print Counter
*
@@ -2153,9 +2364,11 @@
*/
//#define PRINTCOUNTER
#if ENABLED(PRINTCOUNTER)
#define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print
#define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print.
#endif
// @section security
/**
* Password
*
@@ -2191,7 +2404,7 @@
//============================= LCD and SD support ============================
//=============================================================================
// @section lcd
// @section interface
/**
* LCD LANGUAGE
@@ -2307,6 +2520,16 @@
//
//#define REVERSE_SELECT_DIRECTION
//
// Encoder EMI Noise Filter
//
// This option increases encoder samples to filter out phantom encoder clicks caused by EMI noise.
//
//#define ENCODER_NOISE_FILTER
#if ENABLED(ENCODER_NOISE_FILTER)
#define ENCODER_SAMPLES 10
#endif
//
// Individual Axis Homing
//
@@ -2337,6 +2560,7 @@
//======================== LCD / Controller Selection =========================
//======================== (Character-based LCDs) =========================
//=============================================================================
// @section lcd
//
// RepRapDiscount Smart Controller.
@@ -2638,6 +2862,12 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
//
// eMotion Tech LCD with SD
// https://www.reprap-france.com/produit/1234568748-ecran-graphique-128-x-64-points-2-1
//
//#define EMOTION_TECH_LCD
//=============================================================================
//============================== OLED Displays ==============================
//=============================================================================
@@ -2746,9 +2976,6 @@
// Touch-screen LCD for Malyan M200/M300 printers
//
//#define MALYAN_LCD
#if ENABLED(MALYAN_LCD)
#define LCD_SERIAL_PORT 1 // Default is 1 for Malyan M200
#endif
//
// Touch UI for FTDI EVE (FT800/FT810) displays
@@ -2762,17 +2989,14 @@
//#define ANYCUBIC_LCD_I3MEGA
//#define ANYCUBIC_LCD_CHIRON
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
#define LCD_SERIAL_PORT 3 // Default is 3 for Anycubic
//#define ANYCUBIC_LCD_DEBUG
//#define ANYCUBIC_LCD_GCODE_EXT // Add ".gcode" to menu entries for DGUS clone compatibility
#endif
//
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
//
//#define NEXTION_TFT
#if ENABLED(NEXTION_TFT)
#define LCD_SERIAL_PORT 1 // Default is 1 for Nextion
#endif
//
// Third-party or vendor-customized controller interfaces.
@@ -2934,10 +3158,11 @@
//
//#define TOUCH_SCREEN
#if ENABLED(TOUCH_SCREEN)
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
//#define TOUCH_IDLE_SLEEP 300 // (s) Turn off the TFT backlight if set (5mn)
//#define DISABLE_ENCODER // Disable the click encoder, if any
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
#define TOUCH_SCREEN_CALIBRATION
@@ -2972,7 +3197,7 @@
//=============================== Extra Features ==============================
//=============================================================================
// @section extras
// @section fans
// Set number of user-controlled fans. Disable to use all board-defined fans.
// :[1,2,3,4,5,6,7,8]
@@ -2996,14 +3221,18 @@
// duty cycle is attained.
//#define SOFT_PWM_DITHER
// @section extras
// Support for the BariCUDA Paste Extruder
//#define BARICUDA
// @section lights
// Temperature status LEDs that display the hotend and bed temperature.
// If all hotends, bed temperature, and target temperature are under 54C
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
//#define TEMP_STAT_LEDS
// Support for the BariCUDA Paste Extruder
//#define BARICUDA
// Support for BlinkM/CyzRgb
//#define BLINKM
@@ -3024,16 +3253,19 @@
* luminance values can be set from 0 to 255.
* For NeoPixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
* === CAUTION ===
* 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
* more current than the Arduino 5V linear regulator can produce.
* *** CAUTION ***
*
* LED Type. Enable only one of the following two options.
* Requires PWM frequency between 50 <> 100Hz (Check HAL or variant)
* Use FAST_PWM_FAN, if possible, to reduce fan noise.
*/
// LED Type. Enable only one of the following two options:
//#define RGB_LED
//#define RGBW_LED
@@ -3042,35 +3274,40 @@
//#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35
//#define RGB_LED_W_PIN -1
//#define RGB_STARTUP_TEST // For PWM pins, fade between all colors
#if ENABLED(RGB_STARTUP_TEST)
#define RGB_STARTUP_TEST_INNER_MS 10 // (ms) Reduce or increase fading speed
#endif
#endif
// Support for Adafruit NeoPixel LED driver
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
//#define NEOPIXEL_PIN 4 // LED driving pin
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
//#define NEOPIXEL2_PIN 5
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc.
// See https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h
//#define NEOPIXEL_PIN 4 // LED driving pin
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
//#define NEOPIXEL2_PIN 5
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
// Support for second Adafruit NeoPixel LED driver controlled with M150 S1 ...
//#define NEOPIXEL2_SEPARATE
#if ENABLED(NEOPIXEL2_SEPARATE)
#define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip
#define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255)
#define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup
#define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip
#define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255)
#define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup
#else
//#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
//#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
#endif
// Use some of the NeoPixel LEDs for static (background) lighting
//#define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED
//#define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED
//#define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED
//#define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED
//#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
//#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off
//#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off
#endif
/**
@@ -3088,6 +3325,8 @@
#define PRINTER_EVENT_LEDS
#endif
// @section servos
/**
* Number of servos
*
+376 -523
View File
File diff suppressed because it is too large Load Diff
+6 -119
View File
@@ -109,7 +109,7 @@ LIQUID_TWI2 ?= 0
# This defines if Wire is needed
WIRE ?= 0
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
# This defines if Tone is needed (i.e., SPEAKER is defined in Configuration.h)
# Disabling this (and SPEAKER) saves approximately 350 bytes of memory.
TONE ?= 1
@@ -317,123 +317,10 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1159)
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
# 3Drag Controller
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
# Velleman K8200 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
# Velleman K8400 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
# Velleman K8600 Controller (Vertex Nano)
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
# Velleman K8800 Controller (Vertex Delta)
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
# 2PrintBeta BAM&DICE with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
# 2PrintBeta BAM&DICE Due with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
# MKS BASE v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
# MKS v1.4 with A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
# MKS v1.5 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
# MKS v1.6 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
# MKS GEN v1.3 or 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
# MKS GEN L
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
# zrib V2.0 control board (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
# BigTreeTech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
# Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
# Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
# Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
# Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
MCU ?= atmega1280
PROG_MCU ?= m1280
# Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
# Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
# Raise3D Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
# Rapide Lite RL200 Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
# Formbot T-Rex 2 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
# Formbot T-Rex 3
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
# Formbot Raptor
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
# Formbot Raptor 2
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
# bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# TriGorilla Anycubic version 1.4 Rev 1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Creality: CR10S, CR20, CR-X
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
# Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
# FYSETC F6 1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# FYSETC F6 1.5
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# VORON
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# TRONXY V3 1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
# MKS GEN L V2.1
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
# Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
# Ortur 4
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
# Tenlog D3 Hero
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
# Zonestar zrib V5.3 (Chinese RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
# Pxmalion Core I3
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
#
# RAMBo and derivatives
@@ -512,7 +399,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1324)
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
# Intamsys 4.0 (Funmat HT)
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
# Malyan M180 Mainboard Version 2 (no display function, direct gcode only)
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
# Geeetech GT2560 Rev B for A20(M/T/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
+2 -2
View File
@@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
//#define SHORT_BUILD_VERSION "bugfix-2.1.x"
/**
* Verbose version identifier which should contain a reference to the location
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2022-04-05"
//#define STRING_DISTRIBUTION_DATE "2022-10-16"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
+211
View File
@@ -0,0 +1,211 @@
#
# Marlin Firmware
# config.ini - Options to apply before the build
#
[config:base]
ini_use_config = none
# Load all config: sections in this file
;ini_use_config = all
# Load config file relative to Marlin/
;ini_use_config = another.ini
# Download configurations from GitHub
;ini_use_config = example/Creality/Ender-5 Plus @ bugfix-2.1.x
# Download configurations from your server
;ini_use_config = https://me.myserver.com/path/to/configs
# Evaluate config:base and do a config dump
;ini_use_config = base
;config_export = 2
[config:minimal]
motherboard = BOARD_RAMPS_14_EFB
serial_port = 0
baudrate = 250000
use_watchdog = on
thermal_protection_hotends = on
thermal_protection_hysteresis = 4
thermal_protection_period = 40
bufsize = 4
block_buffer_size = 16
max_cmd_size = 96
extruders = 1
temp_sensor_0 = 1
temp_hysteresis = 3
heater_0_mintemp = 5
heater_0_maxtemp = 275
preheat_1_temp_hotend = 180
bang_max = 255
pidtemp = on
pid_k1 = 0.95
pid_max = BANG_MAX
pid_functional_range = 10
default_kp = 22.20
default_ki = 1.08
default_kd = 114.00
x_driver_type = A4988
y_driver_type = A4988
z_driver_type = A4988
e0_driver_type = A4988
x_bed_size = 200
x_min_pos = 0
x_max_pos = X_BED_SIZE
y_bed_size = 200
y_min_pos = 0
y_max_pos = Y_BED_SIZE
z_min_pos = 0
z_max_pos = 200
x_home_dir = -1
y_home_dir = -1
z_home_dir = -1
use_xmin_plug = on
use_ymin_plug = on
use_zmin_plug = on
x_min_endstop_inverting = false
y_min_endstop_inverting = false
z_min_endstop_inverting = false
default_axis_steps_per_unit = { 80, 80, 400, 500 }
axis_relative_modes = { false, false, false, false }
default_max_feedrate = { 300, 300, 5, 25 }
default_max_acceleration = { 3000, 3000, 100, 10000 }
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
homing_bump_divisor = { 2, 2, 4 }
x_enable_on = 0
y_enable_on = 0
z_enable_on = 0
e_enable_on = 0
invert_x_dir = false
invert_y_dir = true
invert_z_dir = false
invert_e0_dir = false
invert_e_step_pin = false
invert_x_step_pin = false
invert_y_step_pin = false
invert_z_step_pin = false
disable_x = false
disable_y = false
disable_z = false
disable_e = false
proportional_font_ratio = 1.0
default_nominal_filament_dia = 1.75
junction_deviation_mm = 0.013
default_acceleration = 3000
default_travel_acceleration = 3000
default_retract_acceleration = 3000
default_minimumfeedrate = 0.0
default_mintravelfeedrate = 0.0
minimum_planner_speed = 0.05
min_steps_per_segment = 6
default_minsegmenttime = 20000
[config:basic]
bed_overshoot = 10
busy_while_heating = on
default_ejerk = 5.0
default_keepalive_interval = 2
default_leveling_fade_height = 0.0
disable_inactive_extruder = on
display_charset_hd44780 = JAPANESE
eeprom_boot_silent = on
eeprom_chitchat = on
endstoppullups = on
extrude_maxlength = 200
extrude_mintemp = 170
host_keepalive_feature = on
hotend_overshoot = 15
jd_handle_small_segments = on
lcd_info_screen_style = 0
lcd_language = en
max_bed_power = 255
mesh_inset = 0
min_software_endstops = on
max_software_endstops = on
min_software_endstop_x = on
min_software_endstop_y = on
min_software_endstop_z = on
max_software_endstop_x = on
max_software_endstop_y = on
max_software_endstop_z = on
preheat_1_fan_speed = 0
preheat_1_label = "PLA"
preheat_1_temp_bed = 70
prevent_cold_extrusion = on
prevent_lengthy_extrude = on
printjob_timer_autostart = on
probing_margin = 10
show_bootscreen = on
soft_pwm_scale = 0
string_config_h_author = "(none, default config)"
temp_bed_hysteresis = 3
temp_bed_residency_time = 10
temp_bed_window = 1
temp_residency_time = 10
temp_window = 1
validate_homing_endstops = on
xy_probe_feedrate = (133*60)
z_clearance_between_probes = 5
z_clearance_deploy_probe = 10
z_clearance_multi_probe = 5
[config:advanced]
arc_support = on
auto_report_temperatures = on
autotemp = on
autotemp_oldweight = 0.98
bed_check_interval = 5000
default_stepper_deactive_time = 120
default_volumetric_extruder_limit = 0.00
disable_inactive_e = true
disable_inactive_x = true
disable_inactive_y = true
disable_inactive_z = true
e0_auto_fan_pin = -1
encoder_100x_steps_per_sec = 80
encoder_10x_steps_per_sec = 30
encoder_rate_multiplier = on
extended_capabilities_report = on
extruder_auto_fan_speed = 255
extruder_auto_fan_temperature = 50
fanmux0_pin = -1
fanmux1_pin = -1
fanmux2_pin = -1
faster_gcode_parser = on
homing_bump_mm = { 5, 5, 2 }
max_arc_segment_mm = 1.0
min_arc_segment_mm = 0.1
min_circle_segments = 72
n_arc_correction = 25
serial_overrun_protection = on
slowdown = on
slowdown_divisor = 2
temp_sensor_bed = 0
thermal_protection_bed_hysteresis = 2
thermocouple_max_errors = 15
tx_buffer_size = 0
watch_bed_temp_increase = 2
watch_bed_temp_period = 60
watch_temp_increase = 2
watch_temp_period = 20
+57
View File
@@ -23,6 +23,7 @@
#include "../../inc/MarlinConfig.h"
#include "HAL.h"
#include <avr/wdt.h>
#ifdef USBCON
DefaultSerial1 MSerial0(false, Serial);
@@ -88,6 +89,62 @@ void MarlinHAL::reboot() {
#endif
}
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#include <avr/wdt.h>
#include "../../MarlinCore.h"
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
void MarlinHAL::watchdog_init() {
#if ENABLED(WATCHDOG_DURATION_8S) && defined(WDTO_8S)
#define WDTO_NS WDTO_8S
#else
#define WDTO_NS WDTO_4S
#endif
#if ENABLED(WATCHDOG_RESET_MANUAL)
// Enable the watchdog timer, but only for the interrupt.
// Take care, as this requires the correct order of operation, with interrupts disabled.
// See the datasheet of any AVR chip for details.
wdt_reset();
cli();
_WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE);
_WD_CONTROL_REG = _BV(WDIE) | (WDTO_NS & 0x07) | ((WDTO_NS & 0x08) << 2); // WDTO_NS directly does not work. bit 0-2 are consecutive in the register but the highest value bit is at bit 5
// So worked for up to WDTO_2S
sei();
wdt_reset();
#else
wdt_enable(WDTO_NS); // The function handles the upper bit correct.
#endif
//delay(10000); // test it!
}
//===========================================================================
//=================================== ISR ===================================
//===========================================================================
// Watchdog timer interrupt, called if main program blocks >4sec and manual reset is enabled.
#if ENABLED(WATCHDOG_RESET_MANUAL)
ISR(WDT_vect) {
sei(); // With the interrupt driven serial we need to allow interrupts.
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
minkill(); // interrupt-safe final kill and infinite loop
}
#endif
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or AVR will go into emergency procedures.
void MarlinHAL::watchdog_refresh() { wdt_reset(); }
#endif // USE_WATCHDOG
// ------------------------
// Free Memory Accessor
// ------------------------
#if ENABLED(SDSUPPORT)
#include "../../sd/SdFatUtil.h"
+9 -3
View File
@@ -19,16 +19,18 @@
*/
#pragma once
/**
* HAL for Arduino AVR
*/
#include "../shared/Marduino.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "math.h"
#ifdef USBCON
#include <HardwareSerial.h>
#else
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
#include "MarlinSerial.h"
#endif
@@ -164,7 +166,7 @@ typedef Servo hal_servo_t;
#define strtof strtod
// ------------------------
// Class Utilities
// Free Memory Accessor
// ------------------------
#pragma GCC diagnostic push
@@ -186,6 +188,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
+102 -92
View File
@@ -66,27 +66,26 @@ static volatile int8_t Channel[_Nbr_16timers]; // counter for the s
/************ static functions common to all instances ***********************/
static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
if (Channel[timer] < 0)
*TCNTn = 0; // channel set to -1 indicated that refresh interval completed so reset the timer
else {
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && SERVO(timer, Channel[timer]).Pin.isActive)
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, LOW); // pulse this channel low if activated
}
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
int8_t cho = Channel[timer]; // Handle the prior Channel[timer] first
if (cho < 0) // Channel -1 indicates the refresh interval completed...
*TCNTn = 0; // ...so reset the timer
else if (SERVO_INDEX(timer, cho) < ServoCount) // prior channel handled?
extDigitalWrite(SERVO(timer, cho).Pin.nbr, LOW); // pulse the prior channel LOW
Channel[timer]++; // increment to the next channel
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
*OCRnA = *TCNTn + SERVO(timer, Channel[timer]).ticks;
if (SERVO(timer, Channel[timer]).Pin.isActive) // check if activated
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, HIGH); // it's an active channel so pulse it high
Channel[timer] = ++cho; // Handle the next channel (or 0)
if (cho < SERVOS_PER_TIMER && SERVO_INDEX(timer, cho) < ServoCount) {
*OCRnA = *TCNTn + SERVO(timer, cho).ticks; // set compare to current ticks plus duration
if (SERVO(timer, cho).Pin.isActive) // activated?
extDigitalWrite(SERVO(timer, cho).Pin.nbr, HIGH); // yes: pulse HIGH
}
else {
// finished all channels so wait for the refresh period to expire before starting over
if (((unsigned)*TCNTn) + 4 < usToTicks(REFRESH_INTERVAL)) // allow a few ticks to ensure the next OCR1A not missed
*OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
else
*OCRnA = *TCNTn + 4; // at least REFRESH_INTERVAL has elapsed
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
const unsigned int cval = ((unsigned)*TCNTn) + 32 / (SERVO_TIMER_PRESCALER), // allow 32 cycles to ensure the next OCR1A not missed
ival = (unsigned int)usToTicks(REFRESH_INTERVAL); // at least REFRESH_INTERVAL has elapsed
*OCRnA = max(cval, ival);
Channel[timer] = -1; // reset the timer counter to 0 on the next call
}
}
@@ -123,91 +122,102 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
/****************** end of static functions ******************************/
void initISR(timer16_Sequence_t timer) {
#ifdef _useTimer1
if (timer == _timer1) {
TCCR1A = 0; // normal counting mode
TCCR1B = _BV(CS11); // set prescaler of 8
TCNT1 = 0; // clear the timer count
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__)
SBI(TIFR, OCF1A); // clear any pending interrupts;
SBI(TIMSK, OCIE1A); // enable the output compare interrupt
#else
// here if not ATmega8 or ATmega128
SBI(TIFR1, OCF1A); // clear any pending interrupts;
SBI(TIMSK1, OCIE1A); // enable the output compare interrupt
#endif
#ifdef WIRING
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
#endif
}
#endif
void initISR(const timer16_Sequence_t timer_index) {
switch (timer_index) {
default: break;
#ifdef _useTimer3
if (timer == _timer3) {
TCCR3A = 0; // normal counting mode
TCCR3B = _BV(CS31); // set prescaler of 8
TCNT3 = 0; // clear the timer count
#ifdef __AVR_ATmega128__
SBI(TIFR, OCF3A); // clear any pending interrupts;
SBI(ETIMSK, OCIE3A); // enable the output compare interrupt
#else
SBI(TIFR3, OCF3A); // clear any pending interrupts;
SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
#endif
#ifdef WIRING
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
#endif
}
#endif
#ifdef _useTimer1
case _timer1:
TCCR1A = 0; // normal counting mode
TCCR1B = _BV(CS11); // set prescaler of 8
TCNT1 = 0; // clear the timer count
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__)
SBI(TIFR, OCF1A); // clear any pending interrupts;
SBI(TIMSK, OCIE1A); // enable the output compare interrupt
#else
// here if not ATmega8 or ATmega128
SBI(TIFR1, OCF1A); // clear any pending interrupts;
SBI(TIMSK1, OCIE1A); // enable the output compare interrupt
#endif
#ifdef WIRING
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
#endif
break;
#endif
#ifdef _useTimer4
if (timer == _timer4) {
TCCR4A = 0; // normal counting mode
TCCR4B = _BV(CS41); // set prescaler of 8
TCNT4 = 0; // clear the timer count
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
TIMSK4 = _BV(OCIE4A); // enable the output compare interrupt
}
#endif
#ifdef _useTimer3
case _timer3:
TCCR3A = 0; // normal counting mode
TCCR3B = _BV(CS31); // set prescaler of 8
TCNT3 = 0; // clear the timer count
#ifdef __AVR_ATmega128__
SBI(TIFR, OCF3A); // clear any pending interrupts;
SBI(ETIMSK, OCIE3A); // enable the output compare interrupt
#else
SBI(TIFR3, OCF3A); // clear any pending interrupts;
SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
#endif
#ifdef WIRING
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
#endif
break;
#endif
#ifdef _useTimer5
if (timer == _timer5) {
TCCR5A = 0; // normal counting mode
TCCR5B = _BV(CS51); // set prescaler of 8
TCNT5 = 0; // clear the timer count
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
TIMSK5 = _BV(OCIE5A); // enable the output compare interrupt
}
#endif
#ifdef _useTimer4
case _timer4:
TCCR4A = 0; // normal counting mode
TCCR4B = _BV(CS41); // set prescaler of 8
TCNT4 = 0; // clear the timer count
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
TIMSK4 = _BV(OCIE4A); // enable the output compare interrupt
break;
#endif
#ifdef _useTimer5
case _timer5:
TCCR5A = 0; // normal counting mode
TCCR5B = _BV(CS51); // set prescaler of 8
TCNT5 = 0; // clear the timer count
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
TIMSK5 = _BV(OCIE5A); // enable the output compare interrupt
break;
#endif
}
}
void finISR(timer16_Sequence_t timer) {
void finISR(const timer16_Sequence_t timer_index) {
// Disable use of the given timer
#ifdef WIRING
if (timer == _timer1) {
CBI(
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
TIMSK1
#else
TIMSK
#endif
, OCIE1A); // disable timer 1 output compare interrupt
timerDetach(TIMER1OUTCOMPAREA_INT);
}
else if (timer == _timer3) {
CBI(
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
TIMSK3
#else
ETIMSK
#endif
, OCIE3A); // disable the timer3 output compare A interrupt
timerDetach(TIMER3OUTCOMPAREA_INT);
switch (timer_index) {
default: break;
case _timer1:
CBI(
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
TIMSK1
#else
TIMSK
#endif
, OCIE1A // disable timer 1 output compare interrupt
);
timerDetach(TIMER1OUTCOMPAREA_INT);
break;
case _timer3:
CBI(
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
TIMSK3
#else
ETIMSK
#endif
, OCIE3A // disable the timer3 output compare A interrupt
);
timerDetach(TIMER3OUTCOMPAREA_INT);
break;
}
#else // !WIRING
// For arduino - in future: call here to a currently undefined function to reset the timer
UNUSED(timer);
UNUSED(timer_index);
#endif
}
+32
View File
@@ -25,6 +25,38 @@
* Test AVR-specific configuration values for errors at compile-time.
*/
/**
* Check for common serial pin conflicts
*/
#define CHECK_SERIAL_PIN(N) ( \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N \
)
#if CONF_SERIAL_IS(0)
// D0-D1. No known conflicts.
#endif
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
#endif
#else
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11))
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
#endif
#endif
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
#endif
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
#endif
#undef CHECK_SERIAL_PIN
/**
* Checks for FAST PWM
*/
+1 -1
View File
@@ -74,7 +74,7 @@
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
void PRINT_ARRAY_NAME(uint8_t x) {
char *name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
LOOP_L_N(y, MAX_NAME_LENGTH) {
char temp_char = pgm_read_byte(name_mem_pointer + y);
if (temp_char != 0)
-70
View File
@@ -1,70 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __AVR__
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#include "../../MarlinCore.h"
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
void watchdog_init() {
#if ENABLED(WATCHDOG_DURATION_8S) && defined(WDTO_8S)
#define WDTO_NS WDTO_8S
#else
#define WDTO_NS WDTO_4S
#endif
#if ENABLED(WATCHDOG_RESET_MANUAL)
// Enable the watchdog timer, but only for the interrupt.
// Take care, as this requires the correct order of operation, with interrupts disabled.
// See the datasheet of any AVR chip for details.
wdt_reset();
cli();
_WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE);
_WD_CONTROL_REG = _BV(WDIE) | (WDTO_NS & 0x07) | ((WDTO_NS & 0x08) << 2); // WDTO_NS directly does not work. bit 0-2 are consecutive in the register but the highest value bit is at bit 5
// So worked for up to WDTO_2S
sei();
wdt_reset();
#else
wdt_enable(WDTO_NS); // The function handles the upper bit correct.
#endif
//delay(10000); // test it!
}
//===========================================================================
//=================================== ISR ===================================
//===========================================================================
// Watchdog timer interrupt, called if main program blocks >4sec and manual reset is enabled.
#if ENABLED(WATCHDOG_RESET_MANUAL)
ISR(WDT_vect) {
sei(); // With the interrupt driven serial we need to allow interrupts.
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
minkill(); // interrupt-safe final kill and infinite loop
}
#endif
#endif // USE_WATCHDOG
#endif // __AVR__
+106 -4
View File
@@ -25,7 +25,7 @@
#ifdef ARDUINO_ARCH_SAM
#include "../../inc/MarlinConfig.h"
#include "HAL.h"
#include "../../MarlinCore.h"
#include <Wire.h>
#include "usb/usb_task.h"
@@ -40,14 +40,15 @@ uint16_t MarlinHAL::adc_result;
// Public functions
// ------------------------
TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial());
#if ENABLED(POSTMORTEM_DEBUGGING)
extern void install_min_serial();
#endif
void MarlinHAL::init() {
// Initialize the USB stack
#if ENABLED(SDSUPPORT)
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
#endif
usb_task_init();
usb_task_init(); // Initialize the USB stack
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
}
@@ -72,6 +73,103 @@ uint8_t MarlinHAL::get_reset_source() {
void MarlinHAL::reboot() { rstc_start_software_reset(RSTC); }
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
// Initialize watchdog - On SAM3X, Watchdog was already configured
// and enabled or disabled at startup, so no need to reconfigure it
// here.
void MarlinHAL::watchdog_init() { WDT_Restart(WDT); } // Reset watchdog to start clean
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or AVR will go into emergency procedures.
void MarlinHAL::watchdog_refresh() { watchdogReset(); }
#endif
// Override Arduino runtime to either config or disable the watchdog
//
// We need to configure the watchdog as soon as possible in the boot
// process, because watchdog initialization at hardware reset on SAM3X8E
// is unreliable, and there is risk of unintended resets if we delay
// that initialization to a later time.
void watchdogSetup() {
#if ENABLED(USE_WATCHDOG)
// 4 seconds timeout
uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
// Calculate timeout value in WDT counter ticks: This assumes
// the slow clock is running at 32.768 kHz watchdog
// frequency is therefore 32768 / 128 = 256 Hz
timeout = (timeout << 8) / 1000;
if (timeout == 0)
timeout = 1;
else if (timeout > 0xFFF)
timeout = 0xFFF;
// We want to enable the watchdog with the specified timeout
uint32_t value =
WDT_MR_WDV(timeout) | // With the specified timeout
WDT_MR_WDD(timeout) | // and no invalid write window
#if !(SAMV70 || SAMV71 || SAME70 || SAMS70)
WDT_MR_WDRPROC | // WDT fault resets processor only - We want
// to keep PIO controller state
#endif
WDT_MR_WDDBGHLT | // WDT stops in debug state.
WDT_MR_WDIDLEHLT; // WDT stops in idle state.
#if ENABLED(WATCHDOG_RESET_MANUAL)
// We enable the watchdog timer, but only for the interrupt.
// Configure WDT to only trigger an interrupt
value |= WDT_MR_WDFIEN; // Enable WDT fault interrupt.
// Disable WDT interrupt (just in case, to avoid triggering it!)
NVIC_DisableIRQ(WDT_IRQn);
// We NEED memory barriers to ensure Interrupts are actually disabled!
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
__DSB();
__ISB();
// Initialize WDT with the given parameters
WDT_Enable(WDT, value);
// Configure and enable WDT interrupt.
NVIC_ClearPendingIRQ(WDT_IRQn);
NVIC_SetPriority(WDT_IRQn, 0); // Use highest priority, so we detect all kinds of lockups
NVIC_EnableIRQ(WDT_IRQn);
#else
// a WDT fault triggers a reset
value |= WDT_MR_WDRSTEN;
// Initialize WDT with the given parameters
WDT_Enable(WDT, value);
#endif
// Reset the watchdog
WDT_Restart(WDT);
#else
// Make sure to completely disable the Watchdog
WDT_Disable(WDT);
#endif
}
// ------------------------
// Free Memory Accessor
// ------------------------
extern "C" {
extern unsigned int _ebss; // end of bss section
}
@@ -82,6 +180,10 @@ int freeMemory() {
return (int)&free_memory - (heap_end ?: (int)&_ebss);
}
// ------------------------
// Serial Ports
// ------------------------
// Forward the default serial ports
#if USING_HW_SERIAL0
DefaultSerial1 MSerial0(false, Serial);
+10 -7
View File
@@ -32,7 +32,6 @@
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include <stdint.h>
@@ -115,8 +114,8 @@ typedef Servo hal_servo_t;
//
// Interrupts
//
#define sei() noInterrupts()
#define cli() interrupts()
#define sei() interrupts()
#define cli() noInterrupts()
#define CRITICAL_SECTION_START() const bool _irqon = hal.isr_state(); hal.isr_off()
#define CRITICAL_SECTION_END() if (_irqon) hal.isr_on()
@@ -176,9 +175,13 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
static void init(); // Called early in setup()
static void init_board(); // Called less early in setup()
static void reboot(); // Software reset
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board(); // Called less early in setup()
static void reboot(); // Restart the firmware
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }
@@ -207,7 +210,7 @@ public:
static void adc_init() {}
// Called by Temperature::init for each sensor at startup
static void adc_enable(const uint8_t ch) {}
static void adc_enable(const uint8_t /*ch*/) {}
// Begin ADC sampling on the given channel. Called from Temperature::isr!
static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }
+2 -4
View File
@@ -31,8 +31,6 @@
/**
* HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
*/
#ifdef ARDUINO_ARCH_SAM
@@ -249,12 +247,12 @@
b <<= 1; // little setup time
WRITE(SD_SCK_PIN, HIGH);
DELAY_NS(spiDelayNS);
DELAY_NS_VAR(spiDelayNS);
b |= (READ(SD_MISO_PIN) != 0);
WRITE(SD_SCK_PIN, LOW);
DELAY_NS(spiDelayNS);
DELAY_NS_VAR(spiDelayNS);
} while (--bits);
return b;
}
+1 -1
View File
@@ -41,7 +41,7 @@
practice, we need alignment to 256 bytes to make this work in all
cases */
__attribute__ ((aligned(256)))
static DeviceVectors ram_tab = { nullptr };
static DeviceVectors ram_tab[61] = { nullptr };
/**
* This function checks if the exception/interrupt table is already in SRAM or not.
@@ -25,7 +25,7 @@
#if ENABLED(POSTMORTEM_DEBUGGING)
#include "../shared/HAL_MinSerial.h"
#include "../shared/MinSerial.h"
#include <stdarg.h>
+68 -64
View File
@@ -47,12 +47,12 @@
#include "../shared/servo.h"
#include "../shared/servo_private.h"
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
// ------------------------
/// Interrupt handler for the TC0 channel 1.
// ------------------------
void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
#ifdef _useTimer1
void HANDLER_FOR_TIMER1() { Servo_Handler(_timer1, TC_FOR_TIMER1, CHANNEL_FOR_TIMER1); }
@@ -70,88 +70,92 @@ void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
void HANDLER_FOR_TIMER5() { Servo_Handler(_timer5, TC_FOR_TIMER5, CHANNEL_FOR_TIMER5); }
#endif
void Servo_Handler(timer16_Sequence_t timer, Tc *tc, uint8_t channel) {
// clear interrupt
tc->TC_CHANNEL[channel].TC_SR;
if (Channel[timer] < 0)
tc->TC_CHANNEL[channel].TC_CCR |= TC_CCR_SWTRG; // channel set to -1 indicated that refresh interval completed so reset the timer
else if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && SERVO(timer, Channel[timer]).Pin.isActive)
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, LOW); // pulse this channel low if activated
void Servo_Handler(const timer16_Sequence_t timer, Tc *tc, const uint8_t channel) {
static int8_t Channel[_Nbr_16timers]; // Servo counters to pulse (or -1 for refresh interval)
int8_t cho = Channel[timer]; // Handle the prior Channel[timer] first
if (cho < 0) { // Channel -1 indicates the refresh interval completed...
tc->TC_CHANNEL[channel].TC_CCR |= TC_CCR_SWTRG; // ...so reset the timer
if (DisablePending[timer]) {
// Disabling only after the full servo period expires prevents
// pulses being too close together if immediately re-enabled.
DisablePending.clear(timer);
TC_Stop(tc, channel);
tc->TC_CHANNEL[channel].TC_SR; // clear interrupt
return;
}
}
else if (SERVO_INDEX(timer, cho) < ServoCount) // prior channel handled?
extDigitalWrite(SERVO(timer, cho).Pin.nbr, LOW); // pulse the prior channel LOW
Channel[timer]++; // increment to the next channel
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
tc->TC_CHANNEL[channel].TC_RA = tc->TC_CHANNEL[channel].TC_CV + SERVO(timer,Channel[timer]).ticks;
if (SERVO(timer,Channel[timer]).Pin.isActive) // check if activated
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, HIGH); // its an active channel so pulse it high
Channel[timer] = ++cho; // go to the next channel (or 0)
if (cho < SERVOS_PER_TIMER && SERVO_INDEX(timer, cho) < ServoCount) {
tc->TC_CHANNEL[channel].TC_RA = tc->TC_CHANNEL[channel].TC_CV + SERVO(timer, cho).ticks;
if (SERVO(timer, cho).Pin.isActive) // activated?
extDigitalWrite(SERVO(timer, cho).Pin.nbr, HIGH); // yes: pulse HIGH
}
else {
// finished all channels so wait for the refresh period to expire before starting over
tc->TC_CHANNEL[channel].TC_RA =
tc->TC_CHANNEL[channel].TC_CV < usToTicks(REFRESH_INTERVAL) - 4
? (unsigned int)usToTicks(REFRESH_INTERVAL) // allow a few ticks to ensure the next OCR1A not missed
: tc->TC_CHANNEL[channel].TC_CV + 4; // at least REFRESH_INTERVAL has elapsed
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
const unsigned int cval = tc->TC_CHANNEL[channel].TC_CV + 128 / (SERVO_TIMER_PRESCALER), // allow 128 cycles to ensure the next CV not missed
ival = (unsigned int)usToTicks(REFRESH_INTERVAL); // at least REFRESH_INTERVAL has elapsed
tc->TC_CHANNEL[channel].TC_RA = max(cval, ival);
Channel[timer] = -1; // reset the timer CCR on the next call
}
tc->TC_CHANNEL[channel].TC_SR; // clear interrupt
}
static void _initISR(Tc *tc, uint32_t channel, uint32_t id, IRQn_Type irqn) {
pmc_enable_periph_clk(id);
TC_Configure(tc, channel,
TC_CMR_TCCLKS_TIMER_CLOCK3 | // MCK/32
TC_CMR_WAVE | // Waveform mode
TC_CMR_WAVSEL_UP_RC ); // Counter running up and reset when equals to RC
TC_CMR_WAVE // Waveform mode
| TC_CMR_WAVSEL_UP_RC // Counter running up and reset when equal to RC
| (SERVO_TIMER_PRESCALER == 2 ? TC_CMR_TCCLKS_TIMER_CLOCK1 : 0) // MCK/2
| (SERVO_TIMER_PRESCALER == 8 ? TC_CMR_TCCLKS_TIMER_CLOCK2 : 0) // MCK/8
| (SERVO_TIMER_PRESCALER == 32 ? TC_CMR_TCCLKS_TIMER_CLOCK3 : 0) // MCK/32
| (SERVO_TIMER_PRESCALER == 128 ? TC_CMR_TCCLKS_TIMER_CLOCK4 : 0) // MCK/128
);
/* 84MHz, MCK/32, for 1.5ms: 3937 */
TC_SetRA(tc, channel, 2625); // 1ms
// Wait 1ms before the first ISR
TC_SetRA(tc, channel, (F_CPU) / (SERVO_TIMER_PRESCALER) / 1000UL); // 1ms
/* Configure and enable interrupt */
// Configure and enable interrupt
NVIC_EnableIRQ(irqn);
// TC_IER_CPAS: RA Compare
tc->TC_CHANNEL[channel].TC_IER = TC_IER_CPAS;
tc->TC_CHANNEL[channel].TC_IER = TC_IER_CPAS; // TC_IER_CPAS: RA Compare
// Enables the timer clock and performs a software reset to start the counting
TC_Start(tc, channel);
}
void initISR(timer16_Sequence_t timer) {
#ifdef _useTimer1
if (timer == _timer1)
_initISR(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1, ID_TC_FOR_TIMER1, IRQn_FOR_TIMER1);
#endif
#ifdef _useTimer2
if (timer == _timer2)
_initISR(TC_FOR_TIMER2, CHANNEL_FOR_TIMER2, ID_TC_FOR_TIMER2, IRQn_FOR_TIMER2);
#endif
#ifdef _useTimer3
if (timer == _timer3)
_initISR(TC_FOR_TIMER3, CHANNEL_FOR_TIMER3, ID_TC_FOR_TIMER3, IRQn_FOR_TIMER3);
#endif
#ifdef _useTimer4
if (timer == _timer4)
_initISR(TC_FOR_TIMER4, CHANNEL_FOR_TIMER4, ID_TC_FOR_TIMER4, IRQn_FOR_TIMER4);
#endif
#ifdef _useTimer5
if (timer == _timer5)
_initISR(TC_FOR_TIMER5, CHANNEL_FOR_TIMER5, ID_TC_FOR_TIMER5, IRQn_FOR_TIMER5);
#endif
void initISR(const timer16_Sequence_t timer_index) {
CRITICAL_SECTION_START();
const bool disable_soon = DisablePending[timer_index];
DisablePending.clear(timer_index);
CRITICAL_SECTION_END();
if (!disable_soon) switch (timer_index) {
default: break;
#ifdef _useTimer1
case _timer1: return _initISR(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1, ID_TC_FOR_TIMER1, IRQn_FOR_TIMER1);
#endif
#ifdef _useTimer2
case _timer2: return _initISR(TC_FOR_TIMER2, CHANNEL_FOR_TIMER2, ID_TC_FOR_TIMER2, IRQn_FOR_TIMER2);
#endif
#ifdef _useTimer3
case _timer3: return _initISR(TC_FOR_TIMER3, CHANNEL_FOR_TIMER3, ID_TC_FOR_TIMER3, IRQn_FOR_TIMER3);
#endif
#ifdef _useTimer4
case _timer4: return _initISR(TC_FOR_TIMER4, CHANNEL_FOR_TIMER4, ID_TC_FOR_TIMER4, IRQn_FOR_TIMER4);
#endif
#ifdef _useTimer5
case _timer5: return _initISR(TC_FOR_TIMER5, CHANNEL_FOR_TIMER5, ID_TC_FOR_TIMER5, IRQn_FOR_TIMER5);
#endif
}
}
void finISR(timer16_Sequence_t) {
#ifdef _useTimer1
TC_Stop(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1);
#endif
#ifdef _useTimer2
TC_Stop(TC_FOR_TIMER2, CHANNEL_FOR_TIMER2);
#endif
#ifdef _useTimer3
TC_Stop(TC_FOR_TIMER3, CHANNEL_FOR_TIMER3);
#endif
#ifdef _useTimer4
TC_Stop(TC_FOR_TIMER4, CHANNEL_FOR_TIMER4);
#endif
#ifdef _useTimer5
TC_Stop(TC_FOR_TIMER5, CHANNEL_FOR_TIMER5);
#endif
void finISR(const timer16_Sequence_t timer_index) {
// Timer is disabled from the ISR, to ensure proper final pulse length.
DisablePending.set(timer_index);
}
#endif // HAS_SERVOS
+1 -1
View File
@@ -37,7 +37,7 @@
#define _useTimer5
#define TRIM_DURATION 2 // compensation ticks to trim adjust for digitalWrite delays
#define SERVO_TIMER_PRESCALER 32 // timer prescaler
#define SERVO_TIMER_PRESCALER 2 // timer prescaler
/*
TC0, chan 0 => TC0_Handler
+12 -24
View File
@@ -199,8 +199,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
for (i = 0; i <PageSize >> 2; i++)
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM PageWrite ", page);
DEBUG_ECHO_MSG("EEPROM PageWrite ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
@@ -245,8 +244,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
// Reenable interrupts
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page);
DEBUG_ECHO_MSG("EEPROM Unlock failure for page ", page);
return false;
}
@@ -270,8 +268,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
// Reenable interrupts
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page);
DEBUG_ECHO_MSG("EEPROM Write failure for page ", page);
return false;
}
@@ -286,8 +283,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
if (memcmp(getFlashStorage(page),data,PageSize)) {
#ifdef EE_EMU_DEBUG
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page);
DEBUG_ECHO_MSG("EEPROM Verify Write failure for page ", page);
ee_Dump( page, (uint32_t *)addrflash);
ee_Dump(-page, data);
@@ -325,8 +321,7 @@ static bool ee_PageErase(uint16_t page) {
uint16_t i;
uint32_t addrflash = uint32_t(getFlashStorage(page));
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM PageErase ", page);
DEBUG_ECHO_MSG("EEPROM PageErase ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
@@ -370,8 +365,7 @@ static bool ee_PageErase(uint16_t page) {
// Reenable interrupts
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page);
DEBUG_ECHO_MSG("EEPROM Unlock failure for page ",page);
return false;
}
@@ -394,8 +388,7 @@ static bool ee_PageErase(uint16_t page) {
// Reenable interrupts
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page);
DEBUG_ECHO_MSG("EEPROM Erase failure for page ",page);
return false;
}
@@ -410,8 +403,7 @@ static bool ee_PageErase(uint16_t page) {
uint32_t * aligned_src = (uint32_t *) addrflash;
for (i = 0; i < PageSize >> 2; i++) {
if (*aligned_src++ != 0xFFFFFFFF) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page);
DEBUG_ECHO_MSG("EEPROM Verify Erase failure for page ",page);
ee_Dump(page, (uint32_t *)addrflash);
return false;
}
@@ -921,8 +913,7 @@ static void ee_Init() {
// If all groups seem to be used, default to first group
if (curGroup >= GroupCount) curGroup = 0;
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup);
DEBUG_ECHO_MSG("EEPROM Current Group: ",curGroup);
DEBUG_FLUSH();
// Now, validate that all the other group pages are empty
@@ -931,8 +922,7 @@ static void ee_Init() {
for (int page = 0; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_ECHO_MSG("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_FLUSH();
ee_PageErase(grp * PagesPerGroup + page);
}
@@ -948,15 +938,13 @@ static void ee_Init() {
}
}
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage);
DEBUG_ECHO_MSG("EEPROM Active page: ", curPage);
DEBUG_FLUSH();
// Make sure the pages following the first clean one are also clean
for (int page = curPage + 1; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_ECHO_MSG("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_FLUSH();
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
ee_PageErase(curGroup * PagesPerGroup + page);
+24
View File
@@ -25,6 +25,30 @@
* Test Arduino Due specific configuration values for errors at compile-time.
*/
/**
* Check for common serial pin conflicts
*/
#define CHECK_SERIAL_PIN(N) ( \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
)
#if CONF_SERIAL_IS(0) // D0-D1. No known conflicts.
#endif
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
#endif
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
#endif
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
#endif
#undef CHECK_SERIAL_PIN
/**
* HARDWARE VS. SOFTWARE SPI COMPATIBILITY
*
+1 -2
View File
@@ -70,7 +70,7 @@
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0)
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
@@ -86,7 +86,6 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|| pwm_status(pin));
}
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
+9 -2
View File
@@ -89,10 +89,17 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
NVIC_SetPriority(irq, timer_config[timer_num].priority);
// wave mode, reset counter on match with RC,
TC_Configure(tc, channel, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK1);
TC_Configure(tc, channel,
TC_CMR_WAVE
| TC_CMR_WAVSEL_UP_RC
| (HAL_TIMER_PRESCALER == 2 ? TC_CMR_TCCLKS_TIMER_CLOCK1 : 0)
| (HAL_TIMER_PRESCALER == 8 ? TC_CMR_TCCLKS_TIMER_CLOCK2 : 0)
| (HAL_TIMER_PRESCALER == 32 ? TC_CMR_TCCLKS_TIMER_CLOCK3 : 0)
| (HAL_TIMER_PRESCALER == 128 ? TC_CMR_TCCLKS_TIMER_CLOCK4 : 0)
);
// Set compare value
TC_SetRC(tc, channel, VARIANT_MCK / 2 / frequency);
TC_SetRC(tc, channel, VARIANT_MCK / (HAL_TIMER_PRESCALER) / frequency);
// And start timer
TC_Start(tc, channel);
+2 -1
View File
@@ -35,7 +35,8 @@
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
#define HAL_TIMER_PRESCALER 2
#define HAL_TIMER_RATE ((F_CPU) / (HAL_TIMER_PRESCALER)) // frequency of timers peripherals
#ifndef MF_TIMER_STEP
#define MF_TIMER_STEP 2 // Timer Index for Stepper
+8 -8
View File
@@ -6,14 +6,14 @@
#
import pioutil
if pioutil.is_pio_build():
import platform
current_OS = platform.system()
import platform
current_OS = platform.system()
if current_OS == 'Windows':
if current_OS == 'Windows':
Import("env")
Import("env")
# Use bossac.exe on Windows
env.Replace(
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE"
)
# Use bossac.exe on Windows
env.Replace(
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE"
)
+1 -1
View File
@@ -1059,7 +1059,7 @@ static inline void convert_64_bit_to_byte_array(uint64_t value, uint8_t *data)
while (val_index < 8)
{
data[val_index++] = value & 0xFF;
value = value >> 8;
value >>= 8;
}
}
+1 -1
View File
@@ -62,7 +62,7 @@ void usb_task_idle(void) {
// Attend SD card access from the USB MSD -- Prioritize access to improve speed
int delay = 2;
while (main_b_msc_enable && --delay > 0) {
if (udi_msc_process_trans()) delay = 10000;
if (udi_msc_process_trans()) delay = 20;
// Reset the watchdog, just to be sure
REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);
-114
View File
@@ -1,114 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef ARDUINO_ARCH_SAM
#include "../../inc/MarlinConfig.h"
#include "../../MarlinCore.h"
#include "watchdog.h"
// Override Arduino runtime to either config or disable the watchdog
//
// We need to configure the watchdog as soon as possible in the boot
// process, because watchdog initialization at hardware reset on SAM3X8E
// is unreliable, and there is risk of unintended resets if we delay
// that initialization to a later time.
void watchdogSetup() {
#if ENABLED(USE_WATCHDOG)
// 4 seconds timeout
uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
// Calculate timeout value in WDT counter ticks: This assumes
// the slow clock is running at 32.768 kHz watchdog
// frequency is therefore 32768 / 128 = 256 Hz
timeout = (timeout << 8) / 1000;
if (timeout == 0)
timeout = 1;
else if (timeout > 0xFFF)
timeout = 0xFFF;
// We want to enable the watchdog with the specified timeout
uint32_t value =
WDT_MR_WDV(timeout) | // With the specified timeout
WDT_MR_WDD(timeout) | // and no invalid write window
#if !(SAMV70 || SAMV71 || SAME70 || SAMS70)
WDT_MR_WDRPROC | // WDT fault resets processor only - We want
// to keep PIO controller state
#endif
WDT_MR_WDDBGHLT | // WDT stops in debug state.
WDT_MR_WDIDLEHLT; // WDT stops in idle state.
#if ENABLED(WATCHDOG_RESET_MANUAL)
// We enable the watchdog timer, but only for the interrupt.
// Configure WDT to only trigger an interrupt
value |= WDT_MR_WDFIEN; // Enable WDT fault interrupt.
// Disable WDT interrupt (just in case, to avoid triggering it!)
NVIC_DisableIRQ(WDT_IRQn);
// We NEED memory barriers to ensure Interrupts are actually disabled!
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
__DSB();
__ISB();
// Initialize WDT with the given parameters
WDT_Enable(WDT, value);
// Configure and enable WDT interrupt.
NVIC_ClearPendingIRQ(WDT_IRQn);
NVIC_SetPriority(WDT_IRQn, 0); // Use highest priority, so we detect all kinds of lockups
NVIC_EnableIRQ(WDT_IRQn);
#else
// a WDT fault triggers a reset
value |= WDT_MR_WDRSTEN;
// Initialize WDT with the given parameters
WDT_Enable(WDT, value);
#endif
// Reset the watchdog
WDT_Restart(WDT);
#else
// Make sure to completely disable the Watchdog
WDT_Disable(WDT);
#endif
}
#if ENABLED(USE_WATCHDOG)
// Initialize watchdog - On SAM3X, Watchdog was already configured
// and enabled or disabled at startup, so no need to reconfigure it
// here.
void watchdog_init() {
// Reset watchdog to start clean
WDT_Restart(WDT);
}
#endif // USE_WATCHDOG
#endif
+63 -12
View File
@@ -65,6 +65,7 @@ portMUX_TYPE MarlinHAL::spinlock = portMUX_INITIALIZER_UNLOCKED;
// ------------------------
uint16_t MarlinHAL::adc_result;
pwm_pin_t MarlinHAL::pwm_pin_data[MAX_EXPANDER_BITS];
// ------------------------
// Private Variables
@@ -179,6 +180,31 @@ void _delay_ms(int delay_ms) { delay(delay_ms); }
// return free memory between end of heap (or end bss) and whatever is current
int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
extern "C" {
esp_err_t esp_task_wdt_reset();
}
void watchdogSetup() {
// do whatever. don't remove this function.
}
void MarlinHAL::watchdog_init() {
// TODO
}
// Reset watchdog.
void MarlinHAL::watchdog_refresh() { esp_task_wdt_reset(); }
#endif
// ------------------------
// ADC
// ------------------------
@@ -305,21 +331,46 @@ int8_t get_pwm_channel(const pin_t pin, const uint32_t freq, const uint16_t res)
}
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=_BV(PWM_RESOLUTION)-1*/, const bool invert/*=false*/) {
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
if (cid >= 0) {
uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
ledcWrite(cid, duty);
}
#if ENABLED(I2S_STEPPER_STREAM)
if (pin > 127) {
const uint8_t pinlo = pin & 0x7F;
pwm_pin_t &pindata = pwm_pin_data[pinlo];
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, pindata.pwm_cycle_ticks);
if (duty == 0 || duty == pindata.pwm_cycle_ticks) { // max or min (i.e., on/off)
pindata.pwm_duty_ticks = 0; // turn off PWM for this pin
duty ? SBI32(i2s_port_data, pinlo) : CBI32(i2s_port_data, pinlo); // set pin level
}
else
pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle
}
else
#endif
{
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
if (cid >= 0) {
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
ledcWrite(cid, duty);
}
}
}
int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
const int8_t cid = channel_for_pin(pin);
if (cid >= 0) {
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
ledcDetachPin(chan_pin[cid]);
chan_pin[cid] = 0; // remove old freq channel
}
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
#if ENABLED(I2S_STEPPER_STREAM)
if (pin > 127) {
pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle
return 0;
}
else
#endif
{
const int8_t cid = channel_for_pin(pin);
if (cid >= 0) {
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
ledcDetachPin(chan_pin[cid]);
chan_pin[cid] = 0; // remove old freq channel
}
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
}
}
// use hardware PWM if avail, if not then ISR
+21 -7
View File
@@ -32,7 +32,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "i2s.h"
#if ENABLED(WIFISUPPORT)
@@ -61,14 +60,17 @@
#endif
#endif
#define CRITICAL_SECTION_START() portENTER_CRITICAL(&spinlock)
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&spinlock)
#define CRITICAL_SECTION_START() portENTER_CRITICAL(&hal.spinlock)
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&hal.spinlock)
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
#define PWM_FREQUENCY 1000u // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
#define PWM_RESOLUTION 10u // Default PWM bit resolution
#define CHANNEL_MAX_NUM 15u // max PWM channel # to allocate (7 to only use low speed, 15 to use low & high)
#define MAX_PWM_IOPIN 33u // hardware pwm pins < 34
#ifndef MAX_EXPANDER_BITS
#define MAX_EXPANDER_BITS 32 // I2S expander bit width (max 32)
#endif
// ------------------------
// Types
@@ -77,6 +79,12 @@
typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.
typedef int16_t pin_t;
typedef struct pwm_pin {
uint32_t pwm_cycle_ticks = 1000000UL / (PWM_FREQUENCY) / 4; // # ticks per pwm cycle
uint32_t pwm_tick_count = 0; // current tick count
uint32_t pwm_duty_ticks = 0; // # of ticks for current duty cycle
} pwm_pin_t;
class Servo;
typedef Servo hal_servo_t;
@@ -89,7 +97,7 @@ typedef Servo hal_servo_t;
//
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
void noTone(const pin_t _pin);
int8_t get_pwm_channel(const pin_t pin, const uint32_t freq, const uint16_t res);
void analogWrite(const pin_t pin, const uint16_t value, const uint32_t freq=PWM_FREQUENCY, const uint16_t res=8);
//
@@ -172,9 +180,13 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
static void init() {} // Called early in setup()
static void init_board(); // Called less early in setup()
static void reboot(); // Restart the firmware
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init() {} // Called early in setup()
static void init_board(); // Called less early in setup()
static void reboot(); // Restart the firmware
// Interrupts
static portMUX_TYPE spinlock;
@@ -194,6 +206,8 @@ public:
// Free SRAM
static int freeMemory();
static pwm_pin_t pwm_pin_data[MAX_EXPANDER_BITS];
//
// ADC Methods
//
+45 -7
View File
@@ -139,22 +139,40 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
}
void stepperTask(void *parameter) {
uint32_t remaining = 0;
uint32_t nextMainISR = 0;
#if ENABLED(LIN_ADVANCE)
uint32_t nextAdvanceISR = Stepper::LA_ADV_NEVER;
#endif
while (1) {
for (;;) {
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
dma.rw_pos = 0;
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
// Fill with the port data post pulse_phase until the next step
if (remaining) {
if (nextMainISR && TERN1(LIN_ADVANCE, nextAdvanceISR))
i2s_push_sample();
remaining--;
}
else {
// i2s_push_sample() is also called from Stepper::pulse_phase_isr() and Stepper::advance_isr()
// in a rare case where both are called, we need to double decrement the counters
const uint8_t push_count = 1 + (!nextMainISR && TERN0(LIN_ADVANCE, !nextAdvanceISR));
#if ENABLED(LIN_ADVANCE)
if (!nextAdvanceISR) {
Stepper::advance_isr();
nextAdvanceISR = Stepper::la_interval;
}
else if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
nextAdvanceISR = Stepper::la_interval;
#endif
if (!nextMainISR) {
Stepper::pulse_phase_isr();
remaining = Stepper::block_phase_isr();
nextMainISR = Stepper::block_phase_isr();
}
nextMainISR -= push_count;
TERN_(LIN_ADVANCE, nextAdvanceISR -= push_count);
}
}
}
@@ -337,6 +355,26 @@ uint8_t i2s_state(uint8_t pin) {
}
void i2s_push_sample() {
// Every 4µs (when space in DMA buffer) toggle each expander PWM output using
// the current duty cycle/frequency so they sync with any steps (once
// through the DMA/FIFO buffers). PWM signal inversion handled by other functions
LOOP_L_N(p, MAX_EXPANDER_BITS) {
if (hal.pwm_pin_data[p].pwm_duty_ticks > 0) { // pin has active pwm?
if (hal.pwm_pin_data[p].pwm_tick_count == 0) {
if (TEST32(i2s_port_data, p)) { // hi->lo
CBI32(i2s_port_data, p);
hal.pwm_pin_data[p].pwm_tick_count = hal.pwm_pin_data[p].pwm_cycle_ticks - hal.pwm_pin_data[p].pwm_duty_ticks;
}
else { // lo->hi
SBI32(i2s_port_data, p);
hal.pwm_pin_data[p].pwm_tick_count = hal.pwm_pin_data[p].pwm_duty_ticks;
}
}
else
hal.pwm_pin_data[p].pwm_tick_count--;
}
}
dma.current[dma.rw_pos++] = i2s_port_data;
}
@@ -20,3 +20,10 @@
*
*/
#pragma once
//
// Board-specific options need to be defined before HAL.h
//
#if MB(MKS_TINYBEE)
#define MAX_EXPANDER_BITS 24 // TinyBee has 3 x HC595
#endif
+8
View File
@@ -45,6 +45,14 @@
#error "FAST_PWM_FAN is not available on TinyBee."
#endif
#if BOTH(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING)
#error "BABYSTEPPING on I2S stream requires INTEGRATED_BABYSTEPPING."
#endif
#if USING_PULLDOWNS
#error "PULLDOWN pin mode is not available on ESP32 boards."
#endif
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
#error "I2S stream is currently incompatible with LIN_ADVANCE."
#endif
+22 -16
View File
@@ -23,24 +23,24 @@
*/
#ifdef ARDUINO_ARCH_ESP32
#include "../../inc/MarlinConfigPre.h"
#include "../../inc/MarlinConfig.h"
#if ENABLED(FYSETC_MINI_12864_2_1)
#if EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#include <U8glib-HAL.h>
#include "Arduino.h"
#include "../shared/HAL_SPI.h"
#include "HAL.h"
#include "SPI.h"
#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#if ENABLED(ESP3D_WIFISUPPORT)
#include "sd_ESP32.h"
#endif
#endif
static SPISettings spiConfig;
#define MDOGLCD_MOSI 23
#define MDOGLCD_SCK 18
#define MLCD_RESET_PIN 0
#define MLCD_PINS_DC 4
#define MDOGLCD_CS 21
#define MDOGLCD_A0 4
#ifndef LCD_SPI_SPEED
#ifdef SD_SPI_SPEED
@@ -52,6 +52,11 @@ static SPISettings spiConfig;
uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
#if ENABLED(PAUSE_LCD_FOR_BUSY_SD)
if (card.flag.saving || card.flag.logging || TERN0(ESP3D_WIFISUPPORT, sd_busy_lock == true)) return 0;
#endif
if (msgInitCount) {
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
if (msgInitCount) return -1;
@@ -61,24 +66,24 @@ uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
case U8G_COM_MSG_STOP: break;
case U8G_COM_MSG_INIT:
OUT_WRITE(MDOGLCD_CS, HIGH);
OUT_WRITE(MDOGLCD_A0, HIGH);
OUT_WRITE(MLCD_RESET_PIN, HIGH);
OUT_WRITE(DOGLCD_CS, HIGH);
OUT_WRITE(DOGLCD_A0, HIGH);
OUT_WRITE(LCD_RESET_PIN, HIGH);
u8g_Delay(5);
spiBegin();
spiInit(LCD_SPI_SPEED);
break;
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
WRITE(MDOGLCD_A0, arg_val ? HIGH : LOW);
WRITE(DOGLCD_A0, arg_val ? HIGH : LOW);
break;
case U8G_COM_MSG_CHIP_SELECT: /* arg_val == 0 means HIGH level of U8G_PI_CS */
WRITE(MDOGLCD_CS, arg_val ? LOW : HIGH);
WRITE(DOGLCD_CS, arg_val ? LOW : HIGH);
break;
case U8G_COM_MSG_RESET:
WRITE(MLCD_RESET_PIN, arg_val);
WRITE(LCD_RESET_PIN, arg_val);
break;
case U8G_COM_MSG_WRITE_BYTE:
@@ -96,5 +101,6 @@ uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
return 1;
}
#endif // FYSETC_MINI_12864_2_1
#endif // EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1)
#endif // ARDUINO_ARCH_ESP32
-42
View File
@@ -1,42 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef ARDUINO_ARCH_ESP32
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
#include "watchdog.h"
void watchdogSetup() {
// do whatever. don't remove this function.
}
void watchdog_init() {
// TODO
}
#endif // USE_WATCHDOG
#endif // ARDUINO_ARCH_ESP32
+1 -4
View File
@@ -28,6 +28,7 @@
#endif
#include HAL_PATH(.,HAL.h)
extern MarlinHAL hal;
#define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION)
@@ -44,7 +45,3 @@
#ifndef PGMSTR
#define PGMSTR(NAM,STR) const char NAM[] = STR
#endif
inline void watchdog_refresh() {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
}
+7 -3
View File
@@ -21,6 +21,8 @@
*/
#pragma once
#include "../../inc/MarlinConfigPre.h"
#include <iostream>
#include <stdint.h>
#include <stdarg.h>
@@ -29,12 +31,10 @@
#include <algorithm>
#include "hardware/Clock.h"
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "serial.h"
// ------------------------
@@ -106,9 +106,13 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() {}
static void watchdog_refresh() {}
static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Reset the application state and GPIO
static void reboot(); // Reset the application state and GPIO
// Interrupts
static bool isr_state() { return true; }
+8 -8
View File
@@ -69,12 +69,12 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
std::size_t bytes_written = 0;
for (std::size_t i = 0; i < size; i++) {
buffer[pos+i] = value[i];
bytes_written ++;
buffer[pos + i] = value[i];
bytes_written++;
}
crc16(crc, value, size);
pos = pos + size;
pos += size;
return (bytes_written != size); // return true for any error
}
@@ -82,21 +82,21 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uin
std::size_t bytes_read = 0;
if (writing) {
for (std::size_t i = 0; i < size; i++) {
value[i] = buffer[pos+i];
bytes_read ++;
value[i] = buffer[pos + i];
bytes_read++;
}
crc16(crc, value, size);
}
else {
uint8_t temp[size];
for (std::size_t i = 0; i < size; i++) {
temp[i] = buffer[pos+i];
bytes_read ++;
temp[i] = buffer[pos + i];
bytes_read++;
}
crc16(crc, temp, size);
}
pos = pos + size;
pos += size;
return bytes_read != size; // return true for any error
}
+2 -2
View File
@@ -26,8 +26,8 @@
struct LowpassFilter {
uint64_t data_delay = 0;
uint16_t update(uint16_t value) {
data_delay = data_delay - (data_delay >> 6) + value;
return (uint16_t)(data_delay >> 6);
data_delay += value - (data_delay >> 6);
return uint16_t(data_delay >> 6);
}
};
-37
View File
@@ -1,37 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __PLAT_LINUX__
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
void watchdog_init() {}
void HAL_watchdog_refresh() {}
#endif
#endif // __PLAT_LINUX__
+47 -7
View File
@@ -25,10 +25,6 @@
#include "../shared/Delay.h"
#include "../../../gcode/parser.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#endif
DefaultSerial1 USBSerial(false, UsbSerial);
uint32_t MarlinHAL::adc_result = 0;
@@ -61,9 +57,7 @@ uint8_t MarlinHAL::get_reset_source() {
return RST_POWER_ON;
}
void MarlinHAL::clear_reset_source() {
TERN_(USE_WATCHDOG, watchdog_clear_timeout_flag());
}
void MarlinHAL::clear_reset_source() { watchdog_clear_timeout_flag(); }
void flashFirmware(const int16_t) {
delay(500); // Give OS time to disconnect
@@ -72,6 +66,52 @@ void flashFirmware(const int16_t) {
hal.reboot();
}
#if ENABLED(USE_WATCHDOG)
#include <lpc17xx_wdt.h>
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
void MarlinHAL::watchdog_init() {
#if ENABLED(WATCHDOG_RESET_MANUAL)
// We enable the watchdog timer, but only for the interrupt.
// Configure WDT to only trigger an interrupt
// Disable WDT interrupt (just in case, to avoid triggering it!)
NVIC_DisableIRQ(WDT_IRQn);
// We NEED memory barriers to ensure Interrupts are actually disabled!
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
__DSB();
__ISB();
// Configure WDT to only trigger an interrupt
// Initialize WDT with the given parameters
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_INT_ONLY);
// Configure and enable WDT interrupt.
NVIC_ClearPendingIRQ(WDT_IRQn);
NVIC_SetPriority(WDT_IRQn, 0); // Use highest priority, so we detect all kinds of lockups
NVIC_EnableIRQ(WDT_IRQn);
#else
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET);
#endif
WDT_Start(WDT_TIMEOUT_US);
}
void MarlinHAL::watchdog_refresh() {
WDT_Feed();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
// Timeout state
bool MarlinHAL::watchdog_timed_out() { return TEST(WDT_ReadTimeOutFlag(), 0); }
void MarlinHAL::watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
#endif // USE_WATCHDOG
// For M42/M43, scan command line for pin code
// return index into pin map array if found and the pin is valid.
// return dval if not found or not a valid pin.
+9 -4
View File
@@ -38,7 +38,6 @@ extern "C" volatile uint32_t _millis;
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "MarlinSerial.h"
#include <adc.h>
@@ -177,7 +176,7 @@ void flashFirmware(const int16_t);
#define CPU_ST7920_DELAY_3 750
// ------------------------
// Class Utilities
// Free Memory Accessor
// ------------------------
#pragma GCC diagnostic push
@@ -199,9 +198,9 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
static void init(); // Called early in setup()
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
static void reboot(); // Restart the firmware from 0x0
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }
@@ -210,6 +209,12 @@ public:
static void delay_ms(const int ms) { _delay_ms(ms); }
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static bool watchdog_timed_out() IF_DISABLED(USE_WATCHDOG, { return false; });
static void watchdog_clear_timeout_flag() IF_DISABLED(USE_WATCHDOG, {});
// Tasks, called from idle()
static void idletask();
@@ -26,7 +26,7 @@
#if ENABLED(POSTMORTEM_DEBUGGING)
#include "../shared/HAL_MinSerial.h"
#include "../shared/MinSerial.h"
#include <debug_frmwrk.h>
static void TX(char c) { _DBC(c); }
+1 -1
View File
@@ -34,7 +34,7 @@
#include "../shared/eeprom_api.h"
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x8000 // 32KB
#define MARLIN_EEPROM_SIZE 0x8000 // 32K
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
@@ -29,6 +29,6 @@
// LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785)
// TODO: Which other boards are incompatible?
#if defined(MCU_LPC1768) && PRINTCOUNTER_SAVE_INTERVAL > 0
#if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
#define PRINTCOUNTER_SYNC 1
#endif
+112 -104
View File
@@ -9,119 +9,127 @@ from __future__ import print_function
import pioutil
if pioutil.is_pio_build():
target_filename = "FIRMWARE.CUR"
target_drive = "REARM"
target_filename = "FIRMWARE.CUR"
target_drive = "REARM"
import os,getpass,platform
import platform
current_OS = platform.system()
Import("env")
current_OS = platform.system()
Import("env")
def print_error(e):
print('\nUnable to find destination disk (%s)\n' \
'Please select it in platformio.ini using the upload_port keyword ' \
'(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
%(e, env.get('PIOENV')))
def print_error(e):
print('\nUnable to find destination disk (%s)\n' \
'Please select it in platformio.ini using the upload_port keyword ' \
'(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
%(e, env.get('PIOENV')))
def before_upload(source, target, env):
try:
#
# Find a disk for upload
#
upload_disk = 'Disk not found'
target_file_found = False
target_drive_found = False
if current_OS == 'Windows':
#
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
# Windows - doesn't care about the disk's name, only cares about the drive letter
import subprocess,string
from ctypes import windll
def before_upload(source, target, env):
try:
from pathlib import Path
#
# Find a disk for upload
#
upload_disk = 'Disk not found'
target_file_found = False
target_drive_found = False
if current_OS == 'Windows':
#
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
# Windows - doesn't care about the disk's name, only cares about the drive letter
import subprocess,string
from ctypes import windll
from pathlib import PureWindowsPath
# getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
drives = []
bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.ascii_uppercase:
if bitmask & 1:
drives.append(letter)
bitmask >>= 1
# getting list of drives
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
drives = []
bitmask = windll.kernel32.GetLogicalDrives()
for letter in string.ascii_uppercase:
if bitmask & 1:
drives.append(letter)
bitmask >>= 1
for drive in drives:
final_drive_name = drive + ':\\'
# print ('disc check: {}'.format(final_drive_name))
try:
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
except Exception as e:
print ('error:{}'.format(e))
continue
else:
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = final_drive_name
if target_filename in volume_info:
if not target_file_found:
upload_disk = final_drive_name
target_file_found = True
for drive in drives:
final_drive_name = drive + ':'
# print ('disc check: {}'.format(final_drive_name))
try:
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
except Exception as e:
print ('error:{}'.format(e))
continue
else:
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = PureWindowsPath(final_drive_name)
if target_filename in volume_info:
if not target_file_found:
upload_disk = PureWindowsPath(final_drive_name)
target_file_found = True
elif current_OS == 'Linux':
#
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
if target_drive in drives: # If target drive is found, use it.
target_drive_found = True
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
else:
for drive in drives:
try:
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
except:
continue
else:
if target_filename in files:
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
target_file_found = True
break
#
# set upload_port to drive if found
#
elif current_OS == 'Linux':
#
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
#
import getpass
user = getpass.getuser()
mpath = Path('/media', user)
drives = [ x for x in mpath.iterdir() if x.is_dir() ]
if target_drive in drives: # If target drive is found, use it.
target_drive_found = True
upload_disk = mpath / target_drive
else:
for drive in drives:
try:
fpath = mpath / drive
filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
except:
continue
else:
if target_filename in filenames:
upload_disk = mpath / drive
target_file_found = True
break
#
# set upload_port to drive if found
#
if target_file_found or target_drive_found:
env.Replace(
UPLOAD_FLAGS="-P$UPLOAD_PORT"
)
if target_file_found or target_drive_found:
env.Replace(
UPLOAD_FLAGS="-P$UPLOAD_PORT"
)
elif current_OS == 'Darwin': # MAC
#
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
#
drives = os.listdir('/Volumes') # human readable names
if target_drive in drives and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = '/Volumes/' + target_drive + '/'
for drive in drives:
try:
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
except:
continue
else:
if target_filename in filenames:
if not target_file_found:
upload_disk = '/Volumes/' + drive + '/'
target_file_found = True
elif current_OS == 'Darwin': # MAC
#
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
#
dpath = Path('/Volumes') # human readable names
drives = [ x for x in dpath.iterdir() if x.is_dir() ]
if target_drive in drives and not target_file_found: # set upload if not found target file yet
target_drive_found = True
upload_disk = dpath / target_drive
for drive in drives:
try:
fpath = dpath / drive # will get an error if the drive is protected
filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
except:
continue
else:
if target_filename in filenames:
upload_disk = dpath / drive
target_file_found = True
break
#
# Set upload_port to drive if found
#
if target_file_found or target_drive_found:
env.Replace(UPLOAD_PORT=upload_disk)
print('\nUpload disk: ', upload_disk, '\n')
else:
print_error('Autodetect Error')
#
# Set upload_port to drive if found
#
if target_file_found or target_drive_found:
env.Replace(UPLOAD_PORT=str(upload_disk))
print('\nUpload disk: ', upload_disk, '\n')
else:
print_error('Autodetect Error')
except Exception as e:
print_error(str(e))
except Exception as e:
print_error(str(e))
env.AddPreAction("upload", before_upload)
env.AddPreAction("upload", before_upload)
-72
View File
@@ -1,72 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include <lpc17xx_wdt.h>
#include "watchdog.h"
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
void watchdog_init() {
#if ENABLED(WATCHDOG_RESET_MANUAL)
// We enable the watchdog timer, but only for the interrupt.
// Configure WDT to only trigger an interrupt
// Disable WDT interrupt (just in case, to avoid triggering it!)
NVIC_DisableIRQ(WDT_IRQn);
// We NEED memory barriers to ensure Interrupts are actually disabled!
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
__DSB();
__ISB();
// Configure WDT to only trigger an interrupt
// Initialize WDT with the given parameters
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_INT_ONLY);
// Configure and enable WDT interrupt.
NVIC_ClearPendingIRQ(WDT_IRQn);
NVIC_SetPriority(WDT_IRQn, 0); // Use highest priority, so we detect all kinds of lockups
NVIC_EnableIRQ(WDT_IRQn);
#else
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET);
#endif
WDT_Start(WDT_TIMEOUT_US);
}
void HAL_watchdog_refresh() {
WDT_Feed();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
// Timeout state
bool watchdog_timed_out() { return TEST(WDT_ReadTimeOutFlag(), 0); }
void watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
#endif // USE_WATCHDOG
#endif // TARGET_LPC1768
+5 -2
View File
@@ -45,7 +45,6 @@ uint8_t _getc();
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "serial.h"
// ------------------------
@@ -186,7 +185,7 @@ constexpr inline char* strstr_constexpr(char* str, const char* target) {
}
// ------------------------
// Class Utilities
// Free Memory Accessor
// ------------------------
#pragma GCC diagnostic push
@@ -208,6 +207,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
+1 -1
View File
@@ -44,7 +44,7 @@
*
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
*
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
*/
/// Read a pin
+1 -1
View File
@@ -51,7 +51,7 @@ enum XPTCoordinate : uint8_t {
XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE,
};
#if !defined(XPT2046_Z1_THRESHOLD)
#ifndef XPT2046_Z1_THRESHOLD
#define XPT2046_Z1_THRESHOLD 10
#endif
@@ -38,13 +38,13 @@
#ifdef __cplusplus
extern "C" {
#endif
void u8g_SetPinOutput(uint8_t internal_pin_number){SET_DIR_OUTPUT(internal_pin_number);}
void u8g_SetPinInput(uint8_t internal_pin_number){SET_DIR_INPUT(internal_pin_number);}
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status){WRITE_PIN(pin, pin_status);}
uint8_t u8g_GetPinLevel(uint8_t pin){return READ_PIN(pin);}
void usleep(uint64_t microsec){
assert(false); // why we here?
}
void u8g_SetPinOutput(uint8_t internal_pin_number) { SET_DIR_OUTPUT(internal_pin_number); }
void u8g_SetPinInput(uint8_t internal_pin_number) { SET_DIR_INPUT(internal_pin_number); }
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status) { WRITE_PIN(pin, pin_status); }
uint8_t u8g_GetPinLevel(uint8_t pin) { return READ_PIN(pin); }
void usleep(uint64_t microsec) { assert(false); /* why we here? */ }
#ifdef __cplusplus
}
#endif
+35 -1
View File
@@ -203,6 +203,40 @@ enum ADCIndex {
ADC_COUNT
};
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_REG TERN(WATCHDOG_DURATION_8S, WDT_CONFIG_PER_CYC8192, WDT_CONFIG_PER_CYC4096) // 4 or 8 second timeout
void MarlinHAL::watchdog_init() {
// The low-power oscillator used by the WDT runs at 32,768 Hz with
// a 1:32 prescale, thus 1024 Hz, though probably not super precise.
// Setup WDT clocks
MCLK->APBAMASK.bit.OSC32KCTRL_ = true;
MCLK->APBAMASK.bit.WDT_ = true;
OSC32KCTRL->OSCULP32K.bit.EN1K = true; // Enable out 1K (this is what WDT uses)
WDT->CTRLA.bit.ENABLE = false; // Disable watchdog for config
SYNC(WDT->SYNCBUSY.bit.ENABLE);
WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt
WDT->CONFIG.reg = WDT_TIMEOUT_REG; // Set a 4s or 8s period for chip reset
hal.watchdog_refresh();
WDT->CTRLA.reg = WDT_CTRLA_ENABLE; // Start watchdog now in normal mode
SYNC(WDT->SYNCBUSY.bit.ENABLE);
}
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or SAMD will go into emergency procedures.
void MarlinHAL::watchdog_refresh() {
SYNC(WDT->SYNCBUSY.bit.CLEAR); // Test first if previous is 'ongoing' to save time waiting for command execution
WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY;
}
#endif
// ------------------------
// Types
// ------------------------
@@ -564,7 +598,7 @@ void MarlinHAL::dma_init() {
void MarlinHAL::init() {
TERN_(DMA_IS_REQUIRED, dma_init());
#if ENABLED(SDSUPPORT)
#if SD_CONNECTION_IS(ONBOARD) && PIN_EXISTS(SD_DETECT)
#if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
+4 -1
View File
@@ -26,7 +26,6 @@
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
#include "MarlinSerial_AGCM4.h"
@@ -157,6 +156,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
+19 -26
View File
@@ -77,7 +77,8 @@ HAL_SERVO_TIMER_ISR() {
;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
if (currentServoIndex[timer] < 0) {
int8_t cho = currentServoIndex[timer]; // Handle the prior servo first
if (cho < 0) { // Servo -1 indicates the refresh interval completed...
#if defined(_useTimer1) && defined(_useTimer2)
if (currentServoIndex[timer ^ 1] >= 0) {
// Wait for both channels
@@ -86,45 +87,37 @@ HAL_SERVO_TIMER_ISR() {
return;
}
#endif
tc->COUNT16.COUNT.reg = TC_COUNTER_START_VAL;
tc->COUNT16.COUNT.reg = TC_COUNTER_START_VAL; // ...so reset the timer
SYNC(tc->COUNT16.SYNCBUSY.bit.COUNT);
}
else if (SERVO_INDEX(timer, currentServoIndex[timer]) < ServoCount && SERVO(timer, currentServoIndex[timer]).Pin.isActive)
digitalWrite(SERVO(timer, currentServoIndex[timer]).Pin.nbr, LOW); // pulse this channel low if activated
else if (SERVO_INDEX(timer, cho) < ServoCount) // prior channel handled?
digitalWrite(SERVO(timer, cho).Pin.nbr, LOW); // pulse the prior channel LOW
// Select the next servo controlled by this timer
currentServoIndex[timer]++;
currentServoIndex[timer] = ++cho; // go to the next channel (or 0)
if (cho < SERVOS_PER_TIMER && SERVO_INDEX(timer, cho) < ServoCount) {
if (SERVO(timer, cho).Pin.isActive) // activated?
digitalWrite(SERVO(timer, cho).Pin.nbr, HIGH); // yes: pulse HIGH
if (SERVO_INDEX(timer, currentServoIndex[timer]) < ServoCount && currentServoIndex[timer] < SERVOS_PER_TIMER) {
if (SERVO(timer, currentServoIndex[timer]).Pin.isActive) // check if activated
digitalWrite(SERVO(timer, currentServoIndex[timer]).Pin.nbr, HIGH); // it's an active channel so pulse it high
tc->COUNT16.CC[tcChannel].reg = getTimerCount() - (uint16_t)SERVO(timer, currentServoIndex[timer]).ticks;
tc->COUNT16.CC[tcChannel].reg = getTimerCount() - (uint16_t)SERVO(timer, cho).ticks;
}
else {
// finished all channels so wait for the refresh period to expire before starting over
currentServoIndex[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
const uint16_t tcCounterValue = getTimerCount();
if ((TC_COUNTER_START_VAL - tcCounterValue) + 4UL < usToTicks(REFRESH_INTERVAL)) // allow a few ticks to ensure the next OCR1A not missed
tc->COUNT16.CC[tcChannel].reg = TC_COUNTER_START_VAL - (uint16_t)usToTicks(REFRESH_INTERVAL);
else
tc->COUNT16.CC[tcChannel].reg = (uint16_t)(tcCounterValue - 4UL); // at least REFRESH_INTERVAL has elapsed
currentServoIndex[timer] = -1; // reset the timer COUNT.reg on the next call
const uint16_t cval = getTimerCount() - 256 / (SERVO_TIMER_PRESCALER), // allow 256 cycles to ensure the next CV not missed
ival = (TC_COUNTER_START_VAL) - (uint16_t)usToTicks(REFRESH_INTERVAL); // at least REFRESH_INTERVAL has elapsed
tc->COUNT16.CC[tcChannel].reg = min(cval, ival);
}
if (tcChannel == 0) {
SYNC(tc->COUNT16.SYNCBUSY.bit.CC0);
// Clear the interrupt
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0;
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0; // Clear the interrupt
}
else {
SYNC(tc->COUNT16.SYNCBUSY.bit.CC1);
// Clear the interrupt
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC1;
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC1; // Clear the interrupt
}
}
void initISR(timer16_Sequence_t timer) {
void initISR(const timer16_Sequence_t timer) {
Tc * const tc = timer_config[SERVO_TC].pTc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
@@ -201,9 +194,9 @@ void initISR(timer16_Sequence_t timer) {
}
}
void finISR(timer16_Sequence_t timer) {
void finISR(const timer16_Sequence_t timer_index) {
Tc * const tc = timer_config[SERVO_TC].pTc;
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
const uint8_t tcChannel = TIMER_TCCHANNEL(timer_index);
// Disable the match channel interrupt request
tc->COUNT16.INTENCLR.reg = (tcChannel == 0) ? TC_INTENCLR_MC0 : TC_INTENCLR_MC1;
+1 -1
View File
@@ -29,7 +29,7 @@
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL)
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
#define DIGITAL_PIN_TO_ANALOG_PIN(p) digitalPinToAnalogInput(p)
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P)!=-1)
#define pwm_status(pin) digitalPinHasPWM(pin)
-54
View File
@@ -1,54 +0,0 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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 <https://www.gnu.org/licenses/>.
*
*/
#ifdef __SAMD51__
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#define WDT_TIMEOUT_REG TERN(WATCHDOG_DURATION_8S, WDT_CONFIG_PER_CYC8192, WDT_CONFIG_PER_CYC4096) // 4 or 8 second timeout
void watchdog_init() {
// The low-power oscillator used by the WDT runs at 32,768 Hz with
// a 1:32 prescale, thus 1024 Hz, though probably not super precise.
// Setup WDT clocks
MCLK->APBAMASK.bit.OSC32KCTRL_ = true;
MCLK->APBAMASK.bit.WDT_ = true;
OSC32KCTRL->OSCULP32K.bit.EN1K = true; // Enable out 1K (this is what WDT uses)
WDT->CTRLA.bit.ENABLE = false; // Disable watchdog for config
SYNC(WDT->SYNCBUSY.bit.ENABLE);
WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt
WDT->CONFIG.reg = WDT_TIMEOUT_REG; // Set a 4s or 8s period for chip reset
HAL_watchdog_refresh();
WDT->CTRLA.reg = WDT_CTRLA_ENABLE; // Start watchdog now in normal mode
SYNC(WDT->SYNCBUSY.bit.ENABLE);
}
#endif // USE_WATCHDOG
#endif // __SAMD51__
-31
View File
@@ -1,31 +0,0 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// Initialize watchdog with a 4 second interrupt time
void watchdog_init();
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or SAMD will go into emergency procedures.
inline void HAL_watchdog_refresh() {
SYNC(WDT->SYNCBUSY.bit.CLEAR); // Test first if previous is 'ongoing' to save time waiting for command execution
WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY;
}
+26 -4
View File
@@ -24,14 +24,13 @@
#ifdef HAL_STM32
#include "HAL.h"
#include "usb_serial.h"
#include "../../inc/MarlinConfig.h"
#include "../shared/Delay.h"
#include "usb_serial.h"
#ifdef USBCON
DefaultSerial1 MSerial0(false, SerialUSB);
DefaultSerial1 MSerialUSB(false, SerialUSB);
#endif
#if ENABLED(SRAM_EEPROM_EMULATION)
@@ -141,6 +140,29 @@ uint8_t MarlinHAL::get_reset_source() {
void MarlinHAL::clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
#include <IWatchdog.h>
void MarlinHAL::watchdog_init() {
IF_DISABLED(DISABLE_WATCHDOG_INIT, IWatchdog.begin(WDT_TIMEOUT_US));
}
void MarlinHAL::watchdog_refresh() {
IWatchdog.reload();
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
}
#endif
extern "C" {
extern unsigned int _ebss; // end of bss section
}
+37 -24
View File
@@ -30,7 +30,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "Servo.h"
#include "watchdog.h"
#include "MarlinSerial.h"
#include "../../inc/MarlinConfigPre.h"
@@ -51,57 +50,67 @@
#include <USBSerial.h>
#include "../../core/serial_hook.h"
typedef ForwardSerial1Class< decltype(SerialUSB) > DefaultSerial1;
extern DefaultSerial1 MSerial0;
extern DefaultSerial1 MSerialUSB;
#endif
#define _MSERIAL(X) MSerial##X
#define MSERIAL(X) _MSERIAL(X)
#if SERIAL_PORT == -1
#define MYSERIAL1 MSerial0
#elif WITHIN(SERIAL_PORT, 1, 6)
#if WITHIN(SERIAL_PORT, 1, 6)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#elif SERIAL_PORT == -1
#define MYSERIAL1 MSerialUSB
#else
#error "SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB."
#error "SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#endif
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#define MYSERIAL2 MSerial0
#elif WITHIN(SERIAL_PORT_2, 1, 6)
#if WITHIN(SERIAL_PORT_2, 1, 6)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#elif SERIAL_PORT_2 == -1
#define MYSERIAL2 MSerialUSB
#else
#error "SERIAL_PORT_2 must be from 1 to 6. You can also use -1 if the board supports Native USB."
#error "SERIAL_PORT_2 must be from 1 to 6, or -1 for Native USB."
#endif
#endif
#ifdef SERIAL_PORT_3
#if SERIAL_PORT_3 == -1
#define MYSERIAL3 MSerial0
#elif WITHIN(SERIAL_PORT_3, 1, 6)
#if WITHIN(SERIAL_PORT_3, 1, 6)
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#elif SERIAL_PORT_3 == -1
#define MYSERIAL3 MSerialUSB
#else
#error "SERIAL_PORT_3 must be from 1 to 6. You can also use -1 if the board supports Native USB."
#error "SERIAL_PORT_3 must be from 1 to 6, or -1 for Native USB."
#endif
#endif
#ifdef MMU2_SERIAL_PORT
#if MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL MSerial0
#elif WITHIN(MMU2_SERIAL_PORT, 1, 6)
#if WITHIN(MMU2_SERIAL_PORT, 1, 6)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#elif MMU2_SERIAL_PORT == -1
#define MMU2_SERIAL MSerialUSB
#else
#error "MMU2_SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB."
#error "MMU2_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#endif
#endif
#ifdef LCD_SERIAL_PORT
#if LCD_SERIAL_PORT == -1
#define LCD_SERIAL MSerial0
#elif WITHIN(LCD_SERIAL_PORT, 1, 6)
#if WITHIN(LCD_SERIAL_PORT, 1, 6)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#elif !defined(USBCON)
#error "SERIAL_PORT must be from 1 to 6."
#elif LCD_SERIAL_PORT == -1
#define LCD_SERIAL MSerialUSB
#else
#error "LCD_SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB."
#error "LCD_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#endif
#if HAS_DGUS_LCD
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
@@ -208,9 +217,13 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
static void init(); // Called early in setup()
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
static void reboot(); // Restart the firmware from 0x0
// Interrupts
static bool isr_state() { return !__get_PRIMASK(); }
@@ -28,8 +28,7 @@
#if ENABLED(POSTMORTEM_DEBUGGING)
#include "../shared/HAL_MinSerial.h"
#include "watchdog.h"
#include "../shared/MinSerial.h"
/* Instruction Synchronization Barrier */
#define isb() __asm__ __volatile__ ("isb" : : : "memory")
@@ -120,7 +119,7 @@ static void TX(char c) {
#if WITHIN(SERIAL_PORT, 1, 6)
constexpr uint32_t usart_sr_txe = _BV(7);
while (!(regs->SR & usart_sr_txe)) {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
hal.watchdog_refresh();
sw_barrier();
}
regs->DR = c;
@@ -27,3 +27,8 @@
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif
// Some STM32F4 boards may lose steps when saving to EEPROM during print (PR #17946)
#if defined(STM32F4xx) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
#define PRINTCOUNTER_SYNC 1
#endif
-5
View File
@@ -37,11 +37,6 @@
#error "SDCARD_EEPROM_EMULATION requires SDSUPPORT. Enable SDSUPPORT or choose another EEPROM emulation."
#endif
#if defined(STM32F4xx) && BOTH(PRINTCOUNTER, FLASH_EEPROM_EMULATION)
#warning "FLASH_EEPROM_EMULATION may cause long delays when writing and should not be used while printing."
#error "Disable PRINTCOUNTER or choose another EEPROM emulation."
#endif
#if !defined(STM32F4xx) && ENABLED(FLASH_EEPROM_LEVELING)
#error "FLASH_EEPROM_LEVELING is currently only supported on STM32F4 hardware."
#endif
+4 -4
View File
@@ -57,7 +57,7 @@ public:
auto sd2card = diskIODriver();
// single block
if (blkLen == 1) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->writeBlock(blkAddr, pBuf);
return true;
}
@@ -65,7 +65,7 @@ public:
// multi block optimization
sd2card->writeStart(blkAddr, blkLen);
while (blkLen--) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->writeData(pBuf);
pBuf += BLOCK_SIZE;
}
@@ -77,7 +77,7 @@ public:
auto sd2card = diskIODriver();
// single block
if (blkLen == 1) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->readBlock(blkAddr, pBuf);
return true;
}
@@ -85,7 +85,7 @@ public:
// multi block optimization
sd2card->readStart(blkAddr);
while (blkLen--) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->readData(pBuf);
pBuf += BLOCK_SIZE;
}
+35 -20
View File
@@ -79,7 +79,6 @@
// make a list of the Arduino pin numbers in the Port/Pin order
//
#define _PIN_ADD_2(NAME_ALPHA, ARDUINO_NUM) { {NAME_ALPHA}, ARDUINO_NUM },
#define _PIN_ADD(NAME_ALPHA, ARDUINO_NUM) { NAME_ALPHA, ARDUINO_NUM },
#define PIN_ADD(NAME) _PIN_ADD(#NAME, NAME)
@@ -103,13 +102,18 @@ const XrefInfo pin_xref[] PROGMEM = {
#define PIN_NUM_ALPHA_LEFT(P) (((P & 0x000F) < 10) ? ('0' + (P & 0x000F)) : '1')
#define PIN_NUM_ALPHA_RIGHT(P) (((P & 0x000F) > 9) ? ('0' + (P & 0x000F) - 10) : 0 )
#define PORT_NUM(P) ((P >> 4) & 0x0007)
#define PORT_ALPHA(P) ('A' + (P >> 4))
#define PORT_ALPHA(P) ('A' + (P >> 4))
/**
* Translation of routines & variables used by pinsDebug.h
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL)
#if NUM_ANALOG_FIRST >= NUM_DIGITAL_PINS
#define HAS_HIGH_ANALOG_PINS 1
#endif
#define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1)
#define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS))
#define VALID_PIN(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)))
#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads
#define PRINT_PIN(Q)
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
@@ -164,17 +168,20 @@ bool GET_PINMODE(const pin_t Ard_num) {
return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM
}
int8_t digital_pin_to_analog_pin(pin_t Ard_num) {
Ard_num -= NUM_ANALOG_FIRST;
return (Ard_num >= 0 && Ard_num < NUM_ANALOG_INPUTS) ? Ard_num : -1;
int8_t digital_pin_to_analog_pin(const pin_t Ard_num) {
if (WITHIN(Ard_num, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))
return Ard_num - NUM_ANALOG_FIRST;
const uint32_t ind = digitalPinToAnalogInput(Ard_num);
return (ind < NUM_ANALOG_INPUTS) ? ind : -1;
}
bool IS_ANALOG(const pin_t Ard_num) {
return get_pin_mode(Ard_num) == MODE_PIN_ANALOG;
}
bool is_digital(const pin_t x) {
const uint8_t pin_mode = get_pin_mode(pin_array[x].pin);
bool is_digital(const pin_t Ard_num) {
const uint8_t pin_mode = get_pin_mode(pin_array[Ard_num].pin);
return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT;
}
@@ -200,10 +207,18 @@ void port_print(const pin_t Ard_num) {
SERIAL_ECHO_SP(7);
// Print number to be used with M42
sprintf_P(buffer, PSTR(" M42 P%d "), Ard_num);
SERIAL_ECHO(buffer);
if (Ard_num < 10) SERIAL_CHAR(' ');
if (Ard_num < 100) SERIAL_CHAR(' ');
int calc_p = Ard_num;
if (Ard_num > NUM_DIGITAL_PINS) {
calc_p -= NUM_ANALOG_FIRST;
if (calc_p > 7) calc_p += 8;
}
SERIAL_ECHOPGM(" M42 P", calc_p);
SERIAL_CHAR(' ');
if (calc_p < 100) {
SERIAL_CHAR(' ');
if (calc_p < 10)
SERIAL_CHAR(' ');
}
}
bool pwm_status(const pin_t Ard_num) {
@@ -225,19 +240,19 @@ void pwm_details(const pin_t Ard_num) {
case 'D' : alt_all = GPIOD->AFR[ind]; break;
#ifdef PE_0
case 'E' : alt_all = GPIOE->AFR[ind]; break;
#elif defined (PF_0)
#elif defined(PF_0)
case 'F' : alt_all = GPIOF->AFR[ind]; break;
#elif defined (PG_0)
#elif defined(PG_0)
case 'G' : alt_all = GPIOG->AFR[ind]; break;
#elif defined (PH_0)
#elif defined(PH_0)
case 'H' : alt_all = GPIOH->AFR[ind]; break;
#elif defined (PI_0)
#elif defined(PI_0)
case 'I' : alt_all = GPIOI->AFR[ind]; break;
#elif defined (PJ_0)
#elif defined(PJ_0)
case 'J' : alt_all = GPIOJ->AFR[ind]; break;
#elif defined (PK_0)
#elif defined(PK_0)
case 'K' : alt_all = GPIOK->AFR[ind]; break;
#elif defined (PL_0)
#elif defined(PL_0)
case 'L' : alt_all = GPIOL->AFR[ind]; break;
#endif
}
+350 -219
View File
@@ -33,7 +33,6 @@
#include <stdint.h>
#include <stdbool.h>
// use local drivers
#if defined(STM32F103xE) || defined(STM32F103xG)
#include <stm32f1xx_hal_rcc_ex.h>
#include <stm32f1xx_hal_sd.h>
@@ -47,254 +46,397 @@
#include <stm32f7xx_hal_dma.h>
#include <stm32f7xx_hal_gpio.h>
#include <stm32f7xx_hal_sd.h>
#elif defined(STM32H7xx)
#define SDIO_FOR_STM32H7
#include <stm32h7xx_hal_rcc.h>
#include <stm32h7xx_hal_dma.h>
#include <stm32h7xx_hal_gpio.h>
#include <stm32h7xx_hal_sd.h>
#else
#error "SDIO only supported with STM32F103xE, STM32F103xG, STM32F4xx, or STM32F7xx."
#error "SDIO is only supported with STM32F103xE, STM32F103xG, STM32F4xx, STM32F7xx, and STM32H7xx."
#endif
SD_HandleTypeDef hsd; // create SDIO structure
// F4 supports one DMA for RX and another for TX, but Marlin will never
// do read and write at same time, so we use the same DMA for both.
DMA_HandleTypeDef hdma_sdio;
/*
SDIO_INIT_CLK_DIV is 118
SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2)
SDIO init clock frequency should not exceed 400kHz = 48MHz / (118 + 2)
Default TRANSFER_CLOCK_DIV is 2 (118 / 40)
Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz
This might be too fast for stable SDIO operations
MKS Robin board seems to have stable SDIO with BusWide 1bit and ClockDiv 8 i.e. 4.8MHz SDIO clock frequency
Additional testing is required as there are clearly some 4bit initialization problems
*/
#ifndef USBD_OK
#define USBD_OK 0
#endif
// SDIO Max Clock (naming from STM Manual, don't change)
#define SDIOCLK 48000000
// Target Clock, configurable. Default is 18MHz, from STM32F1
#ifndef SDIO_CLOCK
#define SDIO_CLOCK 18000000 // 18 MHz
#endif
// SDIO retries, configurable. Default is 3, from STM32F1
#ifndef SDIO_READ_RETRIES
#define SDIO_READ_RETRIES 3
#endif
// SDIO Max Clock (naming from STM Manual, don't change)
#define SDIOCLK 48000000
SD_HandleTypeDef hsd; // SDIO structure
static uint32_t clock_to_divider(uint32_t clk) {
// limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals
// Also limited to no more than 48Mhz (SDIOCLK).
const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq();
clk = min(clk, (uint32_t)(pclk2 * 8 / 3));
clk = min(clk, (uint32_t)SDIOCLK);
// Round up divider, so we don't run the card over the speed supported,
// and subtract by 2, because STM32 will add 2, as written in the manual:
// SDIO_CK frequency = SDIOCLK / [CLKDIV + 2]
return pclk2 / clk + (pclk2 % clk != 0) - 2;
}
void go_to_transfer_speed() {
/* Default SDIO peripheral configuration for SD card initialization */
hsd.Init.ClockEdge = hsd.Init.ClockEdge;
hsd.Init.ClockBypass = hsd.Init.ClockBypass;
hsd.Init.ClockPowerSave = hsd.Init.ClockPowerSave;
hsd.Init.BusWide = hsd.Init.BusWide;
hsd.Init.HardwareFlowControl = hsd.Init.HardwareFlowControl;
hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK);
/* Initialize SDIO peripheral interface with default configuration */
SDIO_Init(hsd.Instance, hsd.Init);
}
void SD_LowLevel_Init(void) {
uint32_t tempreg;
__HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks
__HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = 1; //GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
#if DISABLED(STM32F1xx)
GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
#endif
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus
GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
#endif
// Configure PD.02 CMD line
GPIO_InitStruct.Pin = GPIO_PIN_2;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
// Setup DMA
#if defined(STM32F1xx)
hdma_sdio.Init.Mode = DMA_NORMAL;
hdma_sdio.Instance = DMA2_Channel4;
HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn);
#elif defined(STM32F4xx)
hdma_sdio.Init.Mode = DMA_PFCTRL;
hdma_sdio.Instance = DMA2_Stream3;
hdma_sdio.Init.Channel = DMA_CHANNEL_4;
hdma_sdio.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
hdma_sdio.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
hdma_sdio.Init.MemBurst = DMA_MBURST_INC4;
hdma_sdio.Init.PeriphBurst = DMA_PBURST_INC4;
HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
#endif
HAL_NVIC_EnableIRQ(SDIO_IRQn);
hdma_sdio.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_sdio.Init.MemInc = DMA_MINC_ENABLE;
hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma_sdio.Init.Priority = DMA_PRIORITY_LOW;
__HAL_LINKDMA(&hsd, hdmarx, hdma_sdio);
__HAL_LINKDMA(&hsd, hdmatx, hdma_sdio);
#if defined(STM32F1xx)
__HAL_RCC_SDIO_CLK_ENABLE();
__HAL_RCC_DMA2_CLK_ENABLE();
#ifdef SDIO_FOR_STM32H7
// SDMMC_CK frequency = sdmmc_ker_ck / [2 * CLKDIV].
uint32_t sdmmc_clk = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_SDMMC);
return sdmmc_clk / (2U * SDIO_CLOCK) + (sdmmc_clk % (2U * SDIO_CLOCK) != 0);
#else
__HAL_RCC_SDIO_FORCE_RESET();
delay(2);
__HAL_RCC_SDIO_RELEASE_RESET();
delay(2);
__HAL_RCC_SDIO_CLK_ENABLE();
__HAL_RCC_DMA2_FORCE_RESET();
delay(2);
__HAL_RCC_DMA2_RELEASE_RESET();
delay(2);
__HAL_RCC_DMA2_CLK_ENABLE();
// limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals
// Also limited to no more than 48Mhz (SDIOCLK).
const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq();
clk = min(clk, (uint32_t)(pclk2 * 8 / 3));
clk = min(clk, (uint32_t)SDIOCLK);
// Round up divider, so we don't run the card over the speed supported,
// and subtract by 2, because STM32 will add 2, as written in the manual:
// SDIO_CK frequency = SDIOCLK / [CLKDIV + 2]
return pclk2 / clk + (pclk2 % clk != 0) - 2;
#endif
//Initialize the SDIO (with initial <400Khz Clock)
tempreg = 0; //Reset value
tempreg |= SDIO_CLKCR_CLKEN; // Clock enabled
tempreg |= SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz
// Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable
SDIO->CLKCR = tempreg;
// Power up the SDIO
SDIO_PowerState_ON(SDIO);
hsd.Instance = SDIO;
}
void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init
UNUSED(hsd); // Prevent unused argument(s) compilation warning
__HAL_RCC_SDIO_CLK_ENABLE(); // turn on SDIO clock
// Start the SDIO clock
void HAL_SD_MspInit(SD_HandleTypeDef *hsd) {
UNUSED(hsd);
#ifdef SDIO_FOR_STM32H7
pinmap_pinout(PC_12, PinMap_SD);
pinmap_pinout(PD_2, PinMap_SD);
pinmap_pinout(PC_8, PinMap_SD);
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // Define D1-D3 only for 4-bit wide SDIO bus
pinmap_pinout(PC_9, PinMap_SD);
pinmap_pinout(PC_10, PinMap_SD);
pinmap_pinout(PC_11, PinMap_SD);
#endif
__HAL_RCC_SDMMC1_CLK_ENABLE();
HAL_NVIC_EnableIRQ(SDMMC1_IRQn);
#else
__HAL_RCC_SDIO_CLK_ENABLE();
#endif
}
bool SDIO_Init() {
uint8_t retryCnt = SDIO_READ_RETRIES;
#ifdef SDIO_FOR_STM32H7
bool status;
hsd.Instance = SDIO;
hsd.State = HAL_SD_STATE_RESET;
#define SD_TIMEOUT 1000 // ms
SD_LowLevel_Init();
extern "C" void SDMMC1_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); }
uint8_t retry_Cnt = retryCnt;
for (;;) {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
status = (bool) HAL_SD_Init(&hsd);
if (!status) break;
if (!--retry_Cnt) return false; // return failing status if retries are exhausted
uint8_t waitingRxCplt = 0, waitingTxCplt = 0;
void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsdio) { waitingTxCplt = 0; }
void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsdio) { waitingRxCplt = 0; }
void HAL_SD_MspDeInit(SD_HandleTypeDef *hsd) {
__HAL_RCC_SDMMC1_FORCE_RESET(); delay(10);
__HAL_RCC_SDMMC1_RELEASE_RESET(); delay(10);
}
go_to_transfer_speed();
bool SDIO_Init() {
HAL_StatusTypeDef sd_state = HAL_OK;
if (hsd.Instance == SDMMC1) HAL_SD_DeInit(&hsd);
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined
retry_Cnt = retryCnt;
// HAL SD initialization
hsd.Instance = SDMMC1;
hsd.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
hsd.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
hsd.Init.BusWide = SDMMC_BUS_WIDE_1B;
hsd.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK);
sd_state = HAL_SD_Init(&hsd);
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3)
if (sd_state == HAL_OK)
sd_state = HAL_SD_ConfigWideBusOperation(&hsd, SDMMC_BUS_WIDE_4B);
#endif
return (sd_state == HAL_OK);
}
#else // !SDIO_FOR_STM32H7
#define SD_TIMEOUT 500 // ms
// SDIO retries, configurable. Default is 3, from STM32F1
#ifndef SDIO_READ_RETRIES
#define SDIO_READ_RETRIES 3
#endif
// F4 supports one DMA for RX and another for TX, but Marlin will never
// do read and write at same time, so we use the same DMA for both.
DMA_HandleTypeDef hdma_sdio;
#ifdef STM32F1xx
#define DMA_IRQ_HANDLER DMA2_Channel4_5_IRQHandler
#elif defined(STM32F4xx)
#define DMA_IRQ_HANDLER DMA2_Stream3_IRQHandler
#else
#error "Unknown STM32 architecture."
#endif
extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); }
extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); }
/*
SDIO_INIT_CLK_DIV is 118
SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2)
SDIO init clock frequency should not exceed 400kHz = 48MHz / (118 + 2)
Default TRANSFER_CLOCK_DIV is 2 (118 / 40)
Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz
This might be too fast for stable SDIO operations
MKS Robin SDIO seems stable with BusWide 1bit and ClockDiv 8 (i.e., 4.8MHz SDIO clock frequency)
More testing is required as there are clearly some 4bit init problems.
*/
void go_to_transfer_speed() {
/* Default SDIO peripheral configuration for SD card initialization */
hsd.Init.ClockEdge = hsd.Init.ClockEdge;
hsd.Init.ClockBypass = hsd.Init.ClockBypass;
hsd.Init.ClockPowerSave = hsd.Init.ClockPowerSave;
hsd.Init.BusWide = hsd.Init.BusWide;
hsd.Init.HardwareFlowControl = hsd.Init.HardwareFlowControl;
hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK);
/* Initialize SDIO peripheral interface with default configuration */
SDIO_Init(hsd.Instance, hsd.Init);
}
void SD_LowLevel_Init() {
uint32_t tempreg;
// Enable GPIO clocks
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = 1; // GPIO_NOPULL
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
#if DISABLED(STM32F1xx)
GPIO_InitStruct.Alternate = GPIO_AF12_SDIO;
#endif
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus
GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
#endif
// Configure PD.02 CMD line
GPIO_InitStruct.Pin = GPIO_PIN_2;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
// Setup DMA
#ifdef STM32F1xx
hdma_sdio.Init.Mode = DMA_NORMAL;
hdma_sdio.Instance = DMA2_Channel4;
HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn);
#elif defined(STM32F4xx)
hdma_sdio.Init.Mode = DMA_PFCTRL;
hdma_sdio.Instance = DMA2_Stream3;
hdma_sdio.Init.Channel = DMA_CHANNEL_4;
hdma_sdio.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
hdma_sdio.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
hdma_sdio.Init.MemBurst = DMA_MBURST_INC4;
hdma_sdio.Init.PeriphBurst = DMA_PBURST_INC4;
HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
#endif
HAL_NVIC_EnableIRQ(SDIO_IRQn);
hdma_sdio.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_sdio.Init.MemInc = DMA_MINC_ENABLE;
hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma_sdio.Init.Priority = DMA_PRIORITY_LOW;
__HAL_LINKDMA(&hsd, hdmarx, hdma_sdio);
__HAL_LINKDMA(&hsd, hdmatx, hdma_sdio);
#ifdef STM32F1xx
__HAL_RCC_SDIO_CLK_ENABLE();
__HAL_RCC_DMA2_CLK_ENABLE();
#else
__HAL_RCC_SDIO_FORCE_RESET(); delay(2);
__HAL_RCC_SDIO_RELEASE_RESET(); delay(2);
__HAL_RCC_SDIO_CLK_ENABLE();
__HAL_RCC_DMA2_FORCE_RESET(); delay(2);
__HAL_RCC_DMA2_RELEASE_RESET(); delay(2);
__HAL_RCC_DMA2_CLK_ENABLE();
#endif
// Initialize the SDIO (with initial <400Khz Clock)
tempreg = 0 // Reset value
| SDIO_CLKCR_CLKEN // Clock enabled
| SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz
// Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable
SDIO->CLKCR = tempreg;
// Power up the SDIO
SDIO_PowerState_ON(SDIO);
hsd.Instance = SDIO;
}
bool SDIO_Init() {
uint8_t retryCnt = SDIO_READ_RETRIES;
bool status;
hsd.Instance = SDIO;
hsd.State = HAL_SD_STATE_RESET;
SD_LowLevel_Init();
uint8_t retry_Cnt = retryCnt;
for (;;) {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required
if (!--retry_Cnt) break;
hal.watchdog_refresh();
status = (bool) HAL_SD_Init(&hsd);
if (!status) break;
if (!--retry_Cnt) return false; // return failing status if retries are exhausted
}
if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode
hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET
SD_LowLevel_Init();
go_to_transfer_speed();
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined
retry_Cnt = retryCnt;
for (;;) {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
status = (bool) HAL_SD_Init(&hsd);
if (!status) break;
if (!--retry_Cnt) return false; // return failing status if retries are exhausted
hal.watchdog_refresh();
if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required
if (!--retry_Cnt) break;
}
go_to_transfer_speed();
if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode
hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET
SD_LowLevel_Init();
retry_Cnt = retryCnt;
for (;;) {
hal.watchdog_refresh();
status = (bool) HAL_SD_Init(&hsd);
if (!status) break;
if (!--retry_Cnt) return false; // return failing status if retries are exhausted
}
go_to_transfer_speed();
}
#endif
return true;
}
/**
* @brief Read or Write a block
* @details Read or Write a block with SDIO
*
* @param block The block index
* @param src The data buffer source for a write
* @param dst The data buffer destination for a read
*
* @return true on success
*/
static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t *dst) {
if (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) return false;
hal.watchdog_refresh();
HAL_StatusTypeDef ret;
if (src) {
hdma_sdio.Init.Direction = DMA_MEMORY_TO_PERIPH;
HAL_DMA_Init(&hdma_sdio);
ret = HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t*)src, block, 1);
}
else {
hdma_sdio.Init.Direction = DMA_PERIPH_TO_MEMORY;
HAL_DMA_Init(&hdma_sdio);
ret = HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t*)dst, block, 1);
}
#endif
return true;
}
static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t *dst) {
if (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) return false;
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
HAL_StatusTypeDef ret;
if (src) {
hdma_sdio.Init.Direction = DMA_MEMORY_TO_PERIPH;
HAL_DMA_Init(&hdma_sdio);
ret = HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t *)src, block, 1);
}
else {
hdma_sdio.Init.Direction = DMA_PERIPH_TO_MEMORY;
HAL_DMA_Init(&hdma_sdio);
ret = HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t *)dst, block, 1);
}
if (ret != HAL_OK) {
HAL_DMA_Abort_IT(&hdma_sdio);
HAL_DMA_DeInit(&hdma_sdio);
return false;
}
millis_t timeout = millis() + 500;
// Wait the transfer
while (hsd.State != HAL_SD_STATE_READY) {
if (ELAPSED(millis(), timeout)) {
if (ret != HAL_OK) {
HAL_DMA_Abort_IT(&hdma_sdio);
HAL_DMA_DeInit(&hdma_sdio);
return false;
}
millis_t timeout = millis() + SD_TIMEOUT;
// Wait the transfer
while (hsd.State != HAL_SD_STATE_READY) {
if (ELAPSED(millis(), timeout)) {
HAL_DMA_Abort_IT(&hdma_sdio);
HAL_DMA_DeInit(&hdma_sdio);
return false;
}
}
while (__HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TC_FLAG_INDEX(&hdma_sdio)) != 0
|| __HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TE_FLAG_INDEX(&hdma_sdio)) != 0) { /* nada */ }
HAL_DMA_Abort_IT(&hdma_sdio);
HAL_DMA_DeInit(&hdma_sdio);
timeout = millis() + SD_TIMEOUT;
while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) if (ELAPSED(millis(), timeout)) return false;
return true;
}
while (__HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TC_FLAG_INDEX(&hdma_sdio)) != 0
|| __HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TE_FLAG_INDEX(&hdma_sdio)) != 0) { /* nada */ }
HAL_DMA_Abort_IT(&hdma_sdio);
HAL_DMA_DeInit(&hdma_sdio);
timeout = millis() + 500;
while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) if (ELAPSED(millis(), timeout)) return false;
return true;
}
#endif // !SDIO_FOR_STM32H7
/**
* @brief Read a block
* @details Read a block from media with SDIO
*
* @param block The block index
* @param src The block buffer
*
* @return true on success
*/
bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
uint8_t retries = SDIO_READ_RETRIES;
while (retries--) if (SDIO_ReadWriteBlock_DMA(block, nullptr, dst)) return true;
return false;
#ifdef SDIO_FOR_STM32H7
uint32_t timeout = HAL_GetTick() + SD_TIMEOUT;
while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER)
if (HAL_GetTick() >= timeout) return false;
waitingRxCplt = 1;
if (HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t*)dst, block, 1) != HAL_OK)
return false;
timeout = HAL_GetTick() + SD_TIMEOUT;
while (waitingRxCplt)
if (HAL_GetTick() >= timeout) return false;
return true;
#else
uint8_t retries = SDIO_READ_RETRIES;
while (retries--) if (SDIO_ReadWriteBlock_DMA(block, nullptr, dst)) return true;
return false;
#endif
}
/**
* @brief Write a block
* @details Write a block to media with SDIO
*
* @param block The block index
* @param src The block data
*
* @return true on success
*/
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
uint8_t retries = SDIO_READ_RETRIES;
while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true;
return false;
#ifdef SDIO_FOR_STM32H7
uint32_t timeout = HAL_GetTick() + SD_TIMEOUT;
while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER)
if (HAL_GetTick() >= timeout) return false;
waitingTxCplt = 1;
if (HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t*)src, block, 1) != HAL_OK)
return false;
timeout = HAL_GetTick() + SD_TIMEOUT;
while (waitingTxCplt)
if (HAL_GetTick() >= timeout) return false;
return true;
#else
uint8_t retries = SDIO_READ_RETRIES;
while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true;
return false;
#endif
}
bool SDIO_IsReady() {
@@ -305,16 +447,5 @@ uint32_t SDIO_GetCardSize() {
return (uint32_t)(hsd.SdCard.BlockNbr) * (hsd.SdCard.BlockSize);
}
#if defined(STM32F1xx)
#define DMA_IRQ_HANDLER DMA2_Channel4_5_IRQHandler
#elif defined(STM32F4xx)
#define DMA_IRQ_HANDLER DMA2_Stream3_IRQHandler
#else
#error "Unknown STM32 architecture."
#endif
extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); }
extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); }
#endif // SDIO_SUPPORT
#endif // HAL_STM32
+10 -6
View File
@@ -159,24 +159,28 @@ void GT911::read_reg(uint16_t reg, uint8_t reg_len, uint8_t* r_data, uint8_t r_l
void GT911::Init() {
OUT_WRITE(GT911_RST_PIN, LOW);
OUT_WRITE(GT911_INT_PIN, LOW);
delay(20);
delay(11);
WRITE(GT911_INT_PIN, HIGH);
delayMicroseconds(110);
WRITE(GT911_RST_PIN, HIGH);
delay(6);
WRITE(GT911_INT_PIN, LOW);
delay(55);
SET_INPUT(GT911_INT_PIN);
sw_iic.init();
uint8_t clear_reg = 0x0000;
write_reg(0x814E, 2, &clear_reg, 2); // Reset to 0 for start
uint8_t clear_reg = 0x00;
write_reg(0x814E, 2, &clear_reg, 1); // Reset to 0 for start
}
bool GT911::getFirstTouchPoint(int16_t *x, int16_t *y) {
read_reg(0x814E, 2, &reg.REG.status, 1);
if (reg.REG.status & 0x80) {
if (reg.REG.status >= 0x80 && reg.REG.status <= 0x85) {
read_reg(0x8150, 2, reg.map + 2, 38);
uint8_t clear_reg = 0x00;
write_reg(0x814E, 2, &clear_reg, 1); // Reset to 0 for start
read_reg(0x8150, 2, reg.map + 2, 8 * (reg.REG.status & 0x0F));
// First touch point
*x = ((reg.REG.point[0].xh & 0x0F) << 8) | reg.REG.point[0].xl;
*y = ((reg.REG.point[0].yh & 0x0F) << 8) | reg.REG.point[0].yl;
+1 -1
View File
@@ -23,7 +23,7 @@
#include "../../../inc/MarlinConfig.h"
#define GT911_SLAVE_ADDRESS 0xBA
#define GT911_SLAVE_ADDRESS 0x28
#if !PIN_EXISTS(GT911_RST)
#error "GT911_RST_PIN is not defined."
+1 -1
View File
@@ -147,7 +147,7 @@ uint32_t TFT_FSMC::ReadID(tft_data_t Reg) {
}
bool TFT_FSMC::isBusy() {
#if defined(STM32F1xx)
#ifdef STM32F1xx
volatile bool dmaEnabled = (DMAtx.Instance->CCR & DMA_CCR_EN) != RESET;
#elif defined(STM32F4xx)
volatile bool dmaEnabled = DMAtx.Instance->CR & DMA_SxCR_EN;
+2 -2
View File
@@ -372,9 +372,9 @@ void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
if (MemoryIncrease == DMA_PINC_ENABLE) {
DrawImage(x_min, y_cur, x_min + width, y_cur + height, Data);
Data += width * height;
} else {
DrawRect(x_min, y_cur, x_min + width, y_cur + height, *Data);
}
else
DrawRect(x_min, y_cur, x_min + width, y_cur + height, *Data);
y_cur += height;
}
+1 -1
View File
@@ -179,7 +179,7 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
}
bool TFT_SPI::isBusy() {
#if defined(STM32F1xx)
#ifdef STM32F1xx
volatile bool dmaEnabled = (DMAtx.Instance->CCR & DMA_CCR_EN) != RESET;
#elif defined(STM32F4xx)
volatile bool dmaEnabled = DMAtx.Instance->CR & DMA_SxCR_EN;
+5 -5
View File
@@ -303,16 +303,16 @@ enum TimerPurpose { TP_SERIAL, TP_TONE, TP_SERVO, TP_STEP, TP_TEMP };
// This cannot yet account for timers used for PWM output, such as for fans.
static constexpr struct { TimerPurpose p; int t; } timers_in_use[] = {
#if HAS_TMC_SW_SERIAL
{TP_SERIAL, get_timer_num_from_base_address(timer_serial[0])}, // Set in variant.h, or as a define in platformio.h if not present in variant.h
{ TP_SERIAL, get_timer_num_from_base_address(timer_serial[0]) }, // Set in variant.h, or as a define in platformio.h if not present in variant.h
#endif
#if ENABLED(SPEAKER)
{TP_TONE, get_timer_num_from_base_address(timer_tone[0])}, // Set in variant.h, or as a define in platformio.h if not present in variant.h
{ TP_TONE, get_timer_num_from_base_address(timer_tone[0]) }, // Set in variant.h, or as a define in platformio.h if not present in variant.h
#endif
#if HAS_SERVOS
{TP_SERVO, get_timer_num_from_base_address(timer_servo[0])}, // Set in variant.h, or as a define in platformio.h if not present in variant.h
{ TP_SERVO, get_timer_num_from_base_address(timer_servo[0]) }, // Set in variant.h, or as a define in platformio.h if not present in variant.h
#endif
{TP_STEP, STEP_TIMER},
{TP_TEMP, TEMP_TIMER},
{ TP_STEP, STEP_TIMER },
{ TP_TEMP, TEMP_TIMER },
};
static constexpr bool verify_no_timer_conflicts() {
+48 -2
View File
@@ -83,6 +83,7 @@
// ------------------------
#if defined(SERIAL_USB) && !HAS_SD_HOST_DRIVE
USBSerial SerialUSB;
DefaultSerial1 MSerial0(true, SerialUSB);
@@ -112,6 +113,47 @@
#endif
#endif
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#include <libmaple/iwdg.h>
void watchdogSetup() {
// do whatever. don't remove this function.
}
/**
* The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
/**
* @brief Initialize the independent hardware watchdog.
*
* @return No return
*
* @details The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
void MarlinHAL::watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)
iwdg_init(IWDG_PRE_256, STM32F1_WD_RELOAD);
#endif
}
// Reset watchdog. MUST be called every 4 or 8 seconds after the
// first watchdog_init or the STM32F1 will reset.
void MarlinHAL::watchdog_refresh() {
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
iwdg_feed();
}
#endif // USE_WATCHDOG
// ------------------------
// ADC
// ------------------------
@@ -211,6 +253,10 @@ void MarlinHAL::idletask() {
void MarlinHAL::reboot() { nvic_sys_reset(); }
// ------------------------
// Free Memory Accessor
// ------------------------
extern "C" {
extern unsigned int _ebss; // end of bss section
}
@@ -243,9 +289,9 @@ extern "C" {
}
*/
//
// ------------------------
// ADC
//
// ------------------------
enum ADCIndex : uint8_t {
OPTITEM(HAS_TEMP_ADC_0, TEMP_0)
+4 -1
View File
@@ -34,7 +34,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include <stdint.h>
#include <util/atomic.h>
@@ -247,6 +246,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init(); // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
@@ -26,8 +26,7 @@
#if ENABLED(POSTMORTEM_DEBUGGING)
#include "../shared/HAL_MinSerial.h"
#include "watchdog.h"
#include "../shared/MinSerial.h"
#include <libmaple/usart.h>
#include <libmaple/rcc.h>
@@ -82,7 +81,7 @@ static void TX(char c) {
#if WITHIN(SERIAL_PORT, 1, 6)
struct usart_dev* dev = MYSERIAL1.c_dev();
while (!(dev->regs->SR & USART_SR_TXE)) {
TERN_(USE_WATCHDOG, HAL_watchdog_refresh());
hal.watchdog_refresh();
sw_barrier();
}
dev->regs->DR = c;
+8 -8
View File
@@ -147,17 +147,17 @@ void libServo::move(const int32_t value) {
uint16_t SR = timer_get_status(tdev);
if (SR & TIMER_SR_CC1IF) { // channel 1 off
#ifdef SERVO0_PWM_OD
OUT_WRITE_OD(SERVO0_PIN, 1); // off
OUT_WRITE_OD(SERVO0_PIN, HIGH); // off
#else
OUT_WRITE(SERVO0_PIN, 0);
OUT_WRITE(SERVO0_PIN, LOW);
#endif
timer_reset_status_bit(tdev, TIMER_SR_CC1IF_BIT);
}
if (SR & TIMER_SR_CC2IF) { // channel 2 resume
#ifdef SERVO0_PWM_OD
OUT_WRITE_OD(SERVO0_PIN, 0); // on
OUT_WRITE_OD(SERVO0_PIN, LOW); // on
#else
OUT_WRITE(SERVO0_PIN, 1);
OUT_WRITE(SERVO0_PIN, HIGH);
#endif
timer_reset_status_bit(tdev, TIMER_SR_CC2IF_BIT);
}
@@ -167,9 +167,9 @@ void libServo::move(const int32_t value) {
timer_dev *tdev = HAL_get_timer_dev(MF_TIMER_SERVO0);
if (!tdev) return false;
#ifdef SERVO0_PWM_OD
OUT_WRITE_OD(inPin, 1);
OUT_WRITE_OD(inPin, HIGH);
#else
OUT_WRITE(inPin, 0);
OUT_WRITE(inPin, LOW);
#endif
timer_pause(tdev);
@@ -200,9 +200,9 @@ void libServo::move(const int32_t value) {
timer_disable_irq(tdev, 1);
timer_disable_irq(tdev, 2);
#ifdef SERVO0_PWM_OD
OUT_WRITE_OD(pin, 1); // off
OUT_WRITE_OD(pin, HIGH); // off
#else
OUT_WRITE(pin, 0);
OUT_WRITE(pin, LOW);
#endif
}
}
+1 -1
View File
@@ -30,7 +30,7 @@ SPIClass TFT_SPI::SPIx(1);
void TFT_SPI::Init() {
#if PIN_EXISTS(TFT_RESET)
OUT_WRITE(TFT_RST_PIN, HIGH);
OUT_WRITE(TFT_RESET_PIN, HIGH);
delay(100);
#endif
-66
View File
@@ -1,66 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
*/
#ifdef __STM32F1__
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include <libmaple/iwdg.h>
#include "watchdog.h"
/**
* The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
void HAL_watchdog_refresh() {
#if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED)
TOGGLE(LED_PIN); // heartbeat indicator
#endif
iwdg_feed();
}
void watchdogSetup() {
// do whatever. don't remove this function.
}
/**
* @brief Initialized the independent hardware watchdog.
*
* @return No return
*
* @details The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
*/
void watchdog_init() {
#if DISABLED(DISABLE_WATCHDOG_INIT)
iwdg_init(IWDG_PRE_256, STM32F1_WD_RELOAD);
#endif
}
#endif // USE_WATCHDOG
#endif // __STM32F1__
+43 -19
View File
@@ -44,25 +44,6 @@
#endif
USBSerialType USBSerial(false, SerialUSB);
// ------------------------
// Class Utilities
// ------------------------
extern "C" {
extern char __bss_end;
extern char __heap_start;
extern void* __brkval;
int freeMemory() {
int free_memory;
if ((int)__brkval == 0)
free_memory = ((int)&free_memory) - ((int)&__bss_end);
else
free_memory = ((int)&free_memory) - ((int)__brkval);
return free_memory;
}
}
// ------------------------
// MarlinHAL Class
// ------------------------
@@ -81,7 +62,31 @@ uint8_t MarlinHAL::get_reset_source() {
return 0;
}
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void MarlinHAL::watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}
void MarlinHAL::watchdog_refresh() {
// Watchdog refresh sequence
WDOG_REFRESH = 0xA602;
WDOG_REFRESH = 0xB480;
}
#endif
// ------------------------
// ADC
// ------------------------
void MarlinHAL::adc_init() {
analog_init();
@@ -102,4 +107,23 @@ void MarlinHAL::adc_start(const pin_t pin) {
uint16_t MarlinHAL::adc_value() { return ADC0_RA; }
// ------------------------
// Free Memory Accessor
// ------------------------
extern "C" {
extern char __bss_end;
extern char __heap_start;
extern void* __brkval;
int freeMemory() {
int free_memory;
if ((int)__brkval == 0)
free_memory = ((int)&free_memory) - ((int)&__bss_end);
else
free_memory = ((int)&free_memory) - ((int)__brkval);
return free_memory;
}
}
#endif // __MK20DX256__
+4 -1
View File
@@ -32,7 +32,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include <stdint.h>
@@ -135,6 +134,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
-40
View File
@@ -1,40 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __MK20DX256__
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}
#endif // USE_WATCHDOG
#endif // __MK20DX256__
-34
View File
@@ -1,34 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "HAL.h"
// Arduino Due core now has watchdog support
void watchdog_init();
inline void HAL_watchdog_refresh() {
// Watchdog refresh sequence
WDOG_REFRESH = 0xA602;
WDOG_REFRESH = 0xB480;
}
+43 -21
View File
@@ -43,33 +43,12 @@
USBSerialType USBSerial(false, SerialUSB);
// ------------------------
// Class Utilities
// ------------------------
extern "C" {
extern char __bss_end;
extern char __heap_start;
extern void* __brkval;
int freeMemory() {
int free_memory;
if ((int)__brkval == 0)
free_memory = ((int)&free_memory) - ((int)&__bss_end);
else
free_memory = ((int)&free_memory) - ((int)__brkval);
return free_memory;
}
}
// ------------------------
// MarlinHAL Class
// ------------------------
void MarlinHAL::reboot() { _reboot_Teensyduino_(); }
// Reset
uint8_t MarlinHAL::get_reset_source() {
switch (RCM_SRS0) {
case 128: return RST_POWER_ON; break;
@@ -82,7 +61,31 @@ uint8_t MarlinHAL::get_reset_source() {
return 0;
}
// ------------------------
// Watchdog Timer
// ------------------------
#if ENABLED(USE_WATCHDOG)
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void MarlinHAL::watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}
void MarlinHAL::watchdog_refresh() {
// Watchdog refresh sequence
WDOG_REFRESH = 0xA602;
WDOG_REFRESH = 0xB480;
}
#endif
// ------------------------
// ADC
// ------------------------
int8_t MarlinHAL::adc_select;
@@ -131,4 +134,23 @@ uint16_t MarlinHAL::adc_value() {
return 0;
}
// ------------------------
// Free Memory Accessor
// ------------------------
extern "C" {
extern char __bss_end;
extern char __heap_start;
extern void* __brkval;
int freeMemory() {
int free_memory;
if ((int)__brkval == 0)
free_memory = ((int)&free_memory) - ((int)&__bss_end);
else
free_memory = ((int)&free_memory) - ((int)__brkval);
return free_memory;
}
}
#endif // __MK64FX512__ || __MK66FX1M0__
+5 -2
View File
@@ -32,7 +32,6 @@
#include "../shared/HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include <stdint.h>
#include <util/atomic.h>
@@ -118,7 +117,7 @@ typedef int8_t pin_t;
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
// ------------------------
// Class Utilities
// Free Memory Accessor
// ------------------------
#pragma GCC diagnostic push
@@ -140,6 +139,10 @@ public:
// Earliest possible init, before setup()
MarlinHAL() {}
// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup()
static void reboot(); // Restart the firmware from 0x0
-40
View File
@@ -1,40 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
#include "../../inc/MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}
#endif // USE_WATCHDOG
#endif // __MK64FX512__ || __MK66FX1M0__
-30
View File
@@ -1,30 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
void watchdog_init();
inline void HAL_watchdog_refresh() {
// Watchdog refresh sequence
WDOG_REFRESH = 0xA602;
WDOG_REFRESH = 0xB480;
}

Some files were not shown because too many files have changed in this diff Show More