EM-T3530: WinCE: Demo Image

From Compulab Mediawiki
Jump to: navigation, search

CompuLab WinCE demo image for EM-T3530 is based on standard WinCE 6.0 R3.

Supported Features

The EM-T3530 demo image supports the following features:

  • NAND flash
  • TFT LCD (pre-configured for Toppoly TD035STEE1 TFT 480x640)
  • Audio
  • WiFi 801.11b/g
  • USB device and host ports
  • Ethernet
  • Serial ports
  • SD/MMC card
  • GPIO access
  • I2C bus
  • Touch screen
  • Keypad (6x6)
  • 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
  • .NET Compact Framework 3.5

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

Get Connected with ActiveSync

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

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 (EM-T3530)

  • Connect the USB cable to the USB OTG port (connector P9 on the EM-T3530).
  • Reset the EM-T3530 evaluation platform.

Demo Image Components

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

RAM

The EM-T3530 supplied with the evaluation kit is equipped with 256MB of RAM. The demo image requires approximately 96MB of RAM and leaves 160MB for application use.

NAND Flash

The EM-T3530 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:

  • EM-T3530 Ethernet - Full-featured 10/100 Ethernet interface. Implemented with the SMSC LAN9220 Ethernet controller on the EM-T3530 module. The interface is routed to connector P10 of the EM-T3530.
  • Wireless LAN - incorporates full-featured 802.11 b/g capabilities. Implemented with the Wi2Wi W2SW0001 WLAN controller on the EM-T3530 module.

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 EM-T3530 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

  • Connectors P7 and P5 provide 2 USB host ports that operate at high/full/low speeds.
  • Connector P9 provides a USB device port (used mainly for ActiveSync and charging).

SD card

  • The EM-T3530 evaluation board feauters a micro SD socket (connector P11).
  • 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.

Keypad

The EM-T3530 image supports a generic 36 (6x6) button keypad.

The demo image is configured for the 3x3 keypad supplied with the EM-T3530 evaluation kit. The default key mappings are listed below:

  • "Left", "Right", "Up", "Down" buttons control cursor movement (SW3, SW7, SW4, SW6 respectively)
  • "SW5" button acts as "Enter" key
  • "SW1" button acts as "Escape"
  • "SW2" button acts as "Tab"
  • "SW8" button acts as "Home"
  • "SW9" button acts as "End"

Customizing the keypad driver

Use the following registry settings to modify virtual key assignments:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Keypad]
	"Row0"=multi_sz:"18","9","25","0","0","0"
	"Row1"=multi_sz:"26","0d","28","0","0","0"
	"Row2"=multi_sz:"27","24","23","0","0","0"
	"Row3"=multi_sz:"0","0","0","0","0","0"
	"Row4"=multi_sz:"0","0","0","0","0","0"
	"Row5"=multi_sz:"0","0","0","0","0","0"

The keypad above is defined with 3 columns and 3 rows. The values represent each row virtual keys. For example:

"Row1"=multi_sz:"26","0d","28","0","0","0"

The line above informs the keypad driver that:

  • The button corresponding to Row1 and Col0 is virtual key 0x26 (VK_UP).
  • The button corresponding to Row1 and Col1 is virtual key 0xd (VK_RETURN).
  • The button corresponding to Row1 and Col2 is virtual key 0x28 (VK_DOWN).
  • The other buttons in Row1 are not connected.

A full list of virtual key codes is available at MSDN Virtual Key Codes

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.

Using custom display settings

The following registry keys allow setting custom display timings:

[HKEY_LOCAL_MACHINE\System\GDI\Drivers\Config]
	"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.

Video Playback

The EM-T3530 WinCE demo image supports playback of MPEG2, MPEG4 and H.264 video formats.

For further information regarding video playback, please refer to Video playback.

Video Capture

WinCE: Setting up a USB Camera

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.

PMIC register access

Use the following commands to read/write the TPS65930 register. For complete TPS65930 register documentation, please refer to the TPS65930 Technical Reference Manual.

  • do intwl address subaddress [size] - Read TPS65930 registers.
  • do outtwl address subaddress value - Write TPS65930 registers.

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.

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