> 19.7 | AT^SSPI Serial Protocol Interface

> The AT^SSPI command enables the module to be connected to external I²C or SPI devices.
> The I²C/SPI datastream is mapped through an internal I²C/SPI driver to and from an ASCII hex protocol which can be exchanged with an internal application (JAVA) or an external application via V24.
> The AT^SSPI write command configures and activates the I²C/SPI interface and changes from command mode into data mode. All values must be given in hexadecimal format (0 - 9, A - F) without "0x". For details on data mode please refer to Section 19.7.3, Transmitting Data over AT Interface.
> Caution:
> If I²C or SPI data mode is active the DCD line of the connected serial port goes high.
> If I²C or SPI are opened from a Java application be sure to close the I²C or SPI channels before Java terminates.
> Syntax

> Test Command AT^SSPI=?
> Response(s)
> ^SSPI:(list of supported <basicConfiguration>s), (list of supported <delayOne>s), (list of supported <delayTwo>s), (list of supported <wordLength>s), (list of supported <extendedSpiConfiguration>s)
> OK

> Read Command AT^SSPI?
> Response(s)
> ^SSPI: <connectionState>, <basicConfiguration>, <delayOne>, <delayTwo>, <wordLength>, <extendedSpiConfiguration>
> OK
> ERROR
> +CME ERROR: <err>

> Write Command AT^SSPI=[<basicConfiguration>[, <delayOne>[, <delayTwo>[, <wordLength>[, <extendedSpiConfiguration>]]]]]
> Response(s)
> CONNECT
> (indicates that ME has entered data mode)
> ERROR
> +CME ERROR: <err>

> Reference(s) |  | PIN |  | ASC0 | ASC1 | USB | MUX1 | MUX2 | MUX3 |  |  | Charge | Q | Last
> SIEMENS |  | - |  | + | + | + | + | + | + |  |  | - | + | +

> Parameter Description

> <connectionState>(num)

> Parameter returned by the AT^SSPI? read command.
> Indicates whether or not the I²C or SPI channel is used. When the channel is open and the ME is in data mode, the read command can only be used if one of the remaining interfaces is available. For example, when the channel was opened on ASC0, you can use ASC1 or the MUX channels to check the status.
> [0](&F)
> Not connected (channel closed). All following parameters are the factory settings AT^SSPI=0,0010,0000,0000,0000,0000.
> 1
> Connected (channel open, ME in data mode). All following parameters are the values currently used, for example AT^SSPI=1,0010,FFFF,FFFF,0000,0000.

> <basicConfiguration>(num)

> Parameter <basicConfiguration> is a 16 bit word which contains four subparameters to control the following functions:

> Subparameter | Bit | Hexadecimal | Selected function
> Interface type | D15 - D12 | 0 1 | I²C bus (default) SPI device
> Port | D11 - D8 | 0 | Internal port
> Data transfer rate | D7 - D4 | 0 1 0 1 2 3 4 5 | I²C at 100 kbps I²C at 400 kbps (default) SPI at 100 kbps SPI at 250 kbps SPI at 500 kbps SPI at 1.083 Mbps SPI at 3.25 Mbps SPI at 6.5 Mbps
> Protocol | D3 - D0 | 0 | ASCII (hex coding)

> <delayOne>(num)

> I²C: This parameter specifies a delay after each written byte. See Section 19.7.1, Specifying Delay Time for I²C for further details.
> SPI: 0000 only.
> [0](&F)...FFFF
> Unsigned 16 bit value

> <delayTwo>(num)

> I²C: This parameter specifies the delay after a each read byte. See Section 19.7.1, Specifying Delay Time for I²C for further details.
> SPI: 0000 only.
> [0](&F)...FFFF
> Unsigned 16 bit value

> <wordLength>(num)

> For SPI only:
> 0
> Length of SPI word = 8 bits

> <extendedSpiConfiguration>(num)

> For SPI only: Parameter <extendedSpiConfiguration> is a 16 bit word which contains four subparameters to control the following functions:

> Subparameter | Bit | Hexadecimal | Selected function
> SPI mode | D15 - D12 | 0 1 2 3 | Four different SPI modes. Phase and polarity of all SPI modes are illustrated in Section 19.7.2, Selecting SPI Mode.
> Chip Select (CS) mode | D11 - D8 | 0 | One Chip Select per Transfer Frame.
> Arrangement of bytes | D7 - D4 | 0 | Big endian
> Bit sequence (arrangement of bits on the SPI) | D3 - D0 | 0 | MSB first