//独立看门口的时钟来源 内部低速时钟 128khz 除以2 即64khz
//选择 IWDG_Prescaler_128
//64/256 =0.5 khz 2ms周期
-
#define IWDG_500MS_REST (unsigned char)250
-
#define IWDG_400MS_REST (unsigned char)200
-
#define IWDG_300MS_REST (unsigned char)150
-
#define IWDG_250MS_REST (unsigned char)125
-
#define IWDG_200MS_REST (unsigned char)100
-
#define IWDG_100MS_REST (unsigned char)50
-
#define IWDG_50MS_REST (unsigned char)25
-
#define IWDG_4MS_REST (unsigned char)2
-
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);//enable write dog reg
-
IWDG_SetPrescaler(IWDG_Prescaler_128);//看门狗预分频
-
IWDG_SetReload(IWDG_200MS_REST);//设置看门狗复位时间
-
IWDG_Enable();//启动独立看门狗
-
IWDG_ReloadCounter();//看门狗复位 正常使用时不想发生看门狗复位,就执行
阅读(1635) | 评论(0) | 转发(0) |