• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

RTC on ESP32

Q&A Forum › Category: ESP32 › RTC on ESP32
0 Vote Up Vote Down
Rashmi Mahadevaiah asked 9 months ago

Does ESP32 development board have inbuilt RTC ? If yes, are there any tutorials which teach how to use it?

5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Hi.
Yes, the ESP32 has buitl-in RTC.
However, we don’t have any project about that particular subject.
Regards,
Sara

2 Vote Up Vote Down
Jean Pierre Daviau answered 9 months ago

It seems RTC_DATA_ATTR uint8_t newLinesCnt = 0;      newLinesCnt  value will survive through out light_sleep but not deep sleep.
I did it.
For text it is a bit more complex.  See the docs.

1 Vote Up Vote Down
Ron Brinkman answered 6 months ago

In the project https://randomnerdtutorials.com/esp32-date-time-ntp-client-server-arduino/ A Lee states, and Sara seems to agree, that a time update is gotten from the NTP server only once to set the internal RTC, then the RTC takes over and satisfies future time requests.  I’m not convinced that is the case.  Despite WiFi being turned off, access to the NTP server seems to continue to be available.  If I omit the call to getLocalTime(&timeinfo) after the first pass, the

Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");

result doesn't change each time it is invoked.

 
 

1 Vote Up Vote Down
Steve Mercer answered 6 months ago

I not sure what you are trying to say here. getLocalTime uses mills() which does not use WiFi at all. You can see it in the ESP32 core file esp32-hal-time.c.
 
time.h is a standard C time library. The ESP32 SDK makes it work with the built in RTC.
 
Note that the ESP32 RTC is not very accurate (Can gain/lose minutes per day). For more accuracy use an external RTC with its own crystal.

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Hi Ron, take a look at Steve’s answer.
Regards,
Sara
Thanks for answering, Steve.
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Download Build Web Servers with ESP32 and ESP8266 (2nd Edition) February 8, 2021
  • [eBook Released] Build Web Servers with ESP32 and ESP8266 (version 1.0) October 27, 2020

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2021 · RandomNerdTutorials.com · All Rights Reserved