File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -559,15 +559,21 @@ void SystemInit (void)
559559
560560 LPC_SC -> CCLKCFG = 0x00000002 ; /* Setup CPU Clock Divider */
561561
562- if ( isLPC1769 ()) {
562+ #if F_CPU == 120000000 && MCU_LPC1769
563563 LPC_SC -> PLL0CFG = 0x0000000E ; /* configure PLL0 */
564564 LPC_SC -> PLL0FEED = 0xAA ;
565565 LPC_SC -> PLL0FEED = 0x55 ;
566- } else {
567- LPC_SC -> PLL0CFG = 0x00010018 ; // 100MHz
566+ #elif F_CPU == 100000000
567+ LPC_SC -> PLL0CFG = 0x00010018 ;
568568 LPC_SC -> PLL0FEED = 0xAA ;
569569 LPC_SC -> PLL0FEED = 0x55 ;
570- }
570+ #elif F_CPU == 96000000
571+ LPC_SC -> PLL0CFG = 0x0000000B ;
572+ LPC_SC -> PLL0FEED = 0xAA ;
573+ LPC_SC -> PLL0FEED = 0x55 ;
574+ #else
575+ #error "The configured cpu frequency is not supported"
576+ #endif
571577
572578 LPC_SC -> PLL0CON = 0x01 ; /* PLL0 Enable */
573579 LPC_SC -> PLL0FEED = 0xAA ;
You can’t perform that action at this time.
0 commit comments