Skip to content

Commit 4afbf54

Browse files
ellenspLCh-77
authored andcommitted
🐛 Init Stepper SPI before PSU Control (MarlinFirmware#24269)
1 parent 655b606 commit 4afbf54

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Marlin/src/MarlinCore.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,17 @@ void setup() {
12421242
SETUP_RUN(tmc_serial_begin());
12431243
#endif
12441244

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+
12451256
#if ENABLED(PSU_CONTROL)
12461257
SETUP_LOG("PSU_CONTROL");
12471258
powerManager.init();
@@ -1251,21 +1262,10 @@ void setup() {
12511262
SETUP_RUN(recovery.setup());
12521263
#endif
12531264

1254-
#if HAS_L64XX
1255-
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
1256-
#endif
1257-
12581265
#if HAS_STEPPER_RESET
12591266
SETUP_RUN(disableStepperDrivers());
12601267
#endif
12611268

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-
12691269
SETUP_RUN(hal.init_board());
12701270

12711271
SETUP_RUN(esp_wifi_init());

0 commit comments

Comments
 (0)