cancel
Showing results for 
Search instead for 
Did you mean: 

SDMMC_GetCmdResp1(); bug

PyKe
Associate III

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 !

1 REPLY 1
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen