60
MT800M-AIC User’s Manual
bTime=strtol(argv[1],endptr,10);
printf("Systemwillresetafter%dseconds\n",bTime);
if(bTime)
{
EnableWDT(bTime);}
else
{
DisableWDT(); }
return0;
}
//---------------------------------------------------------------------------
void EnableWDT(intinterval)
{
unsigned charbBuf;
bBuf =Get_F81966_Reg(0x2B);
bBuf&=(~0x20);
Set_F81966_Reg(0x2B, bBuf);
//EnableWDTO
Set_F81966_LD(0x07);
//switch to logic device7
Set_F81966_Reg(0x30, 0x01);
//enabletimer
bBuf =Get_F81966_Reg(0xF5);
bBuf&=(~0x0F);
bBuf |=0x52;
Set_F81966_Reg(0xF5, bBuf);
//count modeissecond
Set_F81966_Reg(0xF6, interval);
//settimer
bBuf =Get_F81966_Reg(0xFA);
bBuf |=0x01;
Set_F81966_Reg(0xFA, bBuf);
//enable WDTOoutput
bBuf =Get_F81966_Reg(0xF5);
bBuf |=0x20;
Set_F81966_Reg(0xF5, bBuf);
//startcounting
}
//---------------------------------------------------------------------------
voidDisableWDT(void)
{
unsigned charbBuf;
Set_F81966_LD(0x07);
//switch to logicdevice7
bBuf =Get_F81966_Reg(0xFA);
bBuf&=~0x01;
Set_F81966_Reg(0xFA, bBuf);
//disable WDTOoutput
bBuf =Get_F81966_Reg(0xF5);
bBuf&=~0x20;
bBuf |=0x40;
Set_F81966_Reg(0xF5, bBuf);
//disableWDT
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//
Summary of Contents for MT800M-AIC
Page 8: ......
Page 14: ...6 MT800M AIC User s Manual 1 6 Block Diagram ...
Page 15: ...General Information MT800M AIC User s Manual 7 1 1 7 Board View Top View Bottom View ...
Page 17: ...General Information MT800M AIC User s Manual 9 1 1 8 Dimensions ...
Page 18: ...10 MT800M AIC User s Manual This page is intentionally left blank ...
Page 22: ...14 MT800M AIC User s Manual 2 3 Jumpers Connectors on MT800M AIC ...
Page 52: ...44 MT800M AIC User s Manual Output Select Selects the display output interface ...