Skip to content

Commit ea6013d

Browse files
committed
lpc4322 (core): reduce CPU clock to 120 MHz
1 parent 73fc4c2 commit ea6013d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

source/hic_hal/nxp/lpc4322/system_LPC43xx.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
-----------------------------------------------------------------------------
3333
PLL0USB | 480 MHz | XTAL | External crystal @ 12 MHz
3434
-----------------------------------------------------------------------------
35-
PLL1 | 180 MHz | XTAL | External crystal @ 12 MHz
35+
PLL1 | 120 MHz | XTAL | External crystal @ 12 MHz
3636
-----------------------------------------------------------------------------
37-
CPU | 180 MHz | PLL1 | CPU Clock == BASE_M4_CLK
37+
CPU | 120 MHz | PLL1 | CPU Clock == BASE_M4_CLK
3838
-----------------------------------------------------------------------------
3939
IDIV A | 60 MHz | PLL1 | To the USB1 peripheral
4040
-----------------------------------------------------------------------------
@@ -44,7 +44,7 @@
4444
-----------------------------------------------------------------------------
4545
IDIV D | 12 MHz | IRC | Internal oscillator @ 12 MHz
4646
-----------------------------------------------------------------------------
47-
IDIV E | 5.3 MHz | PLL1 | To the LCD controller
47+
IDIV E | 5.2 MHz | PLL1 | To the LCD controller
4848
-----------------------------------------------------------------------------*/
4949

5050

@@ -93,11 +93,11 @@
9393
/*----------------------------------------------------------------------------
9494
Configure integer divider values
9595
*----------------------------------------------------------------------------*/
96-
#define IDIVA_IDIV 2 /* Divide input clock by 3 */
96+
#define IDIVA_IDIV 1 /* Divide input clock by 2 */
9797
#define IDIVB_IDIV 1 /* Divide input clock by 2 */
9898
#define IDIVC_IDIV 0 /* Divide input clock by 1 */
9999
#define IDIVD_IDIV 0 /* Divide input clock by 1 */
100-
#define IDIVE_IDIV 33 /* Divide input clock by 34 */
100+
#define IDIVE_IDIV 22 /* Divide input clock by 23 */
101101

102102

103103
/*----------------------------------------------------------------------------
@@ -159,13 +159,13 @@
159159
* N = PLL1_NSEL + 1, M = PLL1_MSEL + 1, P = 2 ^ PLL1_PSEL
160160
*----------------------------------------------------------------------------*/
161161

162-
/* PLL1 output clock: 180MHz, Fcco: 180MHz, N = 1, M = 15, P = x */
162+
/* PLL1 output clock: 120MHz, Fcco: 240MHz, N = 1, M = 20, P = 1 */
163163
#define PLL1_NSEL 0 /* Range [0 - 3]: Pre-divider ratio N */
164-
#define PLL1_MSEL 14 /* Range [0 - 255]: Feedback-divider ratio M */
164+
#define PLL1_MSEL 19 /* Range [0 - 255]: Feedback-divider ratio M */
165165
#define PLL1_PSEL 0 /* Range [0 - 3]: Post-divider ratio P */
166166

167167
#define PLL1_BYPASS 0 /* 0: Use PLL, 1: PLL is bypassed */
168-
#define PLL1_DIRECT 1 /* 0: Use PSEL, 1: Don't use PSEL */
168+
#define PLL1_DIRECT 0 /* 0: Use PSEL, 1: Don't use PSEL */
169169
#define PLL1_FBSEL 0 /* 0: FCCO is used as PLL feedback */
170170
/* 1: FCLKOUT is used as PLL feedback */
171171

@@ -185,7 +185,7 @@
185185
* | up to 193MHz | 8 |
186186
* | up to 204MHz | 9 |
187187
*----------------------------------------------------------------------------*/
188-
#define FLASHCFG_FLASHTIM 9
188+
#define FLASHCFG_FLASHTIM 5
189189

190190

191191
/*----------------------------------------------------------------------------
@@ -316,7 +316,7 @@ uint32_t GetClockFreq (uint32_t clk_src);
316316
/*----------------------------------------------------------------------------
317317
System Core Clock variable
318318
*----------------------------------------------------------------------------*/
319-
uint32_t SystemCoreClock = 180000000U; /* System Clock Frequency (Core Clock) */
319+
uint32_t SystemCoreClock = 120000000U; /* System Clock Frequency (Core Clock) */
320320

321321

322322
/******************************************************************************

0 commit comments

Comments
 (0)