From 118bde5a1486c60ff7941f7185a457aee17f85a9 Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Fri, 19 Oct 2018 12:49:28 -0500 Subject: [PATCH] LPC54608: Raise the core freq on LPC54608 targets This is incorrectly set to a lower value Signed-off-by: Mahesh Mahadevan --- .../TARGET_LPC546XX/TARGET_FF_LPC546XX/device.h | 2 +- .../TARGET_LPC546XX/TARGET_FF_LPC546XX/mbed_overrides.c | 4 +++- .../TARGET_LPC546XX/TARGET_LPCXpresso/device.h | 2 +- .../TARGET_LPC546XX/TARGET_LPCXpresso/mbed_overrides.c | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/device.h b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/device.h index 01696e2f0f..66a7c3b84e 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/device.h +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/device.h @@ -27,7 +27,7 @@ /* Defines used by the sleep code */ #define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M() #define LPC_CLOCK_RUN ((SYSCON->DEVICE_ID0 == 0xFFF54628) ? \ - BOARD_BootClockPLL220M() : BOARD_BootClockFROHF48M()) + BOARD_BootClockPLL220M() : BOARD_BootClockPLL180M()) #define DEVICE_ID_LENGTH 24 diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/mbed_overrides.c b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/mbed_overrides.c index e5418bf47f..874249fa0e 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/mbed_overrides.c +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_FF_LPC546XX/mbed_overrides.c @@ -41,10 +41,12 @@ void mbed_sdk_init() { if (SYSCON->DEVICE_ID0 == 0xFFF54628) { + BOARD_BootClockFROHF96M(); /* Boot up FROHF96M for SPIFI to use*/ /* LPC54628 runs at a higher core speed */ BOARD_BootClockPLL220M(); } else { - BOARD_BootClockFROHF48M(); + BOARD_BootClockFROHF96M(); /* Boot up FROHF96M for SPIFI to use*/ + BOARD_BootClockPLL180M(); } } diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/device.h b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/device.h index 01696e2f0f..66a7c3b84e 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/device.h +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/device.h @@ -27,7 +27,7 @@ /* Defines used by the sleep code */ #define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M() #define LPC_CLOCK_RUN ((SYSCON->DEVICE_ID0 == 0xFFF54628) ? \ - BOARD_BootClockPLL220M() : BOARD_BootClockFROHF48M()) + BOARD_BootClockPLL220M() : BOARD_BootClockPLL180M()) #define DEVICE_ID_LENGTH 24 diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/mbed_overrides.c b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/mbed_overrides.c index 0d95d0345e..5cee6949ed 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/mbed_overrides.c +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/TARGET_LPCXpresso/mbed_overrides.c @@ -57,10 +57,12 @@ uint32_t FLASHIAP_ReadUid(uint32_t *addr) void mbed_sdk_init() { if (SYSCON->DEVICE_ID0 == 0xFFF54628) { + BOARD_BootClockFROHF96M(); /* Boot up FROHF96M for SPIFI to use*/ /* LPC54628 runs at a higher core speed */ BOARD_BootClockPLL220M(); } else { - BOARD_BootClockFROHF48M(); + BOARD_BootClockFROHF96M(); /* Boot up FROHF96M for SPIFI to use*/ + BOARD_BootClockPLL180M(); } }