From 2d6e4bd26bed4fd87b111f4053a9bdaa449e4bd7 Mon Sep 17 00:00:00 2001 From: Ouss4 Date: Sun, 21 Jul 2019 16:11:04 -0600 Subject: [PATCH] arch/mips/src/pic32mz/pic32mz-config.h: Make the PLL input clock configurable. --- arch/mips/src/pic32mz/pic32mz-config.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/mips/src/pic32mz/pic32mz-config.h b/arch/mips/src/pic32mz/pic32mz-config.h index 71601c5958..7afe6ae067 100644 --- a/arch/mips/src/pic32mz/pic32mz-config.h +++ b/arch/mips/src/pic32mz/pic32mz-config.h @@ -384,11 +384,16 @@ # define CONFIG_PIC32MZ_UPLLFSEL DEVCFG2_UPLLFSEL_24MHZ #endif -/* Not yet configurable settings (REVISIT) */ +/* System PLL Input Clock Select bit */ - /* System PLL Input Clock Select bit */ -#define CONFIG_PIC32MZ_FPLLICLK 0 /* POSC is selected as input to the System PLL */ - /* USB PLL Input Frequency Select bit */ +#undef CONFIG_PIC32MZ_FPLLICLK +#if defined(BOARD_FPLLICLK_FRC) +# define CONFIG_PIC32MZ_FPLLICLK DEVCFG2_FPLLICLK +#else +# define CONFIG_PIC32MZ_FPLLICLK 0 /* POSC is selected as input to the System PLL */ +#endif + +/* USB PLL Input Frequency Select bit */ /* DEVCFG1 */ /* Configurable settings */