How and when to use USB_ID (output) pin?

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
User avatar
eez-open
Member++
Posts: 22
Joined: Mon Oct 23, 2017 1:49 pm
Location: Croatia
Contact:

How and when to use USB_ID (output) pin?

Postby eez-open » Tue Jan 09, 2018 1:27 pm

I cannot find any information about how and when to use USB_ID pin. I'd like that USB port can works depending of situation as device or host (OTG). In MCU's datasheet (XE216-512-TQ128) all what I found is that "USB_ID does not need to be connected", and that is reserved output. My current wiring diagram for USB port looks like this:

Image

When USB is acting as host IC15 is switched on and deliver +5V to the +VBUS. In case of over-current trip, #USB_OC signal is monitored, and for detection of device, USB_ID input (pin 4 of Mini USB Type AB socket) is monitored. IC16 together with R14, C31 is intended for protection of MCU's USB pinouts (IC17USB). USB_ID pin is left unconnected, but I'm not sure that is all what is needed for OTG.
User avatar
mon2
XCore Expert
Posts: 820
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Tue Jan 09, 2018 7:02 pm

Hi.

1) The following article, figure 2 and description may help on the USB_ID pin details:

https://www.maximintegrated.com/en/app- ... vp/id/1822

https://electronics.stackexchange.com/q ... only-has-4

2) The USB load switch we have used in a mix of our designs is the AP2822AKATR-G1 - it is very important to confirm the pinout and stock position of this component. For some reasons, this variation of the p/n is under $ 0.10 USD each in T&R but other variations are over $ 0.50 USD each with scarce inventory. We did get stung by this mistake and had to respin our PCBs a second time to select the more popular footprint (AKA suffix).

https://www.mouser.com/ProductDetail/Di ... corporated

This part offers an additional feature in that if the load switch is OFF, there is no reverse leakage back to your power source.

3) This same part can replace the passive network of parts recommended by XMOS with numerous additional features and also will be a single hit placement on the SMD assembly process. The soft-start is great for the in-rush current, etc.

https://www.diodes.com/assets/Datasheets/AP2822.pdf
* again, do review the proper suffix and related footprint

Image

Image

4) Am concerned about the possibility of two power sources attempting to feed power onto the Vbus line at the same time. What if? Perhaps consider some logical Vbus power OR circuit so that no harm will occur to either power source in the event this case occurs. Do check around for circuits that will allow for self-power and bus-power automatic switching which is the same concept.

5) The USB interface pins will need to be impedance controlled so do highlight this detail to your PCB shop @ 90 ohms. In return the PCB shop should supply you with TDR documentation to confirm that for the laminate used by your shop, the USB traces are impedance controlled as requested.

Being USB (probably HS), you should consider only a 4L PCB layout.

We are using a mix of very qualified PCB and component shops in Asia for our prototypes (raw materials only - we assemble locally so do not see a clone of our tchotchke before it is finished). Reminds me of a story when we did the industry's first Plug & Play adapter for Logitech - the board was cloned in Taiwan within 2 months of introduction. Zero scruples in Asia. Had to threaten legal action to keep the importers in North America from selling the clones. Shout back if you need some recommendations.

Here is a good magazine that will keep you busy for a while :)

http://a.globalsources.com/mag/Electron ... path=Full1
User avatar
eez-open
Member++
Posts: 22
Joined: Mon Oct 23, 2017 1:49 pm
Location: Croatia
Contact:

Postby eez-open » Wed Jan 10, 2018 10:11 am

Thanks for reply. I'm aware of Maxim app note that describe basic principle. According to my current understanding I have everything needed to cover described scenarios. I presume the MCU will take care about attaching/detaching resistors from data lines depending of VBUS presence. Mentioned switch (AP2822) has equal functionality as used TPS2051B (even its -KA package variant has the same pinout). That include soft-start (thanks to current limiting), tiny reverse current (0.2 μA), etc.

Still, I didn't find an answer to my question how to use MCU's USB_ID output, or how it's programmed if that is possible at all, or its state is "hardcoded" in built-in USB functionality and all what I need to do is to wire it wisely when e.g. MCU wants to change role from initial peripheral (B-device) to host (A-device) after USB cable that assign external USB device to act as host (pin 5 on USB connector is wired to GND). If that pin is just reserved because e.g. its functionality is not implemented yet, I'd like to know that.
In summary, more info than what is presented in datasheet would be greatly appreciated.

Return to “Processors”

Who is online

Users browsing this forum: No registered users and 16 guests