2020-09-30 04:56 AM
Hi, i am using stm32h750 with eMMC Kingston EMMC16G-W525-E01U, as mass storage device. MCU and eMMC operates from 3.3V.
I can put eMMC to 8-bit mode and it works ok, but maximum clock speed in 8-bit mode is 25 MHz. If i set clock speed more than 25 MHz, device is not working.
In eMMC datasheet i found that it support high speed mode at 3.3V with 8-bit wide bus, at maximum clock 52 MHz.
Also in "Getting started with STM32H7 Series SDMMC host controller" application note, i found that stm32h7 support high speed mode at 3.3V with 8-bit wide bus, at maximum clock 52 MHz.
May be i have some errors in code that configures eMMC in high speed mode?
eMMC initialization function:
uint8_t BSP_MMC_Init(void)
{
HAL_MMC_MspDeInit(&hmmc2);
uint8_t mmc_state = MMC_OK;
eMMC_reset();
hmmc2.Instance = SDMMC2;
hmmc2.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
hmmc2.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
hmmc2.Init.BusWide = SDMMC_BUS_WIDE_1B;
hmmc2.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
hmmc2.Init.ClockDiv = 2;
hmmc2.Init.TranceiverPresent = SDMMC_TRANSCEIVER_NOT_PRESENT;
if (HAL_MMC_Init(&hmmc2) != HAL_OK)
{
mmc_state = MMC_ERROR;
}
if(HAL_MMC_ConfigWideBusOperation(&hmmc2, SDMMC_BUS_WIDE_8B) != HAL_OK){
mmc_state = MMC_ERROR;
printf("HAL_MMC_ConfigWideBusOperation() Error");
}
if(HAL_MMC_ConfigSpeedBusOperation(&hmmc2, SDMMC_SPEED_MODE_HIGH) != HAL_OK){
mmc_state = MMC_ERROR;
printf("HAL_MMC_ConfigSpeedBusOperation() Error");
}
return mmc_state;
}
I attached screenshots from datasheet, application note.