Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD Card fails to mount #368

Open
cschol opened this issue Sep 10, 2022 · 3 comments
Open

SD Card fails to mount #368

cschol opened this issue Sep 10, 2022 · 3 comments

Comments

@cschol
Copy link

cschol commented Sep 10, 2022

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
Copy link

mebitek commented Dec 23, 2023

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
Copy link
Author

cschol commented Dec 30, 2023

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

@mebitek
Copy link

mebitek commented Jan 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants