Skip to content
Permalink
Browse files

soc: lpc54xxx: Get CPU clock frequency from DTS

The SoC initialization code used system clock frequency
as a CPU clock frequency. This commit corrects that by
obtaining the needed value from DTS.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
  • Loading branch information...
pizi-nordic authored and carlescufi committed Apr 11, 2019
1 parent 8ceb0d2 commit 1161fdf2397f2b8034eba56832112930980aca70
Showing with 2 additions and 2 deletions.
  1. +2 −2 soc/arm/nxp_lpc/lpc54xxx/soc.c
@@ -49,10 +49,10 @@ static ALWAYS_INLINE void clkInit(void)
CLOCK_AttachClk(kFRO12M_to_MAIN_CLK);

/* Set FLASH wait states for core */
CLOCK_SetFLASHAccessCyclesForFreq(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
CLOCK_SetFLASHAccessCyclesForFreq(DT_ARM_CORTEX_M4F_0_CLOCK_FREQUENCY);

/* Set up high frequency FRO output to selected frequency */
CLOCK_SetupFROClocking(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
CLOCK_SetupFROClocking(DT_ARM_CORTEX_M4F_0_CLOCK_FREQUENCY);

/* Set up dividers */
/* Set AHBCLKDIV divider to value 1 */

0 comments on commit 1161fdf

Please sign in to comment.
You can’t perform that action at this time.