[go: up one dir, main page]

CN106933603B - Chip burning method, device and microcontroller - Google Patents

Chip burning method, device and microcontroller Download PDF

Info

Publication number
CN106933603B
CN106933603B CN201511016315.6A CN201511016315A CN106933603B CN 106933603 B CN106933603 B CN 106933603B CN 201511016315 A CN201511016315 A CN 201511016315A CN 106933603 B CN106933603 B CN 106933603B
Authority
CN
China
Prior art keywords
data packet
burning
data
microcontroller
packet
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.)
Expired - Fee Related
Application number
CN201511016315.6A
Other languages
Chinese (zh)
Other versions
CN106933603A (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.)
Shenzhen Bojuxing Microelectronics Technology Co ltd
Original Assignee
Shenzhen Bojuxing Microelectronics 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 Shenzhen Bojuxing Microelectronics Technology Co ltd filed Critical Shenzhen Bojuxing Microelectronics Technology Co ltd
Priority to CN201511016315.6A priority Critical patent/CN106933603B/en
Publication of CN106933603A publication Critical patent/CN106933603A/en
Application granted granted Critical
Publication of CN106933603B publication Critical patent/CN106933603B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明涉及芯片技术领域,提供了一种芯片烧录的方法、装置和微控制器,旨在解决现有技术中芯片烧录效率低的问题。所述方法包括:微控制器接收烧录设备发送的待烧录的数据包,并将所述数据包缓存在所述微控制器的静态存储器中;将所述静态存储器中缓存的所述数据包,按照预置的烧录单位烧录在目标存储器中。本发明提供的技术方案以数据包为单位在烧录设备与微控制器之间进行传输,通过将数据包保存到微控制器的静态存储器中,并对缓存在静态存储器中的数据包按照预置的烧录单位进行烧录,从而有效的提高了烧录效率。

The invention relates to the field of chip technology and provides a chip burning method, device and microcontroller, aiming to solve the problem of low chip burning efficiency in the prior art. The method includes: a microcontroller receives a data packet to be burned sent by a burning device, and caches the data packet in a static memory of the microcontroller; and caches the data in the static memory. The package is burned into the target memory according to the preset burning unit. The technical solution provided by the present invention transmits data packets between the burning device and the microcontroller in units of data packets by saving the data packets to the static memory of the microcontroller, and processing the data packets cached in the static memory according to preset The set burning unit is used for burning, thus effectively improving the burning efficiency.

Description

