Issues getting the 2nd USB Port Up?

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

Issues getting the 2nd USB Port Up?

874 Views
adamgarrison
Contributor III

We are having a few issues in getting the 2nd USB port up.


I’m trying to get the USB On-The-Go Port 2 to initialize as a Device (not a host).  So far I think I’m missing something in the initialization process and I’m a little lost on HOW to initialize the ports as this will help me identify where I need to make my corrections.

So far I’ve done the following:

  1. 1. Disable the usb charger detector
  2. a.      Reg 0x020C8210

i.     setting bit 19 and 18 to 1

  1. 2. Powered up the 480Mz PLL
  2. a.      Reg 0x020C8024

i.     bit 6 to 1

  1. 3. Enabled usboh3 clock
  2. a.      Reg 0x020C4080

i.     setting bit 0 and 1 to 1

  1. 4. Started Gate UTMI Clocks
  2. a.      Reg 0x020CA034

i.     setting bit 30 to 0

  1. 5. Set the OTG Device Mode
  2. a.      Stopped Controller

i.     Reg 0x02184340

  1. 1.      Bit 0 = 0
  2. b.      Performed core reset

i.     Reg 0x02184340

  1. 1.      Bit 1 = 1
  2. a.      Wait for reset to complete (Bit 1 = = 0)
  3. c.      Reset USB OTG PHY clock

i.     Reg 0x020CA030

  1. 1.      Bit 30 = 1
  2. d.      Powered PHY backup

i.     Reg 0x020CA000

  1. 1.      Cleared all bits
  2. e.      Set USB Mode to Device

i.     Reg 0x021843A8

  1. 1.      Bit 0 = 0
  2. 2.      Bit 1 = 1
  3. f.       Disabled Setup Lockout in USB Mode

i.     Reg 0x021843A8

  1. 1.      Bit 3 = 1

  This process works and USB OTG Port 1 works but Port 2 I don’t get any response from the device when my host request data.  Why?

Note that we have a fully functional driver for USB1.

          We are using that driver but changing the base address to be USB2.

          So if the bits are all the same between them we would have assumed it should just work.

          2 KNOWN differences are

ISR vector

Base address of register stack.

          So going from a perfectly working composite device with 3 functions (ACM, Mass storage, RNDIS) to it does nothing seems like there is just one little thing as opposed to           an entire driver write from ground up problem.

          This is why we are reaching out because there must be something else different about USB2 from USB1 to make a perfectly good driver non responsive.

          This is a peripheral setup issue not a driver issue I guess is what I’m saying.  Am I on the right track?


Thank you,


Adam

Labels (2)
Tags (1)
0 Kudos
Reply
3 Replies

675 Views
adamgarrison
Contributor III

Just cracked it yesterday. It appears the manual has the wrong interrupt vector assigned to OTG2.

The manual has vector 72 for OTG2 when it was 74 (USB Host Interrupt request) that was the correct value.

I’ve verified that OTG2 was a device and all my drivers function the same as on OTG1.  Is this a misprint? or a did others get their port working using vector 72 as stated in the manual?

0 Kudos
Reply

675 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Adam,

I have asked with AE team if the interrupt vectors table is correct. In the mean time, you could take a look at the USB examples of the Platform SDK, available for download here.


Hope this will be useful for you.
Best regards!
/Carlos

0 Kudos
Reply

675 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Adam,

Have you ensured which specific part number are you using?

The MX6SL has a different USB block than the QD and DL.

MX6SL has 2 OTG controllers and 1 HSIC host.

QD and DL have 1 OTG, 1 HOST and 1 HSIC hosts.

Interrupt vectors should be as shown below (for MX6SL and iMX6QD):

usb vectors on 6Q.png

usb vectors on 6SL.png


Hope this will be useful for you.
Best regards!
/Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply