Browse Source

Fail SD mount without SPI re-init (#19226)

Victor Oliveira 4 years ago
parent
commit
e3d855673e
No account linked to committer's email address
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      Marlin/src/sd/cardreader.cpp

+ 3
- 4
Marlin/src/sd/cardreader.cpp View File

140
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
140
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
141
     SET_INPUT_PULLUP(SD_DETECT_PIN);
141
     SET_INPUT_PULLUP(SD_DETECT_PIN);
142
   #endif
142
   #endif
143
-  
143
+
144
   #if PIN_EXISTS(SDPOWER)
144
   #if PIN_EXISTS(SDPOWER)
145
     OUT_WRITE(SDPOWER_PIN, HIGH); // Power the SD reader
145
     OUT_WRITE(SDPOWER_PIN, HIGH); // Power the SD reader
146
   #endif
146
   #endif
383
 
383
 
384
   if (flag.mounted)
384
   if (flag.mounted)
385
     cdroot();
385
     cdroot();
386
-  else {
387
-    spiInit(SPI_SPEED); // Return to base SPI speed
386
+  else if (marlin_state != MF_INITIALIZING)
388
     ui.set_status_P(GET_TEXT(MSG_SD_INIT_FAIL), -1);
387
     ui.set_status_P(GET_TEXT(MSG_SD_INIT_FAIL), -1);
389
-  }
388
+
390
   ui.refresh();
389
   ui.refresh();
391
 }
390
 }
392
 
391
 

Loading…
Cancel
Save