FLASH programming system capable of configuring instructions and method thereof
By designing a FLASH writing system with configurable instructions, the existing system has solved the problems of poor flexibility, low writing efficiency and limited compatibility, and achieved high flexibility and high efficiency writing operations, adapting to the characteristics of a variety of FLASH chips and complex writing tasks.
Patent Information
- Application Number
- CN202411917098.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-29
AI Technical Summary
The existing FLASH writing system has poor flexibility, low writing efficiency, and limited compatibility, making it difficult to adapt to the characteristics and complex writing tasks of different FLASH chips.
Design a FLASH writing system that can configurable instructions, including an instruction configuration module, a data processing module, a write control module and a communication interface module. The instruction configuration module generates an instruction sequence suitable for the target FLASH chip, the data processing module performs data preprocessing, the write control module controls the write process, and supports multiple communication protocols through the communication interface module.
It realizes high flexibility in the system, can configure instructions according to different FLASH chip models and writing requirements, improves writing efficiency, and reduces costs and management complexity caused by compatibility issues.
Smart Images

Figure CN119902780A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of memory, and in particular to a FLASH programming system and method thereof. Background Art
[0002] As an important non-volatile storage device, FLASH memory is mainly used to store program code, data files, system configuration information, etc. In the production and development of electronic equipment, accurately burning the correct program and data into the FLASH chip is a crucial link, which is directly related to the function and performance of the product.
[0003] Traditional FLASH burning methods are usually implemented based on specific hardware devices and software programs. In terms of hardware, it generally includes a burner, connecting cables, and interface circuits adapted to the FLASH chip. The burner establishes a physical connection with the target FLASH chip through these interfaces to achieve the transmission of data and instructions. In terms of software, the burning software is responsible for processing and organizing the data to be burned, and sending it to the FLASH chip according to the predetermined protocol and instruction format. The burning software usually provides a user interface through which the user can select the file to be burned, set the burning parameters, and start the burning operation.
[0004] The existing FLASH burning system has poor flexibility: Most of the current FLASH burning systems use fixed instruction sets and burning processes, and cannot be flexibly adjusted according to the characteristics, functional requirements and application scenarios of different FLASH chips. This makes the system's adaptability extremely limited when facing a variety of FLASH chip models and complex and changeable burning tasks.
[0005] Low programming efficiency: Traditional programming systems are slow when processing large-scale data programming or complex programming tasks, and are unable to meet the needs of rapid production of modern electronic products. The main reason is that the fixed instruction sequence cannot be optimized according to the data characteristics and programming environment.
[0006] Limited compatibility: Existing FLASH burning systems usually only support FLASH chips from specific manufacturers, specific models or specific series, and have poor compatibility with other FLASH chips with different specifications, different interface standards or newly launched FLASH chips. Summary of the invention
[0007] In order to overcome the deficiencies of the prior art, the present invention provides a FLASH programming system and method for configurable instructions.
[0008] The technical solution adopted by the present invention to solve its technical problem is:
[0009] A FLASH programming system with configurable instructions includes an instruction configuration module, a data processing module, a programming control module and a communication interface module. The system architecture is as follows: Figure 1 shown.
[0010] The instruction configuration module receives various configuration instructions input by the user, and generates an instruction sequence suitable for the target FLASH chip according to the configuration instructions and the built-in algorithm. The generated instruction sequence is sent to the burning control module to prepare for the burning operation. The data processing module pre-processes the data to be burned according to the settings of the instruction configuration module, that is, performs data format conversion, checksum calculation and data encryption operations on the data to be burned. The burning control module controls each link of the burning process according to the instruction sequence provided by the instruction configuration module and the data pre-processed by the data processing module to ensure that the data is accurately written into the FLASH chip. When the entire burning task is completed, the burning control module feeds back the burning result to the user. The burning result includes whether the burning is successful, whether an error occurs, and the specific location of the error, so that the user can understand the burning situation in time and perform subsequent processing; the communication interface module receives the instructions and data sent by the external device, and sends the feedback information of the system back to the external device in time. The communication interface module supports multiple communication protocols to meet the connection requirements of different application scenarios and devices.
[0011] The internal structure of the instruction configuration module is as follows Figure 2 As shown, it includes a microcontroller, a clock circuit, an EEPROM, a key circuit, a serial communication interface, a display, a power supply, a command output interface and a status feedback interface.
[0012] The microcontroller is responsible for the control and coordination of the entire module, and has rich GPIOs for connecting to other functional units; it has storage resources, including internal flash memory for storing program code and instruction template library;
[0013] The clock circuit uses an external crystal oscillator, which is connected to the clock pin of the microcontroller to provide a stable clock signal for the microcontroller. Through the internal clock multiplication and division circuits, the microcontroller generates clock signals of various required frequencies to meet the working timing requirements of different modules.
[0014] The EEPROM is used to store a large number of instruction templates and is connected to the microcontroller through the I2C interface. The microcontroller performs read and write operations on the EEPROM to store, read and update the instruction templates.
[0015] The key circuit receives simple operation instructions from the user, and uses independent keys to select the chip model and switch the programming mode. When the key is pressed, the corresponding GPIO pin level changes, and the microcontroller recognizes the user's key operation by detecting the change in the pin level.
[0016] The serial communication interface uses a UART chip to convert the UART signal of the microcontroller into the RS-232 level standard so that the microprocessor can communicate with external devices via serial port;
[0017] The display interface is connected to the microprocessor to display the relevant information of the command configuration, that is, the currently selected chip model and burning parameters, so that users can intuitively understand the configuration status.
[0018] The buzzer circuit is connected to the microprocessor and alerts the user by sound when the user makes an operation error or the system encounters an abnormal situation.
[0019] The power chip converts the external input power voltage into the voltage 3.3V required by the command configuration module;
[0020] The command output interface is connected to the programming control module through a group of GPIO pins, and transmits the generated command sequence to the programming control module in the form of parallel data.
[0021] The state feedback interface receives the state information fed back by the burning control module, is connected to the burning control module through the GPIO pin, and the microcontroller processes according to the received state information.
[0022] The internal structure of the data processing module is as follows: Figure 3 As shown, it includes a data receiving interface, a data format conversion circuit, a check code calculation circuit, a data encryption circuit, an instruction adaptation processing circuit, a data output interface and a control signal interface;
[0023] The data receiving interface receives the data to be burned from the outside and transmits it to the data format conversion circuit. This interface is adapted to a variety of data transmission protocols to ensure that data from different sources can be received;
[0024] The data format conversion circuit includes format conversion logic, which converts the received data in different formats (such as binary, hexadecimal, etc.) and from different sources into a format suitable for the storage requirements of the target FLASH chip and then inputs it into the check code calculation circuit;
[0025] The check code calculation circuit calculates the check code for the input data according to the pre-configured CRC check algorithm, and then transmits the data with the check code to the data encryption circuit;
[0026] The data encryption circuit uses the selected encryption standard AES algorithm to encrypt the data to ensure the security of the data;
[0027] After receiving the data output by the checksum calculation circuit, the instruction adaptation processing submodule further adapts the data according to the instruction information transmitted by the instruction configuration module to ensure that the data length and data arrangement mode fully meet the requirements of the current programming task for the target FLASH chip;
[0028] The data output interface outputs the data of the instruction adaptation processing submodule to the burning control module, and also ensures the stability and accuracy of data transmission, and connects with the burning control module in accordance with the corresponding communication protocol.
[0029] The instruction configuration module guides the workflow and parameter settings of each submodule of the data processing module through control signals, so that the data processing process can be flexibly adjusted according to different burning requirements.
[0030] The internal structure of the programming control module is as follows Figure 4 As shown, it includes an instruction receiving interface, a data receiving interface, a chip initialization circuit, a data writing circuit, a verification circuit, an error processing submodule, a state monitoring and feedback circuit and a control signal coordination circuit.
[0031] The instruction receiving interface receives the instruction sequence for guiding the burning operation transmitted from the instruction configuration module. The instruction sequence covers the requirements of each link of burning, namely the chip initialization method, data writing mode and verification rule content.
[0032] The data receiving interface receives the data to be programmed after being pre-processed by the data processing module, and prepares for the subsequent writing of data to the FLASH chip;
[0033] The chip initialization circuit receives the chip initialization requirements in the instructions received by the instruction receiving interface, completes the operations of resetting the chip, setting the chip working mode, and initializing the address pointer, sends the corresponding control signal to the FLASH chip, completes the initialization of the FLASH chip, and creates a suitable initial state for subsequent data writing;
[0034] The data writing circuit writes the data into the designated address space of the FLASH chip byte by byte or block by block according to the instruction requirements and the received data through the instruction receiving interface, and monitors the writing status of the chip in real time;
[0035] The verification circuit reads and verifies the data in the FLASH chip according to the set CRC verification method after writing a certain 1024 bytes, compares the read data with the original data to be burned, and determines the correctness of the data written;
[0036] The error handling circuit takes corresponding measures according to the type and severity of the error and the preset error handling strategy. The error handling strategy is to try to rewrite the data for minor data errors and mark the error location and generate a detailed error report for more serious address errors.
[0037] The status monitoring and feedback circuit feeds back the status information of the FLASH chip writing completion mark, whether the chip is busy and whether there is any abnormality to the external user interface, so that the whole system can grasp the burning progress and chip status in real time, which is convenient for making corresponding decisions and operational adjustments;
[0038] The control signal coordination circuit coordinates and manages the work of each sub-module. According to the overall programming process and the feedback of each stage, the control signal is sent to each sub-module in an orderly manner to ensure that the programming process is carried out smoothly and accurately.
[0039] The internal structure of the communication interface module is as follows: Figure 5 As shown, it includes multiple interface adapter modules, protocol conversion logic, data cache and buffer circuit, communication control logic and circuit, data encapsulation and decapsulation circuit and error detection and processing circuit;
[0040] A variety of interface adapter modules are used to adapt to different types of external device connections, including USB interfaces, serial ports, and Ethernet interfaces.
[0041] The protocol conversion logic converts the received data and instructions of different protocols uniformly, and converts the data and instructions into a common format that can be recognized and processed by other modules in the system according to the standard communication protocol format set within the system;
[0042] The data cache and buffer circuit has a data cache space of a certain capacity, which temporarily stores the data and instructions to be transmitted after the protocol conversion logic conversion, plays a buffering role, coordinates the data transmission rate differences between different modules, and ensures the stability and continuity of data transmission;
[0043] The communication control logic and circuit controls the communication operation of each interface in the multiple interface adapter modules, coordinates the communication with the FLASH chip according to the system requirements, sends control signals to the FLASH chip, and receives feedback information from the FLASH chip;
[0044] The data encapsulation and decapsulation circuit encapsulates the data according to the communication protocol format required by the FLASH chip, that is, it adds the necessary frame header, frame footer and check bit information to make it conform to the communication specification of the chip. When receiving the data fed back by the FLASH chip, it decapsulates the data, removes the added format information, restores it to the original data format, and outputs it to the data cache and buffer circuit;
[0045] The error detection and processing circuit receives various status information during the communication process to detect whether a communication error occurs, that is, whether there is data loss, verification error, and connection interruption. Once an error is detected, the error detection and processing circuit performs corresponding processing according to the pre-set error handling strategy, that is, trying to re-establish the connection, requesting data retransmission, or issuing an error prompt to the system.
[0046] The present invention provides a configuration method of a FLASH programming system with configurable instructions, the specific steps of which are:
[0047] Step 1: The user selects or inputs the FLASH chip model, programming address range and programming mode through the graphical interface or command line interface provided by the system. The user can select common chip models, or input uncommon chip models through the manual input box. For the programming address range, the user directly enters the start address and end address in the input box, or makes a visual selection through the address selector on the graphical interface;
[0048] Step 2: The instruction configuration module quickly searches the internal large and efficient instruction library based on the information entered by the user to find the corresponding instruction template; the specific steps are:
[0049] Step 2.1: The instruction library is classified and stored according to different chip models for quick retrieval; different chips correspond to their own instruction template sets; when the user enters the chip model, the instruction configuration module locates the instruction template of the fast mode of the chip;
[0050] Step 2.2: If a matching instruction template is successfully found, the instruction configuration module will instantiate the template according to the burning address range and verification method entered by the user. The instruction configuration module will replace the corresponding placeholder in the template with the burning address range, generate instructions specific to the address range, and add relevant CRC verification setting instructions to the instructions;
[0051] If no fully matching instruction template is found in the instruction library, the system prompts the user to manually input the instruction through a pop-up window or voice prompt. The user manually enters the corresponding instruction in the instruction input area according to the manual of the FLASH chip; the instruction configuration module performs a strict legality check on the instruction input by the user, including the syntax structure, parameter format and value range of the instruction, that is, checks whether the instruction complies with the instruction specification of the chip and whether the parameter is within the range supported by the chip; if the instruction does not meet the requirements, the user is prompted with an error message and is required to re-enter the instruction;
[0052] Step 2.3: After the legality check, the correct instructions are received by the instruction configuration module to generate the corresponding instruction sequence; the instruction configuration module matches and analyzes the manually input instructions with the existing internal instruction templates to extract the commonalities and rules, so as to continuously enrich and improve the instruction library; at the same time, for some special instruction formats or parameter settings, the module records and marks them to provide a basis for subsequent optimization and improvement;
[0053] Step 2.4: The instruction sequence obtained through template instantiation or manual input processing is sent to the burning control module, ready to enter the burning operation link; during the sending process, the instruction configuration module encrypts and verifies the instruction sequence to ensure the security and integrity of the instructions during transmission.
[0054] The present invention also provides a method for burning a FLASH burning system with configurable instructions, the specific steps of which are:
[0055] Step 1: After receiving the instruction sequence, the burning control module first initializes the FLASH chip. Sending a chip reset instruction is the first step of initialization. Flash chips are divided into two categories: high-level reset and low-level reset. According to the chip model, a reset signal with a corresponding pulse width is sent to the FLASH chip to restore the chip to its initial state and clear possible errors or unstable states (i.e., byte order confusion, data offset, write position error, write protection failure, command recognition error, command interruption or timeout, etc.). Then, according to the chip model and burning mode specified in the instruction sequence, the chip's working mode is set, including read-write mode and programming mode.
[0056] Step 2: According to the address information in the instruction sequence, the burning control module writes the data sent by the data processing module into the FLASH chip byte by byte; during the writing process, the corresponding operation is performed according to the requirements of the instruction; as to whether to perform data verification, the module judges according to the settings in the instruction. If the instruction requires verification, after each data block is written (which can be a byte, word or page, depending on the characteristics of the chip and the instruction setting), the CRC verification calculation is performed immediately; the calculated verification value is compared with the pre-calculated correct verification value to ensure that the written data is accurate; if the verification passes, continue to write the next data block; if the verification fails, perform corresponding operations according to the error handling strategy, such as rewriting the data block or marking the error position and notifying the user;
[0057] Step 3: During the data writing process, the programming control module determines whether to use the burst writing mode according to the instruction; for the FLASH chip that supports burst writing, that is, when a large amount of continuous data exceeding 8 bytes needs to be written, enabling the burst writing mode significantly improves the writing efficiency. In this mode, the module combines multiple data bytes into a burst data block at one time, and then quickly writes the data into the chip through the burst writing interface of the chip; for a chip that supports 4-byte burst writing, in the burst writing mode, 4 bytes of data are written into the chip at the same time, instead of writing byte by byte, which greatly reduces the number and time overhead of the writing operation;
[0058] At the same time, the writing control module monitors the writing status of the FLASH chip in real time, including the writing completion flag and the busy status, and obtains the current working status of the chip through the status pin of the chip or through a specific status query instruction; if the chip is in a busy state, it means that an internal writing operation or other processing is in progress, and data transmission is suspended, and writing can continue after the chip completes the current operation to avoid data conflicts and errors;
[0059] Step 4: After writing data exceeding 1024 bytes, the programming control module reads the data in the FLASH chip more comprehensively for deep verification according to the instruction requirements. It not only simply compares the consistency of the data, but also conducts multiple checks on the integrity of the data and the correctness of the storage location. The read data is compared byte by byte with the original data, and the storage address of the data in the chip is checked to see if it is consistent with the expected one. If any data error or address inconsistency is found, the corresponding error correction measures are taken according to the type and severity of the error. For some minor data errors, try to rewrite the data. For more serious errors, such as address errors or data corruption caused by internal chip failures, the error location is marked in time, and a detailed error report is sent to the user, including the error type, location, and possible cause.
[0060] Step 5: When the entire burning task is completed, the burning control module comprehensively summarizes and analyzes the burning results; generates a detailed burning report, including an overall judgment on whether the burning is successful, whether there are any errors during the burning process, and the specific location and number of errors; if the burning is successful, feedback a success message to the user and provide some relevant statistical information, such as the time used for burning and the average writing speed, so that the user can evaluate and optimize the burning process; if an error occurs, in addition to reporting the error information, according to the nature of the error and the configuration of the system, provide some suggested solutions, such as whether it is necessary to re-burn and whether it is necessary to check the chip hardware connection; finally, the burning control module sends the burning results and related reports to the user interface or other related system modules, so that the user can understand the burning situation in time and perform subsequent processing.
[0061] The beneficial effects of the present invention are:
[0062] In view of the problem of poor flexibility of the prior art, the present invention provides users with great flexibility and convenience through the design of configurable instructions. Users can easily configure instructions in the system according to FLASH chips of different models and specifications, as well as various complex burning requirements. Whether facing new models of chips or special burning tasks, there is no need to perform cumbersome hardware adjustments or a large amount of software development work. In the process of electronic product development, when it is necessary to replace FLASH chips from different manufacturers, it is only necessary to operate through a simple graphical interface in the system of the present invention, select the corresponding chip model and burning mode, and the system can automatically generate an instruction sequence suitable for the chip to achieve rapid burning. Compared with the traditional burning system, this greatly reduces development costs and time, and improves production flexibility and efficiency.
[0063] In order to solve the shortcoming of low burning efficiency, the burning control module of the present invention adopts a series of optimized algorithms and strategies. First, through intelligent writing strategy selection, the writing mode is automatically adjusted according to the reading and writing characteristics and data characteristics of the FLASH chip. For areas with faster reading and writing speeds, a high-speed burst writing mode is adopted, which can write multiple data bytes at one time, greatly improving the writing speed; and for areas that require fine control, a byte-by-byte writing method combined with real-time verification is adopted to ensure the accuracy of the data. Secondly, in terms of data verification, an efficient verification algorithm and a reasonable verification timing arrangement are adopted to reduce unnecessary waiting time. Real-time verification is performed during the writing process, and errors are corrected in time once they are found, avoiding the rewriting of a large amount of data caused by errors found after the entire burning is completed.
[0064] In terms of compatibility, since the instruction configuration module of the present invention has a rich instruction library and a flexible configuration mechanism, as well as an optimized design of the overall system architecture, it can widely support a variety of different FLASH chips. Whether it is a mainstream or some relatively niche FLASH chip model, the corresponding configuration scheme can be found in this system to achieve reliable burning operations. This makes it possible for electronic product manufacturers to no longer be restricted by the compatibility of the burning system when choosing FLASH chips, and to freely choose suitable chips based on the performance requirements and cost considerations of the product. At the same time, it also reduces the cost and management complexity of equipping a variety of different burning devices due to chip compatibility issues. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a system architecture diagram of the present invention.
[0066] Figure 2 This is the internal structure diagram of the instruction configuration module.
[0067] Figure 3 It is the internal structure diagram of the data processing module.
[0068] Figure 4 This is the internal structure diagram of the burning control module.
[0069] Figure 5 This is the internal structure diagram of the communication interface module.
[0070] Figure 6 It is the instruction configuration flow chart.
[0071] Figure 7 System workflow diagram. DETAILED DESCRIPTION
[0072] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0073] A FLASH programming system with configurable instructions includes an instruction configuration module, a data processing module, a programming control module and a communication interface module. The system architecture is as follows: Figure 1 shown.
[0074] The instruction configuration module receives various configuration instructions input by the user, and generates an instruction sequence suitable for the target FLASH chip according to the configuration instructions and the built-in algorithm. The generated instruction sequence is sent to the burning control module to prepare for the burning operation. The data processing module pre-processes the data to be burned according to the settings of the instruction configuration module, that is, performs data format conversion, checksum calculation and data encryption operations on the data to be burned. The burning control module controls each link of the burning process according to the instruction sequence provided by the instruction configuration module and the data pre-processed by the data processing module to ensure that the data is accurately written into the FLASH chip. When the entire burning task is completed, the burning control module feeds back the burning result to the user. The burning result includes whether the burning is successful, whether an error occurs, and the specific location of the error, so that the user can understand the burning situation in time and perform subsequent processing; the communication interface module receives the instructions and data sent by the external device, and sends the feedback information of the system back to the external device in time. The communication interface module supports multiple communication protocols to meet the connection requirements of different application scenarios and devices.
[0075] The internal structure of the instruction configuration module is as follows Figure 2 As shown, it includes a microcontroller, a clock circuit, an EEPROM, a key circuit, a serial communication interface, a display, a power supply, a command output interface and a status feedback interface.
[0076] The microcontroller is responsible for the control and coordination of the entire module, and has rich GPIOs for connecting to other functional units; it has storage resources, including internal flash memory for storing program code and instruction template library;
[0077] The clock circuit uses an external crystal oscillator, which is connected to the clock pin of the microcontroller to provide a stable clock signal for the microcontroller. Through the internal clock multiplication and division circuits, the microcontroller generates clock signals of various required frequencies to meet the working timing requirements of different modules.
[0078] The EEPROM is used to store a large number of instruction templates and is connected to the microcontroller through the I2C interface. The microcontroller performs read and write operations on the EEPROM to store, read and update the instruction templates.
[0079] The key circuit receives simple operation instructions from the user, and uses independent keys to select the chip model and switch the programming mode. When the key is pressed, the corresponding GPIO pin level changes, and the microcontroller recognizes the user's key operation by detecting the change in the pin level.
[0080] The serial communication interface uses a UART chip to convert the UART signal of the microcontroller into the RS-232 level standard so that the microprocessor can communicate with external devices via serial ports;
[0081] The display interface is connected to the microprocessor to display the relevant information of the command configuration, that is, the currently selected chip model and burning parameters, so that users can intuitively understand the configuration status.
[0082] The buzzer circuit is connected to the microprocessor and alerts the user by sound when the user makes an operation error or the system encounters an abnormal situation.
[0083] The power chip converts the external input power voltage into the voltage 3.3V required by the command configuration module;
[0084] The command output interface is connected to the programming control module through a group of GPIO pins, and transmits the generated command sequence to the programming control module in the form of parallel data.
[0085] The state feedback interface receives the state information fed back by the burning control module, is connected to the burning control module through the GPIO pin, and the microcontroller processes according to the received state information.
[0086] The internal structure of the data processing module is as follows: Figure 3 As shown, it includes a data receiving interface, a data format conversion circuit, a check code calculation circuit, a data encryption circuit, an instruction adaptation processing circuit, a data output interface and a control signal interface;
[0087] The data receiving interface receives the data to be burned from the outside and transmits it to the data format conversion circuit. This interface is adapted to a variety of data transmission protocols to ensure that data from different sources can be received;
[0088] The data format conversion circuit includes format conversion logic, which converts the received data in different formats (such as binary, hexadecimal, etc.) and from different sources into a format suitable for the storage requirements of the target FLASH chip and then inputs it into the check code calculation circuit;
[0089] The check code calculation circuit calculates the check code for the input data according to the pre-configured CRC check algorithm, and then transmits the data with the check code to the data encryption circuit;
[0090] The data encryption circuit uses the selected encryption standard AES algorithm to encrypt the data to ensure the security of the data;
[0091] After receiving the data output by the checksum calculation circuit, the instruction adaptation processing submodule further adapts the data according to the instruction information transmitted by the instruction configuration module to ensure that the data length and data arrangement mode fully meet the requirements of the current programming task for the target FLASH chip;
[0092] The data output interface outputs the data of the instruction adaptation processing submodule to the burning control module, and also ensures the stability and accuracy of data transmission, and connects with the burning control module in accordance with the corresponding communication protocol.
[0093] The instruction configuration module guides the workflow and parameter settings of each submodule of the data processing module through control signals, so that the data processing process can be flexibly adjusted according to different burning requirements.
[0094] The internal structure of the programming control module is as follows Figure 4 As shown, it includes an instruction receiving interface, a data receiving interface, a chip initialization circuit, a data writing circuit, a verification circuit, an error processing submodule, a state monitoring and feedback circuit and a control signal coordination circuit.
[0095] The instruction receiving interface receives the instruction sequence for guiding the burning operation transmitted from the instruction configuration module. The instruction sequence covers the requirements of each link of burning, namely the chip initialization method, data writing mode and verification rule content.
[0096] The data receiving interface receives the data to be programmed after being pre-processed by the data processing module, and prepares for the subsequent writing of data to the FLASH chip;
[0097] The chip initialization circuit receives the chip initialization requirements in the instructions received by the instruction receiving interface, completes the operations of resetting the chip, setting the chip working mode, and initializing the address pointer, sends the corresponding control signal to the FLASH chip, completes the initialization of the FLASH chip, and creates a suitable initial state for subsequent data writing;
[0098] The data writing circuit writes the data into the designated address space of the FLASH chip byte by byte or block by block according to the instruction requirements and the received data through the instruction receiving interface, and monitors the writing status of the chip in real time;
[0099] The verification circuit reads and verifies the data in the FLASH chip according to the set CRC verification method after writing a certain 1024 bytes, compares the read data with the original data to be burned, and determines the correctness of the data written;
[0100] The error handling circuit takes corresponding measures according to the type and severity of the error and the preset error handling strategy. The error handling strategy is to try to rewrite the data for minor data errors and mark the error location and generate a detailed error report for more serious address errors.
[0101] The status monitoring and feedback circuit feeds back the status information of the FLASH chip writing completion mark, whether the chip is busy and whether there is any abnormality to the external user interface, so that the whole system can grasp the burning progress and chip status in real time, which is convenient for making corresponding decisions and operational adjustments;
[0102] The control signal coordination circuit coordinates and manages the work of each sub-module. According to the overall programming process and the feedback of each stage, the control signal is sent to each sub-module in an orderly manner to ensure that the programming process is carried out smoothly and accurately.
[0103] The internal structure of the communication interface module is as follows: Figure 5 As shown, it includes multiple interface adapter modules, protocol conversion logic, data cache and buffer circuit, communication control logic and circuit, data encapsulation and decapsulation circuit and error detection and processing circuit;
[0104] A variety of interface adapter modules are used to adapt to different types of external device connections, including USB interfaces, serial ports, and Ethernet interfaces.
[0105] The protocol conversion logic converts the received data and instructions of different protocols uniformly, and converts the data and instructions into a common format that can be recognized and processed by other modules in the system according to the standard communication protocol format set within the system;
[0106] The data cache and buffer circuit has a data cache space of a certain capacity, which temporarily stores the data and instructions to be transmitted after the protocol conversion logic conversion, plays a buffering role, coordinates the data transmission rate differences between different modules, and ensures the stability and continuity of data transmission;
[0107] The communication control logic and circuit controls the communication operation of each interface in the multiple interface adapter modules, coordinates the communication with the FLASH chip according to the system requirements, sends control signals to the FLASH chip, and receives feedback information from the FLASH chip;
[0108] The data encapsulation and decapsulation circuit encapsulates the data according to the communication protocol format required by the FLASH chip, that is, adds the necessary frame header, frame trailer and check bit information to make it conform to the communication specifications of the chip. When receiving data fed back by the FLASH chip, it decapsulates the data, removes the added format information, restores it to the original data format, and then outputs it to the data cache and buffer circuit.
[0109] Error detection and processing circuit: Receives various status information during the communication process to detect whether there is a communication error, i.e. data loss, checksum error and connection interruption. Once an error is detected, the unit will handle it accordingly according to the pre-set error handling strategy, i.e. try to re-establish the connection, request data retransmission or issue an error prompt to the system.
[0110] The present invention provides a configuration method of a FLASH programming system with configurable instructions, the specific steps of which are:
[0111] Step 1: The user selects or inputs the FLASH chip model, programming address range and programming mode through the graphical interface or command line interface provided by the system. The user can select common chip models, or input uncommon chip models through the manual input box. For the programming address range, the user directly enters the start address and end address in the input box, or makes a visual selection through the address selector on the graphical interface;
[0112] Step 2: The instruction configuration module quickly searches the internal large and efficient instruction library based on the information entered by the user to find the corresponding instruction template; the specific steps are:
[0113] Step 2.1: The instruction library is classified and stored according to different chip models for quick retrieval; different chips correspond to their own instruction template sets; when the user enters the chip model, the instruction configuration module locates the instruction template of the fast mode of the chip;
[0114] Step 2.2: If a matching instruction template is successfully found, the instruction configuration module will instantiate the template according to the burning address range and verification method entered by the user. The instruction configuration module will replace the corresponding placeholder in the template with the burning address range, generate instructions specific to the address range, and add relevant CRC verification setting instructions to the instructions;
[0115] If no fully matching instruction template is found in the instruction library, the system prompts the user to manually input the instruction through a pop-up window or voice prompt. The user manually enters the corresponding instruction in the instruction input area according to the manual of the FLASH chip; the instruction configuration module performs a strict legality check on the instruction input by the user, including the syntax structure, parameter format and value range of the instruction, that is, checks whether the instruction complies with the instruction specification of the chip and whether the parameter is within the range supported by the chip; if the instruction does not meet the requirements, the user is prompted with an error message and is required to re-enter the instruction;
[0116] Step 2.3: After the legality check, the correct instructions are received by the instruction configuration module to generate the corresponding instruction sequence; the instruction configuration module matches and analyzes the manually input instructions with the existing internal instruction templates to extract the commonalities and rules, so as to continuously enrich and improve the instruction library; at the same time, for some special instruction formats or parameter settings, the module records and marks them to provide a basis for subsequent optimization and improvement;
[0117] Step 2.4: The instruction sequence obtained through template instantiation or manual input processing is sent to the burning control module, ready to enter the burning operation link; during the sending process, the instruction configuration module encrypts and verifies the instruction sequence to ensure the security and integrity of the instructions during transmission.
[0118] The present invention also provides a method for burning a FLASH burning system with configurable instructions, the specific steps of which are:
[0119] Step 1: After receiving the instruction sequence, the burning control module first initializes the FLASH chip. Sending a chip reset instruction is the first step of initialization. Flash chips are divided into two categories: high-level reset and low-level reset. According to the chip model, a reset signal with a corresponding pulse width is sent to the FLASH chip to restore the chip to its initial state and clear possible errors or unstable states (i.e., byte order confusion, data offset, write position error, write protection failure, command recognition error, command interruption or timeout, etc.). Then, according to the chip model and burning mode specified in the instruction sequence, the chip's working mode is set, including read-write mode and programming mode.
[0120] Step 2: According to the address information in the instruction sequence, the burning control module writes the data sent by the data processing module into the FLASH chip byte by byte; during the writing process, the corresponding operation is performed according to the requirements of the instruction; as to whether to perform data verification, the module judges according to the settings in the instruction. If the instruction requires verification, after each data block is written (which can be a byte, word or page, depending on the characteristics of the chip and the instruction setting), the CRC verification calculation is performed immediately; the calculated verification value is compared with the pre-calculated correct verification value to ensure that the written data is accurate; if the verification passes, continue to write the next data block; if the verification fails, perform corresponding operations according to the error handling strategy, such as rewriting the data block or marking the error position and notifying the user;
[0121] Step 3: During the data writing process, the programming control module determines whether to use the burst writing mode according to the instruction; for the FLASH chip that supports burst writing, that is, when a large amount of continuous data exceeding 8 bytes needs to be written, enabling the burst writing mode significantly improves the writing efficiency. In this mode, the module combines multiple data bytes into a burst data block at one time, and then quickly writes the data into the chip through the burst writing interface of the chip; for a chip that supports 4-byte burst writing, in the burst writing mode, 4 bytes of data are written into the chip at the same time, instead of writing byte by byte, which greatly reduces the number and time overhead of the writing operation;
[0122] At the same time, the writing control module monitors the writing status of the FLASH chip in real time, including the writing completion flag and the busy status, and obtains the current working status of the chip through the status pin of the chip or through a specific status query instruction; if the chip is in a busy state, it means that an internal writing operation or other processing is in progress, and data transmission is suspended, and writing can continue after the chip completes the current operation to avoid data conflicts and errors;
[0123] Step 4: After writing data exceeding 1024 bytes, the programming control module reads the data in the FLASH chip more comprehensively for deep verification according to the instruction requirements. It not only simply compares the consistency of the data, but also conducts multiple checks on the integrity of the data and the correctness of the storage location. The read data is compared byte by byte with the original data, and the storage address of the data in the chip is checked to see if it is consistent with the expected one. If any data error or address inconsistency is found, the corresponding error correction measures are taken according to the type and severity of the error. For some minor data errors, try to rewrite the data. For more serious errors, such as address errors or data corruption caused by internal chip failures, the error location is marked in time, and a detailed error report is sent to the user, including the error type, location, and possible cause.
[0124] Step 5: When the entire burning task is completed, the burning control module comprehensively summarizes and analyzes the burning results; generates a detailed burning report, including an overall judgment on whether the burning is successful, whether there are any errors during the burning process, and the specific location and number of errors; if the burning is successful, feedback a success message to the user and provide some relevant statistical information, such as the time used for burning and the average writing speed, so that the user can evaluate and optimize the burning process; if an error occurs, in addition to reporting the error information, according to the nature of the error and the configuration of the system, provide some suggested solutions, such as whether it is necessary to re-burn and whether it is necessary to check the chip hardware connection; finally, the burning control module sends the burning results and related reports to the user interface or other related system modules, so that the user can understand the burning situation in time and perform subsequent processing.
[0125] The key points of the present invention are:
[0126] 1. Design and implementation of instruction configuration module:
[0127] The algorithm of the instruction configuration module is one of the key points of the present invention. The algorithm can intelligently parse various parameters input by the user, and quickly and accurately find the appropriate instruction template in the rich instruction library or perform reasonable manual instruction processing based on these parameters. The algorithm should take into account the combination of various factors such as different chip models, programming modes, address ranges, etc., to ensure that the generated instruction sequence meets both the chip requirements and the user's specific programming needs.
[0128] The structural design of the instruction library is also key. The instruction library needs to store a large number of instruction templates in a reasonable classification method for fast retrieval and matching. At the same time, it must have good scalability and be able to easily add instruction templates for new chip models and programming modes.
[0129] The interactive mode of the user interface is an important part of the instruction configuration module. An intuitive and easy-to-use user interface is designed so that users can easily input the burning configuration information and obtain feedback and prompts from the system in a timely manner. At the same time, when the user enters incorrect or incomplete information, clear prompt information can be given in time to guide the user to operate correctly. The points to be protected include various aspects such as the algorithm of the above-mentioned instruction configuration module, the structure of the instruction library, and the interactive mode of the user interface, so as to prevent others from unauthorized copying and imitation of the core functions of the module, and ensure the uniqueness and advantages of the present invention in instruction configuration.
[0130] 2. Optimization algorithm of burning control module:
[0131] The data writing and verification algorithms in the programming control module are crucial to ensure programming efficiency and data accuracy. In terms of data writing, a reasonable writing strategy is adopted, such as automatically selecting the appropriate writing method according to the chip's read-write characteristics and data volume to increase the writing speed. At the same time, the reliability of the data should be taken into consideration, and real-time verification and error handling should be performed during the writing process.
[0132] The implementation of the verification algorithm is the key to ensuring data accuracy. CRC verification is used to fully verify the written data. When data errors are found, the error position can be accurately located and effective error correction measures can be taken, such as rewriting the data or marking the error for subsequent processing. The verification algorithm must be efficient and accurate, and can detect data errors in a timely manner without causing excessive impact on the programming speed.
[0133] The error handling mechanism is an important part of the programming control module. When various errors occur during the programming process, including chip communication failure, write error and verification failure, the system can take corresponding measures according to the type and severity of the error. The protection points include write strategy, implementation of verification algorithm and error handling mechanism, etc., to prevent others from bypassing the core technology of the present invention through simple technical improvements, and maintain the innovation and reliability of the present invention in programming control.
[0134] 3. The overall architecture and compatibility design of the system:
[0135] The overall architecture of the present invention integrates various modules and realizes efficient FLASH burning function. The communication protocol and interface design between various modules are key to ensure accurate and fast transmission of data and instructions between modules. Standardized communication protocols and interface specifications are adopted to enable the command configuration module to communicate seamlessly with the burning control module, the data processing module and the communication interface module, thereby improving the overall operation efficiency of the system.
[0136] The compatibility solution of the system is one of the important features of the present invention. Through flexible instruction configuration and optimized module design, it can adapt to the different characteristics and requirements of various FLASH chips. Whether it is a FLASH chip from a different manufacturer, a different model or a different specification, the system can achieve reliable burning operation through reasonable configuration and adjustment. For the newly launched FLASH chip, only the corresponding instruction template needs to be added to the instruction library or the existing template is appropriately adjusted, and the system can quickly adapt to the burning requirements of the new chip. The protection points include the communication protocol, interface design and overall compatibility solution between the modules of the system, so as to maintain the unique advantages of the present invention in different application scenarios and ensure the wide applicability and leading position of the system in the field of FLASH burning.
[0137] In view of the problem of poor flexibility of the prior art, the present invention provides users with great flexibility and convenience through the design of configurable instructions. Users can easily configure instructions in the system according to FLASH chips of different models and specifications, as well as various complex burning requirements. Whether facing new models of chips or special burning tasks, there is no need to perform tedious hardware adjustments or a lot of software development work.
[0138] To solve the shortcoming of low programming efficiency, the programming control module of the present invention adopts a series of optimized algorithms and strategies. Firstly, the programming mode is automatically adjusted according to the read-write characteristics and data features of the FLASH chip through intelligent programming strategy selection.
[0139] In terms of compatibility, since the instruction configuration module of the present invention has a rich instruction library and a flexible configuration mechanism, as well as an optimized design of the overall system architecture, it can widely support a variety of different FLASH chips. Whether it is a mainstream or some relatively niche FLASH chip model, the corresponding configuration scheme can be found in this system to achieve reliable burning operations. This makes it possible for electronic product manufacturers to no longer be restricted by the compatibility of the burning system when choosing FLASH chips, and to freely choose suitable chips based on the performance requirements and cost considerations of the product. At the same time, it also reduces the cost and management complexity of equipping a variety of different burning devices due to chip compatibility issues.
Claims
1. A FLASH programming system with configurable instructions, comprising an instruction configuration module, a data processing module, a programming control module and a communication interface module, characterized in that: In the FLASH burning system with configurable instructions, the instruction configuration module receives various configuration instructions input by the user, and generates an instruction sequence suitable for the target FLASH chip according to the configuration instructions and the built-in algorithm, and the generated instruction sequence is sent to the burning control module to prepare for the burning operation. The data processing module pre-processes the data to be burned according to the settings of the instruction configuration module, that is, performs data format conversion, check code calculation and data encryption operations on the data to be burned. The burning control module controls each link of the burning process according to the instruction sequence provided by the instruction configuration module and the data pre-processed by the data processing module to ensure that the data is accurately written into the FLASH chip. When the entire burning task is completed, the burning control module feeds back the burning result to the user, and the burning result includes whether the burning is successful, whether an error occurs and the specific location of the error, so that the user can understand the burning situation in time and perform subsequent processing; the communication interface module receives the instructions and data sent by the external device, and sends the feedback information of the system back to the external device in time. The communication interface module supports multiple communication protocols to meet the connection requirements of different application scenarios and devices.
2. The FLASH programming system with configurable instructions according to claim 1, characterized in that: The command configuration module includes a microcontroller, a clock circuit, an EEPROM, a key circuit, a serial communication interface, a display, a power supply, a command output interface and a status feedback interface; The microcontroller is responsible for the control and coordination of the entire module, and has rich GPIOs for connecting to other functional units; it has storage resources, including internal flash memory for storing program code and instruction template library; The clock circuit uses an external crystal oscillator, which is connected to the clock pin of the microcontroller to provide a stable clock signal for the microcontroller. Through the internal clock multiplication and division circuits, the microcontroller generates clock signals of various required frequencies to meet the working timing requirements of different modules. The EEPROM is used to store a large number of instruction templates and is connected to the microcontroller through the I2C interface. The microcontroller performs read and write operations on the EEPROM to store, read and update the instruction templates. The key circuit receives simple operation instructions from the user, uses independent keys to select chip models and switch programming modes. When the key is pressed, the corresponding GPIO pin level changes, and the microcontroller recognizes the user's key operation by detecting the change in the pin level. The serial communication interface uses a UART chip to convert the UART signal of the microcontroller into the RS-232 level standard so that the microprocessor can communicate with external devices via serial ports; The display interface is connected to the microprocessor to display the relevant information of the command configuration, that is, the currently selected chip model and burning parameters, so that users can intuitively understand the configuration; The buzzer circuit is connected to the microprocessor and alerts the user by sound when the user makes an operation error or the system encounters an abnormality; The power chip converts the external input power voltage into the voltage 3.3V required by the command configuration module; The command output interface is connected to the programming control module through a group of GPIO pins, and transmits the generated command sequence to the programming control module in the form of parallel data; The state feedback interface receives the state information fed back by the burning control module, is connected to the burning control module through the GPIO pin, and the microcontroller processes according to the received state information.
3. The FLASH programming system with configurable instructions according to claim 1, characterized in that: The data processing module includes a data receiving interface, a data format conversion circuit, a check code calculation circuit, a data encryption circuit, an instruction adaptation processing circuit, a data output interface and a control signal interface; The data receiving interface receives the data to be burned from the outside and transmits it to the data format conversion circuit. This interface is adapted to a variety of data transmission protocols to ensure that data from different sources can be received; The data format conversion circuit includes a format conversion logic, which converts the received data of different formats and sources into a format suitable for the storage requirements of the target FLASH chip and then inputs it into the check code calculation circuit; The check code calculation circuit calculates the check code for the input data according to the pre-configured CRC check algorithm, and then transmits the data with the check code to the data encryption circuit; The data encryption circuit uses the selected encryption standard AES algorithm to encrypt the data to ensure the security of the data; After receiving the data output by the checksum calculation circuit, the instruction adaptation processing submodule further adapts the data according to the instruction information transmitted by the instruction configuration module to ensure that the data length and data arrangement mode fully meet the requirements of the current programming task for the target FLASH chip; The data output interface outputs the data after the instruction adaptation processing submodule to the burning control module, and also ensures the stability and accuracy of data transmission, and connects with the burning control module in accordance with the corresponding communication protocol; The instruction configuration module guides the workflow and parameter settings of each submodule of the data processing module through control signals, so that the data processing process can be flexibly adjusted according to different burning requirements.
4. The FLASH programming system with configurable instructions according to claim 1, characterized in that: The programming control module includes a command receiving interface, a data receiving interface, a chip initialization circuit, a data writing circuit, a verification circuit, an error handling submodule, a state monitoring and feedback circuit, and a control signal coordination circuit; The instruction receiving interface receives the instruction sequence for guiding the programming operation transmitted from the instruction configuration module. The instruction sequence covers the requirements of each link of programming, namely, the chip initialization method, data writing mode and verification rule content; The data receiving interface receives the data to be programmed after being pre-processed by the data processing module, and prepares for the subsequent writing of data to the FLASH chip; The chip initialization circuit receives the chip initialization requirements in the instructions received by the instruction receiving interface, completes the operations of resetting the chip, setting the chip working mode, and initializing the address pointer, sends the corresponding control signal to the FLASH chip, completes the initialization of the FLASH chip, and creates a suitable initial state for subsequent data writing; The data writing circuit writes the data into the designated address space of the FLASH chip byte by byte or block by block according to the instruction requirements and the received data through the instruction receiving interface, and monitors the writing status of the chip in real time; The verification circuit reads and verifies the data in the FLASH chip according to the set CRC verification method after writing a certain 1024 bytes, compares the read data with the original data to be burned, and determines the correctness of the data written; The error handling circuit takes corresponding measures according to the type and severity of the error and the preset error handling strategy. The error handling strategy is to try to rewrite the data for minor data errors and mark the error location and generate a detailed error report for more serious address errors. The status monitoring and feedback circuit feeds back the status information of the FLASH chip writing completion mark, whether the chip is busy and whether there is any abnormality to the external user interface, so that the whole system can grasp the burning progress and chip status in real time, which is convenient for making corresponding decisions and operational adjustments; The control signal coordination circuit coordinates and manages the work of each sub-module. According to the overall programming process and the feedback of each stage, the control signal is sent to each sub-module in an orderly manner to ensure that the programming process is carried out smoothly and accurately.
5. The FLASH programming system with configurable instructions according to claim 1, characterized in that: The communication interface module includes multiple interface adapter modules, protocol conversion logic, data cache and buffer circuits, communication control logic and circuits, data encapsulation and decapsulation circuits, and error detection and processing circuits; A variety of interface adapter modules are used to adapt to different types of external device connections, including USB interface, serial port and Ethernet interface; The protocol conversion logic converts the received data and instructions of different protocols uniformly, and converts the data and instructions into a common format that can be recognized and processed by other modules in the system according to the standard communication protocol format set within the system; The data cache and buffer circuit has a data cache space of a certain capacity, which temporarily stores the data and instructions to be transmitted after the protocol conversion logic conversion, plays a buffering role, coordinates the data transmission rate differences between different modules, and ensures the stability and continuity of data transmission; The communication control logic and circuit controls the communication operation of each interface in the multiple interface adapter modules, coordinates the communication with the FLASH chip according to the system requirements, sends control signals to the FLASH chip, and receives feedback information from the FLASH chip; The data encapsulation and decapsulation circuit encapsulates the data according to the communication protocol format required by the FLASH chip, that is, it adds the necessary frame header, frame footer and check bit information to make it conform to the communication specification of the chip. When receiving the data fed back by the FLASH chip, it decapsulates the data, removes the added format information, restores it to the original data format, and outputs it to the data cache and buffer circuit; The error detection and processing circuit receives various status information during the communication process to detect whether a communication error occurs, that is, whether there is data loss, verification error, and connection interruption. Once an error is detected, the error detection and processing circuit performs corresponding processing according to the pre-set error handling strategy, that is, trying to re-establish the connection, requesting data retransmission, or issuing an error prompt to the system.
6. A method for configuring a FLASH programming system using the configurable instructions of claim 1, characterized in that The steps include: Step 1: The user selects or inputs the FLASH chip model, programming address range and programming mode through the graphical interface or command line interface provided by the system. The user can select common chip models, or input uncommon chip models through the manual input box. For the programming address range, the user directly enters the start address and end address in the input box, or makes a visual selection through the address selector on the graphical interface; Step 2: The instruction configuration module quickly searches the internal large and efficient instruction library based on the information entered by the user to find the corresponding instruction template; the specific steps are: Step 2.1: The instruction library is classified and stored according to different chip models for quick retrieval; different chips correspond to their own instruction template sets; when the user enters the chip model, the instruction configuration module locates the instruction template of the fast mode of the chip; Step 2.2: If a matching instruction template is successfully found, the instruction configuration module will instantiate the template according to the burning address range and verification method entered by the user. The instruction configuration module will replace the corresponding placeholder in the template with the burning address range, generate instructions specific to the address range, and add relevant CRC verification setting instructions to the instructions; If no fully matching instruction template is found in the instruction library, the system prompts the user to manually input the instruction through a pop-up window or voice prompt. The user manually enters the corresponding instruction in the instruction input area according to the manual of the FLASH chip; the instruction configuration module performs a strict legality check on the instruction input by the user, including the syntax structure, parameter format and value range of the instruction, that is, checks whether the instruction complies with the instruction specification of the chip and whether the parameter is within the range supported by the chip; if the instruction does not meet the requirements, the user is prompted with an error message and is required to re-enter the instruction; Step 2.3: After the legality check, the correct instructions are received by the instruction configuration module to generate the corresponding instruction sequence; the instruction configuration module matches and analyzes the manually input instructions with the existing internal instruction templates to extract the commonalities and rules, so as to continuously enrich and improve the instruction library; at the same time, for some special instruction formats or parameter settings, the module records and marks them to provide a basis for subsequent optimization and improvement; Step 2.4: The instruction sequence obtained through template instantiation or manual input processing is sent to the burning control module, ready to enter the burning operation link; during the sending process, the instruction configuration module encrypts and verifies the instruction sequence to ensure the security and integrity of the instructions during transmission.
7. A method for burning a FLASH burning system using the configurable instructions of claim 1, characterized in that The steps include: Step 1: After receiving the instruction sequence, the programming control module first initializes the FLASH chip. Sending a chip reset instruction is the first step of initialization. Flash chips are divided into two categories: high-level reset and low-level reset. According to the chip model, a reset signal with a corresponding pulse width is sent to the FLASH chip to restore the chip to its initial state and clear any errors or unstable states that may exist. Then, according to the chip model and programming mode specified in the instruction sequence, the chip's working mode is set, including read-write mode and programming mode. Step 2: According to the address information in the instruction sequence, the burning control module writes the data sent by the data processing module into the FLASH chip byte by byte; During the writing process, the module performs corresponding operations according to the requirements of the instruction. The module determines whether to perform data verification according to the settings in the instruction. If the instruction requires verification, the module performs CRC verification calculation immediately after each data block is written. The calculated verification value is compared with the pre-calculated correct verification value to ensure that the written data is accurate. If the verification passes, continue writing the next data block; If the check fails, take corresponding actions according to the error handling strategy, such as rewriting the data block or marking the error location and notifying the user; Step 3: During the data writing process, the programming control module determines whether to use the burst writing mode according to the instruction; for the FLASH chip that supports burst writing, that is, when a large amount of continuous data exceeding 8 bytes needs to be written, enabling the burst writing mode significantly improves the writing efficiency. In this mode, the module combines multiple data bytes into a burst data block at one time, and then quickly writes the data into the chip through the burst writing interface of the chip; for a chip that supports 4-byte burst writing, in the burst writing mode, 4 bytes of data are written into the chip at the same time, instead of writing byte by byte, which greatly reduces the number and time overhead of the writing operation; At the same time, the writing control module monitors the writing status of the FLASH chip in real time, including the writing completion flag and the busy status, and obtains the current working status of the chip through the status pin of the chip or through a specific status query instruction; if the chip is in a busy state, it means that an internal writing operation or other processing is in progress, and data transmission is suspended, and writing can continue after the chip completes the current operation to avoid data conflicts and errors; Step 4: After writing data exceeding 1024 bytes, the programming control module reads the data in the FLASH chip more comprehensively according to the instruction requirements for in-depth verification. It not only simply compares the consistency of the data, but also conducts multiple checks on the integrity of the data and the correctness of the storage location; it compares the read data with the original data byte by byte, and checks whether the storage address of the data in the chip is consistent with the expectation; If any data errors or address inconsistencies are found, take appropriate correction measures according to the type and severity of the error; for some minor data errors, try to rewrite the data; for more serious errors, such as address errors or data corruption caused by internal chip failures, mark the error location in time and send a detailed error report to the user, including the error type, location and possible cause; Step 5: When the entire programming task is completed, the programming control module will comprehensively summarize and analyze the programming results; generate a detailed programming report, including the overall judgment of whether the programming is successful, whether there are any errors during the programming process, and the specific location and number of errors; if the programming is successful, feedback the success message to the user, and provide some relevant statistical information, such as the time used for programming and the average writing speed, so that the user can evaluate and optimize the programming process; If an error occurs, in addition to reporting the error information, some suggested solutions are provided based on the nature of the error and the system configuration, such as whether re-burning is required and whether the chip hardware connection needs to be checked; finally, the burning control module sends the burning results and related reports to the user interface or other related system modules so that the user can understand the burning status in time and perform subsequent processing.
Citation Information
Cited By
Intelligent data burning method and system based on data stream
CN120406969A
Intelligent data burning method and system based on data stream
CN120406969B
SPD burning method and system based on serial port instruction and embedded controller
CN120704600A