USB low-full-high speed peripherals Forum Discussions
Hi,
I am working on Cy7C68013-A usb HS controller. I need to issue a vendor command, where I am expecting an integer count value (int final_count). The value of "final_count" can comfortably go beyond 255. But since EP0BUF[0] supports only a maximum value of 255 (8 bits), I am finding trouble to get any value beyond 255.
Where can I assign my "final_count" variable, so that I can correctly read the integer value even if it crosses the 255 limit.
I have my vendor command function as follows:
switch (SETUPDAT[1])
{
case 0xAA:
EP0BUF[0] = final_count;
EP0BCH = 0;
EP0BCL = 1;
EP0CS |= bmHSNAK;
break;
}
In the above case, the EP0BUF[0] has a limit of 255, which will assign incorrect value from my "final_count". The "final_count" value can go near to 2000.
Please give me a solution, where I can read the value of "final_count" on issuing a vendor command ?
Thank You
Show Lesshi,
i am using FX2lP 56-pin package.
I have implemented loopback and streamin examples from the AN61345 . Spartan3E FPGA and fx2lp configuration is done according to the AN61345 .
slave.c is downloaded successfully in the eeprom and detected on Cypress USB Console.
i have downloaded vhdl files for loopback in the fpga.No changes are done in slave.c firmware and vhdl files except pins assignment.
----------------------------------
Problem:1 (for LOOPBACK example )
----------------------------------
1) when i bulkout hex "01" 512 bytes using Cypress USB Console app,result in bulkin is "02" 512 bytes. correct result.
2) when i bulkout hex "02" 512 bytes using Cypress USB Console app,result in bulkin is "03" 512 bytes. correct result.
....... and so on for bulkouts 03,04,05,06,08,09,0A,0B....and any input which exclude "07" or "0F" i got correct result but
3) when i bulkout hex "07" 512 bytes using Cypress USB Console app,result in bulkin is strange :
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
4) when i bulkout hex "17" 512 bytes using Cypress USB Console app,result in bulkin is " 10 20 "( replace " 00 10 " with "10 20" in above output representation) incorrect result
5) when i bulkout hex "27" 512 bytes using Cypress USB Console app,result in bulkin is " 20 30 "( replace " 00 10 " with "20 30" in above output representation)incorrect result
6) when i bulkout hex "37" 512 bytes using Cypress USB Console app,result in bulkin is " 30 40 "( replace " 00 10 " with "30 40" in above output representation)incorrect result
7) when i bulkout hex "47" 512 bytes using Cypress USB Console app,result in bulkin is " 40 50 "( replace " 00 10 " with "40 50" in above output representation)incorrect result
and so on in same manner up "97".
😎 when i bulkout hex "0F" 512 bytes using Cypress USB Console app,result in bulkin is " 08 18 "( replace " 00 10 " with "08 18" in above output representation) incorrect result
---------------------------------------
Problem 2 : (for STREAMIN example 😞
---------------------------------------
i have downloaded vhdl files of streamin example in fpga and result is not correct ON BULK IN :
08 09 0A 0B 0C 0D 0E 0F 08 09 0A 0B 0C 0D 0E 0F
18 19 1A 1B 1C 1D 1E 1F 18 19 1A 1B 1C 1D 1E 1F
28 29 2A 2B 2C 2D 2E 2F 28 29 2A 2B 2C 2D 2E 2F
38 39 3A 3B 3C 3D 3E 3F 38 39 3A 3B 3C 3D 3E 3F
48 49 4A 4B 4C 4D 4E 4F 48 49 4A 4B 4C 4D 4E 4F
58 59 5A 5B 5C 5D 5E 5F 58 59 5A 5B 5C 5D 5E 5F
68 69 6A 6B 6C 6D 6E 6F 68 69 6A 6B 6C 6D 6E 6F
78 79 7A 7B 7C 7D 7E 7F 78 79 7A 7B 7C 7D 7E 7f
88 89 8A 8B 8C 8D 8E 8F 88 89 8A 8B 8C 8D 8E 8F
98 99 9A 9B 9C 9D 9E 9F 98 99 9A 9B 9C 9D 9E 9F
A8 A9 AA AB AC AD AE AF A8 A9 AA AB AC AD AE AF
B8 B9 BA BB BC BD BE BF B8 B9 BA BB BC BD BE BF
C8 C9 CA CB CC CD CE CF C8 C9 CA CB CC CD CE CF
D8 D9 DA DB DC DD DE DF D8 D9 DA DB DC DD DE DF
E8 E9 EA EB EC ED EE EF E8 E9 EA EB EC ED EE EF
F8 F9 FA FB FC FD FE FF F8 F9 FA FB FC FD FE FF
08 09 0A 0B 0C 0D 0E 0F 08 09 0A 0B 0C 0D 0E 0F
18 19 1A 1B 1C 1D 1E 1F 18 19 1A 1B 1C 1D 1E 1F
28 29 2A 2B 2C 2D 2E 2F 28 29 2A 2B 2C 2D 2E 2F
38 39 3A 3B 3C 3D 3E 3F 38 39 3A 3B 3C 3D 3E 3F
48 49 4A 4B 4C 4D 4E 4F 48 49 4A 4B 4C 4D 4E 4F
58 59 5A 5B 5C 5D 5E 5F 58 59 5A 5B 5C 5D 5E 5F
68 69 6A 6B 6C 6D 6E 6F 68 69 6A 6B 6C 6D 6E 6F
78 79 7A 7B 7C 7D 7E 7F 78 79 7A 7B 7C 7D 7E 7f
88 89 8A 8B 8C 8D 8E 8F 88 89 8A 8B 8C 8D 8E 8F
98 99 9A 9B 9C 9D 9E 9F 98 99 9A 9B 9C 9D 9E 9F
A8 A9 AA AB AC AD AE AF A8 A9 AA AB AC AD AE AF
B8 B9 BA BB BC BD BE BF B8 B9 BA BB BC BD BE BF
C8 C9 CA CB CC CD CE CF C8 C9 CA CB CC CD CE CF
D8 D9 DA DB DC DD DE DF D8 D9 DA DB DC DD DE DF
E8 E9 EA EB EC ED EE EF E8 E9 EA EB EC ED EE EF
F8 F9 FA FB FC FD FE FF F8 F9 FA FB FC FD FE FF
No changes are done in the vhdl and fx2lp firmware.Same files work correctly on the development kit hardware but when i implement these files on my own
hardware, the strange result is above for both examples...!
--------------
QUESTIONS:
--------------
1) the problem which comes in loopback when input containig hex 7 or F. According to my observations of the above outputs, FD.3 data line gives zero instead of '1' at the bulkin when bulkout has
combination containig 7 or F ? Also note the streamin output which is giving 1 at FD.3 line ?
2)what can be the possible problem? FD[7:0] are correctly connected to fpga.
3) is this a hardware issue or software ?
plz help.
thanks
I have three identical FX2LP boards, one of which works fine, the other two fail to enumerate. Has anyone got any hints for things I can try (hardware and/or software) to discover what's up?
The working board enumerates like this: http://pastebin.com/raw.php?i=RApTG5E8
The non-working boards are detected as high-speed devices: http://pastebin.com/ND0HQuW9
...but fail to respond to the host's descriptor requests: http://pastebin.com/raw.php?i=gy2EY0nh
The hardware is pretty minimal:
1) 56-pin SSOP CY68013A (1st bad board) and CY68014A (2nd bad board)
2) D+, D- & GND connected to USB
3) Reset circuit: 22nF capacitor charged through 100K resistor
4) Clock circuit: 24MHz crystal and a pair of 22pF capacitros
5) Two 22nF decoupling capacitors
6) External 3.3V PSU
7) Everything else unconnected (for now)
Show Less
hi,
i am using FX2lP 56-pin package.
I have implemented loopback and streamin examples from the AN61345 . Spartan3E FPGA and fx2lp configuration is done according to the AN61345 .
slave.c is downloaded successfully in the eeprom and detected on Cypress USB Console.
i have downloaded vhdl files for loopback in the fpga.No changes are done in slave.c firmware and vhdl files except pins assignment.
----------------------------------
Problem:1 (for LOOPBACK example )
----------------------------------
1) when i bulkout hex "01" 512 bytes using Cypress USB Console app,result in bulkin is "02" 512 bytes. correct result.
2) when i bulkout hex "02" 512 bytes using Cypress USB Console app,result in bulkin is "03" 512 bytes. correct result.
....... and so on for bulkouts 03,04,05,06,08,09,0A,0B....and any input which exclude "07" or "0F" i got correct result but
3) when i bulkout hex "07" 512 bytes using Cypress USB Console app,result in bulkin is strange :
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
00 10 00 10 00 10 00 10 00 10 00 10 00 10 00 10
4) when i bulkout hex "17" 512 bytes using Cypress USB Console app,result in bulkin is " 10 20 "( replace " 00 10 " with "10 20" in above output representation) incorrect result
5) when i bulkout hex "27" 512 bytes using Cypress USB Console app,result in bulkin is " 20 30 "( replace " 00 10 " with "20 30" in above output representation)incorrect result
6) when i bulkout hex "37" 512 bytes using Cypress USB Console app,result in bulkin is " 30 40 "( replace " 00 10 " with "30 40" in above output representation)incorrect result
7) when i bulkout hex "47" 512 bytes using Cypress USB Console app,result in bulkin is " 40 50 "( replace " 00 10 " with "40 50" in above output representation)incorrect result
and so on in same manner up "97".
😎 when i bulkout hex "0F" 512 bytes using Cypress USB Console app,result in bulkin is " 08 18 "( replace " 00 10 " with "08 18" in above output representation) incorrect result
---------------------------------------
Problem 2 : (for STREAMIN example 😞
---------------------------------------
i have downloaded vhdl files of streamin example in fpga and result is not correct ON BULK IN :
08 09 0A 0B 0C 0D 0E 0F 08 09 0A 0B 0C 0D 0E 0F
18 19 1A 1B 1C 1D 1E 1F 18 19 1A 1B 1C 1D 1E 1F
28 29 2A 2B 2C 2D 2E 2F 28 29 2A 2B 2C 2D 2E 2F
38 39 3A 3B 3C 3D 3E 3F 38 39 3A 3B 3C 3D 3E 3F
48 49 4A 4B 4C 4D 4E 4F 48 49 4A 4B 4C 4D 4E 4F
58 59 5A 5B 5C 5D 5E 5F 58 59 5A 5B 5C 5D 5E 5F
68 69 6A 6B 6C 6D 6E 6F 68 69 6A 6B 6C 6D 6E 6F
78 79 7A 7B 7C 7D 7E 7F 78 79 7A 7B 7C 7D 7E 7f
88 89 8A 8B 8C 8D 8E 8F 88 89 8A 8B 8C 8D 8E 8F
98 99 9A 9B 9C 9D 9E 9F 98 99 9A 9B 9C 9D 9E 9F
A8 A9 AA AB AC AD AE AF A8 A9 AA AB AC AD AE AF
B8 B9 BA BB BC BD BE BF B8 B9 BA BB BC BD BE BF
C8 C9 CA CB CC CD CE CF C8 C9 CA CB CC CD CE CF
D8 D9 DA DB DC DD DE DF D8 D9 DA DB DC DD DE DF
E8 E9 EA EB EC ED EE EF E8 E9 EA EB EC ED EE EF
F8 F9 FA FB FC FD FE FF F8 F9 FA FB FC FD FE FF
08 09 0A 0B 0C 0D 0E 0F 08 09 0A 0B 0C 0D 0E 0F
18 19 1A 1B 1C 1D 1E 1F 18 19 1A 1B 1C 1D 1E 1F
28 29 2A 2B 2C 2D 2E 2F 28 29 2A 2B 2C 2D 2E 2F
38 39 3A 3B 3C 3D 3E 3F 38 39 3A 3B 3C 3D 3E 3F
48 49 4A 4B 4C 4D 4E 4F 48 49 4A 4B 4C 4D 4E 4F
58 59 5A 5B 5C 5D 5E 5F 58 59 5A 5B 5C 5D 5E 5F
68 69 6A 6B 6C 6D 6E 6F 68 69 6A 6B 6C 6D 6E 6F
78 79 7A 7B 7C 7D 7E 7F 78 79 7A 7B 7C 7D 7E 7f
88 89 8A 8B 8C 8D 8E 8F 88 89 8A 8B 8C 8D 8E 8F
98 99 9A 9B 9C 9D 9E 9F 98 99 9A 9B 9C 9D 9E 9F
A8 A9 AA AB AC AD AE AF A8 A9 AA AB AC AD AE AF
B8 B9 BA BB BC BD BE BF B8 B9 BA BB BC BD BE BF
C8 C9 CA CB CC CD CE CF C8 C9 CA CB CC CD CE CF
D8 D9 DA DB DC DD DE DF D8 D9 DA DB DC DD DE DF
E8 E9 EA EB EC ED EE EF E8 E9 EA EB EC ED EE EF
F8 F9 FA FB FC FD FE FF F8 F9 FA FB FC FD FE FF
No changes are done in the vhdl and fx2lp firmware.Same files work correctly on the development kit hardware but when i implement these files on my own
hardware, the strange result is above for both examples...!
--------------
QUESTIONS:
--------------
1) the problem which comes in loopback when input containig hex 7 or F. According to my observations of the above outputs, FD.3 data line gives zero instead of '1' at the bulkin when bulkout has
combination containig 7 or F ? Also note the streamin output which is giving 1 at FD.3 line ?
2)what can be the possible problem? FD[7:0] are correctly connected to fpga.
3) is this a hardware issue or software ?
plz help.
thanks
Hi all, I'm new to USB development and really hope I can find some help here.
I'm working on developing a board which has already been fabricated and populated with the CY7C68013A-128AXC.
I need to read out data from from FPGA RAM to a host application. (I've been using VC ++ 2010 to try to do this)
Ports PB and PD are my 16 bit data lines from the FPGA to fx2. Ideally I want flaga and flagb to go high to inisiate read and write oporations in the FPGA, but most important for me is passing the data from port PB and PD, and initiating a 48Mhz clk from IFCLK. I've tried AN61345 however the FIFOADR pins are not connected to anything on my board, so I assume the example will not work.
Is is possible to write my software to configure the cy76c8 registers to properly handle the data transition and IFCLK when run?
Thus far, using CYAPI.lib I have not been able to recieve data from the FPGA. Any help is appreciated.
Thanks
Sam
Show LessHi,
I am working on Cypress Cy7C68013A high speed controller. How can I configure the configure the size of the endpoint buffer to be 64bytes (as in full speed), for the bulk transfer. My host also supports USB 2.0 high speed, but due to the typical nature of the project, I need to limit the endpoint size to 64bytes. How can I do this ?
Thank You
Show LessOur project uses a NX2LP-Flex device and a Nand Flash device. On our prototype board, the Nand Flash device is the 4K bytes/Page device. When we are ready to go to production, the 4K bytes/page Nand Flash devices become obsolete. The Nand Flash device vendor forcing us (leave us no choice) to use the 8K bytes/Page MLC NAND Flash devices. The NX2LP-Flex firmware we got from Cypress can support up to 4K bytes/page only. Any help will be appreciated to enhance the NX2LP-Flex Firmware and the programming tool to support the new, 8K bytes/Page, Nand Flash devices.
Show LessI have purchased three FX2LP development boards for hobby use from e-bay. These are sold as:
EZ-USB FX2LP CY7C68013A USB Development Core Board Logic Analyzer EEPROM
Any documentation I find says these chips have 16kB RAM, but I can only access bottom 8kB, the range 0x0000 to 0x1fff. Any writes to RAM region 0x2000 to 0x3fff are ignored. Reads seem to return back the same 16bit value for any address. This happens with both 0xA0 vendorcode over USB and executing 8051 program code.
If my build toolchain places descriptors at over 0x2000, the device will disconnect and renumerate, but fails to setup USB with new descriptors. Same code with descriptors moved below 0x2000 works as expected.
Markings on the boards and chips I have:LCSOFT CY7C68013A MINI BOARD
CY7C68013A-56PVXC
B 04 PHI 1125
CYP 631702
Can you tell if these markings are valid for Cypress manufactured chips and if there is any related errata with the revision?
Is there some (un)documented bootstrap that could explain this behaviour?
Hi All,
If you are using the FX2LP in Linux platform please refer to the following link for downloading the GUI and driver to download the code into FX2LP. Download the FX3 SDK for Linux, it provides the tools for FX2LP too.
http://www.cypress.com/?rID=57990
Regards,
sai krishna.
Show Less