cancel
Showing results for 
Search instead for 
Did you mean: 

Hangs in SDIO after update CumeMX

RKhal.19
Associate II

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

5 REPLIES 5
Imen.D
ST Employee

Hello @RKhal.19​ ,

We will take care to check your request.

Which firmware package using ?

Kind Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
RKhal.19
Associate II

STM32 CubeMX 5.0

FW_F4 V1.23.0

Imen.D
ST Employee

Hi @RKhal.19​ ,

Can you please share your ioc file to review and reproduce this behavior?

Kind Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
RKhal.19
Associate II

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)

Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen