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:
i. setting bit 19 and 18 to 1
i. bit 6 to 1
i. setting bit 0 and 1 to 1
i. setting bit 30 to 0
i. Reg 0x02184340
i. Reg 0x02184340
i. Reg 0x020CA030
i. Reg 0x020CA000
i. Reg 0x021843A8
i. Reg 0x021843A8
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
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?
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
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):
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!
-----------------------------------------------------------------------------------------------------------------------