1553B-based FLASH parameter online burning and storage method

By writing parameters into two separate FLASH sectors in the aerospace system and using the 1553B bus for isolated transmission of instructions and data, the problems of high storage costs and data loss caused by the small number of FLASH sectors are solved, achieving double insurance and improved reliability of parameter storage.

CN116302018BActive Publication Date: 2026-07-10HUBEI SANJIANG AEROSPACE HONGFENG CONTROL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI SANJIANG AEROSPACE HONGFENG CONTROL
Filing Date
2023-03-29
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In aerospace systems, when the number of FLASH sectors is small, parameter storage costs are high and data loss can occur due to power outages or abnormal operations, which existing technologies struggle to effectively address.

Method used

The parameters are written to two different sectors. The first sector stores the current parameters to be written, and the second sector stores the historical parameters to be written. Data backup is performed during the writing process. The 1553B bus is used for isolated transmission of instructions and data to improve reliability.

Benefits of technology

It provides double protection to prevent data loss due to accidental power failure during the writing or erasing process, and makes full use of FLASH sectors to improve parameter storage capacity and the reliability of program writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302018B_ABST
    Figure CN116302018B_ABST
Patent Text Reader

Abstract

The application discloses a FLASH parameter on-line burning and storing method based on 1553B, which comprises the following steps: dividing a first parameter sector and a second parameter sector in a FLASH sector, wherein the first parameter sector is used for storing parameters to be burned currently, and the second parameter sector is used for storing historical burned parameters; obtaining the parameters to be burned, reading historical data stored in the first parameter sector in the last stage, storing the historical data into the second parameter sector and erasing the historical data in the first parameter sector; and writing the obtained burned parameters into the first parameter sector. According to the application, the parameters are written in two different sectors respectively, so that double insurance is provided in the burning process, data is prevented from being eliminated when unexpected power-off occurs in the burning or erasing process, and each sector of the FLASH is fully utilized, and the parameter storage capacity is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embedded parameter storage and 1533B bus application technology, and more specifically, to a method for online programming and storage of FLASH parameters based on 1553B. Background Technology

[0002] Due to the high reliability of the 1553B bus during communication, it is being used more and more frequently in aerospace systems and is suitable for large-scale systems.

[0003] In aerospace products, many standalone devices need to store a large number of parameters. While storing one set of parameters per FLASH sector simplifies the storage method, it also requires ensuring a sufficient number of FLASH sectors, thus increasing costs. Therefore, using the 1553B bus for online parameter programming and storage when the number of FLASH sectors is relatively small is an important research direction in the field of embedded software.

[0004] Furthermore, during the FLASH programming process, if a power outage or an abnormal FLASH erase / write operation occurs, the address space where the data is stored will be partially or completely restored to its initial state and cannot be saved. Summary of the Invention

[0005] To address at least one deficiency or improvement requirement of the existing technology, this invention provides an online FLASH parameter programming and storage method based on 1553B. The parameters are written to two different sectors, which provides double protection during the programming process to prevent data loss in the event of an accidental power outage, and makes full use of each sector of the FLASH, thereby improving the parameter storage capacity.

[0006] To achieve the above objectives, according to a first aspect of the present invention, a method for online programming and storage of FLASH parameters based on 1553B is provided, the method comprising:

[0007] The FLASH sector is divided into a first parameter sector and a second parameter sector. The first parameter sector is used to store the parameters to be programmed now, and the second parameter sector is used to store the parameters programmed in the past.

[0008] Obtain the parameters to be burned, read the historical data stored in the first parameter sector in the previous stage, store the historical data in the second parameter sector and erase the historical data in the first parameter sector;

[0009] Write the obtained programming parameters into the first parameter sector.

[0010] Furthermore, in the above-mentioned FLASH parameter online programming and storage method based on 1553B, the first parameter sector is a sector that can store a set of parameters, and the second parameter sector includes multiple sectors, and each sector can store multiple sets of parameters.

[0011] Furthermore, in the above-mentioned online programming and storage method for FLASH parameters based on 1553B, the FLASH sector further includes a first group of number sectors and a second group of number sectors. The first group of number sectors is used to store the number of groups of parameters already stored in the current storage sector of the second parameter sector, and the second group of number sectors is used to store the maximum number of groups of stored parameters.

[0012] Furthermore, the above-mentioned online programming and storage method for FLASH parameters based on 1553B also includes:

[0013] Determine the size of the number of stored parameter groups in the current storage sector of the second parameter sector and the maximum number of stored parameter groups. If the number of stored parameter groups in the current storage sector of the second parameter sector is less than the maximum number of stored parameter groups, then concatenate the data in the current storage sector of the second parameter sector with the historical data read from the first parameter sector and burn it into the current storage sector.

[0014] If the number of stored parameter groups in the current storage sector of the second parameter sector is equal to the maximum number of stored parameter groups, then the next sector of the current storage sector of the second parameter sector is taken as the latest storage sector, and the historical data read from the first parameter sector is burned into the latest storage sector.

[0015] Furthermore, the above-mentioned online programming and storage method for FLASH parameters based on 1553B also includes:

[0016] When a set of parameters is stored in the current storage sector of the second parameter sector, the number of stored parameter sets is updated by incrementing the number of stored parameter sets by one. The updated number of stored parameter sets is then compared with the maximum number of stored parameter sets. If the updated number of stored parameter sets is greater than the maximum number of stored parameter sets, the maximum number of stored parameter sets is assigned to the updated number of stored parameter sets. If the updated number of stored parameter sets is less than the maximum number of stored parameter sets, the updated number of stored parameter sets remains unchanged.

[0017] Furthermore, in the above-mentioned online FLASH parameter programming and storage method based on 1553B, parameter acquisition and caching are required before the programming begins, specifically including:

[0018] The DSP is powered on and initialized. After initialization, the host computer sends a parameter programming instruction through the first sub-address. After receiving the parameter programming instruction, the DSP sends a first response instruction through the first sub-address. After receiving the first response instruction, the host computer verifies the instruction. If the verification is successful, it proceeds to the next step; otherwise, it prompts an error.

[0019] The host computer parses the parameter burning file and transmits data through the second sub-address. For each frame of data transmitted, the DSP buffers the data and sends a second response command. After receiving the second response command, the host computer verifies the command. If the verification is successful, it proceeds to the next step; otherwise, it prompts an error.

[0020] Repeat the above steps until all data has been transmitted and cached;

[0021] After the data transmission is complete, the DSP writes the cached data into the FLASH memory.

[0022] Furthermore, the above-mentioned online FLASH parameter programming and storage method based on 1553B further includes: comparing the successfully programmed data of FLASH with the data cached by the DSP; if the data are consistent, the DSP issues a programming success response command.

[0023] Furthermore, the above-mentioned online programming and storage method for FLASH parameters based on 1553B also includes:

[0024] The host computer receives the successful programming response command, and after receiving the command, determines whether the parameter programming was successful. If the programming was successful, it issues an exit programming command.

[0025] After receiving the exit programming command, the DSP clears all parameter programming flags.

[0026] According to a second aspect of the present invention, a terminal device is also provided, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of any of the methods described above.

[0027] According to a third aspect of the invention, a computer-readable medium is also provided, which stores a computer program executable by a terminal device, which, when run on the terminal device, causes the terminal device to perform the steps of any of the methods described above.

[0028] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0029] (1) The online programming and storage method of FLASH parameters based on 1553B provided by the present invention divides the first parameter sector and the second parameter sector. The historical data stored in the previous stage is read in the first parameter sector and stored in the second parameter sector. The historical data in the first parameter sector is erased and the parameters to be programmed are written. This method writes the parameters in two different sectors, which can provide double insurance in the programming process, prevent the data from being destroyed when there is an accidental power failure in the programming or erasing process, and make full use of each sector of FLASH, thereby improving the parameter storage capacity.

[0030] (2) The FLASH parameter online burning and storage method based on 1553B provided by the present invention is adopted. The instruction is sent through the first sub-address and the data is sent through the second sub-address, which achieves the isolation of instruction and data frame transmission. In addition, the DSP will issue a corresponding response instruction for each instruction or data frame sent by the host computer, thereby enhancing the reliability of program burning. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A schematic diagram illustrating the parameter acquisition and caching process provided in the embodiments of this application;

[0033] Figure 2 This is a schematic diagram illustrating the online programming process for FLASH parameters provided in this application embodiment;

[0034] Figure 3 This is a flowchart illustrating an example of online FLASH parameter programming provided in this application embodiment. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0036] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0037] On the one hand, this application provides a method for online programming and storage of FLASH parameters based on 1533B, which includes the following steps:

[0038] Figure 1 This is a schematic diagram of the parameter acquisition and caching process provided in the embodiments of this application, such as... Figure 1 As shown, the DSP first performs power-on initialization. After initialization, the host computer sends a parameter programming instruction through the first sub-address. After receiving the parameter programming instruction, the DSP sends a first response instruction through the first sub-address RT1. After receiving the first response instruction, the host computer verifies the instruction. If the verification is successful, it proceeds to the next step; otherwise, it prompts an error.

