- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am developing real-time data transmission using fx3 (USB\VID_04B4&PID_00F3).
The number of modules is a system that receives data at the same time using 7 to 8 modules.
But
Errors often occur in FinishDataXfer(), and the error codes are as
The source is roughly as follows. follows:
lease check the attached file for the approximate source and situation.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To summarize:
1. Streaming by directly connecting multiple FX3 with PC works fine.
2. Streaming by connecting multiple FX3 with CY4601 (HX3) and then PC works fine.
3. Streaming by connecting multiple FX3 with HX3 on a custom board, fails.
Am I right? If yes, this points to an issue on your custom board specifically and not on the FX3 firmware.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have never encountered the error code of 3073 before. We do not know what it corresponds to.
Could you let us know what your application firmware is? If it is a continuous streaming kind, can you test with the Streamer host application provided in the EZ-USB FX3 SDK and let us know if the issue is seen?
Can you please share your host application with us to try to reproduce the issue you are facing?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
At first, I used v1.2.3.34, but I am testing by finding v1.24.0 and v 1.3.0.3.
Drugs If you have a recent driver, please provide it.
For reference, we are using Windows 10 1809_LTSC version.
I'll try the streamer test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for the information on the USB drivers bound to FX3.
Could you share with us the FX3 firmware and Windows host application used for transferring data with us?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry for the miscommunication. I meant could you share the FX3 firmware source project and the host application source.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try transferring data from the Cypress Control Center and let me know what issue is seen.
If the transfer fails with error 997, it means there is a timeout.
Make sure the FPGA is driving signals as per the interface definition of the GPIF 2 Designer.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, you are right the timeout error occurs when the WaitForXfer fails.
I just want to check what error comes up in the control center when you are trying to transfer data to/from FX3. Could you please perform this test and let us know if transfers are happening successfully using control center.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
If an error occurs, the corresponding equipment is not visible in the control center.
So I can't do any tests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please correct any incorrect information in the previous post.
The error code I received is 997 not 3073.
Sorry for the confusion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Error code 997 denotes a timeout. This usually occurs when hosts asks for data, but the device does not have data to transfer.
Please do the following changes for debug:
Change the DMA channel from AUTO to MANUAL channel and register for DMA callback. Count the number of PROD and CONS events in the DMA callback and print it in the thread loop and share the prints with us.
Please check the UsbBulkLoopManual default firmware example for reference.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear AliAsgar.
Thank you for your support.
1.How do I do debugging printing?
2. when does the device disappear from the control center?
- It appears only after rebooting the pc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I see that the code inside the CyFxSlFifoApplnDebugInit() API is commented out. Uncommenting this code will enable debug prints and CyU3PDebugPrint () API can then be used to get the debug prints. Is there any particular reason why the code was commented out?
Device disappears from the Control Center if device enumeration has issues. The UART debug prints will give help us get the reason of why the device disappears from the control center.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
1. Debug message
I enabled "debugging" as you suggested and configured the environment to receive messages.
2. Callback function
I tried to test it by doing, but there is a phenomenon that it stops while downloading the firmware.
I will attach the source, so please check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear AliAsgar
I checked debugging messages with uart.
First. It proceeded with the existing source (CY_U3P_DMA_TYPE_AUTO).
Check result
In CyFxSlFifoApplnUSBEventCB(), "CY_U3P_USB_EVENT_EP_UNDERRUN" occurs, Errcoder997 occurs, and an error occurs in data transmission.
When does this error occur?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
CY_U3P_USB_EVENT_EP_UNDERRUN means that more data has been requested from the endpoint than it can provide. This issue can result when the data has not been committed to the USB endpoint.
Please try the given debug method mentioned earlier : Change the DMA channel from AUTO to MANUAL channel and register for DMA callback. Count the number of PROD and CONS events in the DMA callback and print it in the thread loop and share the prints with us.
I doubt that the DMA buffers are not being filled from the GPIF and hence are not getting committed to the USB.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I tried to register a callback function, but it failed.
I don't know exactly, but our software doesn't work properly when dma is set to manual.
If I don't set dma manually, can I not use the dmacallback function properly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could also try using an AUTO_SIGNAL DMA channel instead of MANUAL to get the DMAcallback. Please enable notifications for PROD and CONS while configuring the DMA channel.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I modified it as below.
// Enabling the callback for produce event.
//dmaCfg.notification = 0;
//dmaCfg.cb = NULL;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaCfg.cb = CyFxBulkLpDmaCallback;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Modify the notifications as follows:
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT
and define counters for both these events.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I see that the DMA channels created are "AUTO" type. However, as I mentioned in my previous post, please change the channel type to "AUTO_SIGNAL" to get the callback notifications.
In the DMA callback, please remove all the logic for DMA buffer handling and just increment the global variables depending on the type of callback event. Please refer to "USBBulkLoopAutoSignal" firmware example from the FX3 SDK for your reference.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
Thank you for your support.
I made the fix as you suggested.
The Result.
- glDMARxCount = 3
- glDmaTxCount = 0
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I assume glDmaTxCount is incremented when a CONS event is received.
From your previous post, it seems that the data is produced properly from the GPIF, but not consumed by USB properly.
Can you try streaming with streamer.exe application without the HUB (CYUSB3314) in between?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To summarize:
1. Streaming by directly connecting multiple FX3 with PC works fine.
2. Streaming by connecting multiple FX3 with CY4601 (HX3) and then PC works fine.
3. Streaming by connecting multiple FX3 with HX3 on a custom board, fails.
Am I right? If yes, this points to an issue on your custom board specifically and not on the FX3 firmware.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
Yes, that's right.
It seems to be a problem that appears when a momentary voltage drop occurs.
We're checking power and more.
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested again.
A 997 error also occurs for No.2.
It also occurs on the USBboard connected to CY4601 (HX3).
The more Usbboards connected, the faster errors seem to occur.
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you program all the FX3 boards with UsbBulkSrcSink firmware and start BULK IN transfers on streamer applications for each of the boards?
Please share a USB hardware trace if possible when the issue is seen. Trace should be taken between the HUB and FX3.
Could you let us know what was inference after debugging when "momentary voltage drop" is seen?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
1. Can you program all the FX3 boards with UsbBulkSrcSink firmware and start BULK IN transfers on streamer applications for each of the boards?
-> Please refer to the attached file on Dec 07, 2022.
- > At some point, the streamer's transmission stops.
2. Could you let us know what was inference after debugging when "momentary voltage drop" is seen?
- I tried slowly stepping down the input voltage from 5 V. When it reaches about 4.7 ~ 4.8V (I'm not sure), it stops returning a 997 error like the error situation I have. So, it seemed that this situation could be the cause of one of the problems.
My error situation occurs within 1 hour at the shortest and within 2-3 days at the longest.
Have you ever tested 6-7 modules in bulk for a long time like me? Anything wrong?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have a question.
1. Endpoint->Timeout = 10000
2. Endpoint->WaitForxFer(&inOverLpa,100);
What is the difference between timeouts No.1 and No.2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>> I have ran 4 FX3 bulk IN streaming with a streamer application. I faced no errors. Two of them had a data rate of ~420MBps and two others had half the data rate ~210MBps. This is because BULK endpoints use up only the available bandwidth on the USB bus, unlike ISOC endpoint which takes up the maximum bandwidth of the USB bus.
>> Could you please share with us a hardware USB protocol analyser trace between FX3 and HUB when the issue is seen?
>>The timeouts in No. 1 and No. 2 are very similar. Both are used for WaitForXfer. For synchronous data transfer (XferData), WaitForXfer is called with timeout No. 1 internally to the XferData API implementation and for asynchronous data transfer (beginDataXfer/WaitForXfer/FinishDataXfer), timeout No. 2 is called explicitly.
>>Just to be clear, no issue is seen with multiple FX3 connected directly to the PC without a HUB. Issue seems to occur only if there is a HUB in between. Am I right?
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I saw in the community that some user had a similar problem as me, but solved it by increasing the time-out value.
So I am also testing by increasing the time-out value.
1. Previous
BlutOut(0x1) : 100
BlutIn(0x81) : 100
BlutOut(0x2) : 3000
BlutIn(0x82) : 3000 <- Occurs ERROR997
2. Current
BlutOut(0x1) : 10000
BlutIn(0x81) : 10000
BlutOut(0x2) : 3000
BlutIn(0x82) : 3000
For a few days, the condition seems more stable than before.
I'll let you know the results after more testing.
Will the error at 0x81 affect 0x82?
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am sorry but I could not understand what you are trying to convey in the previous post. I did not understand what those values are in the previous and current.
Also please let me know what tests are running currently and what is the result of those tests?
Has increasing the timeout value solved your issue?
Please explain the above post in more detail.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
So far I am getting 997 error situation at Endpoint (0x82).
However, I increased the timeout value of endpoint(0x1) from 100 to 1000, not Endpoint(0x82).
As a result of watching for a few days, my system seems more stable than when time-out 100.
That is, I increased the timeout value of endpoint (0x1), but it seems that endpoint (0x82) is more stable.
If an error occurs in an endpoint (0x1) under some circumstances,
Is there a possibility of ep->lasterror( 997) occurring at Endpoint (0x82)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Lasterror()/NtStatus() API call returns the error code returned by the driver from the last call to the XferData, BeginDataXfer, FinishDataXFer or Abort methods.
Hence, if the above Xfer APIs were called for 0x82, Then the following lasterror() API call for 0x82, gives the error on endpoint on 0x82.
Are the transfers happening simultaneously on 0x82 and 0x01/any other endpoints?
Has increasing the timeout value solved your issue?
Best Regards,
AliAsgar