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
52 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
5.8.8 SH_CMD_SECTOR_ERASE (0xA8) command
The sector erase command is used to erase a sector in flash. A sector size is 1K bytes.
5.8.9 SH_CMD_PAGE_ERASE (0xA9) command
The page erase command is used to erase a page in flash. A page size is 64 bytes.
Table 68.
Response packet (error)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA7
Processed command identifier
length
0x2
0x2
0x4
Length of the response packet. 0x4 = failure
errorCode
0x4
0x4
Error code
Error code specified in error.h
Table 69.
Command packet
Field
Offset Size (bytes) Value
Description
command
0x0
0x1
0xA8
‘Erase sector’ command identifier
reserved
0x1
0x1
Should be zero.
sectorNum
0x2
0x2
Flash sector number to be erased. For example to erase flash
sector at 0x2000, this parameter should be set to 8.
Table 70.
Response packet (success)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA8
Processed command identifier
length
0x2
0x2
0x00
On success this field is set to 0.
Table 71.
Response packet (error)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA8
Processed command identifier
length
0x2
0x2
0x4
On error this field is set to 4
errorCode
0x4
0x4
Error code
Error code specified in error.h
Table 72.
Command packet
Field
Offset Size (bytes) Value
Description
command
0x0
0x1
0xA9
‘Page erase’ command identifier
reserved
0x1
0x1
Should be zero
pageNum
0x2
0x2
Flash page number to be erased. For example to erase flash
page at 0x8000, this parameter should be set to 512.
Table 73.
Response packet (success)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA9
Processed command identifier
length
0x2
0x2
0x00
Length of the response packet. 0x0 = success