2019-01-03 03:39 AM
Hello.
After updating CubeMX to the latest version, the microSD card is no longer formatted
Mounting, creating files and writing to them is normal.
When calling a function:
f_mkfs("", FM_FAT32, 0, work, sizeof work);
Hangs up in the HAL_SD_WriteBlocks function, in this loop:
while(!__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_TXUNDERR | SDIO_FLAG_DCRCFAIL | SDIO_FLAG_DTIMEOUT | SDIO_FLAG_DATAEND | SDIO_FLAG_STBITERR))
I tried different MicroSD, the result is the same everywhere.
And before that, everything worked fine.
Perhaps the reason is due to the fact that in CubeMX in the FATFS settings the BSP item (Detect_SDIO) appeared
2019-01-03 08:04 AM
Hello @RKhal.19 ,
We will take care to check your request.
Which firmware package using ?
Kind Regards,
Imen.
2019-01-03 08:57 AM
STM32 CubeMX 5.0
FW_F4 V1.23.0
2019-01-04 02:09 AM
Hi @RKhal.19 ,
Can you please share your ioc file to review and reproduce this behavior?
Kind Regards
Imen
2019-01-04 02:45 AM
Yes, with pleasure.
After generating the project. At the first build I receive several warnings that I have not noticed before:
Maybe my reason is related to this.
..\Src\bsp_driver_sd.c: In function 'HAL_SD_AbortCallback':
..\Src\bsp_driver_sd.c:299:3: warning: implicit declaration of function 'BSP_SD_AbortCallback' [-Wimplicit-function-declaration]
BSP_SD_AbortCallback();
^~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c: In function 'HAL_SD_TxCpltCallback':
..\Src\bsp_driver_sd.c:309:3: warning: implicit declaration of function 'BSP_SD_WriteCpltCallback' [-Wimplicit-function-declaration]
BSP_SD_WriteCpltCallback();
^~~~~~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c: In function 'HAL_SD_RxCpltCallback':
..\Src\bsp_driver_sd.c:319:3: warning: implicit declaration of function 'BSP_SD_ReadCpltCallback' [-Wimplicit-function-declaration]
BSP_SD_ReadCpltCallback();
^~~~~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c: At top level:
..\Src\bsp_driver_sd.c:327:13: warning: conflicting types for 'BSP_SD_AbortCallback'
__weak void BSP_SD_AbortCallback(void)
^~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c:299:3: note: previous implicit declaration of 'BSP_SD_AbortCallback' was here
BSP_SD_AbortCallback();
^~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c:336:13: warning: conflicting types for 'BSP_SD_WriteCpltCallback'
__weak void BSP_SD_WriteCpltCallback(void)
^~~~~~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c:309:3: note: previous implicit declaration of 'BSP_SD_WriteCpltCallback' was here
BSP_SD_WriteCpltCallback();
^~~~~~~~~~~~~~~~~~~~~~~~
..\Src\bsp_driver_sd.c:345:13: warning: conflicting types for 'BSP_SD_ReadCpltCallback'
__weak void BSP_SD_ReadCpltCallback(void)
2019-01-10 08:03 AM
Hello,
The generation of your project is successfully done and I'm not able to reproduce this warning on my side using STM32cubeMx 5.0.1 and FW_F4 V1.23.0.
Can you please check with the new version of STM32CubeMX V5.0.1, then keep me informed about your results.
Kind Regards,
Imen