Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 450 of 547
NXP Semiconductors
UM10398
Chapter 26: LPC111x/LPC11Cxx Flash programming firmware
When signature generation is triggered via software, the duration is in AHB clock cycles,
and tcy is the time in ns for one AHB clock. The SIG_DONE bit in FMSTAT can be polled
by software to determine when signature generation is complete.
After signature generation, a 128-bit signature can be read from the FMSW0 to FMSW3
registers. The 128-bit signature reflects the corrected data read from the flash. The 128-bit
signature reflects flash parity bits and check bit values.
Content verification
The signature as it is read from the FMSW0 to FMSW3 registers must be equal to the
reference signature. The algorithms to derive the reference signature is given in
Figure 93
.
Fig 93. Algorithm for generating a 128-bit signature
int128 signature = 0
int128 nextSignature
FOR address = flashpage 0 TO address = flashpage max
{
FOR i = 0 TO 126 {
nextSignature[i] = flashword[i] XOR signature[i+1]}
nextSignature[127] = flashword[127] XOR signature[0] XOR signature[2]
XOR signature[27] XOR signature[29]
signature = nextSignature
}
return signature