Skip to main content
Graduate
June 21, 2024
Solved

SDMMC + FATFS on STM32H753Zx

  • June 21, 2024
  • 1 reply
  • 2464 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  

    This topic has been closed for replies.
    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

    Graduate II
    June 21, 2024

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

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

     

     

    Technical Moderator
    July 8, 2024

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