SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
The COMMAND_SECTOR_ERASE command erases a specified Flash sector.
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 CC13x4x10 and CC26x4x10 device platform, the Flash starts at address 0x00000000 and it has sectors of 2 KB each.
Sectors protected by write-protect bits in FCFG1 and CCFG are not erased.
If the sector address of the CCFG sector is specified, the actual erase is followed by a set of default CCFG values being written into the CCFG so that the bootloader is still enabled upon reset.
The format of the packet including the command ID is as follows:
unsigned char ucPacket[7];
ucPacket[0] = <size=7>;
ucPacket[1] = <checksum>;
ucPacket[2] = COMMAND_SECTOR_ERASE;
ucPacket[3] = <Sector Address [31:24]>;
ucPacket[4] = <Sector Address [23:16]>;
ucPacket[5] = <Sector Address [15:8]>;
ucPacket[6] = <Sector Address [7:0]>;