Skip to content

Commit

Permalink
Merge pull request #6875 from dylad/fix_samd21_cpu_bug
Browse files Browse the repository at this point in the history
cpu/samd21: fix NVM wait states
  • Loading branch information
aabadie authored Apr 19, 2017
2 parents 38f383c + 2b1a1e7 commit a884640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu/samd21/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ static void clk_init(void)

/* adjust NVM wait states, see table 42.30 (p. 1070) in the datasheet */
#if (CLOCK_CORECLOCK > 24000000)
PM->APBAMASK.reg |= PM_AHBMASK_NVMCTRL;
PM->APBBMASK.reg |= PM_APBBMASK_NVMCTRL;
NVMCTRL->CTRLB.reg |= NVMCTRL_CTRLB_RWS(1);
PM->APBAMASK.reg &= ~PM_AHBMASK_NVMCTRL;
PM->APBBMASK.reg &= ~PM_APBBMASK_NVMCTRL;
#endif

/* configure internal 8MHz oscillator to run without prescaler */
Expand Down

0 comments on commit a884640

Please sign in to comment.