debug prints incorrect instead getting random data

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

cross mob
GiSa_4520796
Level 4
Level 4
First like received

Hello,

Actually we are not getting debug prints correctly instead we are getting random data in Teraterm.This is the reason I am not able to send debugprints right now.Already we are working on that I will share once it is success.

Regards,

Srujana.

0 Likes
1 Solution

Hello Srujana,

As per our discussion, the garbage data was due to bad cable (UART- USB). You can try changing the cable.

Also as per the FX3S datasheet, the UART pins will be on 43- 46 pins only when lpp mode is default

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
19 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Sruajana,

Please send the snapshot of teraterm and also let me know what is  UART pins you are using.

Regards,

Rashi

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

Hello,

Please refer to the below attached snapshots.

let me know what is  UART pins you are using.

     I am using 46-49 pins for UART.

Regards,

Srujana.

0 Likes

Sruajana,

Can you please let me know which pins are used for UART

Also try resetting the terminal from Tera term Control>Reset terminal

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello,

As I mentioned in the previous response I am using 46-49 pins for UART.

Also try resetting the terminal from Tera term Control>Reset terminal

     Tried,but the result was same.

what are the steps you follow to print in Teraterm?

Regards,

Srujana.

0 Likes

Hello Srujana,

Apologies for missing out the UART pins

In the firmware i shared the bus width is 16 bit and lpp mode is UART only. According to this configuration the UART pins are at PINS GPIO [53] - [56] . Our  board that is FX3S board is also having same pins for UART. So for this firmware the UART signals would be coming on  pins [53] - [56]

fx3s_datasheet.PNG

As you are having UART connector on PINS [46] [49] you can route Pins [53] -[56] to  [46] [49] using jumper wires

Regards,

Rashi

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

Hello,

In the firmware i shared the bus width is 16 bit and lpp mode is UART only. According to this configuration the UART pins are at PINS GPIO [53] - [56] .

     Yes,but I changed lpp mode to default.So,now the UART pins will be 46-49 only.

Regards,

Srujana.

0 Likes

Hello Srujana,

Yes, you can check that

or keep the lpp mode to UART ONLY and route the  PINS [46] [49] you can route Pins [53] -[56] to  [46] [49] using jumper wires.

Also add this API in the firmware

    /* Initialize the debug module. */

    apiRetStatus = CyU3PDebugInit (CY_U3P_LPP_SOCKET_UART_CONS, 8);

    if (apiRetStatus != CY_U3P_SUCCESS)

    {

        CyFxAppErrorHandler(apiRetStatus);

    }

    /* Disable the header associated with debug logs. */

    CyU3PDebugPreamble (CyFalse);

Steps:

- Build the firmware

- Open Tera term set the port settings according to the firmware settings (as per the UART configuration)

- Program the FX3S

- If garbage data - Terminal>Reset (multiple times)

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello,

I am following the steps as above and i am getting the same data.

Now,I resetted the terminal for multiple times and the result was same.

Regards,

Srujana.

0 Likes

Srujana,

Please refer to this KBA FX3 UART Prints Garbage Data During JTAG Debugging - KBA86728 and confirm you are debugging through  JTAG at the same time

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello,

Thak you for sharing the above KBA.

I added the one corresponding to my frequency in debug configuration but it is still printing some garbage data only.

Regards,

Srujana.

0 Likes

Hello,

Can you please help me for UART Debugprints So that my problem will come to an end?

Regards,

Srujana.

0 Likes

Hello Srujana,

Did you try the second option as per previous response by setting the lpp mode to UART only and then routing the UART pins [53] -[56]  to the pins connected t to UART connector on your board [46]-[49].

Or you can try printing without using the JTAG debugger

Also check if any of the API's related to UART is failing? For example debuginit API

Regards,

Rashi

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

Hello,

To route the pins 53-56 pins to 46-49,we have implemented them for booting SPI flash as attached.

Also check if any of the API's related to UART is failing? For example debuginit API

     I checked that before itself like Uartinit,UartSetConfig etc.

Regards,

Srujana.

0 Likes

Hello Srujana,

Thank you for the update.

Can you share the schematics (UART pins to UART connector).

Have you used the UART for debugging before on this board. Have you checked this functionality before?

Can  you try printing without using the JTAG debugger

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello,

Have you used the UART for debugging before on this board. Have you checked this functionality before?

     Yes,I checked before on the same board.It was printing fine before.Now I am trying the same but it is printing garbage data.

Can  you try printing without using the JTAG debugger

     Now,I am trying to print without using JTAG only.

Regards,

Srujana.

0 Likes

Hello Srujana,

Can you check with some default firmware with the same settings that worked before.

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello,

I have one doubt here.....CyFx3BootUartPrintMessage  Is this API should be there compulsary in that firmware?I think this API is necessary for getting UART prints.

Regards,

Srujana.

0 Likes

Hello Srujana,

This API is used to get print a formatted string out through the UART from the second stage boot loader.

Did you get the prints using this?

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello Srujana,

As per our discussion, the garbage data was due to bad cable (UART- USB). You can try changing the cable.

Also as per the FX3S datasheet, the UART pins will be on 43- 46 pins only when lpp mode is default

Regards,

Rashi

Regards,
Rashi
0 Likes