Aim ARINC 429, AMC429, AVC429, AVI429 Reference guide

  • Hello! I am an AI chatbot trained to assist you with the Aim ARINC 429 Reference guide. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
reference manual
April 2010
V07.0x Rev. A
AIM GmbH
Sasbacher Str. 2
79111 Freiburg, Germany
Tel: +49-761-45229- 0
Fax: +49-761-45229- 33
www.aim-online.com
ARINC 429
Interface Module
for VxWorks
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
ii
AIM WORLDWIDE
AIM GmbH
Sasbacher Str. 2
79111 Freiburg, Germany
+49-761-45 22 90
Munich Sales Office
Terofalstrasse 23 a
80689 Muenchen
+49-89-70 92 92 92
AIM-USA
3703 North 200
th
Street
Elkhorn, NE 68022
866-AIM-1553
866-AIM-A429
AIM UK
Cressex Business Park
Lincoln Rd, High Wycombe
Bucks HP12 3RB, England
+44-1494-44 68 44
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.
©
Copyright 2005-2010: AIM
www.aim-online.com
iii
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 See Appendix A for details
5.4x Revision A 03.05.2005 Jochen Pfaadt See Appendix A for details
5.4x Revision B 20.06.2005 J. Furgerson See Appendix A for details
5.6x Revision A 29.06.2007 Jochen Pfaadt See Appendix A for details
5.6x Revision B 30.07.2007 S. Riedinger Unify names of products
5.7x Revision A 07.10.2008 Jochen Pfaadt See Appendix A for details
6.0x Revision A 10.11.2009 Jochen Pfaadt See Appendix A for details
6.0x Revision B 20.11.2009 Jochen Pfaadt See Appendix A for details
7.0x Revision A 22.04.2010 Jochen Pfaadt See Appendix A for details
iv
THIS PAGE IS INTENTIONALLY LEFT BLANK
v
TABLE OF CONTENTS
Section Title Page
1 INTRODUCTION............................................................................................................1
1.1 General......................................................................................................................1
1.2 How This Manual is Organized..................................................................................1
1.3 Conventions Used .....................................................................................................3
1.3.1 General Documentation Conventions....................................................................3
1.3.2 Parameter Naming Conventions ...........................................................................4
1.3.3 Function Call Documentation Conventions ...........................................................5
1.3.4 Function Call Documentation Conventions for "b_Module"...................................6
1.4 Applicable Documents...............................................................................................7
1.4.1 Industry..................................................................................................................7
1.4.2 AIM Document Family...........................................................................................7
2 LIBRARY ADMINISTRATION FUNCTIONS .................................................................9
2.1 Library Administration Functions..............................................................................10
2.1.1 Api429DelIntHandler ...........................................................................................10
2.1.2 Api429EnableErrMsg ..........................................................................................11
2.1.3 Api429GetTgEmul...............................................................................................12
2.1.4 Api429Init ............................................................................................................13
2.1.5 Api429InstIntHandler...........................................................................................14
2.1.6 Api429SetTgEmul ...............................................................................................20
2.1.7 Api429SetDllDbgLevel ........................................................................................21
2.1.8 Avi429Close ........................................................................................................22
2.1.9 Avi429Open.........................................................................................................23
2.2 VME Intialization Functions .....................................................................................24
2.2.1 AiVmeExamineSlot..............................................................................................24
2.2.2 Ai429CheckModule .............................................................................................26
2.2.3 AiPciScan............................................................................................................27
2.2.4 AiPciGetHeader...................................................................................................28
2.2.5 AviInitVmeGenericInterrupt .................................................................................29
2.2.6 AiVme429MapModule.........................................................................................31
2.2.7 AiVme429UnmapModule ....................................................................................33
3 SYSTEM FUNCTIONS.................................................................................................35
3.1 Api429CmdBite........................................................................................................36
3.2 Api429CmdBiuIntrCheck .........................................................................................38
3.3 Api429CmdChnIntCon.............................................................................................41
3.4 Api429CmdDefChnSpeed .......................................................................................42
3.5 Api429CmdExecSys................................................................................................43
3.6 Api429CmdGetIrigTime ...........................................................................................44
3.7 Api429CmdIni ..........................................................................................................46
3.8 Api429CmdInitDiscretes ..........................................................................................50
3.9 Api429CmdLoadSRec .............................................................................................51
3.10 Api429CmdProgFlash..............................................................................................53
3.11 Api429ReadBSPVersionEx......................................................................................54
3.12 Api429CmdReadDiscretes ......................................................................................57
3.13 Api429CmdReadDrvVer ..........................................................................................58
vi
3.14 Api429CmdReset.....................................................................................................59
3.15 Api429CmdSetIrigTime............................................................................................63
3.16 Api429CmdWriteDiscretes.......................................................................................65
4 MEMORY FUNCTIONS...............................................................................................67
4.1 Api429CmdRamRead..............................................................................................68
4.2 Api429CmdRamWrite..............................................................................................69
4.3 Api429ReadBlockMemData.....................................................................................70
4.4 Api429ReadMemData .............................................................................................72
4.5 Api429WriteBlockMemData.....................................................................................73
4.6 Api429WriteMemData..............................................................................................75
5 TRANSMITTER FUNCTIONS......................................................................................77
5.1 Api429CmdTxAmpIni...............................................................................................78
5.2 Api429CmdTxFrmTimeIni........................................................................................79
5.3 Api429CmdTxFrmTimeIniEx....................................................................................80
5.4 Api429CmdTxGetBufAddress..................................................................................81
5.5 Api429CmdTxHalt....................................................................................................82
5.6 Api429CmdTxIni ......................................................................................................83
5.7 Api429CmdTxMajFrameInst....................................................................................85
5.8 Api429CmdTxMajFrmDel.........................................................................................86
5.9 Api429CmdTxMinFrameInst....................................................................................87
5.10 Api429CmdTxMinFrameInstEx................................................................................89
5.11 Api429CmdTxMinFrmDel.........................................................................................91
5.12 Api429CmdTxReplayData .......................................................................................92
5.13 Api429CmdTxStart ..................................................................................................96
5.14 Api429CmdTxStartEx ..............................................................................................98
5.15 Api429CmdTxStatusRead .....................................................................................102
5.16 Api429CmdTxXferDataDef ....................................................................................103
5.17 Api429CmdTxXferDataRead .................................................................................105
5.18 Api429CmdTxXferDef............................................................................................107
5.19 Api429CmdTxXferDefEx........................................................................................110
5.20 Api429CmdTxXferDel............................................................................................113
5.21 Api429CmdTxXferEnaDis......................................................................................114
5.22 Api429CmdTxXferEnaMixChannel........................................................................115
5.23 Api429CmdTxXferRead.........................................................................................116
5.24 Api429CmdTxXferReadEx.....................................................................................118
6 RECEIVER FUNCTIONS...........................................................................................121
6.1 Api429CmdRxEnaMixChannel ..............................................................................122
6.2 Api429CmdRxGetBufAddress ...............................................................................123
6.3 Api429CmdRxHalt .................................................................................................124
6.4 Api429CmdRxIni....................................................................................................125
6.5 Api429CmdRxLabCon...........................................................................................127
6.6 Api429CmdRxLabDataCon....................................................................................129
6.7 Api429CmdRxLabDataRead..................................................................................131
6.8 Api429CmdRxLabRead.........................................................................................133
6.9 Api429RxReadActivity ...........................................................................................135
6.10 Api429CmdRxPollBlkDef.......................................................................................136
6.11 Api429CmdRxStart................................................................................................138
6.12 Api429CmdRxStatusRead.....................................................................................139
vii
7 RECEIVER MONITOR FUNCTIONS.........................................................................141
7.1 Api429CmdRmCapDef ..........................................................................................142
7.2 Api429CmdRmDataRead ......................................................................................144
7.3 Api429CmdRmFuncBlkDef....................................................................................147
7.4 Api429CmdRmHalt................................................................................................151
7.5 Api429CmdRmIni...................................................................................................152
7.6 Api429CmdRmLabCon..........................................................................................153
7.7 Api429CmdRmReadRecData................................................................................154
7.8 Api429CmdRmStart...............................................................................................156
7.9 Api429CmdRmStatusRead....................................................................................157
7.10 Api429CmdRmStkDataRead.................................................................................158
7.11 Api429CmdRmStkFind ..........................................................................................161
7.12 Api429CmdRmStkPtrRead....................................................................................165
7.13 Api429CmdRmTrgDef............................................................................................166
7.14 Api429CmdRmTrgParamDef.................................................................................168
7.15 Api429CmdRmTrgStartDef....................................................................................170
7.16 Api429CmdRmTrgStopDef....................................................................................172
8 REPLAY FUNCTIONS...............................................................................................175
8.1 Api429CmdReplayIni.............................................................................................176
8.2 Api429CmdReplayStatus.......................................................................................179
8.3 Api429WriteRepData.............................................................................................181
9 SCENARIO FUNCTIONS ..........................................................................................183
9.1 Api429CmdSceClr .................................................................................................184
9.2 Api429CmdSceCtl .................................................................................................185
9.3 Api429CmdSceDef ................................................................................................187
9.4 Api429CmdSceIni..................................................................................................191
9.5 Api429CmdSceRead .............................................................................................192
10 TROUBLESHOOTING...............................................................................................193
10.1 Error Reporting Design..........................................................................................193
10.2 Driver Command Codes and Associated Library Function Calls...........................200
11 NOTES.......................................................................................................................203
11.1 Acronyms and Abbreviations.................................................................................203
11.2 Definition of Terms.................................................................................................205
APPENDIX A............................................................................................................................207
APPENDIX A - DOCUMENT/SOFTWARE HISTORY..............................................................209
viii
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 Delay Time of Replay Data Block...................................................................95
Table 6-I Receiver Function Descriptions....................................................................121
Table 7-I Receiver Monitor Function Descriptions.......................................................141
Table 8-I Replay Function Descriptions.......................................................................175
Table 9-I Scenario Function Descriptions....................................................................183
Table 10.2-I Driver Command Codes vs. API Function Calls..........................................200
Table A-I Summary of Changes for each Version Update...........................................210
Table A-I Summary of Version Changes for each S/W Library Function.....................215
LIST OF FIGURES
Figure Title Page
Figure 1.3.3-1 Document Conventions ....................................................................................5
Figure 6.11-1 Replay Data Block..........................................................................................94
Figure 5.13-1 Transmitter Label Transfer Cycle (Major Frame)..........................................100
Figure 5.13-2 Transmitter Label Transfer Frame (Minor Frame)........................................100
Figure 10.1-1 API S/W Library Function / Target S/W Interfaces .......................................194
Figure 10.1-2 "ERROR in function" Error Message...........................................................194
Figure 10.1-3 Example "Error in function " Error Message.................................................195
Figure 10.1-4 _ApiIo Driver Command Status Error...........................................................197
Figure 10.1-5 Did Not Get Expected Ack - Acknowledgement Error ..................................197
Figure 10.1-6 Target S/W Status and Acknowledge Interpretation Message.....................198
Figure 10.1-7 Example Target S/W / Host API S/W Library Function Error Reporting .......199
Software Library Reference Manual for VME 429 1
Section 1 - Introduction
1 INTRODUCTION
1.1 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. This Software Library Reference Manual
provides the user with detailed VME 429 programming information including library
function call and header file details and specific troubleshooting information.
1.2 How This Manual is Organized
This reference manual is divided into the following sections:
Section 2
Library
Admin
& Initialization
Section 3
System
Functions
Section 4
Memory
Functions
Sections 2 - 4 comprise the system setup and support
functions used when controlling an VME 429 device.
2 Software Library Reference Manual for VME 429
Section 1 - Introduction
Provides detailed information regarding the history
of the API Library reference software and
documentation
App A
Document
/ Software
History
Section 10
Trouble-
shooting
Section 10 contains helpful information enabling the
user to interpret error messages and steps to take to
correct those errors.
Section 5
Transmitter
Functions
Section 6
Receiver
Functions
Section 7
Receiver
Monitor
Functions
Section 8
Replay
Functions
Sections 5 - 9 contain the
function calls used to setup the
main functions on the VME 429
device including:
Transmitter
Receiver
Monitor
Replay
Scenario
Section 9
Scenario
Functions
Software Library Reference Manual for VME 429 3
Section 1 - Introduction
1.3 Conventions Used
1.3.1 General Documentation Conventions
We use a number of different styles of text and layout in this document to help
differentiate between the different kinds of information. Here are some examples of
the styles we use and an explanation of what they mean:
Italics - used as a placeholder for the actual name, filename, or version of the
software in use
Bold text - a function, or parameter, or used to highlight important information
Bold italics - caution, warning or note
Font - font used to show paths, directories and filenames within the body of text will
be shown in blue, for example:
C:\Windows\System32\Drivers\Aim_mil.sys
A smaller version of this font will be used to list
software code.
In addition to text and layout convention, there are a couple of naming conventions
used to simplify the information herein. The AMC429 and AVI429 interface modules
utilize the same s/w library functions, also called the Application Program Interface
(API). Therefore, for ease of documentation flow, this s/w library will be referred to
from this point on as the 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. The Application Interface is the software interface
between the API S/W Library function calls and the Target S/W.
4 Software Library Reference Manual for VME 429
Section 1 - Introduction
1.3.2 Parameter Naming Conventions
Naming conventions have been used for naming constants, structures, functions
calls and data types throughout the API S/W Library. All constants, structures and
Data Types used in the API S/W Library are defined in the Api429.h header file
which is contained in Section 2. Function prototypes used in the API S/W Library are
defined in Api429fnc.h, also defined in Section 2. Naming conventions used include
the following
• Constants - For every function call, a list of constants have been defined to
better describe the numerical value of the function input or output (located in
Api429.h)
• Structures - Named as ty_api_name where name is unique to the structure
(located in Api429.h)
• Functions - Named as either Api429name or Api429Cmdname -
Api429name functions do not involve driver commands to the target
hardware
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
API S/W Library Data Type
Size
(in bytes)
AiInt integer 4
AiUInt unsigned integer 4
AiInt8 character 1
AiInt16 short integer 2
AiInt32 long integer 4
AiUInt32 unsigned long integer 4
AiUnt16 unsigned short integer 2
AiUInt8 unsigned character 1
AiChar character 1
AiUChar unsigned character 1
AiDouble double floating point 8
AiFloat single floating point 4
Software Library Reference Manual for VME 429 5
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
Prototype:
return value data type function name (function parameter(s));
Driver Command:
Constant Definition (value)
Purpose:
Purpose of the function
Input
list of inputs
Output
list of outputs
Return Value
return value
Data type of the return
value. Will show "Void"
if there is no return value
Specifies the hex code
for the driver command
used by the target s/w to
accomplish the action
required by the function.
See Section 10 for a
complete list.
Specifies the inputs to
the function. All possible
input values are detailed
.
Outputs are provided via an
address specified as an input
parameter. The structure and
content of the information
output to that address location
is specified here.
The value returned via the
function is a status/error code
defining the success/failure of the
function call. The status/error
code value is detailed here.
Specifies the
parameters to be
passed to the function,
the function name and
the type of the return
value.
6 Software Library Reference Manual for VME 429
Section 1 - Introduction
1.3.4 Function Call Documentation Conventions for "b_Module"
Most API S/W Library function calls require the parameter "b_Module". In order to
simplify the manual, this function parameter is not detailed in the documentation for
each function call, therefore, it is defined here as follows:
• "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 7
Section 1 - Introduction
1.4 Applicable Documents
1.4.1 Industry
ARINC Specification 429-14, March 10, 1993
PCI Local Bus Specification, Revision 2.1, June 1991
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:
VME Generic Interface Library - provides a general overview of how to access AIM
cards using the VME bus.
AMC429 Hardware Manual - the hardware user’s manual for the AMC429 PMC
modules. The document covers the hardware installation, the board
connections the technical data and a general description of the hardware
architecture.
AVI429 Hardware Manual - the hardware user’s manual for the AVI429-8 AVI429-
16 and AVI429-32 VME-Bus modules. The document covers the hardware
installation, the board connections the technical data and a general
description of the hardware architecture.
AVC-2 Hardware Manual - the hardware user’s manual for the AVC-2 PMC-VME-Bus
carrier. The document covers the hardware installation, the technical data and a
general description of the hardware architecture.
8 Software Library Reference Manual for VME 429
Section 1 - Introduction
THIS PAGE IS INTENTIONALLY LEFT BLANK
Software Library Reference Manual for VME 429 9
Section 2 – Library Administration Functions
2 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. The VME initialization functions provide VME specific initialization and
interrupt handler setting. Table 2-I defines the list and definition of Library
Administration functions and Table 2-II defines the VME Initializtion functions. The
function calls in these tables are listed in a functional order, however, the detailed
descriptions of the Library Administration function calls in the following sections are
in alphabetical order.
Table 2-I Library Administration Function Descriptions
Function Description
Api429Init
Initializes the Application Interface
Avi429Open
Initializes the Module Interface
Avi429Close
Closes the Module Interface
Api429GetTgEmul
Gets current emulation mode
Api429SetTgEmul
Sets the current emulation mode
Api429EnableErrMsg
Enables / disables the Error Message Handler
Api429SetDllDbgLevel
Sets the amount of debug information created
Api429InstIntHandler
Installs an interrupt handler function
Api429DelIntHandler
Uninstalls an interrupt handler function
Table 2-II VME Initialization Functions
Function Description
AiVmeExamineSlot
Examines the board(s) on a specific VME slot/ A16 address and
runs a PCI config cycle
Ai429CheckModule
Checks the type of module
AiPciScan
Scans the local PCI bus for known boards and returns the number
of boards handled by this driver
AiPciGetHeader
Provides the PCI header information of a board on the local PCI
bus.
AviInitVmeGenericInterrupt
Sets interrupt specific parameters of the board.
AiVme429MapModule
Maps a board to the VME bus
AiVme429UnmapModule
Removes a board from the VME bus
10 Software Library Reference Manual for VME 429
Section 2 – Library Administration Functions
2.1 Library Administration Functions
2.1.1 Api429DelIntHandler
P
P
r
r
o
o
t
t
o
o
t
t
y
y
p
p
e
e
:
:
AiUInt8 Api429DelIntHandler( AiUInt8 b_Module, AiUInt8 uc_Chn, AiUInt8 uc_Type );
D
D
r
r
i
i
v
v
e
e
r
r
C
C
o
o
m
m
m
m
a
a
n
n
d
d
:
:
None
P
P
u
u
r
r
p
p
o
o
s
s
e
e
:
:
Uninstalls a user interrupt handler function which was installed previously with the
function ‘Api429InstIntHandler’.
I
I
n
n
p
p
u
u
t
t
A
A
i
i
U
U
I
I
n
n
t
t
8
8
u
u
c
c
_
_
T
T
y
y
p
p
e
e
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.
Value Description
0
Reserved
A
A
i
i
U
U
I
I
n
n
t
t
8
8
u
u
c
c
_
_
C
C
h
h
n
n
Related channel number of the interrupt which will be uninstalled for the given
AIM board.
O
O
u
u
t
t
p
p
u
u
t
t
None
R
R
e
e
t
t
u
u
r
r
n
n
V
V
a
a
l
l
u
u
e
e
Value Constant Description
0 API429_CMD_OK
Execution success
1 API429_CMD_ERR
Execution error
/