CYUSB3014 freezes

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

cross mob
orlevi
Level 1
Level 1
First reply posted First question asked Welcome!

Hi,

we are using the cyusb3014 for our image sensor according to the AN75779 application note (UVC). the configuration is standard (bulk in transfers, burst mode of 16 packets)

We occasionally get a retry request from the host, and most of the time it is handled correctly (after the request a few more packets are sent, and then the requested SeqN packet is sent and everything continues as it should)

successful_retry.PNG

but we've noticed that if the EoB (end of burst) packet get send during the few packets that are sent before we respond to the retry, the required SeqN packet is not resent, and everything freezes.

failed_to_retry.PNG

if we limit the burst length to 0 (wait for ack after every packet), we do not encounter this "freezing" behavior.

is this a known issue? 
are we doing  something wrong?

 

thanks!

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

Hi,

I am attaching the FX3 SDK library with the fix. I could not test it at our end as it is hard to reproduce this at our end. So, please test and let me know if the problem persists.

Thanks,
Ajeeth

View solution in original post

0 Likes
8 Replies
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

Hi,

Please answer the following questions:
1. Which version of FX3 SDK you are using?
2. Can you explain when EoB is sent, without responding to Retry? Is there any sequence you followed? How do you reproduce this issue?
3. Can you send the UART debug prints while this issue is seen?
4. Can you share the latest FX3 Firmware project?

Thanks,
Ajeeth

0 Likes

Hi,

  1. we are using version 1.3.4
  2. I cannot explain it, we are not handling the Retry events explicitly.
    regarding the reproduction of the issue, we have several low quality PCBs that cause quite a few Retries on regular operation, so the issue is reproduced organically (statistically we would eventually get a retry at the bad timing). I do not currently have the means to reproduce it artificially.

regarding 3 & 4, I'll check it. 

 

thanks!

Or. 

0 Likes
lock attach
Attachments are accessible only for community members.
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

Hi,

I am attaching the FX3 SDK library with the fix. I could not test it at our end as it is hard to reproduce this at our end. So, please test and let me know if the problem persists.

Thanks,
Ajeeth

0 Likes

thanks, 

we will try it in the coming days.

Or. 

0 Likes

Hi,

we tried the new library, and the behavior did change but it is still failing in a different way.

we can now see that EoB during the extra packets after a retry does not systematically cause a failure, we can see such events happening where we recover successfully, e.g.:

orlevi_0-1679410026949.png

 

however, in some other cases that I can't currently tell what's exactly unique there (not always with EoB packet), we can see that after a Retry,  even though the packet was resent all further packets are aborted. and after a few additional Retry requests for the next packet everything freezes again (see picture below).

on a side note - it seems like whenever the host (driver?) asks twice in a row for a retry for the same packet - it stops responding afterwards. is that a known issue?

orlevi_1-1679410431915.png

thanks!

Or. 

0 Likes
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

Hi,

-> Did you followed our Hardware guidelines(AN70707) while designing the custom board?

It is recommended to follow our guidelines. But you can tune the SS TX lines with the APIs CyU3PUsbSetTxDeemphasis and CyU3PUsbSetTxSwing APIs if you face signal quality issues.

Please refer to the Errata 8 in our FX3 datasheet. Please handle the CYU3P_USBEPSS_RESET_EVT event to resolve this issue. Our GpiftoUsb example available with SDK handles this event.

Thanks,
Ajeeth

0 Likes

Hi,

thanks for your answer. 

we did follow AN70707, but we will check again if we didn't miss anything.

is there any example describing how to tune the SS TX lines?

We also already tried the solution that was suggested in the GPIFtoUSB example, and it didn't seem to make any change, so we removed it. (it didn't seem that we where receiving CYU3P_USBEPSS_RESET_EVT at all).
Does it make sense? We can try it again. 

thanks very much! 

Or. 

0 Likes
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

Hi,

When you say "we have several low-quality PCBs" in your post on Mar 19, 2023, 11:50 PM, what do you mean? Do you have any signal integrity issues? Please follow our guidelines while designing the hardware.

Please refer to the FX3 API guide in the path"C:/Program Files (x86)/Cypress/EZ-USB FX3 SDK/1.3/doc/firmware/" after SDK installation to know more about the APIs CyU3PUsbSetTxDeemphasis and CyU3PUsbSetTxSwing.

Please refer to this thread to calculate the CyU3PUsbSetTxDeemphasis value.
https://community.infineon.com/t5/USB-superspeed-peripherals/FX3-TX-de-emphasis-value/td-p/290348

It is recommended to handle CYU3P_USBEPSS_RESET_EVT so that host can restart the transfer.

Thanks,
Ajeeth

0 Likes