3 Replies Latest reply on Jul 1, 2015 11:40 AM by userc_13286 Branched from an earlier discussion.

    WICED Sense debug with UART (continued)

      Hi userc_6396

       

      Per the thread you created here: WICED Sense debug with UART

       

      even after a long time and discussion closed, I would like to thank you for sharing this.

      Even if this is not a real debug board, if it is possible then why not.

       

      It helps my case where I don't know what is happening and the Tag can't connect and loses connection quickly.

       

      I don't understand the answer from Mr mwf_mmfae what is the link with your finding. Anyway, for all the readers that end up on this thread, in case they have the same blocking point as me, I remind some important steps:

      - remove the battery and disconnect, reconnect usb to be able to flash updated soft

      - remove usb

      - set the battery as when usb is set, the wake button doesn't work (at least not for me)

      - reconnect usb : only then you can open the terminal tool for port log display

      - if using android and combined with Android issue, then additionally to those steps, pair with the phone as soon as the battery has contact

       

      This is a nice exercise for hands agility if you want to have a log early on Tag startup.

       

      additional hint, I have set a point Tprintf(".", 0); in the fine timer and a dash Tprintf("-", 0); on the tx opportunity,

      now the Tag behavior monitoring can really start

       

      Wassim

        • 1. Re: WICED Sense debug with UART (continued)

          An example of my debug log :

          point "." is finetimer

          dash "-" is tx opportunity

          rest is self explanatory

           

          .-.-.-.-.-.-.-.-.-.-.--.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.write_handler

          -.-.write_handler

          ...-.....-.....-.....-.....-....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....

          -.....-.....-.....-.....-.....-.....-....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....-..

          ...-.....-.....-.....-.....-.....-.....-.....-....-.....-.....-.....-.....-.....-.....-.....-.....-.....-.....

          -.....-.....-.....-.....-.....-.....-.....-.....-.....-....-.....-.....-.....-.....-.....-.....-.....-.....-..

          ...-.....-.....-.....-.....-.....-.....-.....-.....-.....-....-.....-.....-.....-.....-.....-.....-.....-.....

          -.....-.....-.....-.....-.....-.....-.....-.....-.....-....smp_bond_result

          .-.....-....-.....-.....-.....-.....-WICED: Disconnected

          ............................................................................................................

          ..advertisement_stopped

          • 2. Re: WICED Sense debug with UART (continued)

            One more hint,

             

            it works very well when initialized at the end of the create function, to be sure not to miss any event on the log :

             

            // Create WICED Sense application

            void wiced_sense_create(void)

            {

            ...

             

            if(sUARTInitialized==0)
            {
            puart_init();
            sUARTInitialized = 1;
            }
            Tprintf("create\r\n",0);

            }

            • 3. Re: WICED Sense debug with UART (continued)

              Update about debugging with UART :

               

              1) I think the uart drops a lot of current from wiced sense, looks like with uart enabled, it only works when attached to usb.

              Can't make the same program work on battery (3V). When recompiling without uart, it works on battery.

               

              2) To debug the tag with uart, the easiest way is to :

              - remove the battery

              - open the uart log terminal

              - as wake buttons is ineffective when usb connected, a trick is to rebuild and flash, that launches the application and the uart is working

               

              Wassim