cancel
Showing results for 
Search instead for 
Did you mean: 

uSD not work in Riverdi 121STM32H7_1_6

MauFanGilaMedical
Associate

Hello everybody.

I bought Riverdi STM32 Embedded Display RVT121HVSNWC00-B

I create my first project using touch GFX.

I generate code and import it in STM32CubeIDE.

I format FAT32 a 128G uSD using custom program.

I plug the uSD into adapter and I write this code.

MauFanGilaMedical_0-1738662023020.png

fresult is FS_NOT_READY and I don't understand the reason.

 

 

Here my configuration.

MauFanGilaMedical_1-1738662133868.png

 

MauFanGilaMedical_2-1738662171581.png

MauFanGilaMedical_3-1738662191502.png

MauFanGilaMedical_5-1738662258114.png

MauFanGilaMedical_6-1738662300821.png

MauFanGilaMedical_8-1738662336348.png

MauFanGilaMedical_9-1738662368308.png

 

MauFanGilaMedical_10-1738662387394.png

MauFanGilaMedical_11-1738662407131.png

MauFanGilaMedical_12-1738662431601.png

MauFanGilaMedical_13-1738662449488.png

I notice in the main that there is FATFS initialization

MauFanGilaMedical_14-1738662530908.png

but I don't find a call to MX_SDMMC1_SD_Init.

If I force this call after FATFS initlization the code run in ErrorHandler, but if I inpect hsd1.SdCard struct I see that card property are read correctly (I believe).

MauFanGilaMedical_15-1738662666669.png

BlockSize x BlockNbr = 128G !! OK

 

Can someone help me ?

Thanks in advice

 

 

 

 

 

 

 

 

 

 

2 REPLIES 2
MauFanGilaMedical
Associate

If I could help ...

I inspect the code step By step and I notice that my SD card is CARD_V2_X and that code seems go properly until it reaches this instruction in stm32h7xx_hal_sd.c

 

MauFanGilaMedical_0-1738740879399.png

 

error state is 4 (HAL_SD_ERROR_CMD_RSP_TIMEOUT) that is different from HAL_SD_ERROR_NONE and so it returns UNSUPPORTED_FEATURE.

 

Here the stack

MauFanGilaMedical_1-1738740982755.png

 

 

 

 

MauFanGilaMedical
Associate

I inspect SDMMC_CmdAppCommand ... I've tried to add some HAL_Delay (commented Mauro Fantina) but the problem still remain

MauFanGilaMedical_2-1738742648851.png