03.08.2013 Views

MC9S12VR-Family - Data Sheet - Freescale Semiconductor

MC9S12VR-Family - Data Sheet - Freescale Semiconductor

MC9S12VR-Family - Data Sheet - 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>MC9S12VR</strong> <strong>Family</strong> Reference Manual, Rev. 2.8<br />

Timer Module (TIM16B8CV3)<br />

When the TFFCA bit in the TSCR register is set, any access to the PACNT register will clear all the flags<br />

in the PAFLG register. Timer module or Pulse Accumulator must stay enabled (TEN=1 or PAEN=1) while<br />

clearing these bits.<br />

12.3.2.17 Pulse Accumulators Count Registers (PACNT)<br />

1 This register is available only when channel 7 exists and is reserved if that channel does not exist. Writes to a reserved register<br />

have no functional effect. Reads from a reserved register return zeroes.<br />

Read: Anytime<br />

Write: Anytime<br />

Table 12-21. PAFLG Field Descriptions<br />

Field Description<br />

1<br />

PAOVF<br />

0<br />

PAIF<br />

Module Base + 0x0022<br />

Pulse Accumulator Overflow Flag — Set when the 16-bit pulse accumulator overflows from 0xFFFF to 0x0000.<br />

Clearing this bit requires writing a one to this bit in the PAFLG register while TEN bit of TSCR1 or PAEN bit of<br />

PACTL register is set to one.<br />

Pulse Accumulator Input edge Flag — Set when the selected edge is detected at the IOC7 input pin.In event<br />

mode the event edge triggers PAIF and in gated time accumulation mode the trailing edge of the gate signal at<br />

the IOC7 input pin triggers PAIF.<br />

Clearing this bit requires writing a one to this bit in the PAFLG register while TEN bit of TSCR1 or PAEN bit of<br />

PACTL register is set to one. Any access to the PACNT register will clear all the flags in this register when TFFCA<br />

bit in register TSCR(0x0006) is set.<br />

15 14 13 12 11 10 9 0<br />

R PACNT15 PACNT14 PACNT13 PACNT12 PACNT11 PACNT10 PACNT9 PACNT8<br />

W<br />

Reset 0 0 0 0 0 0 0 0<br />

Module Base + 0x0023<br />

R<br />

W<br />

Figure 12-26. Pulse Accumulator Count Register High (PACNTH)<br />

7 6 5 4 3 2 1 0<br />

PACNT7 PACNT6 PACNT5 PACNT4 PACNT3 PACNT2 PACNT1 PACNT0<br />

Reset 0 0 0 0 0 0 0 0<br />

Figure 12-27. Pulse Accumulator Count Register Low (PACNTL)<br />

These registers contain the number of active input edges on its input pin since the last reset.<br />

When PACNT overflows from 0xFFFF to 0x0000, the Interrupt flag PAOVF in PAFLG (0x0021) is set.<br />

Full count register access should take place in one clock cycle. A separate read/write for high byte and low<br />

byte will give a different result than accessing them as a word.<br />

<strong>Freescale</strong> <strong>Semiconductor</strong> 389

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

Saved successfully!

Ooh no, something went wrong!