Broadcom products feature a time synchronization pin named SYNC which is used for precise time transfer from host to GPS.
This pins is multiplexed with the pulse-per-second (PPS) output. SYNC can be used in two modes. For downlink synchronization the time sync port is used to transfer time to the GPS from the host system by providing a timing pulse at a known time. This enables the receiver to acquire satellites more quickly and with enhanced sensitivity and accuracy. For uplink synchronization the GPS receiver uses GPS satellites to solve for the precise time of the SYNC pulse and provides this information to the application, thus allowing time transfer from the GPS to the host system.
To use the time synchronization feature the application starts by creating an time synch request object by calling GlRequest::MakeSyncInReq(). As part of this request the application provides addresses of the callback functions needed to coordinate the time sync operation:
To start the request, the application calls GlEngine::StartRequest(). The subsequent operations are illustrated in the figure below for the case of downlink synchronization
After the library makes the sync request the library will arm the hardware to receive an incoming pulse. Once the pulse is received the library calls the callback of type GlReqOnSyncInLatched() with the parameter GL_SYNCIN_STAT_RCVD_PULSE to indicate to the application that the pulse has been received. Soon thereafter the application should provide the time of the pulse to the library via the call GlEngine::SetAsstPreciseTime(). The direction parameter should be set to GL_DOWNLINK to indicate that the application is providing time to the library, not visa versa.
During the process the library will provide information on the status of the synchronization state machine by periodically calling the callback of type GlReqOnSyncInStatus(). The status values are defined by the enumeration GL_SYNCIN_STATUS. A timeout error will be provided if the timing pulse is never received.
Uplink Synchronization
The procedure for uplink synchronization is very similar and is illustrated below.
In this case the application is not providing the time of the pulse it does not call GlEngine::SetAsstPreciseTime(). After the GPS receiver locks onto satellites and determines time from its Kalman filter, it provides the time back to the the application by calling the callback of type GlReqOnSyncReport().
A variation on this procedure is when the application has some rough knowledge of the time to provide to the library but still desires to perform uplink synchronization. In this case it makes the call to GlEngine::SetAsstPreciseTime() providing the time value and accuracy and sets the direction field to GL_UPLINK. The GPS will use the time provided by the application, but when precise time becomes available from the Kalman filter it will report the precise time of the sync pulse via GlReqOnSyncInReport(), just as in the case of normal uplink synchronization.
Hardware Implementation
In either case (Downlink or Uplink), a time synchronization pulse must be provided to the GPS chip (SYNC input).
The GPS time of this pulse needs to be known within +/- 50 microsec. Therefore it cannot be a purely software controlled pulse, but needs to be synchronized to a hardware event on the baseband side (such as a frame edge). Then the exact GPS time of the pulse needs to be provided through GlEngine::SetAsstPreciseTime().
This implies that the base station provided the time offset between network time and GPS time to the baseband and that the baseband corrected the GPS time for the transmission delay between base station and handset. The pulse itself does not need to be synchronized with GPS time, as long as the precise GPS time of the pulse can be determined.
Also, there shouldn't be multiple pulses as it would create ambiguity as to which pulse the assistance time relates to.
A variation on this procedure is when the application has rough knowledge of the time to provide to the library and desires to perform an uplink synchronization. In this case, call GLEngine::SetAsstPreciseTime() providing the time value and accuracy and set the direction field to GL_UPLINK. The GLL will use the time provided by the application, but when precise time becomes available from the Kalman filter it will report the precise time of the sync pulse via GlReqOnSyncInReport(), just as in the case of normal uplink synchronization.