UART output message pending problem

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

cross mob
lock attach
Attachments are accessible only for community members.
jech_4828421
Level 3
Level 3
50 sign-ins 25 replies posted 25 sign-ins

Hi, 

I modify to send UVC and UART by my custom board.

but, I had one problem.

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).

I checked red sign(Highlight).

jech_4828421_0-1630990576487.png

so, I tried to fix this problem.

The solved solution is that it was modified to operate pending function(highlight) at 30 frames.

jech_4828421_1-1631063271344.png

But, Another problem has occurred. 

Broken characters appear intermittently as shown below.

jech_4828421_2-1631063399038.png

 

I send the code as an attachment.

 

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

Hi,

Please let us know what exactly is the application to understand the issue better.
Also please let us know the exact usage of pktspending in your application.

Could you share your complete firmware project folder with us?

Best Regards,
AliAsgar

0 Likes
lock attach
Attachments are accessible only for community members.

Hi, AliAsgar

I send the code as an attachment.

There are original file(fending problem) and modified file(solved solution).

 

Best Regards,

Jay

0 Likes

Hi Jay,

Could you let me know your exact application and exact operation of FX3 for us to understand the issue better?

Best Regards,
AliAsgar

0 Likes

Hi AliAsgar,

I received help through the link below.

https://community.cypress.com/t5/USB-Superspeed-Peripherals/FX3-UVC-black-screen-in-custom-board/m-p...

Additional, I add UART Output by our system. so if the custom board connect to PC, Two devices(camera, COM port) are connected to the device manager(windows).

But, COM port message is not output normally. 

I think that there is DMA problem. When glpktsPending function is modified, it operates normally. but  the message is broken.

0 Likes

Hi,

I am working on this. Meanwhile, could you tell me how is data being sent to the COM port?

Best Regards,
AliAsgar

0 Likes

Hi, AliAsgar

My answer is late.

The reports of the recent analysis are as follows.

Additional, This problem is different.

Our test code base is only UART communication program by cypress sample code(Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbuart).

But the problem is same.

My Board UART Setting is below.

    glUartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200;
    glUartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT;
    glUartConfig.parity = CY_U3P_UART_NO_PARITY;
    glUartConfig.flowCtrl = CyFalse;
    glUartConfig.txEnable = CyTrue;
    glUartConfig.rxEnable = CyTrue;
    glUartConfig.isDma = CyTrue;

jech_4828421_3-1634127541924.png

 

Analysis of UART Serial Data Problem

  • Callback function  received broken data to input buffer.
  • The code is below.

jech_4828421_1-1634126819189.png

 

Best Regards,

Jay

0 Likes

Hi Jay,

1. Could you let us know if the issue is occurring on only the CDC firmware example i.e, UsbUart example in the FX3 SDK without any modifications?

2.  What is being sent and what is expected to be received?

3.  Is the issue occurring when video data is being sent simultaneously or does it occur when there is no video data?

Best Regards,
AliAsgar

0 Likes

Hi AliAsgar,

I know this situation is HW problem or SW problem and I want to be helped to solve it.
It's an answer to a question.
1. Could you let us know if the issue is occurring on only the CDC firmware example i.e, UsbUart example in the FX3 SDK without any modifications?
-> It also occur the broken message from CDC firmware example.
-> My sample code status stop video streaming and also occur from USB2.0 and USB3.0.

2. What is being sent and what is expected to be received?
-> For example, Send Message : Hex data(02 02 06 00 30 00 00 00 00 00 00 00 34 03)
Received Message : Hex data(02 02 06 00 30 00 00 00 00 00 00 03 40 3)
It lost 1 or 2 bit.
-> So, I don't trust the message from FX3.

3. Is the issue occurring when video data is being sent simultaneously or does it occur when there is no video data?
-> It occur to send only UART without video streaming.
-> This test has been done so many times and problems arise regardless of video data.

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-1635383355112.png

 

Best Regards,

Jay

0 Likes

Hi Jay,

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?
Could you try using different cables and check if the issue is seen there also?
Could you also try using different PC and see if the issue persists.

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.

Best Regards,
AliAsgar

0 Likes