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 PDFInfo
- 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 upgrade
- slave
- slave mcu
- state
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/409—Mechanical coupling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus 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
本申请公开了一种固件升级控制方法、固件升级控制装置及光模块,用于双MCU的固件升级,包括主MCU和从MCU,主MCU和从MCU均接入协议通信总线,主MCU和从MCU通过固件升级硬件控制引脚连接。主MCU接收上位机发送的第一控制指令。主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态。从MCU接收上位机直接发送的第二固件升级数据,完成固件升级。本申请,通过主MCU控制从MCU处于固件升级状态,并使从MCU可接收上位机直接发送的第二固件升级数据,不需要在主MCU中实现对从MCU固件升级数据中转的程序,使得主MCU的设计更简单,提高了整体固件升级速度。
The present application discloses a firmware upgrade control method, a firmware upgrade control device and an optical module, which are used for firmware upgrade of dual MCUs, including a master MCU and a slave MCU, the master MCU and the slave MCU are both connected to a protocol communication bus, and the master MCU and the slave MCU are connected. The MCU is connected via the firmware upgrade hardware control pins. The main MCU receives the first control instruction sent by the upper computer. The master MCU controls the firmware upgrade hardware control pins of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state. Receive the second firmware upgrade data directly sent by the host computer from the MCU, and complete the firmware upgrade. In this application, the master MCU controls the slave MCU to be in the firmware upgrade state, and enables the slave MCU to receive the second firmware upgrade data directly sent by the host computer, without implementing a program for transferring the slave MCU firmware upgrade data in the master MCU, so that the master MCU can The MCU design is simpler and improves the overall firmware upgrade speed.
Description
技术领域technical field
本申请涉及光纤通信技术领域,尤其涉及一种固件升级控制方法、固件升级控制装置及光模块。The present application relates to the technical field of optical fiber communication, and in particular, to a firmware upgrade control method, a firmware upgrade control device, and an optical module.
背景技术Background technique
目前,光模块的固件升级多为含单MCU的光模块的固件升级。而单MCU的光模块的固件升级控制方法一般需要通过光模块金手指上的通信总线实现光模块的升级固件。At present, the firmware upgrade of the optical module is mostly the firmware upgrade of the optical module with a single MCU. The firmware upgrade control method of an optical module with a single MCU generally needs to realize the firmware upgrade of the optical module through the communication bus on the golden finger of the optical module.
对于含双MCU的光模块的固件升级,如果采用含单MCU的光模块的固件升级控制方法,则主MCU的固件升级控制方法不变,而从MCU的固件升级需要经过主MCU中转,并通过“从MCU控制总线”将固件数据发送给从MCU完成升级。For the firmware upgrade of an optical module with dual MCUs, if the firmware upgrade control method of an optical module with a single MCU is used, the firmware upgrade control method of the main MCU remains unchanged, while the firmware upgrade of the slave MCU needs to be transferred through the main MCU and passed through "Slave MCU control bus" sends firmware data to the slave MCU to complete the upgrade.
该种方法主从MCU均使用同一套启动装载程序,但需要在主MCU中实现对从MCU固件数据中转的程序,使主MCU设计复杂,且严重拖慢了整体固件升级速度。In this method, both the master and slave MCUs use the same set of boot loader, but the program for transferring the slave MCU firmware data needs to be implemented in the master MCU, which complicates the design of the master MCU and seriously slows down the overall firmware upgrade speed.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种固件升级控制方法、固件升级控制装置及光模块,简化了主MCU的设计,提高了固件升级速度。The present application provides a firmware upgrade control method, a firmware upgrade control device and an optical module, which simplify the design of the main MCU and improve the firmware upgrade speed.
一种固件升级控制方法,包括:用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU的固件升级硬件控制引脚接地,主MCU与从MCU通过从MCU的固件升级硬件控制引脚连接;A firmware upgrade control method, comprising: firmware upgrade for dual MCUs, including 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 and the slave MCU are connected to a protocol communication bus. The MCU is connected with the slave MCU through the firmware upgrade hardware control pins of the slave MCU;
接收上位机发送的第一控制指令;Receive the first control command sent by the upper computer;
根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,其中,从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,第二固件升级数据用于从MCU固件升级。The firmware upgrade hardware control pin of the slave MCU is controlled according to the first control instruction, so that the slave MCU is in a firmware upgrade state, wherein the slave MCU is in a firmware upgrade state means that the slave MCU can receive the second firmware upgrade data directly sent by the host computer. state, the second firmware upgrade data is used to upgrade from the MCU firmware.
一种固件升级控制装置,用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU的固件升级硬件控制引脚接地,主MCU与从MCU通过从MCU的固件升级硬件控制引脚连接,主MCU包括:A firmware upgrade control device is used for firmware upgrade of dual MCUs, including a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to a protocol communication bus, the firmware upgrade hardware control pin of the master MCU is grounded, and the master MCU and the slave MCU are connected to the ground. The slave MCU is connected through the firmware upgrade hardware control pins of the slave MCU. The master MCU includes:
接收模块,用于接收上位机发送的第一控制指令;a receiving module, used for receiving the first control command sent by the upper computer;
控制模块,用于根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,其中,从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,第二固件升级数据用于从MCU固件升级。The control module is used to control the firmware upgrade hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state, wherein, the slave MCU is in a firmware upgrade state means that the slave MCU can receive the first information directly sent by the host computer. The state of the second firmware upgrade data, the second firmware upgrade data is used to upgrade the firmware from the MCU.
一种光模块,包括:An optical module, comprising:
电路板;circuit board;
光发射次模块,与电路板电连接,用于发射光信号;The light emitting sub-module is electrically connected with the circuit board and used for emitting light signals;
光接收次模块,与电路板电连接,用于接收光信号;The light receiving sub-module is electrically connected to the circuit board for receiving the light signal;
电路板,一端设置有金手指,上设置有主MCU和从MCU;The circuit board is provided with a gold finger at one end, and a master MCU and a slave MCU are set on it;
金手指,与上位机通过协议通信总线连接;The golden finger is connected with the host computer through the protocol communication bus;
主MCU,与金手指连接,用于控制从MCU处于固件升级状态;The main MCU, connected with the golden finger, is used to control the slave MCU in the firmware upgrade state;
从MCU,与金手指通过从MCU的固件升级总线连接,与主MCU通过从MCU的固件升级硬件控制引脚连接。The slave MCU is connected to the golden finger through the firmware upgrade bus of the slave MCU, and is connected to the master MCU through the firmware upgrade hardware control pin of the slave MCU.
有益效果:本申请提供了一种固件升级控制方法,用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU的固件升级硬件控制引脚接地,主MCU和从MCU通过从MCU的固件升级硬件控制引脚连接。主MCU和从MCU均接入协议通信总线,说明主MCU和从MCU均可接收上位机发送的对应的固件升级数据。主MCU和从MCU通过从MCU的固件升级硬件控制引脚连接,说明主MCU可通过控制指令控制从MCU。该固件升级控制方法包括:首先,在主MCU处于非固件升级状态时,主MCU接收上位机发送的第一控制指令。其次,主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态。由于从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,其中,第二固件升级数据用于从MCU固件升级。则最后,从MCU直接接收上位机发送的第二固件升级数据,完成固件升级。当执行固件升级的主体由主MCU转换为从MCU时,主MCU根据第一控制指令控制从MCU处于一种固件升级状态,使从MCU可以接收上位机直接发送的第二固件升级数据,完成固件升级。本申请中,通过主MCU控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,并使从MCU可接收上位机直接发送的第二固件升级数据,不需要在主MCU中实现对从MCU固件升级数据中转的程序,使得主MCU的设计更简单,提高了整体固件升级速度。Beneficial effects: The application provides a firmware upgrade control method for dual MCU firmware upgrade, including a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to the protocol communication bus, and the firmware upgrade hardware control of the master MCU The pin is grounded, and the master MCU and slave MCU are connected through the firmware upgrade hardware control pin of the slave MCU. Both the master MCU and the slave MCU are connected to the protocol communication bus, indicating that both the master MCU and the slave MCU can receive the corresponding firmware upgrade data sent by the upper computer. The master MCU and the slave MCU are connected through the firmware upgrade hardware control pins of the slave MCU, indicating that the master MCU can control the slave MCU through control instructions. The firmware upgrade control method includes: first, when the main MCU is in a non-firmware upgrade state, the main MCU receives a first control instruction sent by the upper computer. Secondly, the master MCU controls the firmware upgrade hardware control pins of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state. Since the slave MCU is in a firmware upgrade state refers to a state in which the slave MCU can receive second firmware upgrade data directly sent by the host computer, wherein the second firmware upgrade data is used for firmware upgrade from the slave MCU. Finally, the second firmware upgrade data sent by the upper computer is directly received from the MCU to complete the firmware upgrade. When the main body performing the firmware upgrade is converted from the master MCU to the slave MCU, the master MCU controls the slave MCU to be in a firmware upgrade state according to the first control instruction, so that the slave MCU can receive the second firmware upgrade data directly sent by the upper computer, and complete the firmware. upgrade. In this application, the master MCU controls the firmware upgrade hardware control pins of the slave MCU, so that the slave MCU is in a firmware upgrade state, and enables the slave MCU to receive the second firmware upgrade data directly sent by the host computer, which does not need to be implemented in the master MCU. The procedure for transferring the firmware upgrade data from the MCU makes the design of the main MCU simpler and improves the overall firmware upgrade speed.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为光通信终端连接关系示意图;Fig. 1 is a schematic diagram of the connection relationship of optical communication terminals;
图2为光网络终端结构示意图;FIG. 2 is a schematic structural diagram of an optical network terminal;
图3为本申请实施例提供的一种光模块结构示意图;FIG. 3 is a schematic structural diagram of an optical module according to an embodiment of the present application;
图4为本申请实施例提供光模块分解结构示意图;FIG. 4 provides a schematic diagram of an exploded structure of an optical module according to an embodiment of the present application;
图5为本申请实施例提供的处于上壳体、下壳体外的光模块的结构示意图;5 is a schematic structural diagram of an optical module outside the upper casing and the lower casing according to an embodiment of the present application;
图6为本申请实施例提供的一种固件升级控制方法的流程示意图;6 is a schematic flowchart of a firmware upgrade control method provided by an embodiment of the present application;
图7为本申请实施例提供的另一种固件升级控制方法的流程示意图。FIG. 7 is a schematic flowchart of another firmware upgrade control method provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。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. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application and the appended claims, the singular forms "a" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
下面结合附图,对本申请的一些实施方式作详细说明,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments may be combined with each other without conflict.
光纤通信的核心环节之一是光、电信号的相互转换。光纤通信使用携带信息的光信号在光纤/光波导等信息传输设备中传输,利用光在光纤/光波导中的无源传输特性可以实现低成本、低损耗的信息传输;而计算机等信息处理设备使用的是电信号,为了在光纤/光波导等信息传输设备与计算机等信息处理设备之间建立信息连接,就需要实现电信号与光信号的相互转换。One of the core links of optical fiber communication is the mutual conversion of optical and electrical signals. Optical fiber communication uses information-carrying optical signals to transmit in information transmission equipment such as optical fibers/optical waveguides. The passive transmission characteristics of light in optical fibers/optical waveguides can realize low-cost, low-loss information transmission; while computers and other information processing equipment Electrical signals are used. In order to establish an information connection between information transmission equipment such as optical fibers/optical waveguides and information processing equipment such as computers, it is necessary to realize the mutual conversion of electrical signals and optical signals.
光模块在光纤通信技术领域中实现上述光、电信号的相互转换功能,光信号与电信号的相互转换是光模块的核心功能。光模块通过其内部电路板上的金手指实现与外部上位机之间的电连接,主要的电连接包括供电、I2C信号、数据信号以及接地等;光模块通过光接口实现与外部光纤的光连接,外部光纤的连接方式有多种,衍生出多种光纤连接器类型;在电接口处使用金手指实现电连接,已经成为光模块行业在的主流连接方式,以此为基础,金手指上引脚的定义形成了多种行业协议/规范;采用光接口与光纤连接器实现的光连接方式已经成为光模块行业的主流连接方式,以此为基础,光纤连接器也形成了多种行业标准,如LC接口、SC接口、MPO接口等,光模块的光接口也针对光纤连接器做了适配性的结构设计,在光接口处设置的光纤适配器组件因此具有多种类型。The optical module realizes the mutual conversion function of the above-mentioned optical and electrical signals in the technical field of optical fiber communication, and the mutual conversion of the optical signal and the electrical signal is the core function of the optical module. The optical module realizes the electrical connection with the external host computer through the golden fingers on its internal circuit board. The main electrical connections include power supply, I2C signal, data signal and grounding, etc. The optical module realizes the optical connection with the external optical fiber through the optical interface. There are many ways to connect external optical fibers, and a variety of optical fiber connector types are derived; the use of gold fingers to achieve electrical connection at the electrical interface has become the mainstream connection method in the optical module industry. The definition of the pin has formed a variety of industry protocols/standards; the optical connection method realized by the optical interface and the optical fiber connector has become the mainstream connection method in the optical module industry. Based on this, the optical fiber connector has also formed a variety of industry standards. Such as LC interface, SC interface, MPO interface, etc., the optical interface of the optical module is also designed for the adaptability of the optical fiber connector, so the optical fiber adapter components set at the optical interface have various types.
图1为光通信终端连接关系示意图。如图1所示,光通信终端的连接主要包括光网络终端100、光模块200、光纤101及网线103之间的相互连接;FIG. 1 is a schematic diagram of a connection relationship of an optical communication terminal. As shown in FIG. 1 , the connection of the optical communication terminal mainly includes the interconnection between the
光纤101的一端连接远端服务器,网线103的一端连接本地信息处理设备,本地信息处理设备与远端服务器的连接由光纤101与网线103的连接完成;而光纤101与网线103之间的连接由具有光模块200的光网络终端100完成。One end of the
光模块200的光接口对外接入光纤101,与光纤101建立双向的光信号连接;光模块200的电接口对外接入光网络终端100中,与光网络终端100建立双向的电信号连接;在光模块内部实现光信号与电信号的双向相互转换,从而实现在光纤与光网络终端之间建立信息连接;具体地,来自光纤101的光信号由光模块转换为电信号后输入至光网络终端100中,来自光网络终端100的电信号由光模块转换为光信号输入至光纤101中。The optical interface of the
光网络终端具有光模块接口102,用于接入光模块200,与光模块200建立双向的电信号连接;光网络终端具有网线接口104,用于接入网线103,与网线103建立双向的电信号连接(一般为以太网协议的电信号,与光模块使用的电信号属于不同的协议/类型);光模块200与网线103之间通过光网络终端100建立连接,具体地,光网络终端将来自光模块的信号传递给网线,将来自网线的信号传递给光模块,光网络终端作为光模块的上位机监控光模块的工作。光网络终端是光模块的上位机,向光模块提供数据信号,并接收来自光模块的数据信号,至此,远端服务器通过光纤、光模块、光网络终端及网线,与本地信息处理设备之间建立双向的信号传递通道。The optical network terminal has an
常见的本地信息处理设备包括路由器、家用交换机、电子计算机等;常见的光网络终端包括光网络单元ONU、光线路终端OLT、数据中心服务器、数据中心交换机等。Common local information processing equipment includes routers, home switches, electronic computers, etc.; common optical network terminals include optical network units ONU, optical line terminals OLT, data center servers, and data center switches.
图2为光网络终端结构示意图。如图2所示,在光网络终端100中具有电路板105,在电路板105的表面设置笼子106;在笼子106内部设置有电连接器,用于接入光模块的电接口(如金手指等);在笼子106上设置有散热器107,散热器107具有增大散热面积的翅片等凸起部。FIG. 2 is a schematic structural diagram of an optical network terminal. As shown in FIG. 2, the
光模块200插入光网络终端中,光模块的电接口插入笼子106内部的电连接器,光模块的光接口与光纤101连接。The
笼子106位于电路板上,将电路板上的电连接器包裹在笼子中,从而使笼子内部设置有电连接器;光模块插入笼子中,由笼子固定光模块,光模块产生的热量传导给笼子106,然后通过笼子上的散热器107进行扩散。The
图3为本申请实施例提供的一种光模块结构示意图,图4为本申请实施例提供的光模块分解结构示意图。图5为本申请实施例提供的处于上壳体、下壳体外的光模块的结构示意图。如图3-5所示,本申请实施例提供的光模块200包括上壳体201、下壳体202、解锁部件203、电路板300、光发射次模块400和光接收次模块500。FIG. 3 is a schematic structural diagram of an optical module provided by an embodiment of the present application, and FIG. 4 is a schematic structural diagram of an exploded optical module provided by an embodiment of the present application. FIG. 5 is a schematic structural diagram of an optical module outside the upper casing and the lower casing according to an embodiment of the present application. As shown in FIGS. 3-5 , the
上壳体201盖合在下壳体202上,以形成具有两个开口的包裹腔体;包裹腔体的外轮廓一般呈现方形体,具体地,下壳体包括主板以及位于主板两侧、与主板垂直设置的两个侧板;上壳体包括盖板,盖板盖合在上壳体的两个侧板上,以形成包裹腔体;上壳体还可以包括位于盖板两侧、与盖板垂直设置的两个侧壁,由两个侧壁与两个侧板结合,以实现上壳体盖合在下壳体上。The
两个开口具体可以是位于光模块同一端的两处开口(204、205),也可以是在光模块不同端的两处开口;其中一个开口为电口204,电路板的金手指从电口204伸出,插入光网络终端等上位机中;另一个开口为光口205,用于外部光纤接入以连接光模块内部的光发射次模块400和光接收次模块500;电路板300、光发射次模块400和光接收次模块500等光电器件位于包裹腔体中。Specifically, the two openings may be two openings (204, 205) at the same end of the optical module, or two openings at different ends of the optical module; one of the openings is the
采用上壳体、下壳体结合的装配方式,便于将电路板300、光发射次模块400和光接收次模块500等器件安装到壳体中,由上壳体、下壳体形成光模块最外层的封装保护壳体;上壳体及下壳体一般采用金属材料,利于实现电磁屏蔽以及散热;一般不会将光模块的壳体做成一体部件,这样在装配电路板等器件时,定位部件、散热以及电磁屏蔽部件无法安装,也不利于生产自动化。The combination of the upper case and the lower case is adopted, which facilitates the installation of the
解锁部件203位于包裹腔体/下壳体202的外壁,用于实现光模块与上位机之间的固定连接,或解除光模块与上位机之间的固定连接。The unlocking
解锁部件203具有与上位机笼子匹配的卡合部件;拉动解锁部件的末端可以在使解锁部件在外壁的表面相对移动;光模块插入上位机的笼子里,由解锁部件的卡合部件将光模块固定在上位机的笼子里;通过拉动解锁部件,解锁部件的卡合部件随之移动,进而改变卡合部件与上位机的连接关系,以解除光模块与上位机的卡合关系,从而可以将光模块从上位机的笼子里抽出。The unlocking
电路板300上设置有电路走线、电子元件(如电容、电阻、三极管、MOS管)及芯片(如MCU301、激光驱动芯片、限幅放大芯片、时钟数据恢复CDR、电源管理芯片、数据处理芯片DSP)等,还设置有非易失存储器302。The
电路板通过电路走线将光模块中的用电器件按照电路设计连接在一起,以实现供电、电信号传输及接地等电功能。The circuit board connects the electrical components in the optical module according to the circuit design through the circuit wiring, so as to realize the electrical functions such as power supply, electrical signal transmission and grounding.
电路板一般为硬性电路板,硬性电路板由于其相对坚硬的材质,还可以实现承载作用,如硬性电路板可以平稳的承载芯片;当光收发器件位于电路板上时,硬性电路板也可以提供平稳的承载;硬性电路板还可以插入上位机笼子中的电连接器中,具体地,在硬性电路板的一侧末端表面形成金属引脚/金手指,用于与电连接器连接;这些都是柔性电路板不便于实现的。The circuit board is generally a rigid circuit board. Due to its relatively hard material, the rigid circuit board can also realize the bearing function. For example, the rigid circuit board can carry the chip smoothly; when the optical transceiver is located on the circuit board, the rigid circuit board can also provide Stable bearing; the rigid circuit board can also be inserted into the electrical connector in the upper computer cage, specifically, metal pins/gold fingers are formed on one end surface of the rigid circuit board for connecting with the electrical connector; these are all It is inconvenient to realize the flexible circuit board.
金手指,与上位机通过协议通信总线连接,用于接收上位机和光模块相互传输的信息。The golden finger is connected to the host computer through the protocol communication bus, and is used to receive the information transmitted by the host computer and the optical module.
电路板300上设置有主MCU301和从MCU302。具体的,The
由于主MCU301和从MCU302的固件升级逻辑相同,则主MCU301和从MCU302判断其应处于某种状态时,均先判断固件升级硬件控制引脚电平是否为第一电平,在固件升级硬件控制引脚电平为第一电平时,再继续判断固件升级软件标识数值是否为第二数值。具体的,当固件升级硬件控制引脚电平为第二电平时,对应的MCU处于非固件升级状态。当固件升级硬件控制引脚电平为第一电平,且固件升级软件标识数值为第二数值时,对应的MCU处于非固件升级状态。当固件升级硬件控制引脚电平为第一电平,且固件升级软件标识数值为第一数值时,对应的MCU处于固件升级状态。对于主MCU301来说,由于主MCU301的固件升级硬件控制引脚始终接地,则主MCU301的固件升级硬件控制引脚电平始终为第一电平。因此,在主MCU301判断应处于某种状态时,不需要再判断主MCU301的固件升级硬件控制引脚电平是否为第一电平,可直接判断主MCU301的固件升级软件标识数值是否为第二数值即可。对于从MCU302来说,由于从MCU302的固件升级软件标识数值始终为第一数值。因此,在从MCU302判断应处于某种状态时,不需要再判断从MCU302的固件升级软件标识数值是否为第二数值,可直接判断主MCU301的固件升级硬件控制引脚电平是否为第一电平即可。其中,第一电平为低电平,第二电平为高电平,第一数值为0,第二数值为1。本申请中,固件升级软件标识数值只能为第一数值或者第二数值。Since the firmware upgrade logic of the master MCU301 and the slave MCU302 is the same, when the master MCU301 and the slave MCU302 judge that they should be in a certain state, they both first determine whether the firmware upgrade hardware control pin level is the first level, and then the firmware upgrade hardware control When the pin level is the first level, continue to judge whether the value of the identification value of the firmware upgrade software is the second value. 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. When the level of the firmware upgrade hardware control pin is the first level, and the firmware upgrade software identification value is the second value, the corresponding MCU is in a non-firmware upgrade state. When the level of the firmware upgrade hardware control pin is the first level and the value of the firmware upgrade software identifier is the first value, the corresponding MCU is in the firmware upgrade state. For the main MCU 301, since the firmware upgrade hardware control pin of the main MCU 301 is always grounded, the level of the firmware upgrade hardware control pin of the main MCU 301 is always the first level. Therefore, when the main MCU 301 judges that it should be in a certain state, there is no need to judge whether the level of the firmware upgrade hardware control pin of the main MCU 301 is the first level, and it can be directly judged whether the firmware upgrade software identification value of the main MCU 301 is the second level. numerical value. For the
主MCU301,与金手指通过主MCU的固件升级总线连接,用于控制从MCU302处于固件升级状态。具体的,在主MCU301处于非固件升级状态时,主MCU301接收上位机100发送的第一控制指令,并根据第一控制指令控制从MCU302处于固件升级状态。The master MCU 301 is connected to the golden finger through the firmware upgrade bus of the master MCU, and is used to control the
主MCU301处于非固件升级状态包括两种情况。第一情况为:主MCU301完成固件升级,并退出固件升级程序,进入正常程序后。第二种情况为:主MCU301从未固件升级。其中,主MCU301完成固件升级后,并退出固件升级程序,进入正常程序后,包括:首先,主MCU301接收上位机100通过协议通信总线和金手指发送的第一写入指令,并根据第一写入指令使主MCU301处于固件升级状态,其次,主MCU301接收上位机发送的第一固件升级数据,使其完成固件升级。最后,主MCU301接收上位机发送的第二写入指令,并根据第二写入指令使其处于非固件升级状态。There are two situations when the main MCU 301 is in a non-firmware upgrade state. The first situation is: the main MCU 301 completes the firmware upgrade, exits the firmware upgrade program, and enters the normal program. The second case is: the main MCU 301 has never been upgraded from firmware. The main MCU 301 exits the firmware upgrade program after completing the firmware upgrade, and enters the normal program, including: first, the main MCU 301 receives the first write instruction sent by the
由于主MCU301可以根据第一写入指令使其处于固件升级状态,结合上述描述可知第一写入指令指的是主MCU301的固件升级软件标识数值为第一数值的指令。又由于主MCU301根据第二写入指令退出固件升级程序,进入正常程序,结合上述描述可知第二写入指令指的是主MCU301的固件升级软件标识数值为第二数值的指令。Since the main MCU 301 can be in a firmware upgrade state according to the first write instruction, it can be seen from the above description that the first write instruction refers to an instruction whose firmware upgrade software identification value of the main MCU 301 is the first value. Since the main MCU 301 exits the firmware upgrade program according to the second write instruction and enters the normal program, it can be seen from the above description that the second write instruction refers to the instruction whose firmware upgrade software identification value of the main MCU 301 is the second value.
从MCU302,与金手指通过从MCU的固件升级总线连接,与主MCU301通过从MCU的固件升级硬件控制引脚连接,用于完成固件升级。具体的,由于从MCU302不需要进入固件升级时,从MCU的固件升级硬件控制引脚拉高。当主MCU301完成固件升级后,需要完成从MCU302的固件升级时,主MCU301根据第一控制指令控制从MCU的固件升级硬件控制引脚拉低,使从MCU302的固件升级硬件控制引脚的电平为第一电平。根据上述描述可知从MCU302的固件升级软件标识数值始终为第一数值,则从MCU302根据从MCU302的固件升级硬件控制引脚的电平为第一电平,使其处于固件升级状态。由于从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,而第二固件升级数据用于从MCU固件升级。则当从MCU302处于固件升级状态时可接收上位机直接发送的第二固件升级数据,完成固件升级。The slave MCU302 is connected to the golden finger through the firmware upgrade bus of the slave MCU, and is connected to the master MCU301 through the firmware upgrade hardware control pin of the slave MCU to complete the firmware upgrade. Specifically, since the
部分光模块中也会使用柔性电路板,作为硬性电路板的补充;柔性电路板一般与硬性电路板配合使用,如硬性电路板与光收发器件之间可以采用柔性电路板连接。Flexible circuit boards are also used in some optical modules as a supplement to rigid circuit boards; flexible circuit boards are generally used in conjunction with rigid circuit boards. For example, flexible circuit boards can be used to connect the rigid circuit boards and optical transceivers.
光发射次模块400,与电路板300电连接,用于发射光信号。The light emitting sub-module 400 is electrically connected to the
光接收次模块500,一端与外部光纤连接,另一端与电路板300通过管脚和柔性板电连接,用于接收外部光纤传输来的光信号。One end of the light receiving sub-module 500 is connected to an external optical fiber, and the other end is electrically connected to the
本申请实施例中,上位机指的是光网络终端。In the embodiments of this application, the upper computer refers to an optical network terminal.
本申请实施例除了提供了一种光模块外,还提供了一种固件升级控制方法。该固件升级控制方法,用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU和从MCU的固件升级逻辑相同,主MCU的固件升级硬件控制引脚接地,主MCU与从MCU通过从MCU的固件升级硬件控制引脚连接,从MCU的固件升级软件标识数值为第一数值。由于主MCU处于非固件升级状态包括两种情况,该固件升级控制方法分为两种。实施例1为主MCU处于第二种情况,实施例2为主MCU处于第一种情况。In addition to providing an optical module, the embodiments of the present application also provide a firmware upgrade control method. The firmware upgrade control method is used for firmware upgrade of dual MCUs, including a master MCU and a slave MCU, wherein both the master MCU and the slave MCU are connected to a protocol communication bus, the firmware upgrade logic of the master MCU and the slave MCU is the same, and the firmware of the master MCU and the slave MCU are the same. The upgrade hardware control pin is grounded, the master MCU and the slave MCU are connected through the slave MCU firmware upgrade hardware control pin, and the slave MCU firmware upgrade software identification value is the first value. Since the main MCU is in a non-firmware upgrade state, including two situations, the firmware upgrade control method is divided into two types. The main MCU in Embodiment 1 is in the second situation, and the main MCU in Embodiment 2 is in the first situation.
实施例1Example 1
图6为本申请实施例提供的一种固件升级控制方法的流程示意图。由于此处主MCU处于非固件升级状态指的是主MCU从未固件升级,则如图6可知,该固件升级控制方法的具体步骤如下:FIG. 6 is a schematic flowchart of a firmware upgrade control method provided by an embodiment of the present application. Since the main MCU is in the non-firmware upgrade state here, it means that the main MCU has never been upgraded from firmware. As can be seen in Figure 6, the specific steps of the firmware upgrade control method are as follows:
S100:接收上位机发送的第一控制指令。S100: Receive the first control instruction sent by the upper computer.
主MCU接收上位机发送的第一控制指令是在主MCU处于非固件升级状态下。The main MCU receives the first control instruction sent by the upper computer when the main MCU is in a non-firmware upgrade state.
由于从MCU的固件升级软件标识数值始终为第一数值,当从MCU需要固件升级时,只需要使其固件升级硬件控制引脚电平为第一电平即可。因此,第一控制指令指的是从MCU的固件升级硬件控制引脚电平为第一电平的指令。Since the software identification value of the firmware upgrade from the MCU is always the first value, when the slave MCU needs to upgrade the firmware, it only needs to make the level of the firmware upgrade hardware control pin be the first level. Therefore, the first control instruction refers to an instruction to upgrade the hardware control pin level to the first level from the firmware of the MCU.
由于主MCU从未固件升级过,先对从MCU固件升级。此时,上位机发送第一控制指令给主MCU,主MCU接收该控制指令。Since the master MCU has never been upgraded with firmware, upgrade the slave MCU firmware first. At this time, the host computer sends the first control instruction to the main MCU, and the main MCU receives the control instruction.
具体步骤如下:上位机将控制从MCU的固件升级硬件控制引脚电平为第一电平的指令发送给主MCU;主MCU接收该指令。The specific steps are as follows: the host computer sends an instruction for controlling the firmware upgrade hardware control pin level of the slave MCU to be the first level to the master MCU; the master MCU receives the instruction.
S200:根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,其中,从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,第二固件升级数据用于从MCU固件升级。S200: Control the firmware upgrade hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state, wherein the slave MCU is in a firmware upgrade state means that the slave MCU can receive the second firmware upgrade directly sent by the host computer The state of the data, the second firmware upgrade data is used to upgrade from the MCU firmware.
主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态。The master MCU controls the firmware upgrade hardware control pins of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state.
主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚为第一电平,其中,从MCU的固件升级硬件控制引脚电平为第一电平用于指示从MCU处于固件升级状态。此状态下,从MCU可接收上位机直接发送的第二固件升级数据,并根据第二固件升级数据完成固件升级。The master MCU controls the firmware upgrade hardware control pin of the slave MCU to the first level according to the first control instruction, wherein the firmware upgrade hardware control pin level of the slave MCU is the first level to indicate that the slave MCU is in a firmware upgrade state . In this state, the slave MCU can receive the second firmware upgrade data directly sent by the host computer, and complete the firmware upgrade according to the second firmware upgrade data.
具体步骤如下:主MCU根据该指令控制从MCU的固件升级硬件控制引脚拉低。由于从MCU的固件升级硬件控制引脚拉低表示从MCU的固件升级硬件控制引脚电平为第一电平,从MCU的固件升级硬件控制引脚电平为第一电平用于指示从MCU处于固件升级状态,则从MCU识别到从MCU的固件升级硬件控制引脚拉低,即从MCU的固件升级硬件控制引脚电平为第一电平时,使其处于固件升级状态。The specific steps are as follows: the master MCU controls the firmware upgrade hardware control pin of the slave MCU to pull down according to the instruction. Since the firmware upgrade hardware control pin from the MCU is pulled low, it means that the firmware upgrade hardware control pin level from the MCU is the first level, and the firmware upgrade hardware control pin level from the MCU is the first level to indicate the slave MCU firmware upgrade hardware control pin level is the first level. When the MCU is in the firmware upgrade state, the MCU recognizes that the firmware upgrade hardware control pin of the slave MCU is pulled low, that is, when the firmware upgrade hardware control pin level of the slave MCU is the first level, it is in the firmware upgrade state.
当从MCU完成固件升级后,主MCU需要完成固件升级时,首先需要从MCU退出固件升级状态,然后主MCU处于固件升级状态。具体过程如下:After the slave MCU completes the firmware upgrade, when the master MCU needs to complete the firmware upgrade, the slave MCU needs to exit the firmware upgrade state first, and then the master MCU is in the firmware upgrade state. The specific process is as follows:
S300:接收上位机发送的第二控制指令。S300: Receive the second control instruction sent by the upper computer.
主MCU接收上位机发送的第二控制指令。The main MCU receives the second control instruction sent by the upper computer.
由于从MCU的固件升级软件标识数值始终为第一数值,当从MCU需要退出固件升级程序时,只需要使其固件升级硬件控制引脚电平为第二电平即可。因此,第二控制指令指的是控制从MCU的固件升级硬件控制引脚电平为第二电平的指令。Since the value of the firmware upgrade software identification value of the slave MCU is always the first value, when the slave MCU needs to exit the firmware upgrade program, it only needs to set the level of the firmware upgrade hardware control pin to the second level. Therefore, the second control instruction refers to an instruction to control the firmware of the MCU to upgrade the hardware control pin level to the second level.
具体步骤如下:上位机将控制从MCU的固件升级硬件控制引脚电平为第二电平的指令发送给主MCU;主MCU接收该指令。The specific steps are as follows: the host computer sends an instruction to control the firmware upgrade hardware control pin level of the slave MCU to be the second level to the master MCU; the master MCU receives the instruction.
S400:根据第二控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于非固件升级状态。S400: Control the firmware upgrade hardware control pin of the slave MCU according to the second control instruction, so that the slave MCU is in a non-firmware upgrade state.
主MCU根据第二控制指令控制从MCU的固件升级硬件控制引脚电平为第二电平,其中,从MCU的固件升级硬件控制引脚电平为第二电平用于指示从MCU处于非固件升级状态。The master MCU controls the firmware of the slave MCU to upgrade the hardware control pin level to the second level according to the second control instruction, wherein the level of the hardware control pin of the firmware upgrade of the slave MCU is the second level, which is used to indicate that the slave MCU is in a non-volatile state. Firmware upgrade status.
具体步骤如下:主MCU根据该指令控制从MCU的固件升级硬件控制引脚拉高。由于从MCU的固件升级硬件控制引脚拉高表示从MCU的固件升级硬件控制引脚电平为第二电平,从MCU的固件升级硬件控制引脚电平为第二电平用于指示从MCU处于非固件升级状态,则从MCU识别到从MCU的固件升级硬件控制引脚拉高,即从MCU的固件升级硬件控制引脚电平为第二电平时,使其处于非固件升级状态。The specific steps are as follows: the master MCU controls the firmware upgrade hardware control pin of the slave MCU to pull high according to the instruction. Since the hardware control pin of firmware upgrade from MCU is pulled high, it means that the level of the hardware control pin of firmware upgrade from MCU is the second level, and the level of the hardware control pin of firmware upgrade from MCU is the second level, which is used to indicate that the level of the hardware control pin of firmware upgrade from MCU is the second level. When the MCU is in a non-firmware upgrade state, the MCU recognizes that the firmware upgrade hardware control pin of the slave MCU is pulled high, that is, when the firmware upgrade hardware control pin level of the slave MCU is the second level, it is in a non-firmware upgrade state.
当需要主MCU完成固件升级时,由于此时从MCU处于非固件升级状态,上位机直接发送第一写入指令和第一固件升级数据给主MCU即可使主MCU完成固件升级。When the master MCU needs to complete the firmware upgrade, since the slave MCU is in a non-firmware upgrade state at this time, the host computer directly sends the first write command and the first firmware upgrade data to the master MCU, so that the master MCU can complete the firmware upgrade.
本申请中,非固件升级状态指的是MCU完成固件升级,并退出固件升级程序,进入正常程序。In this application, the non-firmware upgrade state means that the MCU completes the firmware upgrade, exits the firmware upgrade program, and enters the normal program.
实施例2Example 2
图7为本申请实施例提供的另一种固件升级控制方法的流程示意图。由于主MCU处于非固件升级状态指的是主MCU完成固件升级,并退出固件升级程序,进入正常程序后,则如图7可知,该固件升级控制方法的具体步骤如下:FIG. 7 is a schematic flowchart of another firmware upgrade control method provided by an embodiment of the present application. Since the main MCU is in a non-firmware upgrade state, it means that the main MCU completes the firmware upgrade and exits the firmware upgrade program. After entering the normal program, as shown in Figure 7, the specific steps of the firmware upgrade control method are as follows:
T100:接收上位机发送的第一写入指令,并根据第一写入指令使主MCU处于固件升级状态。T100: Receive the first write instruction sent by the upper computer, and make the main MCU in a firmware upgrade state according to the first write instruction.
主MCU接收上位机发送的第一写入指令,并根据第一写入指令使其处于固件升级状态。主MCU处于固件升级状态指的是主MCU可直接接收上位机发送的第一固件升级数据的状态。其中,第一固件升级数据用于主MCU固件升级。The main MCU receives the first write instruction sent by the upper computer, and makes it in a firmware upgrade state according to the first write instruction. The fact that the main MCU is in a firmware upgrade state refers to a state in which the main MCU can directly receive the first firmware upgrade data sent by the upper computer. Wherein, the first firmware upgrade data is used for main MCU firmware upgrade.
主MCU的固件升级硬件控制引脚始终接地,即主MCU的固件升级硬件控制引脚电平为第一电平。当主MCU需要固件升级时,只需要使其固件升级软件标识数值为第一数值即可。因此,第一写入指令指的是主MCU的固件升级软件标识数值为第一数值的指令。The firmware upgrade hardware control pin of the main MCU is always grounded, that is, the level of the firmware upgrade hardware control pin of the main MCU is the first level. When the main MCU needs to upgrade the firmware, it only needs to make the value of the firmware upgrade software identification value be the first value. Therefore, the first write instruction refers to an instruction in which the firmware upgrade software of the main MCU identifies the value as the first value.
该步骤的具体过程如下:上位机将主MCU的固件升级软件标识数值为第一数值的指令写入主MCU中。主MCU接收该指令,并根据该指令判断其应该处于哪种状态。由于该指令用于表示主MCU处于固件升级状态,则主MCU识别到该指令时,使其处于固件升级状态。The specific process of this step is as follows: the upper computer writes the instruction of the firmware upgrade software identification value of the main MCU as the first value into the main MCU. The main MCU receives the command and judges which state it should be in according to the command. Since this command is used to indicate that the main MCU is in a firmware upgrade state, when the main MCU recognizes this command, it is in a firmware upgrade state.
T200:接收上位机发送的第一固件升级数据,完成固件升级。T200: Receive the first firmware upgrade data sent by the upper computer, and complete the firmware upgrade.
主MCU接收上位机发送的第一固件升级数据,完成固件升级。The main MCU receives the first firmware upgrade data sent by the upper computer, and completes the firmware upgrade.
当主MCU完成固件升级后,从MCU需要完成固件升级时,首先需要主MCU退出固件升级状态,处于非固件升级状态,然后由主MCU控制从MCU处于固件升级状态。具体如下:After the master MCU completes the firmware upgrade, when the slave MCU needs to complete the firmware upgrade, the master MCU first needs to exit the firmware upgrade state and is in the non-firmware upgrade state, and then the master MCU controls the slave MCU to be in the firmware upgrade state. details as follows:
T300:接收上位机发送的第二写入指令,并根据第二写入指令使主MCU处于非固件升级状态。T300: Receive the second write instruction sent by the upper computer, and make the main MCU in a non-firmware upgrade state according to the second write instruction.
主MCU接收上位机发送的第二写入指令,并根据第二写入指令使主MCU处于非固件升级状态。The main MCU receives the second write instruction sent by the upper computer, and makes the main MCU in a non-firmware upgrade state according to the second write instruction.
主MCU的固件升级硬件控制引脚始终接地,即主MCU的固件升级硬件控制引脚电平为第一电平。当主MCU退出固件升级程序时,只需要使其固件升级软件标识数值为第二数值即可。因此,第二写入指令指的是主MCU的固件升级软件标识数值为第二数值的指令。The firmware upgrade hardware control pin of the main MCU is always grounded, that is, the level of the firmware upgrade hardware control pin of the main MCU is the first level. When the main MCU exits the firmware upgrade program, it only needs to set the value of the firmware upgrade software identification to the second value. Therefore, the second write instruction refers to an instruction in which the firmware upgrade software of the main MCU identifies the value as the second value.
该步骤的具体过程如下:上位机将主MCU的固件升级软件标识数值为第二数值的指令写入主MCU中。主MCU接收该指令,并根据该指令判断其应该处于哪种状态。由于该指令用于表示主MCU处于非固件升级状态,则主MCU识别到该指令时,使其处于非固件升级状态。The specific process of this step is as follows: the host computer writes the instruction of the firmware upgrade software identification value of the main MCU as the second value into the main MCU. The main MCU receives the command and judges which state it should be in according to the command. Since this command is used to indicate that the main MCU is in a non-firmware upgrade state, when the main MCU recognizes this command, it is in a non-firmware upgrade state.
T400:接收上位机发送的第一控制指令。T400: Receive the first control command sent by the upper computer.
主MCU接收上位机发送的第一控制指令。The main MCU receives the first control instruction sent by the upper computer.
T500:根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,其中,从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,第二固件升级数据用于从MCU固件升级。T500: Control the firmware upgrade hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state, wherein the slave MCU is in a firmware upgrade state means that the slave MCU can receive the second firmware upgrade directly sent by the host computer The state of the data, the second firmware upgrade data is used to upgrade from the MCU firmware.
主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态。The master MCU controls the firmware upgrade hardware control pins of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state.
T600:接收上位机发送的第二控制指令。T600: Receive the second control command sent by the upper computer.
主MCU接收上位机发送的第二控制指令。The main MCU receives the second control instruction sent by the upper computer.
T700:根据第二控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于非固件升级状态。T700: Control the firmware upgrade hardware control pin of the slave MCU according to the second control instruction, so that the slave MCU is in a non-firmware upgrade state.
主MCU根据第二控制指令控制从MCU处于非固件升级状态。The master MCU controls the slave MCU to be in a non-firmware upgrade state according to the second control instruction.
该实施例中与实施例1相同部分不再赘述。In this embodiment, the same parts as those in Embodiment 1 will not be repeated.
本申请除了提供了一种固件升级控制方法外,还提供了一种固件升级控制装置,该装置包括用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU的固件升级硬件控制引脚接地,主MCU和从MCU通过从MCU的固件升级硬件控制引脚连接。该主MCU包括接收模块和控制模块。具体的,In addition to providing a firmware upgrade control method, the present application also provides a firmware upgrade control device, the device includes a firmware upgrade for dual MCUs, including a master MCU and a slave MCU, wherein the master MCU and the slave MCU are both connected to Into the protocol communication bus, the firmware upgrade hardware control pin of the master MCU is grounded, and the master MCU and the slave MCU are connected through the firmware upgrade hardware control pin of the slave MCU. The main MCU includes a receiving module and a control module. specific,
接收模块,用于接收上位机发送的第一控制指令。The receiving module is used for receiving the first control instruction sent by the upper computer.
控制模块,用于根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,其中,从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,第二固件升级数据用于从MCU固件升级。The control module is used to control the firmware upgrade hardware control pin of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state, wherein, the slave MCU is in a firmware upgrade state means that the slave MCU can receive the first information directly sent by the host computer. The state of the second firmware upgrade data, the second firmware upgrade data is used to upgrade the firmware from the MCU.
本申请提供了一种固件升级控制方法,用于双MCU的固件升级,包括主MCU和从MCU,其中,主MCU和从MCU均接入协议通信总线,主MCU的固件升级硬件控制引脚接地,主MCU和从MCU通过从MCU的固件升级硬件控制引脚连接。主MCU和从MCU均接入协议通信总线,说明主MCU和从MCU均可接收上位机发送的对应的固件升级数据。主MCU和从MCU通过从MCU的固件升级硬件控制引脚连接,说明主MCU可通过控制指令控制从MCU。该固件升级控制方法包括:首先,在主MCU处于非固件升级状态时,主MCU接收上位机发送的第一控制指令。其次,主MCU根据第一控制指令控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态。由于从MCU处于固件升级状态指的是从MCU可接收上位机直接发送的第二固件升级数据的状态,其中,第二固件升级数据用于从MCU固件升级。则最后,从MCU接收上位机直接发送的第二固件升级数据,完成固件升级。当执行固件升级的主体由主MCU转换为从MCU时,主MCU根据第一控制指令控制从MCU处于一种固件升级状态,使从MCU可以接收上位机直接发送的第二固件升级数据,完成固件升级。本申请中,通过主MCU控制从MCU的固件升级硬件控制引脚,使从MCU处于固件升级状态,并使从MCU可接收上位机直接发送的第二固件升级数据,不需要在主MCU中实现对从MCU固件升级数据中转的程序,使得主MCU的设计更简单,提高了整体固件升级速度。The present application provides a firmware upgrade control method for dual MCU firmware upgrade, including a master MCU and a slave MCU, wherein both the master MCU and the slave MCU are connected to a protocol communication bus, and the firmware upgrade hardware control pin of the master MCU is grounded , the master MCU and the slave MCU are connected through the firmware upgrade hardware control pins of the slave MCU. Both the master MCU and the slave MCU are connected to the protocol communication bus, indicating that both the master MCU and the slave MCU can receive the corresponding firmware upgrade data sent by the upper computer. The master MCU and the slave MCU are connected through the firmware upgrade hardware control pins of the slave MCU, indicating that the master MCU can control the slave MCU through control instructions. The firmware upgrade control method includes: first, when the main MCU is in a non-firmware upgrade state, the main MCU receives a first control instruction sent by the upper computer. Secondly, the master MCU controls the firmware upgrade hardware control pins of the slave MCU according to the first control instruction, so that the slave MCU is in a firmware upgrade state. Since the slave MCU is in a firmware upgrade state refers to a state in which the slave MCU can receive the second firmware upgrade data directly sent by the host computer, wherein the second firmware upgrade data is used for the slave MCU firmware upgrade. Then finally, the second firmware upgrade data directly sent by the upper computer is received from the MCU to complete the firmware upgrade. When the main body performing the firmware upgrade is converted from the master MCU to the slave MCU, the master MCU controls the slave MCU to be in a firmware upgrade state according to the first control instruction, so that the slave MCU can receive the second firmware upgrade data directly sent by the upper computer, and complete the firmware. upgrade. In this application, the master MCU controls the firmware upgrade hardware control pins of the slave MCU, so that the slave MCU is in a firmware upgrade state, and the slave MCU can receive the second firmware upgrade data directly sent by the host computer, and does not need to be implemented in the master MCU. The procedure for transferring the firmware upgrade data from the MCU makes the design of the main MCU simpler and improves the overall firmware upgrade speed.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.
Claims (9)
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)
| 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 | 深圳市朗科智能电气股份有限公司 | Method, device, device and medium for upgrading multiple MCUs with Internet of Things Wifi |
| CN112148339A (en) * | 2020-09-29 | 2020-12-29 | 苏州海鹏科技有限公司 | Dual-core chip and program updating method thereof |
-
2021
- 2021-01-29 CN CN202110129497.7A patent/CN114816464A/en active Pending
Patent Citations (6)
| 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 | 深圳市朗科智能电气股份有限公司 | Method, device, device and medium for upgrading multiple MCUs with Internet of Things Wifi |
| CN112148339A (en) * | 2020-09-29 | 2020-12-29 | 苏州海鹏科技有限公司 | Dual-core chip and program updating method thereof |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021227317A1 (en) | Optical module | |
| CN111555810B (en) | Optical module and data transmission method | |
| CN113348597A (en) | Modular physical layer and integrated connector module for local area networks | |
| CN215186763U (en) | Optical module | |
| CN113098613B (en) | Optical module and wavelength automatic communication method based on double-MCU optical module | |
| CN113660035B (en) | Optical module and calibration unit definition method | |
| CN113098596A (en) | Optical module and method for acquiring remote monitoring data based on double-MCU optical module | |
| CN113721330B (en) | A high-speed laser component and optical module | |
| CN117148517A (en) | Optical module | |
| WO2022127073A1 (en) | Optical module | |
| WO2022041801A1 (en) | Optical module | |
| CN113946019B (en) | Optical module | |
| CN117148518A (en) | Optical module | |
| CN113630186B (en) | Optical module and communication method | |
| CN114826910B (en) | Optical module | |
| CN114915345B (en) | Optical module | |
| CN114816464A (en) | Firmware upgrade control method, firmware upgrade control device and optical module | |
| CN113452446B (en) | Optical module and channel switching method | |
| WO2020108294A1 (en) | Optical module | |
| CN114466260B (en) | Optical module upgrading method and optical module | |
| CN114201784B (en) | Optical module | |
| CN216016871U (en) | Optical module | |
| CN113472449B (en) | Optical module and signal polarity definition method | |
| CN113534358B (en) | Optical module | |
| CN214278491U (en) | Optical module protective sheath and 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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220729 |