CN104679559B - The method of single-chip microcontroller online programming - Google Patents

The method of single-chip microcontroller online programming Download PDF

Info

Publication number
CN104679559B
CN104679559B CN201510072752.3A CN201510072752A CN104679559B CN 104679559 B CN104679559 B CN 104679559B CN 201510072752 A CN201510072752 A CN 201510072752A CN 104679559 B CN104679559 B CN 104679559B
Authority
CN
China
Prior art keywords
chip microcontroller
pin
processor
file
flash
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.)
Active
Application number
CN201510072752.3A
Other languages
Chinese (zh)
Other versions
CN104679559A (en
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.)
BEIJING PEITIAN TECHNOLOGY Co Ltd
Original Assignee
BEIJING PEITIAN TECHNOLOGY 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 BEIJING PEITIAN TECHNOLOGY Co Ltd filed Critical BEIJING PEITIAN TECHNOLOGY Co Ltd
Priority to CN201510072752.3A priority Critical patent/CN104679559B/en
Publication of CN104679559A publication Critical patent/CN104679559A/en
Priority to PCT/CN2016/072784 priority patent/WO2016127835A1/en
Application granted granted Critical
Publication of CN104679559B publication Critical patent/CN104679559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Microcomputers (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a kind of methods of single-chip microcontroller online programming, method includes the following steps: processor reads in single-chip microcontroller firmware program file to be loaded, the firmware program file format of the single-chip microcontroller is BIN file.The BIN file of the single-chip microcontroller firmware program file is written in the FLASH of single-chip microcontroller by the processor by SPI interface.By the present invention in that carrying out loading procedure file with SPI interface, do not limited by emulator loading frequency, it is possible to realize high loading velocity.The method of online programming of the invention is not easily susceptible to the influence of other threads under operating system, therefore success rate can greatly improve, thus reliability with higher, and has lower cpu resource occupancy.In addition, the method for online programming of the present invention does not need any line, therefore fast and easy, program Solidification is carried out to single-chip microcontroller when being very suitable to volume production.

Description

The method of single-chip microcontroller online programming
Technical field
The present invention relates to microcomputer development fields, more particularly to the method for single-chip microcontroller online programming.
Background technique
Currently, generally using following methods for the exploitation of single-chip microcontroller product: being carried out first with one-chip machine simulation equipment Then the artificial debugging of hardware and software is deposited the object code that debugging passes through with the program that program burn writing device is cured to single-chip microcontroller In reservoir.In this process, program burn writing device is essential developing instrument, and program burn writing device price general charged is relatively high It is expensive.In addition, source program of every modification will take out singlechip chip from Target Board later, then by updated target generation Code is cured in singlechip chip again, will be due to continually plugging singlechip chip and to chip and circuit when debugging in this way Strip carrys out corresponding physical damage.The shortcomings that carrying out mcu programming by program burn writing device is burn writing equipment valuableness, programming behaviour It bothers, is not easy to realize in-system programming (ISP).
To overcome the above disadvantages and limitation, portion is provided with and realizes " serial programming some novel compatible product in the chip Interface logic " hardware capability, to support singlechip chip in-system programming (ISP).ISP is system online programmable, refers to electricity Blank device on the plate of road can be programmed into end user's code, without removing device from circuit board, for The device of programming can also be wiped or be reprogramd with ISP mode.The advantage of ISP technology is not need programmable device to carry out list The experiment and exploitation of piece machine, frequently plugged the trouble of chip when not only having saved the cost of microcomputer development, but also having eliminated debugging.It is single Piece machine is programmed with both of which: paralleling model and series model.Single-chip microcontroller is loaded at present, it is most of all using series connection mould Formula, that is, ISP mode, most of ISP implementation method are all to carry out program burn writing using the singlechip emulator of AVR.Also Part is to carry out corresponding change by the parallel interface to PC serially to load timing come simulated implementation ISP, in addition, working as single-chip microcontroller When as a part of coprocessor or control system, ordered pair single-chip microcontroller when primary processor is loaded using I/O pin simulation single-chip microcontroller Carry out program load.
Directly loading with singlechip emulator, when carrying out product volume production, the cost of emulator can be ignored, But for each piece of board, require to connect single-chip microcontroller and PC by emulator, opening programming software at the end PC will Loading procedure write-in.When product mass production, this method is very troublesome, will devote a tremendous amount of time, and emulate The speed of device programming is very low because emulator do not know single-chip microcontroller be what frequency clock, emulator is all Use programming frequency low as far as possible.And it also requires cumbersome connection, time-consuming operation.Directly pass through the microprocessor on board I/O pin come the mode that is loaded of ordered pair single-chip microcontroller when simulating single-chip microcontroller load, the timing of which be by I/O pin into Row simulation, reliability is not high, if other threads for being generalized machine interrupt or other reasons will will affect load timing, occurs Unpredictable mistake will lead to the Flash that single-chip microcontroller load failure even damages single-chip microcontroller.
Summary of the invention
The invention mainly solves the technical problem of providing a kind of method of single-chip microcontroller online programming, can reduce cost, Speed is improved, simplifies operation and there is high reliability.
In order to solve the above technical problems, the technical method that the present invention uses is: providing a kind of single-chip microcontroller online programming Method, method includes the following steps: processor reads in single-chip microcontroller firmware program file to be loaded, the single-chip microcontroller is consolidated Part program file format is BIN file.The processor is literary by the BIN of the single-chip microcontroller firmware program file by SPI interface Part is written in the FLASH of single-chip microcontroller.
Wherein, the processor by SPI interface by the BIN file be written to the step in the FLASH of single-chip microcontroller it Afterwards further include: the processor verifies the BIN file in the FLASH of said write to single-chip microcontroller.
Wherein, the step of processor verifies the BIN file in the FLASH of said write to single-chip microcontroller is into one Step includes: the BIN file that the processor reads said write by the SPI interface from the FLASH of the single-chip microcontroller.Institute State that processor compares the BIN file of reading and whether the content of the BIN file of write-in identical, be then judged as if they are the same load at Function, and terminate to load;It is judged as load failure if different, and reloads.
Wherein, the single-chip microcontroller includes ISP pin and clock circuit pin.The ISP pin includes: RST pin, MOSI Pin, MISO pin and SCK pin;The RST is online programming input control pin;The MOSI pin be host output/ The data pin of slave input;The MISO pin is host input/slave output data pin;The SCK pin is string The clock pins of row programming.The clock circuit pin includes XTAL1 and XTAL2 pin;
The processor wraps before the BIN file is written to the step in the FLASH of single-chip microcontroller by SPI interface Include: the single-chip microcontroller powers on, and the RST pin of the single-chip microcontroller is drawn high, and between the single-chip microcontroller XTAL1 and XTAL2 pin Connect crystal oscillator;Alternatively, providing the clock of a 3MHz-163MHz in XTAL1 pin, and wait at least for 10 μ s.By described 1.5 pin of MOSI/P of single-chip microcontroller executes the enabled order of programming, then executes other program commands.
Wherein, the shift clock on the SCK/P1.7 pin of the single-chip microcontroller is less than the 1/16 of the processor.
Wherein, the processor reads the BIN of said write by the SPI interface from the FLASH of the single-chip microcontroller In the step of file, the processor is verified by reading 1.6 pin of MISO/P.
Wherein, the BIN file is written in the step in the FLASH of single-chip microcontroller by the processor by SPI interface, The BIN file is with the mode write-in of a byte;Or with the mode write-in an of one page.
Wherein, the processor compares the BIN file of reading and whether the content of the BIN file of write-in is identical, if they are the same It is judged as and loads successfully, and after the step of terminating load, further includes: the RST pin of the single-chip microcontroller is dragged down, so that the list Piece machine works in normal mode.
Wherein, after the step of processor reading single-chip microcontroller firmware program file to be loaded, further includes: verification institute Whether the size for stating single-chip microcontroller firmware program file is correct, if correctly, entering the processor and passing through SPI interface for the list The BIN file of piece machine firmware program file is written to the step in the FLASH of single-chip microcontroller.
Wherein, the processor was read in the step of single-chip microcontroller firmware program file to be loaded, the list to be loaded Piece machine firmware program file is placed in SD card or NAND Flash.
The beneficial effects of the present invention are: being in contrast to the prior art, the method for online programming of the invention passes through SPI Interface loads single-chip microcontroller, and the speed of SPI interface is fast, and is not limited by emulator loading frequency also, it is possible to Realize very high loading velocity.In addition, the load that the method for online programming of the invention is realized unlike GPIO simulation loading timing Mode is easy to be influenced by other threads under operating system like that, therefore success rate can greatly improve, thus has higher Reliability, and have lower processor resource occupancy.In addition, this method is executed automatically after os starting, Do not need any line (emulator or host computer parallel port etc.), therefore fast and easy, when being very suitable to volume production to single-chip microcontroller into Line program solidification.
Detailed description of the invention
Fig. 1 is the flow chart of the method first embodiment of single-chip microcontroller online programming of the present invention;
Fig. 2 is the loaded circuit figure of the ISP loading mode of AT89LS52 single-chip microcontroller;
Fig. 3 is the timing diagram of the ISP loading mode of AT89LS52 single-chip microcontroller;
Fig. 4 is the clock of four kinds of modes of SPI and the relational graph of sampled point;
Fig. 5 is the timing diagram of the complete S PI signal of mode 0 and mode 2 in Fig. 4;
Fig. 6 is the flow chart of the method second embodiment of single-chip microcontroller online programming of the present invention;
Fig. 7 is the flow chart of step S22 in Fig. 6;
Fig. 8 is the flow chart of step S23 in Fig. 6.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
The method of single-chip microcontroller online programming of the invention, primarily directed to the single-chip microcontroller for supporting in-system programming (ISP), example Such as AT89S series monolithic.
Referring to Fig. 1, being the flow chart of the method first embodiment of single-chip microcontroller online programming of the present invention.
The method of the single-chip microcontroller online programming of the present embodiment the following steps are included:
S10, processor read in single-chip microcontroller firmware program file to be loaded, the firmware program file format of the single-chip microcontroller For BIN file.
S11, the processor are consolidated the single-chip microcontroller by SPI (Serial Peripheral Interface) interface The BIN file of part program file is written in the FLASH of single-chip microcontroller.
Specifically, in above-mentioned steps, BIN file can be with the mode write-in of a byte.Alternatively, can also be with primary The mode of one page is written.The time of one write cycle time is generally less than 1ms.
Online programming method of the invention is to be loaded by SPI interface to single-chip microcontroller, is loaded directly into BIN file.Mesh Preceding SPI interface speed highest can achieve 50M, generally be attained by 30M, thus loading velocity is quickly.It emulates in the prior art What is generated after compiling in device programming engineering is HEX file, and this document size is 10KB, and verification is completed and read in programming, is probably needed Want or so half a minute.Because general mode is loaded by emulator, KEIL software only generates HEX file, to Programming BIN file needs HEX file being converted to BIN file, and the BIN file size converted is 4KB.And the present invention passes through The loading method of SPI can complete programming and verification in 10s.
In addition, SPI is an included peripheral hardware for processor, processor only needs that SPI peripheral hardware is notified to be now to send Data, timing as data and it is practical send all be controlled by SPI peripheral hardware, so, processor is notifying outside SPI If sending data or can be not involved in after receiving and specifically send or receive data procedures, processor does not intervene under normal circumstances Actual transmission process.
Be different from the prior art, the method for online programming of the invention by special purpose interface (SPI interface) to single-chip microcontroller into Row load, SPI interface speed is fast, and is not limited by emulator loading frequency, thus very high loading velocity may be implemented. The present invention is also easy the shadow by other threads under operating system unlike the loading method that GPIO simulation loading timing is realized It rings, therefore success rate can greatly improve, thus reliability with higher, and there is lower part to manage device resources occupation rate.This Outside, which executed automatically after os starting, does not need any line (emulator or host computer parallel port Deng), therefore fast and easy, program Solidification is carried out to single-chip microcontroller when being very suitable to volume production.
It is the analysis for carrying out the feasibility of program load to single-chip microcontroller by SPI interface to the present invention below: please refers to Fig. 2 It is the loaded circuit figure of the ISP loading mode of AT89LS52 single-chip microcontroller to Fig. 5, Fig. 2.Fig. 3 is that the ISP of AT89LS52 single-chip microcontroller adds The timing diagram of load mode.Fig. 4 is the clock of four kinds of modes of SPI and the relational graph of sampled point.Fig. 5 is mode 0 and mode in Fig. 4 The timing diagram of 2 complete S PI signal.OL=0 is mode 0;POL=1 is mode 2.The relationship of comparison sampled point and clock, then with The timing diagram (Fig. 3) of AT89LS52 SCM ISP loading mode compares, it can be seen that single-chip microcontroller timing required when loading Figure is compatible with the timing of SPI mode 0.It therefore, be single-chip microcontroller loading procedure with SPI interface is theoretically feasible.
1/16 of frequency no more than single-chip microcontroller crystal oscillator frequency of single-chip microcontroller SCK pin.In system, the clock frequency of single-chip microcontroller Rate is 10MHz, and therefore, the frequency of SCK is no more than 625KHz, and it is 48MHz that host computer, which is the source clock that SPI is provided, in SPI It can also be divided in the configuration register of Peripheral Interface for the communication clock of SPI, source clock is subjected to 128 frequency dividings, it can be with The clock frequency of 375KHz is obtained, which is less than highest frequency required by SCK and therefore passes through the SPI interface pair of DM8147 Single-chip microcontroller load is feasible.
Referring to Fig. 6, being the flow chart of the method second embodiment of single-chip microcontroller online programming of the present invention.
Specifically, AT89LS single-chip microcontroller includes ISP pin and clock circuit pin.ISP pin shares 4: RST, MOSI, MISO and SCK.The function of each pin is as follows: RST is online programming input control end, and high electricity is only kept in ISP downloading process Flat, in system worked well, the pin is system reset end, keeps low level state.MOSI is host output/slave input Data terminal, when system worked well, which is public I/OP1.5 mouth line.MISO is host input/slave output data End.When system worked well, which is general purpose I/OP1.6 mouth line.SCK is the clock end of serial programming, it can be achieved that host and slave processors The synchronization of timing.When system worked well, which is general purpose I/OP1.7 mouth line.Clock circuit pin include XTAL1 and XTAL2 pin.
For example, in the system of the present embodiment, the host computer of single-chip microcontroller is DM8147, and DM8147 is the Da Fen of TI company The high-performance of odd framework, low power processor is the master controller of system, and single-chip microcontroller is main as a part in control system It is responsible for matrix press-key scanning, two-way communication is carried out by serial ports with DM8147, DM8147 carries out single-chip microcontroller by SPI interface Program load.
This system environment: software ARM:Ubuntu
DSP:Sysbios
EZSDK
The method of the single-chip microcontroller online programming of the present embodiment the following steps are included:
S20, processor read in single-chip microcontroller firmware program file to be loaded, the firmware program file format of the single-chip microcontroller For BIN file.Single-chip microcontroller firmware program file can be placed in SD card or NAND Flash.Wherein, Nand-flash memory is One kind of flash memory, it is internal to use non-linear macroelement mode, it provides and inexpensively has for the realization of solid-state large-capacity memory The solution of effect.In the present embodiment, single-chip microcontroller firmware program file is placed in SD card, and system reads and adds after SD card starting Published article part.
Whether S21, the size of the verification single-chip microcontroller firmware program file are correct, if correctly, entering step S22.
The BIN file of the single-chip microcontroller firmware program file is written to monolithic by SPI interface by S22, the processor In the FLASH of machine.
Specifically, referring to Fig. 7, above-mentioned steps S22 includes:
S220, the single-chip microcontroller power on, and the RST pin of the single-chip microcontroller is drawn high, and in the single-chip microcontroller XTAL1 and Crystal oscillator is connected between XTAL2 pin;Alternatively, providing the clock of a 3MHz-163MHz in XTAL1 pin, and wait at least for 10μs。
S221, the enabled order of programming is executed by 1.5 pin of MOSI/P of the single-chip microcontroller, then execute other programming lives It enables;And the shift clock on the SCK/P1.7 pin of the single-chip microcontroller is less than the 1/16 of the processor.In this step S221, Leading order of the enabled order of programming as other orders, it is necessary to first carry out the enabled order of programming, then execute other orders.
S23, the processor verify the BIN file in the FLASH of said write to single-chip microcontroller.
Referring to Fig. 8, above-mentioned steps S23 further comprises:
S230, the processor read the BIN of said write by the SPI interface from the FLASH of the single-chip microcontroller File.
Specifically, processor is verified by reading 1.6 pin of MISO/P.Any one memory space can lead to 1.6 pin of reading MISO/P is crossed to be verified, the data in the address space are returned to by the pin.
S231, the processor compare the BIN file of reading and whether the content of the BIN file of write-in is identical, if they are the same Then it is judged as and loads successfully, and terminate to load, enters step S24;It is judged as load failure if different, and reloads.
S24, the RST pin for dragging down the single-chip microcontroller, so that the single-chip microcontroller works in normal mode.
Online programming method through the invention does not need any aerial lug, it is only necessary to plug system electrification after SD card , load can carry out automatically, and verify.
It is further demonstrated by the test for loading fixed-size file to the method for using online programming of the invention The quick and reliability of method of the invention.The test includes writing, the complete procedure read and verified.By means of the present invention into Row load speed than loaded by emulator at least 20 times fastly of speed (emulator load only calculate the pure load time, not counting Connect the emulator time), it can achieve 375KHz, and under the frequency, loading 700 (erasable longevity of single-chip microcontroller Flash Life is 1000 times) in the case where, the bit error rate 0, that is to say, that 700 loads, 100% success.
The method for carrying out online programming by SPI interface of the invention has more compared to the method for GPIO simulation loading timing High reliability and stability are the load timing that single-chip microcontroller is realized by hardware circuit because SPI is special purpose interface. Under an operating system, any one section of task is all a thread for operating system, and operating system controls the scheduling of thread, is Thread is possible to be interrupted, and carrying out load by SPI interface may also be interrupted by other threads, is added by SPI interface It carries, the data for sending a byte are an instruction, and an instruction can not be interrupted, that is, be added by SPI interface It carries, it is impossible to be interrupted in the centre for transmitting a byte.Therefore, it will not influence to load timing load is interrupted, When his thread has executed and returned to the load thread, it can continue to load next byte data in next address.And it is right In simulated by GPIO the case where, one bit data of load just need three instructions: clock dragged down, the drawing of output data, clock It is high.It loads a byte data (8bit) and just needs 24 instructions, it is easy to it is interrupted among a byte loading, it will be complete Upset the timing as required by Fig. 3, is just likely to that load is caused to fail.And instruct the occupancy of more pairs of processors higher, This is also GPIO simulation loading compared to being loaded weaker place by SPI interface.The side loaded by SPI interface Method just discharges processor issuing to transmit after a byte is instructed, until the byte has been passed.And the mode of GPIO simulation can be always Processor is occupied, is interrupted until by other threads.Since SPI is an included peripheral hardware for processor, processor only needs Notice SPI peripheral hardware is now to send data, and the timing and practical send as data are controlled by SPI peripheral hardware, institute With, processor can be not involved in after having notified SPI peripheral hardware to send data or receive and specifically send or receive data procedures, Processor does not intervene actual transmission process under normal circumstances, unless mistake occurs for SPI peripheral hardware.And the case where GPIO simulation, needs Processor controls and completes entire timing, then data send or receive a thread having reformed into processor, and line Journey is all that timesharing executes, thus the thread can be interrupted.
The method of online programming of the invention loads single-chip microcontroller by SPI interface, realizes High speed load, and mention High success rate, reliability with higher.
Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, all to utilize this Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field is included within the scope of the present invention.

Claims (8)

1. a kind of method of single-chip microcontroller online programming, which comprises the following steps:
Processor reads in single-chip microcontroller firmware program file to be loaded, and the firmware program file format of the single-chip microcontroller is BIN text Part;
The BIN file of the single-chip microcontroller firmware program file is written to the FLASH of single-chip microcontroller by SPI interface by the processor In;
The processor verifies the BIN file in the FLASH of said write to single-chip microcontroller;
Whether the size for verifying the single-chip microcontroller firmware program file is correct, if correctly, being connect into the processor by SPI The BIN file of the single-chip microcontroller firmware program file is written to the step in the FLASH of single-chip microcontroller by mouth;
The processor carries out verification to the BIN file in the FLASH of said write to single-chip microcontroller: the processing Device reads the BIN file of said write by the SPI interface from the FLASH of the single-chip microcontroller;The processor compares reading Whether the content of the BIN file taken and the BIN file of write-in is identical, is then judged as loads successfully if they are the same, and terminate to load, and draws The RST pin of the low single-chip microcontroller, so that the single-chip microcontroller works in normal mode;It is judged as load failure if different, and It reloads;
Wherein, the processor notice SPI interface sends data, the timing and practical transmission of the SPI interface control data, institute That states that processor is not involved in the data sends or receives process.
2. the method according to claim 1, wherein FLASH of the processor to said write to single-chip microcontroller In BIN file the step of being verified further comprise:
The processor reads the BIN file of said write by the SPI interface from the FLASH of the single-chip microcontroller;
The processor compares the BIN file of reading and whether the content of the BIN file of write-in is identical, is then judged as adds if they are the same It carries successfully, and terminates to load;It is judged as load failure if different, and reloads.
3. according to the method described in claim 2, it is characterized in that, the single-chip microcontroller includes ISP pin and clock circuit pin;
The ISP pin includes: RST pin, MOSI pin, MISO pin and SCK pin;The RST is online programming input Control pin;The MOSI pin is host output/slave input data pin;The MISO pin be host input/from The data pin of machine output;The SCK pin is the clock pins of serial programming;
The clock circuit pin includes XTAL1 and XTAL2 pin;
The BIN file is written to the step in the FLASH of single-chip microcontroller before by SPI interface by the processor
The single-chip microcontroller powers on, and the RST pin of the single-chip microcontroller is drawn high, and between the single-chip microcontroller XTAL1 and XTAL2 pin Connect crystal oscillator;Alternatively, providing the clock of a 3MHz-16MHz in XTAL1 pin, and wait at least for 10ms;
The enabled order of programming is executed by 1.5 pin of MOSI/P of the single-chip microcontroller, then executes other program commands.
4. according to the method described in claim 3, it is characterized in that, shift clock on the SCK/P1.7 pin of the single-chip microcontroller Less than the 1/16 of the processor.
5. according to the method described in claim 4, it is characterized in that, the processor passes through the SPI interface from the monolithic In the step of reading the BIN file of said write in the FLASH of machine, the processor is carried out by reading 1.6 pin of MISO/P Verification.
6. according to the method described in claim 5, it is characterized in that, the processor is write the BIN file by SPI interface Enter into the step in the FLASH of single-chip microcontroller, the BIN file is written with the mode of a byte;Or with an one page Mode write-in.
7. according to the method described in claim 6, it is characterized in that, the processor compares BIN file and the write-in of reading Whether the content of BIN file is identical, is judged as loads successfully if they are the same, and after the step of terminating load, further includes: drags down institute The RST pin of single-chip microcontroller is stated, so that the single-chip microcontroller works in normal mode.
8. the method according to claim 1, wherein the processor reads in single-chip microcontroller firmware program to be loaded After the step of file, further includes: whether the size for verifying the single-chip microcontroller firmware program file is correct, if correctly, entering The BIN file of the single-chip microcontroller firmware program file is written in the FLASH of single-chip microcontroller by the processor by SPI interface Step.
CN201510072752.3A 2015-02-11 2015-02-11 The method of single-chip microcontroller online programming Active CN104679559B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510072752.3A CN104679559B (en) 2015-02-11 2015-02-11 The method of single-chip microcontroller online programming
PCT/CN2016/072784 WO2016127835A1 (en) 2015-02-11 2016-01-29 Single chip microcomputer and online programming method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510072752.3A CN104679559B (en) 2015-02-11 2015-02-11 The method of single-chip microcontroller online programming

Publications (2)

Publication Number Publication Date
CN104679559A CN104679559A (en) 2015-06-03
CN104679559B true CN104679559B (en) 2019-06-18

Family

ID=53314656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510072752.3A Active CN104679559B (en) 2015-02-11 2015-02-11 The method of single-chip microcontroller online programming

Country Status (2)

Country Link
CN (1) CN104679559B (en)
WO (1) WO2016127835A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679559B (en) * 2015-02-11 2019-06-18 北京配天技术有限公司 The method of single-chip microcontroller online programming
CN105300720A (en) * 2015-11-16 2016-02-03 合肥美的电冰箱有限公司 Detection method and system of refrigerator and refrigerator
CN105808298B (en) * 2016-03-08 2019-02-12 大连楼兰科技股份有限公司 A kind of dynamic loading method of single-chip microcontroller lower module
CN109343870B (en) * 2018-12-06 2024-04-16 中电智能科技有限公司 Program programming device and program programming system
CN110399596A (en) * 2019-07-26 2019-11-01 浪潮电子信息产业股份有限公司 A kind of file layout change-over method, system and associated component
CN111124456A (en) * 2019-12-26 2020-05-08 深圳市丰润达科技有限公司 Method and device for upgrading firmware of single chip microcomputer through master control and readable storage medium
CN111352893B (en) * 2020-02-21 2023-06-20 烟台持久钟表有限公司 Communication method of FPGA and STM32 singlechip
CN111538488B (en) * 2020-04-17 2023-05-02 荏原冷热系统(中国)有限公司 Method and device for generating single-chip microcomputer driver
CN111752589A (en) * 2020-06-24 2020-10-09 研祥智能科技股份有限公司 Method and device for upgrading burning codes of microcontroller on line
CN112445540B (en) * 2020-11-10 2023-05-09 惠州市创荣发智能科技有限公司 Program running method, system, terminal and storage medium
CN112905161A (en) * 2021-02-27 2021-06-04 深圳市博盛科电子有限公司 OBD-based automobile online programming method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184741A (en) * 2011-02-28 2011-09-14 浪潮电子信息产业股份有限公司 Method for programming serial periphery interface (SPI) FLASH
CN102609286A (en) * 2012-02-10 2012-07-25 株洲南车时代电气股份有限公司 System for updating FPGA (Field Programmable Gate Array) configuration program from a long distance based on control of processor and method therefor
CN103034515A (en) * 2012-12-11 2013-04-10 北京遥测技术研究所 Satellite navigation receiver FPGA (Field Programmable Gate Array) rapid loading method
CN202956753U (en) * 2012-11-05 2013-05-29 汕尾芯灵电子科技有限公司 Programming device and programming system of flash memory chip in embedded system
CN103365873A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Push method and device for business data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040076166A1 (en) * 2002-10-21 2004-04-22 Patenaude Jean-Marc Guy Multi-service packet network interface
CN100495479C (en) * 2007-01-19 2009-06-03 华南理工大学 Single chip computer teaching experimental device based on on-line programmable logic device
CN202189493U (en) * 2011-05-05 2012-04-11 杭州电子科技大学 89S51 ISP singlechip modularized experiment development platform
CN102945173B (en) * 2012-10-31 2016-06-29 青岛海信宽带多媒体技术有限公司 User program online upgrade system and upgrade method
CN104679559B (en) * 2015-02-11 2019-06-18 北京配天技术有限公司 The method of single-chip microcontroller online programming

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184741A (en) * 2011-02-28 2011-09-14 浪潮电子信息产业股份有限公司 Method for programming serial periphery interface (SPI) FLASH
CN102609286A (en) * 2012-02-10 2012-07-25 株洲南车时代电气股份有限公司 System for updating FPGA (Field Programmable Gate Array) configuration program from a long distance based on control of processor and method therefor
CN103365873A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Push method and device for business data
CN202956753U (en) * 2012-11-05 2013-05-29 汕尾芯灵电子科技有限公司 Programming device and programming system of flash memory chip in embedded system
CN103034515A (en) * 2012-12-11 2013-04-10 北京遥测技术研究所 Satellite navigation receiver FPGA (Field Programmable Gate Array) rapid loading method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AT89LS52英文说明书;zhangez2009;《https://wenku.baidu.com/view/d64b52d1195f312b3169a55a.html?re=view》;20121024;第1-2页,第22-23页

Also Published As

Publication number Publication date
WO2016127835A1 (en) 2016-08-18
CN104679559A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
CN104679559B (en) The method of single-chip microcontroller online programming
CN102184741A (en) Method for programming serial periphery interface (SPI) FLASH
CN102609286B (en) A kind of FPGA configurator remote update system based on processor control and method thereof
CN102999350B (en) A kind of FPGA program upgrading download online method in digital signal processing platform
CN101504692B (en) System and method for validating and testing on-chip system
CN102279756A (en) CPLD (Complex Programmable Logic Device) firmware updating method
CN102520961B (en) Off-chip online programmable SOC (system on a chip) and control method for same
CN104732151A (en) Remote safety batch BIOS updating method under Linux system
CN102623069B (en) Random excitation flash model verification method
CN109189203A (en) Server power saving apparatus and its power-saving method
CN102917242A (en) Testing system and testing method of multi-format video decoder
CN104077204A (en) Reconfigurable 8-bit RSIC (reduced instruction set computer) SCM (Single Chip Microcomputer) simulator
CN103677885A (en) ARM FLASH simple program programming method
CN104200846A (en) Embedded-type PROM test system and achieving method
CN103514074A (en) MVB network card development method and platform
CN102193860B (en) Microcontroller online debugging circuit and method as well as microcontroller
CN102375749B (en) Method for quickly downloading and updating firmware by using I2C (Inter-Integrated Circuit) bus
CN105094886A (en) Device and method for burning serial number to lower computer containing RS (Recommended Standard) 485 bus from PC (Personal Computer) machine
CN102236747A (en) Method for upgrading conventional computer into trusted computer
CN100452008C (en) Switching equipment of read-only storage
Feng et al. Design and application of reusable SoC verification platform
CN104360968A (en) Data discrimination and pre-processing physical card and operation method as well as electric energy data processing system
CN102323903B (en) SOC (system-on-chip) chip simulation system and method
CN102129379B (en) Logic component for data loading
CN205318368U (en) Intelligent chip software upgrade device based on online loading

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant