IMX1050RT USB Multiple Interrupts Stop Working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX1050RT USB Multiple Interrupts Stop Working

969 Views
benolayinka
Contributor III

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);
        }
Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

852 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi BENJAMIN:

I don't think multiple interrupts will stop, because your system is in a debugger session, debugger will halt MCU.

I would suggest you check whether the transfer call back is called correctly.

Regards

Daniel

0 Kudos
Reply