Patent ID: 9552012
Date: 2017-01-24
CPC Classifications: G06F

Claim:
1. A frequency calibration method applicable in a Universal Serial Bus (USB) device, the frequency calibration method comprising: coupling the USB device to a USB host; utilizing the USB device to receive a polling low frequency periodic signal from the USB host; determining a host type of the USB host according to the polling low frequency periodic signal; and calibrating a programmable oscillator of the USB device according to a specific clock period corresponding to the host type, to make the programmable oscillator generate a target oscillating signal having a predetermined frequency; wherein the step of determining the host type of the USB host according to the polling low frequency periodic signal comprises: extracting a low frequency clock signal corresponding to the polling low frequency periodic signal; controlling the programmable oscillator to generate an oscillating signal; adjusting the oscillating signal of the programmable oscillator to serve as a coarsely-adjusted oscillating signal according to a pulse width time of the low frequency clock signal; utilizing the coarsely-adjusted oscillating signal of the programmable oscillator to calculate a pulse period of the low frequency clock signal; calculating a ratio of the pulse period and the pulse width time; and determining the host type of the USB host according to the ratio.