72
IB836 User’s Manual
bTime = strtol (argv[1], endptr, 10);
printf("System will reset after %d seconds\n", bTime);
if (bTime)
{
EnableWDT(bTime); }
else
{
DisableWDT();
}
return 0;
}
//---------------------------------------------------------------------------
void EnableWDT(int interval)
{
unsigned char bBuf;
bBuf = Get_F81866_Reg(0x2B);
bBuf &= (~0x20);
Set_F81866_Reg(0x2B, bBuf);
//Enable WDTO
Set_F81866_LD(0x07);
//switch to logic device 7
Set_F81866_Reg(0x30, 0x01);
//enable timer
bBuf = Get_F81866_Reg(0xF5);
bBuf &= (~0x0F);
bBuf |= 0x52;
Set_F81866_Reg(0xF5, bBuf);
//count mode is second
Set_F81866_Reg(0xF6, interval);
//set timer
bBuf = Get_F81866_Reg(0xFA);
bBuf |= 0x01;
Set_F81866_Reg(0xFA, bBuf);
//enable WDTO output
bBuf = Get_F81866_Reg(0xF5);
bBuf |= 0x20;
Set_F81866_Reg(0xF5, bBuf);
//start counting
}
//---------------------------------------------------------------------------
void DisableWDT(void)
{
unsigned char bBuf;
Set_F81866_LD(0x07);
//switch to logic device 7
bBuf = Get_F81866_Reg(0xFA);
bBuf &= ~0x01;
Set_F81866_Reg(0xFA, bBuf);
//disable WDTO output
bBuf = Get_F81866_Reg(0xF5);
bBuf &= ~0x20;
bBuf |= 0x40;
Set_F81866_Reg(0xF5, bBuf);
//disable WDT
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
Содержание iBASE IB836 Series
Страница 1: ......
Страница 10: ...viii IB836 User s Manual This page is intentionally left blank ...
Страница 17: ...General Information IB836 User s Manual 7 1 1 6 Block Diagram ...
Страница 20: ...10 IB836 User s Manual 1 8 Dimensions ...
Страница 24: ...14 IB836 User s Manual 2 3 Jumper Connector Locations ...
Страница 39: ...Hardware Configuration IB836 User s Manual 29 2 2 5 15 EDP Connector CN3 2 5 16 SIM Card Slot J2 ...
Страница 40: ...30 IB836 User s Manual 2 5 17 SATA Connectors CN1 CN2 2 5 18 23 Mini PCIE Connector J9 ...
Страница 41: ...Hardware Configuration IB836 User s Manual 31 2 2 5 19 DDR4 Slot J5 2 5 20 DDR4 Slot J8 ...
Страница 42: ...32 IB836 User s Manual 2 5 21 DP Connector CN10 2 5 22 LAN Connector CN9 ...
Страница 43: ...Hardware Configuration IB836 User s Manual 33 2 2 5 23 LAN Connector CN8 2 5 24 USB3 0 Connector CN7 ...
Страница 44: ...34 IB836 User s Manual 2 5 25 USB3 0 Connector CN6 2 5 26 Type C Connector CN5 ...
Страница 74: ...64 IB836 User s Manual ...