A switching system and method for a server multi-port UART switch

By designing a UART switching system that includes a multiplexer chip and an automatic baud rate detection module, the problems of untimely UART switching and high cost in the existing technology are solved. It realizes efficient UART signal selection and debugging functions, and improves development efficiency.

CN115934611BActive Publication Date: 2026-06-12INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2022-12-31
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing multi-port UART switch function of the server requires an external chip to send commands to the CPLD, which leads to untimely switching, affects debugging, and increases the cost of the chassis and affects the aesthetics.

Method used

Design a server multi-port UART switch system, including a multiplexer chip, a UART interface and external devices. Automatic switching of UART transmit and receive is achieved through an automatic baud rate detection module and an unlocking module. Developers can select the UART signal source and perform debugging from the PC.

🎯Benefits of technology

It improves the efficiency of server system development, allowing developers to debug without opening the chassis, reducing costs and simplifying the design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934611B_ABST
    Figure CN115934611B_ABST
Patent Text Reader

Abstract

The application provides a switching system and method for a server multi-port UART switch, and belongs to the technical field of server UART interface switching.The system comprises a UART debugging interface, a UART sending switch, a UART receiving switch, an automatic baud rate detection module, a UART sending signal generation module, an unlocking module, a UART interface and at least two external devices;the UART sending switch and the UART receiving switch are connected with the UART debugging interface and each external device;the UART sending switch is also connected with the UART interface;the automatic baud rate detection module is connected with the UART interface, the UART sending signal generation module and the unlocking module;the unlocking module is connected with the UART sending switch and the UART receiving switch;and the UART sending signal generation module is connected with the UART receiving switch.The application facilitates selection of a UART signal source from a PC end and issuance of a debugging signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of server UART interface switching technology, specifically relating to a switching system and method for a server multi-port UART switch. Background Technology

[0002] With the rapid development of electronic technology in recent years, various interface technologies have emerged. For example, the use of interface technologies such as UART, SPI, and I2C is becoming increasingly widespread. The UART interface, or Universal Asynchronous Receiver / Transmitter, is often used in embedded systems because of its simple architecture and ease of use. It is used to communicate with a PC to achieve functions such as monitoring, debugging, and troubleshooting.

[0003] The UART interface works by transmitting data bytes in bit order, with the UART at the other end assembling the bits into bytes. Each UART contains a shift register, and sequential communication via a single wire or other medium is less costly than parallel communication via multiple wires.

[0004] In server system development, similar to embedded systems, the UART interface is widely used for debugging and troubleshooting. Modern server systems, including chips such as BMC, PCH, and CPLD, all require UART interfaces for debugging and troubleshooting during the functional verification phase. Assuming the server chassis only allows one external UART interface, a multiplexer can be used internally during server system development to select one of the internal UART interfaces. For example, a CPLD can be used to implement a multi-port UART switch function, saving costs and simplifying the design.

[0005] However, existing methods using CPLDs to implement multi-port UART switching functions have advantages such as low cost and simple CPLD design. However, the switching of existing multi-port UART switches requires external chips to send commands to the CPLD to complete the switching function. If the external chip powers on too slowly or malfunctions and fails to switch in time, the UART signals to be transmitted to the PC may not be transmitted, thus affecting the debugging process for developers.

[0006] Furthermore, if the switching of the multi-port UART switch is not done by sending commands from the chip to the CPLD, but instead a physical switch is set on the chassis and the signal of the switch is transmitted to the CPLD, although it may achieve the purpose of switching, this will increase the development cost of the chassis and affect the aesthetics of the chassis, so it is not advisable.

[0007] This is a shortcoming of the existing technology. Therefore, it is very necessary to provide a switching system and method for a server multi-port UART switch to address the above-mentioned defects in the existing technology. Summary of the Invention

[0008] To address the shortcomings of existing server multi-port UART switch functions, which require external chips to send commands to the CPLD, rely on external chips, cannot switch in a timely manner, and affect debugging, this invention provides a server multi-port UART switch switching system and method to solve the above-mentioned technical problems.

[0009] In a first aspect, the present invention provides a switching system for a server multi-port UART switch, including a multiplexer chip, a UART interface, and at least two external devices;

