Skip to content

Commit

Permalink
Disable EIC clock while also set GCLK_CTRL_CLKEN bit to 0
Browse files Browse the repository at this point in the history
This commit fixes issue arduino-libraries#30
  • Loading branch information
aalbinati authored Jan 3, 2021
1 parent d701922 commit dc9bf67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/samd/ArduinoLowPower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
static void configGCLK6()
{
// enable EIC clock
GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCM_EIC)); // Disable EIC clock (also sets GCLK_CTRL_CLKEN bit to 0)
while (GCLK->STATUS.bit.SYNCBUSY);

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

0 comments on commit dc9bf67

Please sign in to comment.