Burning system and burning method based on MCU + FPGA heterogeneous system

By using the USB interface to perform firmware upgrade in the MCU+FPGA heterogeneous system, the problem of complex and time-consuming and labor-intensive firmware upgrade operation in the existing technology is solved, and firmware upgrade without disassembly of the chassis is achieved, reducing costs and improving security.

CN119645439APending Publication Date: 2025-03-18BEIJING DONGFANG MEASUREMENT & TEST INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411684721.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the prior art, firmware upgrades of instruments and equipment are complex and time-consuming, which affects the aesthetics of the product, increases the product size, and is prone to incorrect operation. Especially for MCU+FPGA heterogeneous systems, the firmware upgrade requires a lot of burn-in pins, which is prone to incorrect pins that cannot be burned or damaged by circuit boards.

Method used

It provides a burning system and method based on MCU+FPGA heterogeneous system. It directly realizes program burning and firmware upgrade of MCU and FPGA heterogeneous system through the USB interface. It uses the built-in MCU and FPGA to write files through the burning storage medium. The MCU enters the burning mode through the firmware upgrade program of the MCU chip, and performs firmware upgrade of the MCU+FPGA heterogeneous system.

Benefits of technology

It realizes firmware upgrade of MCU+FPGA heterogeneous system without removing the chassis, reducing time and labor costs, improving the convenience and security of firmware upgrades, and avoiding the risk of damage caused by connecting the wrong pins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645439A_ABST
    Figure CN119645439A_ABST
Patent Text Reader

Abstract

The invention relates to a programming system and method based on an MCU + FPGA heterogeneous system, and the system comprises a programming storage medium which is provided with a first USB interface, and is internally provided with an MCU programming file and an FPGA programming file; the device to be burnt comprises an MCU chip, a firmware upgrading program is arranged in the MCU chip, the firmware upgrading program is used for dividing a storage area of the MCU chip into an MCU main program storage area and an FPGA main program storage area, and the MCU main program storage area and the FPGA main program storage area are used for storing an MCU main program and an FPGA main program respectively; the FPGA chip is electrically connected with the MCU chip and is used for performing FPGA programming according to the FPGA main program; and the second USB interface is electrically connected with the MCU chip and is used for respectively programming the MCU programming file and the FPGA programming file to the MCU main program storage area and the FPGA main program storage area according to the programming storage medium through connection of the first USB interface and the second USB interface. According to the method and the device, the problem of inconvenience caused by disassembly and assembly of a case in program firmware upgrading is solved, and the effect of saving time cost and labor cost caused by firmware upgrading is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip burning technology, and in particular to a burning system and a burning method based on an MCU+FPGA heterogeneous system. Background Art

[0002] Currently, there are generally two methods for upgrading the firmware of instruments and equipment: the first method is to first remove the product chassis, then burn the program through the special burning interface on the circuit board, and then reinstall the removed chassis; the second method is to lead out the burning interface (10 pins) on the circuit board to the connector on the rear panel of the chassis, and upgrade the firmware through specific pins on the connector.

[0003] However, both methods have problems. The first firmware upgrade method is complicated, time-consuming and labor-intensive, and often involves space and geographical issues. The second method affects the aesthetics of the product, increases the size of the product, and is prone to misoperation. Therefore, the burning interface is generally not exposed, and the rear panel of the chassis needs to be disassembled during burning, which increases the time and labor cost of the burning operation. At the same time, for the MCU+FPGA heterogeneous system, its firmware upgrade needs to be carried out, and many burning pins are required. It is easy to connect the wrong pins and fail to burn the program or even burn the circuit board.

[0004] Therefore, there is an urgent need to provide a simple and efficient burning method to solve the inconvenience caused by disassembling and assembling the chassis for program firmware upgrades, so as to save the time cost and labor cost caused by firmware upgrades. Summary of the invention

[0005] In order to solve the technical problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a burning system and method, which realizes the convenience of program burning and firmware upgrading.

[0006] To achieve the above-mentioned object of the invention, the present invention provides a burning system based on MCU+FPGA heterogeneous system, comprising:

[0007] Burning storage medium, setting a first USB interface, the burning storage medium has built-in MCU burning file and FPGA burning file;

[0008] Devices to be burned include:

[0009] An MCU chip having a built-in firmware upgrade program, wherein the firmware upgrade program is used to divide the storage area of ​​the MCU chip into an MCU main program storage area and an FPGA main program storage area, wherein the MCU main program storage area and the FPGA main program storage area are used to store the MCU main program and the FPGA main program respectively;

[0010] An FPGA chip, electrically connected to the MCU chip, and used for performing FPGA programming according to the FPGA main program;

[0011] The second USB interface is electrically connected to the MCU chip, and is used to connect to the second USB interface through the first USB interface according to the burning storage medium, and burn the MCU burning file and the FPGA burning file to the MCU main program storage area and the FPGA main program storage area respectively.

[0012] According to a technical solution of the present invention, the MCU chip is connected to the FPGA chip via an SPI bus; the MUC chip is connected to the USB interface via a USBFS bus.

[0013] According to a technical solution of the present invention, the MCU burning file and the FPGA burning file are both bin burning files.

[0014] According to one aspect of the present invention, a burning method of the above-mentioned burning system based on the MCU+FPGA heterogeneous system includes the following steps:

[0015] Step S1, the device to be burned is powered on, and the second USB interface is used to detect whether the burning storage medium is connected;

[0016] Step S2: according to the detection of the access of the burning storage medium, the MCU is controlled to enter the burning mode through the firmware upgrade program to perform the firmware upgrade of the MCU+FPGA heterogeneous system;

[0017] Step S3: upon detecting that the burning storage medium is not accessible, the MCU chip loads the FPGA main program into the FPGA chip, and runs the MCU main program and the FPGA main program simultaneously.

[0018] According to a technical solution of the present invention, in the step S2, it specifically includes:

[0019] Step S21, the MCU chip verifies the MCU burning file and the FPGA burning file in the burning storage medium;

[0020] Step S22: after the storage medium burning verification is passed, the data in the MCU main program storage area and the FPGA main program storage area are erased through the firmware upgrade program;

[0021] Step S23, burning the MCU burning file and the FPGA burning file into the MCU main program storage area and the FPGA main program storage area through the firmware upgrade program;

[0022] Step S24, verifying the programming data of the MCU main program storage area and the FPGA main program storage area through the firmware upgrade program;

[0023] Step S25: After the chip burning verification passes, the firmware upgrade program controls the MCU chip to exit the burning mode;

[0024] Step S26: the MCU chip ends the process after power is turned off.

[0025] According to a technical solution of the present invention, an indicator light is provided on the burning storage medium, and the indicator light is on when the burning storage medium is powered on through the first USB interface;

[0026] After the chip burning verification is passed, the MCU chip sends an exit burning mode instruction to the burning storage medium through the first USB interface and the second USB interface; according to obtaining the exit burning mode instruction, the indicator light is turned off.

[0027] According to a technical solution of the present invention, in step S3, it specifically includes:

[0028] Step S31, the MCU chip loads the FPGA main program into the FPGA chip;

[0029] Step S32, the FPGA main program and the MCU main program are run simultaneously;

[0030] Step S32: the MCU chip ends the process after power is turned off.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] The present invention adds the function of program burning and firmware upgrading for MCU+FPGA heterogeneous system on the basis of the original data transmission and keyboard functions of USB interface, so that the chassis of instrument equipment can directly realize the firmware upgrading of two programs of MCU and FPGA heterogeneous system through USB interface without removing the product shell in advance, thus solving the inconvenience caused by disassembling and assembling the chassis for program firmware upgrading, saving the time cost and labor cost caused by firmware upgrading, and being easy to promote and apply on all instruments and equipment.

[0033] The present invention proposes a burning method and a burning system based on an MCU+FPGA heterogeneous system. The instrument equipment can realize program burning and firmware upgrade of the MCU+FPGA heterogeneous system through a USB port. Through hardware circuit control and software setting, when the instrument equipment program firmware is upgraded, there is no need to disassemble the casing. It is only necessary to insert a medium storing program code with a USB interface, such as a U disk, a mobile hard disk, etc. into the USB interface of the instrument equipment. After the instrument is powered on, the software automatically recognizes and starts downloading. After waiting for the indicator light to stop flashing, the power is turned off and the U disk is pulled out, and the firmware upgrade of the MCU+FPGA heterogeneous system can be completed, thereby realizing the convenience of program burning and firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A schematic diagram of a programming operation of a programming system based on an MCU+FPGA heterogeneous system provided according to an embodiment of the present invention is schematically shown;

[0036] Figure 2 A schematic diagram of circuit connection of a burning system based on an MCU+FPGA heterogeneous system according to an embodiment of the present invention is schematically shown;

[0037] Figure 3 The flowchart schematically shows a programming method based on an MCU+FPGA heterogeneous system according to an embodiment of the present invention.

[0038] The corresponding relationship between the component names and the reference numerals is as follows:

[0039] 1. Burning storage medium; 2. Device to be burned;

[0040] 11. First USB interface;

[0041] 21. Second USB interface; 23. MCU chip; 24. FPGA chip. DETAILED DESCRIPTION

[0042] The description of the embodiments of this specification should be combined with the corresponding drawings, which should be considered as part of the complete specification. In the drawings, the shape or thickness of the embodiments may be enlarged and indicated for simplification or convenience. Furthermore, the parts of each structure in the drawings will be described separately. It is worth noting that the elements not shown in the drawings or not described in words are in a form known to ordinary technicians in the relevant technical field.

[0043] The description of the embodiments herein and any reference to directions and orientations are only for the convenience of description and are not to be construed as any limitation on the scope of protection of the present invention. The following description of the preferred embodiments may involve combinations of features, which may exist independently or in combination, and the present invention is not particularly limited to the preferred embodiments. The scope of the present invention is defined by the claims.

[0044] like Figure 1 to Figure 2 As shown, the present invention provides a burning system based on an MCU+FPGA heterogeneous system, comprising:

[0045] Burning storage medium 1, setting a first USB interface 11, burning storage medium 1 built-in MCU burning file and FPGA burning file;

[0046] Device 2 to be burned, including:

[0047] The MCU chip 23 has a built-in firmware upgrade program, which is used to divide the storage area of ​​the MCU chip 23 into an MCU main program storage area and an FPGA main program storage area, and the MCU main program storage area and the FPGA main program storage area are used to store the MCU main program and the FPGA main program respectively;

[0048] FPGA chip 24, electrically connected to MCU chip 23, for performing FPGA programming according to FPGA main program;

[0049] The second USB interface 21 is electrically connected to the MCU chip 23, and is used to burn the MCU burning file and the FPGA burning file to the MCU main program storage area and the FPGA main program storage area respectively according to the connection between the burning storage medium 1 and the second USB interface 21 through the first USB interface 11.

[0050] In the hardware circuit, the MCU chip 23 is connected to the second USB interface 21 through the USBFS bus, and is connected to the FPGA chip 24 through the SPI bus. Through the second USB interface 21, the data in the burning storage medium 1 such as a U disk is transmitted to the MCU chip 23; through the PS mode of the FPGA chip 24, the MCU chip 23 can download the FPGA main program to the FPGA chip 24 after power-on.

[0051] The software in the device to be burned mainly includes three categories, namely MCU main program, FPGA main program, and firmware upgrade program:

[0052] The MCU main program is the functional software of the MCU. After the function debugging is completed, a bin burning file is generated by compiling and can be copied to a burning storage medium with a USB interface.

[0053] The FPGA main program is the functional software of the FPGA. After the functional debugging is completed, a bin burning file is generated by compiling and can be copied to a burning storage medium with a USB interface.

[0054] The firmware upgrade program is a project file used for USB burning program. In the program, the FLASH memory inside the MCU chip is divided into the MCU main program storage area and the FPGA main program storage area, and loaded into the MCU chip.

[0055] like Figure 3 As shown, the present invention provides a burning method for a burning system based on an MCU+FPGA heterogeneous system, comprising the following steps:

[0056] Step S1, the device to be burned 2 is powered on, and the second USB interface 21 is used to detect whether there is access to the burning storage medium 1;

[0057] After the device to be burned 2 is powered on, it is identified whether the second USB interface 21 is plugged with the burning storage medium 1 .

[0058] Step S2: upon detecting that the burning storage medium 1 is connected, the MCU is controlled to enter the burning mode through the firmware upgrade program to perform the firmware upgrade of the MCU+FPGA heterogeneous system;

[0059] In step S2, it specifically includes:

[0060] Step S21, the MCU chip 23 verifies the MCU burning file and the FPGA burning file in the burning storage medium 1;

[0061] The MCU chip 23 verifies the correctness of the MCU programming file and the FPGA programming file in the programming storage medium 1. Only when the programming file stored in the programming storage medium 1 is correct can the subsequent programming steps be performed.

[0062] Step S22: after the storage medium is written and verified, the data in the MCU main program storage area and the FPGA main program storage area are erased through the firmware upgrade program;

[0063] Step S23, burning the MCU burning file and the FPGA burning file into the MCU main program storage area and the FPGA main program storage area respectively through the firmware upgrade program;

[0064] Step S24, verifying the programming data of the MCU main program storage area and the FPGA main program storage area through the firmware upgrade program;

[0065] The MCU chip 23 reads the MCU main program storage area and the FPGA main program storage area of ​​its internal memory to verify the correctness of the stored data, ensuring that the type of programming data stored in each program storage area corresponds to the type of each program storage area.

[0066] Step S25: After the chip burning verification is passed, the firmware upgrade program controls the MCU chip 23 to exit the burning mode;

[0067] Step S26: The MCU chip 23 ends the process after the power is turned off.

