SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
The COMMAND_SECTOR_ERASE command erases a specified flash sector. One flash sector has the size of 8 kB.
The command consists of one 32-bit value that is transferred MSB first. The 32-bit value is the start address of the flash sector to be erased.
The bootloader responds with an ACK signal to the host device after the actual erase operation is performed.
On the CC13x2x7 and CC26x2x7 device platform, the flash starts at address 0x0000 0000 and it has sectors of 8 kB each.
Sectors protected by write-protect bits in FCFG1 and CCFG are not erased.
If the sector address of the top sector (including the CCFG area) is specified, the actual erase is followed by CCFG values being programmed to the same values as the device had when it was delivered from TI.
The format of the packet including the command is as follows:
unsigned char ucCommand[7];
ucCommand[0]= <size=7>;
ucCommand[1]= <checksum>;
ucCommand[2]= COMMAND_ERASE;
ucCommand[3]= Sector Address [31:24];
ucCommand[4]= Sector Address [23:16];
ucCommand[5]= Sector Address [15: 8];
ucCommand[6]= Sector Address [ 7: 0];