ISUAL Instrument Software Steve Geller UCB 362001 ISUAL
ISUAL Instrument Software Steve Geller UCB 3/6/2001 ISUAL IFR - Instrument Software
Topics Presented • • Software Functions SOH Telemetry Command Processing Science Telemetry Operational Modes Software Task structure Science Data Flow 3/6/2001 ISUAL IFR - Instrument Software 2
Instrument Software Functions • • Receive and execute Commands Generate Status telemetry (SOH) Instrument Control and Readout Management of Readout Data – – 3/6/2001 Pass data to DCM for compression Generate science telemetry packets Make packets into PVCFs; store in spacecraft buffer. Transfer PVCF data to Satellite ISUAL IFR - Instrument Software 3
terminology • DCM - Data Compression Module – fast computer to do data compression • PVCF - Pseudo Virtual Channel Frame – transmission unit for sending science packets to the ground • SOH - Status of Health – volts, amperes, temperatures – statistical counters, fault indicators. . . 3/6/2001 ISUAL IFR - Instrument Software 4
AEP contains two Processors • DPU – – 8085 processor Assembly Language, heritage from IMAGE/FUV Instrument Software Primary purpose: Overall control and sequencing • DCM – Fast Digital Signal Processor (DSP) – Software developed by NCKU – Primary purpose: Data Compression 3/6/2001 ISUAL IFR - Instrument Software 5
AEP Software Functional Block Diagram Power Supplies CMD Camera and Photometers control readouts Mass Memory 3/6/2001 DPU running Instrument Software DCM running compression software ISUAL IFR - Instrument Software Spacecraft SOH PPS TLM 6
SOH Telemetry • Command Echoes and other real-time status is sent out the Command Status channel • Some of the short status packets may be directed to: – – 3/6/2001 SOH channel Science telemetry channel Both Neither ISUAL IFR - Instrument Software 7
Analog Monitors Packet 3/6/2001 ISUAL IFR - Instrument Software 8
Digital Housekeeping Packet 3/6/2001 ISUAL IFR - Instrument Software 9
Command Processing • Commands are received from the satellite as CCSDS command packets. • Commands may be received at any time. • Some commands are executed immediately • Most commands have a Time Tag for later execution 3/6/2001 ISUAL IFR - Instrument Software 10
Example of Command 3/6/2001 ISUAL IFR - Instrument Software 11
Time-Tagged Commands • Stored in Time-Tagged List in DPU memory • Instrument software “background loop” continuously checks command times against current UT • After execution, time-tagged are erased from memory. 3/6/2001 ISUAL IFR - Instrument Software 12
Command Groups • Commands may be assigned a group number, and stored in the Time-Tagged List • A single command will cause all commands in a group to be executed • Group commands use the time-tag for order. 3/6/2001 ISUAL IFR - Instrument Software 13
Group Command Procedures • Group commands are not erased after execution; the group may be used again and again to execute common procedures. • Groups may be erased or replaced by specific commands. 3/6/2001 ISUAL IFR - Instrument Software 14
Example Command Procedure • • • ; Clear Statistics and Faults /I_CLEAR_STATS /I_CLEAR_FAULTS • • ; Patch in readout buffer sizes /I_PATCH 4 BANK=0 ADDR=CAM_RO_NBYTES DATA=X'00705566' /I_PATCH 4 BANK=0 ADDR=SPH_RO_NBYTES DATA=X'00705566' /I_PATCH 4 BANK=0 ADDR=APH_RO_NBYTES DATA=X'00705566' • • ; Patch in relative number of MMCBs per event /I_PATCH 2 BANK=0 ADDR=N_CAM_MMCBS DATA=X'0070' /I_PATCH 2 BANK=0 ADDR=N_SPH_MMCBS DATA=X'0070' /I_PATCH 2 BANK=0 ADDR=N_APH_MMCBS DATA=X'0070' 3/6/2001 ISUAL IFR - Instrument Software 15
Example Command Procedure • • ; Set Filter /I_FILTER_SET ID=1 • • • ; Setup Camera /I_SPRITE_SETUP ID=NFRAMES VAL=123 /I_SPRITE_SETUP ID=EXPOSURE VAL=123 /I_SPRITE_SETUP ID=INTERVAL VAL=123 /I_SPRITE_SETUP ID=NPOST VAL=123 • ; Setup SPH and APH too. . . 3/6/2001 ISUAL IFR - Instrument Software 16
Example Command Procedure • • • ; Turn on Mass Memory power /I_MM_ON ; Turn on Mass Memory /I_DELAY SECONDS=1 ; wait an extra second • • • ; Allocate Mass Memory Control Blocks /I_MMCB_FORMAT ; format the MMCBs and readouts /I_DELAY SECONDS=1 • • • ; Allocate TM area ; for building packets, PVCFs and 64 Megabit "files". /I_TM_FORMAT ; format the PCVF buffers; start TM 3/6/2001 ISUAL IFR - Instrument Software 17
Example Command Procedure • • • ; Turn on DCM /I_DCM_ON ; DCM shows "busy" until it completes its internal checks /I_DELAY SECONDS=5 ; It's not convenient to check ground telemetry ; when running a time-tagged procedure, ; so we test the telemetry within the DPU's SOH array /I_VERIFY_SOH_BYTE OFFSET=DCM_Status MIN=2 MAX=2 ; This "SCIENCE" Proc is executed as part of a command group. ; If test fails, remainder of command group is ignored ; and a Spacecraft Alert packet is generated. 3/6/2001 ISUAL IFR - Instrument Software 18
Example Command Procedure • • ; Copy DSP program from EEPROM to MM /I_DCM_PLB PLB=1 ; Copy PLB from EEPROM to MM • • ; Issue CDI commands /I_DCM_XMT OP= DATA= • • ; tell DCM where in MM it can get its initial MMCB and DSP program /I_DCM_START /I_DELAY SECONDS=2 /I_VERIFY_SOH_BYTE OFFSET=DCM_Status MIN=1 MAX=1 3/6/2001 ISUAL IFR - Instrument Software 19
Example Command Procedure • • • ; Turn on HV and other Science Power services /I_PWR_ON SERVICE=1 /I_PWR_ON SERVICE=2 /I_PWR_ON SERVICE=3 /I_PWR_ON SERVICE=4 • • ; Set mode; Start science data taking /I_SPRITE_CONT ; continuous mode • • • ; Verify that Continuous Mode got started /I_DELAY=5 /I_VERIFY_SOH_BYTE OFFSET=10 MIN=2 MAX=2 3/6/2001 ISUAL IFR - Instrument Software 20
Data Compression • All compression is done by the DCM • DPU allocates Mass Memory and schedules jobs for the DCM 3/6/2001 ISUAL IFR - Instrument Software 21
Telemetry Generation • Telemetry products are generated as CCSDS source packets • Packets are broken up into PVCFs and accumulated in memory until a 64 megabit Block is filled • Block is transferred to spacecraft as a series of PVCF transmissions 3/6/2001 ISUAL IFR - Instrument Software 22
Science Data Flow ---Instruments--- Sprite Event Camera frames Spectrometer sample arrays 3/6/2001 --Mass memory-------- Raw readout --Telemetry-- Compressed Data Science Products ISUAL IFR - Instrument Software 23
Operational Modes • Standby • Data-Taking – Sprite Continuous/Burst – Aurora • Dayside Data Processing 3/6/2001 ISUAL IFR - Instrument Software 24
Standby Mode • • • No Science Data taken All science power services off Command processing active Status (SOH) telemetry generated Mass Memory and DCM may or may not be turned on. 3/6/2001 ISUAL IFR - Instrument Software 25
Power-On Status • At ISUAL Power-on, status is Standby Mode, plus. . . • Mass Memory is off, DCM is off • Time-tagged command list is empty • PVCF storage is empty 3/6/2001 ISUAL IFR - Instrument Software 26
Data-Taking Mode : Aurora • Camera takes fixed-exposure at regular intervals; various filters set • Photometer Data sampled at regular intervals and averaged 3/6/2001 ISUAL IFR - Instrument Software 27
Data-Taking Mode : Sprite • Data taking synchronized with a Sprite Event. DPU gets an interrupt and notes the time. • When a camera readout is complete, DPU stamps the time and passes the data on for compression and science telemetry. • Same for Photometers. 3/6/2001 ISUAL IFR - Instrument Software 28
Dayside Data Processing • No Data Taking • Data Compression from accumulated nightside raw data • Telemetry Generation. • Command Processing Note: at any time, a SAFE command will shut off all HV and switch to Standby Mode. 3/6/2001 ISUAL IFR - Instrument Software 29
Software Tasks • A task is an independent code thread with its own stack. • A task which is waiting for something will 'call task'; this transfers control to the next task in a list of tasks. 3/6/2001 ISUAL IFR - Instrument Software 30
Non-Preemptive multi-tasking • ISUAL Flight Software uses a nonpreemptive multi-tasking system. A task switch happens only when a task executes a 'call task'. • Interrupt service routines do not change the current task, but an interrupt service routine may change the state of something which will cause the current task to do a 'call task'. 3/6/2001 ISUAL IFR - Instrument Software 31
Tasks in ISUAL • • • Background loop DCM simulator DCM supply SOH Generator TM Generator Send PVCFs to Spacecraft 3/6/2001 ISUAL IFR - Instrument Software 32
Background Loop Task 3/6/2001 ISUAL IFR - Instrument Software 33
3/6/2001 ISUAL IFR - Instrument Software 34
DCM Simulator Task 3/6/2001 ISUAL IFR - Instrument Software 35
Supply Queue Reader Task • Buffer-switch Interrupt service routine: – Records when an instrument readout is complete – Commands a new readout address • If an instrument readout is complete, the Supply task: – Marks the MMCB “ready for compression” – Gets another MMCB for that instrument 3/6/2001 ISUAL IFR - Instrument Software 36
SOH Generator Task 3/6/2001 ISUAL IFR - Instrument Software 37
TLM Generator Task 3/6/2001 ISUAL IFR - Instrument Software 38
Spacecraft Transmitter Task • • Wait for SC buffer to fill Send MBR message to spacecraft Wait for reply command Send PVCFs 3/6/2001 ISUAL IFR - Instrument Software 39
3/6/2001 ISUAL IFR - Instrument Software 40
3/6/2001 ISUAL IFR - Instrument Software 41
- Slides: 41