Multi-embedded system program upgrading method for underwater equipment

The application of MCU of underwater equipment remotely upgrades through serial port connection and Y-modem protocol solves the problems of large manpower and material consumption and low efficiency of traditional upgrade methods, and realizes efficient and safe upgrade of embedded system programs.

CN120353486AInactive Publication Date: 2025-07-22NINGBO SOUNDVIEW INTELLIGENT TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510827604.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The upgrade of embedded system programs of underwater equipment in the prior art requires the original factory technician to personally go to the equipment location to dismantle and external upgrade devices, resulting in large labor and material consumption and low efficiency, and the risk of damaging the equipment.

Method used

Through the serial port connection between the host computer, the main control unit ARM and the control unit MCU, the upgrade software B and Y-modem protocols are used to realize the application of remotely upgrading the MCU, without disassembling the mechanical housing and external upgrade devices, dynamic blocking technology and CRC16 verification are used to ensure data transmission reliability.

Benefits of technology

Remote program upgrade of underwater equipment MCUs has been realized, saving manpower and material costs, shortening upgrade time, and avoiding the risk of equipment disassembly and damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353486A_ABST
    Figure CN120353486A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater equipment multi-embedded system program upgrading method, which comprises the following steps that: an upper computer closes application software A of a main control unit ARM (Advanced RISC Machines), and operates upgrading software B of the main control unit ARM; the upper computer issues an upgrading command, and upgrading software B at the ARM end issues the command to a serial port of the MCU; the MCU carries out a switching process between the bootstrap program and the application program; the upper computer downloads the binary file of the upgraded MCU into a FLASH of the MCU by using a Y-modem protocol; the MCU displays upgrading information in the upper computer through the ARM end; and after the MCU is upgraded, the upgrading software B of the main control unit ARM is closed by using the upper computer, and the application software A of the main control unit ARM is started. According to the invention, the upper computer upgrades the application programs of other MCUs through the network and the ARM end upgrade software B, a mechanical shell does not need to be disassembled, an external upgrade device does not need to be connected, and technicians can remotely guide clients to upgrade the MCUs; the manpower and material resource cost is greatly saved, and the program upgrading time is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater equipment systems, and particularly to a method for upgrading programs of multiple embedded systems of underwater equipment. Background Art

[0002] Underwater equipment is a type of device specifically used for detecting underwater hydrological information, and its interior consists of multiple embedded systems. Among these multiple embedded systems, one uses ARM as the main control unit. This main control unit can interact with the upper computer through the network upward, and communicate with other MCU-based embedded devices through the serial port downward. When the program of the underwater equipment needs to be upgraded, for the main control ARM part, the program upgrade can be directly achieved through the network. However, for the program upgrade of other MCU-based embedded devices, the traditional method is for the original factory technicians to go to the installation location of the underwater equipment in person, disassemble the device shell, and then use a special upgrade device to complete the upgrade operation. This traditional upgrade method not only consumes a large amount of human and material resources, but also the entire upgrade process is extremely time-consuming and inefficient. Therefore, we propose a method for upgrading programs of multiple underwater embedded systems, aiming to effectively solve the many problems existing in the above traditional upgrade method and improve the convenience and efficiency of the upgrade.

[0003] In the prior art, there are the following disadvantages: It is necessary for the original factory technicians to go to the location of the underwater equipment for upgrading, or send the underwater equipment to the original factory. Whichever way is time-consuming, laborious and costly.

[0004] It is necessary to open the mechanical shell of the underwater equipment. The disassembly and assembly process is time-consuming and laborious, and there is a risk of damaging the internal cables.

[0005] It is necessary to externally connect an upgrade device, and there is a one-to-one correspondence between its wire sequence and the underwater equipment. If inserted wrongly, the device will be damaged. Summary of the Invention

[0006] The purpose of the present invention is to provide a method for upgrading programs of multiple embedded systems of underwater equipment to overcome the deficiencies in the prior art.

[0007] To achieve the above purpose, the present invention provides the following technical solutions: The present application discloses a method for upgrading programs of multiple embedded systems of underwater equipment, including an upper computer, a main control unit ARM, and several control units MCU. The main control unit ARM is connected to the control unit MCU through the serial port; the method specifically includes the following steps: S1. The upper computer closes the application software A of the main control unit ARM and runs the upgrade software B of the main control unit ARM; S2. The host computer sends the MCU upgrade command, and the upgrade software B at the ARM end sends the command to the serial port of the control unit MCU; S3. The control unit MCU performs the switching process between the bootloader and the application program, and selects to upgrade the application program; S4. The host computer uses the Y-modem protocol to download the binary file for upgrading the control unit MCU to the FLASH of the MCU; S5. The control unit MCU displays the upgrade information on the host computer through the upgrade software B at the ARM end and the network; S6. After the control unit MCU completes the upgrade, the host computer is used to close the upgrade software B of the main control unit ARM and start the application software A of the main control unit ARM.

[0008] Preferably, the specific process of step S3 is as follows: S31. After the control unit MCU is powered on, it will enter the countdown of time T1. Within the time T1, if the "Enter" key is received through the serial port, it will enter the main menu and proceed to step S32; otherwise, it will jump to the application program and proceed to step S34; S32. After entering the main menu, it performs the countdown of time T2. If the number "1" is received through the serial port within the time T2, it will jump to the upgrade interface and wait for the input of the binary upgrade file, and proceed to step S33; if the number "2" or a timeout is received through the serial port within the time T2, it will jump to the application program and proceed to step S34; S33. Input the binary upgrade file into the control unit MCU through the Y-modem protocol. The bootloader will store the file in the FLASH. After the transmission and storage are completed, it will jump back to step S32.

[0009] S34. The control unit MCU runs the application program, determines whether an upgrade command has been received. If so, it triggers a reset and jumps to step S31; otherwise, it loops through step S34.

[0010] Preferably, the specific process of step S4 is as follows: S41. The host computer sends the "start upgrade" instruction to the main control unit ARM, starts the upgrade software B, and waits for the return request signal, then proceeds to step S42; S42. After the main control unit ARM is ready, the host computer sends the "start upgrade" instruction, waits for the return signal, and then enters the Y-modem protocol upgrade process, and proceeds to step S43; S43. First, send the start frame, including the file name and the file size, wait for the return confirmation signal, and then proceed to step S44. If the confirmation signal is not received within the time T3, it will time out and exit, and return to step S41; S44. Perform data transmission frame by frame according to the network status; After completing the transmission of the data packet, send the end-of-transmission identifier EOT, send the end frame after receiving the confirmation signal from the main control unit ARM, and complete the upgrade process after receiving the end signal from the main control unit ARM.

[0011] Preferably, in step S44, the size of the frame is 128B / 1KB.

[0012] Preferably, in step S44, whenever a single frame is sent, the host computer waits to receive the confirmation signal returned by the main control unit ARM; if the confirmation signal returned by the main control unit ARM is not received after the timeout, return to step S41; otherwise, perform the data transmission of the next frame.

[0013] Preferably, in step S5, the upgrade information includes the size of the upgrade file, the upgrade time, and whether the upgrade is successful.

[0014] Advantages of the present invention: The present invention provides a method for upgrading the programs of multiple embedded systems of underwater equipment, which realizes the operation of the host computer to upgrade the application programs of other control units MCU through the network and the software B of the ARM side. Therefore, there is no need to disassemble the mechanical shell and no need to externally connect an upgrade device. Even the original factory technicians can remotely guide the customers to upgrade the MCU; this solution greatly saves the labor and material costs and greatly shortens the program upgrade time.

[0015] The features and advantages of the present invention will be described in detail through embodiments in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the composition of the multiple embedded systems of underwater equipment; Figure 2 It is a schematic diagram of the switching process of the startup boot program and the application program of the control unit MCU of the present invention; Figure 3 It is a schematic diagram of the process of a method for upgrading the programs of multiple embedded systems of underwater equipment according to the present invention; Figure 4 It is a schematic diagram of the interaction between the host computer and the main control unit ARM of the present invention; Figure 5 It is a schematic diagram of the successful upgrade interface of the MCU by the host computer. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below through the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the scope of the present invention. In addition, in the following description, the descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.

[0018] The present invention provides a method for upgrading the programs of multiple embedded systems of an underwater device, and the specific operations are as follows: As Figure 1 shown, the host computer is connected to the underwater device through Ethernet (wired or wireless); the multiple embedded systems in the underwater device include 1 main control unit ARM and several other control units MCU, and ARM is connected to each MCU through a serial port; Among them, there are 2 software in the main control unit ARM, namely application software A and upgrade software B; application software A is the software that runs when the underwater device works normally; upgrade software B is the software that runs when the underwater device needs to upgrade other control units MCU.

[0019] The software of other control units MCU is also divided into two parts, namely the bootloader and the application program (App); the bootloaders between different MCUs are the same, and the App realizes different functions according to different requirements of the underwater device; As Figure 2 shown, the switching process between the Bootloader and the App in the MCU; a) After the MCU is powered on, it will enter a countdown of time T1. If the "Enter" key is received through the serial port within the T1 time, it will enter the main menu, otherwise it will jump to the application program; b) There are two options in the main menu, 1: upgrade the application program; 2: jump to the application program; c) There will also be a countdown T2 in the main menu. If "1" is received through the serial port within the T2 time, it will jump to the upgrade interface, and the serial port will continuously output "C" and wait for the binary upgrade file to be input; if "2" is received through the serial port or the time-out occurs within the T2 time, it will jump to the application program; d) The binary upgrade file is input into the MCU through the Y-modem protocol, and the Bootloader will store the file in the FLASH. After the transmission and storage are completed, it will jump back to step c. Jumping back to step c is to prevent the failure of this upgrade and facilitate re-upgrade; e) After the upgrade is successful, the serial port will output prompts such as the size of the upgrade file, the upgrade time, and the upgrade success; f) Wait for the T2 time or receive "2" through the serial port and jump to the application program; g) During the execution of the application program, if it is necessary to upgrade the application program, only an upgrade command needs to be sent to the serial port. After the serial port receives the command, it will trigger a reset, and the application program will jump to the Bootloader, and then operate according to steps a-e; As Figure 3As shown below, taking the upgrade of the application program of other control units 1 of the MCU as an example, the upgrade steps will be explained. The upgrade steps of other MCU control units are the same as this; 1. Use the host computer to shut down the application software A of the main control unit ARM and start running the upgrade software B of the main control unit ARM; 2. The host computer issues an MCU upgrade command. The command is transmitted through the network to the ARM side of the main control unit. The upgrade software B on the ARM side issues the command to the serial port of other control units 1 of the MCU; 3. According to the above Bootloader and App switching process, select the upgrade application program.

[0020] 4. The host computer uses the conventional serial port Y-modem protocol and encapsulates it in combination with TCP to achieve reliable data transmission. By designing a handshake protocol, a stable connection is established between the host computer and the ARM main control. The 128-byte data block of Y-modem is encapsulated in the TCP stream. While retaining the CRC16 checksum, the reliability of the underlying layer is ensured by using the TCP retransmission function. In addition, the dynamic block technology is adopted to dynamically adjust the Y-modem block size (128B / 1KB) according to the network quality, improving the transmission efficiency. Finally, the function of downloading the MCU binary upgrade file in the host computer disk to the FLASH of the MCU through the ARM main control is realized. The interaction between the host computer and the ARM main control, such as Figure 4 shown below: a) Send an instruction of "start upgrade" to the ARM main control unit to start the upgrade software B and wait for the return request signal C, that is, confirm to complete and proceed to the next step; b) After the main control unit is ready, the host computer sends a "start upgrade" instruction and waits for the return of C to officially enter the Y-modem protocol upgrade process; c) First, send a start frame, including the file name and file size, and wait for the return confirmation signal ACK to proceed to the next step. If the ACK is not received within the T3 time, it times out and exits, waiting for the user to start the upgrade again; d) According to the network status, perform data transmission in 128B / 1KB per frame. Whenever a single frame is sent, wait for the confirmation signal ACK instruction of the main control unit to ensure that the data is correct. If any frame times out, return to step a and prompt upgrade error, waiting for the next upgrade; e) Repeat step d. After completing the data packet sending, send the transmission end identifier EOT. After receiving the confirmation signal ACK from the main control unit, send an end frame. After receiving the end signal O from the main control unit, the upgrade process is completed.

[0021] The MCU prints information such as upgrade success, file size, and transmission time in the host computer through the upgrade program B on the ARM side and the network.

