CN113741933A - Remote upgrading method of controller, controller and system - Google Patents

Remote upgrading method of controller, controller and system Download PDF

Info

Publication number
CN113741933A
CN113741933A CN202110967582.0A CN202110967582A CN113741933A CN 113741933 A CN113741933 A CN 113741933A CN 202110967582 A CN202110967582 A CN 202110967582A CN 113741933 A CN113741933 A CN 113741933A
Authority
CN
China
Prior art keywords
controller
upgrade
file
upgrading
program
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.)
Pending
Application number
CN202110967582.0A
Other languages
Chinese (zh)
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 TECHRISE ELECTRONICS CO Ltd
Original Assignee
SHENZHEN TECHRISE ELECTRONICS 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 TECHRISE ELECTRONICS CO Ltd filed Critical SHENZHEN TECHRISE ELECTRONICS CO Ltd
Priority to CN202110967582.0A priority Critical patent/CN113741933A/en
Publication of CN113741933A publication Critical patent/CN113741933A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Abstract

The application provides a remote upgrading method of a controller, the controller and a system, which are used for acquiring a flash memory program of an upper computer instruction clearing upgrading position; acquiring a remote upgrading file from an upper computer and storing the remote upgrading file at the upgrading position; and operating the upgrade file according to the boot loader. The upgrading process of the controller is completed in a remote communication mode, a large amount of manpower and material resource cost is not needed to be consumed, meanwhile, the upgrading process is short in time consumption, the upgrading efficiency is high, and normal use of a user is not affected.

Description

Remote upgrading method of controller, controller and system
Technical Field
The application belongs to the technical field of computers, and particularly relates to a remote upgrading method of a controller, the controller and a system.
Background
Street light controller is a common controller that uses a Cortex-M0 processor chip. One city has 3 to 5 thousands of street lamps (one super city can reach 5 to 10 thousands of street lamps), one two-three-wire city has at least about 1 million street lamps, and modern street lamps generally need to be provided with controllers to achieve the purposes of energy saving, intelligent control and the like.
However, when the programs of such large quantities of controllers are wrong or the functions need to be upgraded, the conventional method is to return all the controllers to the factory to update the programs or the workers go to the field to disassemble the controllers to burn the programs again, so that high manpower and material resource costs are consumed, and meanwhile, the program upgrading efficiency is low, and the use experience of users is influenced.
Disclosure of Invention
The application aims to provide a remote upgrading method of a controller, a street lamp and a remote upgrading system of the controller, and aims to solve the problems of high program upgrading cost and low efficiency of a traditional controller.
In order to achieve the above object, in a first aspect, an embodiment of the present application provides a remote upgrade method for a controller, including:
acquiring a flash memory program of an upper computer instruction clearing upgrading position;
acquiring a remote upgrading file from an upper computer and storing the remote upgrading file at the upgrading position;
and operating the upgrade file according to the boot loader.
In a possible implementation manner of the first aspect, the obtaining a flash program of an upper computer instruction clearing upgrade locations includes:
the upper computer sends a flash memory clearing instruction to the controller after receiving a program file of a target application sent by the master station;
and the controller clears the flash program at the upgrading position according to the flash clearing instruction.
In a possible implementation manner of the first aspect, the upgrade file is a plurality of communication frames into which a program file received by the upper computer from a master station is parsed.
In a possible implementation manner of the first aspect, before the running the upgrade file according to the boot loader, the method further includes:
the controller calculates a cyclic redundancy check code in the upgrade file;
when the cyclic redundancy check code in the upgrade file calculated by the controller is consistent with the cyclic redundancy check code pre-stored in the upgrade file, the upgrade is considered to be successful, the upgrade flag bit in the electrically erasable and programmable read-only memory in the controller is modified, and the upgrade file is reset and operated;
and when the cyclic redundancy check code in the upgrade file calculated by the controller is inconsistent with the cyclic redundancy check code pre-stored in the upgrade file, judging that the upgrade is not successful, checking errors in the upgrade process and upgrading again.
In another possible implementation manner of the first aspect, before the controller calculates the cyclic redundancy check code in the upgrade file, the method further includes:
the controller confirms whether the received upgrade file is complete;
and when the upgrading file received by the controller is complete, calculating a cyclic redundancy check code in the upgrading file.
In another possible implementation of the first aspect, the upgrade file includes a file information frame and a subsequent frame; before the controller confirms whether the received upgrade file is complete, the method further includes:
the controller receives the file information frame and confirms whether the program number in the file information frame is consistent with the program number of the current controller;
and when the program number in the file information frame is consistent with the program number of the current controller, confirming to upgrade the controller and continuously receiving the subsequent frame.
In another possible embodiment of the first aspect, when there is one of the controllers,
when the cyclic redundancy check codes in the upgrade files calculated by the controller are inconsistent with the cyclic redundancy check codes pre-stored in the upgrade files, the upgrade is considered to be unsuccessful, and the controller replies error codes to the corresponding upper computer;
and when the upgrading file received by the controller is incomplete, the controller replies an error code to the corresponding upper computer.
In another possible implementation manner of the first aspect, the wirelessly connecting the upper computer to the plurality of controllers, and after the running of the upgrade file for the upgrade operation, further includes:
the upper computer detects whether the controller is not upgraded successfully;
and when the upper computer detects that the controller is not upgraded successfully, the upper computer sends an upgrade file to the corresponding controller again to perform upgrade operation.
In a second aspect, an embodiment of the present application provides a controller, including:
a memory for storing a computer program;
a processor for implementing the steps of the method for remote upgrade of a controller when executing the computer program.
In a third aspect, an embodiment of the present application provides a remote upgrade system for a controller, including the controller,
the master station is in wireless connection with one or more upper computers and is configured to send the upgrade files to the one or more upper computers;
and the upper computer is wirelessly connected with the controller, is configured to receive the program file sent by the main station, then analyzes the program file into the upgrade file and sends the upgrade file to the controller.
Compared with the prior art, the embodiment of the application has the advantages that: according to the remote upgrading method of the controller, a flash memory program of an upgrading position is cleared by an upper computer instruction is obtained; acquiring a remote upgrading file from an upper computer and storing the remote upgrading file at the upgrading position; and operating the upgrade file according to the boot loader. The upgrading process of the controller is completed in a remote communication mode, a large amount of manpower and material resource cost is not needed to be consumed, meanwhile, the upgrading process is short in time consumption, the upgrading efficiency is high, and normal use of a user is not affected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a remote upgrade system for a controller according to an embodiment of the present disclosure;
fig. 2 is a specific flowchart of a remote upgrading method for a controller according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a program jump and interrupt processing of a remote upgrading method for a controller according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a controller provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a remote upgrade system of a controller according to an embodiment of the present application.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and 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.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
At present, when the traditional street lamp controller needs to be upgraded, all controllers are generally returned to a factory to update a program, or a worker goes to a field to disassemble the controller to burn the program again, a large amount of manpower and material resources are consumed in the two upgrading modes, and the upgrading efficiency is low.
Therefore, the application provides a remote upgrading method of the controller, the upper computer is a concentrator, one end of the upper computer is connected with the main station, and the other end of the upper computer is connected with the street lamp controller, so that the functions of controlling street lamps and collecting street lamp data are achieved; the master station is PC software, one end of the master station is connected with the internet for receiving and transmitting information, and the other end of the master station sends an upgrading command to the upper computer to play a role in controlling the upper computer and collecting data of the upper computer. The communication mode between the controller and the upper computer is broadband carrier (all controllers under the upper computer can be broadcast controlled, and one-to-one control can be realized).
This application passes through the controller and follows the host computer and acquire long-range upgrading file and upgrade to can accomplish the upgrading process to the controller with remote communication's mode, can accomplish the upgrading to all controllers in the short time, cost simultaneously with low costsly, consuming time weak point, efficient.
The following describes, by way of example, a remote upgrade method for a controller provided in the present application, with reference to the accompanying drawings: fig. 1 is a flowchart of a remote upgrading method for a controller according to an embodiment of the present application, and as shown in fig. 1, for convenience of description, only parts related to the embodiment are shown, and detailed descriptions are as follows: illustratively, a method of remote upgrade of a controller, comprising:
s1, acquiring a flash memory program of which the upgrading position is cleared by the upper computer instruction controller;
s2, acquiring a remote upgrade file from an upper computer and storing the remote upgrade file at an upgrade position;
and S3, operating the upgrade file according to the boot loader.
In this embodiment, an upgrade instruction is sent to a master station through the internet, a program file (for example, a program file with a suffix of ". bin" or ". hex") is sent to one or more upper computers through the master station, the one or more upper computers receive the upgrade file sent by the master station and send a flash memory clearing instruction to a controller, and the controller clears a flash memory program at an upgrade position by using an Application Programming (IAP) function, so as to leave a storage position for the upgrade file; and then, the upper computer analyzes the upgrade file into a mode of a plurality of communication frames and sends the mode to the controller through a communication protocol, and the controller receives the upgrade file, stores the upgrade file in an upgrade position and operates the upgrade file according to a boot loader, so that the upgrade process can be completed.
The communication protocol comprises a frame head, a lamp controller address, a frame total length, a control bit, a data field, a check code and a frame tail. The upgrade file implements an upgrade operation by changing the control bits and data fields each time.
The control bit performs an upgrade starting operation by setting the address to 0x1F, and the controller starts to perform an upgrade related operation when receiving the address of the control bit 0x 1F.
Wherein the data fields include:
the first byte is the file identification: the flash program of the position to be upgraded is cleared (i.e. when the currently running program is a low address, the high address program is cleared, and when the currently running program is a high address, the low address program is cleared), which is indicated by 0x00, and the file to be upgraded is indicated by 0x 10.
The second byte is the file attribute: when the first byte is 0x10, the second byte represents the attribute of the transmission file of the communication frame. When the second byte is 0x00, it indicates that the first frame and the middle frame of the file are transmitted, and when the second byte is 0x01, it indicates that the last frame of the file is transmitted.
The third and fourth bytes are the total frame number of the file to be transmitted.
The fifth and sixth bytes are the frame number of the current transmission (starting from 0 and increasing).
The seventh byte is the program file length of the frame. (the file length of the start frame and the middle frame is fixed to 128 bytes, the end frame is the residual bytes less than 128 bytes), and the following bytes are the upgrade file content.
The communication protocol also includes an upgrade status bit of the query controller and a Cyclic Redundancy Check (CRC) code of 16 bits of the upgrade file of the query controller. The upgrade status bit is an array of 60 bytes, each byte representing the receiving status of a frame, and can receive 480 frames in total. In the initial state, all bytes in the array are set to be 1, which indicates that no frame is received, and after a frame is successfully received, the corresponding byte is set to be 0, which indicates that the receiving is successful.
In this embodiment, the controller includes:
flash memory (i.e. Flash memory) configured such that when the total size of the Flash memory is 128K (0x00020000), the boot loader (i.e. BootLoader program) is located at the start position of the Flash memory of 0x00000000 (maximum 8K), and the Application (i.e. Application program) defaults to the start address at 0x00002000 (maximum 60K). When upgrading, the application program is transmitted to the upgrading program starting address 0x00011000 (maximum 60K). The basic functions of the application program are to control the light, calculate and store the use data, communicate with the upper computer, and the like.
A charged erasable programmable read-only memory (i.e. an EEPROM memory) configured to store an upgrade flag bit (2 bytes) which determines a location where the boot loader starts the application and a location where the interrupt function needs to be mapped, the interrupt function being mapped to a low address if the application is satisfied to start to the low address (0x 00002000); if the application is satisfied with a boot to high address (0x00011000), the interrupt function maps to the high address. The other space is used for storing non-volatile data required by the application program, such as electric energy, used time and the like.
And the static memory (namely the SRAM) is configured to reserve a space of 2 bytes when the application program is compiled, and is used for storing the upgrading mark read by the boot loader from the electrified erasable programmable read-only memory. This is because the life of the electrically erasable programmable read-only memory is limited and the read speed is slow compared to static memory, so it cannot be used in interrupt systems that require frequent mapping (typically using interrupts with a period of a few milliseconds). Meanwhile, in order to ensure that the positions of the two byte variables in the static memory are not changed, the two byte variables are fixed at the starting position 0x10000000 of the static memory, so that the starting position of the static memory is set to 0x10000002 when the application program is compiled.
Illustratively, the flash memory program for acquiring the instruction of the upper computer to clear the upgrade position comprises the following steps:
after receiving a program file of a target application sent by a master station, an upper computer sends a flash memory clearing instruction to a controller;
and the controller clears the flash program of the upgrading position according to the flash clearing instruction.
In the embodiment of the application, the master station sends a program file of a target application to the upper computer, the upper computer receives the program file and sends a flash memory clearing instruction to the controller, and the controller clears a flash memory program at an upgrading position according to the flash memory clearing instruction to free a storage position for the upgrading file; the upper computer analyzes the program file into an upgrade file and sends the upgrade file to the controller, and the controller receives the upgrade file and runs the upgrade file after storing the upgrade file at an upgrade position, so that upgrade operation is completed.
Illustratively, the upgrade file is a plurality of communication frames into which a program file received by the host computer from the master station is parsed.
In the embodiment of the application, the master station firstly sends the program file to the upper computer, and then the upper computer analyzes the program file into a plurality of communication frames so as to send the program file to the controller through a communication protocol.
Fig. 2 is a specific flowchart of a remote upgrade method for a controller according to an embodiment of the present application, and as shown in fig. 2, before running an upgrade file according to a boot loader, the method further includes:
the controller calculates a cyclic redundancy check code in the upgrade file;
when the cyclic redundancy check code in the upgrade file calculated by the controller is consistent with the cyclic redundancy check code pre-stored in the upgrade file, the upgrade is considered to be successful, the upgrade flag bit in the electrically erasable programmable read-only memory in the controller is modified, and the upgrade file is reset and operated;
and when the cyclic redundancy check code in the upgrading file calculated by the controller is inconsistent with the cyclic redundancy check code pre-stored in the upgrading file, judging that the upgrading is not successful, checking errors in the upgrading process and upgrading again.
In this embodiment, whether the controller is successfully upgraded is determined by determining whether a cyclic redundancy check code in an upgrade file calculated by the controller is consistent with a cyclic redundancy check code pre-stored in the upgrade file, if so, the upgrade is successful, an upgrade flag bit in a charged erasable programmable read only memory in the controller is modified and the upgraded file is reset and operated, and if not, the upgrade is not successful, the upgrade file is reissued to the corresponding controller, and the upgrade operation is performed again.
Illustratively, before the controller calculates the cyclic redundancy check code in the upgrade file, the method further includes:
the controller confirms whether the received upgrade file is complete;
and when the upgrading file received by the controller is complete, calculating the cyclic redundancy check code in the upgrading file.
In this embodiment, the controller may determine whether the upgrade file is completely received according to the total number of files in the communication frame and the setting condition of the status bit, and after successful reception, the controller will correspond to the status bit 0, and if complete reception is performed, the controller calculates a cyclic redundancy check code in the upgrade file, otherwise, the controller does not start upgrading.
Illustratively, the upgrade file includes a file information frame and a subsequent frame; before the controller confirms whether the received upgrade file is complete, the method further includes:
the controller receives the file information frame and confirms whether the program number in the file information frame is consistent with the program number of the current controller;
and when the program number in the file information frame is consistent with the program number of the current controller, confirming to upgrade the controller and continuously receiving the subsequent frame.
In this embodiment, whether the controller needs to be upgraded is determined by determining whether the program number in the file information frame received by the controller is consistent with the program number of the current controller, and if so, determining to upgrade the controller and continue to receive subsequent frames, otherwise, not starting upgrading.
Illustratively, when the controller is a single controller,
when the cyclic redundancy check codes in the upgrading file calculated by the controller are inconsistent with the cyclic redundancy check codes pre-stored in the upgrading file, the upgrading is not successful, and the controller replies error codes to the corresponding upper computer;
and when the upgrading file received by the controller is incomplete, the controller replies an error code to the corresponding upper computer.
In this embodiment, when a single controller is upgraded, if an error occurs, the controller may directly reply to the error code to indicate that the received data is complete or the check code is erroneous.
Exemplarily, the upper computer is wirelessly connected to the plurality of controllers, and after running the upgrade file to perform the upgrade operation, the method further includes:
the upper computer detects whether the controller is not upgraded successfully;
and when the upper computer detects that the controller is not upgraded successfully, the upper computer sends the upgrade file to the corresponding controller again to carry out upgrade operation.
In this embodiment, after the batch broadcast upgrade is completed, the upper computer queries the program numbers and upgrade status bits of all the controllers at this time, and reissues the upgrade file to the controller whose program number has not been upgraded successfully in a one-to-one manner, and then re-upgrades the controller.
In this embodiment, the controller includes a boot loader and an application program; after the upgrade file is run for upgrade operation, the method further comprises the following steps: the upgrade flag bit in the electrically erasable programmable read-only memory in the controller is first read by the boot loader and stored in a static memory in the controller, in this case in the 0x10000000 location, and at compile time it is ensured that the application does not use this static memory space. The controller then sets the main stack pointer to jump to the start position of the application (e.g., APP _ Adress), and starts running the application by entering a reset function of the application (e.g., APP _ Adress +4) through the function pointer.
The boot loader further comprises:
and correspondingly shifting the positions of all the interruption functions by the number of the starting positions of the application program.
Fig. 3 is a flowchart of program jump and interrupt processing of the remote upgrading method for a controller according to the embodiment of the present application, and as shown in fig. 3, in this embodiment, positions of all interrupt functions are shifted from initial positions of an application in advance in a boot loader. The specific embodiment comprises the following steps:
s41, guiding the flag bit state of the loader to jump to the application program;
s42, when the application program generates the interrupt function request, finding the interrupt function in the guide loading program;
s43, find the interrupt function (i.e. the actual function address) in the application according to the offset address of the interrupt function in the boot loader (i.e. the start address of the application plus the sequence of the interrupt function, multiplied by four, plus the start address of the application determined according to the status flag bit).
Fig. 4 is a schematic structural diagram of a controller provided in an embodiment of the present application, and as shown in fig. 4, an exemplary embodiment discloses a controller, including: a memory for storing a computer program; a processor for implementing the steps of the method for remote upgrade of a controller when executing the computer program.
In this embodiment, the controller may be a low power consumption product controller based on a Cortex-M0 chip, such as a bracelet, a lamp controller, a vacuum cleaner, and the like. The controller may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that fig. 4 is merely an example of a controller, and does not constitute a limitation on the controller, and may include more or fewer components than those shown, or some components in combination, or different components, such as input output devices, network access devices, etc.
The processor may be based on an ARM corporation Cortex-M0 type processor.
The memory may be an internal storage unit of the controller in some embodiments, such as a flash memory of the controller. The controller may also be an external storage device of the controller in other embodiments, such as an internal FLASH memory (i.e., a FLASH chip) and an external FLASH memory (i.e., a FLASH chip). Further, the memory may also include both an internal storage unit of the controller and an external storage device. The memory is used for storing a remote upgrade system for operating the controller, application programs, a BootLoader (BootLoader), data, and other programs, such as program code of the computer program. The memory may also be used to temporarily store data that has been output or is to be output.
Fig. 5 is a schematic structural diagram of a remote upgrade system for a controller according to an embodiment of the present application, and as shown in fig. 5, in an exemplary embodiment, a remote upgrade system for a controller is disclosed, including a controller,
the master station is wirelessly connected with the one or more upper computers and is configured to transmit the program files to the one or more upper computers;
and the upper computer is in wireless connection with the controller, is configured to receive the program file sent by the main station, then analyzes the program file into an upgrading file and sends the upgrading file to the controller.
In this embodiment, the remote upgrade system of the controller sends a flash memory clearing instruction to the controller according to an upgrade file sent by a master station received by an upper computer in the controller, so that the controller clears a flash memory program at an upgrade position; and the upper computer analyzes the program file into an upgrading file and sends the upgrading file to the controller so that the controller runs the upgrading file to carry out upgrading operation. Therefore, the upgrading process of the controller is completed in a remote communication mode, a large amount of manpower and material cost is not needed to be consumed, meanwhile, the time consumption of the upgrading process is short, the upgrading efficiency is high, and the normal use of a user is not influenced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing functional units and modules are merely illustrated in terms of division, and in practical applications, the foregoing functional allocation may be performed by different functional units and modules as needed, that is, the internal structure of the controller is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working process of the unit and the module in the remote upgrading system of the controller, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed system and method for remotely upgrading a controller may be implemented in other ways. For example, the above-described embodiments of a remote upgrade system for a controller are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a remote upgrade system in which multiple units or components may be combined or integrated into another controller, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of the controller or unit through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A remote upgrading method of a controller is characterized by comprising the following steps:
acquiring a flash memory program of an upper computer instruction clearing upgrading position;
acquiring a remote upgrading file from an upper computer and storing the remote upgrading file at the upgrading position;
and operating the upgrade file according to the boot loader.
2. The method for remotely upgrading a controller according to claim 1, wherein the obtaining of the flash program of the upgrade location by the upper computer instruction comprises:
the upper computer sends a flash memory clearing instruction to the controller after receiving a program file of a target application sent by the master station;
and the controller clears the flash program at the upgrading position according to the flash clearing instruction.
3. The remote upgrading method of the controller according to claim 1, wherein the upgrade file is a plurality of communication frames into which a program file received by the upper computer from a master station is parsed.
4. The remote upgrade method of a controller according to claim 1, further comprising, before the running the upgrade file according to a boot loader:
the controller calculates a cyclic redundancy check code in the upgrade file;
when the cyclic redundancy check code in the upgrade file calculated by the controller is consistent with the cyclic redundancy check code pre-stored in the upgrade file, the upgrade is considered to be successful, the upgrade flag bit in the electrically erasable and programmable read-only memory in the controller is modified, and the upgrade file is reset and operated;
and when the cyclic redundancy check code in the upgrade file calculated by the controller is inconsistent with the cyclic redundancy check code pre-stored in the upgrade file, judging that the upgrade is not successful, checking errors in the upgrade process and upgrading again.
5. The method for remotely upgrading a controller according to claim 4, wherein before the controller calculates the cyclic redundancy check code in the upgrade file, the method further comprises:
the controller confirms whether the received upgrade file is complete;
and when the upgrading file received by the controller is complete, calculating a cyclic redundancy check code in the upgrading file.
6. The remote upgrade method of a controller according to claim 5, wherein the upgrade file includes a file information frame and a subsequent frame; before the controller confirms whether the received upgrade file is complete, the method further includes:
the controller receives the file information frame and confirms whether the program number in the file information frame is consistent with the program number of the current controller;
and when the program number in the file information frame is consistent with the program number of the current controller, confirming to upgrade the controller and continuously receiving the subsequent frame.
7. The remote upgrade method of a controller according to claim 5, wherein, when the controller is one,
when the cyclic redundancy check codes in the upgrade files calculated by the controller are inconsistent with the cyclic redundancy check codes pre-stored in the upgrade files, the upgrade is considered to be unsuccessful, and the controller replies error codes to the corresponding upper computer;
and when the upgrading file received by the controller is incomplete, the controller replies an error code to the corresponding upper computer.
8. The remote upgrading method of the controller according to claim 1, wherein the upper computer is wirelessly connected to the plurality of controllers, and after the upgrading operation is performed by running the upgrade file, the method further comprises:
the upper computer detects whether the controller is not upgraded successfully;
and when the upper computer detects that the controller is not upgraded successfully, the upper computer sends an upgrade file to the corresponding controller again to perform upgrade operation.
9. A controller, comprising:
a memory for storing a computer program;
processor for implementing the steps of the method for remote upgrade of a controller according to any of claims 1-8 when executing said computer program.
10. A remote upgrade system of a controller, comprising the controller of claim 9,
the master station is in wireless connection with one or more upper computers and is configured to transmit the program files to the one or more upper computers;
and the upper computer is wirelessly connected with the controller, is configured to receive the program file sent by the main station, then analyzes the program file into the upgrade file and sends the upgrade file to the controller.
CN202110967582.0A 2021-08-23 2021-08-23 Remote upgrading method of controller, controller and system Pending CN113741933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110967582.0A CN113741933A (en) 2021-08-23 2021-08-23 Remote upgrading method of controller, controller and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110967582.0A CN113741933A (en) 2021-08-23 2021-08-23 Remote upgrading method of controller, controller and system

