AnsweredAssumed Answered

i.MX 1050 stuck on USB interrupt and other USB issues

Question asked by BENJAMIN OLAYINKA on Aug 14, 2019
Latest reply on Oct 20, 2019 by Tim Wang

My FreeRTOS project is hanging on a couple of USB host issues.

 

1) The USB host controller seems to be issuing interrupts even though none of the interrupts it is issuing are enabled. I guess the phantom interrupt is then not cleared, because I get stuck in an infinite interrupt loop. Here are the USBINT and USBSTS registers - you can see that none of the STS bits are enabled in the INT register, so I don't know why an interrupt is being triggered? I'm reading these registers from within the interrupt routine, btw.

 

 

As a temporary fix, I'm enabling USBINT bits 4 and 7 so that the ISR will see them and clear them. This is still a very strange bug, though, and I don't want to have to enable all interrupts just in case they somehow fire when they are disabled and lock up the processor.

 

2) If I pause the debugger and data comes in on a USB host port, I don't receive any more USB data. Transaction interrupts never fire, only timer interrupts. Removing and reconnecting the device fixes this. I noticed that the same thing would happen if a printf or something slow prevented an interrupt from being serviced by the USBHostTask. This is a hard problem for me to debug, since I can only reproduce it by pausing the debugger, and then I never get the interrupt I need in order to see what's going wrong.

Outcomes