Operational Flight Software

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Instrument TrainingIDPU - 1 UCB, Dec 6, 2006 THEMIS INSTRUMENT TRAINING IDPU.
MAVEN CDR May 23-25, 2011 Particles and Fields Package Pre-Environmental Review May , 2012 Flight Software Peter R. Harvey Mars Atmosphere and Volatile.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Solar Probe Plus FIELDS ICU/FSW Peter R. Harvey Dorothy Gordon –ICU Will Rachelson – FSW Dec 1, 2012.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
ISUAL Instrument Software S. Geller. CDR July, 2001NCKU UCB Tohoku ISUAL Instrument Software S. Geller 2 Topics Presented Software Functions SOH Telemetry.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
IES Flight Software J. Hanley / P. Mokashi May 29, 2013.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
1Sep 30-Oct 1, 2009EFW I-CDR Instrument Critical Design Review EFW Flight Software Peter R. Harvey 2009 Aug 31 RBSP Radiation Belt Storm Probes RBSP Radiation.
Renesas Technology America, Inc. Flash!. CPU Rewrite CPU-rewrite is a term that refers to an Renesas MCU’s ability to erase/program its own internal Flash.
21-1 MAVEN IPSR October 30,31, 2012 Particles and Fields Package Pre-Ship Review October 30,31, : Flight Software Peter R Harvey Mars Atmosphere.
GLAST Large Area Telescope Instrument Flight Software Flight Unit Design Review 16 September 2004 Software Watchdog Steve Mazzoni Stanford Linear Accelerator.
GLAST LAT ProjectDOE/NASA Peer Review, March 19-20, 2003 GLAST Large Area Telescope: Electronics, Data Acquisition & Instrument Flight Software Flight.
TRIO-CINEMA 1 UCB, 2/08/2010 Cinema Stein Interface FPGA (CSI) [Part II] Karthik Lakshmanan CINEMA - EE Team Space Sciences Laboratory University of California,
Fast Fault Finder A Machine Protection Component.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
RBSP Radiation Belt Storm Probes RBSP Radiation Belt Storm Probes 12/25/20151 Flight Software Template for Instrument Critical Design Review Gary M. Heiligman.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
GLAST Large Area Telescope LAT Flight Software System Checkout TRR Systems Engineering Mike DeKlotz GSFC Stanford Linear Accelerator Center Gamma-ray Large.
Status 1 Telecon MAVEN PFFSW STATUS 8/14/2012 Conf: #
TRIO-CINEMA FSW- 1 SSL, 8/10/2010 Flight Software Seyoung Yoon and Sameet Ramakrishnan Space Sciences Laboratory Kyung Hee University University of California,
Pre-PDR Peer Review 1 UCB MAVEN Particles and Fields Flight Software Peer Review Requirements Definition Peter R. Harvey May 12, 2010.
13-1 MAVEN PFP ICDR, May 23 – 25, 2011 Particles and Fields Package Critical Design Review May , 2011 GSE Timothy Quinn.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Solar Probe Plus FIELDS MAG Peter Harvey. MAG FSW Requirements.
HarveyFIELDS iCDR – Flight Software Solar Probe Plus FIELDS DCB Flight Software Design Peter Harvey University of California 1.
11-1 MAVEN PFP ICDR May 23-25, 2011 PF Flight Software Critical Design Review May , 2011 Peter R Harvey Mars Atmosphere and Volatile EvolutioN (MAVEN)
GLAST Large Area Telescope LAT Flight Software System Checkout TRR Test Environment Sergio Maldonado FSW Test Team Lead Stanford Linear Accelerator Center.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
TRIO-CINEMA C&DH- 1 KHU, 10/19/2009 Command & Data Handling System (C&DH) Peter Harvey David Curtis David McGrogan Space Sciences Laboratory University.
Pre-PDR Peer Review 1 UCB MAVEN Particles and Fields Flight Software Peer Review RFAs and Recommendations Peter R. Harvey.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Operational Flight Software
Adopting the Python language for On-board Programmable Payload Autonomy Steven Doran 2016 Flight Software Workshop 12/14/2016.
Generic Remote Interface Unit (RIU) Interface Control Document (ICD)
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Particles and Fields Package (PFP) SWEA Pre-CDR Peer Review
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Atmega32 Architectural Overview
INSTRUMENT DATA PROCESSING UNIT (IDPU) REQUIREMENTS
Command & Data Handling
University of California - Berkeley
MPC8360 Micro Controllers Lab 7 - DMA Fall , 2010.
Operational Flight Software
Command & Data Handling
8086 Microprocessor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer-System Architecture
Module 2: Computer-System Structures
Chapter 2: Operating-System Structures
GSFC cFS Product Status
Introduction to Operating Systems
Module 2: Computer-System Structures
GLAST Large Area Telescope
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 2: Operating-System Structures
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Operational Flight Software MAVEN Particles and Fields Operational Flight Software Code Walkthrough Instruments 1 (LPW, SEP, MAG) Peter R. Harvey

Agenda FSW Walkthrough’s Software Architecture Module Overview Modules PWR SSR CMP LPW MAG SEP Other Walkthrough’s Operational Core Completed Instruments #2 (SWEA, SWIA, STATIC) Fault Protection

FSW Modules - Operational Architecture FSW Modules - Operational Software context diagram showing each subsystem or major component

Operational FSW Expanded Upon Boot Architecture Operational FSW Expanded Upon Boot Boot Operational

Memory Summary (@CDR)

Memory Summary (@PSR) Memory has grown a bit or two

Data Processing - Up to 4 User Programs BKG Interrupts 256 Hz Interrupt Process Distributes CPU Time per Table Basic ¼ second table repeats 4Hz CMD, PWR, HSK get 32 Hz Instruments get 8-16 Hz, etc. Implements module requirements Reconfigurable FSW measures time in each ISR FSW measures total CPU% Design for < 50% usage EXEC Loop - Up to 4 User Programs - Calculations that take > 2 milliseconds (e.g. EEPROM table checksums)

INST Manager Generic Instrument Manager Design (type1) LPW, MAG,SEP controllers Messages received and packets generated under interrupt.

INST Manager Generic Instrument Manager Design (type 2) SWEA, SWIA, STATIC controllers Messages are received under interrupt building data structures Accumulations made in foreground, and telemetry packets generated.

Modes & Enables FSW Modes Safe – Minimal Activities Allowed Normal - FLASH Memory Allowed, HV, Attenuators Engineering – EEPROM Writing Implementation All Enables are Masked by Mode Mask for Safe/Norm/Eng Mode Transitions Have Associated Mode Initialization Script

Module Overview Generic Module Requirements “Module_Init”: Initialize Variables and Hardware to Allow all Module Calls to Work “Module_Cmd”: Handle Commands within one half interrupt period “Module_Hsk”: Provide Module Housekeeping for Telemetry Generic Examples // ============================================================ // Loader Initialization // On StartUp, we want to Dump Table[0] (EEPROM directory) void LD_Init() { DumpAdr = LoadAdr = (long) TableStart[0]; DumpSize = 80; // ~ # Bytes in Table[0] DumpCtr = 255; // # of Dump packets to make } // ============================================================ // Loader Commands void LD_Cmd(unsigned long cmd) {unsigned int op,dta,tbl,ofs; unsigned char *p; unsigned long dest; op = (int)(cmd>>24)&0x0F; // Op is the Command Option tbl= (int)(cmd>>20)&0x1F; // Table bits for some cmds ofs= (int)(cmd>>8 )&0x0FFF; dta= (int) cmd&0xFF; // Right Byte is Dta switch(op) { case 0: LoadAdr = (cmd>>8)&0xFFFF; // Load Byte p = (unsigned char *) LoadAdr; *p= (unsigned char) dta; break; case 1: DumpAdr = (cmd>>8)&0xFFFF; // Dump Byte(s) DumpSize = dta; DumpCtr = 255; // ============================================================ // EXEC Module Housekeeping // This routine formats a string of data storing them using // the input pointer and returns the string length in bytes. int Read_Exec_Hsk( char *ptr ) {int n; n=0; ptr[n++] = (char) Version ; ptr[n++] = (char) Fgnd1pps ; ptr[n++] = (char) *Mode_Ptr ; ptr[n++] = (char) *Reset_Ptr; ptr[n++] = (char) (*Enable_Ptr>>8); ptr[n++] = (char) *Enable_Ptr ; ptr[n++] = (char) ErrorCode ; ptr[n++] = (char) (ErrorData>>8); ptr[n++] = (char) ErrorData ; ptr[n++] = (char) ErrorCtr ; return( n ); }

PWR Module PWR Module Requirements (BOOT) Can Turn Instruments Off, but Not On Can Close SEP1, SEP2, EUV Doors but Cannot Open Them Requirements (OPER) Can Turn On All instruments and use overrides Can Directly Fire Actuators Can Accept Actuators “Requests” and will implement asap Control EUV Aperture Control SEP Doors Prohibit HV to instruments with cover ON Will Limit Monitor Housekeeping Values Requirements that Moved Ramp Instrument HV Moved to SWEA, SWIA and STATIC modules

PWR Actuators Actuator Timing “Allowed” bit refers to the Fault Protection control register

PWR Limits LIMIT Monitoring Limit Database: Up to 128 limit monitor records stored in EEPROM and loaded to SRAM at start up. Can be disabled by clearing the first byte (Action code) in SRAM. Each Element Described as 8-byte record:

PWR Limits LIMIT Monitoring

SSR Overview SOLID STATE RECORDER Management Requirements Manage the Non-Volatile Memory (Flash) Format the Flash into addressable blocks Implement a Circular Recorder/playback system to store 30 k bps Keep the power off when possible Provide packets to TM module Detailed Design Handles Variable-size Packets Routes packets based upon ApID and Table 4 routing information [0] -> Waste Basket [1] -> Real-Time Telemetry [2] -> Archive (Flash) storage Design changes since SwPDR Instrument Message to Real-Time Packet Conversion (for EM I&T Tests) Automatically Adds PAD bytes to achieve 4-byte alignment requirement

Real-Time Data Mgmt RT Data Management

Archive Data Mgmt Archive Data Management

Archive Data Mgmt Archive Data Management

Archive Data Mgmt Archive Data Management

FMAP : FLASH Virtual-to-Physical Memory Map Archive Data Storage FLASH Hardware 8 GB Capacity Each 4GB powered separately EDAC Enabled Write/Read DMA-Channel to/from SRAM Block Addressable 2^16 128KB Blocks Each Block has 2K extra bytes EDAC Bad-Block-Indicator Erase Count Write Time FSW Functions Stores/Retrieves Archive Science Blocks Circular Memory with Separate Read & Write Ptrs Playback Commanded by Block Number and Length Both Read/Write Block pointers Telemetered Ground S/W keeps Time-to-Block Number relationship FMAP of 256 provides 32 MB control FSW_020_ANALYSES.XLS FMAP : FLASH Virtual-to-Physical Memory Map

SSR FLASH Logic Read/Write/Diag Decision State D0

SSR FLASH Logic Read Logic States with Error Handling

SSR FLASH Logic Write Logic State W1 with Error Handling

SSR FLASH Logic Write Logic State W2 with Error Handling

Compression CMP Requirements (OPER) Enable/Disable/Option by APID Provide Log-Compression Count Rate Compression 19-to-8 bit (and 3 more options) Performed at Initial Packet Formatting Provide “Space Particle Data Compression” (dwc’s paper) Provide Compression on Survey and Archive data Provide Archive compression at Downlink Time

Telemetry APIDs

Telemetry APIDs

Data Collection Data Collection DMA Channels are Assigned to Each Data Instrument FSW Writes Destination Addresses into Each DMA Controller DMA Registers are Double-Buffered to Eliminate Gaps DMA Buffers Automatically Swap at 1 second FSW Modules Process Messages Using Inst. Msg Headers Data Collection Rates Max Raw Input Rate of ~153 KB/sec (1.2 Mbps) Vast Majority are Summing Counts

LPW Manager LPW Management Notes: Requirements Summary // FSW.LPW-1 : LPW_INIT shall initialize the module and define its hardware // initial state so the module works correctly. // FSW.LPW-2 : LPW shall receive and execute commands to the module at up to // 32Hz, and complete those commands in <1/10 interrupt period. // FSW.LPW-3 : LPW shall provide housekeeping telemetry as defined in MAVEN // PF Command/Telemetry document (N/A) // FSW.LPW-4 : PFP FSW shall automatically download LPW configuration tables // and set the default mode // [a] when LPW is turned ON; // [b] when LPW is RESET; or // [c] when LPW fails a checksum. // FSW.LPW-5 : PFP FSW shall control LPW Configuration Tables // [a] providing 512 bytes per table; // [b] providing 16 tables; // [c] providing the ability to upload new tables. // FSW.LPW-6 : PFP FSW shall route LPW/EUV commands from the spacecraft to // the LPW/EUV instrument via the CDI. // FSW.LPW-7 : PFP FSW shall provide LPW the time of the next PF 1PPS pulse. // FSW.LPW-8 : PFP FSW shall provide a commandable periodic synchronization // command to LPW. Notes: LPW-3 : FSW just passes LPW housekeeping to telemetry LPW-4 : In a checksum mismatch, FSW restarts LPW. LPW-7&8 are redundant as Time is the sync

LPW Messages LPW Messages Message Code Message Length CCSDS packet Packet Length (quad word multiple)

LPW Memory Instrument DMA Memory

LPW EEPROM LPW EEPROM Memory

LPW RTS LPW Relative Time Sequences RTS_LPWLOW RTS=[ "cmd.PFP_LPWTM(0)", # Rate low "cmd.RTSEND()" # RTS END command ] RTS_LPWMED RTS=[ "cmd.PFP_LPWTM(1)", # Rate medium "cmd.RTSEND()" # RTS END command ] RTS_LPWHIGH RTS=[ "cmd.PFP_LPWTM(2)", # TM Rate High "cmd.RTSEND()" # RTS END command ] RTS_LPWSTART RTS=[ "cmd.LPW_RESET()", # Reset the FPGA "cmd.PFP_RTSWAIT(4)", # Delay(1 second) "cmd.PFP_LPWLDLUT()", # Start Loading Regs&Lut "cmd.PFP_RTSWAIT(240)", # Delay(60 seconds) "cmd.PFP_RTSSTART(35)", # Start in low bit rate "cmd.RTSEND()" # RTS END command ]

LPW LM LPW Limit Monitors

LPW-EUV FP IsEUVOpen() FSW reads the 2-bit status of the EUV Ap Compares that to the Open & not-Closed condition. IsEUVAllowed() If either “Boresight in RAM” or “Density High” ZoneAlerts, then EUV Aper is not allowed. If user Enable is low, EUV Aper is not allowed. ManEUVAper() If open but not allowed, this routine starts RTS (5) If closed but allowed, this routine starts RTS(11) Does not matter whether LPW/EUV power is On or Off

LPW-EUV FP LPW Fault Protection """ """ RTS_SHUTEUV.py (RTS 5) This Python module defines a dictionary that contains the commands for RTS 5. # Built-in Python Modules # Import statements. Always do these. from MAVEN import * from __main__ import * import maven_log log = maven_log.log() # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd() # RTS Command List # ================ # RTS=[ "cmd.PFP_ACTMOVE(12)", # Request the EUV close "cmd.RTSEND()" # RTS END command" ] """ RTS_OPENEUV.py (RTS 11) This Python module defines a dictionary that contains the commands for RTS 11. # Built-in Python Modules # Import statements. Always do these. from MAVEN import * from __main__ import * import maven_log log = maven_log.log() # Setup the commanding shortcut mechanism (cmd.CMDNAME(arg=value)) cmd = maven_cmd() # RTS Command List # ================ # RTS=[ "cmd.PFP_ACTMOVE(11)", # OPen EUV "cmd.RTSEND()" # RTS END command ]

SEP Manager SEP Management Requirements Summary // FSW.SEP-1 : SEP_INIT shall initialize the module and define its hardware initial // state so the module works correctly. // FSW.SEP-2 : SEP shall receive and execute commands to the module at up to 32Hz, // and complete those commands in <1/10 interrupt period. // FSW.SEP-3 : SEP shall provide housekeeping telemetry as defined in MAVEN PF // Command/Telemetry document // FSW.SEP-4 : PFP FSW shall load a selected SEP Instrument Energy LUT // [a] from non-volatile memory into the instrument; // [b] automatically on power-up; // [c] by ground command, and // [d] when the SEP FPGA checksum fails. // FSW.SEP-5 : PFP FSW shall provide the commanded SEP bias voltage in parameter table // FSW.SEP-6 : PFP FSW shall provide the commanded SEP threshold DAC values in the // parameter table. // FSW.SEP-7 : PFP FSW logic shall control the two SEP SMA attenuators separately // [a] when SEP atten logic is enabled; // [b] when SEP counting rates // i. exceed a programmable threshold1, move the attenuator IN; // ii. fall below programmable threshold2, move the attenuator OUT; // [c] when the attenuator is not IN because of Sun Safing; // [d] including the attenuator positions in all SEP telemetry products; // FSW.SEP-8 : Moved to HSK-5 // FSW.SEP-9 : PFP FSW shall generate Spectra Telemetry // [a] by summing the raw spectra for each detector over the // programmable accumulation interval; // [b] providing separate accumulations for Survey and Archive data // with separate accumulation intervals; // [c] telemetering the first N bins of the Survey and Archive // histograms, where N is programmable up to 256. // FSW.SEP-10 : **DELETED** Rates Telemetry // FSW.SEP-11 : PFP FSW shall generate Configuration Telemetry // [a] copying SEP configuration data to SEP HSK packets at a low duty cycle; // [b] when commanded. // FSW.SEP-12 : PFP FSW shall collect housekeeping data // [a] including noise; // [b] providing these data in packets.

SEP Memory

SEP EEPROM LPW EEPROM Memory

SEP Hsk APID 2B, 2C

SEP Hsk APID 2B, 2C (SEP1, SEP2) Tables 22,23

SEP LM SEP Limit Monitors

SEP FP IsSEP1Open() FSW Selects SEP1 Door status and directly reads its status. IsSEP1Allowed() If either “SEP1 FOV1” or “SEP1 FOV2” ZoneAlerts, then SEP1 Door is not allowed. If user Enable is low, SEP1 Door is not allowed. ManSEP1Door() If open but not allowed, this routine starts RTS[6], SEP1 Door Closure. If closed but allowed, this routine starts RTS(11), SEP1 Door Open If SEP is off, doors will close as a result. Identical logic used in SEP2 Zone[1]=1? No Yes IsSEP1 Allowed() Return( 0 ) Zone[2]=1? SEP1 FOV1 in Sun? Is Task[12] > Limit? User Enabled ? OK, its allowed Return( 1 ) BiasMon > "-0.2V" Enable[1]=1? SEP1 FOV2 in Sun? If no SEP1 comm Low BiasMon => Sun

MAG Manager MAG Management Requirements Summary Notes: // FSW.MAG-1 : MAG_INIT shall initialize the module and define its hardware // initial state so the module works correctly.. // FSW.MAG-2 : MAG shall receive and execute commands to the module at up to // 32Hz, and complete those commands in <1/10 interrupt period. // FSW.MAG-3 : MAG shall provide housekeeping telemetry as defined in MAVEN // PF Command/Telemetry document // FSW.MAG-4 : PFP FSW shall generate MAG Sample Telemetry from MAG raw samples // [a] by averaging 2**N raw samples together (1 to 32). // [b] Averages are done separately for X,Y,Z axes ; // [c] X,Y,Z samples shall be included in the same packet; // [d] Separate packets with separate averaging intervals // shall be made for each of the two mags; // [e] Separate packets with separate averaging intervals shall // be made for Survey and Archive data. // FSW.MAG-7 : PFP FSW shall monitor the MAG instrument range. // FSW.MAG-8 : PFP FSW will generate a MAG vector // [a] once per second // [b] as the average of the raw measurements from the selected // MAG sensors over the previous second, minus an offset vector // uplinked from the ground; // [c] using separate offset vectors for each range setting. Notes: RMS calculation was removed

MAG Memory

MAG Housekeeping APID 26-27

MAG Housekeeping APID 26-27 Tables 16,17

MAG Telemetry APID 40-43 (Mag1/2, Survey/Archive, Uncompressed) * : Time contained in F0-F3 registers.

MAG Telemetry APID 40-43 Raw & “MAG” Compressed Packetization * : MAG Packets have a special compression format.

MAG Vector MAG Vector Production for SWEA PAD

MAG LM MAG Limit Monitors

MAG LM MAG Limit Monitors