Transmission direction control method of hub, hub and control circuit

By detecting the frequency signal of the main serial frequency line in the hub and starting the timing, and judging the data signals of the main data line and the slave data line, the misjudgment problem of the existing hub being affected by the timing synchronization when judging the transmission direction, and the accurate judgment of the transmission direction is achieved.

CN120045497APending Publication Date: 2025-05-27ANPEC ELECTRONICS CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311640957.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-11-24
Filing Date
2023-11-30
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When judging the transmission direction, existing hubs are easily limited by the reason why timing is not synchronized, resulting in misjudgment of the transmission direction.

Method used

By detecting the frequency signal of the main serial frequency line and starting the timing when the frequency signal meets the triggering condition, when the timing reaches the preset time, the data signals of the main data line and the slave data line are judged, and the transmission direction is set according to the judgment result.

Benefits of technology

This method does not need to increase the sampling frequency of the internal working frequency, and is not affected by the timing out of timing, so it can accurately judge the transmission direction and avoid misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045497A_ABST
    Figure CN120045497A_ABST
Patent Text Reader

Abstract

The invention discloses a transmission direction control method of a hub, the hub and a control circuit. The transmission direction control method of the hub comprises the following steps: detecting a frequency signal of a main serial frequency line; starting timing when the frequency signal meets a trigger condition; when the timing reaches a preset time, determining a master data signal of a master data line communicating with a master device and a slave data signal of a slave data line signal communicating with a slave device; and setting a transmission direction between the master data line and the slave data line according to the judgment result, wherein the transmission direction is a first transmission direction for transmitting data from the master data line to the slave data line or a second transmission direction for transmitting data from the slave data line to the master data line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a transmission direction control method, and particularly to a transmission direction control method and a hub for a hub. Background Art

[0002] In the specification of serial transmission, the Inter-Integrated Circuit (I2C) bus standard is a widely used technology, and later, an improved Inter-Integrated Circuit (I3C) bus is developed on the basis of I2C. I3C has higher communication speed and lower power consumption compared with I2C. Therefore, in the field of sensor-related applications that emphasize low power consumption, the I3C bus technology has been gradually emphasized and widely used in various different application scenarios.

[0003] For a hub that conforms to the I3C bus transmission protocol, this hub needs to continuously judge the data type of HSDA or LSDA according to the data type of HSDA or LSDA and the internal working frequency and SCL = 0 to determine the transmission direction. However, due to the reason of unsynchronized timing, the misjudgment of the transmission direction often occurs. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a transmission direction control method, a hub and a control circuit for a hub in view of the deficiencies of the prior art.

[0005] An embodiment of the present invention provides a transmission direction control method for a hub, including: detecting a frequency signal of a main serial frequency line; starting a timing when the frequency signal meets a trigger condition; and judging a main data signal of a main data line communicating with a main device and a slave data signal of a slave data line communicating with a slave device when the timing reaches a preset time; setting a transmission direction between the main data line and the slave data line according to the judgment result, where the transmission direction is a first transmission direction for transmitting data from the main data line to the slave data line or a second transmission direction for transmitting data from the slave data line to the main data line.

[0006] An embodiment of the present invention provides a hub, including a main transmission interface, a slave data interface, a control circuit and a switch switching circuit. The main transmission interface has a main serial frequency line and a main data line; the slave transmission interface has a slave serial frequency line and a slave data line; the switch switching circuit is respectively connected to the main transmission interface and the slave transmission interface; wherein the control circuit is configured as:

[0007] Detect a frequency signal of the main serial frequency line, and start a timing when the frequency signal meets a trigger condition;

[0008] When the timing reaches a preset time, judge a main data signal of the main data line communicating with a main device and a slave data signal of the slave data line signal communicating with a slave device;

[0009] Control the switch switching circuit according to the judgment result and relatively set a transmission direction between the main data line and the slave data line, where the transmission direction is a first transmission direction for transmitting data from the main data line to the slave data line or a second transmission direction for transmitting data from the slave data line to the main data line.

[0010] An embodiment of the present invention provides a control circuit, including: a controller and a memory for storing one or more programs; when the one or more programs are executed by the controller, the controller realizes a method for controlling the transmission direction of a hub.

[0011] In summary, the method for controlling the transmission direction of a hub, the hub and the control circuit provided by the embodiments of the present invention enable the time point for judging the transmission direction to be carried out for a period of time after the negative edge of the system frequency signal through a delay detection mechanism, so that there is no need to increase the sampling frequency of the internal working frequency, and it is not affected by timing asynchronization, and there is no need to add an additional interrupt pin to accurately judge the transmission direction.

[0012] To enable a further understanding of the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the provided drawings are only for reference and illustration, and are not used to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a schematic diagram of the system architecture of a hub provided by an embodiment of the present invention.

[0014] Figure 2 It is a flowchart of the transmission direction control of a hub provided by an embodiment of the present invention.

[0015] Figure 3 It is a first schematic diagram of the transmission signal of a hub provided by an embodiment of the present invention.

[0016] Figure 4 It is a second schematic diagram of the transmission signal of a hub provided by an embodiment of the present invention.

[0017] Figure 5 It is a third schematic diagram of the transmission signal of a hub provided by an embodiment of the present invention.

[0018] Figure 6 It is a fourth schematic diagram of the transmission signal of a hub provided by an embodiment of the present invention.

[0019] Figure 7 This is a block diagram of a hub provided by an embodiment of the present invention.

[0020] Figure 8 This is a schematic diagram of a control circuit provided by an embodiment of the present invention.

[0021] Figure 9 This is a schematic diagram of a switch switching circuit provided by an embodiment of the present invention. Detailed implementation manners

[0022] The following are specific embodiments to illustrate the implementation manners of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content provided in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. Additionally, the drawings of the present invention are only simple schematic illustrations and are not drawn according to actual sizes. The following implementation manners will further detail the related technical content of the present invention, but the content provided is not used to limit the protection scope of the present invention.

[0023] It should be understood that although terms such as "first", "second", "third", etc. may be used in this article to describe various components or signals, these components or signals should not be limited by these terms. These terms are mainly used to distinguish one component from another or one signal from another. Additionally, the term "or" used in this article may, depending on the actual situation, include any one or a combination of multiple of the associated listed items.

[0024] An embodiment of the present invention provides a method for controlling the transmission direction of a hub, a hub, and a control circuit. Here, the hub uses the technology of a two-wire serial transmission bus, enabling the master device to perform bidirectional data transmission with one or more slave devices through the hub. Here, the bidirectional data transmission means that only the master device can transmit data to the slave device or the slave device can transmit data to the master device at the same time. The hub uses a delay detection mechanism to accurately judge the request of the master device or the slave device for transmitting data, and relatively controls the transmission direction according to the judgment result, thereby effectively avoiding misjudgment of the transmission direction caused by out-of-sync timing.

[0025]

System architecture embodiment of the hub

[0026] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the system architecture of a hub provided by an embodiment of the present invention. In this embodiment, the hub 1 is connected to the master device 2 and the slave device 3 with two wires respectively. For example, one of the two wires serves as the frequency line and the other wire serves as the data line.Figure 1 For the hub 1, the two lines connecting it to the master device 2 are the Host Serial Clock Line (HSCL) and the Host Serial Data Line (HSDA), and the two lines connecting it to the slave device 3 are the Local Serial Clock Line (LSCL) and the Local Serial Data Line (LSDA).

[0027] The hub 1 receives the frequency signal through the HSCL line and outputs this frequency signal to the slave device 3 through the LSCL. When the master device 2 transmits data to the slave device 3, the hub 1 receives the data from the master device 2 through the HSDA and transmits this data to the slave device 3 through the LSDA. That is, at this time, the data transmission direction provided by the hub 1 is from HSDA to LSDA. When the slave device 3 transmits data to the master device 2, the hub 1 receives the data from the slave device 3 through the LSDA and transmits this data to the master device 2 through the HSDA. That is, at this time, the data transmission direction provided by the hub 1 is from LSDA to HSDA.

[0028] It should be noted that, in one embodiment, the hub 1 determines the data transmission direction through the detect windows technology. Here, the so-called detect windows, for example, defines a time range through the detect windows, and within this time range, it detects whether the preset time point is reached, and only when the preset time is reached does it execute the so-called transmission direction judgment mechanism. The relevant detailed content will be described later.

[0029] In addition, it should be noted that, in one embodiment, the hub 1 uses the two-wire serial transmission bus technology, which belongs to the Improved Inter Integrated Circuit (I3C) bus. And the hub 1 determines the data transmission direction judgment logic by detecting the data configurations of the HSDA and LSDA, and is sorted out and expressed by the following relational expressions.

[0030] When the master data signal of the HSDA is at a logic low level (HSDA = 0) and the slave data line signal of the LSDA is at a logic low level (LSDA = 0), the transmission direction at this time is the first transmission direction, that is, the data is transmitted from the HSDA of the master device 2 to the LSDA of the slave device 3 (from HSDA to LSDA).

[0031] When the master data signal of HSDA is at logic low level (HSDA = 0) and the slave data signal of LSDA is at logic high level (LSDA = 1), the transmission direction is the first transmission direction, that is, data is transmitted from HSDA of the master device 2 to LSDA of the slave device 3 (from HSDA to LSDA).

[0032] When the master data signal of HSDA is at logic high level (HSDA = 1) and the slave data signal of LSDA is at logic high level (LSDA = 1), the transmission direction is the first transmission direction, that is, data is transmitted from HSDA of the master device 2 to LSDA of the slave device 3 (from HSDA to LSDA).

[0033] When the master data signal of HSDA is at logic high level (HSDA = 1) and the slave data signal of LSDA is at logic low level (LSDA = 0), the transmission direction is the second transmission direction, that is, data is transmitted from LSDA of the slave device 3 to HSDA of the master device 2 (from LSDA to HSDA). For the convenience of illustration, the above relational expression can be represented by Table 1 below.

[0034]

[0035] Table 1

[0036]

Embodiment of the Transmission Direction Control Method of the Hub

[0037] Please refer to Figure 2 , Figure 2 which is a flowchart of the transmission direction control method of the hub provided by the embodiment of the present invention. Figure 2 The illustrated process example includes but is not limited to the following step descriptions, and can be combined with reference to Figure 1 the illustrated architecture.

[0038] In step S201, the frequency signal is detected. Here, the hub 1 detects the change of the frequency signal of HSCL (or LSCL).

[0039] In step S203, it is judged whether the trigger condition is met. Here, the trigger condition mentioned is, for example, the negative edge of the frequency signal, that is, the hub 1 can know whether the negative edge state of the frequency signal occurs according to the detection result of step S201.

[0040] In step S205, the timing is started. When the judgment in step S203 is yes, it means that the change of the frequency signal meets the trigger condition, that is, when the hub 1 detects that the negative edge of the frequency signal occurs, it immediately starts a timing operation. In one embodiment, this timing operation is to time a preset time.

[0041] In step S207, transmission is prohibited. When the hub 1 starts timing, data transmission between the master device 2 and the slave device 3 is prohibited. For example, the HSDA and LSDA are in an open circuit state.

[0042] In step S209, it is judged whether the timing has reached. The hub 1 continuously judges whether the timing has reached the preset time.

[0043] In step S211, the transmission data configuration is obtained. When the judgment in step S207 is yes, the hub 1 obtains the configuration status of the transmission data. For example, the hub 1 obtains the logic levels of the HSDA and LSDA.

[0044] In step S213, the transmission direction is set. According to the configuration of the transmission data obtained in step S211, the transmission direction can be known according to the definition in Table 1 as the first transmission direction for transmitting data from HSDA to LSDA or the second transmission direction for transmitting data from LSDA to HSDA. Then the hub 1 sets the HSDA and LSDA to transmit data according to this transmission direction, that is, at this time, the HSDA and LSDA can resume data transmission according to this transmission direction.

[0045] In an embodiment, when the triggering condition in step S203 is established, a preset time is started for timing. This preset time can be used for the detection window. By setting the detection window, it can be determined that the transmission direction judgment mechanism can be started after the timing reaches the preset time point. For example, here it means that the hub 1 starts the transmission direction judgment mechanism at a preset time after the negative edge of the frequency signal appears.

[0046] In an embodiment, the length of the preset time is less than the negative level time length of the frequency signal, and the hub 1 only executes the transmission direction judgment mechanism once during the negative level period of the frequency signal. In this way, it can be ensured that there is only one change in the transmission direction during the negative level period of the frequency signal for the hub 1.

[0047] In an embodiment, the time difference between the time point when the timing reaches the preset time and the time point when the frequency signal turns positive edge later is greater than a data setup time.

[0048] Please refer to Figure 3 , Figure 3 which is the first schematic diagram of the hub transmitting signals provided by the embodiment of the present invention. Figure 3 The two trigger time points in it are respectively located at time T1 and time T4, that is, the frequency signal generates negative edge transitions at time T1 and time T4 respectively.

[0049] The hub 1 starts timing for a preset time after time T1, where the length of the preset time is from time T1 to T2. The hub 1 also starts the transmission direction judgment mechanism at time T2. At this time, the main data signal of HSDA at time T2 is logic low level (HSDA = 0) and the slave data signal of LSDA is logic high level (LSDA = 1). Therefore, the transmission direction provided by the hub 1 at this time is set to the first transmission direction, that is, the master device 2 can transmit data to the slave device 3 through the hub 1.

[0050] The hub 1 starts timing for a preset time after time T4, where the length of the preset time is from time T4 to T5. The hub 1 also starts the transmission direction judgment mechanism at time T5. At this time, the main data signal of HSDA at time T5 is logic high level (HSDA = 1) and the slave data signal of LSDA is logic low level (LSDA = 1). Therefore, the transmission direction provided by the hub 1 at this time is set to the second transmission direction, that is, the slave device 3 can transmit data to the master device 2 through the hub 1.

[0051] Figure 3 During the time intervals from time T1 to T2 and from time T4 to T5 of the hub 1 in it, the master device 2 and the slave device 3 are prohibited from transmitting data through the hub 1, that is, there is an open circuit state between HSDA and LSDA of the hub 1 at this time.

[0052] Figure 3 During the time interval from time T2 to time T4 of the hub 1 in it, the first transmission direction is provided for transmission, that is, the data is transmitted from the HSDA of the master device 2 through the hub 1 to the slave data line (from HSDA to LSDA) of the slave device 3.

[0053] Figure 3 After time T5 of the hub 1 in it, the second transmission direction is provided for transmission, that is, the data is transmitted from the LSDA of the slave device 3 through the hub 1 to the HSDA of the master device 2 (from LSDA to HSDA).

[0054] In addition Figure 3 The detection window DW time intervals from time T1 to T2 and from time T4 to T5 in it are of equal length, and the time length of this detection window DW time interval (that is, from time T1 to T2 or from time T4 to T5) is less than the negative level time length of the frequency signal (that is, from time T1 to T3 or from time T4 to T6).

[0055] Through Figure 3As can be clearly seen from the representation, the hub 1 only judges the change of the transmission direction once during the negative level time length of the frequency signal, and sets the corresponding transmission direction according to the judgment result. Moreover, by prohibiting the transmission of data within the time interval of the detection window DW, the misjudgment of the transmission direction caused by the problem of asynchronous timing can be avoided.

[0056] Please refer to Figure 4 , Figure 4 which is the second schematic diagram of the hub transmitting signals provided by the embodiment of the present invention. Figure 4 The trigger time point in it is at time T1, that is, the frequency signal generates a negative edge at time T1.

[0057] Figure 4 The hub 1 starts timing a preset time after time T1, and the hub 1 starts the judgment mechanism of the transmission direction when the timing reaches time T2. Therefore, the transmission direction provided by the hub 1 at this time is set to the first transmission direction, that is, the main device 2 can transmit data to the slave device 3 through the hub 1.

[0058] Figure 4 In it, the hub 1 has state changes in the signal levels of HSDA and LSDA at times T3 and T4 respectively. However, after the hub 1 has set the transmission direction at time T2, the hub 1 will not judge the transmission direction again at times T3 and T4, but will not judge the transmission direction again until the next negative edge of the frequency signal, so as to avoid the misjudgment of the transmission direction caused by the problem of asynchronous timing.

[0059] Please refer to Figure 5 , Figure 5 which is the third schematic diagram of the hub transmitting signals provided by the embodiment of the present invention. Figure 5 The trigger time point in it is at time T1, that is, the frequency signal generates a negative edge at time T1.

[0060] Figure 5 The hub 1 starts timing a preset time after time T1, and the hub 1 starts the judgment mechanism of the transmission direction when the timing reaches time T2. Therefore, the transmission direction provided by the hub 1 at this time is set to the first transmission direction, that is, the main device 2 can transmit data to the slave device 3 through the hub 1.

[0061] Figure 5 The time difference between the positive edge transition of HSDA and the positive edge transition of HSCL shown in is less than the data setup time, but after the hub 1 has set the transmission direction at time T2, the hub 1 will not judge the transmission direction again, but will not judge the transmission direction again until the next negative edge of the frequency signal, so as to avoid the misjudgment of the transmission direction caused by the problem of asynchronous timing.

[0062] Please refer to Figure 6 , Figure 6 , which is the fourth schematic diagram of the hub transmitting signals provided by the embodiment of the present invention. Figure 6 The trigger time point in [] is at time T1, that is, the frequency signal generates a negative edge at time T1.

[0063] Figure 6 The hub 1 in [] starts timing for a preset time after time T1, and the hub 1 starts the transmission direction judgment mechanism when timing reaches time T2. Therefore, the transmission direction provided by the hub 1 at this time is set to the second transmission direction, that is, the transmission direction in which the device 3 can transmit data to the master device 2 through the hub 1.

[0064] Figure 6 At time T3 of the hub 1 in [], at this time, the level of the HSDA signal changes, but after the hub 1 has set the transmission direction at time T2, the hub 1 will not judge the transmission direction again at time T3, but will not judge the transmission direction again until the next negative edge of the frequency signal, so as to avoid misjudgment of the transmission direction caused by out-of-sync timing problems.

[0065] Please refer to Figure 7 , Figure 7 , which is the block schematic diagram of the hub provided by the embodiment of the present invention. In one embodiment, the hub 1 includes, for example, but is not limited to, a control circuit 10, a main transmission interface 12, a slave transmission interface 14, and a switch switching circuit 16, wherein the control circuit 10 is connected to the main transmission interface 12, the slave transmission interface 14, and the switch switching circuit 16, and the switch switching circuit 16 is connected between the main transmission interface 12 and the slave transmission interface 14.

[0066] In one exemplary example, the main transmission interface 12 includes a two-wire transmission interface of a main serial frequency line (HSCL) and a main data line (HSDA).

[0067] In one exemplary example, the slave transmission interface 14 includes a two-wire transmission interface of a slave serial frequency line (LSCL) and a slave data line (LSDA).

[0068] In one exemplary example, the main transmission interface 12 and the slave transmission interface 14 use the I3C bus transmission protocol.

[0069] In one exemplary example, the control circuit 10 determines the transmission direction based on the data configurations of HSDA and LSDA, and the judgment time point for the control circuit 10 to determine the transmission direction is carried out at a preset time after the negative edge of HSCL. The technology used by the control circuit 10 to judge the transmission direction is to obtain the main data signal of HSDA and the slave data signal of LSDA, and judge whether the transmission direction belongs to the first transmission direction or the second transmission direction according to the judgment logic in Table 1.

[0070] For example, when the control circuit 10 determines that the transmission direction is the first transmission direction, the control circuit 10 controls the switch switching circuit 16 at this time and relatively sets a transmission direction between HSDA and LSDA as a second transmission direction for transmitting data from HSDA to LSDA. And when the control circuit 10 determines that the transmission direction is the second transmission direction, the control circuit 10 controls the switch switching circuit 16 at this time and relatively sets a transmission direction between HSDA and LSDA as a second transmission direction for transmitting data from LSDA to HSDA.

[0071]

Embodiment of the control circuit

[0072] Please refer to Figure 8 , Figure 8 which is a schematic diagram of the control circuit provided by the embodiment of the present invention.

[0073] In one embodiment, the control circuit 10 may include a controller 102 and a memory 104. Among them, the controller 102 is electrically connected to the memory 104. Further, the controller and the memory may be connected through a bus system. The memory 104 is used to store programs or instructions, and the controller 102 is used to execute the programs or instructions stored in the memory 104 to execute various methods described in the embodiments of the present application, such as the transmission direction control method of the hub 1. The related implementation manners of the method have been described above, and in order to avoid repetition, they will not be elaborated here.

[0074] In the embodiment of the present application, the controller 102 may be, for example, a central processing unit (CPU), and the controller 102 may also be other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices. The general-purpose processor may be a microprocessor or a processor, or any conventional processor, etc. The memory 104 may be implemented through a memory, and the memory includes, for example, a ROM memory device or a RAM memory device.

[0075]

Embodiment of the switch switching circuit

[0076] Please refer to Figure 9 , Figure 9 which is a schematic diagram of the switch switching circuit provided by the embodiment of the present invention.

[0077] In one embodiment, the switch switching circuit 16 may include a first transmission line 161 and a second transmission line 162. The two ends of the first transmission line 161 and the second transmission line 162 are respectively connected to the HSDA of the main transmission interface 12 and the LSDA of the slave transmission interface 14. Here, the first transmission line 101 and the second transmission line 162 are in parallel with each other.

[0078] Specifically, the control circuit 10 controls the transmission direction of the hub 1 through the switch switching circuit 16. For example, when the transmission direction of the hub 1 is the first transmission direction, at this time, the control circuit 10 controls the first transmission line 161 to start transmission, and enables HSDA to transmit data in the direction of LSDA. At the same time, the control circuit 10 controls the second transmission line 162 to prohibit transmission, and enables LSDA to not transmit data in the direction of HSDA.

[0079] For example, when the transmission direction of the hub 1 is the second transmission direction, at this time, the control circuit 10 controls the second transmission line 162 to start transmission, and enables LSDA to transmit data in the direction of HSDA. At the same time, the control circuit 10 controls the first transmission line 161 to prohibit transmission, and enables HSDA to not transmit data in the direction of LSDA.

[0080] In one embodiment, the first transmission line 161 includes a first switch 1612 and a first unidirectional conduction component 1614, and the first switch 1612 is connected in series with the first unidirectional conduction component 1614. When the first switch 1612 is turned on, HSDA can transmit data in the direction of LSDA through the first unidirectional conduction component 1614. When the first switch 1612 is turned off, HSDA cannot transmit data in the direction of LSDA through the first unidirectional conduction component 1614. The conduction and cutoff of the first switch 1612 are controlled by the control circuit 10.

[0081] In one embodiment, the second transmission line 162 includes a second switch 1622 and a second unidirectional conduction component 1624, and the second switch 162 is connected in series with the second unidirectional conduction component 1624. When the second switch 1622 is turned on, LSDA can transmit data in the direction of HSDA through the second unidirectional conduction component 1624. When the second switch 1622 is turned off, LSDA cannot transmit data in the direction of HSDA through the second unidirectional conduction component 1624. The conduction and cutoff of the second switch 1622 are controlled by the control circuit 10.

[0082] In one embodiment, the control circuit 10 can control one of the first switch 1612 and the second switch 1622 to be turned on, and the control circuit 10 can also control the first switch 1612 and the second switch 1622 to be turned off simultaneously, but the control circuit 10 prohibits the first switch 1612 and the second switch 1622 from being turned on simultaneously here.

[0083] The first unidirectional conduction component 1614 and the second unidirectional conduction component 1624 are, for example, diodes or transistors (for example, normally closed transistors that can be used as diode forms), but the invention is not limited thereto.

[0084] For those skilled in the art, the functions described by the various illustrative logical blocks, modules, and algorithmic steps of the foregoing embodiments can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions described by the various illustrative logical blocks, modules, and steps can be stored or transmitted as one or more instructions or programs on a computer-readable medium and executed by a processing unit of the hardware. Here, the computer-readable medium can include a computer-readable storage medium. Examples of the computer-readable storage medium can include a tangible non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium includes instructions or programs executable by one or more processors, and the instructions or programs include those for implementing the various implementation methods as described above.

[0085] An embodiment of the computer-readable storage medium disclosed herein is, for example, RAM, ROM, EEPROM, CD-ROM, or other optical disc storage devices, magnetic disk storage devices, or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0086] [Advantages of the Embodiment]

[0087] The method for controlling the transmission direction of the hub, the hub, and the control circuit provided by the present invention, through a delay detection mechanism, enables the time point for determining the transmission direction to be carried out for a period of time after the negative edge of the system frequency signal. In this way, there is no need to increase the sampling frequency of the internal operating frequency, and it is not affected by timing asynchronization. Moreover, it is not necessary to add an interrupt pin to accurately determine the transmission direction.

[0088] The content provided above is only a preferred and feasible embodiment of the present invention and does not limit the scope of patent application of the present invention. Therefore, all equivalent technical changes made by using the content of the specification and drawings of the present invention are included in the scope of patent application of the present invention.

Claims

1. A method for controlling the transmission direction of a hub, characterized in that, comprising: detecting a frequency signal of a main serial frequency line; starting a timing when the frequency signal meets a trigger condition; judging a main data signal of a main data line communicating with a main device and a slave data signal of a slave data line signal communicating with a slave device when the timing reaches a preset time; and setting a transmission direction between the main data line and the slave data line according to the judgment result, wherein the transmission direction is a first transmission direction for transmitting data from the main data line to the slave data line or a second transmission direction for transmitting data from the slave data line to the main data line.

2. The method for controlling the transmission direction of a hub according to claim 1, characterized in that, wherein when the timing is started but has not reached the preset time, data transmission between the main data line and the slave data line is prohibited, and both the communication between the hub and the main device and the communication between the hub and the slave device support the use of the I3C bus transmission protocol.

3. The method for controlling the transmission direction of a hub according to claim 2, characterized in that, wherein the trigger condition is the time point when the frequency signal turns to a negative edge, and the length of the preset time is less than the negative level time length of the frequency signal.

4. The method for controlling the transmission direction of a hub according to claim 3, characterized in that, wherein the time difference between the time point when the timing reaches the preset time and the time when the frequency signal turns to a positive edge afterwards is greater than a data setting time.

5. The method for controlling the transmission direction of a hub according to claim 4, characterized in that, wherein when the timing reaches the preset time, when both the main data signal and the slave data signal are at a logic low level, the transmission direction is the first transmission direction; wherein when the timing reaches the preset time, when both the main data signal and the slave data signal are at a logic high level, the transmission direction is the first transmission direction; wherein when the timing reaches the preset time, when the main data signal is at a logic low level and the slave data signal is at a logic high level, the transmission direction is the first transmission direction; wherein when the timing reaches the preset time, when the main data signal is at a logic high level and the slave data signal is at a logic low level, the transmission direction is the second transmission direction.

6. A hub, characterized in that, comprising: a main transmission interface having a main serial frequency line and a main data line; a slave transmission interface having a slave serial frequency line and a slave data line; a control circuit; and a switch switching circuit respectively connected to the main transmission interface and the slave transmission interface; wherein the control circuit is configured to: detect a frequency signal of the main serial frequency line and start a timing when the frequency signal meets a trigger condition; judge a main data signal of the main data line communicating with a main device and a slave data signal of the slave data line signal communicating with a slave device when the timing reaches a preset time; Control the switch switching circuit according to the judgment result and relatively set a transmission direction between the main data line and the slave data line, where the transmission direction is a first transmission direction for transmitting data from the main data line to the slave data line or a second transmission direction for transmitting data from the slave data line to the main data line.

7. The hub according to claim 6, characterized in that when starting timing but before the timing reaches the preset time, the control circuit controls the switch switching circuit to prohibit data transmission between the main data line and the slave data line, and both the communication between the hub and the main device through the main transmission interface and the communication between the hub and the slave device through the slave transmission interface support the use of the I3C bus transmission protocol.

8. The hub according to claim 7, characterized in that the trigger condition is the time point when the frequency signal turns to the negative edge, and the length of the preset time is less than the negative level time length of the frequency signal.

9. The hub according to claim 8, characterized in that the time difference between the time point when the timing reaches the preset time and the time when the frequency signal turns to the positive edge afterwards is greater than a data setting time.

10. The hub according to claim 9, characterized in that when the timing reaches the preset time, when both the main data signal and the slave data signal are at logic low level, the control circuit controls the switch switching circuit so that the transmission direction is the first transmission direction; when the timing reaches the preset time, when both the main data signal and the slave data signal are at logic high level, the control circuit controls the switch switching circuit so that the transmission direction is the first transmission direction; when the timing reaches the preset time, when the main data signal is at logic low level and the slave data signal is at logic high level, the control circuit controls the switch switching circuit so that the transmission direction is the first transmission direction; when the timing reaches the preset time, when the main data signal is at logic high level and the slave data signal is at logic low level, the control circuit controls the switch switching circuit so that the transmission direction is the second transmission direction.

11. The hub according to claim 6, characterized in that the switch switching circuit includes: a first transmission line having a first unidirectional conduction component and a first switch; when the first switch is turned on, the main data line transmits data to the slave data line direction through the first unidirectional conduction component; a second transmission line having a second unidirectional conduction component and a second switch; when the second switch is turned on, the slave data line transmits data to the main data line direction through the second unidirectional conduction component; when the control circuit controls the transmission direction to be the first transmission direction, the control circuit controls the first switch to be turned on and the second switch to be turned off; when the control circuit controls the transmission direction to be the second transmission direction, the control circuit controls the second switch to be turned on and the first switch to be turned off; When the control circuit controls the switch switching circuit to prohibit data transmission between the main data line and the slave data line, the control circuit controls both the first switch and the second switch to be cut off.

12. A control circuit, characterized in that it includes: a controller; and a memory that stores one or more programs; wherein when the one or more programs are executed by the controller, the controller implements the transmission direction control method of the hub according to any one of claims 1-5.