File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,10 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
125
125
126
126
void hal_watchdog_kick (void )
127
127
{
128
+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
129
+ return ;
130
+ }
131
+
128
132
wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
129
133
watchdog_setup_cascade_timeout ();
130
134
}
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
}
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