[0068] In the embodiment of the present invention, an indicator light is provided on the burning storage medium 1, and the indicator light is on when the burning storage medium 1 is powered on through the first USB interface 11;

[0069] After the chip programming verification is passed, the MCU chip 23 sends an exit programming mode instruction to the programming storage medium 1 through the first USB interface 11 and the second USB interface 21; according to the exit programming mode instruction obtained, the indicator light goes out.

[0070] Step S3: upon detecting that there is no access to the burning storage medium 1, the MCU chip 23 loads the FPGA main program into the FPGA chip 24, and runs the MCU main program and the FPGA main program at the same time.

[0071] If there is no storage medium, the MCU chip 23 loads the data in the FPGA main program storage area into the FPGA to implement programming of the FPGA and enable the FPGA to enter the main program; and the MCU chip runs its main program according to the data in the MCU main program storage area.

[0072] In step S3, it specifically includes:

[0073] Step S31, the MCU chip 23 loads the FPGA main program into the FPGA chip 24;

[0074] Step S32, the FPGA main program and the MCU main program run simultaneously;

[0075] Step S32: The MCU chip 23 ends the process after the power is turned off.

[0076] Therefore, the present invention directly implements the firmware upgrade of two programs of the MCU and FPGA heterogeneous system through the USB interface, solves the inconvenience caused by the disassembly and assembly of the chassis for program firmware upgrade, and saves the time cost and labor cost caused by the firmware upgrade.

[0077] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0078] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for those skilled in the art, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.

Claims

1. A burning system based on MCU+FPGA heterogeneous system, characterized in that: include: Burning storage medium, setting a first USB interface, the burning storage medium has built-in MCU burning file and FPGA burning file; Devices to be burned include: An MCU chip having a built-in firmware upgrade program, wherein the firmware upgrade program is used to divide the storage area of ​​the MCU chip into an MCU main program storage area and an FPGA main program storage area, wherein the MCU main program storage area and the FPGA main program storage area are used to store the MCU main program and the FPGA main program respectively; An FPGA chip, electrically connected to the MCU chip, and used for performing FPGA programming according to the FPGA main program; The second USB interface is electrically connected to the MCU chip, and is used to connect to the second USB interface through the first USB interface according to the burning storage medium, and burn the MCU burning file and the FPGA burning file to the MCU main program storage area and the FPGA main program storage area respectively.

2. The burning system according to claim 1, characterized in that: The MCU chip is connected to the FPGA chip via an SPI bus; the MUC chip is connected to the USB interface via a USBFS bus.

3. The burning system according to claim 2, characterized in that: The MCU burning file and the FPGA burning file are both bin burning files.

4. A burning method for a burning system based on an MCU+FPGA heterogeneous system as claimed in any one of claims 1 to 3, characterized in that: The following steps are involved: Step S1, the device to be burned is powered on, and the second USB interface is used to detect whether the burning storage medium is connected; Step S2: according to the detection of the access of the burning storage medium, the MCU is controlled to enter the burning mode through the firmware upgrade program to perform the firmware upgrade of the MCU+FPGA heterogeneous system; Step S3: upon detecting that the burning storage medium is not accessible, the MCU chip loads the FPGA main program into the FPGA chip, and runs the MCU main program and the FPGA main program simultaneously.

5. The burning method according to claim 4, characterized in that: In the step S2, it specifically includes: Step S21, the MCU chip verifies the MCU burning file and the FPGA burning file in the burning storage medium; Step S22: after the storage medium burning verification is passed, the data in the MCU main program storage area and the FPGA main program storage area are erased through the firmware upgrade program; Step S23, burning the MCU burning file and the FPGA burning file into the MCU main program storage area and the FPGA main program storage area through the firmware upgrade program; Step S24, verifying the programming data of the MCU main program storage area and the FPGA main program storage area through the firmware upgrade program; Step S25: After the chip burning verification passes, the firmware upgrade program controls the MCU chip to exit the burning mode; Step S26: the MCU chip ends the process after power is turned off.

6. The burning method according to claim 5, characterized in that: An indicator light is provided on the burning storage medium, and the indicator light is on when the burning storage medium is powered on through the first USB interface; After the chip burning verification is passed, the MCU chip sends an exit burning mode instruction to the burning storage medium through the first USB interface and the second USB interface; according to obtaining the exit burning mode instruction, the indicator light is turned off.

7. The burning method according to claim 4, characterized in that: In the step S3, it specifically includes: Step S31, the MCU chip loads the FPGA main program into the FPGA chip; Step S32, the FPGA main program and the MCU main program are run simultaneously; Step S32: the MCU chip ends the process after power is turned off.