How can I use FSL USB STACK for USB CDC HOST on MK64FN board?

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use FSL USB STACK for USB CDC HOST on MK64FN board?

926 Views
kirtiraje
Contributor III

Hello,

 I have created processor expert project in KDS 3.2 for Kinetis FRDM  MK64FN board. I am trying to use FSL USB STACK for USB CDC HOST communication. I would like to configure my hardware device (FRDM  MK64FN board) in CDC HOST mode and mobile application will act as CDC DEVICE. The reason I would like to do this is, to source power from FRDM  MK64FN board to mobile as well as data transfer on same USB OTG. 

I have used FSL_USB_STACK and USB_CDC_DEVICE  processor export component. Also I have connected ID pin of microUSB connector to GND to make the FRDM MK64FN board act inUSB HOST mode. When I debug the code, USB is getting initialized but USB is not enumerated. It is entering in USB_ISR() and exits back. 

Can any one help me to configure the CDC HOST mode and can I configure mobile in USB CDC DEVICE mode to connect to the FRDM MK64FN board as(USB CDC HOST).

Any help is appreciated. Thanks in advance.

Kirti

0 Kudos
6 Replies

557 Views
mjbcswitzerland
Specialist V

Hi

See also the following for USB-CDC host to device for all Kinetis parts: https://www.youtube.com/watch?v=XhISV1czIo4&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&index=16

Regards

Mark

0 Kudos

558 Views
kirtiraje
Contributor III

Thanks Mark, I will go through the link.

Kirti

0 Kudos

558 Views
BlackNight
NXP Employee
NXP Employee

Hi Kirti,

I have not used the CDC host part for a long while, and if I remember correctly it is still marked as experimental.

I have to check if I could create an example project for you, probably over the next weekend. No promise, but I'll give it a try.

Erich

0 Kudos

558 Views
kirtiraje
Contributor III

Hi Erich,

Did you get a chance to create an example project for USB CDC HOST. I am still facing the same issue.

Please let me know if you find any solution for this.

Thank you,

Kirti

0 Kudos

558 Views
BlackNight
NXP Employee
NXP Employee

Hi Kirti,

I had no chance to have a look yet.

Erich

0 Kudos

558 Views
kirtiraje
Contributor III

Thanks for the quick reply Erich.

Now I am able to connect to the mobile by configuring USB CDC HOST on FRDM K64 board. While debugging, when I connect the USB to mobile it is going to USB ISR() function and only once it is entering in below if loop. It is showing the charging icon on the mobile but not showing USB connected popup. 

if (status & USB_ISTAT_ATTACH_MASK)
{
/* usb device attached */
USB0_INTEN &= ~USB_INTEN_ATTACHEN_MASK;
_usb_event_set(&khci_event, KHCI_EVENT_ATTACH);
}

Please let me know if you get a chance to configure the CDC HOST on FRDM K64 board.

Thanks in advance.

Kirti

0 Kudos