![NXP Semiconductors MPC5605BK Reference Manual Download Page 649](http://html.mh-extra.com/html/nxp-semiconductors/mpc5605bk/mpc5605bk_reference-manual_1721852649.webp)
Chapter 27 Timers
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
647
27.2.1
Overview of the STM
The STM is a 32-bit free running up-counter clocked by the system clock with a configurable 8-bit clock
prescaler (divide by 1 to 256). The counter is disabled out of reset and must therefore be enabled by
software prior to use. The counter value can be read at any time.
The STM has four 32-bit compare channels. Each channel can generate a unique interrupt on an exact
match event with the free running counter.
The STM is often used to analyze code execution times. By starting the STM and reading the timer before
and after a task or function, you can make an accurate measurement of the time taken in clock cycles to
perform the task.
The STM can be configured to stop (freeze) or continue to run in debug mode and is available for use in
all operating mode where the system clock is present (not STANDBY or certain STOP mode
configurations)
There are no external pins associated with the STM.
27.2.2
Overview of the eMIOS
Each eMIOS offers a combination of PWM, Output Capture, and Input Compare functions. There are
different types of channel implemented and not every channel supports every eMIOS function. The
channel functionality also differs between each eMIOS module. See
Section 27.4, Enhanced Modular IO
, for more details.
Each channel has its own independent 16-bit counter. To allow synchronization between channels, there
are a number of shared counter busses that can be used as a common timing reference. These counter buses
can be used in combination with the individual channel counters to provide advanced features such as
centre aligned PWM with dead time insertion.
Once configured, the eMIOS needs very little CPU intervention. Interrupts, eDMA requests, and CTU
trigger requests can be raised based on eMIOS flag and timeout events.
The eMIOS is clocked from the system clock via peripheral clock group 3 (with a maximum permitted
clock frequency of 64 MHz). The eMIOS can be used in all modes where the system clock is available
(which excludes STANDBY mode and STOP mode when the system clock is turned off). The eMIOS has
an option to allow the eMIOS counters to freeze or to continue running in debug mode.
The CTU allows an eMIOS event to trigger a single ADC conversion via the CTU without any CPU
intervention. Without the CTU, the eMIOS would have to trigger an interrupt request. The respective ISR
would then perform a software triggered ADC conversion. This not only uses CPU resource, but also
increases the latency between the eMIOS event and the ADC trigger.
The eMIOS Output Pulse Width Modulation with Trigger mode (see
Section 27.4.4.1.1.12, Output Pulse
Width Modulation with Trigger (OPWMT) mode
) allows a customizable trigger point to be defined at any
point in the waveform period. This is extremely useful for LED lighting applications where the trigger can
be set to a point where the PWM output is high but after the initial inrush current to the LED has occurred.
The PWM trigger can then cause the CTU to perform a single ADC conversion, which in turn measures
the operating conditions of the LED to ensure it is working within specification. A watchdog feature on
Summary of Contents for MPC5605BK
Page 2: ...This page is intentionally left blank...
Page 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Page 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Page 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Page 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Page 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Page 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Page 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...