2021-07-27 01:47 AM
Hi,
My programme of Write/Read from an eMMC is buged in this function call :
static uint32_t SDMMC_GetCmdResp1(SDMMC_TypeDef *SDMMCx, uint8_t SD_CMD, uint32_t Timeout)
{
uint32_t response_r1;
uint32_t sta_reg;
/* 8 is the number of required instructions cycles for the below loop statement.
The Timeout is expressed in ms */
uint32_t count = Timeout * (SystemCoreClock / 8U /1000U);
do
{
if (count-- == 0U)
{
return SDMMC_ERROR_TIMEOUT;
}
sta_reg = SDMMCx->STA;
}while(((sta_reg & (SDMMC_FLAG_CCRCFAIL | SDMMC_FLAG_CMDREND | SDMMC_FLAG_CTIMEOUT | SDMMC_FLAG_BUSYD0END)) == 0U) ||
((sta_reg & SDMMC_FLAG_CMDACT) != 0U ));
I appreciate any help !
2021-07-27 02:14 AM
Hello @PyKe,
Which Cube package release are you using?
Could you please check if this issue is reported with the latest release of the package ?
Imen