Data burning method for burning equipment, burning equipment and storage medium

By using operation files and data to be burned into the second memory in the automotive-grade chip, and allowing the target chip to perform the burning operation on its own, the problem of low burning efficiency in the prior art is solved, and a more efficient data burning process is achieved.

CN119847540APending Publication Date: 2025-04-18BYD SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410376817.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, during the program burning process of automotive-grade chips, the write operation requires multiple accesses to the chip core, resulting in low burning efficiency and affecting production efficiency.

Method used

By obtaining the operation file and data to be burned according to the burning rules of the target chip, it is written to the second memory of the target chip, and the target chip is controlled to perform the burning operation based on the operating file, so that the target chip can burn the data to be burned into the first memory by itself.

Benefits of technology

During the burning process, there is no need to write data verbatim or read burned data, which improves the data burning speed and efficiency, shortens the burning time, and improves the mass production efficiency of the controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847540A_ABST
    Figure CN119847540A_ABST
Patent Text Reader

Abstract

The invention provides a data burning method for burning equipment, the burning equipment and a storage medium. The method comprises the following steps: acquiring an operation file corresponding to a burning rule of a first memory of a target chip and to-be-burnt data corresponding to the target chip; writing the operation file and the data to be burnt into a second memory of the target chip; controlling the target chip to execute a burning operation based on the operation file; wherein the burning operation comprises the step of burning the to-be-burnt data stored in the second memory into the first memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the technical field of data burning, and more specifically, to a data burning method for a burning device, a burning device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the automotive industry, more and more vehicle products use embedded systems to realize their intelligent functions. Among them, automotive-grade chips serve as control units in embedded systems, and most applications are stored on the chip's flash memory. Currently, in the mass production process of automotive-grade chips, applications need to be written into the chip's flash memory by burning through a burning device.

[0003] In the prior art, when a burning device writes an application to the flash memory corresponding to the chip, the burning device needs to directly write the application code word by word, and each written data requires the burning device to initiate a write operation access to the burned chip. During the above program burning process, the write operation needs to initiate multiple accesses to the chip core. As the capacity of the written program increases, the total time required for write access to the microcontroller core will also continue to increase, resulting in low burning efficiency, affecting the production efficiency of automotive-grade embedded system products. Summary of the invention

[0004] One purpose of the embodiments of the present disclosure is to provide a new technical solution for burning data.

[0005] According to a first aspect of an embodiment of the present disclosure, a data burning method for a burning device is provided, comprising:

[0006] Acquire an operation file corresponding to a programming rule of a first memory of a target chip and data to be programmed corresponding to the target chip;

[0007] Writing the operation file and the data to be burned into the second memory of the target chip; controlling the target chip to perform a burning operation based on the operation file; wherein the burning operation includes: burning the data to be burned stored in the second memory into the first memory.

[0008] Optionally, the programming operation further includes: verifying the programmed data in the first memory based on the data to be programmed stored in the second memory, and ending the programming operation when the verification fails.

[0009] Optionally, the verifying the programmed data in the first memory based on the data to be programmed stored in the second memory includes:

[0010] For the data to be burned in the second memory, each time the burning of the set length data is completed, the burned data corresponding to the currently burned set length data in the first memory is compared with the currently burned set length data in the second memory. If they are inconsistent, it is determined that the verification has failed.

[0011] Optionally, the set length is smaller than the sector length of the first memory.

[0012] Optionally, the method further includes:

[0013] According to the sector length of the first memory, the data to be programmed is divided into N data blocks, and data block numbers representing the arrangement order of the data blocks in the data to be programmed are obtained; N is a positive integer.

[0014] Optionally, controlling the target chip to perform a programming operation based on the operation file includes:

[0015] Traverse the N data blocks according to the data block numbers, and obtain the burning information of the currently traversed data block;

[0016] Controlling the target chip to perform a burning operation on the currently traversed data block based on the operation file and the burning information;

[0017] When it is detected that the target chip has successfully programmed the currently traversed data block into the first memory, it is determined whether the currently traversed data block is the last data block of the data to be programmed.

[0018] Optionally, the method further includes:

[0019] If the currently traversed data block is not the last data block, continue to perform the step of traversing the N data blocks according to the data block numbers to obtain the burning information of the currently traversed data block;

[0020] When the currently traversed data block is the last data block, the traversal is ended.

[0021] Optionally, the operation file includes a burning operation program corresponding to the burning operation, and the controlling the target chip to perform the burning operation on the currently traversed data block based on the operation file and the burning information includes:

[0022] Writing a first starting address of the burning operation program in the second memory into a program counter of the target chip;

[0023] The burning information is written into the general register of the target chip; wherein the burning information includes the address to be burned of the first memory corresponding to the data block currently traversed, the effective length of the data block currently traversed, and the storage address of the data block currently traversed in the second memory.

[0024] Optionally, the method further includes:

[0025] A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform a burning operation on the currently traversed data block based on the written first starting address and the burning information, so as to burn the currently traversed data block into the first memory according to the burning information.

[0026] Optionally, writing the data to be burned into a second memory of the target chip includes:

[0027] Writing part of the data blocks into the second memory of the target chip according to the data block numbers; wherein the storage space required by the part of the data blocks is less than or equal to the storage space of the second memory;

[0028] When it is detected that all the data blocks currently being written have been successfully burned into the first memory, it is determined whether there are data blocks that have not been written into the second memory.

[0029] Optionally, the method further includes:

[0030] If there are data blocks that have not been written into the second memory, the step of writing some data blocks into the second memory of the target chip according to the data block numbers is continued until the writing of the data to be burned is completed.

[0031] Optionally, before controlling the target chip to perform a programming operation based on the operation file, the method further includes:

[0032] The target chip is controlled to perform an initialization operation of the first memory based on the operation file to unlock the first memory.

[0033] Optionally, the operation file includes an initialization operation program corresponding to the initialization operation, and the controlling the target chip to perform the initialization operation of the first memory based on the operation file to unlock the first memory includes:

[0034] A second starting address of the initialization operation program in the second memory is written into the program counter of the target chip.

[0035] Optionally, the method further includes:

[0036] A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform the initialization operation based on the written second starting address to unlock the first memory.

[0037] Optionally, the method further includes:

[0038] The target chip is controlled to perform a logout operation based on the operation file to lock the first memory.

[0039] Optionally, the operation file further includes a logout operation program corresponding to the logout operation, and the controlling the target chip to perform the logout operation based on the operation file to lock the first memory includes:

[0040] The third starting address of the deregistration operation program in the second memory is written into the program counter of the target chip.

[0041] Optionally, the method further includes:

[0042] A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform the deregistration operation based on the written third starting address to lock the first memory.

[0043] Optionally, the method further includes:

[0044] When it is detected that the target chip verification fails, a failure alarm is issued.

[0045] Optionally, the operation file includes a plurality of operation programs corresponding to different functional operations, and the method further includes:

[0046] A breakpoint instruction is written into the second memory, wherein the breakpoint instruction is used to control the target chip to trigger an interrupt when any operation program in the operation file is executed.

[0047] According to a second aspect of the present disclosure, a burning device is provided, including a processor and a memory, wherein the memory is used to store a computer program, and the computer program is used to control the processor to execute the method described in the first aspect of the present disclosure.

[0048] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect of the present disclosure is implemented.

[0049] Through this embodiment, the burning device writes the operation file and the data to be burned into the target chip, and then controls the target chip to perform the burning operation based on the execution operation file, so that the target chip automatically burns the data to be burned in the second memory into the first memory. During the burning process, there is no need to initiate access to the kernel of the target chip when writing the data to be burned to the target chip word by word, and there is no need to read the burned data word by word to perform data verification, and the data burning process does not require the participation of the host computer. Therefore, the data burning speed and efficiency can be improved, the time consumed for burning data can be shortened, and the mass production efficiency of the controller can be improved.

[0050] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0052] Figure 1 is a structural schematic diagram of a burning system according to an embodiment of the present disclosure;

[0053] Figure 2 is a flow chart of a data burning method for a burning device according to an embodiment of the present disclosure;

[0054] Figure 3 is a flow chart of an example of a data burning method for a burning device according to an embodiment of the present disclosure;

[0055] Figure 4 is a block diagram of a burning device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0056] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0057] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0058] Technologies, methods and equipment known to persons of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods and equipment should be considered part of the specification.

[0059] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0060] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0061] <Method>

[0062] Figure 1 FIG. 1 is a schematic diagram of the structure of a burning system according to an embodiment of the present disclosure. Figure 1 As shown, the programming system 1000 may include a programming device 1100 and a target chip 1200 to be programmed.

[0063] The target chip 1200 may include a first memory 1210 and a second memory 1220. The first memory 1210 is a read-only memory (ROM), and the second memory 1220 is a random access memory (RAM).

[0064] In one example, the first memory 1210 is a flash memory, and the second memory 1220 is a static random access memory (SRAM).

[0065] The programming device 1100 may include at least a processor 1110 , a third memory 1120 , and an interface module 1130 . The programming device 1100 may be connected to a target chip 1200 via the interface module 1130 to program data on the target chip 1200 .

[0066] The third memory 1120 may store an operation file corresponding to the programming rule of the first memory 1210 of the target chip 1200 , and may also store data to be programmed corresponding to the target chip 1200 .

[0067] Furthermore, the operation file may be generated by the burning device 1100 according to the burning rule of the first memory 1210 of the target chip 1200 , or may be transmitted to the burning device 1100 by a host computer connected to the burning device 1100 .

[0068] Furthermore, the data to be burned can be transmitted to the burning device 1100 by a host computer connected to the burning device 1100 .

[0069] like Figure 1As shown, the burning device 1100 may further include a power supply 1140 , a display module 1150 , a button module 1160 , and an alarm module 1170 .

[0070] The power supply 1140 may be used to supply power to the processor 1110 .

[0071] The display module 1150 may be an LCD display screen or an LED display screen, and is used to display the data burning progress of the target chip 1200 .

[0072] The button module 1160 may include at least one button, specifically, may include: a switch button for turning on and off the burning device 1100, a download button for downloading data to be burned, a start button for starting a burning process, etc.

[0073] The alarm module 1170 may include a buzzer and / or an LED indicator light. The alarm module 1170 may be used to issue an alarm when the target chip 1200 fails to program data.

[0074] The present disclosure provides a data burning method for a burning device. The method can be implemented by a burning device. In one example, the burning device can be Figure 1 The burning device 1100 is shown.

[0075] Figure 2 The figure is a flow chart of a data burning method for a burning device according to an embodiment of the present disclosure.

[0076] like Figure 2 As shown, the data burning method for burning equipment may include steps S2100 to S2300 as shown below:

[0077] Step S2100, obtaining an operation file corresponding to a programming rule of a first memory of a target chip and data to be programmed corresponding to the target chip.

[0078] The operation file includes a plurality of operation programs corresponding to different functional operations. Specifically, the operation file may include at least one of the following: a burning operation program corresponding to a burning operation, an initialization operation program corresponding to an initialization operation, a deregistration operation program corresponding to a deregistration operation, an overall erasing operation program corresponding to erasing the overall data in the first memory, and a sector erasing operation program corresponding to erasing a sector of data in the first memory.

[0079] The target chip of this embodiment may be a microcontroller unit (MCU).

[0080] In this embodiment, the first memory is a read-only memory (ROM), for example, the first memory may be a flash memory.

[0081] In one embodiment, the operation file corresponding to the burning rule of the first memory of the target chip and the data to be burned corresponding to the target chip may be stored in the third memory of the burning device. When executing step S2100 of the method of this embodiment, the operation file corresponding to the burning rule of the first memory of the target chip and the data to be burned corresponding to the target chip can be directly obtained from the third memory according to the model of the target chip.

[0082] In another embodiment, when executing step S2100 of the method of this embodiment, an operation file corresponding to the burning rule of the first memory of the target chip and data to be burned corresponding to the target chip may be obtained from a host computer connected to the burning device according to the model of the target chip.

[0083] Step S2200, writing the operation file and the data to be burned into the second memory of the target chip.

[0084] The second memory is a random access memory (RAM), for example, a static random access memory (SRAM).

[0085] In one embodiment of the present disclosure, the data length of the data to be programmed may be less than or equal to the sector length of the first memory, so the operation file and the data to be programmed may be all written into the second memory of the target chip.

[0086] In another embodiment of the present disclosure, before writing the operation file and the data to be burned into the second memory of the target chip, the method may further include: splitting the data to be burned into N data blocks according to the sector length of the first memory, and obtaining a data block number representing the arrangement order of each data block in the data to be burned.

[0087] Specifically, the data block numbers may be continuous positive integers. The smaller the data block number, the earlier the corresponding data block is arranged in the data to be burned.

[0088] In this embodiment, the sector length may be determined by the model of the first memory of the target chip. The sector length may be pre-stored in the burning device, or may be input into the burning device by a user during the execution of the method of this embodiment.

[0089] On this basis, the data to be burned is written into the second memory of the target chip, including: writing some data blocks into the second memory of the target chip according to the data block number; wherein the storage space required by some data blocks is less than or equal to the storage space of the second memory; when it is detected that some data blocks currently written have been successfully burned into the first memory, determining whether there are data blocks that have not been written into the second memory; if so, continuing to execute the step of writing some data blocks into the second memory according to the data block number until the writing of all the data to be burned is completed.

[0090] In this embodiment, each partial data block written into the second memory is different, and each partial data block written may replace the partial data block in the second memory that has been successfully burned into the first memory, without modifying the operation file in the second memory.

[0091] Step S2300, controlling the target chip to perform a programming operation based on the operation file; wherein the programming operation includes: programming the program to be programmed stored in the second memory into the first memory.

[0092] In this embodiment, the burning device writes the operation file and the data to be burned into the target chip, and then controls the target chip to perform the burning operation based on the operation file, so that the target chip burns the data to be burned in the second memory into the first memory by itself. During the burning process, there is no need to access the kernel of the target chip when writing the data to be burned word by word into the target chip, and there is no need to read the burned data word by word for data verification, and the data burning process does not require the participation of the host computer. Therefore, the data burning speed and efficiency can be improved, the time consumed for burning data can be shortened, and the mass production efficiency of the controller can be improved.

[0093] In one embodiment of the present disclosure, the programming operation further includes: verifying the programmed data in the first memory based on the data to be programmed stored in the second memory, and ending the programming operation if the verification fails.

[0094] In one embodiment of the present disclosure, based on the data to be burned stored in the second memory, the burned data in the first memory is verified, including: for the data to be burned in the second memory, each time the burning of the set length data is completed, the burned data corresponding to the set length currently burned in the first memory is compared with the set length data currently burned in the second memory, if they are inconsistent, the verification fails.

[0095] The set length in this embodiment may be set in advance according to an application scenario or specific requirements. In one embodiment, the set length is smaller than the sector length of the first memory.

[0096] In a specific example, the set length may be one word (1 word, 32 bits).

[0097] Specifically, each time the target chip completes burning of one word (1 word, 32 bits) of data, it reads back the burned data of the set length currently burned in the first memory, and compares it with the data of the set length currently burned stored in the second memory. When the two are inconsistent, it means that the verification has failed, and the burning operation is terminated; when the two are consistent, it means that the verification is successful, and the burning operation continues.

[0098] Through this embodiment, the target chip verifies the burned data in the first memory based on the data to be burned stored in the second memory, without the need for the burning device to read the burned data from the first memory for verification, which can improve the data burning speed and efficiency, shorten the time consumed for burning data, and improve the mass production efficiency of the controller.

[0099] In one embodiment of the present disclosure, controlling the target chip to perform a programming operation based on an operation file includes steps S2310 to S2350 as shown below:

[0100] Step S2310, traverse N data blocks according to the data block numbers, and obtain the burning information of the currently traversed data block.

[0101] In this embodiment, the N data blocks may be traversed in the order of data block numbers from small to large.

[0102] In one embodiment of the present disclosure, before traversing the N data blocks according to the data block numbers, the method may further include: controlling the target chip to perform an initialization operation based on the operation file to unlock the first memory.

[0103] In this embodiment, data cannot be burned into the first memory without unlocking the first memory, so the first memory may be unlocked first and then the data may be burned into the first memory.

