trio-cinema fsw- 1 ssl, 8/10/2010 flight software seyoung yoon and sameet ramakrishnan space...

21
TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California, Berkeley

Upload: francis-dennis

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

TRIO-CINEMA FSW- 3 SSL, 8/10/2010 Tasks Two kinds of tasks – Foreground tasks (called by EXEC module) Run asynchronously in available time No hard limit on execution time Configurable by ground commands Will be frequently interrupted by Background commands, so should not rely on IO peripheral state Attitude Control System (ACS), SRAM scan, memory peek/poke… – Background tasks (called by BKG module) Interrupts fired at 1024 Hz Run at specific times Must complete before next interrupt (~9700 instructions) Performs tasks that must occur on time Data flow management, MAG sampling, housekeeping (analog) ADC sampling…

TRANSCRIPT

Page 1: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 1 SSL, 8/10/2010

Flight Software

Seyoung Yoon and Sameet RamakrishnanSpace Sciences Laboratory

Kyung Hee UniversityUniversity of California, Berkeley

Page 2: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 2 SSL, 8/10/2010

Overview

HeliumCmds

Analogs

I II IVIII

Simulink

PWR.A

ACS.ASun

Sensors

TorqueCoils

STEINAtten

MAGElect

STEINElect

MAG.A

STEIN.A

SPI

SPI

S-BandTx

TM.A

SDCARD

STEINFPGA

POWERSwitches

Timers

MAGFPGA

BKG.A EXEC.A

SSR.A

LD.A

CMD.A

SRAM &EEPROMHSK.A

COMMFPGA

FSW MAJOR MODULES

SPI

Page 3: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 3 SSL, 8/10/2010

Tasks

Two kinds of tasks– Foreground tasks (called by EXEC module)

• Run asynchronously in available time• No hard limit on execution time• Configurable by ground commands• Will be frequently interrupted by Background commands, so

should not rely on IO peripheral state• Attitude Control System (ACS), SRAM scan, memory

peek/poke…– Background tasks (called by BKG module)

• Interrupts fired at 1024 Hz• Run at specific times• Must complete before next interrupt (~9700 instructions)• Performs tasks that must occur on time• Data flow management, MAG sampling, housekeeping (analog)

ADC sampling…

Page 4: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 4 SSL, 8/10/2010

Background Task Table

HSK STE TX STE MAG STE TX STE

HSK STE TX STE STE TX STE

STE TX STE MAG STE TX STE

CMD STE TX STE STE TX STE

HSK STE TX STE MAG STE TX STE

STE TX STE STE TX STE

STE TX STE MAG STE TX STE

STE TX STE STE TX STE

Page 5: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 5 SSL, 8/10/2010

Overview

• Background module completed and tested• EPS module completed and tested• SD card drivers in progress

– Drivers have since been completed, and circular buffers on SD card have been built

• Transmission module mostly completed– “Overflow” packet handling not complete– Support for Memory Dump Packets needed– Error handling– Testing

Page 6: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 6 SSL, 8/10/2010

Overview

uHardCmds

Analogs

I II IVIII

Simulink

PWR.A

ACS.ASun

Sensors

TorqueCoils

STEINAtten

MAGElect

STEINElect

MAG.A

STEIN.A

SPI

SPI

S-BandTx

TM.A

SDCARD

STEINFPGA

POWERSwitches

Timers

MAGFPGA

BKG.A EXEC.A

SSR.A

LD.A

CMD.A

SRAM &EEPROMHSK.A

COMMFPGA

FSW MAJOR MODULES

Page 7: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 7 SSL, 8/10/2010

Real Time Clock (RTC)

• Description:– Time-stamping science data– Scheduling Commanded events– Referencing ACS “ephemeris” – Set via ground command– Offset maintained for drift

• Progress: – Built interface library (over I2C)– Initialize, read, start/stop, halt/unhalt

• Future: – Finalize details of maintaining offset.– Potential addition of a background task to automatically

correct drift?

Page 8: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 8 SSL, 8/10/2010

Data Handling

HSK Module TransmissionModule

FastDigitalHSK

ACS

EPS

SDCard

SlowDigitalHSK

AnalogHSK

STEINModule

MAGModule

SteinDataBuff[ ]MagDataBuff[ ]

HskDataBuff[ ]

Page 9: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 9 SSL, 8/10/2010

Housekeeping Overview

• Schedules sampling of analog inputs, EPS values, state of software and peripherals– Sample rate 16Hz– Packet refresh rate 10 seconds

• Timestamps and packetizes information for downlink– During orbit, the blocks are stored onto the SD card– During downlink period, the blocks are directly down-linked

at next available opportunity • New “recent” block sent approximately every 10 seconds

• Maintains updated record of EPS solar currents for ACS – Sample rate 32 Hz, 6 values so .1875 second refresh rate

Page 10: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 10 SSL, 8/10/2010

Housekeeping Packet Format

• First 80 bytes “slow digital housekeeping”– Timestamp + General program state– Actuators Status– Power Status– ACS/Sun Sensor?– MAG Housekeeping, STEIN housekeeping

• 7 repeated blocks of 60 bytes each– Updated ~2 second rate

• limited by sampling all EPS values)– Analog Housekeeping from EPS– Analog inputs into microcontroller– Fast Digital Housekeeping

• Torque coils status, Spin Rate, Elevation from ACS• SSR state

Page 11: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 11 SSL, 8/10/2010

Housekeeping Status

• Progress:– Sampling analog inputs, retrieving EPS, framework for

retrieving digital value completed– ACS solar current refreshing completed– Packetization completed (for now…)

• Future: – CTM finalization*!– Digital values filled into framework as they become available– Action/Error log (maybe not here)

• Overflow packets?– I2C error handling, testing

Page 12: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 12 SSL, 8/10/2010

Housekeeping Verification

• Demonstration later in the week?

Page 13: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 13 SSL, 8/10/2010

Command Module Description

• DMAs uplinked commands from radio into PIC’s DMA RAM– Serial UART2 -> DMA RAM– By comparing uplink rate against CMD module interrupt rate, we

can calculate necessary DMA buffer size (~75 bytes)

• Sorts commands from DMA RAM into 1 of 2 lists in non DMA RAM: immediate command list or delayed command table– Delayed Commands buffered for the duration of the orbit– Immediate Commands received and handled “immediately”

• Initiate downlink, request packet, mode switches, etc.

• Provides functions for EXEC to access these lists

Page 14: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 14 SSL, 8/10/2010

Command Progress

• Immediate Command handling completed– Implemented as a circular buffer data structure

• Delayed Commands currently handled as “table”• Delayed Packet with entries of 6 bytes• Maintains a 4 byte “time field” and a 2 byte “command field”• Table “halted”, reloaded, restarted

• Originally linked list• Lots of space overhead for the flexibility of inserting

commands in correct temporal location• Does not seem necessary/consistent with table structure/large

one shot packet uploads• Limits number of commands total that can be stored, adds

software execution time overhead– Sorting more of a ground task anyways?

• These decisions must still be made

Page 15: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 15 SSL, 8/10/2010

Command Module Verification

Page 16: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 16 SSL, 8/10/2010

Command Future/Problems

• Command uplink format finalization – How many commands? Space on dsPIC? Sorted?– Delayed Command Table manipulation post uplink

• Deletion• Insertion? Modification?

• Verification/error checking of uplinked commands– CRC verification scheme needed?– Redundancy?

• General error handling needed• Needs testing under larger data rates

Page 17: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 17 SSL, 8/10/2010

STEIN Module Description

• Single point of entry for SSR writes– Scheduled frequently enough that this makes sense – May “absorb” other modules with busy times

• HSK, MAG blocks– Error handling from a single place

• Retrieve, timestamp, packetize STEIN data from FPGA– Force packet writes at minimum every 1 second

• Hardware timestamp rollover

Page 18: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 18 SSL, 8/10/2010

STEIN progress

• Able to write blocks (STEIN, MAG, HSK) to SD card– Primitive scheduling system

• Error handling/reset sequence completed– Hard/Soft Reset

• Retrieval and Packetization of Stein data completed– Refer to CTM for Stein packet format– One second force needs “hardware support”

Page 19: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 19 SSL, 8/10/2010

STEIN Module Future

• Handle potential changes in software requirements from instrument side– Currently just assumes arbitrary 32 bit values, doesn’t parse

data at all – Change in STEIN packet format, some status bytes/meta

data needed?

• Needs testing with FPGA, STEIN hardware• Ensure Stein packet format is acceptable

Page 20: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 20 SSL, 8/10/2010

Magnetometer Description

• Description– Interacts with MAG through I2C interface to FPGA– Initializes hardware – Schedules and commands sampling (based on mode)

• Baseline of 64Hz, divided down for slower sampling– Controls mode switching/power settings

• Via ground command– Packetizes data

• Repeat of status byte, 4 24 bit vectors (1 for each axis and OB temperature)

• Inboard temperature replacement – Maintains shared values for ACS– CPD for full details on all the nuances

• Progress– Done “in theory”, but needs testing with real hardware

Page 21: TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,

TRIO-CINEMA FSW- 21 SSL, 8/10/2010

Conclusion and Future Tasks

• Review and finalization of the CTM– Will allow finalization of the Housekeeping, Command,

Transmission modules

• Tying modules together– Implementation of the EXEC module/command parsing– Testing modules together, and with GSEOS

• Verification of software with hardware – IIB, MAG and eventually STEIN

• Integration of ACS code with FSW• Load Module