Skip to content

Commit 775c5c9

Browse files
committed
Fix clock configuration for LPC1549.
Datasheet (Table 82) says MSEL bits should be 5, and the PSEL bits should be 1, for the correct FCCO frequency of 288MHz. The current configuration has FCCO = 144MHz, which is technically out of spec. Tested on a custom LPC1549 board with crystal oscillator running at 12MHz.
1 parent bd0417c commit 775c5c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC15XX/system_LPC15xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@
7373
// <o.0..5> MSEL: Feedback Divider Selection
7474
// <i> M = MSEL + 1
7575
// <0-31>
76-
// <o.5..7> PSEL: Post Divider Selection
76+
// <o.6..7> PSEL: Post Divider Selection
7777
// <i> Post divider ratio P. Division ratio is 2 * P
7878
// <0=> P = 1
7979
// <1=> P = 2
8080
// <2=> P = 4
8181
// <3=> P = 8
8282
// </h>
83-
#define SYSPLLCTRL_Val 0x00000005 // Reset value: 0x000
83+
#define SYSPLLCTRL_Val 0x00000045 // Reset value: 0x000
8484
//
8585
// <o.0..7> System AHB Clock Divider (SYSAHBCLKDIV.DIV)
8686
// <i> Divides main clock to provide system clock to core, memories, and peripherals.
@@ -156,7 +156,7 @@
156156
// <2=> P = 4
157157
// <3=> P = 8
158158
// </h>
159-
#define SCTPLLCTRL_Val 0x00000005 // Reset value: 0x000
159+
#define SCTPLLCTRL_Val 0x00000045 // Reset value: 0x000
160160
//
161161
// <o.0..1> SCT PLL Clock Source Select (SCTPLLCLKSEL.SEL)
162162
// <0=> IRC Oscillator

0 commit comments

Comments
 (0)