Skip to content
Snippets Groups Projects
Unverified Commit e2ab6cf8 authored by Francisco Acosta's avatar Francisco Acosta Committed by GitHub
Browse files

Merge pull request #9472 from gebart/pr/kinetis-mcg-conditional

kinetis: Conditionally enable MCG
parents 7a264b2a 172af17a
No related branches found
No related tags found
No related merge requests found
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_mcg
include $(RIOTCPU)/cortexm_common/Makefile.features
......@@ -19,7 +19,9 @@
#include "cpu.h"
#include "periph/init.h"
#ifdef MODULE_PERIPH_MCG
#include "mcg.h"
#endif
/**
* @brief Initialize the CPU, set IRQ priorities
......@@ -33,8 +35,10 @@ void cpu_init(void)
/* Note: This register can only be written once after each reset, so we must
* enable all power modes that we wish to use. */
SMC->PMPROT |= SMC_PMPROT_ALLS_MASK | SMC_PMPROT_AVLP_MASK;
#ifdef MODULE_PERIPH_MCG
/* initialize the CPU clocking provided by the MCG module */
kinetis_mcg_init();
#endif
/* trigger static peripheral initialization */
periph_init();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment