CN106293797A - A kind of method and system of online updating Single Chip Microcomputer (SCM) program - Google Patents

A kind of method and system of online updating Single Chip Microcomputer (SCM) program Download PDF

Info

Publication number
CN106293797A
CN106293797A CN201510319854.0A CN201510319854A CN106293797A CN 106293797 A CN106293797 A CN 106293797A CN 201510319854 A CN201510319854 A CN 201510319854A CN 106293797 A CN106293797 A CN 106293797A
Authority
CN
China
Prior art keywords
program
chip microcomputer
new data
external memory
chip
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.)
Withdrawn
Application number
CN201510319854.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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510319854.0A priority Critical patent/CN106293797A/en
Priority to PCT/CN2016/084772 priority patent/WO2016197883A1/en
Publication of CN106293797A publication Critical patent/CN106293797A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses the method and system of a kind of online updating Single Chip Microcomputer (SCM) program, including: obtain program more new data;The chip external memory being sent to need to update the single-chip microcomputer of operation program by program more new data by MODBUS bus stores;The program more new data that will be stored in chip external memory is updated to single-chip microcomputer.The method and system of the online updating Single Chip Microcomputer (SCM) program that the present invention provides, it is possible to the problem solving to be not easy in prior art the MSP430 series monolithic program of the state of use is carried out online updating.

Description

A kind of method and system of online updating Single Chip Microcomputer (SCM) program
Technical field
The present invention relates to online updating technology, particularly relate to a kind of online updating Single Chip Microcomputer (SCM) program method and System.
Background technology
MSP430 series monolithic is the design of Texas Instruments (TI, Texas Instruments) company With the low-power consumption produced, contain 16 single-chip microcomputers of flash memory (Flash).This series monolithic can lead to Cross following several ways and carry out burning program: joint test action group that (1) uses TI to provide (JTAG, Joint Test Action Group) instrument carries out online burning;(2) JTAG debugger is used to carry out Line burning;(3) use special chip cd-rom recorder that nude film is carried out off-line burning.
Visible, MSP430 series monolithic is mainly carried out online by prior art by jtag interface Burning, or use burning chip device to mount after nude film carries out burning.The most several burning chip modes, Updating the product implementation procedure in use state and have inconvenience, as working environment is remote, burning sets Standby burning mode not readily portable, above-mentioned cannot meet large-tonnage product burning demand etc..It addition, in part In the case of, apply above-mentioned burning mode to need to carry out whole product the most upper and lower electrically operated, and this is right Product systems in using are unallowed.
Summary of the invention
In order to solve above-mentioned technical problem, the present invention provide a kind of online updating Single Chip Microcomputer (SCM) program method and System, it is possible to solve to be not easy in prior art the MSP430 series monolithic program of the state of use is entered The problem of row online updating.
In order to reach above-mentioned technical purpose, the present invention provides a kind of method of online updating Single Chip Microcomputer (SCM) program, Including: obtain program more new data;By MODBUS bus, program more new data is sent to needs The chip external memory of the single-chip microcomputer updating operation program stores;Will be stored in the program of chip external memory More new data is updated to described single-chip microcomputer.
Further, the described single-chip microcomputer needing to update operation program refers to: if described program more new data Corresponding version needs more higher than the version of the operation program of single-chip microcomputer, the operation program of the most described single-chip microcomputer Newly.
Further, after described acquisition program more new data, described by MODBUS bus by journey Before sequence more new data is sent to need the chip external memory of the single-chip microcomputer of renewal operation program to store, Said method also includes: update data acquisition data parameters according to described program.
Further, described being sent to by program more new data by MODBUS bus needs to update fortune After the chip external memory of the single-chip microcomputer of line program stores, described in will be stored in the journey of chip external memory Before sequence more new data is updated to described single-chip microcomputer, said method also includes: sentence according to described data parameters The disconnected program more new data being stored in chip external memory is the most complete effectively, if completely effective, then carry out by The program more new data being stored in chip external memory is updated to the step of described single-chip microcomputer.
Further, described being sent to by program more new data by MODBUS bus needs to update fortune After the chip external memory of the single-chip microcomputer of line program, described in will be stored in chip external memory program update number Before being updated to described single-chip microcomputer, said method also includes: send reset command extremely described single-chip microcomputer, Described single-chip microcomputer is restarted.
The present invention also provides for the system of a kind of online updating Single Chip Microcomputer (SCM) program, including: hand held module, it is used for Acquisition program more new data;Main control module, for passing program more new data by MODBUS bus The chip external memory delivering to need to update the single-chip microcomputer of operation program stores;Line card module, being used for will The program more new data being stored in sheet memorizer is updated to described single-chip microcomputer.
Further, the described single-chip microcomputer needing to update operation program refers to: if described program more new data Corresponding version needs more higher than the version of the operation program of single-chip microcomputer, the operation program of the most described single-chip microcomputer Newly.
Further, described hand held module, it is additionally operable to update data acquisition data parameters according to described program.
Further, described line card module, it is additionally operable to judge to be stored in sheet external memory according to described data parameters The program of reservoir more new data is the most complete effectively, if completely effective, then will be stored in chip external memory Program more new data is updated to described single-chip microcomputer.
Further, described main control module, it is additionally operable to, by MODBUS bus, program is being updated number After the chip external memory being sent to need to update the single-chip microcomputer of operation program, send reset command to institute State single-chip microcomputer so that described single-chip microcomputer is restarted.
In the present invention, program more new data is obtained;By MODBUS bus by program more new data The chip external memory being sent to need to update the single-chip microcomputer of operation program stores;Will be stored in sheet external memory The program of reservoir more new data is updated to single-chip microcomputer.So, by present invention achieves MSP430 system The online updating of row Single Chip Microcomputer (SCM) program, it is not necessary to MSP430 series monolithic is torn open from product or circuit board Solution is got off, and only can need to be realized easily and efficiently the most more by existing MODBUS communication line Newly, and, support a pair multimodal version updating, there is features such as upgrading simply, reliable and quick.
Accompanying drawing explanation
The flow chart of the method for the online updating Single Chip Microcomputer (SCM) program that Fig. 1 provides for the embodiment of the present invention;
The schematic diagram of the system of the online updating Single Chip Microcomputer (SCM) program that Fig. 2 provides for one embodiment of the invention;
The flow chart of the method for the online updating Single Chip Microcomputer (SCM) program that Fig. 3 provides for one embodiment of the invention.
Detailed description of the invention
Below in conjunction with accompanying drawing, embodiments of the invention are described in detail, it will be appreciated that described below Embodiment be merely to illustrate and explain the present invention, be not intended to limit the present invention.
The flow chart of the method for the online updating Single Chip Microcomputer (SCM) program that Fig. 1 provides for the embodiment of the present invention.Such as figure Shown in 1, the method for the online updating Single Chip Microcomputer (SCM) program that the embodiment of the present invention provides comprises the following steps:
Step 11: obtain program more new data.
In this, after step 11, the method also includes: update data acquisition data parameters according to program. Wherein, data parameters such as includes data length, verification data etc..
Step 12: be sent to need to update operation program by program more new data by MODBUS bus The chip external memory of single-chip microcomputer store.
In this, the single-chip microcomputer updating operation program is needed to refer to: if the version height that program more new data is corresponding In the version of the operation program of single-chip microcomputer, the operation program of the most described single-chip microcomputer needs to update.
If the version that program more new data is corresponding is not higher than the version of the operation program of single-chip microcomputer, then single-chip microcomputer Operation program without update.
Step 13: the program more new data that will be stored in chip external memory is updated to single-chip microcomputer.
After step 12, before step 13, the method also includes: send reset command to single-chip microcomputer, Single-chip microcomputer is restarted.
After step 12, before step 13, the method also includes: judge storage according to data parameters Program more new data at chip external memory is the most complete effectively, if completely effective, then will be stored in The program of chip external memory more new data is updated to the step (i.e. step 13) of single-chip microcomputer.
Additionally, the embodiment of the present invention also provides for the system of a kind of online updating Single Chip Microcomputer (SCM) program, including: hands Hold module, be used for the program that obtains more new data;Main control module, is used for journey by MODBUS bus The chip external memory that sequence more new data is sent to need to update the single-chip microcomputer of operation program stores;Line card Module, is updated to single-chip microcomputer for will be stored in the program more new data of sheet memorizer.
The schematic diagram of the system of the online updating Single Chip Microcomputer (SCM) program that Fig. 2 provides for one embodiment of the invention.As Shown in Fig. 2, the system of online updating Single Chip Microcomputer (SCM) program that the present embodiment provides includes power module, hand-held Module, main control module and line card module.Wherein, power module is used for as hand held module, main control module And line card module for power supply.
Wherein, hand held module use a reduced instruction set computer framework central processing unit (POWERPC, Performance Optimization With Enhanced RISC Performance Computing) Embedded system, is used for being responsible for man-machine interaction and runs application software, and if with RS485 interface and Dry Peripheral Interface.Line card module such as connects MSP430 single-chip microcomputer and the serial ports with RS485 interface Flash memory (SPI-Flash, Serial Peripheral Interface Flash) (in this, as chip external memory).
In this, hand held module and main control module connect one to one, and main control module can connect multiple line card mould Block (such as, at most connects 12 line card modules).Main control module, hand held module and multiple line card mould All connected by RS485 interface between block, and connected by MODBUS bus between above-mentioned each module Networking, constitutes a MODBUS bus network.Wherein, main control module is MODBUS bus network Host node in network, and line card module composition MODBUS bus network from node.Therefore, only need Each is carried out updating at sequence of threads by host node to be passed through from node.
Specifically, hand held module passes through Peripheral Interface from outside acquisition MSP430 series monolithic After program more new data, the data parameters of extraction procedure more new data, and by program more new data and data Parameter by MODBUS bus transfer to main control module, main control module pass through RS485 interface and each Line card module communicates, and program more new data and data parameter is sent to by line card module SPI-Flash stores, and program more new data and the data parameter of storage are analyzed by line card module And verification, it is judged that after obtaining complete routine more new data, the program that will be stored in chip external memory updates number According to being updated to single-chip microcomputer, thus realize carrying out MSP430 series monolithic journey by MODBUS bus The online updating of sequence.
Wherein, MODBUS bus is serial link protocol, is a kind of master/slave agreement, uses remote in this Journey terminal unit (RTU, Remote Terminal Unit) transmission mode.In this mode, only support Function code 3 (Read Holding Registers) and function code 16 (Write Multiple Registers) Function, the reading of corresponding data and write-in functions.
In this, concrete function code is as shown in table 1 and table 2:
Table 1 function code 3 (Read Holding Registers)
Table 2 function code 16 (Write Multiple Registers)
The flow chart of the method for the online updating Single Chip Microcomputer (SCM) program that Fig. 3 provides for one embodiment of the invention.As Shown in Fig. 3, the method for the online updating Single Chip Microcomputer (SCM) program that the present embodiment provides comprises the following steps:
Step 101: hand held module obtains program more new data from external interface, and extraction procedure updates number According to data parameters, such as data length, verification data etc.;
Step 102: hand held module sends more newer command to main control module, main control module receives more newer command After, it is judged that whether the version that program more new data is corresponding is higher than the existing version of single-chip microcomputer, the most then lead Control module returns to hand held module and receives order;
Step 103: main control module receives the program renewal that hand held module is sent by MODBUS bus Data and data parameters, and store;
Step 104: the operation program of master control module judges single-chip microcomputer, the need of renewal, such as, compares The version that the version of operation program is corresponding with program more new data, when the version of the program of operation is less than program more During version corresponding to new data, active push program more new data, and send reset command to single-chip microcomputer, Single-chip microcomputer is restarted;
Step 105: program more new data and data parameter are pressed by main control module by MODBUS bus Cycle through to line card module according to bus protocol;
Step 106: line card module receives program more new data and data parameters, and the program that will receive Appropriate address during more new data is written to the SPI-Flash of off-chip, preserves data parameters simultaneously;
Step 107: line card module by receive program more new data and data parameter be analyzed and Verification, it is judged that after obtaining complete routine more new data, the program that line card module will store in SPI-Flash More new data updates the storage address specified in flash memory (Flash) memorizer of MSP430 single-chip microcomputer, Revise data parameters simultaneously;
Step 108:MSP430 single-chip microcomputer jumps to the entry address of new procedures, runs new procedures.
Additionally, during above-mentioned online updating, be designed with back mechanism, prevention is in data updating process Abnormal conditions occur, it is ensured that system is properly functioning.
In sum, in embodiments of the present invention, it is not necessary to by MSP430 single-chip microcomputer from product or circuit board On dismantle, it is online only need to can to realize program efficiently by existing MODBUS communication line Update.
The ultimate principle of the present invention and principal character and advantages of the present invention have more than been shown and described.This Bright it is not restricted to the described embodiments, the simply explanation present invention's described in above-described embodiment and description Principle, without departing from the spirit and scope of the present invention, the present invention also has various changes and modifications, These changes and improvements both fall within scope of the claimed invention.

Claims (10)

1. the method for an online updating Single Chip Microcomputer (SCM) program, it is characterised in that including:
Acquisition program more new data;
By MODBUS bus, program more new data is sent to the single-chip microcomputer needing to update operation program Chip external memory store;
The program more new data that will be stored in chip external memory is updated to described single-chip microcomputer.
2. the method for claim 1, it is characterised in that described needs update operation program Single-chip microcomputer refers to: if version corresponding to described program more new data is higher than the version of the operation program of single-chip microcomputer This, the operation program of the most described single-chip microcomputer needs to update.
3. the method for claim 1, it is characterised in that described acquisition program more new data it After, the described list being sent to program more new data by MODBUS bus need to update operation program Before the chip external memory of sheet machine stores, also include: update data acquisition data according to described program Parameter.
4. method as claimed in claim 3, it is characterised in that described by MODBUS bus The chip external memory being sent to program more new data need to update the single-chip microcomputer of operation program stores Afterwards, will be stored in before the program more new data of chip external memory is updated to described single-chip microcomputer, also described in Including: judge that the program more new data being stored in chip external memory the most completely has according to described data parameters Effect, if completely effective, then the program more new data carrying out will be stored in chip external memory is updated to described list The step of sheet machine.
5. the method for claim 1, it is characterised in that described by MODBUS bus After program more new data is sent to the chip external memory needing to update the single-chip microcomputer of operation program, described Will be stored in before the program more new data of chip external memory is updated to described single-chip microcomputer, also including: send Reset command is to described single-chip microcomputer so that described single-chip microcomputer is restarted.
6. the system of an online updating Single Chip Microcomputer (SCM) program, it is characterised in that including:
Hand held module, is used for the program that obtains more new data;
Main control module, for being sent to need to update fortune by program more new data by MODBUS bus The chip external memory of the single-chip microcomputer of line program stores;
Line card module, is updated to described single-chip microcomputer for will be stored in the program more new data of sheet memorizer.
7. system as claimed in claim 6, it is characterised in that described needs update operation program Single-chip microcomputer refers to: if version corresponding to described program more new data is higher than the version of the operation program of single-chip microcomputer This, the operation program of the most described single-chip microcomputer needs to update.
8. system as claimed in claim 6, it is characterised in that described hand held module, is additionally operable to root Data acquisition data parameters is updated according to described program.
9. system as claimed in claim 8, it is characterised in that described line card module, is additionally operable to root Judge that the program more new data being stored in chip external memory is the most complete effectively according to described data parameters, if complete Whole effectively, then the program more new data that will be stored in chip external memory is updated to described single-chip microcomputer.
10. system as claimed in claim 6, it is characterised in that described main control module, is additionally operable to By MODBUS bus, program more new data is sent to the sheet needing to update the single-chip microcomputer of operation program After external memory, send reset command to described single-chip microcomputer so that described single-chip microcomputer is restarted.
CN201510319854.0A 2015-06-11 2015-06-11 A kind of method and system of online updating Single Chip Microcomputer (SCM) program Withdrawn CN106293797A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510319854.0A CN106293797A (en) 2015-06-11 2015-06-11 A kind of method and system of online updating Single Chip Microcomputer (SCM) program
PCT/CN2016/084772 WO2016197883A1 (en) 2015-06-11 2016-06-03 Method and system for updating program of microcontroller online

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510319854.0A CN106293797A (en) 2015-06-11 2015-06-11 A kind of method and system of online updating Single Chip Microcomputer (SCM) program

Publications (1)

Publication Number Publication Date
CN106293797A true CN106293797A (en) 2017-01-04

Family

ID=57503128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510319854.0A Withdrawn CN106293797A (en) 2015-06-11 2015-06-11 A kind of method and system of online updating Single Chip Microcomputer (SCM) program

Country Status (2)

Country Link
CN (1) CN106293797A (en)
WO (1) WO2016197883A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838588A (en) * 2012-11-20 2014-06-04 广州市暨华医疗器械有限公司 Method for conducting online program updating on AT90 single-chip microcomputer through CAN interface
CN108415721A (en) * 2018-03-20 2018-08-17 山东比特智能科技股份有限公司 A kind of node device programme upgrade method and relevant apparatus
CN110944042A (en) * 2019-11-12 2020-03-31 中核控制系统工程有限公司 Online automatic protocol updating method based on FPGA

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708548A (en) * 2020-06-18 2020-09-25 北京小米移动软件有限公司 Software installation method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251807A (en) * 2008-03-14 2008-08-27 四川长虹电器股份有限公司 Method for upgrading set top box front panel programmable SCM
GB2455938A (en) * 2006-12-19 2009-07-01 Halliburton Energy Serv Inc Secure firmware updates in embedded systems
CN202870806U (en) * 2012-10-30 2013-04-10 北京同州铭远科技有限公司 Remote update control system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259207A1 (en) * 2005-04-20 2006-11-16 Denso Corporation Electronic control system for automobile
CN101907998B (en) * 2010-08-17 2016-03-30 中兴通讯股份有限公司 The renewal system and method for embedded system
CN102622253B (en) * 2012-03-09 2015-11-18 瑞斯康达科技发展股份有限公司 A kind of method of single-chip microcomputer and online upgrading thereof
CN104156249A (en) * 2014-08-18 2014-11-19 四川九成信息技术有限公司 Embedded software upgrading method
CN104503804B (en) * 2014-12-31 2017-08-08 天津通卡智能网络科技股份有限公司 A kind of method of online updating SCM program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2455938A (en) * 2006-12-19 2009-07-01 Halliburton Energy Serv Inc Secure firmware updates in embedded systems
CN101251807A (en) * 2008-03-14 2008-08-27 四川长虹电器股份有限公司 Method for upgrading set top box front panel programmable SCM
CN202870806U (en) * 2012-10-30 2013-04-10 北京同州铭远科技有限公司 Remote update control system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838588A (en) * 2012-11-20 2014-06-04 广州市暨华医疗器械有限公司 Method for conducting online program updating on AT90 single-chip microcomputer through CAN interface
CN108415721A (en) * 2018-03-20 2018-08-17 山东比特智能科技股份有限公司 A kind of node device programme upgrade method and relevant apparatus
CN110944042A (en) * 2019-11-12 2020-03-31 中核控制系统工程有限公司 Online automatic protocol updating method based on FPGA

Also Published As

Publication number Publication date
WO2016197883A1 (en) 2016-12-15

Similar Documents

Publication Publication Date Title
CN105573800B (en) A kind of veneer or multi-slab and online updating method based on ZYNQ
CN105354070B (en) A method of passing through I2C updating apparatus firmware
CN104149717B (en) A kind of long-range noiseless renewal system and method for car load control
CN101192165B (en) Master-slave mode multiprocessor system and software version loading method
CN100565472C (en) A kind of adjustment method that is applicable to multiprocessor karyonide system chip
CN107977217A (en) The method of on-line loaded XILINX-FPGA multi versions more new procedures
CN106293797A (en) A kind of method and system of online updating Single Chip Microcomputer (SCM) program
CN105320553A (en) Method and system for updating network card firmware on basis of domestic processor platform
CN107402776A (en) A kind of mobile phone wireless upgrading stm32 singlechip controller firmware methods based on bluetooth 4
CN102681959A (en) Method for interacting inner-band information and out-of-band information of server
CN103324583A (en) Offline high-speed fiber-optic gyroscope data acquisition method
CN207995406U (en) A kind of system that parameter configuration is carried out based on NFC communication module
CN103838588A (en) Method for conducting online program updating on AT90 single-chip microcomputer through CAN interface
CN102253844B (en) Method and device for starting processor
CN104077166A (en) EPCS and EPCQ storer online upgrading method based on IP core in FPGA
CN109507991B (en) Double-shaft servo control platform debugging system and method
CN107315449B (en) Computer device, method for reading time and method for writing time
CN107621943A (en) A kind of FPGA dynamic batch programming system and method
CN107943732A (en) One kind realizes 1553B bus modules based on production domesticization FPGA device
CN102768561A (en) Design method for twinbridge piece mainboard redundancy
CN103279061A (en) Interface extensible programming method based on DSP platform
CN205281479U (en) Intelligent substation's SCD file inspection device
CN105824650B (en) Computer system, adaptive suspend mode control module and its control method
CN103235921B (en) A kind of computer system
CN110262349A (en) A kind of the remote online programmed method and system of C8051F series monolithic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170104