Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CyUSB.dll - CyUSBEndPoint.XferData

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



CyUSB.dll - CyUSBEndPoint.XferData
Moderator:
RSKV

Post Reply
Follow this topic



CyUSB.dll - CyUSBEndPoint.XferData

msharpe posted on 10 May 2012 10:48 AM PST
Member
9 Forum Posts

Hello everyone,

 

I'm looking to test out my GPIF II interface which connects to an external FPGA via the p-port.  I am using the FX3 as a master, synchronous communication, an 8 bit address bus, and a 32 bit data bus.  My firmware is a modifed version of the "SlaveFifoSync" example, and uses DMA channels for data transfer, with bulk out endpoint set as 0x01 and bulk in endpoint as 0x81.

 

Using the "USB Control Center" application, I am able to transfer data out to the FPGA using the "Data Transfers" tab for the Bulk out endpoint 0x01.  What I am seeing is separate consectuative bytes being transferred consecuatively.  For example if I send 6 Bytes of data as ""FF AA 55 FF AA 55" i can read the data with the FPGA on the first 8 bits of the data bus.  Attached is a screen shot of the data I sent and the FPGA reading the values.

 

I want to be able to send chunks of data 32 bits in length, instead of only 8 bits.  Is this able to be done using the "CyUSBEndPoint.XferData" class within the CyUSB.dll or should I be using another method?

 

Thanks




Re: CyUSB.dll - CyUSBEndPoint.XferData

aasi posted on 10 May 2012 09:15 PM PST
Cypress Employee
1073 Forum Posts

Seems your firmware is configured for 8 bit data bus. You should be changing the firmware not how  you call XferData().

Regards,

Anand



Re: CyUSB.dll - CyUSBEndPoint.XferData

msharpe posted on 11 May 2012 07:50 AM PST
Member
9 Forum Posts

Thanks for the response,

 

My firmware is built off of the "SlaveFifoSync" example firmware.  Within the header file, a symbol is set to configure the data bus width (which I have set to a 32 bit GPIF data bus)

 

/* 16/32 bit GPIF Configuration select */
/* Set CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT = 0 for 16 bit GPIF data bus.
* Set CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT = 1 for 32 bit GPIF data bus.
*/

#define CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT (1)

 

Within the main() function, the code checks this value and configures the IO matrix accordingly:

 

#if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)
io_cfg.isDQ32Bit = CyFalse;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_UART_ONLY;
#else
io_cfg.isDQ32Bit = CyTrue;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;
#endif
 

 

I also noticed that within the header file that was created with the GPIF II designer, this symbol showed up again in the "GPIF II configuration register values" section:

 

#if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)
0x000010A7, /* PIB_GPIF_BUS_CONFIG */
#else
0x000010AC, /* PIB_GPIF_BUS_CONFIG */
#endif

 

I checked my GPIF II header file and noticed that my BUS_CONFIG was set as:

 

  0x0000016C, /* CY_U3P_PIB_GPIF_BUS_CONFIG */

 

I tried inserting the if statement with the register values I found in the example header file, but I am still having the original problem I described with only being able to see 8 bits on my data bus.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.