mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 18:09:17 +01:00
Changed SD OCR to a larger voltage range, hopefully fixing problems with a few cards.
This commit is contained in:
parent
9077692f45
commit
05645cd8c2
@ -256,7 +256,7 @@ static bool _M3SD_initCard (void) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_M3SD_sendCommand (SD_APP_OP_COND, 3<<16);
|
_M3SD_sendCommand (SD_APP_OP_COND, SD_OCR_VALUE);
|
||||||
if ((_M3SD_getResponse_R3 (responseBuffer)) && ((responseBuffer[1] & 0x80) != 0)) {
|
if ((_M3SD_getResponse_R3 (responseBuffer)) && ((responseBuffer[1] & 0x80) != 0)) {
|
||||||
// Card is ready to receive commands now
|
// Card is ready to receive commands now
|
||||||
break;
|
break;
|
||||||
|
@ -208,7 +208,7 @@ static bool _SCSD_initCard (void) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_SCSD_sendCommand (SD_APP_OP_COND, 3<<16);
|
_SCSD_sendCommand (SD_APP_OP_COND, SD_OCR_VALUE);
|
||||||
if ((_SCSD_getResponse_R3 (responseBuffer)) && ((responseBuffer[1] & 0x80) != 0)) {
|
if ((_SCSD_getResponse_R3 (responseBuffer)) && ((responseBuffer[1] & 0x80) != 0)) {
|
||||||
// Card is ready to receive commands now
|
// Card is ready to receive commands now
|
||||||
break;
|
break;
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
|
|
||||||
2006-07-11 - Chishm
|
2006-07-11 - Chishm
|
||||||
* Original release
|
* Original release
|
||||||
|
|
||||||
|
2006-07-28 - Chishm
|
||||||
|
* Changed voltage range that the SD card can use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IO_SD_COMMON_H
|
#ifndef IO_SD_COMMON_H
|
||||||
@ -59,6 +62,9 @@
|
|||||||
#define SET_BUS_WIDTH 6
|
#define SET_BUS_WIDTH 6
|
||||||
#define SD_APP_OP_COND 41
|
#define SD_APP_OP_COND 41
|
||||||
|
|
||||||
|
/* OCR (Operating Conditions Register) send value */
|
||||||
|
//#define SD_OCR_VALUE 0x00030000 /* 2.8V to 3.0V */
|
||||||
|
#define SD_OCR_VALUE 0x003F8000 /* 2.7V to 3.4V */
|
||||||
|
|
||||||
/* SD Data repsonses */
|
/* SD Data repsonses */
|
||||||
#define SD_CARD_BUSY 0xff
|
#define SD_CARD_BUSY 0xff
|
||||||
|
Loading…
Reference in New Issue
Block a user