Local time calibration with timing synchronization function (TSF) from wireless local area network (WLAN) beacon

By calibrating high accuracy clocks in low power computing devices with WLAN beacon TSF, the solution addresses timing errors in sleep modes, achieving precise time synchronization with reduced power consumption.

WO2026065355A1PCT designated stage Publication Date: 2026-04-02QUALCOMM INC +8
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Low power computing devices face challenges in maintaining accurate timing references due to the instability and inaccuracy of system clocks when they enter sleep modes, leading to significant timing errors over time.

Method used

Calibrate the high accuracy clock time using a timing synchronization function (TSF) from wireless local area network (WLAN) beacon transmissions, ensuring accurate time synchronization even in sleep modes.

Benefits of technology

Reduces timing reference errors to less than one second every four hours, maintaining precise timekeeping across active and sleep states without excessive power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024122627_02042026_PF_FP_ABST
    Figure CN2024122627_02042026_PF_FP_ABST
Patent Text Reader

Abstract

A method for calibrating a local time within a computing device includes obtaining a first time stamp from a first beacon received from an access point. The method includes obtaining a first clock time from a system clock in response to receiving the first beacon. The method includes obtaining a second time stamp from a second beacon received from the access point, and obtaining a second clock time from the system clock in response to receiving the second beacon. The method includes calculating a differential time as a first difference between the first time stamp and the second time stamp, and includes calculating a clock difference between the second clock time and the first clock time. The method includes calculating a time compensation value as a second difference between the differential time and the clock difference. The method calculates a real-world time based on the time compensation value.
Need to check novelty before this filing date? Find Prior Art

Description

LOCAL TIME CALIBRATION WITH TIMING SYNCHRONIZATION FUNCTION (TSF) FROM WIRELESS LOCAL AREA NETWORK (WLAN) BEACONBACKGROUNDField

[0001] Aspects of the present disclosure relate to low power computing devices, and more specifically to calibrating local time with a timing synchronization function (TSF) from a wireless local area network (WLAN) beacon.

[0002] Background

[0003] Mobile or portable computing devices include mobile phones, laptop, palmtop and tablet computers, portable digital assistants (PDAs) , portable game consoles, and other portable electronic devices. Mobile computing devices are comprised of many electrical components that consume power and generate heat. The components (or compute devices) may include system-on-a-chip (SoC) devices, graphics processing unit (GPU) devices, neural processing unit (NPU) devices, digital signal processors (DSPs) , and modems, among others.

[0004] SoC devices may include a wireless local area network (WLAN) connectivity chip. Such a chip may include timing sources that may be called by user applications for timing references. However, if the chip enters a sleep mode or sleep state, the timing sources may not provide the frequency stability and accuracy desired by some user applications.SUMMARY

[0005] In aspects of the present disclosure, a method for calibrating a local time within a computing device includes obtaining a first time stamp from a first beacon received from an access point. The method also includes obtaining a first clock time from a system clock in response to receiving the first beacon. The method further includes obtaining a second time stamp from a second beacon received from the access point. The method still further includes obtaining a second clock time from the system clock in response to receiving the second beacon. The method also includes calculating a differential time as a first difference between the first time stamp and the second time  stamp. The method also includes calculating a clock difference between the second clock time and the first clock time. The method further includes calculating a time compensation value as a second difference between the differential time and the clock difference. The method still further includes calculating a real-world time based on the time compensation value.

[0006] Other aspects of the present disclosure are directed to an apparatus. The apparatus has one or more memories and one or more processors coupled to the memory. The processor (s) is configured to obtain a first time stamp from a first beacon received from an access point. The processor (s) is also configured to obtain a first clock time from a system clock in response to receiving the first beacon. The processor (s) is further configured to obtain a second time stamp from a second beacon received from the access point. The processor (s) is still further configured to obtain a second clock time from the system clock in response to receiving the second beacon. The processor (s) is also configured to calculate a differential time as a first difference between the first time stamp and the second time stamp. The processor (s) is also configured to calculate a clock difference between the second clock time and the first clock time. The processor (s) is further configured to calculate a time compensation value as a second difference between the differential time and the clock difference. The processor (s) is still further configured to calculate a real-world time based on the time compensation value.

[0007] In other aspects of the present disclosure, a non-transitory computer-readable medium with program code recorded thereon is disclosed. The program code is executed by a processor and includes program code to obtain a first time stamp from a first beacon received from an access point. The program code also includes program code to obtain a first clock time from a system clock in response to receiving the first beacon. The program code further includes program code to obtain a second time stamp from a second beacon received from the access point. The program code still further includes program code to obtain a second clock time from the system clock in response to receiving the second beacon. The program code also includes program code to calculate a differential time as a first difference between the first time stamp and the second time stamp. The program code also includes program code to calculate a clock difference between the second clock time and the first clock time. The program code  further includes program code to calculate a time compensation value as a second difference between the differential time and the clock difference. The program code still further includes program code to calculate a real-world time based on the time compensation value.

[0008] This has outlined, rather broadly, the features and technical advantages of the present disclosure in order that the detailed description that follows may be better understood. Additional features and advantages of the present disclosure will be described below. It should be appreciated by those skilled in the art that this present disclosure may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present disclosure. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the teachings of the present disclosure as set forth in the appended claims. The novel features, which are believed to be characteristic of the present disclosure, both as to its organization and method of operation, together with further objects and advantages, will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present disclosure.BRIEF DESCRIPTION OF THE DRAWINGS

[0009] For a more complete understanding of the present disclosure, reference is now made to the following description taken in conjunction with the accompanying drawings.

[0010] FIGURE 1 illustrates an example implementation of a host system-on-a-chip (SoC) , including a wireless local area network (WLAN) chip for time calibration, in accordance with certain aspects of the present disclosure.

[0011] FIGURE 2 is timing diagram illustrating time calculation for an application requested timing reference, in accordance with various aspects of the present disclosure.

[0012] FIGURE 3 is a flow diagram illustrating an example process performed, for example, by a computing device, in accordance with various aspects of the present disclosure.

[0013] FIGURE 4 is a block diagram showing an exemplary wireless communications system in which a configuration of the present disclosure may be advantageously employed.

[0014] FIGURE 5 is a block diagram illustrating a design workstation used for circuit, layout, and logic design of components, in accordance with various aspects of the present disclosure.DETAILED DESCRIPTION

[0015] The detailed description set forth below, in connection with the appended drawings, is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of the various concepts. It will be apparent, however, to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring such concepts.

[0016] As described, the use of the term “and / or” is intended to represent an “inclusive OR, ” and the use of the term “or” is intended to represent an “exclusive OR. ” As described, the term “exemplary” used throughout this description means “serving as an example, instance, or illustration, ” and should not necessarily be construed as preferred or advantageous over other exemplary configurations. As described, the term “coupled” used throughout this description means “connected, whether directly or indirectly through intervening connections (e.g., a switch) , electrical, mechanical, or otherwise, ” and is not necessarily limited to physical connections. Additionally, the connections can be such that the objects are permanently connected or releasably connected. The connections can be through switches. As described, the term “proximate” used throughout this description means “adjacent, very near, next to, or close to. ” As described, the term “on” used throughout this description means “directly on” in some configurations, and “indirectly on” in other configurations.

[0017] A connectivity device may be a low power WIFI system-on-a-chip (SoC) component with multiple clocks supporting the low power function. In some implementations, one of the clocks has low accuracy but is always on. Another clock  has high accuracy but powers down when a WIFI chip is in sleep mode. The high accuracy clock has sufficiently high frequency stability and accuracy to serve as a timing reference for upper application users. The low accuracy clock is by itself unsuitable as a timing reference due to its poor stability and accuracy. If the low accuracy clock is used as a timing reference, the low accuracy clock relies on regular sleep clock calibration operations from the high accuracy clock to achieve stability and accuracy, which takes central processing unit (CPU) processing time and consumes additional power.

