2024-06-21 05:07 AM - last edited on 2024-06-21 05:34 AM by Tesla DeLorean
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
Solved! Go to Solution.
2024-07-08 03:12 AM
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".
2024-06-21 05:34 AM
STM32Cube_FW_H7_V1.10.0\Projects\STM32H743I-EVAL\Applications\FatFs\FatFs_uSD_Standalone
2024-07-08 03:12 AM
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".
2024-07-08 03:35 AM
You need to adapt the example pointed out by @Tesla DeLorean to your custom HW
2024-07-08 04:45 AM
hi
i have using adapter (DM1AA-SF-PEJ-82) part number
2024-07-08 04:57 AM
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.
2024-07-10 12:12 AM
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).