Title: Flight Software Design STEREO/HET
1Flight Software Design STEREO/HET
2Agenda
- Development environment
- Software and hardware
- Development tools
- Interrupts
- Software design logic
- Support software
- Questions/comments
3Development Environment
4Flight Software Design
- Hardware Environment
- Embedded 24-bit MISC CPU
- 128K words RAM
- 6 prioritized interrupts
- 2 serial ports (1 bidirectional, 1 out only)
- PHA ASIC interface for science data
5Flight Software Design, contd
- Software Environment
- Standalone program, single task
- Interrupt-driven operation
- MISC assembly language
- Development Tools
- MISC 24 assembler (ASM24)
- MISC 24 simulator
- Debug monitor (TMON)
- Interactive debugger (TBUG)
- Serial port interface to TCP/IP (SPiT)
6Flight Software Design, contd
- Boot-up and initialization
- Background loop
- Prioritized interrupts (0 highest priority)
- Int 0 Serial port 0 receiver ready
- Int 1 Serial port 0 transmitter ready
- Int 2 Serial port 1 transmitter ready
- Int 3 PHA event
- Int 4 One second sync
- Int 5 One minute sync
7Flight Software Design, contd
- Boot-up and initialization
- Boot loader transfers program from SEP Central
- Transfer additional code and tables under program
control - Initialize ASIC PHA controller
- Initialize memory
- Enable interrupts
- Enter background loop
8Flight Software Design, contd
- Background loop
- Check for and process command received on Serial
port 0 - Interrupt 0 Serial port 0 receiver ready
- Read character, place in input queue. Carriage
return or newline increments received command
count. - Interrupt 1 Serial port 0 transmitter ready
- Extract next char from output queue, write to
port. When queue is empty, disable interrupt.
9Flight Software Design, contd
- Interrupt 2 Serial port 1 transmitter ready
- Telemetry output is packet oriented (272-byte
packets). An array of telemetry packet buffers
is maintained in software. On each one-minute
tick, buffers are filled and output pointer is
reset to the first packet. Subsequent 1-second
ticks cause a burst of TBD bytes to be written to
serial port 1.
10Flight Software Design, contd
- Interrupt 3 PHA event ready
- Interrupts are reenabled
- Event is read from PHA ASIC chip
- Science event data processing algorithm is
performed - Interrupt 4 One-second sync
- Increment second count 0-59
- Enable serial port 1 (Telemetry) transmitter
- Will disable itself after TBD bytes transferred
11Flight Software Design, contd
- Interrupt 5 One-minute sync
- Read out hardware rate counters
- Transfer accumulated science data to packet
buffers (counters and compressed events) - Transfer digital housekeeping data to packet
buffers - Reset telemetry output pointer to start of packet
buffer sequence
12Flight Software Design, contd
- Flight software development snapshot
- Hardware and memory initialization
- PHA chip initialization
- Background loop and command handler
- Interrupt service routines for Ints 0-3 (Command
in/out, T/M out, PHA event) - Handles flight-like commands, generates
flight-like telemetry on a continuous basis - 2K lines of code, 1KW code, 4KW data
13Flight Software Design, contd
- Other software development milestones
- TMON 2K lines of MISC code, 1KW code, 4KW data,
runs in MISC 24 during flight software
development - ASM24 4K lines of C code, runs in DOS window
- CPU24 Simulator 4K lines of C code, runs in DOS
window - TBUG 2K lines of C code, Win32 app
- SPiT 1K lines of C code, Win32 app
14TMON Software
- Debug monitor for MISC assembly language
development - Loaded into RAM by boot loader, relocates itself
to high memory - ASCII command interface allows program control
through serial terminal - Single-step, step over, load program, go, set
breakpoint, display and modify memory, display
and modify registers, display stack contents
15TBUG Software
- Win32 Application provides a visual interface to
TMON - Operates through direct serial-port connection to
MISC CPU or socket connection vial SPiT - Written in C programming language with standard
Windows interface - Four on-screen windows
- Source code with current line highlighted
- CPU24 memory,
- registers and stack contents
- Serial port 0 (command) dialog
- Toolbar and menus
16TBUG Screen Shot
17PHA ASIC Chip Commanding
- ASIC chip operational configuration is set up via
an 846-bit command shift register - Changing any PHA characteristic requires sending
the entire shift register - Flight software handles two kinds of ASIC
configuration commands - CMDSTR set entire command shift register
contents (216 bytes, hex ASCII) - Individual commands to modify selected fields
18GSE Software Suite
- Tom Nolan
- Kristin Wortman
19Agenda
- GSE configuration
- SPiT software
- Communicator software
- WinMac software
- WinMac modifications for HET
- ASIC PHA chip serial command setup
- Screen shots of WinMac
- WinMac modifications for SIT
- Current status of GSE software
- Questions/comments
20GSE Configuration
21SPiT Software Overview
- Serial port interface to TCP/IP
- Win32 Application written in C, on-screen display
for diagnostic purposes only - Handles two serial port connections to flight CPU
board - Handles server-side socket connections from
multiple simultaneous client applications - Client programs can read and write to serial
ports - Permissions are set independently for each client
- Allows multiple access to flight instrument
command and telemetry, both locally and remotely
22SPiT Packet Formats
Opcode Parameters Description
OP_SES (1) SES_SNDCMD (0x10) SES_RCVCMD (0x20) SES_RCVTLM (0x40) Send commands Receive command response Receives telemetry
OP_CMD 0 Command for delivery to instrument
OP_RSP 0 Command response from instrument
OP_TLM 0 Receive telemetry packet from instrument
23Command List
Keyword Argument Function
cmdstr 108 hex bytes (216 characters) 846-byte command string (left-aligned) plus 18 bits (zeros)
testp test pulser period (hex) Set test pulser period. Argument is in hex, units of 2 microsecs.
rates Read and clear rates.
24WinTCP Software Package
25WinTCP Software Package
26WinTCP Software Package
27HET Telemetry Packet Format (In- House Testing)
Offset (bytes) Size (bytes) Contents
0 11 CCSDS Header
11 1 Packet type (0xe9 event, 0xad rate)
12 1 Sequence number (increments by 1)
13 1 Number of 24-bit words (0-86)
14 258 24-bit ph or rate words (lsb msb)
28Communicator Software
- Windows user interface
- TCP/IP communications with SpiT software
- Sends commands by fields specification
- Receives telemetry packets
- Displays telemetry packets in HEX format
29Communicator Screen Shot
30WinMac Software
- Background
- Developed for the LECR group
- Scientific graphical analysis software package
- Design philosophy based on the original Macro
program written by Don Reames
31WinMac Software (contd)
- Overview
- C programming language
- Object oriented methodologies
- Microsoft Foundation Class library
- Reads standard LECR formatted data files
- Produces 2 and 3 dimensional plots
- Windows user interface
32Modifications to WinMac
- TCP/IP communications with SpiT software
- Send commands as an ASCII HEX string
- Receive telemetry packets
- Receive command responses
- Display telemetry packets in readable format
(uncompressed format)
33Modifications to WinMac (contd)
- Plot HET 24 bit pulse height data in histograms
with calculated mean and standard deviation - Setup each command bit(s) assignment via a series
of menus and dialogs - Provide a command log and telemetry files
34(No Transcript)
35Command Setup Design
36ASIC Chip HET Command Setup
- Menus for command bits setup
- Selectable command
- Command string
- Rates
- Test Pulser timing
- Start stop telemetry data collection to files
- Command Display
- Display rate control
- Send, load and save command string setup
37TCP/IP Communications Setup
- Invoked when needed (first time)
- TCP/IP setup
- IP address
- Port number
- Data description header file selection (LECR
format)
38ASIC Chip Selectable Command Bits Setup
- Selectable value parameters
- Global selections
39ASIC Chip Input Value Command Bits Setup
- Value input
- Global value setting
40ASIC Chip Individual Command Bits Setup
- Toggle individual bit on and off
- Global settings for set and reset
41HET Packet Display
- Displays the contents of the 24 bit pulse height
and the rate packets. - Displays the status of the data collection.
42PHA Histogram
- Histogram plot of the pulse height packet.
43Modifications needed for SIT
- Dialog for serial command setup (TBD)
- Develop a class for the SIT pulse height event
44Future Modifications
- Read the telemetry packet formats produced by
Caltechs GSE - Develop a class for the HET pulse height event
(16 bit) - Design a routine for plotting pulse height events
for HET and SIT
45GSE Software Status
- SPiT software is completed
- Communicator software is completed
- WinMac software modifications
- HET modifications for in-house testing of the
ASICS PHA chip are complete - HET pulse height event class and plotting routine
being developed - SIT pulse height event class and plotting routine
being developed