Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Using high-bandwidth ISO endpoint without GPIF

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



Using high-bandwidth ISO endpoint without GPIF
Moderator:
RSKV

Post Reply
Follow this topic



Using high-bandwidth ISO endpoint without GPIF

ademenev posted on 04 Sep 2012 8:14 PM PST
Senior Member
12 Forum Posts

Hi all

I am designing an application using CY7C68013A that must support high-bandwidth isochronous OUT transfers. Data should be moved out of CY7C68013A to a FPGA. I have implemented device descriptors, the host recognizes the CY7C68013A and loads driver (USB audio), and when I run an application on host (audio player), it seems to send out the data just. The interface between CY7C68013A and FPGA is still TBD, so on this early stage I just want to make sure that the correct data arrives to endpoint. Can someone post a minimalistic example of how I setup the registers, and check the arrived data packets and then discard them?




Re: Using high-bandwidth ISO endpoint without GPIF

PRJI posted on 05 Sep 2012 01:49 AM PST
Cypress Employee
333 Forum Posts

 Hi,

 You could look at the streamer example in C:\Cypress\Cypress Suite USB 3.4.7\Firmware\CyStreamer after installing SuiteUSB(http://www.cypress.com/?rID=34870).

Regards

Prajith

 



Re: Using high-bandwidth ISO endpoint without GPIF

ademenev posted on 05 Sep 2012 06:28 AM PST
Senior Member
12 Forum Posts

I did so.

The examples are not very helpful. They seem to have "all in one", and it is hard to find out what each piece  of code is doing (even with TRM help).

I am trying to learn Fx2LP step-by-step, starting from simple things - first do not do any external I/O at all. Still cannot figure out how to do very simple thing - once a packet arrives, toggle an output line. I have tried different register settings, but I only get EMPTY  bit for EP2 in  EP2468STAT either constantly on, or constantly off.



Re: Using high-bandwidth ISO endpoint without GPIF

ademenev posted on 05 Sep 2012 06:59 AM PST
Senior Member
12 Forum Posts

Here are the relevant pieces of code I am using:

Initialization:

void main_init()
{

    //debug pin
    OED = 0x02;
    P3_1 = 1;

    REVCTL = 3;
    IFCONFIG = 0x00;
    SYNCDELAY();
    // Only using endpoint 2, zero the valid bit on all others
    EP1OUTCFG = EP1INCFG = EP4CFG = EP6CFG = EP8CFG = 0x00;
    SYNCDELAY();
    EP2FIFOCFG = 0x00;
    SYNCDELAY();

    printf("Initialization Done.\n");

}

This is called when host selects an interface:


BOOL handle_set_interface(BYTE ifc, BYTE alt_ifc)
{
    interface = ifc;
    alt = alt_ifc;
    if (!alt) {
        EP2CFG = 0;
    } else {
        //       Valid      Out        ISO        1024       DoubleBuf
        EP2CFG = (1 << 7) | (0 << 6) | (1 << 4) | (1 << 3) | (2 << 0);
        SYNCDELAY();
        // OUT endpoints do NOT come up armed
        EP2BCL = 0x80; // arm first buffer by writing BC w/skip=1
        SYNCDELAY();
        EP2BCL = 0x80; // arm second buffer by writing BC w/skip=1
    }
   
    return TRUE;
}

 

This is called from main() endless loop, when there are no EP0 requests to service:

void main_loop()
{
    if (alt) {
        if(!(EP2468STAT & bmEP2EMPTY)) {
            P3_1 ^= 1;
            EP2BCL = 0x80;
        }
    }
}

 

With this code,  EMPTY  bit in EP2468STAT  is always cleared, regardless of if any data is sent to EP2.

If I change EP2FIFOCFG to 0x10EMPTY  bit in EP2468STAT  is always set, regardless of if any data is sent to EP2.

 



Re: Using high-bandwidth ISO endpoint without GPIF

ademenev posted on 05 Sep 2012 07:11 AM PST
Senior Member
12 Forum Posts

Correction:

With this code,  EMPTY  bit in EP2468STAT  is always set, regardless of if any data is sent to EP2.

If I change EP2FIFOCFG to 0x10EMPTY  bit in EP2468STAT  is always cleared, regardless of if any data is sent to EP2.



Re: Using high-bandwidth ISO endpoint without GPIF

Gayathri posted on 07 Sep 2012 12:02 AM PST
Cypress Employee
428 Forum Posts

 Please refer TD_INIT() and TD_LOOP() portion of code in GPIF manual Mode eg: / GPIF auto mode eg: according to your application http://www.cypress.com/?rID=45850.

 

Regards,

Gayathri






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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20