Firmware updating method and device, electronic equipment, medium and program product

By interacting mode switching instructions and partitioning firmware between image processing chips, the problem of long firmware update time during operation mode switching of image processing chips is solved, and more flexible working mode switching and more efficient resource utilization are achieved.

CN119271252APending Publication Date: 2025-01-07VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344758.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing image processing chips need to update the entire firmware for a long time during the working mode switching, reducing the flexibility of the image processing chips to switch the working mode.

Method used

By interacting with the mode switching instructions and the corresponding partition firmware between the first chip and the second chip, only the partition firmware corresponding to the current working mode is updated, without the need to update the entire firmware, and quickly switching the working mode is achieved.

Benefits of technology

Save firmware update time, improve the flexibility of image processing chip switching working mode, and reduce the need for running storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271252A_ABST
    Figure CN119271252A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware updating method and device, electronic equipment, a medium and a program product, and belongs to the technical field of chips, and the firmware updating method comprises the steps that a mode switching instruction sent by a second chip is received, the mode switching instruction is used for indicating the working mode of the first chip to be switched from a first working mode to a second working mode; under the condition that the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, receiving the partition firmware which is sent by the second chip and corresponds to the second working mode; and switching the working mode of the first chip to the second working mode according to the mode switching instruction, and loading partition firmware corresponding to the second working mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and in particular to a firmware update method, device, electronic device, medium and program product. Background Art

[0002] In order to improve the image quality of photos taken by electronic device cameras, more and more electronic devices are beginning to mount additional image processing chips. When the camera application works in different scenarios, the image processing chip needs to switch to different working modes or processing logic.

[0003] When the existing image processing chip needs to switch the working mode of the image processing chip in response to a scene change, the processing logic in different working modes is implemented by directly switching different processing branches in the current firmware of the image processing chip. However, if the corresponding partition firmware is different after the working mode is switched, it takes a long time to update the firmware of the entire image processing chip, which reduces the flexibility of the image processing chip in switching working modes. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a firmware update method, device, electronic device, medium and program product, which can solve the problem that when the working mode of the image processing chip is switched, it takes a long time to update the entire firmware, which reduces the flexibility of the image processing chip in switching the working mode.

[0005] In a first aspect, an embodiment of the present application provides a firmware update method, which is executed by a first chip, and the method includes:

[0006] receiving a mode switching instruction sent by the second chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0007] In a case where the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, receiving the partition firmware corresponding to the second working mode sent by the second chip;

[0008] The operating mode of the first chip is switched to the second operating mode according to the mode switching instruction, and partition firmware corresponding to the second operating mode is loaded.

[0009] In a second aspect, an embodiment of the present application provides a firmware update method, which is executed by a second chip, and the method includes:

[0010] When the working mode of the electronic device is switched, a mode switching instruction is sent to the first chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0011] When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, the partition firmware corresponding to the second working mode is sent to the first chip.

[0012] In a third aspect, an embodiment of the present application provides a firmware update device, applied to a first chip, the device comprising:

[0013] A receiving module, used for receiving a mode switching instruction sent by the second chip, wherein the mode switching instruction is used for instructing the working mode of the first chip to switch from the first working mode to the second working mode;

[0014] The receiving module is further configured to receive the partition firmware corresponding to the second working mode sent by the second chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode;

[0015] A switching module is used to switch the working mode of the first chip to the second working mode according to the mode switching instruction, and load the partition firmware corresponding to the second working mode.

[0016] In a fourth aspect, an embodiment of the present application provides a firmware update device, which is applied to a second chip, and the device includes:

[0017] A sending module, used for sending a mode switching instruction to the first chip when the working mode of the electronic device is switched, wherein the mode switching instruction is used for instructing the working mode of the first chip to switch from the first working mode to the second working mode;

[0018] The sending module is further used to send the partition firmware corresponding to the second working mode to the first chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode.

[0019] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0020] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0021] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method described in the first aspect or the second aspect.

[0022] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect or the second aspect.

[0023] In the embodiment of the present application, the working mode of the first chip corresponds to the partition firmware. In this way, during operation, the first chip only needs to load the partition firmware corresponding to the current working mode, without loading the partition firmware of all working modes. When the corresponding partition firmware is different after the working mode is switched, the second chip only needs to send the partition firmware corresponding to the switched working mode to the first chip, so that the first chip loads the received partition firmware, thereby achieving normal operation after the working mode is switched. In this process, only the partition firmware corresponding to the current working mode in the first chip needs to be updated, without updating the entire firmware, which saves the time for firmware updates and improves the flexibility of the first chip in switching working modes. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is one of the flowcharts of a firmware update method provided in an embodiment of the present application;

[0025] Figure 2 is a schematic diagram of the interaction between the first chip and the second chip in the embodiment of the present application;

[0026] Figure 3 This is a second flowchart of a firmware update method provided in an embodiment of the present application;

[0027] Figure 4 This is a flowchart of a firmware update method provided in an embodiment of the present application;

[0028] Figure 5 This is a fourth flowchart of a firmware update method provided in an embodiment of the present application;

[0029] Figure 6 This is one of the structural schematic diagrams of a firmware update device provided in an embodiment of the present application;

[0030] Figure 7 This is a second structural diagram of a firmware update device provided in an embodiment of the present application;

[0031] Figure 8 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application;

[0032] Fig. 9 One of the hardware structure diagrams of the electronic device provided in some embodiments of the present application;

[0033] Fig.10 The second schematic diagram of the hardware structure of the electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0035] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0036] In conjunction with the accompanying drawings, a firmware update method, device, electronic device, storage medium and program product provided by the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0037] See also Figure 1 , Figure 1 A firmware update method provided in an embodiment of the present application is executed by a first chip, and the method includes the following steps:

[0038] Step 101: receiving a mode switching instruction sent by a second chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from a first working mode to a second working mode;

[0039] Step 102: When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, receiving the partition firmware corresponding to the second working mode sent by the second chip;

[0040] Step 103: switch the working mode of the first chip to the second working mode according to the mode switching instruction, and load the partition firmware corresponding to the second working mode.

[0041] The first chip and the second chip may be two different chips in the same electronic device. For example, the second chip is a main processor in the electronic device, and the first chip is various plug-in chips in the electronic device, specifically various plug-in image processing chips. The following takes the first chip as an external chip in the electronic device and the second chip as an application processor (AP) in the electronic device as an example to further explain the firmware update method.

[0042] In some embodiments of the present application, the first working mode and the second working mode may be two different working modes in two different firmwares. For example, the first working mode may be a working mode in the first firmware, and the second working mode may be a working mode in the second firmware. The first firmware may be a firmware for retouching an image, and the first firmware may include at least two working modes. For example, the first firmware may include the following retouching modes: brightness enhancement mode, color enhancement mode, and watermark addition mode. The first working mode may be any working mode of the first firmware, for example, the first working mode may be a brightness enhancement mode. The second firmware is a firmware for adjusting the size of an image, and the second firmware may include at least two working modes. For example, the second firmware may include an image cropping mode, an image size reduction mode, and an image size enlargement mode. The second working mode may be any working mode of the second firmware, for example, the second working mode may be an image cropping mode. In the related art, when one or several working modes of the first firmware need to be used for image processing, the entire first firmware usually needs to be loaded in the first chip, and when the first working mode needs to be switched to the second working mode, the entire second firmware needs to be loaded. In the embodiment of the present application, when it is necessary to switch from the first working mode to the second working mode, the partition firmware corresponding to the second working mode in the second firmware is loaded without loading the entire second firmware, thereby saving the time for firmware updates and improving the flexibility of the first chip in switching working modes.

[0043] In some other embodiments of the present application, the first working mode and the second working mode may also be working modes corresponding to two different processing branches of the same firmware. Specifically, they may be image processing modes corresponding to two different processing branches of the same image processing firmware. Among them, the first working mode and the second working mode may be two different image processing functions, or the first working mode and the second working mode may be the same image processing function, but there are differences in their image processing capabilities, for example, the corresponding partition firmware versions are different. For example, of the first working mode and the second working mode, one is a resolution enhancement mode, and the other is a brightness enhancement mode. For another example, of the first working mode and the second working mode, one is an image recognition mode, and the other is an image cropping mode.

[0044] The first chip may include multiple chip IPs (Intellectual Properties), where IP refers to the intellectual property components in integrated circuit design, and refers to mature design modules with independent functions in the chip, including but not limited to processor cores, memory controllers, interface protocols, graphics processing units, etc. For example, see Figure 2 In some embodiments of the present application, the first chip includes IPs such as IP1, IP2, IP3, and IP4. An IP in the first chip can be used as a first module in the first chip. In the embodiment of the present application, different partition firmwares may correspond to different first modules in the first chip. Specifically, different partition firmwares may correspond to different IP information in the first chip. One partition firmware may correspond to one IP or a combination of two or more IPs. For example, see Figure 2 , partition firmware 1 corresponds to two first modules, IP1 and IP2, partition firmware 2 corresponds to one first module, IP3, and partition firmware 3 corresponds to one first module, IP4. It can be understood that the different IP information in the first chip corresponding to different partition firmwares specifically refers to: the IP information in the first chip corresponding to different partition firmwares is not completely the same. For example, partition firmware 4 can correspond to IP1 and IP2, and partition firmware 4 can correspond to IP1. At this time, although both correspond to IP1, since partition firmware 4 also corresponds to IP2, the IP information of the two is different. The IP information of a certain partition firmware can include all IPs corresponding to the partition firmware.

[0045] The partition firmware specifically refers to the software code running inside the chip. In the related art, in an image processing firmware with multiple working modes, there may be multiple different processing branches, and each processing branch may have multiple image processing logics. During the operation of different image processing logics, the IP in the chip to be called may be the same. Based on this, a firmware can be decomposed according to the image processing logic in the firmware to obtain multiple partition firmwares, and each partition firmware can correspond to at least one IP in the first chip. For example, see Figure 2 In some embodiments of the present application, the partition firmware 1, partition firmware 2, partition firmware 3 and other partition firmwares may be multiple partition firmwares obtained by decomposing a certain firmware, and the IP corresponding to each partition firmware is as follows: Figure 2 shown.

[0046] In some embodiments of the present application, different partition firmwares corresponding to different working modes may be set, wherein the different partition firmwares corresponding to different working modes may refer to: different types of partition firmwares corresponding to different working modes, for example, the first working mode corresponds to partition firmware 1, and the second working mode corresponds to partition firmware 2. In addition, the different partition firmwares corresponding to different working modes may refer to: different versions of partition firmwares corresponding to different working modes, for example, the first working mode corresponds to partition firmware 1 version 0.1, and the second working mode corresponds to partition firmware 1 version 0.2. The different partition firmwares corresponding to different working modes may also refer to: different types and versions of partition firmwares corresponding to different working modes are different. Among them, the correspondence between the working mode and the partition firmware can be predetermined according to the processing logic of the firmware. For example, please refer to Table 1 below, which is a schematic diagram of the correspondence between the various working modes and the partition firmware listed in the embodiments of the present application:

[0047] Table 1: Correspondence between working modes and partition firmware

[0048]

[0049] The partition firmware corresponding to working mode 1 includes: partition firmware 1 version 0.1 + partition firmware 3 version 0.1 + partition firmware 4 version 0.1. The partition firmware corresponding to working mode 2 includes: partition firmware 2 version 0.3 + partition firmware 4 version 0.2. The partition firmware corresponding to working mode 3 includes: partition firmware 1 version 0.2 + partition firmware 2 version 0.2 + partition firmware 4 version 0.2.

[0050] In the related art, since the method used to switch the working mode of the firmware in the chip is to switch different processing branches, the entire firmware needs to be loaded into the chip during the firmware operation process, that is, the processing logic corresponding to the working mode that is not currently running also needs to be loaded together, so that the processing branch can be switched online. Therefore, this method requires the image processing chip to have a relatively large operating storage space. In the embodiment of the present application, by establishing a corresponding relationship between the working mode and the partition firmware, when the first chip needs to work in a certain working mode, it only needs to send the partition firmware corresponding to the working mode to the first chip through the second chip, and then the first chip loads the received partition firmware corresponding to the working mode. When the working mode needs to be switched, the partition firmware corresponding to the switched working mode can be sent by the second chip for loading. After the loading is completed, the operating storage space corresponding to the previous working mode can be released. This is conducive to realizing the switching of the working mode of the first chip when the resources of the first chip design are relatively small. Among them, please refer to Figure 2 In some embodiments of the present application, the running storage space can be a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR) or a static random access memory (Static RAM, SRAM).

