westlicht / performer

PER|FORMER Eurorack Sequencer
https://westlicht.github.io/performer
MIT License
232 stars 70 forks source link

SD Card fails to mount #368

Open cschol opened 1 year ago

cschol commented 1 year ago

My SD card failed to mount when trying to update the firmware (via UPDATE.DAT).

The bootloader says: "FAILED TO MOUNT (ERROR: 3)"

What does that exactly mean?

I tried a brand-new SD card and same result. Performer was working fine all day and suddenly stopped working.

I updated the Tester application with an SD Card test and specific return codes throughout the initialization process to troubleshoot where the failure occurs.

From SDCard.cpp:

   bool hcs = false;
   result = sendCommandRetry(8, 0x1f1);
   if (result == Success && SDIO_RESP1 == 0x1f1) {
       hcs = true;
   } else if (result == Timeout) {
       hcs = false;
   } else {
       powerOff();
       return -3; // <- ADDED RETURN CODE
   }

   const uint32_t OCR_BUSY = 0x80000000;
   const uint32_t OCR_HCS = 0x40000000;
   const uint32_t OCR_CCS = 0x40000000;
   bool acmd41_success = false;
   uint32_t timeout = os::ticks() + os::time::ms(2000);
   while (os::ticks() < timeout) {
       result = sendAppCommand(41, 0x100000 | (hcs ? OCR_HCS : 0));
       uint32_t response = SDIO_RESP1;
       if (result == CRCFail && (response & OCR_BUSY) != 0) {
           _cardInfo.ccs = (response & OCR_CCS) != 0;
           acmd41_success = true;
           break;
       }
   }
   if (!acmd41_success) {
       powerOff();
       if (!hcs) return -10; // hcs timeout // <- ADDED RETURN CODE
       return -4; // <- ADDED RETURN CODE
   }

I get the return code -10, which means the IF COND request (CMD8) times out and subsequently the acmd41 request times out as well.

Any idea what the issue could be?

mebitek commented 6 months ago

I get the same error. my sdcard stop working from one day to another. no projects can be load. did you find a solution?

cschol commented 6 months ago

I did not find a solution unfortunately. I was going to replace the SD card connector, but never got around to doing it.

mebitek commented 6 months ago

I just use a little screw driver to seprate the sdcard connectors as mine were very close and now it works as expeceted