Publications (1)

Publication Number Publication Date
CN113741933A true CN113741933A (en) 2021-12-03

Family

ID=78732269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110967582.0A Pending CN113741933A (en) 2021-08-23 2021-08-23 Remote upgrading method of controller, controller and system

Country Status (1)

Country Link
CN (1) CN113741933A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314385A (en) * 2022-07-28 2022-11-08 深圳市思达仪表有限公司 Firmware upgrading method and device for networking module, computer equipment and medium
CN116302073A (en) * 2023-04-18 2023-06-23 惠州市乐亿通科技有限公司 Remote upgrading method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117253A (en) * 2015-08-27 2015-12-02 常州大学 BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system
CN109086058A (en) * 2017-06-13 2018-12-25 荣成华泰汽车有限公司 Onboard program upgrade-system
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110457058A (en) * 2019-08-09 2019-11-15 北京万东医疗科技股份有限公司 Control node online upgrading method, apparatus, host computer, system and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117253A (en) * 2015-08-27 2015-12-02 常州大学 BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system
CN109086058A (en) * 2017-06-13 2018-12-25 荣成华泰汽车有限公司 Onboard program upgrade-system
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110457058A (en) * 2019-08-09 2019-11-15 北京万东医疗科技股份有限公司 Control node online upgrading method, apparatus, host computer, system and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314385A (en) * 2022-07-28 2022-11-08 深圳市思达仪表有限公司 Firmware upgrading method and device for networking module, computer equipment and medium
CN116302073A (en) * 2023-04-18 2023-06-23 惠州市乐亿通科技有限公司 Remote upgrading method, device and storage medium

