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)
{
ehciInstance->ehciIpBase->USBSTS = interruptStatus;
if (interruptStatus & USBHS_USBSTS_SRI_MASK)
{
}
if (interruptStatus & USBHS_USBSTS_SEI_MASK)
{
}
if ((interruptStatus & USBHS_USBSTS_UI_MASK) ||
(interruptStatus & USBHS_USBSTS_UEI_MASK))
{
USB_OsaEventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_TRANSACTION_DONE);
}