Fix watchdog tcode to write correct reload value

This commit is contained in:
Mario Hüttel 2023-06-09 00:12:41 +02:00
parent 1300fe88a4
commit 0c8a0cd562

View File

@ -98,7 +98,7 @@ int watchdog_setup(uint16_t prescaler, uint16_t reload_value)
reload_value = 0xFFFFu; reload_value = 0xFFFFu;
ret = -2; ret = -2;
} }
IWDG->RLR = 0xFFFU; IWDG->RLR = reload_value;
/** - Write enable key */ /** - Write enable key */
IWDG->KR = STM32_WATCHDOG_ENABLE_KEY; IWDG->KR = STM32_WATCHDOG_ENABLE_KEY;