CN114697923A - Bluetooth device and Bluetooth clock calibration method and system thereof - Google Patents

Bluetooth device and Bluetooth clock calibration method and system thereof Download PDF

Info

Publication number
CN114697923A
CN114697923A CN202011599691.3A CN202011599691A CN114697923A CN 114697923 A CN114697923 A CN 114697923A CN 202011599691 A CN202011599691 A CN 202011599691A CN 114697923 A CN114697923 A CN 114697923A
Authority
CN
China
Prior art keywords
bluetooth
value
local clock
data packet
recording
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.)
Pending
Application number
CN202011599691.3A
Other languages
Chinese (zh)
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.)
Actions Technology Co Ltd
Original Assignee
Actions 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 Actions Technology Co Ltd filed Critical Actions Technology Co Ltd
Priority to CN202011599691.3A priority Critical patent/CN114697923A/en
Publication of CN114697923A publication Critical patent/CN114697923A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • H04B5/48
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the invention mainly aims to provide a Bluetooth clock calibration method, which comprises the following steps: receiving a Bluetooth data packet sent by a master device, and recording a local clock value T1 when the Bluetooth data packet is received; continuously receiving a Bluetooth data packet sent by the master device, and recording a local clock value T2 when the current Bluetooth data packet is received; recording the slot number slot _ cnt passing from the local clock value T1 to the local clock value T2; and calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value. The embodiment of the invention also correspondingly provides the Bluetooth equipment and a Bluetooth clock calibration system. By adopting the technical scheme provided by the embodiment of the invention, an additional calibration process when the product leaves a factory can be omitted, and a large amount of time and labor are saved.

Description

Bluetooth device and Bluetooth clock calibration method and system thereof
Technical Field
The present application relates to the field of communications technologies, and in particular, to a bluetooth device and a bluetooth clock calibration method and system thereof.
Background
In recent years, with the generalization of smart phones, bluetooth wireless communication technology has been widely applied, wherein applications of peripheral audio expansion devices of computer televisions, such as bluetooth headsets, bluetooth sound equipment, and the like, are more concerned. The bluetooth technology is based on data packet, and has a protocol of master-slave structure, a master device can communicate with several slave devices, each bluetooth device has an internal system bluetooth clock to determine the timing and frequency hopping of the transceiver, all the devices share the clock of the master device, i.e. when data is transmitted, each slave device adds a proper offset to its local clock to keep synchronization with the clock of the master device, thereby determining the data transmission and reception time.
The generation of the Bluetooth clock is realized by depending on the output frequency of the crystal oscillator, the crystal oscillators of different devices have different precision, and even the crystal oscillators of the same batch of products have slight difference. The output frequency of the crystal oscillator can be fine-tuned by a capacitor integrated outside the IC or inside the IC. The existing calibration method is that a special calibration instrument or equipment is used for calibrating the Bluetooth clock in the production stage of the Bluetooth equipment, much time and labor are consumed, and the crystal oscillator output frequency deviation is caused by factors such as temperature, weather and component aging after products leave a factory, so that the calibration is difficult. Therefore, the existing bluetooth clock calibration method has a big problem.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a bluetooth clock calibration method, which can save an additional calibration process when a product is shipped, and save time and labor.
The embodiment of the invention is realized in such a way that a Bluetooth clock calibration method comprises the following steps:
receiving a Bluetooth data packet sent by a master device, and recording a local clock value T1 when the Bluetooth data packet is received;
continuously receiving a Bluetooth data packet sent by the master device, and recording a local clock value T2 when the current Bluetooth data packet is received;
recording the slot number slot _ cnt passing from the local clock value T1 to the local clock value T2;
and calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
Further, the difference between the local clock value T2 and the local clock value T1 is greater than the predetermined time Δ Tstat.
Further, the calculating the local clock bias value is: local clock value T2-local clock values T1-625 slot _ cnt.
Further, the adjusting the matching capacitor according to the local clock deviation value includes:
if the local clock deviation is larger than 0, the matching capacitor is increased;
and if the local clock deviation is less than 0, reducing the matching capacitor.
Further, the method further comprises:
a matching capacitance value is preset as a default crystal oscillator calibration value.
Further, the presetting a matching capacitance value comprises:
and testing the frequency deviation of a part of prototypes by using a calibration instrument, and taking the median of the calibration capacitance values of the part of prototypes as a default crystal oscillator calibration value.
Further, the method further comprises:
and stopping the calibration if the absolute value of the local clock deviation is smaller than a preset value delta Tmax.
Further, the predetermined value Δ Tmax is 2 microseconds, the predetermined time Δ Tstat is 500 milliseconds, and the slot number slot _ cnt is 800.
Further, the calculating the local clock deviation value further includes counting the local clock deviation values a plurality of times and taking a median value thereof.
And further, connection is initiated with external equipment, master-slave switching is initiated to the external equipment through an LMP command, and the external equipment is switched to master equipment.
According to another aspect of the embodiments of the present invention, the embodiments of the present invention further provide a bluetooth device, which can save an additional calibration process when a product leaves a factory, and save time and labor.
The embodiment of the invention is realized in such a way that a bluetooth clock calibration system comprises:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
According to another aspect of the embodiments of the present invention, an embodiment of the present invention further provides a bluetooth clock calibration system, which can save an additional calibration process when a product leaves a factory, and save time and labor.
The embodiment of the invention is realized in such a way that a Bluetooth clock calibration system comprises a master device and a Bluetooth device, wherein the master device and the Bluetooth device are subjected to Bluetooth pairing application;
the master device is used for sending a Bluetooth data packet;
the bluetooth device further includes:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
According to the technical scheme, the embodiment of the invention has the following effects: the calibrated clock in the intelligent master device with higher relative precision such as a mobile phone is used as a reference without using an independent calibration flow and an independent instrument, and the calibration function of the Bluetooth clock is realized by dynamically adjusting the integrated capacitor inside the IC by tracking the clock of the master device in the synchronous Bluetooth piconet in the use process, so that the calibration process of the Bluetooth clock in the production link can be saved by dynamically calibrating the local Bluetooth clock, the product requirements are met, and the time and labor expenses are reduced; because the calibrated crystal oscillator clock may drift along with the change of time and temperature, the deviation of the Bluetooth clock is continuously monitored in the communication process, and if the deviation exceeds the allowable deviation, the Bluetooth clock can be dynamically adjusted at any time. Because the main equipment and the Bluetooth equipment to be calibrated are used for calibration in the daily pairing and use process, the whole scheme can realize calibration without a special calibration instrument, and meanwhile, extra calibration time before leaving a factory is saved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 shows a flowchart of a bluetooth communication clock calibration method provided in the present application;
fig. 2 is a schematic diagram illustrating synchronization words transmitted by a master device and a bluetooth device during bluetooth communication provided by the present application;
FIG. 3 is a diagram illustrating synchronization words transmitted by a master device and a Bluetooth device during Bluetooth communication according to another embodiment of the present application;
FIG. 4 shows a data format of a custom test protocol in another embodiment provided herein.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments, and the order of steps in the following embodiments is merely illustrative and can be modified without conflict.
As shown in fig. 1, a bluetooth clock calibration method provided by an embodiment of the present invention includes the following steps:
s101, receiving a Bluetooth data packet sent by a master device, and recording a local clock value T1 when the Bluetooth data packet is received;
s102, continuously receiving the Bluetooth data packet sent by the master device, and recording a local clock value T2 when the current Bluetooth data packet is received;
s103, recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and S104, calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
The method for calibrating the Bluetooth clock is a method for calibrating a local clock of the Bluetooth device to be calibrated, and the Bluetooth device to be calibrated is used as a slave device to be connected with a master device in a Bluetooth mode to be calibrated. The master device is a device which is paired with the device to be calibrated in daily use, and is an intelligent device with a relatively high-precision internal clock, such as a mobile phone, a tablet computer, a notebook computer and the like, the master device and the bluetooth device perform bluetooth pairing application, for example, after the master device mobile phone is paired with a bluetooth sound box, the bluetooth sound box performs calibration of the internal clock by using bluetooth connection with the mobile phone, and after the pairing, daily application, such as music playing, call making, bluetooth control, data transmission and the like can be performed, and the calibration process can be performed during bluetooth connection after the master device and the bluetooth device are paired. Because the clock of the slave device in the bluetooth piconet follows the clock of the master device, the listening window can be enlarged as the slave device to avoid the clock being too deviated to synchronize. However, the window of the smart device is not pulled so large, so if the local bluetooth device is used as the master device, the smart device with too large clock offset may not receive the bluetooth data packet sent by the local bluetooth device, so the embodiment of the present invention needs the smart device to be used as the master device of the bluetooth piconet, and the local bluetooth device is used as the slave device. According to the bluetooth protocol, the interval of a single slot packet transmitted by a master device for a normal connection state is 1250 us. The slave device can calibrate the local clock by listening for the point in time when the bluetooth packet sent by the master device was received. As shown in fig. 2, sync point is a time point when a bluetooth controller receives a bluetooth packet synchronization word sent by a master device, and for a single-slot packet, since the interval between two adjacent sync points is smaller and only 2 slots (1250us) are provided, it is difficult to measure clock skew due to the influence of clock resolution. Similarly, for a multi-slot packet, the interval between two adjacent sync points is different, for example, a 3-slot bluetooth packet is 3 × 625+625 ═ 2500us, and a 5-slot bluetooth packet is 5 × 625+625 ═ 3750 us. Therefore, the method provided by the embodiment of the invention records the deviation between the master device and the local clock after the sync point n times, and then calibrates the local clock according to the deviation, and the clock source of the local clock comes from the crystal oscillator, so that the deviation of the crystal oscillator can be reflected through the deviation of the local clock. Fig. 3 is a schematic diagram of a sync word for data transmission between a master device and a bluetooth device in a bluetooth communication process according to an embodiment of the present invention.
Specifically, the master device sends a Bluetooth data packet to the Bluetooth device to be calibrated through Bluetooth connection, the Bluetooth device to be calibrated receives the Bluetooth data packet sent by the master device, records a local clock value T1 when the Bluetooth controller hardware receives the Bluetooth data packet, and corresponds to Sync point 1; keeping communication with the master device, continuously receiving the Bluetooth data packet sent by the master device, and recording a local clock value T2 when the current Bluetooth data packet is received by the Bluetooth controller hardware, wherein the local clock value T2 corresponds to Sync point n; the Bluetooth controller hardware records the slot number slot _ cnt passed by the Bluetooth data packet from T1 to the current Bluetooth data packet, and no matter whether a single-slot Bluetooth packet or a multi-slot data packet is sent, although the interval between two adjacent sync points is different, because each slot is fixed, the method for calculating the slot number slot _ cnt is the same. Because it is possible that a data packet spans a plurality of bluetooth clock slots, the number of slots at intervals needs to be counted, instead of receiving the number of bluetooth data packets sent by the master device; calculating a local clock offset value of the Bluetooth data packets received from the master device in a period from T1 to T2 by using the following formula T2-T1-625 slot _ cnt; if the local clock deviation value is larger than 0, the local Bluetooth clock is faster relative to the clock of the master device, and the matching capacitor is increased; if the local clock deviation value is less than 0, the local Bluetooth clock is slower than the clock of the main equipment, and the matching capacitor is reduced; the matching capacitor can be designed inside the chip or outside the chip, for example, a crystal oscillator matching capacitor is integrated inside the chip, the size of the crystal oscillator matching capacitor can be dynamically modified through software, and the crystal oscillator oscillation frequency is finely adjusted by adjusting the size of the matching capacitor according to the local clock deviation value.
The embodiment of the invention provides a preferred embodiment, firstly, a Bluetooth device receives a Bluetooth data packet sent by a master device, and records a local clock value T1 when a Bluetooth controller hardware receives the Bluetooth data packet; keeping communication with the master device, continuously receiving the Bluetooth data packet sent by the master device until the time interval between the current local time and sync point1 is greater than a preset time delta Tstat, recording a local clock value T2 when the Bluetooth controller hardware receives the current Bluetooth data packet, and if the time price between T2 and T1 is too small, performing offset value measurement difficultly due to the influence of clock resolution, setting a relatively long sending process in a calibration process to perform calibration; bluetooth controller hardware records the slot number slot _ cnt passed by the current Bluetooth data packet from T1; calculating a local clock offset value of the Bluetooth data packets received from the master device in a period from T1 to T2 by using the following formula T2-T1-625 slot _ cnt; if the local clock deviation value is larger than 0, the matching capacitor is increased; and if the local clock offset difference is less than 0, reducing the matching capacitor.
The embodiment of the present invention provides another preferred embodiment, on the basis of the foregoing embodiment, before calibration is performed, a matching capacitance value is preset as a default crystal oscillator calibration value, the default matching capacitance value may be set empirically, or a frequency deviation of a part of prototypes is tested by using a calibration instrument, and a median of the calibration capacitance values of the part of prototypes is taken as a preset matching capacitance value corresponding to calibration of all factory-shipped and default crystal oscillators.
In another preferred embodiment, based on the foregoing embodiment, if the absolute value of the local clock bias value is smaller than the predetermined value Δ Tmax, the calibration is stopped, otherwise, the matching capacitance value is adjusted according to the result of the local clock bias value. In order to ensure the clock accuracy, the predetermined value Δ Tmax should be as small as possible, but the convergence speed and stability should be considered, and the adjustment may be made according to the actual situation, and the clock accuracy of the negotiation device may be reported by LMP _ timing _ access _ req/LMP _ timing _ access _ res through a Link Manager protocol (LMP _ timing _ req) in the bluetooth connection phase, and the clock calibration target may be set accordingly. And when the deviation value does not converge to the target value after the primary calibration, counting the deviation value again and adjusting again until the deviation value converges to the target value, and if the deviation value cannot converge to the target value within a period of time, setting by using the current optimal value. For example, according to the bluetooth standard specification, the clock accuracy requirement is 20-500 ppm, and for a 24M crystal oscillator, the clock frequency deviation in 1 second is 24MHz × 20ppm — 480Hz, and the maximum time deviation in 1 second is 480Hz/24000000 — 20 us. According to the actual measurement that 0.1pF matching capacitor corresponds to the change of a 24MHz crystal oscillator clock at 15Hz, and the corresponding time deviation 15/24000000 is 625 ns. Considering that the clock of the master device has a certain deviation, Δ Tmax is minimized. For example, when Δ Tstat is 500ms and slot _ cnt is 800, 20ppm calibration is performed, and Δ Tmax may be 2us in consideration of the bluetooth clock counting error and the trimming capacitor error.
The embodiment of the invention provides another preferred embodiment, which can avoid the larger deviation of the clock calibration value caused by the sync point error of a single Bluetooth data packet by counting the clock deviation value of the interval of multiple packet transmissions and taking the median value on the basis of the one-time calibration. In order to further ensure the calibration accuracy, in the process of communication between the master device and the bluetooth device, when the master device requests to enter a sniff state, a reject is required to avoid the master device entering the sniff state, otherwise the master device may be switched to a low-accuracy clock, which causes the calibration accuracy to be poor. And when the Bluetooth device monitors the transmission time slot of the master device, the proper monitoring window width is set according to the calibration deviation delta max. The listening window width is increased when Δ max is larger, whereas the listening window width may be decreased appropriately. Because the calibrated crystal oscillator clock may drift along with the change of time and temperature, the deviation of the Bluetooth clock is continuously monitored in the communication process with the intelligent equipment with a high-precision clock, and if the deviation exceeds the allowable deviation, fine adjustment is carried out according to the technical scheme provided by the embodiment of the invention.
The embodiment of the present invention provides another preferred embodiment, when a bluetooth device to be calibrated is connected back to an intelligent device such as a mobile phone, at this time, a bluetooth connection initiated by the local bluetooth device to be calibrated may be performed, at this time, the bluetooth device to be calibrated is a master device in the bluetooth connection, and the mobile phone is a slave device in the bluetooth connection. According to the embodiment provided by the invention, the Bluetooth device to be calibrated initiates master-slave switching through an LMP command, the Bluetooth device to be calibrated is switched into slave equipment, and the mobile phone is switched into master equipment, so that the Bluetooth device to be calibrated needs to synchronize the Bluetooth clock of the mobile phone, and the purpose of calibrating the Bluetooth device clock is achieved. If the connection is the active connection initiated by the mobile phone, the mobile phone is the master device, and the bluetooth device to be calibrated can be directly calibrated without initiating master-slave switching.
The finally adjusted matching capacitance value of the technical scheme provided by the embodiment of the invention can be stored in an internal register or a nonvolatile memory, such as Nor Flash, when the Bluetooth connection is carried out next time, the stored calibration result can be loaded and used firstly, whether the deviation value is within the allowable range or not is checked, and the calibration flow is restarted only when the deviation is overlarge, so that unnecessary calibration can be avoided.
The embodiment of the present invention provides another preferred embodiment, and a smart device such as a mobile phone can be used to install a calibration app in a factory for factory calibration. Therefore, the Bluetooth equipment has accurate calibration when leaving the factory, calibration in the use of a terminal client is avoided, and the product quality is more guaranteed.
The embodiment of the present invention provides another preferred embodiment, in which a bluetooth spp protocol (Serial Port Profile) is used for communication between an intelligent device such as a mobile phone and a bluetooth device to be calibrated. And transmitting the customized test protocol on the spp. The packet format is shown in fig. 4, and is specifically defined in the following table.
Figure BDA0002870649930000081
Figure BDA0002870649930000091
The mobile phone calibration app usage flow comprises the following steps:
(1) connecting a Bluetooth device spp profile;
(2) acquiring model numbers and firmware versions of a prototype;
(3) acquiring and displaying a current crystal oscillator matching capacitance value;
(4) continuously sending test data packets with specific lengths;
(5) the prototype machine receives the data packet and carries out a calibration process;
(6) after the prototype calibration is finished, sending a calibration result to the mobile phone;
(7) and the mobile phone application displays the calibration result and the calibrated crystal oscillator matching capacitance value.
According to another aspect of the embodiments of the present invention, there is also provided a bluetooth device, including:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
According to another aspect of the embodiments of the present invention, there is also provided a bluetooth clock calibration system, including a master device and a bluetooth device, where the master device and the bluetooth device perform bluetooth pairing application;
the master device is used for sending a Bluetooth data packet;
the bluetooth device further includes:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
In the bluetooth clock calibration system provided in this embodiment, a bluetooth device to be calibrated is used as a slave device to perform bluetooth connection with a master device for calibration, the master device is a device that is paired with the device to be calibrated in daily use, and is an intelligent device with a relatively high-precision internal clock, such as a mobile phone, a tablet computer, a notebook computer, and the like, the master device performs bluetooth pairing application with the bluetooth device, for example, after the master device mobile phone is paired with a bluetooth speaker, the bluetooth speaker performs calibration of the internal clock by using bluetooth connection with the mobile phone, and after the pairing, daily application, such as music playing, making a call, bluetooth control, data transmission, and the like can be performed, and the calibration process can be performed during bluetooth connection after the master device and the bluetooth device are paired.
The technical solutions of the bluetooth device and the bluetooth clock calibration system of the above embodiments are substantially the same as those of the bluetooth clock calibration method of the above embodiments, and are not described herein again.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A Bluetooth clock calibration method, comprising:
receiving a Bluetooth data packet sent by a master device, and recording a local clock value T1 when the Bluetooth data packet is received;
continuously receiving a Bluetooth data packet sent by the master device, and recording a local clock value T2 when the current Bluetooth data packet is received;
recording the slot number slot _ cnt passing from the local clock value T1 to the local clock value T2;
and calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
2. The method of claim 1, wherein the difference between the local clock value T2 and the local clock value T1 is greater than a predetermined time Δ Tstat.
3. The method of claim 1, wherein the calculating the local clock bias value is: local clock value T2-local clock values T1-625 slot _ cnt.
4. The method of claim 1, wherein the adjusting the matching capacitance according to the local clock bias value comprises:
if the local clock deviation is larger than 0, the matching capacitor is increased;
and if the local clock deviation is less than 0, reducing the matching capacitor.
5. The method of claim 1, further comprising:
a matching capacitance value is preset as a default crystal oscillator calibration value.
6. The method of claim 5, wherein the presetting a matching capacitance value comprises:
and testing the frequency deviation of a part of prototypes by using a calibration instrument, and taking the median of the calibration capacitance values of the part of prototypes as a default crystal oscillator calibration value.
7. The bluetooth clock calibration method according to claim 1, characterized in that the method further comprises:
and stopping the calibration if the absolute value of the local clock deviation is smaller than a preset value delta Tmax.
8. The method of claim 7, wherein the predetermined value Δ Tmax is 2 μ sec, the predetermined time Δ Tstat is 500ms, and the slot number slot _ cnt is 800.
9. The Bluetooth clock calibration method of claim 4,
the calculating the local clock bias value further includes counting the local clock bias values a plurality of times and taking a median value thereof.
10. The method of claim 1, further comprising:
and initiating connection with external equipment, initiating master-slave switching to the external equipment through an LMP command, and switching the external equipment to master equipment.
11. A bluetooth device, comprising:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
12. The Bluetooth clock calibration system is characterized by comprising a master device and a Bluetooth device, wherein the master device and the Bluetooth device perform Bluetooth pairing application;
the master device is used for sending a Bluetooth data packet;
the bluetooth device further includes:
the first recording device is used for receiving a Bluetooth data packet sent by the master device and recording a local clock value T1 when the Bluetooth data packet is received;
the second recording device is used for continuously receiving the Bluetooth data packet sent by the master device and recording a local clock value T2 when the current Bluetooth data packet is received;
the statistical device is used for recording the slot quantity slot _ cnt passing from the local clock value T1 to the local clock value T2;
and the calculating device is used for calculating a local clock deviation value and adjusting the matching capacitor according to the local clock deviation value.
CN202011599691.3A 2020-12-29 2020-12-29 Bluetooth device and Bluetooth clock calibration method and system thereof Pending CN114697923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011599691.3A CN114697923A (en) 2020-12-29 2020-12-29 Bluetooth device and Bluetooth clock calibration method and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011599691.3A CN114697923A (en) 2020-12-29 2020-12-29 Bluetooth device and Bluetooth clock calibration method and system thereof

