SN32F280 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 104
Version 1.1
8.4 CMP REGISTERS
Base Address: 0x4002 8000 (CMP)
8.4.1 CMP Control register (CMP_CTRL)
Address Offset: 0x00
Bit
Name
Description
Attribute
Reset
31:29
Reserved
R
0
28
CM1G
CMP1 interrupt trigger direction control bit.
0: Falling edge trigger (CMP1 output status is from high to low as V
+
< V-)
1: Rising edge trigger (CMP1 output status is from low to high as V+ > V-)
R/W
0
27:26
CM1OEN[1:0]
CMP1 output pin control bit.
00: Disable (CM1O is GPIO mode)
01: P2.2 is CM1O and isolate GPIO function.
10: P2.7 is CM1O and isolate GPIO function.
11: P3.4 is CM1O and isolate GPIO function.
R/W
0
25:21
CM1RS[4:0]
CMP1 internal reference voltage (V
IREF1
) selection bits.
0000: V
IREF1
= V
IREF
00001~11111: V
IREF1
= V
IREF
* CM1RS[4:0] / 32
R/W
00000b
20:19
CM1NS[1:0]
CMP1 negative input pin selection bit
00: CM1N0 is comparator negative input pin, and isolate GPIO function
01: CM1N1 is comparator negative input pin, and isolate GPIO function
10: CM1N2 is comparator negative input pin, and isolate GPIO function
11: V
IREF1
. CM1N0/CM1N1/CM1N2 pins are GPIO mode.
R/W
00b
18:17
CM1PS[1:0]
CMP1 positive input pin selection bit
00: Reserved. CM1P0/CM1P1/CM1P2 pins are GPIO mode.
01: CM1P0 is comparator positive input pin, and isolate GPIO function
10: CM1P1 is comparator positive input pin, and isolate GPIO function
11: CM1P2 is comparator positive input pin, and isolate GPIO function
R/W
01b
16
CM1EN
CMP1 enable bit.
0: Disable (CM1P0/1/2, CM1N0/1/2, CM1O are GPIO mode)
1: Enable
R/W
0
15:13
Reserved
R
0
12
CM0G
CMP0 interrupt trigger direction control bit.
0: Falling edge trigger (CMP0 output status is from high to low as V+ < V-)
1: Rising edge trigger (CMP0 output status is from low to high as V+ > V-)
R/W
0
11:10
CM0OEN[1:0]
CMP0 output pin control bits
00: Disable (CM0O is GPIO mode)
01: P2.0 is CM0O and isolate GPIO function.
10: P2.6 is CM0O and isolate GPIO function.
11: P3.3 is CM0O and isolate GPIO function.
R/W
0
9:5
CM0RS[4:0]
CMP0 internal reference voltage (V
IREF0
) selection bits.
00000: V
IREF0
= V
IREF
00001~11111: V
IREF0
= V
IREF
* CM0RS[4:0] / 32
R/W
00000b
4:3
CM0NS[1:0]
CMP0 negative input selection bits
00: CM0N0 is comparator negative input pin, and isolate GPIO function
01: CM0N1 is comparator negative input pin, and isolate GPIO function
10: CM0N2 is comparator negative input pin, and isolate GPIO function
11: V
IREF0
. CM0N0/CM0N1/CM0N2 pins are GPIO mode.
R/W
00b
2:1
CM0PS[1:0]
CMP0 positive input selection bits
00: ReservedCM0P0/CM0P1/CM0P2 pins are GPIO mode.
01: CM0P0 is comparator positive input pin, and isolate GPIO function
10: CM0P1 is comparator positive input pin, and isolate GPIO function
11: CM0P2 is comparator positive input pin, and isolate GPIO function
R/W
01b
0
CM0EN
CMP0 enable bit.
0: Disable (CM0P0/1/2, CM0N0/1/2, CM0O are GPIO mode)
1: Enable
R/W
0