32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
Port B Lock Register – PBLOCKR
This register specifies the GPIO Port B lock configuration.
Offset:
0x018
Reset value: 0x0000_0000
31
Type/Reset
RW
0 RW
23
Type/Reset
RW
0 RW
15
Type/Reset
RW
0 RW
7
Type/Reset
RW
0 RW
Bits
Field
[31:16]
PBLKEY
[15:0]
PBLOCKn
Rev. 1.00
30
29
28
0 RW
0 RW
22
21
20
0 RW
0 RW
14
13
12
0 RW
0 RW
6
5
4
0 RW
0 RW
Descriptions
GPIO Port Block Key
0x5FA0: Port Block function is enabled
Others: Port B Lock function is disabled
To lock the Port B function, a value of 0x5FA0 should be written into the PBLKEY
field in this register. To execute a successful write operation on this lock register,
the value written into the PBLKEY field must be 0x5FA0. If the value written into this
field is not equal to 0x5FA0, any write operations on the PBLOCKR register will be
aborted. The result of a read operation on the PBLKEY field returns the GPIO Port
B Lock Status which indicates whether the GPIO Port B is locked or not. If the read
value of the PBLKEY field is 0, this indicates that the GPIO Port B Lock function is
disabled. Otherwise, it indicates that the GPIO Port B Lock function is enabled as
the read value is equal to 1.
GPIO Port B pin n Lock Control Bits (n = 0 ~ 15)
0: Port B pin n is not locked
1: Port B pin n is locked
The PBLOCKn bits are used to lock the configurations of corresponding GPIO Pins
when the correct Lock Key is applied to the PBLKEY field. The locked configurations
including PBDIRn, PBINENn, PBPUn, PBPDn, PBODn and PBDVn setting in the
related GPIO registers. Additionally, the GPBCFGHR or GPBCFGLR register which
is used to configure the alternative function of the associated GPIO pin will also be
locked. Note that the PBLOCKR register can only be written once which means that
PBLKEY and PBLOCKn (lock control bit) should be written together and can not be
changed until a system reset or GPIO Port B reset occurs.
125 of 486
27
26
PBLKEY
0 RW
0 RW
0 RW
19
18
PBLKEY
0 RW
0 RW
0 RW
11
10
PBLOCK
0 RW
0 RW
0 RW
3
2
PBLOCK
0 RW
0 RW
0 RW
25
24
0 RW
0
17
16
0 RW
0
9
8
0 RW
0
1
0
0 RW
0
July 31, 2018
Need help?
Do you have a question about the HT32F50231 and is the answer not in the manual?
Questions and answers