Method and system for switching role of usb otg device and otg device thereof
AssigneeMediaTek Singapore Pte. Ltd.
InventorsJingbo ZHANG, Chengchun NI
Life of this patent
Estimating the term…
Abstract
A method and system of switching a role of a Universal Serial Bus (USB) On-The-Go (OTG) device and a USB OTG device are provided. According to the method, when the USB OTG device receives a Host Negotiation Protocol (HNP) request sent from a link-partner, an OTG controller of the USB OTG device is reset. The state of an ID-pin detection end which is used by the OTG controller to detect a type of plug of a USB cable is modified to switch the role of the USB OTG device between a host and a peripheral.
Claims23
A method of switching a role of a Universal Serial Bus (USB) On-The-Go (OTG) device, comprising:
- resetting an OTG controller of the USB OTG device when the USB OTG device receives a Host Negotiation Protocol (HNP) request sent from a link-partner;
- modifying a state of an ID-pin detection end of the OTG controller, wherein the ID-pin detection end is utilized to detect a type of plug of a USB cable;
- and
- switching the role of the USB OTG device between a host and a peripheral.
A Universal Serial Bus (USB) On-The-Go (OTG) device, comprising:
- a host controller;
- a peripheral controller;
- an OTG controller, coupled to the host controller and the peripheral controller, comprising an ID-pin detection end for detecting a type of plug of a USB cable coupled to the USB OTG device,
- wherein the OTG controller is configured to be reset in response to a Host Negotiation Protocol (HNP) request sent from a link-partner, and to modify the state of the ID-pin detection end to control a currently enabled controller of the USB OTG device to switch between the host controller and the peripheral controller.
A method of switching a role of a Universal Serial Bus (USB) On-The-Go (OTG) device for a first USB OTG device and a second USB OTG device which couple to each other through a USB cable, the first USB OTG being initially an A-host, and the second USB OTG device being initially a B-peripheral, the method comprising:
- the second USB OTG device sending a first Host Negotiation Protocol (HNP) request to the first USB OTG device, wherein the HNP request is a request to become a host;
- the first USB OTG device suspending the USB bus, resetting an OTG controller of the first USB OTG device, and modifying a state of an ID-pin detection end to a B-type from an A-type, and switching a role of the first USB OTG device to the B-peripheral from the A-host;
- and
- after the second USB OTG detects that the first USB OTG device suspends the USB bus, the second USB OTG switching a role of the second USB OTG device to a B-host from the B-peripheral.
A system of switching a role of a Universal Serial Bus (USB) On-The-Go (OTG) device comprising:
- a first USB OTG device;
- and
- a second USB OTG device coupled to the first USB OTG device through a USB cable,
- wherein the first USB OTG device comprises a first host controller, a first peripheral controller, and a first OTG controller, the first USB OTG is initially an A-host, the first OTG controller is coupled to the first host controller and the first peripheral controller, the first OTG controller comprises an ID-pin detection end which is used to detect a type of plug of a USB cable coupled to the first USB OTG device,
- wherein the first OTG controller is configured to receive a first Host Negotiation Protocol (HNP) request sent from the second USB OTG device, suspend a USB bus, reset modify a state of an ID-pin detection end to a B-type from an A-type, and control a currently enabled controller of the first USB OTG device to switch to the first peripheral controller from the first host controller,
- wherein the second USB OTG device comprises a second host controller, a second peripheral controller, and a second OTG controller, the second USB OTG is initially a B-peripheral, and
- wherein the second OTG controller is configured to switch a role of the second USB OTG device to a B-host from the B-peripheral and control a currently enabled controller of the second USB OTG device to switch to the second host controller from the second peripheral controller after detecting the first USB OTG device suspend the USB bus.
Dependencies are inferred from the claim text.