You are here

AN75779 is not STABLE AT ALL ! | Cypress Semiconductor

AN75779 is not STABLE AT ALL !

Summary: 12 Replies, Latest post by joseph rojas on 24 Sep 2016 10:48 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
admin_1473091's picture
User
8 posts

It will just stop sending data to the host after some time (minutes).

Most of the time i get "Error in multichannelcommitbuffer: Code = 71, size = 3FFF, dmaDone 0-7" error, but sometimes it just stops outputting frames without it (the COM port stops printing the frame numbers, i've even made it just output + or - instead of full frame number in case that was delaying the CPU enough to break it, but no.). Sometimes it is enough to just disconnect/reconnect the video stream in virtualdub/OBS, sometimes the ARM cpu needs a reboot to fix the stall.

And sometimes it does this: https://images.sshnuke.net/2016-01-04_00-38-57.png the clear feature request was initiated by me to try and re-start it, but now its stuck and requires a reboot.

The example is exactly the code with the AN, i just set 32bits to true in the C code, then in the GPIF2 editor made the requested modifications for 32bit operation: counter limits set to 4091. I've also modified the descriptor for 720p60 operation.

 

The waveforms of FV and LV are as such: https://images.sshnuke.net/2016-01-04_00-41-06.png

FV goes high at the same time as first LV does, to give the ARM CPU as much time to reset DMA and state machine as possible (it is 407uS of LOW value of FV in that screenshot)

 

This unstable behaviour is quite unacceptable for a 'complete' video solution...and you cannot really debug the GPIF2 state machine/DMA engine, just the ARM cpu, so how does this get fixed into a usable video device ? This is all in Release mode btw, not Debug.

 

EDIT: This is what it looks like when it requires a ARM reboot to get unstuck: https://images.sshnuke.net/2016-01-04_01-15-41.png

The 'backflow detect' feature does print backflow detected when it stops working, but does nothing to recover from the situation.

USB Analyzer screenshot of one of the situations: https://images.sshnuke.net/2016-01-04_09-13-03.png

 

It would seem that adding some more code to properly 'unstick' the DMA channels in the case the host could not consume all the data (so that the next frame keeps working) would make this example work properly.

ajai's picture
Cypress Employee
78 posts

This may require a more complex analysis to find the problem. Can you create a tech support case so that we can debug this? 

BTW, please use the latest version of the firmware available on the website to check if it helps. 

admin_1473091's picture
User
8 posts

What is the latest version of the firmware ? I've only been able to find the one attached to the AN page, which doesnt have the GPIF2 designer project in it, and the reply one of the engineers made to a forum thread here asking about the GPIF2 designer project, so it includes that project. The only difference between the two is that CyU3PUsbSendEP0Data calls have 1 as the count in the 2nd one. Both are from 2013 and use the 4.5.1 GCC thing, which i've resolved by just using the .project/.cproject files from the USBVideoBulk sample in the SDK.

 

EDIT: Just looking at the CFX3 UVC samples, they seem to be way more robust, have a reset timer, and they resume streaming from the thread that last finished, not always from thread 0, so that's nice.

It would be good if the ancient 2013 GPIF2 UVC.c file could be updated to these new standards. I've done so myself, and it works, but i'll see if its more stable than the old uvc.c or not (ported Cx3UvcAS0260 to use GPIF2 instead of MIPI, they were similar, why did it have a different buffer size of 0x2FF0 though, and 12 buffers, not 16.)

EDIT2: It's not more stable. It stops at about the same frequency, and the RESET_TIMER in that firmware does not fix it when it triggers.

jme
jme's picture
User
19 posts

The missing GPIF designer file was posted here: http://www.cypress.com/forum/usb-30-super-speed/re-75779-implement-image...

HTH

Jerry.

admin_1473091's picture
User
8 posts

My problem was resolved by technical support (they added a reset timer that actually works to the AN UVC sample). I'll ask them to update the AN with the new UVC code if possible.

Cycad Hsu's picture
User
12 posts

Unfortunately, I encountered the same problem. Would you send me the relative code(added reset timer)?

E-mail: richardszf@foxmail.com

Best Regards!

FSY
user_499995435's picture
User
5 posts

   Hopping to see the updated version of UVC soon...

hananya.segal_1866966's picture
User
2 posts

May you please send me the code also?

My mail is: hananya.segal@gmail.com.

 

Thanks in advanced,

Hananya

joseph rojas's picture
User
8 posts

Hello , could you publish the modifications on code to solve the problem?. Thanks.

admin_1473091's picture
User
8 posts

I don't have the download anymore either because for some reason they remove attachments from their support tickets after they get closed ?!

In the ticket i've asked Cypress to modify the AN with the included more robust code, as it is their right and not mine to redistribute it.

So i suggest that everyone who wants the code make a support ticket in order to get it, if its not already on the AN.

joseph rojas's picture
User
8 posts

Thanks for share with us the information. Following your advise I'll open a support ticket.

It seems that this kind of "watchdog timer" is included in the CX3 version of UVC but not in the FX3 version.

Regards.

Log in to post new comments.