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();
4444void setup () {
4545 Serial.begin (9600 );
4646
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+
4751 rtc.begin (); // initialize RTC 24H format
4852
4953 rtc.setEpoch (1451606400 ); // Jan 1, 2016
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ void setup()
5757{
5858 Serial.begin (9600 );
5959
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+
6064 rtc.begin (); // initialize RTC 24H format
6165
6266 // Set the time
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ void setup()
4040{
4141 Serial.begin (9600 );
4242
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+
4347 rtc.begin (); // initialize RTC 24H format
4448
4549 rtc.setTime (hours, minutes, seconds);
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ void setup()
5555{
5656 Serial.begin (9600 );
5757
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+
5862 rtc.begin (); // initialize RTC 24H format
5963
6064 rtc.setTime (hours, minutes, seconds);
You can’t perform that action at this time.
0 commit comments