Hi Daniel,
After you do the flash erase, do you check the result status?
Just like this code:
result = FLASH_Erase(&s_flashDriver, destAdrss, pflashSectorSize, kFTFx_ApiEraseKey);
if (kStatus_FTFx_Success != result)
{
error_trap();
}
/* Verify sector if it's been erased. */
result = FLASH_VerifyErase(&s_flashDriver, destAdrss, pflashSectorSize, kFTFx_MarginValueUser);
if (kStatus_FTFx_Success != result)
{
error_trap();
}
/* Print message for user. */
PRINTF("\r\n Successfully Erased Sector 0x%x -> 0x%x\r\n", destAdrss, (destAdrss + pflashSectorSize));
Because if your erase is failed, then you do the program, it must have the problem.
Please add the flash erase result checking code, and test it again.
Besides, please check your NMI hardware, do you add the external 4.7k to 10K pull up resistor?
Any updated test result, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------