I use the 68013A chip, the program used CYAPI
When I run the program many times, the program error occurs, the error occurred in sending data function,
the GetLastError () returns 2(ERROR_FILE_NOT_FOUND The system cannot find the file specified.) or 997(ERROR_IO_PENDING Overlapped I/O operation is in progress),
when the error occurs I use the open (), it will return failure. Rerun the program,it will fail too. And with USB Console "Device Properties" can not read the information, but with a USB Console-> "EZ-USB interface" can read. I usually insert the usb line again, the program will run successfully.
Is the problem belong to firmware or driver?
how can I solve this problem? please help me.
As you have mentioned "When I run the program many times, the program error occurs, the error occurred in sending data function," what do mean by "run the program many times"? are you running the application several times or requesting some data from FX2LP(CY7C68013A)?
Can you share your firmware and the host application source code?
The issue is not clear to me.
Please give more details. If you are facing issue in sending the data
then after how many times (sending the command to trasnfer the data) it is failing?
If you are faicng the issue in reading the data please make sure that you have set the variable in_enable as TRUE by sending the vendor command 0xB3. In your host app i don't see this vendor. So In request won't respond with data as the GPIF waveform cannot be triggered unless the in_enable variable is set TRUE in your firmware.
In the GPIF waveforms the WEN and REN signals doesn't seem to be properly asserted in the correct state. You are asserting these lines when the data line is in DEactive state.
it's in the sending data, in my program "CyUsbCom.cpp"
function: BOOL CyUsbCom::SentData( BYTE *pSource, unsigned Length )
how many times when it fails, is mutative.