Firmware loading method and device, electronic equipment and storage medium

By using a microprocessor and serial peripheral interface flash memory in the target relay protection test device, the solidified file is directly written to the FPGA, which solves the problems of low firmware loading efficiency and high cost in the prior art, and realizes an efficient and convenient firmware loading process.

CN119847574APending Publication Date: 2025-04-18CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, FPGA firmware loading requires an external computer to control the programmer, resulting in low operational efficiency and high cost, and inconvenient execution in the power field.

Method used

The microprocessor in the target relay protection test device communicates with the serial peripheral interface flash memory, and the target solidified file is burned to the field programmable gate array using the serial peripheral interface, without the need for an external computer.

Benefits of technology

Improves the efficiency and convenience of firmware loading, reduces costs, and eliminates the need for format conversion operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847574A_ABST
    Figure CN119847574A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a firmware loading method and device, electronic equipment and a storage medium. The method is applied to a microprocessor in a target relay protection testing device, the microprocessor is in communication connection with a serial peripheral interface flash memory, and the serial peripheral interface flash memory is in communication connection with a field programmable gate array of firmware to be loaded in the target relay protection testing device. Determining a target curing file used for being loaded into the field programmable gate array, and transmitting the target curing file to the serial peripheral interface flash memory; and in response to firmware loading trigger operation, generating a first loading trigger signal, and based on the first loading trigger signal, controlling the serial peripheral interface flash memory to program the target curing file to the field programmable gate array through the serial peripheral interface. According to the technical scheme provided by the embodiment of the invention, the convenience of programming operation can be improved, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a firmware loading method, device, electronic device and storage medium. Background Art

[0002] As a key core component of new relay protection devices and their detection devices, FPGA (Field-Programmable Gate Array) plays an important role in the function realization of the instrument. Due to the diversity of FPGA chips, there are also many ways to load FPGA firmware.

[0003] In the prior art, the programmer is usually controlled by an external computer to load the firmware. However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: the programmer requires the firmware to be converted into a format that the programmer can recognize before the firmware can be loaded, resulting in low operation efficiency; and when performing the firmware loading operation at the power site, an external computer needs to be carried, resulting in the firmware loading operation being very inconvenient and costly. Summary of the invention

[0004] The embodiments of the present invention provide a firmware loading method, device, electronic device and storage medium to improve the burning efficiency of the target solidified file; and, the burning operation is controlled by the original microprocessor in the target relay protection test device, without adding an external computer, thereby achieving the purpose of improving the convenience of the burning operation and reducing the cost.

[0005] According to one aspect of the present invention, a firmware loading method is provided, which is applied to a microprocessor in a target relay protection test device, wherein the microprocessor is communicatively connected to a serial peripheral interface flash memory, and the serial peripheral interface flash memory is communicatively connected to a field programmable gate array of firmware to be loaded in the target relay protection test device, and the firmware loading method comprises:

[0006] In response to a firmware selection trigger operation, determining a target firmware file to be loaded into the field programmable gate array, and transmitting the target firmware file to the serial peripheral interface flash memory;

[0007] In response to a firmware loading trigger operation, a first loading trigger signal is generated, and based on the first loading trigger signal, the serial peripheral interface flash memory is controlled to burn the target fixed file into the field programmable gate array through the serial peripheral interface.

[0008] According to another aspect of the present invention, a firmware loading device is provided, which is a microprocessor disposed in a target relay protection test device, wherein the microprocessor is communicatively connected to a serial peripheral interface flash memory, and the serial peripheral interface flash memory is communicatively connected to a field programmable gate array of a firmware to be loaded in the target relay protection test device, wherein the firmware loading device comprises:

[0009] A file transfer module, for determining a target fixed file to be loaded into the field programmable gate array in response to a firmware selection trigger operation, and transferring the target fixed file to the serial peripheral interface flash memory;

[0010] The signal sending module is used to generate a first loading trigger signal in response to a firmware loading trigger operation, and based on the first loading trigger signal, control the serial peripheral interface flash memory to burn the target fixed file to the field programmable gate array through the serial peripheral interface.

[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0012] at least one processor; and

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware loading method described in any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware loading method described in any embodiment of the present invention when executed.

[0016] The technical solution of the embodiment of the present invention is applied to the microprocessor in the target relay protection test device, the microprocessor is connected to the serial peripheral interface flash memory, and the serial peripheral interface flash memory is connected to the field programmable gate array of the firmware to be loaded in the target relay protection test device; in response to the firmware selection trigger operation, the target solidified file to be loaded into the field programmable gate array is determined, and the target solidified file is transferred to the serial peripheral interface flash memory; and, in response to the firmware loading trigger operation, a first loading trigger signal is generated, and based on the first loading trigger signal, the serial peripheral interface flash memory is controlled to burn the target solidified file to the field programmable gate array through the serial peripheral interface. The technical solution of this embodiment performs the burning operation of the target solidified file through the serial peripheral interface flash memory, without the need for format conversion operation, thereby improving the burning efficiency of the target solidified file; and, the burning operation is controlled by the original microprocessor in the target relay protection test device, without the need to add an external computer, thereby improving the convenience of the burning operation and reducing the cost.

[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 is a flowchart of a firmware loading method provided according to an embodiment of the present invention;

[0020] Figure 2 is a structural schematic diagram of a firmware loading system provided according to an embodiment of the present invention;

[0021] Figure 3 is a flowchart of another firmware loading method provided according to an embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of a dynamic loading process provided according to an embodiment of the present invention;

[0023] Figure 5 is a schematic diagram of a static loading process provided according to an embodiment of the present invention;

[0024] Figure 6 is a schematic diagram of a firmware loading device provided according to an embodiment of the present invention

[0025] Figure 7 It is a structural schematic diagram of an electronic device that implements the firmware loading method of an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0028] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0029] Figure 1 This is a flowchart of a firmware loading method provided according to an embodiment of the present invention. This embodiment is applicable to the case of burning a target fixed file into a field programmable gate array. The method can be executed by a firmware loading device, which can be implemented in the form of hardware and / or software.

[0030] like Figure 1 As shown, the method may specifically include:

[0031] S110 , in response to a firmware selection trigger operation, determining a target firmware file to be loaded into a field programmable gate array, and transmitting the target firmware file to a serial peripheral interface flash memory.

[0032] The method of this embodiment is applied to a microprocessor in a target relay protection test device, the microprocessor is communicatively connected to a serial peripheral interface flash memory, and the serial peripheral interface flash memory is communicatively connected to a field programmable gate array of firmware to be loaded in the target relay protection test device.

[0033] For a clearer understanding of the firmware loading process, see Figure 2 . The microprocessor is connected to the serial peripheral interface flash memory through a serial peripheral interface bus (SPI), and the serial peripheral interface flash memory is enabled and controlled through a serial peripheral interface bus selector. The serial peripheral interface flash memory is also connected to the field programmable gate array through a serial peripheral interface bus. The microprocessor can be an ARM (Advanced RISC Machine) processor, and a software tool is deployed on the microprocessor. The software tool is used to manage and burn the solidification file. The software tool provides a user interface for user operation. The software tool calls the SHELL script to output the control instructions of the microprocessor, set the program data and control timing of the field programmable gate array, and accurately complete the data writing to the serial peripheral interface flash memory.

[0034] In this embodiment, the selection operation of the firmware display control on the user interface can be used as a firmware selection trigger operation, and the selected fixed file can be determined as the target fixed file for loading into the field programmable gate array; or, the information input and output operation of the firmware information input control on the user interface can be used as a firmware selection trigger operation, and the fixed file corresponding to the input firmware information can be used as the target fixed file for loading into the field programmable gate array.

[0035] In a specific implementation, after determining the target solidification file, the target solidification file can be sent to the serial peripheral interface flash memory through the serial peripheral device interface bus. Alternatively, when the current moment is the preset burning moment, the target solidification file can be sent to the serial peripheral interface flash memory to complete the burning operation.

[0036] S120, in response to the firmware loading trigger operation, generating a first loading trigger signal, and based on the first loading trigger signal, controlling the serial peripheral interface flash memory to burn the target fixed file into the field programmable gate array through the serial peripheral interface.

