RTC demo
RTC demo
Postby FrenkR » Sat Dec 27, 2014 1:04 am
From test on ESP-03, RTC resolution is approx. 160000 ticks/sec. Hence, it takes 7.45h for counter to restart.
Is there any API where you would set "current" time/reset counters and then get at least 64bit value? is there any callback/interrupt when counter is restarted?
Is there any API where I could set time and retrieve it (on GPIO interrupt) in 0.1sec density(1/100 sec would be even better)?
Rgds,
Frenk
Re: RTC demo
Postby costaud » Tue Jan 06, 2015 3:34 am
FrenkR wrote:on SDK, there is very little documentation about RTC. system_get_rtc_time() returns counter value. Return value is 32 bit only(uint32), which means that very short period of time elapses before counter restarts.
From test on ESP-03, RTC resolution is approx. 160000 ticks/sec. Hence, it takes 7.45h for counter to restart.
Is there any API where you would set "current" time/reset counters and then get at least 64bit value? is there any callback/interrupt when counter is restarted?
Is there any API where I could set time and retrieve it (on GPIO interrupt) in 0.1sec density(1/100 sec would be even better)?
Rgds,
Frenk
Hi Frenk,
This RTC clock means a low-power counter/timer which can still work during light-sleep and deep-sleep mode. Actually , as long as the 3v3 supply is on , it works.
system_get_rtc_time() returns this RTC( low-power clock indeed) counter value, a relative time.It still counts when the chip is reset by watchdog.
system_rtc_clock_cali_proc() returns a number that represents the equivalent system clock ticks of one RTC clock cycle.
Maybe we should arrange for this 64bit value API
-
- Posts: 1
- Joined: Sun Nov 09, 2014 6:30 pm
Re: RTC demo
Postby kingfisher » Tue Jan 06, 2015 8:44 pm
costaud wrote:Maybe we should arrange for this 64bit value API
They are considering..
anyway +1 for me, it would solve also one of my problems

Re: RTC demo
Postby scargill » Wed Jan 07, 2015 12:24 am
I see more and more applications which would require ONLY the ESP board - and so it's vital these can maintain a real time clock.
-
- Posts: 26
- Joined: Fri Oct 24, 2014 7:58 pm
Re: RTC demo
Postby ESP_Sprite » Wed Jan 07, 2015 1:56 am
scargill wrote:The SDK REALLY needs a proper 64 bit RTC value that can be SET and read. With the likes of LUA and MQTT, it is possible to go off and get a 64 bit TIMESTAMP - we need to be able to set a value that is incremented once a second by an internal system clock - that way we will be able to get the time on powerup and then maintain a simple TIME library - as you might find for example in the Arduino libraries.
I see more and more applications which would require ONLY the ESP board - and so it's vital these can maintain a real time clock.
Erm, why? The ESP probably has internal stuff tied to the monotonic-ness of the timer, which you mess up if you change the time under its nose. If you add some offset to the time, just keep your own 64-bit offset value and add that to the time every time you need it.
Re: RTC demo
Postby FrenkR » Wed Jan 07, 2015 5:25 am
-
- Posts: 26
- Joined: Fri Oct 24, 2014 7:58 pm
Re: RTC demo
Postby ESP_Sprite » Wed Jan 07, 2015 4:37 pm
FrenkR wrote:problem is if you are in deep_sleep mode(CH_PD on GND or folating). RTC is ticking, but your code is not running. So 32 bit RTC will overflow in 7.5h. If timer would be 64 bit, you have more than enough time (many, many years)to check for timer overflow. with 64bit RTC I don't see any need to have real RTC support on chip(as DS1302 is).
If that was a reply to me: No, I understand the need of a 64-bit rtc and I fully agree with that sentiment

-
- Posts: 9
- Joined: Wed Jan 14, 2015 6:20 pm
Re: RTC demo
Postby bojanpotocnik » Sat Jul 25, 2015 8:22 pm
Re: RTC demo
Postby scargill » Sun Jul 26, 2015 9:45 pm
Pete.
http://tech.scargill.net
Who is online
Users browsing this forum: No registered users and 28 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.