Merge pull request #10246 from NXPmicro/Fix_LPC55S69_Flash_ClockSpeed

LPC55S69: Update Flash driver to set clock frequency
pull/10290/head
Cruz Monrreal 2019-04-01 21:53:18 -05:00 committed by GitHub
commit 4950178db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,9 @@ static int32_t flash_check_nonsecure(flash_t *obj, uint32_t start_addr, uint32_t
MBED_NONSECURE_ENTRY int32_t flash_init(flash_t *obj)
{
/* Set the clock frequency to prevent from ROM changing the Flash access time */
flash_config.modeConfig.sysFreqInMHz = SystemCoreClock / 1000000;
if (FLASH_Init(&flash_config) != kStatus_Success) {
return -1;
} else {