cancel
Showing results for 
Search instead for 
Did you mean: 

Missing transfer complete interrupt partway through USB Host transfer

LVoze.1
Associate

Transfer operates successfully for approximately 300ms before abruptly stopping. USB interrupt can be seen on the attached capture operating normally in the first transfer. On the failing transfer no interrupt can be seen. The next interrupt that occurs is SOF but the previous transfer has long since failed and the bus is locked up repeating the same data continuously forever.

At this point in time the USB software stack is stuck in this while loop waiting for the interrupt to mark the URB state as complete (usbh_msc.c):

while (USBH_MSC_RdWrProcess(phost, lun) == USBH_BUSY)
    {
        if (((phost->Timer - timeout) > (10000U * length)) || (phost->device.is_connected == 0U))
        {
            MSC_Handle->state = MSC_IDLE;
            return USBH_FAIL;
        }
    }

STM32F7, ST's USB Host library, MSC class, FatFS, FreeRTOS.

Any help you can provide is greatly appreciated!

3 REPLIES 3
mohamed.ayed
ST Employee

welcome to our community :smiling_face_with_smiling_eyes:.

Could you please provide more details or a sample project to reproduce the issue?

ABOUA
ST Employee

Hello LVoze.1,

Could you please also confirm which host library version are you using v3.4.1?

if yes, due to a bug on this version I highly suggest you to upgrade to at least v3.5.0 or as WA for v3.4.1 at application level make sure to define USBH_MAX_DATA_BUFFER to be at least 1024bytes

I am using V3.5.1 with a buffer size of 1024 bytes.