Home

TE USB API - Trenz Electronic

image

Contents

1. The commands described below are binary data packets sent received by FX2 microcontroller through Endpoint 1 Endpoint 1 accepts 64 bytes packets with predefined structure Table 1 lists API functions accepted by FX2 microcontroller firmware ID Name Description 0x00 READ_VERSION Return 4 bytes representing FX2 firmware version 0x45 ECHO Return packet back OxAO INITIALIZE Initialize FX2 to initial state OxA1 READ STATUS Return 5 bytes of FX2 status OxA4 RESET FIFO Reset selected FX2 FIFO OxA5 FLASH READ Read data from SPI Flash OxA6 FLASH_WRITE Write data to SPI Flash OxA7 FLASH_ERASE Erase entire SPI Flash OxF7 SECTOR_ERASE Erase sector from SPI Flash OxA8 EEPROM READ Read data from PC EEPROM OxA9 EEPROM_WRITE Write data to C EEPROM OxAC FIFO STATUS Return FIFO status for all endpoints OxAD I2C WRITE Write data to 1 C interface OxAE I2C READ Read data from I C Interface OxAF POWER Control FPGA power supply OxAA FLASH WRITE COMMAND Write SPI Flash command OxBO SET_INTERRUPT Set parameters for interrupt handler OxB1 GET INTERRUPT Return interrupt statistic information Table 1 FX2 API Functions list 3 API Functions description 3 2 ECHO 3 1 READ_VERSION Command returns 4 bytes representing FX2 firmware version Byte Value Description 1 0x00 READ_VERSION command ID UM FX2 USB API v 1 01 7 May 2012 2 64 Not used Table 2 READ_VERSI
2. Aversion number could not be parsed ERROR_BADSTARTPOSITION 778 0x30A The iterator s start position is invalid ERROR_MEMORY_HARDWARE 779 0x30B The hardware has reported an uncorrectable memory error ERROR_DISK_REPAIR_DISABLED 780 The attempted operation required self healing to be enabled 0x30C ERROR_INSUFFICIENT_RESOURCE_FOR_S 781 The Desktop heap encountered an error while allocating session memory PECIFIED SHARED SECTION SIZE 0x30D There is more information in the system event log ERROR_SYSTEM_POWERSTATE_TRANSITI ON 782 0x30E The system power state is transitioning from 2 to 3 ERROR_SYSTEM_POWERSTATE_COMPLEX _TRANSITION 783 0x30F The system power state is transitioning from 2 to 3 but could enter 4 ERROR_MCA_EXCEPTION 784 0x310 A thread is getting dispatched with MCA EXCEPTION because of MCA ERROR ACCESS AUDIT BY POLICY 785 0x311 Access to 1 is monitored by policy rule 2 ERROR ACCESS DISABLED NO SAFER UI BY POLICY 786 0x312 Access to 1 has been restricted by your Administrator by policy rule 2 ERROR ABANDON HIBERFILE 787 0x313 A valid hibernation file has been invalidated and should be abandoned ERROR LOST WRITEBEHIND DATA NETW ORK DISCONNECTED 788 0x314 Delayed Write Failed Windows was unable to save all the data for the file hs the data has been lost This error may be caused by network connectivi
3. ERROR_SEM_NOT_FOUND 187 OxBB The specified system semaphore name was not found ERROR_INVALID_STARTING_CODESEG 188 OxBC The operating system cannot run 1 ERROR_INVALID_STACKSEG 189 OxBD The operating system cannot run 1 ERROR_INVALID_MODULETYPE 190 OxBE The operating system cannot run 1 ERROR_INVALID_EXE_SIGNATURE 191 OxBF Cannot run 1 in Win32 mode ERROR_EXE_MARKED_INVALID 192 0xC0 The operating system cannot run 1 ERROR_BAD_EXE_FORMAT 193 0xC1 1 is not a valid Win32 application ERROR_ITERATED_DATA_EXCEEDS_64k 194 0xC2 The operating system cannot run 1 ERROR_INVALID_MINALLOCSIZE 195 0xC3 The operating system cannot run 1 ERROR_DYNLINK_FROM_INVALID_RING 196 OxC4 The operating system cannot run this application program ERROR_IOPL_NOT_ENABLED 197 OxC5 The operating system is not presently configured to run this application ERROR_INVALID_SEGDPL 198 0xC6 The operating system cannot run 1 ERROR_AUTODATASEG_EXCEEDS_64k 199 0xC7 The operating system cannot run this application program ERROR_RING2SEG_MUST_BE_MOVABLE 200 0xC8 The code segment cannot be greater than or equal to 64K ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201 0xC9 The operating system cannot run 1 ERROR_INFLOOP_IN_RELOC_CHAIN 202 OxCA The operating system cannot run 1 ERROR_ENVVAR_NOT_FOUND 203 0xCB The system could not find the environment option that was entered ERROR_NO_SIGNAL_SENT 205 0xCD No process in the
4. ata o o trenz TE USB API 0 electronic User Manual oo UM FX2 USB API v 1 01 7 May 2012 Trenz Electronic GmbH Overview This document describes API for FX2 USB microcontroller firmware functions at TEO300 TE0320 and TE0630 modules Using API commands provides an easy way to create a communication interface with module parts API commands it s binary data which is sent received by FX2 USB microcontroller Manual contains a program example written on Python language which illustrates API usage UM FX2 USB API v 1 01 7 May 2012 Table of Contents o A A 3 ies o A 3 Le Examples requirements corissnsineyicsisonee iee oe 3 2 Driver funcions COS ai Ai A 3 2 1 WE SKAGA as ln EEEE EEEE EEEn 3 22 WO Daiana DR 4 A ai iii j ala tafi aa ai 4 TEL a a clwadtes e a e iaraa Eiaa 4 STONE A ana ad A 4 TE A A a 9 3 API PORCI N COSO Uria 5 SA READ VERSION let 6 A A sj dlssinlaa gaon i 6 a NR A s st h r BRANN N 6 94 READ STATUS iia 6 poe RESET FIFO A A O ery moe see ee 6 36 FLASH READ an ee iaa E FL WRITE da O dm endecoate 7 3G PLASH ERASE carmin a A 7 SECTOR ERASE nesa E a E E Sg eee E 8 3 10 EEPROM NEAL ica it 8 311 EEPROM WRITE airada 8 Ar A A 9 343 12C WRITE AA Oe et TRCN Pre ONT Der ROE ce eae ao RT a 9 A REA ona 9 SAS POWER daa aia 9 3 16 FLASH WRITE COMMAND aiii 10 SA SET_INTERRUP Duc 10 349 GET UAT SS eg ld s 10 4 Communicate with Microblaze PrOCOSSO sia 11 SAPIUSa e example AP 11
5. 559 0x22F A malformed function table was encountered during an unwind operation ERROR_NO_GUID_TRANSLATION 560 0x230 Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system This causes the protection attempt to fail ERROR_INVALID_LDT_SIZE 561 0x231 Indicates that an attempt was made to grow an LDT by setting its size ERROR_INVALID_LDT_OFFSET 563 0x233 Indicates that the starting value for the LDT information was not an integral multiple of the selector size ERROR_INVALID_LDT_DESCRIPTOR 564 0x234 Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors ERROR_TOO_MANY_THREADS 565 0x235 Indicates a process has too many threads to perform the requested action For example ERROR_THREAD_NOT_IN_PROCESS 566 0x236 An attempt was made to operate on a thread within a specific process ERROR_PAGEFILE_QUOTA_EXCEEDED 567 0x237 Page file quota was exceeded ERROR_LOGON_SERVER_CONFLICT 568 0x238 The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role ERROR_SYNCHRONIZATION_REQUIRED 569 0x239 The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain
6. 6 Related Materials and References occcccccccccccccnccnnononnnonononononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnns 15 7 Glossary of Abbreviations and ACMI YING sucinta A in 16 9 Legal Nonge aera ge ore me a ty ane TR E aa ferent ree ron erm er ner rer 16 S1 Document A PP ln 16 8 2 Limitation RT rer eee eee 16 o A em ct a a eee eee 17 SA To LICENSES ineine alicia 17 9 Emironmental OO ai ias 17 9 1 REACH Registration Evaluation Authorisation and Restriction of Chemicals compliance statement esnie tl 17 9 2 ROHS Restriction of Hazardous Substances compliance statement 0 17 9 3 WEEE Waste Electrical and Electronic Equipment 2 c cceccceeeeeeeeeeeeeeeeneneneneees 17 Appendix A Python IST ini a 19 Appendix B Example program source CO AA r renrn nrnna 20 Appendix D Windows error codes DS ria aid 22 BD cument Change iSto nasa 36 1 Requirements UM FX2 USB API v 1 01 7 May 2012 1 Requirements 1 1 General requirements For using TEO3xx API host computer should meet the following requirements e Operating system Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows Vista Microsoft Windows 7 e USB driver Dedicated USB driver for your board e Interface USB host See your board user manual for dedicated driver installation instructions 1 2 Examples requirements In order to use the examples from this manual host computer should meet the following
7. API v 1 01 7 May 2012 Name Value Description ERROR_FILE_TOO_LARGE 223 OxDF The file size exceeds the limit allowed and cannot be saved ERROR_FORMS_AUTH_REQUIRED 224 0xE0 Access Denied Before opening files in this location ERROR_VIRUS_INFECTED 225 OxE1 Operation did not complete successfully because the file contains a virus or potentially unwanted software ERROR_VIRUS_DELETED 226 OxE2 This file contains a virus or potentially unwanted software and cannot be opened Due to the nature of this virus or potentially unwanted software ERROR_PIPE_LOCAL 229 OxE5 The pipe is local ERROR_BAD_PIPE 230 OxE6 The pipe state is invalid ERROR_PIPE_BUSY 231 0xE7 All pipe instances are busy ERROR_NO_DATA 232 OxE8 The pipe is being closed ERROR_PIPE_NOT_CONNECTED 233 0xE9 No process is on the other end of the pipe ERROR_MORE_DATA 234 OxEA More data is available ERROR_VC_DISCONNECTED 240 OxFO The session was canceled ERROR_INVALID_EA_NAME 254 OxFE The specified extended attribute name was invalid ERROR_EA_LIST_INCONSISTENT 255 OxFF The extended attributes are inconsistent WAIT_TIMEOUT 258 0x102 The wait operation timed out ERROR_NO_MORE_ITEMS 259 0x103 No more data is available ERROR_CANNOT_COPY 266 0x10A The copy functions cannot be used ERROR_DIRECTORY 267 0x10B The directory name is invalid ERROR EAS DIDNT F
8. BIOS was updated previous 0x2D8 firmware date 2 ERROR_DRIVERS_LEAKING_LOCKED_PAG 729 A device driver is leaking locked I O pages causing system degradation The ES 0x2D9 system has automatically enabled tracking code in order to try and catch the culprit ERROR_WAKE_SYSTEM 730 The system has awoken 0x2DA ERROR_REPARSE 741 0x2E5 A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link ERROR_OPLOCK_BREAK_IN_PROGRESS 742 0x2E6 An open create operation completed while an oplock break is underway ERROR_VOLUME_MOUNTED 743 0x2E7 A new volume has been mounted by a file system ERROR_RXACT_COMMITTED 744 0x2E8 This success level status indicates that the transaction state already exists for the registry sub tree ERROR_NOTIFY_CLEANUP 745 0x2E9 This indicates that a notify change request has been completed due to closing the handle which made the notify change request ERROR_PRIMARY_TRANSPORT_CONNECT 746 Connect Failure on Primary Transport An attempt was made to connect to _FAILED Ox2EA the remote server hs on the primary transport ERROR_PAGE_FAULT_TRANSITION 747 Page fault was a transition fault 0x2EB ERROR_PAGE_FAULT_DEMAND_ZERO 748 Page fault was a demand zero fault 0x2EC ERROR_PAGE_FAULT_COPY_ON_WRITE 749 Page fault was a demand zero fault 0x2ED ERROR_PAGE_FAULT_GUARD_PAGE 750 Page fault was a dema
9. Image Relocated An image file could not be mapped at the address specified 0x2BC in the image file Local fixups must be performed on this image ERROR_RXACT_STATE_CREATED 701 This informational level status indicates that a specified registry sub tree 0x2BD transaction state did not yet exist and had to be created ERROR_SEGMENT_NOTIFICATION 702 Segment Load A virtual DOS machine VDM is loading 0x2BE ERROR_BAD_CURRENT_DIRECTORY 703 Invalid Current Directory The process cannot switch to the startup current 0x2BF directory hs Select OK to set current directory to hs ERROR FT READ RECOVERY FROM BAC 704 Redundant Read To satisfy a read request KUP 0x2C0 ERROR_FT_WRITE_RECOVERY 705 Redundant Write To satisfy a write request 0x2C1 ERROR_IMAGE_MACHINE_TYPE_MISMATC 706 Machine Type Mismatch The image file hs is valid H 0x2C2 ERROR_RECEIVE_PARTIAL 707 Partial Data Received The network transport returned partial data to its client 0x2C3 The remaining data will be sent later ERROR_RECEIVE_EXPEDITED 708 Expedited Data Received The network transport returned data to its client 0x2C4 that was marked as expedited by the remote system ERROR_RECEIVE_PARTIAL_EXPEDITED 709 Partial Expedited Data Received The network transport returned partial data 0x2C5 to its client and this data was marked as expedited by the remote system The remaining data will be sent later ERROR_EVENT_DONE 710 TDI Event Done The TDI in
10. TEO300DLL dll This DLL file should be located in the same folder as an example program If program can t find or load DLL it prints an error message and exits To prevent window from closing after program exit used function raw_input which will wait for user input connecting to card 1 m handle c_int 0 if fx2d11 TE0300 Open byref m handle 0 0 print ERROR Failed to connect card 5 API Usage example program UM FX2 USB API v 1 01 7 May 2012 13 36 raw input Press Enter sys exit print Connected to card 1 Next step is call of driver function TE0300 Open which creates driver handler In this example function connects to first board To pass handler argument by reference used byref function Print FX2 firmware version prepare arguments to pass API function cmd create string buffer 64 reply create string buffer 64 cmd 0 CMD FX2 READ VERSION cmd length 6 1nt 64 reply length c int 64 1000 SendCommand fx2d11 TE0300 SendCommand timeout ms c int SendCommand restype c int Prior to calling API function program should prepare all arguments prepare arguments to pass API function cmd create string buffer 64 reply create string buffer 64 cmd 0 CMD FX2 READ VERSION cmd length c_int 64 reply length c _int 64 1000 SendCommand fx2d11 TE0300 SendCommand timeout ms c int SendCommand r
11. contain a condition ERROR_INVALID_ACE_CONDITION 805 0x325 The specified access control entry ACE contains an invalid condition ERROR_FILE_HANDLE_REVOKED 806 0x326 Access to the specified file handle has been revoked ERROR_EA_ACCESS_DENIED 994 0x3E2 Access to the extended attribute was denied ERROR_OPERATION_ABORTED 995 0x3E3 The I O operation has been aborted because of either a thread exit or an application request ERROR_IO_INCOMPLETE 996 0x3E4 Overlapped I O event is not in a signaled state ERROR_IO_PENDING 997 0x3E5 Overlapped I O operation is in progress ERROR_NOACCESS 998 0x3E6 Invalid access to memory location ERROR_SWAPERROR 999 0x3E7 Error performing inpage operation 35 36 www trenz electronic de TE USB API Document Change History UM FX2 USB API v 1 01 7 May 2012 Document Change History ver date author description 0 01 25 10 2011 AIK Initial Release 0 02 26 10 2011 AIK Added program example and description 0 03 01 11 2011 AIK Syntax fixes 0 04 07 11 2011 AIK Add note to FLASH_WRITE 0 05 14 12 2011 AIK Added error codes appendix 0 06 03 05 2012 AIK Fixed TYPO in TE0300_GetData definition 1 00 06 05 2012 AIK Rename API functions parameters and types 1 01 07 05 2012 AIK Minor formatting changes 36 36 www trenz electronic de TE U
12. previously set by the current process ERROR_INSUFFICIENT_LOGON_INFO 608 0x260 There is insufficient account information to log you on ERROR_BAD_DLL_ENTRYPOINT 609 0x261 Invalid DLL Entry point The dynamic link library hs is not written correctly The stack pointer has been left in an inconsistent state The entry point should be declared as WINAPI or STDCALL Select YES to fail the DLL load Select NO to continue execution Selecting NO may cause the application to operate incorrectly ERROR_BAD_SERVICE_ENTRYPOINT 610 0x262 Invalid Service Callback Entry point The hs service is not written correctly The stack pointer has been left in an inconsistent state The callback entry point should be declared as WINAPI or STDCALL Selecting OK will cause the service to continue operation However ERROR_IP_ADDRESS_CONFLICT1 611 0x263 There is an IP address conflict with another system on the network ERROR_NO_CALLBACK_ACTIVE 614 0x266 A callback return system service cannot be executed when no callback is active ERROR_PWD_TOO_SHORT 615 0x267 The password provided is too short to meet the policy of your user account Please choose a longer password ERROR_PWD_TOO_RECENT 616 0x268 The policy of your user account does not allow you to change passwords too frequently This is done to prevent users from changing back to a familiar ERROR_PWD_HISTORY_CONFLICT 617 0x26
13. server in the client server shared memory window were invalid Too much data may have been put in the shared memory window ERROR_NOT_TINY_STREAM 598 0x256 The stream is not a tiny stream ERROR_STACK_OVERFLOW_READ 599 0x257 The request must be handled by the stack overflow code ERROR_CONVERT_TO_LARGE 600 0x258 Internal OFS status codes indicating how an allocation operation is handled Either it is retried after the containing node is moved or the extent stream is converted to a large stream ERROR_FOUND_OUT_OF_SCOPE 601 0x259 The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation ERROR_ALLOCATE_BUCKET 602 0x25A The bucket array must be grown Retry transaction after doing so ERROR_MARSHALL_OVERFLOW 603 0x25B The user kernel marshalling buffer has overflowed ERROR_INVALID_VARIANT 604 The supplied variant structure contains invalid data 0x25C ERROR_BAD_COMPRESSION_BUFFER 605 The specified buffer contains ill formed data 0x25D 29 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR_AUDIT_FAILED Value 606 0x25E UM FX2 USB API v 1 01 7 May 2012 Description Audit Failed An attempt to generate a security audit failed ERROR_TIMER_RESOLUTION_NOT_SET 607 0x25F The timer resolution was not
14. text for message number 0x 1 in the 0x13D message file for 2 ERROR_SCOPE_NOT_FOUND 318 0x13E The scope specified was not found ERROR_UNDEFINED_SCOPE 319 0x13F The Central Access Policy specified is not defined on the target machine ERROR_INVALID_CAP 320 0x140 The Central Access Policy obtained from Active Directory is invalid ERROR_DEVICE_UNREACHABLE 321 0x141 The device is unreachable ERROR_DEVICE_NO_RESOURCES 322 0x142 The target device has insufficient resources to complete the operation ERROR_DATA_CHECKSUM_ERROR 323 0x143 A data integrity checksum error occurred Data in the file stream is corrupt ERROR_INTERMIXED_SECURE_EA_OPERA 324 0x144 An attempt was made to modify both a SECURE and normal Extended TION Attribute EA in the same operation ERROR_SPECIFIED_COPY_READ 325 0x145 Data was read from the specified copy ERROR_REPAIR_DEFERRED 326 0x146 Repair for the requested range should be deferred ERROR_OFFSET_ALIGNMENT_VIOLATION 327 0x147 The command specified a data offset that does not align to the device s granularity alignment ERROR INVALID FIELD IN PARAMETER LI ST 328 0x148 The command specified an invalid field in its parameter list ERROR_OPERATION_IN_PROGRESS 329 0x149 An operation is currently in progress with the device ERROR_BAD_DEVICE_PATH 330 0x14A An attempt was made to send down
15. the command via an invalid path to the target device ERROR_TOO_MANY_DESCRIPTORS 331 0x14B The command specified a number of descriptors that exceeded the maximum supported by the device ERROR_SCRUB_DATA_DISABLED 332 0x14C Scrub is disabled on the specified file ERROR_FAIL_NOACTION_REBOOT 350 0x15E No action was taken as a system reboot is required ERROR_FAIL_SHUTDOWN 351 0x15F The shutdown operation failed ERROR_FAIL_RESTART 352 0x160 The restart operation failed ERROR_MAX_SESSIONS_REACHED 353 0x161 The maximum number of sessions has been reached ERROR_THREAD_MODE_ALREADY_BACKG ROUND 400 0x190 The thread is already in background processing mode ERROR_THREAD_MODE_NOT_BACKGROU ND 401 0x191 The thread is not in background processing mode ERROR_PROCESS_MODE_ALREADY_BACK GROUND 402 0x192 The process is already in background processing mode ERROR_PROCESS_MODE_NOT_BACKGRO UND 403 0x193 The process is not in background processing mode ERROR_INVALID_ADDRESS 487 0x1E7 Attempt to access invalid address ERROR_USER_PROFILE_LOAD 500 0x1F4 User profile cannot be loaded ERROR_ARITHMETIC_OVERFLOW 534 0x216 Arithmetic result exceeded 32 bits ERROR_PIPE_CONNECTED 535 0x217 There is a process on other end of the pipe ERROR_PIPE_LISTENING 536 0x218 Waiting for a proce
16. 9 You have attempted to change your password to one that you have used in the past The policy of your user account does not allow this Please select a password that you have not previously used ERROR_UNSUPPORTED_COMPRESSION 618 0x26A The specified compression format is unsupported ERROR_INVALID_HW_PROFILE 619 0x26B The specified hardware profile configuration is invalid ERROR INVALID PLUGPLAY DEVICE PATH 620 The specified Plug and Play registry device path is invalid 0x26C ERROR_QUOTA_LIST_INCONSISTENT 621 The specified quota list is internally inconsistent with its descriptor 0x26D ERROR_EVALUATION_EXPIRATION 622 0x26E Windows Evaluation Notification The evaluation period for this installation of Windows has expired This system will shutdown in 1 hour To restore access to this installation of Windows ERROR_ILLEGAL_DLL_RELOCATION 623 0x26F Illegal System DLL Relocation The system DLL hs was relocated in memory The application will not run properly The relocation occurred because the DLL hs occupied an address range reserved for Windows system DLLs The vendor supplying the DLL should be contacted for a new DLL ERROR_DLL_INIT_FAILED_LOGOFF 624 0x270 DLL Initialization Failed The application failed to initialize because the window station is shutting down ERROR_VALIDATE_CONTINUE 625 0x271 The validation process needs to continue on to the next s
17. CKED 158 Ox9E The segment is already unlocked ERROR_BAD_THREADID_ADDR 159 0x9F The address for the thread ID is not correct ERROR_BAD_ARGUMENTS 160 OxAO One or more arguments are not correct 24 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description ERROR BAD PATHNAME 161 OxA1 The specified path is invalid ERROR SIGNAL PENDING 162 0xA2 A signal is already pending ERROR_MAX_THRDS_REACHED 164 0xA4 No more threads can be created in the system ERROR_LOCK_FAILED 167 OxA7 Unable to lock a region of a file ERROR_BUSY 170 OxAA The requested resource is in use ERROR_DEVICE_SUPPORT_IN_PROGRESS 171 OxAB The device s command support detection is in progress ERROR_CANCEL_VIOLATION 173 OxAD Alock request was not outstanding for the supplied cancel region ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174 OxAE The file system does not support atomic changes to the lock type ERROR_INVALID_SEGMENT_NUMBER 180 0xB4 The system detected a segment number that was not correct ERROR_INVALID_ORDINAL 182 0xB6 The operating system cannot run 1 ERROR_ALREADY_EXISTS 183 0xB7 Cannot create a file when that file already exists ERROR_INVALID_FLAG_NUMBER 186 OxBA The flag passed is not correct
18. Command controls FPGA power supply sources www trenz electronic de TE USB API 3 API Functions description UM FX2 USB API v 1 01 7 May 2012 Byte Value Description 1 OxAF POWER command ID 2 power 0 Power OFF state 1 Power ON state 3 64 Not used Table 20 POWER Command packet layout Byte Description 1 0 Power OFF state 1 Power ON state 2 64 Not used Table 21 POWER Reply packet layout 3 16 FLASH WRITE COMMAND Command sends instruction to SPI Flash See SPI Flash datasheet for detailed commands description Byte Value Description 1 OxAA FLASH_WRITE_COMMAND command ID 2 write length Write command length 3 read length Read command length 4 write length 3 command Write command write length 4 64 Not used Table 22 FLASH_WRITE_COMMAND Command packet layout Byte Description 1 read length SPI Data Out sequence read length 1 64 Not used Table 23 FLASH_WRITE_COMMAND Reply packet layout 3 17 SET_INTERRUPT Command sets address and number of bytes to read from 1 C bus when interrupt request is received Byte Value Description 1 OxBO SET_INTERRUPT command ID 2 address I C address 3 size Data size 4 64 Not used Table 24 SET_INTERRUPT Command packet layout Reply packet doesn t contain any usable information 3 18 GET_INTERRUPT Command pulls FX2 for number of received interrupts and r
19. Controller A complete synchronization is required ERROR_NET_OPEN_FAILED 570 0x23A The NtCreateFile API failed This error should never be returned to an application ERROR IO PRIVILEGE FAILED 571 0x23B Privilege Failed The I O permissions for the process could not be changed ERROR_CONTROL_C_EXIT 572 Application Exit by CTRL C The application terminated as a result of a 0x23C CTRL C ERROR_MISSING_SYSTEMFILE 573 Missing System File The required system file hs is bad or missing 0x23D ERROR_UNHANDLED_EXCEPTION 574 0x23E Application Error The exception s 0x 08lx occurred in the application at location 0x 08Ix ERROR_APP_INIT_FAILURE 575 0x23F Application Error The application failed to initialize correctly Ox lx Click OK to close the application ERROR_PAGEFILE_CREATE_FAILED 576 0x240 Unable to Create Paging File The creation of the paging file hs failed lx The requested size was ld 28 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR INVALID IMAGE HASH Value 577 0x241 UM FX2 USB API v 1 01 7 May 2012 Description Windows cannot verify the digital signature for this file A recent hardware or software change might have installed a file that is signed incorrectly or damaged ERROR NO PAGEFILE 578 0x242 No Paging File Specified No paging file was specified in th
20. D FX2 EEPROM READ b xA8 CMD FX2 EEPROM WRITE b AxA9 CMD FX2 GET FIFO STATUS b xAC CMD FX2 I2C WRITE xAD CMD FX2 I2C READ b xAE CMD FX2 POWER ON b xAF CMD FX2 FLASH WRITE COMMAND b xAA CMD FX2 SET INTERRUPT b ixB0 CMD FX2 GET INTERRUPT b AxB1 print FX2 API Example Load dll fx2d11 windll LoadLibrary TEO300DLL d11 Scan for cards cards fx2811 TE0300 ScanCards print Found Sd card s cards if cards 0 print ERROR No cards to connect raw_input Press Enter sys exit connecting to card 1 m handle c int 0 if fx2d11 TE0300 Open byref m handle 0 U www trenz electronic de TE USB API Appendix B Example program source code UM FX2 USB API v 1 01 7 May 2012 print ERROR Failed to connect card fan input Press Enter sys exit print Connected to card 1 Print FX2 firmware version prepare arguments to pass API function cmd create string buffer 64 reply create string buffer 64 cmd 0 CMD FX2 READ VERSION cmd length c_int 64 reply length e int 64 timeout ms c_int 1000 SendCommand fx2d11 TE0300 SendCommand SendCommand restype c_int Call API if SendCommand m handle cmd cmd length byref reply byref reply length timeout ms 0 print ERROR Can t call API function TEO300 SendCommand raw_input Press Enter sys exit if r
21. DAP HDW ERR 57 0x39 A network adapter hardware error occurred ERROR BAD NET RESP 58 0x3A The specified server cannot perform the requested operation ERROR_UNEXP_NET_ERR 59 0x3B An unexpected network error occurred ERROR_BAD_REM_ADAP 60 0x3C The remote adapter is not compatible ERROR_PRINTQ_FULL 61 0x3D The printer queue is full ERROR_NO_SPOOL_SPACE 62 0x3E Space to store the file waiting to be printed is not available on the server ERROR_PRINT_CANCELLED 63 Ox3F Your file waiting to be printed was deleted ERROR_NETNAME_DELETED 64 0x40 The specified network name is no longer available ERROR_NETWORK_ACCESS_DENIED 65 0x41 Network access is denied ERROR_BAD_DEV_TYPE 66 0x42 The network resource type is not correct ERROR_BAD_NET_NAME 67 0x43 The network name cannot be found ERROR_TOO_MANY_NAMES 68 0x44 The name limit for the local computer network adapter card was exceeded ERROR_TOO_MANY_SESS 69 0x45 The network BIOS session limit was exceeded ERROR_SHARING_PAUSED 70 0x46 The remote server has been paused or is in the process of being started ERROR_REQ_NOT_ACCEP 71 0x47 No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept ERROR_REDIR_PAUSED 72 0x48 The specified printer or disk device has been paused ERROR_FILE_EXISTS 80 0x50 The file exists ERROR_CANNOT_MAKE 82 0x52 The directory or file cannot be created ERROR_
22. DELETED_FULL 797 One of the volume corruption logs was deleted while still having corruption 0x31D records in them The volume contains detected corruptions and must be scanned ERROR_CORRUPT_LOG_CLEARED 798 0x31E One of the volume corruption logs was cleared by chkdsk and no longer contains real corruptions ERROR_ORPHAN_NAME_EXHAUSTED 799 0x31F Orphaned files exist on the volume but could not be recovered because no more new names could be created in the recovery directory Files must be moved from the recovery directory ERROR_OPLOCK_SWITCHED_TO_NEW_HA NDLE 800 0x320 The oplock that was associated with this handle is now associated with a different handle 34 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR_CANNOT_GRANT_REQUESTED_OP LOCK Value 801 0x321 UM FX2 USB API v 1 01 7 May 2012 Description An oplock of the requested level cannot be granted An oplock of a lower level may be available ERROR_CANNOT_BREAK_OPLOCK 802 0x322 The operation did not complete successfully because it would cause an oplock to be broken The caller has requested that existing oplocks not be broken ERROR_OPLOCK_HANDLE_CLOSED 803 0x323 The handle with which this oplock was associated has been closed The oplock is now broken ERROR_NO_ACE_CONDITION 804 0x324 The specified access control entry ACE does not
23. FAIL_124 83 0x53 Fail on INT 24 ERROR_OUT_OF_STRUCTURES 84 0x54 Storage to process this request is not available ERROR_ALREADY_ASSIGNED 85 0x55 The local device name is already in use ERROR_INVALID_PASSWORD 86 0x56 The specified network password is not correct ERROR_INVALID_PARAMETER 87 0x57 The parameter is incorrect ERROR_NET_WRITE_FAULT 88 0x58 A write fault occurred on the network ERROR_NO_PROC_SLOTS 89 0x59 The system cannot start another process at this time ERROR_TOO_MANY_SEMAPHORES 100 0x64 Cannot create another system semaphore ERROR_EXCL_SEM_ALREADY_OWNED 101 0x65 The exclusive semaphore is owned by another process ERROR_SEM_IS_SET 102 0x66 The semaphore is set and cannot be closed ERROR_TOO_MANY_SEM_REQUESTS 103 0x67 The semaphore cannot be set again ERROR_INVALID_AT_INTERRUPT_TIME 104 0x68 Cannot request exclusive semaphores at interrupt time ERROR_SEM_OWNER_DIED 105 0x69 The previous ownership of this semaphore has ended ERROR_SEM_USER_LIMIT 106 Ox6A Insert the diskette for drive 1 ERROR_DISK_CHANGE 107 0x6B The program stopped because an alternate diskette was not inserted ERROR_DRIVE_LOCKED 108 Ox6C The disk is in use or locked by another process ERROR_BROKEN_PIPE 109 Ox6D The pipe has been ended ERROR_OPEN_FAILED 110 Ox6E The system cannot open the device or file specified ERROR_BUFFER_OVERFLOW 111 Ox6F The file name is too long ERROR_DISK_FULL 112 0x70 The
24. GmbH herewith declares that all its products are developed manufactured and distributed RoHS compliant 9 3 WEEE Waste Electrical and Electronic Equipment Information for users within the European Union in accordance with Directive 2002 96 EC of the European Parliament and of the Council of 27 January 2003 on waste electrical and electronic equipment WEEE Users of electrical and electronic equipment in private households are required not to dispose of waste electrical and electronic equipment as unsorted 9 Environmental protection UM FX2 USB API v 1 01 7 May 2012 18 36 municipal waste but to collect such waste electrical and electronic equipment separately By the 13 August 2005 Member States shall have ensured that systems are set up allowing final holders and distributors to return waste electrical and electronic equipment at least free of charge Member States shall ensure availability and accessibility of the necessary collection facilities Separate collection is the precondition to ensure specific treatment and recycling of waste electrical and electronic equipment and is necessary to achieve the chosen level of protection of human health and environment in the European Union Consumers have to actively contribute to the success of such collection and return of waste electrical and electronic equipment Presence of hazardous substances in electrical and electronic equipment results in potential effects on the environment and h
25. IN or SUBST at this time ERROR_SAME_DRIVE 143 0x8F liy system cannot join or substitute a drive to or for a directory on the same rive ERROR_DIR_NOT_ROOT 144 0x90 The directory is not a subdirectory of the root directory ERROR_DIR_NOT_EMPTY 145 0x91 The directory is not empty ERROR_IS_SUBST_PATH 146 0x92 The path specified is being used in a substitute ERROR_IS_JOIN_PATH 147 0x93 Not enough resources are available to process this command ERROR_PATH_BUSY 148 0x94 The path specified cannot be used at this time ERROR_IS_SUBST_TARGET 149 0x95 An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute ERROR_SYSTEM_TRACE 150 0x96 System trace information was not specified in your CONFIG SYS file ERROR INVALID EVENT COUNT 151 0x97 The number of specified semaphore events for DosMuxSemWait is not correct ERROR_TOO_MANY_MUXWAITERS 152 0x98 DosMuxSemWait did not execute too many semaphores are already set ERROR_INVALID_LIST_FORMAT 153 0x99 The DosMuxSemWait list is not correct ERROR_LABEL_TOO_LONG 154 0x9A The volume label you entered exceeds the label character limit of the target file system ERROR_TOO_MANY_TCBS 155 0x9B Cannot create another thread ERROR_SIGNAL_REFUSED 156 0x9C The recipient process has refused the signal ERROR_DISCARDED 157 Ox9D The segment is already discarded and cannot be locked ERROR_NOT_LO
26. IT 275 0x113 The extended attributes did not fit in the buffer ERROR EA FILE CORRUPT 276 0x114 The extended attribute file on the mounted file system is corrupt ERROR EA TABLE FULL 277 0x115 The extended attribute table file is full ERROR INVALID EA HANDLE 278 0x116 The specified extended attribute handle is invalid ERROR_EAS_NOT_SUPPORTED 282 0x11A The mounted file system does not support extended attributes ERROR_NOT_OWNER 288 0x120 Attempt to release mutex not owned by caller ERROR TOO MANY POSTS 298 0x12A Too many posts were made to a semaphore ERROR PARTIAL COPY 299 0x12B Only part of a ReadProcessMemory or WriteProcessMemory request was completed ERROR OPLOCK NOT GRANTED 300 The oplock request is denied 0x12C ERROR_INVALID_OPLOCK_PROTOCOL 301 An invalid oplock acknowledgment was received by the system 0x12D ERROR_DISK_TOO_FRAGMENTED 302 0x12E The volume is too fragmented to complete this operation ERROR_DELETE_PENDING 303 0x12F The file cannot be opened because it is in the process of being deleted ERROR_INCOMPATIBLE_WITH_GLOBAL_SH ORT_NAME_REGISTRY_SETTING 304 0x130 Short name settings may not be changed on this volume due to the global registry setting ERROR_SHORT_NAMES_NOT_ENABLED_O N_VOLUME 305 0x131 Short names are not enabled on this volume ERROR_SECURITY_STREAM_IS
27. LETE 129 0x81 The 1 application cannot be run in Win32 mode ERROR_DIRECT_ACCESS_HANDLE 130 0x82 Attempt to use a file handle to an open disk partition for an operation other than raw disk I O ERROR_NEGATIVE_SEEK 131 0x83 An attempt was made to move the file pointer before the beginning of the file ERROR_SEEK_ON_DEVICE 132 0x84 The file pointer cannot be set on the specified device or file ERROR_IS_JOIN_TARGET 133 0x85 A JOIN or SUBST command cannot be used for a drive that contains previously joined drives ERROR_IS_JOINED 134 0x86 An attempt was made to use a JOIN or SUBST command on a drive that has already been joined ERROR_IS_SUBSTED 135 0x87 An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted ERROR_NOT_JOINED 136 0x88 The system tried to delete the JOIN of a drive that is not joined ERROR_NOT_SUBSTED 137 0x89 The system tried to delete the substitution of a drive that is not substituted ERROR_JOIN_TO_JOIN 138 0x8A The system tried to join a drive to a directory on a joined drive ERROR_SUBST_TO_SUBST 139 0x8B The system tried to substitute a drive to a directory on a substituted drive ERROR_JOIN_TO_SUBST 140 0x8C The system tried to join a drive to a directory on a substituted drive ERROR_SUBST_TO_JOIN 141 0x8D The system tried to SUBST a drive to a directory on a joined drive ERROR_BUSY_DRIVE 142 0x8E The system cannot perform a JO
28. ON Command packet layout Byte Description 1 FX2 Firmware version major number 2 FX2 Firmware version minor number 3 Device major number 4 Device minor number 5 64 Not used Table 3 READ_VERSION Reply packet layout Command return packet back to endpoint 3 3 INITIALIZE Command runs FX2 initialization process Byte Value Description 1 OxAO INITIALIZE command ID 2 64 Not used Table 4 INITIALIZE Command packet layout Reply packet doesn t contain any usable information 3 4 READ STATUS Command returns 5 bytes representing FX2 status Byte Value Description 1 OxA1 READ STATUS command ID 2 64 Not used Table 5 READ STATUS Command packet layout Byte Description 1 FIFO Error 2 Current mode 3 Flash busy 4 FPGA program 5 Booting 6 64 Not used Table 6 READ STATUS Reply packet layout 3 5 RESET FIFO Command resets FIFO of selected endpoint www trenz electronic de TE USB API 3 API Functions description UM FX2 USB API v 1 01 7 May 2012 Byte Value Description 1 OxA4 RESET FIFO command ID 2 0 2 4 6 8 Endpoint number 3 64 Not used Table 7 RESET FIFO Command packet layout Reply packet doesn t contain any usable information 3 6 FLASH READ Command reads data from 1 to 64 bytes from requested SPI Flash address Byte Value Description OxA5 FLASH READ command ID 4 2 S
29. OR_INVALID_ACCESS 12 0xC The access code is invalid ERROR_INVALID_DATA 13 0xD The data is invalid ERROR_OUTOFMEMORY 14 OxE Not enough storage is available to complete this operation ERROR_INVALID_DRIVE 15 OxF The system cannot find the drive specified ERROR_CURRENT_DIRECTORY 16 0x10 The directory cannot be removed ERROR_NOT_SAME_DEVICE 17 0x11 The system cannot move the file to a different disk drive ERROR_NO_MORE_FILES 18 0x12 There are no more files ERROR_WRITE_PROTECT 19 0x13 The media is write protected ERROR_BAD_UNIT 20 0x14 The system cannot find the device specified ERROR_NOT_READY 21 0x15 The device is not ready ERROR_BAD_COMMAND 22 0x16 The device does not recognize the command ERROR_CRC 23 0x17 Data error cyclic redundancy check ERROR_BAD_LENGTH 24 0x18 The program issued a command but the command length is incorrect ERROR_SEEK 25 0x19 The drive cannot locate a specific area or track on the disk ERROR NOT DOS DISK 26 0x1A The specified disk or diskette cannot be accessed ERROR_SECTOR_NOT_FOUND 27 0x1B The drive cannot find the sector requested ERROR_OUT_OF_PAPER 28 0x1C The printer is out of paper ERROR_WRITE_FAULT 29 0x1D The system cannot write to the specified device ERROR_READ_FAULT 30 0x1E The system cannot read from the specified device ERROR_GEN_FAILURE 31 0x1F A device attached to the system is not functioning ERROR_SHARING_VIOLATION 32 0x20 The proces
30. RANSLATION_FAILED 672 0x2A0 A translator failed to translate resources ERROR_PNP_IRQ_TRANSLATION_FAILED 673 0x2A1 A IRQ translator failed to translate resources ERROR_PNP_INVALID_ID 674 0x2A2 Driver 2 returned invalid ID for a child device 3 ERROR_WAKE_SYSTEM_DEBUGGER 675 0x2A3 Kernel Debugger Awakened the system debugger was awakened by an interrupt ERROR_HANDLES_CLOSED 676 0x2A4 Handles Closed Handles to objects have been automatically closed as a result of the requested operation ERROR_EXTRANEOUS_INFORMATION 677 0x2A5 Too Much Information The specified access control list ACL contained more information than was expected ERROR_RXACT_COMMIT_NECESSARY 678 0x2A6 This warning level status indicates that the transaction state already exists for the registry sub tree ERROR_MEDIA_CHECK 679 0x2A7 Media Changed The media may have changed ERROR_GUID_SUBSTITUTION_MADE 680 0x2A8 GUID Substitution During the translation of a global identifier GUID to a Windows security ID SID ERROR_STOPPED_ON_SYMLINK 681 0x2A9 The create operation stopped after reaching a symbolic link ERROR_PLUGPLAY_QUERY_VETOED 683 The Plug and Play query operation was not successful Ox2AB ERROR_UNWIND_CONSOLIDATE 684 A frame consolidation has been executed Ox2AC ERROR_REGISTRY_HIVE_RECOVERED 685 Registry Hive Recovered
31. Registry hive file hs was corrupted and it has Ox2AD been recovered Some data might have been lost 31 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description ERROR DLL MIGHT BE INSECURE 686 The application is attempting to run executable code from the module hs Ox2AE This may be insecure An alternative ERROR_DBG_REPLY_LATER 689 0x2B1 Debugger will reply later ERROR_DBG_UNABLE_TO_PROVIDE_HAND 690 0x2B2 Debugger cannot provide handle LE ERROR_DBG_TERMINATE_THREAD 691 0x2B3 Debugger terminated thread ERROR_DBG_TERMINATE_PROCESS 692 0x2B4 Debugger terminated process ERROR_DBG_CONTROL_C 693 0x2B5 Debugger got control C ERROR_DBG_PRINTEXCEPTION_C 694 0x2B6 Debugger printed exception on control C ERROR_DBG_RIPEXCEPTION 695 0x2B7 Debugger received RIP exception ERROR_DBG_CONTROL_BREAK 696 0x2B8 Debugger received control break ERROR_DBG_COMMAND_EXCEPTION 697 0x2B9 Debugger command communication exception ERROR_OBJECT_NAME_EXISTS 698 Object Exists An attempt was made to create an object and the object name 0x2BA already existed ERROR_THREAD_WAS_SUSPENDED 699 Thread Suspended A thread termination occurred while the thread was 0x2BB suspended The thread was resumed ERROR_IMAGE_NOT_AT_BASE 700
32. SB API
33. _INCONSIS TENT 306 0x132 The security stream for the given volume is in an inconsistent state Please run CHKDSK on the volume ERROR_INVALID_LOCK_RANGE 307 0x133 A requested file lock operation cannot be processed due to an invalid byte range ERROR_IMAGE_SUBSYSTEM_NOT_PRESE NT 308 0x134 The subsystem needed to support the image type is not present ERROR_NOTIFICATION_GUID_ALREADY_D EFINED 309 0x135 The specified file already has a notification GUID associated with it ERROR_INVALID_EXCEPTION_HANDLER 310 0x136 An invalid exception handler routine has been detected ERROR_DUPLICATE_PRIVILEGES 311 0x137 Duplicate privileges were specified for the token ERROR_NO_RANGES_PROCESSED 312 0x138 No ranges for the specified operation were able to be processed ERROR NOT ALLOWED ON SYSTEM FILE 313 0x139 Operation is not allowed on a file system internal file ERROR_DISK_RESOURCES_EXHAUSTED 314 0x13A The physical resources of this disk have been exhausted 26 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description ERROR_INVALID_TOKEN 315 0x13B The token representing the data is invalid ERROR_DEVICE_FEATURE_NOT_SUPPORT 316 The device does not support the command feature ED 0x13C ERROR_MR_MID_NOT_FOUND 317 The system cannot find message
34. a quota limit below the current usage ERROR_DEVICE_ALREADY_ATTACHED 548 0x224 An attempt was made to attach to a device that was already attached to another device ERROR_INSTRUCTION_MISALIGNMENT 549 0x225 An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references ERROR_PROFILING_NOT_STARTED 550 0x226 Profiling not started ERROR_PROFILING_NOT_STOPPED 551 0x227 Profiling not stopped ERROR_COULD_NOT_INTERPRET 552 0x228 The passed ACL did not contain the minimum required information ERROR_PROFILING_AT_LIMIT 553 0x229 The number of active profiling objects is at the maximum and no more may be started ERROR_CANT_WAIT 554 0x22A Used to indicate that an operation cannot continue without blocking for I O ERROR_CANT_TERMINATE_SELF 555 0x22B Indicates that a thread attempted to terminate itself by default called NtTerminateThread with NULL and it was the last thread in the current process ERROR_UNEXPECTED_MM_CREATE_ERR 556 If an MM error is returned which is not defined in the standard FsRtl filter 0x22C ERROR_UNEXPECTED_MM_MAP_ERROR 557 If an MM error is returned which is not defined in the standard FsRtl filter 0x22D ERROR_UNEXPECTED_MM_EXTEND_ERR 558 0x22E If an MM error is returned which is not defined in the standard FsRtl filter ERROR_BAD_FUNCTION_TABLE
35. and packet layout Reply packet doesn t contain any usable information N a E 3 9 SECTOR_ERASE Command erases selected sector from SPI Flash Byte Value Description 1 OxF7 SECTOR ERASE command ID 2 sector Sector to erase 2 64 Not used Table 12 SECTOR ERASE Command packet layout Reply packet doesn t contain any usable information 3 10 EEPROM READ Command reads data from 1 to 31 bytes from requested EEPROM address Byte Value Description 1 OxA8 EEPROM READ command ID 2 AddrHigh High part of address address 15 8 3 AddrLow Low part of address address 7 0 4 size Number of bytes to read max 64 5 64 Not used Table 13 EEPROM_READ Command packet layout Reply packet contains requested data 3 11 EEPROM_WRITE Command writes data from 1 to 31 bytes to requested EEPROM address Thereafter write FX2 firmware read back data from EEPROM and returns in reply packet Byte Value Description 1 OxA9 EEPROM_WRITE command ID 2 AddrHigh High part of address address 15 8 3 AddrLow Low part of address address 7 0 4 size Number of bytes to write max 60 5 size 4 data Data to write size bytes size 5 64 Not used Table 14 EEPROM_WRITE Command packet layout Byte Description 1 size Readback result size 1 64 Not used Table 15 EEPROM_WRITE Reply packet layout 3 API Functions descr
36. command subtree has a signal handler ERROR_FILENAME_EXCED_RANGE 206 OxCE The filename or extension is too long ERROR_RING2_STACK_IN_USE 207 OxCF The ring 2 stack is in use ERROR_META_EXPANSION_TOO_LONG 208 0xDO The global filename characters ERROR_INVALID_SIGNAL_NUMBER 209 0xD1 The signal being posted is not correct ERROR_THREAD_1_INACTIVE 210 0xD2 The signal handler cannot be set ERROR_LOCKED 212 0xD4 The segment is locked and cannot be reallocated ERROR_TOO_MANY_MODULES 214 0xD6 Too many dynamic link modules are attached to this program or dynamic link module ERROR_NESTING_NOT_ALLOWED 215 0xD7 Cannot nest calls to LoadModule ERROR_EXE_MACHINE_TYPE_MISMATCH 216 0xD8 The version of 1 is not compatible with the version you re running Check your computer s system information to see whether you need a x86 32 bit or x64 64 bit version of the program ERROR_EXE_CANNOT_MODIFY_SIGNED_BI 217 0xD9 The image file 1 is signed NARY ERROR_EXE_CANNOT_MODIFY_STRONG_ 218 0xDA The image file 1 is strong signed SIGNED_BINARY ERROR_FILE_CHECKED_OUT 220 0xDC This file is checked out or locked for editing by another user ERROR_CHECKOUT_REQUIRED 221 OxDD The file must be checked out before saving changes ERROR_BAD_FILE_TYPE 222 OxDE The file type being saved or retrieved has been blocked 25 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB
37. dication has completed successfully 0x2C6 ERROR_EVENT_PENDING 711 0x2C7 TDI Event Pending The TDI indication has entered the pending state ERROR_CHECKING_FILE_SYSTEM 712 Checking file system on wZ 0x2C8 ERROR_WAS_UNLOCKED 715 Page Unlocked The page protection of a locked page was changed to No 0x2CB Access and the page was unlocked from memory and from the process ERROR_SERVICE_NOTIFICATION 716 hs 0x2CC ERROR_LOG_HARD_ERROR 718 Application popup 1 2 0x2CE ERROR_NO_YIELD_PERFORMED 721 A yield execution was performed and no thread was available to run 0x2D1 ERROR_TIMER_RESUME_IGNORED 722 The resumable flag to a timer API was ignored 0x2D2 ERROR_ARBITRATION_UNHANDLED 723 The arbiter has deferred arbitration of these resources to its parent 0x2D3 ERROR_MP_PROCESSOR_MISMATCH 725 The CPUs in this multiprocessor system are not all the same revision level To 0x2D5 use all processors the operating system restricts itself to the features of the 32 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description least capable processor in the system Should problems occur with this system ERROR_HIBERNATED 726 The system was put into hibernation 0x2D6 ERROR_RESUME_HIBERNATION 727 The system was resumed from hibernation 0x2D7 ERROR_FIRMWARE_UPDATED 728 Windows has detected that the system firmware
38. e individual parts full program source code can be found in Appendix B Example program source code At the first program defines modules to import import sys from ctypes import Module sys contains exit function Module ctypes contain functions and types definitions used to work with DLL Next code part defines constant values for API functions FX2 Commands definition CMD FX2 READ VERSION b x00 www trenz electronic de TE USB API 5 API Usage example program UM FX2 USB API v 1 01 7 May 2012 CMD FX2 INITALIZE b xao CMD FX2 READ STATUS b xAl CMD FX2 WRITE REGISTER b xA2 CMD FX2 READ REGISTER b xA3 CMD FX2 RESET FIFO STATUS b xA4 CMD FX2 FLASH READ b xA5S CMD FX2 FLASH WRITE b xA6 CMD FX2 FLASH ERASE b xAT CMD FX2 EEPROM READ b xA8 CMD FX2 EEPROM WRITE b xA9 CMD FX2 GET FIFO STATUS b xAC CMD FX2 I2C WRITE b xAD CMD FX2 I2C READ b xAE CMD FX2 POWER ON b xAF CMD FX2 FLASH WRITE COMMAND b xAA CMD FX2 SET INTERRUPT b AxBO CMD FX2 GET INTERRUPT b xB1 Each constant defines 8 bit value print FX2 API Example Print start message Load dll fx2d11 windll LoadLibrary TEO300DLL d11 Scan for cards cards fx2dll1 TE0300 ScanCards print Found Sd card s cards if cards print ERROR No cards to connect raw_input Press Enter sys exit At this point program loads
39. e system configuration ERROR ILLEGAL FLOAT CONTEXT 579 0x243 EXCEPTION A real mode application issued a floating point instruction and floating point hardware is not present ERROR NO EVENT PAIR 580 0x244 An event pair synchronization operation was performed using the thread specific client server event pair object ERROR_DOMAIN_CTRLR_CONFIG_ERROR 581 0x245 A Windows Server has an incorrect configuration ERROR_ILLEGAL_CHARACTER 582 0x246 An illegal character was encountered For a multi byte character set this includes a lead byte without a succeeding trail byte For the Unicode character set this includes the characters OxFFFF and OxFFFE ERROR_UNDEFINED_CHARACTER 583 0x247 The Unicode character is not defined in the Unicode character set installed on the system ERROR_FLOPPY_VOLUME 584 0x248 The paging file cannot be created on a floppy diskette ERROR BIOS FAILED TO CONNECT INTE RRUPT 585 0x249 The system BIOS failed to connect a system interrupt to the device or bus for which the device is connected ERROR_BACKUP_CONTROLLER 586 0x24A This operation is only allowed for the Primary Domain Controller of the domain ERROR_MUTANT_LIMIT_EXCEEDED 587 0x24B An attempt was made to acquire a mutant such that its maximum count would have been exceeded ERROR_FS_DRIVER_REQUIRED 588 A volume has been accessed for which a file system drive
40. eceived data number of bytes set by SET_INTERRUPT command Byte Value Description 1 OxB1 GET INTERRUPT command ID 2 64 Not used Table 25 GET INTERRUPT Command packet layout 3 API Functions description UM FX2 USB API v 1 01 7 May 2012 Byte Description 1 Interrupt number 2 size 1 Interrupt data size 2 64 Not used Table 26 GET_INTERRUPT Reply packet layout 4 Communicate with Microblaze processor In reference projects 1 C bus used to communicate between FX2 microcontroller and FPGA Microblaze processor To send command to Microblaze processor API function 12C_ WRITE should be called with Microblaze C address and command Byte Code Description 1 OxAD API command 12C write 2 Ox3F Microblaze address on 12C bus 3 Ox0C 12 bytes to send 4 0x00 Not used 5 0x00 Not used 6 0x00 Not used 7 0x00 0x05 Command Table 27 Packet structure for API call Command Code Description FX22MB_REGO_NOP 0x00 No operation FX22MB_REGO_GETVERSION 0x01 Return version FX22MB_REGO_START_TX 0x02 Start TX test FX22MB_REGO_START_RX 0x03 Start RX test FX22MB REGO STOP 0x04 Stop test FX22MB_REGO_PING 0x05 Return pong 0x706F6E67 value Table 28 I2C commands codes 5 API Usage example program 11 36 As an example consider a simple program which reads FX2 microcontroller firmware version This chapter will describ
41. ector Flash sector to read address 23 16 3 AddrHigh High part of address address 15 8 4 5 AddrLow Low part of address address 7 0 size Number of bytes to read max 64 6 64 Not used Table 8 FLASH_READ Command packet layout Reply packet contains requested data 3 7 FLASH_WRITE Command writes data from 1 to 59 bytes to requested SPI Flash address Thereafter writes FX2 firmware read back data from Flash and returns in reply packet Byte Value Description OxA6 FLASH_WRITE command ID 4 2 Sector Flash sector to write address 23 16 3 AddrHigh High part of address address 15 8 4 AddrLow Low part of address address 7 0 5 size Number of bytes to write max 59 6 size 5 data Data to write size bytes size 6 64 Not used Table 9 FLASH_WRITE Command packet layout Byte Description 1 size Readback result size 1 64 Not used Table 10 FLASH_WRITE Reply packet layout Note Write block should not cross sector limit 3 8 FLASH_ERASE Command starts entire flash erase process Full flash erase may take up to 30 seconds for M25P32 SPI Flash chip To control Flash busy status use READ_STATUS command 1 Check your SPI Flash datasheet for actual time 3 API Functions description UM FX2 USB API v 1 01 7 May 2012 Byte Value Description 1 OxA7 FLASH_ERASE command ID Not used Table 11 FLASH_ERASE Comm
42. eply length value gt 4 print FX2 Firmware version d d ord reply 0 ord reply 1 print Device version d d ord reply 2 ord reply 3 else print ERROR Unexpected command result TEO300 SendCommand raw_input Press Enter sys exit fx20d11 TE0300 Close byref m handle print Test finished raw_input Press Enter Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Appendix D Windows error codes 0 999 Name Value Description ERROR_SUCCESS 0 0x0 The operation completed successfully ERROR_INVALID_FUNCTION 1 0x1 Incorrect function ERROR_FILE_NOT_FOUND 2 0x2 The system cannot find the file specified ERROR_PATH_NOT_FOUND 3 0x3 The system cannot find the path specified ERROR_TOO_MANY_OPEN_FILES 4 0x4 The system cannot open the file ERROR_ACCESS_DENIED 5 0x5 Access is denied ERROR_INVALID_HANDLE 6 0x6 The handle is invalid ERROR_ARENA_TRASHED 7 0x7 The storage control blocks were destroyed ERROR_NOT_ENOUGH_MEMORY 8 0x8 Not enough storage is available to process this command ERROR_INVALID_BLOCK 9 0x9 The storage control block address is invalid ERROR_BAD_ENVIRONMENT 10 OxA The environment is incorrect ERROR_BAD_FORMAT 11 0xB An attempt was made to load a program with an incorrect format ERR
43. estype c int To work with external functions imported from DLL all arguments should be defined with types from ctypes package Function create_string_buffer returns zero filled string with requested length Note that in contrast to usual python strings strings created by this function can be changed For convenience program defines alias for fx2dll TE0300_SendCommand function and specify return value type Next step is the call of API function if SendCommand m handle cmd cmd length byref reply byref reply length timeout ms 0 print ERROR Can t call API function TEO300 SendCommand raw_input Press Enter www trenz electronic de TE USB API 5 API Usage example program UM FX2 USB API v 1 01 7 May 2012 sys exit Result of this function returned in reply and reply_length arguments passed by reference if reply length value gt 4 print FX2 Firmware version d d ord reply 0 ord reply 1 Q print Device version d d ord reply 2 ord reply 3 else print ERROR Unexpected command result TEO300 SendCommand raw input Press Enter sys exit Program checks reply size and if it matches 4 bytes print version information To convert binary data to integer ord function is used fx2d11 TE0300 Close byref m handle print Test finished raw_input Press Enter Last part of example program is closing driver connection and pr
44. hed ERROR_INVALID_DEVICE_OBJECT_PARAM ETER 650 0x28A The device object parameter is either not a valid device object or is not attached to the volume specified by the file name ERROR_MCA_OCCURED 651 0x28B A Machine Check Error has occurred Please check the system event log for additional information ERROR_DRIVER_DATABASE_ERROR 652 There was error 2 processing the driver database 0x28C ERROR_SYSTEM_HIVE_TOO_LARGE 653 System hive size has exceeded its limit 0x28D ERROR_DRIVER_FAILED_PRIOR_UNLOAD 654 0x28E The driver could not be loaded because a previous version of the driver is still in memory ERROR_VOLSNAP_PREPARE_HIBERNATE 655 0x28F Volume Shadow Copy Service Please wait while the Volume Shadow Copy Service prepares volume hs for hibernation ERROR_HIBERNATION_FAILURE 656 0x290 The system has failed to hibernate The error code is hs Hibernation will be disabled until the system is restarted ERROR_FILE_SYSTEM_LIMITATION 665 0x299 The requested operation could not be completed due to a file system limitation ERROR_ACPI_ERROR 669 0x29D An error occurred in the ACPI subsystem ERROR_WOW_ASSERTION 670 0x29E WOW Assertion Error ERROR PNP BAD MPS TABLE 671 0x29F A device is missing in the system BIOS MPS table This device will not be used Please contact your system vendor for system BIOS update ERROR_PNP_T
45. igned char pReply int pReplLen int timeout param handle Device handle param pCmd Pointer to command send buffer 64 bytes param CmdLen Length of command param pReply Pointer to command receive buffer 64 bytes param pReplLen Pointer to length of reply param timeout Function timeout value in ms return Error if not O Thereafter timeout function ends and returns error code 2 5 TE0300_GetData 4 36 Function receives data from USB endpoints 2 4 6 int TE0300 GetData unsigned int handle unsigned char pData int pLen unsigned int pipeNumber int timeout param handle Device handle param pData Pointer to receive buffer param pLen Pointer to number of requested bytes return number of received bytes param pipeNumber endpoint number use Pl PipeNumber enumerator param timeout Function timeout value in ms www trenz electronic de TE USB API 2 Driver functions description UM FX2 USB API v 1 01 7 May 2012 return Error if not O Thereafter timeout function ends and returns error code 2 6 TE0300_SetData Function sends data to USB endpoint 8 int TE0300 SetData unsigned int handle unsigned char pData int len unsigned int pipeNumber param handle Device handle param pData Pointer to transmit buffer param len Number of bytes to transmit param pipeNumber endpoint number use Pl PipeNumber enumerator PI_EP8 only return Error if not O 3 API Functions description
46. igned file The system has been shut down ERROR_PNP_REBOOT_REQUIRED 638 0x27E Device will not start without a reboot 30 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR INSUFFICIENT POWER Value 639 0x27F UM FX2 USB API v 1 01 7 May 2012 Description There is not enough power to complete the requested operation ERROR MULTIPLE FAULT VIOLATION 640 0x280 ERROR MULTIPLE FAULT VIOLATION ERROR PORT NOT SET 642 0x282 An attempt to remove a processes DebugPort was made ERROR DS VERSION CHECK FAILURE 643 0x283 This version of Windows is not compatible with the behavior version of directory forest ERROR_RANGE_NOT_FOUND 644 0x284 The specified range could not be found in the range list ERROR_NOT_SAFE_MODE_DRIVER 646 0x286 The driver was not loaded because the system is booting into safe mode ERROR_FAILED_DRIVER_ENTRY 647 0x287 The driver was not loaded because it failed its initialization call ERROR_DEVICE_ENUMERATION_ERROR 648 0x288 The hs encountered an error while applying power or reading the device configuration This may be caused by a failure of your hardware or by a poor connection ERROR_MOUNT_POINT_NOT_RESOLVED 649 0x289 The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attac
47. inting final message To use this program Copy source code from Appendix B Example program source code to file called example py e Copy TEO300DLL dil to the same folder Run program by double clicking in explorer or type python example py into Windows command line interface Program result window should look like Figure 1 2 Torun program using Windows command line interface current directory should be changed to program directory first 5 API Usage example program UM FX2 USB API v 1 01 7 May 2012 cx C WINDOWS system32 cmd exe python example py C example gt python example py F 2 API Example Found 1 card s gt Connected to card 1 FR2 Firmware version 2 1 Device version 1 1 Test finished Press Enter Figure 1 example py program result window 6 Related Materials and References e Cypress EZ USB FX2 Controller datasheet http www cypress com mpn CY7C68013A 56LT XC e STMicroelectronics M25P32 Serial Flash Memory datasheet http www st com stonline stappl productcatalog app page productSelector e Python download page http python org download e Python documentation page http www python org doc e Microsoft Windows Error codes http msdn microsoft com en us library windows desktop ms681382 28v vs 85 29 aspx 7 Glossary of Abbreviations and Acronyms UM FX2 USB API v 1 01 7 May 2012 7 Glossary of Abbreviations and Acronyms SDK TE XPS A WARNING notice de
48. ion To confront directly with the responsibility toward the environment the global community and eventually also oneself Such a resolution should be an integral part not only of everybody s life Also enterprises shall be conscious of their social responsibility and contribute to the preservation of our common living space That is why Trenz Electronic invests in the protection of our Environment 9 1 REACH Registration Evaluation Authorisation and Restriction of Chemicals compliance statement Trenz Electronic is a manufacturer and a distributor of electronic products It is therefore a so called downstream user in the sense of REACH The products we supply to you are solely non chemical products goods Moreover and under normal and reasonably foreseeable circumstances of application the goods supplied to you shall not release any substance For that Trenz Electronic is obliged to neither register nor to provide safety data sheet According to present knowledge and to best of our knowledge no SVHC Substances of Very High Concern on the Candidate List are contained in our products Furthermore we will immediately and unsolicited inform our customers in compliance with REACH Article 33 if any substance present in our goods above a concentration of 0 1 weight by weight will be classified as SVHC by the European Chemicals Agency ECHA 9 2 ROHS Restriction of Hazardous Substances compliance statement Trenz Electronic
49. iption UM FX2 USB API v 1 01 7 May 2012 3 12 FIFO_STATUS Command returns FIFO status for all used endpoints Status is value of EP2CS EP4CS EP6CS and EP8CS FX2 registers See FX2 documentation for detailed information Byte Value Description 1 OxAC FIFO_STATUS command ID 2 64 Not used Table 16 FIFO_STATUS Command packet layout Byte Description 1 FX2 EP2CS Register value 2 FX2 EP4CS Register value 3 FX2 EP6CS Register value 4 FX2 EP8CS Register value 5 64 Not used Table 17 FIFO_STATUS Reply packet layout 3 13 12C_WRITE Command writes data from 1 to 32 bytes to requested I C address Byte Value Description 1 OxAD I2C WRITE command ID 2 Address C address 3 size Number of bytes to write max 32 4 sizet3 data Data to write size bytes sizet4 64 Not used Table 18 12C WRITE Command packet layout Reply packet doesn t contain any usable information Read chapter Communicate with Microblaze processor for description of 1 C commands used to communicate with Microblaze processor in TE reference projects 3 14 12C_READ Command reads data from 1 to 32 bytes from requested I C address Byte Value Description 1 OxAE I2C READ command ID Address C address size Number of bytes to read max 32 4 64 Not used Table 19 12C READ Command packet layout Reply packet contains requested data 3 15 POWER
50. nd zero fault Ox2EE ERROR_PAGE_FAULT_PAGING_FILE 751 Page fault was satisfied by reading from a secondary storage device Ox2EF ERROR_CACHE_PAGE_LOCKED 752 0x2F0 Cached page was locked during operation ERROR_CRASH_DUMP 753 0x2F1 Crash dump exists in paging file ERROR_BUFFER_ALL_ZEROS 754 0x2F2 Specified buffer contains all zeros ERROR_REPARSE_OBJECT 755 0x2F3 A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link ERROR_RESOURCE_REQUIREMENTS_CHA NGED 756 0x2F4 The device has succeeded a query stop and its resource requirements have changed ERROR_TRANSLATION_COMPLETE 757 0x2F5 The translator has translated these resources into the global space and no further translations should be performed ERROR_NOTHING_TO_TERMINATE 758 0x2F6 Aprocess being terminated has no threads to terminate ERROR_PROCESS_NOT_IN_JOB 759 0x2F7 The specified process is not part of a job ERROR_PROCESS_IN_JOB 760 0x2F8 The specified process is part of a job ERROR_VOLSNAP_HIBERNATE_READY 761 0x2F9 Volume Shadow Copy Service The system is now ready for hibernation ERROR_FSFILTER_OP_COMPLETED_SUCC ESSFULLY 762 0x2FA A file system or file system filter driver has successfully completed an FsFilter operation ERROR_INTERRUPT_VECTOR_ALREADY_C 763 The specified interrupt vec
51. notes a hazard It calls attention to an operating procedure practice or similar which if not correctly performed or adhered to could result in damage to the product or loss of important data Do not proceed beyond a WARNING notice until the indicated conditions are fully understood and met A CAUTION notice denotes a risk It calls attention to an operating procedure practice or similar which if not correctly performed or adhered to could result in a fault an undesired condition that can lead to an error Do not proceed beyond a CAUTION notice until the indicated conditions are fully understood and met application programming interface board to board digital signal processing digital signal processor Embedded Development Kit input output blocks I O blocks intellectual property In System Programmability push button Software Development Kit Trenz Electronic Xilinx Platform Studio 8 Legal Notices 8 1 Document Warranty The material contained in this document is provided as is and is subject to being changed at any time without notice Trenz Electronic does not warrant the accuracy and completeness of the materials in this document Further to the maximum extent permitted by applicable law Trenz Electronic disclaims all warranties either express or implied with regard to this document and any information contained herein including but not limited to the implied warranties of merchantability fitness for a pa
52. r is required that has 0x24C not yet been loaded ERROR_CANNOT_LOAD_REGISTRY_FILE 589 Registry File Failure The registry cannot load the hive file hs or its log or 0x24D alternate lt is corrupt ERROR_DEBUG_ATTACH_FAILED 590 0x24E Unexpected Failure in DebugActiveProcess An unexpected failure occurred while processing a DebugActiveProcess API request You may choose OK to terminate the process ERROR_SYSTEM_PROCESS_TERMINATED 591 0x24F Fatal System Error The hs system process terminated unexpectedly with a status of 0x 08x 0x 08x 0x 08x The system has been shut down ERROR_DATA_NOT_ACCEPTED 592 0x250 Data Not Accepted The TDI client could not handle the data received during an indication ERROR_VDM_HARD_ERROR 593 0x251 NTVDM encountered a hard error ERROR_DRIVER_CANCEL_TIMEOUT 594 0x252 Cancel Timeout The driver hs failed to complete a canceled I O request in the allotted time ERROR_REPLY_MESSAGE_MISMATCH 595 0x253 Reply Message Mismatch An attempt was made to reply to an LPC message ERROR_LOST_WRITEBEHIND_DATA 596 0x254 Delayed Write Failed Windows was unable to save all the data for the file hs The data has been lost This error may be caused by a failure of your computer hardware or network connection Please try to save this file elsewhere ERROR_CLIENT_SERVER_PARAMETERS_IN VALID 597 0x255 The parameter s passed to the
53. re is not enough space on the disk ERROR_NO_MORE_SEARCH_HANDLES 113 0x71 No more internal file identifiers available ERROR_INVALID_TARGET_HANDLE 114 0x72 The target internal file identifier is incorrect ERROR_INVALID_CATEGORY 117 0x75 The IOCTL call made by the application program is not correct ERROR_INVALID_VERIFY_SWITCH 118 0x76 The verify on write switch parameter value is not correct 23 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description ERROR BAD DRIVER LEVEL 119 0x77 The system does not support the command requested ERROR CALL NOT IMPLEMENTED 120 0x78 This function is not supported on this system ERROR_SEM_TIMEOUT 121 0x79 The semaphore timeout period has expired ERROR_INSUFFICIENT_BUFFER 122 0x7A The data area passed to a system call is too small ERROR_INVALID_NAME 123 0x7B The filename ERROR_INVALID_LEVEL 124 0x7C The system call level is not correct ERROR_NO_VOLUME_LABEL 125 0x7D The disk has no volume label ERROR_MOD_NOT_FOUND 126 0x7E The specified module could not be found ERROR_PROC_NOT_FOUND 127 0x7F The specified procedure could not be found ERROR_WAIT_NO_CHILDREN 128 0x80 There are no child processes to wait for ERROR_CHILD_NOT_COMP
54. requirements e Python 2 7 or higher See Appendix A Python Installation for details 2 Driver functions description In order to provide a user interface for driver functions dynamic link library TEO300DLL dll has been used User programs should load this library and initialize board connection to get access to API functions TEO300DLL dll library exports functions e TE0300 ScanCards e TE0300 Open e TE0300 Close e TEO300_SendCommand e TEO300_GetData e TEO300_SetData Functions return standard Windows error codes Codes from 0 to 999 listed in Appendix D Windows error codes 0 999 full list can be found in Microsoft MSDN documentation 2 1 TE0300_ScanCards Function scans for available USB devices int TEO300 ScanCards param None return Number of available USB devices 2 Driver functions description UM FX2 USB API v 1 01 7 May 2012 2 2 TEO0300_Open Function connects to selected USB device creates and returns device handle int TE0300 Open unsigned int pHandle int CardNo param pHandle Pointer to devices handle param CardNo Number of USB devices to connect return Error if not O 2 3 TE0300_Close Function closes USB device handle int TEO300 Close unsigned int pHandle param pHandle Pointer to device handle return Error if not O 2 4 TE0300_SendCommand Function sends 64 bytes packet to USB endpoint 1 int TE0300 SendCommand unsigned int handle unsigned char pCmd int CmdLen uns
55. rticular purpose or non infringement of intellectual property Trenz Electronic shall not be liable for errors or for incidental or consequential damages in connection with the furnishing use or performance of this document or of any information contained herein 8 2 Limitation of Liability 16 36 In no event will Trenz Electronic its suppliers or other third parties mentioned in this document be liable for any damages whatsoever including without limitation those resulting from lost profits lost data or business interruption arising out of the use inability to use or the results of use of this document any documents linked to this document or the materials or information contained at any or all such documents If your use of the materials or information from this document results in the need for servicing repair or correction of equipment or data you assume all costs thereof www trenz electronic de TE USB API 8 Legal Notices UM FX2 USB API v 1 01 7 May 2012 8 3 Copyright Notice No part of this manual may be reproduced in any form or by any means including electronic storage and retrieval or translation into a foreign language without prior agreement and written consent from Trenz Electronic 8 4 Technology Licenses The hardware firmware software described in this document are furnished under a license and may be used modified copied only in accordance with the terms of such license 9 Environmental protect
56. s cannot access the file because it is being used by another process ERROR_LOCK_VIOLATION 33 0x21 The process cannot access the file because another process has locked a portion of the file ERROR_WRONG_DISK 34 0x22 The wrong diskette is in the drive Insert 2 Volume Serial Number 3 into drive 1 ERROR_SHARING_BUFFER_EXCEEDED 36 0x24 Too many files opened for sharing ERROR_HANDLE_EOF 38 0x26 Reached the end of the file ERROR_HANDLE_DISK_FULL 39 0x27 The disk is full ERROR_NOT_SUPPORTED 50 0x32 The request is not supported ERROR_REM_NOT_LIST 51 0x33 Windows cannot find the network path Verify that the network path is correct and the destination computer is not busy or turned off If Windows still cannot find the network path ERROR_DUP_NAME 52 0x34 You were not connected because a duplicate name exists on the network If joining a domain 22 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 UM FX2 USB API v 1 01 7 May 2012 Name Value Description ERROR BAD NETPATH 53 0x35 The network path was not found ERROR NETWORK BUSY 54 0x36 The network is busy ERROR DEV NOT EXIST 55 0x37 The specified network resource or device is no longer available ERROR TOO MANY CMDS 56 0x38 The network BIOS command limit has been reached ERROR A
57. ss to open the other end of the pipe ERROR_VERIFIER_STOP 537 0x219 Application verifier has found an error in the current process ERROR_ABIOS_ERROR 538 0x21A An error occurred in the ABIOS subsystem ERROR_WX86_WARNING 539 0x21B A warning occurred in the WX86 subsystem ERROR_WX86_ERROR 540 An error occurred in the WX86 subsystem 0x21C ERROR_TIMER_NOT_CANCELED 541 An attempt was made to cancel or set a timer that has an associated APC and 0x21D the subject thread is not the thread that originally set the timer with an associated APC routine ERROR_UNWIND 542 0x21E Unwind exception code ERROR_BAD_STACK 543 0x21F An invalid or unaligned stack was encountered during an unwind operation 27 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR INVALID UNWIND TARGET Value 544 0x220 UM FX2 USB API v 1 01 7 May 2012 Description An invalid unwind target was encountered during an unwind operation ERROR INVALID PORT ATTRIBUTES 545 0x221 Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort ERROR_PORT_MESSAGE_TOO_LONG 546 0x222 Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port ERROR_INVALID_QUOTA_LOWER 547 0x223 An attempt was made to lower
58. tep ERROR_NO_MORE_MATCHES 626 0x272 There are no more matches for the current index enumeration ERROR_RANGE_LIST_CONFLICT 627 0x273 The range could not be added to the range list because of a conflict ERROR_SERVER_SID_MISMATCH 628 0x274 The server process is running under a SID different than that required by client ERROR CANT ENABLE DENY ONLY 629 0x275 A group marked use for deny only cannot be enabled ERROR FLOAT MULTIPLE FAULTS 630 0x276 EXCEPTION Multiple floating point faults ERROR_FLOAT_MULTIPLE_TRAPS 631 0x277 EXCEPTION Multiple floating point traps ERROR_NOINTERFACE 632 0x278 The requested interface is not supported ERROR_DRIVER_FAILED_SLEEP 633 0x279 System Standby Failed The driver hs does not support standby mode Updating this driver may allow the system to go to standby mode ERROR_CORRUPT_SYSTEM_FILE 634 0x27A The system file 1 has become corrupt and has been replaced ERROR_COMMITMENT_MINIMUM 635 0x27B Virtual Memory Minimum Too Low Your system is low on virtual memory Windows is increasing the size of your virtual memory paging file During this process ERROR_PNP_RESTART_ENUMERATION 636 A device was removed so enumeration must be restarted 0x27C ERROR_SYSTEM_IMAGE_BAD_SIGNATURE 637 Fatal System Error The system image s is not properly signed The file has 0x27D been replaced with the s
59. tor was already connected ONNECTED 0x2FB ERROR_INTERRUPT_STILL_CONNECTED 764 The specified interrupt vector is still connected 0x2FC ERROR_WAIT_FOR_OPLOCK 765 An operation is blocked waiting for an oplock 0x2FD ERROR_DBG_EXCEPTION_HANDLED 766 Debugger handled exception 0x2FE ERROR_COMPRESSION_DISABLED 769 0x301 Compression is disabled for this volume 33 36 www trenz electronic de TE USB API Appendix D Windows error codes 0 999 Name ERROR_CANTFETCHBACKWARDS Value 770 0x302 UM FX2 USB API v 1 01 7 May 2012 Description The data provider cannot fetch backwards through a result set ERROR_CANTSCROLLBACKWARDS 771 0x303 The data provider cannot scroll backwards through a result set ERROR_ROWSNOTRELEASED 772 0x304 The data provider requires that previously fetched data is released before asking for more data ERROR_BAD_ACCESSOR_FLAGS 773 0x305 The data provider was not able to interpret the flags set for a column binding in an accessor ERROR_ERRORS_ENCOUNTERED 774 0x306 One or more errors occurred while processing the request ERROR_NOT_CAPABLE 775 0x307 The implementation is not capable of performing the request ERROR_REQUEST_OUT_OF_SEQUENCE 776 0x308 The client of a component requested an operation which is not valid given the state of the component instance ERROR_VERSION_PARSE_ERROR 777 0x309
60. ty issues Please try to save this file elsewhere ERROR LOST WRITEBEHIND DATA NETW ORK SERVER ERROR 789 0x315 Delayed Write Failed Windows was unable to save all the data for the file hs the data has been lost This error was returned by the server on which the file exists Please try to save this file elsewhere ERROR LOST WRITEBEHIND DATA LOCAL DISK ERROR 790 0x316 Delayed Write Failed Windows was unable to save all the data for the file hs the data has been lost This error may be caused if the device has been removed or the media is write protected ERROR BAD MCFG TABLE 791 0x317 The resources required for this device conflict with the MCFG table ERROR_DISK_REPAIR_REDIRECTED 792 0x318 The volume repair could not be performed while it is online Please schedule to take the volume offline so that it can be repaired ERROR_DISK_REPAIR_UNSUCCESSFUL 793 0x319 The volume repair was not successful ERROR_CORRUPT_LOG_OVERFULL 794 0x31A One of the volume corruption logs is full Further corruptions that may be detected won t be logged ERROR_CORRUPT_LOG_CORRUPTED 795 0x31B One of the volume corruption logs is internally corrupted and needs to be recreated The volume may contain undetected corruptions and must be scanned ERROR_CORRUPT_LOG_UNAVAILABLE 796 One of the volume corruption logs is unavailable for being operated on 0x31C ERROR_CORRUPT_LOG_
61. uman health The symbol consisting of the crossed out wheeled bin indicates separate collection for waste electrical and electronic equipment www trenz electronic de TE USB API Appendix A Python Installation UM FX2 USB API v 1 01 7 May 2012 Appendix A Python Installation Download Python 2 7 or higher from official download page http python org download Run installation Invoke Control Panel Click the System icon Click on the Advanced system settings Click Advanced tab Click the Environment Variables button In the second box labelled System variables scroll down to the variable called Path and double click on it Do not delete what is already there Add Cc Python27 to the end of variable value Press OK To test click Start Run and type python You should see interpreter prompt Press Ctrl Z to exit interpreter 3 Use path to your Python installation 19 36 www trenz electronic de TE USB API Appendix B Example program source code UM FX2 USB API v 1 01 7 May 2012 Appendix B Example program source code 20 36 import sys from ctypes import FX2 Commands definition CMD FX2 READ VERSION x00 CMD FX2 INITALIZE b xa0o CMD FX2 READ STATUS b ixal CMD FX2 WRITE REGISTER b xA2 CMD FX2 READ REGISTER b xA3 CMD FX2 RESET FIFO STATUS b xA4 CMD FX2 FLASH READ b ixas CMD FX2 FLASH WRITE b ixA6 CMD FX2 FLASH ERASE b xAT CM

Download Pdf Manuals

image

Related Search

Related Contents

Adhere CPM.fF - West Penetone Canada  BenQ FP202W User's Manual    Bintec-elmeg Elmeg T400  Manuale Camper per PND  Dispositivo  DUVRI [file] - Regione Autonoma della Sardegna  Dossier Technique    Dell PowerConnect B-8000 Installation Manual  

Copyright © All rights reserved.
Failed to retrieve file