esp-idf NTP without internet

oreo cake
Posts: 1
Joined: Thu Aug 04, 2022 7:21 am

esp-idf NTP without internet

Postby oreo cake » Thu Aug 04, 2022 7:24 am

After synchronizing time from NTP, can the time still run after the internet connection is lost? how to keep time update stored in memory without having to connect to the server after rebooting or power off? I'm using esp-idf framework.

the code is from https://github.com/espressif/esp-idf/bl ... ple_main.c

ESP_Sprite
Posts: 9739
Joined: Thu Nov 26, 2015 4:08 am

Re: esp-idf NTP without internet

Postby ESP_Sprite » Thu Aug 04, 2022 8:49 am

The ESP32 will keep time while running, even when not connected to a network, as well as during sleep modes including deep sleep (although not very precisely in deep sleep, unless it has a 32KHz crystal connected to it). It does not keep the time when powered off or through an (external) reset.

Who is online

Users browsing this forum: No registered users and 100 guests