1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-23 08:27:42 +02:00

prod/atben: added GPIO test

This commit is contained in:
Werner Almesberger 2011-06-04 09:39:13 -03:00
parent 4924755a15
commit 59469a458d

View File

@ -5,8 +5,61 @@
gpio_ben()
{
step "GPIO scan"
todo
# MMC DDCCDD
# 10KM32
#
# SMSMnI
# CITOSR
# Ben pull-up * * = no PU
# Reset pull v-vv^-
#
# P_ON state (after reset; transceiver pull-up/downs active)
step "GPIO scan (P_ON)"
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT -p \
zzlzhl '# reset state' \
0zlzhl '# test SCLK' \
zz1zhl '# test SLP_TR' \
zzl0hl '# test MOSI' \
zzlz0l '# test nSEL'\""
doit
# TRX_OFF state (transceiver pull-up/downs inactive)
step "GPIO scan (TRX_OFF)"
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
hzHhhl '# TRX_OFF state' \
0zHhhl '# test SCLK' \
hz0hhl '# test SLP_TR' \
hzH0hl '# test MOSI' \
hzHh0l '# test nSEL'\""
doit
# INT
step "GPIO scan (INT)"
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT -p \
xxxxxl '# reset state' \
0x04=1 '# TRX_CTRL_1.IRQ_POLARITY = 1' \
xxxxxh '# test INT (1)' \
xxxx0h '# test INT (2)' \
xxxx1h '# restore nSEL' \
0x04=0 '# TRX_CTRL_1.IRQ_POLARITY = 0' \
xxxxhl '# test INT again'\""
doit
# SLP_TR
step "GPIO scan (SLP_TR)"
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
00!85 '# write 0x55 to the buffer' \
00/85 '# read back the buffer value' \
xx1hxl '# enter SLEEP' \
xx0hxl '# leave SLEEP' \
00/0xff '# read back the buffer value'\""
doit
}