32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
Port C Lock Register – PCLOCKR
This register specifies the GPIO Port C lock configuration.
Offset:
0x018
Reset value: 0x0000_0000
31
Type/Reset
RW
0 RW
23
Type/Reset
RW
0 RW
15
Type/Reset
7
Type/Reset
RW
0 RW
Bits
Field
[31:16]
PCLKEY
[7:0]
PCLOCKn
Rev. 1.00
30
29
28
0 RW
0 RW
22
21
20
0 RW
0 RW
14
13
12
6
5
4
0 RW
0 RW
Descriptions
GPIO Port C lock Key
0x5FA0: Port C Lock function is enabled
Others: Port C Lock function is disabled
To lock the Port C function, a value of 0x5FA0 should be written into the PCLKEY
field in this register. To execute a successful write operation on this lock register, the
value written into the PCLKEY field must be 0x5FA0. If the value written into this
field is not equal to 0x5FA0, any write operations on the PCLOCKR register will be
aborted. The result of a read operation on the PCLKEY field returns the GPIO Port
C Lock Status which indicates whether the GPIO Port C is locked or not. If the read
value of the PCLKEY field is 0, this indicates that the GPIO Port C Lock function is
disabled. Otherwise, it indicates that the GPIO Port C Lock function is enabled as
the read value is equal to 1.
GPIO Port C pin n Lock Control Bits (n = 0 ~ 7)
0: Port C pin n is not locked
1: Port C pin n is locked
The PCLOCKn bits are used to lock the configurations of corresponding GPIO Pins
when the correct Lock Key is applied to the PCLKEY field. The locked configurations
including PCDIRn, PCINENn, PCPUn, PCPDn, PCODn and PCDVn setting in the
related GPIO registers. Additionally, the GPCCFGHR or GPCCFGLR register which
is used to configure the alternative function of the associated GPIO pin will also be
locked. Note that the PCLOCKR register can only be written once which means that
PCLKEY and PCLOCKn (lock control bit) should be written together and can not be
changed until a system reset or GPIO Port C reset occurs.
135 of 486
27
26
PCLKEY
0 RW
0 RW
0 RW
19
18
PCLKEY
0 RW
0 RW
0 RW
11
10
Reserved
3
2
PCLOCK
0 RW
0 RW
0 RW
25
24
0 RW
0
17
16
0 RW
0
9
8
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