CN110187894B - Initialization method and device of optical module and electronic equipment - Google Patents

Initialization method and device of optical module and electronic equipment Download PDF

Info

Publication number
CN110187894B
CN110187894B CN201910429181.2A CN201910429181A CN110187894B CN 110187894 B CN110187894 B CN 110187894B CN 201910429181 A CN201910429181 A CN 201910429181A CN 110187894 B CN110187894 B CN 110187894B
Authority
CN
China
Prior art keywords
optical module
power
model
mcu
optical
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.)
Active
Application number
CN201910429181.2A
Other languages
Chinese (zh)
Other versions
CN110187894A (en
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 CN201910429181.2A priority Critical patent/CN110187894B/en
Publication of CN110187894A publication Critical patent/CN110187894A/en
Application granted granted Critical
Publication of CN110187894B publication Critical patent/CN110187894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Optical Communication System (AREA)

Abstract

An initialization method and device for an optical module and electronic equipment are characterized in that an MCU of the optical module is provided with an ADC interface, and the method comprises the following steps: initializing an MCU, and starting an ADC interface on the MCU; when the optical module is electrified for the first time, an AD value of the ADC interface is obtained, and the AD value is obtained after analog-to-digital conversion based on a parameter value of the optical module acquired by the ADC interface; determining the model of the optical module based on the comparison of the acquired AD value and pre-stored reference data; the reference data are used for distinguishing peripheral devices of different models of optical modules corresponding to different AD values; and initializing peripheral devices of the optical module according to the determined model of the optical module. The optical modules of the same MCU with multiple models can share one version of software, so that the problem of difficult management of the software version is reduced, and the use efficiency and convenience of the optical modules for operators are improved.

Description

Initialization method and device of optical module and electronic equipment
Technical Field
The present invention relates to the field of optical communications technologies, and in particular, to a method and an apparatus for initializing an optical module, and an electronic device.
Background
The optical module is divided into two parts, namely hardware and software, wherein the hardware comprises an MCU and peripheral devices, and the software is installed in the MCU. In the use process of the optical module, the optical module of one model needs to be matched with the software of the corresponding version to normally operate. Under the application scene that the number of the optical modules is huge, operators have the condition that the software of a plurality of versions needs to be managed, so that the operators cannot quickly manage the versions of the software, and the normal use of the optical modules is inconvenient.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a method and a device for initializing an optical module and electronic equipment.
According to a first aspect of an embodiment of the present invention, there is provided a method for initializing an optical module, where an MCU of the optical module has an ADC interface, the method including:
initializing an MCU, and starting an ADC interface on the MCU;
when the optical module is electrified for the first time, an AD value of the ADC interface is obtained, and the AD value is obtained after analog-to-digital conversion based on a parameter value of the optical module acquired by the ADC interface;
determining the model of the optical module based on the comparison of the acquired AD value and pre-stored reference data; the reference data are used for distinguishing peripheral devices of different models of optical modules corresponding to different AD values;
and initializing peripheral devices of the optical module according to the determined model of the optical module.
According to a second aspect of an embodiment of the present invention, there is provided an initializing device of an optical module, including:
an enabling unit for enabling an ADC interface on the MCU inside the optical module;
the acquisition unit acquires AD values of the ADC interface; the AD value is obtained after analog-to-digital conversion based on the parameter value of the optical module acquired by the ADC interface;
determining a distinguishing unit of the model of the optical module based on the comparison of the acquired AD value with pre-stored reference data; the reference data are used for distinguishing peripheral devices of different models of optical modules corresponding to different AD values;
and an initializing unit for initializing peripheral devices of the optical module according to the determined model of the optical module.
According to a third aspect of an embodiment of the present invention, there is provided an initializing device of an optical module, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor, when executing the program, performs the operations in the method as described above.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects:
in the embodiment of the invention, a large number of combination modes can be provided according to different AD values acquired by the ADC interface, and more types of optical modules can be determined compared with the combination modes provided by the I/O ports with only two states. Therefore, when the ADC interface is adopted to replace the traditional I/O port, a large number of I/O ports can be saved, and MCU resources are utilized to the maximum extent. Peripheral device parameter values and peripheral device names of optical modules of different models corresponding to the different AD values are determined by utilizing the acquired AD values, so that the model of the optical module is identified, the optical module is initialized, the parameter values are configured for the peripheral devices of the optical module during the initialization operation, so that the configuration values of the initialized peripheral devices are matched with software installed on the MCU to control the operation of the optical module, therefore, the optical modules of a plurality of models of the same MCU can share one version of software, the problem of difficult management of the software version is solved, and the use efficiency and convenience of the optical module for operators are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating a method of initializing an optical module according to an exemplary embodiment of the present invention.
Fig. 2 is a flowchart illustrating another method of initializing an optical module according to an exemplary embodiment of the present invention.
Fig. 3 is a hardware configuration diagram of a computer device where an initializing device of an optical module according to an embodiment of the present invention is located.
Fig. 4 is a block diagram illustrating an initializing device of an optical module according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification 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 or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the invention. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
An optical module is an optoelectronic device that performs photoelectric and electro-optical conversion, and includes two parts, namely a transmitting part and a receiving part. From the hardware level, it is understood that an optical module (optical module) is composed of an optoelectronic device, a functional circuit, and an optical interface, wherein the functional circuit includes an MCU, and in the present invention, it is understood that the functional circuit of the optical module is composed of the MCU and peripheral devices. The optical module is a connection module playing a role of photoelectric conversion, wherein the transmitting end converts an electric signal into an optical signal, and the receiving end converts the optical signal into an electric signal after transmitting the optical signal through an optical fiber. In other words, after the conversion of the optical module, the electrical signal can be changed into an optical signal to be transmitted in the optical fiber, which has advantages such as transmission distance, transmission rate, etc. which are not found in the conventional cable transmission, and the optical signal is converted back into an electrical signal by the optical module after reaching the destination. In addition, the MCU is called a micro control unit (Microcontroller Unit), also called a single-chip microcomputer (Single Chip Microcomputer) or a single-chip microcomputer, and is used as a chip-level computer to perform different combination control for different application occasions. The software installed on the MCU can enable the optical module to operate by combining the MCU of the optical module with peripheral devices. However, optical modules are of various types, and one type of optical module needs to correspond to one version of software to operate normally. Under the application scene that the number of the optical modules is huge, operators have the condition that the software of a plurality of versions needs to be managed, so that the operators cannot quickly manage the versions of the software, and the normal use of the optical modules is inconvenient.
Therefore, the invention provides the method for initializing the optical module, which reduces the problem of difficult management of the software version and improves the use efficiency and convenience of the optical module for operators. When the MCUs of the light modules are identical, the same version of software can be installed, which provides for the next use of the same version of software for multiple models of light modules.
The embodiments of the present invention will be described in detail.
As shown in fig. 1, fig. 1 is a flowchart of an initialization method of an optical module according to an exemplary embodiment of the present invention, where an MCU of the optical module has an ADC interface thereon, including the steps of:
step S101, initializing an MCU, and starting an ADC interface on the MCU;
step S102, when the optical module is electrified for the first time, an AD value of the ADC interface is obtained, and the AD value is obtained after analog-to-digital conversion based on a parameter value of the optical module acquired by the ADC interface;
step S103, determining the model of the optical module based on the comparison of the acquired AD value and pre-stored reference data; the reference data are used for distinguishing peripheral devices of different models of optical modules corresponding to different AD values;
step S104, according to the determined model of the optical module, initializing peripheral devices of the optical module.
In step S101, the embodiment of the invention adopts the ADC interface to replace the traditional I/O interface, thereby saving a large number of I/O interfaces and maximizing the utilization of MCU resources. An ADC, i.e., an analog-to-digital converter, is a device that converts an analog signal to a digital signal so that the system can use digital logic for communication and processing. The ADC interface is positioned on the MCU, and before the ADC interface is used, the MCU needs to be initialized, and the ADC interface on the MCU is started.
In step S102, when the optical module is powered on for the first time, the data judgment condition may be provided for the next step by obtaining the AD value obtained by the analog-to-digital conversion of the parameter value of the optical module collected by the ADC interface.
In step S103, based on the comparison between the AD value obtained in step S102 and the pre-stored reference data, where the reference data is used to describe the peripheral devices of the optical modules of different models corresponding to the different AD values, so as to determine the model of the current optical module according to the currently obtained AD value, and also obtain the parameter value of the peripheral device and the name of the peripheral device of the current optical module.
In step S104, each optical module of each model has a corresponding peripheral device, each peripheral device has a corresponding function, and after determining the model of the optical module, the driving chip is initialized according to the type of the driving chip of the optical module, and configuration parameter values of the peripheral devices of the optical module are given.
In this embodiment, determining the model of the current optical module according to the currently acquired AD value may be that model judgment is performed each time the optical module is powered on. However, in different models of optical modules, the internal protocol and hardware configuration parameters are very different, and quality accidents may be caused when the optical modules are configured with wrong parameter data and protocols. If the optical module performs the type selection judgment during each power-on operation, the optical module may perform the wrong type selection judgment due to the failure of the optical module level and other reasons. Therefore, in order to avoid the error of judging the model of the optical module, the model of the optical module is only judged when the optical module is powered on for the first time to operate. In one embodiment, the optical module records the first power on flag bit when it is first powered on.
In order to judge whether the optical module is electrified for the first time, in one embodiment, when the optical module is connected with an ADC interface on the MCU and electrified, the AD value acquired by the ADC interface is read to judge the signal of the optical module, the record of the MCU is inquired, whether the optical module of the model has a sign bit electrified for the first time is judged, if not, the optical module is judged to be electrified for the first time, and the sign bit electrified for the first time is recorded in the MCU.
In the above embodiment, the recording of the first power-on flag bit by the optical module when the first power-on may be that only one first power-on flag bit is recorded in the address space of the MCU. However, due to the fact that the semiconductor memory has soft failure, when the optical module is not powered on for the first time and the memory of the MCU recording the first power-on flag bit is in soft failure, model judgment can be carried out again, and if the situation of error type selection is met again, wrong parameter data and protocols can be configured for the optical module, and quality accidents are caused. Therefore, in order to avoid the above situation, in one embodiment, the first power-on flag bit is stored in two different address spaces, and the process of determining whether the optical module is first powered on is: inquiring whether the first power-on flag bit exists in any one of the two address spaces, and if so, determining that the optical module is not powered on for the first time; and if the first power-on zone bit does not exist in both address spaces, determining that the optical module is first power-on, and recording the first power-on zone bit.
As can be seen from the above embodiment, when it is determined that the optical module is not powered on for the first time, the step of judging the type of the optical module is not needed, however, the memory of the optical module may also have soft failure, and for safety, the peripheral device parameters of the optical module still need to be initialized, so that the peripheral device of the optical module is given corresponding parameter configuration. In order to perform the subsequent initialization operation on the peripheral device parameters of the optical module, the model of the optical module currently in power-on operation needs to be determined. Therefore, in one embodiment, the determined model of the optical module is recorded, the model of the optical module which is currently powered on is determined based on the recorded model of the optical module when the optical module is not powered on for the first time, and the peripheral device of the optical module is initialized according to the determined model of the optical module.
In the MCU, the ROM is a read-only memory, the CPU can only read data from the inside, but can not write data into the inside, and the data is still stored in the memory after power failure; the RAM is a random access memory, the CPU can read data from the inside and write data into the inside, the data is not stored after power failure, the reference data, the first power-on flag bit and the model of the optical module are stored in the operation mode, the next operation is performed, and a power-off process is arranged in the middle of the operation process, so that the ROM is used as the memory. In one embodiment, the MCU further includes a ROM in which the reference data, the first power-on flag bit, and the model of the optical module are stored.
In one embodiment, the reference data is stored in a preset table. Before the optical module is installed and debugged, in order to facilitate subsequent operation and debugging, and also in order to manage and count the functions of the optical modules on the MCU, the optical modules on one MCU can be subjected to early model and function planning, and peripheral device parameter values and peripheral device names (reference data) of the optical modules of different models corresponding to different AD values are stored in a preset table.
After the model planning of the optical module with the preset table is performed, the model of the optical module, the parameter values of the peripheral devices and the names of the peripheral devices can be stored when the model of the optical module is determined. In one embodiment, the model of the optical module and the peripheral device parameter values and the peripheral device names may be stored in such a way that all determined model of the optical module and the peripheral device parameter values and the peripheral device names are stored. However, the data already stored on the schedule on the MCU is wasteful of storage space for the MCU. In order to avoid occupying excessive storage space, a concept of identification is introduced, and information of a preset table is called by utilizing the guiding function of the identification. Thus in another embodiment, the ROM also stores peripheral device parameter values and peripheral device names for the model numbers; the method further includes reading the model number, peripheral device parameter values, and peripheral device names of the optical module from the ROM for display when the optical module is connected to an external device.
In order to manage all the optical modules on the planning table, information query needs to be performed on the optical modules of each model, in the above embodiment, since the model of the optical module, the parameter values of the peripheral devices and the names of the peripheral devices are already stored in the preset table, the determined optical modules can be queried according to the stored information for the operation of later real-time query. In other words, the information of the peripheral devices of the optical module can be directly read in the later management, and a manager does not need to query a schematic diagram or other related documents, so that the later product management efficiency is indirectly improved, and the product management cost is reduced.
As shown in fig. 2, which is a flowchart illustrating a method for initializing another optical module according to an exemplary embodiment, this embodiment describes a process procedure when the optical module is powered on for the first time and not powered on for the first time on the basis of the foregoing embodiment, including the following steps:
step S201, initializing an MCU, and starting an ADC interface on the MCU; because the ADC interface is positioned in the MCU, before the ADC interface is used, the chip of the MCU needs to be initialized, so that the ADC interface on the MCU is started, and the ADC interface is enabled to enter a working state and perform functions.
Step S202, when the optical module is powered on for the first time, recording a first power-on flag bit; if the optical module performs the type selection judgment during each power-on operation, the optical module may perform the wrong type selection judgment due to the failure of the optical module level and other reasons. Therefore, in order to avoid the error judgment of the optical module model, the optical module model is judged only when the optical module is powered on for the first time and operates, and the first power-on flag bit is recorded when the optical module is powered on for the first time.
Step S203, the first power-on flag bit is stored in two different address spaces, and the process of determining whether the optical module is first powered on is as follows: inquiring whether the first power-on flag bit exists in any one of the two address spaces, and if so, determining that the optical module is not powered on for the first time; if the first power-on zone bit does not exist in both address spaces, determining that the optical module is first power-on, and recording the first power-on zone bit; because the semiconductor memory has the soft failure condition, when the optical module is not powered on for the first time and the memory of the MCU recording the first power on flag bit is in soft failure, model judgment can be carried out again, and if the situation of error type selection is met again, wrong parameter data and protocols can be configured for the optical module, and quality accidents are caused.
Step S204, judging whether the optical module is electrified for the first time; if yes, go to step S205; if not, executing step S208; because the optical module is only subjected to type selection judgment when the optical module is electrified for the first time, the wrong type selection identification of the optical module can be found when the optical module is subjected to factory inspection, and the defective rate of products after factory is reduced.
Step S205, when the optical module is powered on for the first time, an AD value of the ADC interface is obtained, wherein the AD value is obtained after analog-to-digital conversion based on a parameter value of the optical module acquired by the ADC interface; and reading the AD value for multiple times, and obtaining a final AD value after taking an average value.
Step S206, determining the model of the optical module based on the comparison of the acquired AD value and pre-stored reference data; the reference data are used for distinguishing peripheral devices of different models of optical modules corresponding to different AD values; and matching the AD value in the corresponding reference data by comparing the obtained AD value with the AD value in the reference data by using the pre-stored reference data as a reference item, and obtaining the optical module model corresponding to the AD value, the peripheral device parameter value and the peripheral device name.
Step S207, the MCU further comprises a ROM, wherein the reference data, the first power-on zone bit and the model of the optical module are stored in the ROM; the memory on the MCU is roughly divided into a RAM and a ROM, but the RAM only can store temporary data, the data is not stored after the power is turned off, and the ROM can still store the data after the power is turned off, so the ROM is selected to perform a storage function for the MCU in the embodiment.
Step S208, the determined model of the optical module is recorded, the model of the optical module which is electrified at present is determined based on the recorded model of the optical module when the optical module is electrified for the non-first time, and the peripheral device of the optical module is initialized according to the determined model of the optical module; and reading the model of the optical module recorded when the optical module is powered on for the first time, thereby determining the model of the optical module.
Step S209, the reference data are stored in a preset table; in order to facilitate subsequent operation and debugging, and also to manage and count the functions of the optical modules, the optical modules of the same MCU can be subjected to early model and function planning, and reference data are stored in a preset table.
Step S210, the ROM also stores the peripheral device parameter value and the peripheral device name of the model; the method further comprises reading the model of the optical module, the peripheral device parameter value and the peripheral device name from the ROM for display when the optical module is connected with external equipment; when the optical module is connected to an external device, the peripheral device parameter values and the peripheral device names of the optical module of the determined model stored can be read from the ROM.
Step S211, initializing peripheral devices of the optical module according to the determined model of the optical module;
and after the model of the optical module is determined, initializing a driving chip according to the type of the driving chip of the optical module, and giving configuration parameter values of the peripheral devices of the optical module.
The invention also provides a device and an embodiment of a terminal applied to the device corresponding to the embodiment of the method.
The embodiment of the file processing device can be applied to computer equipment, such as a server or terminal equipment. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory through a processor of the file processing where the device is located. In terms of hardware, as shown in fig. 3, a hardware structure diagram of a computer device where the file processing apparatus according to the embodiment of the present invention is located is shown in fig. 3, and in addition to the processor 310, the memory 330, the network interface 320, and the nonvolatile memory 340 shown in fig. 3, a server or an electronic device where the device 331 is located in the embodiment of the present invention may generally include other hardware according to an actual function of the computer device, which is not described herein again.
As shown in fig. 4, fig. 4 is a block diagram illustrating an initializing device of an optical module according to an exemplary embodiment of the present invention, the device comprising:
an enabling unit 41 for enabling the ADC interface on the MCU;
an acquisition unit 42 that acquires an ADC interface AD value; the AD value is obtained after analog-to-digital conversion based on the parameter value of the optical module acquired by the ADC interface;
a distinguishing unit 43 that determines the model of the optical module based on the comparison of the acquired AD value with pre-stored reference data; the reference data are used for describing peripheral devices of different models of optical modules corresponding to different AD values;
an initialization unit 44 for initializing peripheral devices of the light module according to the determined model of the light module.
In one embodiment, the apparatus further comprises:
the optical module records a recording unit 45 (not shown in fig. 4) of the first power-on flag bit at the first power-on.
In one embodiment, the apparatus further comprises:
a judging unit 46 (not shown in fig. 4) that judges whether the optical module is first powered on or not based on the recorded first powered on flag bit; the first power-on flag bit is stored in two different address spaces, whether the first power-on flag bit exists in any one of the two address spaces is inquired, and if so, the optical module is determined to be not powered on for the first time; and if the first power-on zone bit does not exist in both address spaces, determining that the optical module is first power-on, and recording the first power-on zone bit.
In one embodiment, the initialization unit 44 is further configured to:
and recording the determined model of the optical module, and when the optical module is not electrified for the first time, determining the model of the optical module which is electrified currently based on the recorded model of the optical module, and initializing peripheral devices of the optical module which is electrified currently.
In one embodiment, the MCU further includes a ROM in which the reference data, the first power-on flag bit, and the model of the optical module are stored.
In one embodiment, the apparatus further comprises:
the reference data is stored in a storage unit 47 (not shown in fig. 4) in a preset table.
In one embodiment, the ROM further stores peripheral device parameter values and peripheral device names for the model number, and the apparatus further comprises:
when the optical module is connected to an external device, a display unit 48 (not shown in fig. 4) that reads the model number of the optical module, the peripheral device parameter value, and the peripheral device name from the ROM and displays them.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Correspondingly, the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the initialization method of the optical module when executing the program.
Embodiments of the invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by the computing device.
The foregoing describes certain embodiments of the present invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (6)

1. An initialization method of an optical module, wherein an MCU of the optical module has an ADC interface, the method comprising:
initializing an MCU, and starting an ADC interface on the MCU;
inquiring whether a first power-on zone bit of the optical module exists in any one of the two address spaces, and if so, determining that the optical module is not powered on for the first time; if the first power-on zone bit does not exist in both address spaces, determining that the optical module is first power-on, and recording the first power-on zone bit, wherein the first power-on zone bit is stored in two different address spaces;
when the optical module is electrified for the first time, an AD value of the ADC interface is obtained, and the AD value is obtained after analog-to-digital conversion based on a parameter value of the optical module acquired by the ADC interface;
determining and recording the model of the optical module based on the comparison of the acquired AD value and pre-stored reference data; the reference data are used for distinguishing the peripheral devices of the optical modules of different models corresponding to different AD values;
initializing a driving chip according to the determined model of the optical module and according to the driving chip type of the optical module, and configuring parameter values for peripheral devices of the optical module;
when the optical module is powered on for the first time, determining the model of the optical module which is powered on currently based on the recorded model of the optical module, initializing a driving chip according to the determined model of the optical module and configuring parameter values for peripheral devices of the optical module according to the driving chip type of the optical module.
2. The method of claim 1, wherein the MCU further comprises a ROM, the reference data, the first power-on flag bit, and the model number of the optical module being stored in the ROM.
3. The method of claim 1, wherein the reference data is stored in a preset table.
4. The method of claim 2, wherein the ROM further stores peripheral device parameter values and peripheral device names for the model number;
the method further includes reading the model number, peripheral device parameter values, and peripheral device names of the optical module from the ROM for display when the optical module is connected to an external device.
5. An apparatus for initializing an optical module, the apparatus comprising:
an enabling unit for enabling an ADC interface on the MCU inside the optical module;
judging whether the optical module is a judging unit for first power-on or not according to the first power-on flag bit; the first power-on flag bit is stored in two different address spaces, whether the first power-on flag bit of the optical module exists in any one of the two address spaces is inquired, and if yes, the optical module is determined to be not powered on for the first time; if the first power-on zone bit does not exist in both address spaces, determining that the optical module is first power-on, and recording the first power-on zone bit;
when the optical module is electrified for the first time, an acquisition unit for acquiring an AD value of an ADC interface; the AD value is obtained after analog-to-digital conversion based on the parameter value of the optical module acquired by the ADC interface;
determining a model of the optical module and a recorded distinguishing unit based on comparison of the acquired AD value and pre-stored reference data; the optical module of each model is provided with corresponding peripheral devices, and the reference data are used for distinguishing the peripheral devices of the optical modules of different models corresponding to different AD values;
according to the determined model of the optical module, an initialization unit for initializing a driving chip according to the driving chip type of the optical module and configuring parameter values for peripheral devices of the optical module;
the initialization unit is further configured to: when the optical module is powered on for the non-first time, determining the type of the optical module which is powered on currently based on the recorded type of the optical module, initializing a driving chip according to the type of the driving chip of the optical module according to the determined type of the optical module, and configuring parameter values for peripheral devices of the optical module.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 4 when the program is executed by the processor.
CN201910429181.2A 2019-05-22 2019-05-22 Initialization method and device of optical module and electronic equipment Active CN110187894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910429181.2A CN110187894B (en) 2019-05-22 2019-05-22 Initialization method and device of optical module and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910429181.2A CN110187894B (en) 2019-05-22 2019-05-22 Initialization method and device of optical module and electronic equipment

Publications (2)

Publication Number Publication Date
CN110187894A CN110187894A (en) 2019-08-30
CN110187894B true CN110187894B (en) 2023-07-21

Family

ID=67717355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910429181.2A Active CN110187894B (en) 2019-05-22 2019-05-22 Initialization method and device of optical module and electronic equipment

Country Status (1)

Country Link
CN (1) CN110187894B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124693A (en) * 2021-11-08 2022-03-01 中国联合网络通信集团有限公司 Parameter configuration method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514001A (en) * 2012-06-27 2014-01-15 中兴通讯股份有限公司 Processor initialization method and device
CN108390728A (en) * 2018-02-24 2018-08-10 青岛海信宽带多媒体技术有限公司 Optical module electrification control method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1192521C (en) * 2002-03-08 2005-03-09 华为技术有限公司 Digital regulated light receiving module and its regulating method
CN101179331B (en) * 2006-11-08 2012-03-07 中兴通讯股份有限公司 Automatic debugging method and system of optical module
CN102279816A (en) * 2011-06-02 2011-12-14 北京百纳威尔科技有限公司 LCD (liquid crystal display) automatic identification method and device
CN102684777A (en) * 2012-06-14 2012-09-19 青岛海信宽带多媒体技术有限公司 Optical module and initialization method and device thereof
CN105718248B (en) * 2014-12-02 2020-02-21 比亚迪股份有限公司 System on chip and method and device for initializing port function of system on chip
CN109000889B (en) * 2018-06-21 2021-03-02 青岛海信宽带多媒体技术有限公司 Optical module degradation detection method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514001A (en) * 2012-06-27 2014-01-15 中兴通讯股份有限公司 Processor initialization method and device
CN108390728A (en) * 2018-02-24 2018-08-10 青岛海信宽带多媒体技术有限公司 Optical module electrification control method and device

Also Published As

Publication number Publication date
CN110187894A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
US6833792B1 (en) Battery capacity indicator in a portable computing device
CN103595790B (en) The remote access method of equipment, thin-client and virtual machine
JP2016058083A (en) System and method for managing plurality of bios default setting
CN114003538B (en) Identification method of intelligent network card and intelligent network card
CN109144531A (en) The approaches to IM and device of programming system and its server
CN1327341C (en) Firmware automatic configuration system and method for substrate management controller
CN109189421A (en) Burning management method, device and programming system based on programming system server
CN102479148A (en) System and method for monitoring input/output port state of peripheral element
CN109062587A (en) The burning management method and device of programming system and its server
US6879259B1 (en) Battery voltage indicator in a portable computing device
CN110187894B (en) Initialization method and device of optical module and electronic equipment
CN111399945A (en) Calibration and configuration management method based on 10G PON BOB equipment
CN109062586A (en) The burning management method and device of programming system and its client
CN113466688A (en) Motor parameter identification method, device, motor, system and storage medium
CN108958765B (en) Method and device for upgrading optical module firmware
CN108985402B (en) RAID card information acquisition method and related device
CN111831341A (en) Configuration file loading method, device and system and computer readable medium
CN115421749A (en) Hard disk firmware refreshing method, system, device and medium based on Linux system
CN109032624A (en) A kind of test method and its device based on programming system
CN113727208A (en) Communication method, device, equipment and medium for quickly reading and writing parameter information of optical module
CN114780281A (en) Server hardware error log recording method, device, equipment and medium
CN114861003A (en) Object enumeration method, device and medium under specified directory
CN211982148U (en) Wireless signal detection system and wireless signal detection device
CN109039770B (en) Server CMC refreshing method and device and related equipment
CN113010108A (en) Storage system and hard disk management device thereof

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
GR01 Patent grant
GR01 Patent grant