USB superspeed peripherals Forum Discussions
According to BeginDataXfer, WaitForXfer, and FinishDataXfer approach ,
BeginDataXfer queues up the request i.e. gives the buffer and its location to the USB stack
Waitforxfer waits for the transfer to complete, it'll wait for the timeout value specified if the transfer doesn't complete by then it'll timeout the reqeust
Finishdataxfer retrieves the data that was received. If only part of the data was received and a timeout happened it'll release the rest of the buffer
If I just only implement "Slave read" (BULK IN) in FX3 to read data from FPGA, can I just invoke Waitforxfer() & Finshdataxfer() and delete BeginDataXfer() in streamer app?
Show LessI am using the CYUSB3064-BZXI with an OV5640.
I need to interface with a software program that is freezing due to the data rate over USB. I am using the USB 2.0 settings in the E-con RDK and it is sending over 4 times the data at the same resolution and frame rate as the camera I am replacing. The image quality is much better on my camera, but my customer has multiple software packages and some cannot handle the additional data so I need software for those installations to provide the lower data stream across USB.
Old camera: 33,666 kb/s
New camera: 146,286 kb/s
I believe I may be able to lower the bit rate setting for 640x480 @ 30 fps to reduce quality without lowering framerate, but I can find a key to do that or confirmation I can change that setting.
If a formula can be provided that would be great, but I would like to first cut it in half to see if that works and then reduce by 4 times if it does not. It is not clear how to translate to the hex values in the code and I found no way to set the bit rate separately in the tools provided (I can change frame rates and resolution to generate new code).
With all of that said, I did find the code seems to have an error. The High Speed version was copied from the Super Speed version for 640x480 and the bit rate is set for 60 fps. I have to get my demo board back to test and see if this makes a difference if I change that setting.
0x00, 0x00, 0x94, 0x11,
0x00,0x00,0xca,0x08, /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 147456000 */
0x00,0x00,0xca,0x08, /* Max bit rate (bits/s): Fixed rate so same as Min */
Show LessHi,
After we updated SDK version from 1.3.3 to 1.3.4, our SPI flash read code sometimes works incorrectly.
With FX3SDKVERSION="1_3_4" , I suspect that CyU3PSpiTransmitWords() has a bug: it may abort in the middle of transmission and return success.
The implementation is changed at 1.3.4 and it can be summarized as:
- Parameter check and setup.
- LOOP_A: For each words to be transmitted:
- Wait for FIFO empty status (TX_SPACE) with polling.
- Write a word to the register.
- Wait for transmit done interrupt bit (TX_DONE) with polling.
- Disable the TX.
Consider the following scenario:
- Preempted in the middle of the transmittion loop. (LOOP_A)
- Normally write from CPU is fast and consuming by SPI H/W block is slow, but in this case CPU write is stopped and only SPI block is active.
- It is possible that SPI block completes the transmission of all data in the FIFO and raises TX_DONE interrupt.
- CPU returns, write the rest data, and exits the loop.
- Wait for TX_DONE interrupt, but it is already asserted at (3.) timing for the first half of data. Exits immediately, mistakenly.
- Disable the TX. Transmission aborts and returns success.
Although I cannot fully confirmed yet, it seems that disabling interrupts is effective during the loop with CyU3PVicDisableAllInterrupts() - CyU3PVicEnableInterrupts() .
Could anyone review it?
Show LessHi!
I'm working on a project with the fx3. i use the gpif to program and get data from an fpga. i want to use a usbuart interface to communicate with the fpga and other peripherals. The device descriptor has following layout: 1 interface with 2 endpoints for gpif and 2 interfaces with 3 entpoints for uart (see image: https://pasteboard.co/HRqJ7OX.png)
My Problem is: I can progamm the fpga over gpif but wenn i access the gpif endpoint to read data my ttyACMx commection vanishes without any log message in dmesg. I am restricted for in this project to linux.
Anyone an idea why this happens and what i could do against it?
sincerely,
Josef Sommerauer
Show LessI'm using CYUSB3014 in a project. I need to download data from FPGA via 3014 to PC. We have used Streamer as reference for uploading data to 3014. But did not find reference VS project/code for downloading data from 3014. Is there any Visual Studio project for reference ?
Show LessI have opened the cycx3_uvc_ov5640 firmware example to start up. The sensor give YUY2 image format.
So I would like to change the cx3 configuration in this firmware example to get a RAW10 format from the OV5640 Sensor. The problem is that i don't know how to do it because i can't change the initial CX3 configuration parameters. should I introduce another cx3 configuration and to put in the sensor selection space "Create a Configuration with Basic Settings"? or It is possible to change the data format in a pre defined configuration?
Show LessHi sir,
i encounter an issue of accessing a image sensor via i2c.. might need a recommendation for properly debugging..
The register of the sensor has 2 bytes address , and 2 byte value, the slave address is 0x20..
basically, the sensor indeed returns ACK, right after sending slave address (0x20), there is no i2c slave address conflict.
i wanna read 2 bytes data from 2 bytes register, which has 0x3000 address..
when i send a i2c read commands, the sensor seems never returnning ACK after 0x21 (read command), attaching the i2c waveform below.
the i2c waveform above after decode as below.
20 30 00 21#
S: Start signal
# -> NAK
the sensor never returns the data, but NACK..
error code returned is
ImageSensorSensorRead Failed addr=0x3000, status = 0x4A
the actual code being sent as below ..
for(cnt=0; cnt<3 ; cnt++) //
{
preamble.buffer[1] = CY_U3P_GET_MSB (regAddr);
preamble.buffer[2] = CY_U3P_GET_LSB (regAddr);
preamble.buffer[3] = SENSOR_I2C_READ_ADDRESS; /* Slave address: Read operation */
preamble.buffer[0] = SENSOR_I2C_WRITE_ADDRESS; /* Slave address: write operation */
preamble.length = 4;
preamble.ctrlMask = 0x0004;
status = CyU3PI2cReceiveBytes (&preamble, buf, count,0);
SensorI2CAccessDelay(status);
CyU3PThreadSleep(1);
if (status == CY_U3P_SUCCESS)
{
break;
}
#ifdef SENSOR_DEBUG
else
CyU3PDebugPrint(4,"\r\nImageSensorSensorRead Failed addr=0x%x, status = 0x%x",regAddr, status);
#endif
}
return status;
thank you
Show LessHai all,
I am working on cypress fx3. I need to interface cypress with external peripherals through GPIF. I need to send data from PC to external device through GPIF 16 bit interface. The GPIF designer as fallow.
Clock = internal.
data width=16.
DMA Flag(GPIO_18)= Thread_0 DMA Ready ( this is the data valid pin to External device)
When Flag_0 asserted external device start to read the data from GPIF port.
GPIO_20(READ)= Used to check external FIFO is free.
Note: The assertion of Flag_0(GPIO_18) is one clock is early and de assertion is one clock late. In this condition external FIFO take 2 sample Extra data (junks data) in every DMA transfer.
1.Why the DAM Flag takes extra 2 clock cycle in every DMA Transfer ?.
2.How to solve this problem?.
3.Is any idea for assertion of valid signal when data is in DMA buffer without considering DMA flag?.
Thank you.
With Best Regards,
Thrimurthi M
Show LessFor the 16-bit data transfer, i have used Slave FIFO example as cypress has given. It works proporly. But simulternously i also want to control some function in FPGA from user application via FX3 using control Endpoint. But it did'nt work.
How can i introduce control endpint in Slave FIFO code? O
r is there any other method to send control to FPGA via Slave FIFO?
Show LessHi,
I understand that the FX3/S chips have a Bootloader ROM that runs when the chip first boots up. Would just like to check if it's possible for us to store the firmware in here, instead of an external EEPROM?
Thanks!
Show Less