8.2 Global Clock Synchronization

8.2.1 Global clock synchronization - Bootup and maintenance

Time sync maintenance

fig 8.2 Time sync maintenance

The flow chart specifies the commands sequence that shall be exchanged between the Endpoint and the Amazon Sidewalk Cloud to keep the Endpoint clock synchronization. Network clock synchronization is required for messaging features as described in section 4.7. The clock is synchronized during procedures described at boot-up time and maintained throughout the operation. The maintenance of the established clock synchronization shall be done by using GET_TIME and RESP_TIME commands, each clock_sync_int. The Endpoint shall not update its clock value in case the received value does not differ more than sec_clock_drift seconds. When there is no response for the GET_TIME command then the Endpoint shall perform a next try to synchronize the clock after the clock_sync_int period which is equal to two hours. When the response for the GET_TIME command is successfully received by the Endpoint, the clock_sync_int period dynamically adapts based on the time difference between the received time in RESP_TIME and the Endpoint’s current time. This is described in section 8.2.2. There is no special procedure to handle lack of RESP_TIME.

8.2.2 Global clock synchronization - maintenance interval

Time sync maintenance Interval

fig 8.3 Time sync maintenance Interval

The next time sync interval is updated dynamically based on the difference between the current time on the Endpoint and the time in RESP_TIME

I_next = next interval from adaptive_sync_intervals_h, If T_delta <= 1 minute

I_next = I_current, If 1 minute < T_delta <= 2 minute

I_next = I_min, If T_delta >= 2 minute

  1. I_next: Next time sync interval.
  2. I_current: Current time sync interval.
  3. I_max: Maximum time sync interval (720 hours(30 days)).
  4. I_max: Minimum time sync interval (2 hours).
  5. T_delta: Time difference between current time on Endpoint and received in RESP_TIME.

The flow chart specifies the backoff procedure followed to determine the next clock_sync_int period only in the case of successfully receiving the time from RESP_TIME. The procedure for determining the next clock_sync_int period is as follows:

  1. The Endpoint starts the clock synchronization process. if there is sucessful response RESP_TIME then clock_sync_int period is set initially to first time sync interval vlue from adaptive_sync_intervals_h.
  2. After adaptive_sync_intervals_h[0] hours clock synchronization process is attempted and if RESP_TIME is received and the difference between the current time and time in the RESP_TIME is less than one minute, clock_sync_int period is set to next sync interval i.e. adaptive_sync_intervals_h[1].
  3. successful RESP_TIME reception at subsequent clock_sync_int periods would result in update of clock_sync_int period as described below

    1. Initial clock_sync_int = adaptive_sync_intervals_h[0]
    2. Next clock_sync_int = adaptive_sync_intervals_h[1]
    3. Next clock_sync_int = adaptive_sync_intervals_h[2]
    4. Next clock_sync_int = adaptive_sync_intervals_h[3] and so on until last index of adaptive_sync_intervals_h.
  4. clock_sync_int period does not exceed last value of adaptive_sync_intervals_h hours and every adaptive_sync_intervals_h[last_idx] clock synchronization process is attempted in case of successful reception of RESP_TIME and the time difference between the received time in
  5. At any step of the clock_sync_int period, the difference between the current time and time in the RESP_TIME is greater than 2 minute, the clock_sync_int period is reset to adaptive_sync_intervals_h[0]
  6. Failure to receive RESP_TIME in response to GET_TIME command would start the Global Clock Synchronization section 8.2.3.

    1. The SubG-CSS device shall continue from STEP 3 of section 8.1.
    2. The SubG-FSK device shall complete section 8.1.

8.2.3 Global clock synchronization - retry

Time sync - no response scenario

fig 8.4 Time sync - no response scenario

The flow chart specifies the commands sequence that shall be exchanged between the Endpoint and the Amazon Sidewalk Cloud to synchronize the Endpoint clock in case there is no response from the cloud for the first GET_TIME command. The procedure is included in STEP 2 and STEP 3 of section 8.1. The procedure for handling the clock synchronization failure is as follows:

  1. STEP 1 - The Endpoint initializes the clock synchronization process but it fails. There is no response RESP_TIME for the GET_TIME command for sync_resp_timeout equal to 3 min.
  2. STEPs 2 - 4 - retry_count is initialized with 1 value and the next GET_TIME command is sent. When the response is not received for sync_resp_timeout then the activity is repeated in STEP 3 and STEP 4. The retry_count is increased by 1 up to its maximum value and sync_resp_timeout is equal to 3 min. When the retry_count reached its maximum value then go to STEP 5.
  3. STEPs 5 - 8 - the sync_resp_timeout time interval is increased in the subsequent steps. The Endpoint waits a longer time for the possible response from the cloud. The value of the sync_resp_timeout is as follows in the next steps:

    1. STEP 5 - sync_resp_timeout = 5 min
    2. STEP 6 - sync_resp_timeout = 8 min
    3. STEP 7 - sync_resp_timeout = 10 min
    4. STEP 8 - sync_resp_timeout = 15 min
  4. STEP 9 - When there is still no response from the cloud then sync_resp_timeout is not increased. The Endpoint shall wait for a maximum value of sync_resp_timeout minutes for the response from the cloud for each subsequent GET_TIME command. The Endpoint shall send GET_TIME command each sync_resp_timeout till the moment the RESP_TIME command is received and the time is synchronized.

    1. The SubG-CSS device shall continue from STEP 3 of section 8.1.
    2. The SubG-FSK device shall complete section 8.1.