[0104] In one embodiment, controlling the target chip to perform an initialization operation based on the operation file to unlock the first memory includes: writing a second starting address of the initialization operation program in the second memory into a program counter of the target chip.

[0105] When the burning device initiates a write operation access to the register group of the target chip, the special register group of the target chip needs to be configured as the initial value. Specifically, the burning device controls the target chip to perform initialization operations based on the operation file, including: writing the second starting address of the initialization operation program to the program counter; writing the initial value to the stack pointer register, setting the stack at the unused address of the second memory of the target chip and leaving a margin for stack increase and decrease; writing 0x1000000 to the program status register, and setting the Thumb status bit to 1, indicating that the target chip can respond to the Thumb32 instruction set normally.

[0106] On this basis, the burning device further accesses the target chip and writes the key into the shutdown control and status register (DHCSR) of the target chip, so that the write operation of the target chip to the program counter takes effect. The target chip then jumps to the second starting address stored in the program counter and starts execution, that is, executes the initialization operation program.

[0107] For example, the programming device can write 0xA05F0001 into the shutdown and status register, and after writing, the shutdown and status register is read as 0x1000001, which indicates that the target chip has started running.

[0108] In another embodiment, the target chip is controlled to perform an initialization operation based on an operation file to unlock the first memory, including: writing the second starting address of the initialization operation program in the second memory into the program counter of the target chip; writing a secret key into the shutdown control and status register of the target chip, triggering the target chip to perform an initialization operation based on the written second starting address to unlock the first memory.

[0109] In yet another embodiment, controlling the target chip to perform an initialization operation based on an operation file to unlock the first memory includes: sending a first instruction to the target chip so that the target chip performs an initialization operation based on the operation file in response to the first instruction to unlock the first memory.

[0110] In an embodiment of the present disclosure, the burning device may execute steps S2310 to S2350 of this embodiment when detecting that the initialization operation is completed.

[0111] On this basis, when executing step S2200, a breakpoint instruction may also be written into the second memory of the target chip. The breakpoint instruction is used to control the target chip to trigger an interrupt when any operation program in the operation file is executed.

[0112] In some embodiments, a 4-byte 0x00BEXXXX breakpoint instruction may be written at the first address 0x20000000 of the second memory, where "XXXX" is invalid data, which is used to keep the code word-aligned. The operation file and the data to be burned are continued to be written to the second memory at the next address 0x20000004 of the breakpoint instruction.

[0113] The burning device controls the target chip to perform the initialization operation based on the operation file and further includes: writing the address of the second memory interruption point instruction into the link register.

[0114] Then, when the initialization operation program is completed, the link register jumps to the breakpoint instruction to trigger a software interrupt, so that the core of the target chip is stopped, and the stop control and status registers are written with a value indicating that the target chip has stopped running. The burning device determines whether the initialization operation program of the target chip has been completed by reading the stop control and status registers, and continues to execute subsequent processes when it is determined that the initialization operation program has been completed.

[0115] Step S2320, controlling the target chip to perform a programming operation on the currently traversed data block based on the operation file and the programming information.

[0116] In this embodiment, the data block currently traversed may be written into the second memory in advance through the above-mentioned embodiment.

[0117] In one embodiment of the present disclosure, controlling the target chip to perform a burning operation on the currently traversed data block based on the operation file and the burning information may include: writing the first starting address of the burning operation program in the second memory into the program counter of the target chip; writing the burning information into the general register of the target chip; the burning information includes the address to be burned in the first memory corresponding to the currently traversed data block, the effective length of the currently traversed data block, and the storage address of the currently traversed data block in the second memory.

[0118] Specifically, the target chip may write the burning information into the general register after writing the first starting address of the burning operation program into the program counter. For example, the address to be burned corresponding to the data block currently traversed in the first memory, the effective length of the data block currently traversed, and the storage address of the data block currently traversed in the second memory may be written into register 0, register 1, and register 2 respectively.

[0119] Furthermore, the burning device may also rewrite the address of the second memory interruption point instruction into the link register to avoid the operation program calling and changing the value of the original link register during the operation program running.

