![Arbor Technology Qseven EmQ-i2401 Скачать руководство пользователя страница 47](http://html.mh-extra.com/html/arbor-technology/qseven-emq-i2401/qseven-emq-i2401_user-manual_2963007047.webp)
- 37 -
Appendices
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.
#include “math.h”
#include “stdio.h”
#include “dos.h”
#define DELAY_TIME
10
#define _SMBBA
0xF040
/* SMBus Base Address
*/
#define _SMBSA
0x6E
/*
SMBus
Slave
Address , 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);
Содержание Qseven EmQ-i2401
Страница 1: ...I EmQ i2401 Qseven CPU Module User s Manual Version 1 1 2019 07 ...
Страница 2: ... II This page is intentionally left blank ...
Страница 10: ... viii This page is intentionally left blank ...
Страница 11: ... 1 1 Chapter 1 Introduction Chapter 1 Introduction ...
Страница 16: ... 6 This page is intentionally left blank ...
Страница 17: ... 7 2 Chapter 2 Board Overview Chapter 2 Board Overview ...
Страница 18: ... 8 Board Overview 2 1 Board Dimensions ...
Страница 22: ... 12 This page is intentionally left blank ...
Страница 23: ... 13 Chapter 3 BIOS 3 Chapter 3 BIOS ...
Страница 43: ... 33 Appendices Appendices ...