54
55
©Vecow ABP-2000 Series Advanced Box PC User Manual
Appendix A
Appendix A
ppendix A : GPIO & WDT
A
Operation System Support
Linux :
Ubuntu 12.04 LTS or Above
Fedora 16 or Above
And another Linux kernel 2.6.38 and RHL6.0
(* The Linux kernel of RHL , please check RadHat
website first )
Windows :
Windows 7 Home/Professional/MediaCenter/
Windows 8 ( Do not support RT version)
Windows Server 2012
GPIO & WDT Function
The GPIO& WDT are using internal Super IO function.
However, you must entry super I/O configuration mode to
set it.
The output port is set as GPIO 1 on CN13 , reg. index =
0x60
The input port is set as GPIO 4 on CN12 , reg. index =
0x62
.
Super I/O special address port = 0x2E
Super I/O special data port =
0x2F
GPIO Logical device is 0x07
Pin No.
SIO GPIO Function
1
SIO_GPIO77
2
SIO_GPIO76
3
SIO_GPIO75
4
SIO_GPIO74
5
SIO_GPIO73
6
SIO_GPIO72
7
SIO_GPIO71
8
SIO_GPIO70
9
GND
A.Entry MB PnP mode.
//write twice 0x87 value.
outportb(
Super I/O special address port
, 0x87);
outportb(
Super I/O special address port
, 0x01);
outportb(
Super I/O special address port
, 0x55);
outportb(
Super I/O special address port
, 0x55);
B.Located on Logical Device 7
//write 0x07 on Reg [0x07] , this setup must follow Step A.
that can be workable.
outportb(
Super I/O special address port
, 0x07);
outportb(
Super I/O special data port
, 0x07);
C.Access the Super I/O register
Base control for write Super I/O register.
outportb(
Super I/O special address port
, Register Index.);
outportb(
Super I/O special data port
, update_value);
Base control for read Super I/O register
outportb(
Super I/O special address port
, Register Index.);
inportb(
Super I/O special data port
);
//It will return a
BYTE value.
D.Start to Access the ABP-2000 series GPIO port
Please refer to source code for set_data() and get_data()
function.
Write data to GPO(output) port
set_data( Register Index , update_value);
example :
unsigned char data = 0x82;
set_data( 0xE5 , data);
//Set bit 7 & bit 1 of GPO output port as High level
,another bit is Low
Read data to GPI(input) port
get_data( Register Index ) //It will return a BYTE value.
example :
unsigned char data
get_data( 0xF1 , data);
//Get GPI(input) port status on input_data variable.
E.WDT ON/OFF and Timer-Counter setting
Refer to GPIO setting of Step A and B. , located Logical