Page 1 of 1

SNTP example...

Posted: Tue Feb 28, 2017 3:00 pm
by kurtzweber
Hi

I'm trying to understand the snmp example but I'm stuck... can you clarify my dubts?

I used lwIP in the past and I usually was required to define in my code the macro:

SNTP_SET_SYSTEM_TIME (or its equivalent for microsecond precision)

with the specific code for my chip (update rtc registers...)... and I expected the same here in the esp-idf framework... I cannot find the lines of code that configure the esp32 RTC and so on...

Thanks!

Re: SNTP example...

Posted: Tue Feb 28, 2017 3:08 pm
by ESP_igrr
In ESP-IDF version of LwIP, SNTP_SET_SYSTEM_TIME is defined to use settimeofday function. This function, in turn, implements timekeeping using the RTC timer. You can also call settimeofday function manually to set time from some other source.

Re: SNTP example...

Posted: Tue Feb 28, 2017 3:10 pm
by kurtzweber
Thanks! can you point me to the file where it is defined? I probably missed it in my search :roll:

Re: SNTP example...

Posted: Tue Feb 28, 2017 3:51 pm
by WiFive

Re: SNTP example...

Posted: Wed Mar 01, 2017 8:27 am
by kurtzweber
Thanks! 8-)