This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCI fails to initialze on SD Card 1/2 of the time

The previous thread is now marked read only, so I'm posting the workaround here. Add one line to the init driver:
/*-----------------------------------------------------------------------------

* Initialize the Flash File System

*----------------------------------------------------------------------------*/

void initFS (void) {

U32 retv;

retv = finit(NULL);

while ((retv = finit (NULL)) != 0) { /* Wait until the FS is ready */

if (retv == 1) {

bugOut ("\nSD/MMC Init Failed");

bugOut ("\nInsert Memory card and press key...\n");

while (getkey () == 0);

}

else {

bugOut ("\nSD/MMC Card is Unformatted");

strcpy (&in_line[0], "AEGIS\r\n");

cmdFormat (&in_line[0]);

}

}

}

now it works 100%

Parents Reply Children