USB superspeed peripherals Forum Discussions
Hi, I’m writing to the forum since I’m really confused about the association Thread-Socket for the GPIF sync FIFO interface. I used the Slave sync FIFO example (putting DMA channels on AUTO) as a starting point but I’m now unable to go ahead.
My needs are:
1) EP1 working as IN and OUT, transferring and reading data to and from the PPort using automatic DMA.
2) I then need a second endpoint EP2 working too as IN and OUT
EP1 is typically used to transfer big chunk of data and is accessed using async data transfer (from the CyAPI point of view; not async GIPIF!) . This works perfectly and I’m able to send and receive data to/from the GPIF interface.
In this case your selection was:
#define CY_FX_EP_PRODUCER 0x01 /* EP 1 OUT */
#define CY_FX_EP_CONSUMER 0x81 /* EP 1 IN */
#define CY_FX_PRODUCER_USB_SOCKET CY_U3P_UIB_SOCKET_PROD_1 /* USB Socket 1 is producer */
#define CY_FX_CONSUMER_USB_SOCKET CY_U3P_UIB_SOCKET_CONS_1 /* USB Socket 1 is consumer */
#define CY_FX_PRODUCER_PPORT_SOCKET CY_U3P_PIB_SOCKET_0 /* P-port Socket 0 is producer */
#define CY_FX_CONSUMER_PPORT_SOCKET CY_U3P_PIB_SOCKET_3 /* P-port Socket 3 is consumer */
In your reference design you the set up the 2 DMA channels using :
…
dmaCfg.prodSckId = CY_FX_PRODUCER_USB_SOCKET;
dmaCfg.consSckId = CY_FX_CONSUMER_PPORT_SOCKET;
…
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoUtoP, CY_U3P_DMA_TYPE_ AUTO, &dmaCfg);
..
For the USB 2 FX3 channel and
…
dmaCfg.prodSckId = CY_FX_PRODUCER_PPORT_SOCKET;
dmaCfg.consSckId = CY_FX_CONSUMER_USB_SOCKET;
…
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU, CY_U3P_DMA_TYPE_ AUTO, &dmaCfg);
For the FX3 2 USB DMA channel.
First question: how maps the USB socket number to the Endpoint number. Looking at your example I should use CY_U3P_UIB_SOCKET_PROD_1 and CY_U3P_UIB_SOCKET_CONS_1 for EP 1 and CY_U3P_UIB_SOCKET_PROD_2 and CY_U3P_UIB_SOCKET_CONS_2 for EP2,… is this correct ?
In order to set up a second group of DMA channels I modified the above definition as following
#define CY_FX_EP_PRODUCER 0x01 /* EP 1 OUT */
#define CY_FX_EP_CONSUMER 0x81 /* EP 1 IN */
#define CY_FX_EP_PRODUCER_NEW 0x02 /* EP 2 OUT */
#define CY_FX_EP_CONSUMER_NEW 0x82 /* EP 1 IN */
#define CY_FX_PRODUCER_USB_SOCKET CY_U3P_UIB_SOCKET_PROD_1 /* USB Socket 1 is producer */
#define CY_FX_CONSUMER_USB_SOCKET CY_U3P_UIB_SOCKET_CONS_1 /* USB Socket 1 is consumer */
#define CY_FX_PRODUCER_USB_SOCKET_NEW CY_U3P_UIB_SOCKET_PROD_2 /* USB Socket 2 is producer */
#define CY_FX_CONSUMER_USB_SOCKET_NEW CY_U3P_UIB_SOCKET_CONS_2 /* USB Socket 2 is consumer */
#define CY_FX_PRODUCER_PPORT_SOCKET CY_U3P_PIB_SOCKET_0 /* P-port Socket 0 is producer */
#define CY_FX_CONSUMER_PPORT_SOCKET CY_U3P_PIB_SOCKET_3 /* P-port Socket 3 is consumer */
#define CY_FX_PRODUCER_PPORT_SOCKET_NEW CY_U3P_PIB_SOCKET_1 /* P-port Socket 1 is producer */
#define CY_FX_CONSUMER_PPORT_SOCKET_NEW CY_U3P_PIB_SOCKET_2 /* P-port Socket 2 is consumer */
I then copied your code to set up the 2 new DMA channels:
…
dmaCfg.prodSckId = CY_FX_PRODUCER_USB_SOCKET_NEW;
dmaCfg.consSckId = CY_FX_CONSUMER_PPORT_SOCKET_NEW;
…
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoUtoP_new, CY_U3P_DMA_TYPE_ AUTO, &dmaCfg_new);
..
For the USB 2 FX3 channel and
…
dmaCfg.prodSckId = CY_FX_PRODUCER_PPORT_SOCKET_NEW;
dmaCfg.consSckId = CY_FX_CONSUMER_USB_SOCKET_NEW;
…
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU_new, CY_U3P_DMA_TYPE_M AUTO, &dmaCfg_new);
First question: is my socket mapping correct according to the description of what I need ?
If yes, EP1 works perfectly both IN and OUT, but EP2 simply doesn’t. In none of the directions…
Do I’m missing something? Any suggestion ?
Thanks in advance, Joel
P.S. I’m using a 2 bit addr 32 bit data sync GPIF slave fifo model (GPIF designer)
Show LessHi all
I got a new laptop with USB 3.0 port. I can use USB 2.0 to download code. The max speed is 38.1MBS.
But I cannot switch to USB 3.0 port on same laptop. USB3.0 can download firmware. But it does not recognize my firmware. Even I download firmware by USB 2.0-only port then switch to USB 3.0 port nothing will happen.
Laptop is Lenovo X230. OS is windows 7 professional(x64) . USB driver is DVK 1.1.1.
I think the problem is come from firmware. Does it different between USB 2.0 and USB 3.0?
Thanks
Show LessI have self-powered USB device running on FX2. Everything works except reconnection after USB cable is plugged out. When I plug-in the cable, device is not recognized on the host side and I have to power it down and up again to get it working.
I have implemented VBUS monitoring so device controls DISCONNECT bit. Except for that, what else should be done on the device side when "disconnected" and "connected" conditions are detected?
Help, anyone?
Show LessWhat is the correct procedure to do a Device Remote Wakeup from SS, HS, FS? I see flags in the API document telling me if they are enabled. However, I would like to wakeup the host when I get certain interrupts on the device side. The closest thing I can find is CyU3PUsbSetLinkPowerState
Ken
Show LessThe chip is 68013A.
We transfer data at speed 54MBps, I have tested the top speed of my board is about 32MBps. What I used is: EP6/AUTOIN/512*4 buffer/BULK mode. Do you have any methord to meet my data transfer speed need? Thanks for help.
Show LessHello,
When I am using Cypress USB Control Center , sometimes a message box populated saying "Please correct the fireware descriptor table". This messagebox appears before the main window appears. What's the matter?
Best, Regards.
Show LessHi all,
does anybody know a way how can I change the contents of USB-descriptors after compilation in the .img-binary?
Can I determine the location of the descriptors in the .img-file by some linker-commands or something like that?
Thanks!
Show LessJust got the Benicia DVK yesterday and have a big question about PMMC, the reason to use Benicia is because it has build-in eMMC 4.41 host controller, that means I can issue COMMAND to access eMMC instead of read/write only, but from datasheet, PMMC is activate when connecting to a application processor with eMMC host. But if I already had eMMC host on the host AP, why I still need an additional Benicia to access eMMC?? Is it possible: MMC_D0 - MMC_D7/ MMC_CLK / MMC_CMD connect to eMMC device and then use PMMC interface to access eMMC device?
Thank you!
Show Less