
\documentclass[11pt]{article}

\usepackage{lscape}
\usepackage{xcolor}
\usepackage{hyperref}

\topmargin -0.75truein
\oddsidemargin -0.4truein
\textheight 9.25truein
\textwidth 6.7truein
\hbadness=10001
\hfuzz=200pt


\begin{document}
\newcommand{\be}{\begin{enumerate}}
\newcommand{\ee}{\end{enumerate}}
\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
\newcommand{\bt}{\begin{tabbing}}
\newcommand{\et}{\end{tabbing}}
\newcommand{\eg}{{\it e.g.~}}
\newcommand{\ie}{{\it i.e.~}}
\newcommand{\ul}{\underline}
\newcommand{\axaf}{{\em AXAF}}
\def\la{\hbox{\rlap{$<$}\lower0.5ex\hbox{$\sim$}\ }}

\large
%\vspace*{-0.5in}
\centerline {\bf 4.35\_\textcolor{black}{V2.0} Flight Software Standard Patch H Optional Patch K}
		 
\vspace{0.25in}

\normalsize
\noindent{\it Last Revised: \today} \\
\noindent{\bf Filename: sw\_stdhoptk} \\

\noindent {\bf BRIEF FUNCTIONAL DESCRIPTION:} \\
\normalsize

This procedure loads the standard H patches and six optional K patches.
The changes from sw\_stdhoptj consist of one updated optional patch.
The text that describes the changes in the optional patch in this procedure
follows below the italic note: \\

{\it  The set of standard release H patches is loaded into a
common address space so that each optional patch can 
be loaded independently of the others, provided the load order defined
in the patch combination certification is maintained.

The eventhist patch requires that smtimedlookup is also loaded. 

 The ACIS Flight SW team recommends that the optional patches be loaded
together with the standard patches; therefore this procedure first
removes any patches which may have been installed and then proceeds to
load the standard patches followed by the optional patches.

This procedure loads
``standard Rev. H'' and 
``optional Rev. K''.  Refer to the release notes for standard patches,
optional patches, and patch combination certification (see references 
below). \\}
 
%The {\it txings} radiation safing algorithms in the \textit{txings} patch have been modified extensively in revision B to improve ACIS sensitivity to solar activity.  The new patch executes three separate algorithms apiece for FI and BI chips; these algorithms have been calibrated to identify and autonomously trigger on, respectively, dangerous ascending radiation levels, descending (elevated) radiation levels, and ``giant'' absolute radiation levels.  The prior \textit{txings} patch only searched for ascending radiation events.\\

%\\

%The optional patch load includes updates the {\em txings} software to Revision C, which contains improvements to the radiation monitoring algorithm.\\
This optional patch load updates the {\em txings} software to Revision C, which includes the computation of  the framestore exposure time, principally affecting CCDs that are commanded to flush their image arrays in order to achieve shorter exposure times. Revision C performs a more precise estimate of ACIS exposure times and flux rates, including all possible ACIS observing modes.\\

{\bf This procedure will change the flight software version from 60 to
version 61. Ground software should be changed to reflect the version
change once this procedure is executed.} \\
 
The FOT should implement the loading of the patches (steps 3.1 through 
step 10.1) as eight realtime command loads in order to maximize the uplink
efficiency.  The command system should be configured with a blocking
factor of 90 and a minimum time delay of 3~s.\\

The following procedure loads the Standard H and smtimedlookup / cc3x3 / 
eventhist / compressall / txings / deahktrip optional set of patches into the ACIS
instrument, as well as the new version number patch, and dumps the load to the ground for verification. It then
executes a warm boot and loads and starts DEA housekeeping. \\


This procedure implements the following basic operations:
\be
\item 
Confirm the current state of ACIS by verifying BEP HW and SW LEDs
\item
Reset the contents of the patch list to remove any existing patches,
dump the contents of the patch list to verify that the list is empty
\item
Load the ``standard Rev. H'' patch load
\item 
Load the smtimedlookup patch (part of ``optional Rev. K'')
\item
Load the cc3x3 patch (part of ``optional Rev. K'')
\item
Load the eventhist patch (part of ``optional Rev. K'')
\item 
Load the compressall patch (part of the ``optional Rev. K'')
\item 
Load the txings patch (part of the ``optional Rev. K'')
\item
Load the deahktrip patch (part of the ``optional Rev. K'')
\item
Load the patch load version number (61)
\item
Dump the contents of the patch list to verify the load
\item
Warm boot the BEP to activate the new load and verify proper BEP boot
\item 
Start the DEA housekeeping and verify proper reporting
\ee


Refer to ECO 36-1066 for the contents and review status of the patch load, and to ECO 36-1067 for the certified
combinations of optional patches.  The ECO's for each new or updated standard patch are:
ECO 36-1065 ({\em txings}).\\


The telemetry verifiers for the procedure will be:
\be
\item
ACIS Ops will confirm the current status of the BEP
\item
A command echo for the reset patch list command
\item
A command echo for the 1st dumpPatchlist command
\item
A single bepReadReply packet for the 1st empty dump
\item
A series of command echoes for the addPatch commands. The SOT will
verify that each Result field of each commandEcho packet has a value
of 1. 
\item
A command echo for the dumpPatchlist command
\item
A series of bepReadReply packets for the dump command
\item
A comparison of the dumped patchlist to expected values.
\item
A bepStartupMessage packet with a modified ``version = 61'' field plus several other bepStartupMessage packet fields.
\item
A verification that DEA housekeeping is being reported.
\item
ACIS flight software personnel will review the contents of the 
patchlist dump while the procedure is running. \\
\ee

\vspace{0.15in}
\normalsize
\noindent {\bf ASSUMED INSTRUMENT STATE:} \\
\normalsize
This assumes that DPA-A and/or DPA-B is on and the flight SW is running on either BEP-A or BEP-B. \\


%\vspace{0.25in}
\normalsize
\noindent {\bf SPECIAL INITIAL CONDITIONS:} \\
\normalsize
The OCC command system must be configured with ``Minimum Time Delay" of
3~s and a ``Blocking Factor'' of 90.\\
Spacecraft telemetry should be in Format 2 when the patches are loaded
in order to ensure that all command verifiers can be included in the
telemetry stream.\\

%\newpage 

%\vspace{0.25in}
\normalsize
\noindent {\bf OPERATIONAL CONSTRAINTS/CAUTIONS:} \\
\normalsize

In order to avoid truncating a dump, each dumpPatchlist command must be followed by at least a 30 second delay. 

The warmboot will set the parameters of the {\it txings} patch to their defaults.  Immediately upon completion of this SOP, the optimal parameters should be uploaded via a CAP.

As each patch is uploaded, 1STAT7ST will switch from 0 to 1 and then back to 0 as the BEP input FIFO is filled and then cleared. Some versions of PMON will show 1STAT7ST=1 in red, and some software may send alerts.  It is best to wait for 1STAT7ST to go back to zero between steps.  If it does not clear after a reasonable period, see the contingency plans for how to clear a stuck FIFO.

Note that very small uploads like the flight software version number update may clear sufficiently fast that FIFO-full status might not be seen.  If in doubt and there is sufficient time, waiting for one or two software houskeeping cycles (64s interval) between steps is advised but not required. 


\vspace{0.15in}
\normalsize
\noindent {\bf CONTINGENCY PLANS:} \\
In case of a problem that may arise during the procedure, the
following contingencies may be followed:
\be
\item
If there is a failure to confirm a telemetry verifier, ACIS flight
software personnel will visually determine, via bi-levels, if the 
ACIS FIFO needs to
be cleared (1STAT7ST = 1, FIFO Not Empty).  If it does, the FIFO will be cleared via step 14.  
If the FIFO does not need to be cleared, ACIS Ops
has the discretion to restart the procedure at step 2, or to continue on
from this point. \\

