Upgrading method of external firmware, chip, test equipment and storage medium

Through the controller automatically read and write the firmware, the problem of low external firmware upgrade efficiency is solved, reducing the burden on the upper machine and reducing the cost.

CN119376751APending Publication Date: 2025-01-28SHENZHEN LONGSYS ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310922872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The external firmware upgrade efficiency is inefficient, and users need to manually connect the SPI recorder, which consumes a lot of labor and time costs, and increases the operating burden of the host computer.

Method used

In response to the power -on operation by the controller, read the first firmware from the first memory, and detect whether there is a second firmware in the second memory. If different, write the first deposit memory for the firmware upgrade, and does not require the upper machine to control the external device for testing.

Benefits of technology

It reduces the operation pressure of the upper machine, improves the upgrade efficiency of external firmware, and reduces labor and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376751A_ABST
    Figure CN119376751A_ABST
Patent Text Reader

Abstract

The invention provides an external firmware upgrading method, a chip, test equipment and a storage medium, the external firmware upgrading method is applied to a controller, the controller is connected with a first memory and a second memory, and the method comprises the following steps: in response to a power-on operation, reading first firmware from the first memory; when detecting that the second firmware is stored in the second memory, reading the second firmware; and if the first firmware is different from the second firmware, writing the second firmware into the first memory, so that the first memory is subjected to firmware upgrading. According to the method, the upgrading efficiency of the external firmware can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of firmware upgrade, and in particular to an external firmware upgrade method, chip, test equipment and storage medium. Background Art

[0002] External firmware is usually stored in an external memory, such as a memory (SPI flash) that communicates based on the Serial Peripheral Interface (SPI) communication protocol. When the external firmware needs to be upgraded, a dedicated SPI burner is usually used to burn the new firmware into the SPI flash. However, each time the external firmware needs to be upgraded, the user is often required to manually connect the SPI burner to the SPI flash one by one, which consumes a lot of labor and time costs. In addition, during the burning process, the host computer is also required to control the burning, which increases the operating burden of the host computer and leads to low efficiency of external firmware upgrade. Summary of the invention

[0003] The embodiments of the present application disclose an external firmware upgrade method, chip, test equipment and storage medium, which solve the technical problem of low external firmware upgrade efficiency.

[0004] The present application provides an external firmware upgrade method, which is applied to a controller, wherein the controller is connected to a first memory and a second memory, and the method comprises: in response to a power-on operation, reading a first firmware from the first memory; when it is detected that a second firmware is stored in the second memory, reading the second firmware; if the first firmware is different from the second firmware, writing the second firmware to the first memory, so that the first memory is upgraded in firmware.

[0005] In some optional implementations, after reading the second firmware, the method further includes: calculating a verification code of the second firmware; if the verification code is the same as a preset verification code, determining that the second firmware verification is successful.

[0006] In some optional embodiments, after determining that the second firmware verification is successful, the method further includes: obtaining a version number of the first firmware and a version number of the second firmware; if the version number of the first firmware is different from the version number of the second firmware, determining that the first firmware is different from the second firmware.

[0007] In some optional embodiments, after writing the second firmware to the first memory, the method further includes: reading the second firmware in the first memory; if the second firmware read from the first memory is the same as the second firmware read from the second memory, triggering the first memory to perform a firmware upgrade.

[0008] In some optional embodiments, the second firmware read from the first memory is the same as the second firmware read from the second memory, including: calculating a check code of the second firmware read from the first memory; obtaining a version number of the second firmware read from the first memory; if the version number of the second firmware read from the first memory is the same as the version number of the second firmware read from the second memory, and the check code calculated when reading the second firmware from the first memory is the same as the check code calculated when reading the second firmware from the second memory, it is determined that the second firmware read from the first memory is the same as the second firmware read from the second memory.

[0009] In some optional implementations, the method further includes: when the second firmware cannot be detected from the second memory, executing a test process on the second memory using the first firmware.

