lpcware

Flash signature does not change after flash erase or write

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Nov 23, 2017 by Stjepan Cajic
Content originally posted in LPCWare by remcopoelstra on Mon Dec 08 03:30:10 MST 2014
HI,

I'm testing the flash signature generator on the LPC812.
I've written the following simple app:

int main(void) {
uint32_t signature1,signature2;
char buffer[1024];
int i;
uint8_t Result;

SystemCoreClockUpdate();

for (i=0;i<1024;i++)
buffer=i;

Chip_FMC_ComputeSignature(0x3c00,0x3fff);
while (Chip_FMC_IsSignatureBusy());
signature1=Chip_FMC_GetSignature(0);

Result=Chip_IAP_PreSectorForReadWrite(15,15);
Result=Chip_IAP_EraseSector(15,15);

Chip_FMC_ComputeSignature(0x3c00,0x3fff);
while (Chip_FMC_IsSignatureBusy());
signature1=Chip_FMC_GetSignature(0);

Result=Chip_IAP_PreSectorForReadWrite(15,15);
Result=Chip_IAP_CopyRamToFlash(15*1024,buffer,1024);

Chip_FMC_ComputeSignature(0x3c00,0x3fff);
while (Chip_FMC_IsSignatureBusy());
signature2=Chip_FMC_GetSignature(0);

    return 0 ;
}


The memory browser shows that the flash contents are updated as expected, but the signature is always the same. Did I do something wrong?

Regards.

Remco Poelstra


Outcomes