Should the FIFO clear procedure be executed and is successful, the
ACIS operator will observe the following responses. First, in PMON,
the operator will see the correct command echo from the stuck command. Next,
also in PMON, the ``Serial Command" column will show ``UNUSED'', and the
``Result Code" column will show ``NO\_HANDLER''.  Lastly, the bilevels
will return to their nominal values. 1STAT7ST  will read 0 indicating
FIFO Empty, and 1STAT6ST will read 1, indicating FIFO Not Full. \\

If the FIFO does not need to be cleared and the problem cannot be
determined, a full ACIS system dump will be executed, using
SOP\_ACIS\_FSW\_DUMP to obtain the ACIS diagnostic information. The
patchlist will be cleared, if necessary, and the present version of
software will continue to run. Should ACIS reboot, however, it will 
revert to Version 11 of the ACIS software.


\item
If there is a failure to confirm the patch list dump (step 11), first
repeat step 11, dumping the 
patch list, to confirm that there wasn't a downlink corruption. If the
list is confirmed, continue to step 12, otherwise, restart
from step 2 and reload the patches. If SOT cannot confirm telemetry 
verifiers for reasons other than telemetry corruption, run 
SOP\_ACIS\_FSW\_DUMP (SOT Procedure 1.10\_V2.2, sw\_dump) to obtain ACIS diagnostic information and then run SOP\_ACIS\_SW\_STDHOPTJ to reload version 60 patches (SOT Procedure 4.34\_V2.1,
sw\_stdhoptj).   
\item 
If the warm boot of the BEP fails (step 12), retry the reboot (step
12). If this continues to fail, run SOP\_ACIS\_FSW\_DUMP to dump additional information for
diagnostic purposes (SOT Procedure 1.10\_V2.2, sw\_dump) and SOP\_ACIS\_SW\_STDHOPTJ to reload version 60 patches (SOT Procedure 4.34\_V2.1, sw\_stdhoptj).  
\item
If there is a comm loss during the procedure, request a new comm. The
time at which the new comm is needed depends on the point of loss of
signal. The only vulnerability would occur if comm was dropped 
before the complete patch set was loaded (completion of step 10). If
the BEP then rebooted spontaneously, it would return to version 11
flight software.
\ee

\vspace{0.15in}
\normalsize
\noindent {\bf REFERENCES:} \\
\normalsize
\vspace{-0.15in}
\be
\item MIT 36-58010 Rev H (ECO 36-1066)  Flight Software Standard Patch Release H.\\
  \url{https://acisweb.mit.edu/axaf/eco/eco-1066.pdf}
\item MIT 36-58020 Rev K (ECO 36-1066)  Flight Software Optional Patch Release K.\\
  \url{https://acisweb.mit.edu/axaf/eco/eco-1066.pdf}  
\item MIT 36-58021.04 Rev L (ECO 36-1067)  Flight Software Patch Release H-K-L Certification.\\
  \url{https://acisweb.mit.edu/axaf/eco/eco-1067.pdf}
\item MIT 36-58030.33 Rev C (ECO 36-1065) {\it txings} Flight Software Optional Patch Release C (to report high background radiation levels).\\
  \url{https://acisweb.mit.edu/axaf/eco/eco-1065.pdf}
\ee



\normalsize
\noindent {\bf CHANGE HISTORY:} \\
\normalsize

{\bf V0.1}
\begin{itemize}
\item Initial version revised from 4.34\_V2.1 Flight
Software Standard Patch H Optional Patch J.
\end{itemize}


{\bf V1.0}
\begin{itemize}
\item First pass-through of reviews complete; ready to send to full ACIS team.
\end{itemize}

{\bf V2.0}
\begin{itemize}
\item Text edits after team review and update to the patch-dump reference file.
\end{itemize}

%{\bf V2.1}
%\begin{itemize}
%\item One final text edit.
%\end{itemize}

\newpage
\vskip 3.0in

This page intentionally left blank
\vskip 3.0in

\newpage

\newcommand{\tablecaptiontext}{ACIS Flight Software Standard Patch H Optional Patch K  }


\input{sw_stdhoptk.tab}

\end{document}




