AT32F425
Series Reference Manual
2022.03.30
Page 224
Ver 2.01
Figure 14-50
Input/output channel 1 main circuit
APB bus
MCU peripheral interface
Channel preload register
Channel shadow register
C1DT
Input
mode
IC1PS
C1EN
C1SWTR
TMR1_SWEVT
Capture
Counter
C1OBEN
C1OBEN
OVF
From time base unit
TMR1_CM1
Comparator
Input
mode
read_in_progress
capture_transfer
write_in_progress
capture_transfer
Output compare
mode
Capture/compare
seletion
C1DT
CVAL=C1DT
CVAL>CIDT
Capture/compare
seletion
Figure 14-51
Channel 1 input stage
C1IRAW
STCI
C1IFP1
C1IN
C1IPS
C1IF_rising
C1IF_falling
f
DTS
Filter
Downcounter
Edge
detector
Polarity
selection
Capture/
compare
select
C2IFP1
divider
Input mode
In input mode, the TMR15_CxDT registers latch the current counter values after the selected triggle
signal is detected, and the capture compare interrupt flag bit (CxIF) is set. An interrupt/DMA request will
be generated if the CxIEN bit and CxDEN bit are enabled. If the selected trigger signal is detected when
the CxIF is set, the CxOF is set.
To capture the rising edge of C1IN input, following the configuration procedure mentioned below:
Set C1C=01 in the TMR15_CxDT register to select the C1IN as channel 1 input
Set the filter bandwidth of C1IN signal (CxDF[3: 0])
Set the active edge on the C1IN channel by writing C1P=0 (rising edge) in the TMR15_CCTRL
register
Program the capture frequency of C1IN signal (C1DIV[1: 0])
Enable channel 1 input capture (C1EN=1)
If needed, enable the relevant interrupt or DMA request by setting the C1IEN bit in the
TMRx_IDEN register or the C1DEN bit in the TMRx_IDEN register
14.4.3.4 TMR output function
The TMR output consists of a comparator and an output controller. It is used to program the period, duty
cycle and polarity of the output signal. The advanced-control timer output function varies from one
channel to one channel.
Figure 14-52
Channel 1 output stage
Output
mode
controller
CxORAW
Output
enable
circuit
C1OUT
CVAL>C1DT
CVAL = C1DT
To the master
mode controller
CVAL
CxDT
Compare
Polarity
selection
Dead time
generate
Output
Compare
Mode
C1COUT