diff --git a/arch/arm/src/xmc4/xmc4_clockconfig.c b/arch/arm/src/xmc4/xmc4_clockconfig.c index 519276f2cd..87ecba768e 100644 --- a/arch/arm/src/xmc4/xmc4_clockconfig.c +++ b/arch/arm/src/xmc4/xmc4_clockconfig.c @@ -436,12 +436,14 @@ void xmc4_clock_configure(void) delay(DELAY_CNT_50US_120MHZ); +#ifdef BOARD_FCPU_144MHZ regval = (SCU_PLLCON1_NDIV(BOARD_PLL_NDIV) | SCU_PLLCON1_K2DIV(BOARD_PLL_K2DIV) | SCU_PLLCON1_PDIV(BOARD_PLL_PDIV)); putreg32(regval, XMC4_SCU_PLLCON1); delay(DELAY_CNT_50US_144MHZ); +#endif #endif /* BOARD_ENABLE_PLL */ diff --git a/configs/xmc4500-relax/include/board.h b/configs/xmc4500-relax/include/board.h index 4b59591024..af06f3ba3c 100644 --- a/configs/xmc4500-relax/include/board.h +++ b/configs/xmc4500-relax/include/board.h @@ -51,8 +51,10 @@ * Pre-processor Definitions ************************************************************************************/ -#undef XMC4_FCPU_144MHZ -#define XMC4_FCPU_120MHZ 1 +/* The maximum frequency for the XMC4500 is 120MHz. */ + +#undef BOARD_FCPU_144MHZ +#define BOARD_FCPU_120MHZ 1 /* Clocking *************************************************************************/ @@ -67,7 +69,7 @@ #define BOARD_XTAL_FREQUENCY 12000000 /* 12MHz XTAL */ #undef BOARD_RTC_XTAL_FRQUENCY /* 32.768KHz RTC XTAL not available on the Relax Lite */ -#if defined(XMC4_FCPU_144MHZ) +#if defined(BOARD_FCPU_144MHZ) /* Default clock initialization * * fXTAL = 12Mhz @@ -120,7 +122,7 @@ # define BOARD_PBDIV 1 /* No division */ # define BOARD_PERIPH_FREQUENCY 144000000 -#elif defined(XMC4_FCPU_120MHZ) +#elif defined(BOARD_FCPU_120MHZ) /* Default clock initialization * * fXTAL = 12Mhz