Skip to content

LPC55S69: Update Flash driver to set clock frequency #10246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down