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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access