i have test the lpc802 as follows.
Writing 0xAA to a cell containing 0x55 will end up with a value of 0xAA without erase.
and i can write any data to a cell containing 0x00 without erase successfully.
So pls check my questions again,and you must do some test and then reply my questions seriously.
1. IAP: write lpc802 the same page 10000 times without erase ,can be writed successful ?
2. if the chip is truely flash,the erase operation is must. but the lpc802 is real flash or eeprom?
13.1 Flash memory (EEPROM based)
[1] Number of program/erase cycles.
[2] Programming times are given for writing 64 bytes to the flash. Tamb <= +85 刟C. Flash programming with IAP
calls (see LPC802 user manual).
void writeflash(unsigned int DATA_E2_ADDR) // DATA_E2_ADDR=0x2800
{
unsigned short i;
for(i=0;i<0x40;i++)
{
backup[i]=*((volatile uint8_t *)(DATA_E2_ADDR+i));
}
//FLASH_ErasePage(DATA_E2_ADDR+(page&0xC0)); //mask the erase
FLASH_WritePage(DATA_E2_ADDR,backup);
}