Chip burning method, device and microcontroller
Technical Field
The present invention relates to the field of chip technologies, and in particular, to a method, an apparatus, and a microcontroller for chip burning.
Background
Writing a user application to a target memory of the microcontroller, such as a non-volatile storage medium, is commonly referred to as "burning". How to quickly, efficiently and reliably burn a user program into a microcontroller in a burning process is very important to control production cost and reliability.
Currently, a common method for writing user program data to a microcontroller is to write the user program data in a unit of one byte. When the microcontroller receives one byte of data sent by the burning device through the serial communication interface, the internal burning module is started to burn the one byte of data into the target memory. After one byte of data is successfully burnt, the data of the next byte is received for burning. Repeating the steps until all program data are burnt, reading the burnt data byte by byte to the outside of the microcontroller through the serial communication interface for verification, and checking whether the burnt data are correct.
The recording device needs to wait for the completion of recording the byte after transmitting one byte, so that the transmission efficiency is low, and the recording efficiency is relatively low.
Disclosure of Invention
The invention aims to provide a chip burning method, device and microcontroller, which aim to solve the problem of low chip burning efficiency in the prior art.
In a first aspect of the present invention, a method for burning a chip is provided, including:
the method comprises the steps that a microcontroller receives a data packet to be burned, which is sent by burning equipment, and caches the data packet in a static memory of the microcontroller;
and burning the data packet cached in the static memory into a target memory according to a preset burning unit.
In a second aspect of the present invention, a device for chip burning is provided, including:
the buffer module is used for receiving the data packet to be burnt sent by the burning equipment and buffering the data packet in the static memory of the microcontroller;
and the burning module is used for burning the data packet cached in the static memory into a target memory according to a preset burning unit.
In a third aspect of the invention, there is provided a microcontroller comprising:
the system comprises a burning control module, a static memory and a target memory;
the static memory and the target memory are electrically connected with the burning control module;
the burning control module is used for
Receiving a data packet to be burnt sent by burning equipment, caching the data packet in the static memory, and
and burning the data packet cached in the static memory into the target memory according to a preset burning unit.
Compared with the prior art, the invention has the beneficial effects that: the technical scheme provided by the invention uses the data packet as a unit to transmit between the burning device and the microcontroller, and the data packet is stored in the static memory of the microcontroller, and the data packet cached in the static memory is burnt according to the preset burning unit, so that the burning efficiency is effectively improved.
Drawings
Fig. 1 is a flowchart of a method for chip burning according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for burning a chip according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a device for chip burning according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of a device for chip burning according to a fourth embodiment of the present invention;
FIG. 5 is a schematic diagram of a microcontroller according to a fifth embodiment of the present invention;
fig. 6 is a schematic diagram of a microcontroller according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The implementation of the present invention is described in detail below with reference to the specific drawings.
Embodiment one:
fig. 1 is a flowchart of a method for chip burning according to an embodiment of the present invention, specifically including steps S101 to S102, which are described in detail below:
s101, the microcontroller receives a data packet to be burnt sent by the burning device, and caches the data packet in a static memory of the microcontroller.
The microcontroller (Microcontroller Unit, MCU) is a single chip microcomputer integrating the main part of the microcomputer on one chip. The static memory of the microcontroller may be SRAM (Static Random Access Memory ).
The burning device can send the data packet to be burned to the microcontroller through the serial communication interface, and the microcontroller caches the data packet in the static memory of the chip after receiving the data packet to be burned.
Specifically, the length and format of the data packet to be burned are predetermined by the burning device and the microcontroller. Preferably, the data length of each data packet may be 128 bytes. Before burning, the burning device divides the whole file to be burned into a plurality of data packets according to the preset length, and then sends the divided data packets to the microcontroller one by one for standby burning.
S102, the data packet cached in the static memory is burnt in the target memory according to a preset burning unit.
The microcontroller reads the cached data packet from the static memory, generates a burning time sequence required by the target memory, and burns the data of the data packet into the target memory according to a preset burning unit.
In particular, the target memory may be a non-volatile storage medium memory such as OTP (One Time Programmable ), MTP (Multiple Time Programmable, multiple time programmable), FLASH, and the like. The preset burning unit may be 1 byte.
It should be noted that, the receiving of the data packet and the burning of the data packet may be performed in a pipeline manner, that is, the previous data packet is burned to the target memory according to a preset burning unit while the current data packet is received. By such a processing method, the burning efficiency can be further improved.
In this embodiment, the data packet is transmitted between the recording device and the microcontroller in units of data packets, and the data packets are stored in the static memory of the microcontroller, and the data packets cached in the static memory are recorded according to a preset recording unit, so that the recording efficiency is effectively improved.
Embodiment two:
fig. 2 is a flowchart of a method for burning a chip according to a second embodiment of the present invention, specifically including steps S201 to S204, which are described in detail below:
s201, the microcontroller receives a data packet to be burned sent by the burning device, and caches the data packet in a first storage area and a second storage area of a static memory of the microcontroller.
The microcontroller (Microcontroller Unit, MCU) is a single chip microcomputer integrating the main part of the microcomputer on one chip. The static memory of the microcontroller may be SRAM (Static Random Access Memory ).
Specifically, the recording device sends the data packet to be recorded to the microcontroller through the serial communication interface, and the length and format of the data packet to be recorded are predetermined by negotiation between the recording device and the microcontroller.
Before burning, the burning device divides the whole file to be burned into a plurality of data packets according to the preset length, and then sends the divided data packets to the microcontroller one by one for standby burning.
Preferably, the data packet may consist of a header, data and a packet check word. Wherein the packet header consists of a 1 byte packet start identifier (e.g., 0x1 b) and a 1 byte packet sequence number; the data length is 128 bytes, the data is divided into 4 32 bytes which are arranged behind a packet head, and a microcontroller can send an acknowledgement bit (Acknowledges) to the burning equipment after receiving 32 bytes of data each time, which indicates that the data is received; the 128 bytes of data are followed by a packet check word, the length of which is 2 bytes, used for transmission check of the data packet.
After receiving a data packet to be burned sent by the burning device, the microcontroller analyzes the packet header of the data packet, and selects a corresponding address according to the packet sequence number in the packet header to cache the data in the SRAM.
Specifically, the data packets with odd packet numbers are stored in a preset first storage area of the SRAM, for example, a bank0 area of the SRAM, and the data packets with even packet numbers are stored in a preset second storage area of the SRAM, for example, a bank1 area of the SRAM.
It should be noted that, the receiving of the data packet to be burned by the microcontroller and the buffering of the data packet to the SRAM may be parallel. The buffering into the SRAM may be performed in a preset buffering unit, which may be 1 byte.
S202, performing transmission verification on the received data packet.
The transmission check is used for verifying whether the data packet received by the microcontroller has transmission errors. The transmission check may be accomplished by a packet check word of the data packet.
Preferably, the data packet may be parity checked according to a packet check word, which is check information generated by the data of the data packet according to a rule of parity check.
Parity checking is performed according to whether the number of '1's in the digits of a group of binary codes to be transmitted is odd or even, and the odd number is called odd check, whereas the even check is called even check, and whether the odd check or the even check is specifically adopted is preset. Specifically, the number of 1's in the digits of the data binary code of the received data packet is made to be odd or even through the packet check word, when the data packet is received, if the odd check is adopted, the number of 1's is checked to be odd, and if the even check is adopted, the number of 1's is checked to be even, so that whether an error occurs in the transmission process of the data packet is judged.
When the transmission check is successful, the data packet is not in error in the transmission process, and the microcontroller can send confirmation information to the burning device through the serial communication interface. Preferably, the acknowledgement information may be an acknowledgement bit (Acknowledge). After receiving the confirmation information, the burning device sends a stop bit (P) to the microcontroller through the serial communication interface, which indicates that the current transmission is finished, and starts the sending of the next data packet to be burned.
When the transmission check fails, the data packet is in error in the transmission process, and the microcontroller can send non-acknowledgement information to the burning device through the serial communication interface. Preferably, the unacknowledged information may be an unacknowledged bit (Not ack). After receiving the non-acknowledgement information, the burning device sends a stop bit (P) to the microcontroller through the serial communication interface, which indicates that the current transmission is finished, and starts retransmission of the current data packet.
It should be noted that, the microcontroller will perform transmission check processing on the same data while sending the data packet to the static memory buffer. Therefore, after the data packet buffering is completed, the transmission verification of the data packet is correspondingly completed, so that the overall time of burning can be reduced, and the burning efficiency is improved.
S203, the data packet cached in the static memory is burnt in the target memory according to a preset burning unit.
The microcontroller reads the cached data packet from the static memory, generates a burning time sequence required by the target memory, and burns the data of the data packet into the target memory according to a preset burning unit.
In particular, the target memory may be a non-volatile storage medium memory, such as OTP, MTP, FLASH, and the like. The preset burning unit may be 1 byte.
It should be noted that, the receiving of the data packet and the burning of the data packet may be performed in a pipeline manner, that is, the previous data packet is burned to the target memory according to a preset burning unit while the current data packet is received. By such a processing method, the burning efficiency can be further improved.
S204, reading the data burnt in the target memory, and carrying out burning verification with the data packet cached in the static memory.
Specifically, after the current data packet is burnt, the microcontroller reads the burnt current data packet from the target memory according to a preset byte unit, checks the current data packet with data cached in the static memory one by one, deletes the data bit which is checked successfully from the corresponding static memory cache, and if all the bit checks pass, the data packet is burnt successfully, otherwise the data packet is burnt failed. When the programming fails, the microcontroller re-writes the programming-failed data buffered in the static memory n times, where n is configurable by the user. If the recording verification is unsuccessful after n times of recording, the recording is considered to be failed.
After receiving the packet header of the next data packet sent by the recording device, the microcontroller feeds back the recording verification result of the current data packet to the recording device through the recording status bit. Preferably, the length of the writing status Bit may be 2 bits (Bit), and 00 indicates that the writing of the current data packet is successful and the verification passes, 11 indicates that the verification after the writing of the current data packet does not pass, and 01 and 10 remain.
In the prior art, when checking, the burnt data needs to be read from the chip to the outside of the chip one by one, and checked with the data stored in the burning equipment, and the reading of the data from the external equipment of the burning equipment needs to take a long time, so that the checking efficiency is relatively low. The burning verification of the embodiment does not need to read the burnt data outside the chip, and the data cached in the static memory and the inside of the chip are directly verified, so that the verification efficiency is improved.
On the other hand, in the prior art, when a certain byte fails to verify, the writing operation, i.e. the writing operation, of the byte needs to be re-executed, and then the byte is read out and verified through the serial communication interface until the byte is successfully written in, so that the target memory is frequently switched between a writing mode and a reading mode, and because the writing mode needs to be added with programming high voltage, the reading mode turns off the programming high voltage, and therefore, the probability of damage of the chip due to the programming high voltage is increased due to frequent switching. In this embodiment, the microcontroller controls the on and off of the enable signal (VPEN) of the programming high voltage (Vp), when the data packet is burned, VPEN is turned on, and when the data packet is burned and checked, VPEN is turned off, so as to reduce the switching frequency of the programming high voltage, and reduce the probability of damage to the chip caused by the programming high voltage.
In the embodiment, the data packet is used as a unit to be transmitted between the recording device and the microcontroller, the data packet is stored in the static memory of the microcontroller, the data packet cached in the static memory is recorded according to a preset recording unit, and meanwhile, the data packet is received and the data packet is recorded according to a pipeline mode, so that the recording efficiency is effectively improved; the data in the static memory and the data in the chip are subjected to burning verification, and the burning data do not need to be read to the outside of the chip for verification, so that the verification efficiency is improved; in the process of programming and checking, the programming high voltage is only turned on when the data packet is programmed, and the programming high voltage is turned off when the data packet is checked, so that frequent switching of a programming high voltage switch is avoided, and the probability of damage of a chip due to the programming high voltage is reduced; errors possibly occurring in the transmission process of the data packet are avoided through transmission verification, so that the reject rate caused by error burning is reduced.
Embodiment III:
fig. 3 is a schematic diagram of a device for chip burning according to the third embodiment of the present invention, and for convenience of explanation, only the parts related to the embodiment of the present invention are shown. The apparatus for chip burning illustrated in fig. 3 may be an execution body of the method for chip burning provided in the first embodiment, which may be a microcontroller or a functional module in the microcontroller. The device for chip burning illustrated in fig. 3 mainly includes: the buffer module 31 and the burning module 32, each function module is described in detail as follows:
the buffer module 31 is configured to receive a data packet to be burned sent by the burning device, and buffer the data packet in the static memory of the microcontroller;
the recording module 32 is configured to record the data packet buffered in the static memory in the target memory according to a preset recording unit.
In the device for burning a chip in this embodiment, the process of implementing the respective functions by each module is referred to the description of the embodiment shown in fig. 1 and is not repeated here.
As can be seen from the device for chip recording illustrated in fig. 3, in this embodiment, the data packet is used as a unit to be transmitted between the recording device and the microcontroller, and the data packet is stored in the static memory of the microcontroller, and the data packet cached in the static memory is recorded according to a preset recording unit, so that the recording efficiency is effectively improved.
Embodiment four:
fig. 4 is a schematic diagram of a device for chip burning according to the fourth embodiment of the present invention, and for convenience of explanation, only the portions related to the embodiments of the present invention are shown. The apparatus for chip burning illustrated in fig. 4 may be an execution body of the method for chip burning provided in the second embodiment, which may be a microcontroller or a functional module in the microcontroller. The device for chip burning illustrated in fig. 4 mainly includes: the buffer module 41, the burning module 42, the burning verification module 43 and the transmission verification module 44 are described in detail as follows:
the buffer module 41 is configured to receive a data packet to be burned sent by the burning device, and buffer the data packet in the static memory of the microcontroller;
the burning module 42 is configured to burn the data packet cached in the static memory into the target memory according to a preset burning unit;
the writing check module 43 is configured to read the data written in the target memory and perform writing check with the data packet cached in the static memory;
and the transmission verification module 44 is configured to perform transmission verification on the received data packet, send acknowledgement information to the recording device when the transmission verification is successful, so that the recording device sends the next data packet to be recorded, and send non-acknowledgement information to the recording device when the transmission verification is failed, so that the recording device retransmits the data packet.
Specifically, the data packet includes a packet sequence number, and the buffer module 41 includes:
a first buffer sub-module 411, configured to buffer the data packet in a first storage area of the static memory of the microcontroller if the packet sequence number of the data packet is an odd number;
the second buffering sub-module 412 is configured to buffer the data packet in the second storage area of the static memory of the microcontroller if the packet number of the data packet is even.
Specifically, the data packet includes a packet check word, and the transmission check module 44 is further configured to perform parity check on the data packet according to the packet check word.
In the device for burning a chip in this embodiment, the process of implementing the respective functions by each module is referred to the description of the embodiment shown in fig. 2 and is not repeated here.
As can be seen from the device for chip recording illustrated in fig. 4, in this embodiment, the data packet is used as a unit to be transmitted between the recording device and the microcontroller, and the data packet is stored in the static memory of the microcontroller, and the data packet cached in the static memory is recorded according to a preset recording unit, and meanwhile, the data packet is received and the data packet is recorded according to a pipeline manner, so that the recording efficiency is effectively improved; the data in the static memory and the data in the chip are subjected to burning verification, and the burning data do not need to be read to the outside of the chip for verification, so that the verification efficiency is improved; in the process of programming and checking, the programming high voltage is only turned on when the data packet is programmed, and the programming high voltage is turned off when the data packet is checked, so that frequent switching of a programming high voltage switch is avoided, and the probability of damage of a chip due to the programming high voltage is reduced; errors possibly occurring in the transmission process of the data packet are avoided through transmission verification, so that the reject rate caused by error burning is reduced.
Fifth embodiment:
fig. 5 is a schematic diagram of the components of the microcontroller provided in the fifth embodiment of the present invention, and only the parts related to the embodiment of the present invention are shown for convenience of explanation. The microcontroller illustrated in fig. 5 may be an execution subject of the method for chip burning provided in the first embodiment. The microcontroller illustrated in fig. 5 includes: a burn control module 51, a static memory 52 and a target memory 53.
The static memory 52 and the target memory 53 are electrically connected to the burning control module 51.
The recording control module 51 is configured to receive a data packet to be recorded sent by the recording device, cache the data packet in the static memory 52 of the microcontroller, and record the data packet cached in the static memory 52 in the target memory 53 according to a preset recording unit.
In the microcontroller in this embodiment, the process of implementing the respective functions of each part is referred to the description of the embodiment shown in fig. 1, and is not repeated here.
As can be seen from the microcontroller illustrated in fig. 5, in this embodiment, the data packet is used as a unit to be transmitted between the recording device and the microcontroller, and the data packet is stored in the static memory of the microcontroller, and the data packet buffered in the static memory is recorded according to a preset recording unit, so that the recording efficiency is effectively improved.
Example six:
fig. 6 is a schematic diagram of the components of a microcontroller provided in the sixth embodiment of the present invention, and only the parts related to the embodiment of the present invention are shown for convenience of explanation. The microcontroller illustrated in fig. 6 may be an execution subject of the method for chip burning provided in the second embodiment. The microcontroller illustrated in fig. 6 includes: a burn-in control module 61, a static memory 62, a target memory 63 and a transmission verification module 64.
The static memory 62, the target memory 63 and the transmission checking module 64 are all electrically connected with the burning control module 61.
The recording control module 61 is configured to receive a data packet to be recorded sent by the recording device, cache the data packet in the static memory 62 of the microcontroller, and record the data packet cached in the static memory 62 in the target memory 63 according to a preset recording unit.
Specifically, the data packet includes a packet number, the static memory 62 includes a first storage area 621 and a second storage area 622, and the burning control module 61 is further configured to buffer the data packet in the first storage area 621 of the static memory of the microcontroller if the packet number of the data packet is odd, and buffer the data packet in the second storage area 621 of the static memory of the microcontroller if the packet number of the data packet is even.
The recording control module 61 is further configured to read the data recorded in the target memory 63, and perform recording verification with the data packet cached in the static memory 62.
The programming control module 61 controls the on and off of the enable signal (VPEN) of the programming high voltage (Vp), and when the data packet is programmed, VPEN is turned on, and when the data packet is programmed and verified, VPEN is turned off, so that the switching frequency of the programming high voltage is reduced, and the probability of damage to the chip caused by the programming high voltage is reduced.
The transmission verification module 64 includes: check word register 641, accumulation check register 642, check byte counter 643, first comparator 644, and second comparator 645.
The check word register 641 and the accumulation check register 642 are electrically connected to the second comparator 645;
the check byte counter 643 is electrically connected to the first comparator 644;
the first comparator 644 is electrically connected to the second comparator 645.
An accumulation check register 642 for receiving data of the data packet from the burning control module 61, accumulating the data into a buffer value of the accumulation check register 642, and triggering the check byte counter 643 to accumulate and count;
a first comparator 644 for comparing the value of the check byte counter 643 with the data amount of the data packet, and driving the second comparator 645 to perform transmission check when the value of the check byte counter 643 is the same as the data amount of the data packet;
the second comparator 645 is configured to compare the buffered value of the accumulation check register 642 with the value of the check word register 641, perform transmission check, send a result of successful transmission check to the recording control module 61 when the buffered value of the accumulation check register 642 is the same as the value of the check word register 641, notify the recording control module 61 to send acknowledgement information to the recording device, so that the recording device sends the next data packet to be recorded, and notify the recording control module 61 to send non-acknowledgement information to the recording device when the buffered value of the accumulation check register 642 is not the same as the value of the check word register 641, so that the recording device retransmits the data packet.
Specifically, the process of the transmission check module 64 for transmission check is described in detail as follows:
the transfer verification of the data packet is in parallel with the buffering of the data packet to the first storage area 621 and the second storage area 622 of the static memory 62. After receiving the data packet sent by the recording device through the serial communication interface, the recording control module 61 sends the data (wdata) of the data packet to the static memory 62 for buffering, and simultaneously sends the same data wdata to the transmission checking module 64.
When the data (wdata) to be buffered is ready, the write enable signal (wen) is asserted, and the burn-in control module 61 buffers wdata to the memory address (waddr) corresponding to the first memory area 621 or the second memory area 622 of the static memory 62, and wen is also used as the input enable signal (enable) of the transfer verification module 64. When the wen signal is valid, the transmission check module 64 triggers an accumulation check action to accumulate the wdata and the buffered value of the accumulation check register 642, the accumulated result is updated to the accumulation check register 642, and meanwhile triggers the check byte counter 643 to increment by 1, and the accumulated result is updated to the check byte counter 643. Taking 128 bytes as an example, when the data of the entire data packet is stored in the static memory 62, the value of the check byte counter 643 is 128, and at this time, the first comparator 644 outputs the valid enable signal (cmp_enable) to drive the second comparator 645, so that the second comparator 645 compares the buffered value of the accumulation check register 642 with the value of the check word register 641, and if the buffered value of the accumulation check register 642 is equal to the value of the check word register 641, the transmission check is successful, otherwise the transmission check fails.
The second comparator 645 feeds back the transmission check result (vrf _result) to the recording control module 61, and the recording control module 61 performs corresponding operations according to the transmission check result of the data packet. If the transmission check is successful, the confirmation information is sent to the recording device, so that the recording device sends the next data packet to be recorded, and if the transmission check is failed, the non-confirmation information is sent to the recording device, so that the recording device starts the data packet retransmission.
In the microcontroller in this embodiment, the process of implementing the respective functions of each part is referred to the description of the embodiment shown in fig. 2, and will not be repeated here.
As can be seen from the microcontroller illustrated in fig. 6, in this embodiment, the data packet is used as a unit to be transmitted between the recording device and the microcontroller, and the data packet is stored in the static memory of the microcontroller, and the data packet cached in the static memory is recorded according to a preset recording unit, and meanwhile, the data packet is received and the data packet is recorded according to a pipeline manner, so that the recording efficiency is effectively improved; the data in the static memory and the data in the chip are subjected to burning verification, and the burning data do not need to be read to the outside of the chip for verification, so that the verification efficiency is improved; in the process of programming and checking, the programming high voltage is only turned on when the data packet is programmed, and the programming high voltage is turned off when the data packet is checked, so that frequent switching of a programming high voltage switch is avoided, and the probability of damage of a chip due to the programming high voltage is reduced; errors possibly occurring in the transmission process of the data packet are avoided through transmission verification, so that the reject rate caused by error burning is reduced.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and the same or similar parts between the embodiments are referred to each other. For the device class and system class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, as relevant points are found in the partial description of the method embodiments.
It should be noted that, in the above embodiment of the apparatus, each module and unit included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional modules and units are also only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It will be appreciated by those skilled in the art that all or part of the steps of the methods of the embodiments described above may be implemented by a program to instruct related hardware, and the corresponding program may be stored in a computer readable storage medium, such as a ROM/RAM, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (3)

1.一种芯片烧录的方法,其特征在于,包括:1. A method of chip burning, which is characterized by including: 微控制器接收烧录设备发送的待烧录的数据包,并将所述数据包缓存在所述微控制器的静态存储器中;The microcontroller receives the data packet to be burned sent by the burning device, and caches the data packet in the static memory of the microcontroller; 将所述静态存储器中缓存的所述数据包,按照预置的烧录单位烧录在目标存储器中;Burn the data packet cached in the static memory into the target memory according to the preset burning unit; 所述将所述数据包缓存在所述微控制器的静态存储器中包括:Caching the data packet in the static memory of the microcontroller includes: 所述数据包由包头、数据和包校验字组成,其中包头由数据包开始标识和包序号组成,若所述数据包的包序号为奇数,则将所述数据包缓存在所述微控制器的静态存储器的第一存储区;The data packet is composed of a packet header, data and a packet check word, where the packet header is composed of a data packet start identifier and a packet sequence number. If the packet sequence number of the data packet is an odd number, the data packet is cached in the microcontroller. The first storage area of the static memory of the device; 若所述数据包的包序号为偶数,则将所述数据包缓存在所述微控制器的静态存储器的第二存储区;If the packet sequence number of the data packet is an even number, cache the data packet in the second storage area of the static memory of the microcontroller; 其中,包头由数据包开始标识和包序号组成;将数据长度均分排在包头后面,微控制器每收到均分的数据后向烧录设备发送确认位,表示数据已收到;Among them, the packet header consists of the data packet start identifier and the packet sequence number; the data length is evenly divided and arranged behind the packet header. After each time the microcontroller receives the equally divided data, it sends a confirmation bit to the burning device to indicate that the data has been received; 所述微控制器接收烧录设备发送的待烧录的数据包之后还包括:对接收的所述数据包进行传输校验;After the microcontroller receives the data packet to be burned sent by the burning device, it also includes: performing transmission verification on the received data packet; 当所述传输校验成功时,向所述烧录设备发送确认信息,使得所述烧录设备发送待烧录的下一个数据包;When the transmission verification is successful, send confirmation information to the burning device, so that the burning device sends the next data packet to be burned; 当所述传输校验失败时,向所述烧录设备发送非确认信息,使得所述烧录设备重传所述数据包;When the transmission verification fails, send non-confirmation information to the burning device, causing the burning device to retransmit the data packet; 微控制器控制编程高压的使能信号的打开和关闭,当烧录的时候,将使能信号打开,当对数据包进行烧录校验的时候,将使能信号关闭;The microcontroller controls the opening and closing of the programmed high-voltage enable signal. When burning, the enable signal is turned on, and when the data packet is burned and verified, the enable signal is turned off; 所述将所述静态存储器中缓存的所述数据包,按照预置的烧录单位烧录在目标存储器中的步骤之后,还包括:After the step of burning the data packets cached in the static memory into the target memory according to the preset burning unit, it also includes: 读取烧录在所述目标存储器中的数据,并与缓存在所述静态存储器中的所述数据包进行烧录校验。Read the data burned in the target memory, and perform burning verification with the data packet cached in the static memory. 2.一种芯片烧录的装置,其特征在于,包括:2. A chip burning device, characterized by including: 缓存模块,用于接收烧录设备发送的待烧录的数据包,并将所述数据包缓存在微控制器的静态存储器中;A cache module, used to receive the data packet to be burned sent by the burning device, and cache the data packet in the static memory of the microcontroller; 烧录模块,用于将所述静态存储器中缓存的所述数据包,按照预置的烧录单位烧录在目标存储器中;A burning module, used to burn the data packet cached in the static memory into the target memory according to the preset burning unit; 烧录校验模块,用于读取烧录在所述目标存储器中的数据,并与缓存在所述静态存储器中的所述数据包进行烧录校验;A burning verification module, used to read the data burned in the target memory, and perform burning verification with the data packet cached in the static memory; 传输校验模块,用于对接收的所述数据包进行传输校验,当所述传输校验成功时,向所述烧录设备发送确认信息,使得所述烧录设备发送待烧录的下一个数据包,当所述传输校验失败时,向所述烧录设备发送非确认信息,使得所述烧录设备重传所述数据包;A transmission verification module, used to perform transmission verification on the received data packet. When the transmission verification is successful, send confirmation information to the burning device, so that the burning device sends the download data to be burned. A data packet, when the transmission verification fails, non-confirmation information is sent to the burning device, so that the burning device retransmits the data packet; 所述数据包由包头、数据和包校验字组成;The data packet consists of a header, data and a packet check word; 所述缓存模块包括:The cache module includes: 第一缓存子模块,用于若所述数据包的包序号为奇数,则将所述数据包缓存在所述微控制器的静态存储器的第一存储区;A first cache submodule, configured to cache the data packet in the first storage area of the static memory of the microcontroller if the packet sequence number of the data packet is an odd number; 第二缓存子模块,用于若所述数据包的包序号为偶数,则将所述数据包缓存在所述微控制器的静态存储器的第二存储区;The second cache submodule is used to cache the data packet in the second storage area of the static memory of the microcontroller if the packet sequence number of the data packet is an even number; 其中,所述包头由数据包开始标识和包序号组成;将数据长度均分排在包头后面,微控制器每收到均分的数据后向烧录设备发送确认位,表示数据已收到;Wherein, the packet header is composed of the data packet start identifier and the packet sequence number; the data length is evenly divided and arranged behind the packet header, and the microcontroller sends a confirmation bit to the burning device after receiving the equally divided data, indicating that the data has been received; 微控制器控制编程高压的使能信号的打开和关闭,当烧录的时候,将使能信号打开,当对数据包进行烧录校验的时候,将使能信号关闭。The microcontroller controls the opening and closing of the programmed high-voltage enable signal. When burning, the enable signal is turned on. When the data packet is burned and verified, the enable signal is turned off. 3.一种微控制器,其特征在于,所述微控制器包括:3. A microcontroller, characterized in that the microcontroller includes: 烧录控制模块、静态存储器和目标存储器;Program control module, static memory and target memory; 所述静态存储器和所述目标存储器均与所述烧录控制模块电性连接;The static memory and the target memory are both electrically connected to the programming control module; 所述烧录控制模块,用于接收烧录设备发送的待烧录的数据包,并将所述数据包缓存在所述静态存储器中,以及将所述静态存储器中缓存的所述数据包,按照预置的烧录单位烧录在所述目标存储器中;The burning control module is used to receive the data packet to be burned sent by the burning device, cache the data packet in the static memory, and cache the data packet in the static memory, Burn in the target memory according to the preset burning unit; 其中,所述数据包由包头、数据和包校验字组成,其中包头由数据包开始标识和包序号组成,所述静态存储器包括第一存储区和第二存储区;Wherein, the data packet consists of a packet header, data and a packet check word, wherein the packet header consists of a data packet start identifier and a packet sequence number, and the static memory includes a first storage area and a second storage area; 所述烧录控制模块,还用于若所述数据包的包序号为奇数,则将所述数据包缓存在所述微控制器的静态存储器的第一存储区,以及The programming control module is also configured to cache the data packet in the first storage area of the static memory of the microcontroller if the packet sequence number of the data packet is an odd number, and 若所述数据包的包序号为偶数,则将所述数据包缓存在所述微控制器的静态存储器的第二存储区;If the packet sequence number of the data packet is an even number, cache the data packet in the second storage area of the static memory of the microcontroller; 所述烧录控制模块,还用于读取烧录在所述目标存储器中的数据,并与缓存在所述静态存储器中的所述数据包进行烧录校验;The burning control module is also used to read the data burned in the target memory, and perform burning verification with the data packet cached in the static memory; 所述微控制器还包括:与所述烧录控制模块电性连接的传输校验模块,所述传输校验模块包括:校验字寄存器、累加校验寄存器、校验字节计数器、第一比较器以及第二比较器;The microcontroller also includes: a transmission verification module electrically connected to the programming control module. The transmission verification module includes: a verification word register, an accumulation verification register, a verification byte counter, a first comparator and second comparator; 所述校验字寄存器和所述累加校验寄存器均与所述第二比较器电性连接;The check word register and the accumulation check register are both electrically connected to the second comparator; 所述校验字节计数器与所述第一比较器电性连接;The check byte counter is electrically connected to the first comparator; 所述第一比较器与所述第二比较器电性连接;The first comparator is electrically connected to the second comparator; 所述累加校验寄存器,用于从所述烧录控制模块接收所述数据包的数据,将所述数据累加到所述累加校验寄存器的缓存值中,同时触发所述校验字节计数器累加计数;The accumulation check register is used to receive the data of the data packet from the programming control module, accumulate the data into the cache value of the accumulation check register, and trigger the check byte counter at the same time cumulative count; 所述第一比较器,用于比较所述校验字节计数器的值与所述数据包的数据量,当所述校验字节计数器的值与所述数据包的数据量相同时,驱动所述第二比较器进行传输校验;The first comparator is used to compare the value of the check byte counter with the data amount of the data packet. When the value of the check byte counter is the same as the data amount of the data packet, the driver The second comparator performs transmission verification; 所述第二比较器,用于比较所述累加校验寄存器的所述缓存值与所述校验字寄存器的值进行传输校验,当所述累加校验寄存器的所述缓存值与所述校验字寄存器的值相同时,传输校验成功,将所述传输校验成功的结果发送到所述烧录控制模块,通知所述烧录控制模块向所述烧录设备发送确认信息,使得所述烧录设备发送待烧录的下一个数据包,当所述累加校验寄存器的所述缓存值与所述校验字寄存器的值不相同时,传输校验失败,通知所述烧录控制模块向所述烧录设备发送非确认信息,使得所述烧录设备重传所述数据包;The second comparator is used to compare the cache value of the accumulation check register with the value of the check word register for transmission verification. When the cache value of the accumulation check register and the value of the check word register When the values of the check word registers are the same, the transmission verification is successful. The result of the successful transmission verification is sent to the burning control module, and the burning control module is notified to send confirmation information to the burning device, so that The burning device sends the next data packet to be burned. When the cache value of the accumulated verification register is different from the value of the check word register, the transmission verification fails and the burning device is notified. The control module sends non-confirmation information to the burning device, causing the burning device to retransmit the data packet; 所述微控制器控制编程高压的使能信号的打开和关闭,当烧录的时候,将使能信号打开,当对数据包进行烧录校验的时候,将使能信号关闭。The microcontroller controls the opening and closing of the enable signal of the programmed high voltage. When burning, the enable signal is turned on, and when the data packet is burned and verified, the enable signal is turned off.
CN201511016315.6A 2015-12-29 2015-12-29 Chip burning method, device and microcontroller Expired - Fee Related CN106933603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511016315.6A CN106933603B (en) 2015-12-29 2015-12-29 Chip burning method, device and microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511016315.6A CN106933603B (en) 2015-12-29 2015-12-29 Chip burning method, device and microcontroller

