problem with pktend

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
2 Replies
Anonymous
Not applicable

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,

0 Likes
Anonymous
Not applicable

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.

0 Likes