CN114816464A - Firmware upgrade control method, firmware upgrade control device and optical module - Google Patents

Firmware upgrade control method, firmware upgrade control device and optical module Download PDF

Info

Publication number
CN114816464A
CN114816464A CN202110129497.7A CN202110129497A CN114816464A CN 114816464 A CN114816464 A CN 114816464A CN 202110129497 A CN202110129497 A CN 202110129497A CN 114816464 A CN114816464 A CN 114816464A
Authority
CN
China
Prior art keywords
mcu
firmware
slave
firmware upgrading
slave mcu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110129497.7A
Other languages
Chinese (zh)
Inventor
汪巍
邓专
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN202110129497.7A priority Critical patent/CN114816464A/en
Publication of CN114816464A publication Critical patent/CN114816464A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • G06F13/124Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/409Mechanical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a firmware upgrading control method, a firmware upgrading control device and an optical module, which are used for firmware upgrading of double MCUs. And the main MCU receives a first control instruction sent by the upper computer. And the master MCU controls a firmware upgrading hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrading state. And receiving second firmware upgrading data directly sent by the upper computer from the MCU to finish firmware upgrading. According to the application, the slave MCU is controlled to be in the firmware upgrading state through the master MCU, the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and a program for transferring the slave MCU firmware upgrading data is not needed to be realized in the master MCU, so that the design of the master MCU is simpler, and the whole firmware upgrading speed is improved.

Description

