File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
125
125
126
126
void hal_watchdog_kick (void )
127
127
{
128
+ /* If a watchdog is not running, this function does nothing */
129
+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
130
+ return ;
131
+ }
132
+
128
133
wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
129
134
watchdog_setup_cascade_timeout ();
130
135
}
Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
126
126
127
127
void hal_watchdog_kick (void )
128
128
{
129
+ /* If a watchdog is not running, this function does nothing */
130
+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
131
+ return ;
132
+ }
133
+
129
134
wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
130
135
watchdog_setup_cascade_timeout ();
131
136
}
Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
123
123
124
124
void hal_watchdog_kick (void )
125
125
{
126
+ /* If a watchdog is not running, this function does nothing */
127
+ if (!(WDT -> CTL & WDT_CTL_WTE_Msk )) {
128
+ return ;
129
+ }
130
+
126
131
wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
127
132
watchdog_setup_cascade_timeout ();
128
133
}
Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
124
124
125
125
void hal_watchdog_kick (void )
126
126
{
127
+ /* If a watchdog is not running, this function does nothing */
128
+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
129
+ return ;
130
+ }
131
+
127
132
wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
128
133
watchdog_setup_cascade_timeout ();
129
134
}
You can’t perform that action at this time.
0 commit comments