This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sync using GPS - nRF9160

Hi

in communication networks, GPS is often us to sync network elements and to get accurate timing.

with nRF9160 MFW 1.3, "GPS time based configurable IO-pin / pulse" is available; with 1pps pulse. 

To this regard:

  • where is best documentation to read more about this functionality (how to set it up)
  • for which use case this has been introduced?
  • how can I use it in my application to sync all devices? 
    • example: if I want to make sure that all my devices have the same time and they are in sync, how can I use it?
      To have the same time on all devices, I guess they need to receive the Time of the Day at first (or from time to time) and then keep the sync using the 1pps pulse? or how?

Thanks

  • Hello Lorenzo,

    I have to check this with our modem team and come back to you!

    Regards,

    Markus

  • Hello Lorenzo,

    My apologies for the delayed answer.

    First of all, what should be indicated is that we currently have two ways to control a GNSS module, via legacy Socket interface and NCS 1.6.0 introduced GNSSv2 API. All new MFW 1.3.0 GNSS features are only supported in GNSSv2 API. No intent to add further support to legacy Socket Interface.

    where is best documentation to read more about this functionality (how to set it up)

    Some documentation in nrfxlib 1.6.0 about 1PPS:

    API documentation — nrfxlib 1.6.0 documentation (nordicsemi.com)

    and

    GNSS interface — nrfxlib 1.6.0 documentation (nordicsemi.com)

    for which use case this has been introduced?

     In Generally 1PPS can be used where ever accurate time sync is needed

    how can I use it in my application to sync all devices? 
    • example: if I want to make sure that all my devices have the same time and they are in sync, how can I use it?
      To have the same time on all devices, I guess they need to receive the Time of the Day at first (or from time to time) and then keep the sync using the 1pps pulse? or how?
    • One device needs to have GNSS fix to output 1PPS initially via COEX1 PIN. After this my knowledge of the HW inputs is rather limited on preview kits, i.e. which input to use for external clock source and what Zephyr RTOS side RTC. Would monitor the external clock?
    • As mentioned originating 1PPS device can either be kept constantly in GNSS ON state to output the pulse or put to sleep mode and use RTC/TCXO to maintain 1PPS pulse output. Eventually the latter will start to degrade over time but periodical sync/GNSS ON will synchronise the 1PPS again with satellite clocks.

    I hope this answers your questions!

    Regards,

    Markus

  • Hi Markus, 

    thanks. 

    Still not clear to me on how to use this or a combination of cellular and GPS to get an accurate and sync timestamp across all my devices, no matter which network I am using. 
    Using cellular, there is the %XTIME command to get unsolicited tiemstamp, but this to me is not necessary very accurate and some networks may not send this information, correct?

    I am wondering if there is any other way to get an accurate timestamp combining cellular and GPS? could the 1PPS help?

    in documentation shared by you, I can read: " It is also possible to configure the pulses to start at a specific date and time. Instead of repeating pulses, 1PPS can also be used in a one-time pulse mode, where only a single pulse is given at the specified time or as soon as GNSS gets a fix."

    --> if I set the pulse to happen at a precise time, (let's say at 12pm UTC every day; if possible?), which reference timing will be used to trigger this action? will it be at 12pm based on GPS? 
    Or do you have better way to suggest to have same accurate and sync timestamp across all devices? 

    Thanks

    Lorenzo 


  • Hello Lorenzo,

    I again have to check with the modem team here. Answer can be delayed again, due to most of the experts are on summer vacation currently.

    Regards,

    Markus

  • Hi,

    Marcus is out of office, but here are some info back from the R&D team:

    Lorenzo Amicucci said:
    Using cellular, there is the %XTIME command to get unsolicited tiemstamp, but this to me is not necessary very accurate and some networks may not send this information, correct?

     - This is our understanding also.

    Lorenzo Amicucci said:
    --> if I set the pulse to happen at a precise time, (let's say at 12pm UTC every day; if possible?), which reference timing will be used to trigger this action? will it be at 12pm based on GPS? 

     - This is exactly what can be done with the 1PPS feature, and it will use the GPS time (converted to UTC) to trigger the action. There are several options to trade-off between accuracy and power consumption (all of them will be accurate from millisecond level down to tens of nanoseconds).

    Best regards,
    Kaja

Related