AC75 AT Command Set

19.8 AT^SSPI

s

Message syntax:

Each Message consists of a Start and Stop character, a Message-ID, further protocol data and user data. The notation of all elements is explained below:

Notation of Message-ID:

All ASCII characters between 0x00...0x7F. It is recommended to use only the characters 0...9, A...Z, a...z.

Length of the Message-ID: only one character

Notation of protocol data (except Message-ID) and user data:

Hex (0...9, a...f, A...F)

Without "0x" (0x01 01)

Each hex value consists of 2 characters (1 01)

Without delimiters such as comma, semicolon, space etc. (0xAE 0x01 0xA5 AE01A5)

In a Transfer Message, the number of all characters after the Message ID shall be even. If it is odd, a protocol error will be reported. On the I²C bus, this applies to the I²C Slave Address and all subsequent written user data. On the SPI this applies to the Read Offset Byte and the Read Length and, if available, all written user data. (Keep in mind that the number of all characters transmitted between Start "<" and Stop ">" of the Trans- fer Frame shall always be odd because the ID is one character only.)

Length of I²C Slave Address and user data: 2048 bytes

The first element of each message is the Start character ("<" for Transfer, "{" for the Response). Accordingly, the last character of a message is the Stop character (">" for Transfer, "}" for the Response).

The second element of each message is the Message ID (1 character). The Message ID serves the user to dis- tinguish between different messages. It is only relevant on protocol level (between AT interface and I²C device driver), i.e. it is not sent to the I²C slave device.

Each transfer to the device is followed by a Response Message sent from the driver to the AT interface. The response includes the Message ID and either OK ("+") or error characters ("-" or "!"). A successful response to a Read Message contains the OK character and the read data. If an error occurs on the I²C bus, the response consists of an error character followed by a 16 bit code specifying the faulty byte.

After each Transfer Message, wait for the Response Message before sending the next Transfer Message.

All characters entered outside a valid message (i.e. not input between Start character "<" and Stop character ">") are ignored.

19.8.3.1Structure of Messages on the I²C Bus

Table 19.4: Structure of Transfer and Response Messages on the I²C bus

Frame

Format

Write Transfer Message

< ID SlaveAddress Data >

 

Maximum length: 2048 bytes for I²C Slave Address

 

and written data. LSB of I²C Slave Address = "0".

Read Transfer Message

< ID SlaveAddress ReadLength >

 

Read Length 2048 bytes. LSB I²C of Slave Address

 

= "1".

Response Message

 

Write OK

{ID + }

Read of x bytes OK

{ID + Data }

NAK for xth byte if Read or Write

{ID - xxxx }

Protocol error in xth byte

{ID ! xxxx }

On the I²C bus, read and write data are handled in two separate frames transmitted one after the other. This is because the I²C bus has only two bus lines, I2CDAT (I2CDAT_SPIDO) for the serial data and I2CCLK (I2CCLK_SPICLK) for the serial clock. Write data are packed into a Transfer Frame. Read data are packed into

AC75_ATC_V01.002

Page 501 of 569

10/30/06

Confidential / Released

 

 

Page 501
Image 501
Siemens AC75 manual Structure of Messages on the I²C Bus, Message syntax