CN110187894A - A kind of initial method of optical module, device and electronic equipment - Google Patents

A kind of initial method of optical module, device and electronic equipment Download PDF

Info

Publication number
CN110187894A
CN110187894A CN201910429181.2A CN201910429181A CN110187894A CN 110187894 A CN110187894 A CN 110187894A CN 201910429181 A CN201910429181 A CN 201910429181A CN 110187894 A CN110187894 A CN 110187894A
Authority
CN
China
Prior art keywords
optical module
time
model
peripheral components
mcu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910429181.2A
Other languages
Chinese (zh)
Other versions
CN110187894B (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

Abstract

A kind of initial method of optical module, device and electronic equipment, which is characterized in that there is ADC interface on the MCU of the optical module, which comprises initialization MCU enables the ADC interface on MCU;When the optical module powers on for the first time, the AD value of the ADC interface is obtained, the AD value obtains after the parameter value analog-to-digital conversion based on ADC interface optical module collected;It is compared based on acquired AD value with the reference data prestored, determines the model of the optical module;Wherein, the reference data is used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;According to the model of identified optical module, the peripheral components of the optical module are initialized.Enable the optical module of multiple models of same MCU to share the software of a version, reduce the problem of software version management difficulty, also improves optical module to the service efficiency and convenience of operator.

Description

A kind of initial method of optical module, device and electronic equipment
Technical field
The present invention relates to technical field of photo communication more particularly to a kind of initial method of optical module, device and electronics to set It is standby.
Background technique
Optical module is divided into hardware and software two parts, and hardware includes MCU and peripheral components, and software installation is in MCU.In light In the use process of module, the software that the optical module of a model needs to be adapted to respective version could be operated normally.In optical module Under the application scenarios of model substantial amounts, operator exist need to manage numerous versions software the case where so that operator without Method quickly carries out version management to software, is also not easy to the normal use of optical module.
Summary of the invention
To overcome the problems in correlation technique, the present invention provides a kind of initial method of optical module, device and Electronic equipment.
According to a first aspect of the embodiments of the present invention, a kind of initial method of optical module, the MCU of the optical module are provided It is upper that there is ADC interface, which comprises
MCU is initialized, the ADC interface on MCU is enabled;
When the optical module powers on for the first time, the AD value of the ADC interface is obtained, the AD value is based on ADC interface and is adopted It is obtained after the parameter value analog-to-digital conversion of the optical module of collection;
It is compared based on acquired AD value with the reference data prestored, determines the model of the optical module;Wherein, the base Quasi- data are used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;
According to the model of identified optical module, the peripheral components of the optical module are initialized.
According to a second aspect of the embodiments of the present invention, a kind of apparatus for initializing of optical module is provided, comprising:
For enabling the enabling unit of the ADC interface inside optical module on MCU;
Acquire the acquisition unit of ADC interface AD value;The parameter value modulo of the AD value based on ADC interface optical module collected It is obtained after number conversion;
The difference unit to determine the model of the optical module is compared based on acquired AD value and the reference data prestored; The reference data is used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;
According to the model of identified optical module, the initialization unit of the peripheral components for initializing optical module.
According to a third aspect of the embodiments of the present invention, a kind of apparatus for initializing of optical module is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the operation in method as described above is executed when the processor executes described program.
The technical solution that the embodiment of the present invention provides can include the following benefits:
In the embodiment of the present invention, a large amount of combination can provide according to the collected difference AD value of ADC interface, compare The only combination of the I/O mouth offer of two states, it may be determined that the optical module of more polytypic.Therefore, it is replaced using ADC interface It when traditional I/O mouth, can save I/O mouthfuls a large amount of, maximally utilize MCU resource.Different AD are determined using collected AD value It is worth the peripheral components parameter value and peripheral components title of the optical module of corresponding different model, thus identify optical module model, it is right Optical module initializes, and initialization operation is the peripheral components configuration parameter value to the optical module, so as to be installed on The Configuration Values of the peripheral components after software pairing initialization on MCU are to control optical module operation, therefore same MCU's is more The optical module of a model can share the software of a version, reduce the problem of software version management difficulty, also improve optical mode Service efficiency and convenience of the block to operator.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and constitutes a part of the invention, shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of present invention flow chart of the initial method of optical module shown according to an exemplary embodiment.
Fig. 2 is the flow chart of the initial method of the present invention another optical module shown according to an exemplary embodiment.
Fig. 3 is a kind of hardware structure diagram of computer equipment where the apparatus for initializing of optical module of the embodiment of the present invention.
Fig. 4 is a kind of present invention block diagram of the apparatus for initializing of optical module shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
It is only to be not intended to limit the invention merely for for the purpose of describing particular embodiments in terminology used in the present invention. It is also intended in the present invention and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the present invention A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the scope of the invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Optical module is the opto-electronic device for carrying out photoelectricity and electro-optic conversion, including emits and receive two parts.From hardware layer Understand on face, optical module (optical module) is made of opto-electronic device, functional circuit and optical interface etc., wherein function electricity Road includes MCU, and the functional circuit that can be regarded as optical module in the present invention is made of MCU and peripheral components.Optical module is to play A kind of link block of photoelectric conversion effect, wherein transmitting terminal converts electrical signals into optical signal, after being transmitted by optical fiber, receives Optical signal is converted into electric signal again by end.In other words, by the conversion of optical module, electric signal can become optical signal in a fiber It propagates, has the advantage, such as transmission range, transmission rate etc. not having in traditional cable propagation, after arriving at the destination, then pass through Optical module is by optical signal converted back into electric signals.In addition, the full name of MCU is micro-control unit (Microcontroller Unit), Also known as one chip microcomputer (Single Chip Microcomputer) or single-chip microcontroller, the calculating as a chip-scale Machine does various combination control for different applications.It is installed on the MCU and peripheral components of the software combination optical module on MCU Optical module can be made to run.However optical module, there are many model, the optical module of a model needs a corresponding version Software could operate normally.Under the application scenarios of optical module model substantial amounts, operator, which exists, needs to manage numerous versions Software the case where so that operator can not quickly to software carry out version management, also be not easy to the normal use of optical module.
Therefore, the method that the present invention proposes a kind of initialization of optical module reduces the problem of software version management difficulty, Optical module is also improved to the service efficiency and convenience of operator.When the MCU of optical module is same, phase can be installed With the software of version, next this is is that the software creation of same version condition can be used in the optical module of multiple models.
Next the embodiment of the present invention is described in detail.
As shown in Figure 1, Fig. 1 is a kind of present invention initial method of optical module shown according to an exemplary embodiment Flow chart has ADC interface on the MCU of the optical module, comprising the following steps:
Step S101 initializes MCU, enables the ADC interface on MCU;
Step S102 obtains the AD value of the ADC interface when the optical module powers on for the first time, and the AD value is based on ADC It is obtained after the parameter value analog-to-digital conversion of interface optical module collected;
Step S103 is compared with the reference data prestored based on acquired AD value, determines the model of the optical module;Its In, the reference data is used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;
Step S104 carries out initialization behaviour to the peripheral components of the optical module according to the model of identified optical module Make.
In step s101, the embodiment of the present invention replaces traditional I/O mouth using ADC interface, saves a large amount of I/O Mouthful, maximally utilize MCU resource.ADC i.e. analog-digital converter, as analog signal are converted into the device of digital signal, make Digital Logic can be used to be communicated and be handled in the system of obtaining.ADC interface is located on MCU, before using ADC interface, needs MCU is initialized, enable the ADC interface on MCU.
In step s 102, when the optical module powers on for the first time, by the ginseng for obtaining ADC interface optical module collected AD value made of numerical value analog-to-digital conversion can provide data Rule of judgment for following step.
In step s 103, it is compared based on the AD value obtained from step S102 with the reference data prestored, wherein the base Quasi- data are used to describe the peripheral components of the optical module of different model corresponding to different AD values, thus according to the AD currently obtained Value determines the model for working as front optical module, while can also obtain the peripheral components parameter value and peripheral components title when front optical module, This step is the realization rate for the software platform identification optical module model being installed on MCU, provides operation for following step Condition.
In step S104, the optical module of each model has corresponding peripheral components, and each peripheral components have accordingly Function, after determining the model of optical module, according to optical module driving chip type initialize driving chip, to optical module periphery The configuration parameter value of device.
In the present embodiment, it is determined according to the AD value currently obtained when the model of front optical module can be, in each optical mode Model judgement is all carried out on block when electricity operation.However, in the optical module of different model, internal agreement and hardware configuration parameter differences It is very big, when to optical module configuration error supplemental characteristic and agreement may cause quality accident.If optical module is powering on every time Type selecting judgement is all carried out when operation, it is possible that carrying out the type selecting of mistake to optical module due to optical module level failure etc. Judgement.Therefore, in order to avoid the misjudgment of optical module model, light model only is judged in optical module upper electricity operation work for the first time Number.In one embodiment, when the system is first powered on, record powers on flag bit to optical module for the first time.
In order to judge whether the optical module powers on for the first time, the ADC on optical module connection MCU is connect in one embodiment Mouthful and when powering on, will read ADC interface collected AD value judge the signal of optical module, inquire the record of MCU, judge the type Number optical module whether have and power on flag bit for the first time, if it's not true, judge that optical module to power on for the first time, records in MCU Flag bit is powered on for the first time.
In upper one embodiment, optical module records when the system is first powered on to be powered on flag bit for the first time and can be, on the ground of MCU Only record one powers on flag bit for the first time in the space of location.However, working as light since semiconductor memory can have the case where soft failure The non-electricity operation upper for the first time of module and when recording the memory soft failure for powering on the MCU of flag bit for the first time, it will carry out model again Judgement, if meeting the situation of type selecting mistake again, it will supplemental characteristic and agreement to optical module configuration error simultaneously lead to quality thing Therefore.Therefore, in order to avoid above situation generation, in one embodiment, the flag bit that powers on for the first time is stored in two differences Address space, judge whether the optical module is the process powered on for the first time are as follows: inquiry any of two described address spaces Flag bit is powered on for the first time with the presence or absence of described, if there is, it is determined that the optical module powers on for the first time to be non-;If two describedly Location space powers on flag bit described in being not present for the first time, it is determined that the optical module is to power on for the first time, and record and power on mark for the first time Will position.
By upper one embodiment it is found that when determine optical module be it is non-power on for the first time when, can not have to carry out optical module model The step of judgement, however the memory of optical module can also have the case where soft failure, to be on the safe side, still need to optical mode The peripheral components parameter of block initializes, and assigns the corresponding parameter configuration of peripheral components of optical module.In order to subsequent right The operation that the peripheral components parameter of optical module is initialized, it is thus necessary to determine that the model of the optical module of current upper electricity operation.Therefore, In one embodiment, record determined by optical module model, the optical module it is non-power on for the first time when, based on what is recorded The model of optical module determines the model of the optical module currently powered on, and according to the model of identified optical module, to the optical mode The peripheral components of block initialize.
Since in MCU, ROM is read-only memory, and CPU can only read data from the inside, and cannot write inside data, fall Data still save in memory after electricity;RAM is random access memory, and CPU can not only read data from the inside, but also can be inward Data are written in face, and data do not save after power down, and reference data, to power on flag bit and the model of optical module for the first time be this operation Storage, what subsequent operation was read out again, there is power process, therefore, use ROM as memory among operating process.One In a embodiment, the MCU further includes ROM, and the reference data powers on flag bit and the model of optical module is stored in institute for the first time It states in ROM.
In one embodiment, the reference data is stored in preset table.Before carrying out installation and debugging to optical module, it is It is convenient for subsequent operation and debugging, also for the function to the optical module on MCU is managed and counts, one can be directed to Optical module on MCU carries out model early period and functional planning, by the periphery of the optical module of different model corresponding to different AD values Device parameters value and peripheral components title (reference data) are stored in a preset table.
After the optical module model planning for having preset table, in the model for determining optical module can model to optical module with And peripheral components parameter value and peripheral components title are stored.In one embodiment, the model and peripheral device of optical module The mode that part parameter value and peripheral components title are stored can be, by the model and peripheral device of the optical module of all determinations Part parameter value and peripheral components title are stored.However, existing data on planning table are had stored on MCU, to MCU For be waste memory space.In order to avoid occupying excessive memory space, the concept of mark is introduced, is made using the guide of mark It is called with by the information of preset table.Therefore in another embodiment, the ROM is also stored with the peripheral device of the model Part parameter value and peripheral components title;The method also includes being read from the ROM when the optical module is connect with external equipment Model, peripheral components parameter value and the peripheral components title of the optical module is taken to be shown.
In order to be managed all optical modules on planning table, need to carry out information to the optical module of each model to look into Ask, in upper one embodiment, because the model and peripheral components parameter value and peripheral components title of optical module be stored in it is pre- If in table, therefore, fixed optical module can be inquired according to the information of storage, for the operation of later period real-time query.In other words, Optical module peripheral components information can be read directly in final-period management, administrative staff do not need inquiry schematic diagram or other phases Document is closed, the later product efficiency of management is improved indirectly and reduces management of product cost.
As shown in Fig. 2, being the process of the method for the initialization of another optical module shown according to an exemplary embodiment Figure, present embodiment on the basis of previous embodiment, describe optical module power on for the first time with it is non-power on for the first time when a kind of place Reason process, includes the following steps:
Step S201 initializes MCU, enables the ADC interface on MCU;Because ADC interface is located in MCU, connect using ADC Before mouthful, needs to initialize the chip of MCU, to enable the ADC interface on MCU, ADC interface is made to enter work State functions.
Step S202, when the system is first powered on, record powers on flag bit to optical module for the first time;If optical module is powering on fortune every time Type selecting judgement is all carried out when row, it is possible that the type selecting for carrying out mistake to optical module is sentenced due to optical module level failure etc. It is disconnected.Therefore, in order to avoid the misjudgment of optical module model, optical mode model only is judged in optical module upper electricity operation work for the first time, When the system is first powered on, record powers on flag bit to optical module for the first time.
Step S203, the flag bit that powers on for the first time are stored in two different address spaces, judge that the optical module is The no process to power on for the first time are as follows: any of two described address spaces of inquiry power on flag bit with the presence or absence of described for the first time, If there is, it is determined that the optical module powers on for the first time to be non-;If two address spaces power on for the first time described in being not present Flag bit, it is determined that the optical module is to power on for the first time, and record and power on flag bit for the first time;Since semiconductor memory can exist The case where soft failure, when the non-electricity operation upper for the first time of optical module records the memory soft failure for powering on the MCU of flag bit for the first time, Model judgement will be carried out again, if meeting the situation of type selecting mistake again, it will to optical module configuration error supplemental characteristic and Agreement simultaneously leads to quality accident.
Step S204, judges whether optical module powers on for the first time;If so, executing step S205;If it is not, executing step S208; Due to only carrying out type selecting judgement to optical module when the system is first powered on, when the type selecting identification that mistake occurs in optical module can be in exfactory inspection When be found, reduce product export after defect rate.
Step S205 obtains the AD value of the ADC interface when the optical module powers on for the first time, and the AD value is based on ADC It is obtained after the parameter value analog-to-digital conversion of interface optical module collected;AD value is repeatedly read, final AD is obtained after being averaged Value.
Step S206 is compared with the reference data prestored based on acquired AD value, determines the model of the optical module;Its In, the reference data is used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;Utilize what is prestored Reference data is compared by the AD value in the AD value and reference data that get, matches corresponding reference data as reference items In AD value and obtain the corresponding optical module model of the AD value and peripheral components parameter value and peripheral components title.
Step S207, the MCU further include ROM, and the reference data powers on flag bit and the model of optical module is deposited for the first time It is stored in the ROM;Since the memory on MCU is probably divided into RAM and two kinds of ROM, but RAM can only store ephemeral data, fall Data do not save after electricity, and data can be still saved after ROM power down, therefore selecting ROM in the present embodiment is that MCU exercises storage function Energy.
Step S208, record determined by optical module model, the optical module it is non-power on for the first time when, based on being recorded The model of optical module determine the model of optical module currently powered on, and according to the model of identified optical module, to the light The peripheral components of module initialize;The model that the optical module is recorded when the system is first powered on is read, so that it is determined that should The model of optical module.
Step S209, the reference data are stored in preset table;For the ease of subsequent operation and debugging, also for right The function of optical module is managed and counts, and model early period and functional planning can be carried out for the optical module of same MCU, by base Quasi- data are stored in a preset table.
Step S210, the ROM are also stored with the peripheral components parameter value and peripheral components title of the model;The side Method further includes that model, the peripheral components ginseng of the optical module are read from the ROM when the optical module is connect with external equipment Numerical value and peripheral components title are shown;When optical module connects external equipment, the deterministic type number of storage can be read from ROM Optical module peripheral components parameter value and peripheral components title.
Step S211 carries out initialization behaviour to the peripheral components of the optical module according to the model of identified optical module Make;
The optical module of each model has corresponding peripheral components, and each peripheral components have corresponding function, in determination After the model of optical module, driving chip is initialized according to optical module driving chip type, is joined to the configuration of optical module peripheral components Numerical value.
Corresponding with the embodiment of preceding method, the present invention also provides device and its embodiments of applied terminal.
The embodiment of document handling apparatus of the present invention can be applied on a computing device, such as server or terminal are set It is standby.Installation practice can also be realized by software realization by way of hardware or software and hardware combining.With software reality It is by the processor of file process where it by nonvolatile memory as the device on a logical meaning for existing In corresponding computer program instructions be read into memory operation formed.For hardware view, as shown in figure 3, being this hair A kind of hardware structure diagram of computer equipment where bright embodiment document handling apparatus, in addition to processor 310 shown in Fig. 3, interior It deposits except 330, network interface 320 and nonvolatile memory 340, the server or electronics in embodiment where device 331 Equipment can also include other hardware, repeat no more to this generally according to the actual functional capability of the computer equipment.
As shown in figure 4, Fig. 4 is a kind of present invention apparatus for initializing of optical module shown according to an exemplary embodiment Block diagram, described device include:
For enabling the enabling unit 41 of the ADC interface on MCU;
Acquire the acquisition unit 42 of ADC interface AD value;The parameter value of the AD value based on ADC interface optical module collected It is obtained after analog-to-digital conversion;
The difference unit to determine the model of the optical module is compared based on acquired AD value and the reference data prestored 43;The reference data is used to describe the peripheral components of the optical module of different model corresponding to different AD values;
According to the model of identified optical module, the initialization unit 44 of the peripheral components for initializing optical module.
In one embodiment, described device further include:
Optical module records the recording unit 45 for powering on flag bit for the first time when the system is first powered on (Fig. 4 is not shown).
In one embodiment, described device further include:
Judge whether the optical module is the (figure of judging unit 46 powered on for the first time according to the flag bit that powers on for the first time recorded 4 are not shown);The flag bit that powers on for the first time is stored in two different address spaces, inquires in two address spaces and appoints One powers on flag bit with the presence or absence of described for the first time, if there is, it is determined that the optical module powers on for the first time to be non-;If two institutes It states address space and is not present and described power on flag bit for the first time, it is determined that the optical module is to power on for the first time, and record on for the first time Electrosemaphore position.
In one embodiment, the initialization unit 44 is also used to:
Record determined by optical module model, the optical module it is non-power on for the first time when, based on the optical module recorded Model determine the model of optical module currently powered on, the peripheral components of the optical module currently powered on are initialized.
In one embodiment, the MCU further includes ROM, and the reference data powers on flag bit and optical module for the first time Model is stored in the ROM.
In one embodiment, described device further include:
The storage unit 47 reference data being stored in preset table (Fig. 4 is not shown).
In one embodiment, the ROM is also stored with the peripheral components parameter value and peripheral components title of the model, Described device further include:
When the optical module is connect with external equipment, model, the peripheral components ginseng of the optical module are read from the ROM The display unit 48 that numerical value and peripheral components title are shown (Fig. 4 is not shown).
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
Correspondingly, the present invention also provides a kind of electronic equipment, including memory, processor and storage are on a memory and can The computer program run on a processor, wherein the processor realizes any of the above item light when executing described program The step of initial method of module.
It is (including but unlimited that the storage medium for wherein including program code in one or more can be used in the embodiment of the present invention In magnetic disk storage, CD-ROM, optical memory etc.) on the form of computer program product implemented.Computer can use storage Medium includes permanent and non-permanent, removable and non-removable media, can be accomplished by any method or technique information Storage.Information can be computer readable instructions, data structure, the module of program or other data.The storage medium of computer Example include but is not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices or any other non-biography Defeated medium, can be used for storage can be accessed by a computing device information.
It is above-mentioned that specific embodiment of the present invention is described.Other embodiments are within the scope of the appended claims. In some cases, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment And desired result still may be implemented.In addition, process depicted in the drawing not necessarily require the particular order shown or Person's consecutive order is just able to achieve desired result.In some embodiments, multitasking and parallel processing are also possible Or it may be advantageous.
Those skilled in the art will readily occur to of the invention its after considering specification and the invention applied here of practice Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the invention, these modifications, purposes or The common knowledge in the art that person's adaptive change follows general principle of the invention and do not apply including the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (11)

1. a kind of initial method of optical module, which is characterized in that have ADC interface, the method on the MCU of the optical module Include:
MCU is initialized, the ADC interface on MCU is enabled;
When the optical module powers on for the first time, the AD value of the ADC interface is obtained, it is collected that the AD value is based on ADC interface It is obtained after the parameter value analog-to-digital conversion of optical module;
It is compared based on acquired AD value with the reference data prestored, determines the model of the optical module;Wherein, the base value According to the peripheral components of the optical module for distinguishing different model corresponding to different AD values;
According to the model of identified optical module, the peripheral components of the optical module are initialized.
2. the method according to claim 1, wherein the method also includes:
When the system is first powered on, record powers on flag bit to optical module for the first time.
3. according to the method described in claim 2, it is characterized in that, the flag bit that powers on for the first time is stored in two different ground Location space judges whether the optical module is the process powered on for the first time are as follows:
Any of two described address spaces of inquiry power on flag bit with the presence or absence of described for the first time, if it is, described in determining Optical module powers on for the first time to be non-;If two address spaces power on flag bit described in being not present for the first time, it is determined that described Optical module is to power on for the first time, and record powers on flag bit for the first time.
4. according to the method described in claim 2, it is characterized in that, the method also includes:
Record determined by optical module model, the optical module it is non-power on for the first time when, the type based on the optical module recorded Number the model of optical module currently powered on is determined, and according to the model of identified optical module, to the peripheral device of the optical module Part initializes.
5. according to the method described in claim 4, it is characterized in that, the MCU further includes ROM, the reference data, for the first time on The model of electrosemaphore position and optical module is stored in the ROM.
6. the method according to claim 1, wherein the reference data is stored in preset table.
7. according to the method described in claim 5, it is characterized in that, the ROM is also stored with the peripheral components ginseng of the model Numerical value and peripheral components title;
The method also includes when the optical module is connect with external equipment, from the ROM read the optical module model, Peripheral components parameter value and peripheral components title are shown.
8. a kind of apparatus for initializing of optical module, which is characterized in that described device includes:
For enabling the enabling unit of the ADC interface inside optical module on MCU;
Acquire the acquisition unit of ADC interface AD value;The AD value is turned based on the parameter value modulus of ADC interface optical module collected It is obtained after changing;
The difference unit to determine the model of the optical module is compared based on acquired AD value and the reference data prestored;It is described Reference data is used to distinguish the peripheral components of the optical module of different model corresponding to different AD values;
According to the model of identified optical module, the initialization unit of the peripheral components for initializing optical module.
9. device according to claim 8, which is characterized in that described device further include:
Optical module records the recording unit for powering on flag bit for the first time when the system is first powered on.
10. device according to claim 9, which is characterized in that described device further include:
Judge whether the optical module is the judging unit powered on for the first time;It is described power on for the first time flag bit be stored in two it is different Address space, any of two described address spaces of inquiry power on flag bit with the presence or absence of described for the first time, if there is, it is determined that The optical module powers on for the first time to be non-;If two address spaces power on flag bit described in being not present for the first time, it is determined that The optical module is to power on for the first time, and record and power on flag bit for the first time.
11. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, wherein the processor realizes the step of any one of claim 1~7 the method when executing described program.
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 true CN110187894A (en) 2019-08-30
CN110187894B 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)

Cited By (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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050129415A1 (en) * 2002-03-08 2005-06-16 Huawei Technologies Co., Ltd. Digital regulated light receive module and regulation method
CN101179331A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 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
CN103514001A (en) * 2012-06-27 2014-01-15 中兴通讯股份有限公司 Processor initialization method and device
CN105718248A (en) * 2014-12-02 2016-06-29 比亚迪股份有限公司 System on chip, and method and apparatus for port function initialization for system on chip
CN108390728A (en) * 2018-02-24 2018-08-10 青岛海信宽带多媒体技术有限公司 Optical module electrification control method and device
CN109000889A (en) * 2018-06-21 2018-12-14 青岛海信宽带多媒体技术有限公司 A kind of detection method and device of optical module deterioration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050129415A1 (en) * 2002-03-08 2005-06-16 Huawei Technologies Co., Ltd. Digital regulated light receive module and regulation method
CN101179331A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 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
CN103514001A (en) * 2012-06-27 2014-01-15 中兴通讯股份有限公司 Processor initialization method and device
CN105718248A (en) * 2014-12-02 2016-06-29 比亚迪股份有限公司 System on chip, and method and apparatus for port function initialization for system on chip
CN108390728A (en) * 2018-02-24 2018-08-10 青岛海信宽带多媒体技术有限公司 Optical module electrification control method and device
CN109000889A (en) * 2018-06-21 2018-12-14 青岛海信宽带多媒体技术有限公司 A kind of detection method and device of optical module deterioration

Cited By (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

Also Published As

Publication number Publication date
CN110187894B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
KR100843495B1 (en) A method for sending service data to an rfid tag while an attached computer system is powered off and a computer system therefor
CN102576311B (en) For being improved the method and system of software execution time by Optimal performance model
CN104795025B (en) LED display modules and its condition detection method
EP0272969B1 (en) Method and programmable apparatus for transcribing strings of characters
FR2677146A1 (en) SYSTEM AND METHOD FOR MANAGING DATA MEMORY WITH ALLOCATION OF MEMORY SPACE ACCORDING TO REQUIRED CLASS OF SERVICES.
CN106155638A (en) In configuration computer, basic input output system usefulness sets the system and method for shelves
CN101933000A (en) Component programs in the management service application program
CN109144727A (en) The management method and device of resource in cloud data system
CN1327341C (en) Firmware automatic configuration system and method for substrate management controller
US11374879B2 (en) Network configuration of top-of-rack switches across multiple racks in a data center
US20200396179A1 (en) Automated deployment of internet connectivity to rack switches in a data center
CN101339515A (en) Sensor process management methods and systems
CN106294040A (en) The acquisition methods of optical module status information and device
CN110737806A (en) Global ID generation method and device for business entity
CN110187894A (en) A kind of initial method of optical module, device and electronic equipment
CN109634878A (en) Monitoring method, monitoring device, server, terminal and readable storage medium storing program for executing
CN110321189A (en) A kind of method and apparatus that boarding program being presented in host program
CN109637558A (en) Automatic disc ferry-boat System and method between intranet and extranet
US7293058B2 (en) Shared routing in a measurement system
CN108228422A (en) Storage-type server management system and method
CN106330327B (en) Method and device for managing enabling state of optical module
US20170091690A1 (en) Efficiiently allocating completed product assemblies as inventory in a configure-to-order environment
CN109240798A (en) The method and apparatus for managing the external equipment of virtual machine
CN108304284A (en) A kind of circuit board and its anti-misconnection method and electronic equipment
CN107393594A (en) A kind of multinuclear solid state hard disc adjustment method and system

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