问答

汇集网友智慧,解决技术难题

21ic问答首页 - at32f415 rt-thread下识别U盘

AT32F415 U盘 RT-Thread 嵌入式 国产芯片 单片机

at32f415 rt-thread下识别U盘

jw__liu2024-06-17
第一次能顺利识别 拔出U盘来再次插入就不能识别了。
回答 +关注 14
2478人浏览 1人回答问题 分享 举报
1 个回答
  • 本帖最后由 tyw 于 2024-6-17 09:28 编辑

    代码卡死在 drv_usbotgh.c 的 225 行的while循环里
        while(retry --)
        {
            rt_completion_wait(&urb_completion, timeout);
            if(usbh_get_urb_status((&p_usbotg_instance->p_otg_core->host), pipe->pipe_index) == URB_NOTREADY)
            {
                if((pipe->ep.bEndpointAddress & 0x80) == 0)
                {
                    goto __resend;
                }




您需要登录后才可以回复 登录 | 注册