[0037] In this embodiment, a start loading control is displayed on the user interface, and a click operation on the start loading control can be used as a firmware loading trigger operation. In response to the firmware loading trigger operation, a first loading trigger signal is generated. Among them, the first loading trigger signal can be a low-level signal. It should be noted that after the FPGA program is generated, it is usually stored in the microprocessor in the form of a file. After the target relay protection device is powered on, the SPI_SELECT signal line (chip select signal line) is set to a high-impedance state, that is, it is in a non-driven state. The high-impedance state is usually used to avoid the signal line from generating an uncertain level in the absence of a clear driving source, thereby preventing possible interference or misoperation. Since the SPI_SELECT signal line is in a high-impedance state and cannot directly transmit signals, it is necessary to control the signal through a general input and output pin to set the SPI_SELECT function to a low level.

[0038] Specifically, generating a first loading trigger signal, and based on the first loading trigger signal, controlling the serial peripheral interface flash memory to burn the target solidified file to the field programmable gate array through the serial peripheral interface may include: controlling the general input and output pins to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory to generate a low-level signal to be transmitted to the serial peripheral interface flash memory, so that after the serial peripheral interface flash memory detects the low-level signal, the target solidified file is burned to the field programmable gate array through the serial peripheral interface.

[0039] In a specific implementation, the general input / output pin is controlled to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory, thereby generating a low-level signal to be transmitted to the serial peripheral interface flash memory. After the serial peripheral interface flash memory detects the low-level signal, it indicates that the serial peripheral interface flash memory is selected as the device for burning the target solidified file, and the target solidified file can be burned to the field programmable gate array through the serial peripheral interface connected to the field programmable gate array.

[0040] When burning the target solid-state file, this embodiment first pulls down the signal of the chip selection signal line through the general input and output pins, thereby ensuring that the burning operation of the target solid-state file can be accurately performed.

[0041] The technical solution of the embodiment of the present invention is applied to the microprocessor in the target relay protection test device, the microprocessor is connected to the serial peripheral interface flash memory, and the serial peripheral interface flash memory is connected to the field programmable gate array of the firmware to be loaded in the target relay protection test device; in response to the firmware selection trigger operation, the target solidified file to be loaded into the field programmable gate array is determined, and the target solidified file is transferred to the serial peripheral interface flash memory; and, in response to the firmware loading trigger operation, a first loading trigger signal is generated, and based on the first loading trigger signal, the serial peripheral interface flash memory is controlled to burn the target solidified file to the field programmable gate array through the serial peripheral interface. The technical solution of this embodiment performs the burning operation of the target solidified file through the serial peripheral interface flash memory, without the need for format conversion operation, thereby improving the burning efficiency of the target solidified file; and, the burning operation is controlled by the original microprocessor in the target relay protection test device, without the need to add an external computer, thereby improving the convenience of the burning operation and reducing the cost.

[0042] Figure 3 is a flowchart of another firmware loading method provided according to an embodiment of the present invention. Based on the above embodiment, this embodiment further includes: in response to the power-on operation of the target relay protection test device, a second loading trigger signal is generated, and the second loading trigger signal is sent to the serial peripheral interface flash memory to control the serial peripheral interface flash memory to burn the target fixed file to the field programmable gate array through the serial peripheral interface. Among them, the explanation of the terms that are the same or corresponding to the above embodiments will not be repeated here. Figure 3 As shown, the method includes:

[0043] S210 , in response to a firmware selection trigger operation, determining a target fixed file to be loaded into a field programmable gate array, and transmitting the target fixed file to a serial peripheral interface flash memory.

[0044] In order to ensure the correctness of the determined target solid-state file, optionally, in response to a firmware selection trigger operation, a target solid-state file for loading into a field programmable gate array is determined, including: in response to the firmware selection trigger operation, an alternative solid-state file is determined from at least one pre-stored solid-state file; a cyclic redundancy check is performed on the alternative solid-state file; and when the verification result of the cyclic redundancy check is a passed verification, the alternative solid-state file is used as the target solid-state file.

[0045] It should be noted that a plurality of pre-stored fixed files may be pre-stored in the microprocessor. For example, different pre-stored fixed files correspond to different versions; or, different pre-stored fixed files correspond to different field programmable gate arrays. For example, different pre-stored fixed files may be displayed on the user interface through different display controls.

