Solutions aid embedded hardware control

Microsoft Windows CE's expansion into embedded systems and industrial controls is challenging developers trying to help applications communicate with a growing range of hardware devices. Some developers face time-critical tasks requiring enhancements—often involving long and nondeterministic latencies—to specific Windows CE areas.


Microsoft Windows CE's expansion into embedded systems and industrial controls is challenging developers trying to help applications communicate with a growing range of hardware devices. Some developers face time-critical tasks requiring enhancements-often involving long and nondeterministic latencies-to specific Windows CE areas.

Fortunately, there are several ways to solve latency problems. For example, WinDK for Windows CE from Blue Water Systems (Bellvue,Wa.) offers device driver development to solve time-critical hardware control. It builds on the kernel infrastructure, adding features and a driver development environment. Besides a WinDK for Windows 2000 interface, WinDK for Windows CE includes a class library for development and a code generation wizard that creates a starting point for development.

Other features include: Bus Master DMA for high-performance device drivers, including hardware scatter-gather support; slave DMA support; support for overlapped I/O and request queuing; interrupt handling; interrupts transparently shared across multiple devices; full enumeration of ISA, PCI, and PCMCIA buses; multiprocessor support; and performance analysis.

This shows how a typical time-critical extension (TCX) with interrupt service routine (ISR) runs with a rogue thread.

Time-Critical Extensions

Time-Critical Extensions (TCX), an extension to Windows CE, also solves the problems of long and nondeterministic interrupt service thread (IST) latencies when developing high-performance device drivers for Windows CE. TCX adds support for true-nested kernel interrupt service routines (ISRs) plus high-speed kernel timers.

For instance, the top graph shows a situation where a rogue thread is running, and a periodic interrupt is present. In this case, average latency to the ISR is 5

A key requirement for deterministic interrupt latencies is support for ISR pre-emption. ISR pre-emption means that when an ISR is executing and a higher priority interrupt is asserted, the current ISR is preempted and processing of the higher interrupt priority begins. This condition is also called interrupt nesting. Afterward, the original interrupt processing is resumed.

TCX includes a priority scheme for nested kernel interrupts. Priorities are set up via registry entries. A mask for each of 16 interrupt levels is defined. The mask for each interrupt specifies what other interrupts, beside itself, will be masked during execution of the interrupt. Interrupt masks allow a simple interrupt priority to be established, such as making interrupt level 0 always a higher priority than any other interrupt. More complex relationships also can be defined.

Interrupt 7 preempts interrupt 6 in a nested kernel interrupt to obtain low latencies.

The lower chart shows an example where interrupt 7 is set to the highest priority and interrupt 6 has begun to execute. Interrupt 7 now fires and preemps interrupt 6. After interrupt 7 completes, interrupt 6 processing is resumed. By selecting certain interrupts to be at higher priorities, very low latencies can be consistently obtained on the important interrupts.

In addition to nested kernel ISRs, TCX adds kernel timers. These timers act in a manner similar to kernel ISRs. They can be programmed to be periodic at high frequencies. Timer frequency depends on the platform being used and the clock settings configured. Timer jitter will be similar in size to interrupt jitter.

As opportunities for Windows CE developers grow, the need also increases for tools that simplify hardware device control, such as WinDK for Windows CE. Turning projects around quickly and getting to market can make the difference between success and releasing another 'me-too' product.

For more information, visit or

Author Information

William Kyle, vp, Blue Water Systems

No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Make Big Data and Industrial Internet of Things work for you, 2017 Engineers' Choice Finalists, Avoid control design pitfalls, Managing IIoT processes
Engineering Leaders Under 40; System integration improving packaging operation; Process sensing; PID velocity; Cybersecurity and functional safety
Mobile HMI; PID tuning tips; Mechatronics; Intelligent project management; Cybersecurity in Russia; Engineering education; Road to IANA
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

SCADA at the junction, Managing risk through maintenance, Moving at the speed of data
Flexible offshore fire protection; Big Data's impact on operations; Bridging the skills gap; Identifying security risks
The digital oilfield: Utilizing Big Data can yield big savings; Virtualization a real solution; Tracking SIS performance
click me