Chip offline burning method, system, equipment and medium
By introducing a chip offline burning method in the burning technology, a burning control channel is built and the parallel processing of multiple Flash memories is realized, which solves the problems of low burning efficiency, long production cycle and unmet user needs in the existing technology, and an efficient and compatible burning process is achieved.
Patent Information
- Application Number
- CN202411946500.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-06
AI Technical Summary
There are several shortcomings in the existing burning technology, including only one Flash memory can be burned at a time, which cannot meet the needs of users' customized storage locations, and the lack of effective offline burning solutions, resulting in extended production cycles, increased risk of errors and inefficient user operations.
A chip offline recording method is provided. By receiving offline recording files sent by the upper computer, a burn control channel between the burner and the Flash memory is constructed, and the burning task group is burned through the channel to the Flash memory in the chip to be burned, realizing parallel processing of multiple Flash memories.
It significantly improves the burning efficiency, shortens the production cycle, reduces production costs, and enhances the scalability and compatibility of the burning function, adapting to different types and specifications of chips and burning data.
Smart Images

Figure CN119938072A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to but are not limited to the field of chip burning technology, and in particular to a chip offline burning method, system, device and medium. Background Art
[0002] In the current electronic equipment manufacturing industry, the burner is a key device for writing program code or data into the Flash memory. However, the existing burning technology has obvious deficiencies in many aspects, as shown below: First, most burners on the market can only burn one Flash memory at a time. Since each Flash needs to be burned separately, this not only greatly prolongs the production cycle, but also increases the complexity of manual operation, thereby increasing the risk of error. Second, the existing burners cannot meet specific needs such as user-defined storage locations. This limitation not only limits the application scope of the burner, but also increases the difficulty of subsequent use and maintenance for users. Third, for external Flash memories, the existing burning technology often does not provide an effective offline burning solution. This means that users need to burn each external Flash separately, which is inefficient. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiment of the present application provides a chip offline burning method, which effectively enhances the scalability and compatibility of the burning function, and can also realize parallel processing of multiple Flash memories of the chip to be burned, thereby significantly improving the burning efficiency, and further can greatly shorten the production cycle and reduce production costs.
[0005] In a first aspect, an embodiment of the present application provides a chip offline burning method, comprising: receiving an offline burning file sent by a host computer, the offline burning file comprising a burning instruction and a burning data packet, the burning data packet comprising at least one burning task group; according to the burning task group, constructing a burning control channel between a burner and a Flash memory; according to the burning instruction, burning the burning task group in the burning data packet to the corresponding Flash memory in the chip to be burned through the corresponding burning control channel.
[0006] In combination with the first aspect, in an embodiment of the present application, the burning task group includes at least one burning task, and the types of the burning tasks include downloading algorithm, user program, sequence value, identifier encryption, fixed data and random data.
[0007] In combination with the first aspect, in an embodiment of the present application, constructing a burning control channel between a burner and a Flash memory according to the burning task group includes: selecting a first target burning task of a download algorithm type from the burning tasks; selecting a target Flash memory from the Flash memory according to the first target burning task; and constructing a burning channel between the target Flash memory and the burner.
[0008] In combination with the first aspect, in an embodiment of the present application, the step of burning the burning task group in the burning data packet to a corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the burning instruction includes: determining a Flash memory corresponding to the burning task group in the burning data packet and a burning control channel; and burning the burning task group to the corresponding Flash memory through the burning control channel according to the burning mode indicated by the burning instruction.
[0009] In combination with the first aspect, in an embodiment of the present application, determining the Flash memory corresponding to the burning task group in the burning data packet and the burning control channel includes: obtaining the burning task of the burning task group from the burning data packet; searching and determining the corresponding Flash memory in the chip to be burned according to the burning task; and determining the burning control channel according to the determined Flash memory.
[0010] In combination with the first aspect, in an embodiment of the present application, the step of burning the burning task group in the burning data packet to a corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the burning instruction also includes: analyzing the burning instruction to obtain a burning number and a decreasing time point; and burning the burning task group to a corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the burning number and the decreasing time point.
[0011] In a second aspect, an embodiment of the present application provides a chip offline burning system, comprising a burner and a chip to be burned, the burner and the chip to be burned are connected, the burner is used to receive an offline burning file sent by a host computer, the offline burning file comprises a burning instruction and a burning data packet, the burning data packet comprises at least one burning task group; according to the burning task group, a burning control channel is constructed between the burner and a Flash memory; according to the burning instruction, the burning task group in the burning data packet is burned to the corresponding Flash memory in the chip to be burned through the corresponding burning control channel.
[0012] In combination with the second aspect, in an embodiment of the present application, the Flash memory includes at least one of an on-chip data Flash memory, an on-chip program Flash memory, and an off-chip serial port Flash memory.
[0013] On the other hand, an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; when at least one of the programs is executed by at least one of the processors, the chip offline burning method as described above is implemented.
[0014] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor. When the computer program executable by the processor is executed by the processor, it is used to implement the chip offline burning method as described above.
[0015] The embodiment of the present application provides a chip offline burning method, first, receiving an offline burning file sent by a host computer, wherein the offline burning file includes a burning instruction and a burning data packet, and the burning data packet includes at least one burning task group; then, according to the burning task group, a burning control channel is constructed between the burner and the Flash memory; then, according to the burning instruction, the burning task group in the burning data packet is burned to the corresponding Flash memory in the chip to be burned through the corresponding burning control channel. The embodiment of the present application can adapt to chips of different types and specifications, as well as burning data in different formats by flexibly configuring the burning instructions and the burning data packet, thereby enhancing the scalability and compatibility of the burning function. Secondly, by constructing a burning control channel, and distributing the burning data packet to the corresponding burning control channel according to the burning task group, it is possible to realize parallel processing of multiple Flash memories of the chip to be burned, significantly improving the burning efficiency, thereby being able to greatly shorten the production cycle and reduce production costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the chip offline burning method provided in the embodiment of the present application;
[0017] Figure 2 It is a data structure diagram of the download algorithm provided in the embodiment of the present application;
[0018] Figure 3 It is a data structure diagram of a user program provided in an embodiment of the present application;
[0019] Figure 4 is a data structure diagram of fixed data provided in an embodiment of the present application;
[0020] Figure 5 is a data structure diagram of a sequence value provided in an embodiment of the present application;
[0021] Figure 6 It is a data structure diagram of UID encryption provided in an embodiment of the present application;
[0022] Figure 7 is a data structure diagram of random data provided by an embodiment of the present application;
[0023] Figure 8 It is an internal flow chart of the chip offline programming method provided in the embodiment of the present application;
[0024] Fig. 9 This is a chip offline programming system architecture diagram provided in an embodiment of the present application;
[0025] Fig.10 It is a structural diagram of a chip offline burning system provided by a specific example of this application;
[0026] Fig.11 is a schematic diagram of an electronic device provided in an embodiment of the present application; DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] It should be noted that, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order from that in the flowchart. The terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions that can be implemented in this application, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the effects that can be produced by this application and the purposes that can be achieved, should still fall within the scope of the technical content disclosed in this application. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of narration, and are not used to limit the scope of implementation of this application. The change or adjustment of the relative relationship should also be regarded as the scope of implementation of this application without substantial change of the technical content.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] In the current electronic equipment manufacturing industry, the burner is a key device for writing program code or data into the Flash memory. However, the existing burning technology has obvious deficiencies in many aspects, as shown below: First, most burners on the current market can only burn one Flash memory at a time. This design is particularly inconvenient when facing large-scale production or application scenarios that require processing multiple memories at the same time. Since each Flash needs to be burned separately, this not only greatly prolongs the production cycle, but also increases the complexity of manual operation, thereby increasing the risk of error. In addition, repeated operation processes are also prone to equipment wear, further affecting production efficiency and product quality. Second, traditional burners mainly use user programs as the main body of burning, but in actual applications, users often need to flexibly configure common offline burning functions such as sequence values, burning times limit, UID encryption, etc. However, existing burners cannot meet specific needs such as user-defined storage locations. This limitation not only limits the application scope of the burner, but also increases the difficulty of users in subsequent use and maintenance. Third, for external Flash memories, existing burning technologies often do not provide effective offline burning solutions. This means that the user needs to perform a programming operation on each external Flash separately, which is inefficient. In addition, the programming of the external Flash usually needs to be performed in a specific hardware environment, which further increases the user's operating cost and time cost.
[0031] In view of this, the embodiment of the present application provides a chip offline burning method, a chip offline burning system, an electronic device and a computer-readable storage medium. First, an offline burning file sent by a host computer is received, wherein the offline burning file includes a burning instruction and a burning data packet, and the burning data packet includes at least one burning task group; then, according to the burning task group, a burning control channel between a burner and a Flash memory is constructed; then, according to the burning instruction, the burning task group in the burning data packet is burned to the corresponding Flash memory in the chip to be burned through the corresponding burning control channel. The embodiment of the present application can adapt to chips of different types and specifications, and burning data of different formats by flexibly configuring the burning instructions and the burning data packet, thereby enhancing the scalability and compatibility of the burning function. Secondly, by constructing a burning control channel, and distributing the burning data packet to the corresponding burning control channel according to the burning task group, it is possible to realize parallel processing of multiple Flash memories (including off-chip and on-chip Flash memories) of the chip to be burned, which significantly improves the burning efficiency, thereby greatly shortening the production cycle and reducing production costs.
[0032] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0033] Reference Figure 1 , Figure 1 1 is a flow chart of a chip offline programming method provided in an embodiment of the present application. The method includes but is not limited to steps 110 to 130.
[0034] Step 110: receiving an offline burning file sent by a host computer, wherein the offline burning file includes a burning instruction and a burning data packet, and the burning data packet includes at least one burning task group;
[0035] Step 120: constructing a programming control channel between the programmer and the Flash memory according to the programming task group;
[0036] Step 130: According to the burning instruction, the burning task group in the burning data packet is burned into the corresponding Flash memory in the chip to be burned through the corresponding burning control channel.
[0037] Steps 110 to 130 are described in detail below.
[0038] In a feasible embodiment, the host computer generally refers to a computer or a single-chip microcomputer that can directly send an operation instruction. The host computer can generally provide a corresponding user operation interactive interface and display feedback data to the user, such as an industrial computer, a workstation, a touch screen, etc. The communication between the host computer and the burner is usually realized through a specific communication interface (such as a serial port, an Internet port, etc.). In the burning process, the host computer can generate and send an offline burning file containing a burning instruction and a burning data packet to the burner. After receiving the offline burning file sent by the host computer, the burner can build a corresponding burning control channel according to the burning instruction and the burning data packet in the file, and distribute the burning task group to the corresponding burning control channel to realize writing specific data or programs in the memory.
[0039] It should be made clear that chips usually integrate circuits such as processors, microcontrollers and memories, among which Flash memory is an important type of memory. In chip design, Flash memory is often used as built-in memory to store program code and data. The chip communicates and transmits data with the Flash memory through its interface to realize data reading, writing and storage operations. In addition, the device (referring to a hardware entity with specific functions or uses, such as mobile phones, computers, digital cameras, embedded systems, etc.) contains a variety of components and subsystems, and the chip, as one of the core components, has a direct impact on the overall performance of the device. The device can communicate and transmit data with the chip through the interface to realize various functions and tasks of the device. At the same time, as a key storage component in the device, the Flash memory is responsible for storing various data of the device. The interface of the device is connected to the Flash memory to realize data reading, writing and storage operations, and the performance and capacity of the Flash memory directly affect the storage capacity and data reading and writing speed of the device. In summary, the close cooperation between the device, chip and Flash memory ensures that the device can normally realize various functions and tasks.
[0040] In a feasible embodiment, the offline burning file carries the detailed instructions and data for writing the program code or data into the Flash memory to ensure the accuracy and efficiency of the burning process. Among them, the burning instruction is the guiding part of the offline burning file, which mainly stipulates the basic framework and process of the entire burning process. These instructions may include but are not limited to: start instruction: used to inform the burner to start receiving and processing the offline burning file; check instruction: before the burning starts, the file is checked for integrity to ensure that there is no error in the data transmission process; configuration instruction: set various parameters of the burner, such as communication rate, burning mode, etc.; execution instruction: trigger the burner to start executing the burning task; end instruction: inform the burner that the burning process has been completed and subsequent operations can be performed or enter the standby state. The burning data packet contains the data actually to be written into the Flash memory. In this embodiment, the burning data packet may contain one or more burning task groups, and these task groups form a one-to-one correspondence with each Flash memory in the chip to be burned, ensuring the accurate positioning and effective management of the data. Each task group can contain one or more burning tasks, which define the specific operations and data to be executed.
[0041] In a feasible embodiment, one or more burning task groups can be numbered and sorted according to a preset burning order, and this burning order can be carried by the burning instruction. When executing the burning task, according to the instructions of the burning instruction, this order can be followed, starting from the first burning task group (for example, numbered 0), and advancing in sequence until the last burning task group (for example, numbered n) also successfully completes the burning. Such a process ensures the orderliness of the burning process and the accuracy of data burning. This method of numbering and sorting not only improves the orderliness of the burning operation, but also helps to track and locate errors during the burning process. If a task group encounters a problem during burning, it can be quickly identified by its number, so that corresponding remedial measures can be taken. At the same time, this also provides convenience for monitoring the burning progress.
[0042] In a feasible embodiment, each burning task can be assigned a specific data packet to support its execution process. These data packets are mainly divided into two categories: Index data packets and Data data packets, which can ensure the accuracy and reliability of the burning process by recording the key information and data content of the task. Specifically, the Index data packet is a data structure that each burning task has, which contains the key information required to execute the task. This information mainly includes the type (type) sequence number of the current task, the size (size) of the task data, and the target address (target address). This information can determine how to correctly write the data into the Flash memory. In addition, according to different task types (task type), the Index data packet may also contain other additional information. For example, for some tasks that need to process specific data, the Index data packet may record the data address (data address), the CRC feature code of the data (used for data integrity verification), and the initial value (used for data comparison or initialization) and other information. It should be noted that not all burning tasks require Data data packets, and it is mainly determined whether it is needed based on the nature of the task. For those tasks that need to transmit specific data content, such as writing user programs or filling fixed data, Data data packets are particularly important. It contains the specific data required for the task, which will be written into the Flash memory. In addition, since different types of burning tasks require different information and operations during execution, their Index data packets will also be different. For example, the download algorithm task may focus more on the integrity check of the communication protocol and data transmission, while the user program writing task may focus more on the accurate writing of data and the precise matching of addresses.
[0043] It is worth noting that the Index data packet and the Data data packet can be stored together or separately. In addition, in order to meet more diverse encryption requirements, a more flexible approach can be adopted: aggregate the Index information of all burning tasks into an Index data group, and at the same time aggregate the data content of all burning tasks into a Data data group, and then encrypt and store these two data groups separately to meet more diverse encryption requirements.
[0044] In a feasible embodiment, the burning task group covers a variety of burning task types, including but not limited to downloading algorithms, user programs, sequence values, identifier (UID) encryption, fixed data, and random data. The following is a detailed explanation of each task type: Download algorithm: This usually refers to the process of writing a specific algorithm program (such as firmware update, encryption / decryption algorithm, etc.) into the Flash memory. Its purpose is to enable the target device to perform new or updated functions. For example, in the burning process of microcontrollers such as STM32, a specific download algorithm is often used to write new firmware or algorithm programs into the Flash memory of the chip to achieve device updates or functional expansion. User program: This is a program code written by the user to achieve specific functions. By burning the user program, the target device can perform specific tasks according to the user's intentions. For example, in the development of microcontrollers such as Arduino and STM32, users can write their own program code and write it into the memory of the chip through the burning process to achieve functions such as intelligent control or data processing of the device. Sequence value: These values are usually used to identify the uniqueness, version information or production batch of the device. By burning the sequence value, each device can be ensured to have a unique identifier, which is convenient for product tracking and management. Identifier encryption: It is designed to protect sensitive information stored in the device (such as device ID, key, etc.) from unauthorized access or tampering. By encrypting the identifier, the security of the device can be significantly improved. Fixed data: These data refer to data that will not change during the life cycle of the device, such as the configuration parameters and calibration data of the device. By burning the fixed data, it can be ensured that the device can work according to the predetermined configuration at startup or during operation. Random data: These data are usually used to generate the unique key, random number sequence, etc. of the device. By burning random data, the randomness and unpredictability of the device can be increased, thereby improving the security of the device. These task types together constitute a complete set of mechanisms for operating Flash devices, covering multiple aspects from data downloading, program updates to security configuration. By combining different tasks into task groups, the update and maintenance process of Flash can be flexibly managed to ensure the functionality, security and performance of the device.
[0045] The data structures of these task types are described in detail below with reference to some embodiments.
[0046] In a feasible embodiment, the data structure of the download algorithm is as follows: Figure 2 In particular, in addition to the general Index data packet, the download algorithm also records information such as the erase method, verification method, number of remaining tasks, and the start and end addresses of the Flash. Figure 2 The detailed explanation of each field is as follows: store addr (storage address): indicates the starting storage location of the data on the Flash. rawsize (raw size): indicates the size of the unencrypted and uncompressed raw data (usually in bytes). raw CRC (raw cyclic redundancy check): the check value obtained by performing a CRC check on the raw data. It is used to verify the integrity of the data during or after the download process. encrypted size (encrypted size): the size of the data after encryption (in bytes). encrypted CRC (encrypted cyclic redundancy check): the check value obtained by performing a CRC check on the encrypted data. erase type (erase type): indicates how to erase the target storage area before writing new data. The erase method can include block erase, sector erase, etc. verifytype (verify type): specifies how to verify after the data is written. Possible verification methods include CRC verification, MD5 verification, etc. group num (group number): If the data is divided into multiple groups for download, this field indicates the group number of the current data. sub task len (subtask length): indicates the data length of the subtask in the current download task (in bytes). start target addr: The starting address of the data on the Flash (may be the same as store addr, but may also be different depending on the context). Used to indicate the starting location of data writing. end target addr: The ending address of the data on the target storage medium. The start address and end address can be used to determine the location range of the data on the storage medium. The data packet refers to the actual data to be downloaded and stored on the Flash. This may be raw data, encrypted data, or data that has been processed in other ways.
[0047] In a feasible embodiment, the data structure of the user program (Firmware) is as follows Figure 3As shown. Specifically, the detailed explanation of each field is as follows: type: Indicates the type or category of the data. The type field may be an enumeration value, a string, or a numeric code, depending on the design of the user program. For example, the type of the user program can be 0. rawsize: Indicates the original size of the data, that is, the size before any processing (such as encryption, compression). target addr: The target location where the data should be stored or processed. store addr: The address of the location where the data is actually stored. The storage address is a direct indication of the physical storage location of the data. raw CRC: The value obtained after the CRC (cyclic redundancy check) is calculated on the raw data. CRC is used to detect whether errors have occurred in the transmission or storage of data. When receiving or reading data, the CRC can be recalculated and compared with the original CRC to verify the integrity of the data. encrypted size: The size of the data after encryption. Encryption usually increases the size of the data because the encryption algorithm may introduce additional bytes to store key information, checksums, or other metadata. encrypted CRC: The value obtained after the CRC is calculated on the encrypted data. Similar to the original CRC, the encrypted CRC is used to detect whether errors occurred during the transmission or storage of encrypted data. Since encryption changes the mode of the data, the encrypted CRC is generally different from the original CRC. The data packet refers to the actual data to be stored, transmitted, or processed. If the data packet is encrypted, in addition to the size and CRC signature of the original data, the encrypted size and CRC signature are also recorded.
[0048] In a feasible embodiment, the data structure of fixed data is as follows: Figure 4As shown. Specifically, the detailed explanation of each field is as follows: type: Indicates the type or format of the data. The type field may be an enumeration value, a string, or a numeric code. For example, the type of fixed data can be 3. raw size: Indicates the original size of the data, that is, the size before any processing (such as encryption, compression). In fixed data structures, the original size is usually used to verify the integrity of the data and ensure that the data has not been accidentally modified or truncated during transmission or storage. target addr: The expected location where the data should be stored or processed. store addr: The address of the location where the data is actually stored. It is worth noting that the storage address may be the same as the target address or may be different, depending on the data storage strategy and application requirements. raw CRC: The value obtained by performing CRC calculation on the original data. encrypted size: The size of the data after encryption. In fixed data structures, the encrypted size is usually used to allocate enough storage space to store the encrypted data. encrypted CRC: The value obtained by performing CRC calculation on the encrypted data. The data packet refers to the actual data to be stored, transmitted or processed. In particular, if the data packet is encrypted, in addition to the size and CRC signature of the original data, the encrypted size and CRC signature will also be recorded.
[0049] In a feasible embodiment, the data structure of the serial value (Serial) is as follows Figure 5 As shown. Specifically, the detailed explanation of each field is as follows: type: indicates the type or category of the sequence value. For example, the type of the sequence value can be 1. raw size: indicates the original size or length of the sequence. target addr: the expected location where the sequence data should be stored or processed. initial num: the starting value or first value of the sequence. stepnum: the increment or difference between each value in the sequence. The step value field determines the generation rule of the sequence, that is, how to transition from one value to the next. In particular, the sequence value has no data packet. It is worth noting that the traditional burner can only add one sequence value, while the present embodiment can regard the sequence value as a task of the same level as the user program, and can add any number of sequence values as needed, as long as the address does not conflict, and the number is not limited. For example, when burning a Flash memory in a chip, multiple sequence values can be set, and their initial values and increment rules can be specified. This flexibility allows different needs to be met during the burning process, such as recording the unique identification and fixed attributes of the corresponding device at the same time.
[0050] In a feasible embodiment, the data structure of the UID encryption (UIDMatrix) is as follows: Figure 6 As shown. Specifically, the detailed explanation of each field is as follows: type: indicates the type or format of the UID. In the encrypted UID data structure, type can be 2. rawsize: indicates the original size or length of the UID, that is, the size before encryption. target addr: the expected location where the UID should be stored or processed. store addr: the address of the location where the UID is actually stored. raw CRC: the value obtained by calculating the CRC (cyclic redundancy check) of the original UID. encrypted size: the size of the UID after encryption. Since the encryption algorithm may introduce additional bytes (such as padding, key information, etc.), the encrypted size may be larger than the original size. encrypted CRC: the value obtained by calculating the CRC of the encrypted UID. The encrypted CRC is used to verify whether an error has occurred in the storage or transmission of the encrypted UID. Since encryption changes the mode of the UID, the encrypted CRC is generally different from the original CRC. The data packet records the relevant UID algorithm. The UID algorithm can use 6 algorithms, including addition, subtraction, multiplication, bitwise AND, bitwise OR, bitwise XOR (+, -, *, &, |, ^). With the help of the host computer, you can edit your own encryption algorithm at will. Compared with the fixed encryption algorithms of traditional programmers, this solution is more flexible and safer, and can increase the difficulty of cracking.
[0051] In a feasible embodiment, the data structure of random data (Random) is as follows Figure 7 As shown. Specifically, the detailed explanation of each field is as follows: type: This field is used to indicate the type or format of the random data. In this data structure, type can be 4. raw size: This field indicates the original size or length of the random data. targetaddr: This field indicates the expected location where the random data should be stored or processed.
[0052] In a feasible embodiment, the type of the first burning task of each burning task group is a download algorithm. It is understandable that the download algorithm is not only responsible for the transmission of data, but also involves multiple links such as communication with the target device, verification of the device state, preparation of the Flash memory and correct writing of data. By adopting different download algorithms, different types of chips to be burned and Flash memories can be flexibly dealt with, and effective connection and data transmission between them and the burner can be achieved. In addition, using the download algorithm as the starting task of each burning task group can ensure that each task group can have a clear and standard starting point during the execution process, thereby improving the accuracy and consistency of burning. Based on this, in one embodiment, when building a burning control channel between the burner and the Flash memory according to the burning task group, the first target burning task of the type of the download algorithm can be selected from the burning task, and then the target Flash memory is selected from the Flash memory according to the first target burning task, and then the burning channel between the target Flash memory and the burner is built. This channel is a bridge for data transmission, which can ensure that data can be correctly transmitted from the burner to the target memory. Through this process, at least one burning control channel can be obtained, which will be used for subsequent burning operations.
[0053] In a feasible embodiment, when executing step 130, the Flash memory corresponding to the burning task group in the burning data packet can be determined first, and the burning control channel, then according to the burning mode indicated by the burning instruction, the burning task group is burned to the corresponding Flash memory through the burning control channel. In other words, in the burning process, the Flash memory corresponding to the burning task group (i.e., determining where the data should be stored) and the burning control channel (i.e., determining how the data is transmitted) can be determined first. Then, according to the burning mode specified in the burning instruction, the data in the burning task group are written in the corresponding Flash memory through the burning control channel.
[0054] In a possible embodiment, if Figure 8 As shown, the specific process of determining the Flash memory corresponding to the burning task group in the burning data packet and the burning control channel may include but is not limited to steps 810 to 830.
[0055] Step 810: Obtaining a burning task of a burning task group from a burning data packet;
[0056] Step 820: According to the burning task, search and determine the corresponding Flash memory in the chip to be burned;
[0057] Step 830: Determine a programming control channel according to the determined Flash memory.
[0058] In a feasible embodiment, when searching and determining the corresponding Flash memory in the chip to be burned, the chip to be burned can be analyzed first to understand the specifications and characteristics of the chip to be burned, especially the layout, capacity, address space and other information of the Flash memory. For example, the chip type can be identified by reading the identifier (such as JEDEC ID or manufacturer ID) inside the chip. The memory information of a specific chip is found using the documents or database provided by the chip manufacturer. In addition, some burning tools or software may also have the function of automatically identifying chip and memory information. Then, the address provided in the burning task is matched with the Flash memory address space of the chip to determine which Flash memory the task should be written to.
[0059] In a feasible embodiment, step 830 aims to select a suitable burning control channel from one or more burning control channels between the burner and the Flash memory obtained through step 120 according to the determined Flash memory, so as to determine the data transmission path from the burning device to the target Flash memory.
[0060] In a feasible embodiment, after the burning is completed, a verification operation (such as reading the data in the memory and comparing it with the original data) can also be performed to verify the correctness of the burning result.
[0061] In a feasible embodiment, the number of burning limit can be further adjusted and optimized accordingly. For example, the number of burning limit can be set for the entire burning file, and this setting not only improves the controllability of the burning process. More flexibly, the decreasing time point is no longer limited to before or after the burning of the entire burning task group, but can be accurate to before or after a specific burning task is executed. Such a design makes the number of burning limit more flexible and meticulous, and can better meet the personalized needs of different users. In practical applications, users can choose to burn an unimportant data first to verify the stability of the chip connection. After ensuring that the connection is correct, as the burning task is gradually carried out, the number of burning will decrease according to the preset rules. When it comes to the important program burning stage, even if the user accidentally unplugs the chip connection, the burning count can also be reduced normally because the decreasing rule of the number of burning has taken effect, thereby effectively ensuring the integrity and safety of the burning process.
[0062] In a feasible embodiment, when the burning task group in the burning data packet is burned into the corresponding memory in the chip to be burned through the corresponding burning control channel according to the burning instruction, the burning instruction can also be analyzed to obtain the burning number and the decreasing time point; then, according to the burning number and the decreasing time point, the burning task group is burned into the corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the specified number and time point. Specifically, in the burning process, the burning instruction is not only a signal to trigger the burning operation, but also contains detailed information about how to perform the burning. When a burning instruction is received, it can be analyzed in depth to extract key parameter information, including the burning number and the decreasing time point. Among them, the burning number can specify the number of times the burning task group needs to be burned into the chip to be burned. It is crucial to ensure the accuracy and integrity of the data, especially when it is necessary to verify whether the data writing is successful for multiple times. The decreasing time point defines the specific time when the burning number decreases. It can be a time point before or after the burning of the entire burning task group, or a time point before or after the execution of a specific burning task. By flexibly setting the decrement time point, the change of the burning times can be more accurately controlled to meet different burning requirements. After obtaining the two key parameters of the burning times and the decrement time point, the burning operation can be started. Specifically, the burning task group in the burning data packet can be burned to the corresponding Flash memory in the chip to be burned according to the specified times and time points through the corresponding burning control channel.
[0063] In a feasible embodiment, the Flash memory can be divided into two categories: on-chip Flash and off-chip Flash. Among them, the types of Flash can be further subdivided into program Flash, data Flash, and SPI Flash. Specifically, the on-chip program Flash is a non-volatile memory integrated inside the chip, which is specifically used to store program code. Also as a non-volatile memory integrated inside the chip, the on-chip data Flash is mainly used to store data, which is different from the function of the on-chip program Flash. The off-chip SPI Flash can communicate with the main chip through SPI (serial peripheral interface), and is usually used as an external storage device.
[0064] The following describes the chip offline programming method of this embodiment using three usage scenarios.
[0065] Use scenario 1:
[0066] In the scenario of programming only one on-chip Flash, assuming that one programming task group (Task Group 0) is used, the specific programming task arrangement is as follows:
[0067] A user program: The program is burned into the address range 0x08000000 to 0x0801E60F.
[0068] A fixed data: the content is "special code" in ASCII code format, and the starting address is 0x08025000.
[0069] A sequence value: The address is 0x080257EC, occupies 4 bytes of space, the initial value is set to 0, and increases by 1 each time it is burned.
[0070] Three random data:
[0071] The first random data is in the address range 0x0801E610 to 0x08024FFF.
[0072] The second random data is in the address range 0x0802500C to 0x080257EB.
[0073] The third random data is filled in the address range 0x080257F0 to 0x080257FF.
[0074] In this scenario, there is no limit on the number of programming times. The download algorithm can be selected as EFLASH.FLM, and the erase method is full chip erase.
[0075] The above description presents a simple and basic usage scenario for a single Flash memory containing a single user program and its associated data.
[0076] Use scenario 2:
[0077] In a single on-chip Flash, two programming task groups (Task Group 0 and Task Group 1) are used to complete specific programming requirements.
[0078] Description of the burning task for Task Group 0:
[0079] A user program: The size is 112KB, of which the 16 bytes starting from address 0x08010000 are fixed to 0xFF.
[0080] A sequence value: the initial value is 32, and it decreases by 2 each time it is burned.
[0081] Download algorithm: Use EFLASH.FLM algorithm.
[0082] Erase mode: full chip erase.
[0083] Programming limit: The total limit is 1000 times. The number decreases after each Task Group 0 programming is completed.
[0084] Description of the burning task for Task Group 1:
[0085] A UID encryption algorithm is used to encrypt the ID and store it in 16 bytes starting at address 0x08010000.
[0086] Download algorithm: also use EFLASH.FLM algorithm.
[0087] Erasing mode: Do not erase.
[0088] The above description presents a usage scenario for a single Flash memory and a single user program with UID encryption and number limit. The logical flow is: after Task Group 0 is burned and the number is decremented, Task Group 1 is executed to burn the encrypted ID. If the chip is disconnected during this process, the program will be compared when running and stop running due to mismatch, and an error will be prompted because the encrypted ID is not burned successfully.
[0089] In this scenario, you can also split the user program into two parts and distribute them to two task groups to control the burning order and conditions more flexibly. In addition, you can also reduce the number of burning times after burning the first part of the user program, so that the number limit can be applied earlier while maintaining the flexibility of the burning process.
[0090] Use scenario three:
[0091] In order to burn the on-chip program Flash, on-chip data Flash and off-chip SPI Flash, it is assumed that three burning task groups (Task Group 0, Task Group 1, Task Group 2) are set.
[0092] Description of the burning task for Task Group 0:
[0093] A user program, size 112KB.
[0094] A sequence value that starts at 0 and increases by 1 each time.
[0095] A sequence value, with an initial value of 116752 and incremented by 0 each time (i.e., a fixed value).
[0096] A UID is encrypted.
[0097] The download algorithm is EFLASH.FLM, which uses the full chip erase method.
[0098] Description of the burning task for Task Group 1:
[0099] A fixed data containing the initial values of multiple program running parameters.
[0100] A sequence value that starts at -2 and increases by 2 each time.
[0101] A UID is encrypted.
[0102] The download algorithm is DFLASH.FLM, using sector erase method.
[0103] Description of the burning task for Task Group 2:
[0104] A user program for storing multiple image data.
[0105] A sequence value, with an initial value of 300 and increasing by 3 each time.
[0106] A UID encryption
[0107] The download algorithm is SPI-FLASH.FLM, using sector erase method.
[0108] The above settings cover the use scenarios of multiple Flash. Each Flash is used to store user programs, initial values of operating parameters, and image display data. At the same time, each task group can add sequence values and UID encryption algorithms to ensure the uniqueness and security of data, and each task group does not interfere with each other.
[0109] See also Fig. 9 , Fig. 9 It is a chip off-line burning system architecture diagram provided by the embodiment of the present application, the system comprises a connected burner 910 and a chip to be burned 920, wherein the burner 910 is connected with a host computer 930 (such as a computer), can receive the off-line burning file transmitted by the host computer 930, and a plurality of Flash memories can be included in the chip to be burned 920. This off-line burning file contains burning instructions and burning data packets, and the burning data packets at least include a burning task group. Based on these burning task groups, the burning control channel between the burner 910 and the Flash memory can be constructed. Subsequently, according to the burning instructions, by corresponding burning control channels, the burning task group in the burning data packet can be accurately burned to the corresponding Flash memory in the chip to be burned 920.
[0110] In a feasible embodiment, the Flash memory in the chip to be burned can include at least any one of an on-chip data Flash memory, an on-chip program Flash memory, and an off-chip serial port Flash memory, so as to meet diverse storage requirements.
[0111] In a possible embodiment, if Fig.10As shown, the storage part of the burning chip connected to the burner includes on-chip Flash0, on-chip Flash1, off-chip Flash0 and off-chip Flash1, each Flash has a corresponding burning task group in the burning data packet, and through different download algorithms in the burning task group, the burning control channel between these Flash and the burning chip can be constructed, thereby enabling the parallel processing of multiple Flash memories. This parallel processing mode significantly improves the burning efficiency, significantly shortens the production cycle, and reduces production costs. Compared with the traditional single-chip single burning mode, the present embodiment has significant advantages when facing large-scale production or needing to process the application scenario of multiple memories simultaneously.
[0112] In a feasible embodiment, after the connection between multiple Flash and the burner through the chip is realized, the user can conveniently switch through software, thereby operating multiple different Flash in one burning process.
[0113] It should be noted that, since the chip offline burning system of this embodiment can implement the chip offline burning method of the previous embodiment, the chip offline burning system of this embodiment and the chip offline burning method of the previous embodiment have the same technical principles and the same beneficial effects. In order to avoid repetition, they will not be repeated here.
[0114] Reference Fig.11 The embodiment of the present application further discloses an electronic device, the electronic device 1100 comprising:
[0115] at least one processor 1101;
[0116] At least one memory 1102, used to store at least one program;
[0117] When at least one program is executed by at least one processor 1101 , the above-mentioned chip offline burning method is implemented.
[0118] The embodiment of the present application further discloses a computer-readable storage medium, which stores a computer program executable by a processor. When the computer program executable by the processor is executed by the processor, it is used to implement the above-mentioned chip offline burning method.
[0119] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A chip offline burning method, characterized in that: include: Receiving an offline burning file sent by a host computer, wherein the offline burning file includes a burning instruction and a burning data packet, and the burning data packet includes at least one burning task group; According to the burning task group, a burning control channel between the burner and the Flash memory is constructed; According to the burning instruction, the burning task group in the burning data packet is burned into the corresponding Flash memory in the chip to be burned through the corresponding burning control channel.
2. The chip offline programming method according to claim 1, characterized in that: The burning task group includes at least one burning task, and the types of the burning tasks include downloading algorithm, user program, sequence value, identifier encryption, fixed data and random data.
3. The chip offline programming method according to claim 2, characterized in that: The step of constructing a programming control channel between a programmer and a Flash memory according to the programming task group includes: Selecting a first target burning task of a download algorithm type from the burning tasks; Selecting a target Flash memory from the Flash memory according to the first target burning task; A programming channel is constructed between the target Flash memory and the programmer.
4. The chip offline programming method according to claim 1, characterized in that: The step of burning the burning task group in the burning data packet into a corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the burning instruction includes: Determine the Flash memory corresponding to the burning task group in the burning data packet, and the burning control channel; According to the burning mode indicated by the burning instruction, the burning task group is burned into the corresponding Flash memory through the burning control channel.
5. The chip offline programming method according to claim 4, characterized in that: The step of determining the Flash memory corresponding to the burning task group in the burning data packet and the burning control channel includes: Obtaining the burning task of the burning task group from the burning data packet; According to the burning task, searching and determining the corresponding Flash memory in the chip to be burned; A burning control channel is determined according to the determined Flash memory.
6. The chip offline programming method according to claim 1, characterized in that: The method of burning the burning task group in the burning data packet into the corresponding Flash memory in the chip to be burned through the corresponding burning control channel according to the burning instruction also includes: Analyze the burning instruction to obtain the burning times and the decreasing time points; According to the programming times and the decreasing time point, the programming task group is programmed into a corresponding Flash memory in the chip to be programmed through the corresponding programming control channel.
7. A chip offline burning system, characterized in that: The invention comprises a burner and a chip to be burned, wherein the burner is connected to the chip to be burned, and the burner is used to receive an offline burning file sent by a host computer, wherein the offline burning file comprises a burning instruction and a burning data packet, and the burning data packet comprises at least one burning task group; according to the burning task group, a burning control channel is constructed between the burner and a Flash memory; according to the burning instruction, the burning task group in the burning data packet is burned to a corresponding Flash memory in the chip to be burned through the corresponding burning control channel.
8. The chip offline burning system according to claim 7, characterized in that: The Flash memory includes at least one of an on-chip data Flash memory, an on-chip program Flash memory and an off-chip serial port Flash memory.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the chip offline burning method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program executable by a processor is stored therein, and when the computer program executable by the processor is executed by the processor, it is used to implement the chip offline burning method as described in any one of claims 1 to 6.