int32_t main(void)
{
stc_wdt_config_t stcWdt_Config;
stc_lpm_config_t stcLpmCfg;
DDL_ZERO_STRUCT(stcWdt_Config);
DDL_ZERO_STRUCT(stcLpmCfg);
stcLpmCfg.enSLEEPDEEP = SlpDpDisable;//SlpDpEnable;
stcLpmCfg.enSLEEPONEXIT = SlpExtEnable;
Gpio_InitIO(T1_PORT,T1_PIN,GpioDirOut);
Gpio_SetIO(T1_PORT,T1_PIN,0);
Gpio_InitIO(3,3,GpioDirIn);
stcWdt_Config.u8LoadValue = 0x0b;//3.2s
stcWdt_Config.enResetEnable = WINT_EN;//WRESET_EN;////
stcWdt_Config.pfnWdtIrqCb = WdtCallback;
Clk_SetPeripheralGate(ClkPeripheralWdt,TRUE);//
Wdt_Init(&stcWdt_Config);
Wdt_Start();
Gpio_SetIO(T1_PORT,T1_PIN,1);
#if 0
while(1 == Gpio_GetIO(3,3));//注意:此处如果用户测试深度休眠模式,此处不能屏蔽
Lpm_Config(&stcLpmCfg);
Lpm_GotoLpmMode();
#endif
while (1)
{
//cnt = Wdt_ReadWdtValue();
//Wdt_Feed();//测试喂狗功能时,放开屏蔽
}
}
|