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
1 changed files with 1 additions and 1 deletions

View File

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