Firmware upgrade control method, firmware upgrade control device and optical module
Technical Field
The present application relates to the field of optical fiber communication technologies, and in particular, to a firmware upgrade control method, a firmware upgrade control apparatus, and an optical module.
Background
Currently, firmware upgrade of an optical module is mostly firmware upgrade of an optical module including a single MCU. The firmware upgrading control method for the optical module of the single MCU generally needs to realize upgrading of the firmware of the optical module through a communication bus on a golden finger of the optical module.
For firmware upgrade of an optical module with double MCUs, if a firmware upgrade control method of the optical module with a single MCU is adopted, the firmware upgrade control method of a main MCU is unchanged, while firmware upgrade of a slave MCU needs to be transferred through the main MCU, and firmware data is sent to the slave MCU through a slave MCU control bus to complete upgrade.
According to the method, the master MCU and the slave MCU use the same set of starting loading program, but the program for transferring the slave MCU firmware data needs to be realized in the master MCU, so that the master MCU is complex in design and the overall firmware upgrading speed is seriously slowed down.
Disclosure of Invention
The application provides a firmware upgrading control method, a firmware upgrading control device and an optical module, which simplify the design of a main MCU and improve the firmware upgrading speed.
A firmware upgrade control method includes: the firmware upgrading device comprises a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to a protocol communication bus, a firmware upgrading hardware control pin of the master MCU is grounded, and the master MCU is connected with the slave MCU through the firmware upgrading hardware control pin of the slave MCU;
receiving a first control instruction sent by an upper computer;
and controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU firmware.
The utility model provides a firmware upgrading controlling means for two MCU's firmware upgrading, including main MCU and follow MCU, wherein, main MCU and follow MCU all insert agreement communication bus, main MCU's firmware upgrading hardware control pin ground connection, main MCU and follow MCU are connected through the firmware upgrading hardware control pin of following MCU, main MCU includes:
the receiving module is used for receiving a first control instruction sent by the upper computer;
and the control module is used for controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction so as to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU firmware.
A light module, comprising:
a circuit board;
the light emission submodule is electrically connected with the circuit board and is used for emitting light signals;
the light receiving secondary module is electrically connected with the circuit board and used for receiving light signals;
one end of the circuit board is provided with a golden finger, and a master MCU and a slave MCU are arranged on the circuit board;
the golden finger is connected with the upper computer through a protocol communication bus;
the main MCU is connected with the golden finger and is used for controlling the slave MCU to be in a firmware upgrading state;
and the slave MCU is connected with the golden finger through a firmware upgrading bus of the slave MCU and is connected with the main MCU through a firmware upgrading hardware control pin of the slave MCU.
Has the advantages that: the application provides a firmware upgrading control method for firmware upgrading of double MCUs, which comprises a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to a protocol communication bus, a firmware upgrading hardware control pin of the master MCU is grounded, and the master MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU. The master MCU and the slave MCU are both connected to a protocol communication bus, which shows that the master MCU and the slave MCU can both receive corresponding firmware upgrading data sent by the upper computer. The master MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU, which shows that the master MCU can control the slave MCU through a control instruction. The firmware upgrading control method comprises the following steps: firstly, when the main MCU is in a non-firmware upgrading state, the main MCU receives a first control instruction sent by the upper computer. Secondly, the main MCU controls a firmware upgrading hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrading state. The slave MCU is in a firmware upgrading state, which means that the slave MCU can receive second firmware upgrading data directly transmitted by the upper computer, wherein the second firmware upgrading data is used for upgrading the slave MCU. And finally, directly receiving second firmware upgrading data sent by the upper computer from the MCU to finish firmware upgrading. When the main body for executing firmware upgrading is converted from the master MCU to the slave MCU, the master MCU controls the slave MCU to be in a firmware upgrading state according to the first control instruction, so that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and firmware upgrading is completed. In this application, through the firmware upgrading hardware control pin of master MCU control slave MCU, make slave MCU be in the firmware upgrading state to make slave MCU can receive the second firmware upgrading data that the host computer directly sent, need not realize the procedure to slave MCU firmware upgrading data transfer in master MCU, make master MCU's design simpler, improved whole firmware upgrading speed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a connection relationship of an optical communication terminal;
fig. 2 is a schematic structural diagram of an optical network terminal;
fig. 3 is a schematic structural diagram of an optical module according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an exploded structure of an optical module according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an optical module located outside an upper housing and a lower housing according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a firmware upgrade control method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating another firmware upgrade control method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
In the following, some embodiments of the present application will be described in detail with reference to the drawings, and features in the following examples and examples may be combined with each other without conflict.
One of the core links of optical fiber communication is the interconversion of optical and electrical signals. The optical fiber communication uses optical signals carrying information to transmit in information transmission equipment such as optical fibers/optical waveguides, and the information transmission with low cost and low loss can be realized by using the passive transmission characteristic of light in the optical fibers/optical waveguides; meanwhile, the information processing device such as a computer uses an electric signal, and in order to establish information connection between the information transmission device such as an optical fiber or an optical waveguide and the information processing device such as a computer, it is necessary to perform interconversion between the electric signal and the optical signal.
The optical module realizes the function of interconversion of optical signals and electrical signals in the technical field of optical fiber communication, and the interconversion of the optical signals and the electrical signals is the core function of the optical module. The optical module is electrically connected with an external upper computer through a golden finger on an internal circuit board of the optical module, and the main electrical connection comprises power supply, I2C signals, data signals, grounding and the like; the optical module realizes optical connection with external optical fibers through an optical interface, the external optical fibers are connected in various ways, and various optical fiber connector types are derived; the method is characterized in that the electric connection is realized by using a golden finger at an electric interface, which becomes the mainstream connection mode of the optical module industry, and on the basis, the definition of pins on the golden finger forms various industry protocols/specifications; the optical connection mode realized by adopting the optical interface and the optical fiber connector becomes the mainstream connection mode of the optical module industry, on the basis, the optical fiber connector also forms various industry standards, such as an LC interface, an SC interface, an MPO interface and the like, the optical interface of the optical module also has adaptive structural design aiming at the optical fiber connector, and the optical fiber adapter assembly arranged at the optical interface has various types.
Fig. 1 is a schematic diagram of connection relationship of an optical communication terminal. As shown in fig. 1, the connection of the optical communication terminal mainly includes the interconnection among the optical network terminal 100, the optical module 200, the optical fiber 101 and the network cable 103;
one end of the optical fiber 101 is connected with a far-end server, one end of the network cable 103 is connected with local information processing equipment, and the connection between the local information processing equipment and the far-end server is completed by the connection between the optical fiber 101 and the network cable 103; and the connection between the optical fiber 101 and the network cable 103 is made by the optical network terminal 100 having the optical module 200.
An optical interface of the optical module 200 is externally accessed to the optical fiber 101, and establishes bidirectional optical signal connection with the optical fiber 101; the electrical interface of the optical module 200 is externally connected to the optical network terminal 100, and establishes a bidirectional electrical signal connection with the optical network terminal 100; bidirectional interconversion of optical signals and electric signals is realized inside the optical module, so that information connection is established between the optical fiber and the optical network terminal; specifically, the optical signal from the optical fiber 101 is converted into an electrical signal by the optical module and then input to the optical network terminal 100, and the electrical signal from the optical network terminal 100 is converted into an optical signal by the optical module and input to the optical fiber 101.
The optical network terminal is provided with an optical module interface 102, which is used for accessing an optical module 200 and establishing bidirectional electric signal connection with the optical module 200; the optical network terminal has a network cable interface 104, which is used for accessing the network cable 103 and establishing a bidirectional electrical signal connection (generally, an electrical signal of an ethernet protocol, which is different from an electrical signal used by an optical module in protocol/type) with the network cable 103; the optical module 200 is connected to the network cable 103 through the optical network terminal 100, specifically, the optical network terminal transmits a signal from the optical module to the network cable and transmits the signal from the network cable to the optical module, and the optical network terminal serves as an upper computer of the optical module to monitor the operation of the optical module. The optical network terminal is an upper computer of the optical module, provides data signals for the optical module and receives the data signals from the optical module, and a bidirectional signal transmission channel is established between the remote server and the local information processing equipment through the optical fiber, the optical module, the optical network terminal and a network cable.
Common local information processing apparatuses include routers, home switches, electronic computers, and the like; common optical network terminals include an optical network unit ONU, an optical line terminal OLT, a data center server, a data center switch, and the like.
Fig. 2 is a schematic diagram of an optical network terminal structure. As shown in fig. 2, the optical network terminal 100 has a circuit board 105, and a cage 106 is disposed on a surface of the circuit board 105; an electrical connector is arranged in the cage 106 and used for accessing an electrical interface (such as a gold finger) of the optical module; the cage 106 is provided with a heat sink 107, and the heat sink 107 has a projection such as a fin that increases a heat radiation area.
The optical module 200 is inserted into an optical network terminal, the electrical interface of the optical module is inserted into the electrical connector inside the cage 106, and the optical interface of the optical module is connected to the optical fiber 101.
The cage 106 is positioned on the circuit board, and the electrical connector on the circuit board is wrapped in the cage, so that the electrical connector is arranged in the cage; the optical module is inserted into the cage, held by the cage, and the heat generated by the optical module is conducted to the cage 106 and then diffused by the heat sink 107 on the cage.
Fig. 3 is a schematic diagram of an optical module structure provided in the embodiment of the present application, and fig. 4 is an exploded schematic diagram of the optical module provided in the embodiment of the present application. Fig. 5 is a schematic structural diagram of an optical module located outside an upper housing and a lower housing according to an embodiment of the present application. As shown in fig. 3 to 5, an optical module 200 provided in an embodiment of the present application includes an upper housing 201, a lower housing 202, an unlocking member 203, a circuit board 300, a tosa 400, and a rosa 500.
The upper shell 201 is covered on the lower shell 202 to form a wrapping cavity with two openings; the outer contour of the wrapping cavity is generally a square body, and specifically, the lower shell comprises a main plate and two side plates which are positioned at two sides of the main plate and are perpendicular to the main plate; the upper shell comprises a cover plate, and the cover plate covers two side plates of the upper shell to form a wrapping cavity; the upper shell can also comprise two side walls which are positioned at two sides of the cover plate and are perpendicular to the cover plate, and the two side walls are combined with the two side plates to realize that the upper shell covers the lower shell.
The two openings may be two openings (204, 205) located at the same end of the optical module, or two openings located at different ends of the optical module; one opening is an electric port 204, and a gold finger of the circuit board extends out of the electric port 204 and is inserted into an upper computer such as an optical network terminal; the other opening is an optical port 205 for external optical fiber access to connect the tosa 400 and the rosa 500 inside the optical module; the optoelectronic devices such as the circuit board 300, the tosa 400 and the rosa 500 are located in the package cavity.
The assembly mode of combining the upper shell and the lower shell is adopted, so that the circuit board 300, the transmitter sub-module 400, the receiver sub-module 500 and other devices can be conveniently installed in the shells, and the outermost packaging protection shell of the optical module is formed by the upper shell and the lower shell; the upper shell and the lower shell are made of metal materials generally, so that electromagnetic shielding and heat dissipation are facilitated; generally, the housing of the optical module is not made into an integrated component, so that when devices such as a circuit board and the like are assembled, the positioning component, the heat dissipation component and the electromagnetic shielding component cannot be installed, and the production automation is not facilitated.
The unlocking component 203 is located on the outer wall of the wrapping cavity/lower shell 202, and is used for realizing the fixed connection between the optical module and the upper computer or releasing the fixed connection between the optical module and the upper computer.
The unlocking component 203 is provided with a clamping component matched with the upper computer cage; the end of the unlocking component can be pulled to enable the unlocking component to move relatively on the surface of the outer wall; the optical module is inserted into a cage of the upper computer, and the optical module is fixed in the cage of the upper computer by a clamping component of the unlocking component; by pulling the unlocking component, the clamping component of the unlocking component moves along with the unlocking component, so that the connection relation between the clamping component and the upper computer is changed, the clamping relation between the optical module and the upper computer is released, and the optical module can be drawn out from the cage of the upper computer.
The circuit board 300 is provided with circuit traces, electronic components (such as capacitors, resistors, triodes, and MOS transistors), chips (such as the MCU301, the laser driver chip, the amplitude limiting amplifier chip, the clock data recovery CDR, the power management chip, and the data processing chip DSP), and a nonvolatile memory 302.
The circuit board connects the electrical appliances in the optical module together according to the circuit design through circuit wiring to realize the functions of power supply, electrical signal transmission, grounding and the like.
The circuit board is generally a hard circuit board, and the hard circuit board can also realize a bearing effect due to the relatively hard material of the hard circuit board, for example, the hard circuit board can stably bear a chip; when the optical transceiver is positioned on the circuit board, the rigid circuit board can also provide stable bearing; the hard circuit board can also be inserted into an electric connector in the upper computer cage, and specifically, a metal pin/golden finger is formed on the surface of the tail end of one side of the hard circuit board and is used for being connected with the electric connector; these are not easily implemented with flexible circuit boards.
And the golden finger is connected with the upper computer through a protocol communication bus and used for receiving information mutually transmitted by the upper computer and the optical module.
The circuit board 300 is provided with a master MCU301 and a slave MCU 302. In particular, the method comprises the following steps of,
since the firmware upgrading logics of the master MCU301 and the slave MCU302 are the same, when the master MCU301 and the slave MCU302 determine that they should be in a certain state, both the master MCU301 and the slave MCU302 first determine whether the level of the firmware upgrading hardware control pin is the first level, and when the level of the firmware upgrading hardware control pin is the first level, continue to determine whether the firmware upgrading software identification number is the second number. Specifically, when the level of the firmware upgrade hardware control pin is the second level, the corresponding MCU is in a non-firmware upgrade state. And when the level of the firmware upgrading hardware control pin is a first level and the identification value of the firmware upgrading software is a second value, the corresponding MCU is in a non-firmware upgrading state. And when the level of the firmware upgrading hardware control pin is a first level and the identification value of the firmware upgrading software is a first value, the corresponding MCU is in a firmware upgrading state. For the main MCU301, since the firmware upgrade hardware control pin of the main MCU301 is always grounded, the level of the firmware upgrade hardware control pin of the main MCU301 is always the first level. Therefore, when the main MCU301 determines that it should be in a certain state, it is not necessary to determine whether the level of the firmware upgrade hardware control pin of the main MCU301 is the first level, and it is sufficient to directly determine whether the firmware upgrade software identifier of the main MCU301 is the second value. For the slave MCU302, the software identification value is always the first value due to the firmware upgrade of the slave MCU 302. Therefore, when the slave MCU302 determines that it should be in a certain state, it is not necessary to determine whether the firmware upgrade software identifier of the slave MCU302 is the second value, and it is sufficient to directly determine whether the firmware upgrade hardware control pin level of the master MCU301 is the first level. The first level is a low level, the second level is a high level, the first value is 0, and the second value is 1. In this application, the firmware upgrade software identification value can only be the first value or the second value.
And the master MCU301 is connected with the golden finger through a firmware upgrading bus of the master MCU and is used for controlling the slave MCU302 to be in a firmware upgrading state. Specifically, when the master MCU301 is in the non-firmware upgrade state, the master MCU301 receives a first control instruction sent by the host computer 100, and controls the slave MCU302 to be in the firmware upgrade state according to the first control instruction.
The host MCU301 being in a non-firmware upgrade state includes two cases. The first case is: the main MCU301 completes the firmware upgrade, exits the firmware upgrade program, and enters the normal program. The second case is: the host MCU301 is never firmware upgraded. After the main MCU301 completes the firmware upgrade, and exits the firmware upgrade program, and enters the normal program, the method includes: firstly, the main MCU301 receives a first write-in instruction sent by the upper computer 100 through the protocol communication bus and the gold finger, and makes the main MCU301 in a firmware upgrade state according to the first write-in instruction, and secondly, the main MCU301 receives first firmware upgrade data sent by the upper computer, so that the firmware upgrade is completed. Finally, the main MCU301 receives a second write instruction sent by the upper computer, and makes it in a non-firmware upgrade state according to the second write instruction.
Since the host MCU301 may be in the firmware upgrade state according to the first write command, it can be known from the above description that the first write command refers to a command that the firmware upgrade software identification value of the host MCU301 is the first value. And because the main MCU301 exits the firmware upgrade program according to the second write command and enters the normal program, it can be known from the above description that the second write command refers to a command whose firmware upgrade software identifier value of the main MCU301 is the second value.
The slave MCU302 is connected with the golden finger through a firmware upgrading bus of the slave MCU and connected with the master MCU301 through a firmware upgrading hardware control pin of the slave MCU for finishing firmware upgrading. Specifically, since the slave MCU302 does not need to enter firmware upgrade, the firmware upgrade hardware control pin of the slave MCU is pulled high. When the main MCU301 finishes firmware upgrade and needs to finish firmware upgrade of the slave MCU302, the main MCU301 controls the firmware upgrade hardware control pin of the slave MCU to pull down according to the first control instruction, so that the level of the firmware upgrade hardware control pin of the slave MCU302 is the first level. According to the above description, it can be known that the firmware upgrade software identification value of the slave MCU302 is always the first value, and then the slave MCU302 is in the firmware upgrade state according to the level of the firmware upgrade hardware control pin of the slave MCU302 being the first level. The slave MCU is in a firmware upgrading state, which means that the slave MCU can receive second firmware upgrading data directly transmitted by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU. When the slave MCU302 is in the firmware upgrading state, the slave MCU may receive second firmware upgrading data directly transmitted by the upper computer to complete firmware upgrading.
A flexible circuit board is also used in a part of the optical module to supplement a rigid circuit board; the flexible circuit board is generally used in combination with a rigid circuit board, for example, the rigid circuit board may be connected to the optical transceiver device through the flexible circuit board.
And the tosa 400 is electrically connected to the circuit board 300 and is used for transmitting optical signals.
The optical receive sub-module 500 has one end connected to an external optical fiber and the other end electrically connected to the circuit board 300 through a pin and a flexible board, and is configured to receive an optical signal transmitted from the external optical fiber.
In the embodiment of the present application, the upper computer refers to an optical network terminal.
The embodiment of the application provides an optical module and also provides a firmware upgrading control method. The firmware upgrading control method is used for upgrading firmware of double MCUs and comprises a master MCU and a slave MCU, wherein both the master MCU and the slave MCU are connected to a protocol communication bus, firmware upgrading logics of the master MCU and the slave MCU are the same, a firmware upgrading hardware control pin of the master MCU is grounded, the master MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU, and a firmware upgrading software identification numerical value of the slave MCU is a first numerical value. The firmware upgrading control method is divided into two cases because the main MCU is in a non-firmware upgrading state. Embodiment 1 is where the master MCU is in the second case and embodiment 2 is where the master MCU is in the first case.
Example 1
Fig. 6 is a flowchart illustrating a firmware upgrade control method according to an embodiment of the present application. Since the fact that the host MCU is in the non-firmware upgrade state means that the host MCU has never upgraded firmware, as can be seen from fig. 6, the specific steps of the firmware upgrade control method are as follows:
s100: and receiving a first control instruction sent by the upper computer.
The main MCU receives a first control instruction sent by the upper computer when the main MCU is in a non-firmware upgrading state.
Because the firmware upgrading software identification value of the slave MCU is always the first value, when the slave MCU needs firmware upgrading, the level of the firmware upgrading hardware control pin is only required to be the first level. Therefore, the first control instruction refers to an instruction for upgrading the hardware control pin level to the first level from the firmware of the MCU.
Since the master MCU is upgraded from the slave MCU, the slave MCU firmware is upgraded firstly. At the moment, the upper computer sends a first control instruction to the main MCU, and the main MCU receives the control instruction.
The method comprises the following specific steps: the upper computer sends an instruction for controlling the level of a firmware upgrading hardware control pin of the slave MCU to be a first level to the master MCU; the master MCU receives the instruction.
S200: and controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU firmware.
And the master MCU controls a firmware upgrading hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrading state.
And the main MCU controls a firmware upgrading hardware control pin of the slave MCU to be a first level according to the first control instruction, wherein the level of the firmware upgrading hardware control pin of the slave MCU is the first level and is used for indicating that the slave MCU is in a firmware upgrading state. Under the state, the slave MCU can receive second firmware upgrading data directly sent by the upper computer and complete firmware upgrading according to the second firmware upgrading data.
The method comprises the following specific steps: and the master MCU controls the pull-down of the firmware upgrading hardware control pin of the slave MCU according to the instruction. The slave MCU recognizes that the firmware upgrading hardware control pin of the slave MCU is pulled down, namely the slave MCU is in the firmware upgrading state when the firmware upgrading hardware control pin level of the slave MCU is the first level.
When the slave MCU completes the firmware upgrade and the master MCU needs to complete the firmware upgrade, the slave MCU firstly needs to quit the firmware upgrade state, and then the master MCU is in the firmware upgrade state. The specific process is as follows:
s300: and receiving a second control instruction sent by the upper computer.
And the main MCU receives a second control instruction sent by the upper computer.
Because the firmware upgrading software identification value of the slave MCU is always the first value, when the slave MCU needs to quit the firmware upgrading program, the level of the firmware upgrading hardware control pin is only required to be the second level. Therefore, the second control instruction refers to an instruction for controlling the level of the firmware upgrading hardware control pin of the slave MCU to be the second level.
The method comprises the following specific steps: the upper computer sends an instruction for controlling the level of a firmware upgrading hardware control pin of the slave MCU to be a second level to the master MCU; the master MCU receives the instruction.
S400: and controlling a firmware upgrading hardware control pin of the slave MCU according to the second control instruction, so that the slave MCU is in a non-firmware upgrading state.
And the master MCU controls the level of a firmware upgrading hardware control pin of the slave MCU to be a second level according to the second control instruction, wherein the level of the firmware upgrading hardware control pin of the slave MCU is the second level and is used for indicating that the slave MCU is in a non-firmware upgrading state.
The method comprises the following specific steps: and the master MCU controls the pull-up of the firmware upgrading hardware control pin of the slave MCU according to the instruction. The slave MCU recognizes that the firmware upgrading hardware control pin of the slave MCU is pulled high, namely the slave MCU is in a non-firmware upgrading state when the firmware upgrading hardware control pin level of the slave MCU is the second level.
When the main MCU is required to finish firmware upgrading, the upper computer directly sends a first writing instruction and first firmware upgrading data to the main MCU to finish firmware upgrading because the slave MCU is in a non-firmware upgrading state at the moment.
In this application, the non-firmware upgrade state refers to that the MCU completes firmware upgrade, exits the firmware upgrade program, and enters the normal program.
Example 2
Fig. 7 is a flowchart illustrating another firmware upgrade control method according to an embodiment of the present application. Since the main MCU in the non-firmware upgrade state means that the main MCU completes the firmware upgrade, exits the firmware upgrade program, and enters the normal program, as can be seen from fig. 7, the firmware upgrade control method includes the following specific steps:
t100: and receiving a first write-in instruction sent by the upper computer, and enabling the main MCU to be in a firmware upgrading state according to the first write-in instruction.
And the main MCU receives a first writing instruction sent by the upper computer and enables the main MCU to be in a firmware upgrading state according to the first writing instruction. The main MCU is in a firmware upgrading state, which means that the main MCU can directly receive first firmware upgrading data sent by the upper computer. And the first firmware upgrading data is used for upgrading the firmware of the main MCU.
The firmware upgrading hardware control pin of the main MCU is always grounded, namely the level of the firmware upgrading hardware control pin of the main MCU is the first level. When the main MCU needs firmware upgrading, the firmware upgrading software identification value is only required to be the first value. Therefore, the first write instruction refers to an instruction that the firmware upgrade software identification value of the host MCU is the first value.
The specific process of the step is as follows: and the upper computer writes an instruction with the firmware upgrading software identification numerical value of the main MCU as a first numerical value into the main MCU. The main MCU receives the instruction and judges which state the main MCU should be in according to the instruction. Since the instruction is used for indicating that the main MCU is in the firmware upgrading state, when the main MCU identifies the instruction, the main MCU is in the firmware upgrading state.
T200: and receiving first firmware upgrading data sent by the upper computer to finish firmware upgrading.
And the main MCU receives first firmware upgrading data sent by the upper computer to complete firmware upgrading.
When the main MCU finishes firmware upgrading, and the slave MCU needs to finish firmware upgrading, the main MCU is required to exit the firmware upgrading state and be in a non-firmware upgrading state, and then the main MCU controls the slave MCU to be in the firmware upgrading state. The method comprises the following specific steps:
t300: and receiving a second write-in instruction sent by the upper computer, and enabling the main MCU to be in a non-firmware upgrading state according to the second write-in instruction.
And the main MCU receives a second writing instruction sent by the upper computer and is in a non-firmware upgrading state according to the second writing instruction.
The firmware upgrading hardware control pin of the main MCU is always grounded, namely the level of the firmware upgrading hardware control pin of the main MCU is the first level. When the main MCU exits the firmware upgrading program, the firmware upgrading software identification value is only required to be the second value. Therefore, the second write instruction refers to an instruction that the firmware upgrade software identification value of the host MCU is the second value.
The specific process of the step is as follows: and the upper computer writes an instruction with the firmware upgrading software identification numerical value of the main MCU as a second numerical value into the main MCU. The main MCU receives the instruction and judges which state the main MCU should be in according to the instruction. Since the instruction is used for indicating that the main MCU is in a non-firmware upgrading state, when the main MCU identifies the instruction, the main MCU is in the non-firmware upgrading state.
T400: and receiving a first control instruction sent by the upper computer.
And the main MCU receives a first control instruction sent by the upper computer.
T500: and controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU firmware.
And the master MCU controls a firmware upgrading hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrading state.
T600: and receiving a second control instruction sent by the upper computer.
And the main MCU receives a second control instruction sent by the upper computer.
T700: and controlling a firmware upgrading hardware control pin of the slave MCU according to the second control instruction, so that the slave MCU is in a non-firmware upgrading state.
And the master MCU controls the slave MCU to be in a non-firmware upgrading state according to the second control instruction.
The same parts as those in embodiment 1 are not described again in this embodiment.
The firmware upgrading control device comprises firmware upgrading for double MCUs, and comprises a main MCU and a slave MCU, wherein the main MCU and the slave MCU are both connected to a protocol communication bus, a firmware upgrading hardware control pin of the main MCU is grounded, and the main MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU. The main MCU comprises a receiving module and a control module. In particular, the method comprises the following steps of,
and the receiving module is used for receiving a first control instruction sent by the upper computer.
And the control module is used for controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction so as to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the slave MCU firmware.
The application provides a firmware upgrading control method for firmware upgrading of double MCUs, which comprises a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to a protocol communication bus, a firmware upgrading hardware control pin of the master MCU is grounded, and the master MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU. The master MCU and the slave MCU are both connected to a protocol communication bus, which shows that the master MCU and the slave MCU can both receive corresponding firmware upgrading data sent by the upper computer. The master MCU and the slave MCU are connected through a firmware upgrading hardware control pin of the slave MCU, which shows that the master MCU can control the slave MCU through a control instruction. The firmware upgrading control method comprises the following steps: firstly, when the main MCU is in a non-firmware upgrading state, the main MCU receives a first control instruction sent by the upper computer. Secondly, the main MCU controls a firmware upgrading hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrading state. The slave MCU is in a firmware upgrading state, which means that the slave MCU can receive second firmware upgrading data directly transmitted by the upper computer, wherein the second firmware upgrading data is used for upgrading the slave MCU. And finally, receiving second firmware upgrading data directly sent by the upper computer from the MCU to finish firmware upgrading. When the main body for executing firmware upgrading is converted from the master MCU to the slave MCU, the master MCU controls the slave MCU to be in a firmware upgrading state according to the first control instruction, so that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and firmware upgrading is completed. In this application, through the firmware upgrading hardware control pin of master MCU control slave MCU, make slave MCU be in the firmware upgrading state to make slave MCU can receive the second firmware upgrading data that the host computer directly sent, need not realize the procedure to slave MCU firmware upgrading data transfer in master MCU, make master MCU's design simpler, improved whole firmware upgrading speed.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (9)

1. A firmware upgrade control method is characterized in that the method is used for firmware upgrade of double MCUs and comprises a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to a protocol communication bus, a firmware upgrade hardware control pin of the master MCU is grounded, and the master MCU is connected with the slave MCU through a firmware upgrade hardware control pin of the slave MCU;
receiving a first control instruction sent by an upper computer;
and controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by an upper computer, and the second firmware upgrading data is used for upgrading the firmware of the slave MCU.
2. The firmware upgrade control method according to claim 1, wherein the firmware upgrade logic of the master MCU is the same as that of the slave MCU, and the master MCU further enables the master MCU to be in a firmware upgrade state according to a first write instruction sent by the upper computer, where the first write instruction refers to an instruction with a first value as a firmware upgrade software identifier value of the master MCU.
3. The firmware upgrade control method according to claim 1, wherein controlling a firmware upgrade hardware control pin of the slave MCU to make the slave MCU in a firmware upgrade state according to the first control instruction comprises:
and controlling the level of a firmware upgrading hardware control pin of the slave MCU to be a first level according to the first control instruction, wherein the level of the firmware upgrading hardware control pin of the slave MCU is the first level and is used for indicating that the slave MCU is in a firmware upgrading state.
4. The firmware upgrade control method according to claim 1, wherein the method further includes, after controlling a firmware upgrade hardware control pin of the slave MCU according to the first control instruction and setting the slave MCU in a firmware upgrade state:
receiving a second control instruction sent by the upper computer;
and controlling a firmware upgrading hardware control pin of the slave MCU according to the second control instruction, so that the slave MCU is in a non-firmware upgrading state.
5. The firmware upgrade control method according to claim 4, wherein controlling a firmware upgrade hardware control pin of the slave MCU according to the second control instruction to make the slave MCU in a non-firmware upgrade state comprises:
and controlling the level of a firmware upgrading hardware control pin of the slave MCU to be a second level according to the second control instruction, wherein the level of the firmware upgrading hardware control pin of the slave MCU is the second level and is used for indicating that the slave MCU is in a non-firmware upgrading state.
6. The firmware upgrade control method according to claim 1, wherein the receiving, by the master MCU, the first control instruction sent by the upper computer is when the master MCU is in a non-firmware upgrade state, and wherein the non-firmware upgrade state of the master MCU comprises:
after the main MCU is in a firmware upgrading state, the main MCU receives first firmware upgrading data sent by the upper computer to complete firmware upgrading;
and the main MCU receives a second writing instruction sent by the upper computer and enables the main MCU to be in a non-firmware upgrading state according to the second writing instruction.
7. The firmware upgrade control method according to claim 6, wherein the second write command refers to a command with a second value as a firmware upgrade software identification value of the host MCU.
8. The utility model provides a firmware upgrade controlling means, its characterized in that for the firmware upgrade of two MCU, including main MCU and follow MCU, wherein, main MCU with follow MCU all inserts agreement communication bus, main MCU's firmware upgrade hardware control pin ground connection, main MCU with follow MCU passes through the firmware upgrade hardware control pin connection of following MCU, main MCU includes:
the receiving module is used for receiving a first control instruction sent by the upper computer;
and the control module is used for controlling a firmware upgrading hardware control pin of the slave MCU according to the first control instruction so as to enable the slave MCU to be in a firmware upgrading state, wherein the slave MCU in the firmware upgrading state refers to a state that the slave MCU can receive second firmware upgrading data directly sent by the upper computer, and the second firmware upgrading data is used for upgrading the firmware of the slave MCU.
9. A light module, comprising:
a circuit board;
the light emission submodule is electrically connected with the circuit board and is used for emitting light signals;
the light receiving secondary module is electrically connected with the circuit board and used for receiving light signals;
one end of the circuit board is provided with a golden finger, and a master MCU and a slave MCU are arranged on the circuit board;
the golden finger is connected with the upper computer through a protocol communication bus;
the main MCU is connected with the golden finger and is used for controlling the slave MCU to be in a firmware upgrading state;
the slave MCU is connected with the golden finger through a firmware upgrading bus of the slave MCU and connected with the master MCU through a firmware upgrading hardware control pin of the slave MCU.
CN202110129497.7A 2021-01-29 2021-01-29 Firmware upgrade control method, firmware upgrade control device and optical module Pending CN114816464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110129497.7A CN114816464A (en) 2021-01-29 2021-01-29 Firmware upgrade control method, firmware upgrade control device and optical module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110129497.7A CN114816464A (en) 2021-01-29 2021-01-29 Firmware upgrade control method, firmware upgrade control device and optical module

