Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > trange behavior of library CyAPI.lib

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



trange behavior of library CyAPI.lib
Moderator:
RSKV

Post Reply
Follow this topic



trange behavior of library CyAPI.lib

akop posted on 22 Dec 2012 9:17 AM PST
Member
10 Forum Posts

Hi!
I found strange behavior of library CyAPI.lib.
My goal is further develop the program written in c++ that quickly transfers data through USB. I use CY7C68013A in slave mode. I filled transmitted from PC buffer by counter 1,2,3 ... and controls the oscilloscope is synchronized "BUFFER
EMPTY" and show FD bus on the screen. Transmission was fixated and was conducted with the greatest possible speed. I write Test programm on c#. it use CyUsb.dll and works great.I could see the counter on the oscilloscope screen.But when I tried to use this same test in c++ program, I found transmission failures.

not working variant:

OutEndpt->XferData(&zgl[0], l);

not working variant:

UCHAR *outContext = USBDevice->BulkOutEndPt->BeginDataXfer(buffer, length,&outOvLap);
USBDevice->BulkOutEndPt->WaitForXfer(&outOvLap,100);
USBDevice->BulkOutEndPt->FinishDataXfer(buffer, length, &outOvLap,outContext);

not working variant:
DeviceIoControl (hDevice,IOCTL_ADAPT_SEND_NON_EP0_DIRECT,
pXmitBuf, iXmitBufSize,buf, bufLen,&dwReturnBytes, ov);

working variant:
DeviceIoControl (hDevice,IOCTL_ADAPT_SEND_NON_EP0_DIRECT,
pXmitBuf, iXmitBufSize,&zgl[0], xfer,
&l, (LPOVERLAPPED)NULL);
But this variant does not use overlapping. I assume that the signal of the completion occurs before completion of the transaction in CyAPI.lib.
is there a way to use overlapping in CyAPI.lib?
I use vs2010, Windows XP SP3 on test PC. windows7 on testing PC, remote debuggin by tcp.ip.
 




Re: trange behavior of library CyAPI.lib

akop posted on 22 Dec 2012 10:19 AM PST
Member
10 Forum Posts

a little clarification:
CY7C68013A connected to fpga that monitors "BUFFER EMPTY" signal and read data in Synchronous Timing Model. Data transmitted in bulk mode. 






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