Skip to content

Commit 59be777

Browse files
authored
Merge pull request #768 from sommersoft/rtc_fix
RTC Fix: Revert To Using Internal Oscillator
2 parents 7f7cbe8 + a0eb51c commit 59be777

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@
259259
// <i> This defines the clock source for generic clock generator 2
260260
// <id> gclk_gen_2_oscillator
261261
#ifndef CONF_GCLK_GEN_2_SRC
262-
#define CONF_GCLK_GEN_2_SRC GCLK_GENCTRL_SRC_XOSC32K
262+
#define CONF_GCLK_GEN_2_SRC GCLK_GENCTRL_SRC_OSC32K
263263
#endif
264264
// </h>
265265

ports/atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@
197197
// <i> Indicates whether configuration for External 32K Osc is enabled or not
198198
// <id> enable_xosc32k
199199
#ifndef CONF_XOSC32K_CONFIG
200-
#define CONF_XOSC32K_CONFIG 1
200+
#define CONF_XOSC32K_CONFIG 0
201201
#endif
202202

203203
// <h> 32kHz External Crystal Oscillator (XOSC32K) Control
204204
// <q> External 32K Oscillator Enable
205205
// <i> Indicates whether External 32K Oscillator is enabled or not
206206
// <id> xosc32k_arch_enable
207207
#ifndef CONF_XOSC32K_ENABLE
208-
#define CONF_XOSC32K_ENABLE 1
208+
#define CONF_XOSC32K_ENABLE 0
209209
#endif
210210

211211
// <q> On Demand
@@ -223,7 +223,7 @@
223223
// <i> If this bit is 1: The oscillator is not stopped in standby sleep mode.
224224
// <id> xosc32k_arch_runstdby
225225
#ifndef CONF_XOSC32K_RUNSTDBY
226-
#define CONF_XOSC32K_RUNSTDBY 1
226+
#define CONF_XOSC32K_RUNSTDBY 0
227227
#endif
228228

229229
// <q> Enable 1K
@@ -237,14 +237,14 @@
237237
// <i> Enable 32 Khz Output
238238
// <id> xosc32k_arch_en32k
239239
#ifndef CONF_XOSC32K_EN32K
240-
#define CONF_XOSC32K_EN32K 1
240+
#define CONF_XOSC32K_EN32K 0
241241
#endif
242242

243243
// <q> Enable XTAL
244244
// <i> Enable XTAL
245245
// <id> xosc32k_arch_xtalen
246246
#ifndef CONF_XOSC32K_XTALEN
247-
#define CONF_XOSC32K_XTALEN 1
247+
#define CONF_XOSC32K_XTALEN 0
248248
#endif
249249

250250
// <q> Write Lock

ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
// <i> This defines the clock source for generic clock generator 2
189189
// <id> gclk_gen_2_oscillator
190190
#ifndef CONF_GCLK_GEN_2_SOURCE
191-
#define CONF_GCLK_GEN_2_SOURCE GCLK_GENCTRL_SRC_XOSC32K
191+
#define CONF_GCLK_GEN_2_SOURCE GCLK_GENCTRL_SRC_OSCULP32K
192192
#endif
193193

194194
// <q> Run in Standby

ports/atmel-samd/asf4_conf/samd51/hpl_osc32kctrl_config.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// <q> Use 1 kHz output
2424
// <id> rtc_1khz_selection
2525
#ifndef CONF_RTCCTRL_1KHZ
26-
#define CONF_RTCCTRL_1KHZ 0
26+
#define CONF_RTCCTRL_1KHZ 1
2727
#endif
2828

2929
#if CONF_RTCCTRL_SRC == GCLK_GENCTRL_SRC_OSCULP32K
@@ -62,7 +62,7 @@
6262
// <0x6=>8000092us
6363
// <id> xosc32k_arch_startup
6464
#ifndef CONF_XOSC32K_STARTUP
65-
#define CONF_XOSC32K_STARTUP 0x4
65+
#define CONF_XOSC32K_STARTUP 0x0
6666
#endif
6767

6868
// <q> On Demand Control
@@ -76,7 +76,7 @@
7676
// <i> Indicates whether Run in Standby is enabled or not
7777
// <id> xosc32k_arch_runstdby
7878
#ifndef CONF_XOSC32K_RUNSTDBY
79-
#define CONF_XOSC32K_RUNSTDBY 1
79+
#define CONF_XOSC32K_RUNSTDBY 0
8080
#endif
8181

8282
// <q> 1kHz Output Enable
@@ -90,7 +90,7 @@
9090
// <i> Indicates whether 32kHz Output is enabled or not
9191
// <id> xosc32k_arch_en32k
9292
#ifndef CONF_XOSC32K_EN32K
93-
#define CONF_XOSC32K_EN32K 1
93+
#define CONF_XOSC32K_EN32K 0
9494
#endif
9595

9696
// <q> Clock Switch Back
@@ -118,7 +118,7 @@
118118
// <i> Indicates whether the connections between the I/O pads and the external clock or crystal oscillator is enabled or not
119119
// <id> xosc32k_arch_xtalen
120120
#ifndef CONF_XOSC32K_XTALEN
121-
#define CONF_XOSC32K_XTALEN 1
121+
#define CONF_XOSC32K_XTALEN 0
122122
#endif
123123

124124
// <o> Control Gain Mode
@@ -137,7 +137,7 @@
137137
// <i> Indicates whether configuration for OSCULP32K is enabled or not
138138
// <id> enable_osculp32k
139139
#ifndef CONF_OSCULP32K_CONFIG
140-
#define CONF_OSCULP32K_CONFIG 0
140+
#define CONF_OSCULP32K_CONFIG 1
141141
#endif
142142

143143
// <h> 32kHz Ultra Low Power Internal Oscillator Control

0 commit comments

Comments
 (0)