Publications (1)

Publication Number Publication Date
CN114816464A true CN114816464A (en) 2022-07-29

Family

ID=82526518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110129497.7A Pending CN114816464A (en) 2021-01-29 2021-01-29 Firmware upgrade control method, firmware upgrade control device and optical module

Country Status (1)

Country Link
CN (1) CN114816464A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160103672A1 (en) * 2013-02-21 2016-04-14 Zte Corporation Firmware upgrade method and system
CN110488726A (en) * 2019-09-25 2019-11-22 潍柴动力股份有限公司 A kind of starting control system and starting method
CN110531998A (en) * 2019-09-04 2019-12-03 青岛海信宽带多媒体技术有限公司 A kind of firmware programming method of optical module and optical module
CN111555810A (en) * 2020-04-22 2020-08-18 青岛海信宽带多媒体技术有限公司 Optical module and data transmission method
CN111831309A (en) * 2020-07-16 2020-10-27 深圳市朗科智能电气股份有限公司 Upgrading method, device, equipment and medium for multiple MCUs (micro control units) in Wifi (wireless fidelity) of Internet of things
CN112148339A (en) * 2020-09-29 2020-12-29 苏州海鹏科技有限公司 Dual-core chip and program updating method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160103672A1 (en) * 2013-02-21 2016-04-14 Zte Corporation Firmware upgrade method and system
CN110531998A (en) * 2019-09-04 2019-12-03 青岛海信宽带多媒体技术有限公司 A kind of firmware programming method of optical module and optical module
CN110488726A (en) * 2019-09-25 2019-11-22 潍柴动力股份有限公司 A kind of starting control system and starting method
CN111555810A (en) * 2020-04-22 2020-08-18 青岛海信宽带多媒体技术有限公司 Optical module and data transmission method
CN111831309A (en) * 2020-07-16 2020-10-27 深圳市朗科智能电气股份有限公司 Upgrading method, device, equipment and medium for multiple MCUs (micro control units) in Wifi (wireless fidelity) of Internet of things
CN112148339A (en) * 2020-09-29 2020-12-29 苏州海鹏科技有限公司 Dual-core chip and program updating method thereof

Similar Documents

Publication Publication Date Title
CN111239934B (en) Optical module
CN111555810A (en) Optical module and data transmission method
CN111239930A (en) Optical module
US8224185B2 (en) USB compatible apparatus for connecting between optical USB device and electrical USB device
CN212647081U (en) Optical module
CN113098613B (en) Optical module and wavelength automatic communication method based on double-MCU optical module
CN212647091U (en) Optical module
CN111193547A (en) Optical module
CN113253400A (en) Optical module
CN113640922B (en) Optical module
CN215186763U (en) Optical module
CN113452446B (en) Optical module and channel switching method
CN213302608U (en) Optical module
CN114816464A (en) Firmware upgrade control method, firmware upgrade control device and optical module
CN113472449B (en) Optical module and signal polarity definition method
CN113364523A (en) Data sending method and optical module
CN114826910A (en) Optical module
CN114915345B (en) Optical module
CN216016871U (en) Optical module
CN212649471U (en) Optical module
CN113946019B (en) Optical module
CN115114206A (en) Electric port module and Serdes interface switching method thereof
CN113098621A (en) Optical module and wavelength automatic polling method based on double-MCU optical module
CN113534358B (en) Optical module
CN114594554A (en) Optical module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination