mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-25 22:20:37 +02:00
prod/atusb: added GPIO test
This commit is contained in:
parent
14215f5b12
commit
38a08c09ca
86
prod/atusb
86
prod/atusb
@ -24,8 +24,90 @@ led()
|
||||
|
||||
gpio_usb()
|
||||
{
|
||||
step "GPIO scan"
|
||||
todo
|
||||
# P_ON state (after reset; transceiver pull-up/downs active)
|
||||
|
||||
#
|
||||
# BBBBBBBB CCCCCCCC DDDDDDDD
|
||||
# 01234567 01234567 01234567
|
||||
#
|
||||
# -xxxS-L- -x-----n InMM-S--
|
||||
# T E R RSIO C
|
||||
#
|
||||
# Pull in P_ON v ^ -^-v v
|
||||
#
|
||||
|
||||
step "GPIO scan (P_ON)"
|
||||
cmd "$LOCAL_EXEC atrf-gpio -d $LOCAL_DUT -p \
|
||||
HHHHoHxH.HxHxHxHh.ohzoHoHH '# reset state (H)' \
|
||||
HHHH0HxH.HxHxHxHh.ohzoHoHH '# test SLP_TR (0)' \
|
||||
HHHHoH0H.HxHxHxHh.ohzoHoHH '# test LED (0)' \
|
||||
HHHHoHxH.HxHxHxHh.LhzoHoHH '# test IRQ_RF (0)' \
|
||||
HHHHoHxH.HxHxHxHh.o0zoHoHH '# test nSEL (0)' \
|
||||
HHHHoHxH.HxHxHxHh.ohz0HoHH '# test MOSI (0)' \
|
||||
HHHHoHxH.HxHxHxHh.ohzoH0HH '# test SCLK (0)' \
|
||||
0000o0x0.0x0x0x0h.ohzo0o00 '# reset state (0)' \
|
||||
000010x0.0x0x0x0h.ohzo0o00 '# test SLP_TR (1)' \
|
||||
0000o010.0x0x0x0h.ohzo0o00 '# test LED (1)' \
|
||||
0000o0x0.0x0x0x0h.o1zo0o00 '# test nSEL (1)' \
|
||||
0000o0x0.0x0x0x0h.ohz10o00 '# test MOSI (1)' \
|
||||
0000o0x0.0x0x0x0h.ohzo0100 '# test SCLK (1)'"
|
||||
doit
|
||||
|
||||
# TRX_OFF state (transceiver pull-up/downs inactive)
|
||||
|
||||
# -xxxS-L- -x-----n InMM-S--
|
||||
# T E R RSIO C
|
||||
|
||||
step "GPIO scan (TRX_OFF)"
|
||||
cmd "$LOCAL_EXEC atrf-gpio -d $LOCAL_DUT \
|
||||
HHHH0HzH.HxHxHxHh.oHzHHHHH '# TRX_OFF state (H)' \
|
||||
HHHH0H0H.HxHxHxHh.oHzHHHHH '# test LED' \
|
||||
HHHH0HzH.HxHxHxHh.o0zHHHHH '# test nSEL' \
|
||||
HHHH0HzH.HxHxHxHh.oHz0HHHH '# test MOSI' \
|
||||
HHHH0HzH.HxHxHxHh.oHzHH0HH '# test SCLK'"
|
||||
doit
|
||||
|
||||
# INT
|
||||
|
||||
# -xxxS-L- -x-----n InMM-S--
|
||||
# T E R RSIO C
|
||||
|
||||
step "GPIO scan (INT)"
|
||||
cmd "$LOCAL_EXEC atrf-gpio -d $LOCAL_DUT -p \
|
||||
xxxxxxxx.xxxxxxxx.oxxxxxxx '# reset state' \
|
||||
0x04=1 '# IRQ_POLARITY = 1' \
|
||||
xxxxxxxx.xxxxxxxx.hxxxxxxx '# test INT (1)' \
|
||||
xxxxxxxx.xxxxxxxx.h0xxxxxx '# test INT (2)' \
|
||||
xxxxxxxx.xxxxxxxx.h1xxxxxx '# restore nSEL' \
|
||||
0x04=0 '# IRQ_POLARITY = 0' \
|
||||
xxxxxxxx.xxxxxxxx.o1xxxxxx '# test INT again'"
|
||||
doit
|
||||
|
||||
# SLP_TR
|
||||
|
||||
# -xxxS-L- -x-----n InMM-S--
|
||||
# T E R RSIO C
|
||||
|
||||
step "GPIO scan (SLP_TR)"
|
||||
cmd "$LOCAL_EXEC atrf-gpio -d $LOCAL_DUT \
|
||||
02=9 delay '# enter PLL_ON' \
|
||||
02:9/0x1f '# verify state' \
|
||||
frame '# one-byte frame' \
|
||||
0xf: '# clear interrupts' \
|
||||
0xe=8 '# enable TRX_END intr' \
|
||||
xxxxxxxx.xxxxxxxx.oxxxxxxx '# confirm INT' \
|
||||
slp_tr delay '# send frame' \
|
||||
xxxxxxxx.xxxxxxxx.hxxxxxxx '# check INT'"
|
||||
doit
|
||||
|
||||
# nRST
|
||||
|
||||
step "GPIO scan (nRST)"
|
||||
cmd "$LOCAL_EXEC atrf-gpio -d $LOCAL_DUT \
|
||||
02:8/0x1f '# verify TRX_OFF' \
|
||||
reset '# reset transceiver' \
|
||||
02:0/0x1f '# verify P_ON'"
|
||||
doit
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user