
Enhanced Time Processing Unit (eTPU2)
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
891
24.5.6.3
STAC Interface
Both time bases TCR1 and TCR2 can be shared between the engines and with other blocks in the same
MCU. Each one of both eTPU engines can drive their time bases to the STAC (Shared Time and Count)
bus, acting as a server, while any other block can capture the value into its resources and behave like a
client. For further reference about the STAC bus operation refer to
Section 24.4.3.4, ETPU_REDCR –
eTPU STAC Configuration Register
The eTPU can export to the STAC bus or import from the STAC bus the following internal resources:
•
TCR1: Can be exported to or imported from the STAC bus. TCR1 can only be imported from
STAC bus when the engine is not in Angle Mode. When TCR1 is imported from the STAC bus, it
becomes read-only for the microcode and reflects the imported values. For details refer to
Section 24.5.6.1, Timer Count Register 1 – TCR1
•
TCR2: Can be exported to or imported from the STAC bus. TCR2 can only be imported from the
STAC bus when engine is not in Angle Mode. When TCR2 is imported from the STAC bus, it
becomes read-only for the microcode, and reflects the imported values. When exported to the
STAC bus, TCR2 can work in either Angle Mode or as a free running counter associated with the
TCRCLK signal. For details refer to
Section 24.5.7, EAC – eTPU angle counter
Proper configuration of the following bits is necessary to determine what can drive the STAC bus:
ETPU_TBCR[AM] and ETPU_REDCR[REN2, RSC2], according to
Note that Angle Mode is not available for STAC bus clients: configuring both at the same time brings
unpredictable results. When TCR2 is a stand-alone counter or a STAC Bus server, the same value that is
driven to the internal TCR2 bus is also exported to the STAC bus (either Time Count or Angle).
STAC bus configuration is provided by the ETPU_REDCR bits REN1/2 and RSC1/2. REN1/2 enable the
STAC interface to interact with the resource (either TCR1 or TCR2 bus). RSC1/2 configure the resource
(either TCR1 or TCR2 bus) as Server or Client.
Each time base / angle count resource from each engine receives a unique 4-bit hard-wired address that
identifies it as a potential server. This address is used by the STAC Controller to coordinate which resource
will drive the bus at a given STAC time-slot. For any time-slot there is a server driving the bus upon
selection of the STAC Controller, and there may be a client linked to that server by the ETPU_REDCR
bits SRV1/2 on each engine. When the server address on the STAC bus matches the value in SRV1/2, the
Table 24-59. STAC Bus and Host Read Sources
AM
(ETPU_TBCR)
REN2,RSC2
(ETPU_REDCR)
TCR2 Bus Source
(Host read of
ETPU_TB2R)
STAC
Bus Driver
00
0x (disabled)
TCR2/Time
x
01, 10 or 11
0x (disabled)
TCR2/Angle
x
00
11 (Server)
TCR2/Time
TCR2/Time
01, 10 or 11
11 (Server)
TCR2/Angle
TCR2/Angle
01, 10 or 11
10 (Client)
Forbidden
1
1
STAC
client configuration in Angle Mode is also forbidden for TCR1.
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...