CN103336754B - A kind of USB is from the system clock automated calibration system of equipment and method - Google Patents

A kind of USB is from the system clock automated calibration system of equipment and method Download PDF

Info

Publication number
CN103336754B
CN103336754B CN201310214856.4A CN201310214856A CN103336754B CN 103336754 B CN103336754 B CN 103336754B CN 201310214856 A CN201310214856 A CN 201310214856A CN 103336754 B CN103336754 B CN 103336754B
Authority
CN
China
Prior art keywords
clock
frequency
usb
clock generator
frame synchronization
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.)
Active
Application number
CN201310214856.4A
Other languages
Chinese (zh)
Other versions
CN103336754A (en
Inventor
李兆亮
钱志恒
何友军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Synodata Security Technology Co Ltd
Original Assignee
Hangzhou Synodata Security Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Synodata Security Technology Co Ltd filed Critical Hangzhou Synodata Security Technology Co Ltd
Priority to CN201310214856.4A priority Critical patent/CN103336754B/en
Publication of CN103336754A publication Critical patent/CN103336754A/en
Application granted granted Critical
Publication of CN103336754B publication Critical patent/CN103336754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The present invention relates to a kind of USB from the system clock automated calibration system of equipment and method, comprise 48M clock generator, USB Frame Synchronization Test module, USB1.1 physical layer interface, counter, comparer, reference current regulator, non-volatile memory body and the steering logic that powers on, wherein USB Frame Synchronization Test module is for detecting the frame synchronization bag of USB, and produce the pulse of fixed frequency, the periodicity of rolling counters forward 48M clock is supplied to as basic pulse; Comparer, for the periodicity that compares counter and obtain and theoretical periodicity, judges that clock frequency that current 48M clock generator generates is higher or lower than desirable 48M frequency thus; Reference current regulator is an arithmetic logic.Effect of the present invention: the object being reached frequency adjustment by the reference current of reference current regulator adjustment 48M clock generator; Do not need external crystal oscillator, inside generates 48M dominant frequency clock and does not change with external environment condition.

Description

A kind of USB is from the system clock automated calibration system of equipment and method
Technical field
The present invention relates to SOC integrated circuit (IC) design field, particularly relate to computer communication USB interface, more specifically, it relates to a kind of USB from the system clock automated calibration system of equipment and method.
Background technology
The electronic product of a large amount of low side adopts USB1.1 interface, but USB interface requires higher to system clock accuracy, needs to reach within positive and negative 0.5% just can have stronger compatibility.
Have an external crystal-controlled oscillation in major applications as clock source, inner also have a PLL to carry out frequency multiplication, exports 48M clock and use to USB controller.If this external crystal-controlled oscillation save, the cost of product outline schemes has one obviously to be reduced, and it is smaller and more exquisite to be conducive to that final product design is obtained.If chip internal has a high precision clock ring to shake, just this crystal oscillator can be save, but will accomplish that high precision clock ring like this shakes, consider temperature, voltage and process deviation, be almost impossible.If therefore have a technology can shake to internal clocking ring carry out automatic calibration, no matter temperature, voltage and technique how deviation, all remains near 48M, so just can realize the target saving external crystal-controlled oscillation.
Current USB1.1 is generally calibrated by outside from the system clock of equipment, or when producing, test writes calibration value to non-volatile memory body, or the frequency of a generation high-frequency ratio as good hundreds of million carries out sampling frequency division.
The scheme had at present is produced the clock of hundreds of million, Delta_Sigma fractional frequency division is carried out to it, use 8 frequency divisions of this high frequency clock to go to detect USB differential bus simultaneously, feed back accordingly, calibrate decimal frequency divider, obtain the system clock of final USB.The program is not use clock accurately after calibration when detecting USB differential bus, and directly adopts 8 frequency divisions of high frequency clock, there is the possibility of sample error, usb compatible may be caused poor.The high frequency clock that the program must produce higher than 250M in addition can make power consumption become large.
Summary of the invention
The object of the invention is to overcome deficiency of the prior art, the system clock automated calibration system of a kind of USB from equipment and method are provided.
The object of the invention is to be achieved through the following technical solutions: this USB is from the system clock automated calibration system of equipment, this system comprises 48M clock generator, USB Frame Synchronization Test module, USB1.1 physical layer interface, counter, comparer, reference current regulator, non-volatile memory body and the steering logic that powers on, and wherein 48M clock generator is that the clock ring of a generated clock frequency shakes; USB Frame Synchronization Test module for detecting the frame synchronization bag of USB, and produces the pulse of fixed frequency, is supplied to the periodicity of rolling counters forward 48M clock as basic pulse; USB1.1 physical layer interface is used for converting the analog difference signal of USB to digital difference signal; Counter for count USB Frame Synchronization Test module produce basic pulse between periodicity; Comparer for the periodicity that compares counter and obtain and theoretical periodicity, or judges that clock frequency that current 48M clock generator generates is higher than lower than desirable 48M frequency thus; Reference current regulator is an arithmetic logic, corresponding value is calculated by changing the reference current of 48M clock generator inside according to the comparative result of comparer, make ring shake output frequency rise or reduce, 48M clock generator output frequency is adjusted it and is stabilized in 48M.
Further, 48M clock generator is that a clock ring shakes, and generated frequency is about 48M clock.This clock is supplied to USB Frame Synchronization Test module sum counter, simultaneously as the system clock of USB controller.
Further, non-volatile memory body is the non-volatile memory bodies such as flash or OTP, production test can be coordinated to join an initial value to 48M clock generator, due to production technology deviation, there is upper lower deviation up and down in the output clock of the 48M clock generator of each chips, if deviation ratio is comparatively large, the frame synchronization bag that USB Frame Synchronization Test module detects USB can be affected, therefore 48M clock initial deviation can be made to reduce to the preliminary adjustment of 48M clock generator during production test.
Further, non-volatile memory body is for accessing the initial calibration value of 48M clock generator, the steering logic that powers on is the Read Controller of a non-volatile memory body, automatically reference value is read from non-volatile memory body when system electrification, corresponding reference current is joined to 48M clock generator, make its output clock frequency have an initial calibration value, then reference current regulator makes it be stabilized in 48M to 48M clock generator adjustment output frequency.
USB of the present invention is from the system clock automatic calibrating method of equipment, and the concrete steps of the method are as follows:
1, system electrification, 48M clock generator is started working and is exported initial clock;
2, USB Frame Synchronization Test module receives the frame synchronization bag of PC.
3, counter and comparer work and Calculation Basis Current adjustment value adjusts its output clock frequency to 48M clock generator.
4, ceaselessly repeat 2 and 3 steps, meet the demands until export 48M frequency.
The invention has the beneficial effects as follows: the initial calibration value of 48M clock generator is stored in non-volatile memory body, reached the object of frequency adjustment by the reference current of reference current regulator adjustment 48M clock generator; USB Frame Synchronization Test module produces basic pulse as the benchmark of adjusting frequency; Do not need external crystal oscillator, inner generate 48M dominant frequency clock and not with external environment condition change all the time automatically regulating frequency to 48M.
Accompanying drawing explanation
Fig. 1 is system architecture diagram;
Embodiment
Below in conjunction with drawings and Examples, the present invention is described further.Although the present invention will be described in conjunction with preferred embodiment, should know, and not represent and limit the invention in described embodiment.On the contrary, the present invention will contain can be included in attached claims limit scope of the present invention in alternative, modified and equivalent.
The present embodiment, for-AS508HUSBKEY special chip, illustrates practicing of the art of this patent below in conjunction with Fig. 1:
AS508H is by USB interface and PC connecting communication, and PC is the main equipment end of USB interface, AS508H be USB interface from equipment end.
After AS508H is inserted into USB port as equipment, chip powers on simultaneously, and carries out resetting and initialization, and PC can ceaselessly send frame synchronization bag and packet to equipment end simultaneously.
After chip electrification reset, steering logic 8 can read a value of write in advance from one of non-volatile memory body 7 fixing address, revaluate is set to 10 bit widths, corresponding reference current is joined to 48M clock generator 1, its output clock frequency is made to have an initial value, during AS508H passes through, survey can make this initial value remain in positive and negative 2% scope of 48M, can ensure the correct reception next to the frame synchronization bag of usb bus data firm incipient stage.
PC gives the frame synchronization bag come and is converted to digital difference signal through USB1.1 physical layer interface 3, this signal gives USB Frame Synchronization Test module 2, when it receives frame synchronization bag, corresponding pulse can be generated, frequency due to frame synchronization bag is fixing, and the pulse therefore generated can be supplied to as a basic pulse periodicity that counter 4 counts 48M clock.
The desirable count cycle of 48M frequency to this basic pulse is fixing, the clock that 48M clock generator exports must exist upper inclined or partially lower, the periodicity that comparer 5 counts for the periodicity that compares counter 4 and obtain and theoretical 48M, or judge that clock frequency that current 48M clock generator 1 generates is higher than lower than desirable 48M frequency thus.
Reference current regulator 6 calculates corresponding value to the adjustment of 48M clock generator 1 output frequency according to the comparative result of comparer 5, and Regulation mechanism is the reference current changing 48M clock generator 1 inside, makes the ring output frequency that shakes rise or reduce.Because USB work clock 48M substantially can have stable compatible preferably within positive and negative 0.5% deviation, the program judges when 48M clock generator 1 output frequency is just do not carry out frequency adjustment within 48M positive and negative 0.2%, just frequency adjustment is carried out when output frequency deviation exports 0.2%, can guarantee that this USB can produce very stable 48M system clock from equipment not having the condition of external crystal-controlled oscillation, and make USB interface communication normal table.
During chip operation environmental change, or the external environment condition change such as such as voltage temperature can make reference current generation deviation, thus affects the output clock frequency of 48M clock generator 1.This automatic regulating machine can very promptly adjust within 48M clock generator 1 makes its output clock remain at 48M positive and negative 0.2% under the condition not connecing external crystal-controlled oscillation.USB saves a crystal oscillator from device product and can play huge commercial interest to cost control.
Concrete implementation step is as follows:
1, chip powers on, and 48M clock generator 1 is started working and exported initial clock.
2, USB Frame Synchronization Test module 2 receives the frame synchronization bag of PC.
3, counter and comparer work and Calculation Basis Current adjustment value adjusts its output clock frequency to 48M clock generator 1.
4, ceaselessly repeat 2 and 3 steps, meet the demands until export 48M frequency.
Terminological interpretation: USB: Chip Operating System.

Claims (2)

1. a USB is from the system clock automated calibration system of equipment, it is characterized in that: this system comprises 48M clock generator (1), USB Frame Synchronization Test module (2), USB1.1 physical layer interface (3), counter (4), comparer (5), reference current regulator (6), non-volatile memory body (7) and the steering logic that powers on (8), wherein 48M clock generator (1) is that the clock ring of a generated clock frequency shakes; USB Frame Synchronization Test module (2) for detecting the frame synchronization bag of USB, and produces the pulse of fixed frequency, is supplied to the periodicity of counter (4) counting 48M clock as basic pulse; USB1.1 physical layer interface (3) is for converting the analog difference signal of USB to digital difference signal; Counter (4) for count USB Frame Synchronization Test module produce basic pulse between periodicity; Comparer (5), for the periodicity that compares counter (4) and obtain and theoretical periodicity, judges that clock frequency that current 48M clock generator (1) generates is higher or lower than desirable 48M frequency thus; Reference current regulator (6) is an arithmetic logic, corresponding value is calculated according to the comparative result of comparer (5), thus change the inner reference current of 48M clock generator (1), make ring shake output frequency rise or reduce, 48M clock generator (1) output frequency is adjusted it and is stabilized in 48M; Non-volatile memory body (7) is for accessing the initial calibration value of 48M clock generator (1), the steering logic that powers on (8) is the Read Controller of a non-volatile memory body, automatically reference value is read from non-volatile memory body (7) when system electrification, corresponding reference current is joined to 48M clock generator (1), make its output clock frequency have an initial calibration value, then reference current regulator (6) makes it be stabilized in 48M to 48M clock generator (1) adjustment output frequency.
2. adopt USB as claimed in claim 1 from a method for the system clock automated calibration system of equipment, it is characterized in that: the concrete steps of the method are as follows:
(1) system electrification, 48M clock generator (1) is started working and exports initial clock;
(2) USB Frame Synchronization Test module (2) receives the frame synchronization bag of PC;
(3) counter and comparer work and Calculation Basis Current adjustment value adjusts its output clock frequency to 48M clock generator (1);
(4) ceaselessly 2 and 3 steps are repeated, until export 48M frequency.
CN201310214856.4A 2013-05-31 2013-05-31 A kind of USB is from the system clock automated calibration system of equipment and method Active CN103336754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310214856.4A CN103336754B (en) 2013-05-31 2013-05-31 A kind of USB is from the system clock automated calibration system of equipment and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310214856.4A CN103336754B (en) 2013-05-31 2013-05-31 A kind of USB is from the system clock automated calibration system of equipment and method

Publications (2)

Publication Number Publication Date
CN103336754A CN103336754A (en) 2013-10-02
CN103336754B true CN103336754B (en) 2016-03-09

Family

ID=49244924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310214856.4A Active CN103336754B (en) 2013-05-31 2013-05-31 A kind of USB is from the system clock automated calibration system of equipment and method

Country Status (1)

Country Link
CN (1) CN103336754B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104901687B (en) * 2015-05-20 2018-04-24 珠海市杰理科技股份有限公司 Clock frequency calibration method and system
CN106788258A (en) * 2015-12-22 2017-05-31 中国电子科技集团公司第二十研究所 A kind of clock circuit of frequency stabilization
DE102016222618A1 (en) * 2016-11-17 2018-05-17 Robert Bosch Gmbh Method for monitoring an integrated circuit timer
CN109687867B (en) * 2018-11-30 2023-04-07 珠海慧联科技有限公司 Clock calibration method and calibration circuit for crystal-oscillator-free USB (universal serial bus) equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2607698Y (en) * 2003-04-30 2004-03-24 武勇 Non-phase-locked loop USB 2.0 receiver
CN102819282A (en) * 2012-07-26 2012-12-12 大唐微电子技术有限公司 Clock recovery circuit device and corresponding method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100476929B1 (en) * 2002-09-03 2005-03-16 삼성전자주식회사 USB system having card type USb interface connector

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2607698Y (en) * 2003-04-30 2004-03-24 武勇 Non-phase-locked loop USB 2.0 receiver
CN102819282A (en) * 2012-07-26 2012-12-12 大唐微电子技术有限公司 Clock recovery circuit device and corresponding method

Also Published As

Publication number Publication date
CN103336754A (en) 2013-10-02

Similar Documents

Publication Publication Date Title
CN103336754B (en) A kind of USB is from the system clock automated calibration system of equipment and method
CN104122936B (en) A kind of MCU chip frequency-dividing clock means for correcting and method
CN108063617A (en) The clock frequency calibration method and system of a kind of low frequency RC oscillators
CN109586691B (en) Clock calibration method, device, system, storage medium and computer equipment
CN104901690A (en) Method and device for automatically calibrating ring oscillator in test mode
CN104679098A (en) Automatic calibration circuit for clock frequency of microcontroller
CN104410413B (en) Atomic frequency standard frequency Correction Method, device and atomic frequency standard
CN104135256A (en) A delay sampling circuit having self-calibration function
CN103441760A (en) High-precision annular oscillator, and frequency calibration circuit and method thereof
CN102571080A (en) clock recovery method and circuit supporting dynamic calibration
CN102830748A (en) Method and system for calibrating clock skew inside chip
CN105811982A (en) ADC chip reference voltage testing and calibration method
CN101197367A (en) Semiconductor integrated circuit device and internal power control system including the same
CN108011631A (en) Work clock generation method, clock source and chip
CN102857197B (en) A kind of calibration steps improving built-in RC oscillator frequency precision
CN103677078A (en) Method, system and chip for calibrating clock frequency
CN103424731A (en) Electric energy meter real-time clock correction device and correction method
CN205847231U (en) Chip internal ring shakes calibration system
TWI762384B (en) Method and apparatus for performing on-system phase-locked loop management in memory device
CN203492007U (en) High-precision ring oscillator and frequency calibration circuit thereof
CN103973266A (en) Oscillator correction circuit and method and integrated circuit
CN202614950U (en) Time system for earthquake data acquisition
CN204065907U (en) A kind of MCU chip frequency-dividing clock means for correcting
CN103580684A (en) Chip clock signal generation circuit and chip system
CN105677527A (en) System and method for automatically measuring maximum working frequency of embedded memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: Hangzhou City, Zhejiang province 311121 Yuhang Wuchang Street No. 998 West Sea Park Building 9 East

Applicant after: Hangzhou Shengyuan Chip Technique Co., Ltd.

Address before: The city of Hangzhou in West Zhejiang province 311121 No. 998 Building 9 East Sea Park

Applicant before: Hangzhou Shengyuan Chip Technique Co., Ltd.

CB02 Change of applicant information

Address after: Hangzhou City, Zhejiang province 311121 Yuhang Wuchang Street No. 998 West Sea Park Building 9 East

Applicant after: HANGZHOU SYNODATA SECURITY TECHNOLOGY CO., LTD.

Address before: Hangzhou City, Zhejiang province 311121 Yuhang Wuchang Street No. 998 West Sea Park Building 9 East

Applicant before: Hangzhou Shengyuan Chip Technique Co., Ltd.

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant