Lanner Digital Input/Output and Management

Lanner Digital Input/Output and Management
Lanner Digital Input/Output and Management Utility
Implementation Manual
Rev 1.0
September 20, 2011
Software User Manual
Version 1.0
Revision History
Rev
1.0.1
Date
March 30, 2011
Changes
Initial version
This document contains proprietary information of Lanner Electronics Inc. –and is not to be disclosed
or used except in accordance with applicable agreements.
Copyright © 2011. All Rights Reserved.
Copyright© 2011 Lanner Electronics Inc. All rights reserved. The information in this document is
proprietary and confidential to Lanner Electronics Inc. No part of this document may be reproduced in
any form or by any means or used to make any derivative work (such as translation, transformation, or
adaptation) without the express written consent of Lanner Electronics Inc. Lanner Electronics Inc.
reserves the right to revise this document and to make changes in content from time to time without
obligation on the part of Lanner Electronics Inc. to provide notification of such revision or change.
The information in this document is furnished for informational use only, is subject to change without
notice, and should not be construed as a commitment by Lanner Electronics Inc. Lanner Electronics
Inc. assumes no responsibility or liability for any errors or inaccuracies that may appear in this
document or any software that may be provided in association with this document.
ii
Software User Manual
Version 1.0
Table of Contents
ABOUT THIS DOCUMENT ........................................................................................................................... 2
PURPOSE ..................................................................................................................................................... 2
INTENDED AUDIENCE ................................................................................................................................ 2
CONVENTIONS USED ................................................................................................................................. 2
CHAPTER 1.
1.1
INTRODUCTION .............................................................................................................. 3
FEATURES OF LANNER DIO AND OTHER MANAGEMENT UTILITIES PROVIDED BY GPIO ...............................................3
CHAPTER 2.
BUILDING AND INSTALLING THE PROGRAM .............................................................. 5
2.1
DIO INSTALLATION ON LINUX......................................................................................................................................5
2.2
DIO INSTALLATION ON FREEBSD ................................................................................................................................6
2.3
OTHER MANAGEMENT UTILITIES INSTALLATION ..........................................................................................................7
2.4
WINDOWS INSTALLATION .............................................................................................................................................9
CHAPTER 3.
EXECUTING THE SAMPLE PROGRAM ....................................................................... 15
3.1
VIA THE COMMAND LINE ...........................................................................................................................................15
3.2
VIA THE DEMO PROGRAM ON WINDOWS ...................................................................................................................20
APPENDIX A.
REGISTER ADDRESSES ............................................................................................... 25
About this document
Purpose
The purpose of this document is to provide implementation information for Lanner
Digital input/output and other hardware management functionalities.
Intended audience
This document is for individuals who install and configure embedded and industrial
platforms with the above mentioned functionality.
Conventions used
Following are all the special characters and typographical conventions used in this
manual:
Convention
2
Meaning
Press Enter
Means press the Enter or Return key or
its equivalent on your computer.
Note
Introduces important additional
information.
Caution
Warns that a failure to follow the
recommended procedure could result in
loss of data or damage to equipment.
Software User Manual
Version 1.0
Chapter 1. Introduction
1.1 Features of Lanner DIO and other management utilities
provided by GPIO
Lanner 's DIO (Digital Input/Output) is a general purpose input/output (GPIO). They are
dedicated general-purpose pins that can be configured as either inputs or outputs.
When configured as an output, you can write to an internal register to control the state
driven on the output pin. When configured as an input, you can detect the state of the
input by reading the state of an internal register. These pins are provided by Intel PCH
chipset (like ICH7) or other Super I/O chips such as Fintek F81865 or Winbond
83627UHG. Depending on the chipsets used, commands and available functions vary.
Here we list some common features:
3
z
DIO (Digital Input/output): Lanner DIO utility (via both command line and GUI) is
a simple program which is designed to test or alter the state of the input/output
pins, i.e., switching between high and low.
z
PIO: Programmable Input/Output pins. It can be utilized as a LED indicator for
showing the operating state of the designated software or a specific function (such
as the wireless LAN or GPS) of the device.
z
Status LED/RunLED (for system operating status)
/AlarmLED/GPS_LED/WirelessLED: Those LED’s behavior can be controlled by
programming the GPIO pins. The availability of specific LED functions varies
depending on the products.
z
Hardware Monitor: The hardware monitor is a system health supervision tool. It
monitors several critical parameters in PC hardware, including power supply
voltages, fan speeds, temperatures, and CPU voltage, etc.
z
CaseOpen: Caseopen detection detect whether the computer case has been
opened and possibly tampered with. The sample code provided can be used to
enable/disable/reset this function.
Software User Manual
Version 1.0
z
Software Reset Button: On most of Lanner Network platforms, the reset button
can be programmed to support either a hardware reset (i.e., shutdown and then
start the device again) or a software reset (i.e., rest a software to its default
setting). Note that a proper hardware jumper setting is required for this function to
work (refer to the product’s User Manual for more information).
z
Redundant Power Supply Function: We provide a sample program which can be
used to check the status (i.e., normal or failed) of the power supply.
The following shows the directory of the sample programs in the Driver and Manual CD:
On Linux ( HW directory means Hardware monitor, sled directory means status LED,
sw_btn means software Reset Button, sw_bp means watchdog/bypass utility, and
rdd_pwr means redundant power supply)
On the Windows:
4
Software User Manual
Version 1.0
Chapter 2. Building and Installing the Program
2.1 DIO Installation on Linux
Note:
The OS supported by Lanner LCM function include platforms based on Linux Kernel series 2.4.x
and Linux Kernel series 2.6.x, and DOS.
For installation on DOS, refer to the Readme file contained within the program.
Build
To build program source code on Linux platform, use the following steps as a
guideline:
1.
Copy the proper makefile from the Driver and Manual CD to your system:
#Makefile.linux
2.
Set the access mode with these two parameters by editing the Makefile.linux directly:
DIRECT_IO_ACCESS= [0|1] (enter either 1 or 0) (enter either 1 or 0). Refer to the next section
on Install for more details on access mode.
3.
Type make to build source code:
#make Makefile (Note: omit the file extensions)
4.
5
After the source code is compiled, the executable programs (DIO_TST) and the driver
(dio_drv[k]o) will appear in the bin sub-directory.
Software User Manual
Version 1.0
Install
The installation procedures depend on the access mode that you have set by using the
above mentioned method.
If you have set DIRECT_IO_ACCESS=1, driver installation is not necessary. Proceed to
the next section on executing the Lanner DIO program.
If you have set DIRECT_IO_ACCESS=0, Lanner DIO driver needs to be installed. Install
the driver and create a node in the /dev directory as shown in the following example:
#insmod dio_drv.[k]o
#mknod /dev/dio_drv c 244 0
Note: For descriptions of the command, refer to the Readme file contained within the program.
2.2 DIO Installation on FreeBSD
Build
Use the script file Makefile.bsd to build the source code. After compiling, you will get
driver file dio_drv.[k]o and test file DIO_TST in the same folder.
1.
Copy the proper makefile from the Driver and Manual CD to your system
2.
Set the access mode with these two parameters by editing the Makefile.bsd
directly: DIRECT_IO_ACCESS= [0|1] (enter either 1 or 0) Refer to the next section on Install
for more details on access mode.
3.
Type make to build source code:
#make Makefile (Note: omit the file extensions)
4.
6
After the source code is compiled, the executable program s (DIO_TST) and the driver
(dio_drv[k]o) will appear in the bin sub-directory.
Software User Manual
Version 1.0
Note: The OS supported by Lanner DIO function includes platforms based on FreeBSD 8.0
Install
The installation procedures depend on the access mode that you have set in the
Makefile.bsd.
If you have set DIRECT_IO_ACCESS=1, driver installation is not necessary. Proceed to
the next section on executing the Lanner DIO program.
If you have set DIRECT_IO_ACCESS=0, Lanner DIO driver needs to be installed. Install
the driver and create a node in the /dev directory as shown in the following example:
Insert the module by:
#kldload -v ./dio_drv.ko
2.3 Other Management utilities Installation
Follow the same procedures as mentioned above but use the appropriate driver name
and major number instead, for instance, use driver sled_drv.[k]o and major number 240
for Status LED function. Use driver wd_drv.[k]o and major number 241 for watchdog
timer. Refer to the Readme file contained within the program for more information.
Hardware Monitor with Linux lm-sensors:
The lm-sensor is an essential tool for monitoring the hardware health of Linux systems. It
supports a wide range of monitoring devices including I2C/SMBus hardware monitoring
chips, features integrated in Super I/O chips or south bridges, thermal sensors
integrated in CPU, and so on. Lanner has tested and verified the use of lm-sensors
(version 3.3.0) on our products. For more information and downloading the lm sensors
program, visit: http://www.lm-sensors.org.
Use the following steps as a guideline to run the sample program (you will need to have
the root privilege to run this program :
7
Software User Manual
8
Version 1.0
1.
Make the program (refer to the website’s manual installation guide).
2.
Run sensors –detect to let the system detect the hardware monitor chips automatically and
install the module.
3.
Copy the modified configuration file for better or more readable output: sensors3.conf
(provided by Lanner in the HW folder on the Driver and Manual CD) under the /etc/sensors.d/
4.
Run sensors –s (The –s option evaluate all `set' statements in the sensors3.conf configuration
file and exit)
5.
Run sensors to output the hardware monitor information
Software User Manual
Version 1.0
2.4 Windows Installation
Driver Installation
Note: The driver installation is needed only on the Windows platform. And it supports Windows XP
and Windows 7.
The current version of Lanner DIO driver is V101. The older version needs to be
uninstalled before the current one can be installed.
To install the Lanner GPIO driver, follow these steps:
Removing the Old Driver
1.
9
Open the device manager on the computer:
Software User Manual
Version 1.0
2.
Select the Lanner IO Driver and click uninstall.
3.
Confirm the deletion.
Installing the demo program
10
1.
Double click the GPIO_Demo.msi file
2.
The welcome screen appears.
Software User Manual
3.
11
Version 1.0
Select the installation folder.
Software User Manual
12
Version 1.0
4.
Confirm the installation.
5.
Installation completed.
6.
To access the program, click start->programs->Lanner GPIO Demo->Demo and it will
automatically install the new driver for you.
Software User Manual
Version 1.0
Installing the driver separately
1.
Unzip the LannerIO v101.rar file
2.
Double click the Setup program
3.
The welcome screen appears. Click Next to proceed.
4.
13
The installation process continues. Click Close when the process completes.
Software User Manual
14
Version 1.0
Software User Manual
Chapter 3.
Version 1.0
Executing the Sample Program
3.1 Via the Command Line
Note:
The OS supported by Lanner DIO function include platforms based on Linux Kernel series 2.4.x and
Linux Kernel series 2.6.x, FreeBSD 8.0, and DOS.
This section contains sample executable programs that you could test on your platform.
It demonstrates some useful functionality that the DIO provides. Note that the installation
needs to be completed before proceeding with the execution.
On Linux
The executable program will be in the bin directory after compilation.
Just run “dio_tst” for Digital IO test. This program will drive output pin with specific value
(high or low) and then read status of input pin. If you have external loopback which
connects input to output pins directly, the input value should be identical with output
value.
To execute the DIO sample code, type:
# ./dio_tst
15
Software User Manual
Version 1.0
To execute the watchdog sample code, type:
The watchdog can serve two purposes: bypass and watchdog. Switch between them
with the following command first.
# ./wd_tst --swtsb (Set Watchdog Timeout State to Bypass function)
# ./wd_tst --swtsr (Set Watchdog Timeout State to Reset function)
Set watchdog timeout value and start/stop the watchdog with the following commands.
# ./wd_tst --swt xxx (Set Watchdog Timer 1-255 seconds)
# ./wd_tst[*] --start (Start Watchdog Timer)
# ./wd_tst --stop (Stop Watchdog Timer)
To execute the Status LED sample code, type:
#./sled_tst
As mentioned above, the status LED can be programmed to show the status of the
user-defined program. This sample program demonstrates lighting the LED for 4
seconds.
To execute the Software Reset Button test function, type:
# ./btn_tst
16
Software User Manual
Version 1.0
The sample program will recognize that the software reset button was pressed.
To execute the Redundant Power Supply test function, type:
# ./pwr_tst
The sample program will check whether the redundant power is failed or normal.
On Windows
Specific to the PCH chipset used or Super IO chipset, the commands and functionality
vary by product models. For more information, refer to the README or User Guide
contained within the utility folder.
For example: Here we have Fintek F81865 GPIO utility, to execute, follow the command
description below:
The Lanner F81865 GPIO utility
------------------------------------Usage:
F81865 DIO_In
port_number
F81865 DIO_Out
port_number value
F81865 PIO port_number
F81865 RunLED
port_number
F81865 AlarmLED
F81865 GPS_LED
17
value
value
port_number
port_number
value
value
Software User Manual
F81865 WirelessLED
Version 1.0
port_number
value
Argument:
DIO_IN
Read state from DIO In.
DIO_OUT
Set DIO Out state.
PIO
Set PIO LED state.
RunLED
Set RUN LED state.
AlarmLED
Set Alarm LED state.
GPS_LED
Set GPS LED state.
WirelessLED
Set Wireless LED state.
Where
port_number
The port number.
value
1 for on and 0 for off.
command
The command number
For instance:
DIO:
To run the test program, type:
F81865 DIO_In port_number
F81865 DIO_Out port_number value
Example:
F81865 DIO_In 2
F81865 DIO_Out 3 1
18
Software User Manual
PIO:
To run the test program, type:
F81865 PIO port_number value
Example:
F81865 PIO 4 0
RunLED:
To run the test program, type:
F81865 RunLED port_number value
Example:
F81865 RunLED 1 1
Alarm Enable/Disable LED:
To run the test program, type:
F81865 AlarmLED port_number value
Example:
F81865 AlarmLED 4 0
GPS Enable/Disable LED:
To run the test program, type:
F81865 GPS_LED port_number value
Example:
F81865 GPS_LED 4 0
Wireless Enable/Disable LED:
To run the test program, type:
19
Version 1.0
Software User Manual
Version 1.0
F81865 WirelessLED port_number value
Example:
F81865 WirelessLED 4 0
System Health Monitor Function:
W83627UHG_test Monitor CPUTIN
//Get CPU temperature
W83627UHG_test Monitor 5Vcc
//Get SuperIO’s 5V voltage
W83627UHG_test Monitor 5Vsb
//Get Super IO’s standby voltage
W83627UHG_test Monitor AVcc
//Get Super IO’s IO voltage
W83627UHG_test Monitor CPUVCore
//Get CPU voltage
W83627UHG_test Monitor VBat
//Get battery voltage
W83627UHG_test Monitor 3V3
//Get other voltage
W83627UHG_test Monitor 1V5
//Get other voltage
3.2 Via the Demo Program on Windows
This Demo program provides graphic interface for you to assign/read value on the
specific GPIO pins.
To access the program, click start->programs->Lanner GPIO Demo->Demo
20
Software User Manual
Version 1.0
D-IN: Check the box to alter the voltage level of the digital input pins as to enable or
disable the input pins. The default value for D-in is 1 which indicates the high voltage
(5V).
The corresponding commands:
Winbond W83627UHG SuperI/O:
The index address is 2EH.
Note: Refer to Appendix A for more
information on the Register (page 150 of
W83627 datasheet)
Fintek F81865 SuperI/O Chip:
The index address is 2EH.
Note: Refer to Appendix B for more
information on the Register (page
87-101 of F81865 datasheet)
D-Out: Check the box to alter the voltage level of the digital output pins as to write the
output pins to “1”. The default value for D-Out is 0 which indicates the low voltage (0V).
Winbond W83627UHG SuperI/O:
The index address is 2EH.
Note: Refer to Appendix A for more
information on the Register (page 150 of
W83627 datasheet)
Fintek F81865 SuperI/O Chip:
The index address is 2EH.
Note: Refer to Appendix B for more
information on the Register (page
87-101 of F81865 datasheet)
PIO:
The PIO is the programmable input/output. In Lanner products, they are provided as
additional LED indicators for certain events which can be defined in your software.
Winbond W83627UHG superI/O:
The index address is 2EH.
Note: Refer to Appendix A for more
information on Register (page 150 of
W83627 datasheet)
21
Fintek F81865 SuperI/O Chip:
The index address is 2EH.
Note: Refer to Appendix B for more
information on Register (page
87-101 of F81865 datasheet)
Software User Manual
Version 1.0
LED:
Specific to Lanner products, there are several front panel LEDs which can be
programmed to signal certain functions in the system such as the RUN (for system
operating status), Alarm, GPS, Wireless etc.
Winbond W83627UHG superI/O:
The index address is 2EH.
Fintek F81865 SuperI/O Chip:
The index address is 2EH.
Ex: Winbond W83627UHG SuperI/O Chip
Ex: Fintek F81865 SuperI/O Chip
W83627UHG_test RunLED port_number
value (value: 0,1,2,3..........)
F81865 RunLED port_number value
(value: 0,1,2,3........)
Note: Refer to Appendix A for more
information on Register (page 150 of
W83627 datasheet)
Note: Refer to Appendix B for more
information on Register (page
87-101 of F81865 datasheet)
Monitor:
The Monitor field shows the following information (from left to right):
CPUTIN: shows the CPU temperature
5Vcc: shows SuperIO’s 5V voltage
5Vsb: shows SuperIO’s standby voltage
AVcc: shows SuperIO’s IO voltage
CPUVCore: shows CPU voltage
VBat: shows battery volrage
VIN0~VIN2: shows other voltages
The corresponding commands:
22
Software User Manual
Version 1.0
Winbond W83627UHG superI/O: The index address is 2EH.
W83627UHG_test Monitor CPUTIN
//Get CPU temperature
W83627UHG_test Monitor 5Vcc
//Get ٛ uperior’s 5V voltage
W83627UHG_test Monitor 5Vsb
//Get Super IO’s standby voltage
W83627UHG_test Monitor Avcc //Get Super IO’s IO voltage
W83627UHG_test Monitor CPUVCore
//Get CPU voltage
W83627UHG_test Monitor Vbat
//Get battery voltage
W83627UHG_test Monitor 3V3
//Get other voltage
W83627UHG_test Monitor 1V5
//Get other voltage
Note: Refer to Appendix A for more information on Register (page 55 of
W83627 datasheet)
Note:
Specific to the PCH chipset used or Super IO chipset, the commands and functionality vary
depending on product models. For more information, refer to the README or User Guide contained
within the utility folder.
Watchdog Timer:
Enter the number of seconds to start count down before the system can be reset. Press
start to start the counter and stop to stop the counter.
The corresponding commands:
Winbond W83627UHG superI/O: The index address is 2EH.
W83627UHG_test Watchdog
//Show the timer remained
W83627UHG_test Watchdog timeout_value
//Set the watchdog timer
timeout value
Note: Refer to Appendix B for more information on Register (page 172,
173of W83627UHG datasheet)
23
Software User Manual
Version 1.0
CaseOpen:
The purpose of Caseopen function is to detect whether the computer case has been
opened and possibly tampered with. You will need to enable this function first through
jumper selection (refer to the product’s user manual for detailed information). Select to
enable this function.
The corresponding commands:
EX: Fintek 81865 super I/O
F81865 CaseOpen
detection
//start caseopen
CaseOpen_Clear //reset the case open
status to undetected
Note: Refer to Appendix A for more
information on Register (page 52 of F81865
datasheet)
24
Software User Manual
Version 1.0
Appendix A.
Winbond W83627UHG
25
Register Addresses
Software User Manual
Fintek F81865
26
Version 1.0
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising