2011-04-20 07:29:11 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. ./Common
|
|
|
|
|
|
|
|
|
|
|
|
gpio_ben()
|
|
|
|
{
|
2011-06-04 15:39:13 +03:00
|
|
|
# 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 \
|
2011-06-06 03:57:32 +03:00
|
|
|
zzozho '# reset state' \
|
|
|
|
0zozho '# test SCLK' \
|
|
|
|
zz1zho '# test SLP_TR' \
|
|
|
|
zzo0ho '# test MOSI' \
|
|
|
|
zzoz0o '# test nSEL'\""
|
2011-06-04 15:39:13 +03:00
|
|
|
doit
|
|
|
|
|
|
|
|
# TRX_OFF state (transceiver pull-up/downs inactive)
|
|
|
|
|
|
|
|
step "GPIO scan (TRX_OFF)"
|
|
|
|
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
|
2011-06-06 03:57:32 +03:00
|
|
|
hzHhho '# TRX_OFF state' \
|
|
|
|
0zHhho '# test SCLK' \
|
|
|
|
hz0hho '# test SLP_TR' \
|
|
|
|
hzH0ho '# test MOSI' \
|
|
|
|
hzHh0o '# test nSEL'\""
|
2011-06-04 15:39:13 +03:00
|
|
|
doit
|
|
|
|
|
|
|
|
# INT
|
|
|
|
|
|
|
|
step "GPIO scan (INT)"
|
|
|
|
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT -p \
|
2011-06-06 03:57:32 +03:00
|
|
|
xxxxxo '# reset state' \
|
2011-06-04 15:39:13 +03:00
|
|
|
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' \
|
2011-06-06 03:57:32 +03:00
|
|
|
xxxxho '# test INT again'\""
|
2011-06-04 15:39:13 +03:00
|
|
|
doit
|
|
|
|
|
|
|
|
# SLP_TR
|
|
|
|
|
|
|
|
step "GPIO scan (SLP_TR)"
|
|
|
|
cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
|
2011-06-06 06:15:55 +03:00
|
|
|
'00!85' '# write 0x55 to the buffer' \
|
2011-06-04 15:39:13 +03:00
|
|
|
00/85 '# read back the buffer value' \
|
2011-06-06 03:57:32 +03:00
|
|
|
xx1hxo '# enter SLEEP' \
|
|
|
|
xx0hxo '# leave SLEEP' \
|
2011-06-04 15:39:13 +03:00
|
|
|
00/0xff '# read back the buffer value'\""
|
|
|
|
doit
|
2011-04-20 07:29:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
xtal_ben()
|
|
|
|
{
|
|
|
|
step "Crystal frequency"
|
2011-05-19 22:45:22 +03:00
|
|
|
cmd "$LOCAL_EXEC atrf-xtal -d $LOCAL_DUT -b \\\`cat $CLKREF\\\` -p 50 100"
|
|
|
|
expect_re ppm # we catch any problems via the exit code
|
2011-04-20 07:29:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-05-19 22:45:22 +03:00
|
|
|
begin ben.profile ben.xtal
|
2011-04-20 07:29:11 +03:00
|
|
|
# power ?
|
|
|
|
gpio_ben
|
2011-04-20 14:13:27 +03:00
|
|
|
identify
|
2011-04-20 07:29:11 +03:00
|
|
|
xtal_ben
|
|
|
|
spectrum
|
|
|
|
transmit
|