Fast Role Swap detection method

By judging the recovery of the Type-C CC line voltage value and the target voltage value of the receiving power device in the USB Type-C interface, the power supply problem after the device role is changed is solved, and the detection accuracy and device operation stability are improved.

CN118796748APending Publication Date: 2024-10-18GUANGDONG HONGQIN COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410864960.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing technology is difficult to accurately identify whether Fast Role Swap has been successfully completed between devices in the USB Type-C interface. As a result, the device may not be able to supply power normally after role switching, affecting the operation of the device.

Method used

By determining whether the voltage value on the Type-C CC line in the receiving power equipment has returned to the preset normal value, and obtaining the target voltage value to determine whether the judgment conditions are met, it is determined whether the equipment has completed Fast Role Swap.

Benefits of technology

It improves the accuracy of Fast Role Swap detection, prevents misjudgments, ensures that the equipment can operate normally after role switching, and handles the excess supply voltage of the receiving power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796748A_ABST
    Figure CN118796748A_ABST
Patent Text Reader

Abstract

The invention discloses a Fast Role Swap detection method, and the method comprises the steps: judging whether a Fast Role Swap signal is generated in receiving power equipment or not after the receiving power equipment loses the power supply of a power supply; if the Fast Role Swap signal is generated in the receiving power equipment, judging whether the voltage value on the CC line of the Type-C is a preset normal value or not at the current moment; if the receiving power equipment is not the normal value, determining that the receiving power equipment does not execute Fast Role Swap; if the value is the normal value, acquiring a target voltage value of the Type-C, and judging whether the target voltage value meets a preset judgment condition or not; if the judgment condition is met, determining that the receiving power equipment completes Fast Role Swap; and if the judgment condition is not met, determining that the receiving power equipment does not execute Fast Role Swap. According to the method and the device, the detection result is more accurate, misjudgment is prevented, the detection precision is greatly improved, and normal operation of equipment is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Fast Role Swap detection, and in particular to a Fast Role Swap detection method. Background Art

[0002] Fast Role Swap technology is a technology that can achieve fast role swapping in the USB Type-C interface. This technology enables the power-providing device and the power-receiving device to seamlessly switch roles without manual user intervention or reconnecting cables, thereby ensuring the normal operation of the devices. A scenario is as follows: Device A and Device B are connected via the USB Type-C interface, the power supply is powered by Device A, and Device A is powered by Device B. When the power supply of Device A is suddenly disconnected, Device A will change from providing power to Device B to receiving power, and Device B will change from receiving power to providing power, that is, Device B will provide power to Device A at this time.

[0003] If device A itself fails, or the connection between device A and device B is disconnected, device B will be triggered to start Fast Role Swap. However, due to the failure of A or the disconnection between the two, device B cannot normally supply power to device A. At this time, there will be an extra supply voltage in device B, which will have an adverse effect on device B. Therefore, a method is needed to accurately identify whether the Fast Role Swap between device A and device B has been successfully completed to protect device B. Summary of the invention

[0004] In view of this, the present application provides a Fast Role Swap detection method for accurately providing a method for determining whether a Fast Role Swap is successfully completed between a power device and a receiving power device.

[0005] To achieve the above objectives, the proposed solution is as follows:

[0006] In a first aspect, a Fast Role Swap detection method includes:

[0007] When the power receiving device loses power supply from a power source, determining whether a Fast Role Swap signal is generated in the power receiving device;

[0008] If a Fast Role Swap signal is generated in the receiving power device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment;

[0009] If it is not the normal value, it is determined that the receiving power device does not perform Fast Role Swap;

[0010] If it is the normal value, obtaining the target voltage value of the Type-C, and determining whether the target voltage value meets a preset judgment condition;

[0011] If the determination condition is met, it is determined that the receiving power device completes the Fast Role Swap; if the determination condition is not met, it is determined that the receiving power device does not perform the Fast Role Swap.

[0012] Preferably, the determining whether a Fast Role Swap signal is generated in the receiving power device includes:

[0013] The Type-C port Controller chip or the Type-C interface chip provided in the receiving power device is used to identify the voltage value change on the CC line of the Type-C to determine whether a Fast RoleSwap signal is generated in the receiving power device.

[0014] Preferably, the using of the Type-C port Controller chip provided in the receiving power device to identify the voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the receiving power device includes:

