iMX6UL/LL/LZ USB OTG Switch Between Device And Host

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX6UL/LL/LZ USB OTG Switch Between Device And Host

No ratings

iMX6UL/LL/LZ USB OTG Switch Between Device And Host

      The i.MX6UL/LL/LZ processor supports 2 USB OTG interfaces, USB OTG1 and USB OTG2,
and each USB interface can be configured as a device, host or dual role mode. On the EVK
board of i.MX6UL/LL, USB OTG1 is designed as dual role mode, and USB OTG2 is designed
as HOST mode. This is sufficient for most customers.
      However, in actual applications, we may need 2 USB HOSTs, and at the same time, we
don’t want to use MicroUSB to USB TYPE-AF cable for Host-Device mode conversion.
Therefore, the design of the USB circuit needs to meet such requirements:
1. USB device mode
We need a USB device to download the linux image to the flash or SD card on the board.
2. 2 USB HOSTs
When the system is working normally, we need the board to support 2 USB HOST.
i.MX6UL/LL/LZ has only 2 USB ports. How to design to meet this requirement without
increasing the USB HUB?
The following scheme is used as a reference, and I hope it will be helpful to customers
with similar requirement:

6.png

       The logic and application description of this Diagram::

  1. Default—device mode

In the process of debugging the software, we need to use the USB OTG interface to download the linux image, so it must work in device mode. What we need to do is:

(1). Pull USB OTG ID up to 3.3V

(2). The USB OTG D+/D- signal is switched to the MicroUSB connector.

(3). The USB OTG VBUS is provided with 5V power from the external PC USB HOST.

Usage:

       -Use a jumper for Pin 1 and Pin2, USB OTG ID pin will be pulled up to High.

       With the operation, SEL pin of USB Muxer is High, and USB signals are switched to port B, and USB differential signals are connected to MicroUSB connector. At the same time, MIC2026-1YM output is disabled. The USB OTG1 VBUS pin of CPU is supplied by VBUS of MicroUSB connector, that is to say, supplied by PC USB HOST.

       In this mode, software engineer can use it to download images to flash on board.

  1. Normal Work—Host mode

After the software debugging is completed, two HOSTs are needed on the board. At this time, we need to switch the USB OTG1 from device to HOST mode. What we need to do is:

(1). Pull USB OTG1 ID down to LOW

(2). The USB OTG D+/D- signal is switched to the USB Type-AF connector.

(3). Board should supply 5V power for USB device connected USB Type-AF connector.

Usage:

       -Use a jumper for Pin 2 and Pin3, USB OTG ID pin will be pulled down to Low.

       With the operation, USB OTG1 ID pin is pulled down to Low, SEL pin of USB Muxer is also LOW, USB signals are switched to Port A, and connected to USB type-AF connector. At the same time, MIC2026-1YM is enabled , OUTA will output 5V , which will supply USB device connected on USB type-AF connector.

 

[Note]

  1. Users need to pay attention to.

When using the jumper with PIN1/2/3, the board needs to be powered off. In other words, when switching between device and host, you need to switch off the power, then power on, and restart the board.

  1. The solution can also be used for i.MX processors with USB 2.0 interface.

 

NXP CAS team

Wedong Sun

01/15/2021

Attachments
Version history
Revision #:
1 of 1
Last update:
‎01-13-2021 08:45 PM
Updated by:
 
Contributors