![ST METERS AND MORE UM2241 User Manual Download Page 7](http://html1.mh-extra.com/html/st/meters-and-more-um2241/meters-and-more-um2241_user-manual_1355487007.webp)
UM2241
Host interface
DocID030767 Rev 1
7/26
contains some examples on how complex operations shall be
managed between the host controller and the ST75MM.
1.3
Acknowledge
In order to improve the serial link robustness, every frame except the SM must be
acknowledged by the receiver within a given period T
ACK
(host interface timings are
managed through a dedicated MIB object, see
otherwise the sender will repeat once the same message waiting for a new acknowledge. If
no acknowledge arrives after the second message is sent, the message is discarded by the
sender and no further repetitions are sent. If the sender is the ST75MM, no further action is
taken.
The acknowledge byte is only linked to the format of the frame, and shall never give
feedback on the validity or execution of the command; it can have two values:
0x06 (ACK) which means that the received command is well formed
0x15 (NAK) which means that the received command has errors (length or CRC).
1.4
Command frame format
Commands are formatted as follows:
Table 1: Command frame format
Starting
Byte
Field
Size
Value
Description
0
Frame
start
1
0x02 /
0x03
Used to mark the start of a command. In order for the
host controller to distinguish between a message and its
repetition
. The frame start has always the value 0x02,
except for repeated messages, where a value of 0x03 is
used. When the host controller receives a message
starting with 0x03 it should verify if the same message
has already been received, and, in this case, discards
the latter one.
1
Length
1
Any
Number of payload bytes after the first one (always
sent).
2
Command
code
1
Any
Identifies the command to be executed.
3
Payload
1...256
Any
Contains the parameters associated with the command.
4
Checksum
2
Any
Sum of the Length, Command code and Payload fields.
The sum is performed byte-wise, represented as 16-bit
value and sent to the host controller MSB first.
Notes:
(1)
This condition is generated when the modem doesn’t receive the ACK message from the host controller within
the proper T
ACK
time.
1.5
Status message frame format (SM)
The SM is formatted as follows:
Table 2: Status message format
Starting
Byte
Field
Size Value
Description