Техническая Спецификация для Freescale Semiconductor Tower System Eval Kit for MC9S12GN32 TWR-S12GN32-KIT TWR-S12GN32-KIT

Модели
TWR-S12GN32-KIT
Скачать
Страница из 1292
Timer Module (TIM16B8CV3)
MC9S12G Family Reference Manual,
Rev.1.23
770
Freescale Semiconductor
23.3.2.17 Pulse Accumulators Count Registers (PACNT)
1
.
Read: Anytime
Write: Anytime
These registers contain the number of active input edges on its input pin since the last reset.
When PACNT overflows from 0xFFFF to 0x0000, the Interrupt flag PAOVF in PAFLG (0x0021) is set.
Full count register access should take place in one clock cycle. A separate read/write for high byte and low
byte will give a different result than accessing them as a word.
NOTE
Readingthepulseaccumulatorcounterregistersimmediatelyafteranactiveedgeonthe
pulseaccumulatorinputpinmaymissthelastcountbecausetheinputhastobesynchronized
with the bus clock first.
Table 23-21. PAFLG Field Descriptions
Field
Description
1
PAOVF
Pulse Accumulator Overflow Flag — Set when the 16-bit pulse accumulator overflows from 0xFFFF to 0x0000.
Clearing this bit requires writing a one to this bit in the PAFLG register while TEN bit of TSCR1 or PAEN bit of
PACTL register is set to one.
0
PAIF
Pulse Accumulator Input edge Flag — Set when the selected edge is detected at the IOC7 input pin.In event
mode the event edge triggers PAIF and in gated time accumulation mode the trailing edge of the gate signal at
the IOC7 input pin triggers PAIF.
Clearing this bit requires writing a one to this bit in the PAFLG register while TEN bit of TSCR1 or PAEN bit of
PACTL register is set to one. Any access to the PACNT register will clear all the flags in this register when TFFCA
bit in register TSCR(0x0006) is set.
Module Base + 0x0022
15
14
13
12
11
10
9
0
R
PACNT15
PACNT14
PACNT13
PACNT12
PACNT11
PACNT10
PACNT9
PACNT8
W
Reset
0
0
0
0
0
0
0
0
Figure 23-26. Pulse Accumulator Count Register High (PACNTH)
Module Base + 0x0023
7
6
5
4
3
2
1
0
R
PACNT7
PACNT6
PACNT5
PACNT4
PACNT3
PACNT2
PACNT1
PACNT0
W
Reset
0
0
0
0
0
0
0
0
Figure 23-27. Pulse Accumulator Count Register Low (PACNTL)