1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #6875 from dylad/fix_samd21_cpu_bug

cpu/samd21: fix NVM wait states
This commit is contained in:
Alexandre Abadie 2017-04-19 10:26:39 +02:00 committed by GitHub
commit a884640dec

View File

@ -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 */