SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
The COMMAND_GET_STATUS command returns the status of the last command that was issued. Typically, this command is received after every other command is sent to ensure that the previous command was successful; or, if the command failed, to properly respond to a failure. The bootloader responds by sending a 3-byte packet with the size byte, checksum byte, and 1 byte of the current-status value.
The bootloader then waits for an ACK from the host as a confirmation that the packet was received.
The format of the packet including the command is as follows:
unsigned char ucCommand[3];
ucCommand[0] = <size=3>;
ucCommand[1] = <checksum>;
ucCommand[2] = COMMAND_GET_STATUS;
Table 11-4 lists the definitions for the possible status values that can be returned from the bootloader when a COMMAND_GET_STATUS command is sent to the bootloader
Status Definition | Value | Description |
---|---|---|
COMMAND_RET_SUCCESS | 0x40 | Status for successful command |
COMMAND_RET_UNKNOWN_CMD | 0x41 | Status for unknown command |
COMMAND_RET_INVALID_CMD | 0x42 | Status for invalid command (in other words, incorrect packet size) |
COMMAND_RET_INVALID_ADR | 0x43 | Status for invalid input address |
COMMAND_RET_FLASH_FAIL | 0x44 | Status for failing flash erase or program operation |