Fix watchdog tcode to write correct reload value
This commit is contained in:
parent
1300fe88a4
commit
0c8a0cd562
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user