A kind of intervalometer, baseband chip and its sleep state changing method
Technical field
The present invention relates to multi-mode communication technical field, particularly to a kind of intervalometer, baseband chip and its sleep
Dormancy state switching method.
Background technology
In 4G mobile communication system, there are multiple wireless-access mode and deposit, such as GSM (move by the whole world
Dynamic communication system), TD-SCDMA (TD SDMA), (wideband code division is many for WCDMA
Location) and LTE (evolution when long) etc..Each pattern all has a set of distinctive time set, is designated as RAT-Timer
(Radio Access Technology Timer, wireless access technology timer).In view of mobile terminal
Power saving need, the RAT-Timer of a pattern need to switch within this access module idle time period
To low power consumpting state (sleep pattern), also can be switched to mode of operation from sleep pattern and (normally count shape
State).
For in multi-mode communication system, having multiple access modules and depositing, one under each pattern, is generally had to determine
When device providing required timing information.Communication terminal can be when system be idle, many times as far as possible
The fast clock (for the slow clock of RTC (real-time clock)) of closing system and most of mould
The power supply of block, system is entered low power consumpting state, to increase the cruising time of battery.Generally in intervalometer
Middle increase sleep function, that is, intervalometer can be switched to low power consumpting state.As shown in figure 1, timer
Including three functional modules:Clock module, time block and CPU (CPU).Below with
The operation principle of intervalometer is introduced as a example LTE pattern.Due to the requirement of LTE pattern timing, need
The clock accuracy of low 30.72MHz, this clock signal is generated by time block.When system includes two
Zhong Yuan:32K(RTC:Real Time Clock) slow clock and fast clock (as 26MHz).LTE is fixed
When module can be supplied to the following information of CPU:The timing information of LTE pattern needs, the state of intervalometer,
And Interruption;CPU can also configure the parameter of LTE intervalometer.
Introduce the time block of LTE below.It is mainly by enumerator (not shown) in time block
Composition, and by corresponding comparator (not shown) and latch (not shown) to produce Interruption and
Timing information is provided.The working condition of enumerator is divided into normal count status (using 30.72M clock meter
Number), (speed clock is all working, and is for sleep state (using 32K clock count) and switching state
One transitive state).When enumerator in working order when, the input of a fast clock, enumerator adds 1,
When working in a sleep mode, enumerator can be counted using 32K clock source, and enumerator can be according to RTC
The frequency proportions of clock and 30.72M clock are increasing count value.In order to reduce system cost, generally adopt
RTC with the DCXO (Digital Control Oscillator, numerical digit controls oscillator) without calibration
Clock source, the precision of RTC is relatively low, and is influenced by temperature larger.In order to ensure determining of wireless system
When precision requirement, even if it is also desirable to intervalometer can provide relatively when using slow clock timing
High timing accuracy.For solving this problem, adopt the slow clock of fast clock alignment generally inside time block
Alignment unit, to improve timing accuracy during slow clock count.In the presence of fast clock, time block
Measure slow clock using fast clock, that is, with fast clock, slow clock is calibrated.The process of calibration
It is automatically performed by hardware module, the result of calibration represents a RTC clock duration and is equal to how many fast clocks
Duration, comprise fractional part in this result.The carry of fractional part can adopt certain method, than
As the fractional part reprocessing using the end product after adding up, can give up according to rounding up or directly
Method, so, just can by count precision controlling in certain scope, certainly still have meter here
Calculate the loss of precision.
Baseband chip can be according to the state (whether entering sleep state) of each mode timers, each CPU
Whether enter sleep pattern, and other module (as DMA (Direct Memory Access, directly
Connect internal storage access), HWA (Hardware Accelerator, hardware accelerator) etc.) whether enter sky
Not busy state, to judge baseband chip and other modules (as power module, radio-frequency module, audio-frequency module etc.),
Whether enter low power consumpting state (being designated as deep sleep).Under deep sleep, whole system is closed defeated
Enter fast clock, and will be with electricity under fast clock related function module, to reach the purpose of deep power-saving.
As described above, in the essential condition of baseband chip sound sleep, having whether each mode timers enters
Sleep state, that is, judge whether intervalometer is counted using RTC clock.A kind of access module is one
When there is no task in section of fixing time, such as holding state, need CPU to configure intervalometer, to be switched to
Sleep pattern, until contemplating that the moment point of task, intervalometer automatically switches to work after counting expires
State.Intervalometer in a sleep mode, is counted although when slow clock is to have passed through fast using RTC clock
Clock calibration, but there are two problems here, influence whether the timing accuracy of intervalometer under sleep state.
One is to calibrate slow enumerator due to fast enumerator to have certain calibration accuracy, the reality of general calibration circuit
It is now to use fixed-point computation, certainly exist the loss of significance of certain calculating.In addition, intervalometer is in calibration
During and sleep procedure in the clock of RTC can change, this change is especially sensitive to temperature change.
To ensure high RTC precision, it is necessary for there is higher requirement at two aspects, one is to improve RTC
Calibration circuit counting precision, so can increase hard-wired complexity;In addition, improving the frequency of calibration,
Especially when temperature change is very fast, increase the frequency of RTC calibration, this way can be to temperature
Detection, software controlling strategies, and the power consumption of baseband chip have and compare large effect.
It is analyzed below for above-mentioned Second Problem.Due to the impact to RTC clock for the temperature
Greatly, therefore to reach preferable RTC calibration effect, increase temperature sensing circuit in usual board, in real time
Detection board (especially around RTC) temperature change, when rate of temperature change reach certain thresholding when
Wait, just start RTC calibration.So certainly will need additionally to increase temperature correction circuit, and detection temperature
The power consumption brought.Further, since the strategy of RTC calibration is relative complex, the working condition with terminal, association
The flow process of view stack software, and the physical characteristics of terminal are related, especially in multi-mode and multi-standby (standby) be
In system, this calibration will be more complicated.Rely solely on software to start calibration circuit to eliminate the shakiness of RTC
Qualitative, it is extremely difficult in actual application.Again, RTC calibration module is when work
Need fast clock, when system reaches sleep condition, system originally can enter deep sleep modes, but
Because calibration circuit is in work, whole system is led to cannot be introduced into sound sleep.RTC calibration module primary calibration
Duration about in hundred ms (millisecond) magnitude, so the consumption to the power of system is to have a great impact.
If this calibration circuit (non-deep sleep) during system worked well, then extra power consumption is exactly school
The expense of quasi- circuit, then substantially can ignore.If but in system sound sleep process alignment, or being
The other conditions of system sound sleep all meet, and only calibration circuit work leads to the system cannot sound sleep, then will
Increase extra power consumption, such as, when system standby, in most cases system enters the work(of sound sleep
Consumption about in 5~8mw about () taking current LTE multimode smart mobile phone as a example, if system cannot be deep
Sleep, then lowest power consumption is also in more than 60mw.The work frequency of calibration circuit and software calibration strategy have
Close, also and network environment, and system-operating environment is related simultaneously.After calibration to be made clock reach higher
Timing accuracy need exist for relatively more frequently starting calibration circuit, then the power consumption pair additionally introducing
The stand-by power consumption impact of system is also larger, according to the result of actual test, under certain network environment,
Can increase by 2~5% about stand-by power consumption.
When having an access module in system in working order, its corresponding intervalometer is to be operated in normal meter
Number state, then even if the intervalometer of other patterns is switched to sleep state, whole system still can not be entered
Enter deep sleep.Now fast clock is that exist, and is synchronous with network, and its precision is guaranteed.
Using unregulated RTC clock timing accuracy maximum deviation substantially in +/- 20ppm (parts per
Million, 1/1000000th), the accuracy of timekeeping of the intervalometer after too fast clock alignment is in 1~4ppm
About (1/1000000th), and fast clock is used as the clock source of intervalometer, precision generally can reach
To 0.1ppm.The intervalometer of non-operating mode is switched to sleep pattern, slow clock is used as counting clock
Source, then its time precision just to be determined by the RTC clock precision after calibrating, and fast clock count phase
Than, then certainly exist the loss of the accuracy of timekeeping of analysis in foregoing description.
Content of the invention
Present invention solves the problem in that providing a kind of intervalometer, baseband chip and its sleep state switching side
Method, can improve the precision of the Timing Synchronization of multimode system non-traffic pattern;RTC school can effectively be reduced
Accurate frequency, thus allowing, system is as much as possible to be entered under deep sleep, reduces system standby power consumption;Can
To reduce the software implementation complexity of multimode system RTC clock calibration function;Can also be in Timing Synchronization essence
In the range of degree requires, select more inexpensive RTC clock source, thus reducing the hardware cost of system.
For solving above-mentioned technical problem, embodiments of the present invention provide a kind of baseband chip, are applied to
Multi-mode communication system, comprises:Sleep control module, central processing unit CPU and the timing mould of each pattern
Block;
Described CPU, for detect described time block meet state of deactivating condition when by institute
State time block and be configured to pre-switch state;Wherein, described time block adopts soon under pre-switch state
Clock is counted;
Described sleep control module, for the non-timed module in described each pattern be in sleep state or
During idle condition, produce described Sleep Request signal, and export to the time block of each pattern;Wherein,
Described non-timed module comprises all modules in addition to time block;
Described time block, for switching to when receiving described Sleep Request signal under pre-switch state
Sleep state;
Described sleep control module will be described many when the time block of all patterns all enters sleep state
Mould communication system switches to deep sleep state.
Embodiments of the present invention additionally provide a kind of sleep state changing method of baseband chip, are applied to
Multi-mode communication system, described baseband chip comprises:Sleep control module, central processing unit CPU with each
The time block of pattern;
The sleep state changing method of described baseband chip comprises the steps of:
Described CPU detect described time block meet state of deactivating condition when will be described fixed
When module be configured to pre-switch state;Wherein, described time block adopts fast clock under pre-switch state
Counted;
Described sleep control module is in sleep state or free time in the non-timed module of described each pattern
During state, produce described Sleep Request signal, and export to the time block of each pattern;Wherein, described
Non-timed module comprises all modules in addition to time block;
Described time block switches to sleep when receiving described Sleep Request signal under pre-switch state
State;
Described sleep control module will be described many when the time block of all patterns all enters sleep state
Mould communication system switches to deep sleep state.
Embodiments of the present invention additionally provide a kind of intervalometer, are applied to multi-mode communication system, described fixed
When device meet deactivate state condition when enter pre-switch state, and under pre-switch state receive
Sleep state is switched to during to Sleep Request signal;Wherein, described intervalometer is under described pre-switch state
Counted using fast clock.
Embodiment of the present invention in terms of existing technologies, CPU detect time block meet exit
During the condition of working condition, time block is configured to pre-switch state, and time block is in pre-switch state
Lower counted using fast clock, so, it is ensured that as much as possible using fast clock count, Jin Erbao
Demonstrate,prove the precision of timing, also do not increase extra power consumption simultaneously;And, in the time block of each pattern
After state of deactivating and before multi-mode communication system enters deep sleep state, carried out using fast clock
Count, can effectively reduce the frequency of RTC calibration, thus allowing, system is as much as possible to be in deep sleep
Under, reduce system standby power consumption;Sleep control module only each pattern non-timed module all in
When sleep state or idle condition, when that is, system does not need to be run at working condition, just producing sleep please
Seek signal, and sleep state is all entered by the time block that Sleep Request signal controls all patterns, enter
And promote multi-mode communication system to enter deep sleep state, system power dissipation is at utmost reduced;Additionally, by
Fast in as long-time as possible (including in a period of pre-switch state to the switching state) use of time block
Clock count, that is, adopt slow clock (real-time clock) to count as far as possible in short time, then it is being
It is possible to reduce the requirement of slow clock source in the case that system timing demands are constant and low using complexity
Calibration software algorithm, you can realized complicated with the software reducing multimode system RTC clock calibration function
Degree, and in the range of Timing Synchronization required precision, select more inexpensive RTC clock source, thus
The hardware cost of reduction system.
In addition, described sleep control module is the logic circuit comprising with door;The non-timed mould of all patterns
The idle signal of block by described with Men Xiangyu after produce described Sleep Request signal.By realizing with door
Logic circuit can ensure that just to produce only when the non-timed module of all patterns all enters idle condition sleeps
Dormancy request signal.
In addition, described sleep control module also comprises output port;Described output port and described logic electricity
Road is connected;Described output port, for exporting described Sleep Request signal to the time block of each pattern.
Set up one for sleep control module for exporting the output port of Sleep Request signal it is ensured that originally sending out
The feasibility of bright embodiment.
Brief description
Fig. 1 is the structural representation according to intervalometer of the prior art;
Fig. 2 is the theory diagram according to the baseband chip in first embodiment of the invention;
Fig. 3 is the state switching schematic diagram of the time block according to first embodiment of the invention;
Fig. 4 is that the state according to intervalometer of the prior art switches schematic diagram;
Fig. 5 is the logic circuit schematic diagram according to the sleep control module in first embodiment of the invention;
Fig. 6 is the logic circuit schematic diagram according to the CPU in first embodiment of the invention;
Fig. 7 is the sleep state changing method flow process of the baseband chip according to third embodiment of the invention
Figure.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to this
Bright each embodiment is explained in detail.However, it will be understood by those skilled in the art that
In each embodiment of the present invention, in order that reader more fully understand the application and propose many technology thin
Section.But, even if there is no these ins and outs and the many variations based on following embodiment and modification,
The each claim of the application technical scheme required for protection can also be realized.
The first embodiment of the present invention is related to a kind of baseband chip, is applied to multi-mode communication system, specifically
As shown in Fig. 2 comprising:Sleep control module, the CPU (CPU) of each pattern and each mould
The time block of formula.
The CPU of each pattern detect corresponding time block meet state of deactivating condition when will
Time block is first configured to pre-switch state, specifically as shown in figure 3, time block is under pre-switch state
Sleep state is switched to through switching state again when receiving Sleep Request signal;Wherein, time block is pre-
Counted using fast clock under switching state;301 are switched to pre-switch state for normal count status,
302 switch to switching state for pre-switch state, and 303 switch to sleep state for switching state, and 304 are
When waking up intervalometer, intervalometer switches to switching state by sleep state, and 305 is to be switched to by switching state
Normal count status.
With prior art (as shown in figure 4, time block is when deactivating state, directly through switching shape
State switches to sleep state;Wherein, 401 is that time block first switches to switching shape by normal count status
State, 303 is to switch to sleep state by switching state) compare it is ensured that as much as possible using fast when
Clock counts, and also ensures that the precision of the timing of communication pattern using this intervalometer, does not also increase simultaneously
Plus extra power consumption.And, deactivate shape in the time block of the communication pattern using this time block
After state and before multi-mode communication system enters deep sleep state, counted only with fast clock, can
With effective frequency reducing RTC calibration, thus allowing, system is as much as possible to be under deep sleep, reduce
System standby power consumption.
Specifically, the time block of each pattern all comprises a depositor;The CPU of each pattern is detecting
When corresponding time block meets the condition of state of deactivating, corresponding time block is joined by trigger register
It is set to pre-switch state.Wherein, register memory contains the configuration information of time block pre-switch state.
Sleep control module, when the non-timed module of each pattern is in sleep state or idle condition, is produced
Raw Sleep Request signal, and export to the time block of each pattern;Wherein, non-timed module comprises except fixed
When module beyond all modules, such as, CPU, DMA and HWA etc..
Specifically, sleep control module is the logic circuit comprising with door, and sleep control module also increases
If output port, this output port is connected with logic circuit.Only comprised with non-timed module below
It is illustrated as a example CPU, DMA and HWA.Concrete as shown in figure 5, in present embodiment
Logic circuit comprise 6 with door 501~506.
Wherein, it is used for inputting the status signal of each pattern timing module, timing mould with the input of door 501
The status signal of block comprises sleep state and non-sleep state, and wherein, sleep state can be defined as state
1, non-sleep state can be defined as state 0, through with behind the door, the time block of only all patterns
When state is all sleep state, with door 501 ability output state 1, that is, represent the time block of all patterns
All enter sleep state.
It is used for inputting the status signal of the CPU of each pattern, the state letter of CPU with the input of door 502
Number comprise idle condition and busy state, wherein, idle condition can be defined as state 1, busy
State can be defined as state 0, through with behind the door, the state of the CPU of only all patterns is all idle
During state, and door 502 ability output state 1, that is, the CPU representing all patterns all enters idle condition.
Such as, the multi-mode communication system in present embodiment comprises 3 kinds of communication patterns, then in present embodiment
With door 502 as shown in fig. 6, comprising 3 inputs, each input inputs a kind of CPU of communication pattern
Status signal, wherein, the idle condition corresponding statess 1 of CPU, busy state corresponding statess 0, only
Have with during door 601~603 equal output state 1 with door 502 ability output state 1.Sum it up, only working as
When the CPU of all patterns is in idle condition, with door 502 ability output state 1.
In the same manner, it is used for inputting the status signal of the DMA of each pattern with the input of door 503, DMA's
Status signal comprises idle condition and busy state, and wherein, idle condition can be defined as state 1,
Busy state can be defined as state 0, through with behind the door, the state of the DMA of only all patterns
When being all idle condition, and door 503 ability output state 1, that is, the DMA representing all patterns all enters
Idle condition.
In the same manner, it is used for inputting the status signal of the HWA of each pattern with the input of door 504, HWA's
Status signal comprises idle condition and busy state, and wherein, idle condition can be defined as state 1,
Busy state can be defined as state 0, through with behind the door, the state of the HWA of only all patterns
When being all idle condition, and door 504 ability output state 1, that is, the HWA representing all patterns all enters
Idle condition.
As shown in Figure 5, only it is connected with the input of door 506 with the outfan of door 502~504, and
When being only state 1 with the output of the outfan of door 502~504, and door 506 ability output state 1, its
In, represent Sleep Request signal with the state 1 of door 506 output, that is, with door 506 only in non-timed mould
Block all enters and just exports Sleep Request signal when sleep state or idle condition, it is, all patterns
Non-timed module idle signal by with door 506 and rear generation Sleep Request signal.
In sleep control module, newly-increased output port exports above-mentioned Sleep Request signal determining to each pattern
When module.The time block of each pattern receives during Sleep Request signal from pre-switch under pre-switch state
State switches to sleep state through switching state.
Return Fig. 5, as shown in Figure 5, with the outfan of door 501~504 all with the input with door 505
End connects, only with the outfan of door 501~504 during equal output state 1, with door 505 ability output state
1, wherein, represent, with the state 1 of door 505 output, the system sleep that system can be made to enter deep sleep state
Enable signal that is, the time block of only each pattern all enters sleep state, and non-timed module
Also all enter idle condition, sleep with door 505 ability generation system and enable signal that is to say, that base band core
The sleep control module of piece when the time block of all patterns all enters sleep state ability by multi-mode communication system
System switches to deep sleep state.
It should be noted that can only comprise a CPU in baseband chip, for controlling multiple patterns
Time block or multiple CPU to control each time block respectively, in the enforcement of the present invention
It is not limited in mode.
Compared with prior art, CPU detect time block meet deactivate state condition when will
Time block is configured to pre-switch state, and time block is counted using fast clock under pre-switch state
Number, so, it is ensured that as much as possible using fast clock count, and then ensure that the precision of timing, with
When do not increase extra power consumption yet;And, after the time block of each pattern deactivates state and
Before multi-mode communication system enters deep sleep state, counted using fast clock, can effectively be reduced
The frequency of RTC calibration, thus allowing, system is as much as possible to be under deep sleep, reduces system standby work(
Consumption;Sleep control module only each pattern non-timed module all in sleep state or idle shape
During state, when that is, system does not need to be run at working condition, just produce Sleep Request signal, and by sleep
Request signal controls the time block of all patterns all to enter sleep state, and then promotes multi-mode communication system
Enter deep sleep state, system power dissipation is at utmost reduced;Further, since time block is as long as possible
Time (including in a period of pre-switch state to switching state) uses fast clock count, that is, to the greatest extent
Slow clock (real-time clock) may be adopted in short time to count, then in the feelings that system timing requirements are constant
It is possible to reduce the requirement of slow clock source under condition, and adopt the low calibration software algorithm of complexity, that is,
The software implementation complexity of multimode system RTC clock calibration function can be reduced, and in Timing Synchronization precision
In the range of requirement, select more inexpensive RTC clock source, thus reducing the hardware cost of system.
Second embodiment of the present invention is related to a kind of intervalometer, is applied to multi-mode communication system, this timing
Device satisfaction deactivate state (normal count status) condition when enter pre-switch state, and pre-
Receive under switching state and during Sleep Request signal, switch to sleep state again;Wherein, intervalometer is in pre-cut
Change and counted using fast clock under state.
Compared with prior art it is ensured that as much as possible using fast clock count, also ensuring that employing
The precision of the timing of the communication pattern of this intervalometer, does not increase extra power consumption simultaneously yet.And,
Deactivate after state using the time block of the communication pattern of this intervalometer and enter in multi-mode communication system
Before entering deep sleep state, counted only with fast clock, can effectively be reduced the frequency of RTC calibration,
Thus allowing, system is as much as possible to be under deep sleep, reduce system standby power consumption.
It should be noted that the configuration of intervalometer and at present existing device is compatible, modification that need not be extra,
Just can effectively lift the performance of Timing Synchronization.
Third embodiment of the invention is related to a kind of sleep state changing method of baseband chip, as Fig. 7 institute
Show, comprise the steps of:
Step 701, CPU detects whether time block meets the condition of the state of deactivating.If so, then
Execution step 702, otherwise, continues executing with step 701.
Step 702, time block is configured to pre-switch state by CPU.Wherein, time block is in pre-cut
Change and counted using fast clock under state.Specifically, CPU detect time block meet exit
Time block is configured to pre-switch state by the depositor in triggering time block during the condition of working condition.
Wherein, register memory contains the configuration information of time block pre-switch state.
Step 703, sleep control module is in sleep state or free time in the non-timed module of each pattern
During state, produce Sleep Request signal, and export to the time block of each pattern;Wherein, non-timed mould
Block comprises all modules in addition to time block.In this step, the free time of the non-timed module of pattern
Signal is by producing Sleep Request signal with after Men Xiangyu in sleep control module.
Step 704, time block switches to sleep when receiving Sleep Request signal under pre-switch state
State.In this step, Sleep Request signal is exported to each mould by the output port of sleep control module
The time block of formula.
Step 705, sleep control module will be many when the time block of all patterns all enters sleep state
Mould communication system switches to deep sleep state.
The step of various methods divides above, is intended merely to describe clear, can merge into one when realizing
Step or some steps are split, is decomposed into multiple steps, as long as comprising identical logical relation,
All in the protection domain of this patent;Inessential change or draw to adding in algorithm or in flow process
Enter inessential design, but do not change the core design of its algorithm and flow process all in the protection model of this patent
In enclosing.
It is seen that, present embodiment is the embodiment of the method corresponding with first embodiment, this enforcement
Mode can be worked in coordination enforcement with first embodiment.The relevant technical details mentioned in first embodiment
Still effective in the present embodiment, in order to reduce repetition, repeat no more here.Correspondingly, this enforcement
The relevant technical details mentioned in mode are also applicable in first embodiment.
It will be understood by those skilled in the art that the respective embodiments described above are realize the present invention concrete
Embodiment, and in actual applications, can to it, various changes can be made in the form and details, and not inclined
From the spirit and scope of the present invention.