From 2b1a1e70c3c2fcb3f1d1c812736b0376b677380b Mon Sep 17 00:00:00 2001 From: dylad Date: Sat, 8 Apr 2017 21:07:22 +0200 Subject: [PATCH] cpu/samd21: fix NVM wait states Signed-off-by: dylad --- cpu/samd21/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/samd21/cpu.c b/cpu/samd21/cpu.c index a4a80864c7f7..da9e99cf9d41 100644 --- a/cpu/samd21/cpu.c +++ b/cpu/samd21/cpu.c @@ -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 */