drivers: watchdog: Fix callback call on STM32 WWDG enable
When using the EWIF it is a good idea to clear it before enabling the watchdog. Otherwise, the watchdog callback will be called upon watchdog enable if EWIF is enabled. This patch fixes this case. Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
This commit is contained in:
parent
a4dd49b380
commit
226d71a9c2
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ static int wwdg_stm32_setup(struct device *dev, u8_t options)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ensure that Early Wakeup Interrupt Flag is cleared */
|
||||||
|
LL_WWDG_ClearFlag_EWKUP(wwdg);
|
||||||
|
|
||||||
/* Enable the WWDG */
|
/* Enable the WWDG */
|
||||||
LL_WWDG_Enable(wwdg);
|
LL_WWDG_Enable(wwdg);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue