pITX-SP KTD-S0003-C
User Information Table of Contents » Table of Contents « 1 User Information .............................................................................1 1.1 About This Document.................................................................................................... 1 1.2 Copyright Notice.......................................................................................................... 1 1.3 Trademarks...............................................................................
User Information Table of Contents 5 SDIO/microSD Card Interface............................................................ 15 5.1 DOS Boot...................................................................................................................15 5.2 Linux Boot.................................................................................................................15 5.3 Windows® XP and Windows® 7 Boot................................................................................
User Information Table of Contents 11 JIDA32 Interface............................................................................ 39 11.1 Generic Part...............................................................................................................39 11.2 Display Part ...............................................................................................................39 11.3 I2C-Bus Part ........................................................................................
KTD-S0003-C 1 User Information 1.1 About This Document Page 1 User Information This document provides information about products from KONTRON Technology A/S and/or its subsidiaries. No warranty of suitability, purpose or fitness is implied. While every attempt has been made to ensure that the information in this document is accurate the information contained within is supplied “as-is” - no liability is taken for any inaccuracies. Manual is subject to change without prior notice.
KTD-S0003-C 1.6 Page 2 User Information Life Support Policy KONTRON Technology's products are not for use as critical components in life support devices or systems without express written approval of the general manager of KONTRON Technology A/S.
KTD-S0003-C 2 Page 3 BIOS Update BIOS Update The AMI and the KONTRON update tool is available for two operating systems: DOS and Windows® (e.g. Windows® XP, Vista 32/64 or Windows® 7). Software conditions: Operating System Tool Name Required Revision AFUDOS.EXE 4.23 or greater BF.EXE 7.41 or greater AFUWIN.EXE + UCORESYS.SYS (UCOREW64.SYS) 4.41 or greater BF.EXE 7.41 or greater DOS Windows® 2.
KTD-S0003-C Page 4 3 Graphics Interface 3.1 LCD/LVDS Technology Overview 3.1.1 Detailed Timing Descriptor (EDID or DisplayIDTM) Graphics Interface The input fields Pixel Clock, Horizontal Active, Horizontal Blank, Horizontal Sync Offset, Horizontal Sync Width, Vertical Active, Vertical Blank, Vertical Sync Offset and Vertical Sync Width must be filled in with the correct values according to the panel’s data sheet.
KTD-S0003-C Page 5 Graphics Interface Example 2 (not useable on pITX-SP): SHARP LQ190E1LW01 (double pixel clock) Data sheet specifications (no definition of Sync Offset Clock Frequency [typ.] 54 MHz Horizontal Period (1) [typ.] 844 Clocks Horizontal Display Period 640 Clocks Vertical Period [typ.
KTD-S0003-C 3.1.2 Page 6 Graphics Interface ce 24 Bit Color Mapping Tips The double pixel clock or 24-bit color depth can generally be taken from the datasheet. There are two interface modes existing at 24-bit color depth: FPDI (Flat (F Panel Display Interface) or LDI (LVDS Display Interface). Some panels use the line SELL LVDS (SELect Lvds data order). The LVDS data assignment in the datasheet can give you an indication by the last channel (e.g.
KTD-S0003-C 3.2 Page 7 Graphics Interface EDID 1.3 Specification (VESA) The EDID (Extended Display Identification Data) record has a fixed structure. The first 8 bytes contain the distinctive identification 00h, FFh, FFh, FFh, FFh, FFh, FFh, 00h. The end of the record is marked by the checksum (1 byte). The result of the addition of all bytes including the checksum has to be zero. For a comprehensive support of the majority of available panels you don't need all fields of the EDID record.
KTD-S0003-C 3.3.2 Page 8 Graphics Interface DisplayIDTM Restrictions Depending on the graphic controller not all features can be used. The following table shows the most important restrictions. Restrictions for pITX-SP Panels with dual or quad clock not supported (2 or 4 Pixel per Clock) Panels with LDI 24bit color mapping not supported Only normal DE mode possible Variable power sequencing not supported 3.3.3 LCD Panel Selection The choice of an LCD display is basically defined by two parameters.
KTD-S0003-C 3.3.4 Page 9 Graphics Interface DisplayIDTM Windows® Tool The DisplayIDTM parameter can be modified with the DisplayIDTM Windows® tool. For an example the following picture shows the input fields for the Detailed Timing parameters. For more information see the documentation of the DisplayIDTM tool (software can be downloaded from kontron.com).
KTD-S0003-C Page 10 Graphics Interface The DisplayIDTM Editor saves the parameters in a intermediate file format. The file extension is 'KDD' (Kontron DisplayIDTM Data). This file format cannot be used to program the onboard EEPROM. For transfering this file format into the binary file format for the EEPROM apply the Converter. Building DisplayIDTM File 3.3.5 Start the Windows® tool DisplayID.exe.
KTD-S0003-C 3.4 Page 11 Graphics Interface What means GMA and IEGD? Intel® works with two different strategies for the VGA BIOS and the graphic drivers: GMA (Graphics Media Accelerator) as the standard VGA BIOS for desktop PC´s and IEGD (Intel® Embedded Graphics Driver) for special cases. The GMA VGA BIOS allows also the use of an IEGD graphic driver (Windows® or Linux). Whereas the IEGD VGA BIOS should only be used with the corresponding graphic driver.
KTD-S0003-C 3.4.1.1 Page 12 Graphics Interface DVI Monitor Selection The following table gives an overview about the possible resolutions which can be displayed on a DVI monitor. Generally the best result can be achieved when the nominal resolution of the DVI-monitor is used. ATTENTION: These resolutions are not valid for the LVDS interface of the pITX-SP (see chapter LCD Panel Selection). 3.4.
KTD-S0003-C Page 13 Graphics Interface The IEGD package can be downloaded from the website http://edc.intel.com/Software/Downloads/IEGD (KONTRON Technology A/S can't guarantee the availability of these internet address). Note: 3.5 The IEGD driver will not be developed any longer after version 10.3. Intel® plans to release a new version of the GMA driver with several embedded features. H.264 Support for Linux KONTRON Technology A/S owns a Linux driver that support the H.264 codec.
KTD-S0003-C 4 Page 14 Serial-ATA Interface Serial-ATA Interface The Serial-ATA controller supports two operating modes: a native PCI IDE controller and a RAID/AHCI controller. 4.1 Native PCI IDE Controller In this mode no drivers are needed for a Windows® installation. Interrupt and I/O-addresses can take any value (except the known legacy settings 0x1F0/0x170 respectively IRQ14/15). Diagnostic tools which bypass the INT13 and directly access registers may cause uncontrolled behaviors.
KTD-S0003-C 5 Page 15 SDIO/microSD Card Interface SDIO/microSD Card Interface The following operating systems allow booting from SDIO/microSD cards: DOS, Linux, Windows® XP/ Windows® 7 and Windows® XP Embedded. 5.1 DOS Boot All standard DOS programs for partitioning and formating can be used (e.g. FDISK.EXE and FORMAT.COM). However it can not be guaranteed that all functions of INT13h respectively INT21h work correctly. Following steps are necessary to prepare a DOS bootable card.
KTD-S0003-C Page 16 SDIO/microSD Card Interface Some Linux distributions already offer an extensive SDIO/microSD card support. Example: Fedora® 11 Live CD At least a microSD card with 4 Gbyte is needed for the installation. Confirm the icon Install to Hard Drive and follow all instructions until you come to the partitioning part. In the combo box field with the default setting Replace existing Linux system select the option Create custom layout. Any existing partition must be deleted.
KTD-S0003-C 6 Page 17 CPLD Interface CPLD Interface Various functions are implemented in the CPLD: e.g. watchdog, digital I/O and fan control. Access to the CPLD register is via an index-data register pair using only two I/O byte locations (fixed addresses).
KTD-S0003-C Page 18 CPLD Interface Fan control register Note: 6.1 0xF4 RW 0x3F 1) 0xF5 RO --- Bit 0 - 4 Bit 5 Bit 6 - 7 Fan output value Reserved Fan divisor 00 = divisor = 1 10 = divisor = 2 01 = divisor = 4 11 = divisor = 8 Fan speed register Bit 0 - 7 Fan speed 1) Default Setup settings. Special Hints The following remarks must be considered (especically the first hint). 6.1.1 Reserved Bits Every bit which is marked as Reserved may not be changed (exception: watchdog control).
KTD-S0003-C 6.2 Page 19 CPLD Interface Programming Examples The following examples (DOS programs) show the access to the CPLD features (C compiler: BORLAND C++). Note: These programs cannot be run on Linux and Windows®. 6.2.1 Watchdog Example #include #include
KTD-S0003-C 6.2.2 Page 20 CPLD Interface Digital I/O Example BIOS Setup settings (entry Advanced/Onboard Device Configuration/GPIO Configuration): GPIO Pin 0 - 3 GPIO Pin 4 - 7 Default Output State Input Output Low #include #include #include
KTD-S0003-C 6.2.3 Page 21 CPLD Interface I2C with GPIOs Example This example demonstrates the GPIO usage as an I2C bus. VDD N.C. INT A0 A1 A2 GPIO4 SCL GPIO0 SDA GND PCF8574 Digital I/O Interface VCC P0 P1 P2 P3 P4 P5 P6 P7 VSS BIOS Setup settings (entry Advanced/Onboard Device Configuration/GPIO Configuration): GPIO Pin 0 GPIO Pin 4 Default Output State Tri-State Tri-State High #include #include #include
KTD-S0003-C Page 22 //********************************************************* //* Sets clock line low //********************************************************* void SCL_Low (void) { i2c_bits &= ~I2C_CLOCK; outp (CPLD_BASE_ADDR+1, i2c_bits); } //********************************************************* //* Sets data line high //********************************************************* void SDA_High (void) { i2c_bits |= I2C_DATA; outp (CPLD_BASE_ADDR+1, i2c_bits); } //***********************************
KTD-S0003-C Page 23 _asm mov ah, al _asm loop _Loop _asm pop cx } //********************************************************* //* Makes sure that the bus is in a known condition //********************************************************* void I2C_Reset (void) { outp (CPLD_BASE_ADDR, GPIO_OUTPUT); i2c_bits = 0; i2c_error = I2C_OK; SCL_Low (); SDA_Low (); I2C_Delay (); SCL_High (); I2C_Delay (); SDA_High (); } //********************************************************* //* Generates a start condition on the
KTD-S0003-C Page 24 //********************************************************* //* Clock out one bit //********************************************************* void I2C_Bit_Out (int bit_out) { if (bit_out) SDA_High (); else SDA_Low (); I2C_Delay (); SCL_High (); I2C_Delay (); SCL_Low (); I2C_Delay (); } //********************************************************* //* Clock in one bit //********************************************************* int I2C_Bit_In (void) { int bit_in; SDA_High (); SCL_High ();
KTD-S0003-C Page 25 SDA_High (); I2C_Delay (); bit_in = I2C_Bit_In (); if (bit_in) i2c_error = I2C_ERR_NAK; return i2c_error; } //********************************************************* //* Reads one byte in from the slave.
KTD-S0003-C Page 26 //********************************************************* //* Reads a byte from I2C device (main routine) //********************************************************* void ReadI2CDevice (int device_addr) { int byte_read; I2C_Reset (); I2C_Stop (); I2C_Start (); I2C_Byte_Out (device_addr | 1); byte_read = I2C_Byte_In (); I2C_Stop (); do something } void main (void) { if (WriteI2CDevice (DEVICE_PCF8574, 0xA5)) ReadI2CDevice (DEVICE_PCF8574); } pITX-SP Software Guide CPLD Interface
KTD-S0003-C 6.2.4 Page 27 CPLD Interface GPIO IRQ Example It's very simple to check the interrupt feature. The picture shows how the jumper must be set. For testing remove a jumper (breaks IRQ generation) and set it again. The interrupt assignment to IRQ7 is not changeable. J3202 J1800 J3201 Attention: Set the entry Advanced/Onboard DeviceConfiguration/Chipset Configuration/Serial IRQ Mode to Continuous.
KTD-S0003-C Page 28 int flag = 0, reg_val; void interrupt (*oldISR)(__CPPARGS); void interrupt gpioISR(__CPPARGS) { outp (CPLD_BASE_ADDR, GPIO_OUTPUT); reg_val |= (IRQ_BIT5 + IRQ_BIT6); outp (CPLD_BASE_ADDR+1, reg_val); flag++; outp (CTRL_8259, EOI); } void main (void) { int i, count5 = 0, count6 = 0, old_mask, ctrl_val; clrscr (); _disable (); oldISR = _dos_getvect (VECTOR_IRQ7); _dos_setvect (VECTOR_IRQ7, gpioISR ); old_mask = inp (IMR_8259); outp (IMR_8259, (old_mask & ~IRQ_MASK)); _enable (); outp (CP
KTD-S0003-C Page 29 flag = 0; outp (CPLD_BASE_ADDR, GPIO_OUTPUT); reg_val &= ~IRQ_BIT6; outp (CPLD_BASE_ADDR+1, reg_val); for (i = 0; i < IRQ_TIMEOUT; i++) if (flag) break; if (i != IRQ_TIMEOUT) { gotoxy (1, 3); printf ("Interrupt Count GPIO 6 = %d", ++count6); } delay (500); } outp (CPLD_BASE_ADDR, GPIO_CONTROL); reg_val = inp (CPLD_BASE_ADDR+1); reg_val &= ~IRQ_ENABLE; outp (CPLD_BASE_ADDR+1, reg_val); _disable (); _dos_setvect (VECTOR_IRQ7, oldISR ); outp (IMR_8259, old_mask ); _enable (); } pITX-SP S
KTD-S0003-C 6.2.5 Page 30 Fan Control Example #include #include #include
KTD-S0003-C 6.2.6 Page 31 CPLD Interface Fan Speed Example #include #include #include #define #define #define #define #define #define #define #define #define #define #define CPLD_BASE_ADDR FAN_CTRL_INDEX FAN_SPEED_INDEX CTRL_MASK DIVISOR_SHIFT SPEED_OVERFLOW MAX_DIVISOR ESC_CHAR UPDATE_TIME REFRESH_TIME TRUE 0xA80 0xF4 0xF5 0x3F 6 255 3 0x1B 1000 500 1 // 1 second // 0.
KTD-S0003-C Page 32 while (TRUE) { speed = (int) ReadFanSpeed (divisor); speed *= 60; // speed must be divided by pulses per round gotoxy (1,1); printf ("Divisor = %d Speed = %d if (kbhit ()) { key = getch (); if (key == ESC_CHAR) break; } delay (REFRESH_TIME); ", (1 << divisor), speed); } } pITX-SP Software Guide CPLD Interface
KTD-S0003-C 7 Page 33 Tri-Axis Accelerometer Example Tri-Axis Accelerometer Example The accelerometer is not available before hardware revision 3.0 (only the Plus variant). The sensor chip ML8953 (OKI) based on a piezo-resistive sensing principle. Acceleration measurement range: ±3g. #include #include #include #include
KTD-S0003-C Page 34 byte ReadReg (byte reg) { union REGS regs; regs.h.ah = SMBUS_ENTRY; regs.h.al = SMBUS_READ_BYTE; regs.h.bh = DEVICE_ADDR; regs.h.bl = reg; int86 (INT_SERVICE, ®s, ®s); return regs.h.
KTD-S0003-C Page 35 gotoxy (1,2); sprintf (str, "Acceleration X Vector = %1.4f", resX); if (sign) sprintf (str, "Acceleration X Vector = -%1.4f", resX); printf (str); acc_lo = ReadReg (YAXIS_REG); // Read Y value acc_hi = ReadReg (YAXIS_REG+1); acc = ((word) acc_hi * 256) + (word) acc_lo; resY = TransformValue (acc, &sign); gotoxy (1,3); sprintf (str, "Acceleration Y Vector = %1.4f", resY); if (sign) sprintf (str, "Acceleration Y Vector = -%1.
KTD-S0003-C 8 Page 36 DOS Problems DOS Problems Not all DOS versions run without problems. The most common reason is: The absence of a keyboard controller (8042 compatible) and acording to this the missing I/O addresses 60h/64h can cause problems with keyboard drivers. 8.1 Keyboard Driver Most DOS versions do not accept switching to different character sets - this means the US character set (default) remains. A bootable MS-DOS 8.0 floppy disk can be created using Windows® XP. 8.
KTD-S0003-C 9 Page 37 ACPI Thermal Management ACPI Thermal Management The ACPI thermal management supports two modes: passive cooling (decrease the system performance, but produce no noise) and active cooling (no performance loss, but noise production). 9.1 Passive Cooling Passive cooling controls the processor temperature by activating the automatic thermal throttling after the processor reaches a certain temperature.
KTD-S0003-C 10 Page 38 ACPI Wakeup ACPI Wakeup Two wake events are possible: Wake On LAN (WOL) and Wake On USB (the Wake On USB event requires the CPLD version 0x10 or greater, see BIOS Setup entry Main/Board Information). 10.1 Wake On USB 10.1.1 Windows® XP By default Windows® XP and Windows® Server 2003 enable USB devices, e.g. keyboard and mouse, to wake up the board after sleep. The default behavior permits the board to enter the S1 power state for standby, not the S3 state.
KTD-S0003-C 11 Page 39 JIDA32 Interface JIDA32 Interface Most KONTRON single board computers (SBCs) are equipped with unique hardware features that cannot be accessed with standard API. The JIDA32 interface allows you to access this features in a hardware independent manner under popular 32-bit operating systems. Not mentioned parts of the JIDA32 interface are not supported and can lead to wrong results. Note: 11.
KTD-S0003-C 11.3.1 Page 40 JIDA32 Interface Bus Number Technology Type Device Count 0 I2C (primary) JIDA 1 1 SMBus Generic 2 2 I2C JILI 1 Comment Not supported on Basic variant Bus Number 0 (JIDA) This bus allows access to the JIDA EEPROM in which KONTRON specific manufacturing parameters are stored. A damage of these parameters leads to a loss of warranty. Due to this a write cycle may only be performed above a defined address. 11.3.
KTD-S0003-C 11.5 Page 41 JIDA32 Interface Hardware Monitor Part The hardware monitor part contains in most cases several subsections. 11.5.1 Section Sensor Count Temperature 2 Fan Not supported Voltage Not supported Temperature The term On-Chip diode designates the chip temperature of the temperature sensor (with no dependence to the CPU temperature). 11.6 Sensor Number Abs.
KTD-S0003-C 11.8 Page 42 JIDA32 Interface JIDA32 Windows® Programming For further information see the actual JIDA32 documentation (JIDA32.pdf). 11.8.1 Program Language C The demo program reads and shows the board name and the first 16 bytes of SPD EEPROM (SMBus). The program uses the static linked library JIDA.LIB. Example: #include #include "jida.
KTD-S0003-C 11.8.2 Page 43 JIDA32 Interface Program Language DELPHI The demo program activates the watchdog (timeout = 30 seconds). The keyword 'var' passes the argument by reference.
KTD-S0003-C Page 44 JIDA32 Interface procedure TForm1.Button1Click(Sender: TObject); begin {Method 1} if JidaDLLInitialize () then begin if JidaDllIsAvailable () then begin if JidaBoardOpen (JIDA_BOARD_CLASS_CPU, 0, JIDA_FLAGS_DEFAULT, hJida) then JidaWDogSetConfig (hJida, 0, JIDA_TIMEOUT_VALUE, JIDA_DELAY_VALUE, JIDA_REBOOT_MODE); end; JidaDllUninitialize (); end; end; end.
KTD-S0003-C Page 45 The associated DPR file: program Jidatest; uses Forms, mainU in 'mainU.pas' {Form1}; {$R *.res} begin Application.Initialize; Application.CreateForm (TForm1, Form1); Application.Run; end.
KTD-S0003-C 11.8.3 Page 46 JIDA32 Interface Program Language VISUAL BASIC (VB.NET) The demo program shows the board count value and activates the watchdog (timeout = 10 seconds). Example: Public Class JidaTest Declare Declare Declare Declare Auto Function JidaDllInitialize Lib "JIDA.DLL" () As Boolean Auto Function JidaDllUninitialize Lib "JIDA.DLL" () As Boolean Auto Function JidaDllIsAvailable Lib "JIDA.DLL" () As Boolean Auto Function JidaBoardCount Lib "JIDA.
KTD-S0003-C Page 47 JIDA32 Interface The associated Designer file: Partial Class JidaTest Inherits System.Windows.Forms.Form Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub Private components As System.ComponentModel.IContainer
KTD-S0003-C 11.8.4 Page 48 JIDA32 Interface Module Definition File The calling program can refer to the function by name or by ordinal value. The tool IMPDEF.EXE (e.g. BORLAND C++) make it possible to generate the DEF-file (from JIDA.DLL 06/07/2004, in newer DLLs the ordinal value can be changed).
KTD-S0003-C JidaIOIsAvailable JidaIORead JidaIOSetDirection JidaIOWrite JidaIOXorAndXor JidaJ32B JidaJ32BTransAddr JidaPerformanceGetCurrent JidaPerformanceGetPolicy JidaPerformanceGetPolicyCaps JidaPerformanceSetCurrent JidaPerformanceSetPolicy JidaStorageAreaBlockSize JidaStorageAreaCount JidaStorageAreaErase JidaStorageAreaEraseStatus JidaStorageAreaRead JidaStorageAreaSize JidaStorageAreaType JidaStorageAreaWrite JidaTemperatureCount JidaTemperatureGetCurrent JidaTemperatureGetInfo JidaTemperatureSetLi
KTD-S0003-C 11.9 Page 50 JIDA32 Interface JIDA32 Linux Programming Please note that the JIDA32 package does not include full sources. Instead precompiled objects are provided that can be used to build a JIDA32 package for a certain environment (GCC, kernel, libc). In order to handle GCC version incompatibilities and different kernel module build environments the package includes different branches (you can use the GCC_3.x.x subdirectory for GCC 4.x.x compiler versions). GCC_2.x.
KTD-S0003-C Page 51 JIDA32 Interface You can provide a prefix for the above named directories with the INSTALL_MOD_PATH environment variable if you want to install the files into an alternative root file system. (Note: kernel 2.6.x only) After successfull build and installation you should run the sample application jidatst which will display the following message: JIDA system driver is incompatible or not installed.
KTD-S0003-C 12 Linux Support 12.1 openSUSE® 11.1 Page 52 Linux Support Kernel: 2.6.27.7-9-pae i686 Device Supported Poulsbo Chipset DVI/LVDS Support LAN Controller HD Audio Controller USB Controller Parallel-ATA Controller Serial-ATA Controller SDIO (microSD) Controller 12.2 Fedora® 11 Kernel: 2.6.29.4-167.fc11.
KTD-S0003-C 12.3 Page 53 Linux Support Reboot Problem Most Linux distributions will freeze after a restart or a shutdown command is issued right at the very end of the process forcing the system to do a hard reset. By default the Linux kernel uses the reboot=kbd method i.e. it tries to look for a keyboard controller and issue a reset/shutdown command to it. The pITX-SP board doesn’t have a keyboard controller and a fix is required.
KTD-S0003-C Page 54 Appendix A: Reference Documents Appendix A: Reference Documents KONTRON Technology A/S can't guarantee the availability of internet addresses. Document Internet Address Advanced Configuration and Power Interface (ACPI) http://www.acpi.info/spec.htm AT Attachment Storage Interface Specification (ATA) http://t13.org Digital Visual Interface (DVI) http://www.ddwg.org High Definition Audio Specification (HD Audio) http://www.intel.
KTD-S0003-C Page 55 Appendix B: Document Revision History Appendix B: Document Revision History Revision Date Author S0003-C 11/04/10 M. Hüttmann Replaced the JIDA32 Delphi example Changes S0003-B 05/26/10 M. Hüttmann Created the chapter 'CPLD Interface' S0003-A 03/18/10 M. Hüttmann Added chapter 'ACPI Thermal Management' as well as 'ACPI Wakeup' and supplemented chapter 'Linux Reboot Problem' as well as 'S-ATA Interface' S0003-0 12/17/09 M.