Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
Bootloader Interfaces
NOTE:
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 a programming operation of all the DAP and TAP configuration parameters and the
BOOTLOADER_ENABLE parameter within CCFG with values equal to the corresponding parameters
within FCFG1.
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];
8.2.3.5
COMMAND_GET_STATUS
This command returns the status of the last command that was issued. Typically this command is received
after every command is sent to ensure that the previous command was successful; or, if the command
failed, to properly respond to a failure. The bootloader responds by sending a 3 byte packet with the size
byte, checksum byte, and 1 byte of the current-status value.
The bootloader then waits for an ACK from the host as a confirmation that the packet was received.
The format of the packet including the command is as follows:
unsigned char ucCommand[3];
ucCommand[0] = <size=3>;
ucCommand[1] = <checksum>;
ucCommand[2] = COMMAND_GET_STATUS;
lists the definitions for the possible status values that can be returned from the bootloader when
a COMMAND_GET_STATUS command is sent to the bootloader
Table 8-5. Defined Status Values
Status Definition
Value
Description
COMMAND_RET_SUCCESS
0x40
Status for successful command
COMMAND_RET_UNKNOWN_CMD
0x41
Status for unknown command
Status for invalid command (in other words,
COMMAND_RET_INVALID_CMD
0x42
incorrect packet size)
COMMAND_RET_INVALID_ADR
0x43
Status for invalid input address
COMMAND_RET_FLASH_FAIL
0x44
Status for failing flash erase or program operation
679
SWCU117A – February 2015 – Revised March 2015
Bootloader
Copyright © 2015, Texas Instruments Incorporated