Zibb
Subscribe to Control Engineering
FirstLight
Email
Print
Reprint
Learn RSS

Solutions aid embedded hardware control

William Kyle -- Control Engineering, 4/1/2000

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 µsec, while worst-case latency remains unaffected by the rogue thread. The same code that was running in the original IST is now running in the ISR using TCX extensions.

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 www.bluewatersystems.com or www.controleng.com


Author Information
William Kyle, vp, Blue Water Systems billk@bluewatersystems.com

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

There are no other articles written by this author.

Sponsored Links

 

Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Discussions
  • Webcasts
  • Podcasts
  • Videos

Blogs

  • Matt Luallen and Steve Hamburg of Encari
    Industrial Cyber Security

    November 17, 2008
    NIST SP 800-82 Guide to Industrial Control Systems Security
    The National Institute of Standards and Technology has posted the Final Public Draft of NIST SP 800-82, Guide to Industrial Control Systems (ICS) S......
    More
  • Peter Welander
    Pillar to Post: Peter Welander's Blog

    November 14, 2008
    Engineers can't light a light bulb?
    Last evening my wife told me about a video she'd seen where a group of MIT engineering graduates showed that they could not figure out how to solve......
    More
  • View All BlogsRSS

Discussions

  • EtherNet/IP Drivers (posted by gr8kr)

  • EtherNet/IP Drivers (posted by gr8kr)

  • OPC (posted by MAHESH)


  • Source: Control.com, the global online discussion community for automation professionals.

    Webcasts

    Engineering-driven Ethernet
    This Control Engineering Roundtable Webcast will address the engineering issues you should be aware of when exploring the adoption of Ethernet or when looking to expand its use in your facility.

    Bridging gaps with wireless
    Discover how you can create stronger, flexible and cost-effective wireless connections for your entire plant. Register today!

    View All Webcasts
    Advertisements





    NEWSLETTERS

    Get engineering industry news, trends, and business-critical information delivered directly to your inbox!

    Click on a title below to learn more.

    Weekly News (Weekly)
    Process Instrumentation & Sensors (Monthly)
    System Integration Monthly (Monthly)
    Process & Advanced Control (Monthly)
    Machine Control (Monthly)
    Information Control (Monthly)
    Automation Control (Monthly)
    Product Review (Monthly)
    Simplified Safety
    Fieldbus Facts
    PROFInews North American Edition
    About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   Useful Sites   |   FREE Subscription   |   RSS
    © 2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
    Use of this Web site is subject to its Terms of Use | Privacy Policy
    Please visit these other Reed Business sites