GSFC/NGIMS-FSW-014 User's Guide and Software Operator's Manual for CONTOUR/NGIMS Flight Software PRELIMINARY Prepared By: Michael Paulkovich, Lead Software Engineer for Hasso Niemann, Paul Mahaffy, Co-Investigators NASA/GSFC Code 915 Laboratory for Planetary Atmospheres October 24, 2001 Rev 2.0 DOCUMENT CHANGE HISTORY Version Date Change 2.0 09 Nov 01 First CM version. Wholesale corrections and additions. Table of Contents References 5 Conventions 5 Acronyms 5 1. Overview 6 1.1 Configuration 6 1.1.1 Electronics Sub-Assembly 8 1.1.2 Analyzer Subsystem 9 1.2 Operation 9 1.3.1 Testbed and Host Download 9 1.3.2 Firmware Version 9 1.3.3 Modes and Submodes 9 1.3 Commanding and Telemetry 12 1.3.1 Commanding 12 1.3.1.1 Command Buffers and Constraints. 12 1.3.2 Telemetry 15 2. Sequencing 16 2.2 Sequencing via Stored Commands 16 Stored Commands 16 2.2.1 Stored Command Sequence 17 2.2.2 Init and Standby Mode. 17 2.2.3 Flight Mode Operations 18 2.2.3.1 Post-Launch Operations 18 2.2.3.2 Post-Breakoff Operations 19 2.2.3.3 Cruise Check-Out. 19 2.2.3.4 Encounter Operations 20 2.2.4 Generating and Maintaining the ATCS 20 2.2.5 TC Blind Mode 20 2.2.6 Non-Volatile Memory Safemode 20 2.2.7 Checksums 21 2.2.8 Table Update 21 2.3 Sequencing via Telecommands 21 3. Scanning 22 3.1 Scanning Overview 22 3.1.1 IP Control 22 3.1.1.1 Bands and Totals 22 3.1.1.2 Mux Polling 22 3.1.2 Scan Modes 23 3.1.3 Subscan Tables 23 3.1.4 Polynomials and Config Tables 23 3.1.5 RFMon Averaging 24 3.1.6 RF Temperature Averaging 25 3.2 Round-Robin Scanning 25 3.3 Round Robin Example 26 3.4 Flat Scanning 29 4. Commands 32 4.1 Scan Control Commands 32 4.1.1 MassTable 32 4.1.2 SetRepeat 32 4.1.3 Round 33 4.1.4 FlatLast 33 4.1.5 FlatFirst 33 4.1.6 Scan 33 4.1.7 Standby 34 4.1.7 InitMode 34 4.2 ATCS Control Commands 34 4.3 Analyzer Control Commands 34 4.3.1 Valve 34 4.3.2 DCON 34 4.3.3 DacORide 34 4.3.4 DACn 35 4.4 Engineering Commands 35 4.4.1 RamDump 35 4.4.2 EepromDump 35 4.4.3 Patch 35 4.4.3.1 Patch Apply 36 4.4.4 EEPROM Init 36 4.4.5 Reboot 36 4.4.6 TGO Boot 36 4.4.7 No-op 36 4.5. Command Acknowledge and Echo 36 4.6 Spacecraft Messages 37 4.7 Patches 37 EEPROM Initialization 38 4.8 EEPROM Tables 41 4.9 Memory Map 42 5. Telemetry 43 6. Breadboard operation 43 7. Special Considerations 43 APPENDIX X - Flight Software Maintenance 45 APPENDIX X - BOOTUP SEQUENCE 46 References (1) GSFC/NGIMS-FSW-27, "Alternate Boot Method for Contour/NGIMS" (2) GSFC/NGIMS-FSW-05, Contour/NGIMS Commanding (3) GSFC/NGIMS-FSW-06, Contour/NGIMS Telemetry (4) GSFC/NGIMS-FSW-11, Contour/NGIMS Software Requirements Document (5) GSFC/NGIMS-FSW-15, Contour/NGIMS Control Tables for Dummies (6) GSFC/NGIMS-FSW-20, Contour/NGIMS EEPROM ICD Conventions Signal (or data) names are usually shown in italics. Commands -- Telecommands are identified by their unique mnemonic as defined in Ref (2), enclosed in braces; e.g.: {Valve} - the Command assigned the mnemonic "VALVE". The following S/C messages will receive similar annotations: T Zero - {TZero} MET - {MET} S/C Mode - {SCM} Line-of-Sight Angle - {LOS} Acronyms TBS 1. Overview The Comet Nucleus Tour (CONTOUR) spacecraft, a NASA Discovery mission, will visit and study at least three comets. NGIMS is a quadrupole mass spectrometer instrument for CONTOUR consisting of a controlling Flight Computer, digital and analog electronics, and the various components that make up the analyzer hardware itself (ion lenses, filaments, valves, QP, sensors, etc.). The NGIMS instrument will determine the chemical, elemental, and isotopic composition of volatile cometary materials; determine the composition of low-energy ions in the coma; characterize physical and chemical processes in the coma; investigate the interaction of the coma with the solar wind; and assess the diversity of volatile composition among comets. The instrument is a mass spectrometer similar to the Cassini INMS, with a quadrupole mass filter with a mass range of approximately 1-300 AMU, and two electron impact ionization sources to allow switching between different modes of sampling. Thermal ion composition measurements will be made alternately with neutral gas measurements to study the photochemical processes in the coma. Operation of the instrument is also similar to Cassini GCMS with an autonomous Command Sequence and scanning concepts, and therefore the Flight Software is similar to GCMS. 1.1 Configuration The direct interfaces to the FC are shown in figure 1.1-1. A breadboard version of the FC exists, used in a testbed configuration for software development and software and hardware testing and verification. Figure 1.1-2 shows the testbed configuration. Typically, this breadboard FC is interfaced to partially to simulators and partially to real (flight-like) electronics in the testbed setup. Figure 1-1.1 NGIMS Interfaces, Flight Configuration Figure 1.1-2 NGIMS Interfaces, Testbed Configuration 1.1.1 Electronics Sub-Assembly Flight Computer. The controlling FC (Flight Computer) for the instrument is a Mil-Std-1750A Marconi MA31750 running at 8 MHz, no wait states, with 64 KW primary RAM, and 128 KW EEPROM. Proprietary busses interface the FC to the Electronics Sub-assembly (ESA), and a Mil-Std-1553 bus interfaces the FC to the S/C. The high-order programming language is Ada, Tartan/DDC-I. The 128 KW of EEPROM is allocated as follows: EEPROM 0 64K Calibration and Scanning Tables; Patches; Alt Boot load image EEPROM 1 64K Flat Tables There are "engineering" commands that allow the user to send memory loads to the FC, to dump memory, reboot the FC, etc. See §1.2.1. DACs, DCONs and Muxes. To control the instrument, the FC interfaces to DACs (Digital-to-Analog Converters) and a DCON (Digital Control) interface. The "readback" from the instrument is supplied via a "Mux" (multiplexer) interface. S/C Interface. The instrument interfaces to the S/C via a Mil-Std-1553 bus using the TBS 1553 module. 1.1.2 Analyzer Subsystem The Analyzer Subsystem consists primarily of ion lenses, filaments, valves, QP, and the detectors (pulse amplifiers and counters). The method of controlling the sampling of the analyzer is via a continuous "Scanning" method (see section 3). Various commands are available for special cases such as overriding DAC values, changing to the secondary filament, etc. There are commands to open and close the valves, and to control the pressure test components (BA gauge and thermistors). 1.2 Operation 1.3.1 Testbed and Host Download One mode of operation allows flight software to be downloaded from the development host. Sign on as user gcms. type: ccc to change to the common working subdirectory type: runtgt ngims to download the flight software and to start it running. 1.3.2 Firmware Version The turnkey (firmware) version boots itself when the flight computer is turned on and immediately begins running. There is an "Alt Boot" option, wherein a new version of the Flight Software can be loaded into EEPROM-0 and transferred to RAM by setting some addresses in EEPROM to the correct value. Refer to Ref (1) for more details. 1.3.3 Modes and Submodes The major software modes are shown below; Transitions between these modes and related commanding are shown in Figure 1.1-3. Mode Submodes Description Notes & Caveats Boot Alternate Boot Bootstrap mode. Alt Boot is essentially a decode & decompression of EEPROM to RAM. Init n/a Initial mode; follows bootstrap. All DCONs set to zero, all DACs set to "Low V" values. Essentially a "special case" of Standby Mode. No Science TM Generated unless {TM On} command sent. Standby n/a Selected DCONs and selected DACs set to selected values. No Science TM Generated unless {TM On} command sent. Flat n/a Flat Table mode. ("Scan Mode" #6) Round - Open Source - Closed Source - Ion Mode - Programmed Mass - Adaptive Scanning Round Robin mode. Includes "Scan Modes" 1-5. Config Table #3 (Neutral Thermal) is selectable only in Scan Mode 4 (Programmed). Adaptive Mode (AM) - AM Open Source - AM Closed Source - AM Ion Mode Round Robin mode. Includes "Scan Modes" 7-9. Figure 1.1-3 Mode Transitions 1.3 Commanding and Telemetry 1.3.1 Commanding Interactive instrument control and memory loading is performed from the GSE workstation or the S/C C&DH workstation, which can send telecommands (TCs) and interpret and display telemetry (TM). The spacecraft C&DH itself has a Stored Command Processor which can send TCs to NGIMS during encounters for autonomous measurement and mode changes. Command Dictionary. A complete list of commands is included in Table 1. Details on the formats of commands is provided Ref (2). Note that the mnemonics (names) shown herein for the NGIMS commands match Ref (2) but are essentially inconsequential, as the workstations can be set up with any desired naming convention, including bundling multiple NGIMS commands into one command or "script" -- along with other control commands such as delays. Using the GSE, the user can also make special commands that correspond to a FC command with preset arguments; e.g.: "RuptureValve" = {Valve} 2, 1 -- close the rupture valve "Squirt" = {Valve} 1, 1 -- open and close the gas reservoir {Valve} 1, 0 {Valve} 1, 1 "Ilens2" = {DacOv} 1 {Dac7} n Relative execution times for TCs will not be completely deterministic and are subject to such factors as transmission delays and the basic command execution "clock" (normally a maximum of one command executed per subscan, or ~2 Hz). See also §2.3 (Sequencing via Telecommands). 1.3.1.1 Command Buffers and Constraints. Commands are read from the CDS (1553) bus by "Low-Level" interface software when received, and are buffered in memory into a buffer called "Cmd_Rec_Q" which has a size of 16 commands (up to 64 words for each command). At the higher software level, Cmd_Rec_Q is polled by FSW at ~20 Hz, and any commands that have been received by the low-level interface software are then stored in buffer vCmdFIFO, which has allocated room for a maximum of 20 commands and a maximum total of 700 data words. Commands collected into vCmdFIFO are executed at a rate that depends on software "Mode" -- - In the Standby modes (Standby and Init Mode), commands are executed as fast as the FSW can, but at a maximum of one per IP (an IP is ~33 ms). Note that some commands could conceivably require more than an IP to complete. Examples include writes to EEPROM, and certainly the {TableUpdate} command (which takes about 5 seconds to perform). - In non-Standby modes (Round Robin or Flat Table mode), commands are executed every Subscan (a subscan consists of 15 IPs and thus the rate is 2.02 Hz). The "bottom line" is that the low-level software always collects commands fast enough, but a bottleneck (constraint) is at the buffer vCmdFIFO which holds 20 commands maximum and is emptied at either ~30 Hz (the IP rate) or 2.02 Hz (the subscan rate) depending upon mode. Scan Control Commands - Command Mnemonic Parameters Description Adapt. Mass Tbl {MassTable} SS, Table Select mass table Table for Subscan #SS for Scan Mode #4 (Programmed Masses) Set Repeat Count {SetRepeat} Mode, RepeatCnt For Scan Mode number Mode, set the subscan repeat count to RepeatCnt (0..63). Round Robin scanning {Round} n/a Begin Round Robin mode (end Flat mode) Adaptive Parameters {AdaptParam} Adaptive SetRepeat {AdaptRepeat} Flat Last Index# {FlatLast} Last Set last index# for Flat Scanning Flat First Index# {FlatFirst} First Set first index# for Flat Scanning and terminate Round Robin mode. Scan Mode Control {Scan} Mode, Frac, LastSS Allows Fractional (if Frac set) and partial scans (if LastSS nz) for Scan Mode Mode. Standby {Standby} 0 | 1 Command the instrument to or from Standby mode InitMode {InitMode} Command the instrument to Init mode Analyzer Control Commands - Command Mnemonic Parameters Description Valve (n) Open/Close {Valve} Vlv, Open Open/Close control for each valve DAC Override Mode {DACORide} DAC, On Causes DAC value for DAC #DAC to freeze at current computer-generated state with subsequent control governed only by receipt of DAC teleommands (until DACORide Off) received). DAC Parameters {DACn} Data Allow tuning of specified D/A. Only honored for specified DAC# (n) after DACORide On received for that DAC#. Engineering Commands - TC Blind {Blind} On Turn TC Blind Mode on or off. After processing this command with Op SET (Blind On), all other commands are ignored, although they are echoed and TC Counters are incremented. Non-Volatile Memory Safemode {NVSafe} On Allows the user to run a standard TC test script that might command writes to EEPROM, but to command the FSW to ignore EEPROM loads. TM On {TmOn} On Turn telemetry on in standby mode Reset micro-sequencer {ResetUseq} Reset micro-sequencer Compute EEPROM Checksums {Checksums} Compute checksum on selected EEPROM and store in RAM for later dumpage. Clear Latched Error bits {ClearLatched} Clear latched error bits Alternate Boot {AltBoot} EEPROM Start, RAM Start, Length, Chip, Reboot Load RAM from specified section of EEPROM; optionally restart program. RAM Dump {RamDump} StartAddr, Length Request contents of RAM memory area CMP (Patch) Load {Patch} StartAddr, Length, Destination, Apply, Patchno, Data Load CMP (Computer Memory Patch). See §4.x. Destination bits specify RAM or EEPROM. When the Patchno field =511, all patches are erased from EEPROM. EEPROM Init {EEPROMI} Bank Initialize (erase) all of EEPROM in Bank (1 or 2) EEPROM Dump {EEPROMDump} StartAddr, Length Request contents of EEPROM memory area Reboot {Reboot} n/a Reboot via jump to zero TGO Boot {TgoBoot} n/a Cool reboot by TGO timer expiration and HW reset No-Op {Nop} n/a No operation 1.3.2 Telemetry There are two types of telemetry: Packetized telemetry, referred to as TM; Non-packetized telemetry, referred to as NPTM. A description of TM and NPTM is included in this manual (Section 5). Details on data formats are provided in Ref (3). 2. Sequencing OVERVIEW Sequencing of the instrument is performed via telecommands. Telecommand Scripts stored in the S/C C&DH can establish autonomous sequencing and scanning states, and change parameters during a comet flyby. Other "ancillary" or "engineering" functions are supported that are not directly related to "sequencing." The Commands allow Scan Control and Mechanism Control (valves, DCONs, etc.), along with Tuning Adjustments, Memory Loads (patches), Memory Dumps, and Engineering Commands. Nomenclature We must distinguish between "scanning sequences" and the "stored command sequence" (among other things) in our nomenclature. Definitions: IP - Integration Period (smallest unit in a scan); 33.0 ms for NGIMS. Subscan - A collection of 15 IPs. Scan Mode - One of the five round-robin modes (OS, CS, IM, PM, SS) or the Flat Table (FT) mode. Scan - Complete traversal through one Scan Mode up to the commanded Last Subscan (qv). Pass - One traversal through five Scan Modes in round-robin mode. Last Subscan - A commandable parameter to limit the upper AMU (by limiting the number of Subscans) in a Scan Mode (round-robin only). ATCS (Absolute Time Command Sequence) - The list of Stored Commands that run during a flyby or checkout sequence. SCP (Stored Command Processor) - The S/C C&DH software that distributes commands. Telecommand (TC) - A command from ground to the instrument. Script - A file on the GSE or other workstation which can contain both TCs and script control commands (e.g., "wait" commands are GSE-only). 2.2 Sequencing via Stored Commands Normally, instrument sequencing will be performed via Stored Commands. The NGIMS instrument ATCS is merged with the list of SeqGen commands in the S/C C&DH. Stored Commands Stored Commands are maintained in an ATCS (Absolute Time-tagged Command Sequence). Figure 2-1 below shows a sample ATCS section (refer to the Command Dictionary in Section 1 for more information). The ATCS contains the following fields: Command - Mnemonic (from Instrument Command Dictionary) vArgs - any arguments the command might have vTimeTag - TZero time to execute command Comments - Optional comments in ATCS or TC script source files. Command Time Comments Valve 3, 1 -1:00:10 Open valve 3 SetRepeat 1, 2 -1:00:10 Set repeat count to 2 for Scan Mode #1 (OS) OSBias 2 -1:00:00 Set Open Source bias to value of 2 Valve 3, 0 -1:00:00 Close valve 3 SetRepeat 1, 4 -0:00:30 Set repeat count to 4 for Scan Mode #1 (OS) SetRepeat 1, 2 +0:00:30 Set repeat count to 2 for Scan Mode #1 (OS) . . . . . . . . . Figure 2-1 Sample Stored Command Sequence 2.2.1 Stored Command Sequence One Absolute Time Command Sequence (ATCS) resides in the S/C C&DH. Each Stored Command consists of the following fields: Field Description (Seqgen header/data) OpCode 8 bits Data Consists of a variable number of arguments as determined by the vOpCode. Checksum 6 bits The format for each is argument implied by its OpCode as specified in Ref (2). Note that if there are any patches stored in FC EEPROM, they should be applied (via the {PatchApply} command) in the flyby sequence. 2.2.2 Init and Standby Mode. "Init Mode" is the default upon boot-up; no sequencing is performed, and no science TM is generated (unless commanded by the {TmOn} command). When Init Mode is invoked (automatically after a power-on or reboot, or via the {InitMode} command), the FSW essentially sets DCONs and DACs to "safe" (zero) values. A similar mode, Standby Mode, can be commanded via TC. When Standby Mode is invoked, only the RF DACs (Vac & Vdc) are commanded to zero state: Vac is set to 8000h Vdc is set to 1900h. The user can force a transition out of Init or Standby by sending the {Standby} OFF telecommand; Round Robin sequencing begins, scanning begins, and Science TM is transmitted. Standby and Init Modes have the following uses and constraints: 1. Scanning per se is not performed. In Init Mode, DACs & DCONs are commanded to "off" voltages; in Standby mode, only Vac and Vdc are modified. 2. Since Scanning is not performed, TCs can be executed by the FSW at a higher rate. This is useful for large memory loads. 3. Also, since scanning is not performed, no science TM is generated as a default. Thus this mode is useful to gather large memory dumps. (But TM can be turned on via the {TmOn} command.) 4. Standby mode may be a useful "transition" mode wherein scanning parameters can be changed before resuming scanning. 5. If the instrument is in some RF mode when standby is initiated, that RF mode is cleared. Standby mode could be used during any "manipulation" of Round Robin parameters (Repeat Count changes, Max AMU changes, Subscan Table# changes); then, you must turn Standby OFF to resume scanning and/or sequencing. Sending Standby Off is the same as sending a {Round} command. 2.2.3 Flight Mode Operations This section describes the requirements for instrument control and memory loads during the major phases of Flight: Post Launch, Break-Off, Cruise, and Encounters. During comet encounters, the S/C C&DH sends telecommands to the NGIMS instrument. Some memory loads are required before encounters, along with quasi-interactive instrument tests. A special test will be run following the solid rocket burn, as well as using the Earth encounter as a sort of "dry run" for comet encounters. These operations are described below. In cases where a "memory dump" is indicated, this can include dumping of 256K bytes of FC memory (during NGIMS Standby mode). The Spacecraft/Mission personnel must dictate whether the nominal rate of 4.5 K bits/sec can be ignored during these special checkouts if it is allowable for NGIMS to be programmed for a higher TM rate during its Standby mode. 2.2.3.1 Post-Launch Operations Before the solid rocket burn, NGIMS instrument checkouts will consist of a Pressure Check, which must be accompanied by an interactive analysis of the TM by the ground team; the ground team decides if the next phase of the Pressure Check should be performed. Memory Loads and activities from ground consist of the following (interactively): a) Minimal: 1. Command to start pressure check 2. Analysis of TM 3. Command to perform pressure check part "B" 4. Analysis of TM 5. Command to start Baseline Test Total Memory Load: <3000 Bytes Note: Analysis of NPTM only is probably sufficient to evaluate the Pressure Check, but packetized TM is required to evaluate the Baseline Test (to assess science data which contains the mass scan pulse counts). b) Nominal: 1. Memory dump prior to test (desired but not required) - 256 K Bytes 2. Command to start pressure check 3. Analysis of TM 4. Command to perform pressure check part "B" 5. Analysis of TM 6. Command to start Baseline Test Total Memory Load: < 6000 Bytes Note that, if desired, a minimal (but less informative) dump of just EEPROM checksums can be performed. Comparing just the checksums to expected values will indicate if all of EEPROM contains expected data. c) Worst-case: 1. Complete Memory Load prior to test including new Command Sequence 2. Memory dump prior to test (desired but not required) 3. Command to start pressure check 4. Analysis of TM 5. Command to continue pressure check 6. Analysis of TM 7. Command to start Baseline Test Total Memory Load: ~260K Bytes 2.2.3.2 Post-Breakoff Operations After the solid rocket burn but before Earth Encounter, a Post-Breakoff procedure will be performed interactively: 1. Turn on NGIMS 2. Command to start Baseline Test Total Memory Load: 2000 Bytes nominal, 256K worst-case 2.2.3.3 Cruise Check-Out. It is assumed that a special Cruise-only stored command sequence will be uploaded to the instrument for the check-out, and replaced (if necessary) by the Encounter stored command sequence afterward. Since the breakoff has already occurred, there is no need for a Pressure Check. Operations and Memory Loads (not interactive): a) Nominal: 1. Memory dump prior to test (desired but not required) 2. Command to start Command Sequence Total Memory Load: 3000 Bytes b) Worst-case: 1. Complete Memory Load prior to test 2. Memory dump prior to test 3. Command to start Command Sequence Total Memory Load: ~256K Bytes 2.2.3.4 Encounter Operations During encounters (for Earth and comets), the Flight Software performs instrument control autonomously - that is, with no requirement for commanding from Earth or from the S/C CDS. Since this is performed via ATCS (Absolute Time-tagged Command Sequence) and other scan controls (e.g. Config Tables), it will usually be necessary to upload a new ATCS and other tables "optimized" for each encounter. Note that, as part of the Encounter Sequence, a calibration run will be performed at the very end (long after encounter) that will turn on the calibration filament, analyze spectra, and simply send the results back through telemetry. Operations and Memory Loads (~10 days before encounter): a) Nominal: 1. Memory dump prior to test (desired but not required) 2. Upload of new Command Sequence which will perform Cruise Check-out sequence Total Memory Load: 3000 Bytes b) Worst-case: 1. Complete Memory Load prior to Encounter 2. Memory dump (256K Bytes) Total Memory Load: 256K Bytes 2.2.4 Generating and Maintaining the ATCS TBS 2.2.5 TC Blind Mode Via the {Blind} command, the user can cause a "Telecommand Blind Mode" which causes the FSW to be "blind to" (that is, to ignore) all TCs except the command to turn Blind Mode off. 2.2.6 Non-Volatile Memory Safemode A Non-Volatile Memory Safemode" command {NVSafe} allows the user to run a standard TC test script that might command writes to EEPROM, but to command the FSW to ignore EEPROM loads. 2.2.7 Checksums This command causes the FSW to compute the checksum values of EEPROM chip 0 and 1 and store the (16-bit) result in FC RAM at addresses FFFB and FFFC respectively. Note that FC PROM checksum is also maintained at FFFF in RAM. An argument in the command allows optional "updating" of EEPROM checksums. See Ref (2). 2.2.8 Table Update Default values for AMB tables (config tables, constants, etc) to are maintained in PROM and applied to the program memory (RAM) upon program startup. If any changes are uploaded (via {Patch} command to EEPROM 0), they are not applied to the program automatically. The {TableUpdate} command causes any changes applied to EEPROM 0 tables to be re-loaded into RAM. Auto Table Update. As indicated in NGIMS-FSW-20, EEPROM parameter AMB-42 at address FFFC in EEPROM-0 holds the "AMB Load Flag: -- setting to AB12h causes FSW to perform a {TableUpdate} command automatically on boot-up. 2.3 Sequencing via Telecommands If desired, and especially during ATLO and laboratory testing with mock-ups (breadboard, EM), sequencing can be performed via telecommand scripts from the GSE instead of Stored Commands in the S/C. Telecommand scripts can be formulated and sent by the GSE (or S/C Simulator). One caveat is that timing (execution of the commands) is perhaps more non-determinate with TCs than with SCs. 3. Scanning For an overview of Lenses, QP tuning & resolution, Filaments, and Ion Modes, refer to the Instrument User's Guide (Harpold/Kasperzak/Code 915). 3.1 Scanning Overview The smallest unit of sampling is the Integration Period (IP), during which one set of voltages can be applied to the DACs, and one "sample" is taken (the sample consists of Counter1, Counter2, and Mux data). During the 33.0 ms IP, there is a set-up time (3.0 ms) and an actual pulse-counting period of 30.0 ms. IPs are always grouped into "Subscans" of 15 IPs. When a Subscan is performed, software selects from the next 15 IPs in the current Scan Mode. The discussion in this section primarily refers to Round Robin (not Flat Table) mode. Refer to §3.4 for a description of Flat Table mode. 3.1.1 IP Control Each IP is described by a Select Word word that specifies Mass, Freq, and ConfigTable. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 MassCode Freq Config The Mass field consists of 12 bits and represents either: AMU# * 10 when Mass <= 3010 (unity AMU resolution) Band# when Mass = 4000 .. 4074 (wide AMU resolution) This provides a dynamic range in unity resolution mode of 0.0 AMU to 300.0 AMU with granularity of 0.1 AMU. A Mass code between 3010 and 4000 is treated by the FSW as 3010 (301.0 AMU). 3.1.1.1 Bands and Totals Mass codes for Bands and Totals are defined via AMB-31 -- see Ref 6. 3.1.1.2 Mux Polling Muxes are polled in a rotating commutator fashion. An array 256 of "User Mux IDs" is maintained in AMB memory. A User Mux ID is a value from 1 to 91 that is used to indicate the hardware Mux ID, and to identify the mux value in TM. On each successive IP, the next successive User Mux ID is chosen from the array (wrapping around to the beginning of the array after the 256th); based on the User Mux ID, the corresponding hardware Mux ID (see NGIMS document 0770491) is chosen and sent to the instrument for that IP. 3.1.2 Scan Modes There are seven Scan Modes (0-6) with the following numbering: # Scan Mode Meaning 0 (n/a) Initial Value + Standby/Initmode 1 OS Open Source 2 CS Closed Source 3 IM Ion Mode 4 PM Programmed Masses 5 AM Adaptive Mode 6 FT Flat Table mode 7..9 AM (proposed adaptive modes) Scan Modes 1-5 are used in Round Robin scanning (see §3.2), and mode 6 is Flat scanning mode (see §3.4). 3.1.3 Subscan Tables Subscan Tables are used in Round Robin (not Flat) mode only. For the first three Scan Modes, Subscan Tables are preset for each of the 25 subscans in each Scan Mode. Via Stored Commands (the {MassTable} command), Scan Mode #4 (Programmed Masses) can point to different mass tables. This is useful for: - Selecting different Programmed Mass tables for closest approach (comet tail) science - Cal Gas Mode - Ground Testing and Calibration Refer to GSFC/NGIMS-FSW-15, "Control Tables for Dummies." 3.1.4 Polynomials and Config Tables For NGIMS, a polynomial computation for mass-dependent voltages is the prime method for DAC computation, but there are caveats. There are 4 sets of "Config Tables" in EEPROM which contain polynomial coefficients and other DAC control parameters. Each IP, a Select Word in a Subscan Table points to one of the Config Tables: OS (Open Source) CS (Closed Source) IM (Ion Mode) NT (Neutral Thermal) Vac and Vdc are computed by table lookup with (optional) compensation for frequency and temperature. Refer to GSFC/NGIMS-FSW-15, "Control Tables for Dummies." 3.1.5 RFMon Averaging The 16-bit frequency counter, RFMon, is output by the electronics and read by the FSW on every IP. The FSW collects and averages the RFMon into three bins, HF, LF and MF according to the frequency that was commanded for the IP in question. There are AMU and Frequency filters (rules) regarding sampling and averaging: 1. When in Standby mode, RFMon is not valid and is not sampled. 2. When in Round Robin mode, the AMU & Frequency data are known; averaging only takes place when the Mass value is in the right range for the Frequency: RFMon_Avg(HF): 2.0 .. 4.5 RFMon_Avg(MF): 27.0 .. 29.0 RFMon_Avg(LF): 83.0 .. 85.0 3. When in Flat Table mode, the AMU is not (reliably) known, but Frequency is known. So RFMon is sampled every IP and averaged into the appropriate HF/MF/LF bin according to the Freq bits in the Select Word. 4. Averaging is performed by summing 10 samples, then dividing by 10; the process repeats. 5. There is a special case for Mid Frequency, as follows. The nominal value for MF can be computed as: RFMonMF = Frequency / IP Time = 2.2MHz / 30 ms = 66,000. (30 ms is the pulse-count portion of the 33ms IP.) Since RFMon is a 16-bit value in the interface from the electronics to the FC, the range of actual values compared to reported values in the interface are:1 16-bit Reported Counts Actual Counts FB5Eh to FFFFh 64,350 to 65,535 0000h to 0842h 65,536 to 67,650 The flight software must thus compensate for this rollover. It does so by assuming that, when the value reported is less than 8000h, it has rolled over; the software thus adds 10,000h to the value in this case only. The result is that internally the software uses the "actual" values (maintained internally in 32-bit format) in its averaging algorithm. Since the averaged value may also be as big as 17 bits, the value returned in TM is shifted to the right one bit to fit into the 16-bit TM field -- hence the value reported in raw TM is 1/2 of the measured average RFMon. ? The GSE may choose to adjust this value accordingly for display. ! Note that, for all frequency correction computations, the FSW uses the same RFMon Avg values returned in TM -- in particular, it uses the 1/2 RFMon Avg value for the ?F/F computation for MF; hence "F" (nominal frequency that is loaded into EEPROM) for MF should be set equal to half of the "real" nominal frequency count, or 33,000 for a frequency of 2.2MHz. 3.1.6 RF Temperature Averaging TBS (See J. Maurer/SPRL memo) 3.2 Round-Robin Scanning Each of the five Round Robin Scan Modes has 25 Subscan Tables associated with it. The first three round robin modes (OS, CS and IM) have a maximum of 25 Subscan tables (numbered 0..24). Programmed Mass mode has 256 tables (0..255). TBC Each Subscan Table consists of 15 Select Words that define the following for each IP: MassCode AMU number is computed as MassCode*10; mass codes 4000..4074 mean Bands/Totals Config# Selects the Config Table, which selects the "Source mode" Frequency Frequency selection Although we speak of three major "source modes" (OS, CS, & IM), a fourth source mode exists, "NT" (Neutral Thermal, using the Open Source) for calibration when the OS has no ram velocity. Source Modes are numbered 0..3 for OS, CS, IM & NT. Each Round-Robin Scan Mode has additional control variables associated with it, which can be controlled via Stored Commands or Telecommands: Repeat Count, Last Subscan#, and Fractional. Repeat Count Indicates the number of times to perform a subscan in this Scan Mode before moving on to the next Scan Mode. Last Subscan# Indicates the highest Subscan Table number to perform on this Scan Mode before returning to Table #0 within this Scan Mode. Fractional Set (NZ) means that Fractional Scans are to be performed for this Scan Mode. Via Stored Commands or TCs, the Scan Control Parameters can be changed: Repeat Count, vRepeatCnt() for each of the 5 round-robin scan modes Last Subscan, vLastSS()for each of the 5 round-robin scan modes. Via Stored Commands or TCs (the {MassTable} command), Scan Mode #4 (PM) can point to different mass tables. In Round Robin mode, each successive Subscan is selected based upon the scan-control parameters associated with each Scan Mode: First Subscan Number Last Subscan Number Fractional Mode Y/N Subscan Repeat Count. With 15 IPs per Subscan, a Subscan is 0.5s (with a 33 ms IP) one "column" (five Scan Modes) is traversed in 1.5 seconds (assuming unity RepeatCnt for all Scan Modes). Notes: - Setting all repeat counts to zero is not allowed by the FSW (the software will reject the "final" command that might set the only remaining repeat count to zero). - Standby mode could be used during manipulation of Round Robin parameters (Repeat Count changes, Max Subscan# changes, Subscan Table# changes); then you must turn Standby OFF. 3.3 Round Robin Example Examples of progression through the scans are given in the pages that follow. In these examples, LastSS is set to 15, 15, 15, 5 and 2. EXAMPLE SCAN SEQUENCE - ALL REPEATCOUNTS = 1 -- Mode Rpt SUBSCAN # 1 OS 1 1 6 11 2 CS 1 2 7 12 3 IM 1 3 8 13 4 Progr. 1 4 9 14 5 Smart 1 5 10 CONTINUING... Mode Rpt SUBSCAN # 1 OS 1 16 21 2 CS 1 17 22 3 IM 1 18 23 4 Progr. 1 19 24 5 Smart 1 15 20 CONTINUING... Mode Rpt SUBSCAN # 1 OS 1 26 etc 2 CS 1 27 3 IM 1 28 4 Progr. 1 5 Smart 1 25 29 SCAN SEQUENCE -- EXAMPLE 2 -- PASS #1: Mode Rpt SUBSCAN # 1 OS 1 1 2 CS 5 2 3 4 5 6 3 IM 1 7 4 Progr. 0 5 Smart 2 8 PASS #2: 1 OS 1 9 2 CS 5 10 11 12 13 14 3 IM 1 15 4 Progr. 0 5 Smart 2 16 PASS #3: 1 OS 1 17 2 CS 5 18 19 20 21 22 3 IM 1 23 4 Progr. 0 5 Smart 2 24 3.4 Flat Scanning Flat Table (FT) Scanning mode is a test, tuning and diagnostic feature that provides maximum control over IP-to-IP control and sampling. One of the EEPROM chips (64KW) is used to hold Flat Tables. To initiate Flat mode, the user sends the {FlatLast} telecommand followed by the {FlatFirst} telecommand, which tell the FSW to terminate Round Robin (or Standby) mode and begin reading IP Control words from the EEPROM chip in groups of 15 per Subscan. It is the {FlatFirst} command that causes the FSW to accept the newly commanded First & Last. Flat Table Formats. The Flat Table Header block is kept in the first EEPROM "page" (start address 0000) for use by the GSE. The Header is not used by FSW and thus may be used by GSE in any way that is fit. The Scan Section starts at EEPROM address 0040h. Since the concept of a 15-IP "subscan" is maintained in Flat Table mode too (for TM, GSE and simulator purposes), even multiples of 15 IPs should be used for any looping Flat mode. FSW will "force" one 15-IP subscan if the First & Last values would result in a non-integral number of subscans. For any flat IP, there are 23 16-bit DAC value words (corresponding to the 46 8-bit DAC bytes) maintained in byte format in EEPROM (generated by the GSE), along with MUXID and MASS. Note that, once assembled into 4, 8, 12 and 14/16-bit DACs, the total count is 29 DACs. The format for a flat IP is as follows, for a total of 25 (16-bit) words per IP: MASS MUXID (not used) Packed DAC bytes (23) More specifically: 1 MASS 2 MUXID (not used) [14/16-bit DACs:] 3 BYTE2, BYTE1 -- DAC1 (Vdc) -- BYTE1 is in lower byte (lower 8 bits of DAC1) 4 BYTE4, BYTE3 -- DAC2 (QB) 5 BYTE6, BYTE5 -- DAC3 (Vac) [8-bit DACs:] 6 BYTE8, BYTE7 -- DAC5 (high byte) + DAC4 (low) 7 BYTE10, BYTE9 -- DAC7 + DAC6 8 BYTE12, BYTE11 -- DAC9 + DAC8 [4-bit DACs:] 9 BYTE14, BYTE13 -- DAC10 + DAC11 (lo byte) + DAC12 + DAC13 (high) [12-bit DACs:] 10 BYTE16, BYTE15 -- DAC14 plus 4-bits spare (will be assigned addr codes by FSW) 11 BYTE18, BYTE17 -- DAC15 plus 4-bits spare 12 BYTE20, BYTE19 -- DAC16 plus 4-bits spare 13 BYTE22, BYTE21 -- DAC17 plus 4-bits spare 14 BYTE24, BYTE23 -- DAC18 plus 4-bits spare 15 BYTE26, BYTE25 -- DAC19 plus 4-bits spare 16 BYTE28, BYTE27 -- DAC20 plus 4-bits spare 17 BYTE30, BYTE29 -- DAC21 plus 4-bits spare 18 BYTE32, BYTE31 -- DAC22 plus 4-bits spare 19 BYTE34, BYTE33 -- DAC23 plus 4-bits spare 20 BYTE36, BYTE35 -- DAC24 plus 4-bits spare 21 BYTE38, BYTE37 -- DAC25 plus 4-bits spare 22 BYTE40, BYTE39 -- DAC26 plus 4-bits spare 23 BYTE42, BYTE41 -- DAC27 plus 4-bits spare 24 BYTE44, BYTE43 -- DAC28 plus 4-bits spare 25 BYTE46, BYTE45 -- DAC29 plus 4-bits spare Mass. For consistency, the MASS word will be in same format as the Select Words of Round-Robin mode (bit 0 is the MSB below): Bits 0..11 = Mass # code (AMU# * 10) Lower bits normally have Config Tbl and Freq fields (spares for Flat mode) MuxID. The MuxID word is 7 bits (thus there are 9 bits spare in this word). This word is currently ignored by the FSW. DACs. The layout matches exactly the format expected by the micro-sequencer (see "Contour/NGIMS DAC Command Format," S. Feng) but packed in two data bytes per word (the micro-sequencer format has address codes in the upper 8 to 12 bits). One can see that the GSE doesn't have to "pack" the 12 or 14/16-bit DACs, but does pack the 8- and 4-bit DACs. For instance, when a 12-bit DAC value is computed, it is simply placed in the table. The FSW then pulls each byte out separately, tags the lower one with 4 address code bits, and sends the data out as two words (with the upper byte of each word containing DAC address codes). General. Since there are 65,472 (65,536-64) words available for Flat Tables, and 25 words per IP, then there is room for 2618 IPs in EEPROM (174 Subscans worth). A Flat Table Index is used to control where any given Flat Table begins and ends. This is a value 0..2617 which can be used to determine the address in EEPROM that was used for that Subscan. In Flat mode, the Flat Table Index number is packed into TM where normally Select Words are stored in Round mode, in the Mass field. The commands that tell the FSW the starting and ending addresses for a Flat Table (the {FlatLast} and {FlatFirst} commands) use as their parameters 12-bit Flat Table Index numbers (at this time, valid range is 0..2619). When Flat Scanning is active, any newly assigned Last or First Flat address (changed due to TC or executed SC) is saved in temporary memory and only takes effect after the last subscan (upon reaching the Last address). Such a change takes effect only if both the new Last and First values have been received (in that order). Note that the FlatLast parameter must be equal to FlatFirst + 15*n, where n is the number of subscans to be performed. If it is not, or nonsense values are send (e.g. FlatLast lower than FlatFirst), the FSW will perform instead one subscan of 15 IPs. Also, zero is not a valid FlatFirst value (start at 1). 4. Commands A list of commands was supplied in Section 1. This section provides more detail on commands. Refer to Ref (2) for details on data formats. The sections that follow describe each command in detail. 4.1 Scan Control Commands 4.1.1 MassTable The {MassTable} command allows the user to select mass tables for each Subscan in Scan Mode #4 (Programmed Masses). Parameters: SS Subscan number Table New table to be used for Subscan #SS Description. In PM mode, user-selected Mass Tables (see §3.1.3) are performed. Let's take an example where the LastSS parameter has been set to 4 for PM mode, RptCnt = 1, and Frac is not set. For instance, sending the commands: {MassTable} 1, 10 {MassTable} 2, 11 {MassTable} 3, 20 {MassTable} 4, 21 Will cause the PM table to look like this: Robin Control Params Mass RptCnt LastSS Frac 1 2 3 4 5 6 ?Subscan# 1 4 0 10 11 20 21 n/a n/a ?Mass Table# And thus, when in PM mode, the Mass Table progress would go: 10, 11, 20, 21 (next Scan Mode) Refer also to section 3.3, "Round Robin Example." 4.1.2 SetRepeat The {SetRepeat} command allows the user to set the subscan repeat count for any Scan Mode (1-5). This dictates the number of times to perform a subscan in one Scan Mode before moving on to the next Scan Mode. Refer also to section 3.3, "Round Robin Example." Parameters: Mode Scan Mode # (1-5) RepeatCnt Integer (0..127) 4.1.3 Round The {Round} command begins Round Robin mode (ending Flat or Standby mode). Parameters: (none) 4.1.4 FlatLast The {FlatLast} command allows the user to set the last index# for Flat Scanning. If round-robin mode is active, no other changes are done (round-robin stays in effect and the Last index for Flat mode is stored in memory for future switch to Flat mode). It is expected that this command be followed by the {FlatFirst} command which will being Flat Table mode. Parameter: Last value of last index# in EEPROM 4.1.5 FlatFirst The {FlatFirst} command allows the user to set the first index# for Flat Scanning, and tells the FSW to terminate Round Robin mode. Parameters: First value of first index# in EEPROM 4.1.6 Scan The {Scan} command allows switching to/from Fractional mode, and allows control over partial scans for each of the five Scan Modes. Parameters: Mode - the mode, 1..5, on which to set Frac and LastSS parameters Frac - SET means Fractional Mode LastSS - The last Subscan number, 0..255. Note that commanding LastSS = 0 for a Mode does not "turn off" that mode; to inhibit Round Robin from going to a certain mode, set the RepeatCnt to zero. About Fractional Mode. When Frac is set for a Scan Mode, for each Select Word indicated in any Subscan Table, rather than performing just one IP, the software scans for 10 IPs at ±0.5 AMU around the AMU indicated in the Select word. For the case where a IP where the Select Word dictates Band (rather than AMU), the 10 "fractional IPs" will all be for the same Band. 4.1.7 Standby The {Standby} command allows the user to control transitions to/from Standby mode. Parameters: On =0 means turn Standby OFF and go to Round Robin mode =1 means turn Standby ON Refer to §2.2.2, "Standby Mode". 4.1.7 InitMode The {InitMode} command allows the user to control transitions back to Initmode. 4.2 ATCS Control Commands These commands have been deleted and onboard/flyby commanding and sequencing is provided by the S/C C&DH SCP. 4.3 Analyzer Control Commands 4.3.1 Valve The {Valve} command allows Open/Close control for each valve. Parameters: Vlv Valve number Open 1= open, 0= close 4.3.2 DCON The {DCON} command allows On/Off control for each bit . Parameters: Word DCON Word, 0 or 1 Bit Bit number 0..15. Bit 0 is the LSB for this command. On/Off 0 or 1 to clear or set the bit. 4.3.3 DacORide The {DacORide} command allows the user to specify whether the FC should compute values for a specified DAC#, or use the override value specified by the {DACn} command. Parameters: On 4.3.4 DACn The {DACn} command allows tuning of the specified DAC. Parameters: Data New data value for DAC #n. Description. This command will be honored after a {DACORide On} command is received for the DAC# specified in this command. The new value will be output every IP for the specified DAC#. 4.4 Engineering Commands 4.4.1 RamDump The {RamDump} command allows inspection of FC memory. When a command is executed, the contents of the dumped memory are placed in a Science TM packet with the Application / Process ID set to the Dump value set in the NGIMS header. Parameters: StartAddr Starting address in RAM EndAddr Ending address in RAM 4.4.2 EepromDump The {EepromDump} command allows inspection of EEPROM. When a command is executed, the contents of the dumped memory are placed in a Science TM packet with Dump packets. Parameters: StartAddr Starting address in IORAM EndAddr Ending address in RAM 4.4.3 Patch This command allows changes to FC memory. Optionally, patches can be specified to be included in patch memory in EEPROM to be applied whenever the FC reboots. Refer to §4.7. Parameters: StartAddr Length Destination Apply Patchno Data 4.4.3.1 Patch Apply This command causes the FSW to examine EEPROM, and for every patch stored in the "patch directory" with nonzero Length field, the patch is applied to RAM. 4.4.4 EEPROM Init This command causes the FSW to initialize (erase) all of EEPROM in the specified Bank (1 or 2) Parameters: Bank 0 or 1 (physical EEPROM chip) 4.4.5 Reboot This command causes the FC to reboot via jump to the 1750 boot address (0000) , which does not cause physical RESET of the FC. This command is not recommended; the TGO Boot command is recommended. 4.4.6 TGO Boot This command causes the FC to reboot via expiration of the TGO counter, which causes physical RESET of the FC. 4.4.7 No-op The {Nop} command will only cause reflection of TC execution in TM (Last Cmd field, # TCs rcvd). See §4.5. 4.5. Command Acknowledge and Echo Each TC is tagged with a 16-bit "Serial Number" (SN) which was used to identify TCs in the Command Echo portion of TM. One might consider using a couple of bits in the Serial Number as a flag to the GSE to route TM data to special displays. Assigning two bits to a GSE "Destination" allows the team to create TC scripts that direct selected TM packets to special GSE display windows. This is possible because each TM packet echoes the most recent telecommand, including the Serial Number word. There is also a TC acknowledge packet with a unique App/Process ID containing multiple TC echoes (TBS). Notes: - Reboot commands are not processed for ack/nack nor echoed in the Last Command block in TM. - Sending the {Standby} ON command also results in termination of Science TM, so it is undefined whether it will get echoed in TM. 4.6 Spacecraft Messages Messages from the CDS to NGIMS are sent all together in a 5-word block at a 1 Hz rate to 1553 Sub-address R4. The table below enumerates those messages (bit numbers are from the 1750 standard, LSB is bit 15). The S/C "aka" is also provided -- since the Project did not name the messages until well after all NGIMS software documentation was completed, and since the Project chose different nomenclature than NGIMS engineers had been proposing, the "aka" is the Project's name for that message. Message Word# Bits aka Notes {MET} 0, 1 all n/a Mission Elapsed Time; LSB = 1 s {TZero} 2, 3 all CAT LSB= 1 s ; two's compliment time to closest approach, monotonically decrementing, negative after closest approach. {SCM} 4 12 Encounter 1=Encounter, 0=Not Encounter {LOS} 4 15..13 POC Line Of Sight, or Pointing Offset Code: 0 = not valid 1 = 0.0 degrees 2 = 0.5 degrees 3 = 2.5 degrees 4 = 6.0 degrees (This is used in the QP voltage computations.) 4.7 Patches The {Patch} command allows modification of RAM and EEPROM. Patch commands contain the following parameters: StartAddr The address in RAM or EEPROM at which to apply the patch Length The number of words in the patch Destination Destination = RAM, EEPROM 0, EEPROM 1 Apply Apply to RAM, Save in Patch Directory, or BOTH Patchno Patch Number for maintaining the Patch Directory ("FAT") Data The patch data (new memory contents) The Destination field indicates a physical device: 1 = RAM 2 = EEPROM Table, chip #0 3 = EEPROM Table, chip #1 The Apply field pertains only to patches with a Destination field = "RAM". This field indicates whether to (a) apply the patch to RAM now, (b) save the patch in EEPROM Patch Directory memory only, or (c) both: 1 = RAM (only) 2 = Patch Directory (only) 3 = Both Patch Directory The "Patch Directory" is like an EEPROM patch "FAT" (File Allocation Table). When a patch is stored to EEPROM Patch Directory memory, the EEPROM "FAT" address where it is saved is a function of the Patchno field: (kPatchBase + vPatchno*33), where kPatchBase is C000h (TBC). All patches in the EEPROM Patch Directory are applied to RAM when the {PatchApply} command is received. No patches with Destination = "EEPROM" are stored in the Patch Directory. Each RAM patch requires 33 EEPROM words in the Patch Directory (one word for StartAddr, one for Length, 31 for Data), allowing 496 patches if 16384 words of EEPROM are allocated for patches. The {Patch} telecommands can be sent an unlimited number of times when the Apply field is set to "RAM Only" (for instance, when tweaking, before finalizing tuning values). Each patch data block, regardless of length, is maintained in a 31-word segment; the remaining words (31-vLength) are to zero. This has the effect that any {PATCH} command with Length=0, and Apply="Patch Directory" or "Both", will cause the patch to be erased from FAT -- the Length field in the FAT is set to zero, and the patch will not be applied to RAM upon boot-up. Note that there is a special command for erasing patches: when the Patchno field =511, all patches are erased from EEPROM. With this implementation, one can easily control the Patch Directory -- for instance, to delete patch #7, send a {PATCH} TC with Patchno=7 and Length =0. (The "Erase Patches" command -- Patchno=511 -- will cause FSW to set all of patch space to Length=0; the initial state of EEPROM should be the same.) Certain "standard" patches can also be allocated fixed numbers; for instance, it would be wise to establish one set of "Master Tuning" patches, e.g. patch numbers 1-5 or something. Note that each patch comprises up to 31 address/contents pairs that must be contiguous. A graphic illustrates the general layout and concept in Figure 4.7-1. EEPROM Initialization Execution of a valid {EEPROMI} command causes all addresses of the EEPROM chip (#0 or #1) specified by Bank to be erased. Also note that during Bootstrap processing, software checks to see if every location contains the value FFFFh in Patch EEPROM; if that is the case (we assume new EEPROMs were installed) will initialize Patch EEPROM: - set patch lengths to zero; - establish EEPROM checksums. Notes: - Memory loads for large patches and tables during ground testing will be processed by the software at the maximum rate (per S/C C&DH constraints) when in Standby mode. When not in Standby, all TCs are limited in execution rate as specified above, and GSE must not transmit too fast, or FSW will "dump" some commands (as indicated in the vTCOverflow bit in TM). Figure 4.7-1 Patch File Allocation Table illustration and Patch Application 4.8 EEPROM Tables Tables in EEPROM (backed up by "default" tables in PROM in case EEPROM checksum fails) are used to define constants, including Config Tables, Subscan Tables, calibration parameters and other "AMB" (Adaptation Memory Block) values. Refer to GSFC/NGIMS-FSW-15, "Control Tables for Dummies." Upon boot-up, the FSW loads "working" RAM arrays with default PROM values, and operates out of RAM. Sending the {TableUpdate} command while the program is running will cause loading of RAM with the AMB parameters. This is illustrated below. Since the program reads AMB parameters out of RAM, it is also possible to frobnigate (tweak) the AMB parameters in real time via the {Patch} command with Dest=RAM & Apply=1 (illustrated below), if one knows the RAM addresses of the parameters in question, which can be determined via the Memory Maps. 4.9 Memory Map TBS 5. Telemetry 5.1 NPTM Non-Packetized Telemetry (NPTM) is transmitted separately from packetized telemetry, 8 words per second. Only 8 ESWs can be transmitted at a time, so they are multiplexed by forming groups. Refer to Ref (3). 5.2 TM Packetized TM on the Science channel contains both Science & HK. The S/C does provide a separate HK channel but it is not used by NGIMS. Refer to Ref (3). 6. Breadboard operation 6.1. LEDs. The three "binary" LEDs (rows of 16 each) show "Experiment Status Words" (ESWs) 1, 2 and 3 -- Subsystem Fail, Subsystem Fail Latch, and General Status. See Ref (3) for details. The other (hex) LEDs are assigned to display the following values: LED ESW Meaning 1 4 General Error Status 2 13 Encounter, ALF boot, EEPROM boot, Bootstrap mode 3 1 TC Executed Counter - Increments when any TC has been executed. 4 7 CDS Error Status 5 1 IP count 6 10 TZero LSBs 7 12 MET LSBs 8 1 TM Packet Sequence Count 9 1 spare 10 1 spare 11 1 TC Process Counter. Increments when a TC that had been received and queued is eligible to be executed. During bootstrap, LEDs 3 and 4 display the Alt Boot checksum (if Alt Boot attempted): LED 3 shows the computed checksum LED 4 shows the checksum stored in EEPROM. One can tell immediately that an Alt Boot was successful if one sees LED 3 = LED 4 for a second or so. Another indication is in the FSW Version Number in each scan packet in TM. See Ref (3). 7. Special Considerations TBS APPENDIX X - Flight Software Maintenance TBS APPENDIX X - BOOTUP SEQUENCE TBS INDEX {Commands} { InitMode } · 34 {AltBoot} · 14 {Blind} · 14, 20 {CAT} · 37 {Checksums} · 14, 21 {ClearLatched} · 14 {DAC} · 35 {DACn} · 14 {DacORide} · 34 {DACORide} · 13, 35 {DCON} · 34 {Eepromdump} · 35 {EEPROMDump} · 14 {EEPROMi} · 36 {EEPROMI} · 14, 38 {Flatfirst} · 33 {FlatFirst} · 13, 29, 30 {Flatlast} · 33 {FlatLast} · 13, 29, 30 {InitMode} · 17 {LOS} · 37 {MassTable} · 13, 23, 26, 32 {MET} · 37 {Nop} · 14, 36 {NVSafe} · 14, 20 {Patch} · 14, 21, 35, 37 {PatchApply} · 36, 38 {RamDump} · 14, 35 {Reboot} · 14, 36 {ResetUseq} · 14 {Round} · 13, 33 {Scan} · 13, 33 {SCM} · 37 {Setrepeat} · 32 {SetRepeat} · 13 {Standby} · 13, 17, 34, 36 {TableUpdate} · 12, 21, 41 {Tgoboot} · 36 {TgoBoot} · 14 {TM On} · 9 {TmOn} · 14, 17, 18 {TZero} · 37 {Valve} · 13, 34 A Adaptive mode · 9, 23 Alt boot · 9 AM · 23 AMB · 41 AMB, for mux IDs · 22 Apply, in {Patch} · 37 ATCS · 16, 17, 20 Auto table update · 21 B Bands & totals · 25 Bands and Totals · 22 Bands, in fractional mode · 33 Blind mode · 14, 20 Boot · 9 Breadboard FC · 6 C C&DH · 12 Calibration run · 20 Closed source mode · 23 CMP load · 14 Command dictionary · 12 Command execution rate · 12 Config · 22 Config select word · 25 Config tables · 23 Counter1 · 22 Counter2 · 22 Cruise check-out · 19 CS · 23 D DAC override · 13 DACs · 9 DCONs · 9 DCONs, in standby mode · 18 Destination, in {Patch} · 37 Download · 9 Dumps · 35 E EEPROM, patch directory · 36 Encounter mode · 37 Encounter operations · 20 Encounter sequence · 20 Erasing patches · 38 F FAT · 38 Firmware · 9 Flat · 9 Flat first · 13 Flat last · 13 Flat mode · 9 Flat scanning · 29 Flat table mode · 23, 29 Flight configuration · 7 Flight mode operations · 18 Flyby sequence · 16, 34 Frac, in {Scan} cmd · 33 Fractional mode · 33 Fractional scans · 13, 26 Freq · 22 Freq select · 25 Freq, in Select Word · 24 Frequency correction · 25 FT · 23 G GSE · 36 I IM · 23 Init mode · 9, 12, 17 Ion mode · 23 K kPatchBase · 38 L Last cmd · 36 Last subscan · 25 LastSS · 26, 32 LastSS, in {Scan} cmd · 33 M Mass select word · 25 Mass table · 13 Mass, RFMon averaging and · 24 MassCode · 22 Memory dumps · 35 Micro-sequencer · 30 Mid frequency RFMon · 24 Mnemonics, for cmds · 16 Mode transitions · 11 Mode, in {Scan} cmd · 33 Mux data · 22 Mux IDs · 22 Mux polling · 22 Muxes · 9 N Neutral thermal mode · 9, 25 No-Op TC · 14 NPTM · 15, 19 NT · 25 NVSafe · 20 O Open source mode · 23 OS · 23 P Flyby sequence · 17 Patch directory · 38 Patch directory, in EEPROM · 36 Patch load · 14 Patches · 17 PM · 23 Polynomials · 23 Pressure check · 18 Programmed masses mode · 23 Programmed mode · 9, 23, 26, 32 R RAM Dump · 14 Reboot · 17 Reboot commands · 36 Repeat count · 13, 25, 33 RepeatCnt · 26, 33 RFMon · 24 RFMon Avg · 25 Robin scanning · 25 Round mode · 9 Round robin · 13 Round robin mode · 25 Round robin subscan tables · 23 S Scan mode · 25, 33 Scan modes · 23 Select word · 23 Select Word · 22, 24 Select words · 25 SeqGen · 16 Sequencing · 21 Serial number · 36 Source modes · 25 Spacecraft messages · 37 Standby · 9, 13, 18 Standby mode · 12, 17, 29 Subscan table · 23 Subscan tables · 23 T Telemetry · 15 Testbed configuration · 6, 8 TGO Boot · 14 Thermal mode · 9 TM · 15 Totals · 22, 25 V Vac & Vdc, in Standby mode · 17 Valve command · 13 vArgs, in commands · 16 vBank, in {EEPROMI} · 38 vChecksum, in stored commands · 17 vData, in stored commands · 17 vLastSS() · 26 vLength, in patches · 38 vOpCode · 17 vOpCode, in stored commands · 17 vRepeatCnt() · 26 vTCOverflow · 39 vTimeTag · 16 1 The ranges shown represent (2.5% around nominal frequency. GSFC/NGIMS-FSW-014 (UG/SOM) (preliminary) Page 49