Skip to content
Permalink
Browse files

soc: samr21: 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 May 29, 2019
1 parent 48023b8 commit 8d6f6ba83eef7955517f44f129d082817f405cc0
Showing with 1 addition and 1 deletion.
  1. +1 −1 soc/arm/atmel_sam0/samr21/soc.h
@@ -34,7 +34,7 @@
#endif /* _ASMLANGUAGE */

/** Processor Clock (HCLK) Frequency */
#define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
#define SOC_ATMEL_SAM0_HCLK_FREQ_HZ DT_ARM_CORTEX_M0PLUS_0_CLOCK_FREQUENCY
/** Master Clock (MCK) Frequency */
#define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ
#define SOC_ATMEL_SAM0_XOSC32K_FREQ_HZ 32768

0 comments on commit 8d6f6ba

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