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

Loading…
Cancel
Save