Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0320 TE API overs EP1

Started by oro06, August 07, 2013, 09:59:49 AM

Previous topic - Next topic


Good morning,

it seems that something is going wrong when sending any request to EP1 via TE_API.

in fact,  any TE_USB_FX2_SendCommand return true (success) but no data are transfered

test 1°)
with a recently received te0320 module with stock firmware for both fx2 and fpga
running TE_USB_FX2.gen_3/TE_USB_FX2.Cpp/TE_USB_FX2_CyAPI_SampleApplication (from github)
1:Get number of cards ->
2: Connect cardNo 0 ->
Module is connected!
5:Get FX2 firmware version ->
Major version: 224
Minor version: 253
Device hi: 18
Device lo: 0

we expect here fw version :
as from fw:te_api.c line 107
EP1INBUF[0] = fx2_ver_maj_;
EP1INBUF[1] = fx2_ver_min_;
EP1INBUF[2] = fx2_tip_maj_;
EP1INBUF[3] = fx2_tip_min_;
new_data = 1;
and from fw:te_api.h
// Version Definition
#define fx2_ver_maj_    3
#define fx2_ver_min_   2
#define fx2_tip_maj_    1
#define fx2_tip_min_   1

this was also tested several times and with other TE0320 boards
same result.

test 2°)
using direct CyAPI.dll with proper endpoint (0x01 for sending and 0x81 for reading) and timout configured to 2000
Command[0]=CMD_READ_VERSION; //0x00
bResultCommand=BulkEP->XferData(Command, CmdLength);

in return bResultCommand=True but CmdLength=0 instead or 64

test 3°)
using cypress CyConsole v1.7.0.2 and with EZ-USB Interface sending '00' to ep1 ->
Bulk OUT Transfer
Bulk OUT success.
Buffer Contents
you can see here after 0000 there is nothing we should have displayed transfered datas

test 4°)
using cypress CyControl and sending '00' to ep1 ->
BULK OUT transfer
Zero-length data transfer completed

please note that with non stock fpga bitgen uploaded
using same method i can send successully bulk write to EP8 and read form EP86
so don't think it's a driver issue (i'm using TE_USB_FX2_32.sys drivers version

would you mind letting me know if you can reproduce this  ?

thank & regards


Hello OR.

(0) We do not have a 32 bit operating system to test on at this moment. We tried to reproduce your problem with a TE0320 and a 64 bit Microsoft Windows operating system, but everything worked fine. Anyway, we have tested long time on 32 bit Microsoft Windows operating systems as well before releasing our whole technology stack.
The code published on GitHub is for 32 bit systems and doesn't run well (or at all) on 64 bit systems. The library must be tweaked a bit (modify project properties and change the libraries from 32 to 64 bit) for 64 bit systems s explained in (section 7).
If you write your own software project, you must import the two .h files contained here
into your software project. If they already exist, you shall overwrite them.

(1) At the moment we are not able to reproduce your error because this is a kind of error that occurred to us during the development phase, such as for instance
(1a) corrupted firmware file;
(1b) system conflicts between the old (2nd) generation DEWESoft driver (particularly on Windows XP systems) and the new (3rd) generation Trenz Electronic driver.

(2) If you are using the 3rd generation technology stack, you should check that in "Device Manager" a device is registered as "Trenz Electronic USB FX2" under the "Trenz Electronic USB devices" class. Otherwise, the driver is not correctly installed.
Download the latest 3rd generation driver here:
Follow the procedure described in the pdf file. We are migrating documentation in our wiki pages:

(3) Are you sure that your firmware is not corrupt?
Could you repeat the firmware update
using Cypress USB Console (CyConsole)?
For the recovery procedure you should
a) Put EEPROM switch on your module to "OFF" state.
b) Connect module to PC, using USB cable.
c) Install Cypress generic driver if needed.
d) Put EEPROM switch on your module to "ON" state.
e) Run Cypress USB Console.
f) Go Options->EZ-USB Interface
g) Press "Lg EEPROM" button
h) Select TE-USB-FX2_v03.02_TE.iic from firmware folder ready_to_download
i) Wait till operation completed
f) Reconnect module from USB

(4) Did you test hardware-verified reference designs for 32 bit systems (if you actually use a 32 bit system)?

If you use a 64 bit system, hardware-verified reference designs for 64 bit systems are also available.

If the hardware-verified reference designs for 32 bit systems work on your 32 bit system experiencing the issues you described, then
(4a) either you shall double check your Visual Studio setting
(4b) or we shall check our code on GitHub for 32 bit
We invite you to open and test the whole 32 bit project above.

(5) Did you set your switches correctly?

Please reply giving full details of your working environment (operating system version, firmware version, driver version, ...)


Dear Hengist,

thanks for your fast answer and help, very much appreciated.

0..2)sorry for lack of informations : i'm using:
XP32 SP3 VM inside VirtualBox v4.2.16 host PC is Debian Jessie x64

TE_USB driver was from early 2013, gen 3
but anyway i re-download it an re-installed it again then reboot

in the device manager, it appear in a separate branch 'Trenz Electronic USB FX2'
and inside there is only one device 'Trenz Electronic USB FX2'

then re-test :
t1)cyconsole just sending 64x 0x00 bytes to 0x01 : bulk out complete
but no data transfered
then reading 64 bytes from EP 0x81 : bulk in complete
but no data received
t2)with reference application re-downloaded (mine was from early 2013 github)

1:Get number of cards ->
2: Connect cardNo 0 ->
Module is connected!
5:Get FX2 firmware version ->
Major version: 224
Minor version: 253
Device hi: 18
Device lo: 0

instead of
Major version: 3
Minor version: 2
Device hi: 1
Device lo: 1

3)ok this is the method i use to flash
i've redone it right now with the indicated download :

then test
t1)cyconsole → same result : fail
t2) TE_USB_FX2_CyAPI_SampleApplication-32-VSExpress+VSProfessional : fail

i've also tried with an older firmware from nov 2012
same result

4+note)yes it is 32bits
actual plan is not to compile anything but use the same binaries as yours to be aligned and have at least one setup running here

considering even an old firmware marked as 'verified' is not working i think it's possibly due to
either virtualbox, or my xp32 driver broken/filtered by something

i'm setting up a fresh windows 7 x64 physical machine and let you know

thanks & regards



so re-testing with fresh XPx32 and W7x64 install shown that, EP1 is running as expected
sorry for raising a false alarm and thanks again for your help.

as side note,
virtual box was faulty here,
by unchecking usb2.0 in the vm settings solved the issue
(seems that 64bytes buffer for EP1 in FX2LP being not compliant with USB2.0 that requires 512bytes is driving vbox a wrong path)

thanks & regards


Dear ORO6,
thank you for sharing your workaround to the Virtualbox bug.
I have submitted this post to the Virtualbox community (Ticket #12030).
- Horsa