Parcourir la source

Merge pull request #456 from Stefanowicz/Marlin_v1

Add (as an option) slower SD transfer mode
ErikZalm il y a 11 ans
Parent
révision
4f96ad5621
2 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 1
    0
      Marlin/Configuration.h
  2. 4
    0
      Marlin/cardreader.cpp

+ 1
- 0
Marlin/Configuration.h Voir le fichier

@@ -319,6 +319,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
319 319
 //#define ULTRA_LCD  //general lcd support, also 16x2
320 320
 //#define DOGLCD	// Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
321 321
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
322
+//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
322 323
 
323 324
 //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
324 325
 //#define ULTIPANEL  //the ultipanel as on thingiverse

+ 4
- 0
Marlin/cardreader.cpp Voir le fichier

@@ -146,7 +146,11 @@ void CardReader::initsd()
146 146
   cardOK = false;
147 147
   if(root.isOpen())
148 148
     root.close();
149
+#ifdef SDSLOW
150
+  if (!card.init(SPI_HALF_SPEED,SDSS))
151
+#else
149 152
   if (!card.init(SPI_FULL_SPEED,SDSS))
153
+#endif
150 154
   {
151 155
     //if (!card.init(SPI_HALF_SPEED,SDSS))
152 156
     SERIAL_ECHO_START;

Chargement…
Annuler
Enregistrer