[0046] In a specific implementation, the pre-stored solidified file corresponding to the selected display control can be used as an alternative solidified file. In order to ensure that the solidified file burning operation can be performed normally, the correctness of the alternative solidified file can be verified. Specifically, a cyclic redundancy check is performed on the alternative solidified file. In the case where the verification result of the cyclic redundancy check is that the verification is passed, the alternative solidified file can be used as the target solidified file. In the case where the verification result of the cyclic redundancy check is that the verification is not passed, verification failure information can be generated and displayed on the user interface to prompt the user to reselect.

[0047] This embodiment improves the accuracy of the determined target solidified file by performing a cyclic redundancy check on the candidate solidified files.

[0048] Furthermore, in the process of transferring the target fixed file to the serial peripheral interface flash memory, in order to avoid other fixed files being stored in the serial peripheral interface flash memory, which may cause anomalies when burning the fixed file into the field programmable gate array, before transferring the target fixed file to the serial peripheral interface flash memory, it also includes: sending a data erase instruction to the serial peripheral interface flash memory so that the serial peripheral interface flash memory deletes the original stored file after receiving the data erase instruction; transferring the target fixed file to the serial peripheral interface flash memory includes: transferring the target fixed file to the serial peripheral interface flash memory when receiving the deleted information fed back by the serial peripheral interface flash memory.

[0049] Specifically, a data erase instruction is sent to the serial peripheral interface flash memory, so that after the serial peripheral interface flash memory receives the data erase instruction, the original stored file in the serial peripheral flash memory is deleted. After deleting the original stored file, the deleted information is generated and fed back to the microprocessor. When the microprocessor receives the deleted information, the target fixed file is transferred to the serial peripheral interface flash memory, thereby ensuring that the serial peripheral interface flash memory only contains the target fixed file, avoiding the occurrence of a burning error in the process of burning the target fixed file to the field programmable gate array later.

[0050] S220, in response to the firmware loading trigger operation, generate a first loading trigger signal, and based on the first loading trigger signal, control the serial peripheral interface flash memory to burn the target fixed file into the field programmable gate array through the serial peripheral interface.

[0051] In this embodiment, the microprocessor can be connected to the field programmable gate array through a serial peripheral interface bus. In order to ensure correct burning, after controlling the serial peripheral interface flash memory to burn the target fixed file to the field programmable gate array through the serial peripheral interface, it also includes: obtaining the stored fixed file burned in the field programmable gate array; comparing the stored fixed file with the target fixed file, and generating an alarm message when the stored fixed file does not match the target fixed file, and sending the alarm message to the operation and maintenance terminal.

[0052] Specifically, the microprocessor can obtain the stored fixed file that has been burned from the field programmable gate array. If the burning is correct, the stored fixed file should be consistent with the target fixed file stored in the microprocessor. Therefore, the target fixed file can be compared with the stored fixed file. If the two match each other, it can be determined that the burning operation is correct; if the two do not match, it means that there is an error in the burning process. An alarm message can be generated based on the stored fixed file to indicate that there is an error in the current stored fixed file, and the alarm message is sent to the operation and maintenance terminal.

[0053] In this embodiment, when the stored solidified file does not match the target solidified file, an alarm message is generated and sent to the operation and maintenance terminal, thereby promptly notifying the staff that an error exists in the current burning process, facilitating timely correction.

[0054] S230, in response to the power-on operation of the target relay protection test device, generate a second loading trigger signal, and send the second loading trigger signal to the serial peripheral interface flash memory to control the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface.

[0055] In this embodiment, in addition to the dynamic burning mode of starting the burning operation of the target solidified file through the firmware loading trigger operation, in order to ensure the performance of the target relay protection test device, the firmware loading of the field programmable gate array can also be started after the target relay protection test device is powered on. Specifically, after detecting that the target relay protection test device performs the power-on operation, a second loading trigger signal is generated, and the second loading trigger signal is sent to the serial peripheral interface flash memory.

