[go: up one dir, main page]

CN111475453A - Universal serial bus expansion device and its debugging method - Google Patents

Universal serial bus expansion device and its debugging method Download PDF

Info

Publication number
CN111475453A
CN111475453A CN201910061957.XA CN201910061957A CN111475453A CN 111475453 A CN111475453 A CN 111475453A CN 201910061957 A CN201910061957 A CN 201910061957A CN 111475453 A CN111475453 A CN 111475453A
Authority
CN
China
Prior art keywords
power
mode
expansion device
power transmission
transmission mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201910061957.XA
Other languages
Chinese (zh)
Inventor
李源益
翁圣玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Acer Inc
Original Assignee
Acer Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Acer Inc filed Critical Acer Inc
Priority to CN201910061957.XA priority Critical patent/CN111475453A/en
Publication of CN111475453A publication Critical patent/CN111475453A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Systems (AREA)
  • Power Sources (AREA)

Abstract

The invention provides a universal serial bus expansion device and a debugging method thereof. The universal serial bus expansion device comprises a connection port and a charging controller. The connection port is used for electrically connecting an external electronic device. The charging controller is electrically connected with the connecting port to receive the pin configuration signal and select to execute the first power transmission mode or the second power transmission mode according to the pin configuration signal. The charging controller executes a first power transmission mode and counts a first waiting time, wherein when the first waiting time is larger than or equal to a time critical value, the charging controller switches from the first power transmission mode to a second power transmission mode.

Description

通用串行总线扩充装置及其侦错方法Universal serial bus expansion device and its debugging method

技术领域technical field

本发明涉及一种接口传输技术,尤其涉及一种通用串行总线扩充装置及其侦错方法。The invention relates to an interface transmission technology, in particular to a universal serial bus expansion device and an error detection method thereof.

背景技术Background technique

可携式的电子装置已经成为现代生活不可或缺的一部分。这些电子装置能够通过通讯界面彼此连接以进行扩充。目前常见的通讯接口为通用串行总线(Universal SerialBus,USB)。在目前的USB协定中,类型C通用串列总线(USB Type-C,又称为USB-C)能够支援多个双重用途端口(Dual Role Port,DRP)和超高速数据的传输,并用作宽范围的电源输入/输出端口,因此成为目前泛用的通讯接口。Portable electronic devices have become an integral part of modern life. These electronic devices can be connected to each other through a communication interface for expansion. A common communication interface at present is Universal Serial Bus (Universal Serial Bus, USB). In the current USB protocol, the Type-C Universal Serial Bus (USB Type-C, also known as USB-C) can support multiple Dual Role Ports (DRP) and super-high-speed data transmission, and is used as a broadband A wide range of power input/output ports, so it has become a commonly used communication interface.

当两个电子装置通过USB Type-C接口来进行供电时,会需要决定其中一个作为供应电力的主装置(Host),另一个作为接收电力的从装置(Slave)。但有时候电子装置之间的电源角色可以交换,因此可能产生配对失败的问题,造成通讯失败。When two electronic devices are powered through the USB Type-C interface, it is necessary to determine one of them as the master device (Host) for supplying power, and the other as the slave device (Slave) for receiving power. However, sometimes the power roles between electronic devices can be exchanged, so there may be a problem of pairing failure and communication failure.

图3是依照现有技术的一种通用串行总线扩充装置的配对流程图。请参照图3,在步骤S310中,现有的USB扩充装置电性连接外部电子装置以选择执行电能汲取(Sink)模式或电能供应(Source)模式。在步骤S320中,USB扩充装置执行电能汲取模式,在步骤S330中,USB扩充装置执行电能供应模式。但是如果外部电子装置处在节能状态而无法对外供应电能时,USB扩充装置选择执行电能汲取模式就可能发生问题,无法从步骤S320进入步骤S340,导致双方配对失败。因此如何避免电子装置之间的电源角色误判成为重要的问题。FIG. 3 is a pairing flow chart of a USB expansion device according to the prior art. Referring to FIG. 3 , in step S310 , the existing USB expansion device is electrically connected to an external electronic device to select to execute a power sink (Sink) mode or a power supply (Source) mode. In step S320, the USB expansion device executes the power draw mode, and in step S330, the USB expansion device executes the power supply mode. However, if the external electronic device is in a power-saving state and cannot supply power to the outside, the USB expansion device may have a problem in choosing to execute the power draw mode, and the step S340 cannot be entered from the step S320, resulting in the failure of the pairing between the two parties. Therefore, how to avoid misjudgment of power roles between electronic devices becomes an important issue.

发明内容SUMMARY OF THE INVENTION

本发明提供一种通用串行总线扩充装置及其侦错方法,可以避免两个电子装置在进行电力传输沟通配对时失败。The present invention provides a universal serial bus expansion device and a debugging method thereof, which can avoid failure of two electronic devices during power transmission, communication and pairing.

本发明的实施例提供一种通用串行总线扩充装置,包括连接端口与充电控制器。连接端口用以电性连接外部电子装置。充电控制器电性连接连接端口以接收脚位配置信号,并且根据脚位配置信号选择执行第一电能传输模式或第二电能传输模式,其中,充电控制器执行第一电能传输模式并计时第一等待时间,其中当第一等待时间大于或等于时间临界值时,充电控制器从第一电能传输模式切换到第二电能传输模式。Embodiments of the present invention provide a universal serial bus expansion device, which includes a connection port and a charging controller. The connection port is used to electrically connect the external electronic device. The charging controller is electrically connected to the connection port to receive the pin configuration signal, and selects to execute the first power transfer mode or the second power transfer mode according to the pin configuration signal, wherein the charge controller executes the first power transfer mode and clocks the first power transfer mode. A waiting time, wherein when the first waiting time is greater than or equal to a time threshold, the charging controller switches from the first power transfer mode to the second power transfer mode.

在本发明的一实施例中,上述的通用串行总线扩充装置的第一电能传输模式为电能汲取模式,第二电能传输模式为电能供应模式。In an embodiment of the present invention, the first power transfer mode of the USB expansion device is a power draw mode, and the second power transfer mode is a power supply mode.

在本发明的一实施例中,在上述的通用串行总线扩充装置中,充电控制器从第一电能传输模式切换到第二电能传输模式后,外部电子装置也对应地执行第一电能传输模式,以使通用串行总线扩充装置对外部电子装置进行充电。In an embodiment of the present invention, in the aforementioned USB expansion device, after the charging controller switches from the first power transmission mode to the second power transmission mode, the external electronic device also executes the first power transmission mode correspondingly , so that the USB expansion unit can charge external electronic devices.

在本发明的一实施例中,上述的通用串行总线扩充装置依照电源传输协定对外部电子装置进行充电。In an embodiment of the present invention, the above-mentioned USB expansion device charges the external electronic device according to the power delivery protocol.

在本发明的一实施例中,在上述的通用串行总线扩充装置中,充电控制器执行第二电能传输模式且计时第二等待时间,其中时间临界值被设定成大于第二等待时间。In an embodiment of the present invention, in the aforementioned USB expansion device, the charging controller executes the second power transfer mode and counts a second waiting time, wherein the time threshold is set to be greater than the second waiting time.

在本发明的一实施例中,在上述的通用串行总线扩充装置中,当第一等待时间大于或等于时间临界值时,充电控制器执行错误复原模式以重新进入第二电能传输模式。In an embodiment of the present invention, in the aforementioned USB expansion device, when the first waiting time is greater than or equal to the time threshold, the charging controller executes the error recovery mode to re-enter the second power transmission mode.

本发明的实施例提供一种通用串行总线扩充装置的侦错方法,包括:通过连接端口电性连接外部电子装置;从连接端口接收脚位配置信号以选择执行第一电能传输模式或第二电能传输模式,其中,当执行第一电能传输模式时,计时第一等待时间,其中,当第一等待时间大于或等于时间临界值时,从第一电能传输模式切换到第二电能传输模式。An embodiment of the present invention provides a debugging method for a USB expansion device, including: electrically connecting an external electronic device through a connection port; receiving a pin configuration signal from the connection port to select to execute a first power transmission mode or a second power transmission mode A power transfer mode, wherein when the first power transfer mode is executed, a first waiting time is counted, wherein when the first waiting time is greater than or equal to a time threshold, switching from the first power transfer mode to the second power transfer mode is performed.

在本发明的一实施例中,在上述的侦错方法中,第一电能传输模式为电能汲取模式以及第二电能传输模式为电能供应模式。In an embodiment of the present invention, in the above-mentioned error detection method, the first power transfer mode is a power draw mode and the second power transfer mode is a power supply mode.

在本发明的一实施例中,在上述的侦错方法中,其中的从第一电能传输模式切换到第二电能传输模式的步骤包括:当选择执行第一电能传输模式时,外部电子装置选择执行第二电能传输模式;以及当通用串行总线扩充装置从第一电能传输模式切换到第二电能传输模式后,外部电子装置也对应地执行第一电能传输模式,以使通用串行总线扩充装置对外部电子装置进行充电。In an embodiment of the present invention, in the above-mentioned error detection method, the step of switching from the first power transmission mode to the second power transmission mode includes: when the first power transmission mode is selected to be executed, the external electronic device selects executing the second power transmission mode; and after the USB expansion device switches from the first power transmission mode to the second power transmission mode, the external electronic device also executes the first power transmission mode correspondingly, so as to enable the USB expansion The device charges external electronic devices.

在本发明的一实施例中,在上述的侦错方法中,通用串行总线扩充装置依照电源传输协定对外部电子装置进行充电。In an embodiment of the present invention, in the above-mentioned debugging method, the USB expansion device charges the external electronic device according to the power delivery protocol.

在本发明的一实施例中,在上述的侦错方法中,其中的选择执行第二电能传输模式的步骤包括:计时第二等待时间,其中时间临界值被设定成大于第二等待时间。In an embodiment of the present invention, in the above-mentioned error detection method, the step of selecting to execute the second power transmission mode includes: timing a second waiting time, wherein the time threshold is set to be greater than the second waiting time.

在本发明的一实施例中,在上述的侦错方法中,其中的从第一电能传输模式切换到第二电能传输模式的步骤包括:执行错误复原模式以重新进入第二电能传输模式。In an embodiment of the present invention, in the above-mentioned error detection method, the step of switching from the first power transmission mode to the second power transmission mode includes: executing an error recovery mode to re-enter the second power transmission mode.

基于上述,本发明的通用串行总线扩充装置及其侦错方法可以让两个具有DRP功能的电子装置在接口沟通时,能够确保在电源脚色分配不适当时,能够自动修改电源脚色,以完成两方的电源传输沟通。Based on the above, the USB expansion device and its debugging method of the present invention can ensure that when two electronic devices with DRP function communicate on the interface, when the power role assignment is not appropriate, the power role can be automatically modified, so as to complete the two side power transmission communication.

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more obvious and easy to understand, the following embodiments are given and described in detail with the accompanying drawings as follows.

附图说明Description of drawings

图1是依照本发明的一实施例的一种通用串行总线扩充装置的示意图;1 is a schematic diagram of a universal serial bus expansion device according to an embodiment of the present invention;

图2是依照本发明的一实施例的一种通用串行总线扩充装置的侦错方法的流程图;2 is a flowchart of a method for debugging a USB expansion device according to an embodiment of the present invention;

图3是依照现有技术的一种通用串行总线扩充装置的配对流程图。FIG. 3 is a pairing flow chart of a USB expansion device according to the prior art.

附图标记说明Description of reference numerals

100:USB扩充装置100: USB expansion device

110:第一连接端口110: The first connection port

120:第二连接端口120: The second connection port

130:充电控制器130: Charge Controller

140:存储器芯片140: memory chip

150:计时器150: Timer

200:外部电子装置200: External Electronics

S210~S250:通用串行总线扩充装置的侦错方法的步骤S210~S250: steps of the debugging method of the universal serial bus expansion device

S310~S340:现有的通用串行总线扩充装置的配对步骤S310~S340: Pairing steps of the existing Universal Serial Bus expansion device

具体实施方式Detailed ways

图1是依照本发明的一实施例的一种通用串行总线扩充装置的示意图。通用串行总线扩充(USB dock)装置100包括至少一连接端口以连接电子装置,例如下行端口(Downstream Facing Port,DFP)或上行端口(Upstream Facing Port,UFP)。请参照图1,USB扩充装置100包括第一连接端口110、第二连接端口120与充电控制器130。第一连接端口110用以电性连接外部电子装置200,而第二连接端口120可以将USB扩充装置100电性连接其他电子装置或USB周边装置。在本实施例中,第一连接端口110可以支援USB Type C协定以及双重用途端口(Dual Role Port,DRP),并且外部电子装置200的连接端口也支援DRP。FIG. 1 is a schematic diagram of a USB expansion device according to an embodiment of the present invention. The universal serial bus (USB dock) device 100 includes at least one connection port for connecting an electronic device, such as a Downstream Facing Port (DFP) or an Upstream Facing Port (UFP). Please refer to FIG. 1 , the USB expansion device 100 includes a first connection port 110 , a second connection port 120 and a charging controller 130 . The first connection port 110 is used to electrically connect the external electronic device 200 , and the second connection port 120 can electrically connect the USB expansion device 100 to other electronic devices or USB peripheral devices. In this embodiment, the first connection port 110 can support the USB Type C protocol and a dual role port (Dual Role Port, DRP), and the connection port of the external electronic device 200 also supports DRP.

充电控制器130电性连接第一连接端口110与第二连接端口120。充电控制器130从第一连接端口110接收脚位配置信号,并根据脚位配置信号选择执行第一电能传输模式或第二电能传输模式。在此,第一电能传输模式是指电能汲取(Sink)模式,第二电能传输模式是指电能供应(Source)模式。充电控制器130可以在执行第一电能传输模式的时候计时第一等待时间,其中当第一等待时间大于或等于时间临界值时,表示外部电子装置200目前可能不适于担任电源(Source)角色,充电控制器130会从第一电能传输模式切换到第二电能传输模式。The charging controller 130 is electrically connected to the first connection port 110 and the second connection port 120 . The charging controller 130 receives the pin configuration signal from the first connection port 110, and selects to execute the first power transmission mode or the second power transmission mode according to the pin configuration signal. Here, the first power transfer mode refers to a power sink mode, and the second power transfer mode refers to a power supply (Source) mode. The charging controller 130 may time the first waiting time when executing the first power transmission mode, wherein when the first waiting time is greater than or equal to the time threshold, it means that the external electronic device 200 may not be suitable for the role of the power source (Source) at present, The charging controller 130 switches from the first power transfer mode to the second power transfer mode.

图2是依照本发明的一实施例的一种通用串行总线扩充装置的侦错方法的流程图。图2的侦错方法适用于图1的USB扩充装置100,以下即搭配图1的元件来进一步说明USB扩充装置100以及侦错方法的实施细节。FIG. 2 is a flowchart of a method for debugging a USB expansion device according to an embodiment of the present invention. The error detection method of FIG. 2 is applicable to the USB expansion device 100 of FIG. 1 . The following will further describe the implementation details of the USB expansion device 100 and the error detection method in conjunction with the components of FIG. 1 .

具体而言,外部电子装置200或是USB扩充装置100连接的电子装置可以是个人电脑、笔记本电脑、平板电脑、手机、个人数字助理(personal digital assistant,PDA)、媒体播放器(media player)、数码相机、摄录机(camcorders)、游戏机等等,本发明并不限制。Specifically, the external electronic device 200 or the electronic device connected to the USB expansion device 100 may be a personal computer, a notebook computer, a tablet computer, a mobile phone, a personal digital assistant (PDA), a media player, Digital cameras, camcorders, game consoles, etc., are not limited by the present invention.

充电控制器130可以包括控制器、微控制器、微处理器、特殊应用集成电路(Application-specific integrated circuit,ASIC)、数字信号处理器(digital signalprocessor,DSP)、场可程序逻辑门阵列(Field Programmable Gate Array,FPGA)或其他处理/控制电路。USB扩充装置100还包括耦接充电控制器130的存储器芯片140。存储器芯片140存放着电能传输固件码。充电控制器130可以执行存储器芯片140所提供的电能传输固件码,进而提供电能传输的控制功能。例如,USB扩充装置100可以依照电源传输(powerdelivery,PD)协定对外部电子装置200进行充电,而且可以支援多种快速充电模式,本发明并不限制。The charging controller 130 may include a controller, a microcontroller, a microprocessor, an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a field programmable gate array (Field Programmable Gate Array) Programmable Gate Array, FPGA) or other processing/control circuits. The USB expansion device 100 further includes a memory chip 140 coupled to the charging controller 130 . The memory chip 140 stores the power transfer firmware code. The charging controller 130 can execute the power transmission firmware code provided by the memory chip 140, thereby providing the control function of the power transmission. For example, the USB expansion device 100 can charge the external electronic device 200 according to the power delivery (PD) protocol, and can support various fast charging modes, which is not limited in the present invention.

请参照图2,在步骤S210中,USB扩充装置100电性连接外部电子装置200以选择执行第一电能传输模式或第二电能传输模式。USB扩充装置100通过第一连接端口110电性连接外部电子装置200。充电控制器130可以从第一连接端口110接收脚位配置信号来判断第一连接端口110的配置通道脚位(configuration channel pin,CC pin)的状态。例如,判断第一连接端口110有无连接外接装置(例如图1所示外部电子装置200)。USB扩充装置100还可以经由配置通道脚位来和外部电子装置200相互交换组态信息。依照组态信息,USB扩充装置100和外部电子装置200可以自动进行协议,而决定两方的电源角色。Referring to FIG. 2 , in step S210 , the USB expansion device 100 is electrically connected to the external electronic device 200 to select to execute the first power transfer mode or the second power transfer mode. The USB expansion device 100 is electrically connected to the external electronic device 200 through the first connection port 110 . The charging controller 130 may receive the pin configuration signal from the first connection port 110 to determine the state of the configuration channel pin (CC pin) of the first connection port 110 . For example, it is determined whether the first connection port 110 is connected to an external device (eg, the external electronic device 200 shown in FIG. 1 ). The USB expansion device 100 can also exchange configuration information with the external electronic device 200 via the configuration channel pins. According to the configuration information, the USB expansion device 100 and the external electronic device 200 can automatically perform an agreement to determine the power roles of the two parties.

