Hi Guys,
I want to use the internal flash for saving some data in BANK B with Sector_64KB.
I only succeeded in writing data to the fronter pages(1024B) of this sector a few times.
But now it is no possible to erase the page anymore, the code is stucked in Chip_IAP_ErasePage().
Here is my steps:
1. Chip_IAP_PreSectorForReadWrite(sector, bankB)
-- ret_code = IAP_CMD_SUCCESS;
2. Chip_IAP_ErasePage(addr_start, addr_start)
-- stucked. (But it successed for a few times)
Please help what I can do.
Thanks.
Thank you Mr.Zhang
I did do the same step as you did, but it didn't work.
Is there any misunderstanding about the erase process?
__disable_irq();
ret_code = Chip_IAP_PreSectorForReadWrite(sector, sector, bank);
/* Error checking */
if (ret_code != IAP_CMD_SUCCESS) {
return ret_code;
}
/* Only erase a page */
ret_code = Chip_IAP_ErasePage(addr_page_start, addr_page_start);
/* Error checking */
if (ret_code != IAP_CMD_SUCCESS) {
}
__enable_irq();
Did you check the error code?
No, just stucked in the function Chip_IAP_ErasePage().
Can I reproduce your issue with NXP demo code? Please let me know the the demo link and name. Thanks.
Hi
In order to erase a page , please make sure you prepare that particular sector beforehand.
Following code will erase first page in Bank B.
/* Prepare sector 0 in Bank B*/