
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)
Содержание MPC5644A
Страница 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Страница 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Страница 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Страница 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Страница 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Страница 130: ...Device Performance Optimization MPC5644A Microcontroller Reference Manual Rev 6 130 Freescale Semiconductor...
Страница 204: ...Multi Layer AHB Crossbar Switch XBAR MPC5644A Microcontroller Reference Manual Rev 6 204 Freescale Semiconductor...
Страница 212: ...Peripheral Bridge PBRIDGE MPC5644A Microcontroller Reference Manual Rev 6 212 Freescale Semiconductor...
Страница 558: ...System Integration Unit SIU MPC5644A Microcontroller Reference Manual Rev 6 558 Freescale Semiconductor...
Страница 582: ...Frequency modulated phase locked loop FMPLL MPC5644A Microcontroller Reference Manual Rev 6 582 Freescale Semiconductor...
Страница 766: ...Enhanced Time Processing Unit eTPU2 MPC5644A Microcontroller Reference Manual Rev 6 766 Freescale Semiconductor...
Страница 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Страница 1236: ...System Information Module and Trim SIM MPC5644A Microcontroller Reference Manual Rev 6 1236 Freescale Semiconductor...
Страница 1250: ...Cyclic Redundancy Checker CRC Unit MPC5644A Microcontroller Reference Manual Rev 6 1250 Freescale Semiconductor...
Страница 1336: ...Deserial Serial Peripheral Interface DSPI MPC5644A Microcontroller Reference Manual Rev 6 1336 Freescale Semiconductor...
Страница 1388: ...Enhanced Serial Communication Interface ESCI MPC5644A Microcontroller Reference Manual Rev 6 1388 Freescale Semiconductor...
Страница 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...
Страница 1624: ...FlexRay Communication Controller FlexRay MPC5644A Microcontroller Reference Manual Rev 6 1624 Freescale Semiconductor...
Страница 1670: ...JTAG Controller JTAGC MPC5644A Microcontroller Reference Manual Rev 6 1670 Freescale Semiconductor...
Страница 1692: ...Nexus Port Controller NPC MPC5644A Microcontroller Reference Manual Rev 6 1692 Freescale Semiconductor...
Страница 1701: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 Freescale Semiconductor 1701...
Страница 1702: ...Development Trigger Semaphore DTS MPC5644A Microcontroller Reference Manual Rev 6 1702 Freescale Semiconductor...