Method, device and system for controlling multi-node GPIO (General Purpose Input / Output) interface state

By controlling the GPIO interface status of multiple nodes, using the GPIO interfaces of the main node and each node to input the status, configuration information and the value of the virtual IO interface, efficient and timely multi-node information transmission is achieved, solving the problems of inefficiency and information transmission delay in the prior art.

CN119921798AActive Publication Date: 2025-05-02NEWCOSEMI BEIJING TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510081217.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-02
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In the prior art, multi-node communication networks have problems such as low efficiency and low priority information transmission delay in information transmission and processing, resulting in the possibility of loss of information.

Method used

By controlling the GPIO interface status of multiple nodes, the status, configuration information and the values ​​of the virtual IO interface are input by using the GPIO interfaces of the main node and each node to achieve efficient transmission and processing of status data. The specific method includes modifying the value of the virtual IO interface according to the GPIO interface input status, configuration information and the value of the virtual IO interface of the master node, obtaining status data, and transmitting it to each node until the end node, and performing updates and response output.

Benefits of technology

It realizes efficient and timely multi-node information transmission, improves the system's parallel processing capability and overall efficiency, and avoids the transmission delay and loss of low priority information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119921798A_ABST
    Figure CN119921798A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and a system for controlling a multi-node GPIO (General Purpose Input / Output) interface state. And the input and output modes of the GPIO interface of each node and the corresponding relationship between the GPIO interface and the virtual IO interface are configured, so that the flexibility and adaptability of the system are enhanced, and effective utilization and dynamic adjustment of resources are realized. And modifying the value of each virtual IO interface according to the input state of the GPIO interface of the main node, the configuration information and the value of each virtual IO interface to obtain state data. State data are transmitted downwards one by one node to the tail end and then transmitted upwards, the state data are updated through all the nodes, responded and output, the main node obtains the state data again after preset time and transmits the state data downwards, the GPIO state of all the nodes is recognized and processed in each period, real-time response and efficient processing of the system to the GPIO state are ensured, and the system reliability is improved. And the expandability and the multi-node processing capability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic circuit technology, and in particular to a method, device and system for controlling the GPIO interface states of multiple nodes. Background Art

[0002] In multi-node communication networks such as audio and video, each node uses the general-purpose input / output (GPIO) interface to efficiently transmit control instructions and status information. For example, the processor connected to the master node controls the status of the speaker connected to the slave node through the master node GPIO, and the speaker connected to the slave node feeds back the speaker fault status to the processor connected to the master node through the slave node GPIO.

[0003] In the prior art, each node transmits and processes only one piece of information in each round, which limits the system's ability to process in parallel and leads to overall low efficiency. In addition, the information is transmitted and processed in order of priority, which may cause uncontrollable transmission delays for low-priority information, or even serious delays or even information loss due to long waiting times. Therefore, how to control GPIO to achieve efficient and timely multi-node information transmission has become an urgent problem to be solved. Summary of the invention

[0004] Based on the above problems, the present application provides a method, device and system for controlling the GPIO interface status of multiple nodes, so as to control GPIO to realize efficient and timely multi-node information transmission.

[0005] The present application discloses a method for controlling the GPIO interface states of multiple nodes, the method comprising:

[0006] According to the GPIO interface input state, configuration information, and values ​​of each virtual IO interface of the master node, the value of each virtual IO interface is modified to obtain state data; the GPIO interface input state is the state of the interface of the GPIO interface type being the input interface; the configuration information of the master node includes whether the type of the GPIO interface of the master node is an input interface or an output interface, and the corresponding relationship between the GPIO interface of the master node and each virtual IO interface;

[0007] The state data is transmitted to the first node, and if the GPIO interface of the first node is enabled, the value of each virtual IO interface is modified according to the state data, the input state of the GPIO interface of the first node, and the configuration information of the first node, and the state data is updated; the first node is a node arranged one position after the master node in the multi-node system;

[0008] Transmitting the state data downward, passing through each node in the multi-node system, and performing an operation of updating the state data in each node whose GPIO interface is enabled, until the state data is transmitted to the end node;

[0009] If the GPIO interface of the end node is enabled, responding to the output according to the current state data and the configuration information of the end node;

[0010] The current state data is transmitted to the second node, and if the GPIO interface of the second node is enabled, the value of each virtual IO interface is modified according to the current state data and the configuration information of the second node, the state data is updated, and a response output is output; the second node is a node arranged before the terminal node in the multi-node system;

[0011] Transmitting the state data upward, passing through each node in the multi-node system, and performing an operation of updating the state data in each node whose GPIO interface is enabled, and outputting a response until it is transmitted to the master node;

[0012] After a preset time has passed, the master node obtains the status data again and transmits it downward.

[0013] Optionally, before modifying the value of each virtual IO interface according to the GPIO interface input state and configuration information of the master node and the value of each virtual IO interface, the method further includes:

[0014] According to the GPIO data transmission requirements, enable the GPIO interface required by each node, and preset the virtual IO interface according to the number of processing relationships of the GPIO interfaces between the nodes;

