Apparatus and method for ensuring power delivery in a universal serial bus interface

The port controller detects abnormal leakage current in the USB socket and disconnects the power transmission, which solves the problem of excessive power consumption of the USB interface when foreign objects enter or short-circuit, ensuring the safety and stability of the equipment.

CN110854805BActive Publication Date: 2024-11-15SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910297106.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-08-20
Filing Date
2019-04-12
Publication Date
2024-11-15
Estimated Expiration
2039-04-12

AI Technical Summary

Technical Problem

When the conductive foreign objects enter or short-circuit, excessive power consumption is easily caused by the USB interface, resulting in damage to the equipment. The prior art cannot effectively detect and prevent leakage current.

Method used

The port controller detects the abnormal leakage current state in the USB socket, and when an abnormality is detected, the switch between the power pin and the internal circuit of the device is turned on and enters the unattached state to prevent power transmission.

Benefits of technology

Effectively reduce unnecessary power consumption, protect the equipment from excessive power damage, and ensure the stable operation of the USB interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110854805B_ABST
    Figure CN110854805B_ABST
Patent Text Reader

Abstract

A method for ensuring power delivery in a universal serial bus (USB) interface between a device and a counterpart device, the device comprising a port controller and a USB socket. The method comprises the port controller attempting to detect an abnormal state in which leakage current occurs in the USB socket using at least one pin of the USB socket; and when the abnormal state is detected, the port controller disconnects a switch connected between the power pin of the USB socket and an internal circuit of the device, and determines to enter an unattached state separated from the counterpart device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] The present disclosure claims the priority of Korean Patent Application No. 10-2018-0096825 filed on August 20, 2018 in the Korean Intellectual Property Office, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to a Universal Serial Bus (USB) interface, and more particularly to an apparatus and method for ensuring power delivery in a USB interface. Background Art

[0004] Universal Serial Bus (USB) (or USB standard) is a standard for defining cables, connectors and communication protocols for inter-device communication. USB interfaces are widely used in various applications. USB defines standards for power transmission and protocols for sending and receiving data, and USB power delivery (PD) defines high power delivery such as 20V and 5A. However, when a conductive foreign object enters a USB socket or when a short circuit occurs in a USB cable, excessive power consumption may occur in a device used as a power source for power supply through the USB interface, the device may be damaged, and the USB socket and USB plug may also be damaged. Summary of the invention

[0005] Embodiments of the inventive concept provide a universal serial bus (USB) interface, and more particularly, provide an apparatus and a method for stably performing power delivery in a USB interface.

[0006] An embodiment of the inventive concept provides a method for ensuring power delivery in a universal serial bus (USB) interface between a device and a counterpart device, the device comprising a port controller and a USB socket. The method comprises the port controller attempting to detect an abnormal state in which leakage current occurs in the USB socket by using at least one pin of the USB socket; and when the abnormal state is detected, the port controller disconnects a switch connected between a power pin of the USB socket and an internal circuit of the device, and determines to enter an unattached state separated from the counterpart device.

[0007] An embodiment of the present invention also provides a device providing a universal serial bus (USB) interface, the device comprising a USB socket, the USB socket comprising: a power pin; a switch connected between the power pin and an internal circuit of the device; and a port controller configured to detect an abnormal state in which leakage current occurs in the USB socket by using at least one pin of the USB socket, and when the abnormal state is detected, disconnect the switch and determine to enter an unattached state separated from a counterpart device.

[0008] An embodiment of the present inventive concept also provides a port controller of a device, wherein the port controller is configured to detect an abnormal state in which leakage current occurs in a USB socket by using at least one pin in the USB socket of the device that is different from a power pin of the USB socket, and in response to detecting the abnormal state, generate a switch control signal for disconnecting a switch connected between the power pin and an internal circuit of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] These and / or other aspects will become clear and more easily understood through the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0010] Figure 1 A block diagram of a USB device according to an embodiment of the inventive concept is shown;

[0011] Figure 2 The embodiment according to the present invention is shown Figure 1 A block diagram of an example of a USB socket;

[0012] Figure 3 A block diagram showing a USB device connected via a USB interface according to an embodiment of the inventive concept is shown;

[0013] Figure 4 The embodiment according to the present invention is shown Figure 1 Figure 2 is an example of a switch;

[0014] Figure 5 A flow chart of a method for ensuring power delivery at a USB interface according to an embodiment of the inventive concept is shown;

[0015] Figure 6 A flowchart of a method for performing connection and disconnection at a USB interface according to an embodiment of the inventive concept is shown;

[0016] Figure 7 A flow chart of a method for detecting an abnormal state according to an embodiment of the inventive concept is shown;

[0017] Fig. 8A A flow chart of a method for detecting an abnormal state according to an embodiment of the inventive concept is shown;

[0018] Figure 8B A flow chart showing another method for detecting an abnormal state according to an embodiment of the inventive concept is shown;

[0019] Fig. 9 A flow chart of a method for detecting an abnormal state according to an embodiment of the inventive concept is shown;

[0020] Fig.10A flowchart showing a method for detecting an abnormal state according to an embodiment of the inventive concept; and

[0021] Fig.11 A flowchart of a method for processing an abnormal state according to an embodiment of the inventive concept is shown. DETAILED DESCRIPTION

[0022] Now with reference to the embodiments in detail, examples of the embodiments are shown in the accompanying drawings, wherein similar reference numerals throughout the drawings refer to similar elements. In this regard, the embodiments may have different forms and should not be construed as being limited to the descriptions set forth herein. Therefore, the embodiments are described below only by reference to the accompanying drawings to illustrate aspects of this specification. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. Statements such as "at least one of..." modify the entire list of elements when preceding a list of elements, rather than modifying individual elements in the list.

