Skip to content

Commit b70b65c

Browse files
committed
Nuvoton: Enlarge WDT reset delay to avoid premature WDT reset
Consider the following factors to define WDT reset delay: 1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading. 2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
1 parent f7861e6 commit b70b65c

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

targets/TARGET_NUVOTON/TARGET_M451/watchdog_api.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
#define NU_WDT_65536CLK 65536
4444
#define NU_WDT_262144CLK 262144
4545

46-
/* Watchdog reset delay */
47-
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_3CLK
46+
/* Watchdog reset delay
47+
*
48+
* 1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
49+
* 2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
50+
*/
51+
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_130CLK
4852

4953
/* Support watchdog timeout values beyond H/W
5054
*

targets/TARGET_NUVOTON/TARGET_M480/watchdog_api.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
#define NU_WDT_65536CLK 65536
4343
#define NU_WDT_262144CLK 262144
4444

45-
/* Watchdog reset delay */
46-
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_3CLK
45+
/* Watchdog reset delay
46+
*
47+
* 1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
48+
* 2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
49+
*/
50+
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_130CLK
4751

4852
/* Support watchdog timeout values beyond H/W
4953
*

targets/TARGET_NUVOTON/TARGET_NANO100/watchdog_api.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
#define NU_WDT_65536CLK 65536
4343
#define NU_WDT_262144CLK 262144
4444

45-
/* Watchdog reset delay */
46-
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_3CLK
45+
/* Watchdog reset delay
46+
*
47+
* 1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
48+
* 2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
49+
*/
50+
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_130CLK
4751

4852
/* Support watchdog timeout values beyond H/W
4953
*

targets/TARGET_NUVOTON/TARGET_NUC472/watchdog_api.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
#define NU_WDT_65536CLK 65536
4343
#define NU_WDT_262144CLK 262144
4444

45-
/* Watchdog reset delay */
46-
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_3CLK
45+
/* Watchdog reset delay
46+
*
47+
* 1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
48+
* 2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
49+
*/
50+
#define NU_WDT_RESET_DELAY_RSTDSEL WDT_RESET_DELAY_130CLK
4751

4852
/* Support watchdog timeout values beyond H/W
4953
*

0 commit comments

Comments
 (0)