DSP double-area firmware collaboration method, system and equipment in optical module
By implementing the dual-zone collaborative operation of DSP firmware in the optical module and adopting a simplified upgrade process, the problem of imperfect DSP firmware upgrade and rollback mechanisms in existing optical modules is solved, and the matching of DSP firmware and MCU firmware versions is achieved, which improves the upgrade efficiency and reliability.
Patent Information
- Application Number
- CN202510086080.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-16
AI Technical Summary
The lack of efficient and easy DSP firmware upgrade and rollback mechanisms in existing optical modules can cause business interruption when firmware upgrades and rollbacks on the client, and the failure of functions can occur when the MCU and DSP firmware versions do not match.
By saving two independent DSP firmware versions in the external Flash of the optical module and configuring DSP through the MCU firmware, DSP works normally, and the dual-zone collaborative operation of DSP firmware is achieved. At the same time, the SPI bus is used to connect the MCU and Flash, simplifying the DSP firmware upgrade process and reducing the use of communication interfaces on the MCU and DSP.
It achieves matching of DSP firmware and MCU firmware versions, avoids functional failure problems, improves the efficiency and flexibility of DSP firmware upgrades, reduces the impact on optical module business, and enhances the reliability of firmware upgrades and testing.
Smart Images

Figure CN120010891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photoelectric signal conversion, and in particular to a DSP dual-zone firmware collaboration method, system and device in an optical module. Background Art
[0002] With the comprehensive layout and construction of the 5G network era, information traffic will show explosive growth. The application of technologies such as cloud computing, big data, and AI will also drive the accelerated construction of global hyperscale data centers. As one of the core components of data center communications, optical modules are also evolving with the growing demand for optical modules in data centers. For example, silicon photonics technology, liquid cooling technology, linear drive pluggable optical modules (LPO), coherent technology, etc. have become the main development trends of optical modules. The development of these technologies not only puts forward higher requirements on the communication rate, transmission distance, and cost of optical modules. At the same time, in terms of software and control of optical modules, how to implement module protocols more efficiently, flexibly, and robustly to meet customer needs is also an important research direction.
[0003] As the speed of optical modules continues to increase, the processing and compensation of high-speed signals become increasingly important. At present, the commonly used high-speed signal processing method DSP technology has been widely used in high-speed PAM4 optical modules. Figure 6 It is the basic structure of a high-speed optical module. MCU and DSP are two important components. The normal functions of MCU and DSP require corresponding firmware support. In the context of the rapid development and change of optical module technology, the function changes and upgrade iterations of optical modules will become more frequent. Frequent function changes mean that not only the MCU and DSP firmware need to be frequently changed and upgraded during the development and production of optical modules, but even after the optical modules leave the factory, the MCU and DSP firmware need to be upgraded during the client's work due to some new demand changes or abnormal reasons.
[0004] In high-speed optical modules, MCU and DSP are the two core functional modules. MCU is usually responsible for control tasks and information interaction with host devices; DSP focuses on signal processing and high-speed data calculation. At the same time, MCU and DSP communicate through MDIO or IIC interface, and MCU firmware calls API functions provided by DSP to realize function control and status monitoring of DSP. In order to achieve efficient collaboration between the two, the API version used by MCU must match the DSP firmware version. For the same module, as development and testing proceed, MCU and DSP firmware versions need to be continuously updated and iterated to meet new functional requirements of the module and handle functional defects found. In this process, when the API version used by MCU and DSP firmware do not match, MCU's control over DSP may fail and the module may not work properly.
[0005] After leaving the factory, the module may need to roll back the firmware due to software defects, system failures or incompatibility issues. Once the optical module fails on the client side, how to quickly roll back the MCU firmware and DSP firmware to a stable version is an issue that needs to be considered. At the same time, simple and efficient firmware rollback is also conducive to functional comparison testing of different versions of firmware on the client side, reducing firmware update operations and improving test efficiency. For most of the current high-speed optical modules, the CDB function defined in the CMIS protocol can be used to achieve online upgrade and rollback of the MCU firmware. However, for DSP firmware, there is currently a lack of an efficient and simple way to implement the upgrade, maintenance and rollback mechanism of DSP firmware. Therefore, how to achieve DSP firmware rollback and maintenance in optical modules is an important issue that needs to be solved urgently.
[0006] In the current conventional optical module structure, usually only one DSP firmware is stored in the external Flash. When the module is in normal use in a switch or other device, the DSP firmware may need to be upgraded. When multiple identical optical modules work in the same switch, customers can only upgrade the module DSP firmware one by one in serial mode. During the upgrade and the process of running the new firmware after the upgrade is completed, the running business may be interrupted. In this case, how to reduce the impact of upgrading the DSP firmware on the running business of the optical module on the system is an important issue. Summary of the invention
[0007] The purpose of the present invention is to provide a DSP dual-zone firmware collaboration method, system and device in an optical module to solve the above-mentioned problems in the prior art.
[0008] The present invention is achieved through the following technical solutions:
[0009] In a first aspect, the present invention provides a DSP dual-zone firmware collaboration method in an optical module, comprising:
[0010] S101: Power on the optical module, complete the MCU function configuration and the corresponding optical and electrical interface configuration;
[0011] S102: In the PowerUp phase of the optical module, the DSP power supply information is enabled, the DSP SPI and the external Flash SPI bus are connected, and the DSP firmware data loading is triggered.
[0012] S103: Loading the DSP firmware boot program from the external Flash start address through the DSP;
[0013] S104: Determine the DSP firmware to be loaded and the starting address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program;
[0014] S105: Loading DSP firmware data from the corresponding Flash address according to the firmware selection code;
[0015] S106: Repeat step S105 until the DSP firmware data is loaded, and then configure the DSP through the MCU firmware to make the DSP work normally.
[0016] Preferably, it also includes:
[0017] When the DSP firmware needs to be upgraded, the MCU SPI and the external Flash SPI are connected, and the DSP firmware is upgraded through the MCU to the external Flash.
[0018] Preferably, the update process of the DSP firmware upgrade includes:
[0019] S201: The MCU firmware reports the supported CDB commands and firmware upgrade function information, and obtains the current DSP firmware version information;
[0020] S202: The MCU firmware receives the upgrade request of the Host device for the DSP firmware and performs upgrade preparation work;
[0021] S203: MCU disconnects DSP SPI and Flash SPI through the switch, and connects MCU SPI and Flash SPI buses;
[0022] S204: Selecting a code according to the current DSP firmware, erasing the Flash storage area corresponding to the De-active DSP firmware;
[0023] S205: Host sends DSP firmware data, MCU receives DSP firmware data sent by the device, and writes the data to the corresponding address of Flash through SPI;
[0024] S206: Repeat step S205 until all the DSP firmware data to be upgraded is written;
[0025] S207: The MCU performs DSP firmware data verification, and feeds back a firmware update success or failure flag according to the verification result; if the data verification succeeds, the DSP firmware upgrade is completed, and the newly updated DSP firmware is switched to run; if the verification fails, the updated DSP firmware information is checked, and the upgrade is performed again according to the update process;
[0026] S208: Read the DSP firmware version information after the upgrade.
[0027] Preferably, the switching to run the newly updated DSP firmware includes:
[0028] It is determined whether two different versions of DSP firmware already exist in the Flash. If so, switching is performed through the first step; if not, switching is performed through the second step.
[0029] Preferably, the first step comprises:
[0030] After the new DSP firmware is updated, load and test run the new DSP firmware;
[0031] Read the DSP running status, determine whether the new DSP firmware runs successfully, and return the DSP firmware running result;
[0032] If the new DSP firmware fails to run, the module automatically rolls back to the previous DSP firmware; if the new DSP firmware runs successfully, it waits for the Host command;
[0033] By modifying the firmware selection code in the bootloader, the newly updated DSP firmware becomes the default Active firmware after the module is powered on;
[0034] Preferably, the second step comprises:
[0035] If not, receive the DSP firmware switching request from the host device and run the De-active area firmware;
[0036] Receive instructions and modify the firmware selection code in the boot program to make the switched DSP firmware the default running firmware after the module is powered on.
[0037] In a second aspect, the present invention further provides a DSP dual-zone firmware coordination system in an optical module, comprising:
[0038] The optical module control module is configured to power on the optical module, complete the MCU function configuration and the corresponding optoelectronic interface configuration. In the PowerUp stage of the optical module, it enables the DSP power supply information, connects the DSPSPI and the external Flash SPI bus, and triggers the loading of DSP firmware data.
[0039] The loading module is configured to load the DSP firmware boot program from the external Flash start address through the DSP, and determine the DSP firmware to be loaded and the start address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program.
[0040] The configuration module is configured to load the DSP firmware data from the corresponding Flash address according to the firmware selection code, repeatedly execute step S105 until the DSP firmware data is loaded, and configure the DSP through the MCU firmware to make the DSP work normally;
[0041] The main control module is connected with the optical module control module, the loading module and the configuration module, and is used to execute the above-mentioned DSP dual-zone firmware coordination method in an optical module.
[0042] In a third aspect, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned DSP dual-zone firmware collaboration method in an optical module when executing the computer program.
[0043] The technical solution of the present invention has at least the following advantages and beneficial effects:
[0044] 1. Solve the problem of DSP firmware and MCU firmware mismatch failure in the optical module. Through the solution proposed by the present invention, the optical module can save two independent DSP firmware in the external Flash. In this way, it is consistent with the MCU dual-bank firmware, ensuring that the MCU firmware and DSP firmware versions match during the operation of the optical module. Solve the problem of DSP function failure caused by the mismatch between the DSP API version used by the MCU firmware and the DSP firmware version.
[0045] 2. Improve the DSP firmware upgrade efficiency in the optical module. In the currently commonly used DSP firmware upgrade method, the DSP firmware is generally upgraded through the "host software-->Host device (USB, IIC)-->MCU (MDIO, IIC)-->DSP (SPI)-->Flash" method, which requires many communication links. At the same time, during the upgrade process, data needs to be sent to the DSP through the MCU, resulting in the occupation of the communication interface between the MCU and the DSP, affecting the normal functions of the optical module, such as polling and reporting the lock status of the photoelectric port signal. This solution can connect the MCU and Flash through the SPI bus. During the DSP firmware upgrade process, the MCU directly sends data to the Flash. The DSP firmware upgrade structure is changed to "host software-->Host device (IIC)-->MCU (SPI)-->Flash", reducing the DSP firmware upgrade links and improving the firmware upgrade efficiency. At the same time, the MCU only serves as a transit station for the DSP firmware upgrade, and the DSP firmware upgrade function exists as a basic functional block of the MCU firmware. There is no need to design multiple MCU firmware to meet the DSP firmware upgrade, reducing the complexity of the MCU firmware. The problem of repeated updates of the MCU firmware introduced by supporting DSP firmware upgrades is solved.
[0046] 3) Enhance the flexibility and reliability of DSP firmware upgrade and testing in optical modules. In this solution, DSP firmware upgrade is executed for the De-active firmware area and does not affect the execution of the current active area firmware. At the same time, when there are two different versions of DSP firmware in the Flash, the switching between the two firmware can be achieved through simple commands as needed, which greatly enhances the flexibility of DSP firmware upgrade and testing in optical modules. On the other hand, through the trial operation mechanism, firmware selection code mechanism, and automatic rollback mechanism for upgrade failure, it can be ensured that during the DSP firmware upgrade process, when upgrade abnormalities such as new DSP firmware data abnormalities, communication abnormalities leading to DSP firmware data loss, etc. occur, the normal operation of the optical module will not be affected, greatly improving the reliability of the optical module DSP firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 It is a control flow diagram of the dual-zone cooperative operation mode of the DSP firmware of the present invention;
[0049] Figure 2 A control flow diagram of the DSP firmware upgrade method and steps of the present invention;
[0050] Figure 3 It is a control flow diagram of the first step of the dual-zone switching method of the DSP firmware of the present invention;
[0051] Figure 4 It is a control flow diagram of the second step of the DSP firmware dual-zone switching method of the present invention;
[0052] Figure 5 It is the dual-area storage structure of the DSP firmware of the present invention;
[0053] Figure 6 It is a schematic diagram of the prior art structure of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0055] The division of modules in this application is a logical division. There may be other division methods when implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0056] In addition, the connection, coupling or communication in the present application may be a direct connection, coupling or communication between related objects, or an indirect connection, coupling or communication through other devices. Furthermore, the connection, coupling or communication between objects may be electrical or other similar forms, which are not limited in the present application.
[0057] The modules or submodules described independently may be physically separated or not: they may be implemented by software or hardware, and some modules or submodules may be implemented by software, and the processor may call the software to implement the functions of these modules or submodules, and other modules or submodules may be implemented by hardware, such as by hardware circuits. In addition, some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0058] Please refer to Figure 1-Figure 6In the solution proposed by the present invention, the external Flash will retain two DSP firmware versions at the same time, called DSP firmware 1 and DSP firmware 2. At the same time, a DSP firmware boot program is saved at the starting address of the Flash. The boot program stores the DSP firmware information that needs to be run currently, called the DSP firmware selection code, and saves the Flash storage starting address of DSP firmware 1 and firmware 2. The basic data of the DSP firmware boot program only needs to be written through the burning device before the DSP is used, and does not need to be modified during the subsequent module operation. At the same time, the SPI pin of the Flash is controlled by a switch, and can selectively realize communication with the MCU SPI or the DSP SPI.
[0059] Specifically, they include:
[0060] S101: Power on the optical module, complete the MCU function configuration and the corresponding optical and electrical interface configuration;
[0061] Among them, the optical module is composed of optoelectronic devices, functional circuits and optical interfaces, and is a module that realizes the conversion of optical and electrical signals in communication.
[0062] The firmware is the software code written into the EEPROM and is responsible for communicating with the underlying hardware to implement corresponding functions.
[0063] S102: In the PowerUp phase of the optical module, the DSP power supply information is enabled, the DSP SPI and the external Flash SPI bus are connected, and the DSP firmware data loading is triggered.
[0064] Among them, the PowerUp phase of the optical module is a key link in its startup process, involving the initialization and self-test of the optical module.
[0065] S103: Loading the DSP firmware boot program from the external Flash start address through the DSP;
[0066] In this embodiment, the DSP firmware boot program is a Bootloader.
[0067] S104: Determine the DSP firmware to be loaded and the starting address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program;
[0068] S105: Loading DSP firmware data from the corresponding Flash address according to the firmware selection code;
[0069] S106: Repeat step S105 until the DSP firmware data is loaded, and then configure the DSP through the MCU firmware to make the DSP work normally.
[0070] In an exemplary embodiment of the present invention, in the solution proposed by the present invention, two DSP firmwares exist in the external Flash at the same time, so the DSP firmware upgrade can be performed without affecting the currently running firmware. According to the firmware selection code in the current boot code, the dual-zone DSP firmware is divided into Active firmware and De-active firmware. The dual-zone DSP firmware upgrade targets the De-active firmware area without affecting the Active firmware area. Combined with the CDB interface defined in the optical module CMIS protocol, the DSP firmware upgrade is completed. The detailed software process and steps of the upgrade are described as follows
[0071] When the DSP firmware needs to be upgraded, the MCUSPI and the external Flash SPI are connected, and the DSP firmware is upgraded through the MCU to the external Flash.
[0072] Specifically, the update process of DSP firmware upgrade includes:
[0073] S201: The MCU firmware reports the supported CDB commands and firmware upgrade function information, and obtains the current DSP firmware version information;
[0074] The host sends the Module Features (0040h) command, and the MCU firmware reports the supported CDB commands and firmware upgrade function information. The host sends the Get Firmware Info (0100h) command to obtain the current DSP firmware version information.
[0075] S202: The MCU firmware receives the upgrade request of the Host device for the DSP firmware and performs upgrade preparation work;
[0076] The host sends the Start Firmware Download (0101h) command, and the MCU firmware receives the host device's request to upgrade the DSP firmware and performs upgrade preparations;
[0077] S203: MCU disconnects DSP SPI and Flash SPI through the switch, and connects MCU SPI and Flash SPI buses;
[0078] S204: Selecting a code according to the current DSP firmware, erasing the Flash storage area corresponding to the De-active DSP firmware;
[0079] S205: Host sends DSP firmware data, MCU receives DSP firmware data sent by the device, and writes the data to the corresponding address of Flash through SPI;
[0080] The host sends the DSP firmware data through the Write Firmware Block EPL (0104h) instruction. The MCU receives the DSP firmware data sent by the device and writes the data to the corresponding address of the Flash through SPI.
[0081] S206: Repeat step S205 until all the DSP firmware data to be upgraded is written;
[0082] S207: The MCU performs DSP firmware data verification, and feeds back a firmware update success or failure flag according to the verification result; if the data verification succeeds, the DSP firmware upgrade is completed, and the newly updated DSP firmware is switched to run; if the verification fails, the updated DSP firmware information is checked, and the upgrade is performed again according to the update process;
[0083] The Host sends the Complete Firmware Download (0107h) command, and the MCU verifies the DSP firmware data.
[0084] S208: Read the DSP firmware version information after the upgrade.
[0085] The host sends the Get Firmware Info (0100h) command to read the DSP firmware version information after the upgrade.
[0086] In an exemplary embodiment of the present invention, in the CDB commands Run Firmware Image (0109h) and Commit Firmware Image (010Ah) defined by CMIS, no relevant flag is defined to distinguish whether Run / Commit is MCU firmware or DSP firmware. Therefore, it is necessary to add a flag information to the Run and Commit commands in the CDB to distinguish whether the command acts on the DSP firmware. Two situations are considered for DSP dual-zone firmware switching.
[0087] Switching to run the newly updated DSP firmware includes:
[0088] It is determined whether two different versions of DSP firmware already exist in the Flash. If so, switching is performed through the first step; if not, switching is performed through the second step.
[0089] Specifically, the first step includes:
[0090] After the new DSP firmware is updated, the Host sends the Run FirmwareImage (0109h) command. After receiving the command, the module loads and runs the new DSP firmware.
[0091] The module reads the DSP running status to determine whether the new DSP firmware runs successfully and returns the DSP firmware running result;
[0092] If the new DSP firmware fails to run, the module automatically rolls back to the previous DSP firmware; if the new DSP firmware runs successfully, it waits for the Host command.
[0093] The host sends the Commit Firmware Image (010Ah) command, and the module modifies the firmware selection code in the boot program to make the newly updated DSP firmware the default Active firmware after the module is powered on;
[0094] Next, the second step includes:
[0095] The host device sends the Run Firmware Image (0109h) command, and the module receives the DSP firmware switching request from the host device;
[0096] The module runs the De-active zone firmware;
[0097] The host device sends the Commit Firmware Image (010Ah) command. The module receives the command and modifies the firmware selection code in the boot program to make the switched DSP firmware the default running firmware after the module is powered on.
[0098] In the optical module DSP dual-zone firmware collaboration solution proposed in the present invention, the following protection measures can be taken to ensure stable and reliable upgrade and update of the optical module DSP firmware, reduce the impact on the running services of the optical module, and improve the DSP firmware upgrade efficiency.
[0099] Dual-zone firmware coordination mechanism: Upgrade the De-active zone without affecting the current Active zone firmware execution
[0100] Trial run mechanism: The newly upgraded DSP firmware is tested and the success of the upgrade is determined based on the test run results. If the upgrade is unsuccessful, it can be automatically rolled back to the previously normal DSP firmware without affecting the function of the entire optical module.
[0101] Firmware selection code mechanism: Based on the firmware trial run results, determine whether to modify the firmware selection code so that the newly upgraded DSP firmware becomes the active firmware for the module to be powered on. If the DSP firmware code is damaged due to the download process or operational errors, the firmware selection code can be kept unchanged after the trial run fails. Therefore, after the module is reset or powered on again, the DSP firmware that was previously verified to be functioning normally is still used to ensure the normal execution of the optical module function.
[0102] In a second aspect, the present invention further provides a DSP dual-zone firmware coordination system in an optical module, comprising:
[0103] The optical module control module is configured to power on the optical module, complete the MCU function configuration and the corresponding optoelectronic interface configuration. In the PowerUp phase of the optical module, it enables the DSP power supply information, connects the DSP SPI and the external Flash SPI bus, and triggers the loading of the DSP firmware data.
[0104] The loading module is configured to load the DSP firmware boot program from the external Flash start address through the DSP, and determine the DSP firmware to be loaded and the start address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program.
[0105] The configuration module is configured to load the DSP firmware data from the corresponding Flash address according to the firmware selection code, repeatedly execute step S105 until the DSP firmware data is loaded, and configure the DSP through the MCU firmware to make the DSP work normally;
[0106] The main control module is connected with the optical module control module, the loading module and the configuration module, and is used to execute the above-mentioned DSP dual-zone firmware coordination method in an optical module.
[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0109] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A DSP dual-zone firmware collaboration method in an optical module, characterized in that: include: S101: Power on the optical module, complete the MCU function configuration and the corresponding optical and electrical interface configuration; S102: In the PowerUp phase of the optical module, the DSP power supply is enabled, the DSP SPI and the external Flash SPI bus are connected, and the DSP firmware data loading is triggered. S103: Loading the DSP firmware boot program from the external Flash start address through the DSP; S104: Determine the DSP firmware to be loaded and the starting address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program; S105: Loading DSP firmware data from the corresponding Flash address according to the firmware selection code; S106: Repeat step S105 until the DSP firmware data is loaded, and then configure the DSP through the MCU firmware to make the DSP work normally.
2. The DSP dual-zone firmware collaboration method in an optical module according to claim 1, characterized in that: Also includes: When the DSP firmware needs to be upgraded, the MCU SPI and the external Flash SPI are connected, and the DSP firmware is upgraded through the MCU to the external Flash.
3. The DSP dual-zone firmware coordination method in an optical module according to claim 2, characterized in that: The update process of the DSP firmware upgrade includes: S201: The MCU firmware reports the supported CDB commands and firmware upgrade function information, and obtains the current DSP firmware version information; S202: The MCU firmware receives the upgrade request of the Host device for the DSP firmware and performs upgrade preparation work; S203: MCU disconnects DSP SPI and Flash SPI through the switch, and connects MCU SPI and Flash SPI buses; S204: Selecting a code according to the current DSP firmware, erasing the Flash storage area corresponding to the De-active DSP firmware; S205: Host sends DSP firmware data, MCU receives DSP firmware data sent by the device, and writes the data to the corresponding address of Flash through SPI; S206: Repeat step S205 until all the DSP firmware data to be upgraded is written; S207: The MCU performs DSP firmware data verification, and feeds back a firmware update success or failure flag according to the verification result; if the data verification succeeds, the DSP firmware upgrade is completed, and the newly updated DSP firmware is switched to run; if the verification fails, the updated DSP firmware information is checked, and the upgrade is performed again according to the update process; S208: Read the DSP firmware version information after the upgrade.
4. The DSP dual-zone firmware coordination method in an optical module according to claim 3, characterized in that: The switching to run the newly updated DSP firmware includes: It is determined whether two different versions of DSP firmware already exist in the Flash. If so, switching is performed through the first step; if not, switching is performed through the second step.
5. The DSP dual-zone firmware coordination method in an optical module according to claim 4, characterized in that: The first step includes: After the new DSP firmware is updated, load and test run the new DSP firmware; Read the DSP running status, determine whether the new DSP firmware runs successfully, and return the DSP firmware running result; If the new DSP firmware fails to run, the module automatically rolls back to the previous DSP firmware; if the new DSP firmware runs successfully, it waits for the Host command; By modifying the firmware selection code in the bootloader, the newly updated DSP firmware becomes the default Active firmware after the module is powered on; 6. The DSP dual-zone firmware coordination method in an optical module according to claim 5, characterized in that: The second step comprises: If not, receive the DSP firmware switching request from the host device and run the De-active area firmware; Receive instructions and modify the firmware selection code in the boot program to make the switched DSP firmware the default running firmware after the module is powered on.
7. A DSP dual-zone firmware coordination system in an optical module, characterized in that: include: The optical module control module is configured to power on the optical module, complete the MCU function configuration and the corresponding optoelectronic interface configuration. In the PowerUp phase of the optical module, it enables DSP power supply, connects the DSP SPI and external Flash SPI buses, and triggers DSP firmware data loading. The loading module is configured to load the DSP firmware boot program from the external Flash start address through the DSP, and determine the DSP firmware to be loaded and the start address of the firmware in the Flash according to the DSP firmware selection code and address information in the DSP firmware boot program. The configuration module is configured to load the DSP firmware data from the corresponding Flash address according to the firmware selection code, repeatedly execute step S105 until the DSP firmware data is loaded, and configure the DSP through the MCU firmware to make the DSP work normally; The main control module is connected to the optical module control module, the loading module and the configuration module, and is used to execute the DSP dual-zone firmware collaboration method in an optical module as described in any one of claims 1-6.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, a DSP dual-zone firmware collaboration method in an optical module according to any one of claims 1-6 is implemented.
Citation Information
Cited By
Upgrading method of intelligent voice network device, storage medium and electronic device
CN120583411A
Optical path signal integrity control method and system
CN121283501A