I'm trying to use MSD on K65 running MQX 4.2.
I'm using the HVAC2 demo for that which worked fine apart from the MSD that never worked.
I've started debugging it and came with several issues.
First issue I've encounter was that for HS the controller was set to USB_CONTROLLER_EHCI_1.
After changing it to USB_CONTROLLER_EHCI_0, I've started to see activity on the microUSB (J15) while connecting mass storage device.
What I'm seeing is that the device is attached, it tries to install the file system and then it detaches.
Tracing it a little, it seems to me that an async transfer is initiated due to call to usb_class_mass_getmaxlun_bulkonly(), registering _io_usb_ctrl_callback() as the transfer completed callback.
The callback is registered in the usb_host_ptr->tr_list[tr_index].callback but is never called by anyone.
The USB task waits on COMMAND_DONE semaphore which should be posted by the callback, but as it is never called, it just times out and fails.
I've searched the entire code and was not able to find the calling code for this callback.
Any idea how to resolve that?