File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ STM32RTC& rtc = STM32RTC::getInstance();
44
44
void setup () {
45
45
Serial.begin (9600 );
46
46
47
+ // Select RTC clock source: RTC_LSI_CLOCK, RTC_LSE_CLOCK or RTC_HSE_CLOCK.
48
+ // By default the LSI is selected as source.
49
+ // rtc.setClockSource(STM32RTC::RTC_LSE_CLOCK);
50
+
47
51
rtc.begin (); // initialize RTC 24H format
48
52
49
53
rtc.setEpoch (1451606400 ); // Jan 1, 2016
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ void setup()
57
57
{
58
58
Serial.begin (9600 );
59
59
60
+ // Select RTC clock source: RTC_LSI_CLOCK, RTC_LSE_CLOCK or RTC_HSE_CLOCK.
61
+ // By default the LSI is selected as source.
62
+ // rtc.setClockSource(STM32RTC::RTC_LSE_CLOCK);
63
+
60
64
rtc.begin (); // initialize RTC 24H format
61
65
62
66
// Set the time
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ void setup()
40
40
{
41
41
Serial.begin (9600 );
42
42
43
+ // Select RTC clock source: RTC_LSI_CLOCK, RTC_LSE_CLOCK or RTC_HSE_CLOCK.
44
+ // By default the LSI is selected as source.
45
+ // rtc.setClockSource(STM32RTC::RTC_LSE_CLOCK);
46
+
43
47
rtc.begin (); // initialize RTC 24H format
44
48
45
49
rtc.setTime (hours, minutes, seconds);
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ void setup()
55
55
{
56
56
Serial.begin (9600 );
57
57
58
+ // Select RTC clock source: RTC_LSI_CLOCK, RTC_LSE_CLOCK or RTC_HSE_CLOCK.
59
+ // By default the LSI is selected as source.
60
+ // rtc.setClockSource(STM32RTC::RTC_LSE_CLOCK);
61
+
58
62
rtc.begin (); // initialize RTC 24H format
59
63
60
64
rtc.setTime (hours, minutes, seconds);
You can’t perform that action at this time.
0 commit comments