Skip to content

Commit 1b9531d

Browse files
committed
LPC55S69: Update Flash driver to set clock frequency
This is to ensure the flash access time is set correctly Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 1549c5c commit 1b9531d

File tree

1 file changed

+3
-0
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69

1 file changed

+3
-0
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/flash_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ static int32_t flash_check_nonsecure(flash_t *obj, uint32_t start_addr, uint32_t
6565

6666
MBED_NONSECURE_ENTRY int32_t flash_init(flash_t *obj)
6767
{
68+
/* Set the clock frequency to prevent from ROM changing the Flash access time */
69+
flash_config.modeConfig.sysFreqInMHz = SystemCoreClock / 1000000;
70+
6871
if (FLASH_Init(&flash_config) != kStatus_Success) {
6972
return -1;
7073
} else {

0 commit comments

Comments
 (0)