Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

update from 01022022 #61

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

Merged
merged 15 commits into from
Feb 1, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix - SD mount issue (espressif#6162)
* sdSelectCard longer timeout for sdWait

* GO_IDLE_STATE command ignores sdWait fail
  • Loading branch information
P-R-O-C-H-Y authored Jan 31, 2022
commit bb7df04446679c3c52015abaea133319e2de4178
11 changes: 9 additions & 2 deletions 11 libraries/SD/src/sd_diskio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ bool sdSelectCard(uint8_t pdrv)
{
ardu_sdcard_t * card = s_cards[pdrv];
digitalWrite(card->ssPin, LOW);
bool s = sdWait(pdrv, 300);
bool s = sdWait(pdrv, 500);
if (!s) {
log_e("Select Failed");
digitalWrite(card->ssPin, HIGH);
Expand Down Expand Up @@ -506,10 +506,17 @@ DSTATUS ff_sd_initialize(uint8_t pdrv)
card->spi->transfer(0XFF);
}

if (sdTransaction(pdrv, GO_IDLE_STATE, 0, NULL) != 1) {
// Fix mount issue - sdWait fail ignored before command GO_IDLE_STATE
digitalWrite(card->ssPin, LOW);
if(!sdWait(pdrv, 500)){
log_w("sdWait fail ignored, card initialize continues");
}
if (sdCommand(pdrv, GO_IDLE_STATE, 0, NULL) != 1){
sdDeselectCard(pdrv);
log_w("GO_IDLE_STATE failed");
goto unknown_card;
}
sdDeselectCard(pdrv);

token = sdTransaction(pdrv, CRC_ON_OFF, 1, NULL);
if (token == 0x5) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.