1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-25 21:30:37 +02:00

prod/: cleaned up atben clock frequency test

- prod/Common (begin), prod/atben: added clock reference file argument
- prod/atben (xtal_ben): use atrf-xtal options -b and -p to determine
  whether the clock frequency is correct
This commit is contained in:
Werner Almesberger 2011-05-19 16:45:22 -03:00
parent 68e56afd3d
commit 251a749515
2 changed files with 11 additions and 4 deletions

View File

@ -114,7 +114,7 @@ expect_re()
begin() begin()
{ {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "usage: begin profile" 1>&2 echo "usage: begin profile [clock-ref]" 1>&2
exit 1 exit 1
fi fi
PROFILE=$1 PROFILE=$1
@ -122,6 +122,13 @@ begin()
echo "$PROFILE not found" 1>&2 echo "$PROFILE not found" 1>&2
exit 1 exit 1
fi fi
if [ "$2" ]; then
CLKREF=$2
if ! $LOCAL_EXEC "[ -r $CLKREF ]"; then
echo "$CLKREF not found" 1>&2
exit 1
fi
fi
} }

View File

@ -13,12 +13,12 @@ gpio_ben()
xtal_ben() xtal_ben()
{ {
step "Crystal frequency" step "Crystal frequency"
cmd "$LOCAL_EXEC atrf-xtal -d $LOCAL_DUT 100" cmd "$LOCAL_EXEC atrf-xtal -d $LOCAL_DUT -b \\\`cat $CLKREF\\\` -p 50 100"
expect_re '4350[012]\.' # @@@ very crude ... expect_re ppm # we catch any problems via the exit code
} }
begin ben.profile begin ben.profile ben.xtal
# power ? # power ?
gpio_ben gpio_ben
identify identify