cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO FATFS FR_NOT_READY - fails to mount SD card

bog201
Associate

Hello,

I have a NUCLEO-F767ZI I am trying to integrate an SD card with for data storage. The SD card is a Kingston CANVAS Select Plus 64GB in ExFAT format.

I am connecting it to the NUCLEO board through an Adafruit SD card module which has pullup resistors on all lines, including the detect pin, and I am using the internal GPIO pullup resistors too for D0, CMD and SD_DET to make sure the communication is uninterrupted. Below you can see the FATFS configuration fatfs_config1.pngfatfs_config2.png

 

printf("Mounting filesystem...\r\n\n");

FR_Status = f_mount(&FatFs, "", 1);

if (FR_Status != FR_OK)

{

printf("Error mounting SD card! Code: %d\r\n\n", FR_Status);

break;

}

printf("SD card mounted successfully\r\n\n");

 

 

FR_Status returns FR_NOT_READY (3 in console). 

The hardware configuration is correct as I can read the capacity and some other data from the SD card, but I cannot access the card itself.

Does anyone have any suggestions?

 

1 REPLY 1

Welcome to the forum.

For best results, please see How to write your question to maximize your chances to find a solution; in particular, How to insert source code.

 

Please give a link to the "Adafruit SD card module", and a schematic of how you have it connected.

 


@bog201 wrote:

FR_Status returns FR_NOT_READY (3 in console). 


So have you used the debugger to step into the code to find out why it does that?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.