USB

USB 发送过程中 USB_DeviceEhciTransfer 死循环

发布于 2020-08-17 20:13:00

大量数据发送过程中,程序死循环在 USB_DeviceEhciTransfer 中的下面这段代码里。可能会是什么情况呢?

    /* If QH is empty or the endpoint is not primed, need to link current dtd head to the QH. */
    /* When the endpoint is not primed if qhIdle is zero, it means the QH is empty. */
    if ((qhIdle) || (!(epStatus & primeBit)))
    {
        ehciState->qh[index].nextDtdPointer = (uint32_t)dtdHard;
        ehciState->qh[index].dtdTokenUnion.dtdToken = 0U;
        ehciState->registerBase->EPPRIME = primeBit;
        while (!(ehciState->registerBase->EPSR & primeBit))
        {
            if (ehciState->registerBase->EPCOMPLETE & primeBit)
            {
                break;
            }
            else
            {
                ehciState->registerBase->EPPRIME = primeBit;
            }
        }
    }

查看更多

关注者
0
被浏览
337
0 个回答
暂无答案,快来添加答案吧

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览