CN112416376A - Chip burning method, burning equipment, chip and system - Google Patents

Chip burning method, burning equipment, chip and system Download PDF

Info

Publication number
CN112416376A
CN112416376A CN202011310498.3A CN202011310498A CN112416376A CN 112416376 A CN112416376 A CN 112416376A CN 202011310498 A CN202011310498 A CN 202011310498A CN 112416376 A CN112416376 A CN 112416376A
Authority
CN
China
Prior art keywords
chip
burning
detection command
communication detection
response message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011310498.3A
Other languages
Chinese (zh)
Inventor
褚桂英
万峰
陈光胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Eastsoft Microelectronics Co ltd
Original Assignee
Shanghai Eastsoft Microelectronics 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 Shanghai Eastsoft Microelectronics Co ltd filed Critical Shanghai Eastsoft Microelectronics Co ltd
Priority to CN202011310498.3A priority Critical patent/CN112416376A/en
Publication of CN112416376A publication Critical patent/CN112416376A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Semiconductor Integrated Circuits (AREA)

Abstract

The invention provides a chip burning method, burning equipment, a chip and a system.A first communication detection command is sent to the chip welded on a system board through the burning equipment, wherein the first communication detection command is used for indicating the chip to feed back a response message; receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with burning equipment; carrying out program burning processing on the chip; according to the embodiment of the invention, the chip welded on the system board is effectively detected according to the interaction result of the communication detection command between the burning equipment and the chip.

Description