[0010] The multiplexer chip includes a UART switch and a UART debug interface;

[0011] The UART switch includes a UART transmit switch, a UART receive switch, an automatic baud rate detection module, a UART transmit signal generation module, and an unlocking module;

[0012] Both the UART transmit switch and the UART receive switch are connected to the UART conditioning interface and each external device.

[0013] The UART transmit switch is also connected to the UART interface;

[0014] The automatic baud rate detection module is connected to the UART interface, the UART transmit signal generation module, and the unlocking module.

[0015] The unlocking module is connected to both the UART transmit switch and the UART receive switch.

[0016] The UART transmit signal generation module is connected to the UART receive switch.

[0017] Furthermore, it also includes a command decoding module;

[0018] The command decoding module is connected to the unlocking module and at least one external device. The command decoding module receives commands from the external device to switch the UART switch.

[0019] Furthermore, each external device is connected to the UART transmit switch via a transmit signal line and to the UART receive switch via a receive signal line.

[0020] Furthermore, the UART debug interface is connected to the UART transmit switch via a debug transmit signal line and to the UART receive switch via a debug receive signal line. The UART debug interface receives commands from the PC to switch the UART switch; the UART debug interface allows developers to debug the CPLD without opening the server chassis, bringing convenience to CPLD developers.

[0021] Furthermore, the UART interface is equipped with a receiving terminal;

[0022] The UART transmit switch is connected to the receive terminal of the UART interface via the transmit signal line.

[0023] Furthermore, the UART interface is equipped with a transmit terminal;

[0024] The automatic baud rate detection module is connected to the transmit terminal of the UART interface;

[0025] The automatic baud rate detection signal and the UART transmit signal module are connected via the transmit data signal line and the baud rate signal line;

[0026] The automatic baud rate detection signal and the unlocking module are connected via a transmit data signal line. The automatic baud rate detection signal module selects whether to receive the UART switching signal from the PC based on the baud rate.

[0027] Furthermore, the multiplexer chip uses either a CPLD chip or an FPGA chip. Choosing a CPLD chip or an FPGA chip reduces costs.

[0028] Secondly, the present invention provides a method for switching a server multi-port UART switch based on the first aspect described above, comprising the following steps:

[0029] S1. The automatic baud rate detection module parses the transmitted data and transmission baud rate of the UART port, provides the transmitted data of the UART port to the UART transmission signal generation module, and selects whether to send an unlock signal to the unlock module according to the transmission baud rate;

[0030] S2. The unlocking module selects the port of the corresponding external device based on the unlocking signal and strobe signal sent by the automatic baud rate detection module or command decoding module.

[0031] S3. The UART transmit switch and UART receive switch communicate with the corresponding external devices using the port selected by the unlock module or the port selected by the UART debug interface, and perform error debugging on the multiplexer chip using the port selected by the UART debug interface.

[0032] Furthermore, the specific steps of step S1 are as follows:

[0033] S11. The automatic baud rate detection module parses the signals of the UART interface's transmit terminal to obtain the transmit data and transmit baud rate of the UART port;

[0034] S12. The automatic baud rate detection module determines the transmit baud rate of the UART port;

[0035] When the transmit baud rate of the UART port is the preset unlock baud rate, proceed to step S13;

[0036] When the transmit baud rate of the UART port is the preset communication baud rate, proceed to step S14;

[0037] S13. The automatic baud rate detection module sends an unlock signal and a strobe signal to the unlock module;

[0038] S14. The automatic baud rate detection module sends data to the UART signal generation module, initiates the parallel-to-serial data conversion, and then provides it to the UART receive switch.

[0039] Furthermore, the specific steps of step S2 are as follows:

[0040] S21. The unlocking module determines whether it has received an unlocking signal from the automatic baud rate detection module;

[0041] If so, proceed to step S22;

[0042] If not, proceed to step S23;

[0043] S22. The unlocking module receives the strobe signal sent by the automatic baud rate detection module according to the preset rules, and proceeds to step S24;

[0044] S23. The unlocking module determines whether it has received a strobe signal obtained from an external device by the command decoding module;

[0045] If so, proceed to step S24;

[0046] If not, proceed to step S3;

[0047] S24. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch as the communication port according to the strobe signal.