[0010] In some optional implementations, the controller is connected to a host computer, and the method further includes: receiving a prompt message indicating that the upgrade of the first memory is complete, and sending an instruction message to the host computer to instruct the host computer to remove the second memory.

[0011] The present application also provides a chip, including a processor and a memory; wherein the processor is connected to the memory; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory to implement an external firmware upgrade method.

[0012] The present application also provides a testing device, which includes a chip and a memory.

[0013] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a chip, the external firmware upgrade method is implemented.

[0014] The present application also provides a testing device, which includes a chip and a computer-readable storage medium, and the chip is used to execute a computer program stored in the computer-readable storage medium to implement an external firmware upgrade method.

[0015] In the above-mentioned external firmware upgrade method, the controller responds to the power-on operation of the controller and uses the second firmware in the second memory to upgrade the first firmware of the first memory. There is no need for the host computer to control the external device (such as an SPI burner) for testing, which reduces the operating pressure of the host computer to a certain extent and improves the upgrade efficiency of the external firmware. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of an application scenario of the external firmware upgrade method provided in an embodiment of the present application.

[0017] Figure 2 It is a flow chart of the external firmware upgrade method provided in the embodiment of the present application.

[0018] Figure 3 It is a schematic diagram of the installation of the second memory provided in an embodiment of the present application.

[0019] Figure 4 It is a flow chart of the external firmware upgrade method provided in the embodiment of the present application.

[0020] Figure 5 It is a schematic diagram of the structure of the controller provided in the embodiment of the present application. DETAILED DESCRIPTION

[0021] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given by way of example for reference.

[0022] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0023] External firmware is usually stored in an external memory, such as a memory (SPI flash) that communicates based on the Serial Peripheral Interface (SPI) communication protocol. When the external firmware needs to be upgraded, a dedicated SPI burner is usually used to burn the new firmware into the SPI flash. However, each time the external firmware needs to be upgraded, the user is often required to manually connect the SPI burner to the SPI flash one by one, which consumes a lot of labor and time costs. In addition, during the burning process, the host computer is also required to control the burning, which increases the operating burden of the host computer and leads to low efficiency of external firmware upgrade.

[0024] In order to improve the upgrade efficiency of external firmware, the embodiments of the present application provide an upgrade method, a chip, a test device and a storage medium for external firmware. The application scenario of the upgrade method of the external firmware of the present application is first described below.

[0025] Figure 1Schematic diagram of application scenario of the external firmware upgrade method provided in the embodiment of the present application. The external firmware upgrade method provided in the embodiment of the present application is applied to the controller 101, which may be a main control chip in the test device 10 for controlling other chips in the test device 10, wherein the other chips may be the first memory 102 and the second memory 103, and the controller 101 is connected to the first memory 102 and the second memory 103 respectively. When the controller 101 is powered on (power-on operation is performed), the controller 101 reads the firmware in the first memory 102 and the second memory 103.

[0026] The test device 10 is connected to the host computer 20 . After the test device 10 completes the upgrade, it can send an instruction message to the host computer 20 to instruct the host computer 20 to remove the second memory 103 .

[0027] The test device 10 may include multiple test baseboards, each of which includes a controller 101, a first memory 102, and a second memory 103. Each test baseboard is provided with a test socket (such as a chip slot) for installing the second memory 103, and the second memory 103 is a detachable chip. The test device 10 may be a test cabinet for testing and upgrading the first memory 102.

[0028] The host computer 20 may refer to a party that can actively initiate a command, or may refer to a party that receives a command. For example, the host computer 20 receives the instruction information sent after the controller 101 of the test device 10 is upgraded. After receiving the instruction information, the host computer 20 sends an instruction information to the manipulator and other devices to remove the second memory 103. The host computer 20 may include, but is not limited to: a personal computer (PC), a central processing unit (CPU), etc., and this application does not limit this.

