| CPC G06F 1/08 (2013.01) [G06V 40/13 (2022.01)] | 18 Claims |

|
1. A clock calibration method, for calibrating a clock of a fingerprint chip provided in an electronic device, comprising:
sending a configuration command to the fingerprint chip to cause the fingerprint chip to map a current clock of the fingerprint chip to a target pin of the fingerprint chip;
detecting the target pin to acquire the current clock of the fingerprint chip;
determining a calibration value based on a target clock and the current clock of the fingerprint chip; and
sending the calibration value to a calibration register in the fingerprint chip, the calibration value being used to adjust the current clock of the fingerprint chip;
wherein the detecting the target pin to acquire the current clock of the fingerprint chip, comprises:
detecting the target pin to capture n pulse signals of the current clock of the fingerprint chip, wherein n is a positive integer;
the determining a calibration value based on a target clock and the current clock of the fingerprint chip, comprises:
determining the frequency of the current clock based on time for the n pulse signals; and
determining the calibration value based on the difference between the frequency of the target clock and the frequency of the current clock;
wherein the detecting the target pin to capture n pulse signals of the current clock of the fingerprint chip, comprises:
acquiring a sampling clock, wherein the sampling clock is a clock in the electronic device;
detecting the target pin based on the sampling clock, capturing n rising edges or falling edges of the current clock of the fingerprint chip to capture the n pulse signals of the current clock;
wherein a frequency of the sampling clock is more than twice the frequency of the current clock of the fingerprint chip.
|