AnsweredAssumed Answered

fsl_sd.c issue

Question asked by Mike Spenard on Apr 27, 2019
Latest reply on May 22, 2019 by Mike Spenard

Hi All,

 I'm trying to incorporate SD-card support, based on the SDK's fatfs example, into my own project.

I have the pins and clock plumbed without conflict. And card detection works. However, whenever I try and format the card ( using f_mkfs() ), or do any write operation really, things get hung up.

 

f_mkfs() calls SD_Write() in fsl_sd.c which then goes to check status but never returns. What would cause this?

 

/* Wait for the card's buffer to be not full to write to improve the write performance. */
while ((GET_SDMMCHOST_STATUS(card->host.base) & CARD_DATA0_STATUS_MASK) != CARD_DATA0_NOT_BUSY)
{
}

Outcomes