WiSnap User Manual 2.21 04112011-JF
Page
36
of
66
The table below shows the usage of the GPIO pins with their default state and functionality.
Bit
Position
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Signal
Name
GPIO-
13
UART
RTS
GPIO-
12
UART
CTS
GPIO-
11
UART-
RX
GPIO-
10
UART-
TX
GPIO
9
GPIO
8
GPIO
7
GPIO
6
GPIO
5
GPIO
4
N/A N/A N/
A
N/A
Default
State
Output
Input
Input
Output
Input Outp
ut
Outp
ut
Outp
ut
Outp
ut
Outp
ut
N/A N/A N/
A
N/A
Default
Function
Go
es
HI
GH
o
n
P
OW
E
R
U
P
, L
OW
o
n
ce
s
ys
te
m
is
RE
A
DY
.
If
H
W
F
lo
w
c
o
n
tro
l e
n
ab
le
d
, to
g
g
le
s
H
IG
H
to
in
d
ic
at
e R
X
b
u
ffe
r fu
ll
Thr
ot
tle
s
tr
ans
m
itt
er
if
H
W
fl
ow
c
ont
rol
is
en
ab
led
.
LO
W
en
ab
les
tr
an
sm
itt
er
, H
IG
H
d
isab
le.
UA
RT
RX
UA
RT
TX
AD
-H
OC
MOD
E
&
F
A
C
T
OR
Y
R
E
S
E
T
NO
T
US
E
D
BL
U
E
L
ED
RE
D
LE
D
YEL
LO
W
L
ED
GR
E
E
N
L
E
D
NOTE: The Blue LED is connected to GPIO7 on the WiSnap AAA. The Blue LED is not
connected to GPIO7 on the WiSnap SuRFBoard (M1). It is not possible to power off the
Blue LED on the SuRFBoard.
10.5.1
Setting the alternate GPIO functions
The defaults for GPIO 4 5, 6 is to control the LED functionality. This default functionality can be
overridden to allow user programable IO or alternate IO functionality by using the
set sys iofunc
<value>
command. Value is entered as a hex number.
The hex value represents a bit mask that controls each bit in the <value> represents a particular
GPIO pin. If a bit is 0, then that GPIO is driven/read by the firmware per the default function.
The IO function <value> is encoded as such:
Bit
IO
DIRECTION Function
0
GPIO-4
output
Disable LED function so IO can be used as GPIO
1
GPIO-5
output
Disable LED function so IO can be used as GPIO
2
GPIO-6
output
Disable LED function so IO can be used as GPIO
3
Not Used
4
GPIO-4
output
HIGH once associated/authenticated and have IP address.
5
GPIO-5
input
Set HIGH to trigger TCP connection, LOW to disconnect.
6
GPIO-6
output
HIGH when connected over TCP, LOW when disconnected.
NOTE. Bits 0-3 are mutually exclusive with the bits 4-6. i.e. 0x77 is an illegal value.