6.5.6.4.5 Interactive Mode Commands

The PIC32CM PL10 devices support the debug commands listed in Table 6-8. All commands, except for CMD_IMODE and CMD_EXIT, can only be used once the device is in Interactive debug mode. The CMD_IMODE and CMD_EXIT commands are used to enter or exit the Interactive debug mode.

All the commands listed in Table 6-8, except for the CMD_IMODE and CMD_EXIT, initiate an Interactive debug operation. The descriptions and procedures for these commands are provided below. These procedures assume that the device has already entered Interactive debug mode. Upon completion of any of these commands, the Boot ROM will wait for the next command. If, for any reason, the Boot ROM does not properly recognize a command, it will return STATUS_CMD_INVALID instead of STATUS_CMD_VALID.

Table 6-8. Interactive Mode Commands
NameDescriptionValue
CMD_IMODEEnter Interactive mode0x444247 55
CMD_EXITJump to exit section0x444247 AA
CMD_READCFMRead a configuration memory word0x444247 4C
CMD_CRCCheck the integrity of memory using the Cyclic Redundancy Check (CRC) table0x444247 C0
CMD_CE_ALLErase Flash memory, wipe volatile memories, and set the device to DAL20x444247 E3
CMD_SDAL0

Set the device to DAL0

0x444247 10
Table 6-9. Interactive Mode Completion Status
NameDefinitionCode
STATUS_CRC_FAILThe CRC of memory area doesn’t match the expected value in the table0x00000001
STATUS_CRC_OKThe CRC of memory area matches the expected value in the table0x00000002
STATUS_INITCHECK_OKBoot initialization complete, Interactive mode may be called0x00000003
STATUS_BOOTOKEntire boot sequence complete, DAL is set to the final value0x00000004
STATUS_CMD_VALIDThe previously transmitted command is valid and command flow continues0x00000005
STATUS_ARG_INVALIDUnexpected or incoherent argument submitted to command or a locked command0x00000006
STATUS_DATA_VALIDBoot ROM has valid data to output to debugger0x00000008
STATUS_OKOperation or command sub-sequence succeeded0x00000009
STATUS_CHALLENGEPrepare to accept an authentication challenge0x0000000B
Table 6-10. Interactive Mode Error Status
Name Definition Interactive Mode Available Code
STATUS_ERR_HARDFAULTHard fault occurredNo0xEEEE0001
STATUS_ERR_CALOTPCal-OTP page integrity check failedYes0xEEEE0002
STATUS_ERR_BOOTCFGBOOTCFG page integrity check failedYes0xEEEE0004
STATUS_ERR_EXECBoot ROM execution error, program flow divertedNo0xEEEE0006
STATUS_ERR_PROGFlash programming errorYes0xEEEE0007
STATUS_ERR_ECCDouble error detected on Flash while running the commandYes0xEEEE0008
STATUS_ERR_BUSBus error occurred on access to a system addressYes0xEEEE000C
STATUS_ERR_CRCTABLEIncorrect CRC table format/valuesYes0xEEEE000D
STATUS_ERR_ERASEErasing of Flash memory failedYes0xEEEE000F
STATUS_ERR_FUSEUPHardware fuse update compare check failedYes0xEEEE0011
STATUS_ERR_ROMCFG

ROMCFG page integrity check failed

(Only CMD_READCFM is guaranteed to be available. Other commands may be disabled or their KEYVAL is in error.)

Yes0xEEEE0019
STATUS_ERR_PFMCRCProgram Flash Memory integrity check failedYes0xEEEE001A