5.2.3 Message Format

The ADP protocol uses a common message format for both directions of communication and all message types.

Table 5-47. ADP Message Format
FieldSizeValuesDescription
Token1 byte0xFFStart token for ADP data
Message ID1 byte0x00-0xFEIdentifies the type of message being sent
Data length2 bytes0x0000-0xFFFFLength of data packet (bytes)
DataN bytes...Data content of the message

Token

The value 0xFF followed by a value other than 0xFF (0xFF is not a valid Message ID), is used to indicate the start of the message. This means that 0xFF must be sent between each message.

If the value 0xFF is to be transmitted as part of data or data length, a new 0xFF should be inserted after it. When receiving messages, two 0xFF should be decoded as a single 0xFF. The extra 0xFF bytes are not contributing to the Data length field. For example, a color field with the value 0xFFFFFF will have to be transmitted as 0xFFFFFFFFFFFF, but only contributes to the data length by three bytes.

The value 0xFF is not allowed to be used as a message ID. When polling for data over SPI, the 0xFF token must be used as a dummy character to not trigger a command unintentionally.

Endianness

All message data is ordered using little endian.