SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
The COMMAND_SEND_DATA command must only follow a COMMAND_DOWNLOAD command or another COMMAND_SEND_DATA command, if more data is needed. Consecutive COMMAND_SEND_DATA commands automatically increment the address and continue programming from the previous location.
The command terminates programming when the number of bytes indicated by the COMMAND_DOWNLOAD command is received.
The bootloader sends the ACK in response to the command after the actual programming is complete. Each time this function is called, enter a COMMAND_GET_STATUS command to ensure that the data was successfully programmed into the flash. If the bootloader sends a NAK signal to this command, the bootloader does not increment the current address, which allows for retransmission of the previous data.
The format of the packet including the command is as follows:
unsigned char ucCommand[4-255];
ucCommand[0] = <size>;
ucCommand[1] = <checksum>;
ucCommand[2] = COMMAND_SEND_DATA;
ucCommand[3] = Data byte to be programmed[0];
ucCommand[4] = Data byte to be programmed[1];
ucCommand[5] = Data byte to be programmed[2];
ucCommand[6] = Data byte to be programmed[3];
ucCommand[7] = Data byte to be programmed[4];
ucCommand[<size-1>] = Data byte to be programmed[<size-4>];