如果由USB扩充装置100扮演电能传输中的汲取端,而由外部电子装置200扮演电能传输的电源端,则进入步骤S220,执行第一电能传输模式且计时第一等待时间。在执行第一电能传输模式的过程中,充电控制器130会判断或进一步检测第一连接端口110的脚位状态。第一连接端口110的脚位可能包括差动信号对输入/输出脚位(TX/RX)、总线电源脚位VBUS、接地脚位GND以及配置通道对脚位(CC1及CC2脚位)等等。充电控制器130会确认第一连接端口110从未连接汲取端状态(Unattached.SNK)转化成连接汲取端状态(Attached.SNK),以表示双方配对成功,到达步骤S250。If the USB expansion device 100 acts as the sink in power transmission, and the external electronic device 200 acts as the power source for power transmission, then step S220 is entered, the first power transmission mode is executed and the first waiting time is counted. During the process of executing the first power transmission mode, the charging controller 130 will determine or further detect the pin status of the first connection port 110 . The pins of the first connection port 110 may include differential signal pair input/output pins (TX/RX), bus power pin VBUS, ground pin GND, and configuration channel pair pins (CC1 and CC2 pins), etc. . The charging controller 130 will confirm that the first connection port 110 is converted from the unattached sink state (Unattached. SNK) to the connected sink state (Attached. SNK) to indicate that the pairing is successful, and the process goes to step S250 .

充电控制器130还包括计时器150。在上述的过程中,计时器150会进行计时,称为第一等待时间。在步骤S230中,充电控制器130会持续比较第一等待时间与时间临界值的大小。如果第一等待时间等于或大于时间临界值,而USB扩充装置100与外部电子装置200尚未完成沟通配对,则进入步骤S240,切换到第二电能传输模式。The charge controller 130 also includes a timer 150 . During the above process, the timer 150 will count, which is called the first waiting time. In step S230, the charging controller 130 continuously compares the first waiting time with the time threshold. If the first waiting time is equal to or greater than the time threshold, and the communication and pairing between the USB expansion device 100 and the external electronic device 200 has not been completed, the process proceeds to step S240 to switch to the second power transmission mode.

例如,时间临界值被设定为3秒(本发明不限制),充电控制器130选择执行第一电能传输模式,外部电子装置200选择执行第二电能传输模式,即外部电子装置200作为电源端,USB扩充装置100作为汲取端。当充电控制器130花了不小于三秒的时间还未完成沟通配对时,充电控制器130会从第一电能传输模式切换到第二电能传输模式。充电控制器130从第一电能传输模式切换到第二电能传输模式后,外部电子装置200也对应地执行第一电能传输模式。改成外部电子装置200作为汲取端,USB扩充装置100作为电源端,以使USB扩充装置100对外部电子装置200进行充电。For example, the time threshold is set to 3 seconds (not limited in the present invention), the charging controller 130 selects to execute the first power transfer mode, and the external electronic device 200 selects to execute the second power transfer mode, that is, the external electronic device 200 is used as the power terminal , the USB expansion device 100 is used as the sink. When the charging controller 130 has not completed the communication and pairing for not less than three seconds, the charging controller 130 will switch from the first power transmission mode to the second power transmission mode. After the charging controller 130 switches from the first power transfer mode to the second power transfer mode, the external electronic device 200 also executes the first power transfer mode correspondingly. The external electronic device 200 is changed to be the sink terminal, and the USB expansion device 100 is used as the power terminal, so that the USB expansion device 100 can charge the external electronic device 200 .

补充说明的是,在本实施例中,当第一等待时间大于或等于时间临界值时,充电控制器130会执行错误复原(ErrorRecovery)模式以重新进入第二电能传输模式。当无法顺利完成汲取端状态的连接确认时,USB扩充装置100的错误复原模式具备切换到第二电能传输模式的功能,可以重新分配脚位,所以此功能与先前技术具有差异性。It is added that in this embodiment, when the first waiting time is greater than or equal to the time threshold, the charging controller 130 will execute an error recovery (Error Recovery) mode to re-enter the second power transmission mode. When the connection confirmation of the sink state cannot be successfully completed, the error recovery mode of the USB expansion device 100 has the function of switching to the second power transmission mode, and the pins can be reassigned, so this function is different from the prior art.

在步骤S240中,USB扩充装置100执行第二电能传输模式,由USB扩充装置100扮演电能传输中的电源端,由外部电子装置200扮演汲取端。在确认第一连接端口110从未连接电源端状态(Unattached.SRC)转化成连接电源端状态(Attached.SRC)后,进入步骤S250,完成双方配对。In step S240 , the USB expansion device 100 executes the second power transmission mode, and the USB expansion device 100 acts as a power terminal in power transmission, and the external electronic device 200 acts as a sink terminal. After confirming that the first connection port 110 is transformed from the unattached state (Unattached. SRC) to the connected state (Attached. SRC), the process proceeds to step S250 to complete the pairing.

