ISP-based multi-channel full-automatic upgrading system and method
Technical Field
The invention relates to an ISP-based multi-channel full-automatic upgrading system and method.
Background
The program updating and upgrading generally adopts three modes of ICP (in Circuit programming), ISP (in System programming) and IAP (in Application programming), the ICP needs to use a specific burner to burn according to a complicated flow, the ICP needs to be dismounted for burning, and the process is complicated; the ISP needs to be externally connected with a specific interface, and the PC end also needs the specific interface, so that the upgrading can be realized; the IAP needs to develop firmware by itself, the development period is long, and the IAP is unstable (such as firmware loss and upgrading failure); the current mainstream burning method is ICP/ISP. The equipment and instruments develop towards the modularization trend, the types of the module MCU are diversified, various burning instruments are required to be equipped for multichannel MCU upgrading, the carrying is difficult and the disorder is easy to occur, the upgrading MCU needs various software (application software and upgrading software), the operation method is diversified, and the technical requirement on operators is very high. The existing upgrading mode of ICP/ISP/IAP needs to manually identify MCU, call different types of tools for upgrading, is easy to make mistakes, can only upgrade modules one by one, is low in efficiency, and seriously affects production and use of customers. And with more and more MCU modules, the phenomenon of program burning missing is more likely to occur in the ICP/ISP/IAP upgrading mode at present, and when the ICP/ISP/IAP upgrading mode occurs, burning is unsuccessful, and only manual recording can be performed manually. And the upgrading mode of ICP/ISP/IAP needs to provide unencrypted files, so that the possibility of disclosure is high. In view of the above, there is a need for an automatic upgrade system with high security to improve the upgrade efficiency of the device.
Disclosure of Invention
One of the technical problems to be solved by the invention is to provide an ISP-based multi-channel full-automatic upgrading system, which realizes one-key upgrading of a non-dismantling type network port and improves upgrading efficiency and file security.
One of the technical problems to be solved by the invention is realized as follows: an ISP-based multi-channel full-automatic upgrading system comprises equipment to be upgraded and a PC (personal computer), wherein the equipment to be upgraded comprises a PCB (printed Circuit Board), the PCB is provided with a multifunctional gateway, a communication and upgrading interface group and an MCU (microprogrammed control Unit) module group, the MCU module group comprises a plurality of MCU modules, the communication and upgrading interface group comprises a plurality of interfaces, and each MCU module is correspondingly connected with one interface;
the PC is connected with the multifunctional gateway and transmits operation commands and data to the multifunctional gateway;
the multifunctional gateway is connected with the PC and the communication and upgrading interface group, and is used for receiving data of the PC, transmitting the data to the MCU module group through the communication and upgrading interface group so as to control the MCU module group to carry out upgrading operation, and receiving the data of the MCU module group through the communication and upgrading interface group and transmitting the data to the PC;
the communication and upgrading interface group is connected with the multifunctional gateway and the MCU module group and is responsible for communication and control between the multifunctional gateway and the MCU module group;
and the MCU module group is connected with the communication and upgrading interface group, receives the data of the multifunctional gateway through the communication and upgrading interface group and responds to the multifunctional gateway.
Furthermore, each interface comprises a bidirectional communication interface, a BM interface and a RESET interface, and the multifunctional gateway is provided with the bidirectional communication interface, the BM interface and the RESET interface corresponding to the interfaces.
Further, the PC comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the following steps:
step 1, operating a multifunctional gateway according to a specific protocol through a PC, and binding the multifunctional gateway with an MCU module through a communication interface to realize the communication synchronization of the PC and the MCU module;
step 2, judging whether the burning file is an encrypted file and judging whether the file is in compliance, if so, decrypting the encrypted file, otherwise, reporting an error and finishing the operation;
step 3, controlling the multifunctional gateway through the PC, wherein the multifunctional gateway controls the BOOT and the RESET pin of the corresponding MCU module through the BM interface and the RESET interface in the interface, so that the corresponding MCU module enters an ISP mode;
step 4, judging the type of the MCU module, and selecting a corresponding API by the PC according to the type of the MCU module to carry out ISP upgrading;
step 5, judging whether the burning is successful, if so, entering step 6, otherwise, marking the burning as unsuccessful, and entering step 6;
and 6, judging whether the current module is the last upgrading module, if so, returning upgrading success to the PC, otherwise, returning to the step 1, binding the multifunctional gateway with the next MCU module through the communication interface, and continuously upgrading the next MCU module.
The second technical problem to be solved by the invention is to provide an ISP-based multi-channel full-automatic upgrading method, which realizes one-key upgrading of a non-dismantling type network port and improves upgrading efficiency and file security.
The second technical problem to be solved by the invention is realized as follows: a full-automatic upgrading method based on ISP multichannel is characterized in that equipment to be upgraded and a PC are required to be provided, the equipment to be upgraded comprises a PCB, a multifunctional gateway, a communication and upgrading interface group and an MCU module group are arranged on the PCB, the MCU module group comprises a plurality of MCU modules, the communication and upgrading interface group comprises a plurality of interfaces, each MCU module is correspondingly connected with one interface, each interface comprises a bidirectional communication interface, a BM interface and a RESET interface, and the multifunctional gateway is provided with a bidirectional communication interface, a BM interface and a RESET interface which correspond to the interfaces; the PC is connected with the communication and upgrading interface group through the multifunctional gateway;
the method comprises the following steps:
step 1, operating a multifunctional gateway according to a specific protocol through a PC, and binding the multifunctional gateway with an MCU module through a communication interface to realize the communication synchronization of the PC and the MCU module;
step 2, judging whether the burning file is an encrypted file and judging whether the file is in compliance, if so, decrypting the encrypted file, otherwise, reporting an error and finishing the operation;
step 3, controlling the multifunctional gateway through the PC, wherein the multifunctional gateway controls the BOOT and the RESET pin of the corresponding MCU module through the BM interface and the RESET interface in the interface, so that the corresponding MCU module enters an ISP mode;
step 4, judging the type of the MCU module, and selecting a corresponding API by the PC according to the type of the MCU module to carry out ISP upgrading;
step 5, judging whether the burning is successful, if so, entering step 6, otherwise, marking the burning as unsuccessful, and entering step 6;
and 6, judging whether the current module is the last upgrading module, if so, returning upgrading success to the PC, otherwise, returning to the step 1, binding the multifunctional gateway with the next MCU module through the communication interface, and continuously upgrading the next MCU module.
The invention has the following advantages:
1. the MCU module is automatically identified, and program upgrading is carried out manually one by one, so that the error rate is reduced;
2. one-key upgrading is performed, the programming efficiency is improved, and the upgrading time is shortened by 75-90%;
3. the MCU modules are provided with respective corresponding interfaces, data transmission between the MCU modules and the PC is realized through the multifunctional gateway, and additional burners, burning interfaces and burning software are not needed, disassembly is not needed, the maintenance difficulty of the equipment is reduced, and the damage and other risks to the equipment in the disassembly process are reduced;
4. the whole operation is simple, and the technical requirement threshold for operators is low;
5. the burning prevention phenomenon can be effectively prevented, automatic burning is carried out according to the sequence of the ports, and each program is upgraded with a fixed identifier;
6. the burning file is encrypted and decrypted, so that the safety of the upgrading technology is improved.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an ISP-based multi-channel fully automatic upgrade system according to the present invention.
Fig. 2 is a flow chart of the full-automatic upgrade execution based on ISP multiple channels according to the present invention.
Detailed Description
Referring to fig. 1 and 2, the ISP-based multi-channel full-automatic upgrade system of the present invention includes a device to be upgraded and a PC 1, wherein the device to be upgraded includes a PCB 2, the PCB 2 is provided with a multi-functional gateway 3, a communication and upgrade interface set 4 and an MCU module set 5, the MCU module set 5 includes a plurality of MCU modules, which are MCU modules 5.1 and …, respectively, and MCU modules 5.N, N are positive integers greater than 1, the communication and upgrade interface set includes a plurality of interfaces, which correspondingly include interfaces 4.1 and …, and interface 4.N, N is a positive integer greater than 1, each MCU module is correspondingly connected with one interface, that is, the MCU modules correspond to the interfaces one to one;
the PC is connected with the multifunctional gateway and transmits operation commands and data to the multifunctional gateway;
the multifunctional gateway is connected with the PC and the communication and upgrading interface group, and is used for receiving data of the PC, transmitting the data to the MCU module group through the communication and upgrading interface group so as to control the MCU module group to carry out upgrading operation, and receiving the data of the MCU module group through the communication and upgrading interface group and transmitting the data to the PC;
the communication and upgrading interface group is connected with the multifunctional gateway and the MCU module group and is responsible for communication and control between the multifunctional gateway and the MCU module group;
the MCU module group is connected with the communication and upgrading interface group, receives data of the multifunctional gateway through the communication and upgrading interface group and makes a response to the multifunctional gateway;
each interface comprises a bidirectional communication interface, a BM interface and a RESET interface, the bidirectional communication interface, the BM interface and the RESET interface corresponding to the interfaces are arranged on the multifunctional gateway, the multifunctional gateway respectively realizes data transmission with a PC and a communication and upgrading interface group through the bidirectional communication interfaces, and controls the MCU module to perform BOOT pull-down/pull-up operation through the BM interface and pin RESET operation through the RESET interface when receiving a PC end instruction.
The PC comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and the processor executes the program to realize the following steps:
step 1, operating the multifunctional gateway according to a specific protocol through a PC (personal computer), for example, an Ethernet is performed through an IP (Internet protocol) and a port number, binding the multifunctional gateway with an MCU (microprogrammed control Unit) module through a communication interface, realizing the communication synchronization of the PC and the MCU module, and performing upgrading operation only in a synchronous state;
step 2, judging whether the burning file is an encrypted file and judging whether the file is in compliance, if so, decrypting the encrypted file, otherwise, reporting an error and finishing the operation;
step 3, controlling the multifunctional gateway through the PC, wherein the multifunctional gateway controls the BOOT and the RESET pin of the corresponding MCU module through the BM interface and the RESET interface in the interface, so that the corresponding MCU module enters an ISP mode;
step 4, judging the type of the MCU module, selecting a corresponding API by the PC according to the type of the MCU module to perform ISP upgrading, wherein the ISP upgrading is to transmit an upgraded protocol and data to the multifunctional gateway through PC end software, the multifunctional gateway transmits the upgraded protocol and data to the corresponding MCU module through a communication interface of the interface according to a port number, and the MCU module performs system upgrading after receiving the upgraded protocol and data;
step 5, judging whether the burning is successful, if so, entering step 6, otherwise, marking the burning as unsuccessful, and entering step 6;
and 6, judging whether the current module is the last upgrading module, if so, returning upgrading success to the PC, displaying PASS (all modules are upgraded successfully) or NG (not passed) on the interface of the PC, otherwise, returning to the step 1, binding the multifunctional gateway with the next MCU module through the communication interface, and continuously upgrading the next MCU module until the last MCU module is upgraded.
Referring to fig. 1 and fig. 2 again, the present invention provides an ISP-based multi-channel full-automatic upgrading method, which includes providing a device to be upgraded and a PC, where the device to be upgraded includes a PCB board, the PCB board is provided with a multi-functional gateway, a communication and upgrade interface set and an MCU module set, the MCU module set includes a plurality of MCU modules, the communication and upgrade interface set includes a plurality of interfaces, each MCU module is correspondingly connected to one of the interfaces, each interface includes a bidirectional communication interface, a BM interface and a RESET interface, and the multi-functional gateway is provided with a bidirectional communication interface, a BM interface and a RESET interface corresponding to the interfaces; the PC is connected with the communication and upgrading interface group through the multifunctional gateway;
the method comprises the following steps:
step 1, operating the multifunctional gateway according to a specific protocol through a PC (personal computer), for example, an Ethernet is performed through an IP (Internet protocol) and a port number, binding the multifunctional gateway with an MCU (microprogrammed control Unit) module through a communication interface, realizing the communication synchronization of the PC and the MCU module, and performing upgrading operation only in a synchronous state;
step 2, judging whether the burning file is an encrypted file and judging whether the file is in compliance, if so, decrypting the encrypted file, otherwise, reporting an error and finishing the operation;
step 3, controlling the multifunctional gateway through the PC, wherein the multifunctional gateway controls the BOOT and the RESET pin of the corresponding MCU module through the BM interface and the RESET interface in the interface, so that the corresponding MCU module enters an ISP mode;
step 4, judging the type of the MCU module, selecting a corresponding API by the PC according to the type of the MCU module to perform ISP upgrading, wherein the ISP upgrading is to transmit an upgraded protocol and data to the multifunctional gateway through PC end software, the multifunctional gateway transmits the upgraded protocol and data to the corresponding MCU module through a communication interface of the interface according to a port number, and the MCU module performs system upgrading after receiving the upgraded protocol and data;
step 5, judging whether the burning is successful, if so, entering step 6, otherwise, marking the burning as unsuccessful, and entering step 6;
and 6, judging whether the current module is the last upgrading module, if so, returning upgrading success to the PC, displaying PASS (all modules are upgraded successfully) or NG (not passed) on the interface of the PC, otherwise, returning to the step 1, binding the multifunctional gateway with the next MCU module through the communication interface, and continuously upgrading the next MCU module until the last MCU module is upgraded.
The invention realizes the synchronization of the communication between the PC end and the MCU module by arranging a multifunctional gateway and a communication and upgrading interface group, can automatically identify the MCU module, is upgraded by one program without manual operation, reduces the error rate, upgrades by one key, improves the programming efficiency, shortens the upgrading time by 75 to 90 percent, can realize the upgrading by using the existing interface and the PC end software without an additional burner, a programming interface and programming software and without disassembling, reduces the equipment maintenance difficulty and reduces the risk caused by disassembling, has simple whole upgrading operation and low technical requirement threshold for operators, can effectively prevent the burn-in phenomenon, can automatically burn according to the port sequence, and each program is upgraded with a fixed identifier, encrypts and decrypts the programming file, thereby improving the safety of the upgrading technology.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.