22 lines
		
	
	
		
			270 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			270 B
		
	
	
	
		
			C
		
	
	
	
	
	
 | 
						|
#include "stm32f4xx.h"
 | 
						|
#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();
 | 
						|
}
 | 
						|
 | 
						|
 |