SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
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 image data into, which the second is the 32-bit size of the image data that will be sent. This command must be followed by a COMMAND_GET_STATUS command to ensure that the image address and image size are valid for the device. On the CC13x4x10 and CC26x4x10 devices, the Flash starts at address 0x00000000. 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 ID is as follows:
unsigned char ucPacket[11];
ucPacket[0] = <size=11>;
ucPacket[1] = <checksum>;
ucPacket[2] = COMMAND_DOWNLOAD;
ucPacket[3] = <image address [31:24]>;
ucPacket[4] = <image address [23:16]>;
ucPacket[5] = <image address [15:8]>;
ucPacket[6] = <image address [7:0]>;
ucPacket[7] = <image size [31:24]>;
ucPacket[8] = <image size [23:16]>;
ucPacket[9] = <image size [15:8]>;
ucPacket[10] = <image size [7:0]>;