Similar Documents

Publication Publication Date Title
CN113741933A (en) Remote upgrading method of controller, controller and system
US7269829B2 (en) Method and system for remote update of microprocessor code for irrigation controllers
CN104149717B (en) A kind of long-range noiseless renewal system and method for car load control
CN110134415A (en) A kind of controller and its method for upgrading software and device
CN102314369B (en) Self-upgrade method for equipment in remote online monitoring system
CN105573810A (en) Remote upgrade method and remote upgrade device for wireless sensor network node
US20020188934A1 (en) Method and system for upgrading existing firmware on third party hardware
CN103324501B (en) Wireless sensor network node software Efficient Remote update method
CN103530146A (en) Low-power-consumption embedded device remote wireless updating method
CN111273937A (en) Remote upgrading method based on STM32F746 processor
CN100426220C (en) Device for realizing software down loading using single-chip processor in communication system and its method
CN107479531B (en) The access device communication protocol frame format information of Embedded PLC remotely determines method
CN104035793A (en) In-application wireless programming method based on single-chip microcomputer
CN115220758B (en) Method for on-line upgrading of single chip microcomputer firmware
CN107332589B (en) Firmware upgrading device based on bluetooth
CN105335166A (en) System of embedded device and remote upgrading method of embedded device
CN105278992A (en) Firmware updating method and apparatus
CN110908690A (en) CAN bus-based online upgrading method for multiple BMU application programs
CN103631611A (en) Method and equipment for updating optical transmitter and receiver
CN112445508B (en) ARM application program online upgrading method based on CAN bus
CN210348467U (en) Modular design structure capable of updating MCU software
CN107562440A (en) A kind of eeprom method for updating edition and device
CN113238499A (en) Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel
CN208224772U (en) A kind of industrial device for embedded control based on CANopen bus
CN117376110B (en) Interactive data transmission method, system and device, storage medium and electronic equipment

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