Skip to main content
Associate III
June 21, 2024
Solved

SDMMC + FATFS on STM32H753Zx

  • June 21, 2024
  • 1 reply
  • 2469 views

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  

Best answer by Naresh_

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".     

 

 

1 reply

Tesla DeLorean
Guru
June 21, 2024

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Naresh_AuthorBest answer
Associate III
July 8, 2024

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".     

 

 

mƎALLEm
ST Technical Moderator
July 8, 2024

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 "Best answer" on the reply which solved your issue or answered your question.