5 Replies Latest reply on Jan 29, 2020 2:22 AM by DheerajP_41

    CYW20819/ Recommended way to use WDT

    YoTa_1693656

      Hello Cypress IoT team

       

      This thread is related to below.

      https://community.cypress.com/thread/50272

       

      We evaluate CYW20819 with MoodusToolBox. Under our evaluation, when watchdog timer(WDT) exceeds timeout then the chip looks like hang up. The expected behavior is re-booting the chip after the timeout.

      So could you tell us the recommended way to use WDT?

       

      Thanks,

      Yoshinori Takano

        • 1. Re: CYW20819/ Recommended way to use WDT
          DheerajP_41

          Hi Yoshinori Takano

           

          I suspect that the threadFunctionSppTx() uses the CPU for more than 2sec continuously and WDT doesn't get chance to restart the counter. And issue occurs. But ideally it should generate a system reset on time out. It should not hang.

           

          Other chance is threadFunctionSppTx() tries to send excessive/erroneous data on EA connection in wiced_bt_spp_send_session_data() and it hangs there.

           

          When I introduced some delay in the definition of threadFunctionSppTx() then I couldn't reproduce the issue. Data transmission happens successfully without any hang. Seems like little strange issue.

          I am trying to do some H/W debugging to analyze the issue. I will let you know the status ASAP.

           

          Thanks,

          -Dheeraj

          • 2. Re: CYW20819/ Recommended way to use WDT
            YoTa_1693656

            Hello Dheeraj-san

             

            Thank you for your reply. I'm waiting for your update.

             

            Thanks,

            Yoshinori Takano

            • 3. Re: CYW20819/ Recommended way to use WDT
              DheerajP_41

              Hi Yoshinori Takano,

               

              One intermediate update:

              From my testing, I could see that after sending few bytes of data the flow control gets disabled in the spp_lib because spp_port_event_cback  doesn’t get expected events. So threadFunctionSppTx getting looped in the below check.

              ret = wiced_bt_spp_can_send_more_data(spp_handle);

              if(!ret){

                  continue;

              }

               

              Introducing a small delay (rtos, or debug_print) actually solves the issue (device does not hang).

              I feel, few more testing need to be done here.

               

              Thanks,

              -Dheeraj

               

               

              • 4. Re: CYW20819/ Recommended way to use WDT
                YoTa_1693656

                Hello Dheeraj-san

                 

                 

                Thank you for your update. I also found that this issue was solved by adding a small delay as you said.

                 

                My question is simple.  If chip encounters hang-up situations like getting a loop, we expect chip rebooting by WDT.

                1)Could you check whether WDT works well?

                2)If WDT does not work well in the current status,  how should we use it correctly? (Do you know the recommended way to use WDT?)

                 

                Please focus on the WDT behavior.

                 

                Thanks,

                Yoshinori Takano

                • 5. Re: CYW20819/ Recommended way to use WDT
                  DheerajP_41

                  Hi Yoshinori Takano,

                   

                   

                  Our dev team has detected and fixing an issue related to WDT soft reset. It will be fixed in the future SDK release.

                  Please ensure that non of the application thread are not processing more than 2 sec (WDT timeout) continuously.

                  Try to introduce the add function or some timeout when you are send ing big amount of data at a time.

                   

                  Thanks,

                  -Dheeraj

                  1 of 1 people found this helpful