Clock signal generating circuit and electronic equipment

文档序号:1569605 发布日期:2020-01-24 浏览:21次 中文

阅读说明:本技术 一种时钟信号生成电路及电子设备 (Clock signal generating circuit and electronic equipment ) 是由 杨家奇 黄正乙 于 2018-07-17 设计创作,主要内容包括:一种时钟信号生成电路及电子设备,所述电路包括:ROSC模块,适于产生时钟信号;参考时钟模块连接ROSC模块,适于提供参考时钟信号;温度传感器连接ROSC模块,适于感测温度;电压传感器连接ROSC模块,适于感测电压;存储模块连接温度传感器、电压传感器和ROSC模块,适于存储基础校正表,表中记录有针对温度和电压的微调数据;ROSC模块初始化时,利用参考时钟信号校正时钟信号的频率;否则,ROSC模块根据温度和电压搜索匹配的微调数据校正时钟信号的频率,当搜索时间超过预设阈值时,利用参考时钟信号校正时钟信号的频率,本发明方案提供了一种价格较低的基于环形振荡器的高精度时钟信号生成电路。(A clock signal generation circuit and an electronic device, the circuit comprising: a ROSC module adapted to generate a clock signal; the reference clock module is connected with the ROSC module and is suitable for providing a reference clock signal; the temperature sensor is connected with the ROSC module and is suitable for sensing temperature; the voltage sensor is connected with the ROSC module and is suitable for sensing voltage; the storage module is connected with the temperature sensor, the voltage sensor and the ROSC module and is suitable for storing a basic correction table, and fine tuning data aiming at temperature and voltage are recorded in the table; when the ROSC module is initialized, correcting the frequency of a clock signal by using a reference clock signal; otherwise, the ROSC module searches the matched fine tuning data according to the temperature and the voltage to correct the frequency of the clock signal, and when the search time exceeds a preset threshold value, the frequency of the clock signal is corrected by using the reference clock signal.)

1. A clock signal generation circuit, comprising:

a ROSC module adapted to generate a clock signal;

a reference clock module connected to the ROSC module, the reference clock module adapted to provide a reference clock signal;

the temperature sensor is connected with the ROSC module and is suitable for sensing the working temperature of the ROSC module;

the voltage sensor is connected with the ROSC module and is suitable for sensing the working voltage of the ROSC module;

the storage module is connected with the temperature sensor, the voltage sensor and the ROSC module and is suitable for storing a basic correction table, and fine tuning data aiming at the working temperature and the working voltage are recorded in the basic correction table;

when the ROSC module is initialized, the ROSC module corrects the frequency of the clock signal by using the reference clock signal; otherwise, the ROSC module searches the matched fine tuning data in the basic correction table according to the working temperature and the working voltage, corrects the frequency of the clock signal based on the searched fine tuning data, and corrects the frequency of the clock signal by using the reference clock signal when the searching time exceeds a preset threshold value.

2. The clock signal generation circuit of claim 1, wherein the ROSC module updates the basic correction table according to the reference clock signal, the operating temperature, and the operating voltage after correcting the frequency of the clock signal using the reference clock signal when the search time exceeds a preset threshold.

3. The clock signal generation circuit of claim 1, wherein the fine tuning data recorded in the basic correction table is further directed to process errors, and when the ROSC module completes initialization, the matching fine tuning data is searched for in the basic correction table according to the operating temperature, the operating voltage, and the process errors.

4. The clock signal generation circuit of claim 3, wherein a bit width of the trim data for process errors recorded by the base correction table is adapted to a lowest clock precision of the ROSC module.

5. The clock signal generation circuit of claim 1, wherein the ROSC module includes a counter, wherein the clock signal is generated based on a count result of the counter, and wherein the base correction table further stores overflow information of the count result.

6. The clock signal generation circuit according to claim 1, wherein timing information for searching for the fine adjustment data is further stored in the basic correction table.

7. The clock signal generation circuit of claim 1, wherein the storage module further stores:

a fine adjustment correction table adapted to record fine adjustment data of an error caused by a temperature change;

the ROSC module searches the base correction table and the fine tuning correction table for matching fine tuning data together.

8. The clock signal generation circuit according to any one of claims 1 to 7, wherein the storage module is a nonvolatile memory.

9. The clock signal generation circuit of any one of claims 1 to 7, wherein the reference clock module is a Bluetooth module.

10. An electronic device characterized by comprising the clock signal generation circuit of any one of claims 1 to 9.

Technical Field

The present invention relates to the field of electronic circuit technologies, and in particular, to a clock signal generation circuit and an electronic device.

Background

In a conventional scheme, a Clock signal may be generated by a Real Time Clock (RTC) chip. The RTC chip includes a crystal oscillator (crystal), and the high price of the crystal oscillator causes the high cost of the RTC chip, which is a constant price.

A Ring oscillator (Ring oscillator, abbreviated as ROSC) can also generate a clock signal, but the ROSC has disadvantages that its oscillation frequency varies with external factors, frequency accuracy is low, and frequency is unstable. The existing ROSC optimization scheme mainly adopts a Process Voltage Temperature (PVT) sensor to correct the frequency of a clock signal of the ROSC, but the PVT sensor is difficult to provide a high-precision frequency in combination with the ROSC, and the clock precision cannot reach 1part per million (1 ppm for short). Therefore, in the circuit design of the existing electronic device, once a high-precision clock signal is required, a relatively expensive RTC crystal oscillator is still adopted.

At present, a clock signal generating circuit which meets the precision requirement and is low in cost is lacked.

Disclosure of Invention

The invention aims to provide a clock signal generating circuit which meets the precision requirement and has lower cost.

To solve the above technical problem, an embodiment of the present invention provides a clock signal generation circuit, including: a ROSC module adapted to generate a clock signal; a reference clock module connected to the ROSC module, the reference clock module adapted to provide a reference clock signal; the temperature sensor is connected with the ROSC module and is suitable for sensing the working temperature of the ROSC module; the voltage sensor is connected with the ROSC module and is suitable for sensing the working voltage of the ROSC module; the storage module is connected with the temperature sensor, the voltage sensor and the ROSC module and is suitable for storing a basic correction table, and fine tuning data aiming at the working temperature and the working voltage are recorded in the basic correction table; when the ROSC module is initialized, the ROSC module corrects the frequency of the clock signal by using the reference clock signal; otherwise, the ROSC module searches the matched fine tuning data in the basic correction table according to the working temperature and the working voltage, corrects the frequency of the clock signal based on the searched fine tuning data, and corrects the frequency of the clock signal by using the reference clock signal when the searching time exceeds a preset threshold value.

Optionally, when the search time exceeds a preset threshold, after the ROSC module corrects the frequency of the clock signal by using the reference clock signal, the basic correction table is updated according to the reference clock signal, the operating temperature, and the operating voltage.

Optionally, the fine tuning data recorded in the basic correction table further refers to a process error, and when the ROSC module completes initialization, the matched fine tuning data is searched for in the basic correction table according to the working temperature, the working voltage, and the process error.

Optionally, the bit width of the fine tuning data for the process error recorded by the basic correction table is adapted to the lowest clock precision of the ROSC module.

Optionally, the ROSC module includes a counter, the clock signal is generated according to a counting result of the counter, and the basic correction table further stores overflow information of the counting result.

Optionally, the basic correction table further stores timing information for searching the fine tuning data.

Optionally, the storage module further stores: a fine adjustment correction table adapted to record fine adjustment data of an error caused by a temperature change; the ROSC module searches the base correction table and the fine tuning correction table for matching fine tuning data together.

Optionally, the storage module is a nonvolatile memory.

Optionally, the reference clock module is a bluetooth module.

In order to solve the above technical problem, an embodiment of the present invention further provides an electronic device, including the clock signal generating circuit.

Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:

an embodiment of the present invention provides a clock signal generation circuit, where the clock signal generation circuit includes: a ROSC module adapted to generate a clock signal; a reference clock module connected to the ROSC module, the reference clock module adapted to provide a reference clock signal; the temperature sensor is connected with the ROSC module and is suitable for sensing the working temperature of the ROSC module; the voltage sensor is connected with the ROSC module and is suitable for sensing the working voltage of the ROSC module; the storage module is connected with the temperature sensor, the voltage sensor and the ROSC module and is suitable for storing a basic correction table, and fine tuning data aiming at the working temperature and the working voltage are recorded in the basic correction table; when the ROSC module is initialized, the ROSC module corrects the frequency of the clock signal by using the reference clock signal; otherwise, the ROSC module searches the matched fine tuning data in the basic correction table according to the working temperature and the working voltage, corrects the frequency of the clock signal based on the searched fine tuning data, and corrects the frequency of the clock signal by using the reference clock signal when the searching time exceeds a preset threshold value.

According to the technical scheme provided by the embodiment of the invention, the clock precision of the clock signal of the clock generation circuit can be ensured in the initialization process of the reference clock module providing the reference clock signal, the correction is carried out by searching the matched fine tuning data in the basic correction table, and once the search time exceeds the preset threshold value, the frequency of the clock signal is corrected by using the reference clock signal. Compared with the mode of completely using PVT sensor correction, the clock precision of the clock signal generated by the ROSC module can be improved by timely correcting the reference clock signal in the running process of the circuit, and compared with the mode of using the RTC crystal oscillator to generate the clock signal, the clock precision requirement can be met, and the circuit cost can be reduced.

Further, when the search time exceeds a preset threshold, the ROSC module updates the basic correction table according to the reference clock signal, the operating temperature, and the operating voltage after correcting the frequency of the clock signal by using the reference clock signal. Through the technical scheme provided by the embodiment of the invention, the basic correction table can be updated, and the clock precision of the clock signal generated by ROSC is gradually increased along with the time by the self-updating mode of the basic correction table.

Further, the fine tuning data recorded in the basic correction table also aims at process errors, and when the ROSC module completes initialization, matched fine tuning data are searched in the basic correction table according to the working temperature, the working voltage and the process errors. Through the fine adjustment data aiming at the process error, the frequency deviation of the ROSC module caused by the process error can be eliminated.

Further, the storage module further stores: a fine adjustment correction table adapted to record fine adjustment data of an error caused by a temperature change; the ROSC module searches the base correction table and the fine tuning correction table for matching fine tuning data together. The frequency deviation caused by the ROSC module due to temperature change can be eliminated through the fine adjustment correction table, and the frequency of the clock signal is corrected.

Drawings

Fig. 1 is a schematic block diagram of a clock signal generation circuit according to an embodiment of the present invention;

FIG. 2 is a graph illustrating the frequency versus temperature of a clock signal output by an exemplary ROSC module;

FIG. 3 is a schematic diagram of frequency deviation of the clock signal generating circuit shown in FIG. 1 caused by temperature variation at different times;

FIG. 4 is a schematic flow chart of data update in a base correction table stored by the clock signal generation circuit of FIG. 1;

FIG. 5 is a schematic flow chart diagram illustrating one exemplary implementation of step S4052 of FIG. 4;

fig. 6 is a block diagram showing an exemplary configuration of a clock signal generation circuit of the clock signal generation circuit shown in fig. 1.

Detailed Description

As background art, the conventional clock signal generating circuit can use an RTC crystal oscillator to generate a clock signal, but the price is high; a Ring Oscillator (ROSC) may be used in combination with a Process, Voltage, and Temperature (PVT) sensor to generate a clock signal, but the clock accuracy of the sensor is difficult to reach 5ppm, and the requirement of some specific electronic devices on the high accuracy of the clock signal cannot be met.

The inventor of the application finds that the ring oscillator is particularly suitable for being applied to various electronic devices due to simple structure, low price and low power consumption. However, since the ring oscillator is not controlled by feedback, the frequency of the output clock signal is easily affected by the process, the operating temperature, the power supply voltage, and other factors, and thus, there are problems of unstable frequency and low clock accuracy.

To solve the above technical problem, an embodiment of the present invention provides a clock signal generation circuit, including: a ROSC module adapted to generate a clock signal; a reference clock module connected to the ROSC module, the reference clock module adapted to provide a reference clock signal; the temperature sensor is connected with the ROSC module and is suitable for sensing the working temperature of the ROSC module; the voltage sensor is connected with the ROSC module and is suitable for sensing the working voltage of the ROSC module; the storage module is connected with the temperature sensor, the voltage sensor and the ROSC module and is suitable for storing a basic correction table, and fine tuning data aiming at the working temperature and the working voltage are recorded in the basic correction table; when the ROSC module is initialized, the ROSC module corrects the frequency of the clock signal by using the reference clock signal; otherwise, the ROSC module searches the matched fine tuning data in the basic correction table according to the working temperature and the working voltage, corrects the frequency of the clock signal based on the searched fine tuning data, and corrects the frequency of the clock signal by using the reference clock signal when the searching time exceeds a preset threshold value.

According to the technical scheme provided by the embodiment of the invention, the reference clock module which provides the reference clock signal meeting the clock precision requirement is used in the initialization process, so that the clock precision of the clock signal generated in the scene can be ensured. And correcting based on the matched fine tuning data searched in the basic correction table, and determining whether the fine tuning data is suitable for correcting the frequency of the clock signal by comparing the search time with a preset threshold value, and correcting the frequency of the clock signal by using the reference clock signal once the search time exceeds the preset threshold value. Compared with the mode of completely using PVT sensor correction, the clock precision of the clock signal generated by the ROSC module can be improved by timely correcting the reference clock signal in the circuit operation process, and compared with the mode of using the RTC crystal oscillator to generate the clock signal, the clock precision requirement can be met, and the cost can be reduced.

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.

Fig. 1 is a clock signal generation circuit according to an embodiment of the present invention. The clock signal generation circuit 100 may include: a memory module 1, a ROSC module 2, a reference clock module 3, a temperature sensor 4, and a voltage sensor 5.

In particular, the ROSC module 2 is adapted to generate a clock signal. When the ROSC module 2 generates a clock signal, the generated current consumption is about 100nA, the power consumption is very low, and the ROSC module 2 has the advantages of simple structure, small area and the like, does not need a crystal oscillator, can replace an RTC module with relatively high price, and is applied to various electronic devices.

Since the ROSC module 2 may affect the clock accuracy due to voltage drift or temperature variation. In order to ensure that the clock accuracy of the clock signal generated by the ROSC module 2 meets the requirements, the ROSC module 2 may be connected to the reference clock module 3 and may correct the frequency of the generated clock signal according to the reference clock signal. In a specific implementation, when the ROSC module 2 is initialized, the ROSC module 2 may correct the frequency of the clock signal by using the reference clock module 3.

Further, the ROSC module 2 can have an operating temperature range of-20 ℃ to 125 ℃. As will be understood by those skilled in the art, in the embodiment shown in fig. 2, the operating temperature curve of the ring oscillator is relatively stable between 0 ℃ and 80 ℃, and has a small influence on the clock accuracy of the ROSC clock signal, which is also a common temperature range in a typical application scenario of the clock generation circuit.

Further, in operation, the clock signal generating circuit 100 may preferentially search the fine tuning data stored in the memory module 1 and correct the frequency of the clock signal using the matching fine tuning data, and if there is no matching fine tuning data, may still correct the frequency of the clock signal using the reference clock module 3.

As a non-limiting example, the clock signal generating circuit 100 may operate in a specific temperature range (e.g., between 10 ℃ to 40 ℃) for a long time due to user usage, and at this time, the trimming data corresponding to the operating temperature and the operating voltage (i.e., the trimming data recorded in the basic correction table) stored in the storage module 1 in the clock signal generating circuit 100 is mainly concentrated at the operating temperature of 10 ℃ to 40 ℃. Assuming that the operating temperature of the clock signal generating circuit 100 changes when the clock signal generating circuit is shifted to another operating environment, and assuming that the operating temperature changes from 45 ℃ to 80 ℃, because the data recorded in the memory module 1 is little or not recorded, the clock signal generating circuit 100 can utilize the reference clock module 3 to provide a high-precision reference clock signal to correct the frequency of the output clock signal, and calculate the fine tuning data of the corresponding operating temperature and operating voltage according to the reference clock signal, and then record the fine tuning data in the basic correction table. With the lapse of time, the fine tuning data corresponding to the operating temperature and the operating voltage in the basic correction table will be gradually improved, and the frequency of correcting the frequency of the clock signal by using the reference clock module 3 will also be reduced, which can save the power consumption of the circuit.

As a non-limiting example, the reference clock module 3 may be an external Bluetooth Low Energy (BLE) module.

As a further non-limiting embodiment, the reference clock module 3 may also be selected from a violet peak (Zigbee) module, a Near Field Communication (NFC) module, a Wi-Fi module, and the like.

Further, the reference clock module 3 may be connected to the internet or other wireless communication networks to obtain a network clock signal as the reference clock signal. As is well known, the network clock signal is a clock signal with high clock accuracy, and can be used to correct the frequency of the clock signal generated by the ROSC module 2. Alternatively, the reference clock module 3 may locally generate a precise clock signal as the reference clock signal.

As a non-limiting example, the ROSC module 2 outputs the clock signal of the clock signal generation circuit 100 according to a BLE signal (for example, a network clock signal obtained by the BLE module). At this time, the precision of the clock signal can reach 5ppm or even 1ppm, and the clock precision of most electronic equipment can be met.

As a non-limiting example, the reference clock module 3 may be an internal module of an electronic device, independently present in the ROSC module 2; or may be integrated with the ROSC module 2.

Specifically, the memory module 1 stores trimming data adapted to compensate for a frequency deviation of the clock signal generation circuit 100 with respect to an operating temperature and an operating voltage of the ROSC module 2. The memory module 1 may be a non-volatile memory. The trimming data stored therein does not disappear after the power is turned off.

In order to ensure the clock precision, the ROSC module 2 may be connected to a temperature sensor 4 and a voltage sensor 5, sense the current operating temperature and operating voltage of the ROSC module 2 in real time, search the fine tuning data corresponding to the operating temperature and operating voltage in the basic correction table, and correct the frequency of the clock signal by using the reference clock signal provided by the reference clock module 3 if the search time exceeds a preset threshold.

Further, according to the reference clock signal provided by the reference clock module 3, the clock signal generating circuit 100 may calculate the trimming data of the current operating temperature and the operating voltage, and record the calculated trimming data in the basic correction table in the storage module 1.

In particular, the trimming data may be recorded in a basic correction table (not shown) in the storage module 1. With the continuous operation of the clock signal generating circuit 100, if the base correction table does not record the trimming data corresponding to the operating temperature and the operating voltage, the frequency of the clock signal may be corrected by using the reference clock signal provided by the reference clock module 3. Meanwhile, fine tuning data corresponding to the current operating temperature and operating voltage may be calculated based on the reference clock signal and recorded in the basic correction table.

Otherwise, if the basic correction table records fine tuning data corresponding to the operating temperature and the operating voltage, and the search time for searching the fine tuning data is within a preset threshold, the frequency deviation of the clock signal may be corrected based on the fine tuning data, where the preset threshold may be preset by the clock signal generation circuit in the design stage.

Specifically, the ROSC module 2 may connect the temperature sensor 4, the voltage sensor 5, and the reference clock module 3. Wherein the temperature sensor 4 can be configured to sense a wafer (die) temperature of the ROSC module 2, thereby obtaining the operating temperature.

Wherein the operating voltage may be sensed based on a voltage sensor 5 configured to sense a wafer voltage of the ROSC module 2. Wherein the voltage sensor 5 can connect the ROSC module 2 and the memory module 1. After determining the operating temperature and the operating voltage, the clock signal generation circuit 100 may look up a basic correction table stored in the memory module 1. If the basic correction table records fine tuning data for the operating temperature and the operating voltage and matches the operating temperature and the operating voltage, the frequency of the clock signal may be corrected based on the searched fine tuning data when the search time is less than a preset threshold.

Further, the basic correction table records fine adjustment data of process errors for each operating voltage and operating temperature. The ROSC module 2 may also search the base correction table for matching trim data in conjunction with the operating temperature, operating voltage, and process error.

TABLE 1

Figure BDA0001733349970000081

Specifically, referring to table 1, the basic correction table records the operating temperature (denoted by T in table 1)1、T2、TNEtc.) and operating voltage (denoted by V in table 1)1、V2、VNEtc.) may be used to configure an associated device to compensate for frequency deviations of a clock signal generated by a frequency oscillator. The process error refers to a clock signal with a frequency change generated by ROSC due to an error generated by the operation speed of a device. But under certain circumstances (e.g., operating temperature and operating voltage), process errors of the fixed device operation, the fixed wafer, will be deterministic, as will the frequency variation of the ring oscillator's clock signal.

Thus, based on a given operating temperature and operating voltage, from a determined process error, the frequency of the clock signal at that process error can be determined.

Once the frequency deviation introduced by the operating temperature, the operating voltage and the process error is determined, compensation information of the frequency deviation under different conditions can be recorded in the basic correction table and recorded in the basic correction table as fine tuning data. When the clock signal generation circuit 100 starts operating, the counter in the ROSC module 2 may correct the count result generated by the counter based on the trimming data, and the ROSC module 2 may generate a clock signal according to the count result. Further, considering that the counter may overflow, the basic correction table may further include a 1-bit overflow flag bit (such as the overflow bit shown in table 1) to record overflow information of the counting result.

As a non-limiting example, the bit width of the trim data for process errors recorded by the base correction table may be adapted to the lowest clock precision of the ROSC module 2 to meet the lowest precision requirement of the clock signal.

TABLE 2

Figure BDA0001733349970000091

Further, when the ROSC module 2 completes initialization, after searching for corresponding fine tuning data in the basic correction table according to the operating temperature, the operating voltage, and the process error, search time may be recorded, and the search time and the preset threshold are compared to determine whether to correct the frequency of the clock signal using the fine tuning data. As shown in table 1, the search time (i.e., the timing information for searching the fine tuning data) may be stored in the basic correction table.

Further, the storage module 1 is further adapted to store a fine adjustment correction table (not shown in fig. 1), and fine adjustment data generated for a change in operating temperature under a fixed voltage condition is recorded in the fine adjustment correction table. Referring to table 2, the trimming correction table records therein data on temperature variation at a specific voltage and trimming data on an error introduced by the operating temperature variation.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:冲击电压发生器及其触发脉冲波形调控装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类