Skip to content
Snippets Groups Projects
Commit a884640d authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

Merge pull request #6875 from dylad/fix_samd21_cpu_bug

cpu/samd21: fix NVM wait states
parents 38f383c6 2b1a1e70
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment