Files
checker_slave/source/dev/dev_watchdog.c

22 lines
270 B
C
Raw Normal View History

2023-06-10 11:52:00 +08:00
#include "stm32f10x.h"
2023-06-10 11:52:00 +08:00
#include "board.h"
// 开始watch dog
void wdog_start(void)
{
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
IWDG_SetPrescaler(IWDG_Prescaler_32);
IWDG_Enable();
}
// 更新看门狗
void wdog_refresh(void)
{
IWDG_ReloadCounter();
}