How to set up USBHS dual role / OTG on Kinetis K70F150

Showing results for 
Search instead for 
Did you mean: 

How to set up USBHS dual role / OTG on Kinetis K70F150

Contributor I

Hello folks,

I am trying to get USB OTG or at least a dual role scenario functioning on a K70f150 cuostom board.

We have placed a USB-3300 Phy along with a TPS2052D for VUSB control as well as a TUSB320i to handle the TYPE C connector orientation and We are using MQX 4.2 RTOS.

Our product spec requires that we be able to function as a USB host for MSD as well as be able to function as a USB Device for CDC communication. To date I have modified the base USBH and USBD libraries to run HS. When I compile one or the other into our application I see proper functionality ... eg thumb drives enumerate and read/write or CDC communication is established and data can be passed back and forth between a Host and our system.

It was decided to code this system as dual role for simplicity. We currently have a system where attach and detach events are detected by the TUSB320i. Based on the data provided, the application chooses which stack to use. This functions well for the CDC device aspect. The system recognize the attach, loads the stack and proceeds to communicate. We have no issues with repeated attache/detach events.

The Host MSD side of things however seems to be giving us some issues. It seems that the system can only attach once. If a thumb drive is detached the system can no longer recognize subsequent attach events. When this happens the system does not recognize any form of attach event.

I have tested the system without a stack loaded and it (TUSB320i) continues to see attach/detach events as long as the Host stack does not get loaded. It seems as though the ULPI controller looses contact with the phy and is unable to reconnect/resume. I tried using the various commands in the stack to try to force a reset or a resume but have not had any results.

Triggering the external reset for the phy did not seem to rectify the issue either. It would be difficult to physically cut power to the phy due to our layout so we have avoided that at this point.

Can anyone offer suggestions as to how I should proceed at this point?
Thank you for your time.

0 Kudos
0 Replies