[0018] Aspects of the present disclosure calibrate the high accuracy clock time with a timing synchronization function (TSF) in a wireless local area network (WLAN) (e.g., WIFI) beacon transmission. According to these aspects, timing reference error can be reduced to less than one second every four hours, regardless of whether the chip is active or in sleep mode. In these aspects, the WIFI chip only enters a sleep state after connecting to a wireless local area network (WLAN) access point. Thus, the WIFI chip receives a beacon transmission from an access point before entering the sleep state. Every beacon includes a time stamp or TSF (timing synchronization function) . Access points are responsible for maintaining the TSF time and synchronizing the time stamp with each connected station. The TSF has sufficiently high frequency stability and accuracy to serve as a timing reference. Thus, aspects of the present disclosure use the TSF to calibrate the high accuracy clock time. The WIFI chip may receive the TSF in both the sleep state and active state.

[0019] FIGURE 1 illustrates an example implementation of a host system-on-a-chip (SoC) 100, which includes a wireless local area network (WLAN) chip for time calibration, in accordance with aspects of the present disclosure. The host SoC 100 includes processing blocks tailored to specific functions, such as a connectivity block 110. The connectivity block 110 may include fifth generation (5G) connectivity, fourth generation long term evolution (4G LTE) connectivity, Wi-Fi connectivity, universal serial bus (USB) connectivity,  connectivity, Secure Digital (SD) connectivity, and the like. The connectivity block 110 may include a low power wireless local area network (WLAN) component 111 that performs time calibration.

[0020] In this configuration, the host SoC 100 includes various processing units that support multi-threaded operation. For the configuration shown in FIGURE 1, the host  SoC 100 includes a multi-core central processing unit (CPU) 102, a graphics processor unit (GPU) 104, a digital signal processor (DSP) 106, and a neural processor unit (NPU) 108. The host SoC 100 may also include a sensor processor 114, image signal processors (ISPs) 116, a navigation module 120, which may include a global positioning system (GPS) , and a memory 118. The multi-core CPU 102, the GPU 104, the DSP 106, the NPU 108, and the multi-media engine 112 support various functions such as video, audio, graphics, gaming, artificial networks, and the like. Each processor core of the multi-core CPU 102 may be a reduced instruction set computing (RISC) machine, an advanced RISC machine (ARM) , a microprocessor, or some other type of processor. The NPU 108 may be based on an ARM instruction set.

[0021] According to aspects of the present disclosure, a mobile device includes a processing device. The processing device may include means for obtaining, means for calculating, means for setting, and means for receiving. In one configuration, the calculating means, setting means, and receiving means may be the WLAN component 111, as shown in FIGURE 1. In other aspects, the aforementioned means may be any structure or any material configured to perform the functions recited by the aforementioned means.

[0022] The connectivity block 110 may be a low power WIFI system-on-a-chip (SoC) component with multiple clocks supporting the low power function. In some implementations, one of the clocks is an always on (AON) 32.768 KHz resistor capacitor (RC) clock. Another clock is a high accuracy external 32 MHz crystal oscillator (XTAL) clock that powers down when the WIFI chip is in sleep mode. The crystal oscillator clock has sufficiently high frequency stability and accuracy to serve as a timing reference for upper application users. However, the crystal oscillator clock powers down when the WIFI chip sleeps. The RC clock is by itself unsuitable as a timing reference due to its poor stability and accuracy. If the RC clock is used as a timing reference, the RC clock relies on regular sleep clock calibration operations from the crystal oscillator clock to achieve stability and accuracy, which takes central processing unit (CPU) processing time and consumes additional power.

[0023] Upper applications may need to set a real-world time base, such as a current date, for example, November 2, 2027: 08: 12: 47. The base time may be obtained from a network server, such as the Internet at boot time.

[0024] FIGURE 2 is a timing diagram illustrating time calculation for an application requested timing reference, in accordance with various aspects of the present disclosure. In the example of FIGURE 2, at time t1, a user application sets a base real-world time from a network server. In the example of FIGURE 2, two local clock sources (or system clocks) are available on a WIFI chip: a high accuracy clock 202 (e.g., a crystal oscillator clock) and a low accuracy clock 204 (e.g., an RC clock) . At time t2, the high accuracy clock 202 enters a sleep state, while the low accuracy clock 204 remains active. At time t3, the WIFI chip calculates a delta clock tick and adds the delta clock tick to the base real-world time when an application requests a latest real-world time from the WIFI chip. In the example of FIGURE 2, the WIFI chip is mostly in sleep mode to save power in WIFI connected state before the application request. The high accuracy clock 202 only wakes up when needed. The source clocks 202, 204 should provide frequency stability and accuracy to enable a glitch-free time experience for the user application.

[0025] Some applications may need their timing reference error to be less than one second every four hours when the chip is in sleep mode. Two methods are currently available for providing a reference time during sleep mode. In a first method, the real-world time is calculated from a base real-world time obtained at time t1 and a delta clock tick obtained from the always on low accuracy clock 204 (e.g., the 32.768 KHz RC clock) . That is, the real-world time is calculated as: realWorldTime=setWorldTimeBase+(curRCClockTick-previousRCClockTick) , where setWorldTimeBase is the base time obtained from the server network at time t1, RCClockTick is the time obtained from the low accuracy clock 204 when the application requests the timing reference at time t3, and previousRCClockTick is the time obtained from the low accuracy clock 204 when setting the base world time at time t1. Unfortunately, the timing reference error is 96 seconds every four hours with this first method.

[0026] A second method calculates the real-world time from the base real-world time, and a delta clock tick obtained from the high accuracy clock 202, and a sleep compensation value obtained from the low accuracy clock 204. The compensation value is needed because the high accuracy clock 202 powers down. In this second method, the real-world time is calculated as: realWorldTime= setWorldTimeBase+SLEEP (curRCClockTick-previousRCClockTick) + (curXTALClockTick-previousXTALClockTick) , where curXTALClockTick is the time obtained from the high accuracy clock 202 when the application requests the timing reference at time t3, previousXTALClockTick is the time obtained from the high accuracy clock 202 when setting the base world time at time t1, and SLEEP (curRCClockTick-previousRCClockTick) is the low accuracy clock difference during the period the high accuracy clock 202 is in sleep mode. Unfortunately, the timing reference error is 24 seconds every four hours with this second method.

[0027] Aspects of the present disclosure calibrate the high accuracy clock time with a timing synchronization function (TSF) in a wireless local area network (WLAN) (e.g., WIFI) beacon transmission. According to these aspects, timing reference error can be reduced to less than one second every four hours, regardless of whether the chip is active or in sleep mode.

[0028] In these aspects, the WIFI chip only enters a sleep state after connecting to a wireless local-area network (WLAN) access point. Thus, the WIFI chip receives a beacon transmission from an access point before entering the sleep state. Every beacon includes a time stamp or TSF (timing synchronization function) . Access points are responsible for maintaining the TSF time and synchronizing the time stamp with each connected station. The TSF has sufficiently high frequency stability and accuracy to serve as a timing reference. Thus, aspects of the present disclosure use the TSF to calibrate the high accuracy clock time. The WIFI chip may receive TSF in both the sleep state and active state.

[0029] Because the user application needs to wake up the chip to read the current real-world time, calibrating the high accuracy clock time in the active state is sufficient to compensate for the sleep period of the high accuracy clock 202. Details of the calibration process will now be described. When receiving a first beacon after setting the real-world time base at time t1, the process gets a start_tsf_beacon anda start_tsf_rtc. The start_tsf_beacon is the time stamp received from the beacon TSF at time t1. The start_tsf_rtc is the time received from the high accuracy clock 202 at time t1.

[0030] The chip may then remain in the active state or move into the sleep state. Whenever the chip is in the active state, the process receives a beacon, gets the curr_tsf_beacon from the beacon TSF, and gets the current_rtc valuefrom the high accuracy clock 202. The process then calculates a differential TSF time diff_tsf_time and a clock compensation time rtc_time_padding as follows: diff_tsf_time=curr_tsf_beacon-start_tsf_beacon rtc_time_padding=diff_tsf_time– (current_rtc–start_tsf_rtc) .

[0031] The rtc_time_padding value is the final compensation amount that calibrates the source clock time from the beacon TSF. The process may use the rtc_time_padding value to calculate the realWorldTime as: realWorldTime=setWorldTimeBase+ (curXTALClockTick- previousXTALClockTick) + rtc_time_padding,

[0032] where the setWorldTimeBase value is obtained from a network server, such as the Internet, the curXTALClockTick value is obtained when the user application requests a time reference and is a non-compensated value, and the previousXTALClockTick value is obtained when setting the real-world time base at time t1.

[0033] According to aspects of the present disclosure, the process calibrates the high accuracy clock when the chip wakes up in the active state. The process uses the stable and accurate time stamp from the WLAN beacon to calibrate the high accuracy clock, improving clock accuracy.

[0034] FIGURE 3 is a flow diagram illustrating an example process 300 performed, for example, by a computing device, in accordance with various aspects of the present disclosure. The example process 300 is an example of calibrating local time with a timing synchronization function (TSF) from a wireless local area network (WLAN) beacon.

[0035] As shown in FIGURE 3, in some aspects, the process 300 may include obtaining a first time stamp from a first beacon received from an access point (block 302) . In some aspects, the process 300 may include obtaining a first clock time from a  system clock in response to receiving the first beacon (block 304) . For example, the system clock may be a crystal oscillator clock.

[0036] In some aspects, the process 300 may include obtaining a second time stamp from a second beacon received from the access point (block 306) . For example, the UE may receive the second time stamp when a chip hosting the system clock is in a sleep state or in an active state. In some aspects, the process 300 may include obtaining a second clock time from the system clock in response to receiving the second beacon (block 308) .

[0037] In some aspects, the process 300 may include calculating a differential time as a first difference between the first time stamp and the second time stamp (block 310) . In some aspects, the process 300 may include calculating a clock difference between the second clock time and the first clock time (block 312) . In some aspects, the process 300 may include calculating a time compensation value as a second difference between the differential time and the clock difference (block 314) .

[0038] In some aspects, the process 300 may include calculating a real-world time based on the time compensation value (block 316) . For example, the UE may calculate the real-world time in accordance with a real-world base time. A timing error of the real-world time may be less than one second every four hours.

[0039] FIGURE 4 is a block diagram showing an exemplary wireless communications system 400, in which an aspect of the present disclosure may be advantageously employed. For purposes of illustration, FIGURE 4 shows three remote units 420, 430, and 450, and two base stations 440. It will be recognized that wireless communications systems may have many more remote units and base stations. Remote units 420, 430, and 450 include integrated circuit (IC) devices 425A, 425B, and 425C that include the disclosed local time calibration with a TSF from a WLAN beacon. It will be recognized that other devices may also include the disclosed local time calibration with a TSF from a WLAN beacon, such as the base stations, switching devices, and network equipment. FIGURE 4 shows forward link signals 480 from the base stations 440 to the remote units 420, 430, and 450, and reverse link signals 490 from the remote units 420, 430, and 450 to the base stations 440.

[0040] In FIGURE 4, remote unit 420 is shown as a mobile telephone, remote unit 430 is shown as a portable computer, and remote unit 450 is shown as a fixed location remote unit in a wireless local loop system. For example, the remote units may be a mobile phone, a hand-held personal communication systems (PCS) unit, a portable data unit, such as a personal data assistant, a GPS enabled device, a navigation device, a set top box, a music player, a video player, an entertainment unit, a fixed location data unit, such as meter reading equipment, or other device that stores or retrieves data or computer instructions, or combinations thereof. Although FIGURE 4 illustrates remote units according to the aspects of the present disclosure, the disclosure is not limited to these exemplary illustrated units. Aspects of the present disclosure may be suitably employed in many devices, which include the disclosed local time calibration with a TSF from a WLAN beacon.

[0041] FIGURE 5 is a block diagram illustrating a design workstation 500 used for circuit, layout, and logic design of a semiconductor component, such as the WIFI chip with time synchronization disclosed above. The design workstation 500 includes a hard disk 501 containing operating system software, support files, and design software such as Cadence or OrCAD. The design workstation 500 also includes a display 502 to facilitate design of a circuit 510 or a semiconductor component 512, such as the disclosed WIFI chip with time synchronization. A storage medium 504 is provided for tangibly storing the design of the circuit 510 or the semiconductor component 512 (e.g., the WIFI chip) . The design of the circuit 510 or the semiconductor component 512 may be stored on the storage medium 504 in a file format such as GDSII or GERBER. The storage medium 504 may be a CD-ROM, DVD, hard disk, flash memory, or other appropriate device. Furthermore, the design workstation 500 includes a drive apparatus 503 for accepting input from or writing output to the storage medium 504.

