Main Page Interface Data Structures File List Data Fields Globals
ISOMAX.h File Reference
ISOMAX Frame Sync Board Inteface Library.
More...
#include "ISOMAX/DPC104.h"
Detailed Description
ISOMAX Frame Sync Board Inteface Library.
The NASA/GSFC ISOMAX telemetry frame sync board provides simple command and telemetry services in a PC104 form factor board.
For use with the MV2x series VME boards, the ISOMAX frame sync board is mated with a Dynatem DPC104 VME-to-PC104 bus bridge board. The DPC104 card maps the ISOMAX register port addresses into the A16 VME address space. Also, the DPC104 board maps the ISOMAX interrupt levels onto VME interrupt vectors.
COMMANDS
The ISOMAX frame sync board is able to receive the 16-bit data command word from the NASA/NSBF CIP. The reception of a command strobe from the CIP generates an interrupt to vector ISOMAX_VEC_CMD. The 16-bit command word may then be read by calling ISOMAX_cmdRead(). The command buffer is only one deep, so available commands should be serviced promptly.
TELEMETRY
The ISOMAX frame sync board is able to provide a simple telemetry system. Each board is capable of either transmitting or receiving fixed sized telemetry frames 128 bytes in size (ISOMAX_FRAME_SIZE). The telemetry frames are sent as a serial stream encoded in either NRZ or BI-PHASE formats. The transmission bit rate is commandable if the board is configured in transmit mode. The receive side board must be provided with a bit rate clock to recover the serial data. The ISOMAX frame sync boards can operate at a bit rate up to 1 Mb (ISOMAX_MAX_RATE).
The ISOMAX frame sync board provides a 2 KB FIFO to buffer the telemetry data. The boards do minimal formatting on the data. The user must provide the frames pre-formatted on the transmit side. Each frame is viewed as an array of 64 16-bit words (ISOMAX_FRAME_WORDS):
-----------------------------------------
| Frame Sync Word = 0xeb90 (1 word) |
-----------------------------------------
| |
| |
| |
| |
| |
| |
| Frame Data Words |
| (62 words) |
| |
| |
| |
| |
| |
| |
-----------------------------------------
| Checksum Word (1 word) |
-----------------------------------------
Every telemetry frame must begin with one 16-bit word set to 0xeb90 (ISOMAX_SYNC_WORD). The next 62 (ISOMAX_DATA_WORDS) 16-bit words are user data which the ISOMAX boards ignore. Finally, every telemetry frame ends with a 16-bit checksum word.
If the ISOMAX frame sync board is configured as a transmitter, the the user must provide a series of 8 (ISOMAX_FIFO_FRAMES) for the ISOMAX_fifoWrite() function. The frames must be headed by a frame sync word and have the user data following. The ISOMAX_fifoWrite() will fill half of the telemetry FIFO. The ISOMAX frame sync board will generate interrupt vector ISOMAX_VEC_FIFO when the telemtry FIFO is at least half empty and ready to accept more frames. The telemetry transmit FIFO interrupts should be servived promptly to prevent FIFO underflow.
If the ISOMAX frame sync board is configured as a receiver, the board will scan the incomming serial stream looking for the frame sync word value. Once found, the board will fill the telemetry FIFO with the incomming frames as long as the frame sync words are found at the proper locations in the serial stream. The ISOMAX board will generate interrupt vector ISOMAX_VEC_FIFO when the telemetry FIFO is at least half full and ready for a read. The function ISOMAX_fifoRead() will return 8 (ISOMAX_FIFO_FRAMES) from the FIFO. The returned frames will still contain the frame sync words and checksum words. It is the user's resposibility to extract the data portion of the frames. The telemetry receive FIFO interrupts should be servived promptly to prevent FIFO overflow.
CONFIGURATION
The function ISOMAX_configure() sets the operaing mode of an ISOMAX frame sync board. Four modes are available
| Mode Number | Macro | Description |
| 0 | ISOMAX_MODE_TX | Transmit user telemetry frames |
| 1 | ISOMAX_MODE_RX | Receive user telemetry frames |
| 2 | ISOMAX_MODE_TX_TEST | Transmit test frames |
| 3 | ISOMAX_MODE_RX_TEST | Simulate reception of test frames
|
The user telemetry modes ISOMAX_MODE_TX and ISOMAX_MODE_RX are as described above. The test modes ISOMAX_MODE_TX_TEST and ISOMAX_MODE_RX_TEST use a test pattern to verify the basic operation of the boards. In mode ISOMAX_MODE_TX_TEST, the test pattern is transmitted with no other user intervension. In mode ISOMAX_MODE_RX_TEST, the ISOMAX frame sync board pushes the test pattern into the telemetry FIFO as if it received the data stream from a transmitter.
Define Documentation
| #define ISOMAX_CHECKSUM_OFFSET 63
|
|
|
|
The offset in 16-bit words of the ISOMAX telemetry frame checksum word from the beginning of the frame. |
| #define ISOMAX_CHECKSUM_WORD 0x0000
|
|
|
|
The value of the ISOMAX telemetry frame checksum word if no errors have occurred. This 16-bit word appears as the last word of every frame. |
| #define ISOMAX_DATA_OFFSET 1
|
|
|
|
The offset in 16-bit words of the first word of user data from the beginning of the ISOMAX telemetry frame. |
| #define ISOMAX_DATA_SIZE (ISOMAX_FRAME_SIZE - 4)
|
|
|
|
The size in bytes of the user data section of the ISOMAX telemetry frame. |
| #define ISOMAX_DATA_WORDS (ISOMAX_DATA_SIZE / sizeof(unsigned short))
|
|
|
|
The number of 16-bit words in the user data section of the ISOMAX telemetry frame. |
| #define ISOMAX_FIFO_FRAMES (ISOMAX_FIFO_SIZE / ISOMAX_FRAME_SIZE)
|
|
|
|
The number frames that occupy one-half of the telemetry FIFO. |
| #define ISOMAX_FIFO_SIZE 1024
|
|
|
|
The size in bytes of the telemetry frame FIFO divided by 2. This value is used to determine the size of reads and writes to the FIFO. |
| #define ISOMAX_FIFO_WORDS (ISOMAX_FIFO_SIZE / sizeof(unsigned short))
|
|
|
|
The number of 16-bit words in telemetry frame FIFO divided by 2. |
| #define ISOMAX_FRAME_SIZE 128
|
|
|
|
The size in bytes of the complete ISOMAX telemetry hardware frame. |
| #define ISOMAX_FRAME_WORDS (ISOMAX_FRAME_SIZE / sizeof(unsigned short))
|
|
|
|
The number of 16-bit words in the complete ISOMAX telemetry hardware frame. |
| #define ISOMAX_MAX_RATE 1000000
|
|
|
|
The maximum telemetry transmission rate in bits / second. |
|
|
ISOMAX Configuration Mode: The board receives data into the telemetry FIFO. |
| #define ISOMAX_MODE_RX_TEST 3
|
|
|
|
ISOMAX Configuration Mode: The board injects a test pattern into the telemetry FIFO. |
|
|
ISOMAX Configuration Mode: The board transmits data writen to the telemetry FIFO. |
| #define ISOMAX_MODE_TX_TEST 2
|
|
|
|
ISOMAX Configuration Mode: The board transmits a test pattern. |
| #define ISOMAX_STATUS_CMD 0x10
|
|
|
|
ISOMAX Hardware Staus Bit Mask: A command word has been received. |
| #define ISOMAX_STATUS_CRC 0x04
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The checksum for the current telemetry frame is being caculated. |
| #define ISOMAX_STATUS_FIFO_E 0x40
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The telemetry FIFO is empty. |
| #define ISOMAX_STATUS_FIFO_F 0x80
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The telemetry FIFO is full. |
| #define ISOMAX_STATUS_FIFO_HF 0x20
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The telemetry FIFO is at least half full. |
| #define ISOMAX_STATUS_TEST 0x02
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The board is configured in test mode. |
| #define ISOMAX_STATUS_TX 0x01
|
|
|
|
ISOMAX Hardware Staus Bit Mask: The board is configured in trasmit mode. |
| #define ISOMAX_SYNC_OFFSET 0
|
|
|
|
The offset in 16-bit words of the ISOMAX telemetry frame sync word from the beginning of the frame. |
| #define ISOMAX_SYNC_WORD 0xeb90
|
|
|
|
The value of the ISOMAX telemetry frame sync word. This 16-bit word appears as the first word of every frame. |
| #define ISOMAX_VEC_CMD (DPC104_VME_INT_VEC_BASE + 10)
|
|
|
|
ISOMAX Interrupt Vector: The vector number of the command available interrupt. |
| #define ISOMAX_VEC_FIFO (DPC104_VME_INT_VEC_BASE + 5)
|
|
|
|
ISOMAX Interrupt Vector: The vector number of the telemetry FIFO half-full interrupt. |
Generated on Fri Mar 1 17:16:22 2002 by
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001