Uart Debug

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

cross mob
michalzoldak
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello everyone,

I am currently working on Psoc 6 BLE PIONEER KIT and wanted to configure debug in PC terminal. After initializing UART and sending data frame some weird characters appear on computer. Additionaly I've used Basic Uart Implementation project from Cypress YT channel (https://www.youtube.com/watch?v=ZJOF2f423nI&t=297s) - in which messages sent from PsoC Creator are weird but part:


c = getchar();
if(c)
{
printf("%c\r\n",c);
}

works fine...

I've tried changing baud rate but it didn't help...

Few weeks ago everything worked fine. Do anyone have idea what may cause the problem?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @michalzoldak

I am not sure I understood your query entirely. According to my understanding, the printf statements in your project work correctly and the direct UART send API is not sending data accurately. Please correct me if I am wrong. 
It would really help if you could share the project or snapshots of the code that is working with the serial terminal log. I had the same BasicUART project created a long time back. I am sharing it here for your reference. 

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @michalzoldak

I am not sure I understood your query entirely. According to my understanding, the printf statements in your project work correctly and the direct UART send API is not sending data accurately. Please correct me if I am wrong. 
It would really help if you could share the project or snapshots of the code that is working with the serial terminal log. I had the same BasicUART project created a long time back. I am sharing it here for your reference. 

Thanks and Regards,
Rakshith M B
0 Likes

michalzoldak_0-1620394927354.png

Yes, when I want to send something from code, those weird letters appears, getchar works fine.

I have spotted same problem when I've used PDL uart transmit, even tough strings in sent buffers looked fine. Maybe it's some HW problem (I have specially bought new usb-c cable,didn't help ;|)

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @michalzoldak

Can you please let me know if you tried the example project that is shared in the previous response? I do observe invalid characters on the serial terminal sometimes. Closing the terminal and setting up the serial port again generally solves this issue. However, this could be serial terminal specific.

Thanks and Regards,
Rakshith M B
0 Likes