FX3 xferdata API returns NULL packet | Cypress Semiconductor
FX3 xferdata API returns NULL packet
My VB application working on .NET4.0 Windows 8.1 x64 receives bulk data from FX3 via USB3.0 and sometimes xferdata API returns full of NULL packet.
For example, when the API receives 14.296bytes of data, length parameter is precisely returned 14,296 bytes but the buffer contains all NULL of data.
In this time, on SysNucleus's USBTrace program shows correct packet in the trace dump instead of NULLs.
So, I suppose data is transferred fine between FX3 and the driver, but the driver and API.
Here is snip of the codes.
Any ideas ?
Dim XferCompleted As Boolean = False
Dim Reclen As Integer = 0
Dim curEndPt As CyUSBEndPoint = curRcvEndPt.GetEndPt()
Reclen = Data.Length
If curEndPt IsNot Nothing Then
If (curEndPt.bIn) Then
Dim bulkEpt As CyBulkEndPoint = CType(curEndPt, CyBulkEndPoint)
bulkEpt.TimeOut = TimeoutReceive ' 1sec
XferCompleted = bulkEpt.XferData(Data, Reclen, False) ' <----- Reclen is 14,296 but Data is all Nulls...
If Reclen <> 0 Then
XferCompleted = True