[0051] It should be noted that Figure 2 The partition firmware shown in the figure is only used to illustrate the corresponding relationship between each partition firmware and IP. It is not necessary to load the first chip during actual operation. Figure 2 All the partition firmware shown in the figure can be selectively loaded with some of the partition firmware according to the current working mode.

[0052] In this implementation, the working mode of the first chip corresponds to the partition firmware. In this way, during operation, the first chip only needs to load the partition firmware corresponding to the current working mode without loading the partition firmware of all working modes. When the corresponding partition firmware is different after the working mode is switched, the second chip only needs to send the partition firmware corresponding to the switched working mode to the first chip, so that the first chip loads the received partition firmware, thereby achieving normal operation after the working mode is switched. In this process, only the partition firmware corresponding to the current working mode in the first chip needs to be updated without updating the entire firmware, which saves the time for firmware updates and improves the flexibility of the first chip in switching working modes.

[0053] Optionally, before receiving the mode switching instruction sent by the second chip, the method further includes:

[0054] The main partition firmware sent by the second chip is received and loaded, wherein the first chip receives the mode switching instruction and partition firmware sent by the second chip based on the main partition firmware.

[0055] In some embodiments of the present application, the second chip can load the main partition firmware into the memory in advance, wherein the main partition firmware does not contain the branch codes that need to be executed in each scene, and the main partition firmware is used to receive the scene switching instructions and partition firmware sent by the second chip. When the scene is switched, the second chip sends the switching instruction of the corresponding scene to the first chip, and at the same time sends the partition firmware that needs to be run in the current scene. After the main partition firmware of the plug-in chip receives the switching instruction and the partition firmware, it selects to execute the firmware under the corresponding partition according to the switching instruction.

[0056] In this implementation, by receiving and loading the main partition firmware sent by the second chip, the process of receiving the mode switching instruction and the partition firmware can be implemented based on the main partition firmware to ensure that the mode switching process can proceed normally.

[0057] Optionally, the first chip includes at least two module units, and the first chip has at least two working modes, each of the module units corresponds to one of the at least two working modes, and the at least two working modes include the first working mode and the second working mode.

[0058] Each module unit may include at least one first module, that is, each module unit may include Figure 2 For example, see Figure 2 , since IP1 and PI2 correspond to partition firmware 1, and partition firmware 1 corresponds to a working mode, IP1 and PI2 can be combined to form a module unit, and the working mode corresponding to the module unit formed by the combination of IP1 and PI2 is: the working mode corresponding to partition firmware 1. Correspondingly, IP3 can independently form a module unit, and the working mode corresponding to IP3 is: the working mode corresponding to partition firmware 2.

[0059] It is understandable that different module units may reuse part of the first module. For example, the first module unit may include IP1 and PI2, and the second module unit may include PI2 and IP3. The first module unit and the second module unit are two different module units among the at least two module units.

[0060] In this implementation, by establishing a correspondence between module units and working modes, in the subsequent mode switching process, the module unit corresponding to the working mode to be switched can be called, and the relevant logic of the corresponding partition firmware can be executed to realize the working mode switching process.

[0061] Optionally, the mode switching instruction includes configuration parameters corresponding to the second working mode;

[0062] After receiving the mode switching instruction sent by the second chip and before the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, the method further includes:

[0063] Determine a target module unit among the at least two module units according to the configuration parameters, wherein the target module unit corresponds to the second working mode;

[0064] Determining whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode;

[0065] In a case where the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, switching the module unit corresponding to the first working mode in the first chip in a working state to the target module unit according to the mode switching instruction;

[0066] When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, a step of receiving the partition firmware corresponding to the second working mode sent by the second chip is performed.

[0067] Among them, since the same partition firmware may also have multiple different working modes, for example, in different working modes, the image processing accuracy of the same partition firmware is different. For example, when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, in the first working mode, the first chip is used to enhance the resolution of the image, and the resolution of the output image is the first resolution; in the second working mode, the first chip is used to enhance the resolution of the image, and the resolution of the output image is the second resolution, wherein the first resolution is greater than the second resolution, in this case, the configuration parameter may include resolution. For another example, when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, in the first working mode, the first chip is used to enhance the brightness of the image, and the brightness of the output image is the first brightness; in the second working mode, the first chip is used to enhance the brightness of the image, and the brightness of the output image is the second brightness, wherein the first brightness is greater than the second brightness, in this case, the configuration parameter may include brightness. For another example, when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, in the first working mode, the first chip is used to crop the image, and the size of the output image is a first size; in the second working mode, the first chip is used to crop the image, and the size of the output image is a second size, wherein the first size is larger than the second size. In this case, the configuration parameters may include the cropping size.

[0068] It can be understood that when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, the operating logic of the first chip is the same in the first working mode and the second working mode, and the difference may be that there is a difference in the effect of the output image. Therefore, when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, when the working mode of the first chip needs to be switched to the second working mode, there is no need to update the partition firmware in the first chip, only the configuration parameters under the corresponding working mode need to be updated, and the updated configuration parameters can be carried in the mode switching instruction and sent to the first chip together.

[0069] See also Figure 3 , is a schematic diagram of the working process of the second chip in the control method provided in the embodiment of the present application, which specifically includes the following steps:

[0070] Scene judgment: determine whether a scene change occurs through scene judgment. If not, continue to execute the scene judgment step, wherein the scene change may be triggered in response to the user's operation in the shooting interface during the shooting process of the electronic device. In addition, the scene change may also be a scene change automatically triggered by the electronic device when the shooting environment changes to adapt to the current shooting scene. For example, when transferring from a bright environment to a dark environment, the shooting mode may need to be switched from a normal shooting mode to a night shooting mode, and accordingly, the working mode of the first chip may also need to be switched.

[0071] When it is determined that the current scene has changed, it is further determined whether the scene after switching involves a partition firmware update. In the specific judgment process, if the partition firmware corresponding to the scene after switching is the same as the partition firmware corresponding to the scene before switching, a partition firmware update is not involved; accordingly, if the partition firmware corresponding to the scene after switching is different from the partition firmware corresponding to the scene before switching, a partition firmware update is involved.

[0072] If partition firmware update is not involved, a scene switching instruction carrying configuration parameters is directly sent to the first chip.

[0073] If partition firmware update is involved, the partition firmware corresponding to the updated scene can be sent to the first chip, and a scene switching instruction carrying configuration parameters can be sent to the first chip, and then the second chip ends execution.

[0074] See also Figure 4 , is a schematic diagram of the working process of the first chip in the control method provided in the embodiment of the present application, which specifically includes the following steps:

[0075] receiving a scene switching instruction sent by the second chip;

[0076] Parsing instructions;

[0077] Determine whether there is a partition firmware update;

[0078] If there is no partition firmware update, the main partition firmware completes the mode switching configuration, that is, the configuration of the currently running partition firmware is updated based on the configuration parameters carried in the scene switching instruction, and then the execution ends.

[0079] If there is a partition firmware update, the master partition firmware receives the partition firmware to a specified address, wherein the specified address may refer to a firmware partition corresponding to the partition firmware.

[0080] Then, the partition firmware takes effect, that is, the received partition firmware is loaded, thereby implementing the switching process of the working mode of the first chip and ending the execution.

[0081] In this implementation, when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, the specific function firmware of the first chip can be updated with the issuance of configuration parameters to achieve mode switching. In the case where the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, the step of receiving the partition firmware corresponding to the second working mode sent by the second chip is performed to achieve the update of the partition firmware. In addition, the firmware update method provided in the embodiment of the present application has at least the following beneficial effects: when the partition firmware needs to be updated, it can take effect after loading the firmware, without restarting the firmware in the first chip to complete the firmware effectiveness, and the firmware logic to be updated can take effect in N+1. In view of the internal IP characteristics of the first chip, the chip firmware is divided into independent partitions, which are loaded independently of each other to achieve performance and resource utilization. In the running storage space under the same partition of the first chip, only the hardware IP control logic and parameters that are currently required to be actually run are stored, which improves the efficiency of the use of the running storage space. Functional updates and problem repairs use partitions as the smallest module to reduce the release cost and testing complexity of new versions.

