I am implementing the USB stack (High Speed, EHCI controller) on a Kinetis MK26FN2M0VMI18 starting from the code generated by the latest MCUXpresso SDK.
I am trying to implement an USB Virtual COM device.
When using the project generated by the SDK the device is enumerated correctly.
However, I need to import the USB code, including initialization of clock and registers, in our existing project, so I tried to do this process with the greatest care. Nevertheless, the enumeration is not working: the PC is giving the message "Unrecognized USB device". The _usb_dci_usbhs_isr service routine is never called with EHCI_STS_INT set (the UI bit of USBHS_USBSTS register), which would imply serving the GET_DESCRIPTOR request from the PC. The interrupt is enabled: bit UE of USBHS_USBINTR is set correctly.
In the USBHS_USBSTS register, the SEI bit is set (this does not happen in the original MCUXpresso project). Documentation says "System Error - Set when an error is detected on the system bus".
What could I have missed in importing the USB code in our project? What are the possible causes of the SEI error?
Thank you.