[0056] In this embodiment, after the target relay protection test device is powered on, the field programmable gate array is automatically initialized and the INIT signal is released to notify the serial peripheral interface flash memory and the microprocessor that the field programmable gate array is automatically initialized. Further, the microprocessor generates a second load trigger signal and sends the second load trigger signal to the serial peripheral interface flash memory. Specifically, the second load trigger signal is generated and sent to the serial peripheral interface flash memory. The implementation method can be: control the general input and output pin to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory to generate a low-level signal and transmit it to the serial peripheral interface flash memory.

[0057] Further, after the serial peripheral interface flash memory detects a low level signal, the stored target solidified file is burned into the field programmable gate array through the serial peripheral interface. In this embodiment, after the target relay protection test device is powered on, the target solidified file is burned, thereby ensuring the performance of the target relay protection test device.

[0058] In addition, controlling the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface includes: controlling the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface according to the configuration rate mode matched by the field programmable gate array.

[0059] Specifically, when the target curing file is burned into the field programmable gate array, the configuration rate mode matched by the field programmable gate array can be predetermined. Exemplarily, the field programmable gate array adapts the mode pin to determine the configuration rate mode matched by the field programmable gate array. Exemplarily, when the mode pin M[2:0]=001, the field programmable gate array outputs a clock on the controller clock at a frequency of 3 MHz.

[0060] In a specific implementation, the serial peripheral interface flash memory can be controlled to burn the target solidified file to the field programmable gate array through the serial peripheral interface according to the determined configuration rate mode. Exemplarily, the target solidified file is transmitted to the field programmable gate array at a preset standard speed. During the transmission process, the external clock signal can be switched to increase the data transmission rate, and the field programmable gate array makes intermediate configuration adjustments according to the changes in the external clock signal to use different clock rates. In the default behavior, at the falling edge of the controller clock, the serial peripheral interface flash memory outputs the data of the target solidified file, and the field programmable gate array captures the output data of the target solidified file at the rising edge of the controller clock.

[0061] This embodiment completes the burning of the target solid-state file according to the configuration rate model matched by the field programmable gate array, thereby completing the burning of the target solid-state file more flexibly and effectively. In addition, this embodiment provides two different firmware burning methods, which provides sufficient flexibility for the on-site operation and maintenance of the target relay protection test device, and improves the efficiency of analyzing and solving problems of the target relay protection test device.

[0062] The embodiments corresponding to the firmware loading method are described in detail above. In order to make the technical scheme of the method further clear to those skilled in the art, a specific application scenario is given below.

[0063] This embodiment provides two loading processes: dynamic loading and static loading; Figure 4 is a schematic diagram of a dynamic loading process according to an embodiment of the present invention; Figure 4 As shown, after determining the target solidification file, the target solidification file is transmitted to the serial peripheral interface flash memory, and the serial peripheral interface flash memory burns the target solidification file into the field programmable gate array, controls the general input and output pins to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory to generate a low-level signal to be transmitted to the serial peripheral interface flash memory, scans and mounts the serial peripheral device interface bus to identify the field programmable gate array corresponding to the serial peripheral device interface bus, and burns the target solidification file into the field programmable gate array. When the signal of the chip selection signal line is at a high level, the burning of the target solidification file is completed. The target relay protection test device is powered on and restarted again or the field programmable gate array is restarted separately by outputting a low-level pulse at the reset pin, thereby starting the operation of the target relay protection test device.

[0064] Figure 5 is a schematic diagram of a static loading process according to an embodiment of the present invention; Figure 5 As shown, after the field programmable gate array is powered on, the serial peripheral interface flash memory is initialized and the target fixed file is burned into the field programmable gate array. After the burning is completed, the chip selection signal line and the reset pin are set to a high level or a high impedance state, and then the field programmable gate array is started and operated.

[0065] In this embodiment, two firmware loading modes are provided, thereby improving the convenience of firmware loading; and the microprocessor, the serial peripheral interface flash memory and the field programmable gate array are communicated with each other in pairs, ensuring that the firmware loading operation can be performed normally.

[0066] Figure 61 is a schematic diagram of the structure of a firmware loading device provided according to an embodiment of the present invention, and the device is used to execute the firmware loading method provided in any of the above embodiments. The device and the firmware loading method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the firmware loading device can refer to the embodiment of the above firmware loading method. Figure 6 As shown, the device is arranged in a microprocessor in a target relay protection test device, the microprocessor is connected to a serial peripheral interface flash memory, the serial peripheral interface flash memory is connected to a field programmable gate array of a firmware to be loaded in the target relay protection test device, and the device comprises:

