USB superspeed peripherals Forum Discussions
I have made a custom board with fx3 which communicates data through FPGA to PC. but, it is showing "Unknown device" when connected to PC.
Where as when EVM kit is connected, it is working just fine.
Following configuration is used in the board:
1. Synchronous Slave FIFO Interface with 32-bit Data Bus.
2. 38.4-MHz input CLK
3. Interface frequencies up to 96.8Mhz
4. PMode [Z11]
As of now, while comparing the schematic, I have found that pin D1 [DQ31] is interchanged with E4 [I2S_clk], though I am not using I2S mode and all other pins i.e D2,D3 and C4 are not connected.
I need to know, what could be the possible reasons for the device not getting detected and what are the repercurssions of the two interchanged pins.
Show Less{Updated based on comments]
Hi, I have managed to get the 720p AN75779 example working with my FPGA video source and the 16 bit GPIF. I now want to expand to 1080p at 30 fps, but I'm having trouble. I've made the following changes to uvc/glProbeCtrl, cyfyuvcdscr/CyFxUSBSSConfigDscr and to the GPIF state machine. I'm using these posts uvc fx3 an75779 GPIF switch 8 to 16 bit Change Resolution in FX3 UVC Camera - KBA220269 Configuring Buffer Sizes in AN75779 UVC Firmware – KBA90744 as a reference
---------------------------------------------------------------------------------------------------------
uvc.c
glProbeCtrl
0x00, 0x48, 0x3F, 0x00 /* Max video frame size in bytes*/ /* 1920 * 1080 * 2 bytes per Pixel*/
0x00, 0xC0, 0x00, 0x00 /*No of bytes device can rx in single payload*/ //changed to 48KB
in uvc.h
Changed CY_FX_UVC_STREAM_BUF_COUNT (2) //changed from 4
with changes dmaMultiConfig.count to 2 in uvc.c
cyfxuvcdscr.c
CyFxUSBSSConfigDscr[]
/*VS Frame descriptor */
0x80, 0x07 /*Width in pixel*/ /*0x780 = 1920*/
0x38, 0x04 /*Height in pixel*/ /*0x438 = 1080*/
0x00, 0x48, 0x3F, 0x00 /*Maximum video or still frame size in bytes*/ /*0x3F4800*/
GPIF Designer
Changed from a 8bit bus to a 16 bit.
Change LD_DATA_COUNT to 24567
Change LD_ADDR_COUNT to 24567
---------------------------------------------------------------------------------------------------------
Right now when I run the code, there's stream from my webcam software, but the YUV values are all mixed up (Getting blue and red randomly when I only want Red). On the Serial Debugger I get frequent "Commit Buffer Failure" messages.
Is there anything that I might have missed? Do I need to change the bit rate or do I need to change the Config for Full speed and High Speed as well as Superspeed? I increased the "payload" in glProbeCtrl in 48KB (0xC000) is there anywhere eleseI need to change that? Maybe in uvc.h?
Show LessGood morning!
After
- updating SDK to 1.3.4
- random Windows 10 update
- some modifications to the code
I have somehow broken a previously functional USB Bulk In interface. The device still enumerates properly as a composite device with MIDI IN and OUT, but any attempt to send bulk data from FX3 to Host through endpoint 0x82 results in error 0x45 (CY_U3P_ERROR_TIMEOUT).
I have found that a previous build is functional, which rules out a Windows / Driver issue. Does anyone know of any issues which may affect SDK 1.3.4? I am having trouble finding a 1.3.3 download link, so that I might run parallel installations.
Furthermore, any tips on debugging USB interfaces in general are greatly appreciated.
For completeness, here is the MANUAL OUT DMA channel initialization code, identical to the working version, which runs without error:
// function call to initialize outbound channel
CyU3PReturnStatus_t initDebugChannel(void){
CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;
CyU3PEpConfig_t epCfg;
CyU3PMemSet((uint8_t *) &epCfg, 0, sizeof(epCfg));
/* MIDI consumer endpoint config */
epCfg.epType = CY_U3P_USB_EP_BULK;
epCfg.enable = CyTrue;
epCfg.isoPkts = 1;
epCfg.burstLen = 1;
epCfg.streams = 0;
epCfg.pcktSize = 64;
apiRetStatus = CyU3PSetEpConfig(0x82, &epCfg);
apiRetStatus |= CyU3PUsbFlushEp(0x82);
CyU3PDmaChannelConfig_t dmaCfg;
/* Create a DMA manual channel for sending parameters */
/* Active on initialization */
dmaCfg.size = 64; // minimum buffer size is 16
dmaCfg.count = 8; // 8 buffers cause why not
dmaCfg.prodSckId = CY_U3P_CPU_SOCKET_PROD;
dmaCfg.consSckId = CY_U3P_UIB_SOCKET_CONS_2;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = 0;
dmaCfg.cb = NULL;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
//create manual out channel to usb
apiRetStatus |= CyU3PDmaChannelCreate (&DebugChannel, CY_U3P_DMA_TYPE_MANUAL_OUT, &dmaCfg);
apiRetStatus |= CyU3PDmaChannelSetXfer(&DebugChannel, 0);
return apiRetStatus;
}
Show LessHI, there
I'm working on the USB3 vision project. According to the command from PC, I had to send a 64KB package or 256KB or 1MB package to the PC, depend on different software.
As we know that the DMA buffer size in FX3 could be 65535 as maximum, and the ram only about 256KB available for data.
How I could implement the function meet above requests?
Best regards.
Show LessHello,
I am developing a usb 3 vision application in a CX3 MCU (using the Denebola board and snesor OV5640). I have encountered some trouble trying to launch download the Genicam XML.
I managed to write a firmware for the CX3 with the help of the FX3 note on the U3V and UVC examples. So far the device starts correctly creating 3 dma channels (DCICommand, DCIRespond and DSIMultichannel). The first 2 as are needed to process any u3v command are enable just before the SET_CONF usb event has been trigger. The third one is only configured and is not started (as it will start once the acquisition start is enabled).
There are 2 threads: one for U3V Commands and respond, and another for streaming.
So, I start the host application which detects the device as a USB 3 VISION. Everything ok.
Then, when I start the application, the host app log tells me that the XML is detected @*MEM_ADDRESS*, but then I got an error saying that a memory reading error. So, using a USB sniffer tool to find the usb packects raw data, I managed to find out that there is NO error during memory reading, but that at some point there is an "Abort Pipe" of the In Bulk Endpoint (DCICommand Channel).
I have debugged the code but I cannot find the code segment where the abort operation is happening. Does anyone have found him/herself with this?
To add some weirdness, the XML download works IF I start everything before the XML request. DSIMultiChannel, MIPI-CSI, and sensor (sleep mode).
But anyway, I cannot find any reference why is happening when the streaming is NOT used during the setup.
Hope I explained good enough.
Thanks.
Show LessHi All,
Can anybody please let me know how to use SPI and UART same time in firmware ?
As FX3 datasheet shows on its 'Pin Description' table that if we choose "16 - bit Data Bus + UART+SPI+I2S", then both SPI pins (GPIO[53 : 56]) and UART pins (GPIO[46 : 49] will be separate and we can use both peripherals in our firmware. Please refer attached datasheet snap shot.
But which mode we have to set as per its API framework for IO matrix configuration as shown below here:
typedef enum CyU3PIoMatrixLppMode_t
{
CY_U3P_IO_MATRIX_LPP_DEFAULT = 0, /**< Default LPP mode where all peripherals are enabled. */
CY_U3P_IO_MATRIX_LPP_UART_ONLY, /**< LPP layout with GPIF 16-bit and UART only. */
CY_U3P_IO_MATRIX_LPP_SPI_ONLY, /**< LPP layout with GPIF 16-bit and SPI only. */
CY_U3P_IO_MATRIX_LPP_I2S_ONLY, /**< LPP layout with GPIF 16-bit and I2S only. */
CY_U3P_IO_MATRIX_LPP_NONE /**< FX3S specific configuration where UART, SPI and I2S are disabled. */
} CyU3PIoMatrixLppMode_t;
I have tried LPP_DEFAULT, it doesn't work, because it is with 32bit GPIF. Then others are UART only, SPI only. But what if I need to use SPI and UART both ??
Any help will be highly appreciable.
Thanks,
Premji
Show LessI am experimenting with the FX3 and using the GPIF-II Designer.
I basically have the following states. D1 is an INPUT:
- Start
- Idle
- Transition to State3 on (!D1)
- State3 - LD_DATA_COUNT, LD_CTRL_COUNT.
- Transitions to State4 on (D1).
- State4 - COUNT_DATA, COUNT_CTRL.
- Transition to State5 on (D1 & DATA_CNT_HIT).
- Transition to State6 on (D1 & CTRL_CNT_HIT).
- Transition to State7 on (!D1)
[I have attached a screen shot of an example project that exhibits this error. This design is just to demonstrate my problem.]
I do not understand why the GPIF-II Designer project will not build. All the state transitions are mutually exclusive yet it gives the error "Unable to synthesis the state machine...".
Show LessHi,
I would like to use the EZ-USB CX3 to receive images from an Omnivision image sensor and send them to the host PC via USB.
I need to connect 5such devices to a single USB 2.0 hub, and it looks like I'm going to run out of bandwidth.
Can the EZ-USB CX3 do any kind of compression, either video compression, or JPEG compression? It it likely to have enough processing power to do this?
Many thanks
Hugo
Show Less