FX3 UART debug print message with leading garbage character

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.
KeWa_2323766
Level 4
Level 4
25 sign-ins First solution authored 25 replies posted

I run the GpioApp example firmware on FX3 demo board CYUSB3KIT-003, the SuperSpeed Explorer Kit. I added only one  function to test the UART debugging at line 242.  

      CyU3PDebugPrint (4, "high, returned = %d\n",apiRetStatus);

Please see the attached code.

USB2.0 microB on demo board is connected to PC. The debugging message print both intended message and some leading garbage characters.

pastedImage_0.png

How to remove the garbage leading character?

0 Likes
1 Solution

Hello,

In the CyFxDebugInit() function block, please add the below code after the CyU3PDebugInit() API call.

CyU3PDebugPreamble(CyFalse);

When the above API (CyU3PDebugPreamble() API) is not used, FX3 sends an additional 8 bytes data as preamble onto the UART. Out of these 8 bytes, only the printable characters get displayed on the Terminal while the rest may be seen as white spaces/garbage. This is the reason why additional garbage characters were seen on the terminal.

You can refer to the cyu3debug.c file in the FX3 SDK firmware source to understand more about the CyU3PDebugPrint() and the use of CyU3PDebugPreamble() APIs

Best regards,
Srinath S

View solution in original post

4 Replies