MQX USB-HOST detecting the attachment of another HOST (PC)

Showing results for 
Search instead for 
Did you mean: 

MQX USB-HOST detecting the attachment of another HOST (PC)

Contributor II

Hi to all the community.

I have been struggling for a few days with this and I´m not sure yet if it is possible.

I have a running application in Kinetis K20 (MK20DX256VLL7) in a custom board, working properly. The application works with MQX 4.0 as a USB-HOST in order to manage a wireless USB antenna, so the application is mounted over the USB CDC example in MQX. The app was compiled in CodeWarrior 10.5 with GCC. The board doesn´t have any extra USB transciever, its just the K20.

Now I have been assigned make the app detect if a PC is connected to the USB connector instead of a device. That's the mission. So the ways to solve this, as I see it, are the following:

1*- Making the app work with MQX but instead of USB-HOST as a USB-OTG in order to detect if a host or device is connected and make decisions accordingly (using an MQX example, for instance).

2*- Continue working with MQX USB-HOST CDC example, and some how, detect if a PC (another host) is connected to the USB instead of a device (just need to detect the connection of something different from a device).

3*- Modify the entire application in order to no longer works with MQX, but with one of the OTG bare metal examples of the Freescale USB Stack v4.1.1 instead (this option is the most time consuming because basically I have to re do the entire application).

After reading in various posts and the documentation, it seems that there are no examples in MQX 4.0 with USB - OTG (which could solve point 1*-).

I have debugged the application as it was, and tested connecting the USB to the PC, but I´m not able to detect anything, not even an error interrupt or something like that (which could solve point 2*-).

I haven´t reached yet point 3*-, because, first, I want to be sure that points 1*- and 2*- can be discarded. 

So the question is: it is possible to accomplish points 1*- or 2*-?. And how can I do it?

Thank you all in advance!!!


Martin Mignone 

0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi Martin:

unfortunately we don't support the OTG functionality with legacy MQX USB Host/Device stack.

I don't understand why your K20 USB host need to connect a PC usb host?



0 Kudos