AnsweredAssumed Answered

IMX1050RT USB Multiple Interrupts Stop Working

Question asked by BENJAMIN OLAYINKA on Jul 2, 2019
Latest reply on Aug 12, 2019 by Daniel Chen

I'm creating a FreeRTOS app using the USB host drivers in MCUXpresso on the IMX1050RT, and I'm encountering a frustrating issue.

If multiple transaction interrupts occur before the ISR can service them, then transaction interrupts stop working completely.

According to the USB API, the USB_OTGIRQnHandler should call USB_HostEhciIsrFunction, and I can see in the debugger here that normally, the interrupt fires and USBSTS bit 1 is high when a transaction is complete.

However, if I pause the debugger, and send a few messages over USB, once the ISR finishes, USBSTS bit 1 never goes high again.


Here's the relevant part of USB_HostEhciIsrFunction, from esb_host_ehci.c. Has anyone encountered something similar?


interruptStatus = ehciInstance->ehciIpBase->USBSTS;
    interruptStatus &= ehciInstance->ehciIpBase->USBINTR;
    while (interruptStatus) /* there are usb interrupts */
        ehciInstance->ehciIpBase->USBSTS = interruptStatus; /* clear interrupt */

        if (interruptStatus & USBHS_USBSTS_SRI_MASK) /* SOF interrupt */

        if (interruptStatus & USBHS_USBSTS_SEI_MASK) /* system error interrupt */

        if ((interruptStatus & USBHS_USBSTS_UI_MASK) ||
            (interruptStatus & USBHS_USBSTS_UEI_MASK)) /* USB interrupt or USB error interrupt */
            USB_OsaEventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_TRANSACTION_DONE);