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)
125125
126126void hal_watchdog_kick (void )
127127{
128+ /* If a watchdog is not running, this function does nothing */
129+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
130+ return ;
131+ }
132+
128133 wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
129134 watchdog_setup_cascade_timeout ();
130135}
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)
126126
127127void hal_watchdog_kick (void )
128128{
129+ /* If a watchdog is not running, this function does nothing */
130+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
131+ return ;
132+ }
133+
129134 wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
130135 watchdog_setup_cascade_timeout ();
131136}
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)
123123
124124void hal_watchdog_kick (void )
125125{
126+ /* If a watchdog is not running, this function does nothing */
127+ if (!(WDT -> CTL & WDT_CTL_WTE_Msk )) {
128+ return ;
129+ }
130+
126131 wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
127132 watchdog_setup_cascade_timeout ();
128133}
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)
124124
125125void hal_watchdog_kick (void )
126126{
127+ /* If a watchdog is not running, this function does nothing */
128+ if (!(WDT -> CTL & WDT_CTL_WDTEN_Msk )) {
129+ return ;
130+ }
131+
127132 wdt_timeout_rmn_clk = NU_MS2WDTCLK (wdt_timeout_reload_ms );
128133 watchdog_setup_cascade_timeout ();
129134}
You can’t perform that action at this time.
0 commit comments