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
     SETUP_RUN(tmc_serial_begin());
1242
     SETUP_RUN(tmc_serial_begin());
1243
   #endif
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
   #if ENABLED(PSU_CONTROL)
1256
   #if ENABLED(PSU_CONTROL)
1246
     SETUP_LOG("PSU_CONTROL");
1257
     SETUP_LOG("PSU_CONTROL");
1247
     powerManager.init();
1258
     powerManager.init();
1251
     SETUP_RUN(recovery.setup());
1262
     SETUP_RUN(recovery.setup());
1252
   #endif
1263
   #endif
1253
 
1264
 
1254
-  #if HAS_L64XX
1255
-    SETUP_RUN(L64xxManager.init());  // Set up SPI, init drivers
1256
-  #endif
1257
-
1258
   #if HAS_STEPPER_RESET
1265
   #if HAS_STEPPER_RESET
1259
     SETUP_RUN(disableStepperDrivers());
1266
     SETUP_RUN(disableStepperDrivers());
1260
   #endif
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
   SETUP_RUN(hal.init_board());
1269
   SETUP_RUN(hal.init_board());
1270
 
1270
 
1271
   SETUP_RUN(esp_wifi_init());
1271
   SETUP_RUN(esp_wifi_init());

Loading…
Cancel
Save