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
59 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
#define SH_CMD_CHECK_IMAGE 0xA4
#define SH_CMD_PROBE
0xA5
#define SH_CMD_WRITE_BLOCK 0xA6
#define SH_CMD_READ_BLOCK 0xA7
#define SH_CMD_SECTOR_ERASE 0xA8
#define SH_CMD_PAGE_ERASE 0xA9
#define SH_CMD_PAGE_WRITE 0xAA
#define SH_CMD_PAGE_READ 0xAB
#define SH_CMD_WRITE_SUBBLOCK 0xAC
#define SH_CMD_READ_SUBBLOCK 0xAD
#define SH_CMD_BULK_ERASE 0xAE
#define SH_CMD_WRITE_RAM 0xB0
#define SH_CMD_GOTO 0xB1
#define SH_CMD_FAIM_READ 0xBE
#define SH_CMD_FAIM_WRITE 0xBF
/** Structure describing response packet format. */
typedef struct {
uint8_t sop;
/*!< Start of packet = 0x55 for bootloader */
uint8_t cmd;
/*!< Response to the Command ID. */
uint16_t length; /*!< Response data length not including this header. */
} CmdResponse_t;
/** Structure describing Read/Write block command packet format. */
typedef struct {
uint8_t cmd;
/*!< Command ID */
uint8_t crc_check; /*!< specifies if we need to do CRC check before processing */
uint16_t block_nr; /*!< Block number.*/
uint32_t data[SL_FLASH_BLOCK_SZ/4];
/*!< Data */
uint32_t crc32;
/*!< CRC32 of command header and data */
} CmdRWBlockParam_t;
.
.
.
.
.
.
.
/** Structure describing Read/Write page command packet format. */
typedef struct {
uint8_t cmd;
/*!< Command ID */
uint8_t crc_check; /*!< specifies if we need to do CRC check before processing */
uint16_t page_nr; /*!< page number.*/
uint32_t data[SL_FLASH_PAGE_SZ/4];
/*!< Data */
uint32_t crc32;
/*!< CRC32 of command header and data */
} CmdRWPageParam_t;
/** Structure describing Read sub-block command packet format. */
typedef struct {
uint8_t cmd;
/*!< Command ID */
uint8_t sub_block_nr;
/*!< specifies the sub-block number. Bits below:
0 - Skip crc;
5-1: sub block nr;
7-6: sub-block size. 0 - 32, 1 - 64, 2 - 128, 3 - 256 */
uint16_t block_nr;
/*!< block number.*/
uint32_t data[SL_FLASH_BLOCK_SZ/4];
/*!< Data */
} CmdReadSubBlockParam_t;
/** Structure describing Sector erase command packet format. */