[0015] If the Type-C port Controller chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

[0016] Preferably, the using of the Type-C interface chip provided in the receiving power device to identify the voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the receiving power device includes:

[0017] If the Type-C interface chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

[0018] Preferably, the determining whether a Fast Role Swap signal is generated in the receiving power device includes:

[0019] Using the Type-C interface chip provided in the receiving power device to identify a voltage value change on the VBUS power bus of the Type-C;

[0020] If it is identified that the voltage value on the VBUS power bus of the Type-C is reduced to a preset second threshold, it is determined that a Fast Role Swap signal is generated in the receiving power device.

[0021] Preferably, the target voltage value is a voltage value on the CC line of the Type-C after a first preset time period starting from the current moment;

[0022] The determination condition is: after a first preset time period starting from the current moment, the voltage value on the CC line of the Type-C is the normal value.

[0023] Preferably, the target voltage value includes: a voltage value on the CC line of the Type-C after a first preset time period starting from the current moment, and a voltage value on the VBUS power bus of the Type-C at any moment within a second preset time period starting from the first moment; wherein the first moment is the moment when the first preset time period starting from the current moment ends;

[0024] The discrimination conditions are:

[0025] The voltage value on the CC line of the Type-C after a first preset time period starting from the current moment is the normal value, and the voltage value on the VBUS power bus of the Type-C at any moment within a second preset time period starting from the first moment is a preset second threshold value.

[0026] In a second aspect, a Fast Role Swap detection device includes:

[0027] A signal determination module, used to determine whether a Fast Role Swap signal is generated in the receiving power device when the receiving power device loses power supply from a power source;

[0028] A CC voltage value judgment module, used to judge whether the voltage value on the CC line of Type-C is a preset normal value at the current moment if a Fast Role Swap signal is generated in the receiving power device;

[0029] A first result determination module, configured to determine that the receiving power device does not perform Fast Role Swap if the value is not the normal value;

[0030] a target voltage value judgment module, configured to obtain the target voltage value of the Type-C if it is the normal value, and judge whether the target voltage value meets a preset judgment condition;

[0031] The second result determination module is used to determine that the receiving power device completes Fast Role Swap if the determination condition is met; and to determine that the receiving power device does not perform Fast Role Swap if the determination condition is not met.

[0032] In a third aspect, a Fast Role Swap detection device includes a memory and a processor;

[0033] The memory is used to store programs;

[0034] The processor is used to execute the program to implement each step of the Fast Role Swap detection method as described in any one of the first aspects.

[0035] In a fourth aspect, a storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the Fast Role Swap detection method as described in any one of the first aspects are implemented.

[0036] It can be seen from the above technical scheme that when the receiving power device loses the power supply of the power source, the present application determines whether a Fast Role Swap signal is generated in the receiving power device; if a FastRole Swap signal is generated in the receiving power device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment; if it is not the normal value, it is determined that the receiving power device has not executed Fast Role Swap; if it is the normal value, the target voltage value of Type-C is obtained to determine whether the target voltage value meets the preset discrimination condition; if the discrimination condition is met, it is determined that the receiving power device completes Fast Role Swap; if the discrimination condition is not met, it is determined that the receiving power device has not executed Fast Role Swap. In this scheme, after the receiving power device loses the power supply of the power source (i.e., the power supply of the device providing power is lost), a Fast Role Swap signal will be generated under normal circumstances. Therefore, it is determined whether a Fast Role Swap signal is generated in the receiving power device, and the generation of the Fast Role Swap signal is used as a trigger point to detect and determine whether the Fast Role Swap is executed or whether the entire process is completed. Since the entire Fast Role Swap process is very fast, if the voltage value on the CC line of Type-C has not returned to the normal value at the current moment, it can be considered that the receiving power device has not performed Fast Role Swap; if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, or it has just returned to the normal value at the current moment, but in fact the voltage value on the CC line of Type-C is just turbulent and has not really recovered (not stable), so if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, it cannot be determined whether the Fast Role Swap has been truly completed. Therefore, after determining that the Fast Role Swap signal has been generated, further judgment is required in the follow-up to accurately obtain the detection result. That is, it is necessary to obtain the target voltage value of Type-C, use the target voltage value of Type-C as the final judgment standard, and set the judgment conditions to determine whether the receiving power equipment has completed the Fast Role Swap or has not executed the Fast Role Swap from beginning to end based on whether the target voltage value meets the judgment conditions. Therefore, the present application can accurately identify whether the Fast Role Swap is truly completed, and prevent the misjudgment of determining that the Fast Role Swap has been completed when it has not been executed, thereby greatly increasing the accuracy of the detection.If it is detected that the Fast Role Swap is indeed not executed, an early warning can be issued or power can be supplied to the power supply equipment. At the same time, the excess power supply voltage of the power receiving equipment can be processed to maintain the normal operation of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0038] Figure 1 A schematic diagram of an architecture provided for an embodiment of the present application;

[0039] Figure 2 Another schematic diagram of an architecture provided for an embodiment of the present application;

[0040] Figure 3 An optional flow chart of a Fast Role Swap detection method provided in an embodiment of the present application;

[0041] Figure 4 A structural schematic diagram showing the power supply relationship between devices provided in an embodiment of the present application;

[0042] Figure 5 to Figure 7 A schematic diagram of voltage change provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of the structure of a Fast Role Swap detection device provided in an embodiment of the present application;

[0044] Fig. 9 A schematic diagram of the structure of a Fast Role Swap detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] The available architectures of the Fast Role Swap detection method provided in this application include but are not limited to the following two: Figure 1 and Figure 2As shown, device A can be a device such as a hub that provides power (before fast role exchange), and device B can be a device such as a computer, a mobile phone, etc. that receives power (before fast role exchange). Device A and device B are connected through a Type-C interface, and the Type-C port Controller chip, the Type-C interface chip, and the Type-C multiplexer chip are all chips in device B. Generally, the Type-C port Controller chip and the Type-C multiplexer chip are both types of Type-C interface chips, while in this application, the Type-C port Controller chip and the Type-C interface chip are set separately, and the Type-C multiplexer chip and the Type-C interface chip are set separately, that is, the Type-C interface chip in this application is other Type-C interface chips except the Type-C port Controller chip and the Type-C multiplexer chip.

[0047] Generally speaking, the Type-C interface chip is responsible for processing functions related to the USB Type-C interface, including data transmission, power management, device identification, etc. This application mainly applies the function of the Type-C interface chip to identify the voltage values ​​on the CC line and the VBUS power bus; for the Type-C port Controller chip, this application mainly applies its function of identifying the voltage value on the CC line; for the Type-C multiplexer chip, this application mainly applies its function of high-speed data transmission.

[0048] First, please refer to Figure 1 ,exist Figure 1 In the architecture shown, device B includes a Type-C port Controller chip, a Type-C interface chip, and a Type-C multiplexer chip. The Type-C port Controller chip is responsible for identifying voltage changes on the CC line, the Type-C multiplexer chip is responsible for high-speed data transmission, the Type-C interface chip is responsible for identifying voltage changes on the VBUS power bus, and the Type-C port manager controller is responsible for managing and storing the identified voltage changes and data.

[0049] Please refer to Figure 2 ,exist Figure 2 In the architecture shown, device B also includes a Type-C port controller chip, a Type-C interface chip, and a Type-C multiplexer chip. Figure 1 The architecture shown is different in that Figure 2In device B of the architecture shown, the Type-C interface chip can identify voltage value changes on the CC line and voltage value changes on the VBUS power bus. It also uses the Type-C port Controller chip to identify voltage value changes on the CC line. The Type-C port manager controller is responsible for managing and storing the identified voltage value changes and data.

[0050] The embodiment of the present invention provides a Fast Role Swap detection method, which can be applied in the above two architectures, or in various computer terminals or smart terminals. The execution subject can be a device receiving power, a processor or a server of a computer terminal or a smart terminal. The method flow chart of the method is as follows: Figure 3 As shown, specifically including:

[0051] S1: When the power receiving device loses power supply from a power source, it is determined whether a Fast Role Swap (FRS) signal is generated in the power receiving device.

[0052] Under normal circumstances, the power supply is provided by the power supply equipment to the receiving power equipment. The specific power supply situation is as follows: Figure 4 As shown, when the receiving power device loses the power supply of the power source, such as the power supply is disconnected, the power supply device also loses the power supply and cannot provide power to the receiving power device. Then the receiving power device starts to perform FastRole Swap. At this time, it is necessary to determine whether a Fast Role Swap signal is generated in the receiving power device. Specifically, it can be detected whether the Type-C interface generates a Fast Role Swap signal.

[0053] S2: If a Fast Role Swap signal is generated in the power receiving device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment.

[0054] If a Fast Role Swap signal is generated in the receiving power device, since it is first determined whether a Fast Role Swap signal is generated and then whether the voltage value on the CC line of Type-C is a preset normal value, it can be considered that the current time is slightly later than the time when the Fast Role Swap signal is detected.

[0055] It can be considered that when a Fast Role Swap signal is generated in the receiving power device, the voltage value on the CC line of Type-C will change, generally decreasing. Therefore, judging whether the voltage value on the CC line of Type-C is the preset normal value at the current moment is to judge whether the voltage value on the CC line of Type-C has returned to the normal value at the current moment. This normal value refers to the relatively stable voltage value on the CC line of Type-C during the normal operation of the device.

[0056] S3: If it is not the normal value, it is determined that the receiving power device does not perform Fast Role Swap.

[0057] Since the entire Fast Role Swap process is very fast, if the voltage value on the CC line of Type-C has not returned to the normal value at the current moment, it can be considered that the receiving power device has not executed FastRole Swap.

[0058] S4: If it is the normal value, obtain the target voltage value of the Type-C, and determine whether the target voltage value meets a preset judgment condition.

[0059] If the voltage value on the CC line of Type-C has returned to normal at the current moment, but it is not certain whether it is just an accidental recovery or a real recovery, for example, the voltage value on the CC line is not stable and it just happens to be recovered at the current moment, then in order to increase the detection accuracy and prevent misjudgment, it is necessary to increase the judgment standard, obtain the target voltage value of Type-C, judge whether the target voltage value meets the preset judgment conditions, and make the final confirmation based on the judgment result.

[0060] S5: If the determination condition is met, it is determined that the receiving power device completes the Fast Role Swap; if the determination condition is not met, it is determined that the receiving power device does not perform the Fast Role Swap.

[0061] In this solution, after the receiving power device loses the power supply of the power source (i.e., the power supply of the device providing power is lost), a Fast Role Swap signal will be generated under normal circumstances. Therefore, it is determined whether a Fast Role Swap signal is generated in the receiving power device, and the generation of the Fast Role Swap signal is used as a trigger point to detect and judge whether the Fast Role Swap is executed or whether the entire process is completed. Since the entire Fast Role Swap (fast role switching) process is very fast, if the voltage value on the CC line of Type-C has not returned to the normal value at the current moment, then it can be considered that the receiving power device has not executed the Fast Role Swap; if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, or it has just returned to the normal value at the current moment, but in fact the voltage value on the CC line of Type-C is only turbulent and has not really recovered (not stable), so if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, it cannot be determined whether the Fast Role Swap has been truly completed. Therefore, after determining that the Fast RoleSwap signal has been generated, further judgment is required in the future to accurately obtain the detection result. That is, it is necessary to obtain the target voltage value of Type-C, use the target voltage value of Type-C as the final judgment standard, and set the judgment condition to determine whether the receiving power device has completed the Fast Role Swap or has not executed the Fast Role Swap from beginning to end based on whether the target voltage value meets the judgment condition. Therefore, this application can accurately identify whether the Fast Role Swap is truly completed, and prevent the misjudgment of determining that the Fast Role Swap has been completed when it has not been executed, which greatly increases the accuracy of the detection. If it is detected that the Fast Role Swap is indeed not executed, an early warning can be issued or power can be supplied to the power supply equipment, and the extra power supply voltage of the receiving power equipment can also be processed to maintain the normal operation of the equipment.

[0062] Optionally, in the present application, the method of determining whether a Fast Role Swap signal is generated in the receiving power device may include the following two methods, which are based on different determination angles, as follows:

[0063] (1) Judging by the voltage change on the Type-C CC line.

[0064] There are two ways to judge based on the voltage change on the Type-C CC line:

[0065] (1) Using a Type-C port controller chip or a Type-C interface chip provided in the receiving power device to identify a voltage value change on a CC line of the Type-C, so as to determine whether a FastRole Swap signal is generated in the receiving power device.

[0066] This judgment method can be applied to receiving power equipment that supports fast identification of voltage value changes on the CC line of Type-C. Among them, the Type-C port Controller chip can regard the change in voltage value as a start signal of Fast RoleSwap.

[0067] Under normal circumstances, it is believed that all current Type-C port controller chips can quickly identify the voltage value change on the Type-C CC line, and after identifying the voltage value change on the CC line, it will default to the start of Fast Role Swap. However, the speed of recovery after the voltage value on the Type-C CC line changes is very fast, generally only 30 microseconds or 50 microseconds from the beginning of the change to recovery. However, in a special case, some older Type-C port controller chips do not have such a fast response speed and may not recognize the voltage value change.

[0068] In addition to the Type-C port controller chip being able to quickly identify the voltage value change on the Type-C CC line, some Type-C interface chips can also identify it. Therefore, in order to prevent the occurrence of the above special situation, the present application also provides another situation that can quickly identify the voltage value change on the Type-C CC line, namely:

[0069] (2) Using the Type-C interface chip provided in the power receiving device to identify the voltage value change on the VBUS power bus of the Type-C.

[0070] This judgment method can be applied to the following receiving power equipment:

[0071] The Type-C port Controller chip included in the power receiving device does not have the ability to quickly identify voltage value changes on the Type-C CC line. At the same time, the power receiving device includes a Type-C interface chip that supports quickly identifying voltage value changes on the CC line.

[0072] It should be noted that the Type-C interface chip described in this application is other Type-C interface chips other than the Type-C port controller chip.

[0073] The above scheme lists two ways of identifying the voltage value change on the CC line of Type-C, which can be applied to different chips. From the perspective of the chip, it can meet the needs of FastRole Swap detection of receiving power equipment with different chip configurations, increase the feasibility of this scheme, improve the user experience, and give users more choices.

[0074] Further, the process of using the Type-C port Controller chip provided in the receiving power device to identify the voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the receiving power device includes:

[0075] If the Type-C port Controller chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

[0076] Furthermore, the process of using the Type-C interface chip provided in the receiving power device to identify the voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the receiving power device includes:

[0077] If the Type-C interface chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

[0078] For details, please refer to Figure 5 , Figure 5 In the case of a Type-C interface chip, the voltage on the CC line decreases at time t2. Figure 6 , Figure 6 The horizontal axis is time t, and the vertical axis is voltage V. When the old power supply (providing power to the power equipment) detects a power failure, that is, after the receiving power equipment loses power supply, it will send a Fast Role Swap signal, which is specifically manifested as a square wave generated on the CC line, that is, its voltage value will drop to a value in an instant, and this value is the preset first threshold.

[0079] However, for Type-C interface chips, some Type-C interface chips can recognize voltage value changes on the CC line, while some Type-C interface chips cannot recognize voltage value changes on the CC line. As long as the Type-C interface chips that can recognize voltage value changes on the CC line recognize it, they will default to starting Fast Role Swap.

[0080] Then, for a receiving power device that does not include a Type-C portController chip that supports fast identification of voltage value changes on the CC line of Type-C, nor a Type-C interface chip that supports fast identification of voltage value changes on the CC line, the following method can be used to determine whether a Fast Role Swap signal is generated.

[0081] (2) Judging by the voltage change on the Type-C VBUS power bus.

[0082] The Type-C interface chip provided in the power receiving device is used to identify the voltage value change on the VBUS power bus of the Type-C.

[0083] Generally, Type-C interface chips support identifying voltage changes on the Type-C VBUS power bus. Figure 6 As shown, from Figure 6 It can be seen that when the Fast Role Swap starts, the voltage value on the CC line and the voltage value on the VBUS power bus will change. The Type-C interface chip is used to detect when the voltage value on the VBUS power bus drops to the preset second threshold, namely Vsafe5V(max). When it drops to Vsafe5V(max), it is determined that a Fast Role Swap signal is generated in the receiving power device. Finally, the voltage value on the VBUS power bus will tend to be stable and maintained in the range of Vsafe5V(max) to Vsafe5V(min). The VBUS voltage value of the new power supply (the original receiving power device that becomes the power supply device) is greater than the VBUS voltage value of the old power supply (the original power supply device that becomes the receiving power device). For details, please refer to Figure 7 , Figure 7 In the example, the Type-C interface chip can recognize at time t2 that the voltage value on the VBUS power bus is reduced to Vsafe5V(max).

[0084] The above two methods of determining whether to generate a Fast Role Swap signal can be applied to different receiving power devices, architectures or scenarios, which improves the feasibility and compatibility of the method of the present application and facilitates users to select hardware and software.

[0085] It should be noted that in the first case above, once the Type-C interface chip recognizes that the voltage value on the CC line has dropped to the preset first threshold, it will default to the start of the Fast Role Swap, that is, the Type-C interface chip can regard the change in voltage value as the start signal of the Fast Role Swap, and will unconditionally believe that the Fast Role Swap has been completed at the moment, but in fact, the Fast Role Swap may not have been executed, which will cause a misjudgment; in addition, at the current moment, if the voltage value on the CC line of the Type-C is restored to the preset normal value, it cannot be directly considered that the Fast Role Swap has been completed, so subsequent judgments need to be continued. However, the Type-C interface chip that supports the recognition of the voltage value change on the CC line can only recognize the voltage value on the CC line to be reduced, and cannot recognize whether the voltage value has been restored. Therefore, in the subsequent judgment process, it is necessary to rely on the Type-C port Controller chip. Generally speaking, the Type-C port Controller chip that supports the rapid recognition of the voltage value reduction on the CC line of the Type-C can also recognize that the voltage value on the CC line has returned to the normal value.

[0086] Then further, in the process of obtaining the target voltage value of the Type-C and determining whether the target voltage value meets the preset judgment condition, the judgment conditions preset in this application include but are not limited to the following two:

[0087] The first type: after a first preset time period starting from the current moment, the voltage value on the CC line of the Type-C is the normal value, and the prerequisite is that the target voltage value is the voltage value on the CC line of the Type-C after the first preset time period starting from the current moment.

[0088] The second type: the voltage value on the CC line of the Type-C after the first preset time period starting from the current moment is the normal value, and the voltage value on the VBUS power bus of the Type-C at any moment within the second preset time period starting from the first moment is a preset second threshold value, and the prerequisite is that the target voltage value includes two voltage values: the voltage value on the CC line of the Type-C after the first preset time period starting from the current moment, and the voltage value on the VBUS power bus of the Type-C at any moment within the second preset time period starting from the first moment; wherein the first moment is the moment when the first preset time period starting from the current moment ends.

[0089] Regardless of which method is used to determine whether a Fast Role Swap signal is generated, the Type-C port Controller chip must be used to determine whether the voltage value on the Type-C CC line returns to a normal value after a period of time to prevent the Fast Role Swap from being directly considered to be completed after determining that a Fast Role Swap signal is generated, causing misjudgment and affecting the accuracy of detection.

[0090] Specifically, the first preset time period can be set to 30 microseconds or 50 microseconds. Under the first judgment condition, if the voltage value on the CC line of Type-C can be restored to a normal value within 30 microseconds or 50 microseconds, it indicates that the receiving power device has completed the Fast Role Swap.

[0091] The second preset time period can be set to 500 milliseconds. The timing starts after the Type-C port Controller chip recognizes that the voltage value on the CC line of Type-C returns to a normal value, and the Type-C interface chip is used to monitor in real time within 500 milliseconds whether the voltage value on the VBUS power bus of Type-C is reduced to a preset second threshold. That is, it is monitored in real time whether at a certain moment within 500ms, the voltage value on the VBUS power bus of Type-C is the second threshold. If so, it indicates that the receiving power device has completed the Fast Role Swap.

[0092] In the above process, if the voltage value on the CC line does not return to a normal value within the first preset time period, and / or the voltage value on the VBUS power bus does not drop to the second threshold value at any time within the second preset time period starting from the first moment, it indicates that the receiving power device has not executed the Fast Role Swap. According to the above two judgment conditions, it can be accurately determined whether the Fast Role Swap is completed or not, and the detection result obtained by using the second judgment condition is more accurate than that obtained by using the first judgment condition. In one scenario, if the CC line of Type-C is broken, the second judgment condition can be used for judgment.

[0093] Furthermore, if it is determined that the power receiving device does not perform Fast Role Swap, then in order to ensure the normal operation of the power receiving device and the power providing device, it is necessary to perform normal power supply operations on them.

[0094] and Figure 3 Corresponding to the method described above, the embodiment of the present invention further provides a Fast Role Swap detection device for detecting Figure 3In the specific implementation of the method, the Fast Role Swap detection device provided by the embodiment of the present invention can be used in a computer terminal or various mobile devices, combined with Figure 8 , the Fast Role Swap detection device is introduced, such as Figure 8 As shown, the device may include:

[0095] The signal determination module 10 is used to determine whether a Fast Role Swap signal is generated in the receiving power device when the receiving power device loses power supply from the power source;

[0096] The CC voltage value judgment module 20 is used to judge whether the voltage value on the CC line of Type-C is a preset normal value at the current moment if a Fast Role Swap signal is generated in the receiving power device;

[0097] A first result determination module 30 is used to determine that the receiving power device does not perform Fast Role Swap if the value is not the normal value;

[0098] The target voltage value judgment module 40 is used to obtain the target voltage value of the Type-C if it is the normal value, and judge whether the target voltage value meets the preset judgment condition;

[0099] The second result determination module 50 is configured to determine that the receiving power device has completed the Fast Role Swap if the determination condition is met; and to determine that the receiving power device has not performed the Fast Role Swap if the determination condition is not met.

[0100] In this solution, after the receiving power device loses the power supply of the power source (i.e., the power supply of the device providing power is lost), a Fast Role Swap signal will be generated under normal circumstances. Therefore, it is determined whether a Fast Role Swap signal is generated in the receiving power device, and the generation of the Fast Role Swap signal is used as a trigger point to detect and judge whether the Fast Role Swap is executed or whether the entire process is completed. Since the entire Fast Role Swap (fast role switching) process is very fast, if the voltage value on the CC line of Type-C has not returned to the normal value at the current moment, then it can be considered that the receiving power device has not executed the Fast Role Swap; if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, or it has just returned to the normal value at the current moment, but in fact the voltage value on the CC line of Type-C is only turbulent and has not really recovered (not stable), so if the voltage value on the CC line of Type-C has returned to the normal value at the current moment, it cannot be determined whether the Fast Role Swap has been truly completed. Therefore, after determining that the Fast RoleSwap signal has been generated, further judgment is required in the future to accurately obtain the detection result. That is, it is necessary to obtain the target voltage value of Type-C, use the target voltage value of Type-C as the final judgment standard, and set the judgment condition to determine whether the receiving power device has completed the Fast Role Swap or has not executed the Fast Role Swap from beginning to end based on whether the target voltage value meets the judgment condition. Therefore, this application can accurately identify whether the Fast Role Swap is truly completed, and prevent the misjudgment of determining that the Fast Role Swap has been completed when it has not been executed, which greatly increases the accuracy of the detection. If it is detected that the Fast Role Swap is indeed not executed, an early warning can be issued or power can be supplied to the power supply equipment, and the extra power supply voltage of the receiving power equipment can also be processed to maintain the normal operation of the equipment.

[0101] Furthermore, the embodiment of the present application provides a Fast Role Swap detection device. Optionally, Fig. 9 The hardware structure diagram of the Fast Role Swap detection device is shown in FIG. Fig. 9 The hardware structure of the Fast Role Swap detection device may include: at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.

[0102] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .

[0103] The processor 01 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0104] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory.

[0105] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the following Fast Role Swap detection method, including:

[0106] When the power receiving device loses power supply from a power source, determining whether a Fast Role Swap signal is generated in the power receiving device;

[0107] If a Fast Role Swap signal is generated in the receiving power device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment;

[0108] If it is not the normal value, it is determined that the receiving power device does not perform Fast Role Swap;

[0109] If it is the normal value, obtaining the target voltage value of the Type-C, and determining whether the target voltage value meets a preset judgment condition;

[0110] If the determination condition is met, it is determined that the receiving power device completes the Fast Role Swap; if the determination condition is not met, it is determined that the receiving power device does not perform the Fast Role Swap.

[0111] Optionally, the detailed functions and extended functions of the program may refer to the description of the Fast Role Swap detection method in the method embodiment.

[0112] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, and when the program is running, controls the device where the storage medium is located to execute the following Fast Role Swap detection method, including:

[0113] When the power receiving device loses power supply from a power source, determining whether a Fast Role Swap signal is generated in the power receiving device;

[0114] If a Fast Role Swap signal is generated in the receiving power device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment;

[0115] If it is not the normal value, it is determined that the receiving power device does not perform Fast Role Swap;

[0116] If it is the normal value, obtaining the target voltage value of the Type-C, and determining whether the target voltage value meets a preset judgment condition;

[0117] If the determination condition is met, it is determined that the receiving power device completes the Fast Role Swap; if the determination condition is not met, it is determined that the receiving power device does not perform the Fast Role Swap.

[0118] Specifically, the storage medium may be a computer-readable storage medium, and the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.

[0119] Optionally, the detailed functions and extended functions of the program may refer to the description of the Fast Role Swap detection method in the method embodiment.

[0120] In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure.

[0121] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0122] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A Fast Role Swap detection method, characterized in that: include: When the power receiving device loses power supply from a power source, determining whether a FastRole Swap signal is generated in the power receiving device; If a Fast Role Swap signal is generated in the receiving power device, it is determined whether the voltage value on the CC line of Type-C is a preset normal value at the current moment; If it is not the normal value, it is determined that the receiving power device does not perform Fast Role Swap; If it is the normal value, obtaining the target voltage value of the Type-C, and determining whether the target voltage value meets a preset judgment condition; If the determination condition is met, it is determined that the receiving power device completes the Fast Role Swap; if the determination condition is not met, it is determined that the receiving power device does not perform the Fast Role Swap.

2. The method according to claim 1, characterized in that The determining whether a Fast Role Swap signal is generated in the receiving power device includes: The Type-C port Controller chip or the Type-C interface chip provided in the receiving power device is used to identify the voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the receiving power device.

3. The method according to claim 2, characterized in that The method of using the Type-C port Controller chip provided in the power receiving device to identify a voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the power receiving device includes: If the Type-C port Controller chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

4. The method according to claim 2, characterized in that The method of using the Type-C interface chip provided in the power receiving device to identify a voltage value change on the CC line of the Type-C to determine whether a Fast Role Swap signal is generated in the power receiving device includes: If the Type-C interface chip recognizes that the voltage value on the CC line drops to a preset first threshold, it determines that a Fast Role Swap signal is generated in the receiving power device.

5. The method according to claim 1, characterized in that The determining whether a Fast Role Swap signal is generated in the receiving power device includes: Using the Type-C interface chip provided in the receiving power device to identify a voltage value change on the VBUS power bus of the Type-C; If it is identified that the voltage value on the VBUS power bus of the Type-C is reduced to a preset second threshold, it is determined that a Fast Role Swap signal is generated in the receiving power device.

6. The method according to claim 1, characterized in that The target voltage value is a voltage value on the CC line of the Type-C after a first preset time period starting from the current moment; The determination condition is: after a first preset time period starting from the current moment, the voltage value on the CC line of the Type-C is the normal value.

7. The method according to claim 1, characterized in that The target voltage value includes: a voltage value on the CC line of the Type-C after a first preset time period starting from the current moment, and a voltage value on the VBUS power bus of the Type-C at any moment within a second preset time period starting from the first moment; wherein the first moment is the moment when the first preset time period starting from the current moment ends; The discrimination conditions are: The voltage value on the CC line of the Type-C after a first preset time period starting from the current moment is the normal value, and the voltage value on the VBUS power bus of the Type-C at any moment within a second preset time period starting from the first moment is a preset second threshold value.

8. A Fast Role Swap detection device, characterized in that: include: A signal determination module, used to determine whether a Fast Role Swap signal is generated in the receiving power device when the receiving power device loses power supply from a power source; A CC voltage value judgment module, used to judge whether the voltage value on the CC line of Type-C is a preset normal value at the current moment if a Fast Role Swap signal is generated in the receiving power device; A first result determination module, configured to determine that the receiving power device does not perform FastRole Swap if the value is not the normal value; a target voltage value judgment module, configured to obtain the target voltage value of the Type-C if it is the normal value, and judge whether the target voltage value meets a preset judgment condition; The second result determination module is used to determine that the receiving power device completes the Fast Role Swap if the determination condition is met; and to determine that the receiving power device does not perform the Fast Role Swap if the determination condition is not met.

9. A Fast Role Swap detection device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the Fast Role Swap detection method as described in any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the Fast Role Swap detection method as described in any one of claims 1 to 7 is implemented.