You are here

Control EndPoint Error 997 | Cypress Semiconductor

Control EndPoint Error 997

Summary: 1 Reply, Latest post by Madhu Sudhan on 14 Aug 2016 12:20 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
scott_1751771's picture
1 post

Apologies if this has been answered elsewhere but I have been unable to find anything.  I am new to the CyAPI and am trying to write a C++ application to communicate with a CY7C68013A.  However, whenever I attempt a read/write to the control endpoint, I see an error 997.  The functional part of my code is here:

CCyControlEndPoint *ept = USBDevice->ControlEndPt;

ept->Target = TGT_DEVICE;
ept->ReqType = REQ_VENDOR;
ept->Direction = DIR_TO_DEVICE;
ept->ReqCode = 0xA0;
ept->Index = 0x0000;
unsigned char buf[64];
ZeroMemory(buf, 64);
ept->Value = 0xE600;
LONG buflen = 1;
buf[0] = 1;
ept->XferData(buf, buflen);

ept->Direction = DIR_FROM_DEVICE;
ept->Value = 0xE60A;
buflen = 1;

ept->XferData(buf, buflen);

cout <<  "Data: " << hex << (int)buf[0] << dec <<  "\nError code: " << ept->LastError << '\n';

According to the documentation I've seen, this register should output a value of "1"; however, I get "5e".  In fact, for any register I try to access, I get "5e 6f" repeating.  Is there something I am missing about setting up the control endpoint or how I'm using it?



mady's picture
Cypress Employee
963 posts


Did you make sure that the device responds properly to the vendor command? Is it handled in your firmware? The 997 error iscaused if the device does not send anything.


-Madhu Sudhan

Log in to post new comments.