Книга: Microsoft Windows Embedded CE 6.0 Exam Preparation Kit
Interrupt Latency Timing (ILTiming)
Разделы на этой странице:
Interrupt Latency Timing (ILTiming)
The ILTiming tool is particularly useful for Original Equipment Manufacturers (OEMs) who want to measure ISR and IST latencies. Specifically, ILTiming enables you to measure the time it takes to invoke an ISR after an interrupt occurred (ISR latency) and the time between when the ISR exits and the IST actually starts (IST latency). This tool uses a system hardware tick timer by default, but it is also possible to use alternative timers (high-performance counters).
NOTE
Hardware timer restrictions
Not all hardware platforms provide the required timer support for the ILTiming tool.
The ILTiming tool relies on the OALTimerIntrHandler function in the OAL to implement the ISR for managing the system tick interrupt. The timer interrupt handler stores the current time and returns a SYSINTR_TIMING interrupt event, which an ILTiming application thread waits to receive. This thread is the IST. The time elapsed between the reception of the interrupt in the ISR and the reception of the SYSINTR_TIMING event in the IST is the IST latency that the ILTiming tool measures.
You can find the ILTiming tool's source code in the %_WINCEROOT%PublicCommonOakUtils folder on your development computer if you have installed Microsoft Platform Builder for Windows Embedded CE 6.0 R2. The ILTiming tool supports several command-line parameters that you can use to set the IST priority and type according to the following syntax:
iltiming [-i0] [-i1] [-i2] [-i3] [-i4] [-p priority] [-ni] [-t interval] [-n interrupt] [-all] [-o file_name] [-h]
Table 3-1 describes the individual ILTiming command-line parameters in more detail.
Table 3-1 ILTiming parameters
Command-Line Parameter | Description |
---|---|
-i0 | No idle thread. This is equivalent to using the -ni parameter. |
-i1 | One thread spinning without performing any actual processing. |
-i2 | One thread spinning, calling SetThreadPriority (THREAD_PRIORITY_IDLE). |
-i3 | Two threads alternating SetEvent and WaitForSingleObject with a 10-second timeout. |
-i4 | Two threads alternating SetEvent and WaitForSingleObject with an infinite timeout. |
-i5 | One thread spinning, calling either VirtualAlloc (64 KB), VirtualFree, or both. Designed to flush the cache and the translation look-aside buffer (TLB). |
-p priority | Specifies the IST priority (zero through 255). The default setting is zero for highest priority. |
-ni | Specifies no idle priority thread. The default setting is equal to the number of idle priority thread spins. This is equivalent to using the -i0 parameter. |
-t interval | Specifies the SYSINTR_TIMING timing interval, with clock ticks in milliseconds. The default setting is five. |
-n interrupt | Specifies the number of interrupts. Using this parameter you can specify how long the test will run. The default setting is 10. |
-all | Specifies to output all data. The default setting is to output the summary only. |
-o file_name | Specifies to output to file. The default setting is to output to the debugger message window. |
NOTE
Idle threads
ILTiming may create idle threads (command-line parameters: -i1, -i2, -i3, and -i4) to generate activity on the system. This enables the kernel to be in a non-preemptive kernel call that must be finished before handling the IST. It can be useful to enable idle threads in background tasks.
- 17.1.4. Latency
- 17.2.4. Sources of Preemption Latency
- 17.4.3. Debug Wakeup Timing
- 17.4.4. Wakeup Latency History
- 17.4.5. Interrupt Off Timing
- 17.4.6. Interrupt Off History
- 17.4.7. Latency Tracing
- 1.3.6 Interrupts
- 2.1.12 Interrupts
- PROJECT 6.7 — Two-Digit Multiplexed 7-Segment LED Counter with Timer Interrupt
- 9.7 Nominal Bit Timing
- 9.9.9 Calculating the Timing Parameters