[0029] The controller 101 can be a microcontroller unit (MCU) chip. The MCU chip is also called a single chip microcomputer or a single chip microcomputer. The frequency and specifications of the central processing unit are appropriately reduced, and the peripheral interfaces such as memory, counter, USB, etc. are integrated on a single chip to form a chip-level computer, which is combined in different ways for different applications. The controller 101 can also be a digital signal processing technology (Digital Signal Processing) chip. The DSP chip refers to a chip that can implement digital signal processing technology. The controller 101 can also be a field programmable gate array (Field-Programmable Gate Array) chip, which appears as a semi-custom circuit in the field of application-specific integrated circuits (ASICs). It not only solves the shortcomings of custom circuits, but also overcomes the shortcomings of the limited number of gate circuits of the original programmable device.

[0030] The first memory 102 may be a serial peripheral interface memory (SPI flash).

[0031] The second memory 103 may be a flash memory.

[0032] To solve the above problems, see Figure 2 As shown, Figure 2 is a flowchart of an external firmware upgrade method provided in an embodiment of the present application, which is applied to a controller (eg Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0033] Step S201, in response to a power-on operation, reading a first firmware from a first memory.

[0034] In some embodiments of the present application, a trigger program that responds to a power-on operation may be provided in the controller. For example, when the controller is powered on (power-on operation is performed), the controller is triggered to perform a read operation of reading the first firmware in the first memory. The controller and the first memory are installed on the same test substrate. When the controller is powered on, the controller reads the firmware from the first memory, for example, the first firmware is read from the first memory. Firmware refers to a set of programs or software solidified in a non-volatile memory.

[0035] Step S202: when it is detected that the second firmware is stored in the second memory, the second firmware is read.

[0036] In some embodiments of the present application, the test device includes a plurality of test boards, each of which is provided with a first memory to be tested or upgraded, a controller, and a chip slot in which a second memory can be placed. In order to upgrade the first firmware, the second memory can be installed in the chip slot of the test board in which the first firmware is installed.

[0037] Figure 3 Schematic diagram of the installation of the second memory provided by the embodiment of the present application. Figure 3 As shown, the first memory is provided with an external firmware (such as the first firmware). In order to upgrade the external firmware (such as the first firmware) of the first memory by using the firmware (such as the second firmware) of the second memory, the second memory can be installed on the chip slot of the test baseboard, such as Figure 3 As shown, a controller and a first memory are also installed on the test baseboard.

[0038] In some embodiments of the present application, Figure 3 As shown, before the second memory is installed in the chip slot of the test baseboard, the host computer writes the second firmware in batches into multiple second memories through the Nand controller, wherein the Nand controller and the controller on the test baseboard can be the same type of chip controller. In order to burn the second firmware into the second memory in batches, multiple second memories can be placed on a circuit board, which can be a circuit board built into the host computer or a circuit board external to the host computer, and this application does not limit this. After the host computer burns the second firmware into the second memory, the host computer can control the manipulator to install the second memory on the test baseboard of the test equipment through the host computer, or the second memory can be installed on the test baseboard manually, and this application does not limit this.

[0039] In some embodiments of the present application, after the controller is powered on, on the one hand, it will read the first firmware in the first memory, and on the other hand, it will also detect whether there is firmware in the second memory, for example, the second firmware. If the controller detects that there is the second firmware in the second memory, the second firmware will be read out to perform subsequent upgrade operations, for example, continue to execute step S203.

[0040] In some embodiments of the present application, after the second firmware is read out from the second memory, in order to verify the integrity and correctness of the read second firmware, the controller may perform a cyclic redundancy check (CRC) on the second firmware. CRC check is a data transmission error detection technology, which calculates a check code according to a preset algorithm for the data at the sending end, and attaches the obtained check code to the back of the data frame and sends it together to the receiving end. The receiving end verifies the received data and the check code according to the same algorithm to determine whether the received data is correct and complete. Among them, the preset algorithm can be a polynomial division algorithm, a binary division algorithm, a Hamming code algorithm, and a hash algorithm.

[0041] In one example, taking the preset algorithm as a polynomial division algorithm, the polynomial division algorithm is executed on the second firmware to obtain a remainder as a check code. After obtaining the check code, the check code is compared with the preset check code. If the check code is the same as the preset check code, it is determined that the second firmware is successfully checked, indicating that the second firmware read by the controller is complete and correct. The preset check code can be a check code pre-stored in the second memory, such as Figure 3 As shown, before burning the second firmware into the second memory, the Nand controller calculates the preset check code of the second firmware, and burns the second firmware carrying the preset check code into the Nand controller. The method of calculating the check code by the Nand controller is the same as the method of calculating the check code by the controller.

[0042] In another example, taking the preset algorithm as a hash algorithm, a hash operation is performed on the second firmware, and the data in the second firmware is mapped to an output value of a fixed length to obtain a hash value of the second firmware. After obtaining the verification code, the verification code is compared with the preset verification code. If the verification code is the same as the preset verification code, it is determined that the second firmware verification is successful, indicating that the second firmware read by the controller is complete and correct.

[0043] In some other embodiments of the present application, the second firmware may not be burned into the second memory before the second memory is installed in the chip slot of the test baseboard. After the controller is powered on, if the controller does not detect that the second memory contains the second firmware, it is determined that the second memory has not executed firmware burning. When the controller cannot detect the second firmware from the second memory, the test process can be executed on the second memory using the read first firmware.

[0044] In one example, after the controller is powered on and the second memory is installed on the test board, when the controller cannot read the second firmware from the second memory, the first firmware read from the first memory can be used to perform a test process on the second memory. The test process may include but is not limited to testing the write operation of the second memory, testing the read operation of the second memory, and testing the erase operation of the second memory. The specific test process can be set according to the model of the memory or the actual application, and this application is not limited.

[0045] Step S203: if the first firmware is different from the second firmware, the second firmware is written into the first memory so that the first memory is upgraded.

[0046] In some embodiments of the present application, after reading the first firmware and the second firmware, the controller can compare whether the first firmware is the same as the second firmware, for example, compare whether the version number of the first firmware is the same as the version number 2 of the second firmware. If the version number of the first firmware is different from the version number 2 of the second firmware, it is determined that the first firmware is different from the second firmware. If the first firmware is different from the second firmware, it means that the first firmware is an old firmware and an upgrade operation needs to be performed. The host computer is connected to the test equipment. If the first firmware is the same as the second firmware, the host computer can be instructed to execute a test process on the second memory and remove the second memory after the test process is completed, or the host computer can be instructed to directly remove the second memory. This application does not limit this.

[0047] In some embodiments of the present application, after the controller determines that the first firmware is different from the second firmware, the controller writes the second firmware into the first memory so that the first memory performs a firmware upgrade. After the second firmware is written into the first memory, in order to verify whether the written second firmware is complete and correct, the written second firmware can be read from the first memory, the check code of the second firmware read from the first memory can be calculated, and the version number of the second firmware can be obtained for verification. If the version number of the second firmware read from the first memory is the same as the version number of the second firmware read from the second memory, and the check code calculated when reading the second firmware from the first memory is the same as the check code calculated when reading the second firmware from the second memory, it is determined that the second firmware read from the first memory is the same as the second firmware read from the second memory.

[0048] In one example, for the convenience of description, the version number carried by the controller when reading the second firmware from the second memory is used as the first version number, and the version number carried by the controller when reading the second firmware from the first memory is used as the second version number. The first version number is used to verify the second version number. The check code of the second firmware read by the controller from the second memory is used as the first check code. The first check code can be a preset check code carried when the second firmware is written to the second memory, or it can be a check code calculated by the controller when reading the second firmware from the second memory. The check code calculated by the controller when reading the second firmware from the first memory is used as the second check code. The first check code is used to verify the second check code.

[0049] If the first version number is different from the second version number, it means that the controller may have written the wrong version into the first memory, or the firmware may be written abnormally, resulting in garbled version numbers. If the first version number is different from the second version number, the controller can send a prompt message to the host computer, prompting the host computer to re-issue the upgrade instruction, or prompt the host computer to remove the second memory and replace it with another memory storing the second firmware. For example, when the host computer receives an instruction that the upgrade is unsuccessful, the robot removes the current second memory and installs a new second memory. After the installation is complete, the upgrade instruction is re-issued.

[0050] If the first version number is the same as the second version number, you can compare whether the first check code is the same as the second check code. If the first check code is different from the second check code, it means that the second firmware may have packet loss during the writing process. You can install a new second memory through the host computer and re-power on the controller to execute the upgrade program. If the first check code is the same as the second check code, the first memory is triggered to upgrade using the second firmware. After the upgrade is completed, the controller sends a prompt message to the host computer indicating that the upgrade is complete. The above is just an example. You can verify the check code first and then the version number, or verify the check code and version number at the same time. This application is not limited by comparison.

[0051] In one example, if Figure 3 As shown, the test equipment can be a test cabinet, including multiple test baseboards. For example, there are 100 test baseboards, indicating that there are 100 first storage devices that need to be upgraded. Assuming that there are 10 second memories that have been burned with the second firmware, the host computer can control the manipulator to install these 10 second memories on the chip slots of the 10 test baseboards. When the host computer receives a prompt message indicating that the upgrade is complete, the host computer can control the manipulator to disassemble the 10 second memories and install them on the chip slots of another 10 test baseboards. For example, the first time they are installed on test baseboards A1 to A10, and the second time they can be installed on test baseboards A11 to A20. The above are just examples, and actual applications are not limited to this.

[0052] In an embodiment of the present application, the controller can respond to the power-on operation and directly perform the upgrade operation, without the need for the host computer to participate in the upgrade process. The host computer can remove the second memory when receiving the instruction information of the controller, which can reduce the operating pressure of the host computer to a certain extent. In this embodiment, the verification work is performed in the controller, which can reduce the calculation amount of the host computer. For example, in the related art, the host computer needs to control the SPI burner one by one to upgrade the firmware of each first memory that needs to be upgraded, which not only needs to execute more control programs, but also needs to take into account the calculation of verification. Assuming that there are 100 first storage devices that need to be upgraded, then this type of method requires the host computer to control the execution 100 times, and each time a verification calculation is required. In this embodiment, assuming that there are 100 first storage devices that need to be upgraded, after 10 second memories are configured, the controller controls the execution 10 times, and the installation / removal of the second memory is controlled by the host computer 10 times. In addition, when the second firmware is not detected in the second memory, the embodiment of the present application can start the test process for the second memory, which can reduce the test cost and test time to a certain extent.

[0053] In an embodiment of the present application, the controller responds to the power-on operation of the controller and uses the second firmware in the second memory to upgrade the first firmware of the first memory. There is no need for the host computer to control an external device (such as an SPI burner) for testing, which reduces the operating pressure of the host computer to a certain extent and improves the upgrade efficiency of the external firmware.

[0054] Figure 4 is a flow chart of the external firmware upgrade method provided in the embodiment of the present application, such as Figure 4 As shown, the following steps are included:

[0055] Step S401: The controller responds to a power-on operation and reads a first firmware from a first memory.

[0056] Step S402: The controller detects whether there is a second firmware in the second memory.

[0057] In some embodiments of the present application, if the second firmware cannot be detected in the second memory, step S403 is executed; if the second firmware is detected in the second memory, step S404 is continued.

[0058] Step S403: The controller executes a test process on the second memory using the first firmware until the test process is completed, and sends a prompt message indicating the completion of the test to the host computer.

[0059] Step S404: the controller determines whether the first firmware is the same as the second firmware.

[0060] In some embodiments of the present application, if the first firmware is the same as the second firmware, the process returns to step S403 ; if the first firmware is different from the second firmware, the process continues to step S405 .

[0061] Step S405: The controller writes the second firmware into the first memory to upgrade the firmware of the first memory.

[0062] Step S406: The controller determines whether the upgrade is completed.

