Home
User Manual for the MIL-STD-1553B Adapter
Contents
1. lower memory des ram etc Geer memory for OS scat memory for Application PCI I O space void CPU_PCI_MEM ADRS void CPU_PCI_MEM ADRS 0xA00000 VM STATE MASK VALID VM STATE MASK WRITABLE VM STATE MASK CACHEABLE VM STATE VALID VM STATE WRITABLE VM STATE CACHEABLE NOT entries for dynamic mappings create sufficient entries DUMMY MMU ENTRY DUMMY MMU ENTRY DUMMY MMU ENTRY else CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 40 of 40
2. while 1 printf Waiting for an event n cc1553Wait event 0 20 sysClkRateGet amp event if event event type EVENT BC switch event bc event_type case END_FRAME LIST sprintf text End of list break case ILLOGICAL_FRAME sprintf text Illogical frame break case INVALID_OPCODE sprintf text Invalid opcode break case RETRY_FAILED sprintf text Retries failed break case FRAME ACCESSED sprintf text Frame accessed break default sprintf text Unknown printf n BC Event s frame index i n text event bc frame index if event event_type EVENT_TIMEOUT printf No event received n cc1553Stop 0 cc1553BCRestart frames 0 cc1553Start 0 cc1553Stop 0 printf Release message buffers n for msg cnt 0 msg cnt msg size msg_cnt free msgs msg cnt p data printf Destroying device n func status ccl553Destroy_device 0 if func status cc1553 OK cc1553Print status func status CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 37 of 40 void cc1553BMExample void cc1553Status func status cc1553DeviceMode adapter tvpe ccl553Event event cc1553BMLog log int cnt int logs rx printf Creating device n func status cc1553Create device 0 MODE BM if func status cc1553 OK cc1553Print status func status return printf Retr
3. Returns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 NOT ALLOWED WHEN STARTED cc1553 OUT OF MEMORV CCII 1553 6 MAN 001 2009 08 31 RT response status word During RT to RT it is the transmitting RT Only applicable during RT to RT transfers The receiving RT Internal time tag value i e message timestamp in microseconds Configures the number of logs before an event is raised The device will store one more log than Device identifier on the PCI bus As used in cc1553Create device Number of log entries On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE BM If the function is called after a call to cc1553Start The logs exceeds the device memory Issue 1 1 C53MANO1 WPD Page 34 of 40 7 Getting Started This section contains example code on how to use the VxWorks Software Driver include lt vxWorks h gt include 1553HostDriver h include lt sysLib h gt include lt stdio h gt include lt string h gt void cc1553RTExample void cc1553Status func status cc1553DeviceMode adapter tvpe int cnt cc1553RTStatusWord rt status cc1553Event event char event desc 50 printf Creating device n func status cc1553Create device 0 MODE RT if func status
4. Using the MIL STD 1553B VxWorks Software Driver 5 1 Overview The following flow chart shows the main functions of the VxWorks Software Driver Remote Terminal Bus Controller Bus Monitor cc1553Create device cc1553Create device cels53Create device cOl amp 53RTSet address cc1553BCConfigure frames ce1553BMEnable promiscuous mode ec15E53RTConfiqure buffers cels553Start ecl553BRTSet statusmord ecl553Wait event cCcClS553BHSet log size cOlEBSRTSet buffer eclSS3BCCet frame ccl553S8tart cel553RTLegalize command eclSS3BCGet_message ccl553Wait event ccl553 tart col5538top colSS3BMCet log ccl553Wait event ccl553BCRestart frames un cecl553RTGCet Set buffer cel5538tart cecl5538top ccl553Stop col5535top cel553Destroy device cc1553Destroy device cc1553Destroy device Figure 1 Function Overview CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 5 of 40 5 2 5 3 5 4 5 5 5 6 Creating the Device The VxWorks Software Driver supports multiple MIL STD 1553B adapters on a single host To establish a connection and construct all the device specific structures a user must create each of the devices separately using the device ID to identify it The device ID starts at 0 and increments by 1 for each of the devices Device 0 refers to the device in the lowest slot The VxWorks Software Driver can not be used until the user has created the device Example For device 0 Create one device as a Rem
5. cc1553 BUFFER TOO SMALL cc1553 SUBADDR DISABLED cc1553 MODECODE DISABLED cc1553 PINGPONG FAIL cc1553Create device SUBADDR or MODECODE Sub address or modecode value Pointer to the start of the message data The size of the message in words On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE RT If the message size exceeds the limit set by 2 2 1 If the message size exceeds the value supplied in cc15553RTConfigure buffers If cc1553RTConfigure buffers was not called for the sub address If cc1553RTConfigure buffers was not called for the modecode If the device failed to access the requested buffer CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 19 of 40 6 2 4 Receiving Data Function cc1553RTGet buffer lt addr_or_mode gt lt entry gt lt p_message gt p message size p status Returns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 BUFFER TOO SMALL cc1553 SUBADDR DISABLED cc1553 MODECODE DISABLED cc1553 PINGPONG FAIL p messages p message sizes p status Status is from busA is from busB is RTtoRT is msg error is broadcast is illegal cmd Purpose Retrieve the contents of a receive buffer Arguments dev id D
6. cc1553 OK cc1553Print status func status return printf Retrieving adapter type n adapter_type MODE_INVALID func status ccl553Adapter_type 0 amp adapter type if func status cc1553 OK adapter type MODE RT cc1553Print status func status return rt_status standard MIL_STD_1553_B rt_status clear_immediatly rt_status instrumentation rt_status service_request rt_status is_busy rt_status subsytem_flag rt_status terminal_flag ll 0 40 IA Se Se Ne Se se gt printf Setup status word n func status cc1553RTSet statusword 0 amp rt status if func status cc1553 OK cc1553Print status func status return printf Allocating buffers n for cnt 1 cnt lt 5 cnt func status ccl553RTConfigure_buffers 0 RX SUBADDR cnt cc1553 MAX MESSAGE WORDS cc1553TRUE if func status cc1553 OK break func status ccl553RTLegalize_command 0 RX SUBADDR cnt cc1553FALSE cc1553TRUE if func status cc1553 OK break func status cc1553RTLegalize command 0 RX SUBADDR cnt cc1553TRUE cc1553TRUE if func status cc1553 OK break printf Subaddresses 1 to i 0x x RX buffers allocated and legalized n cnt cnt printf Setting terminal address n func status cc1553RTSet address 0 cnt if func status cc1553 OK cc1553Print status func status return cc1553Sta
7. CT Systems CCII Systems Pty Ltd Registration No 1990 005058 07 Communications Computer Intelligence 2 Integration 2 User Manual for the MIL STD 1553B Adapter VxWorks Software Driver C Systems Document No CCII 1553 6 MAN 001 Issue Date 2009 08 31 Print Date 2009 08 31 File Name W 1553 TECH MAN C53MAN01 WPD Distribution List No DN 0649 C I Systems The copyright of this document is the property of C2l Systems The document is issued for the sole purpose for which it is supplied on the express terms that it may not be copied in whole or part used by or disclosed to others except as authorised in writing by Cl Systems Document prepared by C2I Systems Cape Town Signature Sheet a CI lect Engineer Completed by pp X Kenpex Accepted by Project Manager 12 2oS 5 31 Board Level Products CIS Systems Quality Assurance DOA O8 3 2l Systems G A SE Larm Accepted bv X Keuges 2009 08 31 Issue 1 1 Page ii of vii CCII 1553 6 MAN 001 C53MANO1 WPD Signature Sheet Completed by Project Engineer Board Level Products C l Systems Accepted by Project Manager Board Level Products C212 Systems Quality Assurance C l Systems CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 Amendment History Description Date 0 1 First draft 0 2 Updated after review 0 3 Added Bus Controller AP
8. Monitor 0 eee 8 6 R Program Interface API 002s 9 Common Interface ii ete e e a Oia Ka DN Jede ede a e dedu ap edil Vr eee 9 69 1 Create Device muii eee tee opea dob el eee eda eed 10 6 1 2 Destroy Device s re taa a aa ete a DAR tox Ye d ao ren eed 11 6 1 3 Print Out Current Version Information ccc ete eee 11 6 1 4 Builtin Test Results 7 20 amat erre kee aged s eh 4 dialed Mage bi bi riada 12 bilib PrintOdtBIT Results aa maa baka Kk hah Nipa eek tet eae i whe wires EAE atte 13 6 1 6 Retum Adapter Type essct ert xk kazi BAGAN NGA arti DUAL AD tiles Rege S 13 6 1 7 Starting the Device aset rta traida aha rete temi ade 14 6 4 8 Stopping the Device 0 hrs 14 6 1 9 Receiving VxWorks Software Driver Notifications 0 0 00 cee eae 15 6 2 Remote Terminal Interface 0 ce hr rn 17 6 2 1 Setting the Terminal Address aeaaea 17 6 2 2 Allocating Receive Transmit Buffers e e eae 18 6 2 9 Sendihng Dala soeurs ptem Slee gies MA HM ate en t ee Bt eet dae idu MAA M RR EE 19 6 2 4 Recelving Data eo Tierra ae DE eee x RU RI E a RS Ron NG 20 0 20 Status Word Flags a recie tere a tae a ie rM es Ete Sco e pe e e TRE 21 626 Internal Timer wate Sos ood ree aee ere d et 22 6 2 7 Legalising Messages e e e e m 22 6 2 8 Checking Buffer Sate 23 6 2 9 Setting Bus State 0 anana n annann 24 6 3 Bus Gontrollet Interface 4 suo c
9. a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE BC If the function is called after a call to cc1553Start If a frame references a non existent message If the device does not have enough memory to allocate all the frames and messages Pointer to a user supplied buffer for RX or TX data When used for TX data this buffer may be referenced by multiple frames The number of MIL STD 1553B data words in the message Frame control detail MIL STD 1553B command word use cc1553Encode command word to populate During RT to RT transfers this is the receive command Only applicable during RT to RT transfers The transmit command Issue 1 1 C53MANO1 WPD Page 26 of 40 msg_index status1 status2 branch_to_index timer_us Frame Control opcode retries channel is RTtoRT cond_no_response cond_msg_error cond_is_busy cond_terminal_flag cond_subsystem_fail cond_instrumentation cond_service_request block_access_ error Opcode END_OF_LIST The zero based index into the list of messages containing the data words for TX or the buffer location for RX It is allowed to use the same TX message in more than one frame MIL STD 1553B status word returned by the RT During RT to RT transfers it is the transmitting RT s status Only applicable during RT to RT transfers The receiving RT s status word The zero
10. eee 5 Figure 2 Frame Example sates re e ex eR b ba a anata RUE RR AIRE AU RU Eie tite do aig 29 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 Abbreviations and Acronyms API Application Program Interface BC Bus Controller BIT Built in Test BM Bus Monitor Mbit s Megabits per second N A Not Applicable OS Operating System PC Personal Computer PCI Peripheral Component Interconnect RT Remote Terminal RX Receive TX Transmit CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 E ib Scope 1 1 Identification This document is the user manual for the VxWorks Software Driver of the C I Systems MIL STD 1553B Adapter 1 2 System Overview The MIL STD 1553B Adapter provides the functionality of either a Bus Controller BC Remote Terminal RT or a Bus Monitor BM on a MIL STD 1553B data bus A MIL STD 1553B data bus is a half duplex dual redundant bus with a single active BC and up to 31 RTs A BM does not partake in the message exchange but records all messages on the bus for logging purposes Message exchange is based on the command response protocol between BC and RT Messages consist of up to 32 16 bit words and are sent at a rate of 1 Mbit s Messages are originated by the BC when it sends a command word followed by optional data words The RT responds with a status word and data words when requested A BC can also initiate a RT to RT message transfer The VxWorks Software Driver is a low level device dependant inter
11. enable gt cc1553TRUE cc1553FALSE Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE RT cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 24 of 40 6 3 Bus Controller Interface All functions applicable in this mode are prefixed with cc1553Bc These functions will return an error code if cc1553Create device was not called with MODE BC Some of these function calls are not allowed after a call to cc1553Start 6 3 1 Alternating Bus Retries Function cc1553BCEnable pingpong Purpose If an error occurs during transmission the BC can be configured to retry sending the message The retry can either occur on the same bus or alternate the bus on each iteration Arguments dev ids enable Heturns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 NOT ALLOWED WHEN STARTED cc1553 PINGPONG FAIL Device identifier on the PCI bus As used in cc1553Create device cc1553TRUE cc1553FALSE On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or ou
12. of 40 6 2 Remote Terminal Interface All functions applicable in this mode are prefixed with cc1553RT These functions will return an error code if cc1553Create device was not called with MODE RT Some of these function calls are not allowed after a call to cc1553Start 6 2 1 Setting the Terminal Address Function cc1553RTSet address Purpose Configure the Remote Terminal address Arguments dev id Device identifier on the PCI bus As used in cc1553Create device lt addr gt Refer to 2 2 1 Returns cc1553 OK On success cc1553 INVALID PARAM If dev id is incorrect or lt addr gt is not in the valid range cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE RT CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 17 of 40 identifier on the PCI bus As used in cc1553Create device 6 2 2 Allocating Receive Transmit Buffers Function cc1553RTConfigure buffers Purpose Allocate buffers for receive or transmit messages Arguments dev id Device lt dir gt RX or TX lt addr_or_mode gt lt entry gt lt message_size gt lt enable_interrupt gt Returns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MO
13. p timers Pointer to a user supplied buffer Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE RT p timers Internal timer value in microseconds Resolution 64 us 6 2 7 Legalising Messages Function cc1553RTLegalize command Purpose Legalise or lllegalise a command to a broadcast sub address or mode code cc1553RTGet buffer Will indicate the message status as illegal when set Arguments dev id Device identifier on the PCI bus As used in cc1553Create device lt dir gt RX or TX lt addr_or_mode gt SUBADDR or MODECODE lt entry gt Sub address or modecode value lt is_broadcast gt cc1553TRUE cc1553FALSE lt is_legal gt cc1553TRUE cc1553FALSE Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE RT cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 22 of 40 6 2 8 Note Checking Buffer State Indica
14. 3FALSE Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE BM cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start 6 4 2 Monitoring a Specific Terminal Function cc1553BMMonitor terminal Purpose Allows the monitoring of specific terminals Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device lt addr gt Remote Terminal Address to monitor lt enable gt cc1553T RUE cc1553FALSE Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE BM CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 32 of 40 cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start 6 4 3 Retrieving Logged Messages Function cc1553BMGet log Purpose Retrieves an entry from the monitor log If used in conjunction with cc1553Wait event index can be set to one more than the value of the event log index cc1553 DEV NOT INITIALIZED c
15. DE cc1553 OUT OF MEMORV cc1553 SUBADDR INUSE cc1553 MODECODE INUSE cc1553 NOT ALLOWED WHEN STARTED Note SUBADDR or MODECODE Sub address or mode code value The size of the message in words Generate an interrupt when the specified message has been received or transmitted Allows the use of cc1553Wait event On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE RT The device does not have enough internal memorv to allocated the message buffers The sub address buffer has alreadv been setup The mode code buffer has alreadv been setup If the function is called after a call to cc1553Start If the function returns cc1553 OUT OF MEMORY no more buffers can be allocated in the device s internal memory No function is supplied to release previously configured buffers CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 18 of 40 6 2 3 Sending Data Function cc1553RTSet buffer Purpose Set the contents of a transmit buffer that will be sent when requested bv the BC Arguments lt dev_id gt Device identifier on the PCI bus As used in lt addr_or_mode gt lt entry gt p messages message size Heturns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 MESSAGE TOO LARGE
16. Detail of is msg error A Manchester decoding error occurred timer us The value of the device s internal timer in microseconds i e the timestamp of the message 6 2 5 Status Word Flags Functions cc1553RTGet_statusword and cc1553RTSet statusword p status Returns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE p status Status standard clear immediatelv instrumentation service request is busv subsvtem flag terminal flag Purpose Set or retrieve the status word for the RT Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device Pointer to a user supplied buffer On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE RT MIL STD 1553B Status Word MIL STD 1553 B The other status indicators are cleared immediately after first transmission Refer to 2 2 1 Refer to 2 2 1 Refer to 2 2 1 Refer to 2 2 1 Refer to 2 2 1 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 21 of 40 6 2 6 Internal Timer Function cc1553RTGet timetag Purpose Retrieve the value of the device s internal timer The resolution is 64 us Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device
17. I 2006 06 12 1 0 Added Bus Monitor API 1 1 Improve document naming consistency p AAA CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 T CODE Ar 1 1 1 IdentifiCatlon 2 usa A Donets del eer na Pa Beat a ee ed 1 1 2 EU CIBO Th MR cx 1 1 3 Document Overview ehh she 1 2 Applicable and Reference Documents 00000 ee 2 2 1 Applicable Documents 0000 2 2 2 Reference Documents 0 e cece tenet hn 2 de 7 DRIVE DISIHDUl OD tag Lara uter dnte teat te tent ea doe tea dye tie deter ets 3 4 Installation Procedure 1 2 eor oie osos rta ias 4 4 1 To Build the VxWorks Software Driver into the VxWorks Kernel 0c cece lesen 4 4 2 To Load the VxWorks Software Driver Software Separately 00 cece eee eee 4 5 Taing the MIL STD 1553B VxWorks Software Driver o o o oooooo 5 I II K TGA a Pa Sete and Ghee ese ne acme le cee kg ASA at 5 S Creating the Device 0000 6 5 3 Destroying the Device 0 00000 6 5 4 Obtaining the Current Version Number hn 6 5 5 Built in Tests BITS uu aree cicer che cte tege hic hee Mah R Ua oi add pet Hx en NU opc MC ee eta alae 6 5 6 Return Adapter Type xcu iR ur s e eek ox a DCN e rs os Rl Ren bb 6 5 7 Message Processing m zem ip ek sx Re bbe Rem ei n ir nec Eh en Race iss on V Rer MR RE 7 5 8 Allocating Buffers as Remote Terminal e e e e ete eee 7 5 9 Building Frames as Bus Controller L 7 5 10 Logging Messages as Bus
18. IALIZED If no corresponding successful call was made to cc1553Create device p adapter types The adapter type CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 13 of 40 6 1 8 Starting the Device Function cc1553Start Purpose Instruct the device to start processing messages Arguments lt dev_id gt Device identifier on the PCI bus As used in Returns cc1553 OK cc1553 INVALID PARAM cc1553 DEV NOT INITIALIZED Stopping the Device Function cc1553Stop cc1553Create device On success If lt dev_id gt is incorrect If no corresponding successful call was made to cc1553Create device Purpose Instruct the device to stop processing messages Arguments lt dev_id gt Device identifier on the PCI bus As used in Heturns cc1553 OK cc1553 INVALID PARAM cc1553 DEV NOT INITIALIZED cc1553Create device On success If lt dev_id gt is incorrect If no corresponding successful call was made to cc1553Create device CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 14 of 40 6 1 9 Receiving VxWorks Software Driver Notifications Function cc1553Wait event Purpose Blocks until an event is generated on the MIL STD 1553B bus Use the event type to retrieve or set the applicable buffer contents Arguments dev id Device identifier on the PCI bus As used in cc1553Create device timeout ticks Number of OS ticks to wait before returning when no e
19. ON_CONDITION RETURN TO BRANCH RETRV ON CONDITION RETRY ON CONDITION THEN BRANCH RETRY ON CONDITION THEN BRANCH IF RETRIE S FAIL CALL RETURN TO CALL Note CCII 1553 6 MAN 001 2009 08 31 C53MANO1 WPD Page 28 of 40 Loads the message to message timer with lt timer_us gt This will cause the specified delay before the device proceeds to the next frame No data words are sent Loads the minor frame timer with lt timer_us gt No data words are sent Proceed immediately to the frame in lt branch_to_index gt No data words are sent Execute the current frame and continue with the next frame in the list Raise the event FRAME_ACCESSED and continue with the next frame in the list Execute the current frame and then proceed to the lt branch_to_index gt frame Execute the current frame and if any of the conditions are met proceed to the lt branch_to_index gt frame Otherwise the next frame in the list will be processed Returns to the frame saved by BRANCH_UNCONDITIONALLY or BRANCH_ON_CONDITION No data words are sent If any of the conditions are met resend the frame lt retries gt times Otherwise the next frame in the list will be processed After retries proceed to the frame in lt branch_to_index gt Otherwise the next frame in the list will be processed If all the retries fail branch to index proceed to the frame in Proceed to the frame branch to index and save the cu
20. based index into the list of frames to jump to if required by the opcode and conditions The value to set the minor frame timer or the message to message timer Specified in microseconds Frame operation e g continue branch Some of the opcode actions depends on the condition flags i e cond XXX The number of times the messages will be resent when the RT status word indicates an error Range is 1 to 4 Indicates which bus to use for transmission CHANNEL A or CHANNEL B Affected by cc1553BCEnable pingpong Indicates that the frame is an RT to RT transfer and that cmd2 is used Condition is met if the RT does not return a status word Condition is met if the RT status word Message Error bit is set Condition is met if the RT status word Busy bit is set Condition is met if the RT status word Terminal Flag bit is set Condition is met if the RT status word Subsystem Fail bit is set Condition is met if the RT status word Instrumentation bit is set Condition is met if the RT status word Service Request bit is set Indicates a protocol error in the RT s response Always initialise to zero Indicates the last frame in the sequence no data words are sent cc 1553Wait event will raise a END FRAME LIST event CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 27 of 40 LOAD_MSG_TO_MSG_TIMER LOAD_MINORFRAME_TIMER GOTO CONTINUE RAISE_EVENT_CONTINUE BRANCH_UNCONDITIONALLY BRANCH_
21. c1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 INVALID LOG INDEX p logs Log Detail channel is RTtoRT is message error is mode code no data is broadcast error timeout error overrun error parity error decoding cmdi cmd2 data data size Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device index Log entry index p log Pointer to a user supplied buffer Returns cc1553 OK On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE BM The monitor block is invalid The captured log detail CHANNEL A or CHANNEL B Indicates a RT to RT message Indicates a message error Indicates a mode code with no data word Indicates a broadcast message Too few data words received Too many data words received Parity error detected Manchester decoding error detected During RT to RT transfers this is the receive command Only applicable during RT to RT transfers The transmit command Message contents Message size in words CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 33 of 40 status1 status2 timer_us 6 4 4 Configuring Log Size Function cc1553BMSet_log_size Purpose lt size gt in internal memory Arguments lt dev_id gt lt size gt
22. dates with cc1553Was buffer accessed Any messages received for a sub address or mode code that has not been allocated will be lost Example Allocating receive sub addresses 2 Allow messages for sub address 2 and enable notification cc1553RTConfigure buffers 0 RX SUBADDR 2 10 cc1553TRUE 5 9 Building Frames as Bus Controller In BC mode the adapter sends a sequence of command words with optional data words to the RTs on the bus Each such command is called a frame and the data words are called a message A message may be utilised to send the same data to many RTs saving resources in device internal memory Frames and messages are referenced with zero based indexes Frame and message arrays are created by the user and cross referenced with the indexes into the supplied arrays The BC can deviate the sequence of frames based on opcodes and conditions The conditions represent the flags in the RT status word If any of the conditions are met an alternate frame route may be taken depending on the opcode These alternate routes are called minor frames Opcodes can cause the frame sequence to branch or skip directly to another frame in the supplied list This method of operation calls for very little user intervention during RT error states if care is taken with the design of the frames CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 7 of 40 5 10 Logging Messages as Bus Monitor In BM mode t
23. e device must be instructed to start processing messages on the bus Example Starting device 0 cc1553Start 0 In RT mode the device will now start to generate events when receiving or sending messages and also respond to bus commands from the Bus Controller Use the function cc1553Wait event to be notified of any bus messages and if a transmit is required load the secondary buffer for use during the next transmit The alternating buffers are encapsulated by the VxWorks Software Driver and the user simply need to call cc1553RTSet buffer to load the next message In BC mode the device will start sending the frames and store the RT responses in device memory To access RT status or data use the cc1553BCGet frame and cc1553BCGet message functions In BM mode the device will start logging messages in device memory Use cc1553Wait event to wait for the log size to be reached or poll the logs with cc1553BMGet 10g 5 8 Allocating Buffers as Remote Terminal To send and receive messages the user must first allocate buffers for a specific sub address or mode code For each sub address or mode code two buffers are allocated in device internal memory This allows the user to access a message buffer even while the next message is being received by the device for the same sub address or mode code The user may be notified of any updates to the buffer by using the cc1553Wait event function call or the user may poll the buffer to check for any up
24. e the MIL STD 1553B device specific structures Arguments lt dev_id gt Device identifier on the Peripheral Component Interconnect PCI bus The device in the lowest PCI slot dev id 0 next device dev id 1 etc mode The functionality required from the device i e MODE RT MODE BC MODE BM Returns cc1553 OK On success cc1553 INVALID PARAM If dev id is incorrect cc1553 DEV ALREADY INITIALIZED If the function is called more than once for the same device cc1553 PCI CFG FAIL If the PCI configuration failed cc1553 DEVICE NOT FOUND If the device number dev id was not found on the PCI bus cc1553 MODE NOT SUPPORTED If the device does not support this mode cc1553 EVENT QUEUE FAIL If the Operating System OS could not create a message queue for the driver cc1553 ACCESS SEMAPHORE FAIL If the OS could not create a semaphore for the driver Note This function has to be called once per device before any other function call to the specified device will be valid It can also only be called once per device unless cc1553Destrov device is called CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 10 of 40 6 1 2 Destroy Device Function cc1553Destroy_device Purpose Reset the MIL STD 1553B device specific structures and free OS resources Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device Returns cc1553 OK On success cc1553 INVALID PARAM I
25. ete sap Soba Pe veh der PEM a ober R E E eiie da 25 6 3 14 Alternating Bus Retries serrar das aeieea aE E e eens 25 6 3 2 Configuring the Frame Sequence 2 26 6 83 8 Creating a Command Word o coccoccoc hen 30 6 3 4 Retrieving Frame Status 0000 30 Contents CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 6 3 5 Retrieving Message Data tee eae 31 6 3 6 Resending the Frame Sequence enn 31 6 4 Bus Monitorlriterface iii ea VS A A Pee ER LANGAN ND 32 6 4 4 Promiscuous Mode eso e Saal eked Go wae ERES DECOR RR RU AC RURAL A 32 6 4 2 Monitoring a Specific Terminal 0000 en 32 6 4 8 Retrieving Logged Messages naana 33 6 4 8 Configuring Log Size nn 34 7 Getting Started eter score ee COR ees LHP 35 8 Contact Details 2 Sb ttp Statu ei ed BA 39 8 1 Contact Person sser raat eee L La ae boa ue Ei aca ade ee he aS 39 8 2 Physical Address a sacar sca eeu eC ne tee ns a ag Wg ees eC no A A be ne ee 39 8 3 Postal Address aar RR ta decal ayia Redde ge deer eges a qe woven ARA Papen ie Golan de eae 39 8 4 Voice and Electronic Contacts 0000 39 8 5 Product Support ws iis cds hae eae aE eerie Dyer gn a a wine OP Eee ee a aed ie NG 39 eee a ee ul inso on ee ee Ho p BUD ee ee e ee ae 40 Making Changes to sysLib c for X86 tte tenes 40 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 List of Figures Figure 1 Function Overview 0c eee
26. eturn printf Setup messages 1n for msg_cnt 0 msg_cnt lt msg_size msg_cnt msgs msg cnt p data malloc data size cc1553 WORD SIZE for data cnt 0 data cnt data size data_cnt msgs msg cnt p data data cnt 0x1000U msg cnt 0x100U msg_cnt 0x10U msg_cnt msg_cnt msgs msg cnt message size data size Set Defaults CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 36 of 40 memset frames 0 sizeof frames control opcode CONTINUE control retries 1 control channel CHANNEL_A control is RTtoRT ccl553FALSE control cond_no_response 0 control cond_msg_error 0 control cond_is_busy 0 control cond_terminal_flag 0 control cond_subsystem_fail 0 control cond_instrumentation 0 control cond_service_request 0 control block_access_error 0 printf Configure frames n control opcode CONTINUE frames 0 control control frames 0 cmd1 cc1553Encode_command_word 0x12 RX 2 data_size frames 0 msg index 0 control opcode CONTINUE frames 1 control control frames 1 cmdl ccl553Encode command word 0x12 RX 3 data size frames 1 msg index 1 control opcode END OF LIST frames 2 control control func status cc1553BCConfigure frames 0 frames frame size msgs msg size if func status cc1553 OK cc1553Print status func status return cc1553Start 0
27. evice identifier on the PCI bus As used in cc1553Create device SUBADDR or MODECODE Sub address or modecode value Pointer to a user supplied buffer The size of the user supplied buffer in words Pointer to a user supplied buffer On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE RT If the message size exceeds the value supplied in cc1553RTConfigure buffers If cc1553RTConfigure buffers was not called for the sub address If cc1553RTConfigure buffers was not called for the modecode If the device failed to access the requested buffer The received message The message size or modecode value Status information about the message Indicates on which bus the message was received The message was received from another RT and not the BC The message content must be considered invalid as an error occurred during transmission The message was not sent to this RT alone but was sent to all RTs The message has been illegalised by the user CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 20 of 40 is_timeout Detail of is_msg_error The message was shorter than expected is overrun Detail of is msg error The message was longer than expected is parity error Detail of is msg error A parity error occurred is decoding error
28. f dev ids is incorrect cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 EVENT QUEUE FAIL If the OS could not delete the driver message queue cc1553 ACCESS SEMAPHORE FAIL If the OS could not delete the driver semaphore Note After this function is called no other function call to the specified device will be valid except for cc1553Create device 6 1 3 Print Out Current Version Information Function cc1553Print version Purpose Prints the VxWorks Software Driver version Arguments None Returns cc1553 OK On success CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 11 of 40 Built in Test Results Function cc1553Get BIT Purpose Retrieve the BIT result Arguments lt dev_id gt lt p_result gt Returns cc1553 OK cc1553 INVALID PARAM cc1553 DEV NOT INITIALIZED p results BIT Results dma fail wrap fail parity fail channel a fail channel b fail nr events rx nr events lost Device identifier on the PCI bus As used in cc1553Create device Pointer to a user supplied buffer On success If dev ids is incorrect or p results is invalid If no corresponding successful call was made to cc1553Create device The BIT results The device has encountered a problem during access of its internal memory The device s internal loopback checking of transmissions has indicated an error The RT address was
29. face for transferring data over a MIL STD 1553B Adapter The driver binaries are provided with explicit installation instructions 1 3 Document Overview This document gives an overview of the MIL STD 1553B VxWorks Software Driver installation procedure and its Application Program Interface API CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 1 of 40 2 Applicable and Reference Documents 2 1 Applicable Documents None 2 2 Reference Documents 2 2 1 MIL STD 1553B Aircraft Internal Time Division Command Response Multiplex Data Bus dated 21 September 1976 2 2 2 MIL STD 1553B Notice 1 12 February 1980 2 2 3 MIL STD 1553B Notice 2 08 September 1986 2 2 4 MIL STD 1553B Notice 3 31 January 1993 2 2 5 MIL STD 1553B Notice 4 15 January 1996 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 2 of 40 3 Driver Distribution The driver software distribution consists of at least the following files cc1553Lib lt arch gt V lt version gt lt long gt a Host architecture specific driver object file cc Cl Systems 1553Lib MIL STD 1553B VxWorks Software Driver lt arch gt Host for which the binary is built e X86 Dy4PPC for Dy4 PPC SVME DMV181 lt version gt Software version is a 3 digit integer e 1 digit is the version number 24 digit is the revision number e 3 digit is the beta number long driver compiled with mlongcall flag only for Dy4 PPC ho
30. he device is able to capture all messages on the bus regardless of which terminals are involved promiscuous mode or the device can capture only message of specific terminals filtering Messages are logged in device memory in a ring buffer the size of which is set with cc1553BMSet log size ce1553Wait event will block until this number of messages have been logged However the device stores one more log than the configured log size after raising an event and this additional log index must be checked with cc1553BMGet_1log otherwise the message will be lost If this additional ring buffer entry is empty cc1553BMGet 1og Will return an error CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 8 of 40 6 Application Program Interface API 6 1 Common Interface The zip file cc1 553HfilesV lt version gt zip contains the following header files which should always be included e 1553Defs h e 1553HostDriver h e 1553MilStd h The header files may also be included in a C file All functions return a status code if the code is not cc1553_Ok an error condition occurred A text description for a specific code is available by using cc1553Print_status All data types are declared in 1553Defs h All function prototypes are declared in 1553HostDriver h CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 9 of 40 6 1 1 Create Device Function cc1553Create device Purpose Create and initialis
31. ieving adapter type n adapter_type MODE_INVALID func status ccl553Adapter_type 0 amp adapter type if func status cc1553 OK adapter type MODE BM cc1553Print status func status return cc1553BMEnable promiscuous mode 0 cc1553TRUE cc1553BMSet log size 0 1 cc1553Start 0 while 1 printf Waiting for an event n cc1553Wait event 0 20 sysClkRateGet amp event if event event type EVENT BM printf n BM Event log index i n event bm log index for cnt 0 cnt lt event bm log index 1 cnt func status cc1553BMGet log 0 cnt 6log if func status cc1553 OK logs rx if event event_type EVENT_TIMEOUT printf No event received n ccl553Stop 0 printf Destroying device n func status ccl553Destroy_device 0 if func status cc1553 OK cc1553Print status func status CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 38 of 40 8 Contact Details 8 1 Contact Person Direct all correspondence and or support queries to the Project Manager at C I Systems 8 2 Physical Address C212 Systems Unit 3 Rosmead Place Rosmead Centre 67 Rosmead Avenue Kenilworth Cape Town 7708 South Africa 8 3 Postal Address Cl Systems P O Box 171 Rondebosch 7701 South Africa 8 4 Voice and Electronic Contacts Tel l 27 0 21 683 5490 Fax 27 0 21 683 5435 Email inf
32. n the message or the mode code value Purpose Retrieve frame information e g the RT status word Arguments lt dev_id gt Device identifier on the PCI bus As used in p frame index Heturns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 INVALID FRAME INDEX lt p_frame gt cc1553Create device Pointer to user supplied buffer Position of the frame in the list as used in cc1553BCConfigure frames On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE BC If lt index gt references a non existent frame The frame detail CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 30 of 40 6 3 5 Retrieving Message Data Function cc1553BCGet_message Purpose Retrieves message content e g when a RT has transmitted data Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device p message Pointer to user supplied buffer index Position of the message in the list as used in cc1553BCConfigure frames Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function i
33. o ccii co za Email support ccii co za URL http www ccii co za 8 5 Product Support Support on C I Systems products is available telephonically between Monday and Friday from 09 00 to 17 00 CAT Central African Time CAT GMT 2 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 39 of 40 Annexure A Making Changes to sysLib c for x86 The PCI free memory space needs to be defined in the memory descriptor table Consult the relevant reference manual and obtain the upper address of the PCI memory Allocate at least 1 MByte of memory per adapter Subtract that amount from the upper address of the PCI memory and use this value as the base of the PCI memory space Note If there are other devices on the PCI bus it may be necessary to allocate more memory Example Allocate 10 MBytes of memory If the upper address of the PCI memory space is defined as OXFFF00000 then subtracting 10 MBytes gives a base address of OXFFF00000 0xA00000 OxFF500000 In the Personal Computer PC 386 486 Pentium Pentiumpro system dependent library sysLib c code shown in bold text needs to be added to the memory descriptor table sysPhysMemDesc ifndef CPU PCI MEM ADRS define CPU PCI MEM ADRS OxFF500000 base of PCI MEM addr tendif PHYS MEM DESC sysPhysMemDesc adrs and length parameters must be page aligned multiples of 4KB 4MB if VM PAGE SIZE PAGE SIZE 4KB
34. ote Terminal cc1553Create device 0 MODE RT The device ID is used in all calls to the VxWorks Software Driver to identify the correct device Destroying the Device When the device is no longer required it should be destroyed to free system resources Example Device 0 is no longer required Destroy device to free resources cc1553Destrov device 0 Obtaining the Current Version Number The following function prints out the current version number of the driver software Print current version number cc1553Print version Built in Tests BITs The following function displays each device s status e g how many messages have been accepted lost and how many errors were detected Example Displaying the BIT results for device 0 cc1553Print BIT 0 Note Thetests executed during BIT writes patterns into the device s internal memory overwriting any buffer allocations This test is then destructive and cc1553Destroy device should be called afterwards A non destructive subset of BIT is available by using cc1553Get BIT Return Adapter Type The following function returns the adapter type The return value will be MODE BC MODE BM or MODE RT Example Get adapter type of device 0 cc1553DeviceMode adapter type cc1553Adapter type 0 amp adapter type CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 6 of 40 5 7 Message Processing Once buffers or frames have been allocated th
35. rrent frame for RETURN TO CALL No nested calls are allowed each call should be followed with a return before another call is used No data words are sent Return to the frame saved by CALL Refer to Figure 2 for an example of frame sequence Issue 1 1 msg 0 msg 1 msg 2 p_data p_data p_data message_size message_size message_size 4 frame 0 frame 1 frame 2 Control CONTINUE Control BRANCH_ON_CONDITION Control BRANCH_UNCONDITIONALLY msg_index 0 msg_index 1 msg_index 2 branch_to_index N A branch_to_index 3 branch_to_index 4 Condition frame 3 frame 4 Control RETRY_ON_CONDITION Control GOTO msg_index 0 msg_index N A branch_to_index N A branch_to_index 5 frame 5 ane Control END_OF_LIST msg_index N A branch_to_index N A Figure 2 Frame Example CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 29 of 40 6 3 3 6 3 4 Creating a Command Word Function cc1553Encode_command_word Purpose Create a MIL STD 1553B command word Arguments lt rt_addr gt lt dir gt lt sub_addr gt lt size gt Returns MIL STD 1553B command word Retrieving Frame Status Function cc1553BCGet frame Remote Terminal address RX or TX from the RT point of view Sub address or mode code Number of words i
36. rt 0 CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 35 of 40 printf Waiting for an event n cc1553Wait event 0 20 sysClkRateGet amp event if event event type EVENT RT if event rt addr_or_mode SUBADDR strcat event desc Subaddress else strcat event desc Mode code if event rt dir RX strcat event desc Rx else strcat event desc Tx printf Address s i n event desc event rt entry if event event_type EVENT_TIMEOUT printf No event received n cc1553Stop 0 printf Destroying device n func status ccl553Destroy_device 0 if func status cc1553 OK cc1553Print status func status return void cc1553BCExample void cc1553Status func status cc1553DeviceMode adapter tvpe int data cnt int msg cnt cc1553Event event char text 80 ccl553BCControlWord control const int data size 5 const int msg_size 2 const int frame_size 3 cc1553BCMessage msgs msg_size cc1553BCFrame frames frame size printf Creating device n func status cc1553Create device 0 MODE BC if func status cc1553 OK cc1553Print status func status return printf Retrieving adapter type n adapter_type MODE_INVALID func status ccl553Adapter_type 0 amp adapter type if func status cc1553 OK adapter type MODE BC cc1553Print status func status r
37. s called when cc1553Create device was not called with MODE BC cc1553 INVALID MESSAGE INDEX If index references a non existent message p messages The message detail 6 3 6 Resending the Frame Sequence Function cc1553BCRestart frames Purpose Reset the frames to allow resending the frame sequence set via cc 553BCConfigure frames Arguments dev ids Device identifier on the PCI bus As used in cc1553Create device Returns cc1553 OK On success cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 INVALID PARAM If a function argument is incorrect or out of range cc1553 NOT ALLOWED IN MODE If the function is called when cc1553Create device was not called with MODE BC cc1553 INVALID FRAME INDEX If no frames have been configured CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 31 of 40 6 4 Bus Monitor Interface All functions applicable in this mode are prefixed with cc1553BM These functions will return an error code if cc1553Create device was not called with MODE BM Some of these function calls are not allowed after a call to cc1553Start 6 4 1 Promiscuous Mode Function cc1553BMEnable promiscuous mode Purpose Allows the monitoring of all RTs on the bus or allows the filtering of specific terminals with cc1553BMMonitor terminal Arguments dev ids Device identifier on the PCI bus As used in cc1553Create device lt enable gt cc1553TRUE cc155
38. set incorrectly A time out was detected on bus A A time out was detected on bus B The number of events received by the interrupt handler The number of events the interrupt handler had to drop due to load conditions This normally indicates that cc1553Wait event was not serviced often enough CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 12 of 40 Print Out BIT Results Function cc1553Print BIT Purpose Print the BIT results Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device Returns cc1553 OK On success cc1553 INVALID PARAM If dev ids is incorrect cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device cc1553 NOT ALLOWED WHEN STARTED If the function is called after a call to cc1553Start Note This function is destructive as it writes patterns into the device memorv alwavs call cc1553Destrov device after printing the BIT results and reinitialise the device with cc1553Create device Return Adapter Tvpe Function cc1553Adapter tvpe Purpose Retrieve the adapter tvpe either Bus Controller Remote Terminal or Bus Monitor Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device p adapter type Pointer to a user supplied buffer Returns cc1553 OK On success cc1553 INVALID PARAN If dev id is incorrect or p adapter types is invalid cc1553 DEV NOT INIT
39. st cc1553Readme txt General information and installation notes cc1553Release txt Release notes and revision history Please check this file for information on the latest updates cc1553HfilesV lt version gt zip Zip file which contains all header files that define the Application Program Interface API to the VxWorks Software Driver CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 3 of 40 4 Installation Procedure This paragraph describes the installation procedure for the VxWorks Software Driver the examples given are for a Dy4 SVME DMV181 PowerPC host 4 1 To Build the VxWorks Software Driver into the VxWorks Kernel Assume the BSP directory is given as BSP DIR tornado target config dy4181 e Copy cc1553Lib arch V version a to your BSP_DIR lib directory as cc1553 a e In the Builds view of the Project Workspace change the build specification properties to include the cc1553 a library file with the Macros LIBS option e Rebuild all VxWorks images 4 2 To Load the VxWorks Software Driver Software Separately Note This step is not required if the VxWorks Software Driver was built into the BSP If the VxWorks Software Driver is not built into the BSP a user can load it separately e Copy cc1553Lib arch V version a to your present working directory as cc1553 a e From the VxWorks shell type 1d lt cc1553 a CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 4 of 40 5
40. t of range If the function is called when cc1553Create device was not called with MODE BC If the function is called after a call to cc1553Start Ifthe device does not support ping pong mode for retries CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 25 of 40 Configure the message data and frame sequence that the BC will transmit Each frame consists of one or two MIL STD 1553B command words to send to RTs The data words used by the frame is specified by an index into the list of messages Frames can be linked together via index based on the opcode and condition flags otherwise they will be processed as per the list 6 3 2 Configuring the Frame Sequence Function cc1553BCConfigure frames Purpose sequence Arguments dev ids p frames frames nr p messages messages nr Heturns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 NOT ALLOWED WHEN STARTED cc1553 INVALID MESSAGE INDEX cc1553 OUT OF MEMORV Message p data message size Frame control cmdi cmd2 CCII 1553 6 MAN 001 2009 08 31 Device identifier on the PCI bus As used in cc1553Create device Pointer to user supplied list of frames Number of frames in p frames list Pointer to user supplied list of messages Number of messages in p messages list On success If no corresponding successful call was made to cc1553Create device If
41. tes whether the buffer was accessed due to a transmission on the bus Intended use when cc1553RTConfigure_buffers is called with interrupt notification disabled Allows polling for Function cc1553RTWas buffer accessed Purpose message state Arguments lt dev_id gt lt dir gt lt addr_or_mode gt lt entry gt p was accessed Returns cc1553 OK cc1553 DEV NOT INITIALIZED cc1553 INVALID PARAM cc1553 NOT ALLOWED IN MODE cc1553 SUBADDR DISABLED cc1553 MODECODE DISABLED p was accessed Device identifier on the PCI bus As used in cc1553Create device RX or TX SUBADDR or MODECODE Sub address or modecode value Pointer to a user supplied buffer On success If no corresponding successful call was made to cc1553Create device If a function argument is incorrect or out of range If the function is called when cc1553Create device was not called with MODE RT If cc1553RConfigure buffers was not called for the sub address If cc1553RConfigure buffers was not called for the modecode cc1553TRUE cc1553FALSE The state of a buffer is reset after a call to this function CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 23 of 40 6 2 9 Setting Bus State Functions cc1553RTEnable busA and cc1553RTEnable busB Purpose Enable or disable transmission on the specified bus Arguments lt dev_id gt Device identifier on the PCI bus As used in cc1553Create device lt
42. vents are received p events Pointer to a user supplied buffer Returns cc1553 OK On success cc1553 INVALID PARAM If dev id is incorrect or p event is invalid cc1553 DEV NOT INITIALIZED If no corresponding successful call was made to cc1553Create device p events The event detail Event Detail is hw error Indicates if the hw field contains errors hw Indicates any message errors Always check this status before using the content of the message message error Message error can be one of the following dma fail Memory access error wrap fail Transmission error parity fail Parity error event type EVENT TIMEOUT No event was received during the timeout ticks period EVENT BC Bus Controller event use bc field Other fields are invalid EVENT BM Bus Monitor event use bm field Other fields are invalid EVENT RT Remote Terminal event use rt field Other fields are invalid bc Valid when EVENT BC set event type END FRAME LIST ILLOGICAL FRAME INVALID OPCODE RETRY FAILED FRAME ACCESSED frame index The frame that caused the event zero based index CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MAN01 WPD Page 15 of 40 bm Valid when EVENT_BM set log_index Zero based index indicating that the log size has been reached rt Valid when EVENT RT set addr or mode SUBADDR or MODECODE dir RX or TX entry Sub address or mode code value CCII 1553 6 MAN 001 2009 08 31 Issue 1 1 C53MANO1 WPD Page 16
Download Pdf Manuals
Related Search
Related Contents
ÿþ8 9 6 6 P r o ® 2 0 1 4 - 1099 Pro Wiki KitchenAid KHMS147H User's Manual 6807533R2_35A Integral SS User Manual 取扱説明書 (1.88 MB/PDF) Garmin 20/20i Installation Instructions SSG - DBM Corp Copyright © All rights reserved.
Failed to retrieve file