
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
985
7. Instead of always using the longest thread in the function as the worst-case thread, evaluate the
threads in the function that will be used in the system and use the appropriate worst-case threads.
For example, in the preceding example of first-pass analysis, the PWM was shown to be able to
achieve a high time and low time of 2475 ns under worst-case conditions. This was derived using
the longest PWM thread of 24 CPU clocks. This longest thread is actually thread 2, the thread that
is entered after the pin has just gone high. Thread 3, the thread that is entered after the pin has just
gone low, requires only two CPU clocks. Therefore, in the first-pass example, the high time was
correctly derived, but the low time is actually shorter than was estimated.
24.6.5.5.2
Second-Pass analysis example
This example requires three 50% PWM waveforms: one 5 kHz (200 ms/period) and two 50 kHz (20
ms/period), each running DC motors. (Remember that the PWM function requests service from the eTPU
after each high time and after each low time, so the eTPU must handle a request every 100 ms for the 5 kHz
PWM and every 10 ms for the 50 MHz PWM.)
NOTE
This example uses square waves for simplicity. Notice that to use a PWM
waveform in the typical way, in which the pulse is modulated, the pulse
must not be modulated in a way that violates the worst-case latency
requirements.
This example also uses one DIO channel monitoring a signal level every millisecond and one PPWA
channel in mode 0 monitoring the speed of the 5-kHz DC motor. The PPWA must measure periods of
5 kHz (200 ms/period).
The CPU is interrupted by the channel running the PPWA function after measuring 200 periods (every
40 ms). The interrupt service routine performs an averaging of the period accumulation and checks it
against a known parameter. The interrupt service time is so short and infrequent that it is a tiny fraction of
total system time. The interrupt service routine contains no polling of the parameter RAM. Therefore a
realistic RCR = 0%.
First-Try system configuration
Try a system configuration that seems likely to work. If it does not, change priority levels or channel
numbers.
The 5 kHz and 50 kHz PWMs are the most time-critical functions. Those are assigned high priority. PPWA
is assigned middle priority. The DIO is low performance and is assigned low priority. Refer to
.
Table 24-125. First-Try system configuration
Channel
Priority
Function
1
,
2
0
High
PWM at 50 kHz (needs a 4-µs WCL)
1
High
PWM at 50 kHz (needs a 4-µs WCL)
2
High
PWM at 5 kHz (needs a 40-µs WCL)
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...