[0023] As common in the field of the present invention, embodiments can be described and illustrated according to the block that performs one or more functions described. These blocks, which may be referred to as units or modules, etc. in this article, are physically implemented by analog and / or digital circuits such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hard-wired circuits, and can be optionally driven by firmware and / or software. For example, the circuit may be embodied in one or more semiconductor chips, or embodied on a substrate support such as a printed circuit board. The circuit constituting the block may be implemented by dedicated hardware or by a processor (e.g., one or more programmed microprocessors and associated circuits), or by a combination of dedicated hardware for performing some functions of the block and a processor for performing other functions of the block. Without departing from the scope of the present invention, each block of the embodiment may be physically divided into two or more interactive and discrete blocks. Similarly, without departing from the scope of the present invention, the block of the embodiment may be physically combined into more complex blocks.

[0024] Figure 1 1 shows a block diagram of a USB device 100 according to an embodiment of the inventive concept, and Figure 2 The embodiment according to the present invention is shown in FIG. Figure 1The USB device 100 is any device that can communicate with other devices via a USB interface, and may be a fixed device (e.g., a desktop computer, a server, or any other fixed device that communicates via a USB interface), a mobile device (e.g., a laptop computer, a mobile phone, a tablet PC, or any other mobile device that communicates via a USB interface), or a component included in the above devices and providing a USB interface. Figure 1 As shown, the USB device 100 includes a USB socket 110 , a termination circuit 120 , a port controller 130 , a power circuit 140 , a host controller 150 , a signal generator 160 , and a switch 170 .

[0025] The USB socket 110 may be coupled to a USB cable or a USB plug, which is a part of a USB entity and is used to connect to a counterpart USB entity. The USB socket 110 may include a plurality of exposed pins and may send or receive signals via the plurality of exposed pins. For example, Figure 2 As shown, the USB socket 110 may include pins for sending transmission signals TX+ and TX- (i.e., signals TX1+, TX1-, TX2+, and TX2-), pins for receiving reception signals RX+ and RX- (i.e., signals RX1+, RX1-, RX2+, and RX2-), pins for channel formation signals CC1 and CC2, pins for VBUS voltage V_BUS (i.e., VBUS), and pins for ground voltage (i.e., GND). In some embodiments, the USB socket 110 may have a USB Type-C interface. TM Standard pinout (such as Figure 2 ), but other embodiments are not limited to USB Type-C TM Pinout. Figure 2 In the example, the pins are represented as pins A1 to A12 and B1 to B12.

[0026] When a foreign object enters the USB socket 110 during the period when the USB plug is not coupled to the USB socket 110, or when a short circuit occurs in the USB cable coupled to the USB socket 110, two or more pins included in the USB socket 110 may be electrically connected to each other. Pins that are improperly electrically connected to each other may induce leakage current, may interrupt communication via the USB interface, and may damage the USB device 100. In particular, when the USB device 100 is a portable device or a component included in a portable device, conductive materials such as water and metal may easily enter the USB socket 110, and thus excessive power consumption may occur and / or the USB device 100 may be damaged. In particular, when an attached state in which USB entities are attached to each other is established, even if leakage current may occur, the USB Type-C TM The standard will not make adjustments or take measures to address leakage current until the USB entity is in an unattached state in which the USB entities are separated from each other. In this article, the attached state may refer to a state in which the USB device 100 (or the port controller 130) determines that the USB device 100 is connected to the other USB entity. The unattached state may refer to a state in which the USB device 100 (or the port controller 130) determines that the USB device 100 is separated from the other USB entity.

[0027] The USB device 100 of the present invention can detect an abnormal state in which leakage current may occur, and can stop power delivery through the USB socket 110 when the abnormal state is detected. For example, when an abnormal state is detected, the switch 170 can electrically separate the power pins in the USB socket 110 that receive the VBUS voltage V_BUS or output the VBUS voltage V_BUS from the power circuit 140. Therefore, unnecessary power consumption in the USB device 100 can be reduced, and the USB device 100 can be protected from damage due to excessive leakage current. In the following, the leakage current caused by the entry of foreign matter into the USB socket 110 will be mainly described, but it should be understood that in other cases, the leakage current may also occur due to various other factors, and the present invention is also applicable to such other cases.

[0028] The termination circuit 120 may be controlled by the port controller 130 and may provide termination for the USB socket 110 according to USB requirements. For example, the termination circuit 120 may send channel formation signals CC1 and CC2 to the USB socket 110 or send channel formation signals CC1 and CC2 to the port controller 130 under the control of the port controller 130. The termination circuit 120 may also provide the VCONN voltage from the power circuit 140 to the USB socket 110 under the control of the port controller 130 to power the active cable.

[0029] The port controller 130 may control the termination circuit 120 by communicating with the termination circuit 120, and may control the USB interface according to a signal received through the termination circuit 120. The port controller 130 may control the port power provided to or received from the outside through the USB socket 110, or may process channel formation signals CC1 and CC2 according to USB requirements. According to some embodiments, the port controller 130 may be a logic block implemented by logic synthesis, a processor, a software block contained in a memory storing instructions executed by a processor, or a combination thereof. According to some embodiments, the port controller 130 may be referred to as a power delivery integrated circuit (PDIC). In addition, according to some embodiments, the termination circuit 120 and the port controller 130 may be included in one integrated circuit, and such an integrated circuit may be referred to as a PDIC.

[0030] According to some embodiments, the port controller 130 can detect abnormal conditions where leakage current may occur. For example, as will be described later with reference to Figure 7 As described above, the port controller 130 may apply a test signal to at least one pin, receive a response to the test signal from the at least one pin, and detect an abnormal state based on the received response. Fig. 9 As described, the port controller 130 may detect impedance between two pins included in the USB socket 110, and may detect an abnormal state based on the detected impedance.

[0031] The power circuit 140 may be electrically connected to a power pin of the USB socket 110 via a switch 170. According to some embodiments, when the USB device 100 supports an upstream port (UFP), the power circuit 140 may receive a VBUS voltage V_BUS from a power pin of the USB socket 110 through the switch 170, and may also distribute power supplied by the VBUS voltage V_BUS to other components of the USB device 100. According to some embodiments, when the USB device 100 supports a downstream port (DFP), the power circuit 140 may provide the VBUS voltage V_BUS to a power pin of the USB socket 110 through the switch 170. According to some embodiments, the USB device 100 may support a dual role port (DRP) that can switch between a source (or host) and a sink (or device). In addition, the power circuit 140 may generate a VCONN voltage for powering an active cable, and provide the VCONN voltage to the termination circuit 120. The VCONN voltage may be provided to the CC1 pin (eg, Figure 2 A5) or CC2 pin (for example, Figure 2In this specification, a positive supply voltage that transmits power like a VBUS voltage V_BUS and a VCONN voltage may be referred to as a power supply voltage.

[0032] The switch 170 may be connected between the power pin and the power circuit 140 included in the USB socket 110, and may be turned on or off according to the switch control signal SW provided from the port controller 130. For example, in response to the activated switch control signal SW, the switch 170 may be turned on, and thus, the power pin and the power circuit 140 (which is also an internal circuit of the USB device 100) may be electrically connected to each other. On the other hand, in response to the deactivated switch control signal SW, the switch 170 may be turned off, and thus, the power pin and the power circuit 140 may be electrically disconnected. As described below with reference to Figure 5 As described above, the port controller 130 may disconnect the switch 170 upon detecting an abnormal state, thereby preventing leakage current from occurring due to the power supply voltage.

[0033] The main controller 150 may generate transmission signals TX+ and TX-, or may process reception signals RX+ and RX-, and may communicate with the port controller 130. For example, the main controller 150 may include a USB port manager, and the USB port manager may operate a port policy and a USB PD (Power Delivery) protocol by communicating with the port controller 130. The state machine of the USB interface may be implemented by the main controller 150 and the port controller 130 together.

[0034] The main controller 150 may receive the detection signal DET from the port controller 130 and perform a desired operation according to the detection signal DET. In some embodiments, when receiving an activated detection signal DET indicating that an abnormal state has occurred in the USB socket 110 from the port controller 130, the main controller 150 may generate an alarm control signal CTRL and provide the alarm control signal CTRL to the signal generator 160 so that the signal generator 160 generates the alarm signal S_ALA. In addition, according to some embodiments, the port controller 130 may stop generating a supply voltage by controlling the power circuit 140 in response to the activated detection signal DET.

[0035] The signal generator 160 may generate an alarm signal S_ALA that can be recognized by a user of the USB device 100 according to the alarm control signal CTRL provided from the main controller 150. According to some embodiments, the alarm signal S_ALA may be a sound, and the signal generator 160 may include, for example, a speaker and / or a buzzer for outputting the sound. According to some embodiments, the alarm signal S_ALA may be a visible signal, and the signal generator 160 may include a display component, for example, a liquid crystal display (LCD) and / or a lamp such as a light emitting device (LED). When the signal generator 160 includes a display component, an alarm window may be displayed on the display component according to the alarm control signal CTRL. In addition, according to some embodiments, the alarm signal S_ALA may be a vibration of the USB device 100, and the signal generator 160 may include a component (e.g., a motor) that generates vibration.

[0036] refer to Figure 2 The USB socket 110 ′ may have a USB Type-C TM structure. The USB socket 110′ may have a symmetrical pin arrangement, so the USB socket 110′ and the USB plug may be normally coupled to each other in any direction. The USB socket 110′ may include a TX1+ pin A2, a TX1- pin A3, a RX1+ pin B11, a RX1- pin B10, a TX2+ pin B2, a TX2- pin B3, a RX2+ pin A11, and a RX2- pin A10 as a data bus. The USB socket 110′ may include VBUS pins A4, A9, B4, and B9 as a power bus, wherein the CC1 pin A5 or the CC2 pin B5 may transmit the VCONN voltage according to the direction in which the USB socket 110′ is coupled to the USB plug. In addition, the USB socket 110′ may include two sideband use (SBU) pins A8 and B8, which are used for SBU1 and SBU2, respectively, and include two configuration channel (CC) pins A5 and B5. The CC1 pin A5 and the CC2 pin B5 may be collectively referred to as CC pins. Unlike the USB receptacle 110′, the USB plug coupled to the USB receptacle 110′ may include a channel configuration pin CC and may include a dedicated VCONN pin. The USB receptacle 110′ also includes pins A6 and A7 as a first differential pair D+ and D-, and pins B6 and B7 as a second differential pair D+ and D-. Finally, the USB receptacle 110′ may include four ground pins A1, A12, B1, and B12 disposed on the outside. The four VBUS pins A4, A9, B4, and B9 may be within the USB receptacle 110′ or at Figure 1The four ground pins A1, A12, B1 and B12 may also be electrically connected to each other at the termination circuit 120 of the USB socket 110 ′ or at the same potential. Figure 1 The termination circuits 120 are electrically connected to each other.

[0037] As described above, when foreign objects enter the USB socket 110′ or a short circuit occurs in the USB cable connected to the USB socket 110′, leakage current may occur, and in particular, when an electrical path is formed between the power pins (i.e., VBUS pins A4, A9, B4, and B9, and CC1 pin A5 or CC2 pin B5 providing the VCONN voltage) and other pins (e.g., ground pins A1, A12, B1, and B12), the leakage current may increase significantly.

[0038] Figure 3 FIG. 1 is a block diagram showing a first USB device 100a and a second USB device 100b connected via a USB interface according to an embodiment of the inventive concept. In detail, Figure 3 A first USB device 100a (i.e., USB device 1) serving as a source (or host) and a second USB device 100b (i.e., USB device 2) serving as a sink (or device) are shown, wherein the first USB device 100a and the second USB device 100b are connected to each other via a cable 200 (i.e., a USB interface). Figure 1 The USB device 100 described may be used as Figure 3 The USB device 100a may be used as a source terminal of the first USB device 100a, or may be used as a sink terminal of the second USB device 100b.

[0039] refer to Figure 3 , the first USB device 100a includes a USB socket 110a, a port controller 130a, an AC / DC converter 140a, and a switch 170a. In order to provide the VBUS voltage V_BUS to the second USB device 100b, the AC / DC converter 140a may generate the VBUS voltage V_BUS, which is a DC voltage, from the AC voltage. According to some embodiments, the first USB device 100a may include a battery, and in order to generate the VBUS voltage V_BUS from the DC voltage, a DC / DC converter or a linear regulator may be included instead of the AC / DC converter 140a.

[0040] The port controller 130a can control the switch 170a through the switch control signal SWa. When an abnormal state occurs, the port controller 130a can generate a deactivated switch control signal SWa, and therefore, since the switch 170a is disconnected, the AC / DC converter 140a (i.e., the internal circuit of the first USB device 100a) and the VBUS pin can be disconnected, and the VBUS voltage V_BUS generated by the AC / DC converter 140a may not be output through the VBUS pin of the USB socket 110a. Therefore, leakage current caused by the VBUS voltage V_BUS can be prevented.

[0041] The second USB device 100b may include a USB socket 110b, a port controller 130b, a charger 140b, and a switch 170b. The charger 140b may charge a battery included in the second USB device 100b according to the VBUS voltage V_BUS provided from the first USB device 100a. According to some embodiments, the second USB device 100b may include a circuit (e.g., a voltage regulator) for generating one or more power supply voltages according to the VBUS voltage V_BUS provided from the first USB device 100a, and the one or more power supply voltages are used to supply power to other components included in the second USB device 100b.

[0042] The port controller 130b may control the switch 170b through the switch control signal SWb. When an abnormal state occurs, the port controller 130b may generate a deactivated switch control signal SWb, and thus, since the switch 170b is disconnected, the charger 140b (i.e., the internal circuit of the second USB device 100b) and the VBUS pin may be disconnected, and the VBUS voltage V_BUS provided from the first USB device 100a may not be provided to the charger 140b and other internal circuits of the second USB device 100b. Therefore, leakage current caused by the VBUS voltage V_BUS may be prevented.

[0043] In the following, the main references are used as Figure 3 One or more embodiments are described with reference to a USB device as a source end of the first USB device 100a. However, it should be understood that other embodiments may be applicable to use as a USB device such as Figure 3 The second USB device 100b is a USB device at the sink end.

[0044] Figure 4 The embodiment according to the present invention is shown Figure 1 FIG. 170 is an example of a switch 170. As shown in the above reference Figure 1 As stated, Figure 4 The switch 170 ′ may receive a switch control signal SW from the port controller 130 and may be turned on or off according to the switch control signal SW.

[0045] refer to Figure 4 , the switch 170′ includes a first transistor T1 and a second transistor T2 connected in series between a first terminal P1 and a second terminal P2. A switch control signal SW may be provided to control terminals P3 and P4 of the first transistor T1 and the second transistor T2, and the first terminal P1 and the second terminal P2 may be electrically connected to each other according to the switch control signal SW. Figure 4 The switch 170' is shown to include two N-channel metal oxide semiconductor (NMOS) transistors, but according to some embodiments, the switch 170' may include a P-channel metal oxide semiconductor (PMOS) transistor, or may include an NMOS transistor and a PMOS transistor connected in parallel to each other. In some embodiments, the switch 170' may include more than two transistors connected in series between the first terminal P1 and the second terminal P2.

[0046] like Figure 4 As shown, the switch control signal SW may include a first switch control signal SW1 and a second switch control signal SW2. According to some embodiments, Figure 1 The port controller 130 may turn on or off the first transistor T1 and the second transistor T2 at different time points. For example, the port controller 130 may generate the first switch control signal SW1 and the second switch control signal SW2 so that the second transistor T2 is turned on after the first transistor T1 is turned on. Similarly, the port controller 130 may generate the first switch control signal SW1 and the second switch control signal SW2 so that the first transistor T1 is turned off after the second transistor T2 is turned off.

[0047] Figure 5 1 is a flowchart of a method for ensuring power delivery (PD) at a USB interface between a USB device 100 and a counterpart USB device according to an embodiment of the inventive concept. Figure 5 The method can be Figure 1 The port controller 130 performs the following reference Figure 1 To describe Figure 5 .

[0048] In operation S12, an operation for attempting to detect an abnormal state is performed. Figure 1As described, the abnormal state may refer to a state in which leakage current may occur in the USB socket 110, and a state different from the abnormal state may be referred to as a normal state. The port controller 130 may detect the abnormal state in various ways. For example, as disclosed in the applicant's U.S. patent applications No. 15 / 981,157, No. 16 / 025,335, No. 16 / 053,155 and Korean patent application KR 10-2018-0062092 (these patents are incorporated herein by reference in their entirety), the port controller 130 may detect the abnormal state. The following reference will be made to Figures 7 to 10 An example of the operation of the port controller 130 to detect an abnormal state is described. In some embodiments, when no signal is sent / received within a certain period of time, operation S12 can be performed. For example, an operation to detect an unattached state is performed after the switch 170 is turned on, and when no signal is sent / received within a certain period of time after the unattached state is not detected, operation S12 can be performed. When an abnormal state is detected in operation S12, in operation S14, an operation for disconnecting the switch 170 and determining that the USB entity (i.e., the USB device 100 and the other USB device) enters an unattached state is performed. As described above with reference to Figure 1 and Figure 3 As described above, the switch 170 may be between the power pin included in the USB socket 110 and the internal circuit (i.e., the power circuit 140) of the USB device 100, and the port controller 130 may disconnect the switch 170 when an abnormal state is detected to prevent leakage current and / or damage caused by leakage current. In addition, the port controller 130 may disconnect the switch 170 and determine to enter an unattached state separated from each other. For example, even when the USB device 100 is in an attached state connected to the other USB device via a cable, if an abnormal state is detected, the switch 170 may be switched to disconnect. That is, conventionally, when the USB Type-C TM When the separation condition specified by the standard is met, the USB device 100 will enter the unattached state. In contrast, in an embodiment of the inventive concept, when an abnormal state is detected, the switch 170 is disconnected, and the USB entity also enters the unattached state. Here, as described, the abnormal state may refer to a state in which leakage current occurs in the USB socket 110. In other words, the detection of the abnormal state may be newly included in the separation condition.

[0049] Figure 6 A flow chart of a method for performing connection and disconnection at a USB interface according to an embodiment of the present invention is shown. Figure 6 As described above, at least one operation for determining whether an abnormal state exists can be added to the common method of performing connection and disconnection. For example, Figure 6 The method can be Figure 1The USB device 100 performs the following reference Figure 1 To describe Figure 6 .

[0050] refer to Figure 6 In operation S20, an operation for determining whether an abnormal state exists in the USB socket 110 is performed. That is, even in an unattached state where the USB device 100 is not connected to the counterpart USB device, an operation for determining whether an abnormal state exists, i.e., an operation for attempting to detect an abnormal state, may be performed. According to some embodiments, operation S20 may be performed at preset intervals, or in other words, operation S20 may be repeated at preset cycles. Figure 6 As shown, when an abnormal state is detected (Yes in S20), operation S20 is repeated periodically or aperiodically. Otherwise, when an abnormal state is not detected (No in S20), operation S21 is subsequently performed.

[0051] In operation S21, an operation for determining whether the USB device 100 is in an attached state connected to the counterpart USB device is performed. For example, the USB device 100 can determine whether the USB device 100 is in an attached state connected to the counterpart USB device by using the channel configuration signals CC1 and CC2. For example, when the USB device 100 recognizes the synchronous CC terminal Rd of the counterpart USB device through one of the channel configuration signals CC1 and CC2, the USB device 100 can recognize that the counterpart USB device is connected as a sink. Figure 6 As shown, when the USB device 100 is not in the attached state (No in S21), operation S20 is subsequently performed. Otherwise, when the USB device 100 is in the attached state (Yes in S21), operation S22 is immediately performed thereafter.

[0052] In operation S22, an operation for determining whether an abnormal state exists in the USB socket 110 is performed. Unlike operation S20, an operation for determining whether an abnormal state exists in the attached state, that is, an operation for attempting to detect an abnormal state may be performed. Figure 6 As shown, when an abnormal state is detected (Yes in S22), operation S20 is subsequently performed. Otherwise, when an abnormal state is not detected (No in S22), operation S23 is subsequently performed.

[0053] In operation S23, an operation for turning on the switch 170 is performed. Therefore, when both the attachment state and the normal state are satisfied, the switch 170 can be turned on, and as a result, the VBUS voltage V_BUS can be provided to the counterpart USB device. Therefore, when the USB socket 110 is in an abnormal state, the VBUS voltage V_BUS can be prevented from being output through the power pin of the USB socket 110.

[0054] In operation S24, an operation for determining whether the USB device 100 is in an unattached state separated from the counterpart USB device is performed. For example, the USB device 100 can determine whether the USB device 100 is in an unattached state separated from the counterpart USB device by using the channel configuration signals CC1 and CC2. For example, when the USB device 100 fails to recognize the synchronization CC terminal Rd through one of the channel configuration signals CC1 and CC2, it can be determined that the USB device 100 is in an unattached state. Figure 6 As shown, when it is determined that the USB device 100 is in the unattached state (Yes in S24), operation S30 is subsequently performed. Otherwise, when it is determined that the USB device 100 is not in the unattached state (No in S24), operation S25 is subsequently performed.

[0055] When it is determined in operation S24 that the USB device 100 is not in the unattached state (or it is determined to be in the attached state), an operation for enabling the timer is performed in operation S25. For example, the timer can be reset and run. The timer interrupt can be used to periodically determine whether there is an abnormal state. When the interrupt occurs, it is determined whether there is an abnormal state. After operation S25, operation S28 and operation S26 can be performed in parallel.

[0056] In operation S26, power negotiation is performed. During power negotiation, the USB device 100 and the counterpart USB device may determine the magnitude of the VBUS voltage V_BUS, the magnitude of the current, and other conditions. Next, after the conditions determined in operation S26 are set, an operation for sending and receiving messages is performed in operation S27.

[0057] In parallel with operation S26 and operation S27, it is determined in operation S28 whether a timer interrupt occurs. For example, it is determined whether the timer does not count (go off). When no interrupt occurs (no in S28), operation S28 is repeated. When an interrupt occurs (yes in S28), operation S29 is performed. In operation S29, an operation for determining whether an abnormal state exists is performed. That is, the port controller 130 may periodically attempt to detect an abnormal state during normal communication through the USB interface in the attached state. When an abnormal state is detected (yes in S29), operation S30 is then performed.

[0058] When the unattached state is determined in operation S24 or the abnormal state is determined in operation S29, an operation for turning off the switch 170 is performed in operation S30. Since the switch 170 is turned on in operation S23 and it is determined in operation S24 that the USB device 100 is in the unattached state, the switch 170 is turned off in operation S30, and the output of the VBUS voltage V_BUS through the power pin is stopped. In addition, since it is determined in operation S29 that there is an abnormal state, the switch 170 is turned off in operation S30, and the output of the VBUS voltage V_BUS through the power pin is stopped. After operation S30, operation S20 is performed.

[0059] Figure 7 A flow chart of a method for detecting an abnormal state according to an embodiment of the present invention is shown. Figure 7 The method can be Figure 5 Operation S12 and Figure 6 According to some embodiments, Figure 7 The method can be Figure 1 The port controller 130 performs the following reference Figure 1 To describe Figure 7 .

[0060] refer to Figure 7 , in operation S40, an operation for applying a test signal to at least one pin is performed. According to some embodiments, the port controller 130 may directly apply the test signal to any pin other than the power pin among the pins included in the USB socket 100, or may control the termination circuit 120 to apply the test signal to the arbitrary pin. For example, the port controller 130 may apply the test signal to at least one of the CC1 pin, CC2 pin, D+ pin, D- pin, SBU1 pin, SBU2 pin, TX1+ pin, TX1- pin, TX2+ pin, TX2- pin, RX1+ pin, RX1- pin, RX2+ pin, and RX2- pin. Reference will be made to Fig. 8A and Figure 8B An example of operation S40 is described.

[0061] In operation S50, an operation for determining whether an abnormal state exists based on a response to the test signal is performed. For example, the port controller 130 may receive a response to the test signal from at least one pin, and may determine (i.e., detect) whether an abnormal state exists based on the received response. Fig. 8A and Figure 8B An example of operation S50 is described.

[0062] Fig. 8A and Figure 8BA flow chart of a method for detecting an abnormal state according to an embodiment of the present invention is shown. Fig. 8A The methods include Figure 7 Operation S40a and operation S50a of the corresponding examples of operation S40 and operation S50, and Figure 8B The methods include Figure 7 Operation S40b and operation S50b of the corresponding example of operation S40 and operation S50. Specifically, in Fig. 8A In the case of an abnormal state, the abnormal state can be detected by charging at least one pin, while in Figure 8B In the example, the abnormal state can be detected by discharging at least one pin. Fig. 8A and Figure 8B In the description, repeated descriptions can be omitted.

[0063] refer to Fig. 8A , operation S40a includes a plurality of operations, including operation S41a, operation S43a, operation S45a, operation S47a, and operation S49a. In operation S41a, an operation for pulling down the first pin is performed. For example, the port controller 130 may pull down the first pin by using a switch circuit, a resistor, and / or a current source included in the termination circuit 120. According to some embodiments, the first pin may be any pin other than the power pin among the pins included in the USB socket 110.

[0064] In operation S43a, an operation for resetting the timer and detecting the voltage V1 of the first pin is performed. The voltage V1 of the first pin detected in operation S43a may be referred to as a first voltage V1. Since the first pin is pulled down in operation S41a, the first voltage V1 may have a relatively low level. As described below, the timer may be reset so that the voltage of the first pin rises from the first voltage V1 during a certain waiting time.

[0065] In operation S45a, an operation for pulling up the first pin is performed. For example, the port controller 130 may pull up the first pin by using a switch circuit, a resistor and / or a current source included in the termination circuit 120. Therefore, the voltage of the first pin may gradually rise from the first voltage V1.

[0066] In operation S47a, an operation for determining whether the waiting time has elapsed is performed. Fig. 8A As shown, when the waiting time has not passed (No in S47a), operation S47a may be performed again. Otherwise, when the waiting time has passed (Yes in S47a), operation S49a is then performed. That is, the port controller 130 waits until the timer reset in operation S43a times out, and when the timer times out, operation S49a is performed.

[0067] In operation S49a, an operation for detecting a voltage V2 of a first pin is performed. The voltage detected in operation S49a may be referred to as a second voltage V2. During the waiting time, the voltage of the first pin may rise from the first voltage V1 to the second voltage V2, so the second voltage V2 may have a level higher than the level of the first voltage V1. When there is no foreign matter in the USB socket 110 (i.e., a normal state), the first pin may be in an open circuit state, so the voltage of the first pin may rise relatively quickly when the first pin is pulled up. On the other hand, when there is a foreign matter in the USB socket 110 (i.e., an abnormal state), the first pin may have an increased capacitance value due to the foreign matter, so the voltage of the first pin may rise relatively slowly when the first pin is pulled up.

[0068] like Fig. 8A As shown, operation S50a includes a plurality of operations, namely, operation S52a, operation S54a, operation S56a, and operation S58a. In operation S52a, an operation for calculating a charging slope is performed. For example, the port controller 130 may calculate the charging slope by dividing the difference between the second voltage V2 and the first voltage V1 by the waiting time. As described above, in a normal state, since the voltage of the first pin may rise relatively quickly, the charging slope may have a relatively large value. In contrast, in an abnormal state, the voltage of the first pin may rise relatively slowly, and thus the charging slope may have a relatively small value.

[0069] In operation S54a, an operation for comparing the charging slope with the first reference value is performed. When the charging slope is greater than the first reference value (i.e., when the voltage of the first pin rises relatively quickly) (Yes in S54a), it is determined that no foreign matter contacts the first pin, and thus it is determined to be a normal state in operation S56a. On the other hand, when the charging slope is less than the first reference value (i.e., when the voltage of the first pin rises relatively slowly) (No in S54a), it is determined that a foreign matter contacts the first pin, and thus it can be determined to be an abnormal state in operation S58a.

[0070] refer to Figure 8B , operation S40b includes a plurality of operations, including operation S41b, operation S43b, operation S45b, operation S47b, and operation S49b. In operation S41b, an operation for pulling up the second pin is performed. For example, the port controller 130 may pull up the second pin by using a switch circuit, a resistor, and / or a current source included in the termination circuit 120. According to some embodiments, the second pin may be any pin other than the power pin among the pins included in the USB socket 110.

[0071] In operation S43b, an operation for resetting the timer and detecting the voltage V1 of the second pin is performed. The voltage V1 of the second pin detected in operation S43b may be referred to as a first voltage V1. Since the second pin is pulled up in operation S41b, the first voltage V1 may have a relatively high level. As described below, the timer may be reset so that the voltage of the second pin drops from the first voltage V1 during a certain waiting time.

[0072] In operation S45b, an operation for pulling down the second pin is performed. For example, the port controller 130 may pull down the second pin by using a switch circuit, a resistor and / or a current source included in the termination circuit 120. Therefore, the voltage of the second pin may gradually drop from the first voltage V1.

[0073] In operation S47b, an operation for determining whether the waiting time has elapsed is performed. Figure 8B As shown, when the waiting time has not passed (No in S47b), operation S47b may be performed again. On the contrary, when the waiting time has passed (Yes in S47b), operation S49b is then performed. That is, the port controller 130 waits until the timer reset in operation S43b times out, and when the timer times out, operation S49b is performed.

[0074] In operation S49b, an operation for detecting a voltage V2 of the second pin is performed. The voltage detected in operation S49b may be referred to as a second voltage V2. During the waiting time, the voltage of the second pin may drop from the first voltage V1 to the second voltage V2, so the second voltage V2 may have a level lower than the level of the first voltage V1. When there is no foreign matter in the USB socket 110 (i.e., a normal state), the second pin may be in an open circuit state, so the voltage of the second pin may drop relatively quickly when the second pin is pulled down. On the other hand, when there is a foreign matter in the USB socket 110 (i.e., an abnormal state), the second pin may have an increased capacitance value due to the foreign matter, so the voltage of the second pin may drop relatively slowly when the second pin is pulled down.

[0075] like Figure 8B As shown, operation S50b includes a plurality of operations, namely, operation S52b, operation S54b, operation S56b, and operation S58b. In operation S52b, an operation for calculating a discharge slope is performed. For example, the port controller 130 may calculate the discharge slope by dividing the difference between the first voltage V1 and the second voltage V2 by the waiting time. As described above, in a normal state, since the voltage of the second pin may drop relatively quickly, the discharge slope may have a relatively large value. On the contrary, in an abnormal state, the voltage of the second pin may drop relatively slowly, so the discharge slope may have a relatively small value.

[0076] In operation S54b, an operation for comparing the discharge slope with the second reference value is performed. When the discharge slope is greater than the second reference value (i.e., when the voltage of the second pin decreases relatively quickly) (Yes in S54b), it is determined that no foreign matter contacts the second pin, and thus it is determined to be a normal state in operation S56b. On the other hand, when the discharge slope is less than the second reference value (i.e., when the voltage of the second pin decreases relatively slowly) (No in S54b), it is determined that a foreign matter contacts the second pin, and thus it is determined to be an abnormal state in operation S58b.

[0077] Fig. 9 A flow chart of a method for detecting an abnormal state according to an embodiment of the present invention is shown. Fig. 9 The method can be Figure 5 Operation S12 and Figure 6 According to some embodiments, Fig. 9 The method can be Figure 1 The port controller 130 performs the following reference Figure 1 To describe Fig. 9 .

[0078] refer to Fig. 9 , in operation S60, an operation for detecting the impedance between the two pins is performed. According to some embodiments, in order to detect the impedance, the port controller 130 may directly apply a voltage and / or a current between any two pins other than the power pins among the pins included in the USB socket 110, or may control the termination circuit 120 to apply a voltage and / or a current between the any two pins. For example, the port controller 130 may apply a test signal to at least one of the CC1 pin, the CC2 pin, the D+ pin, the D- pin, the SBU1 pin, the SBU2 pin, the TX1+ pin, the TX1- pin, the TX2+ pin, the TX2- pin, the RX1+ pin, the RX1- pin, the RX2+ pin, and the RX2- pin. Reference will be made to Fig.10 An example of operation S60 is described.

[0079] In operation S70, an operation for determining whether an abnormal state exists based on the impedance is performed. For example, when the detected impedance is low, the port controller 130 may recognize that a short circuit occurs between the two pins, thereby determining an abnormal state. On the other hand, when the detected impedance is high, the port controller 130 may recognize that a short circuit does not occur between the two pins, thereby determining a normal state. Fig.10 An example of operation S70 is described.

[0080] Fig.10A flow chart of a method for detecting an abnormal state according to an embodiment of the present invention is shown. Fig.10 The methods include Fig. 9 The corresponding examples of operation S60 and operation S70 are operation S60′ and operation S70′. Specifically, Fig.10 A third pin for detecting and a ground pin (eg, Figure 2 The impedance between the ground pins) is measured by the method.

[0081] refer to Fig.10 , operation S60′ includes a plurality of operations, namely, operation S62, operation S64, and operation S66. In operation S62, an operation for pulling up the third pin is performed. For example, the port controller 130 may pull up the third pin by using a switch circuit, a resistor, and / or a current source included in the termination circuit 120. Next, in operation S64, an operation for detecting the voltage of the third pin is performed. Since the third pin is pulled up in operation S62, the voltage of the third pin may depend on the impedance between the third pin and the ground potential. In operation S66, an operation for estimating the impedance between the third pin and the ground pin is performed. For example, when the third pin is pulled up by the pull-up resistor, the port controller 130 may estimate the impedance between the third pin and the ground pin based on the resistance value of the pull-up resistor and the voltage of the third pin. In addition, when the third pin is pulled up by the current source, the port controller 130 may estimate the impedance between the third pin and the ground pin based on the current of the current source and the voltage of the third pin.

[0082] In operation S70', an operation for generating the detection signal DET is performed. For example, when the estimated impedance is low, the port controller 130 may generate the activated detection signal DET. On the other hand, when the estimated impedance is high, the port controller 130 may generate the deactivated detection signal DET.

[0083] Fig.11 FIG. 1 is a flow chart showing a method for processing an abnormal state according to an embodiment of the present invention. Figure 5 Operation S12 and Figure 6 When an abnormal state is determined in operation S20, operation S22, and operation S29, then the Fig.11 For example, when Figure 6 When the abnormal state is determined in operation S20, the Fig.11 Operation S81, operation S82 and operation S83 can then be performed Figure 6 Operation S20. According to some embodiments, Fig.11 The method can be Figure 1 The USB device 100 performs the following reference Figure 1 To describe Fig.11 .

[0084] In operation S81 , an operation for outputting an activated detection signal DET is performed. For example, the port controller 130 may generate the activated detection signal DET when detecting an abnormal state, and the main controller 150 may recognize the abnormal state by receiving the activated detection signal DET from the port controller 130 .

[0085] In operation S82, an operation for causing an interruption of the main controller 150 is performed. For example, the detection signal DET may cause an interruption of the main controller 150. That is, the main controller 150 may be configured to enter an interruption state in response to the activated detection signal DET. As described above with reference to the accompanying drawings, an abnormal state may cause a leakage current, and may cause excessive power consumption and damage due to the leakage current. Therefore, the main controller 150 may process the activated detection signal DET through an interruption.

[0086] In operation S83, an operation for outputting the alarm signal S_ALA is performed. For example, the main controller 150 may output the control signal CTRL in response to the activated detection signal DET so that the signal generator 160 generates the alarm signal S_ALA. Therefore, the user of the USB device 100 may recognize the occurrence of an abnormal state and take necessary measures.

[0087] It should be understood that the embodiments described herein should be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects in each embodiment should generally be considered as available for other similar features or aspects in other embodiments.

[0088] Although one or more embodiments have been described with reference to the drawings, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the invention as defined by the following claims.

Claims

1. A method for ensuring power delivery in a universal serial bus (USB) interface between a device and a counterpart device, the device comprising a port controller and a USB socket, the method include: The port controller attempts to detect an abnormal state in which leakage current occurs in the USB socket by using at least one pin of the USB socket during an attached state in which the device is connected to the counterpart device; as well as When the abnormal state is detected, the port controller disconnects a switch connected between a power pin of the USB socket and an internal circuit of the device, and determines to enter an unattached state separated from the counterpart device.

2. The method according to claim 1, in, The at least one pin is any pin in the USB socket other than a power pin.

3. The method according to claim 2, in, The USB socket is configured to support USB Type-C TM standard, The power pin is the VBUS pin, and The at least one pin includes at least one of CC1 pin, CC2 pin, D+ pin, D- pin, SBU1 pin, SBU2 pin, TX1+ pin, TX1- pin, TX2+ pin, TX2- pin, RX1+ pin, RX1- pin, RX2+ pin and RX2- pin.

4. The method according to claim 1, in, The attempt to detect an abnormal state includes: applying a test signal to the at least one pin; and The abnormal condition is detected based on a response to the test signal from the at least one pin.

5. The method according to claim 1, in, Attempting to detect the abnormal state includes: detecting impedance between two pins of the USB socket, the two pins including the at least one pin; and The abnormal state is detected based on the detected impedance.

6. The method according to claim 1, in, Attempting to detect the abnormal condition is repeated at a preset period.

7. The method according to claim 1, further comprising: include: The port controller turns on the switch when the attached state is detected and the abnormal state is not detected.

8. The method according to claim 7, further comprising: include: After the switch is turned on, the port controller detects an unattached state separated from the counterpart device, Wherein, when there is no signal transmission / reception for a certain period of time after the unattached state is not detected, attempting to detect the abnormal state is performed.

9. The method according to claim 1, further comprising: include: When the abnormal state occurs, the port controller outputs an activated detection signal.

10. A device configured to provide a universal serial bus (USB) interface, the device include: USB socket, including power pins; a switch connected between the power pin and an internal circuit of the device; as well as The port controller is configured to detect an abnormal state in which leakage current occurs in the USB socket by using at least one pin of the USB socket during an attached state in which the device is connected to a counterpart device, and when the abnormal state is detected, turn off the switch and determine to enter an unattached state in which the device is separated from the counterpart device.

11. The device according to claim 10, in, The USB socket is configured to support USB Type-C TM standard, The power pin is the VBUS pin, and The at least one pin includes at least one of CC1 pin, CC2 pin, D+ pin, D- pin, SBU1 pin, SBU2 pin, TX1+ pin, TX1- pin, TX2+ pin, TX2- pin, RX1+ pin, RX1- pin, RX2+ pin and RX2- pin.

12. The device according to claim 10, in, The switch includes two or more transistors connected in series between the power pin and the internal circuit, and each transistor includes a control terminal connected to the port controller.

13. The device according to claim 10, in, The port controller is configured to output an activated detection signal when the abnormal state occurs, The device also includes a main controller configured to enter an interrupt state in response to the activated detection signal.

14. The device according to claim 13, further comprising a signal generator configured to output a signal recognizable by a user of the device, in, The main controller is configured to control the signal generator to output the user-recognizable signal in response to the activated detection signal.

15. A port controller for a device, in, The port controller is configured to detect an abnormal state in which leakage current occurs in the USB socket by using at least one pin in the USB socket of the device that is different from a power pin of the USB socket during an attachment state in which the device is connected to a counterpart device, and to generate a switch control signal for disconnecting a switch connected between the power pin and an internal circuit of the device in response to detecting the abnormal state.

16. The port controller according to claim 15, in, The power pin is the VBUS pin, and The at least one pin includes at least one of CC1 pin, CC2 pin, D+ pin, D- pin, SBU1 pin, SBU2 pin, TX1+ pin, TX1- pin, TX2+ pin, TX2- pin, RX1+ pin, RX1- pin, RX2+ pin and RX2- pin.

17. The port controller according to claim 15, in, The port controller is further configured to turn on the switch when the attachment state is detected and the abnormal state is not detected.

18. The port controller according to claim 17, in, The port controller is further configured to detect an unattached state in which the device is detached from the counterpart device after the switch is turned on, and detect the abnormal state when no signal is transmitted / received for a certain period of time after the unattached state is not detected.