[0048] Furthermore, the specific steps of step S3 are as follows:

[0049] S31. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the unlock module;

[0050] If so, proceed to step S33;

[0051] If not, proceed to step S32;

[0052] S32. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the UART debug interface;

[0053] If so, proceed to step S33;

[0054] If not, proceed to step S34;

[0055] S33. The UART transmit switch and UART receive switch use the selected port to communicate with the corresponding external device, and then the communication ends;

[0056] S34. Determine whether the UART transmit switch and UART receive switch have received the debugging signal from the UART debug interface;

[0057] If so, proceed to step S35;

[0058] If not, end;

[0059] The S35.UART transmit switch and UART receive switch receive debugging signals from the PC via the UART debug interface to debug the multiplexer chip.

[0060] The beneficial effects of this invention are as follows:

[0061] The server multi-port UART switch switching system and method provided by this invention enables developers to select the source of the UART signal from the PC during the server system development stage, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging for developers.

[0062] Furthermore, the design principle of this invention is reliable, the structure is simple, and it has a very wide range of application prospects.

[0063] Therefore, it is evident that the present invention has outstanding substantive features and significant progress compared with the prior art, and the beneficial effects of its implementation are also obvious. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 This is a schematic diagram of the switching system for the server multi-port UART switch of the present invention.

[0066] Figure 2 This is a flowchart illustrating Embodiment 4 of the server multi-port UART switch switching method of the present invention.

[0067] Figure 3This is a flowchart of Embodiment 5 of the server multi-port UART switch switching method of the present invention.

[0068] In the diagram, 1-Multiplexer chip; 2-UART interface; 3-External device; 3.1-First external device; 3.2-Second external device; 4-UART switch; 5-UART debug interface; 6-UART transmit switch; 7-UART receive switch; 8-Automatic baud rate detection module; 9-UART transmit signal generation module; 10-Unlock module; 11-Command decoding module. Detailed Implementation

[0069] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0070] Example 1:

[0071] like Figure 1 As shown, the present invention provides a switching system for a server multi-port UART switch, including a multiplexer chip 1, a UART interface 2, and at least two external devices 3;

[0072] The multiplexer chip 1 includes a UART switch 4 and a UART debug interface 5;

[0073] UART switch 4 includes UART transmit switch 6, UART receive switch 7, automatic baud rate detection module 8, UART transmit signal generation module 9, and unlock module 10;

[0074] Both the UART transmit switch 6 and the UART receive switch 7 are connected to the UART conditioning interface 5 and each external device 3.

[0075] UART transmit switch 6 is also connected to UART interface 2;

[0076] The automatic baud rate detection module 8 is connected to the UART interface 2, the UART transmit signal generation module 9, and the unlocking module 10.

[0077] The unlocking module 10 is connected to both the UART transmit switch 6 and the UART receive switch 7;

[0078] The UART transmit signal generation module 9 is connected to the UART receive switch 7.

[0079] The server multi-port UART switch switching system provided by this invention enables developers to select the source of the UART signal from the PC during the server system development phase, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging.

[0080] Example 2:

[0081] like Figure 1 As shown, the present invention provides a switching system for a server multi-port UART switch, including a multiplexer chip 1, a UART interface 2, and at least two external devices 3; the multiplexer chip 1 is a CPLD chip or an FPGA chip;

[0082] The multiplexer chip 1 includes a UART switch 4 and a UART debug interface 5;

[0083] UART switch 4 includes UART transmit switch 6, UART receive switch 7, automatic baud rate detection module 8, UART transmit signal generation module 9, and unlock module 10;

[0084] Both the UART transmit switch 6 and the UART receive switch 7 are connected to the UART conditioning interface 5 and each external device 3.

[0085] UART transmit switch 6 is also connected to UART interface 2;

[0086] The automatic baud rate detection module 8 is connected to the UART interface 2, the UART transmit signal generation module 9, and the unlocking module 10.

[0087] The unlocking module 10 is connected to both the UART transmit switch 6 and the UART receive switch 7;

[0088] UART transmit signal generation module 9 is connected to UART receive switch 7;

[0089] It also includes command decoding module 11;

[0090] Command decoding module 11 is connected to unlocking module 10 and at least one external device 3;

[0091] Each external device 3 is connected to the UART transmit switch 6 via a transmit signal line and to the UART receive switch 7 via a receive signal line;

[0092] UART debug interface 5 is connected to UART transmit switch 6 via debug transmit signal line DEBUG UART TX, and to UART receive switch 7 via debug receive signal line DEBUG UART RX;

[0093] UART interface 2 is equipped with a receiver terminal HOST RX;

[0094] UART transmit switch 6 is connected to the receive terminal HOST RX of UART interface 2 via the transmit signal line;

[0095] UART interface 2 is equipped with a transmit terminal HOST TX;

[0096] The automatic baud rate detection module 8 is connected to the transmit terminal HOST TX of the UART interface 2;

[0097] The automatic baud rate detection signal 8 and the UART transmit signal module 9 are connected via the transmit data signal line and the baud rate signal line;

[0098] The automatic baud rate detection signal 8 is connected to the unlocking module 10 via a transmit data signal line.

[0099] The server multi-port UART switch switching system provided by this invention enables developers to select the source of the UART signal from the PC during the server system development phase, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging.

[0100] Example 3:

[0101] like Figure 1 As shown, the present invention provides a switching system for a server multi-port UART switch, including a multiplexer chip 1, a UART interface 2, a first external device 3.1, and a second external device 3.2; the multiplexer chip 1 adopts a CPLD chip or an FPGA chip;

[0102] The multiplexer chip 1 includes a UART switch 4 and a UART debug interface 5;

[0103] UART switch 4 includes UART transmit switch 6, UART receive switch 7, automatic baud rate detection module 8, UART transmit signal generation module 9, and unlock module 10;

[0104] Both the UART transmit switch 6 and the UART receive switch 7 are connected to the UART conditioning interface 5 and each external device 3.

[0105] UART transmit switch 6 is also connected to UART interface 2;

[0106] The automatic baud rate detection module 8 is connected to the UART interface 2, the UART transmit signal generation module 9, and the unlocking module 10.

[0107] The unlocking module 10 is connected to both the UART transmit switch 6 and the UART receive switch 7;

[0108] UART transmit signal generation module 9 is connected to UART receive switch 7;

[0109] It also includes command decoding module 11;

[0110] Command decoding module 11 and unlocking module 10 are connected to the first external device 3.1; command decoding module 11 receives commands from the external device to switch the UART switch;

[0111] The first external device 3.1 is connected to the UART transmit switch 6 via the transmit signal line TX1 and to the UART receive switch 7 via the receive signal line RX1;

[0112] The second external device 3.2 is connected to the UART transmit switch 6 via the transmit signal line TX2, and to the UART receive switch 7 via the receive signal line RX2;

[0113] UART debug interface 5 is connected to UART transmit switch 6 via debug transmit signal line DEBUG UART TX, and to UART receive switch 7 via debug receive signal line DEBUG UART RX; UART debug interface 5 receives commands from the PC to switch the UART switch; UART debug interface allows developers to debug CPLD without opening the server chassis, bringing convenience to CPLD developers;

[0114] UART interface 2 is equipped with a receiver terminal HOST RX;

[0115] UART transmit switch 6 is connected to the receive terminal HOST RX of UART interface 2 via the transmit signal line;

[0116] UART interface 2 is equipped with a transmit terminal HOST TX;

[0117] The automatic baud rate detection module 8 is connected to the transmit terminal HOST TX of the UART interface 2;

[0118] The automatic baud rate detection signal 8 and the UART transmit signal module 9 are connected via the transmit data signal line TX Data and the baud rate signal line Baudrate.

[0119] The automatic baud rate detection signal 8 and the unlocking module 10 are connected via the transmit data signal line TX Data; the automatic baud rate detection signal module 8 selects whether to receive the switching UART signal from the PC according to different baud rates;

[0120] The interfaces for communicating with servers typically include USB and network interfaces. However, during system development, the UART interface is usually chosen. When a PC communicates with a server using the UART interface, the internal chips or devices usually have more than one UART interface. In this case, a multiplexer chip can be used to select which set of interfaces can communicate with the PC.

[0121] In server systems, multiplexer chips can be replaced by CPLD or FPGA chips to reduce costs. For example, if a CPLD chip is used in the system, a digital circuit for detecting the baud rate of the UART signal can be designed inside the CPLD. If a low baud rate UART signal, such as 19200bps, is detected, the CPLD will extract the byte from the UART signal and use it as the selection signal for the multiplexer.

[0122] The server multi-port UART switch switching system provided by this invention enables developers to select the source of the UART signal from the PC during the server system development phase, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging.

[0123] Example 4:

[0124] like Figure 2 As shown, the present invention provides a method for switching a server multi-port UART switch based on Embodiment 1 or Embodiment 2 described above, comprising the following steps:

[0125] S1. The automatic baud rate detection module parses the transmitted data and transmission baud rate of the UART port, provides the transmitted data of the UART port to the UART transmission signal generation module, and selects whether to send an unlock signal to the unlock module according to the transmission baud rate;

[0126] S2. The unlocking module selects the port of the corresponding external device based on the unlocking signal and strobe signal sent by the automatic baud rate detection module or command decoding module.

[0127] S3. The UART transmit switch and UART receive switch communicate with the corresponding external devices using the port selected by the unlock module or the port selected by the UART debug interface, and perform error debugging on the multiplexer chip using the port selected by the UART debug interface.

[0128] The server multi-port UART switch switching method provided by this invention enables developers to select the source of the UART signal from the PC during the server system development stage, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging for developers.

[0129] Example 5:

[0130] like Figure 3 As shown, the present invention provides a method for switching a server multi-port UART switch, comprising the following steps:

[0131] S1. The automatic baud rate detection module parses the transmitted data and baud rate of the UART port, provides the transmitted data of the UART port to the UART transmit signal generation module, and selects whether to send an unlock signal to the unlock module based on the transmit baud rate; the specific steps of step S1 are as follows:

[0132] S11. The automatic baud rate detection module parses the signals of the UART interface's transmit terminal to obtain the transmit data and transmit baud rate of the UART port;

[0133] S12. The automatic baud rate detection module determines the transmit baud rate of the UART port;

[0134] When the transmit baud rate of the UART port is the preset unlock baud rate, proceed to step S13;

[0135] When the transmit baud rate of the UART port is the preset communication baud rate, proceed to step S14;

[0136] S13. The automatic baud rate detection module sends an unlock signal and a strobe signal to the unlock module;

[0137] S14. The automatic baud rate detection module sends data to the UART signal generation module, and after initiating the parallel-to-serial data conversion, it provides the data to the UART receive switch;

[0138] S2. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch based on the unlocking signal and strobe signal sent by the automatic baud rate detection module or command decoding module; the specific steps of step S2 are as follows:

[0139] S21. The unlocking module determines whether it has received an unlocking signal from the automatic baud rate detection module;

[0140] If so, proceed to step S22;

[0141] If not, proceed to step S23;

[0142] S22. The unlocking module receives the strobe signal sent by the automatic baud rate detection module according to the preset rules, and proceeds to step S24;

[0143] S23. The unlocking module determines whether it has received a strobe signal obtained from an external device by the command decoding module;

[0144] If so, proceed to step S24;

[0145] If not, proceed to step S3;

[0146] S24. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch as the communication port according to the strobe signal;

[0147] S3. The UART transmit switch and UART receive switch communicate with the corresponding external devices using the ports selected by the unlocking module or the UART debug interface, and perform error debugging on the multiplexer chip using the ports selected by the UART debug interface; the specific steps of step S3 are as follows:

[0148] S31. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the unlock module;

[0149] If so, proceed to step S33;

[0150] If not, proceed to step S32;

[0151] S32. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the UART debug interface;

[0152] If so, proceed to step S33;

[0153] If not, proceed to step S34;

[0154] S33. The UART transmit switch and UART receive switch use the selected port to communicate with the corresponding external device, and then the communication ends;

[0155] S34. Determine whether the UART transmit switch and UART receive switch have received the debugging signal from the UART debug interface;

[0156] If so, proceed to step S35;

[0157] If not, end;

[0158] The S35.UART transmit switch and UART receive switch receive debugging signals from the PC via the UART debug interface to debug the multiplexer chip.

[0159] The server multi-port UART switch switching method provided by this invention enables developers to select the source of the UART signal from the PC during the server system development stage, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging for developers.

[0160] Example 6:

[0161] like Figure 3 As shown, the present invention provides a method for switching a server multi-port UART switch, comprising the following steps:

[0162] S1. The automatic baud rate detection module parses the transmitted data and baud rate of the UART port, provides the transmitted data of the UART port to the UART transmit signal generation module, and selects whether to send an unlock signal to the unlock module based on the transmit baud rate; the specific steps of step S1 are as follows:

[0163] S11. The automatic baud rate detection module parses the signals of the UART interface's transmit terminal to obtain the transmit data and transmit baud rate of the UART port;

[0164] S12. The automatic baud rate detection module determines the transmit baud rate of the UART port;

[0165] When the transmit baud rate of the UART port is the preset unlock baud rate, proceed to step S13; for example, the preset unlock baud rate can be 19200bps;

[0166] When the transmit baud rate of the UART port is the preset communication baud rate, proceed to step S14; for example, the preset communication baud rate can be 57600bps or 115200bps.

[0167] S13. The automatic baud rate detection module sends an unlock signal and a strobe signal to the unlock module;

[0168] S14. The automatic baud rate detection module sends data to the UART signal generation module, and after initiating the parallel-to-serial data conversion, it provides the data to the UART receive switch;

[0169] S2. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch based on the unlocking signal and strobe signal sent by the automatic baud rate detection module or command decoding module; the specific steps of step S2 are as follows:

[0170] S21. The unlocking module determines whether it has received an unlocking signal from the automatic baud rate detection module; for example, it can preset the data 0x55, 0xAA and 0x01 sent by three consecutive UART interfaces as unlocking signals;

[0171] If so, proceed to step S22;

[0172] If not, proceed to step S23;

[0173] S22. The unlocking module receives the strobe signal sent by the automatic baud rate detection module according to the preset rules, and proceeds to step S24; the next data after the unlocking signal is the strobe signal;

[0174] S23. The unlocking module determines whether it has received a strobe signal obtained from an external device by the command decoding module;

[0175] If so, proceed to step S24;

[0176] If not, proceed to step S3;

[0177] S24. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch as the communication port according to the strobe signal;

[0178] S3. The UART transmit switch and UART receive switch communicate with the corresponding external devices using the ports selected by the unlocking module or the UART debug interface, and perform error debugging on the multiplexer chip using the ports selected by the UART debug interface; the specific steps of step S3 are as follows:

[0179] S31. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the unlock module;

[0180] If so, proceed to step S33;

[0181] If not, proceed to step S32;

[0182] S32. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the UART debug interface;

[0183] If so, proceed to step S33;

[0184] If not, proceed to step S34;

[0185] S33. The UART transmit switch and UART receive switch use the selected port to communicate with the corresponding external device, and then the communication ends;

[0186] S34. Determine whether the UART transmit switch and UART receive switch have received the debugging signal from the UART debug interface;

[0187] If so, proceed to step S35;

[0188] If not, end;

[0189] The S35.UART transmit switch and UART receive switch receive debugging signals from the PC via the UART debug interface to debug the multiplexer chip.

[0190] The server multi-port UART switch switching method provided by this invention enables developers to select the source of the UART signal from the PC during the server system development stage, without having to set the multiplexer chip from the internal chip, thus improving development efficiency. Developers can also send UART signals from the PC to select the debugging signals inside the multiplexer chip, which are then transmitted to the PC via the UART interface, facilitating debugging for developers.

[0191] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should also be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.

Claims

1. A switching system for a server multi-port UART switch, characterized in that, Includes a multiplexer chip (1), a UART interface (2), and at least two external devices (3); The multiplexer chip (1) includes a UART switch (4) and a UART debug interface (5); The UART switch (4) includes a UART transmit switch (6), a UART receive switch (7), an automatic baud rate detection module (8), a UART transmit signal generation module (9), and an unlock module (10). The UART transmit switch (6) and the UART receive switch (7) are both connected to the UART debug interface (5) and each external device (3); The UART transmit switch (6) is also connected to the UART interface (2); The automatic baud rate detection module (8) is connected to the UART interface (2), the UART transmit signal generation module (9), and the unlocking module (10); The unlocking module (10) is connected to both the UART transmit switch (6) and the UART receive switch (7); The UART transmit signal generation module (9) is connected to the UART receive switch (7); It also includes a command decoding module (11); The command decoding module (11) is connected to the unlocking module (10) and at least one external device (3).

2. The server multi-port UART switch switching system as described in claim 1, characterized in that, Each external device (3) is connected to the UART transmit switch (6) via a transmit signal line and to the UART receive switch (7) via a receive signal line.

3. The server multi-port UART switch switching system as described in claim 1, characterized in that, The UART debug interface (5) is connected to the UART transmit switch (6) via the debug transmit signal line and to the UART receive switch (7) via the debug receive signal line.

4. The server multi-port UART switch switching system as described in claim 1, characterized in that, The UART interface (2) is equipped with a receiving terminal; The UART transmit switch (6) is connected to the receive terminal of the UART interface (2) via the transmit signal line.

5. The server multi-port UART switch switching system as described in claim 1, characterized in that, The UART interface (2) is equipped with a transmit terminal; The automatic baud rate detection module (8) is connected to the transmit terminal of the UART interface (2); The automatic baud rate detection module (8) and the UART transmit signal generation module (9) are connected via the transmit data signal line and the baud rate signal line; The automatic baud rate detection module (8) and the unlocking module (10) are connected via a transmit data signal line.

6. A method for switching a server multi-port UART switch based on any one of claims 1-5, characterized in that, Includes the following steps: S1. The automatic baud rate detection module parses the transmitted data and transmission baud rate of the UART port, provides the transmitted data of the UART port to the UART transmission signal generation module, and selects whether to send an unlock signal to the unlock module according to the transmission baud rate; S2. The unlocking module selects the port of the corresponding external device based on the unlocking signal and strobe signal sent by the automatic baud rate detection module or command decoding module. S3. The UART transmit switch and UART receive switch communicate with the corresponding external devices using the port selected by the unlock module or the port selected by the UART debug interface, and perform error debugging on the multiplexer chip using the port selected by the UART debug interface.

7. The method for switching a server multi-port UART switch as described in claim 6, characterized in that, The specific steps of step S1 are as follows: S11. The automatic baud rate detection module parses the signals of the UART interface's transmit terminal to obtain the transmit data and transmit baud rate of the UART port; S12. The automatic baud rate detection module determines the transmit baud rate of the UART port; When the transmit baud rate of the UART port is the preset unlock baud rate, proceed to step S13; When the transmit baud rate of the UART port is the preset communication baud rate, proceed to step S14; S13. The automatic baud rate detection module sends an unlock signal and a strobe signal to the unlock module; S14. The automatic baud rate detection module sends data to the UART signal generation module, initiates the parallel-to-serial data conversion, and then provides it to the UART receive switch.

8. The method for switching a server multi-port UART switch as described in claim 6, characterized in that, The specific steps of step S2 are as follows: S21. The unlocking module determines whether it has received an unlocking signal from the automatic baud rate detection module; If so, proceed to step S22; If not, proceed to step S23; S22. The unlocking module receives the strobe signal sent by the automatic baud rate detection module according to the preset rules, and proceeds to step S24; S23. The unlocking module determines whether it has received a strobe signal obtained from an external device by the command decoding module; If so, proceed to step S24; If not, proceed to step S3; S24. The unlocking module selects the port of the external device corresponding to the UART transmit switch or UART receive switch as the communication port according to the strobe signal.

9. The method for switching a server multi-port UART switch as described in claim 6, characterized in that, The specific steps of step S3 are as follows: S31. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the unlock module; If so, proceed to step S33; If not, proceed to step S32; S32. Determine whether the UART transmit switch and UART receive switch have received the strobe signal from the UART debug interface; If so, proceed to step S33; If not, proceed to step S34; S33. The UART transmit switch and UART receive switch use the selected ports to communicate with the corresponding external devices, ending here; S34. Determine whether the UART transmit switch and UART receive switch have received the debugging signal from the UART debug interface; If so, proceed to step S35; If not, end; The S35.UART transmit switch and UART receive switch receive debugging signals from the PC via the UART debug interface to debug the multiplexer chip.