iOBC Supervisor API

group iOBC-Supervisor

Defines

LENGTH_EMERGENCY_RESET

Length of emergency reset.

LENGTH_RESET

Length of reset the IOBC PCU.

LENGTH_POWER_CYCLE_IOBC

Length of reset the IOBC PCU.

LENGTH_TELEMETRY_HOUSEKEEPING

Length of the telemetry housekeeping request.

LENGTH_TELEMETRY_GET_VERSION

Length of the getting Version.

LENGTH_TELEMETRY_SAMPLE_HOUSEKEEPING

Reply length of the telemetry housekeeping sample.

LENGTH_TELEMETRY_SAMPLE_VERSION

Length of the sampling the Version.

LENGTH_TELEMETRY_DUMMY

Length of the dummy.

LENGTH_GENERIC_REPLY

Length of the compile information.

LENGTH_COMPILE_INFORMATION

Length of the compile information.

SUPERVISOR_NUMBER_OF_ADC_CHANNELS

The number of channels used in the Supervisor Controller.

Functions

bool supervisor_emergency_reset()

Performs a software reset of the microcontroller directly without shutting down its components.

As this command is considered unsafe for the hardware and the software of the IOBC-S, use supervisor_reset() instead.

Return
true if command is sent successfully, otherwise false

bool supervisor_reset()

Assert a reset to the IOBC-S and make sure that the conditions prior to reset operations are met.

Return
true if command is sent successfully, otherwise false

bool supervisor_powercycle()

Let the IOBC be power-cycled for around 4-5 seconds.

Supervisor Controller power is not affected by this command.

Return
true if command is sent successfully, otherwise false

bool supervisor_get_version(supervisor_version_t *version)

Getting Version from Supervisor Controller.

Return
true if command is sent and response has valid CRC, otherwise false
Parameters
  • version: Version and configuration read back from the Supervisor Controller.

bool supervisor_get_housekeeping(supervisor_housekeeping_t *housekeeping)

Getting Housekeeping from Supervisor Controller.

Return
true if command is sent and response has valid CRC, otherwise false
Parameters
  • housekeeping: Housekeeping read back from the Supervisor Controller.

union supervisor_generic_reply_t
#include <supervisor.h>

Generic reply from the Supervisor Controller.

Public Members

uint8_t raw_value[LENGTH_GENERIC_REPLY]

Raw value of the generic reply bytes.

struct supervisor_generic_reply_t::supervisor_generic_reply_fields_t fields

Individual reply fields.

struct supervisor_generic_reply_fields_t
#include <supervisor.h>

Individual reply fields.

Public Members

uint8_t dummy

The first as always is a dummy byte.

uint8_t spi_command_status

The second is a SPI command status.

uint8_t crc8

CRC byte.

union supervisor_version_t
#include <supervisor.h>

Supervisor version and configuration bytes.

Layout of fields:

     _________________________________
    |                                 |
000 |             DUMMY               |
    |_________________________________|
    |                                 |
001 |        SPI COMMAND STATUS       |
    |_________________________________|
    |                                 |
002 |        INDEX OF SUBSYSTEM       |
    |_________________________________|
    |                                 |
003 |                                 |
... |           SW VERSION            |
005 |_________________________________|
    |                                 |
006 |                                 |
... |          HEAD REVISION          |
009 |                                 |
    |_________________________________|
    |                                 |
010 |          SERIAL NUMBER          |
    |_________________________________|
    |                                 |
    |                                 |
    |                                 |
012 |                                 |
... |       COMPILE INFORMATION       |
030 |                                 |
    |                                 |
    |                                 |
    |_________________________________|
    |                                 |
031 |           CLOCK SPEED           |
    |_________________________________|
    |                                 |
032 |         TEST / FLIGHT           |
    |_________________________________|
    |                                 |
033 |              CRC8               |
    |_________________________________|

Public Members

uint8_t raw_value[LENGTH_TELEMETRY_GET_VERSION]

Raw value of the version configuration bytes.

struct supervisor_version_t::supervisor_version_fields_t fields

Individual version fields.

struct supervisor_version_fields_t
#include <supervisor.h>

Individual version fields.

Public Members

uint8_t dummy

The first as always is a dummy byte.

uint8_t spi_command_status

The second is a SPI Command Status.

uint8_t index_of_subsystem

Index of ISIS Subsystem.

uint8_t major_version

Software major version.

uint8_t minor_version

Software minor version.

uint8_t patch_version

Software patch version.

uint32_t git_head_version

Software git head version.

uint16_t serial_number

Serial number.

int8_t compile_information[LENGTH_COMPILE_INFORMATION]

Compile information (time and date).

uint8_t clock_speed

Clock speed of the Supervisor Controller (in MHz).

int8_t code_type

Code type.

Whether flight or test.

uint8_t crc8

CRC byte.

union supervisor_enable_status_t
#include <supervisor.h>

Enable status structure.

Layout of fields:

     ____________________________________________
    |                                            |
000 |                   DUMMY                    |
    |____________________________________________|
    |                                            |
001 |             SPI COMMAND STATUS             |
    |____________________________________________|
    |                                            |
002 |               ENABLE STATUS                |
    |____________________________________________|
    |                                            |
003 |                                            |
... |        SUPERVISOR CONTROLLER UPTIME        |
006 |                                            |
    |____________________________________________|
    |                                            |
007 |                                            |
... |                 IOBC UPTIME                |
010 |                                            |
    |____________________________________________|
    |                                            |
011 |                                            |
... |               IOBC RESET COUNT             |
014 |                                            |
    |____________________________________________|
    |                                            |
    |                                            |
015 |                                            |
... |                  ADC DATA                  |
034 |                                            |
    |                                            |
    |                                            |
    |____________________________________________|
    |                                            |
035 |               ADC UPDATE FLAG              |
    |____________________________________________|
    |                                            |
036 |                   CRC8                     |
    |____________________________________________|

Public Members

uint8_t raw_value

Raw value of the version configuration bytes.

struct supervisor_enable_status_t::supervisor_enable_status_fields_t fields

Individual enable status fields.

struct supervisor_enable_status_fields_t
#include <supervisor.h>

Individual enable status fields.

Public Members

uint8_t power_obc

OBC Power.

uint8_t power_rtc

Output power to the RTC.

uint8_t is_in_supervisor_mode

Supervisor mode.

uint8_t busy_rtc

RTC is busy.

uint8_t power_off_rtc

RTC is doing power off.

union supervisor_housekeeping_t
#include <supervisor.h>

Supervisor housekeeping.

Public Members

uint8_t raw_value[LENGTH_TELEMETRY_HOUSEKEEPING]

Raw value of the version configuration bytes.

struct supervisor_housekeeping_t::supervisor_housekeeping_fields_t fields

Individual housekeeping fields.

struct supervisor_housekeeping_fields_t
#include <supervisor.h>

Individual housekeeping fields.

Public Members

uint8_t dummy

The first as always is a dummy byte.

uint8_t spi_command_status

The second is a SPI Command Status.

supervisor_enable_status_t enable_status

Enable status of the Supervisor Controller.

uint32_t supervisor_uptime

Supervisor Controller Uptime.

uint32_t iobc_uptime

IOBC Uptime as measured by Supervisor Controller.

uint32_t iobc_reset_count

IOBC Reset Count.

uint16_t adc_data[SUPERVISOR_NUMBER_OF_ADC_CHANNELS]

ADC Data.

uint8_t adc_update_flag

ADC Update Flag.

uint8_t crc8

CRC byte.