USB superspeed peripherals Forum Discussions
I am currently using the CX3 along with a sensor that outputs 10 bit RAW pixel data, and I am using code similar to the UVC example code. Is there is a way to tightly pack the pixel data received?Instead of getting 2 bytes for every 10 bit pixel, I can get 4 pixels for every 5 bytes of data. Does simply setting the GPIF to get 8 bits instead of 16 work?
Show LessHi,
Can I have an infinite transfer AUTO DMA channel from SPI to USB end point. Is it possible to make the transmission happen only if fixed number of bytes got received from SPI each time?
I want the audio samples coming at SPI (I2S converted to SPI) to go to USB endpoint without involving CX3 CPU.If an AUTO infinite DMA transfer can solve the problem, please help me how to do that. For audio class, how will we manage filling the bytes of audio frame in this case? Is it a byte by byte transfer ?
Show LessI am using the Lattice USB3 video bridge development kit (Win10)
1. When I opened the USB 3.0 video configurator by mistake I added the CybootProgrammer (Disc image File) instead of the
USBVideoBridge_bulk
2. Since then, when I tried to load the default file (USBVideoBridge_bulk) it shows me "Bootloader on the device is not
running" I tried to reset the Cypress IC by the FX3 JTAG pins (GND wiht CONN2_RST_N) and it did not work.
I would like to know, how to fix this issue(If there is a way to put it in factory default settings) and be able to upload the
starting files.
Thanks
Show Less
Description Hello?
I'd like to get 400Khz i2c module operation in the FX3.
as the below is my i2c code, Can you let me know what am I supposed to do to get the 400KHZ i2c operation?
//////////////////////////////////////////////////////////////
/* I2c initialization for EEPROM programming. */
CyU3PReturnStatus_t
CyFxI2cInit (uint16_t pageLen)
{
CyU3PI2cConfig_t i2cConfig;
//CyU3PDmaChannelConfig_t dmaConfig;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
/* Initialize and configure the I2C master module. */
status = CyU3PI2cInit ();
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "I2C configuration failed!\n");
return status;
}
/* Start the I2C master block. The bit rate is set at 100KHz.
* The data transfer is done via DMA. */
CyU3PMemSet ((uint8_t *)&i2cConfig, 0, sizeof(i2cConfig));
i2cConfig.bitRate = 100000;//CY_FX_USBI2C_I2C_BITRATE;
i2cConfig.busTimeout = 0xFFFFFFFF;
i2cConfig.dmaTimeout = 0xFFFF;
i2cConfig.isDma = CyFalse;
status = CyU3PI2cSetConfig (&i2cConfig, NULL);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "I2C configuration failed!\n");
return status;
}
/* Now create the DMA channels required for read and write. */
//CyU3PMemSet ((uint8_t *)&dmaConfig, 0, sizeof(dmaConfig));
//dmaConfig.size = pageLen;
/* No buffers need to be allocated as this will be used
* only in override mode. */
/*
dmaConfig.count = 0;
dmaConfig.prodAvailCount = 0;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaConfig.prodHeader = 0;
dmaConfig.prodFooter = 0;
dmaConfig.consHeader = 0;
dmaConfig.notification = 0;
dmaConfig.cb = NULL;
*/
/* Create a channel to write to the EEPROM. */
/*
dmaConfig.prodSckId = CY_U3P_CPU_SOCKET_PROD;
dmaConfig.consSckId = CY_U3P_LPP_SOCKET_I2C_CONS;
status = CyU3PDmaChannelCreate (&glI2cTxHandle,
CY_U3P_DMA_TYPE_MANUAL_OUT, &dmaConfig);
if (status != CY_U3P_SUCCESS)
{
return status;
}
*/
/* Create a channel to read from the EEPROM. */
/*
dmaConfig.prodSckId = CY_U3P_LPP_SOCKET_I2C_PROD;
dmaConfig.consSckId = CY_U3P_CPU_SOCKET_CONS;
status = CyU3PDmaChannelCreate (&glI2cRxHandle,
CY_U3P_DMA_TYPE_MANUAL_IN, &dmaConfig);
if (status == CY_U3P_SUCCESS)
{
glI2cPageSize = pageLen;
}
*/
return status;
}
//////////////////////////////////////////////////////////////
CyU3PReturnStatus_t
CyFxUsbI2cTransfer (
uint16_t byteAddress,
uint8_t devAddr,
uint16_t byteCount,
uint8_t *buffer,
CyBool_t isRead)
{
CyU3PDmaBuffer_t buf_p;
CyU3PI2cPreamble_t preamble;
uint16_t pageCount = (byteCount / glI2cPageSize);
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
if (byteCount == 0)
{
return CY_U3P_SUCCESS;
}
if ((byteCount % glI2cPageSize) != 0)
{
pageCount ++;
}
CyU3PDebugPrint (2, "I2C access - dev: 0x%x, address: 0x%x, size: 0x%x, pages: 0x%x.\r\n",
devAddr, byteAddress, byteCount, pageCount);
/* Update the buffer address. */
buf_p.buffer = buffer;
buf_p.status = 0;
while (pageCount != 0)
{
if (isRead)
{
/* Update the preamble information. */
preamble.length = 4;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = (uint8_t)(byteAddress >> 8);
preamble.buffer[2] = (uint8_t)(byteAddress & 0xFF);
preamble.buffer[3] = (devAddr | 0x01);
preamble.ctrlMask = 0x0004;
buf_p.size = glI2cPageSize;
buf_p.count = glI2cPageSize;
status = CyU3PI2cSendCommand (&preamble, glI2cPageSize, CyTrue);
if (status != CY_U3P_SUCCESS)
{
return status;
}
status = CyU3PDmaChannelSetupRecvBuffer (&glI2cRxHandle, &buf_p);
if (status != CY_U3P_SUCCESS)
{
return status;
}
status = CyU3PDmaChannelWaitForCompletion(&glI2cRxHandle,
CY_FX_USB_I2C_TIMEOUT);
if (status != CY_U3P_SUCCESS)
{
return status;
}
}
else /* Write */
{
/* Update the preamble information. */
preamble.length = 3;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = (uint8_t)(byteAddress >> 8);
preamble.buffer[2] = (uint8_t)(byteAddress & 0xFF);
preamble.ctrlMask = 0x0000;
buf_p.size = glI2cPageSize;
buf_p.count = (byteCount > glI2cPageSize) ? glI2cPageSize : byteCount;
status = CyU3PDmaChannelSetupSendBuffer (&glI2cTxHandle,
&buf_p);
if (status != CY_U3P_SUCCESS)
{
return status;
}
status = CyU3PI2cSendCommand (&preamble, ((byteCount > glI2cPageSize) ? glI2cPageSize : byteCount), CyFalse);
if (status != CY_U3P_SUCCESS)
{
return status;
}
status = CyU3PDmaChannelWaitForCompletion(&glI2cTxHandle,
CY_FX_USB_I2C_TIMEOUT);
if (status != CY_U3P_SUCCESS)
{
return status;
}
}
/* Update the parameters */
byteAddress += glI2cPageSize;
buf_p.buffer += glI2cPageSize;
byteCount -= glI2cPageSize;
pageCount --;
/* Need a delay between write operations. */
CyU3PThreadSleep (10);
}
return CY_U3P_SUCCESS;
}
/////////////////////////////////////////////////////////////
Hi,
I would like to read/write from/to the differential SBU lines. Is there a component to translate the differential lines to a serial-type interface ? or do I need to configure it as GPIO and do SW bit banging ?
Thank you!
Jerome
Hi,
I have a software built in C#. It bulks out a 16-byte data to an Fx3 device and the from start of Xfer() it measures the time until it returns true.
I measured it to be 600 us. The FX3 contains the firmware of Asynchronous Slave Fifo for GPIF II.
Next firmware is a loopback firmware from AN70983. I also used the same software to bulk out the 16-byte data and measure its time. The bulk out time is 50us-90us.
My question is as follows:
1. Why is the amount of bulk out from the Asynchronous Slave Fifo super slower than the loopback firmware?
2. What are the possible ways I could boost the bulk out speed of the Asynchronous Slave Fifo for GPIF II Firmware?
I recently got a the CYUSB3ACC-006(1) interconnect board.
The CYUSB3ACC-006 has 180 pins. But my Altera board (SocKIT) has a 160 pin HSMC connector. Are these compatible?
Show LessHi,
I tried the USB audio example to work under Linux for 16kHZ sampling referring some other post in this forum.
I changed the descriptors and CY_FX3_ISO_XFER_LEN in the code for 16kHZ sampling and it started streaming the audio from SPI flash. But the audio is breaking and looks like elongated (may be because of multiple copies of same audio samples).
Do you have a working example for Linux platform for 16kHZ?
Show LessHi
I added a new Product ID in cyusb3.inf file. and I should install modified win 10 driver. but modified driver is not loaded with hash error.
"The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering "
Please let me know how to do I something. host is windows 10.
Regards
Shin.
Show Less