cancel
Showing results for 
Search instead for 
Did you mean: 

SDMMC + FATFS on STM32H753Zx

Naresh_
Associate III

Hi,
   i go to start SDMMC1 in STM32H753z, is any sample code? can please provide.

   in SDMMC i need to use FATFS APIs or SDMMC APIs ? i am confusing please help me.

   when i debug the below code i am can n't access it stop at f_mount() starting only.

 

please provide how to use SDMMC.

Thank You  

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Tesla,

        thank you for fast response, 
i have using STM32H753Z custom board, my requirement is read and write in SDMMC (SD card) ,

i am using SDMMC1    PC8 -> SDMMC1_D0

                                     PC9-> SDMMC1_D1

                                     PC10-> SDMMC1_D2

                                      PC11-> SDMMC1_D3

                                      PC12-> SDMMC1_CLK

                                       PD2-> SDMMC1_CMD

                                   PB1 -> CARD_DETECT(GPIO_INPUT)

                                  PB2 -> WR_PROTECT(GPIO_INPUT)

 my issue is when i debug then disk_initialize(pdrv)  pdrv is 0  return the 1 means it not dictated SD card. 

before that i am reading  PB1 -> CARD_DETECT (GPIO_INPUT) by using HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_1)  when card is placed then it return "0".     

 

 

View solution in original post

6 REPLIES 6

STM32Cube_FW_H7_V1.10.0\Projects\STM32H743I-EVAL\Applications\FatFs\FatFs_uSD_Standalone

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi Tesla,

        thank you for fast response, 
i have using STM32H753Z custom board, my requirement is read and write in SDMMC (SD card) ,

i am using SDMMC1    PC8 -> SDMMC1_D0

                                     PC9-> SDMMC1_D1

                                     PC10-> SDMMC1_D2

                                      PC11-> SDMMC1_D3

                                      PC12-> SDMMC1_CLK

                                       PD2-> SDMMC1_CMD

                                   PB1 -> CARD_DETECT(GPIO_INPUT)

                                  PB2 -> WR_PROTECT(GPIO_INPUT)

 my issue is when i debug then disk_initialize(pdrv)  pdrv is 0  return the 1 means it not dictated SD card. 

before that i am reading  PB1 -> CARD_DETECT (GPIO_INPUT) by using HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_1)  when card is placed then it return "0".     

 

 

You need to adapt the example pointed out by @Tesla DeLorean to your custom HW

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

hi 
i have using adapter (DM1AA-SF-PEJ-82) part number  

 

 

 

 

Even with this adapter you can adapt the example with your HW. So you need to check this Card Connector pinout. 

You need to refer to DM1AA-SF-PEJ-82 documentation.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

hi Soflit,

       actually Hardware connection is okey but in stm32h7xx_hal_sd.c file 

when i power ON by using this function is SD_PowerON(SD_HandleTypeDef *hsd)  some API is providing time out as below in this are1)  SDMMC_CmdOperCond(hsd->Instance);

                          2)SDMMC_CmdAppCommand(hsd->Instance, 0)

most of  time getting  flag  is 4(time out )  and  some time 1 ( CRC mismatch).