Using USB-C connector with MK22 as Host/Device (PTN5150A)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using USB-C connector with MK22 as Host/Device (PTN5150A)

1,762 Views
Uzi
Contributor II

Hi,

I would like to use MK22 (MK22FX512AVLK12) as USB Host/Device with USB-C connector.

Can anyone share thoughts how should I do this, (since there is no dedicated ID pin)?

If I understand correctly, I need to use a controller like PTN5150A and program the MK22 to read by I2C the state of the connected element and decide by that if yo act as Host or Device.

If anyone has insight about it or reference design or app note - I'll appreciate it.

If there are any insights/recommendations about the SW aspect of the MK22 - it will be helpful.

I would like to verify I didn't miss anything with this,

Thanks!

Uzi

Labels (2)
Tags (2)
0 Kudos
Reply
5 Replies

1,731 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

In order to understand your case, I have some questions, Are you want to use the MK22 as a Host or Device? in the case of a Device I have some suggestions. The Mk22 does not have support for USB C but I found the following information.

Source: PTN5150A-RM.pdf (nxp.com)

In the Reference manual of the PTN5150 chapter 5. Different Operation Modes I suggest you can use the Mk22 as [Device (UFP) Mode] through the PN5150. If this is right in the SDK of the Mk22 there are many examples for USB.

Pavel_Hernandez_0-1658791945744.png

If this is not the way, Could you tell me more details about the application you want to achieve?

Best regards,
Pavel

0 Kudos
Reply

1,728 Views
Uzi
Contributor II

Hi Pavel,

Thanks for the help.

I intend to use MK22 as OTG (host and device). On Micro USB connector - we have the ID pin that tells the MCU if it should be host or device (If i understand correctly, there is not dedicated pin, but a GPIO that I need to set for this purpose).

I want to use USB-C connector, so looking at HW connections aspect, I think (If I'm not wrong) that PN5150A should help the MCU to understand the required information (host/device) - but now its through I2C. That is leading me to the question - if there is any SW aspect that needed to be covered and if there is SW libs that required and already exists.

And generally, I would like to verify that I didn't miss any other aspect of the implementation planning. 

BTW, when the MK22 is host, I plan that it will talk to mass storage device (usb flash drive).

Thanks again!

0 Kudos
Reply

1,722 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

When you say, there is no dedicated pin, but a GPIO that I need to set for this purpose, what kind of pin are you saying?

Best regards,
Pavel

0 Kudos
Reply

1,712 Views
Uzi
Contributor II

Hi Pavel,

Some MCU vendors use dedicated pin on the IC for the functionality of ID, as part of the USB interface (same idea as DP/DM has dedicated pins and not "shared functionality with other usability like GPIO).

When I wrote it, I referred to another MCU vendor that I came across.

0 Kudos
Reply

1,674 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

In this case, I would like to recommend the following evaluation board that might useful for you as a reference for your design.

OM13790 Host & Dock: USB Type-C Shield Board Gen 2 with Display Port Alt Mode

NXP’s Generation 2.0 USB Type-C shield board, combined with an MCUXpresso SDK with USB Power Delivery Stack, allows you to tether a USB Type-C connector. This shortens the learning curve by leveraging NXP’s Easy-to-use hardware and MCUXpresso software and tools, the only solution like it on the market. You may find the design files at the bottom of the web page.

The device includes a bi-directional high voltage power switch supporting both 20 V sink and source. Please review the document below.

USB Type-C Shield enables DisplayPort Alt-Mode, USB 3.1 Gen 1, OVP/OCP protection and 100 Watt bi-di...

 

In this case, the PTN5150 is a CCLogic chip, while the PTN5110 is a USB-PD PHY device. You may find further information in the UM11055 - NXP USB PD shield board user manual.

0 Kudos
Reply