User Manual

Page 25 of 39
CHAPTER 6
FreeStar Application Guide
6.1 Overview
This Chapter describes the essentials for using the host protocol to configure
and use a FreeStar module in an application. Please refer to Host Protocol
Document for Further Details on messaging.
6.1.1 Host Protocol
The host protocol that is used to communicate with a FreeStar module is a
simple binary based protocol. Every message in the protocol consists of a
header, a trailer, and potentially some payload information.
The header is made up of a start byte (0x01), a length byte that is the length
of the entire message including header and trailer, and a message type that
identifies the intention of the message.
The payload varies from message to message but in general includes things
such as data to be sent or received, or configuration information.
The trailer is made up of a checksum, which the sum of all of the bytes in the
message is starting with the start byte and up through the payload, and an
end byte (0x04).
Every message that the host device sends to the FreeStar module has a
complimentary acknowledgement message that will get sent back upon
successful decoding and processing by the FreeStar module.
6.1.2 Configuration
After power-up or after receiving a “Reset Request” (type 0x18) message,
the FreeStar module will read the configurable parameters from the on-board
microcontroller’s non-volatile memory, and store them in RAM to be used
from that point on. Changing a parameter by sending the module a new
message does not automatically result in the module saving the parameter to
non-volatile memory, but rather just changes the value stored in RAM. This
allows a particular host application to change the configurable parameters
dynamically without unnecessarily writing to, and shortening the lifetime of,
the non-volatile memory. All of the FreeStar module’s configurable
parameters that are stored in RAM can be saved to non-volatile memory by
sending a “Save Configuration Values to Non-Volatile Memory” (type 0x11)
message.