UM11029
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
30 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
5.5.6 Prepare sectors for write operation
This command makes flash write/erase operation a two-step process.
5.5.7 Copy RAM to flash
When writing to the flash, the following limitations apply:
1. The smallest amount of data that can be written to flash by the copy RAM to flash
command is 64 byte (equal to one page).
2. One page consists of 16 flash words (lines), and the smallest amount that can be
modified per flash write is one flash word (one line). This limitation exists because
ECC is applied during the flash write operation, see
.
3. To avoid write disturbance (a mechanism intrinsic to flash memories), an erase
should be performed after 16 consecutive writes inside the same page. Note that the
erase operation then erases the entire sector.
Remark:
Once a page has been written to 16 times, it is still possible to write to other
pages within the same sector without performing a sector erase (assuming that those
pages have been erased previously).
Table 22.
USART ISP Prepare sectors for write operation command
Command
P
Input
Start Sector Number
End Sector Number:
Should be greater than or equal to start sector number.
Return Code
CMD_SUCCESS |
BUSY |
INVALID_SECTOR |
PARAM_ERROR
Description
This command must be executed before executing "Copy RAM to flash" or "Erase Sector(s)", or “Erase
Pages” command. Successful execution of the "Copy RAM to flash" or "Erase Sector(s)" or “Erase Pages”
command causes relevant sectors to be protected again. To prepare a single sector use the same "Start"
and "End" sector numbers.
Example
"P 0 0<CR><LF>" prepares the flash sector 0.