CN101977051B - Frequency correction circuit and method for automatically correcting frequency - Google Patents
Frequency correction circuit and method for automatically correcting frequency Download PDFInfo
- Publication number
- CN101977051B CN101977051B CN2010105273100A CN201010527310A CN101977051B CN 101977051 B CN101977051 B CN 101977051B CN 2010105273100 A CN2010105273100 A CN 2010105273100A CN 201010527310 A CN201010527310 A CN 201010527310A CN 101977051 B CN101977051 B CN 101977051B
- Authority
- CN
- China
- Prior art keywords
- frequency
- oscillator
- period
- packet identification
- comparison result
- 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.)
- Expired - Fee Related
Links
- 238000012937 correction Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 title claims abstract description 21
- 230000005540 biological transmission Effects 0.000 claims abstract description 25
- 230000010355 oscillation Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 239000013078 crystal Substances 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 239000011295 pitch Substances 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000010453 quartz Substances 0.000 description 1
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N silicon dioxide Inorganic materials O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 1
Images
Landscapes
- Information Transfer Systems (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
技术领域 technical field
本发明有关于一种自动校正频率的频率校正电路及其方法,尤指一种藉由高速及/或全速传输模式下的通用序列总线的封包识别码来自动校正频率的频率校正电路及其方法。The present invention relates to a frequency correction circuit and method for automatically correcting frequency, especially to a frequency correction circuit and method for automatically correcting frequency by using the packet identification code of the Universal Serial Bus in high-speed and/or full-speed transmission mode .
背景技术 Background technique
振荡器是许多电子系统中的重要组成组件,可应用在通讯系统、计算机系统、控制系统和微处理器中,做为频率产生器、计时器或计数器。Oscillators are important components in many electronic systems and can be used as frequency generators, timers or counters in communication systems, computer systems, control systems and microprocessors.
一般说来,系统厂商碍于成本压力,而广泛采用较不准确的非晶体振荡器(像是阻容振荡器或延迟时间振荡器)来代替振荡频率较为准确的晶体振荡器(像是石英振荡器)。然而,用来改善非晶体振荡器的振荡频率的现有技术,虽然能提升非晶体振荡器的振荡频率的准确度,但是还是无法符合高速数字系统(例如USB2.0)的需求。因此,系统厂商仍然在发展可大幅提升非晶体振荡器的振荡频率的准确度的技术。Generally speaking, due to cost pressure, system manufacturers widely use less accurate non-crystal oscillators (such as RC oscillators or delay time oscillators) to replace crystal oscillators with more accurate oscillation frequencies (such as quartz oscillators). device). However, the prior art for improving the oscillation frequency of the non-crystal oscillator can improve the accuracy of the oscillation frequency of the non-crystal oscillator, but still cannot meet the requirements of high-speed digital systems (such as USB2.0). Therefore, system manufacturers are still developing technologies that can greatly improve the accuracy of the oscillation frequency of non-crystal oscillators.
发明内容 Contents of the invention
本发明的一实施例提供一种自动校正频率的频率校正电路。该频率校正电路包含一序列接口引擎、一封包识别码辨识单元、一振荡器及一计数比较器。该序列接口引擎系根据从一高速及/或全速传输模式下的一通用序列总线的主控端所接收的差动信号对中产生一序列数字数据;该封包识别码辨识单元系根据该序列数字数据,辨识出每一帧起始的一封包识别码,以及连续两封包识别码之间的一第一周期;及该计数比较器系用以根据该第一周期,产生一校正信号以校正该振荡器的一输出频率。An embodiment of the present invention provides a frequency correction circuit for automatically correcting frequency. The frequency correction circuit includes a serial interface engine, a packet identification code identification unit, an oscillator and a counting comparator. The serial interface engine generates a sequence of digital data according to the differential signal pair received from the master terminal of a universal serial bus in a high-speed and/or full-speed transmission mode; the packet identification code identification unit generates a sequence of digital data according to the sequence number data, identifying a packet identification code at the beginning of each frame, and a first period between two consecutive packet identification codes; and the counting comparator is used to generate a correction signal to correct the An output frequency of the oscillator.
本发明的一实施例提供一种自动校正频率的方法。该方法包含根据从一高速及/或全速传输模式下的一通用序列总线的主控端所接收的差动信号对中产生一序列数字数据;根据该序列数字数据,辨识出每一帧起始的一封包识别码;及根据连续两封包识别码之间的一第一周期,校正一振荡器的一输出频率。An embodiment of the invention provides a method for automatically correcting frequency. The method includes generating a sequence of digital data from differential signal pairs received from a master of a Universal Serial Bus in a high-speed and/or full-speed transmission mode; identifying the start of each frame based on the sequence of digital data and correcting an output frequency of an oscillator according to a first period between two consecutive packet identification codes.
本发明所提供的一种自动校正频率的频率校正电路及其方法,系根据高速及/或全速传输模式下的一通用序列总线的帧始端(start of frame,SOF)的封包识别码来自动校正一振荡器的输出频率。因此,可在不大幅变更现有电路设计下,仍能使得该振荡器的输出频率的误差范围符合USB 2.0对于频率误差的要求。A frequency correction circuit and method for automatically correcting the frequency provided by the present invention are automatically corrected according to the packet identification code of the start of frame (SOF) of a universal serial bus in a high-speed and/or full-speed transmission mode An oscillator output frequency. Therefore, without substantially changing the existing circuit design, the error range of the output frequency of the oscillator can still meet the requirements of USB 2.0 for frequency error.
附图说明 Description of drawings
图1为本发明的一实施例说明自动校正频率的频率校正电路的示意图;FIG. 1 is a schematic diagram illustrating a frequency correction circuit for automatically correcting frequency according to an embodiment of the present invention;
图2A和图2B为在通用序列总线2.0版的通讯协议中,全速及高速传输模式下所定义的帧距的示意图;2A and FIG. 2B are schematic diagrams of frame intervals defined in full-speed and high-speed transmission modes in the communication protocol of Universal Serial Bus Version 2.0;
图3A和图3B为封包识别码辨识单元如何在高速及/或全速传输模式下,辨识出封包识别码的示意图;3A and 3B are schematic diagrams of how the packet identification code identification unit identifies the packet identification code in high-speed and/or full-speed transmission mode;
图4为本发明的另一实施例利用高速及/或全速传输模式下的通用序列总线的帧始端的封包识别码来自动校正振荡器频率的方法的流程图。FIG. 4 is a flowchart of a method for automatically calibrating the oscillator frequency by using the packet identification code at the beginning of a frame of the USB in the high-speed and/or full-speed transmission mode according to another embodiment of the present invention.
其中,附图标记:Among them, reference signs:
100 频率校正电路100 frequency correction circuit
102 序列接口引擎102 serial interface engine
104 封包识别码辨识单元104 packet identification code identification unit
106 振荡器106 oscillators
108 计数比较器108 count comparators
110 主控端110 master control terminal
1082 参考振荡器1082 Reference Oscillator
1084 第一计数器1084 first counter
1086 除频器1086 frequency divider
1088 第二计数器1088 second counter
1090 比较器1090 Comparator
1092 控制器1092 Controller
C1 第一频率数C1 first frequency number
C2 第二频率数C2 second frequency number
E1 校正信号E1 correction signal
f1 输出频率f1 output frequency
T1 第一周期T1 first cycle
T2 第二周期T2 second cycle
40-56 步骤40-56 steps
具体实施方式 Detailed ways
请参照图1,图1为本发明的一实施例说明自动校正频率的频率校正电路100的示意图。频率校正电路100包含一序列接口引擎(serial interfaceengine)102、一封包识别码(packet identification,PID)辨识单元104、一振荡器106及一计数比较器108。序列接口引擎102根据从一高速(high speed)及/或全速(full speed)传输模式下的一通用序列总线的主控端(host)110所接收的差动信号对中,产生一序列数字数据;封包识别码辨识单元104耦接于序列接口引擎102,根据序列数字数据,辨识出每一帧(frame)起始的一封包识别码,以及连续两封包识别码之间的一第一周期T1。Please refer to FIG. 1 . FIG. 1 is a schematic diagram illustrating a
计数比较器108耦接于封包识别码辨识单元104和振荡器106,包含一参考振荡器1082、一第一计数器1084、一除频器1086、一第二计数器1088、一比较器1090及一控制器1092。参考振荡器1082耦接于第一计数器1084和第二计数器1088,用以提供一计数器1084和第二计数器1088计数用的一参考振荡频率(100MHz-300MHz);第一计数器1084耦接于封包识别码辨识单元104,用以计数在第一周期T1期间由参考振荡器1082的参考振荡频率所产生的一第一频率数C1;除频器1086耦接于振荡器106,用以将振荡器106的输出频率f1(12MHz)除以3000(高速传输模式)或24000(全速传输模式),产生一第二周期T2;第二计数器1088耦接于除频器1086,用以计数在第二周期T2期间由参考振荡器1082的参考振荡频率所产生的一第二频率数C2;比较器1090耦接于第一计数器1084和第二计数器1088,用以根据第一频率数C1和第二频率数C2之间的一差异,产生一比较结果;控制器1092耦接于比较器1090,用以根据比较结果,产生一校正信号E1以校正振荡器106的输出频率f1。另外,振荡器106和参考振荡器1082为延迟时间振荡器(delay time oscillator)或阻容振荡器(RC oscillator)。The counting
请参照图2A和图2B,图2A和图2B为在通用序列总线2.0版(USB 2.0)的通讯协议中,全速及高速传输模式下所定义的帧距的示意图。如图2A所示,全速传输模式下定义的帧距(frame interval)为一毫秒误差五百纳秒(1.000ms±500ns)的时间间隔;如图2B所示,高速传输模式下定义的帧距为一百二十五微秒误差六十二点五纳秒(125us±62.5ns)的时间间隔。而上述的帧距的误差范围皆可符合USB 2.0对于频率误差(±500ppm)的要求,所以可利用高速及/或全速传输模式下的帧距做为校正频率的基准。Please refer to FIG. 2A and FIG. 2B . FIG. 2A and FIG. 2B are schematic diagrams of frame pitches defined in full-speed and high-speed transmission modes in the communication protocol of Universal Serial Bus Version 2.0 (USB 2.0). As shown in Figure 2A, the frame interval (frame interval) defined under the full-speed transmission mode is a time interval of one millisecond error of five hundred nanoseconds (1.000ms±500ns); as shown in Figure 2B, the frame interval defined under the high-speed transmission mode The time interval is 125 microseconds with an error of 62.5 nanoseconds (125us±62.5ns). The error range of the above frame pitch can meet the requirements of USB 2.0 for frequency error (±500ppm), so the frame pitch in high-speed and/or full-speed transmission mode can be used as the benchmark for frequency correction.
请参照图3A和图3B,图3A和图3B为封包识别码辨识单元104如何在高速及/或全速传输模式下,辨识出封包识别码的示意图。如图3A和图3B所示,全速及高速传输模式的封包识别码的型态皆为10100101,因此,藉由封包识别码的型态,封包识别码辨识单元104便能从序列接口引擎102产生的序列数字数据中辨识出每一帧起始的封包识别码。Please refer to FIG. 3A and FIG. 3B . FIG. 3A and FIG. 3B are schematic diagrams of how the
请参照图1、图2A和图2B,当封包识别码辨识单元104辨识出封包识别码后,根据重设(reset)及锁住同相位(locking inphase)的方式,辨识出连续两封包识别码之间的第一周期T1(亦即全速或高速传输模式下所定义的帧距),而第一计数器1084则根据第一周期T1以及参考振荡器1082的参考振荡频率,产生第一频率数C1传送至比较器1090。另外,如图2A所示,在高速传输模式下除频器1086会将振荡器106的输出频率f1(12MHz)除以3000产生第二周期T2,以对应两连续帧始端(SOF)所对应的第一周期T1;同理如图2B所示,在全速传输模式下,除频器1086会将振荡器106的输出频率f1(12MHz)除以24000产生第二周期T2。之后,第二计数器1088则根据第二周期T2以及参考振荡器1082的参考振荡频率,产生第二频率数C2传送至比较器1090。比较器1090则根据第一频率数C1和第二频率数C2之间的差异,当差异大于一预设阀值TH时,产生比较结果。控制器1092则根据比较结果,产生校正信号E1以校正振荡器106的输出频率f1。Please refer to FIG. 1, FIG. 2A and FIG. 2B. After the packet identification
请参照图4,图4为本发明的另一实施例说明利用高速及/或全速传输模式下的通用序列总线的帧始端的封包识别码来自动校正振荡器频率的方法的流程图。图4的方法利用图1的频率校正电路100说明,详细步骤如下:Please refer to FIG. 4 . FIG. 4 is a flow chart illustrating a method for automatically calibrating the oscillator frequency by using the packet identification code at the beginning of a frame of the Universal Serial Bus in the high-speed and/or full-speed transmission mode according to another embodiment of the present invention. The method of FIG. 4 utilizes the
步骤40:开始;Step 40: start;
步骤42:序列接口引擎102根据从高速及/或全速传输模式下的通用序列总线的主控端110所接收的差动信号对,产生序列数字数据;Step 42: the
步骤44:封包识别码辨识单元104根据序列数字数据,辨识出每一帧始端的封包识别码;Step 44: The packet identification
步骤46:封包识别码辨识单元104根据重设及锁住同相位的方式,辨识出连续两封包识别码之间的第一周期T1;Step 46: The packet identification
步骤48:第一计数器1084计数在第一周期T1期间由参考振荡器1082产生的第一频率数C1;Step 48: the
步骤50:将振荡器106的输出频率f1除以3000或24000,产生第二周期T2;Step 50: Divide the output frequency f1 of the
步骤52:第二计数器1088计数在第二周期T2期间由参考振荡器1082产生的第二频率数C2;Step 52: the
步骤54:比较器1090比较第一频率数C1和第二频率数C2,若第一频率数C1和第二频率数C2之间的差异大于预设阀值TH时,产生比较结果,并执行步骤56;否则跳回步骤50;Step 54: The
步骤56:控制器1092根据比较结果,产生校正信号E1以校正振荡器106的输出频率f1;跳回步骤50。Step 56 : The
由图4的方法可知,除频器1086、计数器1088、比较器1090、控制器1092和振荡器106形成一个可自动校正频率的循环。因此,当振荡器106的输出频率发生偏移且大于预设阀值TH时,即可透过上述循环来校正振荡器106的输出频率。It can be seen from the method in FIG. 4 that the
综合以上所述,现有技术是利用生产时把校正好的参数写入非挥发性内存,或是利用激光调整来校正频率,但这些方法还是无法符合高速数字系统的需求。然而,本发明所提供的自动校正频率的频率校正电路及其方法,利用高速及/或全速传输模式下的通用序列总线的帧始端(SOF)的封包识别码来自动校正振荡器的输出频率。因此,在不变更现有电路设计下,仍能使得振荡器的输出频率的误差范围可符合USB 2.0对于频率误差(±500ppm)的要求。To sum up the above, the existing technology is to write the corrected parameters into the non-volatile memory during production, or to use laser adjustment to correct the frequency, but these methods still cannot meet the needs of high-speed digital systems. However, the frequency correction circuit and method for automatically correcting the frequency provided by the present invention use the packet identification code of the SOF of the Universal Serial Bus in the high-speed and/or full-speed transmission mode to automatically correct the output frequency of the oscillator. Therefore, without changing the existing circuit design, the error range of the output frequency of the oscillator can still meet the requirements of USB 2.0 for frequency error (±500ppm).
以上所述仅为本发明的较佳实施例,凡依本发明专利保护范围所做的均等变化与修改,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the protection scope of the patent of the present invention shall fall within the scope of the present invention.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105273100A CN101977051B (en) | 2010-10-19 | 2010-10-19 | Frequency correction circuit and method for automatically correcting frequency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105273100A CN101977051B (en) | 2010-10-19 | 2010-10-19 | Frequency correction circuit and method for automatically correcting frequency |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101977051A CN101977051A (en) | 2011-02-16 |
CN101977051B true CN101977051B (en) | 2012-07-04 |
Family
ID=43576904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010105273100A Expired - Fee Related CN101977051B (en) | 2010-10-19 | 2010-10-19 | Frequency correction circuit and method for automatically correcting frequency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101977051B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102692563B (en) * | 2012-05-18 | 2015-06-17 | 大唐微电子技术有限公司 | Clock frequency detector |
CN103312325B (en) * | 2013-06-26 | 2016-08-24 | 龙迅半导体(合肥)股份有限公司 | A kind of frequency synthesizer |
TWI530799B (en) | 2013-11-28 | 2016-04-21 | 慧榮科技股份有限公司 | Frequency calibration method applicable in universal serial bus device and the related universal serial bus device |
CN109687867B (en) * | 2018-11-30 | 2023-04-07 | 珠海慧联科技有限公司 | Clock calibration method and calibration circuit for crystal-oscillator-free USB (universal serial bus) equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1487678A (en) * | 2002-04-24 | 2004-04-07 | չѶͨ�ţ��Ϻ�������˾ | Bidirectional interval synchronous estimator for radio communication system |
US7154343B2 (en) * | 2003-10-09 | 2006-12-26 | Renesas Technology Corp. | Semiconductor integrated circuit with clock generator |
CN101026408A (en) * | 2007-01-19 | 2007-08-29 | 重庆重邮信科股份有限公司 | Frequency fine correction method and device for time division-synchronous CDMA system |
CN101079627A (en) * | 2006-08-14 | 2007-11-28 | 钰创科技股份有限公司 | A working cycle correction circuit |
CN101110901A (en) * | 2007-07-31 | 2008-01-23 | 北京航空航天大学 | Carrier Synchronization Generation Method and Device in a Terrestrial Digital Television System |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007228040A (en) * | 2006-02-21 | 2007-09-06 | Oki Electric Ind Co Ltd | Pll device compatible with received packet missing |
-
2010
- 2010-10-19 CN CN2010105273100A patent/CN101977051B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1487678A (en) * | 2002-04-24 | 2004-04-07 | չѶͨ�ţ��Ϻ�������˾ | Bidirectional interval synchronous estimator for radio communication system |
US7154343B2 (en) * | 2003-10-09 | 2006-12-26 | Renesas Technology Corp. | Semiconductor integrated circuit with clock generator |
CN101079627A (en) * | 2006-08-14 | 2007-11-28 | 钰创科技股份有限公司 | A working cycle correction circuit |
CN101026408A (en) * | 2007-01-19 | 2007-08-29 | 重庆重邮信科股份有限公司 | Frequency fine correction method and device for time division-synchronous CDMA system |
CN101110901A (en) * | 2007-07-31 | 2008-01-23 | 北京航空航天大学 | Carrier Synchronization Generation Method and Device in a Terrestrial Digital Television System |
Non-Patent Citations (1)
Title |
---|
JP特开2007-228040A 2007.09.06 |
Also Published As
Publication number | Publication date |
---|---|
CN101977051A (en) | 2011-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI445315B (en) | Frequency calibration circuit for automatically calibrating frequency and method thereof | |
CN104901687B (en) | Clock frequency calibration method and system | |
CN102063402B (en) | Method and circuit for correcting frequency of USB device | |
CN109687867B (en) | Clock calibration method and calibration circuit for crystal-oscillator-free USB (universal serial bus) equipment | |
US20070079166A1 (en) | Compensated-clock generating circuit and USB device having same | |
TWI410806B (en) | A method and a circuit for correcting the frequency of the USB device, and a method of identifying whether or not the input packet is a tag packet | |
CN101977051B (en) | Frequency correction circuit and method for automatically correcting frequency | |
US8634506B2 (en) | Frequency calibration circuit for automatically calibrating frequency and method thereof | |
CN112015691B (en) | Clock calibration method and calibration circuit of serial bus equipment and electronic equipment | |
WO2014114146A1 (en) | Self-correcting system for clock-generating circuit and correcting method thereof | |
CN102081426B (en) | Frequency adjustment device and frequency adjustment method of adjustable oscillator | |
US7656979B2 (en) | Data communication device | |
US20130103969A1 (en) | Clock generation device for usb device | |
CN100547933C (en) | Be used for the synchronous system and method for clock signal | |
CN114826977B (en) | Baud rate detection method and device, terminal equipment and storage medium | |
TWI445378B (en) | Adjustable oscillator frequency adjusting device and frequency adjusting method | |
CN103677079B (en) | Frequency adjustment device and frequency adjustment method of adjustable oscillator | |
CN205901711U (en) | Accurate digital frequency divider based on GPS pulse signal second | |
WO2021135303A1 (en) | Fpga-based design method and device for equally dividing interval | |
WO2025044374A1 (en) | Signal repeater control method and signal repeater control apparatus | |
CN204065907U (en) | A kind of MCU chip frequency-dividing clock means for correcting | |
TWI271978B (en) | System for providing a calibrated clock and methods thereof | |
CN106201956B (en) | Apparatus and method for automatically correcting clock of amorphous oscillator | |
CN101594141A (en) | Frequency locking device | |
CN106209092A (en) | A kind of precise figures dividing method based on GPS second pulse signal and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20160203 Address after: Taipei City, Taiwan, China Patentee after: ETRON TECHNOLOGY, INC. Address before: Hsinchu City, Taiwan, China Patentee before: Etron Technology, Inc. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120704 Termination date: 20201019 |