SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
This command writes the received data in accesses with specified width (8 bits or 32 bits) from a specified memory mapped start address. Data to be written must be contained in same packet as the command. The access width is given by the specified Access Type. The Access Type must be either 0 or 1. The value of 0 forces 8-bit write accesses. The value of 1 forces 32-bit write accesses. The number of data bytes received is given by the packet size byte. Maximum number of data bytes for access width 0 is 247 and 244 for access width 1.
Specific memory mapped areas must not be written to using the COMMAND_MEMORY_WRITE command. Memory writes to the following memory mapped areas can cause the serial bootloader to end up in a nonfunctional state as these areas are used by the bootloader. This is valid for the following memory mapped areas:
The COMMAND_MEMORY_WRITE command cannot be used to write to Flash memory.
The format of the packet including the command is as follows:
unsigned char ucCommand[(from 9 to 255)];
ucCommand[0] = <size=(from 9 to 255)>;
ucCommand[1] = <checksum>;
ucCommand[2] = COMMAND_MEMORY_WRITE;
ucCommand[3] = Memory Map Address [31:24];
ucCommand[4] = Memory Map Address [23:16];
ucCommand[5] = Memory Map Address [15:8];
ucCommand[6] = Memory Map Address [7:0];
ucCommand[7] = Access Type [7:0];
ucCommand[8] = Data [7:0];
...
...
ucCommand[9 + (packet size - 9)] = Data [7:0] or Data[31:24];