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.

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

Timer Modules (TIM1 and TIM2)<br />

Functional Description<br />

15.8.4 Pulse Accumulator<br />

The pulse accumulator (PA) is a 16-bit counter that can operate in two<br />

modes:<br />

1. Event counter mode — Counts edges of selected polarity on the<br />

pulse accumulator input pin, PAI<br />

2. Gated time accumulation mode — Counts pulses from a<br />

divide-by-64 clock<br />

nc...<br />

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

15.8.4.1 Event Counter Mode<br />

NOTE:<br />

The PA mode bit, PAMOD, selects the mode of operation.<br />

The minimum pulse width for the PAI input is greater than two module<br />

clocks.<br />

Clearing the PAMOD bit configures the PA for event counter operation.<br />

An active edge on the PAI pin increments the PA. The PA edge bit,<br />

PEDGE, selects falling edges or rising edges to increment the PA.<br />

An active edge on the PAI pin sets the PA input flag, PAIF. The PA input<br />

interrupt enable bit, PAI, enables the PAIF flag to generate interrupt<br />

requests.<br />

The PAI input and timer channel 3 use the same pin. To use the PAI<br />

input, disconnect it from the output logic by clearing the channel 3 output<br />

mode and output level bits, OM3 and OL3. Also clear the channel 3<br />

output compare 3 mask bit, OC3M3.<br />

The PA counter registers, TIMPACNTH/L, reflect the number of active<br />

input edges on the PAI pin since the last reset.<br />

The PA overflow flag, PAOVF, is set when the PA rolls over from $FFFF<br />

to $0000. The PA overflow interrupt enable bit, PAOVI, enables the<br />

PAOVF flag to generate interrupt requests.<br />

NOTE:<br />

The PA can operate in event counter mode even when the timer enable<br />

bit, TIMEN, is clear.<br />

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

Technical Data<br />

MOTOROLA Timer Modules (TIM1 and TIM2) 323<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!