CM-T3517: WinCE: Demo Image

From Compulab Mediawiki
Revision as of 16:09, 31 August 2011 by Grinberg (talk) (Using custom splashscreen)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CompuLab WinCE demo image for CM-T3517 is based on standard WinCE 6.0 R3.

Supported Features

The CM-T3517 demo image supports the following features:

  • NAND flash
  • TFT LCD (pre-configured for Toppoly TD035STEE1 TFT 480x640)
  • DVI
  • LVDS
  • Audio
  • USB device and host ports
  • Ethernet
  • Serial ports
  • SD/MMC card
  • GPIO access
  • I2C bus
  • Touch screen
  • RTC
  • SPI bus

Demo Image Contents

The following standard WinCE 6.0 components are included in this demo image:

  • File System Explorer
  • ActiveSync
  • Internet Explorer XAML UI Sample Browser
  • Flash Lite ActiveX control
  • Windows Media Player
  • Telnet Server

The full list can be found in CM-T3517: CE Run-Time License Assessment

Get Connected with ActiveSync

ActiveSync enables data synchronization between a host PC and the CM-T3517 evaluation platform. You must install ActiveSync on your PC before connecting it to the CM-T3517.

On the Host PC

Host running Windows XP

  • Download and Install ActiveSync from Microsoft website.
  • ActiveSync may experience connection problems caused by Windows desktop firewall applications. Read the ActiveSync Troubleshooting Guide for host PC configuration instructions.
  • Ensure that ActiveSync synchronization via USB is enabled in the Connection Settings dialog box
ActiveSync connection settings window.jpg

Host running Windows 7

Download and install the latest version of Windows Mobile Device Center (WMDC) for Windows 7 from Microsoft website.

On the Target (CM-T3517)

  • Connect the USB cable to the USB OTG port (connector P8 on SB-T35).
  • Reset the CM-T3517 evaluation platform.

Demo Image Components

The demo image is packed into the raw NK.bin file that is stored in the CM-T3517 NAND flash during installation.

RAM

The CM-T3517 supplied with the evaluation kit is equipped with 256MB of RAM. The demo image requires approximately 80MB of RAM and leaves 180MB for application use.

NAND Flash

The CM-T3517 supplied with the evaluation kit is equipped with 512MB NAND flash. XLDR and Eboot bootloaders are stored in the NAND flash. Demo image installation process partitions the NAND flash and reserves unpartitioned space for the runtime image.

During demo image installation, the NAND flash is automatically partitioned and space is reserved for the runtime image, which is stored in the NAND flash unpartitioned space.

Approximately 480 MB of free space is available for data storage on the NAND. Data can be stored in the root directory ("\My device").

Persistent Registry

The demo image is built with a “Hive-Based Registry” option. This means that the system registry is stored in the NAND flash data partition, making registry entries persistent when the device is powered off. The demo image is configured according to a “Lazy Flush” registry policy. The registry settings are stored in RAM and are flushed into the NAND flash every 30 seconds. After changing registry settings, allow 30 seconds before turning off the power or performing a hardware reset. This will ensure that the changes are saved into the NAND flash.

Networking

The following network interfaces are supported in the demo image:

  • CM-T3517 Ethernet - Full-featured 10/100 Ethernet interface. Implemented with the AM35x EMAC controller. The interface is routed to connector P18 of the SB-T35.
  • SB-T35 Ethernet - Full-featured 10/100 Ethernet interface. Implemented with the SMSC LAN9220 Ethernet controller on the SB-T35 base-board. The interface is routed to connector P16 of the SB-T35.

The demo image image is configured to use a DHCP server to obtain network settings for the three network adapters. Network settings can be changed in the Windows CE Control Panel.

Defining static IP address

It is possible to configure a static IP address by modifying the registry.

For example, the following registry settings disable DHCP and define the static IP 10.1.1.144 for the CM-T3517 Ethernet controller:

[HKEY_LOCAL_MACHINE\Comm\SMSC91181\Parms\TcpIp]
    "EnableDHCP"=dword:0
    "IpAddress"="10.1.1.44"
    "Subnetmask"="255.255.255.0"
    "DefaultGateway"="10.1.1.1"
    "UseZeroBroadcast"=dword:0

USB

  • Connector P17 provides 2 USB host ports that operate at high/full/low speeds.
  • Connector P8 provides a USB device port (used mainly for ActiveSync).
  • Connector P22, P23, and P24 provide a high speed USB host port.

SD card

  • The SB-T35 evaluation board feauters SD socket (connector P13).
  • When an SD card is inserted it is mounted automatically as “Storage Card” under “My Device”.
  • The demo image has been tested successfully with the following types of SD cards: SanDisk Ultra III 2Gb, Kingston 2Gb, SanDisk 1Gb, and Kingston Micro SDHC 4Gb.

Touch Screen

The demo image is calibrated for the Toppoly TD035STEE1 LCD touch screen. To fine-tune the calibration, run the touch screen calibrator by tapping Start >> Settings >> Control Panel >> Stylus >> Calibration. For further details about touch screen calibrator registry settings refer to the Touch Screen (Stylus) Registry Settings MSDN article.

Display Subsystem

The demo image is configured for the Toppoly TD035STEE1 TFT LCD shipped with the evaluation kit

The default resolution is 480x640 with 16-bit color depth and portrait display.

Changing from LCD to DVI

The CM-T3517 evaluation platform can be connected to a standard DVI display. Use connector J2 on SB-T35 and HDMI-to-DVI adapter cable supplied with the evaluation kit.

The HKEY_LOCAL_MACHINE\System\GDI\Drivers\Config registry key defines display mode configuration. The example below sets the display subsystem to DVI mode with 1024x748 screen resolution.

[HKEY_LOCAL_MACHINE\System\GDI\Drivers\Config]
	"PredefinedDisplay"="DVI_1024W_768H"

The demo image supports the following predefined display modes:

"PredefinedDisplay" Value Display Mode
DVI_640W_480H DVI mode 640x480
DVI_640W_480H_72HZ DVI mode 640x480 @ 72 Hz
DVI_800W_480H DVI mode 800x480
DVI_800W_600H DVI mode 800x600
DVI_800W_600H_56HZ DVI mode 800x600 @ 56 Hz
DVI_1024W_768H DVI mode 1024x768
DVI_1280W_720H DVI mode 1280x720
TOPPOLY_480W_640H LCD mode (Toppoly LCD)

Using custom display settings

The following registry keys allow setting custom display timings:

[HKEY_LOCAL_MACHINE\System\GDI\Drivers\Config]
	"IsDVIEnabled"=dword:0                    ;0 for LCD, 1 for DVI
        "IsLVDSEnabled"=dword:0                   ;1 for enabled LVDS interface
	"HorizontalSyncPolarity"=dword:0          ;1 for active high , 0 for active low
	"VerticalSyncPolarity"=dword:0            ;1 for active high , 0 for active low
	"Height"=dword:280                        ;Vertical resolution
	"Width"=dword:1e0                         ;Horizontal resolution
	"HorizontalSyncPulseWidth"=dword:20       
	"VerticalSyncPulseWidth"=dword:1          
	"HorizontalBackPorch"=dword:17            
	"HorizontalFrontPorch"=dword:0000008
	"VerticalFrontPorch"=dword:0000004
	"VerticalBackPorch"=dword:0000003
	"PixelClockFrequency"=dword:17D7840       ;In Hz
	"PixelClockPolarity"=dword:00000001       ;1 for rising edge, 0 for falling edge
Admolition note.png When using custom display timings, make sure the "PredefinedDisplay" key is not defined.

For additional details about CompuLab LCD adaptation services, please refer to LCD Panel support.

The LCDAdapt utility included in the Windows CE 6 run-time image package allows easy configuration of LCD timing parameters.

Using custom splashscreen

Please refer to Splashscreen Customization Guide for the splashscreen customization options.

Using the Do.exe utility for quick system configurations

