I am facing an issue when I want to erase or program a flash sector when core frequency is 120MHz on a K22FN512 device, present on a FRDM_K22F board.
I am using KDS_3.0.0, KSDK_1.2.0, C90TFS flash driver and a FRDM_K22F board.
If the core clock is set to 60MHz (flash clock = 24MHz) everything works fine.
But if core clock is set to 120MHz (flash clock = 20MHz), the FlashCommandSequence() function returns with an error code = 0x20 (FTFx_SSD_FSTAT_ACCERR).
I suspect a timing issue but I didn't found anything in the K22F errata document.
I have tried to fing a workaround without success (modifying CCIF loop test).
I even tried to lower core clock during runtime using CLOCK_SYS_UpdateConfiguration() without any success on that flash programming issue.
Of course, I need to have the K22F running at 120MHz due to performance constraints...
Please find attached a little demo program in order to demonstrate this issue.
Is anybody can help ?
Original Attachment has been moved to: flash_Test.zip