GSFC/NGIMS-FSW-05 CONTOUR/NGIMS COMMANDING M Paulkovich November 9, 2001 rev 4.3 DOCUMENT CHANGE HISTORY Version Date Change 3.7 24 Oct 01 First CM version. Change LastSS on RASP graphic to show 7 bits, not 8 3.8 26 Oct 01 Specify DAC data formats 3.9 29 Oct 01 Fix #bits in Data word for DACs in Table 1 4.0 31 Oct 01 Add data ranges for all multi-bit fields 4.1 1 Nov 01 Add new Adaptive commands 4.2 6 Nov 01 Corrections & additions to Adaptive commands 4.3 9 Nov 01 Clarification on Boolean arguments; change "Op" where applicable to more meaningful name; clarifications (and re-naming) for Alt Boot; add Index at end. GSFC/NGIMS-FSW-05 CONTOUR/NGIMS COMMANDING M Paulkovich 1 INTRODUCTION This memo summarizes the approach for CONTOUR/NGIMS commanding, and will form the basis for the SIS-2 (level-2 Software Interface Specification). This encompasses both Stored Commands and Telecommands. STORED COMMANDS are contained in a SeqGen script onboard the S/C C&DH, triggered by MET (Mission Elapsed Time). Stored Commands allow Scan Control and Mechanism Control (valves, DCONs, etc.). TELECOMMANDS are sent by GSE, normally for such things as Tuning Adjustments, Memory Loads (patches), Memory Dumps, and Engineering Commands. All Stored Commands also have a Telecommand counterpart and thus, Telecommands also allow Scan Control and Mechanism Control. References (1) GSFC/NGIMS-FSW-27, "Alternate Boot Method for Contour/NGIMS" Nomenclature We must distinguish between "scanning sequences" and "stored command sequences" (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. Note that telemetry is also grouped per Subscan. Scan Mode - One of the five round-robin modes: OS, CS, IM, PM, SS; or a sixth, Flat Mode; or the zeroeth (Standby). Adaptive note: three new modes, add when upgrade is approved. Scan - Complete traversal through one Scan Mode up to the commanded Last Subscan (qv). Pass - One Round-Robin traversal through the Scan Modes. Last Subscan - A commandable parameter to limit the number of Subscans in a Scan Mode. SCP (Stored Command Processor) - the S/C C&DH software that distributes commands. Telecommand (TC) - Command from ground to the instrument. Script - A file on the GSE (or S/C C&DH) which can contain both NGIMS TCs and other commands or macros (e.g., "wait" commands are GSE-only). The following flow diagram illustrates the relationship of commands to instrument operation. 2 Stored Commanding The S/C C&DH Stored Command Processor will be used to achieve autonomy for NGIMS. TBD: The NGIMS Stored Command Sequence must be executed relative to Tzero (Time of Closest Approach). How do the S/C mission controllers preprocess a NGIMS Stored Command Sequence to synchronize the C&DH time code (MET) with Tzero once actual time of closest approach is known (presumably a few days before encounter)? An example of a section of a NGIMS Stored Command Sequence is shown below. Command Tzero Time MET Comments Valve 0, 1 -11:00:00 0310_0001 Open valve 0 SetRepeat 1, 2 -11:00:01 0310_0002 Set repeat count to 2 for Scan Mode #1 (OS) Valve 0, 0 -11:00:02 0310_0003 Close valve 0 SetRepeat 1, 4 -11:00:03 0310_0004 Set repeat count to 4 for Scan Mode #1 (OS) . . . . . . . . . . . . Example Stored Command Sequence 3 Command Dictionary The following table delineates the list of telecommands and which must be available as SC, TC and both. The "Don't Care" symbol "(" in the SC column indicates that it doesn't matter for that type (thus left to the programmer). Command Mnemonic Parameters SC TC Description Programmed Mass Tbl MassTable SS, Table Y Y Select mass table Table for Subscan #SS for Scan Mode #4 (Programmed Masses) Set Repeat Count SetRepeat Mode, RepeatCnt Y Y For Scan Mode number Mode, set the subscan repeat count to RepeatCnt (0..127). Round Robin scanning Round n/a Y Y Begin Round Robin mode (end Flat mode) Robin-All-Setup-Params RASP RepeatCnt x5, Frac x5, FirstSS x5, LastSS x5 Set all control parameters for round-robin Blind Mode Blind On Y Y Turn TC Blind Mode on or off. After processing this command with On SET (Blind On), all other commands are ignored, although they are echoed and TC Counters are incremented. Flat Last Index# FlatLast Last Y Y Set last index# for Flat Scanning Flat First Index# FlatFirst First Y Y Set first index# for Flat Scanning and terminate Round Robin mode. Scan Mode Control Scan Mode, Frac, LastSS Y Y Allows control over Fractional and Last Subscan parameters for Scan Mode Mode. First Subscan Control ScanFirst FirstSS Y Y Allows control over First Subscan parameter for Scan Mode Mode. Apply Patches PatchApply n/a ( Y Apply patches in EEPROM to RAM Update Tables TableUpdate n/a ( Y Copy "Table Data" (AMB) in EEPROM to RAM 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. Valve (n) Open/Close Valve Vlv, Open Y Y Open/Close control for each valve Set/Clear DCON bit DCON Word, Bit, On/Off Y Y Set/Clear single DCON bit - control over filaments, low E, etc. Clear Latched Error bits ClearLatched n/a Y Y Clears all bits in Subsytem Fail Latched No-Op Nop Y Y No operation. InitMode InitMode n/a Y Y Commands instrument to Init Mode. TM On TmOn On Y Y Used to command FSW to transmit packetized telemetry when in Standby mode. Reset micro-sequencer ResetUseq n/a Y Y Re-initialize microsequencer. Compute EEPROM Checksums Checksum Chip, Updt Compute EEPROM Checksum for selected chip, store in RAM, optionally update EEPROM Checksum address. Standby Standby 0 | 1 ( Y Command the instrument to or from Standby mode RAM Dump RamDump StartAddr, Length ( Y Request contents of RAM memory area IORAM Dump IORamDump StartAddr, Length ( Y Request contents of IORAM memory area CMP (Patch) Load Patch StartAddr, Apply, Destination, Length, Patchno, Data N Y Load CMP (Computer Memory Patch). Destination bits specify RAM Patch, EEPROM Patch, or EEPROM Table. When the Patchno field =511, all patches are erased from EEPROM. EEPROM Init EEPROMI Bank N Y Initialize (erase) all of EEPROM in Bank (1 or 2) EEPROM Dump EEPROMDump StartAddr, Length ( Y Request contents of EEPROM memory area Reboot Reboot n/a ( Y Reboot via jump to zero (not recommended) TGO Boot TgoBoot n/a ( Y Cool reboot by TGO timer expiration and HW reset Memory Block Copy MemCopy n/a ( Y Load RAM from specified section of EEPROM; optionally restart program. DAC Override Mode DACORide DAC, Op (On/Off) Y Y 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 Y Y Allow tuning of specified D/A. Only honored for specified DAC# (n) after DACORide On received for that DAC#. Adaptive Parameters AdaptParam Wide_Scan_Interval, Count_Sum_History, Count_Sum_TH, Skip_Limit, Search_Limit Set Adaptive Scanning algorithm parameters. Parameter list is array (3) for Ion, Closed, and Open. Adaptive Repeat AdaptRepeat Closed_Count, Open_Count, Ion_Count Set repeat count on the 3 Adaptive Scan modes. Levels of Reboot. The term "Cold Boot" refers to a condition where the micro-processor is brought on-line from a power-off state. In a "TGO Boot" operation, the micro-processor is re-started by assertion of an external reset (hardware) signal, caused by expiration of the internal watchdog ("TGO") timer. In a "Cool Boot" operation, the micro-processor is re-started by from PROM and jumping (setting the Instruction Counter register) to the 1750 initial vector address, 0000h, with a special flag set to indicate that this was not an anomalous jump to zero. 4 GSE Considerations 4.1 Remote Control. It will be advantageous to include simple TCP/IP connections to the GSE for the sake of flexibility. Moreover, this allows certain types of enhancements to be added by GSFC (by means of secondary GSE nodes) without requiring GSE software modification by SPRL. Thus it is suggested that a small feature be incorporated into the GSE to allow control via another node. This can be as simple as designating a TCP/IP port that the GSE monitors for Telecommands. This would allow great flexibility, in that another node (e.g. Lab software) could be used to control the Instrument in the GSE configuration. 4.2 Remote Data Reduction. It is also suggested that a small feature be incorporated into the GSE wherein all TM is echoed to a port (socket or IP) which is easily configurable via the GSE interface. This will facilitate customization of special software tools to display and filter TM during test and calibration. 4.3 Special TM File/Display. In Cassini, we assigned 8 bits to a "Serial Number" which was used to identify TCs. For CONTOUR, 16 bits have been assigned. We should consider using a couple of bits in the Serial Number as a flag to the GSE to route TM data to special displays. For instance: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Destination Serial Number 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. 4.4 Voltage Scans. With Cassini/INMS, voltage scans were performed by changing the DAC data on an IP-by-IP basis. The current NGIMS scheme doesn't allow complete IP by IP control of DACs for special cases like voltage scans. But via TC scripts, DACs can be scanned at an acceptable rate (less than one second per step). This is done using the DAC Override and DAC commands. Using TC scripts along with the Destination bits proposed in 4.3 above, the important end result of voltage scans (commanded via the scripts) -- the TM -- can be displayed in special windows without being cluttered with data from "unimportant" IPs where the data was not changing. 4.5 Programmed Mass Control. A sort of "macro" command, {SetPM} would provide a user-friendly interface to the {MassTable} command. Arguments are MaxSS (the number of subscan tables in Scan Mode 4), followed by table numbers a, b, c, etc.; the number of table number arguments (a, b, c,...) must be equal to MaxSS. For instance: SetPM 3, a, b, c would generate: MassTable 1, a MassTable 2, b MassTable 3, c SetRepeat 4, 3 4.7 Mnemonics The mnemonics defined here (with the exception of Start, Pause, Unpause and Rewind) have unique Op Codes. It will be useful for the GSE to provide more mnemonics (in effect, "macros"), such as: Macro Command Operation PriFilOS [ 1 | 2 ] DAC n, n, n Rupture Valve 1, close Unrupture Valve 1, open Valve0 [operation] Valve 0, [operation] There could also be a point-and-click TC menu in addition to a mnemonic-based menu. APPENDIX I COMMAND FORMATS 1. Op Codes and Argument Lengths 1.1 Standard Commands. Table 1 lists the required length of arguments for all commands, with a Total column for SCs only. It is desirable to keep Stored Commands a constant length, and maintain the same header format for commands that are both TCs and SCs. Commands with Boolean (one bit) arguments always require 1 in the bit to perform the action indicated by the argument name; e.g., if the argument is called "Open" then 1 would open, 0 would close. Table 2 assigns OpCodes for each command. Table 1 - Command Argument Lengths Tot for SCs only Mnemonic Parameters Arg #bits Tot LSB & units MassTable SS, Table SS - 5 bits Table - 8 bits 15 SS - 1 n.u. Table - 1 n.u. (allows 256 mass/config tables) SetRepeat Mode, RepeatCnt Mode - 3 bits RepeatCnt - 7 bits 11 Mode - 1 n.u. RepeatCnt - 0..127 Round n/a n/a 0 n/a Blind On 1 1 n/a FlatLast Last Last - 12 12 Last index# for flat scanning FlatFirst First First - 12 12 First index# for flat scanning Scan Mode, Frac, LastSS Mode - 3 bits Frac - 1 bit LastSS - 7 bits 11 Mode - 0..5 n.u. Frac - n/a (boolean) LastSS - Last Subscan#, 0..127 ScanFirst Mode, FirstSS Mode - 3 bits FirstSS - 7 bits 10 Mode - 1..4 n.u. FirstSS - Last Subscan#, 0..127 RASP RepeatCnt x5, Frac x5, FirstSS x5, LastSS x5 RepeatCnt - 7 bits x5 Frac - 1 bit x5 FirstSS - 7 bits x5 LastSS - 7 bits Use same format for arguments in other Scan control commands PatchApply n/a n/a 0 Apply all patches in EEPROM to RAM TableUpdate n/a n/a 0 Copy all EEPROM tables to RAM NVSafe On 1 1 Valve Vlv, Open/Close Vlv - 3 bits? Open/Close - 1 bit 4 n/a (boolean) DCON Word, Bit, On/Off Word - 1 bit Bit - 4 bits Open/Close - 1 bit 6 ClearLatched n/a n/a 0 Nop ID 16 ID - 16 bits, not processed by FSW but echoed in TM InitMode n/a n/a 0 n/a TmOn Op 1 1 n/a ResetUseq n/a n/a 0 n/a Checksums Chip, Update 2 2 RamDump StartAddr, Length Start Address - 16 bits Length - 5 bits Start Address - n.u. Length - n.u. Note issue on length: should be equal to or less than #IPs/Subscan IORamDump StartAddr, Length Start Address - 16 bits Length - 5 bits Start Address - n.u. Length - n.u. Patch StartAddr, Apply, Destination, Length, Patchno, Data Start Address - 16 bits Apply - 2 bits Destination - 2 bits Length - 5 bits Patchno - 16 bits Data - 16 bits each Start Address - n.u. Length - n.u Data - n.u. Destination- n.u. Note: Contour limit for TCs is 64 words incl. CCSDS hdr. EEPROMI Bank Bank - 1 Bank - n.u. EEPROMDump Bank, StartAddr, Length Bank - 1 Start Address - 16 bits Length - 5 bits Bank - n.u. Start Address - n.u. Length - n.u. Reboot n/a n/a TgoBoot n/a n/a MemCopy n/a n/a Standby 0 | 1 n/a 1 Op DACORide DAC, On/Off DAC - 5 bits On/Off - 1 bit 6 DAC - 1 n.u. On/Off - n/a (boolean) DAC1 Data Data - 16 bits 16 16 bits max DAC2 Data Data - 16 bits 16 16 bits max DAC3 Data Data - 16 bits 16 16 bits max DAC4 Data Data - 8 bits 8 8 bits max DAC5 Data Data - 8 bits 8 8 bits max DAC6 Data Data - 8 bits 8 8 bits max DAC7 Data Data - 8 bits 8 8 bits max DAC8 Data Data - 8 bits 8 8 bits max DAC9 Data Data - 8 bits 8 8 bits max DAC10 Data Data - 4 bits 4 4 bits max DAC11 Data Data - 4 bits 4 4 bits max DAC12 Data Data - 4 bits 4 4 bits max DAC13 Data Data - 4 bits 4 4 bits max DAC14 Data Data - 12 bits 12 12 bits max DAC15 Data Data - 12 bits 12 12 bits max DAC16 Data Data - 12 bits 12 12 bits max DAC17 Data Data - 12 bits 12 12 bits max DAC18 Data Data - 12 bits 12 12 bits max DAC19 Data Data - 12 bits 12 12 bits max DAC20 Data Data - 12 bits 12 12 bits max DAC21 Data Data - 12 bits 12 12 bits max DAC22 Data Data - 12 bits 12 12 bits max DAC23 Data Data - 12 bits 12 12 bits max DAC24 Data Data - 12 bits 12 12 bits max DAC25 Data Data - 12 bits 12 12 bits max DAC26 Data Data - 12 bits 12 12 bits max DAC27 Data Data - 12 bits 12 12 bits max DAC28 Data Data - 12 bits 12 12 bits max DAC29 Data Data - 12 bits 12 12 bits max AdaptParam TBS AdaptRepeat TBS Table 2 - Op Code Assignments Command OpCode Command OpCode spare 0 DAC13 32 MassTable 1 DAC14 33 SetRepeat 2 DAC15 34 Round 3 DAC16 35 Blind 4 DAC17 36 FlatLast 5 DAC18 37 FlatFirst 6 DAC19 38 Scan 7 DAC20 39 PatchApply 8 DAC21 40 TableUpdate 9 DAC22 41 NVSafe 10 DAC23 42 Valve 11 DAC24 43 Dcon 12 DAC25 44 ClearLatched 13 DAC26 45 Nop 14 DAC27 46 InitMode 15 DAC28 47 TmOn 16 DAC29 48 ResetUseq 17 DACORide 49 Checksums 18 ScanFirst 50 Standby 19 SCP_Control 51 DAC1 20 EOL 52 DAC2 21 RASP 53 DAC3 22 Patch 54 DAC4 23 EEPROMI 55 DAC5 24 EEPROMDump 56 DAC6 25 Reboot 57 DAC7 26 TgoBoot 58 DAC8 27 MemCopy 59 DAC9 28 spare 60 DAC10 29 RamDump 61 DAC11 30 AdaptParam 62 DAC12 31 AdaptRepeat 63 2. Stored Commands - General Format 2.1 Common Fields. The common fields for all commands (including TCs) will be: OpCode 6 bits Identifies the command Checksum 6 bits Used by FSW to validate command contents VC 1 bit "Validate Command" - see §3.2 SC 1 bit Stored Command. Set = 1 for SCs, = 0 for TCs. 2.1.1 Op Codes have been rather arbitrarily assigned in Table 1 above. Six bits is adequate for an acceptable margin of spares for the OpCode field. No consideration for hamming distance has been given since there is another error detection mechanism (checksum). From Table 1 we see the biggest argument for Stored Commands is ~15 bits. Including the Header we can use constant length Stored Commands of two words (plus time tag). 2.1.2 Stored Command Time Tags. Stored Commands will consist of 2 words plus the Time Tag. Time Tag format is left to the S/C Project to design. Figure 2-1 Stored Command Format 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp CV OpCode Data Word (TimeTag) VC =Validate Command 3. Telecommands - General Format 3.1 Telecommands will use common fields as identified above in §2.1. The differences between Stored Command and Telecommands are: TCs need no Time Tag TCs have variable length Data segments TCs have Serial Numbers ("SN"), and ID which is reflected in TM, used to assist data analysis. The general format for Telecommands will thus be: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum CV sp OpCode Data Word 1 Data Words 2+ (number of words dependent upon OpCode & Data Word 1 SN VC =Validate Command CV = Command Valid See also 5.3 regarding the SN for "Special TM File/Display." The complete CCSDS TC has the form: Header 1 Application/Process ID, PSHF, Type, Version Header 2 Grouping, Sequence Count Header 3 Length Data NGIMS Command 3.2 There is a special case for "Non-Validated Commands" (Ground Test) - the VC bit (Validate Command). When FSW validates command, command is valid if if S/C Mode = Ground, Checksum = 0 and VC = 0 (no checksum computation required). Otherwise, VC must always be SET (Flight) and checksums are compared. This feature allows manual creation of TCs with no software tool. 4. Itemized Command Formats Formats for commands are proposed below. For convenience of implementation and testing, it is possible to allocate some fields at byte boundaries, and also to expand them to more than the minimum bits. All command formats will eventually be defined in the SIS-2 (level-2 Software Interface Specification). Note that the Application/Process ID in the CCSDS header has 128 values for NGIMS (480..4FF) which applies to both TC and TM. Therefore we have many spare slots for commands. (The OpCode scheme was developed before the Project informed NGIMS there would be so many Application/Process IDs assigned to NGIMS.) For TCs: Application/Process ID value 480 is used for all NGIMS TCs. For TM: Application/Process ID value 480 is used for Science TM packets. Application/Process ID value 481 is used for Dump TM packets. Application/Process ID value 482 is used for Cmd Acknowledge packets. MassTable (Op 1) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 0 0 1 SS Table SN Data Ranges: Parameter Range Table 0 .. 255 SetRepeat (Op 2) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 0 1 0 sp Mode sp RepeatCnt SN Data Ranges: Parameter Range Mode 0 .. 5 RepeatCnt 0..127 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 Future Adaptive modes 8 Future Adaptive modes 9 Future Adaptive modes Scan Modes 1-5 are used in Round Robin scanning (see §3.2), and mode 6 is Flat scanning mode. For this command, obviously only mode numbers 1-5 are meaningful. Round (Op 3) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 0 1 1 spare SN Blind (Op 4) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 1 0 0 sp On SN FlatLast (Op 5) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 1 0 1 sp Last SN Data Ranges: Parameter Range Last 0 .. 2620 FlatFirst (Op 6) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 1 1 0 sp First SN Data Ranges: Parameter Range First 0 .. 2620 Scan (Op 7) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 0 1 1 1 Frac LastSS sp Mode SN Data Ranges: Parameter Range Mode 0 .. 5 LastSS 0 .. 127 PatchApply (Op 8) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 0 1 0 0 0 sp SN TableUpdate (Op 9) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN NVSafe (Op 10) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp On SN Valve (Op 11) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp Vlv sp Open SN DCON (Op 12) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp Word Signal On SN Data Ranges: Parameter Range Signal 0 .. 15 The Signal field essentially indicates the desired bit in the designate Word, where Signal=0 means the LSB. The formats for the 2 DCON words are: Signal DCON 1 Signal DCON 2 0 OS-LOW-EMIS\ 0 Valve 1 + (open) 1 OS_ADJB\ 1 Valve 1 - (close) 2 CS_LOW_EMIS\ 2 Valve 2 + (open) 3 CS_ADJB\ 3 Valve 2 - (close) 4 OS Fil 1 On 4 spare 5 OS Fil 2 On 5 spare 6 CS Fil 1 On 6 spare 7 CS Fil 2 On 7 spare 8 BA_On 8 CS-LOW-EMIS\ 9 BA_LO_EMIS 9 spare 10 EM1 Sel 10 spare 11 EM2 Sel 11 spare 12 spare 12 spare 13 spare 13 spare 14 spare 14 spare 15 spare 15 spare Note that the four Valve bits are normally controlled in a special timing sequence via the Valve command. ClearLatched (Op 13) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN Nop (Op 14) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp ID SN Data Ranges: Parameter Range ID 0 .. 65535 SN 0 .. 65535 InitMode (Op 15) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN TmOn (Op 16) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp Op SN ResetUseq (Op 17) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN Checksums (Op 18) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp sp sp sp Chip sp Updt SN This command computes the checksum for the specified EEPROM chip and stores the result in RAM (for subsequent DUMP) at address FFFB (chip 0) or FFFC (chip 1). Updt= 1 means update EEPROM with new checksum also (address FFFF in that EEPROM chip). Standby (Op 19) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp On SN DAC1 (Op 20) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp Data SN Formats for commands DAC2..DAC29 are similar (Op Codes 21..48). DAC Data Formats: DAC1: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Ion VDC DAC2: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Freq QB Freq Meaning 0 HF 1 MF 2 LF1 3 LF2 DAC3: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VAC DAC4 - DAC9: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 spare Data DAC 10 - 13: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 spare Data DAC 14 - 29: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 spare Data DACORide (Op 49) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp DAC sp On SN Data Ranges: Parameter Range DAC 1 .. 29 ScanFirst (Op 50) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp FirstSS sp Mode sp SN Data Ranges: Parameter Range Mode 0 .. 5 FirstSS 0 .. 127 (Op 51..52 = SCP control - spares) RASP (Op 53) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp sp RepeatCnt, OS Frac FirstSS, OS sp LastSS, OS sp sp RepeatCnt, CS Frac FirstSS, CS sp LastSS, CS sp sp RepeatCnt, IM Frac FirstSS, IM sp LastSS, IM sp sp RepeatCnt, PM Frac FirstSS, PM sp LastSS, PM SN "RASP" stands for "Round And Set Parameters" -- it combines the function of the RepeatCnt and Scan command, and encompasses all (non-Adaptive) Round Robin Scan Modes. Data Ranges: Parameter Range RepeatCnt 0 .. 127 FirstSS 0 .. 127 LastSS 0 .. 127 Patch (Op 54) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp StartAddr spare Apply Dest Length Patchno Data1 ... Data-n SN Data Ranges: Parameter Range (h) StartAddr 0 .. FFFF Length 1 .. 1F Dest 0 .. 3 Apply 0 .. 3 Patchno 0..FFFF Data 0..FFFF The Patch command allows modification of RAM and EEPROM. (Another tool providing this capability is the MemCopy command.) 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 = IORAM, RAM, EEPROM 1, EEPROM 2 Apply (deleted) Patchno Patch Number (optional, for use by GSE) Data The patch data (new memory contents) The Destination field indicates a physical device: 0 = IORAM (not yet implemented) 1 = RAM 2 = EEPROM Table, chip #0 3 = EEPROM Table, chip #1 Example Patch Commands using the NEGSE: ftc 54 0xFFFC 0x41 0 0xAB12 Load 1 word, EEPROM 0, address FFFC, data AB12 ftc 54 0x0B00 0x61 0 0x5A5A 0x1234 Load 2 words, EEPROM 1, address B00&B01, data 5a5a 1234 ftc 54 0x00C0 0x23 0 9 10 11 Load 3 words, RAM, address C0..C2, data 0009 000A 000B ftc 54 0x0200 0x01 0 0xAAAA Load 1 word, IORAM, address 200, data AAAA There is also an uploadable Patch Directory in "Table Copy" format (format re-used from the MAP spacecraft) in EEPROM#0. All patches in the EEPROM Patch Directory are applied to RAM immediately after program boot-up. The "Copy Table" format allows a form of run-compression that actually allows a complete 64KW NGIMS FSW Load Image to be stored in the ~51k Copy Table. It is then loaded via the Alt Boot method (See Ref (1) for details on Alt Boot.) 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) shall initialize Patch EEPROM: - set patch lengths to zero; - establish EEPROM checksums. Note: 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). EEPROMI (Op 55) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp sp Bank SN EEPROMDump (Op 56) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp 0 1 1 1 0 0 sp Bank StartAddr EndAddr SN Data Ranges: Parameter Range (h) StartAddr 0..FFFF EndAddr 0..FFFF Reboot (Op 57) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN This command should not be used - use TgoBoot instead. TgoBoot (Op 58) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp SN MemCopy (Op 59) (formerly "AltBoot") 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp EEPROM Start RAM Start Length sp Chip Rebt Chip - EEPROM Chip, 0 or 1 to load from; Rbt - Reboot (restart) After the memory transfer Data Ranges: Parameter Range (h) EEPROM Start 0..FFFF RAM Start 0..FFFF Length 0..FFFF Use of the Copy-Table Boot method essentially makes this command obsolete (see Ref (1) for details on Alt Boot). This command allows loading of the specified section of RAM from the specified section of EEPROM (from either EEPROM chip). If the Rebt flag is clear, the program continues running where it left off after the EEPROM to RAM memory transfer. If the flag is set, the program restarts from its application (Ada) starting address. RAMDump (Op 61) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp StartAddr EndAddr SN Data Ranges: Parameter Range (h) StartAddr 0..FFFF EndAddr 0..FFFF AdaptParam (Op 62) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp Wide_Scan_Interval sp Count_Sum_History Count_Sum_TH MSBs Count_Sum_TH LSBs Skip_Limit sp Search_Limit sp Wide_Scan_Interval sp Count_Sum_History Count_Sum_TH MSBs Count_Sum_TH LSBs Skip_Limit sp Search_Limit sp Wide_Scan_Interval sp Count_Sum_History Count_Sum_TH MSBs Count_Sum_TH LSBs Skip_Limit sp Search_Limit Data Ranges: Parameter Range Default Wide_Scan_Interval 1 .. 15 4 Count_Sum_History 1 .. 10 5 Count_Sum_TH 0 .. FFFF_FFFF 10 Skip_Limit 0 .. FF 10 Search_Limit 1 .. 15 7 Example Command: set same parameter values for all 3 modes - Set Wide_Scan_Interval = 6 Set Count_Sum_History = 7 Set Count_Sum_TH = 1_8000 Set Skip_Limit = 4 Set Search_Limit = 5 GSE COMMAND: ftc 62 0x0607 1 0x8000 0x0405 0x0607 1 0x8000 0x0405 0x0607 1 0x8000 0x0405 There are three Adaptive scan modes: Adaptive Closed, Adaptive Open, and Adaptive Ion. The adaptive algorithm performs "wide scans" (Bands) for each enabled mode (enabled means repeat count nonzero) and saves the data in a 10-deep FIFO history queue. Bands are always 15 AMU wide. When a band "wins" in the algorithm, a "narrow" (unity AMU) subscan of each of the 15 AMUs is performed. There is control over thresholds and the "fairness" (anti-starvation) rules. If a Skip_Count >= to a Skip_Limit, or a Count_Sum >= Count_Sum_TH, then the default scan (??) is performed. Otherwise, the algorithm looks for another band with counts greater than the threshold. If none is found, the default scan is performed?? Wide_Scan_Interval - The number of subscans in an adaptive "Interval" -- FSW performs Wide_Scan_Interval minus one "narrow" (1 AMU wide) subscans then one "wide" (Band) subscan. Count_Sum_History - Dictates how deep in the subscan history to look ... ? Count_Sum_TH - The Count threshold -- if Band counts are greater or equal ...? Skip_Limit - Number of times any band can be skipped before "starvation" algorithm ensures it is used ? A Skip_Count is maintained for each band, incrementing whenever a narrow subscan corresponding to that band is skipped. A Count_Sum is maintained for each band which ????? AdaptRepeat (Op 63) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VC sp Checksum sp sp sp Closed_Count sp Open_Count sp Ion_Count Data Ranges: Parameter Range (h) Closed_Count 0 .. FF Open_Count 0 .. FF Ion_Count 0 .. FF This allows setting of the "Repeat Count" for each of the 3 adaptive scan modes. Example Command: Set Closed_Count = 1 Set Open_Count = 2 Set Ion_Count = 3 GSE COMMAND: ftc 63 0x0102 3 INDEX 1 1750 initial vector address · 7 A Adaptive mode · 15 Adaptive scan modes · 24 Adaptive scanning · 23 AdaptParam command · 23 AdaptRepeat command · 24 Alt boot · 21, 23 AM · 15 Application/process ID · 14 Application/process IDs · 14 B BA control · 17 Blind command · 15 Boolean arguments · 9 C Checksum · 12 Checksums command · 18 ClearLatched command · 17 Closed source mode · 15 Cold Boot · 7 Command valid · 13 Cool Boot · 7 CS · 15 CV · See Command Valid D DAC commands · 19 DAC data formats · 19 DacORide command · 19 DCON assignments · 17 DCON command · 17 DCON formats · 17 Destination, in Patch · 21 E EEPROMDump command · 22 EEPROMI command · 21, 22 EM select control · 17 F Filament control · 17 Flat table mode · 15 FlatFirst command · 15 FlatLast command · 15 Freq · 19 FT · 15 I IM · 15 InitMode command · 18 Ion mode · 15 L Levels of reboot · 7 M MassTable command · 14 MemCopy command · 21, 22 MET · 5 N Nop command · 17 NVSafe command · 16 O Op code assignments · 11 OpCode · 12 Open source mode · 15 OS · 15 OS Bias control · 17 P Patch command · 20 PatchApplycommand · 16 PM · 15 Programmed masses mode · 15 R RAMDump command · 23 RASP command · 20 Reboot command · See TgoBoot command ResetUseq command · 18 Round command · 15 S SC · See Stored command Scan command · 16 Scan modes · 15 ScanFirst command · 20 Serial number · 13 SetRepeat command · 14 SN · See Serial number Standby command · 18 Stored command · 12 Stored command sequence · 5 Stored commands · 12 T TableUpdate command · 16 TGO Boot · 7 TgoBoot command · 22 Time tags · 12 TmOn command · 18 Tzero · 5 V Validate command · 12 Valve command · 16 Valve DCON bits · 17 vBank, in {EEPROMI} · 21 VC · See Validate command 1