[0022] After the MCU upgrade is completed, use the host computer to close the ARM upgrade software B and start the ARM main control application software A.

[0023] At this point, the application program upgrade of the other control unit 1 of the MCU is completed.

[0024] like Figure 5 As shown, the upgrade interface of the host computer to other MCU control units 1 is successful; The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for upgrading the program of a multi-embedded system of an underwater device, characterized in that: It includes a host computer, a main control unit ARM, and several control units MCU. The main control unit ARM is connected to the control unit MCU through a serial port. The method specifically includes the following steps: S1. The host computer closes the application software A of the main control unit ARM and runs the upgrade software B of the main control unit ARM. S2. The host computer issues an MCU upgrade command, and the upgrade software B at the ARM end sends the command to the serial port of the control unit MCU. S3. The control unit MCU performs the switching process between the bootloader and the application program and selects to upgrade the application program. S4. The host computer uses the Y-modem protocol to download the binary file for upgrading the control unit MCU to the FLASH of the MCU. S5. The control unit MCU displays the upgrade information on the host computer through the upgrade software B at the ARM end and the network. S6. After the control unit MCU finishes the upgrade, the host computer is used to close the upgrade software B of the main control unit ARM and start the application software A of the main control unit ARM.

2. The method for upgrading the program of a multi-embedded system of an underwater device according to claim 1, characterized in that, The specific process of step S3 is as follows: S31. After the control unit MCU is powered on, it will enter the countdown of time T1. Within the T1 time, if the "Enter" key is received through the serial port, it will enter the main menu and go to step S32; otherwise, it will jump to the application program and go to step S34. S32. After entering the main menu, it will perform the countdown of time T2. If the number "1" is received through the serial port within the T2 time, it will jump to the upgrade interface and wait for the binary upgrade file to be input, and go to step S33; if the number "2" or timeout is received through the serial port within the T2 time, it will jump to the application program and go to step S34. S33. Input the binary upgrade file into the control unit MCU through the Y-modem protocol. The bootloader will store the file in the FLASH. After the transmission and storage are completed, it will jump to step S32. S34. The control unit MCU runs the application program and determines whether an upgrade command is received. If so, it will trigger a reset and jump to step S31; Otherwise, loop step S34.

3. A method for upgrading a program of a multi-embedded system of an underwater device according to claim 1, characterized in that, The specific process of step S4 is as follows: S41. The host computer sends an instruction of "start upgrade" to the main control unit ARM, starts the upgrade software B, and waits for the return request signal, then enters step S42; S42. After the main control unit ARM is ready, the host computer sends an instruction of "start upgrade", waits for the return signal, and then enters the Y-modem protocol upgrade process and goes to step S43; S43. First, send the start frame, including the file name and the file size, wait for the return confirmation signal, and then enter step S44. If the signal is not received within the T3 time, it will time out and exit, and return to step S41; S44. Transmit data frame by frame according to the network status; S45. After the data packet is sent, send the transmission end identifier EOT. After receiving the confirmation signal from the main control unit ARM, send the end frame. After receiving the end signal from the main control unit ARM, the upgrade process is completed.

4. The method for upgrading the program of a multi-embedded system of an underwater device according to claim 3, wherein In step S44, the size of the frame is 128B / 1KB.

5. The method for upgrading the program of a multi-embedded system of an underwater device according to claim 3, characterized in that, In step S44, whenever a single frame is sent, the host computer waits to receive an acknowledgment signal returned by the main control unit ARM; if the acknowledgment signal returned by the main control unit ARM is not received after a timeout, return to step S41; On the contrary, proceed with the data transmission of the next frame.

6. The method for upgrading the program of a multi-embedded system of an underwater device according to claim 1, characterized in that, In step S5, the upgrade information includes the upgrade file size, upgrade time, and whether the upgrade is successful.

Citation Information

Patent Citations

  • Internet of Things Wifi loaded multi-MCU upgrading method and device, equipment and medium

    CN111831309A

  • Method for upgrading multiple controllers based on OTA technology

    CN114980203A

  • Method and system for online upgrading MCU firmware of satellite communication equipment

    CN115080091A

  • Remote firmware upgrading method for embedded device

    CN117931249A

  • Multi-MCU firmware upgrading method

    CN118796232A