Frequency Synchronization

In assisted GPS systems it is not uncommon to have available a stable external frequency reference that can be used to help measure the offset in the reference clock which is being used as a reference frequency for the GPS chip.

The external clock is provided to the chip on a pin called CNTIN, GPS_CAL, etc. This pin drives a frequency counter within the chip that allows the chip to calculate the frequency ratio between the CNT_IN signal and the reference clock. This, combined with knowledge of the nominal value of each clock, allows the software to calibrate errors in the reference clock.

To utilize this feature the application must select a frequency plan from the CNT_IN group portion of GL_FREQ_PLAN.

The HAL should implement the following callbacks:

The GLCT invokes the callback several times during the calibration process to communicate with the HAL regarding the status of the CNT_IN signal. The library will engage the frequency counter and request the CNT_IN signal whenever it determines a new calibration is needed. Most commonly this will occur right before a new position request begins.

The following diagram shows the interactions between library and application for the CNT_IN calibration

msc_inline_mscgraph_5
  1. Library asks the application to turn on the CNT_IN signal and to confirm its status.
  2. Application confirms the status of the CNT_IN signal by calling GlctSetReferenceFreq(). The frequency status value must be either REFCLKSTAT_ADJUSTING or REFCLKSTAT_HOLDING. Either of these indicates the CNT_IN signal is present and ready to use.
  3. Library asks the application to reconfirm the status of the CNT_IN signal. The GpsHalRefFreqQuery() callback is called.
  4. Application reconfirms the status of the CNT_IN signal by again calling GlctSetReferenceFreq() with the frequency status value again set to either REFCLKSTAT_ADJUSTING or REFCLKSTAT_HOLDING. The indicates that the CNT_IN signal was present and usable since the previous status report (i.e. it was stable while the calibration was performed).
  5. Library indicates that it is finished using the CNT_IN signal. The GpsHalRefFreqOff() callback is called.

Advanced Users

If desired the application can also force a frequency calibration at any time. One reason to do this would be to get an advanced start on the frequency calibration while the application retrieves assistance data.

The procedure for this is

The following diagram shows the "Application Initiated" interactions between library and application for the CNT_IN calibration and simultaneous assistance data delivery.

msc_inline_mscgraph_6
  1. The user can obtain status and results of the application initiated frequency calibration by registering an optional callback function GlctReqReqOnCntin() to the request object.When the calibration is performed the callback function provides status information of type GL_CNTIN_STATUS as well as the results of the calibration itself as parts-per-unit quantity.

Note: The library to application interactions are identical to the case of a library-initiated use of CNT_IN.

Frequency Synchronization in Android

For information on integrating frequency synchronization in Android, see TCXO Calibration in Android 4750/4751.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines