Domestic single-chip microcomputer, master control module, integrated communication unit and network management system
By using the GD32 microcontroller during the domestic production process of microcontrollers and checking the packets, and adjusting the I2C reception mode, the data reception errors and power failure of the integrated communication unit are solved during the main control module when receiving the command of the upper computer, and the correctness of data reception and system stability are achieved.
Patent Information
- Application Number
- CN202411911324.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-21
AI Technical Summary
During the domestic production of microcontrollers, the main control module experiences a data reception error during the reception of the command of the upper computer, resulting in a power failure in the slot of the comprehensive communication unit 3#, and a byte of data loss on the USART serial port, and a duplicate data is also present.
The GD32 microcontroller is used as the main control module microcontroller, and the messages sent by the main control module CPU are received through the USART serial port, and the received messages are checked and checked. At the same time, adjust the I2C bus host reception mode to Solution A and use I2C reception interrupts to avoid serial port reception defects.
By checking and adjusting the I2C reception mode, the problems of data reception errors and power failures during the domestic production of microcontrollers are effectively avoided, ensuring the correctness of data reception and the stability of the system.
Smart Images

Figure CN119676042A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer network technology, and more specifically, to a domestically produced single-chip microcomputer, a main control module, an integrated communication unit and a network management system. Background Art
[0002] With the continuous development of information technology, the continuous expansion of network scale and the increasing demand for network applications, the requirements for network management systems are becoming more urgent. An integrated network management system is a network management tool that integrates multiple functions. It can help users or organizations manage their network equipment, monitor network performance, optimize network resource utilization, ensure network security, reduce network failure rates, etc., thereby providing strong support for the information construction and business development of users or organizations.
[0003] In the face of various practical needs of users or organizations, information security is a prerequisite of paramount importance. Most of the health management functions involved in the software part of the comprehensive network management system in the existing market generally use BMC for remote monitoring and management, and the hardware part mostly uses STM32 microcontrollers. Once affected by import restrictions, the consequences are unimaginable, so no matter how powerful the network management system is, it must be based on a domestic solution.
[0004] The GD32 MCU is a 32-bit microcontroller based on the ARM Cortex-M3 core. The GD32 MCU has the same architecture and instruction set as the STM32 MCU, but is cheaper than the STM32. At the same time, the GD32 MCU has higher quality and reliability, becoming an ideal low-cost MCU solution that can be widely used in smart homes, smart wearables, consumer electronics, automotive electronics, power electronics, medical equipment and other fields.
[0005] However, during the localization of the MCU, the MCU in the main control module received data errors while receiving instructions from the host computer, resulting in a power failure in slot 3 of the integrated communication unit. When the service module in slot 3 lost power, in addition to losing a byte of data, the USART serial port also had a duplicate data. Summary of the invention
[0006] In view of the defects of the prior art, the purpose of this application is to provide a domestically produced single-chip microcomputer, a main control module, an integrated communication unit and a network management system, aiming to solve the problems of power failure and data loss in the localization of single-chip microcomputers and the localization of integrated network management systems.
[0007] To achieve this purpose, in the first aspect, the present application provides a domestically produced main control module single-chip microcomputer, which adopts a GD32 single-chip microcomputer; the GD32 single-chip microcomputer receives the message command issued by the main control module CPU through the USART serial port, and verifies and checks the received message; when the GD32 single-chip microcomputer acts as a host to communicate with each business module in the integrated communication unit through the I2C bus, the I2C bus host receiving mode is scheme A, and scheme A corresponds to the use of I2C receive interrupt.
[0008] Preferably, the verification and checking of the received message is specifically: If the checksum result is consistent, the message will be parsed and sent down; If the checksum result is inconsistent, the command message will be discarded.
[0009] To achieve this purpose, in a second aspect, the present application provides a domestic integrated communication unit main control module, including the main control module single chip microcomputer and the main control module CPU as described in the first aspect; The main control module CPU and the integrated network management system software use network port communication; The main control module CPU communicates with the GD32 microcontroller using the USART serial port, and a checksum is added to the message sent to the GD32 microcontroller.
[0010] Preferably, the main control module CPU adopts a domestically produced FT2000+ / 64 processor.
[0011] To achieve this purpose, in a third aspect, the present application provides a domestic integrated communication unit, which is composed of an integrated communication unit basic platform, a main control module as described in the second aspect, and multiple business modules; The integrated communication unit basic platform includes: a power module, a network management module, a switching module and a risk control module; The service module includes: an optical transmission module, a covered wire transmission module, a Beidou timing module and a wireless communication module.
[0012] To achieve this purpose, in a fourth aspect, the present application provides a domestic integrated network management system, including: the domestic integrated communication unit and the domestic integrated network management system software as described in the third aspect; The domestic integrated network management system software is used to query and obtain the online status of each business module, monitor the current, voltage and temperature of each business module, monitor the real-time status of the fan, and perform reset control on each business module; The domestically produced integrated network management system software adopts a B / S browser server architecture design model, deploys the management system on a server, and accesses the system through a browser.
[0013] Preferably, the server adopts the domestically produced Kylin operating system.
[0014] Preferably, the domestic integrated network management system software uses the SNMP protocol to interact with the device for data, has the ability to centrally monitor the communication network, provides a user centralized monitoring interface, supports online control of remote devices, and has configuration management, log management, health management, security management, maintenance management, topology management, performance management and alarm management; The configuration management is used for resetting and restarting each module in the communication device, querying basic information, configuring related services and querying configurations; The log management is used to record the configuration operations performed by the user; The health management is used to query and display the operating status of the main control module, switching module, optical transmission module, covered wire transmission module, Beidou timing module, and wireless communication module in the system communication equipment; The security management is used to manage user information and levels. Administrators can assign operation permissions to users of other levels, and users can only complete operations within their permissions. When users log in, a judgment should be made, and if the judgment fails, the user is not allowed to log in. The maintenance management is used to provide module software upgrade function and database backup and restore function; The topology management is used to display the device in a graphical form in the software interface and provide optical link topology and network topology display functions; The performance management is used to complete the query and statistics of the port traffic of the system communication equipment switching module; The alarm management is used to query and confirm current alarms and historical alarms, and can display alarm details and alarm confirmation status; collect and display the in-place information of each module in the system communication equipment; collect and display the alarm status of the optical transmission module.
[0015] Preferably, the domestic integrated network management system software uses a domestic database.
[0016] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art: The present application proposes a domestic single-chip microcomputer, a main control module, an integrated communication unit and a network management system, wherein the main control module single-chip microcomputer adopts a GD32 single-chip microcomputer; when the GD32 single-chip microcomputer receives the message sent by the main control module CPU through the USART serial port, the received message is verified and checked; when the GD32 single-chip microcomputer communicates with each business module in the integrated communication unit through the I2C bus as a host, the I2C bus host receiving mode is scheme A, and the scheme A corresponds to the use of I2C receiving interrupt. The present application circumvents the serial port reception defects of the domestic GD32 single-chip microcomputer by changing the I2C host receiving mechanism in the system and adding message verification. The present application adopts the B / S browser server architecture design mode, deploys the management system on the server, and accesses the system through the browser. The software uses the SNMP protocol to interact with the device for data. It has the ability to centrally monitor the communication network, provides a user centralized monitoring interface, supports online control of remote devices, and has management functions such as network planning, fault management, performance management, and configuration management. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of the delay adjustment process provided in an embodiment of the present application.
[0018] Figure 2 It is a waveform diagram of the timing interrupt and serial port receiving interrupt provided in the embodiment of the present application.
[0019] Figure 3 This is a schematic diagram of serial port 2 repeatedly reading data provided in an embodiment of the present application.
[0020] Figure 4 It is a schematic diagram of the host receiving A mode flow provided in an embodiment of the present application.
[0021] Figure 5 It is a schematic diagram of the structure of a domestically produced main control module single-chip microcomputer provided in an embodiment of the present application.
[0022] Figure 6 It is a schematic diagram of the functional components of the domestic integrated network management system software provided in the embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0025] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.
[0026] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0027] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0028] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0029] The integrated communication unit is one of the most important components of the integrated network management system. The integrated communication unit consists of the integrated communication unit basic platform (including power supply, main control module, switching module, wind control module, etc.) and business modules. There are N business slots in total. The business slots can be deployed with multiplexed transmission modules, optical transmission modules, wireless broadband terminal modules, etc. according to actual needs. The integrated network management system software can query and obtain the online status of each business module in the chassis, monitor the current, voltage, and temperature of each business module, monitor the real-time status of the chassis fan, and reset each business module. The main control module receives the instructions issued by the integrated network management system software and manages and controls the corresponding business modules, thereby realizing the health management function of the entire chassis. The main control module hardware adopts the "CPU+MCU" architecture. The CPU communicates with the integrated network management system software through the network port, and communicates with the MCU in the module through the USART (Universal Synchronous Asynchronous Receiver and Transmitter) serial port; the main control module MCU communicates with each business module in the 1#~N# slots through the I2C bus. The main control module is the host and the business module is the slave.
[0030] When debugging the duplex module in the integrated communication unit, it is necessary to communicate with the duplex module in the integrated communication unit. It is found that all the indicator lights on the front panel of the duplex transmission module installed in slot 3# of the integrated communication unit chassis are off. The researchers use the integrated network management system software to see that the duplex transmission module in the integrated communication unit frame is displayed in red, indicating an offline state. The module is reset through the integrated network management system software, and the module resumes normal operation after reset. After locating and troubleshooting, it can be located that the main control module microcontroller has an error in receiving data during the process of receiving instructions from the host computer, resulting in a power failure in slot 3# of the integrated communication unit.
[0031] After locating and troubleshooting, the fault can be located that when the main control module microcontroller was receiving instructions from the host computer, an error occurred during data reception, resulting in a power failure in slot 3# of the integrated communication unit.
[0032] The main control module MCU receives the health management query command sent by the main control module CPU through the USART serial port, and an error occurs when receiving data. Some error messages are discarded when the main control module MCU program determines that the slot number, message type or other fields are incorrect, and there is no impact on the business, such as error messages 2 to 5. Error message 1 "0xa5 0x5a0x09 0x40 0x03 0x03 0x00 0x245 0xb3" is a control message with a legal format and is not discarded. The main control module MCU sends this message to the 3# slot business module through the I2C bus. After receiving this instruction, the 3# slot business module controls the health management circuit to turn off the module's business power supply, and the 3# slot business module is powered off.
[0033] When the service module in slot 3 loses power, in addition to losing a byte of data, the USART serial port also has duplicate data, resulting in the duplication of the message type and slot number in the power-off error message of the service module in slot 3. After losing the byte of message type 0x19, the microcontroller repeatedly reads the slot number data with a value of 0x03.
[0034] The timing of this situation is quite special and it is not easy to reproduce and monitor. The hardware and software of the microcontroller need to be processed accordingly. Because the peripheral circuit resources of the microcontroller of the main control module have been solidified on the circuit board, it is not convenient to process. The vulnerability is reproduced on the development board of the GD32 microcontroller. The microcontroller model on the GD32 microcontroller development board is GD32F103RC.
[0035] like Figure 1 As shown in the figure, the delay adjustment experimental steps include: 1) On the GD32 MCU development board, use the three serial ports of the MCU for experimental verification. Serial port 0 is used to send data, serial port 1 is used to print logs on the console, and serial port 2 is used to receive data. 2) Write a piece of code to send data from serial port 0 to serial port 2 (the format of the data is consistent with the data format sent by the main control module CPU to the microcontroller), and serial port 2 correctly receives the 1st to 4th bytes; 3) Add a delay after the I2C interrupt service handler is generated. By increasing or decreasing the number of empty instructions, the delay time is gradually adjusted so that the I2C interrupt and the reception of the fifth byte (slot number) occur almost simultaneously. 4) Adjust the processing time of the I2C interrupt service handler, and gradually adjust the delay time by increasing or decreasing the number of empty instructions, so that after jumping out of the I2C interrupt service handler, entering the serial port receiving interrupt and receiving the sixth byte occur almost simultaneously; 5) Add the changes in the IO port level to the I2C interrupt and the receiving interrupt of serial port 2, so as to use an oscilloscope to observe the timing of the timing interrupt and serial port interrupt, and print the data read by serial port 2 on the console through serial port 1.
[0036] The experimental results show that when the delay is adjusted to a certain time, the oscilloscope can be used to observe Figure 2 The waveform shown in Figure 1. Because of the existence of the I2C interrupt, the serial port did not generate a receive interrupt when it received the 5th byte (slot number). After exiting the I2C interrupt, a serial port interrupt was generated and the data was read. The correct data printed by the serial port was filtered. The data printed by the serial port is as follows: Figure 3 As shown, it can be seen that data with repeated slot numbers appear with a high probability in the received data.
[0037] The experimental results are analyzed as follows: When the GD32 microcontroller serial port is receiving data, when the data reading and overflow interrupts are generated almost at the same time, the serial port reads the previously received data, but the RBNE bit (Read Buffer Not Empty) is not cleared or is set at the same time as the overflow interrupt is generated, and the currently received data is not moved to the data register. The serial port reads the contents of the data register again, so the 6th byte (message type) is lost and the 5th byte (slot number) is read repeatedly.
[0038] In view of the above problems, this application intends to adjust the host receiving mode of the main control module microcontroller to solution A, such as Figure 4 As shown, each interrupt reads one byte of data. Even when reading the N-1th byte of data, it does not block and wait like solution B, which can avoid the I2C bus from generating a long interrupt service program during the communication process.
[0039] The existence of the long-term I2C interrupt handler causes a lot of erroneous data to be generated when the USART serial port of the main control module microcontroller receives CPU messages. Currently, only the message format is checked to filter out erroneous messages. When a message with erroneous data meets the requirements of the message format, it will not be filtered.
[0040] During the communication process, errors in data transmission always occur. Checksum is an effective way to check data errors. It calculates a certain value of the data to detect whether errors have occurred during data transmission or storage. If the data changes during transmission or storage, its checksum will also change accordingly, thereby detecting data errors.
[0041] The present application adds a checksum to the message sent by the main control module CPU to the single-chip microcomputer, and when the single-chip microcomputer receives the message sent by the CPU, the message is checked and erroneous messages are filtered out to ensure the correctness of the received data.
[0042] In an illustrated embodiment, a simple sum is used to calculate the checksum, that is, all byte values of the data are added together, and a modulo operation may be performed on the result to limit the length of the checksum.
[0043] like Figure 5 As shown, in the first aspect, the present application provides a domestically produced main control module single-chip microcomputer, which adopts a GD32 single-chip microcomputer; the GD32 single-chip microcomputer receives the message command issued by the main control module CPU through the USART serial port, and verifies and checks the received message; when the GD32 single-chip microcomputer acts as a host to communicate with each business module in the integrated communication unit through the I2C bus, the I2C bus host receiving mode is Scheme A, and Scheme A corresponds to the use of I2C receive interrupt.
[0044] Preferably, the verification and checking of the received message is specifically: If the checksum result is consistent, it is considered to be a correct message and the message is parsed and sent down; If the checksum result is inconsistent, the command message will be discarded. Since the host computer adopts a timed query mechanism, the discarding of the message will not affect the business.
[0045] In a second aspect, the present application provides a domestic integrated communication unit main control module, including the main control module single chip microcomputer and the main control module CPU as described in the first aspect; The main control module CPU and the integrated network management system software use network port communication; The main control module CPU communicates with the GD32 microcontroller using the USART serial port, and a checksum is added to the message sent to the GD32 microcontroller.
[0046] Preferably, the main control module CPU adopts a domestically produced FT2000+ / 64 processor.
[0047] In a third aspect, the present application provides a domestic integrated communication unit, which is composed of an integrated communication unit basic platform, a main control module as described in the second aspect, and multiple business modules; The integrated communication unit basic platform includes: a power module, a network management module, a switching module and a risk control module; The service module includes: an optical transmission module, a covered wire transmission module, a Beidou timing module and a wireless communication module.
[0048] The business module single chip microcomputer is a GD32 single chip microcomputer.
[0049] In a fourth aspect, the present application provides a domestic integrated network management system, comprising: the domestic integrated communication unit and the domestic integrated network management system software as described in the third aspect; The domestic integrated network management system software is used to query and obtain the online status of each business module, monitor the current, voltage and temperature of each business module, monitor the real-time status of the fan, and perform reset control on each business module; The domestically produced integrated network management system software adopts a B / S browser server architecture design model, deploys the management system on a server, and accesses the system through a browser.
[0050] Preferably, the server adopts the domestically produced Kylin operating system.
[0051] Preferably, if Figure 6 As shown, the domestic integrated network management system software uses the SNMP protocol to interact with the device for data, has the ability to centrally monitor the communication network, provides a user centralized monitoring interface, supports online control of remote devices, and has configuration management, log management, health management, security management, maintenance management, topology management, performance management, and alarm management; The configuration management is used for resetting and restarting each module in the communication device, querying basic information, configuring related services and querying configurations; The log management is used to record the configuration operations performed by the user; The health management is used to query and display the operating status of the main control module, switching module, optical transmission module, covered wire transmission module, Beidou timing module, and wireless communication module in the system communication equipment; The security management is used to manage user information and levels. Administrators can assign operation permissions to users of other levels, and users can only complete operations within their permissions. When users log in, a judgment should be made, and if the judgment fails, the user is not allowed to log in. The maintenance management is used to provide module software upgrade function and database backup and restore function; The topology management is used to display the device in a graphical form in the software interface and provide optical link topology and network topology display functions; The performance management is used to complete the query and statistics of the port traffic of the system communication equipment switching module; The alarm management is used to query and confirm current alarms and historical alarms, and can display alarm details and alarm confirmation status; collect and display the in-place information of each module in the system communication equipment; collect and display the alarm status of the optical transmission module.
[0052] Preferably, the domestic integrated network management system software uses a domestic database, such as the Jincang database.
[0053] After the integrated network management system was run for 10 weeks, there was no abnormal power failure in the service module of slot 3#; checking the log saved by the computer serial port debugging assistant, no erroneous messages were found in the data received by the USART serial port of the microcontroller; the oscilloscope did not capture the interrupt service program longer than 8μs; the health management information of the integrated communication unit was reported normally. The problem of the long running time of the I2C interrupt service program causing the USART serial port to receive data errors was solved.
[0054] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A domestically produced main control module single chip microcomputer, characterized in that: The main control module single chip microcomputer adopts GD32 single chip microcomputer; The GD32 microcontroller receives the message command sent by the main control module CPU through the USART serial port, and verifies and checks the received message; When the GD32 single-chip microcomputer acts as a host to communicate with each service module in the integrated communication unit through the I2C bus, the I2C bus host receiving mode is scheme A, and scheme A corresponds to the use of I2C receiving interrupt.
2. The main control module single chip computer according to claim 1, characterized in that: The verification and checking of the received message is specifically as follows: If the checksum result is consistent, the message will be parsed and sent down; If the checksum result is inconsistent, the command message will be discarded.
3. A domestic integrated communication unit main control module, characterized in that: It includes the main control module single chip microcomputer and the main control module CPU as claimed in claim 1 or 2; The main control module CPU and the integrated network management system software use network port communication; The main control module CPU communicates with the GD32 microcontroller using the USART serial port, and a checksum is added to the message sent to the GD32 microcontroller.
4. The main control module according to claim 3, characterized in that: The main control module CPU adopts the domestic FT2000+ / 64 processor.
5. A domestic integrated communication unit, characterized in that: It is composed of an integrated communication unit basic platform, a main control module as claimed in claim 3 or 4, and a plurality of business modules; The integrated communication unit basic platform includes: a power module, a network management module, a switching module and a risk control module; The service module includes: an optical transmission module, a covered wire transmission module, a Beidou timing module and a wireless communication module.
6. A domestic integrated network management system, characterized in that: include: The domestic integrated communication unit and the domestic integrated network management system software as claimed in claim 5; The domestic integrated network management system software is used to query and obtain the online status of each business module, monitor the current, voltage and temperature of each business module, monitor the real-time status of the fan, and perform reset control on each business module; The domestically produced integrated network management system software adopts a B / S browser server architecture design model, deploys the management system on a server, and accesses the system through a browser.
7. The system according to claim 6, characterized in that The server uses the domestically produced Kylin operating system.
8. The system according to claim 6, characterized in that The domestic integrated network management system software uses the SNMP protocol to interact with devices for data, has the ability to centrally monitor communication networks, provides a centralized monitoring interface for users, supports online control of remote devices, and has configuration management, log management, health management, security management, maintenance management, topology management, performance management, and alarm management; The configuration management is used for resetting and restarting each module in the communication device, querying basic information, configuring related services and querying configurations; The log management is used to record the configuration operations performed by the user; The health management is used to query and display the operating status of the main control module, switching module, optical transmission module, covered wire transmission module, Beidou timing module, and wireless communication module in the system communication equipment; The security management is used to manage user information and levels. Administrators can assign operation permissions to users of other levels, and users can only complete operations within their permissions. A judgment should be made when the user logs in. If the judgment fails, the user is not allowed to log in. The maintenance management is used to provide module software upgrade function and database backup and restore function; The topology management is used to display the device in a graphical form in the software interface and provide optical link topology and network topology display functions; The performance management is used to complete the query and statistics of the port traffic of the system communication equipment switching module; The alarm management is used to query and confirm current alarms and historical alarms, and can display alarm details and alarm confirmation status; Collect and display the in-place information of each module in the system communication equipment; Collects and displays the alarm status of the optical transmission module.
9. The system according to claim 6, characterized in that The domestic integrated network management system software uses a domestic database.
Citation Information
Patent Citations
Wireless network data communication equipment monitoring system and equipment monitoring method
CN105282772A
Software upgrading method based on domestic single-chip microcomputer GD32
CN113885910A
Network fault information collection equipment and operation method thereof
CN117411807A
Server management control method and system based on domestic single-chip microcomputer
CN117632663A
Full-autonomous multifunctional networked health management system
CN211183981U