Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
402
/
631
INMSEL
COMP1
COMP2
000
Float
Float
001
DAC1/PA4
PA2
010
PA0
PA5
011
PA5
PA6
100
PB5
PB3
101
PD4
PD6
110
VREF_VC1
DAC1/PA4
111
VREF_VC2
VREF_VC2
Note: DAC1/PA4, indicating that the output pin of DAC1 is PA4
Comparator output TRIG signal has the following interconnection.
TRIG
COMP1
COMP2
0000
NC
NC
0001
TIM1_BKIN
TIM1_BKIN
0010
TIM1_OCrefclear
TIM1_OCrefclear
0011
TIM1_IC1
TIM1_IC1
0100
TIM2_IC1
TIM2_OCrefclear
0101
TIM2_OCrefclear
TIM3_OCrefclear
0110
TIM3_IC1
TIM4_IC1
0111
TIM3_OCrefclear
TIM4_OCrefclear
1000
TIM4_OCrefclear
TIM5_IC1
1001
TIM5_IC1
TIM8_IC1
1010
TIM8_IC1
TIM8_OCrefclear
1011
TIM8_OCrefclear
TIM9_IC1
1100
TIM9_OCrefclear
TIM9_OCrefclear
1101
TIM8_BKIN
TIM8_BKIN
1110
TITIM8_BKIN
TIM TIM8_BKIN
1111
LPTIM_ETR
LPTIM_ETR
Interrupt
COMP supports interrupt response, and COMP1, and COMP2 each occupy one interrupt entry. There are two cases
of interrupt generation as follows.
The polarity of COMPx_CTRL.POL is not reversed, and the interrupt is enabled. When INPSEL > INMSEL,
the comparator interrupt will be generated when COMPx_CTRL.OUT is set to 1 by hardware.
The polarity of COMPx_CTRL.POL is reversed, and the interrupt is enabled. When INPSEL < INMSEL, the
comparator interrupt is generated when COMPx_CTRL.OUT is set to 1 by hardware.