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.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
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.
Controller programming; Safety networks; Enclosure design; Power quality; Safety integrity levels; Increasing process efficiency
Additive manufacturing benefits; HMI and sensor tips; System integrator advice; Innovations from the industry
Robotic safety, collaboration, standards; DCS migration tips; IT/OT convergence; 2017 Control Engineering Salary and Career Survey
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This article collection contains several articles on how automation and controls are helping human-machine interface (HMI) hardware and software advance.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.

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

Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Future of oil and gas projects; Reservoir models; The importance of SCADA to oil and gas
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me