[0120] After the target chip finishes programming a word (1 word, 32 bits) of data, it reads back the data programmed in the address to be programmed and compares it with the corresponding data stored in the second memory. If the two are inconsistent, an error flag is written to register 0 and the programming process is exited. If the two are consistent, a correct flag is written to register 0 and the programming of the next word is continued until all data within the effective length of this operation are programmed. For example, the error flag can be 1 and the correct flag can be 0.

[0121] In another embodiment of the present disclosure, controlling the target chip to perform a burning operation on the currently traversed data block based on the operation file and the burning information may include: writing the first starting address of the burning operation program in the second memory into the program counter of the target chip; writing the burning information into the general register of the target chip; the burning information includes the address to be burned in the first memory corresponding to the currently traversed data block, the effective length of the currently traversed data block, and the storage address of the currently traversed data block in the second memory; writing a secret key into the shutdown control and status register of the target chip to trigger the target chip to perform a burning operation on the currently traversed data block based on the written first starting address and the burning information, so as to burn the currently traversed data block into the first memory according to the burning information.

[0122] In another embodiment of the present disclosure, controlling the target chip to perform a burning operation on the currently traversed data block based on the operation file and the burning information may include: sending a second instruction to the target chip, the second instruction carrying the burning information of the currently traversed data block; the target chip performs the burning operation on the currently traversed data block based on the operation file and the burning information in response to the second instruction.

[0123] Step S2330, when it is detected that the target chip has successfully programmed the currently traversed data block into the first memory, it is determined whether the currently traversed data block is the last data block of the data to be programmed.

[0124] The burning device can determine whether the burning operation program of the target chip has been executed by reading the shutdown control and status registers, and when the burning operation program of the target chip has been executed, read the working register 0 to verify the burning result returned by the target chip.

[0125] Specifically, when the working register 0 is a correct flag, it is determined that the target chip has burned the currently traversed data block into the first memory; when the working register 0 is an error flag, it is determined that the currently traversed data block has failed to be burned.

[0126] When it is detected that the target chip burns the currently traversed data block into the first memory, it may be determined whether the currently traversed data block is the last data block of the data to be burned, and subsequent steps are performed according to the result.

[0127] When it is detected that the currently traversed data block fails to be burned, a failure alarm can be issued. Specifically, the error message can be displayed through the display module of the burning device, or the failure alarm can be issued by controlling the buzzer to sound and / or the LED prompt light to light up, so that the target chip can be immediately troubleshooted when data burning abnormalities occur in mass production.

[0128] Through this embodiment, the target chip compares the written and read-back data to verify whether the data is burned correctly, and writes the result into register 0. The target chip then reads the working register 0 and verifies the burning result returned by the target chip. This can improve the data burning speed and efficiency, shorten the time consumed for burning data, and improve the mass production efficiency of the controller.

[0129] Step S2340: When the currently traversed data block is not the last data block, continue to execute step S2310, traverse the N data blocks according to the data block numbers, and obtain the burning information of the currently traversed data block.

[0130] Step S2350, when the currently traversed data block is the last data block, the traversal ends.

[0131] In this embodiment, the traversal may be terminated when the target chip has burned the last data block into the first memory. At this time, all the data to be burned has been burned into the first memory.

[0132] In one embodiment of the present disclosure, after executing step S2350, the method further includes: controlling the target chip to perform a logout operation based on the operation file to lock the first memory.

[0133] In one embodiment of the present disclosure, controlling the target chip to perform a deregistration operation based on an operation file to lock the first memory includes: writing a deregistration operation program at a third starting address in the second memory into a program counter of the target chip.

[0134] In another embodiment of the present disclosure, the target chip is controlled to perform a deregistration operation based on an operation file to lock the first memory, including: writing a deregistration operation program at a third starting address in the second memory into a program counter of the target chip; writing a secret key into a shutdown control and status register of the target chip to trigger the target chip to perform a deregistration operation based on the written third starting address to lock the first memory.

[0135] In another embodiment of the present disclosure, controlling the target chip to perform a logout operation based on an operation file to lock the first memory includes: sending a third instruction to the target chip, and the target chip performs a logout operation based on the operation file in response to the third instruction to lock the first memory.

[0136] In this embodiment, when the first memory is locked, a write operation cannot be performed on the first memory, thereby preventing the data burned in the first memory from being tampered with.

[0137] <Example>

[0138] Figure 3 The flowchart is an example of a method for burning data in a burning device according to an embodiment of the present disclosure.

[0139] like Figure 3 As shown, the method may include the following steps:

[0140] Step S3001, obtaining an operation file corresponding to a programming rule of a first memory of a target chip and data to be programmed corresponding to the target chip.

[0141] Step S3002, writing the operation file and the breakpoint instruction into the second memory.

[0142] Step S3003: split the data to be programmed into N data blocks according to the sector length of the first memory, and obtain a data block number indicating the arrangement order of each data block in the data to be programmed.

[0143] Step S3004: write the N data blocks into the second memory in sequence according to the data block numbers.

[0144] Specifically, part of the data blocks may be written into the second memory of the target chip according to the data block numbers; when it is detected that part of the data blocks currently written have been successfully burned into the first memory, it is determined whether there are data blocks that have not been written into the second memory; if so, the step of writing part of the data blocks into the second memory according to the data block numbers is continued until the writing of the data to be burned is completed.

[0145] Step S3005, write the second starting address of the initialization operation program in the second memory into the program counter of the target chip, and write the address of the interruption point instruction in the second memory into the link register of the target chip.

[0146] Step S3006, writing a secret key into the shutdown control and status register of the target chip, triggering the target chip to perform an initialization operation based on the written second start address to unlock the first memory.

[0147] Step S3007, determining whether the initialization operation program is completed by reading the shutdown control and status register.

[0148] Step S3008, traverse N data blocks according to the data block numbers, and obtain the burning information of the currently traversed data block.

[0149] Step S3009, write the first starting address of the burning operation program in the second memory into the program counter of the target chip, write the burning information into the general register of the target chip; write the address of the interruption point instruction in the second memory into the link register of the target chip.

[0150] Step S3010, write a secret key into the shutdown control and status register of the target chip, trigger the target chip to perform a burning operation on the currently traversed data block based on the written first starting address and burning information, so as to burn the currently traversed data block into the first memory according to the burning information.

[0151] Step S3011, determining whether the programming operation is completed by reading the shutdown control and status register.

[0152] Step S3012, verifying the programming result returned by the target chip.

[0153] Step S3013: in case of programming failure, a failure alarm is issued.

[0154] Step S3014, when the burning is successful, determine whether the currently traversed data block is the last data block of the data to be burned, if yes, continue to step S3015; if not, execute step S3008.

[0155] Step S3015, end the traversal.

[0156] Step S3016, write the third starting address of the deregistration operation program in the second memory into the program counter of the target chip.

[0157] Step S3017, writing a secret key into the shutdown control and status register of the target chip, triggering the target chip to perform a deregistration operation based on the written third starting address to lock the first memory.

[0158] <Burn Equipment>

[0159] The present disclosure also provides a burning device, such as Figure 4 As shown, the burning device 4000 may include a processor 4100 and a memory 4200, wherein the memory 4200 is used to store a computer program, and the computer program is used to control the processor 4100 to execute the method described in any embodiment of the present disclosure.

[0160] <Computer Readable Storage Medium>

[0161] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0162] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0163] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0164] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0165] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0166] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0167] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0168] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0169] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0170] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A data burning method for a burning device, characterized in that: include: Acquire an operation file corresponding to a programming rule of a first memory of a target chip and data to be programmed corresponding to the target chip; Writing the operation file and the data to be burned into the second memory of the target chip; The target chip is controlled to perform a programming operation based on the operation file; wherein the programming operation includes: programming the data to be programmed stored in the second memory into the first memory.

2. The method according to claim 1, characterized in that: The programming operation further includes: verifying the programmed data in the first memory based on the data to be programmed stored in the second memory, and ending the programming operation when the verification fails.

3. The method according to claim 2, characterized in that The verifying the programmed data in the first memory based on the data to be programmed stored in the second memory includes: For the data to be burned in the second memory, each time the burning of the set length data is completed, the burned data corresponding to the currently burned set length data in the first memory is compared with the currently burned set length data in the second memory. If they are inconsistent, it is determined that the verification has failed.

4. The method according to claim 3, characterized in that The set length is smaller than the sector length of the first memory.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: According to the sector length of the first memory, the data to be programmed is divided into N data blocks, and data block numbers representing the arrangement order of the data blocks in the data to be programmed are obtained; N is a positive integer.

6. The method according to claim 5, characterized in that The controlling the target chip to perform a programming operation based on the operation file includes: Traverse the N data blocks according to the data block numbers, and obtain the burning information of the currently traversed data block; Controlling the target chip to perform a burning operation on the currently traversed data block based on the operation file and the burning information; When it is detected that the target chip has successfully programmed the currently traversed data block into the first memory, it is determined whether the currently traversed data block is the last data block of the data to be programmed.

7. The method according to claim 6, characterized in that The method further comprises: If the currently traversed data block is not the last data block, continue to perform the step of traversing the N data blocks according to the data block numbers to obtain the burning information of the currently traversed data block; When the currently traversed data block is the last data block, the traversal is ended.

8. The method according to claim 6, characterized in that The operation file includes a burning operation program corresponding to the burning operation, and the controlling the target chip to perform the burning operation on the currently traversed data block based on the operation file and the burning information includes: Writing a first starting address of the burning operation program in the second memory into a program counter of the target chip; The burning information is written into the general register of the target chip; wherein the burning information includes the address to be burned of the first memory corresponding to the data block currently traversed, the effective length of the data block currently traversed, and the storage address of the data block currently traversed in the second memory.

9. The method according to claim 8, characterized in that The method further comprises: A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform a burning operation on the currently traversed data block based on the written first starting address and the burning information, so as to burn the currently traversed data block into the first memory according to the burning information.

10. The method according to claim 5, characterized in that Writing the data to be burned into the second memory of the target chip includes: Writing part of the data blocks into the second memory of the target chip according to the data block numbers; wherein the storage space required by the part of the data blocks is less than or equal to the storage space of the second memory; When it is detected that all the data blocks currently being written have been successfully burned into the first memory, it is determined whether there are data blocks that have not been written into the second memory.

11. The method according to claim 10, characterized in that The method further comprises: If there are data blocks that have not been written into the second memory, the step of writing some data blocks into the second memory of the target chip according to the data block numbers is continued until the writing of the data to be burned is completed.

12. The method according to claim 1, characterized in that Before controlling the target chip to perform a programming operation based on the operation file, the method further includes: The target chip is controlled to perform an initialization operation of the first memory based on the operation file to unlock the first memory.

13. The method according to claim 12, characterized in that The operation file includes an initialization operation program corresponding to the initialization operation, and the controlling the target chip to perform the initialization operation of the first memory based on the operation file to unlock the first memory includes: A second starting address of the initialization operation program in the second memory is written into the program counter of the target chip.

14. The method according to claim 13, characterized in that The method further comprises: A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform the initialization operation based on the written second starting address to unlock the first memory.

15. The method according to claim 1, characterized in that The method further comprises: The target chip is controlled to perform a logout operation based on the operation file to lock the first memory.

16. The method according to claim 15, characterized in that The operation file also includes a logout operation program corresponding to the logout operation, and the controlling the target chip to perform the logout operation based on the operation file to lock the first memory includes: The third starting address of the deregistration operation program in the second memory is written into the program counter of the target chip.

17. The method according to claim 16, characterized in that The method further comprises: A secret key is written into the shutdown control and status register of the target chip, triggering the target chip to perform the deregistration operation based on the written third starting address to lock the first memory.

18. The method according to claim 2, characterized in that The method further comprises: When it is detected that the target chip verification fails, a failure alarm is issued.

19. The method according to claim 1, characterized in that The operation file includes a plurality of operation programs corresponding to different functional operations, and the method further includes: A breakpoint instruction is written into the second memory, wherein the breakpoint instruction is used to control the target chip to trigger an interrupt when any operation program in the operation file is executed.

20. A burning device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, and the computer program is used to control the processor to execute the method according to any one of claims 1 to 19.

21. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which implements the method according to any one of claims 1 to 19 when executed by a processor.