[0015] Set the type of the GPIO interface of each node to input interface or output interface;

[0016] The corresponding relationship between the GPIO interface of each node and the virtual IO interface is set to obtain the configuration information of each node.

[0017] Optionally, transmitting the status data downward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, includes:

[0018] Transmitting the state data to a node a located one position after the first node in the multi-node system;

[0019] When the GPIO interface of the node a is not enabled, the state data is not processed and the state data continues to be transmitted downward;

[0020] When the GPIO interface of the a-node is enabled, an operation of updating the status data is performed.

[0021] Optionally, the setting of the correspondence between the GPIO interface of each node and the virtual IO interface includes:

[0022] When the interfaces of the input interface type among the GPIO interfaces of the multiple nodes correspond to the same first virtual IO interface, the value of the first virtual IO interface is the logical AND or logical OR of the input interface type among the GPIO interfaces of the multiple nodes;

[0023] When multiple virtual IO interfaces correspond to an output interface type in the GPIO interface of the same b-node, the output interface type in the GPIO interface of the b-node outputs the logical AND or logical OR of the values ​​of the multiple virtual IO interfaces.

[0024] Optionally, the preset time is greater than the time it takes for the status data to be transmitted downlink from the master node to the end node and then uplinked from the end node to the master node.

[0025] Optionally, when the bandwidth of the status data is greater than or equal to a preset bandwidth, the status data is transmitted once, and when the bandwidth is less than the preset bandwidth, the status data is transmitted multiple times through time division multiplexing.

[0026] Optionally, the register addresses of each node are consistent.

[0027] Optionally, the multi-node system is a daisy chain topology.

[0028] Based on the above method for controlling the GPIO interface states of multiple nodes, the present application also discloses a device for controlling the GPIO interface states of multiple nodes, including: a main node unit, a downward transmission unit, an end node unit, an upward transmission unit and a repeating unit;

[0029] The master node unit is used to modify the value of each virtual IO interface according to the GPIO interface input state, configuration information, and value of each virtual IO interface of the master node to obtain state data; the GPIO interface input state is the state of the interface of the GPIO interface whose type is the input interface; the configuration information of the master node includes the type of the GPIO interface of the master node as the input interface or the output interface, and the corresponding relationship between the GPIO interface of the master node and each virtual IO interface;

[0030] The downward transmission unit is used to transmit the status data to the first node, and if the GPIO interface of the first node is enabled, the value of each virtual IO interface is modified according to the status data, the GPIO interface input state of the first node, and the configuration information of the first node to update the status data; the first node is a node arranged one position after the master node in the multi-node system;

[0031] The downward transmission unit is used to transmit the status data downward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, until the status data is transmitted to the end node;

[0032] The end node unit is used to respond to output according to current state data and configuration information of the end node if the GPIO interface of the end node is enabled;

[0033] The upward transmission unit is used to transmit the current state data to the second node, and if the GPIO interface of the second node is enabled, modify the value of each virtual IO interface according to the current state data and the configuration information of the second node, update the state data, and respond to the output; the second node is the node arranged before the terminal node in the multi-node system;

[0034] The upward transmission unit is used to transmit the status data upward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, and responding to the output until it is transmitted to the master node;

[0035] The repeating unit is used for the master node to obtain the status data again and transmit it downward after a preset time has passed.

[0036] Optionally, the device further comprises:

[0037] An enabling unit, used to enable the GPIO interface required by each node according to the GPIO data transmission requirements, and preset a virtual IO interface according to the number of processing relationships of the GPIO interfaces between the nodes;

[0038] A setting unit, used to set the type of the GPIO interface of each node to an input interface or an output interface;

[0039] The setting unit is used to set the corresponding relationship between the GPIO interface of each node and the virtual IO interface to obtain the configuration information of each node.

[0040] Optionally, the downward transmission unit includes:

[0041] A downward transmission subunit, used to transmit the state data to a node a located one position after the first node in the multi-node system;

[0042] A skip subunit, configured to not process the status data and continue to transmit the status data downward when the GPIO interface of the node a is not enabled;

[0043] The updating subunit is used to execute the operation of updating the status data when the GPIO interface of the a-node is enabled.

[0044] Optionally, the setting unit includes:

[0045] A first subunit is used for, when the interfaces of the input interface type among the GPIO interfaces of the multiple nodes correspond to the same first virtual IO interface, the value of the first virtual IO interface is a logical AND or a logical OR of the input interface type among the GPIO interfaces of the multiple nodes;

[0046] The second subunit is used for, when multiple virtual IO interfaces correspond to interfaces of the output interface type in the GPIO interface of the same b node, the interface of the output interface type in the GPIO interface of the b node outputs the logical AND or logical OR of the values ​​of the multiple virtual IO interfaces.

[0047] Optionally, the preset time is greater than the time it takes for the status data to be transmitted downlink from the master node to the end node and then uplinked from the end node to the master node.

[0048] Optionally, when the bandwidth of the status data is greater than or equal to a preset bandwidth, the status data is transmitted once, and when the bandwidth is less than the preset bandwidth, the status data is transmitted multiple times through time division multiplexing.

[0049] Optionally, the register addresses of each node are consistent.

[0050] Optionally, the multi-node system is a daisy chain topology.

[0051] Based on the above method for controlling the GPIO interface states of multiple nodes, the present application also discloses a system for controlling the GPIO interface states of multiple nodes, which is used to implement the above method, and includes: a main controller, an external device, a master node, and a slave node;

[0052] The main controller is connected to the GPIO interface of the master node, and the external device is connected to the GPIO interface of the slave node;

[0053] The master controller transmits control information through the GPIO interface of the master node to the external device via the GPIO interface of the slave node;

[0054] The control information is used to control the output of the GPIO interface of the slave node;

[0055] The external device reports status information through the GPIO interface of the slave node to the main controller via the GPIO interface of the master node;

[0056] The status information is used to control the output of the GPIO interface of the master node.

[0057] The present application discloses a method, device and system for controlling the GPIO interface status of multiple nodes. According to the GPIO interface input status, configuration information and the value of each virtual IO interface of the master node, the value of each virtual IO interface is modified to obtain status data. According to the number of GPIO interface processing relationships of each node, the required number of virtual IO interfaces is flexibly determined, and the required virtual IO interfaces are defined to achieve effective utilization and dynamic adjustment of resources. The input and output modes of the GPIO interface of each node and the corresponding relationship with the virtual IO interface are configured to enhance the flexibility and adaptability of the system. The value of the virtual IO interface can be modified and the status data can be updated according to the status data, the GPIO interface input status of the node, and the configuration information of the node. The status data is transmitted downward to the end node, and the status containing the value of each virtual interface is transmitted and updated between the nodes. The status data is then transmitted upward and the response output is output. After a preset time, the master node obtains the status data again and transmits it downward. The GPIO status of each node can be identified and processed in each cycle to ensure the real-time response and processing capability of the system to the GPIO status change. The GPIO status of multiple nodes is effectively managed, and the scalability and multi-node processing capability of the system are improved. It can significantly improve the processing efficiency and response speed of the entire system, optimize the overall performance, and achieve efficient and timely transmission and processing of the GPIO status of multiple nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0059] Figure 1a A flowchart of a method for controlling the GPIO interface states of multiple nodes disclosed in an embodiment of the present application;

[0060] Figure 1b A schematic diagram of a multi-node configuration disclosed in an embodiment of the present application;

[0061] Figure 2A flowchart of another method for controlling the GPIO interface states of multiple nodes disclosed in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the structure of a device for controlling the GPIO interface states of multiple nodes disclosed in an embodiment of the present application;

[0063] Figure 4 A schematic diagram of the structure of a system for controlling the GPIO interface status of multiple nodes disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0064] 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.

[0065] Embodiment 1: The present application discloses a method for controlling the GPIO interface states of multiple nodes.

[0066] For details, please refer to Figure 1a , a method for controlling the GPIO interface states of multiple nodes disclosed in this embodiment includes the following steps:

[0067] Step 101: According to the GPIO interface input status and configuration information of the master node and the value of each virtual IO interface, the value of each virtual IO interface is modified to obtain status data.

[0068] In the method described in this embodiment, as an optional method, the multi-node system is a daisy chain topology, and the master node and each slave node in the multi-node system are connected in sequence. According to the GPIO data transmission requirements, the GPIO interface required by each node can be enabled, and the virtual IO interface can be preset according to the number of processing relationships between the GPIO interfaces of each node. For example, if there are 4 types of processing relationships between the GPIOs of each node, 4 virtual IO interfaces are preset and enabled.

[0069] In the method described in this embodiment, the type of the GPIO interface of each node is set to an input interface or an output interface, and the corresponding relationship between the GPIO interface of each node and the virtual IO interface is set to obtain the configuration information of each node.

[0070] The GPIO interface input state is the state of the interface of the GPIO interface type being the input interface. The configuration information of the master node includes whether the type of the GPIO interface of the master node is an input interface or an output interface, and the corresponding relationship between the GPIO interface of the master node and each of the virtual IO interfaces. The register addresses of each node are consistent.

[0071] In the method described in this embodiment, as an optional method, when setting the corresponding relationship, when the interfaces of the input interface type in the GPIO interfaces of multiple nodes correspond to the same first virtual IO interface, the value of the first virtual IO interface is the logical AND or logical OR of the input interface type in the GPIO interfaces of multiple nodes. When multiple virtual IO interfaces correspond to the interfaces of the output interface type in the GPIO interfaces of the same b node, the interface of the output interface type in the GPIO interface of the b node outputs the logical AND or logical OR of the values ​​of multiple virtual IO interfaces.

[0072] In the method described in this embodiment, each node is essentially a chip integrating multiple GPIO interfaces, and the functions of these GPIO interfaces can be flexibly configured according to actual needs. It is worth noting that even if a specific GPIO interface is not enabled (i.e., not enabled), since each GPIO interface has a preset correspondence with each virtual IO interface, it is necessary to check whether the GPIO interface has been enabled when discussing these correspondences later. If not enabled, the correspondence is deemed invalid in actual operation.

[0073] As an optional method, the first information indicating that the GPIO interface state of each node is high level, the second information indicating that the GPIO interface state of each node is low level, the third information indicating that the GPIO interface of each node is an input interface, and the fourth information indicating that the GPIO interface of each node is an output interface can be set to define the information of the GPIO interface. For example, the first information 0xFF indicates that the GPIO interface state of each node is high level, the second information 0x00 indicates that the GPIO interface state of each node is low level, the third information 0 indicates that the GPIO interface of each node is an input interface, and the fourth information 1 indicates that the GPIO interface of each node is an output interface.

[0074] Step 102: Transmit the status data to the first node. If the GPIO interface of the first node is enabled, modify the value of each virtual IO interface according to the status data, the GPIO interface input status of the first node, and the configuration information of the first node to update the status data.

[0075] In the method described in this embodiment, when the bandwidth of the status data is greater than or equal to the preset bandwidth, the entire status data set is transmitted in one go and without intervals. When the bandwidth is less than the preset bandwidth, in order to ensure the integrity of the data and the reliability of the transmission, the status data can be transmitted multiple times through time division multiplexing.

[0076] In the method described in this embodiment, the first node is a node arranged one position after the main node in the multi-node system. During the downlink transmission process, if each node enables the GPIO interface, the input status of the GPIO interface of each node will be identified, and the value of each virtual IO interface will be modified based on the current value of each virtual IO interface and the configuration information of each node. As an optional method, if the GPIO interface of the first node is enabled, after the first node receives the transmitted status data, the current value of each virtual IO interface can be obtained by parsing the status data. The first node modifies the value of each virtual IO interface according to the current value of each virtual IO interface, the input status of the GPIO interface of the first node and the configuration information of the first node.

[0077] If there is a node with a disabled GPIO interface during the downlink transmission, the node will not operate on the status data but will continue to transmit it downward.

[0078] Step 103: The status data is transmitted downward, passing through each node in the multi-node system, and an operation of updating the status data is performed in each node whose GPIO interface is enabled, until the status data is transmitted to the end node.

[0079] In the method described in this embodiment, the state data is transmitted to the node a located one position after the first node in the multi-node system. When the GPIO interface of the node a is not enabled, the state data is not processed and the state data is continuously transmitted downward. When the GPIO interface of the node a is enabled, the operation of updating the state data is performed.

[0080] Step 104: If the GPIO interface of the end node is enabled, a response output is performed according to the current state data and the configuration information of the end node.

[0081] Step 105: Transmit the current status data to the second node. If the GPIO interface of the second node is enabled, modify the value of each virtual IO interface according to the current status data and the configuration information of the second node, update the status data, and respond to the output.

[0082] In the method described in this embodiment, the second node is a node arranged before the terminal node in a multi-node system. If the GPIO interface of the second node is enabled, after the second node receives the transmitted current status data, it parses the status data to obtain the current values ​​of each virtual IO interface, and modifies the values ​​of each virtual IO interface according to the current values ​​of each virtual IO interface and the configuration information of the second node, and responds to the output. In the uplink transmission process, the input status of the GPIO interface of each node will not be identified, and the value of each virtual IO interface will be modified and the response output will be made only based on the current values ​​of each virtual IO interface and the configuration information of each node.

[0083] Step 106: The status data is transmitted upward, passing through each node in the multi-node system, and an operation of updating the status data is performed in each node whose GPIO interface is enabled, and a response output is output until it is transmitted to the master node.

[0084] Step 107: After a preset time has passed, the master node obtains the status data again and transmits it downward.

[0085] In the method described in this embodiment, the preset time is greater than the time for the status data to be transmitted from the master node to the end node and then transmitted from the end node to the master node. For example, it takes 20 μs for the status data to be transmitted from the master node to the end node in sequence, and it takes 20 μs for the status data to be transmitted from the end node to the master node in sequence, so the preset time should be greater than 40 μs.

[0086] In the method described in this embodiment, as an optional method, Figure 1b As shown, assume that the multi-node system has 1 master node and 4 slave nodes, and each node has 2 GPIO interfaces. The GPIO interfaces of the master node are GPIO0_0 and GPIO0_1, the GPIO interfaces of slave node 1 are GPIO1_0 and GPIO1_1, the GPIO interfaces of slave node 2 are GPIO2_0 and GPIO2_1, the GPIO interfaces of slave node 3 are GPIO3_0 and GPIO3_1, and the GPIO interfaces of slave node 4 are GPIO4_0 and GPIO4_1. Assume that 0xFF indicates that the GPIO interface state of each node is high, 0x00 indicates that the GPIO interface state of each node is low, 0 indicates that the GPIO interface of each node is an input interface, and 1 indicates that the GPIO interface of each node is an output interface. The GPIO interface configuration table of each node is as follows:

[0087] Table 1 GPIO interface configuration table

[0088]

[0089]

[0090] Assume that there are two kinds of processing relationships between the GPIO interfaces of the master node and the four slave nodes, namely processing relationship 0 and processing relationship 1. Therefore, two virtual IO interfaces are defined, namely VIO_0 and VIO_1. Among them, processing relationship 0 is that the control information is transmitted to the GPIO2_1 interface of slave node 2 through the GPIO0_0 interface of the master node, and the output of the GPIO2_1 interface of slave node 2 is equal to the input of the GPIO_0 interface of the master node. Processing relationship 1 is that the GPIO3_0 interface of slave node 3 and the GPIO4_0 interface of slave node 4 both report status information to the GPIO0_1 interface of the master node, then the output of the GPIO0_1 interface of the master node is equal to the logical OR of the input of the GPIO3_0 interface of slave node 3 and the input of the GPIO4_0 interface of slave node 4. The corresponding relationship table is as follows:

[0091]

[0092] In the assumption of the method described in this embodiment, GPIO1_0 of slave node 1 corresponds to VIO_0 by default, GPIO1_1 of slave node 1 corresponds to VIO_1 by default, GPIO2_0 of slave node 2 corresponds to VIO_0 by default, GPIO3_1 of slave node 3 corresponds to VIO_1 by default, and GPIO4_1 of slave node 4 corresponds to VIO_1 by default, but because these GPIO interfaces are not enabled, the corresponding relationship is invalid.

[0093] In the assumption of the method described in this embodiment, initially, the GPIO interface states of each node are all low level, that is, the values ​​of GPIO0_0, GPIO0_1, GPIO1_0, GPIO1_1, GPIO2_0, GPIO2_1, GPIO3_0, GPIO3_1, GPIO4_0, and GPIO4_1 are all 0x00, and the values ​​of VIO_0 and VIO_1 are also 0x00. The GPIO0_0 (input) interface of the master node is enabled, the GPIO0_1 (output) interface is enabled, and GPIO0_0 corresponds to VIO_0, and GPIO0_1 corresponds to VIO_1.

[0094] The interface state of GPIO0_0 (input) of the master node changes to a high level, that is, the value of GPIO0_0 changes to 0xFF, then the value of VIO_0 changes to 0xFF, the value of VIO_1 remains 0x00, and the status data is transmitted downstream to slave node 1. If both the GPIO1_0 interface and the GPIO1_1 interface of slave node 1 are not enabled, slave node 1 does not process, the value of VIO_0 is 0xFF, the value of VIO_1 is 0x00, and the status data is transmitted downstream to slave node 2.

[0095] The GPIO2_0 (input) interface of slave node 2 is not enabled, the GPIO2_1 (output) interface is enabled, and GPIO2_1 corresponds to VIO_0. The GPIO2_0 interface of slave node 2 is used as an input interface and is not enabled, so the values ​​of VIO_0 and VIO_1 are not changed, the value of VIO_0 is still 0xFF, the value of VIO_1 is still 0x00, and the status data is transmitted downstream to slave node 3. The GPIO3_0 (input) interface of slave node 3 is enabled, the GPIO3_1 (output) interface is not enabled, and GPIO3_0 corresponds to VIO_1. If the interface state of GPIO3_0 (input) of slave node 3 is still low at this time, that is, the value of GPIO3_0 is still 0x00, then the value of VIO_0 is 0xFF, and the value of VIO_1 is 0x00. The status data is transmitted downstream to slave node 4.

[0096] The GPIO4_0 (input) interface of slave node 4 is enabled, the GPIO4_1 (output) interface is not enabled, and GPIO4_0 corresponds to VIO_1. If the interface state of GPIO4_0 (input) of slave node 4 becomes high level, that is, the value of GPIO4_0 becomes 0xFF, then the value of VIO_0 becomes 0xFF, and the value of VIO_1 becomes 0xFF. At this time, slave node 4 is the end node, and the GPIO4_1 interface of slave node 4 is used as the output interface, which is not enabled, has no response output, and transmits status data to slave node 3 in the uplink.

[0097] The GPIO3_0 (input) interface of slave node 3 is enabled, the GPIO3_1 (output) interface is not enabled, and GPIO3_0 corresponds to VIO_1. The GPIO3_1 interface of slave node 3 is used as an output interface, not enabled, and no response output. During the uplink transmission process, the input state of the GPIO3_0 interface of slave node 3 is not recognized, so the value of VIO_0 is still 0xFF, and the value of VIO_1 is still 0xFF. Uplink transmission status data to slave node 2. The GPIO2_0 (input) interface of slave node 2 is not enabled, the GPIO2_1 (output) interface is enabled, and GPIO2_1 corresponds to VIO_0, so the value of GPIO2_1 of the slave node becomes 0xFF, and the interface state of GPIO2_1 becomes high level. The GPIO2_0 interface of slave node 2 is used as an input interface, not enabled, the value of VIO_0 is still 0xFF, the value of VIO_1 is still 0xFF, and the uplink transmission status data is to slave node 1.

