Recent discussions
we are designed usb sd3 based custom board. we have ported example illustrates the use of the FX3S firmware APIs to implement mass storage class device that allows access to SD/MMC devices connected to SD3 given along with SDK.
The application partitions the storage device found on storage port into two volumes, and then enumerates them as separate logical units on the USB side
in that example partitions define by
#define CY_FX_SIB_PARTITIONS (2).
.If i have increased to 4 ,it shows 4 partitions . Out of 4 partitions only two partitions data copying possible. If i have clicking other two partitions an message displays " please insert the disk".
kindly suggest how to make multiple partitions and also please tell how to control partions size of eacj partion
Show LessHI I'm back because my customer feed me back a problem, since 2013 I finish the development of CY3014 and our usb3.0 products were sold well.
The problem is simple, if our device is powered on before the host PC, then PC powers on later and logs in the desktop, it finds a "unknown device" instead of 04b4,xxxx(sorry I can't remember the exact vid/pid of CY3014).
My driver will download my firmware to CY3014 if finding the 04b4,xxxx on usb bus, but this problem stop me doing the job and the device doesn't work.
Please help me,thanks
Show LessI configured a complex GPIO for interrupt mode CY_U3P_GPIO_INTR_NEG_EDGE but never see the interrupt callback getting called. The firmware does load fine. I tested the same code on a simple GPIO configuration -- just changed complex to simple config and io matrix -- and the interrupt works fine. Any idea why the complex GPIO configuration won't work? Does something else need to be called/configured? The callback function is registered in GpioInit().
// complex configuration
gpioComplexConfig.outValue = CyTrue;
gpioComplexConfig.inputEn = CyTrue;
gpioComplexConfig.driveLowEn = CyFalse;
gpioComplexConfig.driveHighEn = CyFalse;
gpioComplexConfig.intrMode = CY_U3P_GPIO_INTR_NEG_EDGE;
gpioComplexConfig.pinMode = CY_U3P_GPIO_MODE_STATIC;
gpioComplexConfig.timerMode = CY_U3P_GPIO_TIMER_SHUTDOWN;
gpioComplexConfig.threshold = 0;
gpioComplexConfig.timer = 0;
gpioComplexConfig.period = 0;
status = CyU3PGpioSetComplexConfig(34, &gpioComplexConfig);
// register interrupt
status = CyU3PGpioInit(&gpioClock, GpioInterruptCallback);
// IO matrix
io_cfg.isDQ32Bit = CyFalse;
io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE;
io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE;
io_cfg.useUart = CyTrue;
io_cfg.useI2C = CyFalse;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyTrue;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;
io_cfg.gpioSimpleEn[0] = 0;
io_cfg.gpioSimpleEn[1] = 0;
io_cfg.gpioComplexEn[0] = 0;
io_cfg.gpioComplexEn[1] = 0x6;
status = CyU3PDeviceConfigureIOMatrix (&io_cfg);
Hi,
I am working on an FX 3 USB 3,0 device with the firmware developed using the FX3 EZ USB Suite and am seeing some device
registration issues.
The device has a two-phase install. When the device is plugged our driver identifies the device, downloads the device specific
firmware, and triggers a re-enumeration of the device which then comes up using the downloaded firmware and our driver then
hooks it in as a device which sits on top of WinUSB.
The device specific firmware has USB descriptors that should allow it load as either a USB 2.x device running at HS and FS, or
as a USB 3.0 device capable of running at SS, HS, and FS, depending upon which USB slot it is connected to.
Here are the issues that I am seeing:
1. When I plug my device into a USB 3.0 port, it will occasionally register as a USB 3.0 device running at HS, and occasionally as
a USB 2.1 device running at HS. It seems almost random as to which of the two types it will register as.
2. When I attach my device to the USB 3,0 port both usbview.exe and usblyzer.exe takes a long time to run up, or refresh, and list
the devices. This sluggishness does not happen when my device is not connected.
3. When it does register as a USB 3.0 device it does not register as running at SS, but only HS.
4. In neither case do the apps recognize or display the string descriptors I have configured for my device.
When I plug it into a USB 2 port it registers correctly and the strings are seen and displayed by both usbview and usblyzer.
Can anyone offer any suggestions as to why I am seeing these issues?
I have seen on this forum (http://www.cypress.com/forum/usb-30-super-speed/looking-fx3-descriptors-work-winusb) that if the device is to be used with WinUSB you need additional descriptors.
Below are the descriptors for my device (anonymized where necessary).
Thanks,
Peter Young
Xitron Europe
------------------------------------------------------------------------------------
/* Standard device descriptor for USB 3.0 */
const uint8_t CyFxUSB30DeviceDscr[] __attribute__ ((aligned (32))) =
{
0x12, /* Descriptor size */
CY_U3P_USB_DEVICE_DESCR, /* Device descriptor type (0x01) */
0x00,0x03, /* USB 3.0 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x09, /* Maxpacket size for EP0 : 2^9 = 512 bytes */
VENDOR_ID, /* Vendor ID <anonymised> */
PRODUCT_ID, /* Product ID <anonymised> */
0x01,0x00, /* Device release number */
0x01, /* Manufacture string index */
0x02, /* Product string index */
0x00, /* Serial number string index */
0x01 /* Number of configurations */
};
/* Standard device descriptor for USB 2.0 */
const uint8_t CyFxUSB20DeviceDscr[] __attribute__ ((aligned (32))) =
{
0x12, /* Descriptor size */
CY_U3P_USB_DEVICE_DESCR, /* Device descriptor type (0x01) */
0x10,0x02, /* USB 2.10 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x40, /* Maxpacket size for EP0 : 64 bytes */
VENDOR_ID, /* Vendor ID <anonymised> */
PRODUCT_ID, /* Product ID <anonymised> */
0x01,0x00, /* Device release number */
0x01, /* Manufacturer string index */
0x02, /* Product string index */
0x00, /* Serial number string index */
0x01 /* Number of configurations */
};
/* Binary device object store descriptor */
const uint8_t CyFxUSBBOSDscr[] __attribute__ ((aligned (32))) =
{
0x05, /* Descriptor size */
CY_U3P_BOS_DESCR, /* Device descriptor type (0x0F) */
0x16,0x00, /* Length of this descriptor and all sub descriptors */
0x02, /* Number of device capability descriptors */
/* USB 2.0 extension */
0x07, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor (0x10) */
CY_U3P_USB2_EXTN_CAPB_TYPE, /* USB 2.0 extension capability type (0x02) */
0x02,0x00,0x00,0x00, /* Supported device level features: LPM support */
/* SuperSpeed device capability */
0x0A, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor (0x10) */
CY_U3P_SS_USB_CAPB_TYPE, /* SuperSpeed device capability type (0x03) */
0x00, /* Supported device level features */
0x0E,0x00, /* Speeds supported by the device : SS, HS and FS */
0x03, /* Functionality support */
0x0A, /* U1 Device Exit latency */
0xFF,0x07 /* U2 Device Exit latency */
};
/* Standard device qualifier descriptor */
const uint8_t CyFxUSBDeviceQualDscr[] __attribute__ ((aligned (32))) =
{
0x0A, /* Descriptor size */
CY_U3P_USB_DEVQUAL_DESCR, /* Device qualifier descriptor type (0x06) */
0x00,0x02, /* USB 2.0 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x40, /* Maxpacket size for EP0 : 64 bytes */
0x01, /* Number of configurations */
0x00 /* Reserved */
};
/* Standard super speed configuration descriptor */
const uint8_t CyFxUSBSSConfigDscr[] __attribute__ ((aligned (32))) =
{
/* Configuration descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_CONFIG_DESCR, /* Configuration descriptor type (0x02) */
0x53,0x00, /* Length of this descriptor and all sub descriptors */
0x01, /* Number of interfaces */
0x01, /* Configuration number */
0x00, /* Configuration string index */
0x80, /* Config characteristics - Bus powered */
0x32, /* Max power consumption of device (in 8mA unit) : 400mA */
/* Interface descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface Descriptor type (0x04) */
0x00, /* Interface number */
0x00, /* Alternate setting number */
0x05, /* Number of end points */
0xFF, /* Interface class */
0x00, /* Interface sub class */
0x00, /* Interface protocol code */
0x00, /* Interface descriptor string index */
/* Endpoint descriptor for Debug Consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_CONSUMER, /* Consumes debug (0x81) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for Debug Consumer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type (0x30) */
(CY_FX_EP_BURST_LENGTH - 1), /* Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
/* Endpoint descriptor for Debug Producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_PRODUCER, /* Produces debug (0x01) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for Debug Producer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type (0x30) */
(CY_FX_EP_BURST_LENGTH - 1), /* Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
/* Endpoint descriptor for API Consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_API_CONSUMER, /* Responses back to Plugin/DLL (0x82) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for API Consumer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type (0x30) */
(CY_FX_EP_BURST_LENGTH - 1), /* Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
/* Endpoint descriptor for API Producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_API_PRODUCER, /* Commands FROM the Plugin/DLL (0x04) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for API Producer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type (0x30) */
(CY_FX_EP_BURST_LENGTH - 1), /* Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
/* Endpoint descriptor for Video Producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_VID_PRODUCER, /* Video data from the Plugin/DLL (0x06) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for Video Producer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type (0x30) */
(CY_FX_EP_BURST_LENGTH - 1), /* Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
};
/* Standard high speed configuration descriptor */
const uint8_t CyFxUSBHSConfigDscr[] __attribute__ ((aligned (32))) =
{
/* Configuration descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_CONFIG_DESCR, /* Configuration descriptor type (0x02) */
0x35,0x00, /* Length of this descriptor and all sub descriptors */
0x01, /* Number of interfaces */
0x01, /* Configuration number */
0x00, /* COnfiguration string index */
0x80, /* Config characteristics - bus powered */
0x32, /* Max power consumption of device (in 2mA unit) : 100mA */
/* Interface descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface Descriptor type (0x04) */
0x00, /* Interface number */
0x00, /* Alternate setting number */
0x05, /* Number of endpoints */
0xFF, /* Interface class */
0x00, /* Interface sub class */
0x00, /* Interface protocol code */
0x00, /* Interface descriptor string index */
/* Endpoint descriptor for producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_CONSUMER, /* Consumes debug (0x81) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x02, /* Max packet size = 512 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Endpoint descriptor for consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_PRODUCER, /* Produces debug (0x01) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x02, /* Max packet size = 512 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Endpoint descriptor for producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_API_CONSUMER, /* Responses back to Plugin/DLL (0x82) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x02, /* Max packet size = 512 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Endpoint descriptor for consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_API_PRODUCER, /* Commands FROM the Plugin/DLL (0x04) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x02, /* Max packet size = 512 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Endpoint descriptor for consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
XI_VID_PRODUCER, /* Video data from the Plugin/DLL (0x06) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x00,0x02, /* Max packet size = 512 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
};
/* Standard full speed configuration descriptor */
const uint8_t CyFxUSBFSConfigDscr[] __attribute__ ((aligned (32))) =
{
/* Configuration descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_CONFIG_DESCR, /* Configuration descriptor type (0x02) */
0x20,0x00, /* Length of this descriptor and all sub descriptors */
0x01, /* Number of interfaces */
0x01, /* Configuration number */
0x00, /* COnfiguration string index */
0x80, /* Config characteristics - bus powered */
0x32, /* Max power consumption of device (in 2mA unit) : 100mA */
/* Interface descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface descriptor type (0x04) */
0x00, /* Interface number */
0x00, /* Alternate setting number */
0x02, /* Number of endpoints */
0xFF, /* Interface class */
0x00, /* Interface sub class */
0x00, /* Interface protocol code */
0x00, /* Interface descriptor string index */
/* Endpoint descriptor for consumer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_CONSUMER, /* Endpoint address and description (0x81) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x40,0x00, /* Max packet size = 64 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Endpoint descriptor for producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type (0x05) */
CY_FX_DEBUG_PRODUCER, /* Endpoint address and description (0x01) */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type (0x02) */
0x40,0x00, /* Max packet size = 64 bytes */
0x00 /* Servicing interval for data transfers : 0 for bulk */
};
/* Standard language ID string descriptor */
const uint8_t CyFxUSBStringLangIDDscr[] __attribute__ ((aligned (32))) =
{
0x04, /* Descriptor size */
CY_U3P_USB_STRING_DESCR, /* Device descriptor type */
0x09,0x04 /* Language ID supported */
};
/* Standard manufacturer string descriptor */
const uint8_t CyFxUSBManufactureDscr[] __attribute__ ((aligned (32))) =
{
0x0E, /* Descriptor size */
CY_U3P_USB_STRING_DESCR, /* Device descriptor type */
'X',0x00,
'i',0x00,
't',0x00,
'r',0x00,
'o',0x00,
'n',0x00
};
/* Standard product string descriptor */
const uint8_t CyFxUSBProductDscr[] __attribute__ ((aligned (32))) =
{
0x18, /* Descriptor size */
CY_U3P_USB_STRING_DESCR, /* Device descriptor type */
'U',0x00,
'S',0x00,
'B',0x00,
' ',0x00,
't',0x00,
'o',0x00,
' ',0x00,
'S',0x00,
'C',0x00,
'S',0x00,
'I',0x00
};
/* Microsoft OS Descriptor. */
const uint8_t CyFxUsbOSDscr[] __attribute__ ((aligned (32))) =
{
0x3A,
CY_U3P_USB_STRING_DESCR,
'X', 0x00,
'i', 0x00,
't', 0x00,
'r', 0x00,
'o', 0x00,
'n', 0x00,
' ', 0x00,
'U', 0x00,
'S', 0x00,
'B', 0x00,
' ', 0x00,
't', 0x00,
'o', 0x00,
' ', 0x00,
'S', 0x00,
'C', 0x00,
'S', 0x00,
'I', 0x00,
' ', 0x00,
'C', 0x00,
'o', 0x00,
'n', 0x00,
'v', 0x00,
'e', 0x00,
'r', 0x00,
't', 0x00,
'e', 0x00,
'r', 0x00
};
const uint8_t CyFxUsbDscrAlignBuffer[32] __attribute__ ((aligned (32)));
Show LessHas anyone gotten CyU3PDeviceInit to work with a parameter other than NULL?
The PCB has a 19.2 MHz oscillator and does not have the 32.768 kHz crystal.
With CyU3PDeviceInit(NULL), our device boots. But the defaults seem to be different than those described in the API Guide.
The API Guide says the defaults should be: CPU divider = 2, DMA divider = 2, MMIO divider = 2, setSysClk400 = CyFalse, useStandbyClk
= CyTrue. And that this would run the GPIF at 96 MHz. but we measure 100.8 MHz.
Additionally, if we try to initialize with these defaults:
clk_cfg.setSysClk400 = CyFalse;
clk_cfg.useStandbyClk = CyTrue;
clk_cfg.cpuClkDiv = 2;
clk_cfg.dmaClkDiv = 2;
clk_cfg.mmioClkDiv = 2;
status = CyU3PDeviceInit(&clk_cfg);
The device will NOT boot.
Are we missing something here?
Show LessHello
I use FX3S chip. I want to transfer some data PC to FPGA.
I set FX3s Master mode. and I want to use 16 bit AD MUX mode.
And I set DMA type is Auto.
I check FPGA side. Fx3 send Addresses both ALE timing WE timing.
Timing Diagram cycles are seen exactly working. Address send on ALE timing and Data send on WE timing.
ALE timing and WE timing are same data in the FPGA side.
What can I do?
Regards
Shin.
Show LessThe USB3 camera implemented based on AN75779 is stopped connected to Windows 10 PC. Checking the output information shows the clear_feature request causes the FX3 code hang on waiting for the stream comite request. The video viewer is not closed in this case. Is there any one know what causes the host sending clear_feature request without closing video viewer? and how to solve the problem. I would appreciate any help.
Regards,
Wenye
Show LessHello
I used cyusb3014+kintex 7 and released stream_in(fpga to PC).
I want turn on led when run stream (read data from cyusb3014 by streamer) and turn of when system in idle state.
I use slavefifosync project in Eclipse, How I can determine the transmission is in progress or not?
Show LessTrying to setup demo using the EZ-USB FX3 SuperSpeed Explorer to the FMC interconnect Board.
The docs seem to suggest that their exist Verilog code from Cypress for the GPIF II slave interface in the FPGA. Where can I find this verilog code?
Show Less