Auto Page CPX-3600 Specifikace Strana 91

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 243
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 90
ST72321xx-Auto PWM auto-reload timer (ART)
Doc ID 13829 Rev 1 91/243
Figure 39. External event detector example (3 counts)
12.2.8 Input capture function
This mode allows the measurement of external signal pulse widths through ARTICRx
registers.
Each input capture can generate an interrupt independently on a selected input signal
transition. This event is flagged by a set of the corresponding CFx bits of the Input Capture
Control/Status register (ARTICCSR).
These input capture interrupts are enabled through the CIEx bits of the ARTICCSR register.
The active transition (falling or rising edge) is software programmable through the CSx bits
of the ARTICCSR register.
The read only input capture registers (ARTICRx) are used to latch the auto-reload counter
value when a transition is detected on the ARTICx pin (CFx bit set in ARTICCSR register).
After fetching the interrupt vector, the CFx flags can be read to identify the interrupt source.
Note: After a capture detection, data transfer in the ARTICRx register is inhibited until it is read
(clearing the CFx bit).
The timer interrupt remains pending while the CFx flag is set when the interrupt is enabled
(CIEx bit set). This means that the ARTICRx register has to be read at each capture event to
clear the CFx flag.
The timing resolution is given by auto-reload counter cycle time (1/f
COUNTER
).
Note: During Halt mode, if both the input capture and the external clock are enabled, the ARTICRx
register value is not guaranteed if the input capture pin and the external clock change
simultaneously.
COUNTER
t
FDh FEh FFh FDh
OVF
ARTCSR READ
INTERRUPT
ARTARR = FDh
f
EXT
=f
COUNTER
FEh FFh FDh
IF OIE = 1
INTERRUPT
IF OIE = 1
ARTCSR READ
Zobrazit stránku 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 242 243

Komentáře k této Příručce

Žádné komentáře