We use the MK26FN2M0CAC18R processor for a custom board we have made. On this board we have a USB High Speed (EHCI) USB composite mass-storage and CDC UART application. We've found one (broken) board to have become unresponsive on a Windows or Linux PC that has worked before.
I have another (working) board with the exact same hardware and software,which is working fine.
To simplify things for further analysis, I've run an USB CDC UART application that is derived from an example from the SDK, giving the same results.
On the broken device:
Using the JLink debugger, I can see that the driver initialization is all OK.
After the IRQ has been registered, the RS bit is set which results in a pull-up pulse on the DP line. I added logging in the ISR and function that handled the USB controls and I see that the USB_DeviceEhciInterruptReset call results in the isResetting flag being set. There is no more interrupt on USB or any post-initialization of the stack done by any piece of code after this.
Connecting this device in Ubuntu does not result in any kernel loggings.
On the working device:
After the IRQ has been registered, the RS bit is set which *does not* result in a pull-up pulse on the DP line.
The USB_DeviceEhciInterruptReset call results in a callc to the USB_DeviceNotificationTrigger(kUSB_DeviceNotifyBusReset) function.
It therefore appears the PortReset bit in the PORTSC1 is not set before the poll timeouts in the broken device.
What can cause this ?
Can I analyze any further from software point of view ?
I have tried to switch to the KHCI full speed USB driver but I can't get this to work, also not on the working device. Is there anything else I need to do in the usb device config file except enabling KHCI and disabling EHCI & rebuild from scratch ?