CM-T3730: WEC7: Demo Image

From Compulab Mediawiki
Jump to: navigation, search

The CompuLab WinCE demo image for CM-T3730 is based on standard WEC 7.0.

Supported Features

The CM-T3730 demo image supports the following features:

  • 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
  • Keypad (6x6)
  • RTC
  • SPI bus

Demo Image Contents

The following standard WEC 7.0 components are included in this demo image:

  • File System Explorer
  • ActiveSync
  • Internet Explorer 7.0 Sample Browser
  • .NET Compact Framework 3.5
  • Windows Music Player
  • Windows Video Player
  • Telnet Server

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

Get Connected with ActiveSync

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

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-T3730)

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

Demo Image Components

The demo image is packed into the raw NK.bin file that is stored in a micro SD card which is installed on the CM-T3730 (P5).

RAM

The CM-T3730 supplied with the evaluation kit is equipped with 256MB of RAM. The demo image requires approximately 127MB of RAM (56MB are reserved for the display and the DSP) and leaves 129MB for application use.

Persistent Registry

The demo image is built with a “Hive-Based Registry” option. This means that the system registry is stored in the micro SD card 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 SD card every 30 seconds. After changing registry settings, allow 30 seconds before turning off the power or performing a hardware reset. This will ensure that changes are saved into the SD card flash.

Networking

The following network interfaces are supported in the demo image:

  • CM-T3730 Ethernet - Full-featured 10/100 Ethernet interface. Implemented with the SMSC LAN9220 Ethernet controller on the CM-T3730 module. 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.

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-T3730 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 provides a high speed USB host port.

SD card

  • The micro SD mounted on the CM-T3730 (P5) can be used as an extra storage 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 CM-T3730 image supports a generic 36 (6x6) button keypad.

The demo image is configured for the 3x3 keypad supplied with the CM-T3730 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.

Changing from LCD to DVI

The CM-T3730 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.

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

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 for CM-T3X.

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.