充电控制器130可以在执行第二电能传输模式时计时第二等待时间,而时间临界值会被设定成大于第二等待时间。The charging controller 130 may count the second waiting time when executing the second power transfer mode, and the time threshold may be set to be greater than the second waiting time.

在完成确认第一连接端口110的连接电源端状态(Attached.SRC)的过程中,计时器150也可以进行计时以产生第二等待时间(在某些实施例中可不需要此动作)。第二等待时间会有一个对应的时间参考值,表示从步骤S240到步骤S250的指标性花费时间。例如时间参考值是平均花费时间,或者是正常操作时,第二等待时间不会超过此时间参考值等。时间参考值会小于步骤S230中的时间临界值。例如,时间临界值设成3秒,第二等待时间花费1秒,时间临界值是1.2秒。In the process of confirming the connected power terminal status (Attached. SRC) of the first connection port 110 , the timer 150 may also count to generate a second waiting time (this action may not be required in some embodiments). The second waiting time will have a corresponding time reference value, which represents the indicative time spent from step S240 to step S250. For example, the time reference value is the average time spent, or in normal operation, the second waiting time will not exceed this time reference value, etc. The time reference value will be smaller than the time threshold value in step S230. For example, if the time threshold is set to 3 seconds, the second waiting time takes 1 second, and the time threshold is 1.2 seconds.

以下提供表一与表二来显示本发明改善电子装置之间的电源传输沟通失败率的结果。表一显示的是现有的USB扩充装置(请参照图3)在连接外部电子装置时,如果外部电子装置被设定为省电模式而无法对外输出电力,就会发生50%的沟通失败率。表二显示的是本发明的USB扩充装置100在连接外部电子装置200时,能够把配对失败率降到最低。当USB扩充装置100选择作为汲取端的时候,如果外部电子装置200无法作为电源端,USB扩充装置100会自动切换成模式,以顺利完成配对。Tables 1 and 2 are provided below to show the results of improving the power transmission communication failure rate between electronic devices according to the present invention. Table 1 shows the existing USB expansion device (please refer to Figure 3). When connecting an external electronic device, if the external electronic device is set to the power saving mode and cannot output power, a communication failure rate of 50% will occur. . Table 2 shows that when the USB expansion device 100 of the present invention is connected to the external electronic device 200, the pairing failure rate can be minimized. When the USB expansion device 100 is selected as the sink terminal, if the external electronic device 200 cannot be used as the power terminal, the USB expansion device 100 will automatically switch to the mode to successfully complete the pairing.

表一Table I

Figure BDA0001954434250000071
Figure BDA0001954434250000071

表二Table II

Figure BDA0001954434250000072
Figure BDA0001954434250000072

综上所述,在本发明的通用串行总线扩充装置及其侦错方法中,当USB扩充装置与外接电子装置的电能配置关系是第一电能传输模式时,USB扩充装置会计时以产生第一等待时间。如果第一等待时间大于时间临界值,USB扩充装置会自动切换到第二电能传输模式以完成双方的电能传输配置。如此一来,可以避免电子装置之间的电源角色配对失败。To sum up, in the USB expansion device and the error detection method of the present invention, when the power configuration relationship between the USB expansion device and the external electronic device is the first power transmission mode, the USB expansion device will generate the first power transmission mode at time. A waiting time. If the first waiting time is greater than the time threshold, the USB expansion device will automatically switch to the second power transfer mode to complete the power transfer configuration of both parties. In this way, failure of power role pairing between electronic devices can be avoided.

虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域中技术人员,在不脱离本发明的精神和范围内,当可作些许的更改与润饰,故本发明的保护范围当视权利要求所界定的为准。Although the present invention has been disclosed above with examples, it is not intended to limit the present invention. Any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall be subject to what is defined in the claims.

Claims (12)

1.一种通用串行总线扩充装置,其特征在于,包括:1. a universal serial bus expansion device, is characterized in that, comprises: 连接端口,用以电性连接外部电子装置;以及a connection port for electrically connecting an external electronic device; and 充电控制器,电性连接所述连接端口以接收脚位配置信号,并且根据所述脚位配置信号选择执行第一电能传输模式或第二电能传输模式,a charging controller, electrically connected to the connection port to receive a pin configuration signal, and select to execute a first power transmission mode or a second power transmission mode according to the pin configuration signal, 其中,所述充电控制器执行所述第一电能传输模式并计时第一等待时间,其中当所述第一等待时间大于或等于时间临界值时,所述充电控制器从所述第一电能传输模式切换到所述第二电能传输模式。Wherein, the charging controller executes the first power transfer mode and counts a first waiting time, wherein when the first waiting time is greater than or equal to a time threshold, the charging controller transfers the power from the first power The mode switches to the second power transfer mode. 2.根据权利要求1所述的通用串行总线扩充装置,其特征在于,所述第一电能传输模式为电能汲取模式,以及所述第二电能传输模式为电能供应模式。2 . The USB expansion device of claim 1 , wherein the first power transfer mode is a power draw mode, and the second power transfer mode is a power supply mode. 3 . 3.根据权利要求2所述的通用串行总线扩充装置,其特征在于,所述充电控制器从所述第一电能传输模式切换到所述第二电能传输模式后,所述外部电子装置也对应地执行所述第一电能传输模式,以使所述通用串行总线扩充装置对所述外部电子装置进行充电。3 . The USB expansion device of claim 2 , wherein after the charging controller switches from the first power transmission mode to the second power transmission mode, the external electronic device also The first power transfer mode is correspondingly executed to enable the USB expansion device to charge the external electronic device. 4.根据权利要求3所述的通用串行总线扩充装置,其特征在于,所述通用串行总线扩充装置依照电源传输协定对所述外部电子装置进行充电。4 . The USB expansion device of claim 3 , wherein the USB expansion device charges the external electronic device according to a power delivery protocol. 5 . 5.根据权利要求1所述的通用串行总线扩充装置,其特征在于,所述充电控制器执行所述第二电能传输模式且计时第二等待时间,其中所述时间临界值被设定成大于所述第二等待时间。5. The USB expansion device of claim 1, wherein the charge controller executes the second power transfer mode and counts a second waiting time, wherein the time threshold is set to greater than the second waiting time. 6.根据权利要求1所述的通用串行总线扩充装置,其特征在于,当所述第一等待时间大于或等于所述时间临界值时,所述充电控制器执行错误复原模式以重新进入所述第二电能传输模式。6. The USB expansion device of claim 1, wherein when the first waiting time is greater than or equal to the time threshold, the charging controller executes an error recovery mode to re-enter all The second power transfer mode is described. 7.一种通用串行总线扩充装置的侦错方法,其特征在于,包括:7. A method for debugging a universal serial bus expansion device, comprising: 通过连接端口电性连接外部电子装置;以及Electrically connect external electronic devices through the connection ports; and 从所述连接端口接收脚位配置信号以选择执行第一电能传输模式或第二电能传输模式,receiving a pin configuration signal from the connection port to select to execute the first power transfer mode or the second power transfer mode, 其中,当执行所述第一电能传输模式时,计时第一等待时间,其中,当所述第一等待时间大于或等于时间临界值时,从所述第一电能传输模式切换到所述第二电能传输模式。Wherein, when the first power transmission mode is executed, a first waiting time is counted, wherein when the first waiting time is greater than or equal to a time threshold, switching from the first power transmission mode to the second Power transfer mode. 8.根据权利要求7所述的侦错方法,其特征在于,所述第一电能传输模式为电能汲取模式,以及所述第二电能传输模式为电能供应模式。8 . The error detection method of claim 7 , wherein the first power transfer mode is a power draw mode, and the second power transfer mode is a power supply mode. 9 . 9.根据权利要求8所述的侦错方法,其特征在于,所述的从所述第一电能传输模式切换到所述第二电能传输模式的步骤包括:9. The error detection method according to claim 8, wherein the step of switching from the first power transmission mode to the second power transmission mode comprises: 当选择执行所述第一电能传输模式时,所述外部电子装置选择执行所述第二电能传输模式;以及When selecting to execute the first power transfer mode, the external electronic device selects to execute the second power transfer mode; and 当所述通用串行总线扩充装置从所述第一电能传输模式切换到所述第二电能传输模式后,所述外部电子装置也对应地执行所述第一电能传输模式,以使所述通用串行总线扩充装置对所述外部电子装置进行充电。After the USB expansion device is switched from the first power transmission mode to the second power transmission mode, the external electronic device also executes the first power transmission mode correspondingly, so that the universal A serial bus expansion device charges the external electronic device. 10.根据权利要求9所述的侦错方法,其特征在于,所述通用串行总线扩充装置依照电源传输协定对所述外部电子装置进行充电。10 . The debugging method of claim 9 , wherein the USB expansion device charges the external electronic device according to a power delivery protocol. 11 . 11.根据权利要求7所述的侦错方法,其特征在于,所述的选择执行所述第二电能传输模式的步骤包括:11. The error detection method according to claim 7, wherein the step of selecting and executing the second power transmission mode comprises: 计时第二等待时间,其中所述时间临界值被设定成大于所述第二等待时间。A second waiting time is counted, wherein the time threshold is set to be greater than the second waiting time. 12.根据权利要求7所述的侦错方法,其特征在于,所述的从所述第一电能传输模式切换到所述第二电能传输模式的步骤包括:12. The error detection method according to claim 7, wherein the step of switching from the first power transmission mode to the second power transmission mode comprises: 执行错误复原模式以重新进入所述第二电能传输模式。An error recovery mode is executed to re-enter the second power transfer mode.
CN201910061957.XA 2019-01-23 2019-01-23 Universal serial bus expansion device and its debugging method Withdrawn CN111475453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910061957.XA CN111475453A (en) 2019-01-23 2019-01-23 Universal serial bus expansion device and its debugging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910061957.XA CN111475453A (en) 2019-01-23 2019-01-23 Universal serial bus expansion device and its debugging method

Publications (1)

Publication Number Publication Date
CN111475453A true CN111475453A (en) 2020-07-31

Family

ID=71743843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910061957.XA Withdrawn CN111475453A (en) 2019-01-23 2019-01-23 Universal serial bus expansion device and its debugging method

Country Status (1)

Country Link
CN (1) CN111475453A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201541797A (en) * 2014-04-21 2015-11-01 鴻海精密工業股份有限公司 Universal serial bus adaptor and universal serial bus cable
CN105224494A (en) * 2015-10-28 2016-01-06 小米科技有限责任公司 Method for handover control and device
CN105656162A (en) * 2016-03-17 2016-06-08 深圳市乐得瑞科技有限公司 Rapid charging system and method based on USB PD protocol
CN105785817A (en) * 2016-03-24 2016-07-20 成都芯源系统有限公司 Power supply circuit and power supply method
CN107240940A (en) * 2016-03-29 2017-10-10 快捷半导体(苏州)有限公司 USB connector charging method and circuit
CN107579583A (en) * 2016-07-05 2018-01-12 光环国际经济特区有限责任公司 Multi-functional portable power supply charger
JP2018106555A (en) * 2016-12-27 2018-07-05 キヤノン株式会社 Electronic apparatus, control method thereof, program, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201541797A (en) * 2014-04-21 2015-11-01 鴻海精密工業股份有限公司 Universal serial bus adaptor and universal serial bus cable
CN105224494A (en) * 2015-10-28 2016-01-06 小米科技有限责任公司 Method for handover control and device
CN105656162A (en) * 2016-03-17 2016-06-08 深圳市乐得瑞科技有限公司 Rapid charging system and method based on USB PD protocol
CN105785817A (en) * 2016-03-24 2016-07-20 成都芯源系统有限公司 Power supply circuit and power supply method
CN107240940A (en) * 2016-03-29 2017-10-10 快捷半导体(苏州)有限公司 USB connector charging method and circuit
CN107579583A (en) * 2016-07-05 2018-01-12 光环国际经济特区有限责任公司 Multi-functional portable power supply charger
JP2018106555A (en) * 2016-12-27 2018-07-05 キヤノン株式会社 Electronic apparatus, control method thereof, program, and storage medium

Similar Documents

Publication Publication Date Title
TWI733752B (en) System and method for side band communication, and tangible, non-transitory, computer-readable medium
CN107111588B (en) Data transfer using PCIe protocol via USB port
CN101601001B (en) Multiple connections to a single serial interface
US10042801B2 (en) System for detecting universal serial bus (USB) device and method thereof
US20190370217A1 (en) Methods and apparatus for reducing power consumption within embedded systems
CN106786960B (en) Charging control method, device and terminal
TW201516637A (en) Hub device for universal serial bus and power management method therefore
CN111614141B (en) USB connector discharging method, circuit and system
CN206003090U (en) Circuit for realizing USB Type-c interface function of display
WO2017161750A1 (en) Mobile apparatus
CN109062846B (en) Universal serial bus device and operation method thereof
TW201523266A (en) Electronic device using USB plugging set to load firmware and firmware loading method thereof
CN107480084A (en) Type C mobile terminals charge and data transmission method, device and storage medium
US8990461B2 (en) On-The-Go (OTG) USB devices configuration method for identifying configuration of other connected devices by reacting to change in resistance value on a resistive line
TWI515550B (en) Chip device and electronic system thereof
WO2016168987A1 (en) Solution for mutually identifying forward and reverse insertion between touch type usb devices
CN116707055A (en) Charging circuit, electronic equipment and reverse charging method
CN111475453A (en) Universal serial bus expansion device and its debugging method
CN108321900A (en) Terminal charging control method and terminal
WO2020233575A1 (en) Method for realizing usb otg function
TW202026897A (en) Universal serial bus docking apparatus and error detecting method thereof
WO2016141554A1 (en) Self-loop detection method and apparatus for charging device
US10254821B2 (en) Managing surprise hot plug in low power state
TW202424750A (en) Computer assembly and control method therefor
CN105098854A (en) Charging method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200731