Page 1
ARINC 429 Interface Module for VxWorks AIM GmbH Sasbacher Str. 2 79111 Freiburg, Germany Tel: +49-761-45229- 0 Fax: +49-761-45229- 33 sales@aim-online.com www.aim-online.com April 2010 V07.0x Rev. A...
Page 3
VME 429 for VxWorks Software Library Reference Manual AVI429 (VME Version) AMC429 (PMC Version) AVC429 (PMC on AVC carrier) V07.0x Rev. A April 2010 AIM No. 60-12400-36-070X-A...
Page 4
Notice: The information that is provided in this document is believed to be accurate. No responsibility is assumed by AIM for its use. No license or rights are granted by implication in connection therewith. Specifications are subject to change without notice.
Page 5
DOCUMENT HISTORY The following table defines the history of this document. Appendix A provides a more comprehensive list of changes made with each version. Version Cover Date Created by Description 5.3x Revision A 15.01.2005 Jochen Pfaadt See Appendix A for details 5.3x Revision B 02.05.2005 Jochen Pfaadt...
Page 10
LIST OF TABLES Table Title Page Table 1.3.2-I API S/W Library Data type Naming Conventions ..........4 Table 2-I Library Administration Function Descriptions ...........9 Table 2-II VME Initialization Functions................9 Table 3-I System Function Descriptions ...............35 Table 4-I Memory Function Descriptions ...............67 Table 5-I Transmitter Function Descriptions ..............77 Table 6.11-I...
Section 1 - Introduction INTRODUCTION General Welcome to the Software Library Reference Manual for AMC/AVI429. This reference manual is intended to provide the software (s/w) programmer with the information needed to develop a host computer application interface to the AMC429 and AVI429 avionics interface modules.
Page 12
Section 1 - Introduction Section 5 Transmitter Functions Sections 5 - 9 contain the Section 6 function calls used to setup the Receiver main functions on the VME 429 Functions device including: Transmitter Section 7 Receiver Receiver Monitor Monitor Functions Replay Scenario Section 8...
API S/W Library. In addition, the software and firmware contained on the AIM bus interface 429 device will be referred to as the Target S/W. Several references will be made within the API S/W Library function description to the Application Interface.
Api429Cmdname functions involve driver commands to the target hardware (prototypes are located in Api429fnc.h) • Data Types - all variables are assigned an AIM equated data type as shown in Table 1.3.2-I below (defined in Api429.h): Table 1.3.2-I API S/W Library Data type Naming Conventions...
Section 1 - Introduction 1.3.3 Function Call Documentation Conventions Each function call contained in Section 3 - 10 uses a standard documentation format. The information included for each function call is as follows: Figure 1.3.3-1 Document Conventions Specifies the Prototype: parameters to be passed to the function, return value data type function name (function parameter(s));...
• "b_Module" - usually the first function parameter. This parameter determines the AIM destination module. This value is the return value of function AiVme429MapModule(). Software Library Reference Manual for VME 429...
AIM Hardware Specification API429, Version 1.0, March 1999 1.4.2 AIM Document Family AIM has developed several documents that may be used to aid the developer with other aspects involving the use of the VME 429 bus interface module(s). These documents and a summary of their contents are listed below:...
Page 18
Section 1 - Introduction THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Section 2 – Library Administration Functions LIBRARY ADMINISTRATION FUNCTIONS Section 2 defines the Library Administration and VME Initialization Function calls of the API S/W Library. The Library Administration functions provide general library initialization and shutdown, interrupt handler setup, and error message handling setup.
Uninstalls a user interrupt handler function which was installed previously with the function ‘Api429InstIntHandler’. Interrupt Type Defines the type of interrupt which will be uninstalled for the given AIM board. Note: At the moment there this type is always 0, but in the future there will be different types available.
Section 2 – Library Administration Functions 2.1.3 Api429GetTgEmul AiUInt8 Api429GetTgEmul( AiUInt8 b_Module ); None This function returns the current emulation status of the application interface. none none Value Description Command emulation disabled Command emulation enabled Software Library Reference Manual for VME 429...
Section 2 – Library Administration Functions 2.1.4 Api429Init AiUInt8 Api429Init( void ); None This function initializes the entire application interface and must be called first in an application program before any other function is applied. none none Always ‘1’ Software Library Reference Manual for VME 429...
Calling printf commands or commands starting with Api429Cmd within the interrupt context may lead to a system crash. However a new task can be started, that calls any command. Module Number of the AIM board that generated the interrupt. Value Description...
Page 25
Section 2 – Library Administration Functions Zero based channel number of the AIM board that generated the interrupt. Value Description 0..15 Channel Number Interrupt type as defined in parameter ‘uc_Type’ above. Contains the type of interrupt that the AIM board has generated.
Page 26
Section 2 – Library Administration Functions Replay Half Buffer interrupt, set to 1 if half of the Replay buffer has been transmitted during physical replay. Monitor Trigger Interrupt, set to 1 if the monitor has triggered for either start or stop trigger Monitor Buffer Full Interrupt, set to 1 if half of the monitor buffer has been filled.
Page 27
Section 2 – Library Administration Functions The Data Buffer Base location contains a pointer indicating the start of the receive data buffer which is described with the following picture. Interrupt Index Index Reload Current Index Last Label Data Word Label Data First Label Data Word The Label Data locations contains the 32-bit ARINC data word.
Page 28
Section 2 – Library Administration Functions Transfer Instruction Longword 1 Reserved Instruction List Pointer TX Data Buffer Res. Longword 2 Base Address Transmit operation current instruction list pointer (when INT or INDI bit is set in the transmit- or skip instruction control word). The TX Data Buffer Base Address location contains a 24-bit address pointer indicating the start of the transmit data buffer which is described with the following picture.
Section 2 – Library Administration Functions 2.1.6 Api429SetTgEmul void Api429SetTgEmul( AiUInt8 b_Module, AiUInt8 b_Emul ); None This function sets the current emulation mode of the application interface. Value Description Disable / reset command emulation (default) If an error occurs, the emulation mode is enabled automatically! Enable Command emulation permanently Disable command emulation permanently...
Section 2 – Library Administration Functions 2.1.7 Api429SetDllDbgLevel void Api429SetDllDbgLevel (AiUInt32 ul_DllDbgLevel ); None This function sets the debug level of the application interface. It allows to control the amount of debug output generated. Value Constant Description API429_DBG_NONE Disable additional debug information (default) API429_DBG_TRACE Enable Function Call Tracing The data is written to stdout...
Section 2 – Library Administration Functions 2.1.8 Avi429Close AiUInt8 Avi429Close( AiUInt8 b_Module ); None This function closes the application interface for the specified module and must be called last in an application program. Note: No function except Avi429Open(...) shall be called after Avi429Close(...) !!! None None Value...
Section 2 – Library Administration Functions 2.1.9 Avi429Open short Avi429Open( AiUInt8 b_Module ); None This function initializes the application interface for the specified module and must be called first, before any other function is applied for the specified module. API Board Module to access. This value is returned by AiVme429MapModule(). None Value Constant...
TY_PCI_INFO *px_PCI_Info1, TY_PCI_INFO *px_PCI_Info2); None Runs the PCI config cycle on the AIM board on the A16 address specified in in->ul_A16Addr, regardless of its protocoll and writes its data into the output parameters px_PCI_Info1 and px_PCI_Info2. Using these output parameters an AVI429 board or an AMC429 board on an AVC-2 carrier can be initialized using the function AiVme429MapModule().
Page 35
Section 2 – Library Administration Functions Used as input for functions AiVme429MapModule(),AiVme429UnmapModule() or Ai429CheckModule(). For two PMC boards on one AVC-2 carrier, this contains the configuration data of the first PMC board. typedef struct { TY_PCI_CONFIGSPACE_HEADER x_PCIConfHd; TY_PCI_BAR_INFO x_PCIBarInfo[6]; AiUInt32 ul_PCITotalMemorySize;...
Section 2 – Library Administration Functions 2.2.2 Ai429CheckModule AiUInt32 Ai429CheckModule( TY_VME_MAP_MODULE_IN *in ); None This commands checks if a board is a known Arinc 429 board. Parameters used to map this board to the VME bus in function AiVme429MapModule(). None...
Section 2 – Library Administration Functions 2.2.3 AiPciScan AiUInt32 AiPciScan( void ); None This commands scan the local PCI bus for known devices and internally stores the PCI headers of all boards found. It allows to use the AiPciGetHeader() command to get the PCI header of any board found.
Section 2 – Library Administration Functions 2.2.4 AiPciGetHeader TY_PCI_INFO* AiPciGetHeader( AiUInt32 ulModuleIndex ); None This commands returns the PCI header of a board, which can be used to call AiVme429MapModule(). Before calling this command, AiPciScan() has to be called first. This is an index to the PCI module, from which the PCI header shall be returned.
The parameter ‘*intFuntion’ of type VOID_FUNC is the function pointer which should be called in case of interrupt. This function is a driver internal interrupt function which handles the hardwae interrupt on the AIM board and distributes to the user interrupt functions.
Page 40
Section 2 – Library Administration Functions The type VOID_FUNC is defined as follows: typedef void VOID_FUNC(void); This is a function pointer to a user function to do some own activities on a interrupt. This function must be from the type INTERRUPT_FUNC which is defined as follows: typedef void INTERRUPT_FUNC(AiUInt8 uc_Module, AiUInt8 uc_Biu, AiUInt8 uc_Type, TY_API_INTR_LOGLIST_ENTRY x_Info );...
A32 space is dependant on the amount of memory on the module. The real memory depends on the settings of the PCI-BAR register of the AIM Module. For all requested memory of the AIM Module one image is mapped on the VME-bus.
Page 42
Section 2 – Library Administration Functions This parameter has to be set to '1' if the boards are located on a cPCI bus. ACI429 or AMC429 on ACC carrier. For AVI429 boards, for AMC429 on AVC-2 carrier or for AMC429 located in the local PMC slots of a VME CPU, this value shall be set to zero.
Section 2 – Library Administration Functions 2.2.7 AiVme429UnmapModule AiUInt32 AiVme429UnmapModule(TY_VME_MAP_MODULE_IN *in) none This function undoes the mapping of a board to the VME bus or local PCI bus. This is the structure that was used to map the board to the bus. None Value Constant...
Page 44
Section 2 – Library Administration Functions THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
System function calls in the following sections are in alphabetical order. Table 3-I System Function Descriptions Function Description Api429CmdIni Initializes the AIM board Api429CmdReset Initializes the hardware and ASP driver software Api429CmdBite Performs a selftest Api429CmdDefChnSpeed Defines the channel speed...
Section 3 - System Functions Api429CmdBite AiUInt8 Api429CmdBite( AiUInt8 b_Module, AiUInt8 b_Func, AiUInt8 *pb_Status, AiUInt8 *pb_Echo ); API429_BITE (0x32) This command initiates a selftest of the API429 Hardware. The selftest result is reported as part of the acknowledge information. After a SELFTEST command the currently active board setups are lost, due to the performed RAM Test.
Page 47
Section 3 - System Functions Status Echo Description Interrupt Test Error Timer Interrupt BIU Interrupt Global RAM Test Error Data Pattern Test Walking Bit Test Addressing Test Bus Test Note: The echo value contains in the high nibble part the BIU number which failed the test (only for test no.
Section 3 - System Functions Api429CmdBiuIntrCheck AiUInt8 Api429CmdBiuIntrCheck( AiUInt8 b_Module, AiUInt8 b_DestBiu, AiUInt32 *pl_Stat, TY_API429_INTR_REGS *px_Regs ); API429_BIU_INTR_STATUS (0x40) This command is used to read the interrupt status of the API429 BIU. Up to 32 interrupt events can be stored for two consecutive calls of this function. Note: 32 interrupt events as a maximum (API429_MAX_IR_EVENT_BUF) can be buffered in the TY_API429_INTR_REGS data structure.
Page 49
Section 3 - System Functions Interrupt Loglist Event, Entry Word 1 Bit 31 Bit 30 Bit 29 Bit28 Bit 27 Bit 26 Bit 25 Bit 24 undefined INT_TAG_FIELD Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 INT_TAG_FIELD...
Page 50
Section 3 - System Functions RX Label Receive Operation Any Error Interrupt, set to 1 if any error is detected in the receive stream Transmit Operation Interrupt on TRANSFER Instruction Execution, set to 1 if user- defined Label TRANSFER is transmitted. Transmit Programmed Interrupt on SKIP Instruction Execution, set to 1 when NOP TRANSFER is executed.
Section 3 - System Functions Api429CmdChnIntCon AiUInt8 Api429CmdChnIntCon( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Ena ); API429_CTL_CHN_INT (0x3B) This command is utilized to enable/disable storing of a channel's interrupt information into the Interrupt Loglist Area of the Shared Memory. Channel Number Value Description 1..32...
Section 3 - System Functions Api429CmdDefChnSpeed AiUInt8 Api429CmdDefChnSpeed( AiUInt8b_Module, AiUInt8b_Chn, AiUInt8 b_Speed ); API429_CHN_SPEED_CON (0x34) This command is utilized to define the transaction speed of the selected API429 channel. Note: This Command shall be setup before enabling the Board Operation ("Start Transmitter Operation"...
Section 3 - System Functions Api429CmdExecSys AiUInt8 Api429CmdExecSys( AiUInt8 b_Module, AiUInt8 b_Mode, AiUInt8 b_Con ); API429_EXEC_SYS (0x42) This function is used to execute a system related function on the API429 target. Value Description Timetag source* Boot LCA Boot BIU Execute BIU Interrupt Routine 7-255 reserved *Note:...
Section 3 - System Functions Api429CmdGetIrigTime AiUInt8 Api429CmdGetIrigTime( AiUInt8 b_Module, TY_API429_IRIG_TIME *px_IrigTime ); API429_GET_IRIG_TIME (0x44) This function is used to read the on-board IRIG timecode encoder. none Pointer to IRIG Timecode structure (api429.h) typedef struct AiUInt8 b_DayHi; AiUInt8 b_DayLo; AiUInt8 b_Hour;...
Page 55
Section 3 - System Functions IRIG time source Value Constant Description API_IRIG_INTERN Board is switched to internal IRIG source API_IRIG_EXTERN BOARD is switched to external IRIG source IRIG time synchronized Value Constant Description API_IRIG_NOT_SYNC IRIG time is not synchronized API_IRIG_SYNC IRIG time is synchronized Note: The IRIG time is e.g.
Section 3 - System Functions Api429CmdIni Prototype: AiUInt8 Api429CmdIni( AiUInt8 b_Module, TY_API429_INI_INFO *px_IniPar ); Driver Command: API429_INI (0x30) Purpose: This function is used to initialize the API429 board after a system or power-up reset and to return API429 board specific information. This function must be the first function called after a system or power-up reset.
Page 57
Byte 15 Byte 8 Byte 7 Byte 0 BIU2 TYPE BIU1 TYPE TYPE Description 0x00 reserved (unset) 0x10 MIL-STD-1553 0x20 ARINC 429 0x30 STANAG 3910 0x40 PANAVIA 0x60 ARINC 629 0xFF not present Software Library Reference Manual for VME 429...
Page 58
Section 3 - System Functions Board Configuration Byte 31 Byte 16 Main Board HW Version Byte 15 Byte 8 Byte 7 Byte 0 Main Board HW Revision Platform Type Platform Type Description 0x00 reserved (unset) 0x1x PCI board 0x2x VME board 0x3x VXI board 0x4x...
Page 59
Section 3 - System Functions The following tables show the 16 32-bit PCI-registers PCI Device Independent Registers Register Register Description Byte Default Width Number Name Offset Value venid Vendor ID 0x1447 16 bit devid Device ID 0xxxxx 16 bit creg Command Register 0x0117 16 bit...
Section 3 - System Functions Api429CmdInitDiscretes AiUInt8 Api429CmdInitDiscretes( AiUInt8 uc_Module, AiUInt32 ul_DiscreteSetup ); API429_INIT_DISCRETES (0x47) This command is used to configure the discretes. An APM429 board provides 8 discretes where each of the discretes can be initialized as Input or Output. Note: This function is only valid for APM429 boards! Bit 31...
Section 3 - System Functions Api429CmdLoadSRec AiUInt8 Api429CmdLoadSRec( AiUInt8 b_Module, AiUInt8 b_Mode, AiUInt8 b_Cnt, AiUInt32 l_Offset, AiUInt8 *pb_SRec, AiUInt8 *pb_St, AiUInt32 *pl_FSize ); API429_LOAD_SREC (0x35) This command is used to load a R4000 executable program (S-Record format) to a fixed ASP Shared Memory area via the ASP Driver Software. The S-Record ASCII characters are converted from the ASP Driver Software into an executable format.
Page 62
Section 3 - System Functions Checksum Status Value Description Checksum ok No S-Record string Wrong S-Record type Checksum error Addressing error Downloaded Data Bytes. Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
Section 3 - System Functions 3.10 Api429CmdProgFlash AiUInt8 Api429CmdProgFlash( AiUInt8 b_Module, AiUInt32 l_SrcAddr, AiUInt32 l_Sector, AiUInt32 l_Size, AiUInt8 *pb_St ); API429_PROG_FLASH (0x36) This command is used to perform in-circuit programming of the API429 onboard Flash-Prom devices for update purposes (ASP Driver Software, BIU Firmware) Source RAM Address Flash-PROM Sector Number of Bytes to be programmed...
API429_VER_READ (0x38) API429_VER_READ_EX (0x4038) This function returns the version numbers of all board software package components for the AIM board. None The following structure describes the Version Type information including major version number, a minor version number, a build number, a special major version number and a special minor version number.
Page 65
Section 3 - System Functions Pointer to a structure, which contains the full available version information. typedef struct TY_API429_VERSION x_TcpVer; TY_API429_VERSION x_PciLcaVer; TY_API429_VERSION x_AslLcaVer; TY_API429_VERSION x_IoLcaBiu1Ver; TY_API429_VERSION x_IoLcaBiu2Ver; TY_API429_VERSION x_FirmwareBiu1Ver; TY_API429_VERSION x_FirmwareBiu2Ver; TY_API429_VERSION x_TargetSWVer; TY_API429_VERSION x_SysDrvVer; TY_API429_VERSION x_DllVer; TY_API429_VERSION x_VmeGeneric; AiUInt32 ul_BoardSerialNr;...
Page 66
Section 3 - System Functions Version information of the Windows System Driver Version information of the Application Interface Library Version information of the AIM generic VME library Serial Number of the AIM board. Compatibility Status of the current BSP components relating to the DLL.
Section 3 - System Functions 3.12 Api429CmdReadDiscretes AiUInt8 Api429CmdReadDiscretes( AiUInt8 uc_Module, AiUInt32 *pul_Value ); API429_READ_DISCRETES (0x45) This command is used to read from the discrete inputs. Note: This note is only valid for APM429 boards: Since the discretes are programmable on an APM429 board, be sure to have setup the discrete inputs with the function Api429CmdInitDiscretes()! None Bit 31...
Section 3 - System Functions 3.14 Api429CmdReset AiUInt8 Api429CmdReset( AiUInt8 b_Module, TY_API429_RESET_CMD *px_Cmd, TY_API429_RESET_ACK *px_Ackn ); API429_RESET (0x31) This command initializes the API429 Hardware and the Driver Software data structures and variables to an initial state. The RESET command reports the physical channel configuration of the API429 board to the user.
Page 72
Section 3 - System Functions 'Channel Count Value Description Number of API429 channels (TX and RX) Number of API429 channels (TX and RX) Number of API429 channels (TX and RX) Number of API429 channels (TX and RX) Number of API429 channels (TX and RX) Number of API429 channels (TX and RX) Reserved (0) Physical Channel Configuration...
Section 3 - System Functions 3.15 Api429CmdSetIrigTime AiUInt8 Api429CmdSetIrigTime( AiUInt8 b_Module, TY_API429_IRIG_TIME *px_IrigTime); API429_SET_IRIG_TIME (0x43) This function is used to set the on-board IRIG timecode encoder. Pointer to IRIG Timecode structure (api429.h) typedef struct AiUInt8 b_DayHi; AiUInt8 b_DayLo; AiUInt8 b_Hour; AiUInt8 b_Min;...
Page 74
Section 3 - System Functions IRIG set mode Value Constant Description API_IRIG_SET The IRIG time given in the previous parameters will be set API_IRIG_CHANGE_TI The IRIG time source given in the METAG_SOURCE parameter ‘irig_src’ will be set. IRIG time source Value Constant Description...
Section 3 - System Functions 3.16 Api429CmdWriteDiscretes AiUInt8 Api429CmdWriteDiscretes( AiUInt8 uc_Module, AiUInt32 ul_Mask, AiUInt32 ul_Value); API429_WRITE_DISCRETES (0x46) This command is used to write to the discrete outputs. Note: This note is only valid for APM429 boards: Since the discretes are programmable on an APM429 board, be sure to have setup the discrete outputs with the function Api429CmdInitDiscretes()! Bit 31 Bit 30...
Page 76
Section 3 - System Functions Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 Reserved (0) Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 Reserved (0) Bit 15 Bit 14 Bit 13...
Section 4 - Memory Functions MEMORY FUNCTIONS Section 4 defines the Memory function calls of the API S/W Library. The Memory functions provide the capability to read and write to the 429 module's memory. Table 4-I defines the list and definition of Memory function calls within this group. The function calls in this table are listed in a functional order, however, the detailed descriptions of the Memory function calls in the following sections are in alphabetical order.
Section 4 – Memory Functions Api429CmdRamRead AiUInt8 Api429CmdRamRead( AiUInt8 b_Module, AiUInt8 uc_WCount, AiUInt32 ul_StartAddr, AiUInt32 *pl_WData ); API429_RAM_READ (0x51) This command reads the specific amount of data words directly from the API429 memory beginning at the specific start address. Value Description 1..255 Amount of data words to read...
Section 4 - Memory Functions Api429CmdRamWrite AiUInt8 Api429CmdRamWrite( AiUInt8 b_Module, AiUInt8 uc_WCount, AiUInt32 ul_StartAddr, AiUInt32 *pl_WData ); API429_RAM_WRITE (0x50) This command writes the specific amount of data words directly to the API429 memory beginning at the specific start address. Value Description 1..255 Amount of data words to write...
AiUInt32 *pul_BytesRead ); None This function is used to read a data block from the AIM board memory in avoidance of AIM board command and acknowledge interface access. This is necessary to access the AIM board memory in case of interrupt. The function does a direct access to the AIM board memory with the specified offset address.
Page 81
Section 4 - Memory Functions Data to read to. This pointer should match to the data size given in the parameter ‘width’. Amount of bytes actually read. Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
AiUInt8 width, void *data_p ); None This function is used to read a byte/word/longword from the AIM board memory in avoidance of AIM board command and acknowledge interface access. This is necessary to access the AIM board memory in case of interrupt. The function does a direct access to the AIM board memory with the specified offset address.
AiUInt32 *pul_BytesWritten ); None This function is used to write a data block to the AIM board memory in avoidance of AIM board command and acknowledge interface access. This is necessary to access the AIM board memory in case of interrupt. The function does a direct access to the AIM board memory with the specified offset address.
Page 84
Section 4 – Memory Functions Amount of bytes actually written. Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
AiUInt8 width, void *data_p ); None This function is used to write a byte/word/longword to the AIM board memory in avoidance of AIM board command and acknowledge interface access. This is necessary to access the AIM board memory in case of interrupt. The function does a direct access to the AIM board memory with the specified offset address.
Page 86
Section 4 – Memory Functions THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Section 5 – Transmitter Functions TRANSMITTER FUNCTIONS Section 5 defines the Transmitter Function calls of the API S/W Library. following commands are utilized to define the mode of transmission (Framing, Loop/Pollution, Replay (Buffer Reload or Physical replay)), setup transmit buffers based on Label IDs (0 to 254), setup minor/major frames and error injection, define Tx output amplitude, and start/stop/status Tx channel.
Section 5 – Transmitter Functions Api429CmdTxAmpIni AiUInt8 Api429CmdTxAmpIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Ampl ); API429_TX_AMP_INI (0x71) This command defines the output amplitude of the selected API429 transmitter channel via a D/A converter. Note: The transmitter output amplitude cannot be changed for APM429 and AMC429 boards! In this case a call to this function has no effect! Note:...
Section 5 – Transmitter Functions Api429CmdTxFrmTimeIni AiUInt8 Api429CmdTxFrmTimeIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt16 w_Ftm ); API429_TX_FTIME_INI (0x72) This command defines the minor frame time of the selected API429 transmitter channel in 5ms steps. Note: After a Api429CmdReset command or the Api429CmdTxIni command the minor frame time is set to 100ms.
Section 5 – Transmitter Functions Api429CmdTxFrmTimeIniEx AiUInt8 Api429CmdTxFrmTimeIniEx( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt16 w_Ftm API429_TX_FTIME_INI (0x72) This command defines the minor frame time of the selected API429 transmitter channel in 1ms steps. Note: After a Api429CmdReset command or the Api429CmdTxIni command the minor frame time is set to 100ms.
Section 5 – Transmitter Functions Api429CmdTxGetBufAddress AiUInt8 Api429CmdTxGetBufAddress( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_XferId, AiUInt32 *pl_Addr, AiUInt16 *pw_Size ); API429_TX_GET_BUF_ADDR (0x81) This function is utilized to return the base address of a specified label transmitter identified buffer and a specified channel. Channel Number Value Description...
Section 5 – Transmitter Functions Api429CmdTxHalt AiUInt8 Api429CmdTxHalt( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_TX_HALT (0x7B) This function stops the transmitter operation (label transfers in major frame or acyclic) on the selected API429 transmitter channel. Channel Number Value Description Affect all API429 transmitter channel numbers (not for replay and physical replay) 1..32 API429 transmitter channel number...
Section 5 – Transmitter Functions Api429CmdTxIni AiUInt8 Api429CmdTxIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Mode, AiUInt8 b_Parity ); API429_TX_INI (0x70) This command initializes the transmitter mode of the selected API429 transmitter channel, and the Loop/Pollution Mode of the transmitter channel. In Loop/Pollution Mode the Transmitter Channel waits in an idle loop for a start-condition from the associated receive channel.
Page 94
Section 5 – Transmitter Functions Parity Mode Value Description The MSB of the ARINC429 data word will be transmitted as parity bit The MSB of the ARINC429 data word will be transmitted as data bit none Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error...
Section 5 – Transmitter Functions Api429CmdTxMajFrameInst AiUInt8 Api429CmdTxMajFrameInst( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_FrmCnt, AiUInt32 *pul_Frames ); API429_TX_MFRAME_INST (0x76) This function defines the sequence of label transfer minor frames identified by their frame identifiers within the major frame on the selected API429 transmitter channel. Note: This command is not accessible if the transmitter mode 'b_Mode' in the "Api429CmdTxIni command"...
Section 5 – Transmitter Functions Api429CmdTxMajFrmDel AiUInt8 Api429CmdTxMajFrmDel( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_TX_MFRAME_DEL (0x79) This function resets the minor frame sequence within the major frame on the selected API429 transmitter channel. As a result, the starting minor frame identifier is set to 1 and the number of minor frames is set to 1.
Section 5 – Transmitter Functions Api429CmdTxMinFrameInst AiUInt8 Api429CmdTxMinFrameInst( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_FrmId, AiUInt32 ul_XferCnt, AiUInt32 *pul_Xfers ); API429_TX_FRAME_INST (0x75) This function defines the sequence of label transfers identified by their transfer identifiers within a minor frame specified by a frame identifier on the selected API429 transmitter channel.
Section 5 – Transmitter Functions 5.10 Api429CmdTxMinFrameInstEx AiUInt8 Api429CmdTxMinFrameInstEx( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_MFRAME_IN *px_MFrame, TY_API429_MFRAME_OUT *px_MFrameInfo); API429_TX_FRAME_INST (0x75) This function defines the sequence of label transfers identified by their transfer identifiers within a minor frame specified by a frame identifier on the selected API429 transmitter channel.
Page 100
Section 5 – Transmitter Functions Pointer to MFrame output structure typedef struct AiUInt32 ul_MFrameAddr; } TY_API429_MFRAME_OUT; Address of the minor frame. Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
Section 5 – Transmitter Functions 5.11 Api429CmdTxMinFrmDel AiUInt8 Api429CmdTxMinFrmDel( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_FrmId ); API429_TX_FRAME_DEL (0x78) This function deletes the transmitter label transfer minor frame specified by its frame identifier on the selected API429 channel. Note: This command is not accessible if the transmitter mode 'b_Mode' in the "Api429CmdTxIni command"...
Section 5 – Transmitter Functions 5.12 Api429CmdTxReplayData AiUInt8 Api429CmdTxReplayData( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt16 w_DSize, AiUInt32 *pl_Data ); API429_TX_REPLAY_DATA (0x7E) This function is utilized to setup data for the replay mode (buffer reload) on the selected API429-32 transmitter channel. Channel Number Value Description 1..32...
Page 103
Section 5 – Transmitter Functions The replay data block contains the ARINC data words which are organized into minor frames. minor frame time "Api429CmdTxFrmTimeIni" or "Api429CmdTxFrmTimeIniEx" command. (max. number of data words depends on the frame time set, e.g. with frame time 10ms the max.
Section 5 – Transmitter Functions Header-Bit basic framing using enabled (setup Api429CmdTxFrmTimeIni). If set to a value other than 0, delay mode is enabled allowing the user to specify the minor frame time on a frame by frame basis. A minor frame delay can be between 5ms and 13,383 s (-200µs/+400µs) using the following table.
Section 5 – Transmitter Functions 5.13 Api429CmdTxStart AiUInt8 Api429CmdTxStart( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_StartMode, AiUInt8 b_Mode, AiUInt16 w_ModeSpec, AiUInt8 b_TrgLine ); API429_TX_START (0x7A) This function starts the execution of the label transfers (major frame and acyclic) on the selected API429 transmitter channel. Note: This command is obsolete.
Page 107
Section 5 – Transmitter Functions Transmitter Operational Mode Specification 'b_Mode' Value Description Major Frame Cyclic execution of the transfers within the major frame 1..FFFFh Times of execution of the transfers within the major frame Acyclic 1..64 Minor Frame Identifier Note: This Minor Frame ID should not be used in a Major Frame! Note: Attention: This value references the minor frame...
Section 5 – Transmitter Functions 5.14 Api429CmdTxStartEx AiUInt8 Api429CmdTxStartEx(AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_TXSTART *px_TxStartIn); API429_TX_START (0x7A) This function starts the execution of the label transfers (major frame and acyclic) on the selected API429 transmitter channel. Channel Number Value Description Affect all API429 transmitter channel numbers (not for replay and physical replay) API429 transmitter channel number 1..32...
Page 109
Section 5 – Transmitter Functions Transmitter Mode Value Constant Description API429_TX_MAJFRAME Major Frame label transfer execution API429_TX_ACYCLIC Acyclic transfer execution of the label transfers within a specific minor frame API429_TX_POLLUT Loop/Pollution execution API429_TX_REPLAY Buffer Reload mode execution API429_TX_PHYS_REPLAY Physical Replay mode execution Transmitter Operational Mode Specification 'b_Mode' Value...
Section 5 – Transmitter Functions The second of the point of time, the transmission shall start. (only valid for 'l_Startmode' = The microsecond of the point of time, the transmission shall start. (only valid for 'l_Startmode' = 2) Note: The granularity is 500us for AMC429 and APX429. For API429 it is 1ms. TX-Starts / Re-Starts automatically (Autoframing of API429 board) Frame...
Section 5 – Transmitter Functions 5.15 Api429CmdTxStatusRead AiUInt8 Api429CmdTxStatusRead( AiUInt8 b_Module, AiUInt8 b_Chn AiUInt8 *pb_TxStatus, AiUInt32 *pl_GlbCnt, AiUInt16 *pw_RelFlag ); API429_TX_STATUS_READ (0x7C) This function is utilized to read the execution status of the selected API429 transmitter channel. Channel Number Value Description 1..32 API429 transmitter channel number...
Section 5 – Transmitter Functions 5.16 Api429CmdTxXferDataDef AiUInt8 Api429CmdTxXferDataDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_XferId, AiUInt8 b_XferMode, AiUInt16 w_BufStart, AiUInt16 w_BufSize, AiUInt32 *pl_LData ); API429_TX_LXFER_DATA (0x74) This function is utilized to fill the specified label transfer data buffer on the selected API429 transmitter channel with data information.
Page 114
Section 5 – Transmitter Functions Note: 'w_BufSize' should not be larger than 1024 – 'w_BufStart'! Label Data Words (MSB first) none Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
Section 5 – Transmitter Functions 5.17 Api429CmdTxXferDataRead AiUInt8 Api429CmdTxXferDataRead( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_XFER_DATA_READ_INPUT *px_XferDataInput, TY_API429_XFER_DATA *px_XferData ); API429_TX_LXFER_DATA_READ (0x83) This function is utilized to read the send label transfer data buffer on the selected API429 transmitter channel. Note: This command is not accessible if the transmitter mode 'b_Mode' in the "Api429CmdTxIni command"...
Page 116
Section 5 – Transmitter Functions Pointer to array of XferData structure (api429.h) typedef struct AiUInt32 ul_XferData; AiUInt32 ul_XferTTHigh; AiUInt32 ul_XferTTLow; } TY_API429_XFER_INFO; Note: Pay attention to allocate enough memory to stroe the returned data. The allocated memory must correspond to ‘ul_BufSize’ * size of this structure! 23 bit Label Data Information (MSB first) pointed to by 'pw_XferIx'+Label Number (Byte 11) Timetag High of the label data given in ‘ul_XferData’...
Section 5 – Transmitter Functions 5.18 Api429CmdTxXferDef AiUInt8 Api429CmdTxXferDef( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_LXFER_CMD *px_Xfer, AiUInt8 *b_Status, AiUInt32 pl_FreeMem ); API429_TX_LXFER_INST (0x73) This function defines a complete transmitter label transfer including error injection specification to be executed on the selected API429 transmitter channel. When executing this instruction a data buffer specified by "buf_size"...
Page 118
Section 5 – Transmitter Functions Transfer Type Value Description Label Transfer No operation (NOP) Output Trigger Strobe (see also ‘xfer_gap’) Label Transfer with stored timetag on send Bit Position Value Description Transfer Interrupt INT No interrupt on label transfer execution Interrupt on Label transfer or NOP execution...
Page 119
Section 5 – Transmitter Functions Value Description Label buffer has been allocated Label buffer could not be allocated due to less memory Size of the free memory available for label buffer Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR Execution error Software Library Reference Manual for VME 429...
API429_TX_LXFER_INST (0x73) This function defines a complete transmitter label transfer including error injection specification to be executed on the selected Arinc 429 transmitter channel. When executing this instruction a data buffer specified by "buf_size" is allocated within the onboard memory. The data buffer contents may be defined with the "Api429CmdTxXferData"...
Page 121
Section 5 – Transmitter Functions Transfer Type Value Description Label Transfer No operation (NOP) Output Trigger Strobe (see also ‘xfer_gap’) Label Transfer with stored timetag on send Bit Position Value Description Transfer Interrupt INT No interrupt on label transfer execution Interrupt on Label transfer or NOP execution...
Page 122
Section 5 – Transmitter Functions typedef struct AiUInt32 ul_Status; AiUInt32 ul_FreeMem; AiUInt32 ul_XferDescAddr; } TY_API429_LXFER_OUT; Value Description Label buffer has been allocated Label buffer could not be allocated due to less memory Size of the free memory available for label buffer Address of the transfer descriptor, relative to the start of global memory.
Section 5 – Transmitter Functions 5.20 Api429CmdTxXferDel AiUInt8 Api429CmdTxXferDel( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_XferId ); API429_TX_LXFER_DEL (0x77) This function deletes the transmitter label transfer identified by its transfer identifier on the selected API429 channel. Note: This command is not accessible if the transmitter mode 'b_Mode' in the "Api429CmdTxIni command"...
Section 5 – Transmitter Functions 5.21 Api429CmdTxXferEnaDis AiUInt8 Api429CmdTxXferEnaDis( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Mode, AiUInt32 ul_XferId ); API429_TX_LXFER_ENA_DIS (0x7F) This function enables/disables a transfer identified by its transfer identifier. Channel Number Value Description 1..32 API429 transmitter channel number Value Description Disable Transfer Enable Transfer...
Section 5 – Transmitter Functions 5.22 Api429CmdTxXferEnaMixChannel AiUInt8 Api429CmdTxXferEnaMixChannel( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_MixChn, AiUInt8 b_Ena ); API429_TX_XFER_MIX_CHN (0x82) This function is utilized to enable channel mixing of a channel setup in replay mode and a channel setup in normal framing mode. Note: This function must be set after setting up the replay and the framing channel.
Section 5 – Transmitter Functions 5.23 Api429CmdTxXferRead AiUInt8 Api429CmdTxXferRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_XferId, AiUInt16 *pw_XferIx, AiUInt32 *pl_XferCnt, AiUInt32 *pl_XferData ); API429_TX_LXFER_READ (0x7D) This function is utilized to read the status of a specific label transfer on the selected API429 transmitter channel.
Section 5 – Transmitter Functions 5.24 Api429CmdTxXferReadEx AiUInt8 Api429CmdTxXferReadEx( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 ul_XferId, TY_API429_XFER_INFO *px_XferInfo ); API429_TX_LXFER_READ (0x7D) This function is utilized to read the status of a specific label transfer on the selected API429 transmitter channel including timetag information (if setup...
Page 129
Section 5 – Transmitter Functions 23 bit Label Data Information (MSB first) pointed to by 'pw_XferIx'+Label Number (Byte 11) Timetag High of the current sent TX label transfer Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 DAYS...
Page 130
Section 5 – Transmitter Functions THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Section 6 - Receiver Functions RECEIVER FUNCTIONS Section 6 defines the Receiver Functions of the API S/W Library. The following functions are utilized to setup/start/stop the receiver and monitor operation, enable filters/interrutps based on Labels, read data buffers for specified label,and obtain status of Label transfers/errors.
Section 6 - Receiver Functions Api429CmdRxEnaMixChannel AiUInt8 Api429CmdRxEnaMixChannel( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_ChnXmt, AiUInt8 b_ChnMix, AiUInt8 b_Ena ); API429_RX_MIX_CHN (0x9A) This command is utilized to enable channel mixing of a receive channel and a channel setup in normal framing mode. Note: For receiver-transmitter mixing a latency between 1ms-10ms for the data received and data transmitted will occur (for the received data).
Section 6 - Receiver Functions Api429CmdRxGetBufAddress AiUInt8 Api429CmdRxGetBufAddress( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt32 *pl_Addr, AiUInt16 *pw_Size ); API429_RX_GET_BUF_ADDR (0x99) This function is utilized to return the base address of a specified receiver buffer and a specified channel. Channel Number Value Description...
Section 6 - Receiver Functions Api429CmdRxHalt AiUInt8 Api429CmdRxHalt( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_RX_HALT (0x94) This function stops the receiver and monitor operation on the selected 429 receiver and monitor channel. Channel Number Value Description 1..32 API429 receiver channel number none Value Constant...
Section 6 - Receiver Functions Api429CmdRxIni AiUInt8 Api429CmdRxIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Mode, AiUInt8 b_ModeExt, AiUInt8 b_Parity ); API429_RX_INI (0x90) This function initializes the receiver mode of the selected API429 receiver channel. All label descriptors are disabled, receiver operation on the selected channel is halted and allocated memory is released.
Section 6 - Receiver Functions Api429CmdRxLabCon AiUInt8 Api429CmdRxLabCon( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_Con,AiUInt8 b_IrCon, AiUInt16 w_IrIndex, AiUInt16 w_BufSize, AiUInt8 *pb_Status, AiUInt32 *pl_FreeMem API429_RX_LABEL_CON (0x91) This function controls the specified receiver label handling on the selected API429 receiver channel and allocates/releases a receive data buffer.
Page 138
Section 6 - Receiver Functions Label Interrupt Control Bit Position Value Description Disable interrupt on any label receive error Enable interrupt on any label receive error Disable interrupt on label receive Enable interrupt on label receive Disable interrupt on buffer index interrupt Enable interrupt on buffer index interrupt Note: Only relevant if the receiver mode 'b_Mode' in the...
Section 6 - Receiver Functions Api429CmdRxLabDataCon AiUInt8 Api429CmdRxLabDataCon( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt16 w_BufSize, TY_API429_RX_BUF_ENTRY *px_LData, AiUInt8 b_Clear ); API429_RX_LABEL_DATA_CON (0x92) This function is utilized to fill the specified receiver label data buffer on the selected API429 receiver channel with default data.
Page 140
Section 6 - Receiver Functions Array of pointer to Label Receive Buffer Data structure (api429.h) Receive Buffer Entry Layout Last Label Data Word First Label Data Word Bit 31 30..........0 typedef struct AiUInt32 lab_data; } TY_API429_RX_BUF_ENTRY; Receive buffer entry (MSB first) consisting of label data and additional data containing the entry error flag (AE).
Section 6 - Receiver Functions Api429CmdRxLabDataRead AiUInt8 Api429CmdRxLabDataRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt16 w_BufSize, TY_API429_RX_BUF_CTL *px_LCtl, TY_API429_RX_BUF_ENTRY *px_LData ); API429_RX_LABEL_DATA_READ (0x97) This function is utilized to read the data buffer of a specific label on the selected API429 receiver channel.
Page 142
Section 6 - Receiver Functions Pointer to Label Buffer Control Data structure (api429.h) typedef struct AiUInt16 ixw; AiUInt16 inr; AiUInt16 ci; } TY_API429_RX_BUF_CTL; Interrupt Index Index Reload Current Index Note: The contents of this structure are not valid, if the Loop/Pollution mode is enabled via the function Api429CmdRxIni!!! Array of pointer to Label Receive Buffer Data structure (api429.h) Last Label Data Word...
Section 6 - Receiver Functions Api429CmdRxLabRead AiUInt8 Api429CmdRxLabRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_LabCntIni, AiUInt16 *pw_LabIx, AiUInt32 *pl_LabCnt, AiUInt32 *pl_LabErr ); API429_RX_LABEL_READ (0x96) This function is utilized to read the execution status of a specific label on the selected API429 receiver channel.
Page 144
Section 6 - Receiver Functions Receive Buffer Fill Index Number of Label Transfers Note: This field is cleared whenever the command "Api429CmdRxStart" is issued. Note: This field will be 0 if 'px_Cmd lcen' in the "Api429CmdReset" command will be set to 0. Number of Transfer Errors detected Note: This field is cleared whenever the command "Api429CmdRxStart"...
Section 6 - Receiver Functions Api429RxReadActivity AiUInt8 Api429RxReadActivity( AiUInt8 b_Module, TY_API429_RX_ACTIVITY *pxActivity); None This function reads the activity information of the RX labels. Each time a label is received the corresponding bit of the activitiy bit field is set. The activity bit field is reset, when stopping and restarting the RX channel. None typedef struct AiUInt32 ChannelActivity[32][8];...
Section 6 - Receiver Functions 6.10 Api429CmdRxPollBlkDef AiUInt8 Api429CmdRxPollBlkDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_Con, TY_API429_RCV_PB_CMD *px_PollBlk ); API429_RX_LABEL_PB_CON (0x98) This function is utilized to control the loop/pollution mode and to set the logical functions in the loop/pollution mode. Note: The receiver mode 'b_Mode' in the "Api429CmdRxIni command"...
Page 147
Section 6 - Receiver Functions Pointer to Receiver Pollution Block Command structure (api429.h) typedef struct AiUInt8 pb_id; AiUInt8 asc; AiUInt16 padding1; AiUInt32 and_mask; AiUInt32 or_mask; AiUInt32 xor_mask; AiUInt32 addsub_val; } TY_API429_RCV_PB_CMD; Pollution Block ID Value Description 1..24 Pollution Block Identifier Addition/ Subtraction Control Value Description...
Section 6 - Receiver Functions 6.11 Api429CmdRxStart AiUInt8 Api429CmdRxStart( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_RX_START (0x93) This function starts the receiver and monitor operation on the selected API429 receiver and monitor channel. The receiver and monitor will be started in corresponding mode of the "Api429CmdRxIni command"...
Section 6 - Receiver Functions 6.12 Api429CmdRxStatusRead AiUInt8 Api429CmdRxStatusRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 *pb_RxStatus, AiUInt32 *pl_MsgCnt, AiUInt32 *pl_ErrCnt ); API429_RX_STATUS_READ (0x95) This function is utilized to read the execution status of the selected API429 receiver channel and the global receive channel message/error count information. Channel Number Value Description...
Page 150
Section 6 - Receiver Functions THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Section 7 – Receiver Monitor Functions RECEIVER MONITOR FUNCTIONS Section 7 defines the Receiver Monitor Function calls of the API S/W Library. The following functions are utilized to control the monitor mode, configure/start/stop triggers, define monitor filters and read monitor data of the receiver channel(s). These commands can only be applied to 429 channels, which are configured as receiver.
Section 7 – Receiver Monitor Functions Api429CmdRmCapDef AiUInt8 Api429CmdRmCapDef( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_RCV_CAP_MODE_CMD *px_CapMode ); API429_RM_CAP_CON (0xB3) This function is utilized to specify the monitor capture mode on the selected API429 receiver channel. Channel Number Value Description 1..32 API429 receiver channel number (channel in framing mode) Pointer to Trigger Mode Data structure (api429.h) typedef struct...
Page 153
Section 7 – Receiver Monitor Functions Trace After Trigger Value ‘mode’ Value Description Continuous Capturing enabled 1..0xxxh Start capture on any trigger event and store 'tat' entries to the monitor buffer before data capturing is halted. (xxx = max. stack size in entries) Continuous Capturing enabled (Recording) Note: The 'tat' value should not be greater than the monitor stack size! Note: After "Api429CmdReset"...
This function is utilized to read the new stack entries from the monitor stack of the selected Arinc 429 receiver channel since the last call of the function. Only up to 32 entries can be read. If more then 32 entries are on the stack, the oldest 32 entries will be read.
Page 155
Section 7 – Receiver Monitor Functions If entry found: 32 bit Timetag Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 MINUTES SECONDS Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16...
Page 156
Section 7 – Receiver Monitor Functions The parameters GSM and LSS are representing the global settings done in the command Api429CmdReset(). Value Constant Description API429_LO_SPEED Low Speed Data API429_HI_SPEED High Speed Data Hours of the IRIG Time-Tag Value Constant Description API429_CMD_OK Execution success API429_CMD_ERR...
Section 7 – Receiver Monitor Functions Api429CmdRmFuncBlkDef AiUInt8 Api429CmdRmFuncBlkDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_Con, TY_API429_RCV_FB_CMD *px_FuncBlk ); API429_RM_LABEL_FB_CON (0xB5) This function controls the specified monitor label descriptor function block on the selected API429 receiver channel. Function blocks are used on the API429 for comprehensive complex function triggering, label filtering and range checking.
Page 159
Section 7 – Receiver Monitor Functions Upper Limit Control Invert If 'uli' is set to one (default setting is 0), the 'upper limit check (ulc)' will result in the following checks: 'ulc' Description Never Not equal (!=) Not greater than (<=) Not less than (>=)
Page 160
Section 7 – Receiver Monitor Functions If the result of the function block operation is "TRUE" these bits indicate which bit positions have to be RESET in the monitor function trigger status register. Note: If all trigger qualify bits in "trg_set" and "trg reset" are set to zero, none of the function trigger bits will be changed (filtering and range checking).
Section 7 – Receiver Monitor Functions Api429CmdRmHalt AiUInt8 Api429CmdRmHalt( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_RM_HALT (0xB7) This function suspends the monitor operation on the selected API429 monitor. This function shall only be used after the "Api429CmdRxStart command". Channel Number Value Description 1..32 API429 receiver channel number...
Section 7 – Receiver Monitor Functions Api429CmdRmIni AiUInt8 Api429CmdRmIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Mode ); API429_RM_INI (0xB0) This function initializes the monitor mode of the selected API429 receiver channel. All label descriptors are disabled, monitor stack is cleared and monitor operation on the selected channel is halted.
Section 7 – Receiver Monitor Functions Api429CmdRmReadRecData AiUInt8 Api429CmdRmReadRecData( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_RM_REC *px_RecStatus, void *p_Buffer, AiUInt32 *pl_BytesRead ); Indirect calls: API429_RM_REC_STATUS_READ (0xBE) API429_RM_COPY_REC_DATA (0xBF) This function allows an easy implementation of an ARINC Recording task. The recording status information is read, if the transmitter is operating in the Continuous Capture Recording mode.
Page 165
Section 7 – Receiver Monitor Functions Reserved (0) Reserved (0) Actual value of the Half Buffer Full interrupt counter initial value parameter “rec_filesize’ function Api429CmdRmCapDef and is decremented each time a Half Buffer Full interrupt occurs. In that case the Receiver Monitor Buffer contents are copied from the Global RAM into the Shared RAM area of the API429 board.
Section 7 – Receiver Monitor Functions Api429CmdRmStart AiUInt8 Api429CmdRmStart( AiUInt8 b_Module, AiUInt8 b_Chn ); API429_RM_START (0xB6) This function restarts the monitor operation on the selected API429 monitor channel after the monitor operation is suspended via the "Api429CmdRmHalt command". This function shall only be used after the "Api429CmdRxStart command". Channel Number Value Description...
Section 7 – Receiver Monitor Functions Api429CmdRmStatusRead AiUInt8 Api429CmdRmStatusRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 *pb_RmStatus, AiUInt16 *pw_Msw ); API429_RM_STATUS_READ (0xB8) This function is utilized to read the execution status of the monitor on the selected API429 receiver channel. Channel Number Value Description API429 receiver channel number...
Section 7 – Receiver Monitor Functions 7.10 Api429CmdRmStkDataRead AiUInt8 Api429CmdRmStkDataRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Cnt, AiUInt8 b_Spt, AiUInt8 b_Eos, AiUInt16 w_Noe, AiUInt8 b_Update, TY_API429_RCV_STACK_ENTRY *px_SData ); API429_RM_STACK_READ (0xBA) This function is utilized to read one or more stack entries from the monitor stack of the selected API429 receiver channel.
Page 169
Section 7 – Receiver Monitor Functions Clear Update Flag Value Description Disable Update Enable Update The Update flag in the buffer report word will be set to 1 after the execution of this command. Array of pointer to Stack Entry Data structure (api429.h) typedef struct AiUInt32 ldata;...
Page 170
Section 7 – Receiver Monitor Functions Entry Error Type Information, if 'ERT' = 1 (see monitor status word of the 'READ RECEIVER MONITOR STATUS command'). Value (may be Description combined) 00000b No error detected 00011b Bitcount high/low error 00101b Coding error 01001b Gap error 10001b...
Section 7 – Receiver Monitor Functions 7.11 Api429CmdRmStkFind AiUInt8 Api429CmdRmStkFind( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Spt, AiUInt8 b_Eos, AiUInt32 l_Noe, AiUInt8 b_Ets, AiUInt32 l_Etv, AiUInt32 l_Etm, AiUInt8 *pb_Fnd, AiUInt32 *pl_Ptr, TY_API429_RCV_STACK_ENTRY *px_SData ); API429_RM_STACK_FIND (0xBB) This function is utilized to find a specific entry on the monitor stack of the selected API429 receiver channel.
Page 172
Section 7 – Receiver Monitor Functions Entry Type to search for Value Description Label number specified in 'l_Etv' Label data equal to value specified in 'l_Etv' and 'l_Etm' Label data greater the value specified in 'l_Etv' and 'l_Etm' Label data less than value specified in 'l_Etv' and 'l_Etm' Error specified in 'l_Etv' Entry value to find (most significant byte first) Value...
Page 173
Section 7 – Receiver Monitor Functions If entry found: 32 bit Timetag Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 MINUTES SECONDS Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16...
Page 174
Section 7 – Receiver Monitor Functions Low Speed Selector The parameters GSM and LSS are representing the global settings done in the command Api429CmdReset(...). For further descriptions see page 50. Value Constant Description API429_LO_SPEED Low Speed Data API429_HI_SPEED High Speed Data Hours of the IRIG Time-Tag Value Constant...
Section 7 – Receiver Monitor Functions 7.12 Api429CmdRmStkPtrRead AiUInt8 Api429CmdRmStkPtrRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt32 *pl_Stp, AiUInt32 *pl_Ctp, AiUInt32 *pl_Etp ); API429_RM_STACKP_READ (0xB9) This function is utilized to read the monitor stack pointers on the selected API429 receiver channel. Channel Number Value Description 1..32...
Section 7 – Receiver Monitor Functions 7.13 Api429CmdRmTrgDef AiUInt8 Api429CmdRmTrgDef( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_RCV_TRG_MODE_CMD *px_TrgMode ); API429_RM_TRG_CON (0xB2) This command is utilized to specify the monitor trigger mode on the selected API429 receiver channel. Channel Number Value Description 1..32 API429 receiver channel number (channel in framing mode) Pointer to Trigger Mode Data structure (api429.h)
Page 177
Section 7 – Receiver Monitor Functions Interrupt Mode Value Constant Description API429_TRG_IR_DIS No interrupt API429_TRG_IR_START Monitor 'Start trigger interrupt' enabled API429_TRG_IR_STOP Monitor 'Stop trigger interrupt' enabled API429_TRG_IR_BFI Monitor 'Buffer full interrupt' enabled API429_TRG_IR_HFI Monitor 'Buffer half full interrupt' enabled Value Description Disable strobe external trigger output on any trigger event Enable strobe external trigger output on any trigger event...
Section 7 – Receiver Monitor Functions 7.14 Api429CmdRmTrgParamDef AiUInt8 Api429CmdRmTrgParamDef( AiUInt8 b_Module, AiUInt8 b_Chn, TY_API429_TRG_PAR_CMD *px_Para ); API429_RM_TRG_PARA (0xBC) This function is utilized to set the start/stop trigger pattern and the corresponding mask. Channel Number Value Description 1..32 API429 receiver channel number Pointer to Trigger Parameter Data structure (api429.h) typedef struct AiUInt8...
Section 7 – Receiver Monitor Functions 7.15 Api429CmdRmTrgStartDef AiUInt8 Api429CmdRmTrgStartDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_Con, TY_API429_TRG_CTL_CMD *px_Ctl ); API429_RM_TRG_START (0xC0) This function defines the monitor start trigger condition. Note: The settings in the "Api429CmdRmTrgParam command" will be overwritten if this command is used.
Page 181
Section 7 – Receiver Monitor Functions Lower Limit Start Trigger Function Mode Value Description Equal Not equal Less than Greater than Upper Limit Start Trigger Function Mode Value Description Equal Not equal Less than Greater than Reserved (0) Monitor Trigger Mask Monitor Trigger Lower Limit Monitor Trigger Upper Limit none...
Section 7 – Receiver Monitor Functions 7.16 Api429CmdRmTrgStopDef AiUInt8 Api429CmdRmTrgStopDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Label, AiUInt8 b_Sdi, AiUInt8 b_Con, TY_API429_TRG_CTL_CMD *px_Ctl ); API429_RM_TRG_STOP (0xC1) This function defines the monitor stop trigger condition. Note: The settings in the "Api429CmdRmTrgParam command" will be overwritten if this command is used.
Page 183
Section 7 – Receiver Monitor Functions Lower Limit Stop Trigger Function Mode Value Description Equal Not equal Less than Greater than Upper Limit Stop Trigger Function Mode Value Description Equal Not equal Less than Greater than Reserved (0) Monitor Trigger Mask Monitor Trigger Lower Limit Monitor Trigger Upper Limit none...
Page 184
Section 7 – Receiver Monitor Functions THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Section 8 – Replay Functions REPLAY FUNCTIONS Section 8 defines the Replay Functions of the API S/W Library. The following functions are utilized to initialize/status the replay function and copy replay data. These functions can only be applied to API429 channels which are configured as transmitter.
AiUInt8 uc_CycOpr, AiUInt8 uc_RepErrors, AiUInt8 uc_RepIntMode, AiUInt8 uc_AbsLongTTag, AiUInt16 uw_DayOfYear, AiUInt32 ul_Min, AiUInt32 ul_MSec, AiUInt32 ul_FileSize); API429_REP_INI (0x60) This function is used to initialize the Replay mode of the AIM board. Channel Number Value Description API429 transmitter channel number 1..32...
Page 187
Section 8 – Replay Functions Cyclic Operation Value Description Do not restart if replay count expired Restart at buffer start if replay count expired Note: The replay count expires, when the parameter 'ul_EntryCnt' of the structure TY_API429_REP_STATUS in function Api429CmdReplayStatus becomes zero. Note: If both, 'uc_NoRepCnt' and 'uc_CycOpr', are set to 1 the parameter 'ul_EntryCnt' of the structure TY_API429_REP_STATUS in...
Page 188
Section 8 – Replay Functions Absolute Minute Offset Value Description Not used >0 Specify the offset between the recorded replay time and the actual IRIG time of the system at which the replay process shall start. The value is specified as a two's complement integer value with a possible range of one year in minutes (±525600, if no leap year) Note: The IRIG time starts with 'DAY ONE' (January 1...
Section 8 – Replay Functions Api429CmdReplayStatus AiUInt8 Api429CmdReplayStatus( AiUInt8 b_Module, AiUInt8 uc_Chn, TY_API429_REP_STATUS *px_RepStatus); API429_REP_STATUS_READ (0x65) This function is used to read the replay status information. The initial value of parameter 'ul_RpiCnt' indicates the amount of half buffer transmitted interrupts required for writing the requested replay file size (refer to parameter 'ul_FileSize' of library function Api429CmdReplayIni).
Page 190
Buffer Transmitted Interrupt occurs) When the 'ul_RpiCnt' value is incremented, new replay data should be reloaded to the Shared RAM and should be copied from the Shared RAM to the Global RAM of the AIM board area using the library function 'Api429WriteRepData'.
Buffer Transmitted Interrupt occurs) When the 'ul_RpiCnt' value is incremented, new replay data should be reloaded to the Shared RAM and should be copied from the Shared RAM to the Global RAM of the AIM board area using thîs library function.
Page 192
Api429CmdReplayIni) will be reached. Start Address of the AIM board replay buffer in the Global RAM area to copy the replay buffer entries from the application buffer area (parameter 'pv_Buf') to the Global RAM area of the AIM board.
Section 9 - Scenario Functions SCENARIO FUNCTIONS Section 9 defines the Scenario Functions of the API S/W Library. The scenario commands provide comprehensive dynamic data generation for label transfers. Within the 23-bit label data, up to 4 fields can be defined which are affected by dynamic data functions.
Section 9 - Scenario Functions Api429CmdSceClr AiUInt8 Api429CmdSceClr( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Sce ); API429_SCE_CLR (0xE1) This command initializes the scenario tables and frees allocated memory areas on the API429. Note: After the Scenario Execution Time, the Scenario will stay on the last transmitted value.
Section 9 - Scenario Functions Api429CmdSceCtl AiUInt8 Api429CmdSceCtl( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Sce, AiUInt8 b_Mode ); API429_SCE_CTL (0xE3) This command controls the defined transmitter scenario operation. Note: This command is not supported on APM boards! Channel Number Value Description Affect all transmit channels 1..32 API429 transmitter channel number...
Section 9 - Scenario Functions Api429CmdSceDef AiUInt8 Api429CmdSceDef( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Sce, AiUInt8 b_XferId, AiUInt8 b_Label, TY_API429_SCE_XFER_DATA *px_Data ); API429_SCE_DEF (0xE0) This command defines dynamic data generation for a given label transfer. Note: This command is not supported on APM boards! Channel Number Value Description...
Page 198
Section 9 - Scenario Functions 'Refresh Rate Value Description 10, 100, 200 Data Refresh Rate in ms Reserved (0) Reserved (0) Label Init Data (bit 8-31 of label data, right aligned) Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24...
Page 199
Section 9 - Scenario Functions 'Dynamic Data Function Type Value Constant Description API429_FLD_OFF no function = field OFF API429_FLD_FNC_ Ramp RAMP f(t)=C+a*(t+t0) (0 <= t < T) - fpar1: offset - fpar2: scale - fpar3: time in ms after ramp is reset (reset to start value f(0) ) - fpar4:...
Section 9 - Scenario Functions Api429CmdSceIni AiUInt8 Api429CmdSceIni( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 b_Sce, AiUInt32 l_ExecTime ); API429_SCE_INI (0xE2) This command initializes the scenario. This command must be called after all 'DEFINE TRANSMITTER SCENARIO DATA' commands (Api429CmdSceCtl) have been called for the given channel. Note: This command is not supported on APM boards! Channel Number...
Section 9 - Scenario Functions Api429CmdSceRead AiUInt8 Api429CmdSceRead( AiUInt8 b_Module, AiUInt8 b_Chn, AiUInt8 *pb_Sco, AiUInt8 *pb_Sce, AiUInt8 *pb_Status, AiUInt32 *pl_Time ); API429_SCE_INI (0xE4) This command controls the defined transmitter scenario operation. Note: This command is not supported on APM boards! Channel Number Value Description...
API S/W Library. Included in this section is the following: Error reporting design and result of error message on AIM BOARD 429 performance Complete list of Driver Command Codes and the associated API S/W Library function call.
Section 10 – Troubleshooting Figure 10.1-1 API S/W Library Function / Target S/W Interfaces info info info API Library ApiIO _ApiIO Target S/W Function status status status /ACK /ACK /ACK Errors can be detected and error messages displayed at various points in the communication process as shown by the points 1-4.
Section 10 – Troubleshooting The example error message in Figure 10.1-3 occurred when ApiCmdBCFrameDef function call contained a parameter (minor frame ID) out of range. Figure 10.1-3 Example "Error in function " Error Message Once this type of error message is generated, the user should then return to the user's program, locate the function call in question and correct the specified error.
Page 206
Otherwise AIM support should be notified as instructed at the start of section 10. If the ApiIo function verifies all parameters passed to it are valid and within range it then sets up command buffers to be sent to the Target S/W and calls the appropriate OS driver via the _ApiIo API S/W Library function.
Section 10 – Troubleshooting Error Reporting by ApiIo Function Call - Point 3 At point 3, command status and acknowledgement information is returned by the Target software to the ApiIo function. If the command status indicates an error, an error message as shown in Figure 10.1-4 will be displayed: Figure 10.1-4 _ApiIo Driver Command Status Error Error detected: _ApiIo() for module:a, biu:b returned API_ERR (cmd = xxxxxxxx, tg=c, err_msg=d)
Section 10 – Troubleshooting After either of the two error messages as shown in Figures 10.1-4 and 10.1-5 are received, an error message routine will be called to interpret the error code and acknowledgment codes returned by the Target S/W. Another error message will immediately follow which is shown in Figure 10.1-6.
Section 10 – Troubleshooting Error Reporting by API S/W Library Function - Point 4 At point 4, execution will be returned to the original API S/W Library function issuing the command. The API S/W Library function will receive a status code returned by ApiIo.
Section 10 – Troubleshooting 10.2 Driver Command Codes and Associated Library Function Calls Table 10.2-I defines the list of all driver command codes implemented by the API S/W Library functions. The table should be used to help the user decode error messages received by the Target software.
Page 214
Section 11 - Notes IRIG B Inter Range Instrumentations Group Time code Format Type B Kbit kilobit kilohertz Logic Cell Array (XILINX - Programmable Gate Array) low speed Least Significant Bit Mbps Mega bit per second Mega hertz Message Identifier millisecond most significant bit No operation - indicates no executable code...
"big end first" with the uppermost 8 bits at the lowest address. Data Buffer an area of memory on the AIM 429 device (global RAM) assigned by the programmer to accommodate 429 transfer(s) Driver Command...
Page 216
Section 11 - Notes THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Page 217
Appendix A – Document/Software History APPENDIX A DOCUMENT/SOFTWARE HISTORY Software Library Reference Manual for VME 429...
Page 218
Appendix A – Document/Software History THIS PAGE IS INTENTIONALLY LEFT BLANK Software Library Reference Manual for VME 429...
Appendix A – Document/Software History APPENDIX A - DOCUMENT/SOFTWARE HISTORY Appendix A provides information regarding the software and documentation changes that have occurred for each version of the API S/W Library. This information is provided in two forms: Table A-I Summary of Changes for each Version Update - This table includes a definition of changes for each s/w library function and a general summary of the documentation changes outside of the function calls.
Page 220
General Initial Port from Api Documentation Revision A 5.3x General Corrected address of AIM USA Revision B - Corrected “systems functions” overview table (chapter 40.) Api429CmdBiuIntrCheck was written incorrect - Moved replay mode description from end of function Api429CmdTxXferRead to end of function...
Page 221
Appendix A – Document/Software History Version General or S/W Function Description Change Api429CmdTxStatusRead pb_TxStatus – removed status values 3 – 6 – they are not supported yet. 5.6x Api429SetDllDbgLevel Added Revision A Api429CmdRmFuncBlkDef Increased range of parameter fb_id from 22 to 30 Api429CmdReset Added note to Api429CmdReset parameter chn_cfg, that on AMC429 the upper 16 channels can’t be selected.
Page 222
Appendix A – Document/Software History Version General or S/W Function Description Change VMEuserInterruptFunction Added note Api429CmdTxMajFrameInst Changed range of *pb_Frames from 0..63 to 0..127 Api429CmdTxMinFrameInst Changed range of b_FrmId from 0..63 to 0..127 Changed range of b_XferCnt from 1..64 to 1..255 Api429CmdTxMinFrameInstEx Added AiVMEModuleListBuild...
Page 223
Appendix A – Document/Software History Version General or S/W Function Description Change Avi429BoardIni Removed Avi429BoardIniEx Avi429ModuleCheck Ai429ModuleOpen Avi429InitVmeInt Avi429DelVmeInt AiVmeInitInterrupt Api429CmdTimerIntrCheck Removed Api429ReadBspVersion Api429CmdTimerIntCon Api429GetTcomStatus Api429ReadBiuData Api429ReadBlockBiuData Api429WriteBiuData Api429WriteBlockBiuData Chapter 2 “C Header Files” Removed 6.0x Api429CmdSetIrigTime Corrected description of parameter “b_irig_src” Revision B Api429ReadMemData Corrected values for parameter memtype...
Page 224
Appendix A – Document/Software History Version General or S/W Function Description Change Api429CmdTxMinFrameInstEx Changed parameter ‘px_MFrame->puc_Xfers’ from AiUInt8* to AiUInt32* Changed parameter range of ‘px_MFrame->ul_XferCnt’ from 1..255 to 1..2000 Added note that each minor frame is dynamically allocated Api429CmdTxMinFrameInst Changed parameters ‘b_FrmId’ and ‘b_XferCnt’ from AiUint8 to AiUInt32 and parameter ‘*pb_Xfers’...
Appendix A – Document/Software History Table A-I Summary of Version Changes for each S/W Library Function C - Changes (including prototype, Dynamic Link Library Legend: (DLL) and/or documentation changes) D - Only documentation was changed R - Removed V7.0x V6.0x V5.7x V5.6x V5.4x...
Need help?
Do you have a question about the ARINC 429 and is the answer not in the manual?
Questions and answers