External clock calibration method and system

文档序号:1353367 发布日期:2020-07-24 浏览:28次 中文

阅读说明:本技术 一种外部时钟校准方法及系统 (External clock calibration method and system ) 是由 施奕洲 李应浪 黄立伟 江华彬 于 2020-04-16 设计创作,主要内容包括:本发明公开一种外部时钟校准方法及系统,其中,标准时钟模块产生低频时钟信号,待校准时钟模块产生高频时钟信号;通过捕获标准时钟的脉冲边沿,确定预定的计时时段,并且在预定的计时时段下检测待校准时钟的相应脉冲数,处理后计算待校准时钟的实际频率;再将所捕获的实际频率与标准时钟频率(理论频率)作对比,计算频率偏差,基于频率偏差对外部工作时钟进行校准。本发明可以通过低频标准时钟对高频待校准时钟进行校准,进一步提高时钟频率的精度。(The invention discloses an external clock calibration method and system, wherein a standard clock module generates a low-frequency clock signal, and a clock module to be calibrated generates a high-frequency clock signal; determining a preset timing period by capturing the pulse edge of a standard clock, detecting the corresponding pulse number of the clock to be calibrated in the preset timing period, and calculating the actual frequency of the clock to be calibrated after processing; the captured actual frequency is compared with the standard clock frequency (theoretical frequency), the frequency deviation is calculated, and the external working clock is calibrated based on the frequency deviation. The invention can calibrate the high-frequency clock to be calibrated through the low-frequency standard clock, thereby further improving the precision of the clock frequency.)

1. An external clock calibration system, comprising:

the standard low-frequency clock generating module is used for generating and providing a high-precision standard low-frequency clock signal;

the high-frequency generation module to be calibrated is used for generating and providing a high-frequency clock signal to be calibrated;

the timer module comprises a counter unit, an edge pulse detection unit and an actual frequency calculation unit; the edge pulse detection unit is used for capturing the rising edge and the falling edge of the high-precision standard low-frequency clock signal; the counter unit takes a high-frequency clock signal to be calibrated as a clock source and counts pulses of the clock source within a timing time period determined by a captured rising edge and a captured falling edge; the actual frequency calculation unit calculates the actual frequency of the clock to be calibrated according to the pulse number detected in the timing time period;

the frequency deviation calculation module is used for calculating the deviation of the actual frequency of the clock to be calibrated based on the frequency of the high-precision standard low-frequency clock signal;

and the clock calibration module is used for calibrating the high-frequency clock signal to be calibrated according to the deviation.

2. A method of external clock calibration, comprising the steps of:

(1) providing a high-precision standard low-frequency clock signal and providing a high-frequency clock signal to be calibrated;

(2) capturing the rising edge and the falling edge of a high-precision standard low-frequency clock signal; counting the pulses of a clock source within a timing time period determined by a captured rising edge and a captured falling edge by taking a high-frequency clock signal to be calibrated as the clock source;

(3) calculating the actual frequency of the clock to be calibrated according to the number of pulses detected in the timing time period;

(4) calculating the deviation of the actual frequency of the clock to be calibrated based on the frequency of the high-precision standard low-frequency clock signal;

(5) and calibrating the high-frequency clock signal to be calibrated according to the deviation.

3. The external clock calibration method according to claim 2, wherein in step (2), the number of pulses is detected in a time period between one rising edge and an immediately following falling edge.

4. The external clock calibration method according to claim 2, wherein in step (2), the number of pulses therein is detected in a time period between two adjacent rising edges and two adjacent falling edges.

5. The external clock calibration method according to claim 2, wherein in step (3), the rising edge and the falling edge of the high-precision standard low-frequency clock signal are captured for a plurality of times, the number of pulses in the timing period determined by the plurality of groups of rising edges and falling edges is detected, and the actual frequency of the clock to be calibrated is obtained after averaging the plurality of groups of pulses.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能手表拓展底座和智能手表组件

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!