#include "common.h" 
#include "drv_watch_dog.h"


void Watch_Dog_Initial(void)
{
	 /* enable IRC40K */
    rcu_osci_on(RCU_IRC40K);
    
    /* wait till IRC40K is ready */
    while(SUCCESS != rcu_osci_stab_wait(RCU_IRC40K)){
    }  

    /* confiure FWDGT counter clock: 40KHz(IRC40K) / 64 = 0.625 KHz */
    fwdgt_config(4*625, FWDGT_PSC_DIV64);  
    /* after 4 seconds to generate a reset */
    fwdgt_enable();
}




