The content of the invention
It is an object of the present invention to provide a kind of compatible system of the self adaptation of quartz oscillator for mobile terminal
System, solves above technical problem;
The present invention also aims to, there is provided a kind of self adaptation compatible parties of quartz oscillator for mobile terminal
Method, solves above technical problem;
The present invention can be in the case of existing software and hardware scheme, the method combined using hardware and software, there is provided a kind of
For quartz oscillator the compatible scheme of self adaptation is carried out in hardware and software.
Technical problem solved by the invention can be realized using following technical scheme:
For the self adaptation compatible system of the quartz oscillator of mobile terminal, wherein, including a signal judgment means,
The signal judgment means include an at least input interface, the type of the oscillator for connecting as needed, to the input interface
The different signal of input or signal combination, the signal judgment means according to the signal acquisition oscillator of the input interface class
Type, and call corresponding control module to be processed.The present invention judges input interface input signal not using signal judgment means
With characteristic, the different oscillators to using distinguish, when the oscillator type of hardware configuration is got, call self adaptation
Flow, carries out corresponding algorithm process, parameter configuration, reference settings etc., it is ensured that system operation is in complete normal working condition
Under, simply realize the same printed circuit board compatible different crystal oscillator scheme of plate altogether.
Preferably, each signal or a kind of signal combination a type of oscillator of correspondence.
Preferably, also including a memory cell, the memory cell be stored with according to need self adaptation oscillator class
The parameter value of the corresponding input interface of type.
Preferably, the input interface connects a signal generation device, and the signal generation device includes that one is controllable
Level generating unit, the type of the oscillator that the level generating unit is connected as needed produces high level or low level or electricity
Flat combination, and the high level for producing or low level or level combinations are exported to the input interface.
Preferably, the input interface uses universal input/output interface, and high level is produced in the level generating unit
Part corresponding pin mainly connected by pull-up resistor inside the universal input/output interface formed.
Preferably, the input interface uses universal input/output interface, and low level is produced in the level generating unit
Part mainly formed by the corresponding external pull down resistor of pin of the universal input/output interface.
Preferably, when the signal judgment means obtain the input interface for high level, judgement is connected to the first kind
Oscillator.
Preferably, when the signal judgment means obtain the input interface for low level, judgement is connected to Second Type
Oscillator.
Preferably, the first kind oscillator is temp.-compensation type crystal oscillator.
Preferably, the Second Type oscillator is that digit compensated crystal damages oscillator.
Preferably, the memory cell uses non-volatile memory cells.
For the self adaptation compatibility method of the quartz oscillator of mobile terminal, wherein, comprise the following steps:
Step one:Combined by the signal or signal that judge input interface described at least one, it is determined that the oscillator of connection
Type;
Step 2:Different control instructions are performed according to the type of oscillator.
Preferably, stored according to the corresponding input interface of type of the oscillator for needing self adaptation by a memory cell
Parameter value.
Preferably, the type of the oscillator for connecting as needed, the letter in step one is produced by a signal generation device
Number or signal combination, and the signal that will produce or signal combination output are to the input interface.
Preferably, the signal generation device realizes that the level produces single by a controllable level generating unit
The type of the oscillator that unit connects as needed produces high level or low level or level combinations, and the high level that will be produced
Or low level or level combinations are exported to the input interface.
Preferably, the signal or signal for judging the input interface by a signal judgment means in step one are combined.
Preferably, the input interface uses universal input/output interface;High level is produced in the level generation device
Part corresponding pin mainly connected by pull-up resistor inside the universal input/output interface formed.
Preferably, the input interface uses universal input/output interface, and low level is produced in the level generating unit
Part mainly formed by the corresponding external pull down resistor of pin of the universal input/output interface.
Combined preferably for unlike signal or signal, the memory cell returns to specific code, each specific generation
The oscillator of code one predefined type of correspondence.
The beneficial effect of above-mentioned technical proposal is:
1)When configuring different oscillators, input interface is set and uses different circuit connecting modes, it is different to obtain
Signal or signal are combined, and are made a distinction for different types of oscillator by hardware;
2)In program operation process, recognized by software code, it is accurate to judge oscillator type used, simply realize
The system of the compatible different oscillator of the common plate of same printed circuit board.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made it is all its
His embodiment, belongs to the scope of protection of the invention.
It should be noted that in the case where not conflicting, the embodiment in the present invention and the feature in embodiment can phases
Mutually combination.
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings, but not as limiting to the invention.
For the self adaptation compatible system of the quartz oscillator of mobile terminal, wherein, including a signal judgment means,
Signal judgment means include an at least input interface, and the type of the oscillator for connecting as needed is input into different to input interface
Signal or signal combination, signal judgment means and call corresponding according to the type of the signal acquisition oscillator of input interface
Control module is processed.Each signal or a kind of signal combination a type of oscillator of correspondence.Also produced including a signal
Generating apparatus, signal generation device includes a controllable level generating unit, the vibration that level generating unit is connected as needed
The type of device produces high level or low level or level combinations, and by the high level or low level or level combinations of generation export to
Input interface.
System also includes a memory cell, and memory cell is stored with and set according to the type of the oscillator for needing self adaptation
Corresponding input interface parameter value.Memory cell preferably uses non-volatile memory cell.
Above-mentioned input interface can use universal input/output interface, and one universal input/output interface correspondence one is drawn
Pin;The pin of correspondence universal input/output interface is single pin multiplexing pins, and pin is operated in into universal input/defeated by setting
Outgoing interface state.Further, universal input/output interface can be set and is operated in input state.
Preferably, the part of high level is produced in level generating unit mainly can be passed through inside universal input/output interface
Pull-up resistor connect corresponding pin and formed.Low level part is produced in level generating unit can mainly pass through general defeated
Enter/the external pull down resistor of the corresponding pin of output interface formed.
A kind of specific embodiment is:When signal judgment means obtain input interface for high level, judgement is connected to the first kind
Type oscillator.When signal judgment means obtain input interface for low level, judgement is connected to Second Type oscillator.
For mobile terminal(Such as mobile phone)The TCXO and DCXO being commonly used, reference picture 1, Fig. 2 select a GPIO
(General Purpose Input Output, universal input/output interface)Pin, such as CPU(Central processing unit)1
GPIO pin value is 40(It is designated as GPIO40), the GPIO40 pins 11 in Fig. 1 and Fig. 2 are in fact that EMRST_N is answered with GPIO functions
, therefore GPIO patterns are set it in software set, and internal pull-up is set to, and it is operated in input shape
State;Pull down resistor is connect outside GPIO40(R)TCXO is configured when 12, GPIO40 is hanging(NF)DCXO is configured when 21;
GPIO40 pins are connected to resistance 12 in Fig. 1, and ground 13 is connected to by resistance 12, so when level determining device reads
When GPIO40 input values, low level will be obtained(0)State.And GPIO40 pins are directly hanging in Fig. 2, now due to defeated
The unified internal pull-up of configuration in incoming interface, so when level determining device reads GPIO40 input values, height will be obtained
Level(1)State.So, when identical hardware elementary diagram is configured using a kind of Fig. 1 quartz oscillators of correspondence(Such as DCXO),
Configured using Fig. 2 correspondence another kind quartz oscillators(Such as TCXO), it is achieved that according to GPIO40 input value decision-making systems
It is connected to different quartz oscillators.
It should be noted that the invention is not limited in the quartz oscillator that the present embodiment is related to, other quartz
Crystal oscillator such as ordinary crystal oscillators(SPXO), temp.-compensation type crystal oscillator(TCXO), voltage type crystal shakes
Swing device(VCXO), thermostatic control formula crystal oscillator(OCXO);And digit compensated crystal developing at present damages oscillator
(DCXO)And microcomputer compensation crystal oscillator(MCXO)Etc. equally applicable.
The GPIO values that above-mentioned hardware is used are to need to be selected according to the specification regulation of hardware elementary diagram and chip handbook.
The number and the practical situations of GPIO of quartz oscillator that thus can be compatible as needed, draw in available GPIO
One or more GPIO pins are selected in pin.Certainly, the selection of universal input/output interface pin value can also be according to actual feelings
Condition is adjusted flexibly.
For the self adaptation compatibility method of the quartz oscillator of mobile terminal, wherein, comprise the following steps:
Step one:After mobile terminal-opening, the configuration first to input interface is initialized;By judging at least one
The signal of input interface or a kind of signal are combined, it is determined that the type of the oscillator of connection;
Step 2:Different control instructions are performed according to the type of oscillator.
Preferably, the ginseng of corresponding input interface according to the type of the oscillator for needing self adaptation and/or number, can be set
The number of numerical value and/or input interface, the parameter value and corresponding oscillator of input interface are stored by a memory cell
Type and/or oscillator number.Memory cell preferably uses non-volatile memory cell.The ginseng of corresponding input interface
The number of the type and/or oscillator of numerical value and corresponding oscillator and/or the number and parameter value of output interface, it is ensured that
Non-volatile preservation saves it in certain position of file system in a device, such as, so regardless of whether power down can ensure
Storage content is preserved and will not lost for a long time.
The type of the oscillator for connecting as needed, can produce the signal or letter in step one by a signal generation device
Number combination, and the signal that will produce or signal combination output are to input interface.
Preferably, signal generation device can be realized by a controllable level generating unit, level generating unit according to
Need connection oscillator type produce high level or low level or level combinations, and will produce high level or low level or
Level combinations are exported to input interface.
Preferably, can judge that the signal or signal of input interface are combined by a signal judgment means in step one.As walked
Judge that input interface is high level or low level or level combinations by a level determining device in rapid one.
Control instruction in step 2 can perform the processing streams such as corresponding algorithm process, parameter configuration, reference settings
Journey, it is ensured that system operation is under complete normal working condition.
The type and/or number of the oscillator of self adaptation as needed of the invention, set the parameter of different input interfaces
The number of value and/or input interface, and the different types of oscillator of setting is connected to input interface with different connected modes,
The function of pin corresponding for input interface sets in program, is then specifically being held by program operation process
Capable judges for the level or current value of input interface, can be determined that input interface is input into using level determining device
The characteristic of level height, obtains the level or level combinations of input interface, and knows what is used by storage unit query
Oscillator type.
Input interface can use universal input/output interface;Produce the part of high level can be with level generating unit
The main pull-up resistor by inside universal input/output interface connects corresponding pin and is formed.Produced in level generating unit
Low level part mainly can be formed by universal input/output interface external pull down resistor of corresponding pin.
A kind of embodiment, the inside of universal input/output interface is connected using pull-up mode, now universal input/output
The corresponding pin of interface is defaulted as high level state;During if necessary to configuration system connection first kind oscillator, universal input/
The outside of output interface connects a pull down resistor, to obtain low level;It is general during if necessary to configuration connection Second Type oscillator
The outside of input/output interface is hanging, to obtain high level.
Another embodiment, the inside of universal input/output interface of the invention can also be connected using pull-down pattern, this
When the corresponding pin of interface be defaulted as low level state, in order to configure different types of oscillator, universal input/output interface
Outside is connected with pulling up mode or hanging mode as needed, to obtain high level or low level.
The above-mentioned method that parameter value is stored by non-volatile memory cells, can also be extended to the instruction of some particular values
Particular oscillator, and other perform the self-identifying for preserving numerical value, can such as be arranged to 0xFFFF corresponding to DCXO, 0x0000
Corresponding to TCXO, and median had so both facilitated debugging as the GPIO values for needing self adaptation, in can avoiding code engineering again
Need grand being controlled and cause the inconvenience of grand differentiation.
I.e. for varying level or level combinations, memory cell returns to specific code, each specific code correspondence one
The oscillator of predefined type.
, it is necessary in the code flow for recognizing TCXO or DCXO such as in above-mentioned specific embodiment, for GPIO40's
Input value is judged, if high level then returns to the code return value of DCXO definition, if low level then returns to TCXO
The code return value of definition, finally, the program circuit of different quartz oscillators is performed according to return value, as different
Algorithm compensation, different calibration parameters, different reference values etc..
Technical scheme is not limited to be applied to mobile terminal, it may also be used for use other of quartz oscillator
In application circuit.
Reference picture 3, Fig. 4, Fig. 5, Fig. 6, Fig. 7, for being provided with application processor(AP, Application Processor)
And/or at least one BBP(modem)System, seem just more important for the compatible scheme of oscillator, should
Oscillator can be all used with processor and BBP(Such as TCXO or DCXO), application processor using oscillator side
Case principle is as BBP, in addition, the oscillator of BBP is all disposed within BBP side, in figure not
Draw.
Reference picture 3, Fig. 4, in using an application processor and a system for BBP:
The first embodiment:BBP carries out the scheme of compatibility as shown in figure 3, now electrical level judging is filled using GPIO
Put in BBP side, when needing to judge TCXO and DCXO, software systems notify level determining device for GPIO
The input value of mouth(0 or 1)Judged, then the corresponding table of respective file system obtain it is specifically used be TCXO or
DCXO, returns to call flow, and system is configured and controlled successively;
The present embodiment can realize that GPIO mouthfuls obtains electricity high by GPIO mouthfuls of outer meeting resistance element or not connecting resistance element
Flat or low level, the resistive element for using can be the resistive element, or SMD resistive element of plug-in type, can be with
Quickly realize that GPIO mouthfuls of level state changes by setting or being not provided with resistive element on existing circuit, it is different to facilitate
Configuration needs.
Second embodiment:Application processor carries out the scheme of compatibility as shown in figure 4, now electrical level judging is filled using GPIO
Put in application processor side, when needing to judge TCXO and DCXO, software systems notify level determining device for GPIO
The input value of mouth(0 or 1)Judged, then the corresponding table of respective file system obtain it is specifically used be TCXO or
DCXO, returns to call flow, and system is configured and controlled successively;
The present embodiment can realize that GPIO mouthfuls obtains electricity high by GPIO mouthfuls of outer meeting resistance element or not connecting resistance element
Flat or low level, the resistive element for using can be the resistive element, or SMD resistive element of plug-in type, can be with
Quickly realize that GPIO mouthfuls of level state changes by setting or being not provided with resistive element on existing circuit, it is different to facilitate
Configuration needs.
Reference picture 5, Fig. 6, Fig. 7, in using an application processor and two systems of BBP, using treatment
Device connects the first BBP;The application processor is also connected with the second BBP,
The third embodiment:First BBP is provided with input interface and level determining device, the second Base-Band Processing
Input interface and level determining device also are provided with device, as shown in figure 5, when needing to judge TCXO and DCXO, software system
System notifies input value of the corresponding BBP for GPIO mouthfuls(0 or 1)Judged, then the correspondence of respective file system
It is TCXO or DCXO that table is obtained specifically used, returns to call flow, and system is configured and controlled successively;
The present embodiment can realize that GPIO mouthfuls obtains electricity high by GPIO mouthfuls of outer meeting resistance element or not connecting resistance element
Flat or low level, the resistive element for using can be the resistive element, or SMD resistive element of plug-in type, can be with
Quickly realize that GPIO mouthfuls of level state changes by setting or being not provided with resistive element on existing circuit, it is different to facilitate
Configuration needs.
4th kind of embodiment:Application processor is provided with two input interfaces, and each input interface connects an electrical level judging
Device, each input interface one judgement of the oscillator of BBP of correspondence, as shown in fig. 6, at this point for different bases
The judgement of the oscillator of provided with processor all at different GPIO mouths of application processor, when needing judgement certain BBP
When TCXO and DCXO, software systems notify that BBP needs to enter matching somebody with somebody for line oscillator for a certain BBP
Put, then BBP can call corresponding flow to the input value of specific GPIO(0 or 1)Judged, then respective file
It is TCXO or DCXO that the corresponding table of system is obtained specifically used, returns to call flow, and system is configured and controlled successively
System;
The present embodiment can realize that GPIO mouthfuls obtains electricity high by GPIO mouthfuls of outer meeting resistance element or not connecting resistance element
Flat or low level, the resistive element for using can be the resistive element, or SMD resistive element of plug-in type, can be with
Quickly realize that GPIO mouthfuls of level state changes by setting or being not provided with resistive element on existing circuit, it is different to facilitate
Configuration needs.
5th kind of embodiment:One input at least one of the first BBP and the second BBP connects
Compatible parties case is carried out on mouthful, compatible parties case is carried out on another input interface on application processor, as shown in fig. 7, now
If software systems need to obtain the oscillator configuration of the first BBP, it is notified that the level of the first BBP is sentenced
Disconnected device calls corresponding flow to judge the GPIO input values of the first BBP(0 or 1), then respective file system is right
It is TCXO or DCXO to answer table to obtain specifically used, returns to call flow, and system is configured;If systems soft ware needs
The oscillator configuration of the second BBP is obtained, is then notified that application processor calls corresponding flow to judge application processor
The GPIO input values of side(0 or 1), that then the corresponding table acquisition of respective file system is specifically used is TCXO or DCXO, is returned
Back to call flow, configured and controlled;
The present embodiment can realize that GPIO mouthfuls obtains electricity high by GPIO mouthfuls of outer meeting resistance element or not connecting resistance element
Flat or low level, the resistive element for using can be the resistive element, or SMD resistive element of plug-in type, can be with
Quickly realize that GPIO mouthfuls of level state changes by setting or being not provided with resistive element on existing circuit, it is different to facilitate
Configuration needs.
Above-mentioned method can extend to the combination of multiple application processors and/or multiple BBPs, as long as there is foot
It is enough available GPIO mouthfuls, you can flexibly to realize the judgement of oscillator.
Preferred embodiments of the present invention are the foregoing is only, embodiments of the present invention and protection model is not thereby limited
Enclose, to those skilled in the art, should can appreciate that done by all utilization description of the invention and diagramatic content
Scheme obtained by equivalent and obvious change, should be included in protection scope of the present invention.