This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6748上电启动EMMC失败

HI,

大家好.目前我们在用C6748+镁光的EMMC.

在debug模式下,上电第一次初始化EMMC模块都需要两次才能成功(第一次读写必然失败,restart之后就可以一直正确读写,重新断电现象重现,)

将程序烧写到emmc之后,能从emmc启动,但是板卡无法完成emmc初始化操作(不能像debug模式下进行上电restart操作)

请问下以上现象是什么原因造成的,有什么解决方案?

以下是每次出错的地方,都是等待超时,红色为返回处

if (timeOut > 0)
{
    /* Wait for RspDne; exit on RspTimeOut or RspCRCErr
    bit 2 - RSPDNE
    bit 3 - 7 Error/timeout */
    while( ((statusRegBits & (0x00FC)) == 0) && (timeOut > 0))
    {
        statusRegBits = SDMMC->MMCST0;
        --timeOut;
    }

    // We got a software timeout

    if (timeOut == 0)
    {
        return E_TIMEOUT;
    }

    if ((statusRegBits & SDMMC_MMCST0_RSPDNE_MASK) == SDMMC_MMCST0_RSPDNE_MASK)
    {
        return E_PASS;
    }
    else
    {
        return statusRegBits;
    }
}