Methods for data synchronization between a sensor hub and an application processor and apparatuses using the same
AssigneeGlenFly Technology Co., Ltd.
InventorsJiangze Chen, Dongxing Wu, Deming Gu, Guixiang He, Kangning Zhu
Life of this patent
Estimating the term…
Abstract
A method provides data synchronization between a sensor hub and an application processor, which contains at least the following steps: generating and adding a plurality of absolute time stamps in a sensor-data stream; and generating and adding a plurality of pieces of sensor data and a plurality of relative time stamps in the sensor-data stream between the moments of generating each two adjacent absolute time stamps, wherein each relative time stamp is associated with one piece of sensor data.
Claims7
A method for data synchronization between a sensor hub and an application processor, comprising:
- reading an ID (identifier) from a sensor-data stream;
- determining whether the ID is a time ID;
- when the ID is the time ID, reading an absolute time stamp from the sensor-data stream and storing the absolute time stamp in the application processor;
- when the ID is not the time ID, reading sensor data and a relative time stamp from the sensor-data stream, generating a recovered time stamp according to the absolute time stamp and the relative time stamp and converting the recovered time stamp to a value of an RTC (Real-time Counter) of the application processor;
- after issuing an interrupt to the sensor hub, reading a first up-to-date value of an RTC of the sensor hub;
- and
- calculating a bias according to the first up-to-date value and a second up-to-date value corresponding to a prior interrupt;
- wherein the bias is calculated by using an Equation as follows:
- σ=TSp−(f(TSt)−f(TSt-1)),
- wherein σ represents the bias, TSp represents a counter value of an interrupt period, TSt represents the first up-to-date value, TSt-1 represents the second up-to-date value and f( ) represents a conversion function.
An apparatus for data synchronization between a sensor hub and an application processor, comprising:
- a memory storing a sensor-data stream;
- a sensor hub, coupled to a micro-sensor and the memory, generating and adding a plurality of first absolute time stamps in the sensor-data stream;
- and generating and adding a plurality of pieces of first sensor data and a plurality of first relative time stamps in the sensor-data stream between the moments of generating each two adjacent first absolute time stamps, wherein each first relative time stamp is associated with one piece of first sensor data;
- and
- an application processor, coupled to the memory, reading an ID (identifier) from the sensor-data stream;
- determining whether the ID is a time ID;
- when the ID is the time ID, reading a second absolute time stamp from the sensor-data stream and storing the second absolute time stamp in the application processor;
- and when the ID is not the time ID, reading one piece of second sensor data and a second relative time stamp from the sensor-data stream, generating a recovered time stamp according to the second absolute time stamp and the second relative time stamp and converting the recovered time stamp to a value of an RTC of the application processor;
- wherein, after issuing an interrupt to the sensor hub, the application processor reads a first up-to-date value of an RTC of the sensor hub;
- and calculates a bias according to the first up-to-date value and a second up-to-date value corresponding to a prior interrupt;
- wherein the bias is calculated by using an Equation as follows:
- σ=TSp−(f(TSt)−f(TSt-1)),
- wherein σ represents the bias, TSp represents a counter value of an interrupt period, TSt represents the first up-to-date value, TSt-1 represents the second up-to-date value and f( ) represents a conversion function.
Dependencies are inferred from the claim text.