The Do.exe utility is provided with the demo image (source code is available in the BSP). It can be used for the following purposes:

  • Access to the physical address space.
  • Access to the TPS65930 PMIC registers.
  • Access to the I2C devices memory space.
  • Get current CPU load.
  • Calibrate touch screen.
  • Manipulate GPIO pins.
  • Reboot the device

Physical address space access

Use the following commands to access OMAP35x registers (physical address space). For complete OMAP35x register documentation, please refer to the OMAP35x Technical Reference Manual.

  • do in8 address [size] - Read 8-bit registers.
  • do in16 address [size] - Read 16-bit registers.
  • do in32 address [size] - Read 32-bit registers.
  • do out8 address value - Write 8-bit register.
  • do out16 address value - Write 16-bit register.
  • do out32 address value - Write 32-bit register.

I2C device register access

Use the following commands to access an I2C device connected to the system.

  • do ini2c [1,2,3] device_address reg_address [size] - Read I2C device registers.
  • do outi2c [1,2,3] device_address reg_address reg_value - Write I2C device registers.

For example: The following command will read register 0x12 from a device with slave address 0x20 attached to I2C-2 bus:

do ini2c 2 20 12

Measure CPU load

The following command measures the current CPU load:

  • do cpuidle - Display amount of time spent in OEMIdle.

The following shows do cpuidle command output with the CPU load at ~8%:

idle count=0x00073164, tick count=0x0007D22B
The difference from last check is...
idle delta=0x00073164, tick delta=0x0007D22B
cpu load is 8.030165

Calibrate Touch-Screen

The following command invokes the TouchScreen calibration utility:

  • do tscal - Calibrate touchscreen.

Manipulate GPIO pins

The following commands set a GPIO pin direction to output:

  • do gpio X set_dir out low - Set GPIO X to output with logical value 0 (low).
  • do gpio X set_dir out high - Set GPIO X as output with logical value 1 (high).

Use the following command to set a GPIO pin direction to input:

  • do gpio X set_dir in - Set GPIO X as input.

The following command is used to query a GPIO pin current state:

  • do gpio X info - Get GPIO X status.

Reboot the device

The following command invokes a software reboot:

  • do reboot - Software reset of the device.

Sample Applications

The WinCE demo image package includes demo applications that demonstrate how to use common interfaces such as SPI, I2C and GPIO.

GPIO Sample

This application demonstrates how to use the GPIO driver in order to control the state of GPIO pins.

For further details, please refer to GPIOs Programming.

SPI Sample

The LCDActivate project included in the WinCE demo image package, demonstrates how to use the SPI driver. This project creates the DLL that is used for Toppoly LCD activation.

For further details, please refer to SPI Driver API for CM-T3530.

I2C Sample

The I2C Sample application demonstrates how to use the I2C driver. It writes and reads data to/from an EEPROM on the SB-T35.

1-Wire Sample

The 1-Wire Sample application demonstrates access to a DS2411 Silicon Serial Number device, which is connected to the 1-wire bus.

Running custom applications on startup

You can run a custom application on system startup with the AutoLaunch utility integrated into the demo image.

The AutoLaunch utility extends the functionality of the HKEY_LOCAL_MACHINE\Init registry key allowing configurable launch delay for each application. AutoLaunch monitors the following registry keys:

[HKEY_LOCAL_MACHINE\Startup]
	“Process0” =”Application.exe param1 param2”
	“Process0Delay”=dword:delay ;in milliseconds

[HKEY_LOCAL_MACHINE\Startup\ApplicationName]
	“Process0” =”Application.exe param1 param2”
	“Process0Delay”=dword:delay ;in milliseconds

Usage example:

[HKEY_LOCAL_MACHINE\Startup\ceplayer]
	"Process0” =”ceplayer.exe \windows\sound2.wav”
	“Process0Delay”= dword:1388 ;5000 in decimal

The above example launches CEPlayer five seconds after boot completion. The additional "\windows\Sound2.wav" parameter is used by CEPlayer to play the specified file.

See Also