There is no error checking of initialise_card at disk_initialize.
when the disk is not connected, an error may occurs.
I solved the problem with the following code.
int SDFileSystem::disk_initialize() {
int i = initialise_card();
//<add>
if(i==SDCARD_FAIL){
return 1;
}
//</add>
debug_if(SD_DBG, "init card = %d\n", i);
_sectors = _sd_sectors();
// Set block length to 512 (CMD16)
if (_cmd(16, 512) != 0) {
debug("Set 512-byte block timed out\n");
return 1;
}
Issue type: Defect
Severity: Default
Created 11 years, 7 months ago.Updated 11 years, 7 months ago.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.