English
Language : 

RM0029 Datasheet, PDF (994/1740 Pages) STMicroelectronics – The primary objective of this document
Enhanced Time Processing Unit (eTPU2)
RM0029
24.6.5
Note:
Estimating worst-case latency
Reliable systems are designed to work under worst-case conditions. This section explains
how to estimate worst-case latency (WCL) for any eTPU function in any system. The
appendix covers the following topics:
● Introduction to Worst-Case Latency
● Using Worst-Case Latency Estimates to Evaluate Performance
● Priority Scheme Details used in WCL Analyses
● First-Pass WCL Analysis
● Second-Pass WCL Analysis
The first-pass WCL analysis is based on a deterministic, generalized formula that is easy to
apply. Because of the generalizations in the formula, the first analysis result is almost
always much worse than the real worst case. If the desired system performance is within the
limits of this first analysis, then no further analysis is required; the system is well within the
performance limits of the eTPU. If the desired system performance exceeds that indicated
by the first analysis, the second-pass WCL analysis should be applied. The second-pass
analysis is not a generalized formula, but rather uses specific system details for a realistic
worst-case estimation.
Introduction to worst-case latency
In this Appendix the latency calculation and examples refer to old TPU functions such as
PWM, DIO etc. These functions use single action channels which have single transition and
single match functionality. They are not optimized for the eTPU hardware enhancement
which support various double action modes. These examples are for reference only. New
eTPU functions which are optimized for the new hardware will impose different latency
calculations.
Worst-case latency for a channel is the longest amount of time that can elapse between the
execution of any two function threads on that channel. For example, if in a particular system,
channel 5 is running PWM, the worst-case latency for channel 5 is the longest possible time
between the execution of two PWM threads. The worst-case time includes the time the
execution unit takes to execute threads for other active channels, and other delays
described later in this section. Refer to Figure 555.
Worst-Case Latency
for Channel 5
Additional Channel Threads
and other delays.
PWM Thread
executed for
Channel 5
Figure 555. Worst-case latency for PWM
994/1740
Doc ID 15177 Rev 8
Next PWM Thread
executed for
Channel 5