USB superspeed peripherals Forum Discussions
I've got an image sensor connected to an FX3 device using the AN75779 application note. I've modified the firmware to transfer RAW data instead of UVC. I have an application to receive the data in RAW form. My trouble is the DMA callback is only happening 9 times, and it's very consistent. Never more or less. Should be about 23 times. I'm confident my Image sensor is working correctly and setup correctly. After the 9 callbacks it will never go back unless I restart the firmware again from the beginning. Currently, I'm only trying to capture one frame, for testing and have a breakpoint in the GPIF interrupt callback (triggered by !FV in state machine) then check how many callbacks occurred by having a variable increment in the callback. Is there something I need to do to reset DMA? Could it be that there is an error on the PC side and the FX3 is waiting for something from the PC the I'm missing?
As another note I'm using bulk transfer.
Thanks a ton for any help that can be provided!
Brandon
Show LessHello everybody
I'm trying to combine the two example projects "USBBulkLoopAuto" and "MouseDemo" but I don't get it running. It is the first time I try to do something with USB and probably struggle with some basic problems.
What I did so far:
- Copied the "USBBulkLoopAuto" Project and renamed it.
- Changed the USB descriptor file where I added the HID (not sure if I did this the right way, file is in the appendix)
- Changed the file names in the Makefile
- Added a single .c and .h file for each interface (cyfx_thread_bulkloop.c, cyfx_thread_bulkloop.h, cyfx_thread_hid.c and cyfx_thread_hid.h)
- made a thread for the bulk loop in "cyfx_thread_bulkloop.c" and a thread for the HID in "cyfx_thread_hid.c" and added the code from the examples.
- Created a main.c file where I put everything in it where I think is shared by both interfaces.
- Merged the functions (probably merged wrong)
- CyFxApplicationDefine calles both threads
- CyFxApplnInit is placed in the main file to set the enumeration descriptor for both interfaces
- CyFxApplnLPMRqtCB, CyFxApplnUSBEventCB, CyFxApplnUSBSetupCB are placed in the main.c but not sure what I have to do actually to combine the functions for both interfaces (To be honest, I don't really understand these functions).
I'm able to build the project without errors, but when I load it on the FX3, I get no device in the Cypress Control Center.
Could someone please help me to get this running or is there already an example with two combined interfaces? I searched but didn't find anything which gave me enough information.
Thank for every hint to get closer to a working solution.
Kind regards,
Dominic
Show LessHi,
I'm trying to test the USB3 technology with the Superspeed Explorer Kit (CYUSB3KIT-003), the FMC interconnect board(CYUSB3ACC-005) and the xilinx kintex developement kit KC705.
I was able to run the the default streaming example in stand alone (only the CYUSBkit) without issue.
I was also able to to run the AN65974/SF_loopback.img example in the FX3 and my code in the xilinx FPGA.
However, if i try any other file at the same location the test failed (BULK IN transfer failed with Error Code:997)
I would like to know why?
I also did try to recompile myself the FX3 FW.
I builded in release the slfifosync example found there "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\slavefifo_examples"
The Stream In work in Control center but the throughtput in Streamer.exe is very slow(32000KB/s) or have error depending on the packets and Xfer configuration.
When i do recompile the same code in 32 bit mode CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT(1) and program the FX3 in RAM after a reset with the KC705 at off, the device won't enumerate in control center. So there is no way I can test a streamer program in my FPGA with a 32 bits interface.
Anyone know how to fix those issues?
Thanks
JeanAlexis
Show Lesshello, I am new to usb_fx3,now I have an adc control by spi, so I wonder if usb_fx3 can finish the job?In other words,if I can use spi of fx3 to control the adc? If it can ,how to do ? which firmware I should read?
thanks!
Show Less
Hello,
In the slavefifo mode, as I know it supports 32bit mode, but How can I get "word data type" from XferData function not unsigned char?
When I found xferdata function in the Cypress CYAPI Programmer's reference document, I just came across the below example snippet code. but it just used as "unsigned char data type" not word data type.
In the 32bit slavefifo mode, How can I get data?
So I want to know how can I get the data as a word data type?
-------------------------------------------------------------------------------------------------
Example (from CYUSB3KIT documents)
CCyUSBDevice *USBDevice = new CCyUSBDevice(NULL);
unsigned char buf[] = "hello world";
LONG length = 11;
if (USBDevice->BulkOutEndPt)
USBDevice->BulkOutEndPt->XferData(buf, length);
-------------------------------------------------------------------------------------------------
What if I have to get 32bit data as sequentially, is 32bit mode more faster about data transfer rate than 8bit mode?
Show LessWhen I use control center to load code to I2C EEPROM at PATRON FX-3S DEV board the error message "programming the I2C EEPROM failed" always occur.
I checked I2C address at PATRON FX-3S DEV board and the address was different with setup at CYUSB3KIT-001.
Have any adjustments for I2C EEPROM address on control center? or Have any method to solve the error?
and
May I let S0 and S1 port both run on 8bit mode?
io_cfg.isDQ32Bit = CyFalse;
io_cfg.s0Mode = CY_U3P_SPORT_8BIT;
io_cfg.s1Mode = CY_U3P_SPORT_8BIT;
io_cfg.gpioSimpleEn[0] = 0;
io_cfg.gpioSimpleEn[1] = 0x02102800; /* IOs 43, 45, 52 and 57 are chosen as GPIO. */
io_cfg.gpioComplexEn[0] = 0;
io_cfg.gpioComplexEn[1] = 0;
io_cfg.useUart = CyFalse;
io_cfg.useI2C = CyFalse;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyFalse;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_UART_ONLY;
status = CyU3PDeviceConfigureIOMatrix (&io_cfg);
When I use this Configure , FX3S dev board was boot fail.
Did I set wrong configure? or forgot something?
Show Lesshello,everyone,
I changed the "FX3_AD9269_MT_USB3.cydsn" 32 bit data to 16 bit data ,and I changed the limited counter to 8183,and I compile the state machine ,it succeed,and generated a .h file,but when I viewed the timing ,it shows"Invalid state machine path for the simulation for state TH0_RD_LD", why?I attached the file .please help me!
thank you !
Show Lesshello,everyone,
I have write a GPIF state macnine.When I copy the gpifconfigure.h to the examples cyfx3ad9269 ,which is sent by dbir in the forum,but when I build it ,it shows "conflicting types for 'cyu3pdmabufferfree'",when I change the type to the unit8,and add the return 0,but there are more errors,what is the problem?I put the error.png and my project in the attaches,I hope you can help me try,thank you !
Show LessI'm using Cypress EZ-USB FX3 SDK v 1.3.3.
To increase transfer speed I choose an asynchronous model and BULK transfers.
So sometimes (after 3, 10 or 30 minutes, times vary) I received a Stall condition.
Received data lenght ("rLen" in code sample) in this case is 0. In all other cases it's more than zero.
After receiving Stall I try to Abort and Reset Pipe (without success).
Also I try to close transfer using FinishDataXfer.
And while do this I receive such exception "Invalid address specified to RtlValidateHeap( 0000000000A10000, 000000002C4B4A50 ) " at one of the queue element.
Can you help me with this situation?
Hi all,
I've got a design based on AN65974, a Streamer Example with the FX3 in slave mode. On the GPIF side I have an 8-bit synchronous interface with address/data bus multiplexed and FlagA & FlagB used to signal DMA Ready from Thread 0 & Thread 1; Thread 0 handles all IN (input to FX3 from GPIF interface) traffic, Thread 1 handles all OUT (output from FX3 to GPIF interface) traffic. The signals for Flag C and Flag D are not available. On the USB side I have four bulk transfer endpoints, two IN (0x01, 0x02) and two OUT (0x81, 0x82). On the ARM I've set up the DMAs to use automatic transfer with the following mappings:
- Producer: CY_U3P_UIB_SOCKET_PROD_1 Consumer: CY_U3P_PIB_SOCKET_1 Endpoint: 0x01
- Producer: CY_U3P_PIB_SOCKET_0 Consumer: CY_U3P_UIB_SOCKET_CONS_1 Endpoint: 0x81
- Producer: CY_U3P_UIB_SOCKET_PROD_2 Consumer: CY_U3P_PIB_SOCKET_5 Endpoint: 0x02
- Producer: CY_U3P_PIB_SOCKET_4 Consumer: CY_U3P_UIB_SOCKET_CONS_2 Endpoint: 0x82
DMA channel 2 produces a constant stream of traffic, the other DMA channels are very low, sporadic traffic. And you see I'm incrementing the GPIF channels by four since I only have flags available for Thread 0 & Thread 1.
Here's the head-scratcher: If I only create via CyU3PDmaChannelCreate() DMA channels 1 & 2 above, everything works fine - I see a constant stream of traffic on endpoint 0x81. If I create all four DMA channels, the data that was on 0x81 now is on 0x82 and no data is on 0x81. And just for fun, I changed the USB side to use 0x03/Producer 3/0x83/Consumer 3 rather than 0x02/0x82 and saw similar results - all data on 0x83 and no data on 0x81.
What would cause this? Have I messed up something in the address cycle of the GPIF interface? Is there some mapping rule that I've missed? I feel like I've been hitting my head against the wall for a couple days now, and any hint or direction at all would be appreciated.
Thanks,
Michael
Show Less