From e0c245cb725bbbd946e65e3514ab927070dd0f09 Mon Sep 17 00:00:00 2001 From: Fred Kellerman <48342622+FredKellerman@users.noreply.github.com> Date: Thu, 18 Apr 2019 23:54:04 -0400 Subject: [PATCH 1/2] Fix for wakeup WILC3000 Wait for clock settle bug --- wilc/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wilc/wilc_wlan.c b/wilc/wilc_wlan.c index 60cc6ef..a0af722 100644 --- a/wilc/wilc_wlan.c +++ b/wilc/wilc_wlan.c @@ -885,7 +885,7 @@ void chip_wakeup_wilc3000(struct wilc *wilc, int source) * If still off, redo the wake up sequence */ while (((clk_status_reg_val & clk_status_bit) == 0) && - (((++trials) % 3) == 0)) { + (((++trials) % 3) != 0)) { /* Wait for the chip to stabilize*/ usleep_range(1000, 1100); From 97251eaaef485968b711fcb1972746889d181501 Mon Sep 17 00:00:00 2001 From: Fred Kellerman <48342622+FredKellerman@users.noreply.github.com> Date: Fri, 19 Apr 2019 10:31:10 -0400 Subject: [PATCH 2/2] Change code to match 3mS wakeup delay comment --- wilc/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wilc/wilc_wlan.c b/wilc/wilc_wlan.c index a0af722..e040737 100644 --- a/wilc/wilc_wlan.c +++ b/wilc/wilc_wlan.c @@ -885,7 +885,7 @@ void chip_wakeup_wilc3000(struct wilc *wilc, int source) * If still off, redo the wake up sequence */ while (((clk_status_reg_val & clk_status_bit) == 0) && - (((++trials) % 3) != 0)) { + (((++trials) % 4) != 0)) { /* Wait for the chip to stabilize*/ usleep_range(1000, 1100);