- 50 -
Pr
el
im
an
ar
y
Appendix
#include “math.h”
#include “stdio.h”
#include “dos.h”
#define DELAY_TIME
10
#define _SMBBA
0xF040
/* SMBus Base Ad
-
dress */
#define _SMBSA
0x6E
/* SMBus Slave Ad
-
dress , 75111R’s Add = 6Eh or 9Ch */
unsigned char DIO_Set(unsigned char oMode, unsigned char oData);
unsigned char SMB_Byte_READ(int SMPORT, int DeviceID, int iREG_INDEX);
void SMB_Byte_WRITE(int SMPORT, int DeviceID, int oREG_INDEX, int oREG_DATA);
void main()
{
WDT_Start(10);
while(1)
{
iCount = WDT_Count();
printf(“\r Counts : %d “,iCount);
delay(1000);
}
}
void WDT_Start(int iCount)
{
int iData;
/* Configuration and function select Register - Enable WDTOUT2# output */
iData = SMB_Byte_READ(SMB_PORT_AD,SMB_DEVICE_ADD,0x03);
iData = iData | 0x03;
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x03,iData);
delay(DELAY_TIME);
/* Watchdog Timer Range Register */
SMB_Byte_WRITE(SMB_PORT_AD,SMB_DEVICE_ADD,0x37,iCount);
Appendix D: Watchdog Timer (WDT) Setting
WDT is widely used for industry application to monitor the activity of CPU. Ap-
plication software depends on its requirement to trigger WDT with adequate
timer setting. Before WDT time out, the functional normal system will reload
the WDT. The WDT never time out for a normal system. The WDT will not be
reloaded by an abnormal system, then WDT will time out and reset the system
automatically to avoid abnormal operation.
This board supports 255 levels watchdog timer by software programming I/O
ports. Below are the source codes written in C, please take them as WDT ap-
plication example.
Summary of Contents for EmETXe-i87M2
Page 2: ...Revision History Version Date Description 1 0 2016 01 Initial release...
Page 9: ...1 Introduction 1 Chapter 1 Introduction...
Page 15: ...7 Board Overview 2 Chapter 2 Board Overview...
Page 22: ...14 This page is intentionally left blank...
Page 23: ...15 Installation Maintenance 3 Chapter 3 Installation Maintenance...
Page 26: ...18 This page is intentionally left blank...
Page 27: ...19 BIOS 4 Chapter 4 BIOS...
Page 52: ...44 This page is intentionally left blank...
Page 53: ...45 Appendix Appendix...