![Gemalto Cinterion ENS22-E Скачать руководство пользователя страница 172](http://html.mh-extra.com/html/gemalto/cinterion-ens22-e/cinterion-ens22-e_at-command-set_2206709172.webp)
Cinterion
®
ENS22-E AT Command Set
12.4 AT^SSPI
ENS22-E_ATC_V01.000
19/02/11
Page 172 of 189
12.4.4
Example: Using I²C Bus
As stated above, it is recommended to run the Terminal program in chat mode or to use the local echo. First,
activate the I²C interface:
The module is in data mode now. This allows you to send a Write Transfer Message:
To quit data mode and return to command mode enter the Close character "#":
If the ME is in command mode, the response to the read command contains the factory settings.
If the ME is in data mode, the response to the read command contains the current settings.
12.4.5
Error Handling on the SPI Bus
Protocol error:
If a protocol error is detected the ASCII value "!" is sent to the AT interface. Also, a Stop Condition is sent to the
SPI device.
A protocol error occurs if
• any data / address characters do not equal 0...9, a...f and A...F
• the number of ASCII data is odd (e.g. "af1" instead of "af01")
• the Read or Write request is greater than 128 Bytes (0x0080).
AT^SSPI=0000,0000,0000
The first group of characters forms the
, where the first "0" sets I²C, the sec-
ond "0" is the internal port, the digit "0" sets 100 kbps
bit rate on the I²C bus, and the next "0" selects ASCII
coding.
Note: If omitted all above parameters are assumed
by default. Therefore, instead of AT^SSPI=
0000,0000,0000 it is sufficient to enter only
AT^SSPI=
CONNECT
<aAE000102030405060708090A0B0C0D0E0F>
Write Transfer Frame, where a = ID, AE = Slave
Address and write request.
{a+}
Write Response Message, where a = ID.
<bAF0010>
Read Transfer Message, where b = ID, AF = Slave
Address and read request, 0010 = number of
expected bytes.
{b+000102030405060708090A0B0C0D0E0F}
Read Response Message, where b = ID.
#
OK
The response OK confirms that the ME is back to
command mode and ready to accept any AT com-
mands.
AT^SSPI?
^SSPI: 0,0000,0000,0000
The read command returns the connection state "not
connected" (Channel closed) and the factory set-
tings for I²C.
OK
AT^SSPI?
^SSPI: 1,0000,0000,0000
The read command returns the connection state
"connected" (Channel open) and the current settings
for I²C.
OK