AnsweredAssumed Answered

STM32F407 SDIO FatFs: no connection to the µSD (no f_mount, no f_open)

Question asked by Jakob Czekansky on Nov 2, 2017
Latest reply on Dec 7, 2017 by Amel N

Hey Guys,

 

I am setting up some STM32F407VETx on a chinese breakout board with µSD-card-slot. 

I try to read data from the sd card with SDIO (SD 4 bits Wide bus) and FatFs.

The Basic-Project is build with STM32 CubeMx and programmed in the OpenSTM32 Workbench

 

My Problem: 

The SD Card is ALWAYS in "FR_NOT_READY". I am not able to mount  / open / write any data, because the µC is always stuck in the following function:

 

/**
* @brief Checks for error conditions for R1 response.
* @param hsd SD handle
* @param SD_CMD The sent command index
* @retval SD Card error state
*/
static uint32_t SDMMC_GetCmdResp1(SDIO_TypeDef *SDIOx, uint8_t SD_CMD, uint32_t Timeout)
{

   ...

}

 

Because of the timeout in this function i get an errorcode "1" (R/W Error ) in diskio.c

 

I've tried 3 boards, 3 SD-cards - nothing is broken! I have no clue, what to do... 

 

I am just using the "basic" fatfs functions, as you can the in the attachment.

 

Please help me!

Greets!

 

Ps.: If you need more information, please write some comment!

Outcomes