[0042] Data recorded on the storage medium 504 may specify logic circuit configurations, pattern data for photolithography masks, or mask pattern data for serial write tools such as electron beam lithography. The data may further include logic verification data such as timing diagrams or net circuits associated with logic simulations. Providing data on the storage medium 504 facilitates the design of the circuit 510 or the semiconductor component 512 by decreasing the number of processes for designing semiconductor wafers.

[0043] Example Aspects

[0044] Aspect 1: A method of calibrating a local time within a computing device, comprising: obtaining a first time stamp from a first beacon received from an access point; obtaining a first clock time from a system clock in response to receiving the first beacon; obtaining a second time stamp from a second beacon received from the access point; obtaining a second clock time from the system clock in response to receiving the second beacon; calculating a differential time as a first difference between the first time stamp and the second time stamp; calculating a clock difference between the second clock time and the first clock time; calculating a time compensation value as a second difference between the differential time and the clock difference; and calculating a real-world time based on the time compensation value.

[0045] Aspect 2: The method of Aspect 1, further comprising: setting a real-world base time; and calculating the real-world time in accordance with the real-world base time.

[0046] Aspect 3: The method of Aspect 1 or 2, further comprising: receiving an application request for the local time; obtaining, from the system clock, a third clock time in response to receiving the application request; calculating a fourth difference between the third clock time and the first clock time; and calculating the real-world time based on the fourth difference.

[0047] Aspect 4: The method of any of the preceding Aspects, further comprising receiving the second time stamp when a chip hosting the system clock is in a sleep state.

[0048] Aspect 5: The method of any of Aspects 1-3, further comprising receiving the second time stamp when a chip hosting the system clock is in an active state.

[0049] Aspect 6: The method of any of the preceding Aspects, in which the system clock comprises a crystal oscillator (XTAL) clock.

[0050] Aspect 7: The method of any of the preceding Aspects, in which a timing error of the real-world time is less than one second every four hours.

[0051] Aspect 8: An apparatus for calibrating a local time within a computing device, comprising: at least one memory; and at least one processor coupled to the at least one memory, the at least one processor configured: to obtain a first time stamp from a first beacon received from an access point; to obtain a first clock time from a system clock in response to receiving the first beacon; to obtain a second time stamp from a second beacon received from the access point; to obtain a second clock time from the system clock in response to receiving the second beacon; to calculate a differential time as a first difference between the first time stamp and the second time stamp; to calculate a clock difference between the second clock time and the first clock time; to calculate a time compensation value as a second difference between the differential time and the clock difference; and to calculate a real-world time based on the time compensation value.

[0052] Aspect 9: The apparatus of Aspect 8, in which the at least one processor is further configured: to set a real-world base time; and to calculate the real-world time in accordance with the real-world base time.

[0053] Aspect 10: The apparatus of Aspect 8 or 9, in which the at least one processor is further configured: to receive an application request for the local time; to obtain, from the system clock, a third clock time in response to receiving the application request; to calculate a fourth difference between the third clock time and the first clock time; and to calculate the real-world time based on the fourth difference.

[0054] Aspect 11: The apparatus of any of the Aspects 8-10, in which the at least one processor is further configured to receive the second time stamp when a chip hosting the system clock is in a sleep state.

[0055] Aspect 12: The apparatus of any of the Aspects 8-10, in which the at least one processor is further configured to receive the second time stamp when a chip hosting the system clock is in an active state.

[0056] Aspect 13: The apparatus of any of the Aspects 8-12, in which the system clock comprises a crystal oscillator (XTAL) clock.

[0057] Aspect 14: The apparatus of any of the Aspects 8-13, in which the a timing error of the real-world time is less than one second every four hours.

[0058] Aspect 15: A non-transitory computer-readable medium having program code recorded thereon, the program code executed by a processor and comprising: program code to obtain a first time stamp from a first beacon received from an access point; program code to obtain a first clock time from a system clock in response to receiving the first beacon; program code to obtain a second time stamp from a second beacon received from the access point; program code to obtain a second clock time from the system clock in response to receiving the second beacon; program code to calculate a differential time as a first difference between the first time stamp and the second time stamp; program code to calculate a clock difference between the second clock time and the first clock time; program code to calculate a time compensation value as a second difference between the differential time and the clock difference; and program code to calculate a real-world time based on the time compensation value.

[0059] Aspect 16: The non-transitory computer-readable medium of Aspect 15, in which the program code comprises: program code to set a real-world base time; and program code to calculate the real-world time in accordance with the real-world base time.

[0060] Aspect 17: The non-transitory computer-readable medium of Aspect 15-16, in which the program code comprises: program code to receive an application request for the local time; program code to obtain, from the system clock, a third clock time in response to receiving the application request; program code to calculate a fourth difference between the third clock time and the first clock time; and program code to calculate the real-world time based on the fourth difference.

[0061] Aspect 18: The non-transitory computer-readable medium of any of the Aspects 15-17, in which the program code comprises program code to receive the second time stamp when a chip hosting the system clock is in a sleep state.

[0062] Aspect 19: The non-transitory computer-readable medium of any of the Aspects 15-17, in which the program code comprises program code to receive the second time stamp when a chip hosting the system clock is in an active state.

[0063] Aspect 20: The non-transitory computer-readable medium of any of the Aspects 15-19, in which the system clock comprises a crystal oscillator (XTAL) clock.

[0064] For a firmware and / or software implementation, the methodologies may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described. A machine-readable medium tangibly embodying instructions may be used in implementing the methodologies described. For example, software codes may be stored in a memory and executed by a processor unit. Memory may be implemented within the processor unit or external to the processor unit. As used, the term “memory” refers to types of long term, short term, volatile, nonvolatile, or other memory and is not limited to a particular type of memory or number of memories, or type of media upon which memory is stored.

[0065] If implemented in firmware and / or software, the functions may be stored as one or more instructions or code on a computer-readable medium. Examples include computer-readable media encoded with a data structure and computer-readable media encoded with a computer program. Computer-readable media includes physical computer storage media. A storage medium may be an available medium that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can include random access memory (RAM) , read-only memory (ROM) , electrically erasable read-only memory (EEPROM) , compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc, as used, include compact disc (CD) , laser disc, optical disc, digital versatile disc (DVD) , floppy disk, and  disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0066] In addition to storage on computer-readable medium, instructions and / or data may be provided as signals on transmission media included in a communications apparatus. For example, a communications apparatus may include a transceiver having signals indicative of instructions and data. The instructions and data are configured to cause one or more processors to implement the functions outlined in the claims.

[0067] Although the present disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions, and alterations can be made without departing from the technology of the disclosure as defined by the appended claims. For example, relational terms, such as “above” and “below” are used with respect to a substrate or electronic device. Of course, if the substrate or electronic device is inverted, above becomes below, and vice versa. Additionally, if oriented sideways, above, and below may refer to sides of a substrate or electronic device. Moreover, the scope of the present disclosure is not intended to be limited to the particular configurations of the process, machine, manufacture, composition of matter, means, methods, and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the present disclosure, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding configurations described may be utilized according to the present disclosure. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.

[0068] Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the present disclosure may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such  implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.

[0069] The various illustrative logical blocks, modules, and circuits described in connection with the disclosure may be implemented or performed with a general-purpose processor, a digital signal processor (DSP) , an application-specific integrated circuit (ASIC) , a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described. A general-purpose processor may be a microprocessor, but, in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0070] The steps of a method or algorithm described in connection with the present disclosure may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM, flash memory, ROM, erasable programmable read-only memory (EPROM) , EEPROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.

[0071] The previous description of the present disclosure is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the examples and designs described, but is to be accorded the widest scope consistent with the principles and novel features disclosed.

Claims

1.A method of calibrating a local time within a computing device, comprising:obtaining a first time stamp from a first beacon received from an access point;obtaining a first clock time from a system clock in response to receiving the first beacon;obtaining a second time stamp from a second beacon received from the access point;obtaining a second clock time from the system clock in response to receiving the second beacon;calculating a differential time as a first difference between the first time stamp and the second time stamp;calculating a clock difference between the second clock time and the first clock time;calculating a time compensation value as a second difference between the differential time and the clock difference; andcalculating a real-world time based on the time compensation value.2.The method of claim 1, further comprising:setting a real-world base time; andcalculating the real-world time in accordance with the real-world base time.3.The method of claim 2, further comprising:receiving an application request for the local time;obtaining, from the system clock, a third clock time in response to receiving the application request;calculating a fourth difference between the third clock time and the first clock time; andcalculating the real-world time based on the fourth difference.4.The method of claim 1, further comprising receiving the second time stamp when a chip hosting the system clock is in a sleep state.5.The method of claim 1, further comprising receiving the second time stamp when a chip hosting the system clock is in an active state.6.The method of claim 1, in which the system clock comprises a crystal oscillator (XTAL) clock.7.The method of claim 1, in which a timing error of the real-world time is less than one second every four hours.8.An apparatus for calibrating a local time within a computing device, comprising:at least one memory; andat least one processor coupled to the at least one memory, the at least one processor configured:to obtain a first time stamp from a first beacon received from an access point;to obtain a first clock time from a system clock in response to receiving the first beacon;to obtain a second time stamp from a second beacon received from the access point;to obtain a second clock time from the system clock in response to receiving the second beacon;to calculate a differential time as a first difference between the first time stamp and the second time stamp;to calculate a clock difference between the second clock time and the first clock time;to calculate a time compensation value as a second difference between the differential time and the clock difference; andto calculate a real-world time based on the time compensation value.9.The apparatus of claim 8, in which the at least one processor is further configured:to set a real-world base time; andto calculate the real-world time in accordance with the real-world base time.10.The apparatus of claim 9, in which the at least one processor is further configured:to receive an application request for the local time;to obtain, from the system clock, a third clock time in response to receiving the application request;to calculate a fourth difference between the third clock time and the first clock time; andto calculate the real-world time based on the fourth difference.11.The apparatus of claim 8, in which the at least one processor is further configured to receive the second time stamp when a chip hosting the system clock is in a sleep state.12.The apparatus of claim 8, in which the at least one processor is further configured to receive the second time stamp when a chip hosting the system clock is in an active state.13.The apparatus of claim 8, in which the system clock comprises a crystal oscillator (XTAL) clock.14.The apparatus of claim 8, in which the a timing error of the real-world time is less than one second every four hours.15.A non-transitory computer-readable medium having program code recorded thereon, the program code executed by a processor and comprising:program code to obtain a first time stamp from a first beacon received from an access point;program code to obtain a first clock time from a system clock in response to receiving the first beacon;program code to obtain a second time stamp from a second beacon received from the access point;program code to obtain a second clock time from the system clock in response to receiving the second beacon;program code to calculate a differential time as a first difference between the first time stamp and the second time stamp;program code to calculate a clock difference between the second clock time and the first clock time;program code to calculate a time compensation value as a second difference between the differential time and the clock difference; andprogram code to calculate a real-world time based on the time compensation value.16.The non-transitory computer-readable medium of claim 15, in which the program code comprises:program code to set a real-world base time; andprogram code to calculate the real-world time in accordance with the real-world base time.17.The non-transitory computer-readable medium of claim 16, in which the program code comprises:program code to receive an application request for a local time;program code to obtain, from the system clock, a third clock time in response to receiving the application request;program code to calculate a fourth difference between the third clock time and the first clock time; andprogram code to calculate the real-world time based on the fourth difference.18.The non-transitory computer-readable medium of claim 15, in which the program code comprises program code to receive the second time stamp when a chip hosting the system clock is in a sleep state.19.The non-transitory computer-readable medium of claim 15, in which the program code comprises program code to receive the second time stamp when a chip hosting the system clock is in an active state.20.The non-transitory computer-readable medium of claim 15, in which the system clock comprises a crystal oscillator (XTAL) clock.

Citation Information

Patent Citations

  • Master-slave equipment time synchronization method

    CN111970080A

  • Initial frequency offset calibration method and system for multi-band multi-network coexistence scene

    CN115833987A

  • Multi-mode communication module clock frequency offset joint estimation method and initial frequency offset calibration method

    CN115913441A

  • Time synchronization and conversion for safety validation in autonomous systems and applications

    US20240085942A1