sd card does not work no 1.0.2
I use arduino due + ramps for due with eeprom + FELIXPrinters Display. when I upgraded firmware from version 1.0.1 to 1.0.2 sd card stoppend working. On lcd I only see "Mount sd card" which does not work. On older firmware everything was fine.
regards miruniec
regards miruniec
Comments
It might be a speed thing. Look into SDCard.cpp line 82
if (!fat.begin(SDSS, SD_SCK_MHZ(50))) {
it sets speed to 50 MHz maximum if SPI supports it. Please try 4MHz as a first test to test if communication is just too fast in your case.https://github.com/greiman/SdFat/blob/master/examples/SoftwareSpi/SoftwareSpi.ino
shows how to initialize sdfat it for software SPI.
I think You need to set SdFatConfig.h
#define ENABLE_SOFTWARE_SPI_CLASS 1
In repetier.h
instead of SdFat fat;
In SDCard.h
And in configuration of course define SD_SOFT_MISO_PIN, SD_SOFT_MOSI_PIN, SD_SOFT_SCK_PIN
Then it should run in software spi mode.
Set MAX_VFAT_ENTRIES 3 and limit is 39 chars instead. Only point I'm not sure is if the display then gets problems as it does not fit in a row. I still have to test this, then I can make it at least default for due boards having enough memory for the extra memory.
#define ENABLE_SOFTWARE_SPI_CLASS 1
is required so it also compiles the software spi class.
SD_SOFT_MISO_PIN, SD_SOFT_MOSI_PIN, SD_SOFT_SCK_PIN
are then the used pins for communication. So in theory it should be possible.
#define ENABLE_SOFTWARE_SPI_CLASS 1
In repetier.h
instead of SdFat fat;
should simply be in Configuration.h along with SD_SOFT_MISO_PIN, SD_SOFT_MOSI_PIN, SD_SOFT_SCK_PIN.
Apart from this I think everything is correct.
Values for SD_SOFT_MISO_PIN, SD_SOFT_MOSI_PIN, SD_SOFT_SCK_PIN would be the same a sin old version where it worked. For hardware spi it is clear as these are defined by the processor. For software it can be any pin so it must be the one where you connect it. You should be able to compare position on RAMPS to know which pins on a socket are used as MISO/MOSI/SCK and then use the pin numbers from board pinout for that connector.
#define SD_SOFT_MISO_PIN 50
#define SD_SOFT_MOSI_PIN 51
#define SD_SOFT_SCK_PIN 52
fat.begin(SDSS)
#else
fat.begin(SDSS, SD_SCK_MHZ(50)); // dummy init of SD_CARD
fat.begin(SDSS)
^
exit status 1
'fat' does not name a type
#define ENABLE_SOFTWARE_SPI_CLASS 1
#define SD_SOFT_MISO_PIN 50
#define SD_SOFT_MOSI_PIN 51
#define SD_SOFT_SCK_PIN 52
and get no errors. Of course untested as I have no smart ramps, but that should make things easier.
Info:PowerUp
Detected EEPROM version:19
Free RAM:79556
SD init fail
" SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Does another SPI device need to be disabled?
Is there a wiring/soldering problem?
errorCode: 32
Autoretract:0
X:0.00 Y:0.00 Z:0.000 E:0.0000
SelectExtruder:0
FlowMultiply:100 "
Anyone has made some progress ?