Skip to content
Snippets Groups Projects
Commit 2b1a1e70 authored by dylad's avatar dylad
Browse files

cpu/samd21: fix NVM wait states

parent 1162f2be
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,9 @@ static void clk_init(void) ...@@ -33,9 +33,9 @@ static void clk_init(void)
/* adjust NVM wait states, see table 42.30 (p. 1070) in the datasheet */ /* adjust NVM wait states, see table 42.30 (p. 1070) in the datasheet */
#if (CLOCK_CORECLOCK > 24000000) #if (CLOCK_CORECLOCK > 24000000)
PM->APBAMASK.reg |= PM_AHBMASK_NVMCTRL; PM->APBBMASK.reg |= PM_APBBMASK_NVMCTRL;
NVMCTRL->CTRLB.reg |= NVMCTRL_CTRLB_RWS(1); NVMCTRL->CTRLB.reg |= NVMCTRL_CTRLB_RWS(1);
PM->APBAMASK.reg &= ~PM_AHBMASK_NVMCTRL; PM->APBBMASK.reg &= ~PM_APBBMASK_NVMCTRL;
#endif #endif
/* configure internal 8MHz oscillator to run without prescaler */ /* 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