3 Replies Latest reply on Aug 18, 2019 7:58 PM by xixu_4093676

    Get Garbled on CyU3PDebugPrint

    xixu_4093676

      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.

        • 1. Re: Get Garbled on CyU3PDebugPrint
          xixu_4093676

          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䭿                               

          • 2. Re: Get Garbled on CyU3PDebugPrint
            RashiV_61

            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

            • 3. Re: Get Garbled on CyU3PDebugPrint
              xixu_4093676

              Hello Rashi,

               

                 Thank you for your response, I fixed the issues.

               

              Regards,

              Martin