SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
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 ID is as follows:
unsigned char ucPacket[3];
ucPacket[0] = <size=3>;
ucPacket[1] = <checksum>;
ucPacket[2] = COMMAND_GET_STATUS;
Table 10-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 |