Browse Source

🐛 Init Stepper SPI before PSU Control (#24269)

ellensp 2 years ago
parent
commit
08c51a405a
No account linked to committer's email address
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      Marlin/src/MarlinCore.cpp

+ 11
- 11
Marlin/src/MarlinCore.cpp View File

@@ -1242,6 +1242,17 @@ void setup() {
1242 1242
     SETUP_RUN(tmc_serial_begin());
1243 1243
   #endif
1244 1244
 
1245
+  #if HAS_TMC_SPI
1246
+    #if DISABLED(TMC_USE_SW_SPI)
1247
+      SETUP_RUN(SPI.begin());
1248
+    #endif
1249
+    SETUP_RUN(tmc_init_cs_pins());
1250
+  #endif
1251
+
1252
+  #if HAS_L64XX
1253
+    SETUP_RUN(L64xxManager.init());  // Set up SPI, init drivers
1254
+  #endif
1255
+
1245 1256
   #if ENABLED(PSU_CONTROL)
1246 1257
     SETUP_LOG("PSU_CONTROL");
1247 1258
     powerManager.init();
@@ -1251,21 +1262,10 @@ void setup() {
1251 1262
     SETUP_RUN(recovery.setup());
1252 1263
   #endif
1253 1264
 
1254
-  #if HAS_L64XX
1255
-    SETUP_RUN(L64xxManager.init());  // Set up SPI, init drivers
1256
-  #endif
1257
-
1258 1265
   #if HAS_STEPPER_RESET
1259 1266
     SETUP_RUN(disableStepperDrivers());
1260 1267
   #endif
1261 1268
 
1262
-  #if HAS_TMC_SPI
1263
-    #if DISABLED(TMC_USE_SW_SPI)
1264
-      SETUP_RUN(SPI.begin());
1265
-    #endif
1266
-    SETUP_RUN(tmc_init_cs_pins());
1267
-  #endif
1268
-
1269 1269
   SETUP_RUN(hal.init_board());
1270 1270
 
1271 1271
   SETUP_RUN(esp_wifi_init());

Loading…
Cancel
Save