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.
| Name | Description | Value |
|---|---|---|
CMD_IMODE | Enter Interactive mode | 0x444247 55 |
CMD_EXIT | Jump to exit section | 0x444247 AA |
CMD_READCFM | Read a configuration memory word | 0x444247 4C |
CMD_CRC | Check the integrity of memory using the Cyclic Redundancy Check (CRC) table | 0x444247 C0 |
CMD_CE_ALL | Erase Flash memory, wipe volatile memories, and set the device to DAL2 | 0x444247 E3 |
CMD_SDAL0 | Set the device to DAL0 | 0x444247 10 |
| Name | Definition | Code |
|---|---|---|
| STATUS_CRC_FAIL | The CRC of memory area doesn’t match the expected value in the table | 0x00000001 |
| STATUS_CRC_OK | The CRC of memory area matches the expected value in the table | 0x00000002 |
| STATUS_INITCHECK_OK | Boot initialization complete, Interactive mode may be called | 0x00000003 |
| STATUS_BOOTOK | Entire boot sequence complete, DAL is set to the final value | 0x00000004 |
| STATUS_CMD_VALID | The previously transmitted command is valid and command flow continues | 0x00000005 |
| STATUS_ARG_INVALID | Unexpected or incoherent argument submitted to command or a locked command | 0x00000006 |
| STATUS_DATA_VALID | Boot ROM has valid data to output to debugger | 0x00000008 |
| STATUS_OK | Operation or command sub-sequence succeeded | 0x00000009 |
| STATUS_CHALLENGE | Prepare to accept an authentication challenge | 0x0000000B |
| Name | Definition | Interactive Mode Available | Code |
|---|---|---|---|
| STATUS_ERR_HARDFAULT | Hard fault occurred | No | 0xEEEE0001 |
| STATUS_ERR_CALOTP | Cal-OTP page integrity check failed | Yes | 0xEEEE0002 |
| STATUS_ERR_BOOTCFG | BOOTCFG page integrity check failed | Yes | 0xEEEE0004 |
| STATUS_ERR_EXEC | Boot ROM execution error, program flow diverted | No | 0xEEEE0006 |
| STATUS_ERR_PROG | Flash programming error | Yes | 0xEEEE0007 |
| STATUS_ERR_ECC | Double error detected on Flash while running the command | Yes | 0xEEEE0008 |
| STATUS_ERR_BUS | Bus error occurred on access to a system address | Yes | 0xEEEE000C |
| STATUS_ERR_CRCTABLE | Incorrect CRC table format/values | Yes | 0xEEEE000D |
| STATUS_ERR_ERASE | Erasing of Flash memory failed | Yes | 0xEEEE000F |
| STATUS_ERR_FUSEUP | Hardware fuse update compare check failed | Yes | 0xEEEE0011 |
| 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.) | Yes | 0xEEEE0019 |
| STATUS_ERR_PFMCRC | Program Flash Memory integrity check failed | Yes | 0xEEEE001A |