[0063] In some embodiments of the present application, if the upgrade is not completed, step S406 may be continued to be executed, and if the upgrade is completed, step S407 may be continued to be executed.

[0064] Step S407: the controller sends a prompt message indicating that the upgrade is complete to the host computer.

[0065] Step S408: the host computer controls the manipulator to remove the second firmware and install it on other test boards until all the first memories in the test equipment are upgraded.

[0066] In some embodiments of the present application, the specific description of steps S401 to S408 can be found in Figure 2 The illustrated embodiments will not be described again herein.

[0067] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of the controller provided in an embodiment of the present application. The controller 101 includes but is not limited to a memory 11 and a processor 12. In this embodiment, the memory 11 may be an internal memory of the controller 101, that is, a memory built into the controller 101. In other embodiments, the memory 11 may also be an external memory of the host computer 20, that is, a memory externally connected to the controller 101.

[0068] In some embodiments, the memory 11 is used to store program codes and various data, and to achieve high-speed and automatic access to programs or data during the operation of the controller 101 .

[0069] The memory 11 may include a random access memory and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0070] In one embodiment, the processor 12 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any other conventional processor, etc.

[0071] If the program code and various data in the memory 11 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, such as the external firmware upgrade method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), etc.

[0072] It is understandable that the module division described above is a logical function division, and there may be other division methods in actual implementation. In addition, the functional modules in each embodiment of the present application may be integrated in the same processing unit, or each module may exist physically separately, or two or more modules may be integrated in the same unit. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A method for upgrading external firmware, applied to a controller, characterized in that: The controller is connected to the first memory and the second memory, and the method includes: In response to a power-on operation, reading a first firmware from the first memory; When it is detected that the second firmware is stored in the second memory, reading the second firmware; If the first firmware is different from the second firmware, the second firmware is written into the first memory so that the first memory is upgraded.

2. The external firmware upgrade method according to claim 1, characterized in that: After reading the second firmware, the method further includes: Calculating a check code of the second firmware; If the verification code is the same as the preset verification code, it is determined that the second firmware verification is successful.

3. The external firmware upgrade method according to claim 2, characterized in that: After determining that the second firmware is successfully verified, the method further includes: Obtaining a version number of the first firmware and a version number of the second firmware; If the version number of the first firmware is different from the version number of the second firmware, it is determined that the first firmware is different from the second firmware.

4. The external firmware upgrade method according to claim 1, characterized in that: After writing the second firmware into the first memory, the method further includes: Reading the second firmware in the first memory; If the second firmware read from the first memory is the same as the second firmware read from the second memory, the first memory is triggered to perform firmware upgrade.

5. The external firmware upgrade method according to claim 4, characterized in that: The second firmware read from the first memory is the same as the second firmware read from the second memory, including: Calculating a check code of the second firmware read from the first memory; Obtaining a version number of the second firmware read from the first memory; If the version number of the second firmware read from the first memory is the same as the version number of the second firmware read from the second memory, and the check code calculated when reading the second firmware from the first memory is the same as the check code calculated when reading the second firmware from the second memory, it is determined that the second firmware read from the first memory is the same as the second firmware read from the second memory.

6. The external firmware upgrade method according to claim 1, characterized in that: The method further comprises: When the second firmware cannot be detected from the second memory, a test process is performed on the second memory using the first firmware.

7. The external firmware upgrade method according to claim 1, characterized in that: The controller is connected to a host computer, and the method further comprises: Receive prompt information that the upgrade of the first memory is completed, and send instruction information to the host computer to instruct the host computer to remove the second memory.

8. A chip, characterized in that: It includes a processor and a memory; wherein the processor is connected to the memory; The memory is used to store program instructions; The processor is used to read the program instructions stored in the memory to implement the external firmware upgrade method according to any one of claims 1 to 7.

9. A testing device, characterized in that: The testing device comprises the chip as claimed in claim 8 and a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the controller, the external firmware upgrade method according to any one of claims 1 to 7 is implemented.