
GD32L23x User Manual
611
26.4.
CMP registers
CMP base address: 0x4001 7C00
26.4.1.
Comparator 0 Control / Status register (CMP0_CS)
Address offset: 0x00
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
MSEL[2:0]
PM[1:0]
Reserved
EN
rw
rw
rw
rw
rw
Bits
Fields
Descriptions
31
LK
CMP0 lock bit
This bit could set all control bits of CMP0 as read-only. It can only be cleared by a
system reset once It is set by software.
0: CMP0_CS[31:0] bits are read-write
1: CMP0_CS[31:0] bits are read-only
30
OUT
CMP0 output state bit
This is a copy of CMP0 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 0.
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_CS1 is also
reset
1: enable scaler resistor bridge
21
Reserved
Must be kept at reset value
20:18
BLK[2:0]
CMP0 blanking source selection bits which select proper timer output controls the
comparator 0 output blanking.