Publications (1)

Publication Number Publication Date
CN114697923A true CN114697923A (en) 2022-07-01

Family

ID=82132026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011599691.3A Pending CN114697923A (en) 2020-12-29 2020-12-29 Bluetooth device and Bluetooth clock calibration method and system thereof

Country Status (1)

Country Link
CN (1) CN114697923A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115038162A (en) * 2022-08-12 2022-09-09 广州安凯微电子股份有限公司 Method and device for rapid same-frequency and same-phase adjustment of Bluetooth clock
CN116236205A (en) * 2022-12-19 2023-06-09 天津大学 Multichannel miniature brain electricity acquisition system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115038162A (en) * 2022-08-12 2022-09-09 广州安凯微电子股份有限公司 Method and device for rapid same-frequency and same-phase adjustment of Bluetooth clock
CN115038162B (en) * 2022-08-12 2022-11-18 广州安凯微电子股份有限公司 Method and device for rapid same-frequency and same-phase adjustment of Bluetooth clock
CN116236205A (en) * 2022-12-19 2023-06-09 天津大学 Multichannel miniature brain electricity acquisition system

Similar Documents

Publication Publication Date Title
CN114697923A (en) Bluetooth device and Bluetooth clock calibration method and system thereof
CN101489290B (en) Receiving apparatus, signal processing system and signal receiving method
JP5069697B2 (en) Hearing aid with adaptive data reception timing
EP2347533B1 (en) Methods and apparatus for supporting multiple communications modes of operation
US8179925B2 (en) Sink device for a wireless local area network
US20190286188A1 (en) Synchronisation of Hardware Clock Using Software Clock Synchronisation Error
JPH08251656A (en) Radiotelephone
JP2017539178A (en) How to synchronize network device clocks
CN103116322B (en) Fine setting tunable oscillator is to mate method and the CAN communication controler of CAN
JPH07182067A (en) Detection device of frequency difference between local oscillator and reference signal
WO2020135198A1 (en) Clock synchronization method and device, and storage medium
WO2008139348A1 (en) Method and system for synchronization of at least two terminal communication systems and at least one counterpart communication station within a multi-standard wireless communication system
CN113076278A (en) USB device clock calibration method, device, system and computer readable storage medium
CN114788218A (en) Synchronization device and synchronization method
JP4045842B2 (en) Method and apparatus for correcting error caused by Doppler shift
CN113552794A (en) Automatic calibration device and method for clock signal in power chip
US7433709B2 (en) Method of calibrating clocks for two independent radio access technologies without the use of additional hardware
CN111416673B (en) Method, device and computer readable storage medium for wirelessly measuring Bluetooth frequency offset
KR20210055012A (en) Multi-member bluetooth device capable of reducing complexity of updating internal clock of bluetooth circuit
US10069584B2 (en) Frequency calibration apparatus and method
Griffith et al. A crystal-less bluetooth low energy radio using a MEMS-based frequency reference system
JP5096529B2 (en) Frequency calibration fixing device and frequency calibration fixing method
KR20210055010A (en) Auxiliary bluetooth circuit of multi-member bluetooth device capable of reducing complexity of updating internal clock of bluetooth circuit
US11405173B2 (en) Receiver for high precision synchronization in a shared medium
JP2897684B2 (en) Wireless transceiver

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination