Bit number
Description
Bit 3 - 2
•
Bits used to indicate data split on several packets. They have the following meaning:
–
b00: Data fitting in a single packet.
–
b01: First packet of a serie of packets. In that case, a total length field (on 4 bytes) is present. It
indicates the length of the data that has been split on several packets.
–
b10: Middle packet (there can be more than one).
–
b11: End packet finishing the transfer of the data.
Bit 1
Parity bit toggling for every new segment. It allows to detect the re-transmission of the same segment
Bit 0
Bit indicating if the packet belongs to a segment
The following table describes the content structure of the status byte.
Table 4.
Status byte structure
Bit number
Description
Bit 7
This bit must be set to 1 for a status byte (to avoid confusion with control bytes)
Bit 6 - 4
Reserved
Bit 3 - 0
Status of the last packet(s) received:
•
00: SEGMENT_OK
•
01: SEGMENT_ERROR (Ex: CRC error, packet lost…etc)
So a status byte with the value 0x80 corresponds to SEGMENT_OK and 0x81 corresponds to
SEGMENT_ERROR.
A.4
ST Light Protocol
On top of previous low level protocol, a light protocol is used to indicate the content of the sent data. This light
protocol is used to send commands that can be understood by the receiver.
It is not mandatory to use this light protocol. Users can use their own protocol if they prefer.
In this protocol, the data sent are called “Commands”.
A command starts with a byte called “cmdId” and can be followed by some data:
Figure 62.
Structure of a command
MS54575V1
Cmd
Id
DATA
Command
Byte
0
Warning:
The most significant bit of the command_id must be set to 0.
Response format:
•
The response must start with a response byte that is (0x80 | cmdId). It allows the user to check that the
response really matches the command sent. The most significant bit is set to 1 to indicate that it is a
response and not a command.
UM2949
ST Light Protocol
UM2949
-
Rev 1
page 53/60