Skip to content

Commit

Permalink
cpu/samd21: use APBB clock instead of AHB clock
Browse files Browse the repository at this point in the history
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
  • Loading branch information
dylad committed Apr 12, 2017
1 parent dc1b38e commit be3cb62
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->AHBMASK.reg |= PM_AHBMASK_NVMCTRL;
PM->APBBMASK.reg |= PM_APBBMASK_NVMCTRL;
NVMCTRL->CTRLB.reg |= NVMCTRL_CTRLB_RWS(1);
PM->AHBMASK.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 be3cb62

Please sign in to comment.