Home

20f403 E3 User Manual - Diamond Point International

image

Contents

1. Variable Configuration State POWERUP UNLINKED CONFIGURE OPERATIONAL Config Variables R W R Deviceld R W R W OpVariables R W R W Status Variables R C R C R W C Masterld R W R W R W Config State R W R W R W InterruptStatus R C R W C InterruptMask R W R R readable by function W writeable by function C changeable anytime by status Configuration and operational variables are part of DSFI2 slave configuration and can be written and read back in CONFIGURE state Status variables are not part of DSFI2 slave configuration and read values are unpredictable MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 RID HEP Appendix Mapping of DSFI2 Slave Variables A DSFD slave has the following common mapping for internal variables Table 55 Mapping of DSFI2 slave variables Variable Offset Description OpVariables 0x00 0x7F DSFI2 slave specific ConfigVariables 0x00 0x7F DSFI2 slave specific 0x70 0x73 InterruptMask 0x74 0x7F Reserved StatusVariables 0x00 0x7F I O controller specific 0x70 0x73 InterruptStatus 0x74 0x7B Reserved 0x78 0x79 Deviceld device Ox7A Deviceld variant Ox7B Reserved 0x7C 0x7D Deviceld revision Ox7E 0x7F Reserved The mapping of variables is equal for all DSFI2 slaves The DSFI2 Variables data type contains common and device specific variables and has a length of 0x80 b
2. If a common error voltage supervision error is detected the failure is indicated as DSFI2 interrupt when the corresponding interrupt is enabled in instance configuration the failure can be read as common error by FN35 GetError the failure can be cleared by FN36 ClearError MEN Mikro Elektronik GmbH 66 20F403 00 E3 2014 11 05 Appendix Current Drain Trigger The input current of I O channels configured as input Current Drain Trigger CDT can be configured with the corresponding parameters in the configuration of I O controller instances with FN2 SetConfig CDT mode continuously triggered constant 1 mA constant 10 mA CDT period 1 Hz 100 Hz Figure 16 Current Drain Trigger Current 1msto 10 mA 1mA 1 Time 10 msto 1s 4 4 2 8 Interrupt Handling Asynchronous events of IP cores can be indicated as DSFI2 interrupts over the DSFI2 protocol Pending interrupts are handled by application with DSFI2 functions of the corresponding instance DSFI2 interrupt generation of an instance is enabled disabled in configuration by FN2 SetConfig To determine which instance has pending interrupts call FN37 GetInstancelInterrupt of the DSFI2 handler To determine which interrupt of an instance is pending call FN6 GetInterrupt of the corresponding instance To clear pending interrupts in an instance call FN9 ClearInterrupt of the corresponding instance To ensure that no interrupt is lost the current sta
3. Interrupt pending flag status is received in the acknowledgement MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Hardware Software Interface 3 3 1 F403 Config You can establish a connection to the F403 over DSFI2 protocol stack and configure all I O controller instances and DSFI2 instance 0 DSFI2 handler using the following parameters Table 12 F403 Config parameters per I O channel Parameter Values Description Output mode 0 input only 1 output Sets the mode of the I O channel Output value 0 open 1 closed Sets the output value Current drain trigger Mode Sets the current of the input 0 constant 2 mA channel 1 10mA 2 triggered continuously 3 triggered once Period 0 100 Hz 1 90 Hz 9 10 Hz 10 1 Hz Output comparison 0 disable 1 enable Compares whether the output value is read back on the corresponding input channel Disables output in case of error Output watchdog 0 disable Disables the output channel if 128ms it is not set periodically The 2 16ms timeout value can be config ne ured 15 120 ms Interrupt 0 enable 1 disable Indication of asynchronous events Input value changed O channel error Common error Table 13 F403_Config common parameter Parameter Values Description Interrupt 0 enable 1 disable Indication of asynchronous events Temperature failure Voltage failure Power go
4. 16 inputs no outputs or 8 inputs outputs Individual edge triggered interrupts Input output load on ground High side output switches High output current max 1 A per channel at 24 V Temperature and voltage supervision Output Characteristics Output voltage range Limits continuous 0 VDC to 138 VDC Limits duration 1s 0 VDC to 154 VDC e Switching time for output change min 400 us rise time min 600 us fall time Input Characteristics Input voltage range Limits continuous 0 VDC to 138 VDC Limits duration 1s 0 7 VDC to 154 VDC Input voltage of external supply voltage Can be configured individually for each group Nominal 24 VDC to 110 VDC Limits continuous 16 8 VDC to 138 VDC Limits duration 1s 14 4 VDC to 154 VDC e Switching threshold 40 15 15 of external supply voltage Front Connection 4 spring cage terminal blocks CompactPCI Bus Compliance with CompactPCI Core Specification PICMG 2 0 R3 0 Peripheral slot 32 bit 33 MHz PCI Bus or 32 bit 66 MHz PCI Bus V I O 3 3 V J2 connector with geographical addressing for distinguishing boards in a system with several boards MEN Mikro Elektronik GmbH 4 20F403 00 E3 2014 11 05 Technical Data Electrical Specifications solation voltage 1500 VAC between isolated side and digital side 1500 VAC between the channels Supply voltage power consumption 5V 45 5 130 mA ty
5. Complete article number 02F403 00 Lj 00 00 00 eni 641517 Revision number Serial number MEN Mikro Elektronik GmbH 51 20F403 00 E3 2014 11 05 Appendix 4 4 Background Information on Hardware Software Interface This chapter describes in more detail the Software layers and how to use the individual functions of the layers 4 4 1 F403 Application Programming Interface DSFI2 functions are performed with the DSFI2 function DSFI2 API function unless specified otherwise For more details on the DSFI2 API see Chapter 4 4 2 DSFI2 Layer on page 53 44 11 F403 Config Perform the following steps for all I O controller instances of F403 and DSFI2 instance 0 DSFI2 handler DSFI2 instance 0 DSFI2 handler M Call FN36 Get DSFI2Header MI Check if F403 board is accessed M Check geographical address I O controller instances of F403 M Configure instance by calling DSFI2_Conjig 4 4 1 2 F403 SetOutput M Set a single output of one I O controller instance by calling FN37 SetOutputValue 4 4 1 3 F403 SetGroupOutputs M Set all outputs of one I O controller instance by calling FN32 SetOutputValues 4 4 1 4 F403 GetGrouplInputs M Read all inputs of one I O controller instance by calling FN34 GetInputValues MEN Mikro Elektronik GmbH 52 20F403 00 E3 2014 11 05 Appendix 4 4 1 5 F403 GetGroupStatus Perform the following steps for one I O controller instance of the F403 Mi Read pen
6. Contents 1 Getting Started sese cb xey S mee oU E UR DR m UP RR d cs 17 LI MapOrthe Board oda actus t trinene GS pal o acm dae pana 17 1 2 Integrating the Board into a System 0 0 008 18 1 3 Installing Driver Sottware 25 2s ias ioa ico ROR E ERR Roa 19 2 Functional Description sece ee rr rr rrr rrr rro mte 20 2 1 Power Supply soe dae chebbbee ep Pho db epar 20 2 2 Front COnHectlols simui vu co qa198 379 ad wes Dales Teed E deg s 20 2 3 Debus LED ias ts am ene REOR ere Rea PARIS 21 24 Principle of Operatlof 2p shine aa entie taia rett PE 22 2 5 Pulsed Input Current 4 ce RR ERE prenna resme mini 23 2 6 CompactPCI ntetfa6e 9o mer R ROLES eripiet yee weeks 24 2 0 lt Geostaphical Addressing vue ok rye 24 3 Hardware Sottware Interface us os eek y err RE EP RE ARE REESE 25 Sok AIBEEOQUOHO 5c nics acit ppp ewes Sheen S SR CER RSE IES 25 31 1 DSPIZPCID6VI6Ge rr Rp RR eer ER Rr 26 3 2 VO Controller F nctlotis om eor bed rer rapeat eis 28 32 BistclUOPEbunciorns 2i 222 pr ERU SERE oa 28 3 2 2 Output Watchdog iae orto toe owen d 28 2 2 9 Output GomparisOfi 2 2544 2 wh Uer edP CEPI Pe 29 3 244 Output Overload oko oe t RR kites 29 20 25 Voltage Supervision ios ose rp cR rie E ERU EO 29 3 2 0 Current Drain TASSE 455 929 cod veo d doo ace nas 30 3 3 F403 Application Programming Interface API 31 Seo F403 Contes eesse 95 PIRE STU AEE EEA 32 3 3 2
7. BAR3 BARA BAR5 0 5 10 0 93500000 00001001 00000000 00000000 200000000 00000000 Cham Info for device 5 10 0 bus dev fun chaRev 2 busId 0 tableNbr 1 unitNbr 4 bridgeNbr 0 cpuNbr 0 BARO 0x93500000 size 0x00000000 mapType MEM BARI 0x00001001 size 0x00000000 mapType I0 BAR2 0x00000000 size 0x00000000 mapType unused BAR3 0x00000000 size 0x00000000 mapType unused BAR4 0x00000000 size 0x00000000 mapType unused BAR5 0x00000000 size 0x00000000 mapType unused CHAMELEONV2 HEADER 0 busType 0x00 busId 0 model 0 revision 0x01 file F403 001C001 magicWord 0xabce CHAMELEONV2 UNIT Idx DevId Module Grp Inst Var Rev IRQ BAR Offset Address 0 0x0018 167024 SRAM 0 0 1 13 63 0 0x00000000 0x93500000 1 0x007e 167126 SERFLASH 0 0 amp 63 0 0x00000200 0x93500200 Init Flash FLASH stm25p32 Identify mnf 0015 dev 0020 FLASH stm25p32 Checkld Found FLASH device STMICROM25P32 4M Write block ERASE Sectors Please wait Unlocking sector Erasing sector 1 of 64 size 0x010000 Erase Sector gt OK Erasing sector 2 of 64 size 0x010000 Erase Sector gt OK Erasing sector 3 of 64 size 0x010000 Erase Sector gt OK gt OK PROGRAM offset 0x00000000 size 0x0002eba3 Please wait Unlocking sector Current write status 131072 bytes written from 191395 bytes VERIFY Please Wait Write and Verify OK MEN Mikro Elektronik GmbH 47 20F403 0
8. For requests Instance number of the accessed DSFI2 slave The following instances are available in the DSFI2 subsystem Table 47 DSFI2 instances Instance Description Detailed Specification 0 MISC DSFI2_HANDLER including MISC Unit 1 BINIO 1 Binary I O controller for I O group 1 2 BINIO 2 Binary I O controller for I O group 2 3 BINIO 3 Binary I O controller for I O group 3 4 BINIO 4 Binary I O controller for I O group 4 5 FLASH Flash interface for update MASTERID The message field MASTERID is coded as follows Table 48 Message header field MASTERID Description MASTERID 7 0 Invalid DSFI2 master ID used to unlink 0x00 a master from a slave Valid DSFI2 master ID 0x01 0xFF MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 a Sake fel DERE RENE HC Appendix FUNCTION The REQ message field FUNCTION will identify the function that shall be performed on the DSFI2 slave The functions are grouped as follows Table 49 REQ message header field FUNCTION Function class Function FUNCTION 7 0 Slave common FNO 0x00 FN1 0x01 FN2 0x02 FN31 Ox1F Slave group FN32 0x20 specific FN33 0x21 FN127 0x7F Slave specific FN128 0x80 FN129 0x81 FN255 OxFF ERR The ACK message field ERR is coded as follows Table 50 ACK message header field ERR Priority Des
9. Table 64 SetDefaults function Write variables Config Variables OpVariables Read variables Request payload DSFI2 Variables OpVariablesin DSFI2 Variables ConfigVariablesIn Acknowledge payload None MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 GetDefaults Appendix The GetDefaults function provides the configuration of the internal variables of the DSFI 2 slave and e returns the default of Config Variables in Config VariablesOut e returns the default of Op Variables in OpVariablesOut Table 65 GetDefaults function Write variables Read variables Config Variables Op Variables Request payload None Acknowledge payload DSFI2 Variables OpVariables Out DSFI2 Variables Config VariablesOut Getinterrupt The Getlnterrupt function provides the current value of interrupts variable InterruptStatus in InterruptOut and clears all pending interrupts interrupt variable 0x0 Table 66 Getinterrupt function Write variables InterruptStatus Read variables InterruptStatus Request payload None Acknowledge payload DSFI2 InterruptStatus InterruptOut GetStatusVariables The GetStatus Variables function provides the configuration of the internal variables of the DSFI2 slave and returns Status Variables in StatusVariablesOut Table 67 GetStatusVariables function Write variables Read variables StatusVa
10. 0x0000 0x200 0 CHAM Memory Chameleon table non prefetched 0x0200 0x8 0 SERFLASH Memory Serial Flash Controller non prefetched 0x0280 0x80 0 UART Memory Virtual UART interface non prefetched of DSFI2 HANDLER 0x0000 0x8 1 UART I O Virtual UART interface of DSFI2_HANDLER MEN Mikro Elektronik GmbH 19 20F403 00 E3 2014 11 05 Functional Description 2 Functional Description 2 1 Power Supply The board is supplied with 5V via CompactPCI connector J1 2 2 Front Connectors The F403 provides four spring cage terminal blocks at the front panel Connector type 6 pin spring cage terminal block 3 5 mm Mating connector 6 pin printed circuit board connector 3 5 mm e g Phoenix Contact DFMC 1 5 3 ST 3 5 LR article number 1790496 or DFMC 1 5 3 STF 3 5 article number 1790302 Table 2 Pin assignment of front connector X1 2 VS IO1 1 VS _I01 ileal 4 1O 12 3 IO 11 E 6 10 14 5 IO 13 sIEIEI 6 Table 3 Pin assignment of front connector X2 e 2 VS IO2 1 VS _102 mml 4 IO 22 3 IO 21 DA 6 IO 24 5 IO 23 5 D EI e Table 4 Pin assignment of front connector X3 e 2 VS _103 1 VS _103 dmm 4 IO 32 3 IO 31 EN 6 IO 34 5 1O 33 5 G Bie O Table 5 Pin assignment of front connector X4 e 2 VS IO4 1 VS _104 impmgl2 4 IO 42 3 IO 41 OO 6 IO 44 5 IO 43 SI EIEI 6 O MEN Mikro Elektronik GmbH
11. Mi Execute the binary to run the demo application MEN Mikro Elektronik GmbH 50 20F403 00 E3 2014 11 05 Appendix 4 Appendix 4 1 PCI Configuration The F403 has the following IDs on the PCI bus PCI Device ID 0x4D45 PCI Vendor ID 0x1A88 Subsystem Device ID 0x5A14 Subsystem Vendor ID Oxbc 4 2 Literature and Web Resources 4 F403 data sheet with up to date information and documentation E www men de products 021403 html 4 2 1 CompactPCl e CompactPCI Specification PICMG 2 0 R3 0 b 2 1999 PCI Industrial Computers Manufacturers Group PICMG www picmg org e PCI Local Bus Specification Revision 2 2 1995 PCI Special Interest Group P O Box 14070 Portland OR 97214 USA www pcisig com 4 3 Finding out the Product s Article Number Revision and Serial Number MEN user documentation may describe several different models and or design revisions of the F403 You can find information on the article number the design revision and the serial number on two labels attached to the board Article number Gives the product s family and model This is also MEN s ordering number To be complete it must have 9 characters Revision number Gives the design revision of the product Serial number Unique identification assigned during production If you need support you should communicate these numbers to MEN Figure 9 Labels giving the product s article number revision and serial number
12. P4053 SetOutput eei ies ed 008 renn tia kena RR cen Be 35 3 3 3 F403 SetGroupOutpuls s sericis erepreRePeRLEEPes 35 3 3 4 F403 GetGrouplnputs seisis 0 0 0 ee eee eee 37 3 3 5 F403 GetGroupStatus oves sr eR ER RR RI ese 38 3 3 0 P4053 ClearGroupErtoi sess cere m e 40 3 944 P405 Interr piStatusQ ooo ceste p eda oma et ay earns 42 34 Update lool tppa load 22 3 pesce 9 uS epp bei 43 3 4 1 Installing the Update Tool c csriccsocsrersccssrerises 43 342 Using the Update Tool 3 055 ett IRI cade E 45 3 4 3 Using the Tool with the F403 45 2 9 Demo Application z 52v ence oainanen Edoem abea 49 3 5 Configuring the Geographical Address 49 3 5 2 Configuring the UART Interface 0 49 3 5 3 Compiling and Running the Demo Application 50 MEN Mikro Elektronik GmbH 12 20F403 00 E3 2014 11 05 Contents A ADDendi e nr ee EE weed ORTU ROC HH ORE URINE MEER ERE UEM 51 Al PCILConpuraton as5222934 22 merde r3 RS xb ERU 51 22 Literature and Web Resources uude dee de v gap dns 51 4 23 CompactPCL o12 r2 cros2re0d080 cncachbeaddsendcerdas 31 4 3 Finding out the Product s Article Number Revision and senal Number 2er pe ben RR RE d e eae oe 51 4 4 Background Information on Hardware Software Interface 52 4 4 4 F403 Application Programming Interface 22 442 DSF Ayer uuo eph EHURR VU S errem ec diosa 39 AAS OLP Laye ie esre p
13. Software Interface 3 2 I O Controller Functions The F403 binary I O board can be operated by F403 API functions The F403 features and corresponding F403 API functions are described in Chapter 3 3 F403 Application Programming Interface API on page 31 3 2 1 Basic I O Functions Each I O channel of an I O controller instance can be configured as output or input only The direction of I O channels can be set by configuring the I O controller instances with F403_Config Inputs The input values of all channels of an instance are read by F403_GetGroupInputs The input value of an I O channel is read even if a channel is configured as output Outputs The output values of all channels of an I O group are set by F403 SetGroupOutputs A single I O channel configured as output can be set by F403 SetOutput The output value of a channel can be set regardless of its output mode input only output 3 2 2 Output Watchdog The output watchdog of I O channels configured as output detects failures in communication with the I O instance When the output watchdog of an output channel is enabled the output channel must be set by F403 SetGroupOutputs or F403 SetOutput periodically within the watchdog timeout period The output watchdog can be enabled and configured by setting the corresponding parameter in the configuration of F403 with F403_Config If the output channel is not triggered within the watchdog timeout a w
14. Table 32 struct DSFI Function cscs cas casa cine ket saw ceed EEEE 60 Table 33 DSFI2_Function function arguments llle esses 60 Table 34 DSFI2 Function return code uelle 60 Table 35 DSFI2 send function arguments lt er ccicerecricerecricrrsas 61 Table 36 DSEI2 senu return code 229 mestre mehr tee Res 61 Table 37 DSFI2_receive function arguments 0 00 20 eee 61 Table 38 DSFI2_receive return parameters 0 0 cece eee eee 62 Table 39 DSFI2 common function overview 0 0 ee eee eee 63 Table 40 I O specific function overvieW 0 0 0 c eee ee eee eee 64 Table 41 DSFI2 handler function overview 0 00 2 ce eee eee 65 Table 42 VO controller parameters 54222 dete daa renes 66 MEN Mikro Elektronik GmbH 15 20F403 00 E3 2014 11 05 Table45 DSFI2 handler parameters 2 RR e RR RR mre 66 Table 44 Voltage Supervision du terna re eR RR YR es 0 68 Table 45 DSF data Objects a5 cundo uc gelb edo Pe Rn ert d 70 Table 46 REQ message header field INSTANCE 0000 71 Table437 DSEI23B0Stal688 co3dtr opt nEDUEW E 9 iss DIES eE 71 Table 48 Message header field MASTERID 0 00 00005 71 Table 49 REQ message header field FUNCTION seeeeeesese I2 Table 50 ACK message header field ERR 00 0600 e beeen ee eee ee 12 Table 51 Master configurationstates llle eese 13 Table 52 Slave c
15. Ven ID Dev ID SubVen ID 0 0 0 O 0x8086 0x2a40 0x8086 1 0 1 0 0x8086 0x2a41 0x0000 2 0 2 0 0x8086 0x2a42 0x8086 3 0 2 1 0x8086 0x2a43 0x8086 4 0 26 0 0x8086 0x2937 0x8086 5 Q 26 1 0x8086 0x2938 0x8086 6 0 26 7 0x8086 0x293c 0x8086 7 0 28 0 0x8086 0x2940 0x0000 8 0 28 4 0x8086 0x2948 0x0000 9 0 29 5 loo 2948 0x0000 0 29 O KENE 052954 0x8086 1 O 29 1 0x8086 0x2935 0x8086 2 1 29 2 0x8086 0x2936 0x8086 J 0 29 3 MESE Ox2939 0x8086 4 1 29 7 0x8086 0x293a 0x8086 5 0 30 0 0x8086 0x2448 0x0000 0 3st 0 Ox8086 0x2917 0x8086 7 0 Sil 2 0x8086 0x2928 0x8086 9 3 3 0x8086 0x2930 0x8086 9 3i 5 0x8086 O0x292d 0x8086 20 23 6 0x8086 0x2932 0x8086 21 3 0 0 0x8086 0x10d3 0x8086 22 4 O 0 0x8086 O0x10d3 0x8086 DE 5 10 0 Oxla88 0x4d45 0x00bc You also need the offset address from the beginning of the FPGA configuration memory space To find it out you need to have a look at the Chameleon table To do this you can again use MENMON or the fpga load tool itself through parameter t MEN Mikro Elektronik GmbH 45 20F403 00 E3 2014 11 05 Hardware Software Interface The following selects vendor ID 0x1A88 device ID 0x4D45 subsystem vendor ID OxBC instance 0 C mysystem 13z100 70 13z10070 NT OBJ Cham Info for device 5 10 0 bus dev fun chaRev 2 unitNbr 4 busek Oe table bridgeNbr 0 cpuNbr 0 BARO 0x93500000 size 0x00000000 BARI 0x00001001 s BAR2 0x00000000 s BAR3 0x00000000 size 0x0
16. a failure is detected and the output channel is disabled the failure is indicated as DSFI2 interrupt when the corresponding interrupt is enabled in instance configuration the failure can be read as channel error by FN35 GetError the failure can be read as FET failure by FN128 GetChannelError the failure can be cleared by FN36 ClearError Output Overload I O channels are monitored for channel overload This feature is always enabled If an overload error of an output channel is detected the output channel is disabled the failure is indicated as DSFI2 interrupt when the corresponding interrupt is enabled in instance configuration the failure can be read as channel error by FN35 GetError the failure can be read as overload failure by FN128 GetChannelError the failure can be cleared by FN36 ClearError Voltage Supervision The following failures on the F403 are monitored and the status can be read by FN130 GetVsvStatus Table 44 Voltage Supervision Failure Description Outputs Overvoltage Overvoltage on IO channel No effect supply voltage IO channel supply voltage over 154 V Power not good Power fail Disable all outputs of I O 10 channel supply voltage controller instance under 15 8 V Overvoltage on Overvoltage on digital supply No effect 5V voltage isolated 5 V used for status monitoring Shift error Status monitoring failure Disable all outputs of I O controller instance
17. be configured for the DSFI2 handler instance of the F403 Table 43 DSFI2 handler parameters Parameter Values Description Watchdog clear 0b0 0b1 Clear internal watchdog timeout indica Output value bit 0 tion Interrupt Enable disable Indication of asynchronous events Temperature failure Voltage failure Power good failure MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix Operational State When an instance is configured it can be set to OPERATIONAL state by FN1 SetOperational In this state the instances are fully operational Configuration cannot be changed in OPERATIONAL state 4 4 2 7 VO Controller Functions Basic I O Functions Each I O channel of an I O controller instance can be configured as output or input only The direction of I O channels can be set by configuring the I O controller instances with FN2 SetConfig The number of I O channels of an I O controller instance can be read by FN39 GetNumChannels For F403 all 4 I O controller instances support 4 channels The input values of all channels of an instance are read by FN34 GetInputValues The input value of an I O channel is read even if a channel is configured as output The output values of all channels of an I O controller instance are set by FN32 SetOutput Values The output values of all channels of an I O controller instance can be read by FN33 GetOutputValues A single I O configured as output can be se
18. eee 31 Table 12 F403_Config parameters per I O channel 32 Table 13 F403 ConfigO common parameter 0 0 00 00 esee 32 Table 14 F403 ConfigO function arguments 0 0 00005 23 Table 15 struct F403 loOfpCOnlI 9 bbs UD IPPEMPIqUPPP PRU 33 Table 16 struct F403 BoardCohfIg t cus semet Rm Res 34 Table 17 F403 SetOutput function arguments 0 000 5 35 Table 18 F403 SetGroupOutputs function arguments 36 Table 19 F403 GetGroupInputs function arguments 31 Table 20 F403_GetGroupStatus function arguments 38 Table 21 struct F403 ErrStatus t for F403_GetGroupStatus 39 Table 22 F403 ClearGroupError function arguments 40 Table 23 struct F403 ErrStatus t for F403_ClearGroupError 41 Table 24 F403 InterruptStatus function arguments 0 42 Table 25 struct F403 InterruptStatus t for F403 InterruptStatus 42 Table 26 DSEI2 Instances io noise hose eri eun echo erheben giankeae 57 Table 27 MISC opin cotiDecHOns oo ror saretan ot IS ORE EP 58 Table 28 MISC interrupt status connections 0 0 00 0 0s eee ee 58 Table 29 DSPI2 imt return codes IRI stiir tEn nkka Enia 58 Table 30 DSFI2 Config function arguments 00000005 59 Table 31 DSF Config rer Codecs 2 246540340554 9364040 0044000 0 59
19. hold MEN and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim or personal injury or death associated with such unintended or unauthorized use even if such claim alleges that MEN was negligent regarding the design or manufacture of the part In no case is MEN liable for the correct function of the technical installation where MEN products are a part of Trademarks All products or services mentioned in this publication are identified by the trademarks service marks or product names as designated by the companies which market those products The trademarks and registered trademarks are held by the companies producing them Inquiries concerning such trademarks should be made directly to those companies Conformity MEN products are no ready made products for end users They are tested according to the standards given in the Technical Data and thus enable you to achieve certification of the product according to the standards applicable in your field of application MEN Mikro Elektronik GmbH 10 20F403 00 E3 2014 11 05 About this Document RoHS Since July 1 2006 all MEN standard products comply with RoHS legislation Since January 2005 the SMD and manual soldering processes at MEN have already been completely lead free Between June 2004 and June 30 2006 MEN s selected component sup
20. of 64 size 0x010000 Erase Sector gt OK gt OK PROGRAM offset 0x00080000 size 0x0002eca4 Please wait Unlocking sector Current write status 131072 bytes written from 191652 bytes VERIFY Please Wait Write and Verify OK MEN Mikro Elektronik GmbH 48 20F403 00 E3 2014 11 05 Hardware Software Interface 3 5 Demo Application The demo application 13Y020 06 shows how to use the F403 with the DSFI2 API It is a sample application for the input and output functions of the BINIO The demo application is available under Downloads on the WT F403 product pages The demo application supports Linux Windows and VxWorks Before using the demo application you have to configure the geographical address and UART connection 3 5 1 Configuring the Geographical Address The geographical address of the PCI slot must be given in file main c In main c the address variable is called G_GeoAddress line number 78 Change the value for the selected PCI slot The protocol reads the geographical address from the hardware and verifies it by comparing it with the address provided by the user The F403 APIs will be available to communicate only if the geographical address matches the address provided by the user Otherwise an error message will be displayed 3 5 2 Configuring the UART Interface The UART configuration of a communication interface is operating system specific Linux For Linux the sets
21. register provides the following functions Table 72 INTERRUPT MASK states INTERRUPT MASK x Description Read 0 Interrupt enabled 1 Interrupt disabled Write 0 Enable interrupt 1 Disable interrupt Default Ox FFF F_FFFF Interrupt Generation T O controllers support interrupt generation INTERRUPT STATUS x is only set to 0b1 if the corresponding INTERRUPT MASK x bit is 0b0 Otherwise INTERRUPT STATUS x is 0b0 An external interrupt signal is set to 0b1 if any bit in INTERRUPT STATUS is active The interrupt status can be cleared by a write access to the interrupt register in the I O controller Pending interrupts are indicated by an external interrupt signal The interrupt signal is set to 0b1 if any bit in INTERRUPT STATUS is 0b1 Otherwise the signal is set to 0b0 MEN Mikro Elektronik GmbH 85 20F403 00 E3 2014 11 05 Appendix In case a Wishbone timeout occurs the error is indicated in the ERR field of the corresponding ACK according to Table 50 ACK message header field ERR on page 72 I O controllers implement the parameter valid register and forward and use the values of the I O controller addresses 0x000 Ox17F as follows Table 73 parameter valid register parameter valid Description 0 No update of internal registers Update internal registers 4 4 2 14 DSFI2 Handler Unit The DSFI2 handler unit provides access to the I O controllers of the DSFI2
22. 0 E3 2014 11 05 Hardware Software Interface This is how you can update the user image C mysystem 13z100 70 13Z10070 NT OBJ EXE MEN I386 FREE gt fpga_load 1a88 4d45 bc u w FA03 00ICO01A1 02 00 bin 80000 v 2100 PCIInit Update device Nr bus dev fun BARO BARI BAR2 BAR3 BARA BAR5 0 5 iO 0 93500000 00001001 00000000 00000000 00000000 00000000 Cham Info for device 5 10 0 bus dev fun chaRev 2 busId 0 tableNbr 1 unitNbr 4 bridgeNbr 0 cpuNbr 0 BARO 0x93500000 size 0x00000000 mapType MEM BARI 0x00001001 size 0x00000000 mapType I0 BAR2 0x00000000 size 0x00000000 mapType unused BAR3 0x00000000 size 0x00000000 mapType unused BAR4 0x00000000 size 0x00000000 mapType unused BAR5 0x00000000 size 0x00000000 mapType unused CHAMELEONV2 HEADER 0 busType 0x00 busId 0 model 0 revision 0x02 file F403 001C001 magicWord 0xabce CHAMELEONV2_UNIT Idx DevId Module Grp Inst Var Rev IRQ BAR Offset Address 0 0x0018 167024 SRAM 0 0 1 13 63 0 0x00000000 0x93500000 1 0x007e 167126 SERFLASH 0 0 amp 63 0 0x00000200 0x93500200 Init Flash FLASH stm25p32 Identify mnf 0015 dev 0020 FLASH stm25p32 Checkld Found FLASH device STMICROM25P32 4M Write block ERASE Sectors Please wait Unlocking sector Erasing sector 9 of 64 size 0x010000 Erase Sector gt OK Erasing sector 10 of 64 size 0x010000 Erase Sector gt OK Erasing sector 11
23. 0000000 BAR4 0x00000000 s BAR5 0x00000000 s ize 0x00000000 ize 0x00000000 ize 0x00000000 ize 0x00000000 CHAMELEONV2 HEADER 0 CHAMELEONV2 UNIT Idx DevId Module 0 0x0018 167024 SRAM 1 0x007e 167126 SERFLASH 2 0x0063 3 0x0063 busType 0x00 busId 0 model 0 revis file F403 00I1C001 magicWord 0xabce EXE MEN I386 FREE gt fpga_load 1A88 4D45 BC t loi is maplype MEM maplype I0 maplype unused maplype unused maplype unused maplype unused ion 0x02 Grp Inst Var Rev IRQ BAR Offset Address 0 0 EN 63 0 0x00000000 0x93500000 0 0 0 ONES 0 0x00000200 0x93500200 0 0 0 d 63 0 0x00000280 0x93500280 0 0 0 1 4 1 0x00000000 0x1001 Now you can write e g your binary file to Flash Parameter u followed by the binary file name and the FPGA configuration number 0 for the F403 will update the FPGA with the offset address in Flash being read from the Flash header This way you can avoid accidental overwriting of the fallback data C mysystem 13z100 70 13zZ10070 NT OBJ EXE MEN I386 FREE gt fpga_load 1172 4D45 BC u F403 001C001A1 02 00 bin 0 MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Hardware Software Interface This is how you can update the factory image C mysystem 13z100 70 13Z10070 NT OBJ EXE MEN I386 FREE gt fpga_load 1888 4d45 bc z f w FA03 001CO01A1 02 0Q rbf v 2100 PCIInit Update device Nr bus dev fun BARO BARI BAR2
24. 148 0x14B reserved 31 16 counter 2 15 0 Counter 2 Ox14C 0x14F reserved 31 16 counter 3 15 0 Counter 3 0x150 0x153 reserved 31 16 counter 4 15 0 Counter 4 0x154 0x157 reserved 31 16 counter 5 15 0 Counter 5 0x158 0x15B reserved 31 16 counter 6 15 0 Counter 6 0x15C 0x15F reserved 31 16 counter 7 15 0 Counter 7 0x160 0x163 reserved 31 6 ga 5 0 Geographical address 0x164 0x167 codetest_id 31 0 Codetest 0x168 0x16B codetest val 31 0 Codetest debug value 0x16C 0x16F INSTANCE INTERRUPT Instance interrupt 0x170 0x173 INTERRUPT_STATUS 31 0 InterruptStatus 0x174 0x177 Reserved Reserved 0x178 0x179 reserved 15 10 DEVICE 9 0 Deviceld device number Ox17A reserved 7 6 VARIANT 5 0 Deviceld variant 0x17B Reserved Reserved 0x17C 0x17D REV_MAJ 7 0 REV_MIN 7 0 Revision Ox17E 0x17F Reserved Reserved 0x180 reserved 7 1 Operational Parameters valid 0x181 0x1FF Reserved Reserved Note DEVICE 0x3F indicates that no device is present for this instance MEN Mikro Elektronik GmbH 88 20F403 00 E3 2014 11 05 Appendix The DSFI2 handler unit implements the GPOUT variable of the HANDLER OutputValue data type to control general purpose outputs Changes on GPOUT are assigned to ouputs only if the Operational register is 0b1 The HANDLER OutputValue data type is 32 b
25. 20 20F403 00 E3 2014 11 05 Functional Description Table 6 Signal mnemonics of front connectors X1 X4 Signal Direction Function VS _lO 1 4 in Power input of I O groups 1 to 4 24 VDC to 110 VDC nominal VS IO 1 4 in Power ground of I O groups 1 to 4 IO 11 14 in out Binary I O of I O group 1 IO 21 24 in out Binary I O of I O group 2 IO 31 34 in out Binary I O of I O group 3 IO 41 44 in out Binary I O of I O group 4 2 3 Debug LED page 17 For the position of the debug LED see Figure 1 Map of the board top view on The debug LED indicates the FPGA load status factory or user image is loaded Table 7 Debug LED Debug LED Description green red on on The FPGA is programmed with the factory image and no configuration error has occurred yet on off The FPGA is programmed with the applica tion image off on The FPGA has returned to factory image after a configuration error off off The FPGA is not loaded MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Functional Description 2 4 Principle of Operation The F403 provides four optically isolated units of four I O channels each For a general block diagram including isolation see Chapter Diagram on page 3 The 16 binary inputs outputs can be configured individually see Chapter SetConfig on page 81 The isolated logic supply is re
26. 20F403 00 E3 2014 11 05 F403 3U CompactPCI Binary I O Card for Railways Anean F403 3U CompactPCI Binary I O Card for Railways F403 3U CompactPCI9 Binary I O Card for Railways The F403 is a binary I O CompactPCI board especially designed for railway applications The card is used for input output of digital signals with different voltage levels and ground references It supports 16 bidirectional digital input output channels which are separated into four optically isolated groups Its voltage range from 14 4 VDC to 154 VDC and its current output of 1 A at 24 V complies with EN 50155 which makes the board ready for immediate use in train applications The four front connectors are implemented by using spring cage terminal blocks causing only low wiring outlay and supporting fast installation The binary railway I O supports all safety measures necessary for mobile environments like trains including voltage and temperature supervision and readback of outputs MEN Mikro Elektronik GmbH 2 20F403 00 E3 2014 11 05 Diagram B Note The F403 is also available with eight inputs outputs i e Front Q Rear i SAE S ONE E AEAEE E V EAE AE EE EEE MEN Mikro Elektronik GmbH 3 20F403 00 E3 2014 11 05 Technical Data Technical Data Binary I Os 16 binary signals 4 optically isolated groups 4 channels for each group The following I O configurations are possible 16 inputs outputs or
27. AL MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix Link Initially each instance enters the UNLINKED state after reset power up That means that no master is able to control the DSFI2 instance in this state The instance must be linked to an application part master before the instance can be configured The instance is linked to the master by the FNO SetMasterId function The instance enters the CONFIGURE state from its initial state UNLINKED Parameter Configuration If an instance is in CONFIGURE state all configuration parameters can be written by EN2 SetConfig The configuration parameters can be read back by FN3 GetConfig The following parameters can be configured for each I O controller instance of the F403 Table 42 I O controller parameters Parameter Values Description Output mode Input only Set mode of I O channel output Output value Open closed Set output value Current drain Continuous Set current of input channel trigger constant period 1 Hz 100 Hz Output Enable disable Compare whether output value is read back comparison on corresponding input channel Disable output in case of error Output watchdog Disable Disable output channel when not set 8 120 ms periodically Interrupt Enable disable Indication of asynchronous events Input value changed D channel error Common error The following parameters can
28. EN Mikro Elektronik GmbH 30 20F403 00 E3 2014 11 05 3 3 Hardware Software Interface F403 Application Programming Interface API The F403 API provides a set of functions to configure and operate the F403 binary I O board The API uses the UART interface of one F403 board and handles the DSFI2 protocol stack to operate the F403 For more details on F403 API implementation and usage of DSFI2 API functions see Chapter 4 Appendix on page 51 Figure 8 F403 API Software Application F403 API DSFI2 API F403 I O group 1 O group UART interface UART driver X I O group 2 I O group 3 I O group 4 All F403 API functions return the following error status Table 11 Error status for API functions Configuration Value Description int errorStatus F403 SUCCESS Action was performed successfully No communi cation error or slave status error occurred F403 ERROR An error occurred during the requested action F403 INVALID DATA Invalid input parameter Example a pointer value is NULL the parameter array does not contain all the configurations of the I O groups F403_GEOADDR_ERROR The geographical address provided by the user does not match the F403 encoded address Communication errors An error code is generated in the communica tion uint8_t intPending 0 no interrupt 1 interrupt pending
29. F403 GetGroupInputs This function reads all inputs of one I O controller instance Parameters Communication interface O group number 1 4 Return values Input value 4 bit 0 low 1 high Communication error code nterrupt pending flag Function call struct F403 Status F403 GetGroupInputs uint8 t iFace uint8 t ioGroup uint8 t status Table 19 F403_GetGroup nputs function arguments Configuration Parameters Description uint8_t iFace Communication interface uint8_t ioGroup I O group number uint8 t status Pointer to data buffer The received input status will be saved here Value bitwise status 3 0 chann 4 chann 1 status x 0 input low status x 1 input high For more information on the F403_GetGroupInputs function see Chapter 4 4 1 4 F403_GetGroupInputs on page 52 MEN Mikro Elektronik GmbH 37 20F403 00 E3 2014 11 05 Hardware Software Interface 3 3 5 F403 GetGroupStatus This function reads status and errors of one I O controller instance and instance 0 DSFI2 handler Parameters Communication interface I O group number 1 4 Return values Overload failure 4 bit 0 no error 1 error FET failure 4 bit 0 no error 1 error Output watchdog failure 4 bit 0 no error 1 error T O voltage supervision error 4 bit 0 no error 1 error I O voltage gt 35 V 0 lt 35 V 12 35 V Temperature fail
30. LER Instint Instint MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix 44 3 STP Layer The Serial Transmission Protocol STP is a byte based transmission protocol used for point to point connections Data is transmitted in STP telegrams As it is not required for point to point connections the STP does not support addressing The STP provides framing of data octets of any length However in case of the F403 the length is limited by internal buffers Figure 24 STP layer communication Software 202 Application Y DSFI2 master Y STP client STP communication layer Lower Layer Protocol Stack Lower layer depends on physical connection 1 t The STP layer receives data from the upper layer The received data is assembled to a STP telegram and is sent to the lower layer IP core communication mandatory The STP layer receives data from the lower layer The received STP telegram is sent to the upper layer 4 4 8 4 Framing and Bit Stuffing STP defines three special characters END 0xC0 ESC 0xDB BEG 0xC5 and RST 0xA5 e If a data byte is the same code as END a two byte sequence of ESC and 0xDC is sent instead If a data byte is the same code as ESC a two byte sequence of ESC and OxDD is sent instead If a data byte is the same code as RST a two byte sequence of ESC and OxDE is sent instead If a data
31. LINKED SetMasterld ID 0 SetMasterld ID 0 SetMasterld ID 0 2 CONFIGURE 1 gt OPERATIONAL SetOperational ID Masterld 2 REQ F REQ Y Table 52 Slave configuration states Configuration State Description POWERUP After power up the slave default values for variables are loaded from Flash and applied UNLINKED Configuration by a DSFI2 master is required CONFIGURE Slave is configured OPERATIONAL Slave is fully configured and operational MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 DSFI2 Slave Variables The following permissions configuration states Table 53 DSFI2 Slave Variables Appendix apply to variables of a DSFI2 slave in the different Variable Type Description Config Variables DSFI2 Variables Common and DSFI2 slave specific configuration variables Deviceld DSFI2 Deviceld Included in ConfigVariables OpVariables DSFI2 Variables Common and DSFI2 slave specific operational variables StatusVariables DSFI2 Variables Common and DSFI2 slave specific status variables Masterld DSFI2 Masterld ID of the configuring master is stored ConfigState DSFI2 ConfigState Internal state of slave InterruptStatus DSFI2 InterruptStatus Indicate interrupts InterruptMask DSFI2 InterruptMask Enable disable interrupts Table 54 Configuration states for DSFI2 slave variables
32. Output comparison in the form of channel mask uint16 t outputWat 3 0 channel 1 7 4 channel 2 11 8 channel 3 15 12 channel 4 The timeout value of the watchdog timer in the form of channel mask 0 enable 12 disable uint8_t interrupt Interrupt enable disable in the form of channel mask MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Hardware Software Interface Table 16 struct F403_BoardConfig_t Configuration Parameters Description F403 loGrpConfig t ioGrp1Conftig Configuration parameters for I O group 1 F403 loGrpConfig t ioGrp2Config Configuration parameters for I O group 2 F403 loGrpConfig t ioGrp3Config Configuration parameters for I O group 3 F403 loGrpConfig t ioGrp4Config Configuration parameters for I O group 4 uint8 t genlnterrupt General interrupt enable disable For more information on the F403_Config function see Chapter 4 4 1 1 FA403 Config on page 52 MEN Mikro Elektronik GmbH 34 20F403 00 E3 2014 11 05 Hardware Software Interface 3 3 2 F403 SetOutput This function sets a single output of one I O controller instance Parameters Communication interface O group number 1 4 Channel number 1 4 Output value 0 open 1 closed Return values Communication error code nterrupt pending flag Function call struct F403 Status FLOS SetOutput uint8 t iFace uint8 t ioGroup uint8 chann
33. RATIONAL 8 GetDeviceld CONFIGURE Read ID of instance OPERATIONAL 9 Clearinterrupt OPERATIONAL Clear pending interrupts l O Specific Function Profile Figure 13 O specific function profile 1 O specific FN33 GetOutputValues FN34 GetInputValues FN35 GetError FN128 GetChannelError Basic I O Functions FN32 SetOutputValues FN37 SetOutputValue gt 1 O Error Handling FN36 ClearError 1 O Status FN39 GetNumChannels b FN130 GetVsvStatus hy AM dag UNA MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Table 40 O specific function overview Appendix FN Function State Description 32 SetOutputValues OPERATIONAL Set all binary outputs of instance 33 GetOutputValues CONFIGURE Read status of all binary OPERATIONAL outputs of instance 34 GetlnputValue OPERATIONAL Read status of all binary inputs of instance 35 GetError CONFIGURE Read pending errors OPERATIONAL 36 ClearError OPERATIONAL Clear pending errors 37 SetOutputValue OPERATIONAL Set a single output channel 39 GetNumChannels CONFIGURE Read number of I O channels OPERATIONAL 128 GetChannelError CONFIGURE Read channel related errors OPERATIONAL 130 GetVsvStatus CONFIGURE Read voltage supervision OPERATIONAL status DSFI2 Handler Function Profile Figure 14 DSFI2 handler function profi
34. Table 74 DSFI2 handler unit address space 0 000 eee eee eee 87 Table 75 INSTANCE INTERRUPT mapping eeseeseeee eee 89 Table 76 INSTANCE INTERRUPT states 2254 ook rk ote denn 89 Table 77 DSPEI2Header 25 s cca dame RE eR es 90 Table 78 SetOutputV alue function 22 nope rp ER REPRISE DE 90 Table 79 GetOutputValue function cs 62 ceed cea e nr 90 Table 80 RegisterTest Tuncton 2 2 aerae RERO RR RR RE 90 Table Sl Getlnputy alle TUnellob 32x bedurtdo erre o Erde m dpa 91 Table 82 GetDSEI2Header function 2 2229 rrt diab riere re nani 91 Table 85 Getinstancelnterrupt TUNCHON sereis Haws a ew riitt eO ERI 91 Table 84 STP special characters i ais e e ehe Rees 94 MEN Mikro Elektronik GmbH 16 20F403 00 E3 2014 11 05 Getting Started 1 Getting Started This chapter gives an overview of the board and some hints for first installation in a system 1 1 Map of the Board Figure 1 Map of the board top view CompactPCl connector J2 Spring cage terminal block X1 Spring cage terminal block X2 Spring cage terminal block X3 Spring cage terminal block X4 CompactPCl connector J1 Debug LED MEN Mikro Elektronik GmbH 17 20F403 00 E3 2014 11 05 Getting Started 12 Integrating the Board into a System You can use the following check list when installing the board in a system for the first time and with minimum configuration MI Power down t
35. Update Controller 3 1 1 DSFI2 PCI Device The F403 PCI device uses one of the following methods for identification on the PCI bus Table 8 DSFI2 PCI device Vendor ID Device ID Description 0x1A88 0x4D45 Chameleon table at BAR 0 memory mapped offset 0x0 Chameleon table includes a 16Z2099 00 instance which is used as DSFI2 handler 0x1A88 0x4432 Virtual UART with 76Z099 00 DSFI2 handler at BAR 0 IO mapped offset 0x0 The F403 contains a 32 bit PCI to Wishbone bridge The PCI configuration header corresponds to the following table MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Hardware Software Interface Table 9 PCI configuration header Address Byte 3 2 1 0 00 Device ID 0x4D45 Vendor ID 0x1A88 04 Status Register Command Register 08 Class Code 0x068000 Revision ID OxXX OC BIST Header Type Latency Timer Cache Line Size 10 Base Address Register 0 14 Base Address Register 1 18 Base Address Register 2 1C Base Address Register 3 20 Base Address Register 4 24 Base Address Register 5 28 Card Bus CIS Pointer 2C Subsystem ID 0x5A14 Subsystem Vendor ID 0x00BC 30 Expansion ROM Base Address Register 34 Reserved 38 Reserved 3C Maximum Minimum Interrupt Pin Interrupt Line Latency Grant 0x01 MEN Mikro Elektronik GmbH 27 20F403 00 E3 2014 11 05 Hardware
36. _ClearGroupError 3 2 5 Voltage Supervision The following failures on the F403 are monitored and the status can be read by F403_GetGroupStatus Table 10 Voltage supervision Failure Description Outputs Overvoltage Overvoltage on I O channel No effect supply voltage I O channel supply voltage over 154 V Power not good Power fail All outputs of I O I O channel supply voltage under controller instance are 15 8V disabled Overvoltage on Overvoltage on digital supply No effect 5V voltage isolated 5 V used for status monitoring Shift error Status monitoring failure All outputs of I O control ler instance are disabled MEN Mikro Elektronik GmbH 29 20F403 00 E3 2014 11 05 Hardware Software Interface If a voltage supervision error is detected the failure is indicated as DSFI2 interrupt if the corresponding interrupt is enabled in configuration the failure can be read by F403_GetGroupStatus e the failure can be cleared by F403_ClearGroupError 3 2 6 Current Drain Trigger The input current of I O channels configured as input Current Drain Trigger CDT can be configured with the corresponding parameters in the configuration of I O controller instances with F403_Config CDT mode continuously triggered constant 1 mA constant 10 mA CDT period 1 Hz 100 Hz Figure 7 Current Drain Trigger Current 1msto 10 mA 1mA aac 4 Time 10msto1s M
37. ader will be returned dataP Upon successful reception the payload data will be written to the user data buffer dataLenP The value of the data length will be updated with the received payload length when the receive operation is successful 4 4 2 5 DSFI2 Function Profile Each DSFD IP core provides two sets of functions which can be used by the application common functions which are identical for each IP core and IP core specific functions DSFI2 Common Function Profile Figure 12 DSFI2 common function profile DSFI2 common Configuration FNO SetMasterld b FN1 SetOperational FN2 SetConfig b FN8 GetDeviceld FN7 GetStatusVariables FN3 GetConfig Nu UNS NOR FN9 Clearinterrupt Interrupt Handling FN6 GetInterrupt MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Table 39 DSFI2 common function overview Appendix FN Function State Description O SetMasterld UNLINKED Master ID 0 unlink instance any for master id 0 Master ID 0 link instance to master 1 SetOperational CONFIGURE Set instance to operational mode 2 SetConfig CONFIGURE Write configuration block 3 GetConfig CONFIGURE Read configuration block OPERATIONAL 6 Getinterrupt CONFIGURE Read pending interrupts OPERATIONAL 7 GetStatusVariables CONFIGURE Read status block OPE
38. ane bdo oou pd pi odes pa bain andes 92 4 4 4 Telegram Layout i23 c24 chase cscncacecas RR 94 MEN Mikro Elektronik GmbH 13 20F403 00 E3 2014 11 05 Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Figure 28 MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Map ot the board 1op VIeWa o nutrientes Ron d cnp 17 Map of the board front panel 4222s 18 9 SUB Gc ote qua ostii rus Suri vito bt te wise ED WERTE DI Reb 22 Pulsed input current oss RR e Re cae oe 23 Protocol layer communication 2 2 sre ner mnbr rwr rri 25 Hardware software interface to F403 00 000 26 Current Drain THe Se ee ister int tee er oim Primes igna 30 FAOS APs coc ndgadarsyeaoaiiateueemaveaoenn Matre Hong teda 31 Labels giving the product s article number revision and serial number scias eve apie cw eis de WAVE epp id appe ER 51 DSFI2 instances 422 2 e ae br RE ER PRI E 55 DSF subsystem Juan ben rnb em eoe eee ep obs 56 DSEI2 common function profile 12 sss eR n 62 O specitic function profiles 22 o bre REP Ea 63 DSF handler function prolile 2 veio b ILI REPRE PPP 64 DSPI2 configuration uae hr eR RR re RR Re RR ETE 65 Current Drain IriS Ser
39. ariant 0x17B Reserved Reserved 0x17C 0x17D REV MAJ 7 0 REV MIN 7 0 Revision Ox17E 0x17F Reserved Reserved 0x180 Operational Parameters valid 0x181 0x1FF Reserved Reserved Note DEVICE z 0x3F indicates that no device is present for this instance MEN Mikro Elektronik GmbH 54 20F403 00 E3 2014 11 05 Appendix DEVICE describes one individual device and identifies its programming interface register map If several functions have the same programming model the DEVICE is equal but the VARIANT is different DEVICE is read only DEVICE 9 0 last three digits of the MEN product number 6Z lt DEVICE gt e g 0x02c for 762044 DISP Each device can be implemented as a specialized variant e g with different behavior or features but must support always the same device specific programming interface The VARIANT 5 0 number is used to differentiate between these specialized devices e g GPIO and GPIO via SPI VARIANT is read only The REV MAJ 7 0 belongs to the major revision number of the I O controller The REV MIN 7 0 belongs to the minor revision number of the I O controller REV MAJ and REV MIN are read only The INTERRUPT STATUS register indicates pending interrupts according to the following table Table 71 INTERRUPT STATUS states INTERRUPT STATUS x Description Read 0 No interrupt pending 1 Interrupt pending Write 0 1 Clear interrupt The INTERRUPT MASK
40. atchdog failure is detected and the output channel is disabled the failure is indicated as DSFI2 interrupt if the corresponding interrupt is enabled in configuration e the failure can be read as output watchdog failure channel error by F403 Get GroupStatus e the failure can be cleared by F403_ClearGroupError MEN Mikro Elektronik GmbH 28 20F403 00 E3 2014 11 05 Hardware Software Interface 3 2 3 Output Comparison The comparison of I O channels configured as output with the corresponding input channel detects failures of I O channels The comparison can be enabled by setting the corresponding parameter in the configuration of I O controller instances with F403_Config If the input value of an output channel does not match the output value a failure is detected and the output channel is disabled the failure is indicated as DSFI2 interrupt if the corresponding interrupt is enabled in configuration the failure can be read as FET failure by F403_GetGroupStatus the failure can be cleared by F403_ClearGroupError 3 2 4 Output Overload I O channels are monitored for channel overload This feature is always enabled If an overload error of an output channel is detected the output channel is disabled the failure is indicated as DSFI2 interrupt if the corresponding interrupt is enabled in configuration the failure can be read as overload failure by F403_GetGroupStatus the failure can be cleared by F403
41. ational OPERATIONAL ACK err Slave State Error FN2 SetConfig FN4 SetDefaults MEN Mikro Elektronik GmbH 83 20F403 00 E3 2014 11 05 Appendix Priority Error Dsri ME KaM Action 9 Masterld of message CONFIGURE ACK err 2 Wrong Masterld Masterld of slave in functions OPERATIONAL FN1 SetOperational FN2 SetConfig FN4 SetDefaults any function that affects variables 10 FNO9 Clearlnterrupt CONFIGURE ACK err Slave State Error 11 Function not implemented Any ACK err Invalid Request 12 lowest FN32 FN255 CONFIGURE ACK err Slave State Error Invalid Message Reception Acknowledge messages received by a DSFD slave are ignored 4 4 2 13 3 DSFI2 I O Controller Address Space The address space of a DSFI2 I O controller is as follows Table 70 Address space of DSFI2 I O controller MI i Address Register Description OpVariables 0x00 0x7F I O controller specific address range Reserved ConfigVariables 0x80 0xEF I O controller specific address range Reserved OxF0 0xF3 INTERRUPT_MASK 31 0 InterruptMask OxF4 0xFF Reserved Reserved StatusVariables 0x100 0x16F I O controller specific address range Reserved 0x170 0x173 INTERRUPT_STATUS 31 0 InterruptStatus 0x174 0x177 Reserved Reserved 0x178 0x179 Reserved 15 10 DEVICE 9 0 Deviceld Device Number Ox17A Reserved 7 6 VARIANT 5 0 Deviceld V
42. ave has access to the FPGA I O controllers upper layer Received data from the lower layer is disassembled into single requests Each request is evaluated and the resulting read write accesses to the addressed I O controller are performed Read data and status are assembled to a DSFI2 acknowledge If interrupts are pending the header of acknowledge is extended by interrupt information and replied to the lower layer 4 4 2 2 I O Controller Identification In the DSFI2 protocol each I O controller provides identification information by itself An instance based addressing is used to identify all available I O controllers without the need for the user to provide additional information The DSFI2 controller for the F403 is a virtual UART interface with DSFI2 subsystem The DSFI2 subsystem is scanned for I O controllers Starting with DSFI2 instance 0 the device register of each instance is read until 0x3F is read no device The available I O controller instances in the DSFI2 subsystem are provided as a DSFI2 table Table 26 DSFI2 instances Instance ID Description Detailed Specification 0 099 MISC DSFI2 HANDLER including virtual UART interface 1 124 BINIO 1 Binary I O controller for I O group 1 2 124 BINIO 2 Binary I O controller for I O group 2 3 124 BINIO 3 Binary I O controller for I O group 3 4 124 BINIO 4 Binary I O controller for I O group 4 5 126 FLASH Flash interface for update I O contr
43. byte is the same code as BEG a two byte sequence of ESC and OxDF is sent instead BEG is transmitted before the first byte in the telegram and END is transmitted after the last byte in the telegram A 16 bit CRC is calculated over STP payload data and is appended to STP data The CRC is appended before the END character is inserted Received STP telegrams are discarded MEN Mikro Elektronik GmbH 92 20F403 00 E3 2014 11 05 Appendix Figure 25 STP overview payload payload l CRC protected x le CRC protected gt BEG dO di dn 1 dn CRC1 CRCO END BEG do di dn 1 dn CRC1 CRCO END STP telegram STP telegram 4 4 3 2 Reset If the RST character is received the communication channel is reset 4 4 8 3 CRC A 16 bit CRC is used to ensure integrity of the STP payload Received STP frames are checked for CRC errors The polynomial 0x139B is used for calculating the CRC The initial value OXFFFF is used for CRC calculation Figure 26 STP CRC MSB LSB CRC1 CRCO byte 1 byte 0 gt Received STP telegrams are checked for CRC errors Erroneous telegrams are discarded and ignored 4 4 3 4 STP Telegram Layout An STP telegram has the following layout Figure 27 STP telegram payload CRC protected BEG do di dn 1 dn CRC1 CRCO END STP telegram MEN Mi
44. ceive Parameters per DSFI2 function call nstance number Function number Pointer to send payload data Pointer to receive payload data Return value per DSFI2 function call Error code Received payload Received payload length Function call Jue DSFIZ Jeune om struct Sr Jp Teu t 79 mEUUMCE T GI a Table 32 struct DSFI Function uint8 t size Data Description uint8 t instance Instance number uint8 t function Function number uint8 t outData Pointer to data for transmission uint16 t outDataSize Size of the transmit data buffer uint8 t inData Pointer to the data buffer for the received data uint8 t inDataSize Size of the receive data buffer int errorStatus Error status after performing the action It comprises the communication error and the slave status error Table 33 DSFI2 Function function arguments Configuration Description nFunction Pointer to an array of the function data structures size Array size Table 34 DSFI2 Function return code Value Description DSFI SUCCESS The function call is successful DSFI ERROR An error occurred during the function call DSFI INVALID DATA The pointer value is NULL or the size is 0 MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix DSFI2 send This function sends DSFD requests Parameters nstance number Func
45. cription ERR 3 0 1 lowest No error 0x0 2 Wishbone timeout 0x1 3 Wrong Masterld 0x2 4 Invalid REQ 0x3 5 Slave unlinked 0x4 6 Reserved 0x5 7 Length error 0x6 8 Invalid instance 0x7 9 Invalid function 0x8 10 Slave unconfigured 0x9 11 Slave state error OxA 12 highest Internal error Others MEN Mikro Elektronik GmbH 72 20F403 00 E3 2014 11 05 4 4 2 12 DSFI2 Master Application DSFI2 Master Services A DSFD master is used to operate DSFI2 I O controllers It sends DSFI2 request messages initiated by application software and receives the resulting DSFI2 acknowledges that were sent by the accessed DSFI2 slave I O controller DSFI2 Master States A DSFI2 Master implements the following state flow Figure 18 DSFI2 Master states ACK ACK received received reset i NACK slave unlinked NACK slave unlinked gt SetMasterld 0 gt SetMasterld 0 assert error assert error ACTIVE PASSIVE UNLINKED SetOpData SetOpData further SetMasterld ID further function calls SetMasterld ID SetMasterld ID function calls returned ACTIVE returned PASSIVE NACK wrong Masterld assert error Table 51 Master configuration states Appendix NACK wrong Masterld assert error Configuration state Description MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 UNLINKED Link DSFI2 slave ACTIVE Control over slave gained Configure slave a
46. d operation on a variable If an operation is not permitted the ERR flag in the ACK shall be set to Invalid REQ and internal variables are not changed Table 53 DSFI2 Slave Variables on page 77 for variables permissions Slave UNLINKED A DSFD slave evaluates the functions called in requests in the UNLIKED state If a function other than SetMasterld is called when the DSFI2 slave is in the UNLINKED state the ERR flag in the ACK is set to Slave unlinked and internal variables are not changed SetMasterld The SetMasterld function sets the Masterld variable to the value of the MASTERID of the request message if the DSFI2 slave is in the UNLINKED state or if the MasterldIn is 0x0 The new value of the MasterlId is returned in MasterIdOut For the setting of the ConfigState variable see Chapter Figure 21 DSFI2 Slave Configuration of State Machine on page 76 If MasterIdIn is 0x0 the parameter valid register of the affected instance is set to 0x00 Table 60 SetMasterld function Write variables Masterld ConfigState Read variables Masterld Request payload None Acknowledge payload DSFI2 Masterld MasterldOut SetOperational The SetOperational function sets the ConfigState variable to OPERATIONAL if the DSFI2 slave is in the CONFIGURE state Otherwise the ERR flag in the ACK is set to Invalid REQ and internal variables are not changed The parameter valid register of the affected instance i
47. ding errors of I O channels by calling FN128 GetChannelError M Read pending common errors by calling FN35 GetError M Clear pending errors by calling FN36 ClearError M Read voltage supervision status by calling FN130 GetVsvStatus Perform the following step for DSFI2 instance 0 DSFI2 handler Mi Read internal status by calling FN35 GetInputValue 4 4 1 6 F403 ClearGroupError Perform the following step for one I O controller instance of the F403 M Clear pending errors by calling FN36 ClearError 4 4 1 7 F403 InterruptStatus Read pending interrupts of the F403 Clear pending interrupts Perform the following steps M Determine DSFI2 instances with pending interrupts by calling FN37 GetInstanceInterrupt of DSFI2 instance 0 DSFI2 handler M Read pending interrupts of all I O controller instances by calling FN6 GetInterrupt MI Clear pending interrupts of all I O controller instances by calling FN9 ClearInterrupt M Read pending interrupts of DSFI2 instance 0 DSFI2 handler by calling FN6 GetInterrupt Mi Clear pending interrupts of DSFI2 instance 0 DSFI2 handler by calling FN9 ClearInterrupt MEN Mikro Elektronik GmbH 0 53 20F403 00 E3 2014 11 05 Appendix 4 4 2 DSFI2 Layer DSFI2 is a message based communication protocol layer used to access the I O controller on the F403 Communication with the I O controller is done via a virtual UART interface For the host software it appears as a standard 16550 UART interface O
48. e repeated here 2 6 1 Geographical Addressing The F403 also provides CompactPCI J2 connector for geographical addressing It provides the GA signals GAO to GA4 MEN Mikro Elektronik GmbH 24 20F403 00 E3 2014 11 05 Hardware Software Interface 3 Hardware Software Interface 3 1 Introduction The F403 appears on the PCI bus as a standard UART interface providing a 16550 compatible register interface This ensures easy access to the board using all common operating systems The communication between the software and the F403 is handled by the DSFI2 protocol stack which consists of the DSFI2 protocol layer and an underlying protocol which is optimized for byte based communication STP protocol layer see Figure 5 Protocol layer communication Figure 5 Protocol layer communication Software F403 Application p Y DSF2 e Y SIP 00000 de Y Medium Dependent depends on physical Layer connection The F403 is a DSFI slave The F403 implements up to four I O controllers for binary I O MEN Mikro Elektronik GmbH 25 20F403 00 E3 2014 11 05 Hardware Software Interface Figure 6 Hardware software interface to F403 PCI DSFI2 HANDLER BINIO I O group 1 UART interface DSFI2 BINIO protocol I O group 2 handler I O group 3 BINIO I O group 4 BINIO Serial Flash
49. edges to the application which initiated the corresponding requests in a master implementation Functions Requests contain a function number that indicates which operation shall be performed There are various functions that are divided as follows Functions which have to be supported by every DSFI2 slave Functions which are specific to a single DSFI2 slave A set of general functions is available in all I O controllers Additionally there are I O controller specific functions MEN Mikro Elektronik GmbH 54 20F403 00 E3 2014 11 05 Appendix Configuration I O controller operation is divided into a configuration phase and an operational phase Configuration is performed by general functions that are equal for all DSFI2 I O controllers An I O controller is not operational until it has been configured by a DSFI2 master The DSFD layer is initialized by the DSFI2 UL initialize function and configured by the DSFI2 UL parameter function The DSFI2 protocol accesses the IP cores DSFI2 instances in the FPGA Each IP core needs to be configured by the application before it can be used For configuration and normal operation the application triggers predefined functions of the IP cores e g set binary outputs The F403 provides the following DSFI2 instances Figure 10 DSFI2 instances F403 DSFI2 Subsystem Application UART PCI DSFI2 Controller Instance 1 4 d
50. el uint8 t status Table 17 F403 SetOutput function arguments ped Description uint8 t iFace Communication interface uint8 t ioGroup I O group number uint8 channel Channel number of the I O group uint8 t status status bit 0 0 output switch open status bit 0 1 output switch closed For more information on the F403_SetOutput function see Chapter 4 4 1 2 F403_SetOutput on page 52 3 3 3 F403 SetGroupOutputs This function sets all outputs of one I O controller instance at once Parameters Communication interface O group number 1 4 Output value 4 bit 0 open 1 closed Return values Communication error code nterrupt pending flag Function call struct F403 Status FAOS SetGroupOutputs uint8 t iFace uint8 t ioGroup uint8 t status MEN Mikro Elektronik GmbH 35 20F403 00 E3 2014 11 05 Hardware Software Interface Table 18 F403 SetGroupOutputs function arguments Configuration Parameters Dosenpaen uint8 t iFace Communication interface uint8_t ioGroup I O group number uint8 t status Value bitwise status 3 0 chann 4 chann 1 status x 0 output switch open status x 1 output switch closed For more information on the F403_SetGroupOutputs function see Chapter 4 4 1 3 F403_SetGroupOutputs on page 52 MEN Mikro Elektronik GmbH 36 20F403 00 E3 2014 11 05 Hardware Software Interface 3 3 4
51. erial command line tool is used to configure the UART interface The sample UART configuration for Linux is given in the file f403_init sh M Required packages setserial stty e g run apt get install setserial from termi nal to install setserial package MI Open terminal as root M Adapt setserial and stty parameters in f403_init sh M Update the interface name dev ttySx in the protocol configuration file proto col config h line number 74 Helse static interface t ifaceArray dev ttyS0O IF 1 dev ttyS1 IF 2 Hendif The protocol stack needs to know which interface is configured It gets the interface configuration from file protocol_config h In this file more than one interface can be configured along with a reference e g JF_ The configured interface reference has to be used in the API to access the interface over the F403 API MEN Mikro Elektronik GmbH 49 20F403 00 E3 2014 11 05 Hardware Software Interface Windows The application uses the MODE command line tool to configure the UART interface Vl Configure the UART in file main c line number 117ff Hif defined WIN32 defined WIN32 defined WIN32 HANDLE consInput consInput GetStdHandle STD INPUT HANDLE system MODE COM3 BAUD 115200 PARITY N RETRY N DATA 8 STOP 1 to on xon off odsr off octs off dtr off rts off idsr off system cls M Update the interface name COMx in the protocol configuration
52. file protocol_ config h so the protocol stack knows which interface is configured line num ber 66ff if defined WIN32 defined WIN32 defined WIN32 static interface t ifaceArray COM3 IF 1 The protocol stack needs to know which interface is configured It gets the interface configuration from file protocol_config h In this file more than one interface can be configured along with a reference e g IF_1 The configured interface reference has to be used in the API to access the interface over the F403 API VxWorks For VxWorks there is no need to configure a UART interface The default settings can be used M Update the interface name tyCo x in the protocol configuration file protocol_ config h line number 70 so the protocol stack knows which interface is con figured Helif defined VxWorks static interface t ifaceArray t tyCo 1 IR lE 1 The protocol stack needs to know which interface is configured It gets the interface configuration from file protocol config h In this file more than one interface can be configured along with a reference e g IF 1 The configured interface reference has to be used in the API to access the interface over the F403 API 3 5 3 Compiling and Running the Demo Application Once you have made your configurations you have to compile the source code M Call make compile bat as per the operating system This generates binary file f403 example
53. ge supervision error 4 bit 0 no effect 1 clear error Return values Communication error code nterrupt pending flag Function call struct F403 Status FA403 ClearGroupError uint8 t iFace uint8 t ioGroup struct F403 ClearError clearError Table 22 F403 ClearGroupError function arguments Den Description uint8_t iFace Communication interface uint8_t ioGroup I O group number F403_ClearError Pointer to the F403 ClearError structure Upon clearError successful execution the structure will be updated MEN Mikro Elektronik GmbH 0000 40 20F403 00 E3 2014 11 05 Hardware Software Interface Table 23 struct F403 ErrStatus t for F403_ClearGroupError Configuration Parameters Description uint8 t oveloadFail Overload failure Value bitwise overloadFail 3 0 2 chann 4 chann 1 overloadFail x 0 no effect overloadFail x 1 clear overload error uint8 t fetFail FET failure Value bitwise fetFail 3 0 2 chann 4 chann 1 fetFail x 2 0 no effect fetFail x 2 1 clear output FET failure uint8 t wdtFail Output watchdog failure Value bitwise wdtFail 3 0 2 chann 4 chann 1 wdtFail x 0 no effect wdtFail x 1 clear output watchdog error uint8 t vsvError I O voltage supervision error Value bitwise vsvError 0 Overvoltage error on IO channel supply voltage vsvError 1 reserved vsvError 2 Power fail of IO channel
54. gulated in a way that the positive rail is always VS _IOx and the logic ground is always 5V 10 below VS _IOx Figure 3 I O stage VS _lOx positive external supply voltage O p Be 1 0 CTRL 3s LV OUT x1 Output stage Y 1 lo x1 0 7 malae LV IN x1 e WEY Input stage E X fe Shift register for O current drain VS IOx control negative external supply voltage MEN Mikro Elektronik GmbH 22 20F403 00 E3 2014 11 05 Functional Description 2 5 Pulsed Input Current A pulsed current of typically 10 mA flows for approximately 1 ms with a continuous current of 1 2 mA minimum in between the pulses The pulse frequency can be set in steps of 10 Hz see Chapter SetConfig on page 81 within the range of Hz to 100 Hz valid settings 1 10 20 100 Hz Figure 4 Pulsed input current Current 1msto 10 mA 1mA PB i 10 ms to1s Time MEN Mikro Elektronik GmbH 23 20F403 00 E3 2014 11 05 Functional Description 2 6 CompactPCI Interface The F403 supports a 32 bit 33 MHz CompactPCI interface fully compatible with CompactPCI specification PICMG 2 0 Rev 3 0 The board works with 3 3 V Connector type of J1 110 pin shielded 2mm pitch 5 row receptacle according to IEC 917 and IEC 1076 4 101 The pin assignment of connector J1 as defined in the CompactPCI specification will not b
55. he system M Insert the F403 into a peripheral slot of your CompactPCI system making sure that the CompactPCI connectors are properly aligned Note The peripheral slots of every CompactPCI system are marked by a circle O on the backplane and or at the front panel MEN Mikro Elektronik GmbH 18 20F403 00 E3 2014 11 05 Getting Started 1 3 Installing Driver Software The F403 does not need any specific driver since the 16550 compatible UART driver of the operating system can be used see Chapter 3 Hardware Software Interface on page 25 The UART driver of the operating system has to be configured specifically for the F403 Port address port name IRQ and UART type have to be set A demo application for Linux Windows and VxWorks is available D You can download the demo application on the F403 pages on MEN s XT X website For configuration instructions see Chapter 3 5 Demo Application on page 49 The following UART types are supported 16450 no FIFO 16550 16550A 16 byte FIFO 16650 32 byte FIFO 16750 64 byte FIFO 16850 128 byte FIFO As the UART is only a virtual UART physical parameters like baudrate base clock etc are not relevant The UART interface can either be operated on memory mapped BAR with MDIS or on I O mapped BAR with the default driver of operating system Table 1 PCI address map Offset Size BAR Description Mapped Detailed Specification
56. instance 0 The DSFI2 handler unit implements the instances variable of the HANDLER Instances data type Instances are read only The HANDLER Instances data type is 32 bit Instances x are 0b1 if instance number x is implemented Otherwise Instances x is 0b0 The DSFI2Header variable of the HANDLER DSFI2Header data type is read only The HANDLER DSFI2Header data type is 24 byte The DSFI2Header has the following mapping MEN Mikro Elektronik GmbH 69 20F403 00 E3 2014 11 05 Table 77 DSFI2Header Appendix DSFI2Header byte x Variable Description 0x00 0x02 OxABD Magic Word 0x03 DSFI2ProtocolType DSFI2 Protocol type 0x00 DSFI2 version 0 0x04 0x0F Fpgald 95 0 ASCII string of FPGA program ming file name e g F403 001C001 0x10 FpgaRevMin 7 0 FPGA minor revision 0x11 FpgaRevMaj 7 0 FPGA major revision 0x12 0x13 0x0000 Reserved 0x14 0x17 Instances 31 0 Implemented instances as defined above SetOutputValue The SetOutputValue function updates the OpVariables GpOut variable with the content of OutputValueIn Table 78 SetOutputValue function Write variables OpVariables OutputValue Read variables Request payload HANDLER_OutputValue OutputValueln Acknowledge payload None GetOutputValue The GetOutputValue function returns OutputValueOut Table 79 GetOutputValue function the OpVariables GpOut variable in W
57. it GPOUT x is 0b0 as default General purpose output x is set to GPOUT x The GPIN variable of the HANDLER InputValue data type reads general purpose inputs The HANDLER InputValue data type is 32 bit GPIN x is 0b0 as default GPIN x reflects the status of general purpose input x The Test variable of HANDLER Test data type is writeable and readable for debug purposes The HANDLER Test data type is 32 bit The Counter0 7 counter variables are 16 bit each and are writeable The counters are incremented reset depending on the external connection The GA 5 0 variable represents the geographical address of the DSFI2 handler unit and the device if available The codetest id 31 0 and codetest val 31 0 variables are used for debug purposes only Significant parts of sources can be identified by writing unique values to the codetest id variable Values used for debug purposes can be written to codetest val The DSFI2 handler unit provides the INSTANCE INTERRUPT variable to provide the interrupt status of DSFI2 I O controllers The INSTANCE INTERRUPT variable is mapped as follows Table 75 INSTANCE INTERRUPT mapping INSTANCE INTERRUPT x 31 1 0 Interrupt source DSFI2 instance 31 1 DSFI2 instance 0 DSFI2 handler unit Table 76 INSTANCE INTERRUPT states InterruptStatus x Description 0 No interrupt pending Interrupt pending The DSFI2 handler unit is implemented as DSFD
58. kro Elektronik GmbH 0 93 20F403 00 E3 2014 11 05 Appendix 4 4 8 5 STP Special Characters The following characters are not used in payload and are replaced as follows Table 84 STP special characters Character Replaced by Description Name Value BEG 0xC5 ESC OxDF Beginning of telegram END 0xCO ESC 0xDC End of telegram RST OxA5 ESC 0xDE Reset command ESC OxDB ESC 0xDD Escape character 4 4 4 Telegram Layout The following message layout is applied to DSFI2 frames Figure 28 Request layout DSFI2 header Data DSFI2 frame VEA eU j MC Header Payload STP media dependent telegram MEN Mikro Elektronik GmbH 94 20F403 00 E3 2014 11 05
59. ktronik GmbH 74 20F403 00 E3 2014 11 05 Appendix DSFI2 Slave Function Profile A DSFD slave supports the following functions Figure 20 DSFI2 common slave function profile Function profile for DSFI2 slave base class General DSFI2 Masterld Masterld DSFI2 ConfigState ConfigState FNO SetMasterid MEN FNO SetMasterld DSFI2 Masterld Masterld DSFI2 Masterld Masterld FN1 SetOperational Configuration DSFI2 InterruptMask InterruptMask SetConfig GetConfig FN2 DSFI2 Variables OpVariables FN3 pSFI2 Variables OpVariables DSFI2 Variables ConfigVariables DSFI2 Variables ConfigVariables SetDefaults GetDefaults FN4 DSFI2 Variables OpVariables FN5 pSFI2 Variables OpVariables DSFI2 Variables ConfigVariables DSFI2 Variables ConfigVariables Operational Status FN Getlnterrupt DSFI2_InterruptStatus InterruptStatus DSFI2 Interrupt Interrupt DSFI2 Deviceld Deviceld DSFI2 Variables StatusVariables GetDeviceld FN8 DSFI2 Deviceld Deviceld DSFI2 ConfigState ConfigState FN9 Clearinterrupt NM FN9 ClearInterrupt DSFI2 Interrupt Interrupt DSFI2 Interrupt Interrupt 7 GetStatusVariables V Yy MEN Mikro Elektronik GmbH 75 20F403 00 E3 2014 11 05 Appendix DSFI2 Slave Configuration of State Machine Figure 21 DSFI2 Slave Configuration of State Machine POWERUP Defaults from flash are applied REQ UN
60. le DSFI2 Handler specific FN32 SetOutputValue FN34 RegisterTest 2 FN33 GetOutputValue FN35 GetlnputValue FN36 GetDSFI2Header FN37Getlnstancelnterrupt WE Win y MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Table 41 DSFI2 handler function overview Appendix FN Function State Description 32 SetOutputValue OPERATIONAL Write internally used outputs Clear internal watchdog failure 33 GetOutputValue CONFIGURE Read internally used outputs OPERATIONAL 34 RegisterTest any Communication test 35 GetinputValue CONFIGURE Read F403 status OPERATIONAL Temperature failure Voltage failure Power good Board status FPGA factory user image loaded Internal watchdog failure 36 GetDSFIl2Header any Read the board ID revision 37 Getinstancelnterrupt CONFIGURE Read interrupts of DSFI2 OPERATIONAL instances to determine which instance has pending interrupts 4 4 2 6 Configuration Each of the DSFI2 instances must be configured by application before it can be used Therefore a logical connection to a single application part master must be established before the instance can be configured and operated Figure 15 DSFI2 configuration SetMasterld ID a reset power up UNLINKED SetMasterld ID 0 sen CONFIGURE SetOperational 0 OPERATION
61. lue bitwise wdtFail 3 0 chann 4 chann 1 wdtFail x 0 no effect wdtFail x 1 clear output watchdog error uint8 t channelError I O channel error uint8 t commonError I O common error uint8 t temperatureFail Temperature failure uint8 t voltageFail Supply voltage failure For more information on the F403 InterruptStatus function see Chapter 4 4 1 7 F403 InterruptStatus on page 53 MEN Mikro Elektronik GmbH 42 20F403 00 E3 2014 11 05 Hardware Software Interface 3 4 Update Tool fpga load MEN s FPGA update tool fpga_load offers the possibility to load data in binary format to Flash memory You can also use the tool to program software applications or other binary data to Flash For the detailed user manual of the FPGA update tool please go to E MEN s website Some bus architectures swap the bytes within a word or the words within a long word The latest update of fpga load recognizes automatically if swapping is necessary or not You should use the latest version of the update tool If you use an older version please refer to the tool s inline documentation for hints on byte swapping 3 4 1 Installing the Update Tool Windows Note MEN s article number of the Windows update tool is 13Z100 70 d Download the ZIP file from MEN s website M Unpack it M Execute the fpga_load exe file Linux Note MEN s article number of the Linux update t
62. ments embedded into coding examples are shown in green text IRQ IRQ in out MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 About this Document Signal names followed by a hashtag or preceded by a forward slash indicate that this signal is either active low or that it becomes active at a falling edge Signal directions in signal mnemonics tables generally refer to the corresponding board or component in meaning to the board or component out meaning from it the board or component Blue vertical lines in the outer margin indicate sections where changes have been made to this version of the document About this Document Legal Information Changes MEN Mikro Elektronik GmbH MEN reserves the right to make changes without further notice to any products herein Warranty Guarantee Liability MEN makes no warranty representation or guarantee of any kind regarding the suitability of its products for any particular purpose nor does MEN assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages TO THE EXTENT APPLICABLE SPECIFICALLY EXCLUDED ARE ANY IMPLIED WARRANTIES ARISING BY OPERATION OF LAW CUSTOM OR USAGE INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR USE In no event shall MEN be liable for mo
63. mplement the ConfigState variable of the DSFI2 ConfigState data type ConfigState contains the configuration state of the DSFD slave ConfigState is 1 byte and coded as follows Table 57 DSFI2 ConfigState ConfigState 7 2 ConfigState 1 0 Configuration State Reserved 0b00 POWERUP Reserved 0b01 UNLINKED Reserved 0b10 CONFIGURE Reserved 0b11 OPERATIONAL DSFI2 slaves implement the InterruptStatus variable of the DSFI2 InterruptStatus data type and are 32 bit InterruptStatus contains pending interrupts Table 58 DSFI2 InterruptStatus InterruptStatus x Description 0 No interrupt pending Interrupt pending DSFI2 slaves implement the InterruptMask variable of the DSFI2 InterruptMask data type and is 32 bit InterruptMask contains pending interrupts Table 59 DSFI2 InterruptMask InterruptMask x Description 0 Interrupt enabled Interrupt disabled Wrong Masterld A DSFD2 slave checks the DSFI2 Masterld which is transmitted with a REQ when the function of the REQ performs a write operation on a variable If the transmitted DSFI2_MasterId does not match the MasterlId of the master the slave is linked to the ERR flag in the ACK is set to Wrong MasterId and internal variables are not changed MEN Mikro Elektronik GmbH 79 20F403 00 E3 2014 11 05 Appendix Invalid Request A DSFD slave checks whether a function of a REQ performs a vali
64. nd set slave to operational Perform function calls for normal operation PASSIVE Control over slave not gained Check configuration of slave Check variables during normal operation Assert error if slave does not behaves as specified 73 Appendix 4 4 2 13 DSFI2 Slave I O Controller 4 4 2 13 1 DSFI2 Slave Services A DSFI2 slave is an IP core in an FPGA which is operated via the DSFI2 protocol DSFI2 request messages which are initiated by application software are received by a DSFI2 handler The DSFI2 handler performs the requested operations on the I O controller and sends back a DSFI2 acknowledge message for each request 4 4 2 13 2 DSFI2 Slave Base Class DSFI2_ Slave Inheritance A DSFI 2 slave is derived from the DSFI2 base class All variables and functions of the parent class are available in the derived class Figure 19 DSFI2 Slave I O function profile DSFI2 slave base class Variables general FNO 31 base functions gt FNO 31 base functions gt DSFI2 group Variables group specific FN32 127 group specific b FN32 127 group specific gt DSFI2 slave Variables slave specific FN128 255 slave specific FN128 255 slave specific functions functions A common set of functions for all DSFI2 slaves is supported A DSFI2 slave may implement additional DSFI2 slave specific functions MEN Mikro Ele
65. nly the physics is omitted and the I O controller is connected directly in order to avoid the high restrictions in performance when using a real UART interface depending on the Baud rate setting Communication to the upper software layer is limited to a single path due to the UART interface If more than one path is required to the upper layer interface of the DSFD layer the upper layer is responsible for arbitration of the paths e g the priorization of requests from upper layers or the arbitration of multiple requests from upper layers The DSFI2 does not support buffering or retry of requests This feature has to be implemented by upper level software if required The DSFI2 provides a unique software interface for different physical interfaces A message based communication protocol layer is used to access I O controllers in an FPGA An access is a transmission between a master and a slave Each access consists of a request message REQ and a corresponding acknowledge message ACK The order of requests acknowledges must not be changed Asynchronous events can be indicated by the slave by setting an interrupt flag in acknowledge messages ACK The DSFI2 layer has the following main tasks Operation of the I O controller with functions on a high abstraction level Addressing the I O controller Identification of the I O controller Assigning requests to the addressed I O controller instance in a DSFI2 subsys tem Reassigning acknowl
66. not include detailed information on individual components data sheets etc A list of literature is given in the appendix History Issue Comments Date E1 First issue 2013 11 28 E2 Added Chapter 3 5 Demo Application on page 47 2013 12 17 Updated Chapter 1 3 Installing Driver Software on page 19 and Chapter 3 3 F403 Application Pro gramming Interface on page 31 E3 Updated format Minor editorial changes and 2014 11 05 improved structure Reworked Chapter 3 5 demo application Conventions Indicates important information or warnings concerning the use of voltages that could lead to a hazardous situation which could result in personal injury or damage or destruction of the component A A Indicates important information or warnings concerning proper functionality of the product described in this document Az The globe icon indicates a hyperlink that links directly to the Internet where the latest updated information is available When no globe icon is present the hyperlink links to specific elements and information within this document italics bold mono comment MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Folder file and function names are printed in italics Bold type is used for emphasis A monospaced font type is used for hexadecimal numbers listings C function descriptions or wherever appropriate Hexadecimal numbers are preceded by 0x Com
67. od failure MEN Mikro Elektronik GmbH 32 20F403 00 E3 2014 11 05 Parameters Communication interface Geographical address Hardware Software Interface Configuration parameter set of 4 I O groups Return values Communication error code nterrupt pending flag Function call Sere 194405 SESHEU SS FAOS Config uint8 t iFace uint8 t geoAddr struct F403 BoardConfig t boardConfig Table 14 F403 Config function arguments Configuration Parameters Description uint8 t iFace Communication interface uint8 t geoAddr Geographical address F403 BoardConfig t boardConfig Pointer to the configuration structure of all 4 I O groups Table 15 struct FA403 loGrpConfig Configuration Parameter Value Parameters bitwise Description uint8_t ioGroup 1 4 I O group number masterID Master ID uint8 t ioMode 3 0 chann 4 Mode of the I O channel in the form of channel mask chann 1 uint8 t ioVal 3 0 chann 4 Output value of the I O channels in the form of chann 1 channel mask uint8_t cdtMode 1 0 channel 1 3 2 channel 2 5 4 channel 3 7 6 channel 4 Current drain trigger mode in the form of channel mask uint16_t cdtPeriod 3 0 channel 1 7 4 channel 2 11 8 channel 3 17 12 channel 4 Current drain trigger period in the form of channel mask 3 0 chann 4 chann 1 uint8_t outputCmp
68. oller identification can be omitted if DSFI2 configuration is known MEN Mikro Elektronik GmbH 57 20F403 00 E3 2014 11 05 Appendix 4 4 2 3 DSFI2 Integration on F403 The gpin input of the MISC unit of the DSFI2 HANDLER is connected as follows Table 27 MISC gpin connections gpin x Connected signal 0 t_fail_n 1 v_fail_n 2 pwgood 3 board_status 0 4 board_status 1 else Ob0 The interrupt status input of the MISC unit of the DSFI2 HANDLER is connected as follows Table 28 MISC interrupt status connections interrupt status x Connected signal 0 NOT t fail n 1 NOT v fail n 2 NOT pwgood else Ob0 4 4 2 4 DSFI2 API DSFI2_init This function initializes the DSFI layer and the layers below it Mi Configure the lower protocol type MI Initialize the lower layer Return value Error code Function call Tate DSF Mie e s Table 29 DSFI2 init return codes Value Description DSFI SUCCESS The initialization is successful DSFI ERROR An error occurred during the initialization process DSFI PROT NOT SET The lower protocol is not configured correctly MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix DSFI2 Config Write a 256 Byte configuration block of one DSFI2 instance by calling the following functions of the DSF2 instance M Call FN8 GetDeviceld and check IP core ID Unlink instance by calling FNO Se
69. ontipuralron states 2543 eene thu ed Dara cens 76 Table53 DSFI2 Slave Variables 2 m Rt RR RR RR TI Table 54 Configuration states for DSFI2 slave variables 17 Table 55 Mapping of DSFD slave variables eese 78 Table 56 Mapping of DSFI2_Deviceld oi so eer I ere 79 Table 57 DSEI2 ConbgState 2 222992 ornare akea REELLT ORES Cbr i edens 79 Table 58 DSF InterrupiStatus 2 932 23 ersten AERE BRE ess 79 Table59 DSF IntertuptMask v eberet pp REI REP coe hiess es eed 79 Table 60 SetMiasterld FUNCION smsen idane date cin made m Gare seaman ends 80 Table 61 SetOperational MncuiOM 5 9 opener ce age gan ogee ew ease 80 Fable62 SetGonie MINCHON oe ceo d dot wages 8 oo ed t 9a obe b odore 81 Table 63 GetConlbig IunClIOn s iue br pb pde mmorises 81 Table 64 SetDetaults futictiol sar ieri G45 asandae acana Ekaa nh RR wa 81 Table 65 GetDetaults TUDetloni eres s e eV ite PER Rer E UR eames 82 Table 66 Getlntetrupt UNCON 1 rriro estio Ive RI COPIES TS 82 Table 67 GetStatus Variables function c cse ete Rm titas 82 Table 68 GetDeviceld function 2 coa ERE RRE Ee 83 Table89 DSFR nor Gases sau oi 9 vod dbi ako banaue well 83 Table 70 Address space of DSFI2 I O controller sellers 84 Table 71 INTERRUPT STATUS states lsssseeeeee e 85 Table 72 INTERRUPT MASK states xcd 8643654 See ERA TX ERRORES 85 Table 73 parameter valid registi 22 Lie rr bi E IPS EE UP EU 86
70. ool is 13Z100 91 d Download the ZIP file from MEN s website M Unpack it MI The tool is now present as an executable binary file fpga_load MEN Mikro Elektronik GmbH 43 20F403 00 E3 2014 11 05 Hardware Software Interface VxWorks Note MEN s article number of the VxWorks update tool is 13Z100 60 d Download the ZIP file from MEN s website M Unpack it M Integrate program mak into an existing MDIS make file Modify the paths of the mak files if needed ALL COM TOOLS MDIS API M MOD ID COM program mak MDIS API M REV ID COM program mak COM TOOLS FPGA LOAD COM program mak M Execute make MEN Mikro Elektronik GmbH 44 20F403 00 E3 2014 11 05 Hardware Software Interface 3 4 2 Using the Update Tool You can call the help function simply by entering fpga load This outputs a list of possible parameters for fpga load If you use the tool under VxWorks you need to put any parameter of fpga load in quotation marks e g fpga load s This is not necessary under Windows or Linux The following shows how to use fpga load using some examples under Windows 3 4 3 Using the Tool with the F403 Generally you need to find out the Vendor ID Device ID and Subsystem Vendor ID of the F403 and pass it to the tool You can do this using MENMON or using the Jpga_load parameter s C mysystem 13z100 70 13Z10070 NT OBU EXE MEN I386 FREE gt fpga_load s Nr bus dev fun
71. p Mechanical Specifications Dimensions conforming to CompactPCI specification for 3U boards Front panel 4 HP with ejector Weight 292 g Environmental Specifications Temperature range operation 40 4 85 C qualified components Airflow 1 0 m s e Temperature range storage 40 85 C Relative humidity operation max 95 non condensing Relative humidity storage max 9596 non condensing Altitude 300 m to 3000 m Shock 50 m s 30 ms EN 61373 Vibration function 1 m s 5 Hz to 150 Hz EN 61373 Vibration lifetime 7 9 m s 5 Hz to 150 Hz EN 61373 Conformal coating standard MTBF 418612 h 40 C according to IEC TR 62380 RDF 2000 Safety Flammability PCB manufactured with a flammability rating of 94V 0 by UL recognized manufacturers Hlectrical Safety Insulation measurement test according to EN 50155 10 2 9 1 Voltage withstand test according to EN 50155 10 2 9 2 Information technology equipment test according to EN 60950 EMC Conformity EN 55011 radio disturbance IEC 61000 4 2 ESD IEC 61000 4 3 electromagnetic field immunity IEC 61000 4 4 burst IEC 61000 4 5 surge IEC 61000 4 6 conducted disturbances MEN Mikro Elektronik GmbH o 20F403 00 E3 2014 11 05 Technical Data Software Support The F403 is supported by standard OS UART drivers A demo application for Linux Windows and VxWorks is available LS The demo a
72. pliers have changed delivery to RoHS compliant parts During this period any change and status was traceable through the MEN ERP system and the boards gradually became RoHS compliant WEEE Application The WEEE directive does not apply to fixed industrial plants and tools The compliance is the responsibility of the company which puts the product on the market as defined in the directive components and sub assemblies are not subject to product compliance In other words Since MEN does not deliver ready made products to end users the WEEE directive is not applicable for MEN Users are nevertheless recommended to properly recycle all electronic boards which have passed their life cycle Nevertheless MEN is registered as a manufacturer in Germany The registration number can be provided on request Copyright 2014 MEN Mikro Elektronik GmbH All rights reserved Germany MEN Mikro Elektronik GmbH Neuwieder Strafe 3 7 90411 Nuremberg Phone 49 911 99 33 5 0 Fax 49 911 99 33 5 901 E mail info men de www men de MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 France MEN Mikro Elektronik SAS 18 rue Ren Cassin ZA de la Ch telaine 74240 Gaillard Phone 33 0 450 955 312 Fax 33 0 450 955 211 E mail info men france fr www men france fr USA MEN Micro Inc 860 Penllyn Blue Bell Pike Blue Bell PA 19422 Phone 215 542 9575 Fax 215 542 9577 E mail sales menmicro com www menmicro com Contents
73. pplication is available for download on the F403 product W pages under Downloads MEN Mikro Elektronik GmbH 6 20F403 00 E3 2014 11 05 Product Safety Product Safety Electrostatic Discharge ESD Computer boards and components contain electrostatic sensitive A devices Electrostatic discharge ESD can damage components To protect the board and other components against damage from static electricity you should follow some precautions whenever you work on your computer Power down and unplug your computer system when working on the inside Hold components by the edges and try not to touch the IC chips leads or circuitry Use a grounded wrist strap before handling computer components Place components on a grounded antistatic pad or on the bag that came with the component whenever the components are separated from the system Only store the board in its original ESD protected packaging Retain the original packaging in case you need to return the board to MEN for repair MEN Mikro Elektronik GmbH 7 20F403 00 E3 2014 11 05 About this Document About this Document This user manual is intended only for system developers and integrators it is not intended for end users It describes the hardware functions of the board connection of peripheral devices and integration into a system It also provides additional information for special applications and configurations of the board The manual does
74. re than the contract price for the products in question If buyer does not notify MEN in writing within the foregoing warranty period MEN shall have no liability or obligation to buyer hereunder The publication is provided on the terms and understanding that 1 MEN is not responsible for the results of any actions taken on the basis of information in the publication nor for any error in or omission from the publication and 2 MEN is not engaged in rendering technical or other advice or services MEN expressly disclaims all and any liability and responsibility to any person whether a reader of the publication or not in respect of anything and of the consequences of anything done or omitted to be done by any such person in reliance whether wholly or partially on the whole or any part of the contents of the publication Conditions for Use Field of Application The correct function of MEN products in mission critical and life critical applications is limited to the environmental specification given for each product in the technical user manual The correct function of MEN products under extended environmental conditions is limited to the individual requirement specification and subsequent validation documents for each product for the applicable use case and has to be agreed upon in writing by MEN and the customer Should the customer purchase or use MEN products for any unintended or unauthorized application the customer shall indemnify and
75. riables Request payload None Acknowledge payload DSFI2 Variables StatusVariablesOut MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix GetDeviceld The GetDeviceld function provides the device number variant revision and internal state of the DSFI2 slave and returns e Deviceld in DeviceldOut ConfigState in ConfigStateOut Table 68 GetDeviceld function Write variables Read variables Deviceld ConfigState Request payload None Acknowledge payload DSFI2 Deviceld DeviceldOut DSFI2 ConfigState ConfigStateOut Error Cases In case of an error DSFD slaves behave as follows Table 69 DSFI2 error cases m DSFI2 slave FSM Priority Error etate Action 1 highest Error in lower layers Any Ignore errors 2 Message received in POWERUP Ignore message POWERUP state 3 Message received with length Any Ignore message lt 3 byte header 4 Message received with invalid Any ACK err Length Error length not as expected by DSFI2 function 5 FNO SetMasterld with Masterld CONFIGURE ACK err Slave State Error MasterlD of slave OPERATIONAL Payload contains current Masterld of slave 6 FNO SetMasterld with Masterld CONFIGURE ACK err No error 0 OPERATIONAL Payload contains current Masterld of slave 7 FN1 7 FN9 255 UNLINKED ACK err Slave unlinked any function except FNO SetMasterld FN8 GetDeviceld 8 FN1 SetOper
76. rite variables Read variables OpVariables OutputValue Request payload None Acknowledge payload HANDLER_OutputValue OutputValueOut RegisterTest The RegisterTest function returns the contents of TestIn Table 80 RegisterTest function Write variables Read variables Request payload HANDLER Test Testin Acknowledge payload HANDLER Test TestOut MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 GetinputValue The GetInputValue function returns Input ValueOut Table 81 GetinputValue function Appendix the StatusVariables GpIn variable in Write variables Read variables Status Variables Gpin Request payload None Acknowledge payload HANDLER_InputValue InputValueOut GetDSFl2Header The GetDSFI2Header function returns the Status Variables DSFI2Header variable in DSFI2HeaderOut Table 82 GetDSFI2Header function Write variables Read variables Status Variables DSFl2Header Request payload None Acknowledge payload HANDLER_DSFI2Header DSFIl2Header Out Getinstancelnterrupt The GetInstanceInterrupt function returns the Status Variables Instance_Interrupt variable in InstInt Table 83 Getlnstancelnterrupt function Write variables Read variables Status Variables Instancelnterrupt Request payload None Acknowledge payload HAND
77. river with I O group 1 4 F403 API 16550 compatible DSFI2 API UART interface General functions l O specific Instance 0 functions DSFI2 Handler General functions Handler specific functions MEN Mikro Elektronik GmbH 55 20F403 00 E3 2014 11 05 Appendix 4 4 2 1 DSFI2 Roles Master client sending request messages Slave client sending acknowledge messages A DSFD slave is an I O controller behind the DSFI2 handler Figure 11 DSFI2 subsystem DSFI2 System I O controller I O controller Interface gt DSFI2 handler I O controller I O controller MEN Mikro Elektronik GmbH 56 20F403 00 E3 2014 11 05 Appendix DSFI2 Master A DSFD master has to initialize a DSFI2 connection The DSFI2 subsystem is scanned for available I O controller instances unless they are already known The result is provided as a DSFD table A DSFI2 master gets one or more requests by the upper layer The DSFI2 requests are assembled into DSFI2 request messages and handed to the lower layer as payload Received data from the lower layer is stored and disassembled into single acknowledges Each acknowledge is evaluated for error or interrupt information and reassigned to the corresponding request The acknowledge payload and status are sent back to the upper layer Interrupts that are transmitted in acknowledges are indicated to the upper layer DSFI2 Slave A DSFD sl
78. s podus 9p UR EDGE eI ORE Pts 69 DSF message OVeP VIEW cartent a oae od RO pa d pne 70 DSF Master States eon ereere sorea eee mese pR mea ard posta 13 DSF Slave VO function prolile 206 ccsndadans trenta 74 DSFI2 common slave function profile 0 00000 ee 75 DSFI2 Slave Configuration of State Machine 76 Interrupt information of handler unit 2 000000 86 DSEI2 handler function profile cs 601 5o eR IR eee dds 87 STP layer cOmMMUMCANON o5 sce rede eod hte pente 02 STP OVEMVMEW PP 93 OLE CRE repens oduPIuD SEE PEIPER Saree ak ERE 93 STP telegram 242 eur p 0804080 oa REC RAE RETE E 93 Request layOut a5 2 virer EI bre tI SaNi nni SNE PU 94 Tables dable T POlLaddress Maps oues dta eot ur eaueted ed panim ex etes as 19 Table2 Pin assignment of front connector X1 0 002000008 20 Table3 Pin assignment of front connector X2 0 0 0 00 esee 20 Table 4 Pin assignment of front connector X3 0 0 0 00 0002 ee 20 Table 5 Pin assignment of front connector X4 0 0 0 002000008 20 Table 6 Signal mnemonics of front connectors X1 X4 00 21 Table Debug LED 22 599 9v IR er ote bod Rn iem db dcs 2 Tables DSP PCI deyiGeso2 esos oue lo RU EE EE E ascen 26 Table9 PCI configuration header ee RR eet 27 Table 10 Voltage supervision 3 xp p ruere PC RC rH ES E 29 Table 11 Error status for API functions 0 0 eee ee eee
79. s set to 0x01 to apply the configuration Table 61 SetOperational function Write variables ConfigState Read variables Request payload None Acknowledge payload None MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 SetConfig Appendix The SetConfig function configures the DSFI2 slave and its internal variables and e updates ConfigVariables with the content of Config VariablesIn updates OpVariables with the content of OpVariablesIn Table 62 SetConfig function Write variables ConfigVariables OpVariables Read variables Request payload DSFI2 Variables OpVariablesin DSFI2 Variables ConfigVariablesIn Acknowledge payload None GetConfig The GetConfig function provides the configuration of the internal variables of the DSFI 2 slave and returns ConfigVariables in Config VariablesOut e returns OpVariables in Op VariablesOut Table 63 GetConfig function Write variables Read variables Config Variables OpVariables Request payload None Acknowledge payload DSFI2 Variables OpVariables Out DSFI2 Variables Config VariablesOut SetDefaults The SetDefaults function sets the default values of the slave The default values are stored and read from slave in POWERUP state e store default of ConfigVariables with the content of Config VariablesIn store default of OpVariables with the content of OpVariablesIn
80. subsystem It is a special DSFI2 slave which is derived from DSFD slave base class see Chapter 4 4 2 13 2 DSFI2 Slave Base Class on page 74 The DSFI2 handler unit is always implemented and is implemented as DSFI2 instance 0 It contains general board and status information The DSFI2 handler provides interrupt information via the DSFI2 protocol as follows Figure 22 Interrupt information of handler unit DSFI2 handler instance 0 Determine which instances FN37 GetlInstancelnterrupt PS have pending interrupts sanes interrupts FN6 GetInterrupt Handler ack Get interrupts of instance 0 p Ey interrupts FN6 GetInterrupt 1 0 Get interrupts of instance 1 controller instance 1 1 0 fi FN6 GetInterrupt Indicate Get interrupts of instance 2 gt controller interrupt of instance 2 instances t FN6 GetInterrupt 1 0 Get interrupts of instance 31 gt controller instance 31 The DSFI2 slave of the handler unit function group supports the following functions MEN Mikro Elektronik GmbH 86 20F403 00 E3 2014 11 05 Figure 23 DSFI2 handler function profile Function profile for DSFI2 group DSFI2 handler unit Configuration HANDLER ErrorMask error mask Operational HANDLER OutputValue gpout Appendix FN32 SetOutputValue FN33 HANDLER OutputValue gpout GetOutputValue HANDLER Ou
81. supply voltage vsvError 3 Overvoltage on digital supply voltage isolated 5V vsvError x 0 no effect vsvError x 1 clear error For more information on the F403 ClearGroupError function go to Chapter 4 4 1 6 FA03 ClearGroupError on page 53 MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Hardware Software Interface 3 3 7 F403 InterruptStatus This function reads pending interrupts of the F403 It clears pending interrupts Parameter Communication interface Return values Input value changed 16 bit 0 no interrupt 1 interrupt O channel error 16 bit 0 no interrupt 1 interrupt I O common error 16 bit 0 no interrupt 1 interrupt e Temperature failure 0 no interrupt 1 interrupt e Supply voltage failure 0 no interrupt 1 interrupt Communication error code nterrupt pending flag Function call struct F403 Status F403 InterruptStatus uint8 t iFace struct FAOS_IMCCRPUDIESTALUS E TS s Table 24 F403 InterruptStatus function arguments Configuration Parameters Description uint8 t iFace Communication interface F403 InterruptStatus t Pointer to the F403 InterruptStatus t structure Upon intStatus successful execution the structure will be updated Table 25 struct F403 InterruptStatus t for F403_InterruptStatus Configuration Parameters Description uint8_t inputChange Input value changed Va
82. t by FN37 SetOutputValue The output value of a channel can be set regardless of its output mode input only output Output Watchdog The output watchdog feature of I O channels configured as output detects failures in communication with the I O instance When the output watchdog of an output channel is enabled the output channel must be set by FN32 SetOutputValues or FN37 SetOutputValue periodically within the watchdog timeout period The output watchdog can be enabled and configured by setting the corresponding parameter in the configuration of I O controller instances with FN2 SetConfig If the output channel is not triggered within the watchdog timeout a watchdog failure is detected and the output channel is disabled the failure is indicated as DSFI2 interrupt when the corresponding interrupt is enabled in instance configuration the failure can be read as channel error by FN35 GetError the failure can be read as output watchdog failure by FN128 GetChannelError the failure can be cleared by FN36 ClearError Output Comparison The comparison of I O channels configured as output with the corresponding input channel detects failures of I O channels The comparison can be enabled by setting the corresponding parameter in the configuration of I O controller instances with FN2 SetConfig MEN Mikro Elektronik GmbH 67 20F403 00 E3 2014 11 05 Appendix If the input value of an output channel does not match the output value
83. tMasterld master ID 0 Link instance by calling FNO SetMasterld ID of application KE NE Configure instance by calling FN2 SetConfig with the corresponding parameter setting MI Set instance to state operational by calling FN1 SetOperational Parameters DSFI2 master ID nstance number P core ID Pointer to payload data Return values Hrror code Function call int DSFI2 Config uint8 t instance uint8 t masterId uint8 t geoAddr umee t COMPIG Wl c O19 ze Table 30 DSFI2 Config function arguments Configuration Description uint8 t instance I O group number uint8 t masterld Master ID uint8 t geoAdar Geographical address uint8 t config Pointer to the configuration block uint16 t configSize Size of the configuration block Table 31 DSFI2 Config return code Value Description DSFI SUCCESS The configuration is successful DSFI ERROR An error occurred during the configuration process DSFI PROT NOT SET The lower protocol is not configured correctly DSFI INVALID DATA The configuration data pointer value is NULL or the size is 0 DSFI GEOADDR ERROR The provided geographical address does not match the card address MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 DSFI2 Function Appendix This function calls one or several DSFI2 functions and handles DSFI2 request acknowledge DSFI2 send DSFI2 re
84. te of instance interrupts is provided to the application MEN Mikro Elektronik GmbH 69 20F403 00 E3 2014 11 05 Figure 17 DSFI2 message overview Request Acknowledge 4 4 2 9 Appendix DSFI2 Message Layout The messages have the following layout Header Payload data EE Reserved INSTANCE FUNCTION MASTERID MSGID 0 1 0 4 0 7 0 7 0 7 0 Eo un Reserved ERR INT Reserved MASTERID MSGID a 1 0 3 0 0 7 0 7 0 7 0 byte 1 gt a byte 2 gt a byte 3 391 byte 4 gt 4 4 2 10 DSFI2 Message Fields The following data objects are used in DSFI2 Table 45 DSFI2 data objects Object Element Comment DSFI2 REQ TYPE Binary 1 INSTANCE _ O controller instance FUNCTION Function number MASTERID Unique ID of requesting master MSGID Unique sequence number Data Payload data DSFI2 ACK TYPE Binary 0 ERR Error status see below INT Interrupt status 1 interrupt pending MASTERID Unique ID of requesting master MSGID Unique sequence number matching REQ ID Data Payload data MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 4 4 2 11 INSTANCE LLL Appendix DSFI2 Message Field Coding The REQ message header field INSTANCE is coded as follows Table 46 REQ message header field INSTANCE Description INSTANCE 4 0 Instance number of protocol handler 0b000000
85. tion number Pointer to payload data Return value Error code Function call int DSFI2 Send uint8 t instance uint8 t function uint8 t dataP uintl6 t dataLen Table 35 DSFI2 sena function arguments Configuration Description uint8 t instance Instance number uint8 t function Function number uint8 t dataP Pointer to the user payload uint16 t dataLen Length of the user payload Table 36 DSFI2_send return code Value Description F403 SUCCESS The transmission was successful F403 ERROR Error in transmission DSFI2 receive This function receives DSFI2 acknowledge Parameters Pointer to the buffer for payload data Buffer size Return values Error code Received payload Function call int DSFI2 Receive uint8 t dataP uint8 t dataLen Table 37 DSFI2 receive function arguments Configuration Description uint8 t dataP Buffer pointer to the user payload uint8 t dataLen Pointer to the length of the buffer for the payload After reception the received length is saved here MEN Mikro Elektronik GmbH 61 20F403 00 E3 2014 11 05 Appendix Table 38 DSFI2 receive return parameters Value Description F408 SUCCESS The reception was successful F403 ERROR Error in reception F403 CRC ERROR A parity bit error is detected during reception Error status Upon successful reception the error status from the DSFI frame he
86. tputValue gpout RegisterTest HANDLER Test test FN34 RegisterTest HANDLER Test test Status FN35 GetInputValue HANDLER InputValue gpin HANDLER InputValue gpin I HANDLER DSFlI2Header DSFI2Header HANDLER_InstInt instance interrupt GetDSFlI2Header FN36 HANDLER_DSFI2Header DSFI2Header FN37 Getlnstancelnterrupt HANDLER_InstInt Instint The address space of a DSFI2 handler unit is as follows Table 74 DSFI2 handler unit address space IG n Address Register Description OpVariables 0x00 0x03 GPOUT 31 0 General purpose out put 0x04 0x07 Test 31 0 Test register 0x08 0x7F Reserved Reserved Config Variables 0x80 0xEF Reserved Reserved OxF0 0xF3 INTERRUPT_MASK 31 0 InterruptMask OxFA4 0xFF Reserved Reserved MEN Mikro Elektronik GmbH 20F403 00 E3 2014 11 05 Appendix pigs n Address Register Description StatusVariables 0x100 0x102 OxABD DSFI2 Header 0x103 DSFI2ProtocolType 0x104 0x10F Fpgald 95 0 0x110 FpgaRevMin 7 0 0x111 FpgaRevMaj 7 0 0x112 0x113 Reserved 0x114 0x117 Instances 31 0 0x118 0x11F Reserved Reserved 0x120 0x123 GPIN 31 0 General purpose input 0x124 0x13F Reserved Reserved 0x140 0x143 reserved 31 16 counter O 15 0 Counter O 0x144 0x147 reserved 31 16 counter 1 15 0 Counter 1 0x
87. upply voltage vsvError 1 reserved vsvError 2 power fail of I O channel supply voltage vsvError 3 overvoltage on digital supply voltage isolated 5 V vsvError x 0 no error vsvError x 1 error pending uint8_t ioVoltage I O voltage gt 35 V Value ioVoltage 0 I O channel supply voltage under 35 V ioVoltage 1 I O channel supply voltage over 35 V uint8 t temperatureFail Temperature failure Value temperatureFail 0 no error temperatureFail 1 temperature failure uint8 t voltageFail Voltage failure Value voltageFail 0 no error voltageFail 1 supply voltage failure uint8 t fogaStatus FPGA status Value fpgaStatus 0 factory image loaded fpgaStatus 1 user image loaded uint8 t intWagFail Internal watchdog error Value intWdgFail 0 no error intWdgFail 1 internal watchdog failure MEN Mikro Elektronik GmbH 39 20F403 00 E3 2014 11 05 Hardware Software Interface For more information on the F403_GetGroupStatus function see Chapter 4 4 1 5 F403_GetGroupStatus on page 52 3 3 6 F403 ClearGroupError This function clears pending errors of one I O controller instance Parameters Communication interface O group number 1 4 Overload failure 4 bit 0 2 no effect 1 2 clear error FET failure 4 bit 0 no effect 1 clear error Output watchdog failure 4 bit 0 no effect 1 clear error I O volta
88. ure 0 no error 1 error Supply voltage failure 0 no error 1 error FPGA status 0 factory image 1 user image Internal watchdog error 0 no error 1 error Communication error code Interrupt pending flag Function call struct F403 Status F403 GetGroupStatus uint8 t iFace uint8 t ioGroup grruet FAOS IEIPIPSTEGHEUIS t r Starts Table 20 F403_GetGroupStatus function arguments eee Description uint8_t iFace Communication interface uint8_t ioGroup I O group number F403 ErrStatus t Pointer to the F403_ErrStatus structure Upon errStatus successful execution the structure will be updated MEN Mikro ElektronikGmbH eee ees 3 8 20F403 00 E3 2014 11 05 Hardware Software Interface Table 21 struct F403 ErrStatus t for F403_GetGroupStatus Configuration Parameters Description uint8 t oveloadFail Overload failure Value bitwise overloadFail 3 0 2 chann 4 chann 1 overloadFail x 0 no error overloadFail x 2 1 output overload error uint8 t fetFail FET failure Value bitwise fetFail 3 0 2 chann 4 chann 1 fetFail x 2 0 no error fetFail x 2 1 output FET failure uint8 t watFail Output watchdog failure Value bitwise wdtFail 3 0 2 chann 4 chann 1 wdtFail x 0 no error wdtFail x 1 output watchdog error uint8 t vsvError I O voltage supervision error Value bitwise vsvError 0 overvoltage error on I O channel s
89. ytes DSFI2 slaves implement the Op Variables variable of the DSFI2 Variables data type ConfigVariables are used for operational variables DSFI2 slaves implement the Config Variables variable of the DSFI2 Variables data type ConfigVariables are used for configuration variables DSFI2 slaves implement the StatusVariables variable of the DSFI2 Variables data type StatusVariables are used for variables which provide the status of the DSFI2 slave StatusVariables have a length of 0x80 bytes Status variables are not part of DSFD slave configuration and read values are unpredictable DSFI2 slaves implement the MasterId variable of the DSFI2 Masterld data type Masterld is used to store the ID of the DSFI2 master which is linked to the slave The data type DSFI2 Masterld is 8 bit and has the following range e Valid range 0x00 OxFF Default value invalid ID 0x00 MEN Mikro Elektronik GmbH 78 20F403 00 E3 2014 11 05 Appendix DSFI2 slaves implement the Deviceld variable of the DSFI2 Deviceld data type The DSFI2_Deviceld data type is 64 bit and has the following mapping Table 56 Mapping of DSFI2 Deviceld DSFI2 Deviceld x Variable Description 63 48 Reserved Reserved 47 40 REV MAJ 7 0 Major revision 39 32 REV MIN 7 0 Minor revision 31 22 Reserved Reserved 21 16 VARIANT 5 0 Variant of device 15 10 Reserved Reserved 9 0 DEVICE 9 0 Device number of device DSFI2 slaves i

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - CardDeviceStore.com  DC112d / DC112      Philips Ecomoods Spot light 57954/48/16  to view the Rohde & Schwarz FSEA20 Datasheet  instructions d`installation du thermostat extérieur ot18-60a  Bogen PVMC audio module  AESCULAP® - Frank`s Hospital Workshop  Poluição sonora urbana: principais fontes  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.