Publications (2)

Publication Number Publication Date
CN106933603A CN106933603A (en) 2017-07-07
CN106933603B true CN106933603B (en) 2024-03-05

Family

ID=59442278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511016315.6A Expired - Fee Related CN106933603B (en) 2015-12-29 2015-12-29 Chip burning method, device and microcontroller

Country Status (1)

Country Link
CN (1) CN106933603B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967144B (en) 2017-12-08 2021-10-22 京东方科技集团股份有限公司 A data burning method and device
CN108363579B (en) * 2018-02-08 2021-06-29 深圳创维-Rgb电子有限公司 Data burning method, device, equipment and storage medium
CN111260366B (en) * 2018-11-30 2024-02-20 广州众诺微电子有限公司 Burning method, system and storage medium
CN111381837B (en) * 2018-12-28 2023-07-18 广州众诺微电子有限公司 Burning method, system and readable storage medium
CN110119373A (en) * 2019-05-28 2019-08-13 深圳市博巨兴微电子科技有限公司 Single-chip microcontroller and its adjustment method and method for burn-recording
CN110399143A (en) * 2019-07-29 2019-11-01 Oppo广东移动通信有限公司 Method, device, computer storage medium and system for flashing terminal equipment
CN110609690A (en) * 2019-08-30 2019-12-24 珠海泰芯半导体有限公司 Burning acceleration method of burner
CN110767188B (en) * 2019-10-12 2022-05-31 Tcl华星光电技术有限公司 Display panel driving system
CN113312065B (en) * 2021-06-06 2022-10-21 深圳市昂科技术有限公司 Data burning method, device, terminal and storage medium
TWI905000B (en) * 2024-12-31 2025-11-11 大陸商星宸科技股份有限公司 Electronic device and data burning method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4443865A (en) * 1981-10-26 1984-04-17 Allen-Bradley Co. Processor module for a programmable controller
WO2001053915A1 (en) * 2000-01-19 2001-07-26 Codex Technologies Incorporated Security system involving creation and auto-burning of a digital signature in an electronic device and intelligent token device
CN102508732A (en) * 2011-10-25 2012-06-20 深圳芯邦科技股份有限公司 Method and device for improving one-time programmable memory use performance
CN103577211A (en) * 2012-08-08 2014-02-12 上海赤炫信息科技有限公司 Novel packaging and burning as well as updating methods for Android ROM (read only memory) system
CN104102530A (en) * 2014-07-30 2014-10-15 广东小天才科技有限公司 Method and system for improving burning speed of electronic product
CN105045626A (en) * 2015-07-21 2015-11-11 珠海格力电器股份有限公司 Program burning method, program burning equipment and controller
CN105117236A (en) * 2015-06-30 2015-12-02 无锡华润矽科微电子有限公司 Automatic verified programming e-writing method
CN205282100U (en) * 2015-12-29 2016-06-01 深圳市博巨兴实业发展有限公司 Microcontroller

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI247293B (en) * 2001-05-03 2006-01-11 Via Tech Inc Method of continuous burn for storage medium
TWI315516B (en) * 2004-05-28 2009-10-01 Mediatek Inc Method and related apparatus for generating fixed packets while writing data into cds
US8015460B2 (en) * 2008-04-07 2011-09-06 Micron Technology, Inc. Test mode for parallel load of address dependent data to enable loading of desired data backgrounds
US8826035B2 (en) * 2009-12-23 2014-09-02 Intel Corporation Cumulative integrity check value (ICV) processor based memory content protection
TWI516927B (en) * 2013-06-14 2016-01-11 群聯電子股份有限公司 Data writing method, memory controller and memory storage apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4443865A (en) * 1981-10-26 1984-04-17 Allen-Bradley Co. Processor module for a programmable controller
WO2001053915A1 (en) * 2000-01-19 2001-07-26 Codex Technologies Incorporated Security system involving creation and auto-burning of a digital signature in an electronic device and intelligent token device
CN102508732A (en) * 2011-10-25 2012-06-20 深圳芯邦科技股份有限公司 Method and device for improving one-time programmable memory use performance
CN103577211A (en) * 2012-08-08 2014-02-12 上海赤炫信息科技有限公司 Novel packaging and burning as well as updating methods for Android ROM (read only memory) system
CN104102530A (en) * 2014-07-30 2014-10-15 广东小天才科技有限公司 Method and system for improving burning speed of electronic product
CN105117236A (en) * 2015-06-30 2015-12-02 无锡华润矽科微电子有限公司 Automatic verified programming e-writing method
CN105045626A (en) * 2015-07-21 2015-11-11 珠海格力电器股份有限公司 Program burning method, program burning equipment and controller
CN205282100U (en) * 2015-12-29 2016-06-01 深圳市博巨兴实业发展有限公司 Microcontroller

Also Published As

Publication number Publication date
CN106933603A (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN106933603B (en) Chip burning method, device and microcontroller
CN205282100U (en) Microcontroller
US11461017B2 (en) Systems and methods for improving efficiencies of a memory system
US7676617B2 (en) Posted memory write verification
US10445016B2 (en) Techniques for storage command processing
US8880970B2 (en) Error detection method and a system including one or more memory devices
US9542287B1 (en) Systems and methods for error injection in data storage systems
CN102203740B (en) Data processing method, device and system
US10049005B2 (en) Flash memory control apparatus utilizing buffer to temporarily storing valid data stored in storage plane, and control system and control method thereof
CN101800071B (en) Solid state disk device and program fail processing method thereof
CN102257573B (en) Error detection method and a system including one or more memory devices
US9191030B2 (en) Memory controller, data storage device, and memory controlling method
CN103377140B (en) Memory control apparatus, storage device, information processing system and processing method
KR20070076849A (en) Apparatus and method for performing a copyback operation of a memory card
TW201503153A (en) Flash memory apparatus, memory controller and method for controlling flash memory
US7664987B2 (en) Flash memory device with fast reading rate
TWI534607B (en) Memory control circuit unit, data transmitting method and memory storage apparatus
CN111381775A (en) System and method for quality of service assurance for multi-stream scenarios in hard disk drives
CN101794622B (en) Data scanning method and device for storage device
CN106656425A (en) Efficient error retransmission and access mechanism of fixed frame length in fiber channel
CN112579329A (en) Method for rapidly processing UECC and storage device thereof
CN103902483A (en) Data arrangement method of nonvolatile memory and memory control system
CN112242175B (en) Storage system and method for correcting errors in storage system
US12469529B2 (en) Buffer device with low-latency skid mode for data freshness
CN101488825A (en) Error detection method and system for data transmission

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Shenzhen Nanshan District, Guangdong Province, Guangdong Province, Yuehai Street High-tech Zone Community Science and Technology South Road 18 Shenzhen Bay Science and Technology Eco-Park 12 Skirt Building 732

Applicant after: Shenzhen Bojuxing Microelectronics Technology Co.,Ltd.

Address before: 518000 Shenzhen City, Nanshan District Province, a new high tech park, No. 1,, new materials, building D, room four, building

Applicant before: SHENZHEN BOJUXING INDUSTRIAL DEVELOPMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20240305