How to design USB1 OTG device/host using same circuit

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to design USB1 OTG device/host using same circuit

5,041件の閲覧回数
vasudhevan
Contributor V

Hi,

       How can we design usb1 otg should act device as well as host using imxrt1064 ?

       I got some link from nxp forum https://community.nxp.com/thread/319562  any other method is there using single usb micro connector achieve both host and device operation ?

Thanks & Regards

        Vasu

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

4,817件の閲覧回数
fangfang
NXP TechSupport
NXP TechSupport

Hello.

For the application please refer to the design of the EVK. USB OTG1 is configured in Dual Role mode, that is, it can be used as HOST or device.

  The resistor pulls the USB OTG1 ID pin to 3.3V. For the RT1064 EVK circuit, when the USB OTG1 ID is high, the NX5P3090UK passes the role of the 2SK3018 transistor. The EN interface is low, so 5V_USB_OTG is not output. So the development board is device.
When the circuit is connected to the USB OTG to Host line, the USB OTG1 ID automatically switches to a low level, so the EN interface of the NX5P3090UK is high. At this time, there is 5V_USB_OTG output voltage, so the development board can be used as HOST.

Hope it help you.

0 件の賞賛
返信

4,817件の閲覧回数
vasudhevan
Contributor V

Hi fangfang,

        Thank you for your response.

        I checked with evk schematic.

        I imported evkmimxrt1064_host_msd_fatfs_bm example project USB OTG1 ID pin is not assigned.

        How this pin managed USB OTG1 ID in example projects ?

        Whenever inserting host device that time only this pin goes to low correct ?

        MCU one pin USB_OTG1_ID assigned how can we handle this pin using code ?

Thanks & Regards

         Vasu

0 件の賞賛
返信

4,816件の閲覧回数
fangfang
NXP TechSupport
NXP TechSupport

Hello Vasu.

Please refer to the file as the attached.

0 件の賞賛
返信

4,815件の閲覧回数
johannzimmerman
Contributor III

Hi,
I have the same question:
How does the application get what is currently connected to the USB port?
Can I then initialize the USB device and USB host (as in the examples of the SDK)
at the same time and handle both in the IRQ like below?

void USB_OTG1_IRQHandler ()
{
    USB_DeviceEhciIsrFunction(s_cdcVcom.deviceHandle);
    USB_HostEhciIsrFunction (g_HostHandle);
}

In the examples of the SDK, only hosts or devices exist.
Is there any example of other NXP CPUs in the SDK?

Regards
Johann

0 件の賞賛
返信

4,816件の閲覧回数
tim_wang
NXP Employee
NXP Employee

Hi Johann,

You can refer to the pin_detect_hid_mouse demo in SDK.

Thanks

0 件の賞賛
返信