SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
The COMMAND_DOWNLOAD command is sent to the bootloader to indicate where to store data in flash and how many bytes will be sent by the COMMAND_SEND_DATA commands that follow. The command consists of two 32-bit values that are both transferred MSB first. The first 32-bit value is the address to start programming data into, while the second is the 32-bit size of the data that will be sent. This command must be followed by a COMMAND_GET_STATUS command to ensure that the program address and program size are valid for the device. On the CC13x2 and CC26x2 devices, the flash starts at address 0x0000 0000. The command does not perform any kind of erase operation; it only prepares for the following flash programming performed by COMMAND_SEND_DATA commands. Required flash erase can be done by the COMMAND_BANK_ERASE and COMMAND_SECTOR_ERASE commands.
The format of the packet including the command is as follows:
unsigned char ucCommand[11];
ucCommand[0] = <size=11>;
ucCommand[1] = <checksum>;
ucCommand[2] = COMMAND_DOWNLOAD;
ucCommand[3] = Program Address [31:24];
ucCommand[4] = Program Address [23:16];
ucCommand[5] = Program Address [15:8];
ucCommand[6] = Program Address [7:0];
ucCommand[7] = Program Size [31:24];
ucCommand[8] = Program Size [23:16];
ucCommand[9] = Program Size [15:8];
ucCommand[10] = Program Size [7:0];