2016-06-27 02:18 AM
Trying to get a project with the subject line working in SW4STM32.
However, if I try the fmount function with 0 (mount later), then fopen on a file, I get a not ready error. The same if I specify fmount with 1 (mount now)I've read the app note for FatFS on ST parts and implemented as directed, but I've got various errors including command response timeout when initialising the card. I've tried different cards too - a 4GB and a 64GB uSD card.Can anyone suggest any errors in the following CubeMX generated code I've modified: /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_SDMMC1_SD_Init(); /* USER CODE BEGIN 2 */ BSP_SD_Init(); // Fatfs sanity check code /* Register work area to the default drive */ fr = f_mount(&FatFs, SD_Path, 1); // Mount immediately /* Open a text file */ fr = f_open(&fil, ''message.txt'', FA_READ);2016-06-28 06:52 AM
Hi Turboman,
Try to do like the following implimentation examplechar SDPath[4];
f_mount(&SDFatFs, (TCHAR const*)SDPath, 0)
I recommend that you take a look to the ''FatFs_uSD'' example in
package at this path: STM32Cube_FW_F7_V1.4.0\Projects\STM32F769I_EVAL\Applications\FatFs\FatFs_uSD
-Hannibal-