平车主控板(运维板)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
614 B

#include "reg51.h"
#include <intrins.h>
#include "bsp_wdt.h"
//测试工作频率为11.0592MHz
sfr WDT_CONTR = 0xc1;
sbit P32 = P3^2;
void L0_wdt_init()
{
// WDT_CONTR = 0x23; //使能看门狗,溢出时间约为0.5s
// WDT_CONTR = 0x24; //使能看门狗,溢出时间约为1s
WDT_CONTR = 0x27; //使能看门狗,溢出时间约为8s
P32 = 0; //测试端口
}
void L0_wdt_feed()
{
WDT_CONTR |= 0x10; //清看门狗,否则系统复位
}