SD card example not working on STM32F746G-DISCO
I purchased the STM32F746G-DISCO in the hope of being able to read and write to an SD card.
I followed the guide below...
However, when stepping through the code I can see it is going to the Error_Handler when the function f_mkfs is called...
if(f_mkfs((TCHAR const*)SDPath, FM_ANY, 0, rtext, sizeof(rtext)) != FR_OK)
{
Error_Handler();
}
I have tried two different SD cards:
1. Kingston 16GB microSDHC CL10
2. Transcend 2 GB MicroSD Micro SD Card, Class 30 (TS2GUSD)
When reading the comments at the bottom of the guide, I noticed that others also had the same issue .
I tried the suggestion made by TKana.1 (i.e. moved variables to global and changed 4B wide operation to 1B operation in MX_SDMMC1_SD_Init) but the error still occurs.
Why does the code in this guide not work and how do I fix it ?