[0039] The host computer parses the parameter programming file and transmits data through the second sub-address RT2. For each frame of data transmitted, the DSP buffers the data and sends a second response command. Upon receiving the second response command, the host computer verifies it. If the verification is successful, it continues transmitting the next frame of data until the last frame is transmitted; otherwise, an error is displayed. Furthermore, the response command for the last frame of data should only be sent after the data programming is complete.

[0040] After the data transmission is complete, the DSP writes the cached data into the FLASH memory. The successfully written data in the FLASH memory is compared with the data cached by the DSP. If the data match, the DSP issues a successful writing response command; otherwise, the writing fails.

[0041] Furthermore, Figure 2 This is a schematic diagram of the online programming process for FLASH parameters provided in the embodiments of this application, as shown below. Figure 2 As shown, the online programming process for FLASH parameters includes the following steps:

[0042] The FLASH sector is divided into two parts to store different types of data. The FLASH sector is divided into a first parameter sector and a second parameter sector. The first parameter sector is used to store the parameters to be written now, and the second parameter sector is used to store the parameters to be written in the past.

[0043] Obtain the parameters to be programmed, read the historical data of the first parameter sector, store the historical data in the second parameter sector, and erase the historical data of the first parameter sector.

[0044] The acquired programming parameters are grouped and written sequentially into the first parameter sector.

[0045] Furthermore, the first parameter sector is a single sector that can store a set of parameters, and the second parameter sector comprises multiple sectors, with each sector capable of storing multiple sets of parameters.

[0046] Furthermore, the FLASH sector also includes a first set of number sectors and a second set of number sectors. The first set of number sectors is used to store the number of parameter groups already stored in the current storage sector of the second parameter sector, and the second set of number sectors is used to store the maximum number of parameter groups.

[0047] The system determines whether the number of stored parameter groups in the current storage sector of the second parameter sector is greater than the maximum number of stored parameter groups. If the number of stored parameter groups in the current storage sector of the second parameter sector is less than the maximum number of stored parameter groups, the data in the current storage sector of the second parameter sector is concatenated with the historical data read from the first parameter sector and burned into the current storage sector. If the number of stored parameter groups in the current storage sector of the second parameter sector is equal to the maximum number of stored parameter groups, the next sector of the current storage sector of the second parameter sector is taken as the latest storage sector, and the historical data read from the first parameter sector is burned into the latest storage sector.

[0048] Furthermore, when storing a set of parameters to the current storage sector of the second parameter sector, the number of stored parameter sets is updated by incrementing the number of stored parameter sets by one. The updated number of stored parameter sets is then compared with the maximum number of stored parameter sets. If the updated number of stored parameter sets is greater than the maximum number of stored parameter sets, the value of the stored parameter sets is assigned to the updated number of stored parameter sets. If the updated number of stored parameter sets is less than the maximum number of stored parameter sets, the updated number of stored parameter sets remains unchanged.

[0049] After the burning process is complete, the response command for the last frame of data in the data buffer should be sent only after the data burning is complete. After receiving the response that the burning is complete, the host computer will determine whether the burning was successful. If successful, it will send an exit burning command; otherwise, it will indicate that the burning failed.

[0050] After receiving the exit programming command from the host computer, the DSP responds and clears all flags related to parameter programming.

[0051] After receiving the exit programming command, the host computer checks whether the response is correct. If it is correct, it will indicate that the exit was successful; otherwise, it will indicate that the exit failed.

[0052] Figure 3 This application provides a flowchart illustrating an example of online FLASH parameter programming. In a specific example,

[0053] S1 divides the FLASH sector into three sections: NewSection (first parameter sector), HistorySection (second parameter sector), ParaPlace (first group number sector), and ParaGroup (second group number sector). NewSection stores the parameters to be programmed currently, HistorySection stores parameters programmed in the past, ParaPlace stores the number of parameter groups already stored in the current storage sector of HistorySection, and ParaGroup stores the maximum number of parameter groups, set to N. NewSection is a single sector that can only store one set of parameters, while HistorySection comprises several sectors, each capable of storing N sets of parameters.

[0054] S2 first obtains the parameter A to be written, reads the historical data B already stored in NewSection, and erases B in NewSection. It then compares ParaPlace with N. If ParaPlace is less than N, it concatenates the read historical data B with the data C in the current storage sector of HistorySection and writes it to the current storage sector of HistorySection. If ParaPlace equals N, it uses the next sector of the current storage sector of HistorySection as the latest storage sector and writes the read historical data B to the latest storage sector.

[0055] S3 At this point, NewSection has been cleared. The parameter A to be written is written into NewSection. After the writing is completed, ParaPlace is automatically incremented by 1 to complete the update.

[0056] S4 compares (ParaPlace+1) with N. If (ParaPlace+1) is greater than N, then (ParaPlace+1) is assigned the value N. If (ParaPlace+1) is less than or equal to N, then the value of (ParaPlace+1) remains unchanged.

[0057] S5 When (ParaPlace+1) is greater than N, corresponding to the case in S2 where ParaPlace is equal to N, when storing the next set of parameters, the next sector of the current storage sector of HistorySection is used as the latest storage sector, and the read historical data B is burned into the latest storage sector. When (ParaPlace+1) is equal to or less than N, corresponding to the case in S2 where ParaPlace is less than N, when storing the next set of parameters, the historical data originally stored in NewSection is concatenated with the data in the current storage sector of HistorySection and burned into the current storage sector of HistorySection.

[0058] S6 writes the updated ParaPlace to the first set of sectors.

[0059] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0060] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0061] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0062] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0063] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0064] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0065] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

[0066] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0067] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for online programming and storage of FLASH parameters based on 1553B, characterized in that, include: The FLASH sector is divided into a first parameter sector and a second parameter sector. The first parameter sector is used to store the parameters to be programmed now, and the second parameter sector is used to store the parameters programmed in the past. Obtain the parameters to be burned, read the historical data stored in the first parameter sector in the previous stage, store the historical data in the second parameter sector and erase the historical data in the first parameter sector; Write the acquired programming parameters into the first parameter sector; The first parameter sector is a single sector that can store a set of parameters, and the second parameter sector includes multiple sectors, with each sector capable of storing multiple sets of parameters. The FLASH sector also includes a first group of number sectors and a second group of number sectors. The first group of number sectors is used to store the number of groups of parameters stored in the current storage sector of the second parameter sector, and the second group of number sectors is used to store the maximum number of groups of stored parameters. The method also includes: determining the size of the number of stored parameter groups in the current storage sector of the second parameter sector and the maximum number of stored parameter groups; if the number of stored parameter groups in the current storage sector of the second parameter sector is less than the maximum number of stored parameter groups, then the data in the current storage sector of the second parameter sector is concatenated with the historical data read from the first parameter sector and burned into the current storage sector. If the number of stored parameter groups in the current storage sector of the second parameter sector is equal to the maximum number of stored parameter groups, then the next sector of the current storage sector of the second parameter sector is taken as the latest storage sector, and the historical data read from the first parameter sector is burned into the latest storage sector.

2. The online programming and storage method for FLASH parameters based on 1553B as described in claim 1, wherein, Also includes: When a set of parameters is stored in the current storage sector of the second parameter sector, the number of stored parameter sets is updated by incrementing the number of stored parameter sets by one. The updated number of stored parameter sets is then compared with the maximum number of stored parameter sets. If the updated number of stored parameter sets is greater than the maximum number of stored parameter sets, the maximum number of stored parameter sets is assigned to the updated number of stored parameter sets. If the updated number of stored parameter sets is less than the maximum number of stored parameter sets, the updated number of stored parameter sets remains unchanged.

3. The online programming and storage method for FLASH parameters based on 1553B as described in claim 1, wherein, Before the programming parameters begin, parameter acquisition and caching are required, specifically including: The DSP is powered on and initialized. After initialization, the host computer sends a parameter programming instruction through the first sub-address. After receiving the parameter programming instruction, the DSP sends a first response instruction through the first sub-address. After receiving the first response instruction, the host computer verifies the instruction. If the verification is successful, it proceeds to the next step; otherwise, it prompts an error. The host computer parses the parameter burning file and transmits data through the second sub-address. For each frame of data transmitted, the DSP buffers the data and sends a second response command. After receiving the second response command, the host computer verifies the command. If the verification is successful, it proceeds to the next step; otherwise, it prompts an error. Repeat the above steps until all data has been transmitted and cached; After the data transmission is complete, the DSP writes the cached data into the FLASH memory.

4. The online programming and storage method for FLASH parameters based on 1553B as described in claim 3, wherein, It also includes comparing the data of successful FLASH programming with the data cached by the DSP. If the data are consistent, the DSP issues a successful programming response command.

5. The online programming and storage method for FLASH parameters based on 1553B as described in claim 4, wherein, Also includes: The host computer receives the successful programming response command, and after receiving the command, determines whether the parameter programming was successful. If the programming was successful, it issues an exit programming command. After receiving the exit programming command, the DSP clears all parameter programming flags.

6. A terminal device, characterized in that, It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method according to any one of claims 1-5.

7. A computer-readable medium, characterized in that, It stores a computer program executable by a terminal device, which, when run on the terminal device, causes the terminal device to perform the steps of the method according to any one of claims 1-5.