Expand menu
Hello, Sign in
My Account
0
Cart
Home
Products
Sensors
Semiconductors
Passive Components
Connectors
Power
Electromechanical
Optoelectronics
Circuit Protection
Integrated Circuits - ICs
Main Products
Manufacturers
Blog
Services
About OMO
About Us
Contact Us
Check Stock
STMPE321QTR
P1-P3
P4-P6
P7-P9
P10-P12
P13-P15
P16-P18
P19-P21
P22-P24
P25-P27
P28-P30
P31-P33
P34-P36
P37-P39
P40-P40
GPIO controller
STMPE321
22/40
Doc ID 15791 Rev
3
7 GPIO
contr
oller
A total of 3
GPIOs are availab
le in the STMPE3
21. The G
PIO controller
contains th
e
registers th
at allow the
host system to configure e
ach of the pins into e
ither a GPIO or T
ouch
input. Unused GPI
Os should be configured as outpu
ts to minimize po
wer con
sumption.
A group of regist
ers is used to contro
l the e
xact function of
each of the 3 GPIOs.
The
registers and t
heir respectiv
e add
resses are listed in
T
able 8.
All GPIO registers are na
med GPxx, where:
Xxx represents the functional g
roup
F
or LSB registers:
F
or MSB registers:
T
ab
le 8.
GPIO contr
oller regi
sters summary map
Address
Register name
Description
A
uto-increment
0x10
GPIO_MR_LSB
GPIO monitor pin
state
register
Ye s
0x11
GPIO_MR_MSB
0x12
GPIO_SET_LSB
GPIO set pin state
register
Ye s
0x13
GPIO_SET_MSB
0x14
GPIO_DIR_LSB
GPIO set pin direction
register
Ye s
0x15
GPIO_DIR_MSB
0x16
GPIO_FUNCT_LSB
GPIO function register
Y
es
0x17
GPIO_FUNCT_MSB
76543
2
1
0
RESER
VED
IO-2
IO-1
IO-0
76543
2
1
0
RESER
VED
STMPE321
GPIO contr
oller
Doc ID 15791 Rev
3
23/40
The function of ea
ch bit is sho
wn in
Ta
b
l
e
9
:
T
abl
e 9.
GPIO control bits function
Register name
Function
GPIO monitor pin state
Reading th
is bit yields th
e current
state of the bit. Writing has no
eff
ect.
GPIO set pin state
Writing '1
' to this bit causes the corresponding GPIO to go to '1' state
Writing '0
' to this bit causes the corresponding GPIO to go to '0' state
GPIO set pin direction
'0' sets the corresponding GPIO to input state, and '1' sets it to outp
ut
state. All bits are '0' on reset.
GPIO function
'1' sets the corresponding GPIO to func
tion as GPIO
, and '0' s
ets it to
touchke
y mode.
Capacitive touch module registers
STMPE321
24/40
Doc ID 15791 Rev
3
8
Capacitive touch module register
s
T
O
UCH_FIFO
T
ouch FIFO
Address:
0x19, 0x18
Ty
p
e
:
R
Reset:
0x00
Description:
T
OUCH_FIFO is th
e access p
or
t for the inter
nal 4-
le
vel FIFO used for b
uff
erin
g the
touch e
vents
. While it is possib
le to access each
byte in the data str
ucture dir
ectly
, it is
recommended t
hat the FIFO is ac
ce
ssed only via the 0x18 address
.
The FIFO must be accessed in multiples of 2 bytes (LSB, MSB). F
or the STMPE321,
MSB is reser
v
ed and LSB contains a snapshot
of the recent touch e
v
ent.
Where Tn is touch status of touch sen
sing channel n.
T
ab
le 10.
T
OUCH_FIFO summary table
Address
Function
0x18
FIFO-0,
LSB
0x19
FIFO-0, M
SB
0x1A
FIFO-1,
LSB
0x1B
FIFO-1, M
SB
0x1C
FIFO-2,
LSB
0x1D
FIFO-2, M
SB
0x1E
FIFO-3,
LSB
0x1F
FIFO-3, M
SB
76543
2
1
0
T7
T6
T
5
T4
T3
T2
T1
T0
P1-P3
P4-P6
P7-P9
P10-P12
P13-P15
P16-P18
P19-P21
P22-P24
P25-P27
P28-P30
P31-P33
P34-P36
P37-P39
P40-P40
STMPE321QTR
Mfr. #:
Buy STMPE321QTR
Manufacturer:
STMicroelectronics
Description:
IC CTLR TOUCH KEY 3CH 12-QFN
Lifecycle:
New from this manufacturer.
Delivery:
DHL
FedEx
Ups
TNT
EMS
Payment:
T/T
Paypal
Visa
MoneyGram
Western
Union
Products related to this Datasheet
STMPE321QTR