Enhanced Time Processing Unit (eTPU)
MPC5566 Microcontroller Reference Manual, Rev. 2
18-4 Freescale Semiconductor
one function at a given moment. The eTPU can change the function assigned to a channel if the channel 
is reconfigured by the device core. The device core configures the function to channel assignments. 
The following eTPU hardware supplies resource sharing features that support concurrency:
• A hardware scheduler dispatches the service request microengine routines based on a set of 
priorities defined by the device’s core. Each channel has its own unique priority assignment that 
primarily depends on CPU assignment. The channel’s number is an inherent property also used to 
determine priority.
• A service request routine cannot be interrupted by another service request until it ends, that is, until 
an end instruction is executed. This sequence of uninterrupted instruction execution is called a 
thread. The core can terminate the thread by writing 1 to the FEND bit in the ETPU_ECR register.
• Channel-specific contexts (registers and flags) are automatically switched between the end of a 
thread and the beginning of the next one.
• SDM arbitration, a dual-parameter coherency controller, and semaphores can be used to ensure 
coherent access to eTPU data shared by both eTPU engines and the device core.
18.1.4 eTPU Engine
The eTPU engine processes input pin transitions and generates output pin waveforms. These events are 
triggered by eTPU timers (time bases) that are driven by a system clock to give absolute time control or 
by an asyncronous counter, such as an angle clock that is tracking the angle of a rotating shaft. 
Each eTPU engine consists of the following blocks: 32 independent timer channels, a task scheduler, a host 
interface, and a microprocessor (hereinafter called a microengine) that has dedicated hardware for input 
signal processing and output signal generation over the 32 I/O channels. Each channel can choose between 
two 24-bit counter registers for a time base. 
The microengines fetch microinstructions from shared code memory (SCM). eTPU application parameters 
and global and local variables, referred to as work data, are held in 32-bit shared data memory (SDM), 
which is also used for passing information between the device’s core and both microengines. The bus 
interface unit (BIU) allows the device’s core to access eTPU registers, SDM, and SCM.
The blocks of an eTPU engine are duplicated in a dual eTPU configuration. eTPU engines A and B are 
often referred to as eTPU A and eTPU B in this document. 
18.1.4.1 Time Bases
Each eTPU engine has two 24-bit count registers TCR1 and TCR2 that provide reference time bases for 
all match and input capture events. Prescalers for both time bases are controlled by the device core through 
bit fields in the eTPU engine configuration registers.
The values for each of TCR1 and TCR2 counter registers can be independently derived from the system 
clock or from an external input via the TCRCLK pin. In addition, the TCR2 time base can be derived from 
special angle-clock hardware that enables implementing angle-based functions. This feature is added to 
support advanced angle-based engine control applications.