CYW20819/ Recommended way to use WDT

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

cross mob
YoTa_1693656
Level 6
Level 6
Distributor - Marubun (Japan)
250 replies posted 250 sign-ins 100 replies posted

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

0 Likes
5 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi YoTa_1693656

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

0 Likes
YoTa_1693656
Level 6
Level 6
Distributor - Marubun (Japan)
250 replies posted 250 sign-ins 100 replies posted

Hello Dheeraj-san

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

Thanks,

Yoshinori Takano

0 Likes

Hi YoTa_1693656

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

0 Likes
YoTa_1693656
Level 6
Level 6
Distributor - Marubun (Japan)
250 replies posted 250 sign-ins 100 replies posted

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

0 Likes

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