cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

Hello everyone:

  My project was originally created in the 1.3.3 SDK, and both the Release version and the Debug version can run very well. When I upgraded the SDK to 1.3.4, I found that my project was able to run well under the Debug version, but the Release version would fail.Have you encountered this situation?

Here is my questions:

     1.I hope to get the difference between the Debug version and the Release version.

     2.I want to know where the Release version compiler will optimize.

     3.I hope to get more details about the APIs such as CyU3PDebugPrint(), CyU3PUartTransmitBytes(), CyU3PUartReceiveBytes(), etc.

     4.I want to know which way to find a solution to this situation? Or what is the problem?

Here is my configuration of paths:

1.

123.png

2.The operating system used is Windows10.

Attachment is my source code

everyone can reply.

Best regards,

Luca L.

0 Likes
1 Solution
Anonymous
Not applicable

Hello Srinath:

     I have already discovered the cause of the problem. When I handle the SET_CUR command,I sent control commands to other devices through the serial port.I used register mode at the time,Now I am changing to DMA mode, the device is running very well.

     Anyway, I strongly recommend that you test the CyU3PUartTransmitBytes API again. I highly doubt that there is an incomprehensible bug after this API upgrade.Because when I remove this API and replace the CyU3PDmaChannelCommitBuffer, the device response rate is greatly improved.

     If you have test results, please let me know.Thank you.

My Environment:

OS: Windows 10

Host Controller: Intel

Host application: AMCap

Best Regards,

Luca L

View solution in original post

0 Likes
11 Replies
JoMe_264151
Expert II

Usual error is:

You are altering a global variable in an interrupt handler which is not declared as "volatile". See here.

Bob

PS: I do not use .raw files, so I didn't look into your code. Please use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

0 Likes
Anonymous
Not applicable

Hello Bob:

     Thank you for your reply,I have very carefully modified some global variables to be volatile. But still no effect. . .In addition, I am using FX3 EZ USB for Video transmission. I am sorry that I did not describe the problem clearly....This question is really puzzling, now I have no clue.

Best regards,

Luca L.

0 Likes
SrinathS_16
Moderator
Moderator

Hello Luca,

- I am able to build the project in Release mode and successfully load the firmware into the device. Please let me know your point of issue. Do you face issue in building the release version of the firmware or is it during the loading of firmware into the device. In case it is during firmware loading, please share the information seen on the host with respect to device enumeration.

- The debug mode contains additional symbols to enable JTAG debugging and hence the firmware size is larger compared to release build.

- Please refer to the FX3 API Guide that comes with the FX3 SDK for details on the FX3 APIs.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hello Srinath:

     Thank you for your reply,I have solved this problem.I added a function that serial port to send 24bytes data in the CyFxUvcAppGpifInit.Then when CyU3PEventGet recieved CY_FX_UVC_STREAM_ABORT_EVENT, I reset DMAChannel and Gpif.The device worked well !

     But now I have a new problem. When I use AMCap or e-CAMView to send a control command to the camera,such as increasing or decreasing brightness, etc.Our device received images will appear very serious dropped frames.I don't know what went wrong,can you give me a direction to solve this problem?

Best regards,

Luca L.

0 Likes
SrinathS_16
Moderator
Moderator

Hello Luca,

Please refer to the below document. Try implementing it according to your project and let me know the results.

EZ-USB® FX3™ Issues With Simultaneous Bulk-IN and Control-IN Transfers In USB 2.0 – KBA92475

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hello Srinath:

     Thank you for your reply.

     Well,my project uses two threads to transfer YUV2, 1080P ,60FPS video. One is UVCAppThread_Entry and the other is UVCAppEP0Thread_Entry.

   

     -The FPGA is directly connected to FX3. The video stream data is accepted by CyU3PDmaMultiChannel, and the status is changed by GPIF.

     - UVCAppThread_Entry monitors and processes the STREAM_EVENT and commits video data.

     -UVCAppEP0Thread_Entry is used to transfer UVC control request.

     Now my problem is that when the host sends a UVC control signal to the device, the device image transmission will produce a very serious drop frame.

     When the host sends a UVC control signal and UVCAppEP0Thread_Entry has received this event, should I suspend the DmaMultiChannel in UVCAppThread_Entry as you wish? Does this affect the real-time transmission of video?

Best regards,

Luca L.

0 Likes
Anonymous
Not applicable

Hello Srinath:

    

     After a few days of analysis ,I find after upgrade SDK the host sends control command reception time becomes abnormally long,the time will even reach 200ms.However, this time is only less than 10ms under SDK1.3.3. This should be the key to the problem. But I dont know how to solve.Can you give me some help?

     This picture is the time of the command sent under SDK1.3.3:

     SDK1.3.3.png

     This picture is the time of the command sent under SDK1.3.4:

     SDK1.3.4.png

Best regards,

Luca L.

0 Likes
SrinathS_16
Moderator
Moderator

Hello Luca,

Please let me know if you are using FX3 in HS or SS mode.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hello Srinath:

     Thank you for your reply.

     Yes,We enumerate HS and SS descriptors,In general, our device performs video transmission in SS mode.

     PS:I just found out in the community that someone has encountered similar problems. Is this a bug in SDK 1.3.4?

     This is the link to that question:FX3 SDK 1.3.4 issue with using interrupt endpoint to respond to UVC control requests

     If not,can you give me a direction to solve this problem?

Best regards,

Luca L.

0 Likes
SrinathS_16
Moderator
Moderator

Hello Luca L,

I tested using the UVC application from SDK 1.3.4 and I found the time for SET_CUR request (for brightness control) to be ~712us. Please find the screenshot of the USB trace.

Environment:

OS: Windows 10 RS4

Host Controller: Intel

Host application: AMCap

Please let me know the details of the host application and the OS in which you have tested.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hello Srinath:

     I have already discovered the cause of the problem. When I handle the SET_CUR command,I sent control commands to other devices through the serial port.I used register mode at the time,Now I am changing to DMA mode, the device is running very well.

     Anyway, I strongly recommend that you test the CyU3PUartTransmitBytes API again. I highly doubt that there is an incomprehensible bug after this API upgrade.Because when I remove this API and replace the CyU3PDmaChannelCommitBuffer, the device response rate is greatly improved.

     If you have test results, please let me know.Thank you.

My Environment:

OS: Windows 10

Host Controller: Intel

Host application: AMCap

Best Regards,

Luca L

View solution in original post

0 Likes