UART output message pending problem (Additional Question)

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

cross mob
jech_4828421
Level 3
Level 3
50 sign-ins 25 replies posted 25 sign-ins

Hi, I'm Jay.

The question below has ended, so I'm posting the question again like this.

https://community.infineon.com/t5/USB-Superspeed-Peripherals/UART-output-message-pending-problem/m-p...

 

1. As the message is not working with the default SDK provided firmware also, could you tell me how the uart is connected to the PC?

- I use to connect USB 3.0 cable or USB2.0.
- As shown in the picture below, connect it directly to the PC.

jech_4828421_2-1638165338193.png

- There is using 32bit set mode, but It occurred same problem from 16bit set mode.

jech_4828421_3-1638165360071.png

 

2. Could you try using different cables and check if the issue is seen there also?

- There are same problems from USB 2.0 cable and usb 3.0 cable. It receive the same broken data to connect from various cables.

3. Could you also try using different PC and see if the issue persists.

- I used to another PC's, then It occurred same situations(received broken data).

4. Check the last point in the given KBA : https://community.infineon.com/t5/Knowledge-Base-Articles/FX3-CyU3PDebugPrint-Not-Printing-UART-Debu.... Also compare your schematics with AN70707 schematic checklist.

- This check list are usb setup configurations setup from 16bit or 32bit. and My test board operates normally.
- But Broken data continues to enter intermittently, causing problems.

- Please advise if this problem can occur in software or hardware regarding data breakage.

We've tried so many software attempts, and we can't find a clear answer to this intermittent data breaking problems.
Please help me as much as possible.

I wonder if Cypress can confirm that there is no software problem.
If you are confident that there is no SW problem, it will be a hardware problem and redesign the hardware.

 

Thank you.

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Jay,

We cannot confirm if it is a software problem yet.

Could you try removing/commenting out the below part of the code from your code example, and check if the issue still occurs?

code.PNG

Best Regards,
AliAsgar



View solution in original post

0 Likes
5 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Jay,

We cannot confirm if it is a software problem yet.

Could you try removing/commenting out the below part of the code from your code example, and check if the issue still occurs?

code.PNG

Best Regards,
AliAsgar



0 Likes
jech_4828421
Level 3
Level 3
50 sign-ins 25 replies posted 25 sign-ins

Hi AliAsgar,

I answer to be reply.

Q : Could you try removing/commenting out the below part of the code from your code example, and check if the issue still occurs?

-> If Default SDK firmware sample (UsbUart) is executed after removing the suggested code, no more broken characters occur when checking the Output message.

 

There are UVC_AN75779 + UART operations after removing the suggested code.

  • When UART connect only, Output message is not brokened with SDK firmware example. .
  • But, When UART and UVC connect, It didn't operate UVC streaming.(My prediction: CyU3PDmaChannelSetWrapUp() fuction of your UART suggested code is not call, so UVC streaming is not working. and UART output message is lost.
  • UART and UVC are operating in no problems.  If there is not operate with SW problems, It stop the UVC streaming and only operate the UART messages without UVC streaming.  The reason is that the function is SW update. so It never stop to send messages and occur broken messages.
  • Reference : Increasing the CyU3PThreadSleep from 50 to 100 as shown below reduces the frequency of data breakage, but still causes data breakage, so data coming out through USB cannot be trusted.
  • jech_4828421_0-1638766999105.png

     

 

Best Regards,

Jay

0 Likes

Hi Jay,

From your response, I understood that if the highlighted code is removed, 

1. The UsbUart firmware example works fine.

2. There is no UVC streaming for the UVC + Uart firmware example.

Is my understanding correct?

I did not understand your third point, maybe you could that explain your third point a bit more clearly.

Also could you please tell me why there is a glpktspending++ in the UVC DMA callback function?

Best Regards,
AliAsgar

0 Likes

Hi AliAsgar,

 

1. From your response, I understood that if the highlighted code is removed,

   1) The UsbUart firmware example works fine.

         ==> There is fine.

   2) There is no UVC streaming for the UVC + Uart firmware example.

         ==>  * When connect with UART and UVC.

           - It never works UVC streaming.

           - Some UART output messages are lost.

   3) I did not understand your third point, maybe you could that explain your third point a bit more clearly.

         ==> * When trying to test UVC + Uart firmware example.

           - It temporarily stops the UVC streaming.

           - And UART output message was tested with stopped UVC streaming.

           - As a result, Some UART output message is lost same as the 2).

           The UART output message must not be broken or lost (to make the external software program).

 

2. Also could you please tell me why there is a glpktspending++ in the UVC DMA callback function?         ==>  "glpktspending++" is necessary for the following reasons in the UVC DMA callback function.

          # If glpktspending++ is removed          

   1) When connect with UART and UVC.

      - The broken messages  generates frequently  as shown below.

 

jech_4828421_1-1639097391044.png

 

jech_4828421_2-1639097411917.png

 

  2) When connect with UART and UVC.

           - It temporarily stops the UVC streaming.

           - Same as 1), Broken messages are frequently generated as shown below.

jech_4828421_3-1639097436009.png

 

     # If glpktspending++ include the UVC DMA callback function.

           - Reduces the frequency of broken characters.

           - Instead, This problem is that UART message is pended, so it don't send complete message and it maybe stay DMA Buffer in my custom board(FX3).

           - Therefore, it exists to prevent frequent character breakage.

 

< Final conclusion >

  • Currently, on the Custom Board, the UVC+UART custom source made by our team cannot prevent the output message broken.
  • I've tried and tested a lot with UVC+UART custom sources, but it's not clear if this is a software or hardware issue.
  • Also, even when UVC streaming is stopped during UVC+UART test, UART message breaks frequently.
  • Therefore, it is difficult to develop an external software program in the future because of this message breaking

 

Best Regards, 

Jay

0 Likes

Hi Jay,

Can we go on a call as it may help our debug better and would also make it faster.

Best Regards,
AliAsgar

0 Likes