arduino-libraries / Arduino_EdgeControl

Arduino Library for Arduino Edge Control
Mozilla Public License 2.0
11 stars 7 forks source link

rtc examples do not work #12

Closed edge-tech-eu closed 2 years ago

edge-tech-eu commented 2 years ago

the rtc example (RTCClock in examples/Application) in this repository does not work. the code compiles and sets the data&time correctly but when commenting out the line that sets the time&date (setSystemClock(__DATE__, __TIME__)) the timer restarts. it does not remember the time&date set before. see below

the rtc excample (RealTimeClock in examples/Basic) in this repository does also not work as it fails to detect the rtc. see below.

also i noticed that the rtc (u22) is not on the schematics as on the website (https://docs.arduino.cc/hardware/edge-control) date 27/07/2020

thanks frank

RealTimeClock:

Hello, Arduino Edge Control!
Initializating the Real Time Clock... failed! Retrying...
 failed! Retrying...
 failed! Retrying...
 failed! Retrying...
 failed! Retrying...
 failed! Retrying...

RTCClock:

Starting RTC example
Compile Date and Time: 2022-05-16 19:33:18
RTC Date and Time:     1970-01-01  0:00:00
System Clock:          2022-05-16 19:33:18
2022-05-16 19:33:18
2022-05-16 19:33:19
2022-05-16 19:33:20
2022-05-16 19:33:21
2022-05-16 19:33:22
2022-05-16 19:33:23
2022-05-16 19:33:24
2022-05-16 19:33:25
2022-05-16 19:33:26
2022-05-16 19:33:27
2022-05-16 19:33:28
2022-05-16 19:33:29
2022-05-16 19:33:30
2022-05-16 19:33:31
2022-05-16 19:33:32
2022-05-16 19:33:33
2022-05-16 19:33:34

Starting RTC example
1970-01-01  0:00:00
1970-01-01  0:00:00
1970-01-01  0:00:01
1970-01-01  0:00:02
1970-01-01  0:00:03
manchoz commented 2 years ago

Hi @edge-tech-eu, the RTC component is only present in the latest revision of the board, which will be available in the store soon.

On all the revisions of the boards, when you don't need the RTC surviving resets, you can still use the nRF52840's Real-Time Counter via the MbedOS RTC and Time APIs as shown in RTCClock.ino.