Controller, control method and control program

By dynamically switching the port power role using controller 110, the problem of uncertain power role when connecting Try.SRC or Try.SNK in the USB Type-C standard is solved, ensuring that the power role is uniquely determined after the device is connected, and realizing the reliability of the power supply and power receiving process.

CN111240453BActive Publication Date: 2024-11-22RENESAS ELECTRONICS CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911157764.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-29
Filing Date
2019-11-22
Publication Date
2024-11-22
Estimated Expiration
2039-11-22

Smart Images

  • Figure CN111240453B_ABST
    Figure CN111240453B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a controller, a control method, and a control program. The present invention solves new problems that may occur when Try.SRC or Try.SNK is adopted. A controller is used to implement a DRP-compatible device that can be both a power supply side and a power receiving side according to the USB Type-C standard. The controller is configured to be able to: when determining that the power role of a own device is a sink representing a power receiver according to a sequence with a counterpart device, execute a first process to determine whether the port power role of the counterpart device is Try.SRC, and if the port power role of the counterpart device is Try.SRC, execute a second process to switch the port power role of the own device to SRC only and then continue the sequence with the counterpart device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] The disclosure of Japanese Patent Application No. 2018-223029 filed on November 29, 2018 (including specification, drawings and abstract) is incorporated herein by reference in its entirety. Technical Field

[0003] The present disclosure relates to, for example, a controller for executing a sequence conforming to the universal serial bus standard to perform power supply and power reception operations with respect to a connection destination. Background Art

[0004] As a USB standard, the USB Type-C standard has been defined, and a USB Type-C interface conforming to the USB Type-C standard is becoming more and more popular (for example, see Version 1.3 of the Universal Serial Bus Type-C Cable and Connector Specification on July 14, 2017). In the USB Type-C interface, a port having the same shape is used for power supply and power reception. Therefore, a single port supports both power supply and power reception.

[0005] In the USB Type-C standard, the device that provides power (power supply side) is called source or SRC, and the device that receives power (power receiving side) is called sink or SNK. In addition, the device corresponding to both power supply and power receiving is called DRP (Dual Role Power). By using DRP, two ports that were previously required can be replaced with one port, thereby reducing cost and space.

[0006] Due to this advantage, it can be expected that DRP will be used as a port power role so that when the USB Type-C interface is used for mobile devices (such as smartphones, tablets, laptops, etc.) that include a mobile power source such as a mobile battery, DRP will be able to support power supply and power reception at one port. Summary of the invention

[0007] When devices with DRP as the port power role are connected to each other, the power role (i.e., which device will be SRC / SNK) cannot be uniquely determined. Therefore, in the USB Type-C standard disclosed in Version 1.3 of the Universal Serial Bus Type-CCable and Connector Specification released on July 14, 2017, "Try.SRC" (DRP leading to SRC) and "Try.SNK" (DRP leading to SNK) are defined as port power roles.

[0008] For example, when Try.SRC (DRP leading to SRC) and DRP (pure DRP) are connected, the device on the Try.SRC side will become SRC. Similarly, when Try.SNK (DRP leading to SNK) and DRP (pure DRP) are connected, the device on the Try.SNK side will become SNK.

[0009] The inventors of the present application have discovered that new problems may occur when such Try.SRC or Try.SNK is used.

[0010] Other objects and novel features will become apparent from the description of this specification and the accompanying drawings.

[0011] A controller according to an embodiment is used to implement a DRP-compatible device that can be both a power supply side and a power receiving side according to the USB Type-C standard. The controller is configured to be able to: when determining that the power role of the own device is a sink representing a power receiving side according to a sequence with a counterpart device (which is a device of a connection destination), perform a first process of determining whether the port power role of the counterpart device is Try.SRC, and if the port power role of the counterpart device is Try.SRC, perform a second process of switching the port power role of the own device to SRC only and then continuing the sequence with the counterpart device.

[0012] According to one embodiment, a new problem that may occur when Try.SRC or Try.SNK is used may be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A diagram for explaining an example of determining a power role according to the USB Type-C standard is shown;

[0014] Figure 2 An example of power role decision making regarding device connection according to the USB Type-C standard is shown;

[0015] Figure 3 is a schematic diagram showing an example of a mobile power supply hardware configuration according to an embodiment of the present invention;

[0016] Figure 4 It is shown Figure 3 A schematic diagram of an example of a circuit configuration of the controller 110 is shown;

[0017] Figure 5 is a diagram showing an example of decision making of power supply roles in the device according to the first embodiment;

[0018] Figure 6 is a diagram showing an example of a state machine of the device of the first embodiment;

[0019] Figure 7 is a diagram showing an example of a sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is Try.SRC (without port power role switching);

[0020] Figure 8 is a diagram showing an example of a sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is Try.SRC (with port power role switching);

[0021] Fig. 9 is a diagram showing an example of a sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is SRC only;

[0022] Fig.10 Shown with Figures 7 to 9 The state machine corresponding to each sequence shown;

[0023] Fig.11 is a diagram showing an example of a sequence in which devices according to the first embodiment are connected together;

[0024] Fig.12 is a diagram showing an example of a state machine of a device according to the second embodiment;

[0025] Fig.13 is a diagram showing an example of a sequence in a case where the device according to the second embodiment and the device according to the first embodiment are connected to each other;

[0026] Fig.14 is a diagram for explaining a switching condition SR adopted in the apparatus according to the third embodiment;

[0027] Fig.15 is a diagram for explaining a switching condition SR adopted in the apparatus according to the fourth embodiment;

[0028] Fig.16 is a diagram for explaining a switching condition SR adopted in a modified apparatus of the fourth embodiment;

[0029] Fig.17 is a diagram showing an example of decision making of power supply roles in a device according to the fifth embodiment;

[0030] Fig.18 is a diagram showing an example of a state machine of a device according to a fifth embodiment;

[0031] Fig.19 is a diagram showing a main part of a state machine of the device of the fifth embodiment; and

[0032] Fig. 20is a diagram for explaining a switching condition SN employed in the apparatus according to the fifth embodiment. DETAILED DESCRIPTION

[0033] The same or corresponding parts in the drawings are denoted by the same reference numerals, and description thereof will not be repeated.

[0034] [A. Background]

[0035] First, the role of power supply in the USB Type-C standard will be described.

[0036] In the USB Type-C standard, a "source" or "SRC" is specified, which is a device that provides power (power supply side), a "sink" or "SNK" is specified, which is a device that receives power (power receiving side), and a "DRP" is specified, which is a device that supports both power supply and power receiving.

[0037] When a device configured as a DRP is connected, the power role (i.e., which device is SRC / SNK) cannot be uniquely determined. Therefore, in the USB Type-C standard, Try.SRC (DRP leading to SRC) and Try.SNK (DRP leading to SNK) are defined.

[0038] Figure 1 is a diagram for explaining an example of determining power roles according to the USB Type-C standard. Figure 1 Shown are a power bank 100, a smart phone 200, and a laptop computer 300. Each of these devices is configured as a DRP.

[0039] like Figure 1 As shown in FIG. 1A , when the mobile power 100 and the smartphone 200 are connected to each other, it is generally planned that power is supplied from the mobile power 100 to the smartphone 200. That is, it is preferable that the mobile power 100 is an SRC and the smartphone 200 is an SNK.

