Skip to content

Commit

Permalink
🐛 Init Stepper SPI before PSU Control (MarlinFirmware#24269)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and Jeremy Fairbanks committed Jul 18, 2022
1 parent be373f8 commit d5fc41b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,17 @@ void setup() {
SETUP_RUN(tmc_serial_begin());
#endif

#if HAS_TMC_SPI
#if DISABLED(TMC_USE_SW_SPI)
SETUP_RUN(SPI.begin());
#endif
SETUP_RUN(tmc_init_cs_pins());
#endif

#if HAS_L64XX
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
#endif

#if ENABLED(PSU_CONTROL)
SETUP_LOG("PSU_CONTROL");
powerManager.init();
Expand All @@ -1239,21 +1250,10 @@ void setup() {
SETUP_RUN(recovery.setup());
#endif

#if HAS_L64XX
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
#endif

#if HAS_STEPPER_RESET
SETUP_RUN(disableStepperDrivers());
#endif

#if HAS_TMC_SPI
#if DISABLED(TMC_USE_SW_SPI)
SETUP_RUN(SPI.begin());
#endif
SETUP_RUN(tmc_init_cs_pins());
#endif

SETUP_RUN(hal.init_board());

SETUP_RUN(esp_wifi_init());
Expand Down

0 comments on commit d5fc41b

Please sign in to comment.