drivers: watchdog: Pass timeout in ms if iwdg is started at boot
iwdg_stm32_install_timeout expects a timeout passed in milli seconds. As the timeout is defined in micro seconds in Kconfig.stm32, we need to divide by USEC_PER_MSEC when CONFIG_IWDG_START_AT_BOOT is activated because iwdg_stm32_install_timeout makes the multiplication by USEC_PER_MSEC. Fixes #18695 Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
This commit is contained in:
parent
e5deb5adc9
commit
a1aabbb08a
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ static int iwdg_stm32_init(struct device *dev)
|
|||
#ifdef CONFIG_IWDG_STM32_START_AT_BOOT
|
||||
IWDG_TypeDef *iwdg = IWDG_STM32_STRUCT(dev);
|
||||
struct wdt_timeout_cfg config = {
|
||||
.window.max = CONFIG_IWDG_STM32_TIMEOUT * USEC_PER_MSEC,
|
||||
.window.max = CONFIG_IWDG_STM32_TIMEOUT / USEC_PER_MSEC,
|
||||
};
|
||||
|
||||
LL_IWDG_Enable(iwdg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue