Skip to content
Gabriel Mariano Marcelino edited this page Nov 24, 2017 · 5 revisions

The FloripaSat Protocol (FSP) was developed with the purpose of standardizing the communication between the FloripaSat's modules (EPS, OBDH and TT&C). This protocol does not specify the physical layer, so it can be used, for instance, over SPI, I²C or UART.

Packet fields

The packet's fields defined by the FSP (FloripaSat Protocol) are shown below:

Field Description Length (Bytes)
SOD Start of data (always 0x7E) 1
SRC Source address 1
DST Destination address 1
Length Length of the packet payload 1
Type Type of packet 1
Payload Data of the packet n*
CRC CRC-16-CCITT bytes 2

*The n value is defined by the field "Length" and can assume values between 0 and 248. Therefore, the packet's total size can reach from 7 to 255 bytes.

Addresses

By team definition the module's address are:

Module Address
EPS 1
TTC 2
OBDH 3

Packet Types

Packet Type Value
Data without ACK 1
Data with ACK 2
Command without ACK 3
Command with ACK 4
ACK 5
NACK 6

Commands

The table below shows the current possible commands:

Command Value
NOP 1
Send Data 2
Request RF Mutex 3
Shutdown 4

CRC

In way to grant the correctness of the transmitted data, a Cyclic Redundancy Check is made. The standard used is CRC-16-CCITT (initial value = 0 and polynomial = 0x1021). All the FSP's packet fields, except the SOD, are used to generate the CRC value.

Usage example

There is an usage example code available here.

References

All source code of the project can be found in GitHub.

The official website of the project is www.floripasat.ufsc.br.

Clone this wiki locally