AT32WB415
Series Reference Manual
2022.04.13
Page 365
Ver 2.00
21
Comparator (COMP)
21.1 COMP introduction
AT32WB415 has two embedded ultra-low-power comparators, COMP1 and COMP2. They can be used
for various purposes, such as, external analog signal monitor/control and wakeup from low-power mode,
and working with other timers for pulse width measurement and PWM signal control.
Figure 21-1 Block Diagram of Comparator 1 and Comparator 2
PA0
PA1
PA5
Reserv ed
PA0
PA5
PA4
V RE FI NT44
V RE FI NT34
V RE FI NT24
V RE FI NT14
CMP1IS
1=Clos e
0=Open
IN
8 TO 1
MUX
4 TO 1
MUX
IN
CMP1_INV
CMP1_NI NV
11 1
11 0
10 1
10 0
01 1
01 0
00 1
00 0
10
01
00
+
-
CMP1
CMP 1E N
CMP 1S SE L
CMP 1HYS T_LV1
CMP 1HYS T_LV0
CMP1_OUT_LV
P A0/P A6/P A11
COMP 1 int errupt request
(to EX I NT )
COMP 1_OUT
TM R1_B RK 1
TM R1_CH_CLR
TM R1_CH1
TM R3_CH1
TM R3_CH_CLR
Analog
Digital
Pol arity
sel ection
CMP 1INV SE L
CMP 1NINV SE L
TM R2_CH4
TM R2_CH_CLR
Reserv ed
PA2
PA3
PA7
Reserv ed
PA2
PA5
PA4
V RE FI NT44
V RE FI NT34
V RE FI NT24
V RE FI NT14
IN
8 TO 1
MUX
4 TO 1
MUX
IN
CMP 2_INV
CMP 2_NINV
11 1
11 0
10 1
10 0
01 1
01 0
00 1
00 0
10
01
00
+
-
CMP2
CMP 2E N
CMP 2S SE L
CMP 2HYS T_LV1
CMP 2HYS T_LV0
CMP2_OUT_LV
P A2/P A7/P A12
CMP 2 int errupt request
(to EX I NT )
CMP2_OUT
TM R1_B RK 1
TM R1_CH_CLR
TM R1_CH1
TM R3_CH1
TM R3_CH_CLR
Pol arity
sel ection
CMP 2INV SE L
CMP 2NINV SE L
TM R2_CH4
TM R2_CH_CLR
Reserv ed
DCMPEN
21.2 Main features
Programmable hysteresis level
Programmable output polarity
Programmable output speed
Selectable positive/negative input sources
―
I/O pins
―
Internal reference voltage and three divider values (1/4, 1/2, 3/4)
Output redirectioning
―
General-purpose I/O
―
Timter break input TMRx_BRK
―
Timer input capture TMR_CH
―
Timer output compare reference value clear TMR_CH_CLR
COMP 1 and COMP2 are combined as a window comparator
Wakeup device from low-power mode through EXINT controller