Gmp231 state machine, Table 15, Response message in gmp231 i – Vaisala GMP231 User Manual
Page 55: C interface

Chapter 5 _______________________________________________________________ I2C Interface
VAISALA ________________________________________________________________________ 53
Table 15
Response Message in GMP231 I
2
C Interface
Message Segment Length
Content
Start
I
2
C start condition.
I
2
C address
1 byte
Status
1 byte
See section Status Byte on page 56.
Command
1 byte
Identifier of command that was used in
the invoke that the slave is responding
to. If the slave is in Idle state (no valid
invoke), the command code is FFh.
Device address
1 byte
Frame length
1 byte
Length of response message in bytes
(excluding I
2
C address, including CRC).
Minimum response frame length is
6 bytes.
Data
Variable length Content and length depending on the
command.
Checksum
2 bytes
See section Checksum on page 56.
Stop
I
2
C stop condition
GMP231 State Machine
The main and initial state of the GMP231 is Idle, and it will change to
WaitResponse state only when a valid invoke is received. In the
WaitResponse state, the GMP231 expects to see an I
2
C read operation
from the master. After seeing a read operation ,the GMP231 outputs its
response with ACK/NACK and status signals.
If GMP231 is in WaitResponse state and master sends a new invoke, the
GMP231’s response to the previous invoke is lost. When the master
sends the next I
2
C read command, the GMP231 sends it the response to
the latest invoke.
If GMP231 is in Idle state and the master sends an I
2
C read, GMP231
responds with a NACK-signal. This tells the master that the data which
the master may have received in same I
2
C read is not valid.
If the GMP231 receives an invalid invoke, it goes to the Idle state. An
invoke message can be invalid because of an unknown command,
erroneous CRC, or invalid message length.