GD32A50x User Manual
594
22.4.
Register definition
CMP base address
:
0x4001 7C00
22.4.1.
CMP Control/status register (CMP_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
OT
Reserved
SEN
BEN
Reserved
BLK[2:0]
HST[1:0]
rwo
r
rw
rw
rw
rw
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PL
OSEL[3:0]
PSEL[2:0]
MISEL[2:0]
MESEL[2:0]
PM[1:0]
Reserved
EN
rw
rw
rw
rw
rw
rw
rw
Bits
Fields
Descriptions
31
LK
CMP lock
This bit allows to have all control bits of CMP as read-only. This bit is write-once. It
can only be cleared by a system reset once It is set by software.
0: CMP_CS bits are read-write
1: CMP_CS bits are read-only
30
OT
CMP output
This is a copy of CMP 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: disable bandgap scaler disable
1: enable bandgap scaler enable
22
BEN
Scaler bridge enable bit
0: disable scaler resistor bridge disable in case that BEN bit of CMP_CS is also
reset
1: enable scaler resistor bridge
21
Reserved
Must be kept at reset value.
20:18
BLK[2:0]
CMP output blanking source
This bit is used to select which timer output controls the comparator output blanking.