Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB superspeed peripherals Forum Discussions

Zenith
Level 3
Level 3
100 sign-ins 25 replies posted 50 sign-ins

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.

 

0 Likes
31 Replies
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes
Zenith
Level 3
Level 3
100 sign-ins 25 replies posted 50 sign-ins

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.

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

Hello.

Usbfirmware file attached.

Unfortunately, the application is not in a testable form for you.
This is an application that requires our daq board.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

Hi,

Sorry for the miscommunication. I meant could you share the FX3 firmware source project and the host application source.

Best Regards,
AliAsgar

 

0 Likes

Hi.

I have attached the file below.

1. usb firmware file
2. Read thread : A brief summary..

Thank you,.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

Hello.

Additional test results are attached.

1. "If the transfer fails with error 997, it means there is a timeout."

  - If no data is coming in.
  - Isn't it filtered in the WaitForXfer(&inOvLap[i], 3000)) function?

Thank you .

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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 

0 Likes

Hello.

If an error occurs, the corresponding equipment is not visible in the control center.
So I can't do any tests.

0 Likes
Zenith
Level 3
Level 3
100 sign-ins 25 replies posted 50 sign-ins

Please correct any incorrect information in the previous post.

The error code I received is 997 not 3073.
Sorry for the confusion.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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 

0 Likes

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.

 

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

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.

0 Likes

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?

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

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?

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

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; 

 

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

Hi

I tried, but I don't get the callback function.

The source is attached.. Please check it.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

Hi.

Thank you for your support.

I made the fix as you suggested.
The Result.

  -  glDMARxCount = 3

 -  glDmaTxCount = 0

 

Best Regards.

 

 

0 Likes
Zenith
Level 3
Level 3
100 sign-ins 25 replies posted 50 sign-ins

Hi.

A more detailed situation is attached.
Please check.

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

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.

0 Likes
Zenith
Level 3
Level 3
100 sign-ins 25 replies posted 50 sign-ins

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.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
750 replies posted 50 likes received 500 replies posted

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

0 Likes

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

 

 

0 Likes