The DPU receives and processes CCSDS telecommand packets containing one
or more commands. Each telecommand packet can be up to 2560 bytes
long. The packet consists of a CCSDS header and data; the data is
composed of commands. The DPU does not wait for the entire telecommand
packet to arrive before dispatching commands within the packet.
| Name | Length (bits) | Value (binary) | Description |
|---|---|---|---|
| Version | 3 | 000 | Designates a source packet |
| Type | 1 | 1 | Designates a telecommand packet |
| Secondary? | 1 | 0 | No secondary header is present |
| Application Process ID | 11 | 101 1000 0000 110 0000 0000 | CFI CRISP |
| Grouping | 2 | 11 = None | Grouping flags |
| Sequence Count | 14 |   | Unused |
| Length | 16 | 0 - 2559 | Number of bytes in packet |
Most commands are executed as soon as they are received; exceptions are noted in the individual command descriptions. Each command is echoed after it is executed by the DPU. A command echo subpacket containing the opcode and some arguments along with a code summarizing the command's result is downlinked.
Sixty-four kbytes of DPU memory are reserved for the storage of macros. This memory is initialized with default macros stored with the flight software. A macro can be any length as long as the total length of all the macros fit in the memory. Up to 256 macros may be defined; each macro is identified by a small integer, 0 - 255.
Each command has a "macro" bit. The command handler can be commanded into a "learning" mode to define a macro. If a command arrives with the macro bit set when the command handler is in learning mode, the command is echoed, but not executed; instead the command is added to the macro currently being constructed. Any command that arrives without the macro bit set, will be handled as usual. When not in learn mode, a command that arrives with the macro bit set will be rejected. Later, when a macro is executed, its component commands will be executed and echoed.
Up to 64 macros can be running concurrently. If more than one macro has been commanded to run, one of them is run until completion or until a delay command is executed. Then the next runnable macro is run. At all times, new commands arriving from the C&DH system have priority over macros. Since all commands are executed as soon as they are received from the C&DH system, a macro run command and the macro's constituent commands will also be run immediately. However, the first macro command after a macro delay command will execute near the beginning of the one second 1553-bus major frame.
There are commands for running and stopping a macro. There are also special commands for adding delays to a macro; these can be used only within a macro. One macro can call another or can execute loops. Both calls and loops can be nested. Loop nesting depth is traded with macro nesting depth; each running macro context has a 32 element stack. Each macro call uses two elements; each loop uses three elements.
Several default macros are available as soon as the DPU is started. Most of these macros are one or two commands long and are used by the monitoring subsystem to respond to out of limit conditions. A default macro can be replaced with a new macro via CXX_MAC_DEF and CXX_MAC_ENDDEF.
All commands start with a 16-bit opcode, the macro bit, and a 15-bit
length and conclude with a 32-bit checksum that is the XOR of the
entire command. Opcodes are defined to have odd parity so that two
bit-flips are needed to transform a valid opcode into another valid
opcode. The length field contains the length of the entire command,
including the checksum, in 32-bit words. All commands are consequently
multiples of 32 bits long. Following the length field are the
arguments. Most arguments are a single byte; larger arguments are
spread over multiple bytes with the most significant byte first. The
last argument may be followed by zero-fill padding to force alignment
of the checksum to a 32-bit boundary. The largest command,
CXX_MEM_LOAD,
determines the largest length field value.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | Unsigned integer | Opcode |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 - 36 | Command length in 32-bit words |
| Argument 1 | 1-32 |   | First argument |
| Argument 2 | 1-32 |   | Second argument |
| ... |   |   | Remaining arguments |
| Pad | 0-31 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
The CRISP and CFI common commands are defined below. Generic mnemonics are shown. For every command shown, there is a corresponding CRISP command and CFI command, e.g. CRS_CMD_NULL and CFI_CMD_NULL, etc.
Clear selected command counter.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0001 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Counter | 8 | 0 = Commands executed 1 = Commands rejected 2 = Macro commands executed 3 = Macro commands rejected 255 = All | Counter to clear |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Do nothing. Useful for testing command uplink and command
echo
downlink.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0002 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Process the arguments as a command. Note: the wrapped command will be
echoed,
not the
CXX_CMD_WRAP
command.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0004 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 - 36 | Command length in 32-bit words |
| Opcode | 16 | Unsigned integer | Command opcode |
| Arguments | M * 8 |   | Arguments |
| Pad | N * 8 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Start defining the identified
macro.
All subsequent commands, which
have their macro bit set, will be added to the macro; commands without
the bit set, will be executed as usual. Macro definition continues
until a
CXX_MAC_ENDDEF
command is seen;
CXX_MAC_ENDDEF
must not have its
macro bit set to end the definition. The macro cannot be run until the
definition is complete. If a macro with the same id already exists,
the new macro will replace the old when the
CXX_MAC_ENDDEF
is received.
The command will be rejected if the id is invalid.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0007 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Macro Id | 8 | 0 - 255 | Macro id |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Delay macro execution. When a macro executes this command, it will
stop for the given number of seconds. This command will be rejected if
used outside of a macro definition.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0008 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Delay | 16 | Unsigned integer | Delay (in seconds) |
| Pad | 16 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Terminate macro execution. If this is a nested macro, resume the
calling macro. This command will be rejected if used outside of a
macro definition. Note: the user never need to use this command
explicitly; see
CXX_MAC_ENDDEF
below.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x000b |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Terminate macro definition. Add an
CXX_MAC_END
command to the macro
being defined and end the definition. This command will be rejected if
no macro is being defined.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x000d |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Stop the identified macro. This command will be rejected if the id is
invalid, if the identified macro is undefined, or it is not running.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x000e |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Macro Id | 8 | 0 - 255 | Macro id |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Start a loop with the given number of iterations.
CXX_MAC_LOOP_END
decrements the loop index. If it is non-zero, the next command to be
executed will be the one after the
CXX_MAC_LOOP_BEGIN.
If it is zero,
the next command will be the one after the
CXX_MAC_LOOP_END.
This command will be rejected if used outside of a macro definition.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x002f |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Iterations | 16 | Unsigned integer | Loop iterations |
| Pad | 16 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Mark the end of a macro loop (see
CXX_MAC_LOOP_BEGIN).
This command
will be rejected if used outside of a macro definition.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0031 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Run the identified macro. The macro that contains the
CXX_MAC_NEST
command is suspended until the new macro completes. This command will
be rejected if the id is invalid or if the identified macro is
undefined. This command will also be rejected if used outside of a
macro definition.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0010 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Macro Id | 8 | 0 - 255 | Macro id |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Pause macro execution. When a macro executes this command, the macro
will pause until the actual MET is greater than or equal to the given
MET. This command will be rejected if used outside of a macro
definition.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0013 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Time | 32 | Unsigned integer | MET |
| Checksum | 32 |   | 32 bit XOR |
Restore the macros saved in EEPROM. All running macros are aborted.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0037 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Run the identified macro. This command will be rejected if the id is
invalid or if the identified macro is undefined.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0015 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Macro Id | 8 | 0 - 255 | Macro id |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Save all macros in EEPROM.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0038 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Verify macros. TBD.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x003b |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | TBD | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Calculate the checksum of up to 65535 bytes of memory at the given
address. The checksum is the 16-bit two's complement sum of the memory
indicated. The results are
downlinked
in a
subpacket.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0016 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 4 | Command length in 32-bit words |
| Source | 32 | Unsigned integer | Source address |
| Byte Count | 16 | Unsigned integer | Number of bytes to check |
| Pad | 16 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Copy DPU memory from source to destination. The source or destination
can be either RAM or EEPROM. The result is undefined if the source and
destination regions overlap.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0019 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 5 | Command length in 32-bit words |
| Source | 32 | Unsigned integer | Source address |
| Destination | 32 | Unsigned integer | Destination address |
| Byte Count | 16 | Unsigned integer | Number of bytes to copy |
| Pad | 16 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Load memory to the DPU. The byte count determines how many load bytes
follow and may be up to 128 bytes. The padding after the data forces
the size of the load to be a multiple of 4 bytes; M+N is always a
multiple of 4.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x001a |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 4 - 36 | Command length in 32-bit words |
| Address | 32 | Unsigned integer | Starting address |
| Byte Count | 8 | 0 - 128 (M) | Number of bytes in data field |
| Spare | 24 |   |   |
| Data | M * 8 |   | Load data |
| Pad | N * 8 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Dump up to 65535 bytes of memory from given address.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x001c |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 4 | Command length in 32-bit words |
| Source | 32 | Unsigned integer | Source address |
| Byte Count | 16 | Unsigned integer | Number of bytes to dump |
| Pad | 16 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Abort the current memory dump.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x001f |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Run a program at the given address. The program must either execute
very quickly (so as not to hold up the command handler) or must take
over completely. If the program returns, there must be no net stack
effects.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0020 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Address | 32 | Unsigned integer | Program start address |
| Checksum | 32 |   | 32 bit XOR |
Load the data values into the identified data structure at the location
denoted by the offset. The byte count determines how many load bytes
follow and may be up to 128 bytes. The padding after the data forces
the size of the load to be a multiple of 4 bytes; M+N is always a
multiple of 4.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0023 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 4 - 35 | Command length in 32-bit words |
| Id | 8 | Imager specific | Id of data structure |
| Byte Count | 8 | 0 - 128 (M) | Number of bytes in data field |
| Offset | 16 | Unsigned integer | Byte offset into data structure |
| Data | M * 8 |   | Load data |
| Pad | N * 8 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Dump the identified data structure.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0025 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Id | 8 | Imager specific | Id of data structure |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Enable or disable
monitor
response. If enabled, a persistent
out-of-limits condition will cause a corresponding response
macro
to be executed.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0026 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Mode | 8 | 0 = Disable 1 = Enable | Enable/disable response |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Set the interval between
status
subpackets.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x0029 |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Interval | 8 | 1 - 255 (0 = Off) | Interval in seconds |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
If there is a partially filled
subpacket packet,
generate a
flush
subpacket so that the packet will be downlinked.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x002a |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 2 | Command length in 32-bit words |
| Checksum | 32 |   | 32 bit XOR |
Enable or disable automatic flushing of partially filled
subpacket packet.
If enabled, the DPU will try to send a subpacket packet every
second, even if the packet has not been completely filled. This is
most useful during ground testing since it gives low-latency feedback
of command
echoes,
etc.
| Name | Length (bits) | Value | Description |
|---|---|---|---|
| Opcode | 16 | 0x002c |   |
| Macro? | 1 | 0 = Execute 1 = Append to macro | Macro load bit |
| Length | 15 | 3 | Command length in 32-bit words |
| Mode | 8 | 0 = Disable 1 = Enable | Enable/disable automatic flush |
| Pad | 24 | 0 | Pad up to 32-bit boundary |
| Checksum | 32 |   | 32 bit XOR |
Return to Common Software User's Guide.
Report problems to John Hayes.