mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-19 09:43:31 +08:00
[bsp][wch/risc-v][ch32] 1.fixed iwdt driver is not reload counter to register;
This commit is contained in:
parent
ec900a7135
commit
f5b6ae427c
@ -71,7 +71,7 @@ static rt_err_t ch32_wdt_control(rt_watchdog_t *wdt, int cmd, void *arg)
|
||||
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
|
||||
IWDG_SetPrescaler(wdt_dev->prescaler);
|
||||
IWDG_SetReload(wdt_dev->reload);
|
||||
IWDG_WriteAccessCmd(IWDG_WriteAccess_Disable);
|
||||
IWDG_ReloadCounter();
|
||||
IWDG_Enable();
|
||||
}
|
||||
break;
|
||||
@ -89,7 +89,7 @@ static rt_err_t ch32_wdt_control(rt_watchdog_t *wdt, int cmd, void *arg)
|
||||
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
|
||||
IWDG_SetPrescaler(wdt_dev->prescaler);
|
||||
IWDG_SetReload(wdt_dev->reload);
|
||||
IWDG_WriteAccessCmd(IWDG_WriteAccess_Disable);
|
||||
IWDG_ReloadCounter();
|
||||
IWDG_Enable();
|
||||
wdt_dev->is_start = 1;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user