[0067] The file transfer module 10 is used to determine a target solidification file to be loaded into the field programmable gate array in response to the firmware selection trigger operation, and transfer the target solidification file to the serial peripheral interface flash memory;

[0068] The signal sending module 11 is used to generate a first loading trigger signal in response to a firmware loading trigger operation, and based on the first loading trigger signal, control the serial peripheral interface flash memory to burn the target fixed file into the field programmable gate array through the serial peripheral interface.

[0069] Based on any optional technical solution in the embodiment of the present invention, optionally, the file transmission module 10 includes:

[0070] A candidate solidification file determining unit, configured to determine a candidate solidification file from at least one pre-stored solidification file in response to a firmware selection trigger operation;

[0071] A verification unit, used for performing a cyclic redundancy check on the candidate solidification file;

[0072] The target solidified file determining unit is used to use the candidate solidified file as the target solidified file when the verification result of the cyclic redundancy check is that the verification is passed.

[0073] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:

[0074] A file deletion module is used to send a data erasure instruction to the serial peripheral interface flash memory before transferring the target solidified file to the serial peripheral interface flash memory, so that the serial peripheral interface flash memory deletes the original stored file after receiving the data erasure instruction;

[0075] The file transmission module 10 includes:

[0076] The file transfer unit is used to transfer the target solidified file to the serial peripheral interface flash memory when receiving the deleted information fed back by the serial peripheral interface flash memory.

[0077] Based on any optional technical solution in the embodiment of the present invention, optionally, the signal sending module 11 includes:

[0078] A signal control unit is used to control the general input and output pins to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory to generate a low-level signal to be transmitted to the serial peripheral interface flash memory, so that after the serial peripheral interface flash memory detects the low-level signal, the target solidification file is burned into the field programmable gate array through the serial peripheral interface.

[0079] Based on any optional technical solution in the embodiments of the present invention, optionally, it further includes:

[0080] A file acquisition module, used for acquiring the stored solidification file burned in the field programmable gate array after controlling the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface;

[0081] The alarm information generation module is used to compare the stored solidified file with the target solidified file, generate an alarm message when the stored solidified file does not match the target solidified file, and send the alarm message to the operation and maintenance terminal.

[0082] Based on any optional technical solution in the embodiments of the present invention, optionally, the method further includes:

[0083] The signal generating module is used to generate a second loading trigger signal in response to the power-on operation of the target relay protection test device, and send the second loading trigger signal to the serial peripheral interface flash memory to control the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface.

[0084] Based on any optional technical solution in the embodiments of the present invention, optionally, the signal generating module includes:

[0085] The file burning unit is used to control the serial peripheral interface flash memory to burn the target solidification file into the field programmable gate array through the serial peripheral interface according to the configuration rate mode matched by the field programmable gate array.

[0086] The technical solution of the embodiment of the present invention is applied to the microprocessor in the target relay protection test device, the microprocessor is connected to the serial peripheral interface flash memory, and the serial peripheral interface flash memory is connected to the field programmable gate array of the firmware to be loaded in the target relay protection test device; in response to the firmware selection trigger operation, the target solidified file to be loaded into the field programmable gate array is determined, and the target solidified file is transferred to the serial peripheral interface flash memory; and, in response to the firmware loading trigger operation, a first loading trigger signal is generated, and based on the first loading trigger signal, the serial peripheral interface flash memory is controlled to burn the target solidified file to the field programmable gate array through the serial peripheral interface. The technical solution of this embodiment performs the burning operation of the target solidified file through the serial peripheral interface flash memory, without the need for format conversion operation, thereby improving the burning efficiency of the target solidified file; and, the burning operation is controlled by the original microprocessor in the target relay protection test device, without the need to add an external computer, thereby improving the convenience of the burning operation and reducing the cost.

[0087] It is worth noting that in the embodiment of the above-mentioned firmware loading device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0088] Figure 7 1 is a schematic diagram of the structure of an electronic device that implements the firmware loading method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0089] like Figure 7As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0090] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0091] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as a firmware loading method.

