USB superspeed peripherals Forum Discussions
Hi Cypress
We need CYUSB3035-BZXI SPI overshoot and undershoot spec for signal quality test , Can you help to get the spec for verifying , Thank !!
Show LessHi,
We are currently developing the firmware for a camera application based on CX3 IC. I realiced that CX3 is able to communicate with laptop, in order to manipulete the camera sensor, through two differet ways : by own driver or by standar UVC driver (V1.1 concretely).
We have decided to chose the standar UVC driver option to implement the communication betwen the laptop and the camera sensor. So, actually we can set and get whatever Camera Terminal controls (Exposure Time, Focus, etc) or whatever Processing Unit controls (Brightness,Contrast, etc). To do that, we follow the following approach:
- In laptop side, We have an application wich works with openCV library. Because it give us the possibility to interact with a camera based on UVC driver.
- In CX3 firmware side, we have the knoledge to modify the following files:
- cycx3_uvcdscr.c = in this file we can enable or disable both Camera terminal controls and Processing Unit controls, contemplated on UVC V1.1.
- cycx3_uvc.c = in this file we must customize the CyCx3UvcAppUSBSetupCB function (Callback to handle the USB Setup Requests and UVC Class events). for set all necessary fields of each enabled property in cycx3_uvcdscr.c. Among the fields we can find the following: CX3_USB_UVC_GET_LEN_REQ,CX3_USB_UVC_GET_INFO_REQ,CX3_USB_UVC_GET_MIN_REQ,CX3_USB_UVC_GET_MAX_REQ,CX3_USB_UVC_GET_RES_REQ,CX3_USB_UVC_GET_DEF_REQ,CX3_USB_UVC_GET_CUR_REQ and CX3_USB_UVC_SET_CUR_REQ. All this fields serve to set the amount of bytes, the maximum and minimum values and to write and read the value of the property.
Continuing with this, We would like to ask you the next question:
- It is possible to custom the data type of each property? I mean, for example, by default the exposure time is a double type. And We can not understand if it is set in cycx3_uvcdscr.c or it only depens of the UVC driver and it means that this field is not modifiable. Because we want to send directly the value in milliseconds, as a double, and convert it on a hexadecimal value inside the CX3 and send it to camera sensor. If we go to USB Video Class V1.1 document, we can see that the Exposure Time (Absolute) Control has 4 bytes of wLength, so how could we write the value directly in milliseconds?.
Show Less
I need to achieve low standby power consumption in a system with an FX3 and a Xilinx FPGA. This system primarily remains in a low power idle state for 99% of the time where neither the FX3 or FPGA is being used.
Referring to the block diagram below, the PSoC is powered continuously through the LDO. The PSoC controls switching regulators that power a USB host, the FX3 and the Xilinx. The PSoC also performs aggressive power management to maximize battery life.
The PSoC turns on power to the FX3 and the Xilinx FPGA. All of the FX3's core VDD(x) and IO VIO(x) supplies are powered. The FPGA's IO banks connected to the FX3 are powered as well to avoid the FX3 driving an unpowered FPGA or vice versa.
Later, the PSoC will apply power to the USB Host system which in turn powers VBUS on the USB connector. VBUS is used to hold the FX3 in RESET (using an RC network) until VBUS is stable.
Questions:
1. Will this method of powering the FX3 work?
2. I'm confused about the use of VBATT versus VBUS FX3 signals. The Super Speed Explorer connects VBUS on the USB connector to the FX3's VBUS signal. The FX3's VBAT signal is not connected on the SSE. The FX3 DVK connects a select-able power supply(+5V,+3.3,+2.5) voltage or a battery through a diode OR to the FX3's VBAT signal. VBUS from the USB connector is connected to the FX3's VBUS signal. Other FX3 based boards connect the VBUS line from the USB connector to both VBAT and VBUS on the FX3. I'm not sure what is the correct usage for my application. Please explain.
3. I have other H/S USB devices that would share one USB Gen 3 connector. It is possible to insert a CY7C65642 USB hub on the D+ and D- signals?
Thanks for your help!
Wayne
3.
Show Less
Hi all
Our FPGA may send variable length data(4B~16kB, integral multiple of 4Bytes) to FX3 in which firmware runs as slave FIFO mode, host app invoke XferData() to initiate a BULKIN transfer for reading data stored in FX3.
At each BULKIN event initiated by host, a certain len parameter must be passed into XferData() refer to Cypress CyAPI Programmer's Reference, for example 16384, if actual length of packet which sent by FX3 is shorter than 16384(ie partial packet), will XferData() receive the short length packet and return ture or return false for time-out? if this function can receive short packet, where can i get the actual length after the XferData() executed ?
Show LessHi,
I worked through the UVC example and got video streaming working. I then worked through the GpifToUsb example and got data read out working. Now I am trying to merge them and continuously read out data from an ADC without dropping data. To do this, I began with the GpifToUsb example and added a simple GPIF project with two threads (0,1):
Next, I added a MANY_TO_ONE auto DMA channel to GpifToUsb:
//try creating a many to one dma channel
CyU3PDmaMultiChannelConfig_t dmaMultiConfig;
CyU3PMemSet ((uint8_t *)&dmaCfg, 0, sizeof (dmaMultiConfig));
dmaMultiConfig.size = CY_FX_DMA_BUF_SIZE;
dmaMultiConfig.count = CY_FX_DMA_BUF_COUNT;
dmaMultiConfig.validSckCount = 2;
dmaMultiConfig.prodSckId [0] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;
dmaMultiConfig.prodSckId [1] = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;
dmaMultiConfig.consSckId [0] = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0);
dmaMultiConfig.prodAvailCount = 0;
dmaMultiConfig.prodHeader = 0; /* 12 byte UVC header to be added. */
dmaMultiConfig.prodFooter = 0; /* 4 byte footer to compensate for the 12 byte header. */
dmaMultiConfig.consHeader = 0;
dmaMultiConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaMultiConfig.cb = NULL;
dmaMultiConfig.notification = 0;
//dmaMultiConfig.notification = CY_U3P_DMA_CB_CONS_SUSP; // CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;
//dmaMultiConfig.cb = GpifToUsbDmaCallbackMulti;
apiRetStatus = CyU3PDmaMultiChannelCreate (&glDmaChHandleMulti, CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE,
&dmaMultiConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "DMA Channel Creation Failed, Error Code = %d\n", apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
The result is:
USB event: 11 0
About to connect to USB host
USB event: 0 1
CY_U3P_USB_EVENT_CONNECT detected
CyFxApplnInit complete
USB event: 8 0
USB event: 5 1
setting up dma
DMA Channel Creation Failed, Error Code = 64
Any idea what I'm doing wrong?
Show LessIs it necessary to add ALE with GPIF2 when FX3 is Slave?
Is it possible to always enable the operation?
Thanks,
Tetsuo
dmaConfig.cb = CyFxUartLpDmaCallback
the CyFxUartLpDmaCallback can not be called for uart rx dma of mode when the rx receive data.The code is as follows:
CyU3PReturnStatus_t
CyCx3AppDebugInit (void)
{
CyU3PUartConfig_t uartConfig;
CyU3PDmaChannelConfig_t dmaConfig;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
/* Initialize the UART module */
status = CyU3PUartInit ();
if (status != CY_U3P_SUCCESS)
{
/* Error handling */
CyCx3AppErrorHandler(status);
}
/* Configure the UART
Baudrate = 115200, One stop bit, No parity, Hardware flow control enabled.
*/
CyU3PMemSet ((uint8_t *)&uartConfig, 0, sizeof(uartConfig));
uartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200;
uartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT;
uartConfig.parity = CY_U3P_UART_NO_PARITY;
uartConfig.flowCtrl = CyFalse;
uartConfig.txEnable = CyTrue;
uartConfig.rxEnable = CyTrue;
uartConfig.isDma = CyTrue; /* DMA mode */
/* Set the UART configuration */
status = CyU3PUartSetConfig (&uartConfig, CyFxUartLpDmaCallback);
if (status != CY_U3P_SUCCESS )
{
/* Error handling */
CyCx3AppErrorHandler(status);
}
/* Create a DMA Manual channel between UART producer socket
and UART consumer socket */
CyU3PMemSet ((uint8_t *)&dmaConfig, 0, sizeof(dmaConfig));
dmaConfig.size = 16;
dmaConfig.count = 2;
dmaConfig.prodSckId = CY_U3P_LPP_SOCKET_UART_PROD;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BUFFER;
dmaConfig.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaConfig.cb = CyFxUartLpDmaCallback;
dmaConfig.prodHeader = 0;
dmaConfig.prodFooter = 0;
dmaConfig.consHeader = 0;
dmaConfig.prodAvailCount = 0;
/* Create the channel */
status = CyU3PDmaChannelCreate (&glUartRxChHandle,
CY_U3P_DMA_TYPE_MANUAL, &dmaConfig);
if (status != CY_U3P_SUCCESS)
{
/* Error handling */
CyCx3AppErrorHandler(status);
}
/* Set UART Tx and Rx transfer Size to infinite */
status = CyU3PUartRxSetBlockXfer(0xFFFFFFFF);
if (status != CY_U3P_SUCCESS)
{
/* Error handling */
CyCx3AppErrorHandler(status);
}
/* Set DMA Channel transfer size */
status = CyU3PDmaChannelSetXfer (&glUartRxChHandle, 0);
if (status != CY_U3P_SUCCESS)
{
/* Error handling */
CyCx3AppErrorHandler(status);
}
/* Initialize the debug application */
status = CyU3PDebugInit (CY_U3P_LPP_SOCKET_UART_CONS, 8);
if (status != CY_U3P_SUCCESS)
{
return status;
}
CyU3PDebugPreamble (CyFalse);
}
void CyFxUartLpDmaCallback (
CyU3PDmaChannel *chHandle, /* Handle to the DMA channel. */
CyU3PDmaCbType_t type, /* Callback type. */
CyU3PDmaCBInput_t *input) /* Callback status. */
{
CyU3PReturnStatus_t status;
gUartRecDataFlag = CyFalse;
if (type == CY_U3P_DMA_CB_PROD_EVENT)
{
/* This is a produce event notification to the CPU. This notification is
* received upon reception of every buffer. The buffer will not be sent
* out unless it is explicitly committed. The call shall fail if there
* is any application error. */
input->buffer_p.buffer[input->buffer_p.size] = '\0';
CyU3PDebugPrint (4, "%s", input->buffer_p.buffer);
status = CyU3PDmaChannelDiscardBuffer (chHandle);
if (status != CY_U3P_SUCCESS)
{
CyCx3AppErrorHandler (status);
}
}
}
The serial IO configuration is correct and the connection is correct. I've tested TX, Rx in register mode.Now I want to use DMA to receive data。but the the Callback function can not be called for uart rx dma of mode when the rx receive data.
Show LessI'm having difficulty figuring out how to get my EZ-USB FX3 GPIF-II synchronous master interface working reliably.
For each of the following questions I only want to know the answers that apply to the EZ-USB FX3 when operating the GPIF-II in synchronous master mode. I don't care about synchronous slave mode or asynchronous modes.
- What are the minimum and maximum allowed PCLK frequencies?
- When executing CyU3PPibInit() what are the minimum and maximum functional clkDiv values for the PibClock?
- When executing CyU3PPibInit() should isDllEnable be true or false, or does the answer vary based on clkDiv?
- Do I need to configure the PIB DLL CTRL register (0xE0010028), either directly or via CyU3PPibDllConfigure()?
- In pib_regs.h the HIGH_FREQ bit includes the comment "0: 23-80MHz, 1:70-230MHz". Does this mean the PIB DLL CTRL register should only be used for the 23MHz-230MHz frequency range?
- Various phase selects are defined in pib_regs.h (CORE_PHASE, SYNC_PHASE, OUTPUT_PHASE) and used by CyU3PPibDllConfigure(). Why are these fields not defined in EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. F?
Show Less
usb device work wrong under static electricity test in 6kv. when device works wrong , we cant get any uvc or cdc-uart data in bushound, but down channel still works well at the same time. and then the device can return to normal state after reconnect and without poewroff. i want to make sure what will make this and if any useful state can be used to help solve it?
Show LessHi Cypress,
I have been programming my FX3 SuperSpeed microcontroller, with the help from the CyControl Center. When I build my C-program and create a .img file, I can put it on by programming it via RAM. But this means, when I remove power, it will delete the program off the board (and I have to reprogram it every time I give it power).
How do I program it with an .img file, such that the program runs automatically on boot / when it gets power?
I've also tried to proram it via I2C E2PROM and SPI FLASH, but I don't think that's how you should do it, and I can't get it to work either by programming it that way.
Best regards,
Søren
Show Less