Get Garbled on CyU3PDebugPrint

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

cross mob
xixu_4093676
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

Actually, The Uart console get following output:

ÿÿ?bmReqType 0x40 bRequest 0x3 wValue 0x2 wIndex 0x2 wLength 0x0

ÿÿSet ERROR_FLAG

the Correctly ousput should be:

bmReqType 0x40 bRequest 0x3 wValue 0x2 wIndex 0x2 wLength 0x0

Set ERROR_FLAG

Also, I create Timer with CyU3PTimerCreate() and Add the debug message output in the CallBack route,

But I don't see any debug message output.

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

- You can refer to this KBA Use of CyU3PDebugPreamble() API – KBA227492 . This will help to remove the garbage prints.

- CyU3PDebugprint() is a blocking API and cannot be used in the interrupt callback. Instead you can use a global variable or set an event in callback and check for that event in the for{} loop and make a call for debugprint (in thread function).

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
3 Replies
xixu_4093676
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

I get more garbled code :

ÿÿI2C Init Successful
                     ÿÿ"Get Event! evtype=0xB evdata=0x0
ÿÿ"Get Event! evtype=0x0 evdata=0x1
ÿÿ"Get Event! evtype=0x3 evdata=0x0
ÿÿ"Get Event! evtype=0x2 evdata=0x0
ÿÿ"Get Event! evtype=0x2 evdata=0x0
ÿÿ"Get Event! evtype=0x3 evdata=0x0
ÿÿ"Get Event! evtype=0x8 evdata=0x0
ÿÿ"Get Event! evtype=0x5 evdata=0x1
ÿÿUSB Init Successful
                      ÿÿCyFxUvcAppGpifInit...
ÿÿ?bmReqType 0x81 bRequest 0x0 wValue 0x0 wIndex 0x0 wLength 0x2
ÿÿ  pected CTL Command bmReqType:0xLcZؚ  ½/h®9EG¤Ɋϭ"+m4V [+Iq U»ng  ¤iª\ڙ  .ۮ>Թ½vk¿¥卽`Rؿʖͨ=µ  xEi§h@_(ޮ¬ޠuɃ!5norAƹ}~შɈj΃i  t`(Mf»°8LN숁  -³°Ħ\¢C¯Ҡl41:­©/͝~·똤¼O¤ÿÿ?bmReqType 0x2 bRequest 0x1 wValue 0x0 wIndex 0x83 wLength 0x0
ÿÿ  pected CTL Command bmReqType:0x4)ļ.  rº¨$
                                             X邮 Ȩ),þ#ǻ '۪峫ݢш³ #$#  ަa>,Ҽ9o²E͏  窄º h嶙搿 .Ӑש  >l¤

{j  h.-º£µvк5Ҭ¨D9៻IUY8dzG䭿                               

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

Hello,

- You can refer to this KBA Use of CyU3PDebugPreamble() API – KBA227492 . This will help to remove the garbage prints.

- CyU3PDebugprint() is a blocking API and cannot be used in the interrupt callback. Instead you can use a global variable or set an event in callback and check for that event in the for{} loop and make a call for debugprint (in thread function).

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello Rashi,

   Thank you for your response, I fixed the issues.

Regards,

Martin

0 Likes