28.10.2014 Views

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Timer Modules (TIM1 and TIM2)<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, Inc.<br />

Pin conditions such as rising or falling edges can trigger an input capture<br />

only on a pin configured as an input.<br />

An input capture on channel x sets the CxF flag. The CxI bit enables the<br />

CxF flag to generate interrupt requests.<br />

15.8.3 Output Compare<br />

nc...<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, I<br />

Setting an I/O select bit, IOSx, configures channel x as an output<br />

compare channel. The output compare function can generate a periodic<br />

pulse with a programmable polarity, duration, and frequency. When the<br />

timer counter reaches the value in the channel registers of an output<br />

compare channel, the timer can set, clear, or toggle the channel pin. An<br />

output compare on channel x sets the CxF flag. The CxI bit enables the<br />

CxF flag to generate interrupt requests.<br />

The output mode and level bits, OMx and OLx, select, set, clear, or<br />

toggle on output compare. Clearing both OMx and OLx disconnects the<br />

pin from the output logic.<br />

Setting a force output compare bit, FOCx, causes an output compare on<br />

channel x. A forced output compare does not set the channel flag.<br />

A successful output compare on channel 3 overrides output compares<br />

on all other output compare channels. A channel 3 output compare can<br />

cause bits in the output compare 3 data register to transfer to the timer<br />

port data register, depending on the output compare 3 mask register.<br />

The output compare 3 mask register masks the bits in the output<br />

compare 3 data register. The timer counter reset enable bit, TCRE,<br />

enables channel 3 output compares to reset the timer counter. A channel<br />

3 output compare can reset the timer counter even if the OC3/PAI pin is<br />

being used as the pulse accumulator input.<br />

An output compare overrides the data direction bit of the output compare<br />

pin but does not change the state of the data direction bit.<br />

Writing to the timer port bit of an output compare pin does not affect the<br />

pin state. The value written is stored in an internal latch. When the pin<br />

becomes available for general-purpose output, the last value written to<br />

the bit appears at the pin.<br />

Technical Data <strong>MMC2107</strong> – Rev. 2.0<br />

322 Timer Modules (TIM1 and TIM2) MOTOROLA<br />

For More Information On This Product,<br />

Go to: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!