Chip burning method, burning equipment, chip and system
Technical Field
The invention relates to the technical field of chips, in particular to a chip burning method, burning equipment, a chip and a system.
Background
With the popularization of Electronic Design Automation (EDA) tools and the increasing maturity of In System Programming (ISP) devices, ISP technology is also widely used.
In the existing program burning process, an OS detection circuit is arranged on the burning device, and when the burning device detects a Micro Controller Unit (MCU) chip to be burned through the OS detection circuit, program burning is started, thereby completing program burning.
However, the OS detection circuit can only detect the individual chip, and cannot effectively detect the chip soldered on the system board, and particularly cannot effectively detect the chip soldered on the system board to which power has been supplied.
Disclosure of Invention
In order to solve the problems, the invention provides a chip burning method, burning equipment, a chip and a system.
In a first aspect, the present invention provides a chip burning method, which is applied to burning equipment, and includes: sending a first communication detection command to a chip welded on a system board, wherein the first communication detection command is used for indicating the chip to feed back a response message; receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with burning equipment; and carrying out program burning processing on the chip.
In other optional embodiments, after performing the program burning process on the chip, the method further includes: sending a second communication detection command to the chip, wherein the second communication detection command is used for indicating the chip to feed back a response message; and if a second response message returned by the chip aiming at the second communication detection command is not received, determining that the chip is moved out of the burning equipment.
In another optional embodiment, before sending the first communication detection command to the chip soldered on the system board, for the chip whose reset pin is not multiplexed, the method further includes: and outputting a low level to a reset pin of the chip so as to enable the chip to be in a reset state.
In another alternative embodiment, for a chip whose reset pin is multiplexed, the sending a first communication detection command to a chip soldered on a system board includes: and sending a first communication detection command to the chip at the power-on window time of the chip, wherein the power-on window time of the chip corresponds to the chip being in a reset state.
In other optional embodiments, the method further comprises: if a first response message returned by the chip aiming at the first communication detection command is not received, judging the power supply mode of the chip; if the power supply mode of the chip is judged to be the power supply mode of the burning equipment, the chip is controlled to carry out power-down and power-up processing, and the step of sending the first communication detection command to the chip welded on the system board is executed again; and if the power supply mode of the chip is judged to be the power supply mode of the non-burning equipment, the step of sending the first communication detection command to the chip welded on the system board is executed again.
In other optional embodiments, if the number of times of repeatedly executing the step of sending the first communication detection command to the chip soldered on the system board and receiving the first response message returned by the chip in response to the first communication detection command reaches a first preset number of times, it is determined that the chip is in a reset state and the chip is in good contact with the burning device.
In other optional embodiments, if the step of sending the second communication detection command to the chip is repeatedly executed, and if the step number of times of not receiving the second response message returned by the chip for the second communication detection command reaches a second preset number of times, it is determined that the chip is removed from the burning device.
In other optional embodiments, for a chip powered by non-burning equipment, the performing program burning processing on the chip includes: 1) controlling the chip to enter an ISP mode, and carrying out user program and configuration burning processing on the chip in the ISP mode, wherein the steps of erasing, programming, verifying, encrypting and the like are mainly included; 2) and controlling the chip after the burning to exit the ISP programming mode.
The burning process generally includes:
firstly, executing an erasing operation, namely clearing the memory contents of a program space and a user configuration space of the MCU through an erasing instruction;
then, executing programming operation, namely reading out the user program and user configuration originally downloaded into the external memory, and writing the user program and user configuration into the memory of the program space and configuration space of the MCU through instructions;
then, confirming whether the burning is correct, namely reading out the memory contents one by one through each address, and comparing the memory contents with the external memory contents; the CRC value can also be read through the CRC check function in the MCU and compared with the CRC value calculated by the interface software;
finally, an encryption programming operation is performed. After the encryption is successful, the program space memory content of the MCU cannot be read, thereby protecting the user code.
In the program burning process, if the programming is not successfully executed, the burning process is stopped, and error information is prompted.
In a second aspect, the present invention provides a method for burning a chip, where the method is applied to a chip, and the chip is soldered on a system board, and the method includes: receiving a first communication detection command sent by burning equipment, wherein the first communication detection command is used for indicating a chip to feed back a response message; returning a first response message aiming at the first communication detection command to the burning equipment, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment; and receiving the program burning processing of the burning equipment to the chip.
In other optional embodiments, for a chip whose reset pin is multiplexed, the receiving a first communication detection command sent by the burning device includes: and if the chip is in the power-on window time, receiving a first communication detection command sent by the burning equipment, wherein the power-on window time of the chip corresponds to the reset state of the chip.
In other optional embodiments, after receiving the first communication detection command sent by the burning device, the method further includes: and restarting timing, wherein the timing is used for timing the power-on window time of the chip.
In a third aspect, the present invention provides a burning apparatus, including: the system comprises a first sending module, a second sending module and a control module, wherein the first sending module is used for sending a first communication detection command to a chip welded on a system board, and the first communication detection command is used for indicating the chip to feed back a response message; the first receiving module is used for receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment; and the program burning module is used for carrying out program burning processing on the chip.
In a fourth aspect, the present invention provides a chip, comprising: the second receiving module is used for receiving a first communication detection command sent by the burning equipment, wherein the first communication detection command is used for indicating the chip to feed back a response message; the second sending module is used for returning a first response message aiming at the first communication detection command to the burning equipment, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment; and the program receiving module is used for receiving the program burning processing of the burning equipment.
In a fifth aspect, the present invention provides a chip burning system, which includes burning equipment and a chip soldered on a system board; wherein the burning device is configured to perform the method according to any one of the first aspect; the chip is used for executing the method according to any one of the second aspect.
The invention provides a chip burning method, burning equipment, a chip and a system.A first communication detection command is sent to the chip welded on a system board through the burning equipment, wherein the first communication detection command is used for indicating the chip to feed back a response message; receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with burning equipment; carrying out program burning processing on the chip; namely, according to the interaction result of the communication detection command between the burning equipment and the chip, the embodiment of the invention realizes the effective detection of the chip welded on the system board.
Drawings
FIG. 1 is a diagram illustrating a system for burning chips according to an embodiment of the present invention;
FIG. 2 is a diagram of a hardware burning apparatus according to the present invention;
FIG. 3 is a schematic flow chart of a chip burning method according to the present invention;
FIG. 4 is a schematic flow chart of another chip burning method according to the present invention;
FIG. 5 is a schematic flow chart illustrating a first communication detection command according to the present invention;
FIG. 6 is a flowchart illustrating a second communication detection command according to the present invention;
FIG. 7 is a schematic flow chart illustrating another method for burning a chip according to the present invention;
FIG. 8 is a schematic structural diagram of a recording apparatus according to the present invention;
FIG. 9 is a schematic diagram of a chip structure according to the present invention;
fig. 10 is a schematic diagram of a hardware structure of a control device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the examples of the present invention will be clearly and completely described below with reference to the accompanying drawings in the examples of the present invention.
The terms to which the present invention relates will be explained first:
in System Programming (ISP) refers to Programming or re-Programming devices on a target System or printed circuit board designed by a user to reconfigure logic or implement new functions.
An off-line programming mode: after the user program and the configuration are downloaded to the programmer (or the burning device), the programming is carried out without sending a command through a PC (personal computer), and the programmer automatically detects that the chip or the programmer receives a start signal provided by the manipulator device and then automatically starts the programming, so that the efficiency of mass production is greatly improved.
With the popularity of EDA tools and the increasing maturity of ISP devices, ISP technology has become more and more widely used. In order to simplify the production process, more and more users choose the process of firstly welding the chip and then burning the program, or the chip on the system board with the program burned is upgraded on line in order to realize new functions of the chip.
In the existing program burning process, an OS detection circuit is arranged on the burning equipment, when the burning equipment detects an MCU chip through the OS detection circuit, whether the chip is in good contact with the burning equipment is detected through an internal diode from IO to VDD, an internal diode from GND to IO and an internal diode circuit from GND to VDD, and program burning is started only after the chip is in good contact, so that program burning is completed.
However, the OS detection circuit needs to be connected to each pin of the chip to detect the chip, that is, the OS detection circuit can detect the independent chip, but cannot effectively detect the chip due to the influence of the client circuit on the system board for the chip that has been soldered on the system board.
Therefore, aiming at the technical problems, the technical idea of the invention is that whether the chip is in good contact with the burning device or is taken away is automatically detected through the interaction of the communication detection command between the burning device and the chip, so that the chip welded on the system board is effectively detected.
Fig. 1 is a schematic diagram of a chip burning system provided by the present invention, and as shown in fig. 1, one of the chip burning systems on which the present invention is based includes a burning device and a chip 3 to be burned, where the burning device includes a PC interface software 1 and a burning hardware device 2.
Fig. 2 is a schematic diagram of a burning hardware device provided by the present invention, and as shown in fig. 2, the burning hardware device includes a monitoring chip 21, a power supply module 22 (for example, an external power supply), a storage module 23, a key module 24, an LED indicator module 25, an OLED display module 26, a fast power-down circuit 27, and the like, where the storage module 23 includes a charged Erasable Programmable read only memory (EEPROM) and a serial flash chip. The monitoring chip 21 selects a module containing a USB, and realizes communication between the PC and the burning hardware device 2 through a USB interface.
During burning, a user can select the model of the chip to be burned through the PC interface software 1, and the PC interface software 1 updates the bottom firmware timing sequence according to the model. The PC interface software 1 provides hex or bin file downloads as well as project file downloads. For example, the information such as user program, user configuration word, serial number setting, operation steps, programming frequency limitation, power setting and the like is downloaded in sequence through the PC interface software 1, and the information can also be saved in items and loaded by one key.
The burning device provides an online burning mode and an offline burning mode. The online programming mode prompts the programming feedback information on the PC interface software 1, and the online programming downloads one item at a time, namely, the programming of the item displayed on the current interface. The programming information is prompted on the OLED display module 26 in an off-line programming mode, for off-line programming, firstly, several items can be downloaded at one time in an on-line state, the off-line programming mode is entered by pressing the off-line programming key module 24 for a long time, then the items are selected by pressing the key module 24 for a short time, and the items are determined to be the current items by pressing for a long time, so that automatic detection and mass production programming can be realized.
Before the method is carried out, the preparation work of the burning equipment is completed according to the following steps, and the method comprises the following steps:
(1) the PC and the burning device are connected through the USB cable, the USB supplies power to the burning device, the device is initialized, such as clock initialization, port initialization, USB initialization and hardware self-checking, and the OLED screen displays the name and the version number of the device.
(2) And opening the PC interface software 1, automatically enumerating and identifying the equipment, sending a communication link command frame, and correctly replying by the firmware, namely, considering that the communication is successful.
(3) And loading an offline item needing programming on an offline download page, sending a command and a data frame by software, receiving and storing information and data in a serial flash by the bottom firmware. The transmitted information and data comprise time sequence HEX, user configuration words, serial number setting, power supply setting whether the host supplies power, programming time limit and the like.
(4) After downloading is completed, the PC can be separated, and at the moment, the PC is not needed to participate, and only a power supply, such as a 5V direct current power supply, is needed.
(5) Long press the off-line programming key module 24 to enter the off-line programming mode; then, by pressing the offline programming button module 24 for a short time, the OLED display module 26 switches to display the names of the respective offline items. When the program is switched to the item needing to be programmed, the off-line programming key module 24 is pressed for a long time, and the item needing to be programmed off-line can be selected.
(6) The firmware automatically reads the selected offline item time sequence from the serial flash and writes the selected offline item time sequence into the monitoring chip 21. Information such as offline item timing, user programs, configuration and the like is stored in the serial flash chip, and each item is generally not changed or rarely changed after being downloaded to the serial flash, generally deleted and re-downloaded and not frequently changed. Its erasing life is generally 10 ten thousand times. The serial flash has large capacity and low price. Such as MX25L6405D chip 64M-Bit (i.e., 8M-Byte), EEPROM or ferroelectric EEPROM are relatively expensive and have few high-capacity models. The method is generally used for storing data which is frequently programmed, such as saving the number of chips which are successfully programmed at present, user serial numbers and the like, which need to be changed every programming. For example FM24C04B its lifetime is 100trillion (10)14) And (5) reading and writing.
(7) The firmware automatically reads the selected offline item user HEX, the user configuration word, the serial number setting, the voltage setting, the programming time limit and the like from the serial flash and writes the read data into the public area of the serial flash.
(8) And refreshing the OLED display module 26, and displaying the item name, the chip name, the code checksum and the number of the chips which are successfully written.
(9) And starting off-line programming, namely automatically detecting the chip, and executing burning according to the set operation steps, namely executing the steps corresponding to the following embodiments.
Fig. 3 is a schematic flow chart of a chip burning method according to the present invention. As shown in fig. 3, the chip burning method includes:
step 101, sending a first communication detection command to a chip soldered on a system board.
The first communication detection command is used for indicating the chip to feed back the response message.
Specifically, before this step, the chip to be burned is placed on the burning device, and then the burning device sends a first communication detection command to the chip.
Correspondingly, the chip receives a first communication detection command sent by the burning device, wherein the first communication detection command is used for indicating the chip to feed back a response message.
And 102, returning a first response message aiming at the first communication detection command to the burning equipment by the chip.
The first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment.
Specifically, when the chip is in a reset state, the chip receives a first communication detection command sent by the burning equipment and returns a first response message to the burning equipment; in addition, the burning device can receive the first response message fed back by the chip, which also indicates that the chip is in good contact with the burning device.
Correspondingly, the burning equipment side receives a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment.
As an alternative embodiment, for a chip whose reset pin is not multiplexed, before step 101, the method further includes: and outputting a low level to a reset pin of the chip so as to enable the chip to be in a reset state.
Specifically, for a chip with a reset PIN RST _ PIN of the chip not multiplexed, the burning device outputs a low level to the RST _ PIN so that the chip is in a reset state, then the burning device sends a first communication detection command to the chip, and if the chip gives a correct response message, it is determined that the chip is in good contact with the burning device, or the chip is detected in the burning device. Optionally, the chip may enter a reset state through a reset instruction.
As an alternative embodiment, for a chip whose reset pin is multiplexed, step 101 includes: and sending a first communication detection command to the chip at the power-on window time of the chip, wherein the power-on window time of the chip corresponds to the chip being in a reset state.
Specifically, for a chip in which the reset PIN RST _ PIN of the chip is multiplexed as a digital IO, the power-on window time of the chip corresponds to the reset state of the chip, that is, the chip may receive the first communication detection command sent by the burning device and return the first response message to the burning device within the power-on window time of the chip.
As an optional embodiment, the method further comprises: if a first response message returned by the chip aiming at the first communication detection command is not received, judging the power supply mode of the chip; if the power supply mode of the chip is judged to be the power supply mode of the burning equipment, the chip is controlled to carry out power-down and power-up processing, and the step of sending the first communication detection command to the chip welded on the system board is executed again; and if the power supply mode of the chip is judged to be the power supply mode of the non-burning equipment, the step of sending the first communication detection command to the chip welded on the system board is executed again.
Specifically, for a chip with a reset PIN RST _ PIN multiplexed as a digital IO, if the power-on window time of the chip is missed, the chip does not feed back a first response message to the burning device, at the moment, the burning device judges the power supply mode of the chip, if the burning device is determined to supply power to the chip, the chip is controlled to perform power-down and power-up processing so that the chip is in the power-on window time again, the burning device sends a first communication detection command again to judge whether the first response message is received, if the first response message is not received, the chip is not in good contact with the burning device, and at the moment, the position of the chip can be adjusted; if the non-burning device is judged to supply power to the non-burning device, the burning device directly sends the first communication detection command again, and whether the first response message fed back by the chip is received or not is continuously judged.
In addition, aiming at the condition that a large capacitor may be connected to a VDD pin on a client system board, a rapid power-down control circuit can be additionally arranged, rapid power-down and power-up unlocking are achieved, a programming mode is entered, and programming efficiency can be improved.
In the process, the red LED lamp flickers to display to show whether the chip is detected to be in good contact or not. And the OLED displays the name of the chip, the checksum of the user code and the number of chips with written OK.
And 103, performing program burning processing on the chip by the burning equipment.
Specifically, after receiving a first response message fed back by the chip, it is indicated that the chip has been detected by the burning device, and at this time, the burning device may unlock the chip, enter a programming mode, and execute the steps in sequence according to a burning flow of off-line programming. The programming of the MCU generally includes: erasing, programming, verifying and encrypting.
Correspondingly, the chip receives the program burning processing of the burning equipment.
In the programming process, a yellow LED indicator lamp of the programming device is always on to display, and the chip programming is executed. And (5) Programming the OLED display process.
As an alternative embodiment, for a chip powered by a non-burning device, the step 103 includes: controlling the chip to enter a programming mode, and carrying out program burning processing on the chip in the programming mode; and controlling the chip subjected to program burning processing to exit the programming mode.
Specifically, after the burning device receives a first response message fed back by the chip, the chip can be controlled to unlock, an ISP programming mode is entered, ISP programming is executed, and after the programming is finished: if the chip is powered by the non-burning equipment, the chip is required to be controlled to exit the ISP programming mode, because the system board is always kept in a charged state for the system board powered by the non-burning equipment, and the chip is in the ISP programming mode during burning; if the ISP programming mode is not exited after the program burning is finished, the program cannot be operated. For example, for a chip which is not powered by burning equipment and has a reset pin of the chip not multiplexed, the ISP programming mode needs to be exited, and after the control on the reset pin of the chip is removed, the chip automatically starts a program to run; for another example, considering the electromagnetic Compatibility (EMC) performance, the chip with the multiplexed reset pin does not support the programming without the power supply of the programming device. That is to say, the situation that the program is interfered to enter the reset state during the operation is avoided, and the chip with the multiplexed reset pin only supports the power supply programming of the programming device. After programming is finished, the computer can exit from an ISP programming mode and then enter into a circulating ISP mode state, namely, a communication detection command is sent at regular time to confirm a response signal; and the ISP mode state detection can be circulated to confirm whether the chip is moved out of the burning equipment without exiting the ISP programming mode. When the chip is removed from the burning device, the chip is powered down to exit the ISP programming mode.
As an alternative embodiment, after step 103, the method further includes: sending a second communication detection command to the chip, wherein the second communication detection command is used for indicating the chip to feed back a response message; and if a second response message returned by the chip aiming at the second communication detection command is not received, determining that the chip is moved out of the burning equipment.
Specifically, after the program is completely burned, the burning device can send a second communication detection command to the chip, and if a second response message fed back by the chip is received, the chip is not moved out of the burning device; if the second response message is not received, it indicates that the chip has been removed from the burning device, that is, the whole burning process of the chip is completed at this time. Optionally, the steps 101-103 can be executed in a loop to burn the next chip.
When the user program is burned, the green LED indicator light is always on to display, and the whole burning process of the chip is completed and succeeded.
The chip burning method provided by the embodiment of the invention sends a first communication detection command to a chip welded on a system board through burning equipment, wherein the first communication detection command is used for indicating the chip to feed back a response message; receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with burning equipment; carrying out program burning processing on the chip; namely, according to the interaction result of the communication detection command between the burning equipment and the chip, the embodiment of the invention realizes the effective detection of the chip welded on the system board.
With reference to the foregoing implementation manners, fig. 4 is a schematic flow chart of another chip burning method provided by the present invention, as shown in fig. 4, applied to a burning device, where the chip burning method includes:
step 201: and sending a first communication detection command to a chip welded on the system board.
The first communication detection command is used for indicating the chip to feed back the response message.
Step 202: and receiving a first response message returned by the chip aiming at the first communication detection command.
The first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment.
Step 203: if the times of repeatedly executing the step 201 and the step 202 reach the first preset times, it is determined that the chip is in the reset state and the chip is in good contact with the burning device.
Step 204: and carrying out program burning processing on the chip.
Step 201, step 202, and step 204 in this embodiment are similar to the implementation manners of step 101, step 102, and step 103 in the foregoing embodiment, respectively, and are not described herein again.
Different from the foregoing embodiment, in order to prevent a communication detection error caused by contact jitter, in the present embodiment, if the step of sending a first communication detection command to a chip soldered on a system board is repeatedly executed, and the number of times of receiving a first response message returned by the chip in response to the first communication detection command reaches a first preset number of times, it is determined that the chip is in a reset state and the chip is in good contact with a burning device.
Specifically, the burning device sends a first communication detection command to the chip for multiple times, and if the first response message is received for multiple times continuously, the burning device can be determined to be in good contact with the chip. Fig. 5 is a schematic flow chart of the first communication detection command provided by the present invention, and as shown in fig. 5, a first preset number of times is set as n, and a communication failure that the first communication detection command is sent every time and a corresponding first response message is not received is denoted as FailCnt. FailCnt and n are first initialized to 0; then carrying out first communication detection on the chip; if the communication detection fails, adding 1 to FailCnt and adding 1 to n; if the communication detection fails, the FailCnt is unchanged, and n is added with 1; then, whether n is greater than or equal to a first preset number of times (taking n as an example of 3) is judged, if not, the first communication detection can be performed again after a first preset interval (taking the delay time of 20ms as an example); when n is larger than or equal to 3, judging whether FailCnt is 0, if yes, indicating that each communication is successful within a first preset time, and returning a first response message of the detected chip to the burning equipment; when n is greater than or equal to 3 and FailCnt is not 0, it indicates that FailCnt communication fails within a first preset number of times, and a message that the chip is not detected can be returned.
As an alternative embodiment, after step 204, the method further includes: and if the burning equipment is repeatedly executed to send a second communication detection command to the chip, if the step times of not receiving a second response message returned by the chip aiming at the second communication detection command reach a second preset time, determining that the chip is moved out of the burning equipment.
Specifically, after the program is burned, the burning device sends the second communication detection command to the chip for multiple times, and if the second response message is not received for multiple times continuously, the chip can be determined to be removed from the burning device. Fig. 6 is a schematic flow chart of the second communication detection command provided by the present invention, and as shown in fig. 6, the second preset number of times is also set as n, and the number of times of communication for receiving the corresponding second response message every time the second communication detection command is sent is recorded as OKCnt. First, initializing OKCnt and n to 0; then carrying out second communication detection on the chip; if the communication detection is successful, adding 1 to OKCnt, and adding 1 to n; if the communication detection fails, the OKCnt is unchanged, and n is added by 1; then, whether n is greater than a second preset number of times (taking n as an example of 3) is judged, if n is less than 3, after a second preset interval (taking 20ms as an example of delay), second communication detection is carried out again; when n is greater than or equal to 3, judging whether the OKCnt is 0, if so, indicating that the communication fails in each time within the second preset times, namely, the chip has been continuously carried out for the second preset times and does not return a second response message to the burning equipment, indicating that the chip is moved out at the moment and returning the information that the chip is taken away; when n is greater than or equal to 3 and OKCnt is not 0, indicating that OKCnt communication succeeds within the second preset time, the information that the chip is not taken can be returned.
It should be noted that the first preset number and the second preset number may be the same or different. In addition, the first communication inspection command and the second communication inspection command may be implemented by various combinations of ISP communication inspection command values and response values.
Optionally, the step of sending the first communication detection command to the chip is repeatedly executed according to a first preset time interval; or, the step of sending the second communication detection command to the chip is repeatedly executed according to a second preset time interval, where the first preset time interval and the second preset time interval may be the same or different.
In particular, the communication detection is very fast, and the mechanical adjustment time for chip jitter and clamping is relatively long, so that the time delay (for example, 20ms) can be properly increased between each detection to adjust the distribution time of the communication detection.
Optionally, a level shifter is disposed between the burning device and the system board. Specifically, a programming power supply of the system board with the battery is provided by the battery during burning, the burning equipment provides reset, data, a clock signal and a ground signal, and the ground of the burning equipment needs to be connected with the ground of the system board. When the level requirements of the burning device and the system board are different, the signal provided by the burning device needs level conversion. Optionally, the level shifter may adopt a unit bidirectional controllable level shifting chip, that is, the unit bidirectional controllable level shifting chip converts a signal provided by the burning device into a level signal receivable by the system board, and converts a signal output by the chip into a level signal receivable by the burning device.
On the basis of the foregoing embodiment, if the number of times of repeatedly executing the step of sending the first communication detection command to the chip soldered on the system board and receiving the first response message returned by the chip in response to the first communication detection command reaches a first preset number of times, it is determined that the chip is in a reset state and the chip is in good contact with the burning device; or if the second communication detection command is repeatedly sent to the chip, if the step frequency of not receiving a second response message returned by the chip aiming at the second communication detection command reaches a second preset frequency, the chip is determined to be moved out of the burning equipment, the false detection probability of the chip caused by contact jitter and the like is reduced, and the accuracy of chip detection is improved.
With reference to the foregoing implementation manners, fig. 7 is a schematic flow chart of another chip burning method provided by the present invention, as shown in fig. 7, applied to a chip, where the chip burning method includes:
step 301, receiving a first communication detection command sent by a burning device;
the first communication detection command is used for indicating the chip to feed back the response message.
Step 302, restart timing.
And the timing is used for timing the power-on window time of the chip.
Step 303, returning a first response message aiming at the first communication detection command to the burning device.
The first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment.
And step 304, receiving program burning processing of the burning equipment to the chip.
Step 301, step 303 and step 304 in this embodiment are similar to the implementation manners of step 101, step 102 and step 103 in the foregoing embodiment, respectively, and are not described herein again.
Different from the foregoing embodiment, in the present embodiment, after the chip receives the first communication detection command, the timing is restarted, where the timing is used to time the power-on window time of the chip. Wherein, the step 302 and the step 303 have no sequence, and can be executed simultaneously.
Specifically, for a chip with a reset pin of the chip multiplexed, after the chip is powered on, a timer is arranged in the chip and starts timing to record power-on window time, and only when the timing is within the power-on window time, the chip receives a first communication detection command sent by burning equipment and feeds back a first response message, namely, as long as the timing does not exceed the specified power-on window time, the chip is still in a reset state, and a client program cannot run; in this embodiment, after the chip receives the first communication detection command within the power-on window time, the timing is restarted, which is equivalent to prolonging the power-on window time.
In addition, it should be noted that the burning device may send the communication detection command to the chip in a cycle, the chip may count again after receiving the communication detection command, and the chip may be started to burn after obtaining the correct response message for the preset number of times.
On the basis of the foregoing embodiment, the timing is restarted after the chip receives the first communication detection command, where the timing is used to time the power-on window time of the chip, so that the power-on window time of the chip is prolonged, and program burning is facilitated.
An example of the present invention provides a burning device, and fig. 8 is a schematic structural diagram of the burning device provided by the present invention, as shown in fig. 8, the burning device includes:
the first sending module 10 is configured to send a first communication detection command to a chip soldered on the system board, where the first communication detection command is used to instruct the chip to feed back a response message; a first receiving module 20, configured to receive a first response message returned by the chip in response to the first communication detection command, where the first response message is used to indicate that the chip is in a reset state and that the chip is in good contact with the burning device; and the program burning module 30 is used for carrying out program burning processing on the chip.
In other optional embodiments, the first sending module 10 is further configured to send a second communication detection command to the chip after the program burning processing is performed on the chip, where the second communication detection command is used to instruct the chip to feed back a response message; if the first receiving module 20 does not receive the second response message returned by the chip for the second communication detection command, it is determined that the chip is removed from the burning device.
In other alternative embodiments, for a chip whose reset pin is not multiplexed, the first sending module 10 is further configured to output a low level to the reset pin of the chip to enable the chip to be in a reset state before sending the first communication detection command to the chip soldered on the system board.
In other optional embodiments, for a chip whose reset pin is multiplexed, the first sending module 10 is further configured to send a first communication detection command to the chip at a power-on window time of the chip, where the power-on window time of the chip corresponds to the chip being in a reset state.
In other optional embodiments, the first sending module 10 is further configured to: if a first response message returned by the chip aiming at the first communication detection command is not received, judging the power supply mode of the chip; if the power supply mode of the chip is judged to be the power supply mode of the burning equipment, the chip is controlled to carry out power-down and power-up processing, and the step of sending the first communication detection command to the chip welded on the system board is executed again; and if the power supply mode of the chip is judged to be the power supply mode of the non-burning equipment, the step of sending the first communication detection command to the chip welded on the system board is executed again.
In other optional embodiments, the first sending module 10 is further configured to determine that the chip is in the reset state and the chip is in good contact with the burning device if the number of times of repeatedly executing the step of sending the first communication detection command to the chip soldered on the system board and receiving the first response message returned by the chip for the first communication detection command reaches a first preset number of times.
In other optional embodiments, the first sending module 10 is further configured to determine that the chip is removed from the burning device if the step of sending the second communication detection command to the chip is repeatedly executed, and if the step number of not receiving the second response message returned by the chip for the second communication detection command reaches a second preset number.
In other optional embodiments, the program burning module 30 is specifically configured to: controlling the chip to enter a programming mode, and carrying out program burning processing on the chip in the programming mode; and controlling the chip subjected to program burning processing to exit the programming mode.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and corresponding beneficial effects of the burning device described above may refer to the corresponding process in the foregoing method example, and are not described herein again.
An example of the present invention provides a chip, and fig. 9 is a schematic structural diagram of the chip provided by the present invention, as shown in fig. 9, the chip includes:
the second receiving module 40 is configured to receive a first communication detection command sent by the burning device, where the first communication detection command is used to instruct the chip to feed back a response message; a second sending module 50, configured to return a first response message to the burning device, where the first response message is used to indicate that the chip is in a reset state and the chip is in good contact with the burning device; the program receiving module 60 is configured to receive a program burning process of the burning device.
In other optional embodiments, for a chip whose reset pin is multiplexed, the second receiving module 40 is specifically configured to: and if the chip is in the power-on window time, receiving a first communication detection command sent by the burning equipment, wherein the power-on window time of the chip corresponds to the reset state of the chip.
In other optional embodiments, the second receiving module 40 is further configured to restart timing after receiving the first communication detection command sent by the burning device, where the timing is used to time a power-on window time of the chip.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and corresponding beneficial effects of the chip described above may refer to the corresponding process in the foregoing method example, and are not described herein again.
The embodiment of the invention provides a chip burning system, which comprises burning equipment and a chip welded on a system board: wherein the burning device is configured to perform the method according to any one of the first aspect; the chip is adapted to perform the method of any of the second aspects of the claims.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and corresponding beneficial effects of the chip burning system described above may refer to the corresponding process in the foregoing method example, and are not described herein again.
An example of the present invention provides a control device, fig. 10 is a schematic diagram of a hardware structure of the control device provided by the present invention, and it should be noted that the control device provided by the example of the present invention is arranged in a burning device, as shown in fig. 10, and includes:
at least one processor 1001 and memory 1002.
In a specific implementation process, the at least one processor 1001 executes the computer execution instructions stored in the memory 1002, so that the at least one processor 1001 executes the chip burning method, where the processor 1001 and the memory 1002 are connected through the bus 1003.
For a specific implementation process of the processor 1001, reference may be made to the above method embodiments, which have similar implementation principles and technical effects, and details of this embodiment are not described herein again.
The example of the present invention further provides another control device, the hardware structure of which is similar to that of fig. 10 and is disposed on a chip, and the implementation principle and technical effect of which are similar to those of the above method embodiment, and are not described herein again.
In the embodiment shown in fig. 10, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
In a fourth aspect, the present invention further provides a readable storage medium, which is disposed on the side of the burning device, and the readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the chip burning method is implemented.
The invention also provides another readable storage medium which is arranged on the chip and is stored with a computer execution instruction, and when a processor executes the computer execution instruction, the chip burning method is realized.
The readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. A chip burning method is applied to burning equipment and comprises the following steps:
sending a first communication detection command to a chip welded on a system board, wherein the first communication detection command is used for indicating the chip to feed back a response message;
receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with burning equipment;
and carrying out program burning processing on the chip.
2. The method of claim 1, wherein after the programming the chip, further comprising:
sending a second communication detection command to the chip, wherein the second communication detection command is used for indicating the chip to feed back a response message;
and if a second response message returned by the chip aiming at the second communication detection command is not received, determining that the chip is moved out of the burning equipment.
3. The method according to claim 1 or 2, wherein before sending the first communication detection command to the chip soldered on the system board, for the chip whose reset pin is not multiplexed, the method further comprises:
and outputting a low level to a reset pin of the chip so as to enable the chip to be in a reset state.
4. The method according to claim 1 or 2, wherein the sending the first communication detection command to the chip soldered on the system board for the chip whose reset pin is multiplexed comprises:
and sending a first communication detection command to the chip at the power-on window time of the chip, wherein the power-on window time of the chip corresponds to the chip being in a reset state.
5. The method of claim 4, further comprising:
if a first response message returned by the chip aiming at the first communication detection command is not received, judging the power supply mode of the chip;
if the power supply mode of the chip is judged to be the power supply mode of the burning equipment, the chip is controlled to carry out power-down and power-up processing, and the step of sending the first communication detection command to the chip welded on the system board is executed again;
and if the power supply mode of the chip is judged to be the power supply mode of the non-burning equipment, the step of sending the first communication detection command to the chip welded on the system board is executed again.
6. The method of claim 1,
if the step times of repeatedly executing the step of sending the first communication detection command to the chip welded on the system board and receiving the first response message returned by the chip aiming at the first communication detection command reach a first preset time, the chip is determined to be in a reset state and the chip is well contacted with the burning equipment.
7. The method of claim 2,
and if the step of sending the second communication detection command to the chip is repeatedly executed, and if the step times of not receiving a second response message returned by the chip aiming at the second communication detection command reaches a second preset time, determining that the chip is moved out of the burning equipment.
8. The method according to any one of claims 1, 2, 6, and 7, wherein for a chip powered by a non-burning device, the performing a program burning process on the chip includes:
controlling the chip to enter a programming mode, and carrying out program burning processing on the chip in the programming mode;
and controlling the chip subjected to program burning processing to exit the programming mode.
9. A chip burning method is applied to a chip, the chip is welded on a system board, and the method comprises the following steps:
receiving a first communication detection command sent by burning equipment, wherein the first communication detection command is used for indicating a chip to feed back a response message;
returning a first response message aiming at the first communication detection command to the burning equipment, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment;
and receiving the program burning processing of the burning equipment to the chip.
10. The method of claim 9, wherein the receiving the first communication detection command sent by the burning device for a chip with a reset pin multiplexed comprises:
and if the chip is in the power-on window time, receiving a first communication detection command sent by the burning equipment, wherein the power-on window time of the chip corresponds to the reset state of the chip.
11. The method of claim 10, wherein after receiving the first communication detection command sent by the burning device, the method further comprises:
and restarting timing, wherein the timing is used for timing the power-on window time of the chip.
12. A burning apparatus, comprising:
the system comprises a first sending module, a second sending module and a control module, wherein the first sending module is used for sending a first communication detection command to a chip welded on a system board, and the first communication detection command is used for indicating the chip to feed back a response message;
the first receiving module is used for receiving a first response message returned by the chip aiming at the first communication detection command, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment;
and the program burning module is used for carrying out program burning processing on the chip.
13. A chip, comprising:
the second receiving module is used for receiving a first communication detection command sent by the burning equipment, wherein the first communication detection command is used for indicating the chip to feed back a response message;
the second sending module is used for returning a first response message aiming at the first communication detection command to the burning equipment, wherein the first response message is used for representing that the chip is in a reset state and the chip is in good contact with the burning equipment;
and the program receiving module is used for receiving the program burning processing of the burning equipment.
14. A chip burning system is characterized by comprising burning equipment and a chip welded on a system board;
wherein the burning device is used for executing the method of any one of claims 1-8; the chip is adapted to perform the method of any of claims 9-11.
CN202011310498.3A 2020-11-20 2020-11-20 Chip burning method, burning equipment, chip and system Pending CN112416376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011310498.3A CN112416376A (en) 2020-11-20 2020-11-20 Chip burning method, burning equipment, chip and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011310498.3A CN112416376A (en) 2020-11-20 2020-11-20 Chip burning method, burning equipment, chip and system

Publications (1)

Publication Number Publication Date
CN112416376A true CN112416376A (en) 2021-02-26

Family

ID=74776975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011310498.3A Pending CN112416376A (en) 2020-11-20 2020-11-20 Chip burning method, burning equipment, chip and system

Country Status (1)

Country Link
CN (1) CN112416376A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238769A (en) * 2021-05-24 2021-08-10 珠海泰芯半导体有限公司 Offline mode on-board burning method and device, storage medium and burning expansion device
CN116594642A (en) * 2023-05-04 2023-08-15 安徽曦合微电子有限公司 Secure communication method, computing device and readable storage medium for burning process

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914308A (en) * 2012-12-31 2014-07-09 比亚迪股份有限公司 Method and system for upgrading chip online
CN105045626A (en) * 2015-07-21 2015-11-11 珠海格力电器股份有限公司 Program burning method, program burning equipment and controller
CN105573743A (en) * 2015-11-19 2016-05-11 深圳市芯海科技有限公司 Chip burning system and method and electronic equipment
CN106648803A (en) * 2016-12-30 2017-05-10 南京科远自动化集团股份有限公司 Online upgrading method for DSP chip
CN110045968A (en) * 2019-04-16 2019-07-23 广东欧谱曼迪科技有限公司 A kind of method of the STM32 across single-chip microcontroller burning program
CN110609690A (en) * 2019-08-30 2019-12-24 珠海泰芯半导体有限公司 Burning acceleration method of burner
US20200333754A1 (en) * 2019-04-17 2020-10-22 Dyna Image Corporation Light Sensor Device Controlled with Dual-Mode Master-and-Slave MCU Application

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914308A (en) * 2012-12-31 2014-07-09 比亚迪股份有限公司 Method and system for upgrading chip online
CN105045626A (en) * 2015-07-21 2015-11-11 珠海格力电器股份有限公司 Program burning method, program burning equipment and controller
CN105573743A (en) * 2015-11-19 2016-05-11 深圳市芯海科技有限公司 Chip burning system and method and electronic equipment
CN106648803A (en) * 2016-12-30 2017-05-10 南京科远自动化集团股份有限公司 Online upgrading method for DSP chip
CN110045968A (en) * 2019-04-16 2019-07-23 广东欧谱曼迪科技有限公司 A kind of method of the STM32 across single-chip microcontroller burning program
US20200333754A1 (en) * 2019-04-17 2020-10-22 Dyna Image Corporation Light Sensor Device Controlled with Dual-Mode Master-and-Slave MCU Application
CN110609690A (en) * 2019-08-30 2019-12-24 珠海泰芯半导体有限公司 Burning acceleration method of burner

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238769A (en) * 2021-05-24 2021-08-10 珠海泰芯半导体有限公司 Offline mode on-board burning method and device, storage medium and burning expansion device
CN116594642A (en) * 2023-05-04 2023-08-15 安徽曦合微电子有限公司 Secure communication method, computing device and readable storage medium for burning process
CN116594642B (en) * 2023-05-04 2024-01-30 安徽曦合微电子有限公司 Secure communication method, computing device and readable storage medium for burning process

Similar Documents

Publication Publication Date Title
CN105573743B (en) Chip burning system and method and electronic equipment
CN107885510B (en) Burning tool and burning method capable of simultaneously burning double DSPs
CN100432948C (en) Automatic replacement of corrupted BIOS image
CN100470474C (en) System and method for accessing vital data from memory
US7908469B2 (en) Method for executing power on self test on a computer system and updating SMBIOS information partially
CN102135927B (en) Method and device for system booting based on NAND FLASH
CN112416376A (en) Chip burning method, burning equipment, chip and system
US20100058314A1 (en) Computer System and Related Method of Logging BIOS Update Operation
US20140163716A1 (en) Bridge device, automated production system and method thereof for storage device
US20060224874A1 (en) Method for updating system management basic input output system (SMBIOS) data
CN105760191A (en) Embedded system equipment programming mass production method
CN110955387A (en) Method for adaptively identifying type of flash memory and computer readable storage medium and device
CN104317685A (en) Starting method of calculator system
CN109933374B (en) Computer starting method
US20060206764A1 (en) Memory reliability detection system and method
US7788454B2 (en) Controller including electrically rewritable nonvolatile memory
TWI387973B (en) Data storage apparatus, data storage controller, and related automated testing method
CN1180346C (en) Autoamtic safe reset method of BIOS storage in computer system
JP3376306B2 (en) Data processing apparatus and data processing method
US7610456B2 (en) Automatically detecting types of external data flash devices
CN100462926C (en) Processor system and method using multi memory of start-up procedure
US9619355B2 (en) Booting verification method of computer and electronic device
CN113590153B (en) Firmware upgrading method, system, equipment and medium of CPLD
CN1323361C (en) Processor system and method using multi memory of start-up procedure
CN113126946B (en) Display system and automatic panel parameter adjusting method

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