![Geehy SEMICONDUCTOR APM32F030x4x6x8xC Скачать руководство пользователя страница 91](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f030x4x6x8xc/apm32f030x4x6x8xc_user-manual_573629091.webp)
www.geehy.com Page 90
Port bit output data register (GPIOx_ODATA) (x=A..D, F)
Offset address: 0x14
Reset value: 0x0000 0000
Field
Name
R/W
Description
15:0
ODATAy R/W
PortxPin y Output Data (y=0…15)
Read and write operation can be performed by software
For atomic bit setting/setting, the ODATAy bit can be set separately by writing
to
GPIOx_BSC or GPIOx_BR
register
31:16
Reserved
Port set/reset register (GPIOx_BSC) (x=A…D, F)
Offset address: 0x18
Reset value: 0x0000 0000
Field Name R/W
Description
15:0
BSy
W
PortxPin y Set bit (y=0…15)
These bits can only perform write operation, and the value of 0x0000 is returned
when reading these bits.
These bits are used to affect the corresponding ODATAy bits
0: No effect
1: Set the corresponding ODATAy bit
31:16
BCy
W
PortxPin y Reset Bit (y=0…15)
These bits can only perform write operation, and the value of 0x0000 is returned
when reading these bits.
These bits are used to affect the corresponding ODATAy bits
0: No effect
1: Corresponding ODATAy bit is cleared
If BSy bit and BCy bit are set at the same time, BSy has the priority
Port lock register (GPIOx_LOCK) (x=A…B)
This register protects the configuration of GPIO from being modified by mistake
during the running of the program. If the GPIO configuration is modified again, it
can be modified only after the system is reset. When configuring GPIO locking
function, it is necessary to execute the specified sequence to the register to start
the GPIO locking function.
Offset address: 0x1C
Reset value: 0x0000 0000
Field
Name
R/W
Description
15:0
LOCKy
R/W
PortxLock bit y Configure) (y=0…15)
0: The configuration of Port x Pin y is not locked
1: The configuration of Port x Pin y is locked
These bits can be read and written, but can only be written when
LOCKKEY=0.
16
LOCKKEY
R/W
LOCK key
This bit determines whether the port configuration lock key bit is activated
0: Not activated
1: Activated; GPIOx_LOCK register is locked until the next MUC reset is
generated.
Lock key write sequence:
Write LOCK[16]=1+LOCK[15:0]
Write LOCK[16]=0+LOCK[15:0]
Write LOCK[16]=1+LOCK[15:0]
Read LOCK
Read LOCK[16]=1 (this read operation can be selected to confirm
whether to activate the lock key)
Note: