CN114116315A - USB failure recovery method and system applied to industrial information security mainboard - Google Patents

USB failure recovery method and system applied to industrial information security mainboard Download PDF

Info

Publication number
CN114116315A
CN114116315A CN202111426828.XA CN202111426828A CN114116315A CN 114116315 A CN114116315 A CN 114116315A CN 202111426828 A CN202111426828 A CN 202111426828A CN 114116315 A CN114116315 A CN 114116315A
Authority
CN
China
Prior art keywords
usb
mcu
equipment
switch module
upper computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111426828.XA
Other languages
Chinese (zh)
Other versions
CN114116315B (en
Inventor
刘永平
王伟
周锐箭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Realbom Information Co Ltd
Original Assignee
Shenzhen Realbom Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Realbom Information Co Ltd filed Critical Shenzhen Realbom Information Co Ltd
Priority to CN202111426828.XA priority Critical patent/CN114116315B/en
Publication of CN114116315A publication Critical patent/CN114116315A/en
Application granted granted Critical
Publication of CN114116315B publication Critical patent/CN114116315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3861Recovery, e.g. branch miss-prediction, exception handling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a USB failure recovery method and a system applied to an industrial information security mainboard, which belong to the technical field of USB equipment, wherein the recovery method comprises the following steps: the upper computer periodically reads the equipment information of the USB equipment; judging whether the equipment information of the USB equipment can be read normally or not; if not, the upper computer sends a restart instruction to the MCU; the MCU receives the restart instruction and analyzes the restart instruction; and according to the analysis result, the MCU controls the corresponding USB equipment to restart in a power-off and communication signal disconnection mode. According to the method and the device, the invalid USB equipment can be automatically detected, and the invalid USB equipment can be automatically restarted, so that the method and the device have higher safety.

Description

USB failure recovery method and system applied to industrial information security mainboard
Technical Field
The application relates to the technical field of USB equipment, in particular to a USB failure recovery method and a USB failure recovery system applied to an industrial information security mainboard.
Background
At present, the manufacturing industry of China is in a step from a digital stage to a networking stage, industrial equipment, systems, production, management and service processes are increasingly important components of a network space through mapping and appearance, and the safety protection of industrial information is more and more important.
The USB interface provides abundant expansion for a computer mainboard, such as a USB camera, a printer, a mouse, a keyboard and the like. The application of USB is very simple, and when the USB device fails, it is usually solved by unplugging the USB device again or shutting down the computer system for rebooting for the current computer.
However, in some industrial application fields, it is difficult to realize the USB device by plugging and unplugging, such as: for safety, the whole computer is installed in a large case, a man-machine interaction interface is touched through a screen, and at this time, it is very inconvenient to pull out a certain USB device in the case to recover communication of the USB device.
Disclosure of Invention
In order to facilitate recovery of failed USB equipment, the application provides a USB failure recovery method and a USB failure recovery system applied to an industrial information security mainboard.
In a first aspect, the present application provides a USB failure recovery method applied to an industrial information security motherboard, which adopts the following technical scheme:
a USB failure recovery method applied to an industrial information security mainboard comprises the following steps:
the upper computer periodically reads the equipment information of the USB equipment;
judging whether the equipment information of the USB equipment can be read normally or not;
if not, the upper computer sends a restart instruction to the MCU;
the MCU receives the restart instruction and analyzes the restart instruction;
and according to the analysis result, the MCU controls the corresponding USB equipment to restart in a power-off and communication signal disconnection mode.
Through adopting above-mentioned technical scheme, the host computer reads the equipment information of USB equipment regularly, can't read the equipment information of USB equipment as the host computer, it is invalid to show this USB equipment to appear, at this moment, the host computer sends the instruction of restarting to MCU, MCU analyzes to the instruction of restarting, obtain that USB equipment is invalid, then the USB equipment outage that MCU control corresponds, can initialize USB equipment completely during the time of the resupply, and when the USB signal reconnects, the host computer can discern USB equipment again, and then can the USB equipment that becomes invalid by automatic recovery, need not open quick-witted case and close the host computer, have more the security, also convenient and fast more. Through the mode of outage and disconnection communication signal, can thoroughly break off USB equipment and host computer, effectively avoid the host computer to send out unusual wave form and cause the influence to USB equipment.
Preferably, the MCU controls the corresponding USB device to restart in a power-off and communication signal disconnection manner, and the method includes:
the MCU controls the load switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the load switch module to be switched on, wherein the load switch module is used for controlling the on-off of a power supply loop of the USB equipment;
the MCU controls the analog switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the analog switch module to be switched on, wherein the analog switch module is used for controlling the on-off of a communication loop of the USB equipment.
By adopting the technical scheme, the MCU controls the on-off of the load switch module and the analog switch module, and the corresponding USB equipment can be restarted.
Preferably, after the MCU controls the corresponding USB device to restart in a power-off and communication signal-off manner according to the analysis result, the method further includes:
the MCU feeds back execution information of the restarted USB equipment to the upper computer;
the upper computer receives the execution information and reads the equipment information of the USB equipment again;
judging whether the equipment information can be read normally;
if not, the upper computer sends a restart instruction to the MCU;
and the MCU controls the USB equipment to restart again according to the restart instruction, and the steps are repeated.
By adopting the technical scheme, after the USB equipment is restarted, the upper computer immediately reads the equipment information of the restarted USB equipment and timely checks whether the USB equipment is restarted successfully.
Preferably, the MCU restarts the USB device again according to the restart instruction, and after repeating the above steps, the method further includes:
the upper computer records the restart times of the USB equipment;
if the restarting times of the USB equipment are larger than the restarting threshold value within the preset time and the equipment information is not read, the upper computer sends out an early warning signal and stops the restarting operation of the USB equipment.
By adopting the technical scheme, the restarting times of the USB equipment are recorded, when the restarting times exceed the restarting threshold value, the damage of the USB equipment is likely to occur, the upper computer sends out an early warning signal to remind a worker to overhaul the corresponding USB equipment, and the USB equipment is prevented from being restarted all the time and entering a dead cycle.
Preferably, the device information includes a USB controller, a HUB, a port number, a VID, and a PID.
By adopting the technical scheme, the USB equipment which needs to be restarted can be accurately positioned.
Preferably, the restart instruction includes an instruction frame header, an instruction sequence number, a USB control sequence number, and an end flag.
By adopting the technical scheme, the USB equipment which needs to be restarted can be accurately restarted.
Preferably, the MCU communicates with the upper computer through a serial port.
By adopting the technical scheme, the communication between the MCU and the upper computer is stable.
In a second aspect, the present application provides a USB failure recovery system applied to an industrial information security motherboard, which adopts the following technical scheme:
the USB failure recovery system comprises an upper computer, an MCU, a load switch module and an analog switch module, wherein the upper computer is respectively connected with the MCU and the analog switch module, the MCU is respectively connected with the load switch module and the analog switch module, the load switch module is respectively connected with a power supply and USB equipment, and the analog switch module is connected with the USB equipment.
Through adopting above-mentioned technical scheme, the host computer reads the equipment information of USB equipment regularly, can't read the equipment information of USB equipment as the host computer, it is invalid to show this USB equipment to appear, at this moment, the host computer sends the instruction of restarting to MCU, MCU carries out the analysis to the instruction of restarting, obtain that USB equipment is invalid, then MCU restarts through load switch module, the USB equipment that analog switch module control corresponds, need not open quick-witted case and close the host computer, it has more the security, also convenient and fast more.
Preferably, the analog switch module includes analog switch U1, first control circuit and second control circuit, analog switch U1 is connected with power, host computer, first control circuit's input is connected with MCU, and first control circuit's output is connected with analog switch U1, second control circuit's input is connected with MCU, and second control circuit's output is connected with analog switch U1.
By adopting the technical scheme, the USB equipment is communicated with the upper computer through two channels of DATA + and DATA-, and the MCU controls the connection and disconnection of the DATA + and the DATA-through the first control circuit and the second control circuit.
Preferably, the load switch module includes a load switch U2 and a third control circuit, the load switch U2 is connected to the power supply and the USB device, an input terminal of the third control circuit is connected to the MCU, and an output terminal of the third control circuit is connected to the load switch U2.
By adopting the technical scheme, the power supply supplies power to the USB equipment through the load switch U2, and the USB equipment controls the on-off of the load switch U2 through the third control circuit so as to realize the on-off of the USB equipment.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the MCU controls the corresponding USB equipment to be powered off, the USB equipment can be completely initialized when power is supplied again, and the upper computer can re-identify the USB equipment when the USB signal is reconnected, so that the failed USB equipment can be automatically recovered, the case does not need to be opened and the upper computer does not need to be closed, and the USB equipment is convenient and quick;
2. recording the restarting times of the USB equipment, and when the restarting times exceed a restarting threshold value, sending an early warning signal by an upper computer to remind a worker to overhaul the corresponding USB equipment;
and 3, the MCU controls the corresponding USB equipment to restart through the load switch module and the analog switch module, and the control is stable and the cost is low.
Drawings
FIG. 1 is a flowchart illustrating a USB failure recovery method applied to an industrial information security motherboard according to an embodiment of the present application;
FIG. 2 is a flowchart of a USB failure recovery method applied to an industrial information security motherboard according to another embodiment of the present application;
fig. 3 is a block diagram of a USB failure recovery system applied to an industrial information security motherboard according to an embodiment of the present application;
FIG. 4 is a circuit diagram of an analog switch module in an embodiment of the present application;
fig. 5 is a circuit diagram of a load switch module in an embodiment of the present application.
Description of reference numerals:
100. a first current limiting unit; 101. a first bias unit; 102. a first voltage division unit; 200. a second current limiting unit; 201. a second bias unit; 203. a second voltage division unit; 300. a third current limiting unit; 301. a third bias unit; 302. a third partial pressure unit; 400. and a fourth current limiting unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to fig. 1-5 and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application discloses a USB failure recovery method applied to an industrial information security mainboard, and with reference to FIG. 1, the recovery method comprises the following steps:
s1: and the upper computer periodically reads the equipment information of the USB equipment.
Specifically, the HOST computer (HOST) may adopt an x86 computer, the HOST computer communicates with the USB device through a DATA +, DATA-channel, and the HOST computer may read device information of the USB device through the DATA +, DATA-channel, where the device information includes a USB controller, a HUB (multi-port repeater), a port number, a VID (vendor ID), and a PID (product identification code), and all USB devices have a Vendor ID (VID) and a product identification code (PID) according to the specification of the USB specification. The USB device needing to be restarted can be accurately positioned by reading the USB controller, the HUB, the port serial number, the VID and the PID.
The periodicity may be set to 1 minute, that is, the upper computer reads the device information of the USB device once every minute, or other times may be set according to actual situations.
S2: and judging whether the equipment information of the USB equipment can be read normally.
Specifically, when the upper computer traverses all the USB devices and reads the device information of the USB devices, the read device information is compared with the corresponding pre-stored device information, and if the read device information is the same as the corresponding pre-stored device information, it is indicated that the device information of the USB devices can be normally read, and the USB devices are normal; if the difference is not the same, the device information of the USB device cannot be read normally, and the USB device fails.
S3: and if not, the upper computer sends a restart instruction to the MCU.
Specifically, the MCU communicates with the upper computer through a serial port, when the USB equipment fails, the upper computer sends a restart instruction to the MCU, and the MCU restarts the corresponding USB equipment according to the restart instruction, wherein the restart instruction comprises an instruction frame header, an instruction sequence number, a USB control sequence number and an end mark. The staff can also send the restart instruction to the MCU through the host computer to make corresponding USB equipment restart.
S4: and the MCU receives the restart instruction and analyzes the restart instruction.
For example, the command frame header may be set to [0x 530 x 450 x4E 0x 440 x5F 0x4F 0x 520 x 440 x 450 x 520 x3A ]; the command sequence numbers may include 0x01, 0x02, and 0x03, where 0x01 is "disconnect port", 0x02 is "connect port", and 0x03 is "disconnect first, then connect port"; the USB control sequence numbers may include 0x01, 0x02, 0x03, and 0x04, where 0x01 is "control USB port 1", 0x02 is "control USB port 2", 0x03 is "control USB port 3", and 0x04 is "control USB port 4"; the end flag may be set to [0x0D 0x0A ].
For example, the USB device A, USB, the device B, USB, the device C, USB, and the device D are respectively connected to the USB port 1, the USB port 2, the USB port 3, and the USB port 4, wherein the upper computer sends a restart instruction to the MCU through the serial port: [0x 530 x 450 x4E 0x 440 x5F 0x4F 0x 520 x 440 x 450 x 520 x3A 0x 010 x 020 x0D 0x0A ], the MCU first identifies the end mark of the restart instruction, identifies the instruction header after identifying the end mark, and then identifies the instruction sequence number and the USB control sequence number after the instruction header is correct, and the instruction meaning obtained finally is: USB port 2 is disconnected, i.e., USB device B is disconnected.
S5: and according to the analysis result, the MCU controls the corresponding USB equipment to restart in a power-off and communication signal disconnection mode.
Specifically, the MCU analyzes the instruction frame header, the instruction serial number, the USB control serial number and the end mark to obtain address information of the failed USB device, and controls the corresponding USB device to restart according to the address information.
Optionally, in step S5, that is, according to the analysis result, the MCU controls the corresponding USB device to restart in a manner of powering off and disconnecting the communication signal, including:
s51: the MCU controls the load switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the load switch module to be switched on, wherein the load switch module is used for controlling the on-off of a power supply loop of the USB equipment.
S52: the MCU controls the analog switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the analog switch module to be switched on, wherein the analog switch module is used for controlling the on-off of a communication loop of the USB equipment.
Specifically, the number of the load switch modules and the number of the analog switch modules are the same as the number of the USB devices, and the MCU is connected with different load switch modules and different analog switch modules through different pins.
The MCU obtains address information of the failed USB equipment, the MCU controls the corresponding load switch module to be switched off according to the address information, the power supply cannot supply power to the failed USB equipment, after the switching-off time reaches preset time, the MCU controls the load switch module to be switched on, the power supply supplies power to the failed USB equipment again, and the USB equipment can be initialized when the power supply is restarted.
The MCU controls the corresponding analog switch module to be disconnected according to the address information, the communication between the upper computer and the USB equipment is disconnected, after the disconnection time reaches preset time, the MCU controls the analog switch module to be connected, the communication between the upper computer and the USB equipment is reconnected, and the USB equipment is identified again by the upper computer.
For example, the load switch module a controls the on-off of the power supply loop of the USB device a, and the analog switch module a controls the on-off of the communication loop of the USB device a, wherein the load switch module a and the analog switch module a may be connected to pin 1 of the MCU together, and the load switch module a and the analog switch module a may also be connected to pin 1 of the MCU and pin 2 of the MCU respectively; the load switch module B controls the on-off of a power supply loop of the USB device B, the analog switch module B controls the on-off of a communication loop of the USB device B, the load switch module B and the analog switch module B can be connected to the pins 3 of the MCU together, and the load switch module B and the analog switch module B can also be connected to the pins 3 of the MCU and the pins 4 of the MCU respectively.
In this embodiment, the predetermined time may be set to 1S, that is, when the MCU recognizes 0x03 (command sequence number), 1S is disconnected first and then connected; in other embodiments, the predetermined time may be set to other times according to actual conditions.
Referring to fig. 2, optionally, after step S5, that is, after the MCU controls the corresponding USB device to restart in a manner of powering off and disconnecting the communication signal according to the analysis result, the method further includes:
s6: and the MCU feeds back the execution information of the restarted USB equipment to the upper computer.
S7: and the upper computer receives the execution information and reads the equipment information of the USB equipment again.
S8: and judging whether the equipment information can be read normally.
S9: and if not, the upper computer sends a restart instruction to the MCU.
S10: and the MCU controls the USB equipment to restart again according to the restart instruction, and the steps are repeated.
For example, in the USB device A, USB, the device B and the USB device C, the upper computer periodically reads the device information of the USB device A, USB, the device B and the USB device C, wherein the USB device a and the USB device B can normally read, the USB device C cannot normally read, and the MCU controls the USB device C to restart; and after the USB equipment C is restarted, the MCU feeds back the execution information of the USB equipment C to the upper computer, and the upper computer independently reads the equipment information of the USB equipment C.
Optionally, after step S10, that is, the MCU controls the USB device again to restart according to the restart instruction, and after repeating the above steps, the method further includes:
s11: and the upper computer records the restart times of the USB equipment.
S12: if the restarting times of the USB equipment are larger than the restarting threshold value within the preset time and the equipment information is not read, the upper computer sends out an early warning signal and stops the restarting operation of the USB equipment.
Specifically, the restart threshold may be set to 2 times, and the preset time may be set to 1min, for example, the USB device a needs to be restarted, after the upper computer sends a restart instruction, time calculation is started, if the USB device a is restarted 3 times within 1min, and after the USB device a is restarted for the third time, the upper computer still does not read the device information of the USB device a, at this time, the upper computer sends an early warning signal to the client of the worker, the upper computer registers the address information of the USB device a, the upper computer sends a restart instruction with 0x01 (instruction sequence number) to the MCU, the MCU controls the disconnection of the USB device a, and at this time, the upper computer does not read the device information of the USB device a any more until the worker completes maintenance. After the maintenance is finished, the worker sends a restart instruction with 0x02 (instruction sequence number) to the MCU through the upper computer, the MCU controls the USB device A to be connected, and the upper computer can read the device information of the USB device A again.
Referring to fig. 3, an embodiment of the present application further discloses a USB failure recovery system applied to an industrial information security motherboard, including an upper computer, an MCU, a load switch module and an analog switch module, where the upper computer is connected to the MCU and the analog switch module respectively, the MCU is connected to the load switch module and the analog switch module respectively, and the load switch module is connected to a power supply. The number of the USB equipment is the same as that of the load switch modules and that of the analog switch modules, and the USB equipment is correspondingly connected with the load switch modules and the analog switch modules one to one.
The upper computer is used for periodically reading the device information of the USB device and sending a restart instruction to the MCU. The MCU is used for receiving the restart instruction and controlling the on-off of the load switch module and the analog switch module according to the restart instruction so as to control the USB equipment to restart.
Referring to fig. 4, the analog switch module includes an analog switch U1, a first control circuit and a second control circuit, the analog switch U1 is connected to the power supply and the upper computer, an input terminal of the first control circuit is connected to the MCU, an output terminal of the first control circuit is connected to the analog switch U1, an input terminal of the second control circuit is connected to the MCU, and an output terminal of the second control circuit is connected to the analog switch U1.
In this embodiment, the analog switch U1 may be a multiplexing switch to satisfy the switching of the USB signals, and the first control circuit is connected to pin 10 of the analog switch U1, and the second control circuit is connected to pin 8 of the analog switch U1.
The first control circuit comprises a first current limiting unit 100, a first bias unit 101, a first voltage dividing unit 102, a switch tube Q1 and a switch tube Q2, one end of the first current limiting unit 100 is connected with a power supply, the other end of the first current limiting unit 100 is connected with one end of the first bias unit 101, the third end of the switch tube Q1 and the first end of the switch tube Q2, the other end of the first bias unit 101 is connected with one end of the first voltage dividing unit 102 and an MCU, the other end of the first voltage dividing unit 102 is connected with the first end of the switch tube Q1, the second end of the switch tube Q1 is grounded, the third end of the switch tube Q2 is connected with a pin 10 of the analog switch U1, and the second end of the switch tube Q2 is grounded.
The second control circuit comprises a second current limiting unit 200, a second bias unit 201, a second voltage dividing unit 203 and a switch tube Q3, one end of the second current limiting unit 200 is connected with a power supply, the other end of the second current limiting unit 200 is connected with one end of the second bias unit 201, the third end of the switch tube Q3 and the 8-pin of the analog switch U1, the other end of the second bias unit 201 is connected with one end of the second voltage dividing unit 203 and the MCU, the other end of the second voltage dividing unit 203 is connected with the first end of the switch tube Q3, and the second end of the switch tube Q3 is grounded.
In this embodiment, the current limiting unit, the biasing unit and the voltage dividing unit may employ resistors. In this embodiment, the switching tube may adopt an N-channel MOS tube, a gate of the N-channel MOS tube is a first end of the switching tube, a source of the N-channel MOS tube is a second end of the switching tube, and a drain of the N-channel MOS tube is a third end of the switching tube; in other embodiments, the switch tube may also be a triode.
The MCU receives a restart instruction, outputs a high level to the first end of the switch tube Q1, the switch tube Q1 is switched on, the first end of the switch tube Q2 is changed from the high level to the low level, the switch tube Q2 is switched off, and the pin 10 of the analog switch U1 is changed from the low level to the high level. The MCU outputs high level to the first end of the switch tube Q3, the switch tube Q3 is conducted, the pin 8 of the analog switch U1 is changed from high level to low level, and the analog switch U1 correspondingly controls the DATA + and DATA-channels to be disconnected.
After the off time reaches the preset time, the MCU outputs a power-on level to the first end of the switch tube Q1, the switch tube Q1 is cut off, the first end of the switch tube Q2 is at a high level, and the switch tube Q2 is switched on; meanwhile, the switching tube Q3 is cut off, and the upper computer and the USB equipment reestablish communication.
Referring to fig. 5, the load switch module includes a load switch U2 and a third control circuit, the load switch U2 is connected to the power supply and the USB device, an input terminal of the third control circuit is connected to the MCU, and an output terminal of the third control circuit is connected to the load switch U2.
The third control circuit comprises a third current limiting unit 300, a third biasing unit 301, a third voltage dividing unit 302, a switch tube Q4, a fourth current limiting unit 400 and a switch tube Q5, wherein one end of the third current limiting unit 300 is connected with a power supply, the other end of the third current limiting unit 300 is connected with one end of the third biasing unit 301, the third end of the switch tube Q4 and the first end of the switch tube Q5, the other end of the third biasing unit 301 is connected with one end of the third voltage dividing unit 302 and the MCU, the other end of the third voltage dividing unit 302 is connected with the first end of the switch tube Q4, the second end of the switch tube Q4 is grounded, one end of the fourth current limiting unit 400 is connected with the power supply, the other end of the fourth current limiting unit 400 is connected with the third end of the switch tube Q5 and the load switch U2, and the second end of the switch tube Q5 is grounded.
The MCU receives a restart instruction, outputs a high level to the first end of the switch tube Q4, the switch tube Q4 is switched on, the first end of the switch tube Q5 is changed from the high level to the low level, the switch tube Q5 is switched off, the 4 pins of the load switch U2 are changed from the low level to the high level, the 1 pin of the load switch U2 stops outputting, and the USB device is powered off.
After the off time reaches the preset time, the MCU outputs the power-resisting level to the first end of the switch tube Q4, the switch tube Q4 is cut off, the first end of the switch tube Q5 is at a high level, the switch tube Q5 is switched on, and the power supply supplies power to the USB equipment again.
The implementation principle of the USB failure recovery system applied to the industrial information security mainboard in the embodiment of the application is as follows: the host computer reads the equipment information of USB equipment regularly, and when the host computer can't read the equipment information of USB equipment, the host computer sends the instruction of restarting to MCU, and MCU carries out the analysis to the instruction of restarting, and MCU restarts through load switch module, the corresponding USB equipment of analog switch module control, need not open quick-witted case and close host computer, convenient and fast.
The above embodiments are preferred embodiments of the present application, and the protection scope of the present application is not limited by the above embodiments, so: all equivalent changes made according to the structure, shape and principle of the present application shall be covered by the protection scope of the present application.

Claims (10)

1. A USB failure recovery method applied to an industrial information security mainboard is characterized by comprising the following steps:
the upper computer periodically reads the equipment information of the USB equipment;
judging whether the equipment information of the USB equipment can be read normally or not;
if not, the upper computer sends a restart instruction to the MCU;
the MCU receives the restart instruction and analyzes the restart instruction;
and according to the analysis result, the MCU controls the corresponding USB equipment to restart in a power-off and communication signal disconnection mode.
2. The USB failure recovery method applied to the industrial information security main board according to claim 1, wherein the MCU controls the corresponding USB device to restart in a power-off and communication signal disconnection manner, and the method comprises:
the MCU controls the load switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the load switch module to be switched on, wherein the load switch module is used for controlling the on-off of a power supply loop of the USB equipment;
the MCU controls the analog switch module at the corresponding position to be switched off, and after the switching-off time reaches the preset time, the MCU controls the analog switch module to be switched on, wherein the analog switch module is used for controlling the on-off of a communication loop of the USB equipment.
3. The USB failure recovery method applied to an industrial information security motherboard according to claim 1, wherein after the MCU controls the corresponding USB device to restart in a power-off and communication signal-off manner according to the analysis result, the method further comprises:
the MCU feeds back execution information of the restarted USB equipment to the upper computer;
the upper computer receives the execution information and reads the equipment information of the USB equipment again;
judging whether the equipment information can be read normally;
if not, the upper computer sends a restart instruction to the MCU;
and the MCU controls the USB equipment to restart again according to the restart instruction, and the steps are repeated.
4. The method for recovering the USB failure applied to the industrial information security mainboard of claim 3, wherein the MCU restarts the USB device again according to the restart instruction, and after repeating the above steps, the method further comprises:
the upper computer records the restart times of the USB equipment;
if the restarting times of the USB equipment are larger than the restarting threshold value within the preset time and the equipment information is not read, the upper computer sends out an early warning signal and stops the restarting operation of the USB equipment.
5. The USB failure recovery method applied to an industrial information security main board according to claim 1, wherein the device information includes a USB controller, a HUB, a port number, a VID, and a PID.
6. The USB failure recovery method applied to the industrial information security main board according to claim 1, wherein the restart instruction comprises an instruction frame header, an instruction sequence number, a USB control sequence number and an end mark.
7. The USB failure recovery method applied to the industrial information security mainboard as recited in claim 1, wherein the MCU communicates with an upper computer through a serial port.
8. The USB failure recovery system applied to the industrial information security mainboard is characterized by comprising an upper computer, an MCU, a load switch module and an analog switch module, wherein the upper computer is respectively connected with the MCU and the analog switch module, the MCU is respectively connected with the load switch module and the analog switch module, the load switch module is respectively connected with a power supply and USB equipment, and the analog switch module is connected with the USB equipment.
9. The USB failure recovery system applied to the industrial information security main board according to claim 8, wherein the analog switch module comprises an analog switch U1, a first control circuit and a second control circuit, the analog switch U1 is connected to the power supply and the upper computer, an input terminal of the first control circuit is connected to the MCU, an output terminal of the first control circuit is connected to the analog switch U1, an input terminal of the second control circuit is connected to the MCU, and an output terminal of the second control circuit is connected to the analog switch U1.
10. The USB failure recovery system applied to the industrial information security main board according to claim 8, wherein the load switch module comprises a load switch U2 and a third control circuit, the load switch U2 is connected to the power supply and the USB device, an input terminal of the third control circuit is connected to the MCU, and an output terminal of the third control circuit is connected to the load switch U2.
CN202111426828.XA 2021-11-27 2021-11-27 USB failure recovery method and system applied to industrial information security mainboard Active CN114116315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111426828.XA CN114116315B (en) 2021-11-27 2021-11-27 USB failure recovery method and system applied to industrial information security mainboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111426828.XA CN114116315B (en) 2021-11-27 2021-11-27 USB failure recovery method and system applied to industrial information security mainboard

Publications (2)

Publication Number Publication Date
CN114116315A true CN114116315A (en) 2022-03-01
CN114116315B CN114116315B (en) 2022-09-23

Family

ID=80370722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111426828.XA Active CN114116315B (en) 2021-11-27 2021-11-27 USB failure recovery method and system applied to industrial information security mainboard

Country Status (1)

Country Link
CN (1) CN114116315B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266590A (en) * 2008-04-22 2008-09-17 北京飞天诚信科技有限公司 Method and system for dynamically switching equipment arrangement
CN101989248A (en) * 2009-07-31 2011-03-23 比亚迪股份有限公司 Universal serial bus (USB) equipment and method for restarting USB equipment
CN102681481A (en) * 2012-05-24 2012-09-19 山西联华伟业科技有限公司 Programmable logic controller (PLC) communication method based on universal serial bus (USB)
CN106101779A (en) * 2016-08-17 2016-11-09 深圳市茁壮网络股份有限公司 A kind of long-distance communicating method for Set Top Box and relevant apparatus
CN107423182A (en) * 2017-04-25 2017-12-01 广州御融通电子设备开发有限公司 One kind simulation USB hot drawing plug devices
CN107870271A (en) * 2016-11-03 2018-04-03 珠海市杰理科技股份有限公司 Automated testing method and device
CN109522246A (en) * 2018-11-23 2019-03-26 南京云帐房网络科技有限公司 A kind of method and apparatus remotely accessing more USB devices
CN110568946A (en) * 2019-09-02 2019-12-13 腾讯科技(深圳)有限公司 Port control method, device and medium
US20220104306A1 (en) * 2019-02-13 2022-03-31 Apple Inc. Transmission, retransmission, and hybrid automatic repeat request process using preconfigured uplink resources in idle mode

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266590A (en) * 2008-04-22 2008-09-17 北京飞天诚信科技有限公司 Method and system for dynamically switching equipment arrangement
CN101989248A (en) * 2009-07-31 2011-03-23 比亚迪股份有限公司 Universal serial bus (USB) equipment and method for restarting USB equipment
CN102681481A (en) * 2012-05-24 2012-09-19 山西联华伟业科技有限公司 Programmable logic controller (PLC) communication method based on universal serial bus (USB)
CN106101779A (en) * 2016-08-17 2016-11-09 深圳市茁壮网络股份有限公司 A kind of long-distance communicating method for Set Top Box and relevant apparatus
CN107870271A (en) * 2016-11-03 2018-04-03 珠海市杰理科技股份有限公司 Automated testing method and device
CN107423182A (en) * 2017-04-25 2017-12-01 广州御融通电子设备开发有限公司 One kind simulation USB hot drawing plug devices
CN109522246A (en) * 2018-11-23 2019-03-26 南京云帐房网络科技有限公司 A kind of method and apparatus remotely accessing more USB devices
US20220104306A1 (en) * 2019-02-13 2022-03-31 Apple Inc. Transmission, retransmission, and hybrid automatic repeat request process using preconfigured uplink resources in idle mode
CN110568946A (en) * 2019-09-02 2019-12-13 腾讯科技(深圳)有限公司 Port control method, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一个早起的程序员: "STM32 USB复位、挂起、唤醒机制详解", 《HTTPS://BLOG.CSDN.NET/WEIAIPAN1314/ARTICLE/DETAILS/113650274》 *

Also Published As

Publication number Publication date
CN114116315B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN104899055B (en) A kind of ME more new systems and its update method based on BIOS controls
CN102880527B (en) Data recovery method of baseboard management controller
CN102478800A (en) System and method for monitoring electric power sequential signals
CN1137831A (en) A peripheral card having independent functionality and method used therewith
US20090144569A1 (en) Communication device, amc and method for supplying power to the amc
CN103970640A (en) Method and system for processing system temperature sensor fault of server
WO2023065601A1 (en) Server component self-test anomaly recovery method and device, system, and medium
CN112527582A (en) Detection method, detection device, detection equipment and storage medium of server cable
CN101782802A (en) Standby power-saving system and method for starting and disconnecting power supply of computer
CN114116315B (en) USB failure recovery method and system applied to industrial information security mainboard
CN218824636U (en) Power supply detection device for server hard disk backboard
CN1470020A (en) Method and apparatus for removing and installing a computer system bus agent without powering down the computer system
US8738946B2 (en) Method for an os to disable a graphics adapter and lock inputs when tablet display is detached on a hybrid laptop
CN112019455B (en) Switch monitoring device and method based on programmable logic device
CN111949283B (en) BMC Flash mirror image self-recovery system and method
CN112000528A (en) Method and system for detecting board card signal short circuit through CPLD
CN105094899A (en) Distributed-type intelligent apparatus sub-module program automatic configuration method
US20070204088A1 (en) Modularized circuit board bus connection control method and system
US6801973B2 (en) Hot swap circuit module
CN109840171A (en) A kind of simple SSD power failure test method
CN219349430U (en) OPS expansion device and terminal equipment
CN110825445A (en) Timing startup and shutdown system of interactive intelligent panel
CN107688380A (en) A kind of server complete machine breaker device and method
CN212009370U (en) Distributed control equipment of power plant
CN215300646U (en) Bypass control device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant