English
Language : 

PIC32MX795F512L-80IPT Datasheet, PDF (33/68 Pages) Microchip Technology – PIC32 Flash Programming Specification
16.2 The PE Command Set
The PE command set is shown in Table 16-2. This
table contains the op code, mnemonic, and short
description for each command. Functional details on
each command are provided in Section 16.2.3
“ROW_PROGRAM
Command”
through
Section 16.2.14 “CHANGE_CFG Command”.
The PE sends a response to the programmer for each
command that it receives. The response indicates if the
command was processed correctly. It includes any
required response data or error data.
16.2.1 COMMAND FORMAT
All PE commands have a general format consisting of
a 32-bit header and any required data for the command
(see Figure 16-1). The 32-bit header consists of a
16-bit Op code field, which is used to identify the
command, and a 16-bit command Operand field. Use
of the Operand field varies by command.
Note:
Some commands have no Operand infor-
mation, however, the Operand field must
be sent and the programming executive
will ignore the data.
PIC32
FIGURE 16-1:
31
COMMAND FORMAT
16
Op code
15
0
Operand (optional)
31
16
Command Data High (if required)
15
0
Command Data Low (if required)
The command in the Op code field must match one of
the commands in the command set that is listed in
Table 16-2. Any command received that does not
match a command the list returns a NACK response,
as shown in Table 16-3.
The PE uses the command Operand field to determine
the number of bytes to read from or to write to. If the
value of this field is incorrect, the command is not be
properly received by the PE.
TABLE 16-2: PE COMMAND SET
Op code
Mnemonic
Description
0x0 ROW_PROGRAM(1)
Program one row of Flash memory at the specified address.
0x1 READ
Read N 32-bit words of memory starting from the specified address (N < 65,536).
0x2 PROGRAM
Program Flash memory starting at the specified address.
0x3 WORD_PROGRAM(3) Program one word of Flash memory at the specified address.
0x4 CHIP_ERASE
Chip Erase of entire chip.
0x5 PAGE_ERASE
Erase pages of code memory from the specified address.
0x6 BLANK_CHECK
Blank Check code.
0x7 EXEC_VERSION
Read the PE software version.
0x8 GET_CRC
Get the CRC of Flash memory.
0x9 PROGRAM_CLUSTER Programs the specified number of bytes to the specified address.
0xA GET_DEVICEID
0xB CHANGE_CFG(2)
Returns the hardware ID of the device.
Used by the probe to set various configuration settings for the PE.
0xC GET_CHECKSUM
Get the checksum of Flash memory.
0xD QUAD_WORD_PGRM(4) Program four words of Flash memory at the specified address.
Note 1: Refer to Table 5-1 for the row size for each device.
2: This command is not available in PIC32MX1XX/2XX devices.
3: On the PIC32MZ EC family devices, which incorporate ECC, the WORD_PROGRAM command will not
generate the ECC parity bits. Reading a location programmed with the WORD_PROGRAM command with
ECC enabled will cause a DED fault.
4: This command is available on PIC32MZ EC family devices only.
 2007-2013 Microchip Technology Inc.
DS61145L-page 33