[0082] In some embodiments of the present application, the first chip and the second chip may be two different chips in the same electronic device, and the electronic device may further include a memory, in which at least two partition firmwares are stored, and the at least two partition firmwares are at least two partition firmwares obtained by decomposing the same firmware, and each partition firmware corresponds to at least one working mode of the first chip, and the at least two partition firmwares include: partition firmware corresponding to all working modes of the first chip. In the process of mode switching, the second chip can load specific partition firmware in the memory into the memory through instructions, and send the partition firmware in the memory to the first chip for loading, so as to realize the mode switching process of the first chip. Among them, the memory can be various memories, for example, it can be a read-only memory (ROM).

[0083] In addition, in the embodiment of the present application, the software processing of a specific IP can be allocated to different firmware partitions according to the actual IP situation of the first chip, and different physical address areas can be divided in the running storage space to store the corresponding partition firmware. Since each firmware partition represents a different hardware IP, it can be combined into a scenario branch according to whether the IP corresponding to different firmware partitions is running in the current scenario and the firmware version that needs to be run.

[0084] In addition, in the embodiment of the present application, by designing the firmware partitions in the first chip and the correspondence between the firmware partitions and the working modes, the processing of the hardware IP can be concentrated in a specific partition firmware. When the processing logic of a hardware IP needs to change, it is only necessary to update the current corresponding partition firmware, without reloading the entire first chip firmware, thereby shortening the time for the first chip to transmit the firmware; since the entire firmware does not need to be loaded, after the partition firmware is updated, the firmware in the first chip does not need to be restarted to complete the firmware effectiveness, saving the firmware update time, and the firmware hot update efficiency can meet the timing requirements that the image sensor mode switch N+1 can take effect. When a scene switch occurs, the first chip cooperates to send the scene switch instruction and the corresponding partition firmware, and the first chip can implement a more complex and flexible strategy. Since there is no need to load the partition firmware of the unused working mode in the memory of the first chip in advance, the storage resources of the first chip can be effectively saved.

[0085] The method provided in the embodiment of the present application can be applied to various scenarios and devices where users have requirements for the product firmware update speed and the normal function use is not affected during the update process.

[0086] The firmware update method provided in the embodiment of the present application can be executed by a firmware update device. In the embodiment of the present application, the firmware update device provided in the embodiment of the present application is described by taking the firmware update method executed by the firmware update device as an example.

[0087] See also Figure 5 , Figure 5 A flowchart of a firmware update method provided in an embodiment of the present application is provided. The firmware update method is executed by a second chip, and the method includes the following steps:

[0088] Step 501: When the working mode of the electronic device is switched, a mode switching instruction is sent to the first chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0089] Step 502: When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, send the partition firmware corresponding to the second working mode to the first chip.

[0090] Optionally, before sending the mode switching instruction to the first chip, the method further includes:

[0091] Determine a target module unit among the at least two module units according to the configuration parameters, wherein the target module unit corresponds to the second working mode;

[0092] Determining whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode;

[0093] When the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, executing the step of sending a mode switching instruction to the first chip;

[0094] When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, a step of sending a mode switching instruction to the first chip is executed, and a step of sending the partition firmware corresponding to the second working mode to the first chip is executed.

[0095] This embodiment is a second chip side embodiment corresponding to the above embodiment. Its specific implementation process corresponds to the above embodiment and has corresponding beneficial effects. To avoid repetition, it will not be described again here.

[0096] See also Figure 6 , Figure 6 The present invention provides a schematic diagram of a firmware update device 600 according to an embodiment of the present invention. The firmware update device 600 is applied to a first chip, and the device includes:

[0097] A receiving module 601 is used to receive a mode switching instruction sent by the second chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0098] The receiving module 601 is further configured to receive the partition firmware corresponding to the second working mode sent by the second chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode;

[0099] The switching module 602 is used to switch the working mode of the first chip to the second working mode according to the mode switching instruction, and load the partition firmware corresponding to the second working mode.

[0100] Optionally, the device further comprises:

[0101] The receiving module 601 is further configured to receive and load the main partition firmware sent by the second chip, wherein the first chip receives the mode switching instruction and partition firmware sent by the second chip based on the main partition firmware.

[0102] Optionally, the first chip includes at least two module units, and the first chip has at least two working modes, each of the module units corresponds to one of the at least two working modes, and the at least two working modes include the first working mode and the second working mode.

[0103] Optionally, the mode switching instruction includes a configuration parameter corresponding to the second working mode; and the device further includes:

[0104] a determination module, configured to determine a target module unit among the at least two module units according to the configuration parameters, wherein the target module unit corresponds to the second working mode;

[0105] The determination module is further used to determine whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode;

[0106] The switching module 602 is specifically used to switch the module unit corresponding to the first working mode in the first chip that is in working state to the target module unit according to the mode switching instruction when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode.

[0107] The receiving module 601 is specifically configured to, when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, execute the step of receiving the partition firmware corresponding to the second working mode sent by the second chip.

[0108] In this implementation, the working mode of the first chip corresponds to the partition firmware. In this way, during operation, the first chip only needs to load the partition firmware corresponding to the current working mode without loading the partition firmware of all working modes. When the corresponding partition firmware is different after the working mode is switched, the second chip only needs to send the partition firmware corresponding to the switched working mode to the first chip, so that the first chip loads the received partition firmware, thereby achieving normal operation after the working mode is switched. In this process, only the partition firmware corresponding to the current working mode in the first chip needs to be updated without updating the entire firmware, which saves the time for firmware updates and improves the flexibility of the first chip in switching working modes.

[0109] The firmware update device 600 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0110] The firmware update device 600 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0111] The firmware update device 600 provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0112] See also Figure 7 , Figure 7 The present invention provides a schematic diagram of a firmware update device 700 according to an embodiment of the present invention. The firmware update device 700 is applied to a second chip, and the device includes:

[0113] The sending module 701 is used to send a mode switching instruction to the first chip when the working mode of the electronic device is switched, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0114] The sending module 701 is further configured to send the partition firmware corresponding to the second working mode to the first chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode.

[0115] In this implementation, the working mode of the first chip corresponds to the partition firmware. In this way, during operation, the first chip only needs to load the partition firmware corresponding to the current working mode without loading the partition firmware of all working modes. When the corresponding partition firmware is different after the working mode is switched, the second chip only needs to send the partition firmware corresponding to the switched working mode to the first chip, so that the first chip loads the received partition firmware, thereby achieving normal operation after the working mode is switched. In this process, only the partition firmware corresponding to the current working mode in the first chip needs to be updated without updating the entire firmware, which saves the time for firmware updates and improves the flexibility of the first chip in switching working modes.

[0116] The firmware update device 700 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0117] The firmware update device 700 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0118] The firmware update device 700 provided in the embodiment of the present application can achieve Figure 5 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0119] Alternatively, if Figure 8As shown, the embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, a program or instruction stored in the memory 802 and executable on the processor 801, and the program or instruction is executed by the processor 801 to implement the above Figure 1 or Figure 5 The various processes of the firmware update method embodiment in the illustrated embodiment can achieve the same technical effect, and will not be described again here to avoid repetition.

[0120] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0121] Fig. 9 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0122] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.

[0123] The RF unit 901 is used to receive a mode switching instruction sent by the second chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0124] The radio frequency unit 901 is further configured to receive the partition firmware corresponding to the second working mode sent by the second chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode;

[0125] The processor 910 is configured to switch the operating mode of the first chip to the second operating mode according to the mode switching instruction, and load partition firmware corresponding to the second operating mode.

[0126] Optionally, the radio frequency unit 901 is further configured to receive and load a main partition firmware sent by the second chip, wherein the first chip receives a mode switching instruction and partition firmware sent by the second chip based on the main partition firmware.

[0127] Optionally, each of the module units corresponds to one of the at least two working modes, and the at least two working modes include the first working mode and the second working mode.

[0128] Optionally, the mode switching instruction includes a configuration parameter corresponding to the second working mode; the processor 910 is further configured to determine a target module unit among the at least two module units according to the configuration parameter, wherein the target module unit corresponds to the second working mode;

[0129] The processor 910 is further configured to determine whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode;

[0130] The processor 910 is further configured to switch the module unit corresponding to the first working mode in the first chip that is in working state to the target module unit according to the mode switching instruction when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode;

[0131] The processor 910 is further configured to, when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, execute the step of receiving the partition firmware corresponding to the second working mode sent by the second chip.

[0132] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0133] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0134] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0135] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.

[0136] Fig.10 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0137] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0138] The radio frequency unit 1001 is used to send a mode switching instruction to the first chip when the working mode of the electronic device is switched, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode;

[0139] The radio frequency unit 1001 is further configured to send the partition firmware corresponding to the second working mode to the first chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode.

[0140] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0141] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0142] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0143] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0144] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned firmware update method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0145] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0146] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned firmware update method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0147] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0148] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0150] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A firmware update method, characterized in that: Executed by the first chip, the method includes: receiving a mode switching instruction sent by the second chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode; In a case where the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, receiving the partition firmware corresponding to the second working mode sent by the second chip; The operating mode of the first chip is switched to the second operating mode according to the mode switching instruction, and partition firmware corresponding to the second operating mode is loaded.

2. The method according to claim 1, characterized in that Before receiving the mode switching instruction sent by the second chip, the method further includes: The main partition firmware sent by the second chip is received and loaded, wherein the first chip receives the mode switching instruction and partition firmware sent by the second chip based on the main partition firmware.

3. The method according to claim 1, characterized in that: The first chip includes at least two module units, and the first chip has at least two working modes, each of the module units corresponds to one of the at least two working modes, and the at least two working modes include the first working mode and the second working mode.

4. The method according to claim 3, characterized in that: The mode switching instruction includes configuration parameters corresponding to the second working mode; After receiving the mode switching instruction sent by the second chip and before the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, the method further includes: Determine a target module unit among the at least two module units according to the configuration parameters, wherein the target module unit corresponds to the second working mode; Determining whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode; In a case where the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode, switching the module unit corresponding to the first working mode in the first chip in a working state to the target module unit according to the mode switching instruction; When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, a step of receiving the partition firmware corresponding to the second working mode sent by the second chip is performed.

5. A method for switching working modes, characterized in that: Executed by the second chip, the method includes: When the working mode of the electronic device is switched, a mode switching instruction is sent to the first chip, wherein the mode switching instruction is used to instruct the working mode of the first chip to switch from the first working mode to the second working mode; When the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode, the partition firmware corresponding to the second working mode is sent to the first chip.

6. A firmware update device, applied to a first chip, characterized in that: The device comprises: A receiving module, used for receiving a mode switching instruction sent by the second chip, wherein the mode switching instruction is used for instructing the working mode of the first chip to switch from the first working mode to the second working mode; The receiving module is further configured to receive the partition firmware corresponding to the second working mode sent by the second chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode; A switching module is used to switch the working mode of the first chip to the second working mode according to the mode switching instruction, and load the partition firmware corresponding to the second working mode.

7. The device according to claim 6, characterized in that The device also includes: The receiving module is further used to receive and load the main partition firmware sent by the second chip, wherein the first chip receives the mode switching instruction and partition firmware sent by the second chip based on the main partition firmware.

8. The device according to claim 6, characterized in that The first chip includes at least two module units, and the first chip has at least two working modes, each of the module units corresponds to one of the at least two working modes, and the at least two working modes include the first working mode and the second working mode.

9. The device according to claim 8, characterized in that The mode switching instruction includes configuration parameters corresponding to the second working mode; and the device further includes: a determination module, configured to determine a target module unit among the at least two module units according to the configuration parameters, wherein the target module unit corresponds to the second working mode; The determination module is further used to determine whether the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode; The switching module is specifically configured to switch the module unit corresponding to the first working mode in the first chip that is in working state to the target module unit according to the mode switching instruction when the partition firmware corresponding to the second working mode is the same as the partition firmware corresponding to the first working mode; The receiving module is specifically used to execute the step of receiving the partition firmware corresponding to the second working mode sent by the second chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode.

10. A firmware update device, applied to a second chip, characterized in that: The device comprises: A sending module, used for sending a mode switching instruction to the first chip when the working mode of the electronic device is switched, wherein the mode switching instruction is used for instructing the working mode of the first chip to switch from the first working mode to the second working mode; The sending module is further used to send the partition firmware corresponding to the second working mode to the first chip when the partition firmware corresponding to the second working mode is different from the partition firmware corresponding to the first working mode.

11. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the firmware update method according to any one of claims 1 to 5 are implemented.

12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the firmware update method according to any one of claims 1 to 5 are implemented.

13. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the firmware updating method according to any one of claims 1 to 5.