2022-02-24 04:01 AM
Environment:
tool: STM32CubeMX6.4.0
cpu: STM32H755XI
Repos: STM32Cube_FW_H7_V1.9.1
The following lines in HAL_MMC_GetCardCSD() is probably incorrect.
pCSD->EraseGrSize = (uint8_t)((hmmc->CSD[2] & 0x00004000U) >> 14U);
pCSD->EraseGrMul = (uint8_t)((hmmc->CSD[2] & 0x00003F80U) >> 7U);
I suppose it is compliant with the CSD register of SD memory card specifications. However it is a MMC driver and should be compliant with Embedded MultiMediaCard System Specification.
Would you please help to check and confirm?
Below is the CSD of eMMC4.5
Below is the CSD of SD
Thank you!