
GD32L23x User Manual
613
26.4.2.
Comparator 1 Control / Status register (CMP1_CS)
Address offset: 0x04
Reset value: 0x0000 0000
This register has to be accessed by word (32-bit)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
LK
OUT
Reserved
SEN
BEN
Reserved
BLK[2:0]
HST1:0]
rs
r
rw
rw
rw
rw
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PL
OSEL[1:0]
Reserved
PSEL[2:0]
Reserved
MSEL[2:0]
PM[1:0]
WEN
EN
rw
rw
rw
rw
rw
rw
rw
Bits
Fields
Descriptions
31
LK
CMP1 lock bit
This bit could set all control bits of CMP1 as read-only. It can only be cleared by a
system reset once It is set by software.
0: CMP1_CS[31:0] bits are read-write
1: CMP1_CS[31:0] bits are read-only
30
OUT
CMP1 output state bit
This is a copy of CMP1 output state,
which is read only.
0: Non-inverting input below inverting input and the output is low
1: Non-inverting input above inverting input and the output is high
29:24
Reserved
Must be kept at reset value
23
SEN
Voltage scaler enable bit
This bit is set and cleared by software. This bit enable the outputs of the VREFINT
divider, which is treated as the minus input of the Comparator 1.
0: disable bandgap scaler
1: enable bandgap scaler
22
BEN
Scaler bridge enable bit
0: disable scaler resistor bridge disable in case that BEN bit of CMP_CS0 is also
reset
1: enable scaler resistor bridge
21
Reserved
Must be kept at reset value
20:18
BLK[2:0]
CMP1 blanking source selection bits which select proper timer output controls the
comparator1 output blanking.
000: No blanking
001: TIMER1 OC1 selected as blanking source
010: TIMER2 OC1 selected as blanking source
100: TIMER8 OC1 selected as blanking source