I'm using a Kinetis K70 with MQX 4.1 (but same problem with MQX 4.2)
I'm using the USB demo for test (\demo\hvac\...)
With a key, all work fine.
With another key (also in FAT32, but not the same model/manufacturer) the demo not work:
After debug, when usb_host_driver_info_scan is called, the ouptut make the type an USB_CLAS_MASS_STORAGE when working (0x8 0050), and then USB_CLASS_HUB (0x9 0000) when not working.
Then according ClassDriverInfoTable in usb_task.c (exemple)
- call usb_host_mass_device_event (function coded in usb_task.c of exemple) -> this function is called when plug the working key, this activate all code of the emxemple and file system is mounted...
- call usb_host_hub_device_event (function not coded in the exemple, but present in \usb\host\source\classes\hub\usb_host_hib_sm.c) -> this function is called when plug the not working key. This function not working with exemple because not generate the semaphore of the exemple (usb_taskq)...
So the questions are:
- why for some key, the recognize type is an HUB instead of Mass storage?
- Must we adapt the callack usb_host_hub_device_event to work fine (in this case, how do it) or must we look for why the USB key is recognize as an HUB???