•
Then there is a command status:
–
CMD_OK (=0x81) in case of success
–
CMD_ERROR (=0x82) in case of error
–
CMD_INTERNAL_ERROR (=0x83) in case of internal error (not due to the protocol).
–
CMD_UNKNOWN (= 0x84)
–
CMD_NOT_ALLOWED (= 0x85): Command not allowed
•
Then there might be some “Response data”
Figure 63.
Structure of a command response
MS54576V1
Cmd Id
Response data
Response
Byte
Cmd
status
1
Note:
Beware of the possible confusion between "status bytes" used for acknowledging (SEGMENT_OK = 0x80,
SEGMENT_ERROR = 0x81) and Command Status (CMD_OK = 0x81, CMD_ERROR = 0x82).
The following commands are currently used:
Table 5.
FTM commands list
Cmd Id
Command name
Data
Response data
0x00
FTM_GET_BOARD_INFO
Data must contain 2 bytes (0x00, 0x00)
The response data contains 4 bytes:
one indicating the board name and 3
indicating the firmware version
0x01
FTM_SEND_PICTURE
Data must contain the picture
Null
0x02
FTM_READ_PICTURE
Null
The response data contains the picture
read
0x03
FTM_STOPWATCH
Data must contain the stopwatch data
Null
0x04
FTM_FW_UPGRADE
Data must contain the firmware to send
Null
0x05
FTM_SEND_DATA
Data must contain the data to send
Null
0x06
FTM_READ_DATA
Null
The response data contains the data
read
0x07
FTM_SEND_PASSWORD
Data must contain the password to send
to grant the Firmware upgrade
Null
0x0F
ECHO
(used only for debug)
The first byte indicates if the STM32
must send a response with or without
error recovery (0x00 = without error
recovery, 0x01 = with error recovery).
The other bytes can be chosen by the
issuer
The response data contains the same
bytes has in the command data
UM2949
ST Light Protocol
UM2949
-
Rev 1
page 54/60