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
51 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
5.8.7 SH_CMD_READ_BLOCK (0xA7) command
The read block command is used to read a block of data from flash. A block of data is 128
bytes.
Table 63.
Command packet
Field
Offset
Size (bytes) Value
Description
command
0x0
0x1
0xA6
‘Write block’ command identifier
crcCheck
0x1
0x1
0 – Do CRC check for this packet
1 - Ignore CRC field for this packet
blockNum
0x2
0x2
Flash block number in which the appended data to be programmed.
For example to program flash block 0x8000, this parameter should
be set to 256.
data
0x4
Block_size
Data to be programmed in flash.
checksum
Bloc 4 0x4
CRC32 CRC32 of the packet excluding this field. Set this field to 0 if
crcCheck is set to 1.
Table 64.
Response packet (success)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA6
Processed command identifier
length
0x2
0x2
0x00
On success this field is set to 0.
Table 65.
Response packet (error)
Field
Offset Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA6
Processed command identifier
length
0x2
0x2
0x00
On error this field is set to 4
errorCode
0x4
0x4
Error code
Error code specified in error.h
Table 66.
Command packet
Field
Offset Size (bytes) Value
Description
command
0x0
0x1
0xA7
‘Read block’ command identifier
reserved
0x1
0x1
Should be zero
blockNum
0x2
0x2
Flash block number to read. For example to read flash block
0x8000, this parameter should be set to 256.
Table 67.
Response packet (success)
Field
Offset
Size (bytes) Value
Description
sop
0x0
0x1
0x55
Start of packet identifier
command
0x1
0x1
0xA7
Processed command identifier
length
0x2
0x2
Bloc 4
Length of the response packet. Bloc 4 =
success
data
0x4
Block_size
Flash block content
checksum
Bloc 4 0x4
CRC32
CRC32 of the packet excluding this field