Skip to content

Commit dc9bf67

Browse files
authored
Disable EIC clock while also set GCLK_CTRL_CLKEN bit to 0
This commit fixes issue arduino-libraries#30
1 parent d701922 commit dc9bf67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/samd/ArduinoLowPower.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
static void configGCLK6()
66
{
77
// enable EIC clock
8-
GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
8+
GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCM_EIC)); // Disable EIC clock (also sets GCLK_CTRL_CLKEN bit to 0)
99
while (GCLK->STATUS.bit.SYNCBUSY);
1010

1111
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ; //EIC clock switched on GCLK6

0 commit comments

Comments
 (0)