[0040] In addition, if Figure 1 As shown in FIG. 2B , when the laptop computer 300 and the smart phone 200 are connected to each other, it is planned to supply power from the laptop computer 300 to the smart phone 200, considering that the laptop computer 300 is equipped with a larger battery. That is, preferably, the laptop computer 300 is an SRC, and the smart phone 200 is an SNK.

[0041] Assume that Figure 1 In the usage modes shown in A and 1B, preferably, the mobile power supply 100 and the laptop computer 300 are both configured as Try.SRC, and the smart phone 200 is configured as Try.SNK.

[0042] Here, if Figure 1 As shown in FIG. 3C , it is assumed that the mobile power supply 100 and the laptop computer 300 are connected to each other. In this case, it is desirable to normally supply power from the mobile power supply 100 to the laptop computer 300. Therefore, preferably, the mobile power supply 100 is an SRC, and the laptop computer 300 is an SNK.

[0043] However, a new problem is found: when the mobile power supply 100 and the laptop computer 300 are configured as Try.SRC, assuming that Figure 1 In the usage modes shown in A and 1B, the power roles between the mobile power supply 100 and the laptop computer 300 cannot be uniquely determined.

[0044] That is, when Try.SRC is connected, the power role (i.e., which device is SRC / SNK) cannot be uniquely determined. Similarly, when Try.SNK is connected, the power role (i.e., which device is SRC / SNK) cannot be uniquely determined.

[0045] Figure 2 is a diagram showing an example of decision making for power roles of connected devices according to the USB Type-C standard. Figure 2 As shown, five types of port power roles indicating the role set in the device are: SRC Only, Try.SRC, DRP, Try.SNK, and SNK Only. There are two types of power roles indicating the role of the port of the device in the connected state: SNK and SRC.

[0046] The port power role and the power role are set for each port included in the device, respectively. For ease of description, the following description focuses on a single port of each device.

[0047] refer to Figure 2 When the port power role of the own device is Try.SRC, if the port power role of the other device as the connection destination device is Try.SRC, the power role of the own device after the connection cannot be uniquely determined.

[0048] Similarly, when the port power role of the own device is Try.SNK, if the port power role of the counterpart device is Try.SNK, the power role of the own device after the connection cannot be uniquely determined.

[0049] According to each embodiment of the present disclosure, a solution to the new problem that the power role cannot be uniquely determined is provided.

[0050] [B. Example of hardware configuration]

[0051] First, a hardware configuration example of a controller according to each embodiment of the present invention will be described. Each embodiment described later can be implemented by using a controller as described below. For ease of explanation, an example of a hardware configuration in a mobile power supply 100 will be described, but similar hardware configurations can be adopted for other devices.

[0052] Figure 3 is a schematic diagram showing an example of a hardware configuration in the mobile power supply 100 according to each embodiment of the present disclosure. Figure 3 The mobile power supply 100 includes a connector 102, a power manager 104, a battery 106, and a controller 110 as main components. The connector 102 includes a port for a USB Type-C interface.

[0053] The power manager 104 controls the charging and discharging of the battery 106 according to the instructions from the controller 110. Specifically, the power manager 104 can selectively perform: a first charging operation to store the power provided from the external power source in the battery 106; a second charging operation to store the power provided from the external device in the battery 106; and a discharging operation to provide the power stored in the battery 106 to the external device.

[0054] The battery 106 is a storage battery configured to be chargeable and dischargeable, and, for example, a lithium ion secondary battery, a lithium ion polymer secondary battery, a nickel-metal hydride rechargeable battery, or the like is used.

[0055] The controller 110 implements a DRP-compatible device that can be a power supply side (SRC) and a power receiving side (SNK) according to the USB Type-C standard. The controller 110 provides a port that serves as a DRP and manages communication with a counterpart device via the USB cable 2 and power supply and power receiving operations by executing a control method as described below. More specifically, the controller 110 includes a processor 112 and a CC1 / CC2 control and connection detection module (PHY and LGC) 116. The processor 112 is connected to the CC1 / CC2 control and connection detection module 116 and the power manager 104.

[0056] The processor 112 executes a sequence according to the USB Type-C standard. The processor 112 executes the firmware 114 as an example of a control program, thereby realizing the execution of the control method and the provision of functions described below. That is, the sequence (control process) related to the state control conforming to the USB Type-C standard can be realized by the processor 112 executing the firmware 114 as an example of a control program. The implementation using the processor 112 and the firmware 114 can facilitate sequence modification, version upgrade, etc. Instead of the software implementation using the processor 112, the hardware implementation described later can be adopted.

[0057] The CC1 / CC2 control and connection detection module 116 controls the communication lines (the first communication line (CC1) 21 and the second communication line (CC2) 22) in the USB cable 2 to detect the counterpart device and connection according to the instruction from the processor 112. The first communication line 21 and the second communication line 22 may be collectively referred to as "communication lines". The detailed configuration of the CC1 / CC2 control and connection detection module 116 will be described later.

[0058] The processor 112 is coupled to the power manager 104 to control the charging and discharging of the battery 106. An optional control interface may be provided between the processor 112 and the power manager 104. Such a control interface mediates the sending of control commands for the power manager 104 to control charging and discharging according to instructions from the processor 112. For example, control signals may be exchanged between the processor 112 and the power manager 104 according to an I2C interface.

[0059] Power is exchanged between the battery 106 and the external device via a power line (VBUS) 23 in the USB cable 2. The USB cable 2 may include a shielded wire (not shown).

[0060] Figure 4 It is shown Figure 3 FIG. 1 is a schematic diagram showing an example of a circuit configuration of the controller 110. Figure 4 , the CC1 / CC2 control and connection detection module 116 of the controller 110 controls the first communication line 21 (CC1) and the second communication line 22 (CC2) to detect the connection with the other party's device.

[0061] More specifically, the CC1 / CC2 control and connection detection module 116 includes a first connection detector 1161 and a second connection detector 1162 .

[0062] The first connection detector 1161 detects the connection state of the counterpart device based on the potential of the first communication line 21 and outputs the detection result to the processor 112. Similarly, the second connection detector 1162 detects the connection state of the counterpart device through the potential of the second communication line 22 and outputs the detection result to the processor 112.

[0063] The CC1 / CC2 control and connection detection module 116 has resistors connected between the communication lines (the first communication line 21 and the second communication line 22) and the power supply potential Vs and the ground potential GND, respectively, in order to detect connection of a counterpart device.

[0064] Specifically, a pull-up resistor 1165 having a resistance value Rp between the first communication line 21 and the power supply potential Vs is connected to the first communication line 21, and a pull-down resistor 1166 having a resistance value Rd between the first communication line 21 and the ground potential GND is connected to the first communication line 21. Similarly, a pull-up resistor 1167 having a resistance value Rp between the second communication line 22 and the power supply potential Vs is connected to the second communication line 22, and a pull-down resistor 1168 having a resistance value Rd between the second communication line 22 and the ground potential GND is connected to the second communication line 22.

[0065] Switches 1163 and 1164 electrically connect / disconnect the path from the communication line (the first communication line 21 and the second communication line 22) to the power supply potential Vs and the ground potential GND. More specifically, switch 1163 electrically connects / disconnects the pull-up resistor 1165 or the pull-down resistor 1166 to / from the first communication line 21 according to the control signal from the processor 112. Similarly, switch 1164 electrically connects / disconnects the pull-up resistor 1167 or the pull-down resistor 1168 to / from the second communication line 22 according to the control signal from the processor 112.

[0066] By detecting voltages corresponding to the resistances Rp and Rd generated in the first communication line 21 and the second communication line 22 , a connection is established between the mobile power source 100 and the counterpart device.

[0067] [C. First embodiment]

[0068] Next, as a first embodiment, a method in which Figure 1 In the case shown in C, the power role of the mobile power source 100 can be uniquely determined as the sequence of SRCs.

[0069] More specifically, when Try.SRC is set as the initial state port power role, the device according to the first embodiment dynamically switches the port power role to SRC only, and after connection, the power role must be fixed to (when the predetermined switching condition SR is satisfied). By dynamically switching such a port power role, even if devices whose port power role is Try.SRC are connected to each other, the predetermined device can be fixed to SRC.

[0070] [c1: Example of decision making for power role]

[0071] Figure 5 1 is a diagram showing an example of determining a power source role in the device according to the first embodiment. Figure 5, assuming that in the initial state, the port power role of the own device is Try.SRC. If the port power role of the other device is Try.SRC, the port power role of the own device is switched from Try.SRC to SRC only. This will uniquely determine the power role of the own device as SRC.

[0072] As the switching condition SR for switching the port power role from Try.SRC to SRC only as described above, in the first embodiment, a state transition path when connected to the counterpart device is used. More specifically, when the own device is connected to the counterpart device and the power role of the own device is SNK, if it is determined that the port power role of the counterpart device is Try.SRC, the port power role of the own device is switched to SRC only and reconnected. When disconnection with the counterpart device is detected, the port power role of the counterpart device will return to Try.SRC again.

[0073] As described above, according to the first embodiment, when it is determined that the power role of the own device is SNK (which means the power receiving side) according to the sequence with the other device (which is the device of the connection destination), the device performs a process of determining whether the port power role of the other device is Try.SRC. Then, if the port power role of the other device is Try.SRC, according to the first embodiment, the device performs a process of switching the port power role of the own device to SRC only and continuing the sequence with the other device.

[0074] By dynamically switching the port power role, even if the port power role of the other device is Try.SRC, after the connection, the power role of the own device can be fixed to SRC.

[0075] (c2: state machine)

[0076] Figure 6 An example of a state machine of the device according to the first embodiment is shown. Figure 6 , according to a first embodiment, the device will have a Try.SRC and a SRC-only state machine.

[0077] In the initial state, since the port power role is Try.SRC, the operation starts in the state machine of Try.SRC. When the transition of the state machine satisfies the switching condition SR, the operation transitions to the state machine of only SRC.

[0078] In the operation of SRC only, when the connection with the other device is disconnected (sink removal), the state machine will return to the state machine of Try.SRC instead of switching to Unattached.SRC (ST31). That is, the state returns the port power role to Try.SRC, and the device returns to initialization.

[0079] exist Figure 6 In the state machine shown, when only SRC returns to Try.SRC, a direct transition from Attached.SRC (ST33) to Unattached.SNK (ST11) is performed, but a transition from Attached.SRC (ST33) to Unattached.SNK (ST11) can be performed via UnattachedWait.SRC (ST34).

[0080] (c3: Switching condition SR)

[0081] Next, the switching condition SR for switching the port power role from Try.SRC to SRC only is described. As the switching condition SR, the state transition path leading to Attached.SNK (ST13) is used. That is, the process of determining the port power role of the other device includes: based on the state transition path until the power role of the own device is determined as the sink, the process of determining whether the port power role of the other device is Try.SRC.

[0082] Attached.SNK (ST13) corresponds to a state in which the power role of the device becomes SNK, but here, if the counterpart device is SRC only, the operation follows Figure 5 However, if the other device is not SRC-only but Try.SRC, the operation does not follow Figure 5 The power role of the device needs to be switched to SRC.

[0083] That is, according to the first embodiment, when the port power role of the counterpart device is not SRC-only, the controller 110 of the device switches the port power role of the own device to SRC-only.

[0084] More specifically, when the own device is converted to Attached.SNK (ST13), the port power role of the counterpart device is SRC only or Try.SRC. Therefore, after the own device is converted to Attached.SNK (ST13), it is determined whether the port power role of the counterpart device is SRC only or Try.SRC.

[0085] like Figure 6As shown in FIG. 1 , when the port power role of the other device is SRC only, the state transition path will be: Try.SRC (ST14), TryWait.SNK (ST15), and Attached.SNK (ST13). On the other hand, when the port power role of the other device is Try.SRC, the state transition path will be: Attached.SRC (ST23), TryWait.SNK (ST15), and Attached.SNK (ST13).

[0086] The switching condition SR indicating whether the port power role of the own device should be switched to SRC only can be determined based on the difference between the state transition paths leading to Attached.SNK (ST13). That is, when the state transition paths Attached.SRC (ST23), TryWait.SNK (ST15) and Attached.SNK (ST13) appear, the port power role is switched from Try.SRC to SRC only.

[0087] That is, the process of determining whether the port power role of the counterpart device is Try.SRC includes determining whether the state transition path until the power role of the own device is determined to be the sink is Attached.SRC, TryWait.SNK, and Attached.SNK in this order.

[0088] (c4: sequence)

[0089] Next, an example of a sequence of the device according to the first embodiment will be described.

[0090] Figure 7 : is a diagram showing an example of a sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is Try.SRC (without port power role switching). Figure 8 : is a diagram showing an example of a sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is Try.SRC (with port power role switching).

[0091] Fig. 9 : is a diagram showing an example sequence when the device according to the first embodiment is connected to a counterpart device whose port power role is SRC only.

[0092] Fig.10 is shown with Figures 7 to 9 Each sequence shown corresponds to a state machine diagram. Figures 7 to 9 In the sequence shown, the port power role of the own device is Try.SRC. Figures 7 to 9The "CC Control" shown indicates the resistance values ​​appearing in the first communication line 21 (CC1) and the second communication line 22 (CC2) (see Figure 3 and 4 ).

[0093] first, Figure 7 The example sequence shown shows an example where the power role is set to SRC without dynamically switching the port power role to SRC only. Figure 7 , assuming that in the initial state, the own device is in Unattached.SNK (ST11) and the other device is in Unattached.SRC (ST21). In the unconnected state, both the own device and the other device perform a trigger operation to alternately switch between Unattached.SNK (ST11) and Unattached.SRC (ST21).

[0094] The own device converts to AttachWait.SNK (attach wait.SNK) (ST12) according to the sequence (sequence SQ11). On the other hand, the other device converts to AttachWait.SRC (ST22) according to the sequence (sequence SQ21), and the other device converts to Attached.SRC (ST23) (sequence SQ22). By converting to Attached.SRC (ST23), the other device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23.

[0095] By detecting VBUS ON by the counterpart device, the own device switches to Try.SRC (ST14) (sequence SQ12), and further switches to Attached.SRC (ST23) (sequence SQ13). Then, the own device applies a predetermined voltage (VBU SON) to the power line (VBUS) 23.

[0096] On the other hand, since the partner device cannot detect SNK regarding VBUS ON, it transitions to TryWait.SNK (ST15) (Sequence SQ23), and the partner device transitions to Attached.SNK (ST13) (Sequence SQ24) by detecting VBUS ON by the own device.

[0097] According to the above sequence, after the own device and the counterpart device are connected, the power role of the own device becomes SRC, and the power role of the counterpart device becomes SNK.

[0098] Next, Figure 8 The example of the sequence shown shows an example where the power role is set to SRC by dynamically switching the port power role to SRC only. Figure 8 , assuming that in the initial state, the own device is in Unattached.SRC (ST21) and the other device is in Unattached.SNK (ST11).

[0099] The own device transitions to AttachWait.SRC (ST22) according to the sequence (sequence SQ21). In addition, the own device transitions to Attached.SRC (ST23) (sequence SQ22). By transitioning to Attached.SRC (ST23), the own device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23. Since the own device cannot detect SNK regarding VBUS ON, it transitions to TryWait.SNK (ST15) (sequence SQ23), wherein the own device transitions to Attached.SNK (ST13) (sequence SQ24) by detecting VBUS ON by the other device.

[0100] On the other hand, the other device switches to AttachWait.SNK (ST12) according to the sequence (sequence SQ11). Here, by detecting VBUS ON by the own device, the other device switches to Try.SRC (ST14) (sequence SQ12) and further switches to Attached.SRC (ST23) (sequence SQ13). Then, the other device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23.

[0101] In Attached.SNK (ST13), the own device determines whether the switching condition SR is satisfied. As described above, the switching condition SR is whether the state transition path Attached.SRC (ST23), TryWait.SNK (ST15) and Attached.SNK (ST13) have occurred. Figure 8 In the case shown, it is determined that the switching condition SR is satisfied, and the own device switches the port power role from Try.SRC to SRC only. Then, the own device transitions to Unattached.SRC (ST31) (sequence SQ25). Here, since the other device cannot detect SNK about VBUS ON, it transitions to TryWait.SNK (ST15) (sequence SQ14).

[0102] According to this sequence, the own device switches to AttachWait.SRC (ST32) (sequence SQ26) and further switches to Attached.SRC (ST33) (sequence SQ27).

[0103] By switching to Attached.SRC (ST33), the own device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23. Then, the other device switches from TryWait.SNK (ST15) to Attached.SNK (ST13) by detecting VBUS ON by the own device (sequence SQ15).

[0104] According to the above sequence, after the own device and the counterpart device are connected, the power role of the own device becomes SRC, and the power role of the counterpart device becomes SNK.

[0105] Next, Fig. 9 The example of the sequence shown shows an example in which a sequence compliant with the USB Type-C standard is performed even when the device according to the first embodiment is connected to a device whose port power role is SRC only.

[0106] refer to Fig. 9 , it is assumed that in the initial state, the own device is in Unattached.SNK (ST11) and the other device is in Unattached.SRC (ST31) (state machine of SRC only).

[0107] The own device changes to AttachWait.SNK (ST12) according to the sequence (sequence SQ11). Then, by detecting VBUS ON by the other device, the own device changes to Try.SRC (ST14) (sequence SQ12), and the own device changes to TryWait.SNK (ST15) (sequence SQ16). Here, by detecting VBUS ON by the other device, the own device changes to Attached.SNK (ST13) (sequence SQ15).

[0108] In Attached.SNK (ST13), the own device determines whether the switching condition SR is satisfied. As described above, the switching condition SR is whether the state transition path Attached.SRC (ST23), TryWait.SNK (ST15) and Attached.SNK (ST13) have occurred. Fig. 9 In the case shown, it is determined that the switching condition SR is not satisfied, and Attached.SNK is maintained (ST13).

[0109] On the other hand, according to this sequence, the counterpart device switches to AttachWait.SRC (ST32) (sequence SQ26) and further switches to Attached.SRC (ST33) (sequence SQ27).

[0110] By transitioning to Attached.SRC (ST33), the counterpart device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23. At this time, the counterpart device returns to Unattached.SRC (ST31) because it cannot detect SNK regarding VBUS ON (Sequence SQ29).

[0111] Then, in the same manner as the previously executed sequence, the other device transitions to AttachWait.SRC (ST32) (sequence SQ26) and further transitions to Attached.SRC (ST33) (sequence SQ27). By transitioning to Attached.SRC (ST33), the other device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23. At this time, since the power role of the own device is determined to be SNK, the other device detects SNK of the connection destination, and finally, after the connection between the own device and the other device, the power role of the own device becomes SNK and the power role of the other device becomes SRC.

[0112] [c5: Overview]

[0113] According to the device according to the first embodiment, even if the port power roles of the own device and the other device as the device of the connection destination are both Try.SRC (a type of DRP), the power role of the own device can be reliably determined to be SRC. As a result, it is possible to ensure that various processes executed in association with the power role are reliably executed.

[0114] [D. Second embodiment]

[0115] In the above-mentioned first embodiment, the connection process of the device according to the first embodiment and the device conforming to the USB Type-C standard is described. In the second embodiment, an improvement in the case where the devices according to the first embodiment are connected to each other will be described.

[0116] Fig.11 is a diagram showing an example of a sequence when devices according to the first embodiment are connected to each other. Fig.11 A state after the devices according to the first embodiment are connected to each other and a predetermined sequence is executed is shown.

[0117] refer to Fig.11 For example, it is assumed that the other device is in Attached.SRC (ST23). On the other hand, it is assumed that the own device is switched to Attached.SNK (ST13) according to the sequence. Then, the own device determines whether the switching condition SR is satisfied in Attached.SNK (ST13).

[0118] exist Fig.11In the case shown, it is determined that the switching condition SR is satisfied, and the own device switches the port power role from Try.SRC to SRC only. Then, the own device switches to Unattached.SRC (ST31). Then, according to the sequence, the own device switches to AttachWait.SRC (ST32) and further switches to Attached.SRC (ST33).

[0119] By converting to Attached.SRC (ST33), the own device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23.

[0120] On the other hand, since the counterpart device cannot detect SNK regarding VBUS ON, it transitions to TryWait.SNK (ST15) and further transitions to Attached.SNK (ST13). Then, the counterpart device determines whether the switching condition SR is satisfied in Attached.SNK (ST13).

[0121] exist Fig.11 In the case shown, it is determined that the switching condition SR is satisfied, and the other device switches the port power role from Try.SRC to SRC only. Then, the other device switches to Unattached.SRC (ST31). Then, since the own device cannot detect SNK about VBUS ON, it detects that SNK is disconnected from the other device (sink removal), switches the port power role from SRC only to Try.SRC, and switches to Unattached.SRC (ST21).

[0122] As described above, when the devices according to the first embodiment are connected to each other, it is determined that the switching condition SR is satisfied in both devices, so that the switching of the port power role occurs in both devices, and the devices are not stabilized in a specific state. That is, when the devices according to the first embodiment are connected to each other, each device determines that the port power role of the other device is Try.SRC, and switches the port power role of its own device to SRC only. Then, all devices become SRC, and the corresponding device removed from the host can detect the disconnection of the connection with the other device, and return the port power role to Try.SRC to perform a reconnection sequence.

[0123] In the second embodiment, a device in which the above-mentioned problem does not occur will be described. Fig.12 : is a diagram showing an example of a state machine of a device according to the second embodiment. Fig.12 ,and Fig.10 Compared with the state machine of the device according to the first embodiment shown in FIG. 1 , the state machine of the device according to the second embodiment newly adds CC.Open (CC.Disconnect) (ST35).

[0124] CC.Open (ST35) indicates a state in which the first communication line (CC1) 21 and the second communication line (CC2) 22 are disconnected. That is, when the device transitions to CC.Open (ST35), the device electrically disconnects the resistance value Rp and the resistance value Rd that can be connected to the first communication line (CC1) 21 and the second communication line (CC2) 22. As a result, the counterpart device appears to have been disconnected from the target device.

[0125] In this way, when the port power role of the own device is switched to SRC only, the other device determines that the port power role of the own device is SRC only by passing CC.Open (ST35). That is, the process of switching the port power role from Try.SRC to SRC only includes: disconnecting the communication line (first communication line (CC1) 21 and second communication line (CC2) 22) electrically connected to the other device.

[0126] This makes it possible to prevent the mutual devices from respectively judging that the port power role of the counterpart device is Try.SRC. That is, it is possible to prevent the devices according to the first embodiment from repeatedly switching the port power roles.

[0127] Fig.13 is a diagram showing an example of a sequence when the device according to the second embodiment and the device according to the first embodiment are connected.

[0128] refer to Fig.12 and 13 For example, it is assumed that the counterpart device, which is the device according to the first embodiment, is in Attached.SRC (ST23). On the other hand, it is assumed that the own device, which is the device according to the second embodiment, is switched to Attached.SNK (ST13) according to the sequence. Then, the own device determines whether the switching condition SR is satisfied in Attached.SNK (ST13).

[0129] exist Fig.13 In the case shown, it is determined that the switching condition SR is satisfied, and the own device switches the port power role from Try.SRC to SRC only. Then, the own device transitions to CC.Open state (ST35) (sequence SQ25A). Thereafter, after the error recovery time tErrorRecovery has passed, the own device transitions to Unattached.SRC (ST31) (sequence SQ25B).

[0130] Then, according to this sequence, the own device transitions to AttachWait.SRC (ST32) and further transitions to Attached.SRC (ST33).

[0131] By converting to Attached.SRC (ST33), the own device applies a predetermined voltage (VBUS ON) to the power line (VBUS) 23.

[0132] On the other hand, since the other device cannot detect SNK about VBUS ON, it changes to TryWait.SNK (ST15) (sequence SQ23). In TryWait.SNK (ST15), since the other device cannot detect SRC (source not detected), it changes to Unattached.SNK (ST11) (sequence SQ17).

[0133] Then, the other device switches from Unattached.SNK (ST11) to AttachWait.SNK (ST12) according to the sequence (Sequence SQ11). Subsequently, by detecting VBUSON by the own device, the other device switches to Try.SRC (ST14) (Sequence SQ12) and further switches to TryWait.SNK (ST15) and Attached.SNK (ST13) in sequence (Sequences SQ16 and SQ15).

[0134] In Attached.SNK (ST13), the other device determines whether the switching condition SR is satisfied. As described above, the switching condition SR is whether the state transition path Attached.SRC (ST23), TryWait.SNK (ST15), and Attached.SNK (ST13) have occurred. Fig.13 In the case shown, it is determined that the switching condition SR is not satisfied, and Attached.SNK is maintained (ST13).

[0135] Finally, after the own device and the counterpart device are connected, the power role of the own device becomes SRC, and the power role of the counterpart device becomes SNK.

[0136] All points except for the above-described processing and configuration are the same as those in the above-described first embodiment, and therefore, a detailed description thereof will not be repeated.

[0137] According to the second embodiment, even when the devices according to the first embodiment are connected to each other, a situation in which the power source roles cannot be determined and are processed repeatedly can be avoided.

[0138] [E. Third embodiment]

[0139] In the above-described first and second embodiments, the following condition is used as the switching condition SR: whether the state transition path leading to Attached.SNK (ST13) matches a predetermined state transition path.

[0140] By the way, in the test (Type-C conformance test) on whether it complies with the USB Type-C standard specified in the revision 0.79 of the above-mentioned "Universal Serial Bus Type-C (USB Type-C) Functional Test Specification" dated May 28, 2018, it is determined whether the device to be tested (the port of its own device) is correctly converted to the state defined in the USB Type-C standard.

[0141] When it is determined that the switching condition SR is satisfied in Attached.SNK (ST13), the devices according to the first and second embodiments dynamically switch the port power role to SRC only, and therefore, these devices transition to another state instead of Attached.SNK (ST13). As a result, "test failure" can be determined.

[0142] In order for the devices according to the first and second embodiments to obtain a determination result of "test passed" in the Type-C conformance test, a condition of "waiting for a predetermined period of time" may be added to the switching condition SR.

[0143] Fig.14 3 is a diagram for explaining a switching condition SR adopted in the apparatus according to the third embodiment. Fig.14 As the switching condition SR, first, it is determined whether Attached.SNK (ST13) is reached in the predetermined state transition path (step S2). Here, the predetermined state transition path is a state transition in the following order: Attached.SRC (ST23), TryWait.SNK (ST15) and Attached.SNK (ST13).

[0144] If Attached.SNK (ST13) is not reached in the predetermined state transition path (NO in step S2), it is determined that the switching condition SR is not satisfied.

[0145] On the other hand, if Attachd.SNK (ST13) is reached in the predetermined state transition path (YES in step S2), it is determined that the switching condition SR is satisfied after waiting for a predetermined period of time (step S4).

[0146] As described above, the process of determining whether the port power role of the counterpart device is Try.SRC includes a process of waiting for a predetermined time after the port power role of the counterpart device is determined to be Try.SRC.

[0147] According to the apparatus according to the third embodiment, by adopting Fig.14The switching condition SR shown can obtain a determination result of "test passed" in the Type-C conformance test even in a device that implements the functions shown in the first embodiment and the second embodiment.

[0148] Note that the switching condition SR according to the third embodiment can be applied regardless of whether the target device supports USB power delivery (hereinafter also referred to as "PD") specified in version 1.2 of revision 3.0 of the "Universal Serial Bus Power Delivery Specification" on June 21, 2018, etc.

[0149] All points except for the above-described processing and configuration are the same as those in the above-described first embodiment, and therefore, a detailed description thereof will not be repeated.

[0150] [F. Fourth embodiment]

[0151] In USB power delivery (PD) described in version: 1.2, etc. of "Universal Serial Bus Power Delivery Specification" revision 3.0 dated June 21, 2018, a power role swap command for switching power roles between devices is provided. When both connected devices support PD, a power role determination process or a switching process using a power role swap command is performed as a normal operation.

[0152] That is, in a device supporting PD, priority is preferably given to the power role determination processing using the power role switching instruction executed at the PD level rather than the power role determination processing executed at the USB Type-C standard level according to the above-mentioned first and second embodiments.

[0153] In order not to hinder the exchange of power role switching instructions between devices supporting such PD, the condition of "the other device does not support PD" may be added to the switching condition SR determined in Attached.SNK (ST13).

[0154] Fig.15 4 is a diagram for explaining a switching condition SR adopted in the apparatus according to the fourth embodiment. Fig.15 As the switching condition SR, first, it is determined whether Attached.SNK (ST13) is reached in the predetermined state transition path (step S2). Here, the predetermined state transition path is a state transition in the following order: Attached.SRC (ST23), TryWait.SNK (ST15) and Attached.SNK (ST13).

[0155] If Attached.SNK (ST13) is not reached in the predetermined state transition path (NO in step S2), it is determined that the switching condition SR is not satisfied.

[0156] On the other hand, if Attached.SNK (ST13) is reached in the predetermined state transition path (Yes in step S2), it is determined whether the own device supports PD (step S6). If the own device does not support PD (No in S6), it is determined that the switching condition SR is satisfied. That is, since the own device cannot exchange the power role switching command, even if the port power role is dynamically switched as shown in the first embodiment and the second embodiment, it can be determined that no problem occurs.

[0157] If the own device supports PD (yes in step S6), the own device sends a PD message to the other device (step S8). The transmitted PD message can be a query message of the policy engine status defined in the PD standard. In operation S10, the own device determines whether a response to the transmitted PD message has been received from the other device.

[0158] If no response to the PD message is received (No in step S10), it is determined that the switching condition SR is satisfied. That is, since it can be determined that the counterpart device does not support PD, it can be determined that no problem occurs even if the port power roles are dynamically switched as shown in the first and second embodiments.

[0159] On the other hand, if a response to the PD message is received (Yes in step S10), it is determined that the switching condition SR is not satisfied. That is, since it can be determined that the counterpart device also supports PD, the dynamic switching of the port power roles as shown in the first and second embodiments is not performed.

[0160] Therefore, the process of determining whether the port power role of the counterpart device is Try.SRC includes: determining whether the counterpart device supports USB power delivery. Then, the controller 110 of the device according to the fourth embodiment switches the port power role of the own device to SRC only when the counterpart device does not support USB power delivery.

[0161] According to the apparatus according to the fourth embodiment, by adopting Fig.15 The switching condition SR shown can obtain a determination result of "test passed" in the Type-C conformance test even if the device having the functions shown in the first embodiment and the second embodiment supports PD.

[0162] All points except for the above-described processing and configuration are the same as those in the above-described first embodiment, and therefore, a detailed description thereof will not be repeated.

[0163] [G. Modification of the Fourth Embodiment]

[0164] In the fourth embodiment described above, the power role switching instruction defined in the PD is used to dynamically switch the port power role. However, depending on the power role switching policy of the counterpart device, the power role switching instruction may not be used.

[0165] That is, if the other device responds to the power role exchange request with "Accept" indicating dynamic switching of the power role, the power role can be switched, so there is no problem in the operation. On the other hand, when the other device responds to the power role exchange request with "Reject", the own device cannot switch the power role through the power role exchange command.

[0166] In PD, a device that receives a power role swap request (PR_Swap message) responds with "Accept" or "Reject" according to the PD's policy. For example, if the current power role is not the desired role, the device responds with "Accept" when receiving a PR_Swap (PR_Swap) message. On the other hand, when the current power role is the desired role, the device responds with "Reject" when receiving a PR_Swap message.

[0167] In order to uniquely determine the scheduled power role without relying on the power role exchange policy of the other device, it is possible to determine whether the switching condition SR is satisfied based on the response from the other device. More specifically, when "reject" is returned to the power role exchange request from the other device, it is determined that the switching condition SR is satisfied, and the port power role can be switched to SRC only at the USB Type-C standard level according to the first and second embodiments.

[0168] Fig.16 is a diagram for explaining a switching condition SR adopted in a modified apparatus of the fourth embodiment. Fig.16 The switching condition SR shown is Fig.15 The switching condition SR shown in the figure is obtained by adding processing. Therefore, the switching condition SR shown in the figure will not be repeated. Fig.15 The switching condition SR is shown in detail for the same steps.

[0169] refer to Fig.16 If a response to the PD message is received (Yes in step S10), the own device transmits a power role switch request instructing the other device to switch the power role to SNK (step S12).

[0170] In operation S14, the own device determines whether the counterpart device has responded to the transmitted power role exchange request with "reject." If the counterpart device responds with "accept" (No in step S14), it is determined that the switching condition SR is not satisfied.

[0171] On the other hand, if the counterpart device responds with "reject" (Yes in S14), it is determined that the switching condition SR is satisfied. That is, the port power role switching process is performed at the USB Type-C standard level rather than the power role exchange command level.

[0172] As described above, the process of determining whether the port power role of the other device is Try.SRC includes: a process of transmitting a power role exchange request to the other device and a process of determining whether a "rejection" is received from the other device. Then, when "rejection" is received from the other device, the controller 110 of the device according to the modification of the fourth embodiment performs a process of switching the port power role of the own device to SRC only.

[0173] As described above, if both connected devices support PD, the power role can be switched using the power role swap command. However, depending on the policy of the other device, the other device may respond to the power role swap request with "reject", in which case the desired power role cannot be set. In a modification of the fourth embodiment, even in this case, the desired power role can be forcibly set by switching the port power role at the USB Type-C standard level.

[0174] All points except for the above-mentioned processing and configuration are the same as those in the above-mentioned first and fourth embodiments, and therefore, detailed descriptions thereof will not be repeated.

[0175] [H. Fifth Embodiment]

[0176] Next, as a fifth embodiment, a sequence in which the power role of a device whose port power role is Try.SNK can be uniquely determined as SNK will be exemplified.

[0177] More specifically, when Try.SNK is set as the initial state port power role, the device according to the fifth embodiment dynamically switches the port power role to SNK only, and after connection, the power role must be fixed to SNK (when the predetermined switching condition SN is satisfied). By dynamically switching the port power role, even if devices whose port power role is Try.SNK are connected to each other, the predetermined device can be fixed to SNK.

[0178] [h1: Example of determining power roles]

[0179] Fig.17is a diagram showing an example of determining a power source role in a device according to a fifth embodiment. Fig.17 , assuming that the port power role of the own device is Try.SNK. If the port power role of the other device is Try.SNK, the port power role of the own device is switched from Try.SNK to SNK only. Therefore, the power role of the own device is uniquely determined by SNK.

[0180] As described above, as the switching condition SN for switching the port power role from Try.SNK to SNK only, the fifth embodiment uses the state transition path when the own device is connected to the other device. More specifically, when the own device is connected to the other device and the power role of the own device is SRC, if it is determined that the port power role of the other device is Try.SNK, the port power role of the own device is switched to SNK only and reconnected. When disconnection with the other device is detected, the port power role of the other device returns to Try.SNK again.

[0181] As described above, when the power role of the own device is determined to be the SRC indicating the power supply side according to the sequence with the other device (which is the device of the connection destination), the device according to the fifth embodiment of the present invention performs a process of determining whether the port power role of the other device is Try.SNK. Then, if the port power role of the other device is Try.SNK, the device according to the fifth embodiment performs a process of switching the port power role of the own device to SNK only and continuing the sequence with the other device.

[0182] By dynamically switching the port power role, even if the port power role of the other device is Try.SNK, the power role of the own device can be fixed to SNK after the connection.

[0183] [h2: State Machine]

[0184] Fig.18 An example of a state machine of a device according to the fifth embodiment is shown. Fig.18 , a device according to the fifth embodiment will have a Try.SNK and a SNK-only state machine.

[0185] In the initial state, since the port power role is Try.SRC, the operation in the Try.SRC state machine starts. When the transition of the state machine meets the switching condition SN, the operation in the Try.SRC state machine will be converted to the operation in the SNK state machine only.

[0186] In the SNK-only operation, when disconnection with the other device is detected (VBUS removal), the state machine returns to the state machine of Try.SNK instead of switching to Unattached.SNK (ST51). That is, the state returns the port power role to Try.SNK, and the device returns to the initial state.

[0187] [h3: Switching condition SN]

[0188] Next, the switching condition SN for switching the port power role from Try.SNK to SNK-only will be described. As the switching condition SN, the state transition path leading to Attached.SRC (ST48) is used.

[0189] Attached.SRC (ST48) corresponds to a state in which the power role of the device becomes SRC, but here, if the other party device is SNK only, the operation follows Fig.17 However, if the other device is not SNK-only but Try.SNK, the operation does not follow Fig.17 , and the power role of the device needs to be switched to SNK.

[0190] That is, when the own device is converted to Attached.SRC (ST48), the port power role of the other device is SNK only or Try.SNK. Therefore, after the own device is converted to Attached.SRC (ST48), it is determined whether the port power role of the other device is SNK only or Try.SNK.

[0191] exist Fig.17 In the state machine shown, regardless of whether the port power role of the other device is SNK only or Try.SNK, the state transition path from the own device to Attached.SRC (ST48) is the same. More specifically, the state transition path to Attached.SRC (ST48) is AttachWait.SRC (ST47), Try.SNK (ST44), TryWaitSRC (ST45), and Attached.SRC (ST48).

[0192] Therefore, in the state machine of Try.SNK compliant with the USB Type-C standard, it is impossible to determine whether the counterpart device is SNK-only or Try.SNK. Therefore, the device according to the fifth embodiment adopts the state machine of Try.SNK, in which the state machine of Try.SNK compliant with the USB Type-C standard is slightly changed.

[0193] Fig.19 1 is a diagram showing a main part of a state machine of a device according to a fifth embodiment. Fig.19 The Try.SNK state machine adopted in the fifth embodiment has two states (Try.SNK.1 (ST44A) and Try.SNK.2 (ST44B)), instead of Try.SNK (ST44) in the Try.SNK state machine compliant with the USB Type-C standard.

[0194] Try.SNK.1 (ST44A) is a state of waiting for the power role of the other device to change to SRC (wait for source detection). On the other hand, Try.SNK.2 (ST44B) is a state of waiting for VBUS ON of the other device (wait for VBUS to be detected).

[0195] As described above, by decomposing Try.SNK (ST44) in the state machine of Try.SNK compliant with the USB Type-C standard into two states, the state transition path will be different depending on whether the port power role of the counterpart device is SNK only or Try.SNK. As the switching condition SN, the port power role of the counterpart device is determined based on the difference between the state transition paths.

[0196] refer to Fig.19 More specifically, when the port power role of the other device is SNK only, a transition is made from AttachWait.SRC (ST47) to Try.SNK.1 (ST44A) (sequence SQ41), followed by a direct transition to TryWait.SRC (ST45) (sequence SQ42), and finally to Attached.SRC (ST48) (sequence SQ43).

[0197] On the other hand, when the port power role of the other device is Try.SNK, a transition is made from AttachWait.SRC (ST47) to Try.SNK.1 (ST44A) (sequence SQ41), and then the source can be detected so that a transition is made to Try.SNK.2 (ST44B) (sequence SQ44). Then, a direct transition is made to TryWait.SRC (ST45) (sequence SQ45), and finally Attached.SRC (ST48) is reached (sequence SQ46).

[0198] As described above, when the port power role of the other device is SNK only, the following state transition path is taken: AttachWait.SRC (ST47), Try.SNK.1 (ST44A), TryWait.SRC (ST45), and Attached.SRC (ST48). On the other hand, when the port power role of the other device is Try.SNK, the following state transition path is taken: AttachWait.SRC (ST47), Try.SNK.1 (ST44A), Try.SNK.2 (ST44B), TryWait.SRC (ST45), and Attached.SRC (ST48).

[0199] The switching condition SN indicating whether to switch the port power role of the own device to SNK only may be determined based on the difference between the state transition paths leading to Attached.SRC (ST48).

[0200] Fig. 20 SN is a diagram for explaining a switching condition SN adopted in the apparatus according to the fifth embodiment. Fig. 20 As the switching condition SN, first, it is determined whether Attached.SRC (ST48) is reached in a predetermined state transition path. The predetermined state transition path is Try.SNK.1 (ST44A), Try.SNK.2 (ST44B), TryWait.SRC (ST45), and Attached.SRC (ST48).

[0201] If Attached.SRC is reached in the predetermined state transition path (ST48), it is determined that the switching condition (SN) is satisfied. When it is determined that the switching condition SN is satisfied, the port power role of the own device is switched to SNK only.

[0202] (h4:Overview)

[0203] According to the device according to the fifth embodiment, even if the port power roles of the own device and the host counterpart device as the device of the connection destination are Try.SRC (a type of DRP), the power role of the own device can be reliably determined by SRC. As a result, it is possible to ensure that various processes executed in association with the power role are reliably executed.

[0204] All points except for the above-described processing and configuration are the same as those in the above-described first embodiment, and therefore, a detailed description thereof will not be repeated.

[0205] [F. Sixth embodiment]

[0206] The configuration described in the second embodiment above can also be applied to the fifth embodiment. That is, when the devices according to the fifth embodiment are connected to each other, the final power role may not be determined, and in this case, when the port power role is switched to SNK only, CC.Open can be passed. Therefore, the other device determines that the port power role of the own device is SNK only. This makes it possible to avoid the mutual devices respectively judging that the port power role of the other device is Try.SNK. That is, it is possible to prevent the devices according to the fifth embodiment from repeatedly switching the port power role.

[0207] Except for the above-mentioned processing and configuration, both are the same as those in the above-mentioned first embodiment and fifth embodiment, and therefore, the detailed description thereof will not be repeated.

[0208] [J. Seventh Embodiment]

[0209] The configuration described in the third embodiment as described above can also be applied to the fifth embodiment. That is, the condition of "waiting for a predetermined time" can be added to the switching condition SN so as to reliably obtain the determination result of "test passed" in the test (Type-C compatibility test) as to whether SN complies with the USB Type-C standard defined in the revision 0.79 of the "Universal Serial Bus Type-C (USB Type-C) Functional Test Specification" of May 28, 2018 mentioned above.

[0210] More specifically, if Fig. 20 As shown, if Attached.SRC (ST48) is reached through a predetermined state transition path, it can be determined that the switch condition (SN) is satisfied after waiting for a predetermined period of time.

[0211] Except for the above-mentioned processing and configuration, both are the same as those in the above-mentioned first embodiment and fifth embodiment, and therefore, the detailed description thereof will not be repeated.

[0212] [K. Eighth Embodiment]

[0213] The configuration described in the fourth embodiment can also be applied to the fifth embodiment. That is, in order to give priority to the determination process of the power role switching instruction prepared in the USB power delivery (PD) defined in the version 1.2 of the revision 3.0 of the above-mentioned "Universal Serial Bus Power Delivery Specification" on June 21, 2018, etc., the condition "the other device does not support PD" can be added to the switching condition SN determined in Attached.SRC (ST48). Since the specific processing process of the switching condition SN is different from Fig.15The switching condition SR shown is the same, and therefore, a detailed description thereof will not be repeated.

[0214] By adopting the switching condition SR according to the eighth embodiment, even if the device having the functions shown in the fifth and sixth embodiments supports PD, a determination result of "test passed" can be obtained in the Type-C conformance test.

[0215] Except for the above-mentioned processing and configuration, both are the same as those in the above-mentioned first embodiment and fifth embodiment, and therefore, the detailed description thereof will not be repeated.

[0216] In the device according to the eighth embodiment, the device can determine whether the switching condition SN is satisfied based on the response from the other device, so that the device can uniquely determine the scheduled power role regardless of the power role exchange strategy of the other device. Fig.16 The switching condition SN shown is the same, and therefore, a detailed description thereof will not be repeated.

[0217] By adopting the switching condition SR of the modified SR according to the eighth embodiment, when the device having the functions shown in the fifth and sixth embodiments supports PD, the scheduled power role can be uniquely determined regardless of the power role exchange policy of the counterpart device.

[0218] Except for the above-mentioned processing and configuration, both are the same as those in the above-mentioned first embodiment and fifth embodiment, and therefore, the detailed description thereof will not be repeated.

[0219] [M. Ninth Embodiment]

[0220] The first to fourth embodiments described above and the modifications may be appropriately combined with each other, or any modifications may be made. Similarly, the fifth to eighth embodiments described above and the modifications may be appropriately combined with each other, or any modifications may be made.

[0221] [N. Tenth embodiment]

[0222] In the above-described first to eighth embodiments and modifications, the processor 112 executes the firmware 114 , thereby achieving the execution of the processing related to the controller 110 and the provision of the functions as described above.

[0223] The firmware 114 executed by the processor 112 is a control program and can be installed or updated from the outside. The firmware 114 can, for example, be released as stored in a non-state (non-transient) recording medium and installed or updated to a storage area within the controller 110. As a non-temporary recording medium, an optical recording medium (such as an optical disc), a semiconductor recording medium (such as a flash memory), a magnetic recording medium (such as a hard disk or a storage tape), or a magneto-optical recording medium (such as an MO (magneto-optical disc)) can be used. That is, the present embodiment may also include a computer-readable control program for implementing the processing and functions as described above, and a recording medium for storing the control program.

[0224] Alternatively, the firmware 114 may be downloaded from a server device via the Internet or an intranet.

[0225] A person skilled in the art will design a controller according to the present embodiment and a device including the controller by appropriately using a technology according to the age in which the present embodiment is implemented.

[0226] [O. Eleventh Embodiment]

[0227] In the above-mentioned first to eighth embodiments and modifications, the processor 112 executes the firmware 114, thereby realizing the execution of the processing related to the controller 110 and the provision of the functions as described above. However, some or all of the software may be implemented in hardware instead of such software implementation. For hardware installation, hard-wired devices such as ASIC (Application Specific Integrated Circuit) and FPGA (Field Programmable Gate Array) may be adopted.

[0228] A person skilled in the art will design a controller according to the present embodiment and a device including the controller by appropriately using a technology according to the age in which the present embodiment is implemented.

[0229] According to the present embodiment, when a device that is a Try.SRC compliant with the USB Type-C standard or a device that is a Try.SNK compliant with the USB Type-C standard is connected to each other, a new problem that a power role cannot be determined for SRC or SNK can be solved.

[0230] Although the invention made by the present inventors has been specifically described based on the embodiments, the present invention is not limited to the above-mentioned embodiments, and it goes without saying that various modifications can be made without departing from the gist thereof.

Claims

1. A controller for controlling a own device supporting DRP (dual role power), wherein after connecting to a counterpart device, the power role of the own device can be switched between a power supply side SRC and a power receiving side SNK according to the USB (Universal Serial Bus) Type-C standard, wherein the controller is configured to: When a connection between the own device and the other device is detected, determining that the power source role of the own device is the power receiving side SNK; When the power role of the own device is determined to be the receiving side SNK, a first process is performed to determine whether the port power role of the counterpart device is Try.SRC, and When the port power role of the counterpart device is determined to be Try.SRC, a second process is performed to set the port power role of the own device to SRC only to perform a sequence between the own device and the counterpart device.

2. The controller according to claim 1, wherein the second process comprises: The third process is to disconnect the communication line between the own device and the counterpart device for electrically connecting the own device to the counterpart device.

3. The controller according to claim 1, wherein the first process comprises: The fourth process is to determine whether the port power role of the counterpart device is Try.SRC based on the state transition path until the power role of the own device is determined to be SNK. 4 . The controller according to claim 3 , wherein until the power role of the own device is determined to be SNK, the state transition path taken by the own device includes Attached.SRC, TryWait.SNK, and Attached.SNK in the following order. 5 . The controller according to claim 1 , wherein the first process includes waiting for a predetermined period of time after the port power role of the counterpart device is determined to be Try.SRC.

6. The controller according to claim 1, wherein the first process includes a fifth process of determining whether the counterpart device supports USB power delivery, and When the counterpart device is determined not to support USB power delivery, the controller executes the fifth process.

7. The controller according to claim 6, wherein the first process comprises: 1) a sixth process of transmitting a power role exchange request to the counterpart device, and 2) a seventh process of determining whether a rejection is received from the counterpart device, and wherein the controller executes the second process upon receiving the rejection from the counterpart device.

8. A non-transitory computer-readable medium storing a control program, which, when executed by a processor of a controller for controlling a own device supporting DRP (Dual Role Power), causes the processor to perform operations including the following, wherein after connecting to a counterpart device, the power role of the own device can be switched between a power supply side SRC and a power receiving side SNK according to the USB (Universal Serial Bus) Type-C standard: When a connection between the own device and the other device is detected, determining that the power source role of the own device is the power receiving side SNK; When the power role of the own device is determined to be the receiving-side SNK, determining whether the port power role of the counterpart device is Try.SRC based on a state transition path taken by the own device until the power role of the own device is determined to be SNK, including Attached.SRC, TryWait.SNK, and Attached.SNK in the following order, and When the port power role of the counterpart device is determined to be Try.SRC, the port power role of the own device is set to SRC only to perform a sequence between the own device and the counterpart device.