[0092] In some embodiments, the firmware loading method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the firmware loading method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to perform the firmware loading method in any other appropriate manner (e.g., by means of firmware).

[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0094] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0097] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0099] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements the firmware loading method provided in any embodiment of the present application.

[0100] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0101] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0102] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A firmware loading method, characterized in that: A microprocessor is applied to a target relay protection test device, the microprocessor is communicatively connected to a serial peripheral interface flash memory, the serial peripheral interface flash memory is communicatively connected to a field programmable gate array of firmware to be loaded in the target relay protection test device, and the firmware loading method includes: In response to a firmware selection trigger operation, determining a target firmware file to be loaded into the field programmable gate array, and transmitting the target firmware file to the serial peripheral interface flash memory; In response to a firmware loading trigger operation, a first loading trigger signal is generated, and based on the first loading trigger signal, the serial peripheral interface flash memory is controlled to burn the target fixed file into the field programmable gate array through the serial peripheral interface.

2. The method according to claim 1, characterized in that The step of determining a target fixed file for loading into the field programmable gate array in response to a firmware selection trigger operation comprises: In response to a firmware selection trigger operation, determining a candidate firmware file from at least one pre-stored firmware file; Performing a cyclic redundancy check on the candidate solidification file; When the verification result of the cyclic redundancy check is that the verification is passed, the candidate solidified file is used as the target solidified file.

3. The method according to claim 1, characterized in that Before the target solidification file is transferred to the serial peripheral interface flash memory, the method further includes: Sending a data erasing instruction to the serial peripheral interface flash memory, so that the serial peripheral interface flash memory deletes the original stored file after receiving the data erasing instruction; The step of transferring the target solidification file to the serial peripheral interface flash memory comprises: When the deletion information fed back by the serial peripheral interface flash memory is received, the target fixed file is transmitted to the serial peripheral interface flash memory.

4. The method according to claim 1, characterized in that: The generating of the first loading trigger signal and, based on the first loading trigger signal, controlling the serial peripheral interface flash memory to burn the target curing file into the field programmable gate array through the serial peripheral interface comprises: Control the general input and output pins to pull down the signal of the chip selection signal line corresponding to the serial peripheral interface flash memory to generate a low-level signal to be transmitted to the serial peripheral interface flash memory, so that after the serial peripheral interface flash memory detects the low-level signal, the target solidification file is burned into the field programmable gate array through the serial peripheral interface.

5. The method according to claim 1, characterized in that After the step of controlling the serial peripheral interface flash memory to burn the target curing file into the field programmable gate array through the serial peripheral interface, the step further includes: Obtaining a stored solidification file burned into the field programmable gate array; The stored solidified file is compared with the target solidified file. When the stored solidified file does not match the target solidified file, an alarm message is generated and sent to the operation and maintenance terminal.

6. The method according to claim 1, characterized in that Also includes: In response to the power-on operation of the target relay protection test device, a second loading trigger signal is generated, and the second loading trigger signal is sent to the serial peripheral interface flash memory to control the serial peripheral interface flash memory to burn the target fixed file to the field programmable gate array through the serial peripheral interface.

7. The method according to claim 6, characterized in that The step of controlling the serial peripheral interface flash memory to burn the target curing file into the field programmable gate array via the serial peripheral interface includes: According to the configuration rate mode matched by the field programmable gate array, the serial peripheral interface flash memory is controlled to burn the target curing file into the field programmable gate array through the serial peripheral interface.

8. A firmware loading device, characterized in that: A microprocessor is provided in the target relay protection test device, the microprocessor is communicatively connected with a serial peripheral interface flash memory, the serial peripheral interface flash memory is communicatively connected with a field programmable gate array of the target relay protection test device to be loaded with firmware, and the firmware loading device comprises: A file transfer module, for determining a target solidification file to be loaded into the field programmable gate array in response to a firmware selection trigger operation, and transferring the target solidification file to the serial peripheral interface flash memory; The signal sending module is used to generate a first loading trigger signal in response to a firmware loading trigger operation, and based on the first loading trigger signal, control the serial peripheral interface flash memory to burn the target fixed file to the field programmable gate array through the serial peripheral interface.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware loading method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware loading method according to any one of claims 1 to 7 when executed.