Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > problem with pktend

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



problem with pktend
Moderator:
RSKV

Post Reply
Follow this topic



problem with pktend

Zakkary posted on 17 Sep 2012 8:08 PM PST
Member
5 Forum Posts

hello:

i use fx3 to get image data from fpga,but the fpga set the pktend pin frequently per frame,i can't get a  complete frame by using cyapi.lib,can you tell me how can i use the api to get image frame completly.

 




Re: problem with pktend

RSKV posted on 22 Sep 2012 12:29 AM PST
Cypress Employee
655 Forum Posts

How are you reading the data from FX3 into PC. What functions of cyapi are you using. Paste that part of code here. I will look into it. Otherwise you can do onething, you can refer to the source code of the streamer application.

Regards,

sai krishna,



Re: problem with pktend

Zakkary posted on 24 Sep 2012 05:04 AM PST
Member
5 Forum Posts

code:

BOOL GetSensorData(BYTE *pOut, LONG bufsize)

{

    OVERLAPPED inOvLap;
    bool bRequest = FALSE;

    inOvLap.hEvent   = CreateEvent(NULL, false, false, NULL);
    UCHAR  *inContext = USBDevice->BulkInEndPt->BeginDataXfer(pOut,bufsize, &inOvLap);
    if(!USBDevice->BulkInEndPt->WaitForXfer(&inOvLap,2000))
    {

        USBDevice->BulkInEndPt->Reset();
       CloseHandle(inOvLap.hEvent);
       return FALSE;

    }


    bRequest = USBDevice->BulkInEndPt->FinishDataXfer(pOut,bufsize, &inOvLap,inContext);
    CloseHandle(inOvLap.hEvent);

    if(!bRequest)
    {
        USBDevice->BulkInEndPt->Abort();
        USBDevice->BulkInEndPt->Reset();
    }

    return bRequest ;

}

another question is that it looks like that the bufsize can't be too large,or this fuction will return FALSE, what should i do?

and i can't find cyusb.sys  for  64 bit systerm.






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.