[0098] If the GPIO1_0 interface and GPIO1_1 interface of slave node 1 are both disabled, slave node 1 will not be processed, the value of VIO_0 is still 0xFF, the value of VIO_1 is still 0xFF, and the status data is transmitted to the master node in the uplink. The GPIO0_0 (input) interface of the master node is enabled, the GPIO0_1 (output) interface is enabled, and GPIO0_0 corresponds to VIO_0, and GPIO0_1 corresponds to VIO_1. During the uplink transmission process, the input status of the GPIO0_0 interface of the master node is not recognized, the value of VIO_0 is still 0xFF, and the value of VIO_1 is still 0xFF. Therefore, the value of GPIO0_1 of the master node becomes 0xFF, and the interface status of GPIO0_1 becomes high level.

[0099] The above is an example of the method described in this embodiment. The complete process of data transmission is to control the GPIO2_1 interface (output) of slave node 2 to also become high level by changing the GPIO0_0 interface (input) of the master node to a high level, and when the GPIO3_0 interface (input) of slave node 3 or the GPIO4_0 interface (input) of slave node 4 is high level, the GPIO0_1 interface (output) of the master node will also become high level. In this way, the GPIO status of each node is identified and processed, and the GPIO status of multiple nodes can be transmitted and processed efficiently and timely.

[0100] The method described in this embodiment achieves efficient GPIO state management by defining a virtual IO interface and flexibly configuring it according to the GPIO interface processing relationship of each node. It supports periodic state updates. At preset intervals, the master node automatically modifies the value of the virtual IO interface according to the current state to ensure that the GPIO state of all nodes is updated in a timely manner. The GPIO state of each node can be identified and processed in each cycle, ensuring the timeliness of data transmission and processing. At the same time, it also has flexible configuration and scalability. According to the actual needs of each node, the input and output relationship of the virtual IO interface and the GPIO interface can be flexibly defined and configured, and it is easy to expand to adapt to node networks of different sizes. In addition, the integrated control and decentralized processing of multi-node GPIO states are realized through a unified method, which improves the overall efficiency and reliability of the system. Improves system scalability and multi-node processing capabilities.

[0101] Embodiment 2: This application discloses another method for controlling the GPIO interface status of multiple nodes, please refer to Figure 2 The method described in this embodiment introduces the data transmission process at each point.

[0102] Step 201: according to the GPIO data transmission requirements, the GPIO interface required by each node is enabled, and a virtual IO interface is preset according to the number of processing relationships of the GPIO interfaces between the nodes.

[0103] In the method described in this embodiment, it is assumed that the GPIO interfaces of all nodes are enabled. In actual work, the nodes whose GPIO interfaces are not enabled do not operate the state data, but directly pass the data to the next node.

[0104] Step 202: Set the type of the GPIO interface of each node to an input interface or an output interface, set the corresponding relationship between the GPIO interface of each node and the virtual IO interface, and obtain the configuration information of each node.

[0105] Step 203: According to the GPIO interface input state and configuration information of the master node and the value of each virtual IO interface, the value of each virtual IO interface is modified to obtain state data, and the state data is transmitted to the next node.

[0106] In the method described in this embodiment, the next node is a node in the downlink transmission direction of the multi-node system.

[0107] Step 204: Determine whether the receiving node is an end node. If yes, proceed to step 206. If no, proceed to step 205.

[0108] Step 205: Receive the status data, modify the value of each virtual IO interface according to the GPIO interface input status and configuration information of the current node, and the value of each virtual IO interface, update the status data, and transmit the status data to the next node. Return to step 204.

[0109] Step 206: The end node modifies the value of each virtual IO interface according to the GPIO interface input state of the end node, the configuration information of the end node, and the value of each virtual IO interface, updates the state data, and responds to the output.

[0110] Step 207: Transmit the status data to the previous node.

[0111] In the method described in this embodiment, the previous node is a node in the uplink transmission direction in the multi-node system.

[0112] Step 208: According to the configuration information of the receiving node and the value of each virtual IO interface, the value of each virtual IO interface is modified, the state data is updated, and a response output is performed.

[0113] Step 209: Determine whether the receiving node is a master node. If yes, proceed to step 210. If no, proceed to step 207.

[0114] Step 209: Wait for a preset time and then return to step 203.

[0115] Based on the method for controlling the GPIO interface states of multiple nodes disclosed in the above embodiment, this embodiment correspondingly discloses a device for controlling the GPIO interface states of multiple nodes. Figure 3 , the device for controlling the GPIO interface status of multiple nodes includes: a main node unit 301, a downward transmission unit 302, an end node unit 303, an upward transmission unit 304 and a repeating unit 305;

[0116] The master node unit 301 is used to modify the value of each virtual IO interface according to the GPIO interface input state, configuration information, and value of each virtual IO interface of the master node to obtain state data; the GPIO interface input state is the state of the interface of the GPIO interface type being the input interface; the configuration information of the master node includes whether the type of the GPIO interface of the master node is an input interface or an output interface, and the corresponding relationship between the GPIO interface of the master node and each virtual IO interface;

[0117] The downward transmission unit 302 is used to transmit the status data to the first node. If the GPIO interface of the first node is enabled, the value of each virtual IO interface is modified according to the status data, the input status of the GPIO interface of the first node, and the configuration information of the first node to update the status data; the first node is a node arranged one position after the master node in the multi-node system;

[0118] The downward transmission unit 302 is used to transmit the status data downward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, until the status data is transmitted to the end node;

[0119] The end node unit 303 is used to respond and output according to the current state data and the configuration information of the end node if the GPIO interface of the end node is enabled;

[0120] The upward transmission unit 304 is used to transmit the current state data to the second node. If the GPIO interface of the second node is enabled, the value of each virtual IO interface is modified according to the current state data and the configuration information of the second node, the state data is updated, and the response output is output; the second node is the node arranged before the terminal node in the multi-node system;

[0121] The upward transmission unit 304 is used to transmit the status data upward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, and responding to the output until it is transmitted to the master node;

[0122] The repeating unit 305 is used for the master node to obtain the status data again and transmit it downward after a preset time has passed.

[0123] Optionally, the device further comprises:

[0124] An enabling unit, used to enable the GPIO interface required by each node according to the GPIO data transmission requirements, and preset a virtual IO interface according to the number of processing relationships of the GPIO interfaces between the nodes;

[0125] A setting unit, used to set the type of the GPIO interface of each node to an input interface or an output interface;

[0126] The setting unit is used to set the corresponding relationship between the GPIO interface of each node and the virtual IO interface to obtain the configuration information of each node.

[0127] Optionally, the downward transmission unit includes:

[0128] A downward transmission subunit, used to transmit the state data to a node a located one position after the first node in the multi-node system;

[0129] A skip subunit, configured to not process the status data and continue to transmit the status data downward when the GPIO interface of the node a is not enabled;

[0130] The updating subunit is used to execute the operation of updating the status data when the GPIO interface of the a-node is enabled.

[0131] Optionally, the setting unit includes:

[0132] A first subunit is used for, when the interfaces of the input interface type among the GPIO interfaces of the multiple nodes correspond to the same first virtual IO interface, the value of the first virtual IO interface is a logical AND or a logical OR of the input interface type among the GPIO interfaces of the multiple nodes;

[0133] The second subunit is used for, when multiple virtual IO interfaces correspond to interfaces of the output interface type in the GPIO interface of the same b node, the interface of the output interface type in the GPIO interface of the b node outputs the logical AND or logical OR of the values ​​of the multiple virtual IO interfaces.

[0134] Optionally, the preset time is greater than the time it takes for the status data to be transmitted downlink from the master node to the end node and then uplinked from the end node to the master node.

[0135] Optionally, when the bandwidth of the status data is greater than or equal to a preset bandwidth, the status data is transmitted once, and when the bandwidth is less than the preset bandwidth, the status data is transmitted multiple times through time division multiplexing.

[0136] Optionally, the register addresses of each node are consistent.

[0137] Optionally, the multi-node system is a daisy chain topology.

[0138] Based on the method for controlling the GPIO interface status of multiple nodes disclosed in the above embodiment, this embodiment correspondingly discloses a system for controlling the GPIO interface status of multiple nodes, which is used to implement the above method. Figure 4 , the system comprises: a main controller, an external device, a master node and a slave node;

[0139] The main controller is connected to the GPIO interface of the master node, and the external device is connected to the GPIO interface of the slave node;

[0140] The master controller transmits control information through the GPIO interface of the master node to the external device via the GPIO interface of the slave node;

[0141] The control information is used to control the output of the GPIO interface of the slave node;

[0142] The external device reports status information through the GPIO interface of the slave node to the main controller via the GPIO interface of the master node;

[0143] The status information is used to control the output of the GPIO interface of the master node.

[0144] The embodiments in this specification are described in a progressive manner. As for the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the methods.

[0145] It should also 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.

[0146] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0147] The features described in the embodiments of this specification can be replaced or combined with each other, so that professional and technical personnel in this field can implement or use the present application.

[0148] 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 method for controlling the GPIO interface status of multiple nodes, characterized in that: include: According to the GPIO interface input state, configuration information, and values ​​of each virtual IO interface of the master node, the value of each virtual IO interface is modified to obtain state data; the GPIO interface input state is the state of the interface of the GPIO interface type being the input interface; the configuration information of the master node includes whether the type of the GPIO interface of the master node is an input interface or an output interface, and the corresponding relationship between the GPIO interface of the master node and each virtual IO interface; The state data is transmitted to the first node, and if the GPIO interface of the first node is enabled, the value of each virtual IO interface is modified according to the state data, the input state of the GPIO interface of the first node, and the configuration information of the first node, and the state data is updated; the first node is a node arranged one position after the master node in the multi-node system; Transmitting the state data downward, passing through each node in the multi-node system, and performing an operation of updating the state data in each node whose GPIO interface is enabled, until the state data is transmitted to the end node; If the GPIO interface of the end node is enabled, responding to the output according to the current state data and the configuration information of the end node; The current state data is transmitted to the second node, and if the GPIO interface of the second node is enabled, the value of each virtual IO interface is modified according to the current state data and the configuration information of the second node, the state data is updated, and a response output is output; the second node is a node arranged before the terminal node in the multi-node system; Transmitting the state data upward, passing through each node in the multi-node system, and performing an operation of updating the state data in each node whose GPIO interface is enabled, and outputting a response until it is transmitted to the master node; After a preset time has passed, the master node obtains the status data again and transmits it downward.

2. The method according to claim 1, characterized in that Before modifying the value of each virtual IO interface according to the GPIO interface input state and configuration information of the master node and the value of each virtual IO interface, the method further includes: According to the GPIO data transmission requirements, enable the GPIO interface required by each node, and preset the virtual IO interface according to the number of processing relationships of the GPIO interfaces between the nodes; Set the type of the GPIO interface of each node to input interface or output interface; The corresponding relationship between the GPIO interface of each node and the virtual IO interface is set to obtain the configuration information of each node.

3. The method according to claim 1, characterized in that The state data is transmitted downward, passing through each node in the multi-node system, and an operation of updating the state data is performed in each node whose GPIO interface is enabled, including: Transmitting the state data to a node a located one position after the first node in the multi-node system; When the GPIO interface of the node a is not enabled, the state data is not processed and the state data continues to be transmitted downward; When the GPIO interface of the a-node is enabled, an operation of updating the status data is performed.

4. The method according to claim 2, characterized in that: The setting of the correspondence between the GPIO interface of each node and the virtual IO interface includes: When the interfaces of the input interface type among the GPIO interfaces of the multiple nodes correspond to the same first virtual IO interface, the value of the first virtual IO interface is the logical AND or logical OR of the input interface type among the GPIO interfaces of the multiple nodes; When multiple virtual IO interfaces correspond to an output interface type in the GPIO interface of the same b-node, the output of the output interface type in the GPIO interface of the b-node is the logical AND or logical OR of the values ​​of the multiple virtual IO interfaces.

5. The method according to claim 1, characterized in that The preset time is greater than the time it takes for the status data to be transmitted from the master node to the end node and then transmitted from the end node to the master node.

6. The method according to any one of claims 1 to 5, characterized in that: When the bandwidth of the status data is greater than or equal to the preset bandwidth, the status data is transmitted once, and when the bandwidth is less than the preset bandwidth, the status data is transmitted multiple times by time division multiplexing.

7. The method according to any one of claims 1 to 5, characterized in that: The register addresses of each node are consistent.

8. The method according to any one of claims 1 to 5, characterized in that: The multi-node system is a daisy chain topology.

9. A device for controlling the GPIO interface status of multiple nodes, characterized in that: include: Main node unit, downward transmission unit, end node unit, upward transmission unit and repeating unit; The master node unit is used to modify the value of each virtual IO interface according to the GPIO interface input state, configuration information, and value of each virtual IO interface of the master node to obtain state data; the GPIO interface input state is the state of the interface of the GPIO interface whose type is the input interface; the configuration information of the master node includes the type of the GPIO interface of the master node as the input interface or the output interface, and the corresponding relationship between the GPIO interface of the master node and each virtual IO interface; The downward transmission unit is used to transmit the status data to the first node, and if the GPIO interface of the first node is enabled, the value of each virtual IO interface is modified according to the status data, the GPIO interface input state of the first node, and the configuration information of the first node to update the status data; the first node is a node arranged one position after the master node in the multi-node system; The downward transmission unit is used to transmit the status data downward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, until the status data is transmitted to the end node; The end node unit is used to respond to output according to current state data and configuration information of the end node if the GPIO interface of the end node is enabled; The upward transmission unit is used to transmit the current state data to the second node, and if the GPIO interface of the second node is enabled, modify the value of each virtual IO interface according to the current state data and the configuration information of the second node, update the state data, and respond to the output; the second node is the node arranged before the terminal node in the multi-node system; The upward transmission unit is used to transmit the status data upward, passing through each node in the multi-node system, and performing an operation of updating the status data in each node whose GPIO interface is enabled, and responding to the output until it is transmitted to the master node; The repeating unit is used for the master node to obtain the status data again and transmit it downward after a preset time has passed.

10. A system for controlling the GPIO interface status of multiple nodes, characterized in that: The method for use in claims 1-8, comprising: a main controller, an external device, a master node and a slave node; The main controller is connected to the GPIO interface of the master node, and the external device is connected to the GPIO interface of the slave node; The master controller transmits control information through the GPIO interface of the master node to the external device via the GPIO interface of the slave node; The control information is used to control the output of the GPIO interface of the slave node; The external device reports status information through the GPIO interface of the slave node to the main controller via the GPIO interface of the master node; The status information is used to control the output of the GPIO interface of the master node.

Citation Information

Patent Citations

  • Virtual general-purpose i / o controller

    CN106062714A

  • GPIO-TO-GPIO communication on a multi-node daisy-chained network

    CN107025200A

  • GPIO (General Purpose Input / Output) interface control method and system, storage medium and equipment

    CN115794693A

  • Low-delay GPIO communication system and communication method

    CN118642991A

  • GPIO communication system and communication method

    CN118642992A