The board I am working on has on board USB OTG port (KL25Z). Actually it is dual role, 'cause I haven't implemented OTG protocol yet. The VBUS design bothers me a lot.
Above is recommended from FSL application note.
Here is some snapshots of my schematics.
Fig 1: USB Port
Fig 2: Power Supply
Fig 3: Load Switch
In USB dual role design, we have two power source, Vin (5V) and VBUS (5V). These sources are ORed by diodes to LDO to offer 3.3V Vcc.
When in USB device mode, VBUS offers 5V, via diode, to LDO, generates 3.3V.
When in USB host mode (loaded with host firmware), Vin offers 5V, via diode, to LDO, generates 3.3V. VBUS output is controlled by a load switch SP619.
The VBUS will be switched on in host mode only if ID-pin is grounded. However what happens if an abnormal cable (terrible connector with internal short-circuit ID-pin to GND) is used between external host to this board? VBUS and Vin have contention here. SP619 has 0.377Ohm Rds, so even 0.1V gap between VBUS/Vin will generate 265mA current. Yes, the situation is abnormal and doesn't appear too often, but we must prevent it.
I add two sense networks on VIN/VBUS. That makes things more complex since it involves firmware interaction.
Is there a better and mature circuit for USB dual role? Actually I referred circuit design from IOIO(microchip), Arduino Due(Atmel). The first one also implements a user button to enforce VBUS. The latter one uses an external comparator and two NMOS circuit.
Hi, Liu Kai
Attached picture is our board schematic for your reference.
Hope it is helpful for you.
Best Regards
Paul
Thanks Zhe Tian,
A diagram explains a lot. I will go thourgh this. If I have any further questions, I will ask later.
Hi, Liu Kai
No problem. How about your issue process? Is it work well?
Best Regards
Paul
Hello, Zhe Tian,
Thanks for your time for pasting your schematics. Really appreciated. I have downloaded datasheets for SMSC USB3300 and MIC2026. I found actually we share some design with different parts. Let us discuss on your schematics.
SMSC USB3300:
MIC2026:
USB Micro A/B:
Operations:
Device only mode:
VUSB_5V -> L509 -> VUSB_SMSC -> VUSB_OTG_SR -> D3 -> 1117 -> VCC3V3
OTG mode:
Device A/B mode:
CPEN -> EXT_PWR_EN -> (ENA) MIC2126
VCC5V -> VUSB_SMSC -> L509 -> VUSB_5V (maybe LM1117)
CPEN is controlled under DrvVbus/DrvVbusExternal by firmware.
EXTVBUS is flag from external vbus switch.
The situation I am worried about is:
If external host connects to our board with a short-circuit cable, (ID pin is grounded), then firmware will read the ID-pin in wrong state, and switch the MIC2126 via CPEN. VBUS from MIC2126 will conflict with VBUS from external host.
Some hardware guy tell me that rarely happens, and if we use serial topology LDO, that is all right.
So far, I haven't find any hardware protection method, so I can only state it clearly in my user manual.