DEVELOPING A SIMPLE REAL-TIME APPLICATION

Real-time constraints in embedded devices often come from external equipment such as sensors or actuators, which are accessible by the software through I/O registers. In this I/O-driven situation, designing a simple real-time application is a challenging task because I/Os are not standard. To develop a portable and yet useful application the approach is to work on a platform assessment tool rather than I/O control software. The objective of the application is to measure and display information on time determinism for targeted Compact 7 services; you may see it as a simplified version of some tools provided with Windows Embedded Compact 7 such as ILTiming or OSBench. The principle of these tools consists in calling dedicated Compact 7 primitives, which are known as deterministic, and measuring the actual time spent during the call by using a high-resolution chronometer.

The simple real-time application focuses on the Periodic Notification provided by the Timer Driver service of Compact 7. Using Timer Driver functions, the developer can request a function call or an event state modification to happen at predefined periodic instants as shown on the expected timeline at the top of Figure 37-1. Latencies coming from both hardware and software can impact these periodic instants and create uneven periods, as shown on the measured timeline at the bottom of Figure 37-1.

If latencies were perfectly stable, the measured period would ...

Get Professional Windows® Embedded Compact 7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.