17.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 17-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 information; however, the Operand field must be sent and the programming executive will ignore the data.
Figure 17-1. Command Format

The command in the op code field must match one of the commands in the command set that is listed in Table 17-2. Any command received that does not match a command the list returns a NACK response, as shown in Table 17-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 17-2. PE Command Set
Op CodeMnemonicDescription
0x0ROW_PROGRAM(1)Program one row of Flash memory at the specified address
0x1READRead N 32-bit words of memory starting from the specified address (N < 65,536)
0x2PROGRAMProgram Flash memory starting at the specified address
0x3WORD_PROGRAM(3)Program one word of Flash memory at the specified address
0x4CHIP_ERASEChip erase of entire chip
0x5PAGE_ERASEErase pages of code memory from the specified address
0x6BLANK_CHECKBlank check code
0x7EXEC_VERSIONRead the PE software version
0x8GET_CRCGet the CRC of Flash memory
0x9PROGRAM_CLUSTERPrograms the specified number of bytes to the specified address
0xAGET_DEVICEIDReturns the hardware ID of the device
0xBCHANGE_CFG(2)Used by the probe to set various configuration settings for the PE
0xCGET_CHECKSUMGet the checksum of Flash memory
0xDQUAD_WORD_PGRM(4)Program four words of Flash memory at the specified address
Note:
  1. Refer Table 5-1 for the row size for each device.
  2. This command is not available in the PIC32MX1XX/2XX devices.

  3. On the PIC32MZ 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 PIC32MK and PIC32MZ family devices only.