
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
375 of 487
NXP Semiconductors
UM10800
Chapter 25: LPC82x Flash In-System and In-Application Programming
25.6.1.6 Prepare sector(s) for write operation <start sector number> <end sector
number>
This command makes flash write/erase operation a two step process.
25.6.1.7 Copy RAM to flash <Flash address> <RAM address> <no of bytes>
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 follows from the
application of ECC to the flash write operation, see
.
3. To avoid write disturbance (a mechanism intrinsic to flash memories), an erase should
be performed after following 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 317. UART ISP Read Memory command
Command
R
Input
Start Address:
Address from where data bytes are to be read. This address
should be a word boundary.
Number of Bytes:
Number of bytes to be read. Count should be a multiple of 4.
Return Code
CMD_SUCCESS followed by <actual data (plain binary)> |
ADDR_ERROR (Address not on word boundary) |
ADDR_NOT_MAPPED |
COUNT_ERROR (Byte count is not a multiple of 4) |
PARAM_ERROR |
CODE_READ_PROTECTION_ENABLED
Description
This command is used to read data from RAM or flash memory. This command is
blocked when code read protection is enabled.
Example
"R 268435456 4<CR><LF>" reads 4 bytes of data from address 0x1000 0000.
Table 318. UART ISP Prepare sector(s) 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)" command. Successful execution of the "Copy RAM to flash" or "Erase
Sector(s)" command causes relevant sectors to be protected again. The boot
block can not be prepared by this command. To prepare a single sector use the
same "Start" and "End" sector numbers.
Example
"P 0 0<CR><LF>" prepares the flash sector 0.