I understand the LPC5500 processors have Flash with ECC, with a 512 byte page size for erase and programming.
In the LPC55S6x/LPC55S2x User Manual, section 5.7.13 ECC, I found it says
Due to the presence of ECC, over-programming an already programmed word will likely result in inconsistent parity bits; for this reason, it is not allowed to program a memory word without erasing it first.
I'm interested to know if over-programming is practical, if an application ensures that it programs the Flash being careful to consider Flash ECC "memory word" boundaries.
As for the Flash "word size", I found the following in the User Manual, section 5.6.2
When a register (STARTA, STOPA, DATAWx…) is said to contain an address, this is a physical word address inside the flash memory (that is, address 1 represents the second 128-bit word inside the flash memory, not the second byte in the first word). When a page address is required/returned, the 5 least significant bits of the address are don’t-care (a flash page contains 32 user-accessible words).
So a Flash word is 16 bytes. I found other text in this chapter that confirms that.
Section 5.7 describes how to erase and write the Flash using direct access to Flash controller registers (instead of via the Flash API in the boot ROM). It sounds as though this enables writing of individual Flash words.
Now, I'm curious to know if individual Flash words could be written using the boot ROM Flash API, or if it's necessary to do writes using the Flash controller registers.
Hello @craigmcqueenir
LPC556x/2x on-chip flash program memory with flash accelerator and 512 byte
page erase and write.
BR
Alice
Hello @craigmcqueenir
Before program , erasing must be first. So if you want to over-programming, please erase first.
Other options you can test on your side.
BR
Alice
This answer is more technically ambiguous than I hoped.
ECC protection is usually applied to the smallest programmable item size, which would be 32-bit in case of program Flash.
Though this is a guess - I am not affiliated with NXP, and thus have only access to publicly available information.