SDK-3.7.0: Very log delay in sntp_start_auto_time_sync call

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

Hi,

While testing SDK-3.7.0 sntp_get_time snip code, we found a very log

delay in sntp_start_auto_time_sync() call.

In sntp_start_auto_time_sync(), has it calls

wiced_crypto_get_random(&random_initial, 1);

wiced_rtos_delay_milliseconds(300 * (unsigned int)random_initial);

before calling sync_ntp_time()

Below print out the random_initial value in my test.

random_initial=95

random_initial=185

random_initial=239

random_initial=247

So it means it will delay "300 * random_initial / 1000" seconds.

In above cases:

It delays 28 seconds/ 55 seconds/ 71 seconds / 74 seconds.

For systems calling sntp_start_auto_time_sync() during boot,

this increases a lot of boot time.

Are you sure this is correct thing to do?

0 Likes
1 Reply
user_2177781
Level 5
Level 5
25 likes received 10 likes received 5 likes given

I have noticed same behavior, for now I have removed the delay. It seems to be quite large wait times and exactly as you mentioned, it is not desired during a boot sequence.

Regards

René Josefsen

0 Likes