
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
971
Coherent Dual-parameter Controller is faster and have less impact on both eTPU and Host performance.
That said, the methods are:
•
Transfer Service
A microengine thread transfers, upon Host Service Request, data from/to a TPA to/from a PPA.
Coherency is guaranteed by the fact that a thread is atomic with respect to other threads in the same
engine, and so are its transfers. If parameters in PPA are shared by both engines, hardware
semaphores have to be used to access them.
•
Mailbox
For Host to eTPU transfers, the microcode checks a flag, set by the host, indicating the existence
of new parameter data in the TPA. It can, then, either access TPA data directly or copy it to the PPA.
For eTPU to Host transfers, when microcode changes PPA, it copies them to the TPA and flags
updated TPA data to Host, possibly using an Interrupt or a Data Transfer Request. The Mailbox
flag is reset when data is copied: by the eTPU microcode, when it transfers TPA to PPA (possibly
followed by an Interrupt); by the Host, when it reads data from the TPA. This indicates that TPA is
free for another transfer.
Transfer Service has the advantage of separating the task of data transfer from the functional service thread
that accesses the parameters, with less impact to the latter. Compared to the Mailbox method, however, it
has bigger average latency, because the Transfer Service thread has to contend for a time slot to execute.
This latency can be minimized if Transfer Service thread is assigned to a separate channel with higher
priority, but even so it does not guarantee that PPA is updated before the next execution of the functional
thread that uses it.
Mailbox method, on the other hand, makes the functional thread check for the existence of new data (Host
to eTPU). It does not have to be responsible for the transfer, though: it may access the TPA directly, and a
Transfer Service can then be used to copy data from TPA to PPA.
24.6.4
Programming hints and caveats
24.6.4.1
Atomic dual access after a call, return
A dual, back-to-back parameter access is not atomic after a call, a jump, or a return if they occurred in
parallel with an odd SPRAM access. It is safer to make a pair of parameter accesses that must be coherent
begin at the second instruction after a call/jump/return.
24.6.4.2
Resource polling
The use of polling while waiting for a condition or a resource (except semaphore lock) should be avoided
in order not to hang the microengine in long loops. This general programming guideline is greatly enforced
in eTPU, as a thread cannot be preempted for any reason. Safer polling, albeit with long and
indeterministic latency, can be obtained if one issues a channel link to itself and terminates the thread. The
microengine is then free to other tasks, and the next poll happens at the next time the channel is serviced.
This mechanism can be combined with finite (timed out) loops for better latency.
Содержание 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...