Root/prod/atben

1#!/bin/sh
2
3. ./Common
4
5
6gpio_ben()
7{
8# MMC DDCCDD
9# 10KM32
10#
11# SMSMnI
12# CITOSR
13# Ben pull-up * * = no PU
14# Reset pull v-vv^-
15#
16
17    # P_ON state (after reset; transceiver pull-up/downs active)
18    # (Note: this only works on atben because we power-cycle to reset)
19
20    step "GPIO scan (P_ON)"
21    cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT -p \
22        zzozho '# reset state' \
23        0zozho '# test SCLK' \
24               zz1zho '# test SLP_TR' \
25               zzo0ho '# test MOSI' \
26               zzoz0o '# test nSEL'\""
27    doit
28
29    # TRX_OFF state (transceiver pull-up/downs inactive)
30
31    step "GPIO scan (TRX_OFF)"
32    cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
33        hHHhho '# TRX_OFF state' \
34        0HHhho '# test SCLK' \
35        00Hhho '# test MISO' \
36        hH0hho '# test SLP_TR' \
37        hHH0ho '# test MOSI' \
38        hzHh0o '# test nSEL'\""
39    doit
40
41    # INT
42
43    step "GPIO scan (INT)"
44    cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT -p \
45        xxxxxo '# reset state' \
46        0x04=1 '# TRX_CTRL_1.IRQ_POLARITY = 1' \
47        xxxxxh '# test INT (1)' \
48        xxxx0h '# test INT (2)' \
49        xxxx1h '# restore nSEL' \
50        0x04=0 '# TRX_CTRL_1.IRQ_POLARITY = 0' \
51        xxxxho '# test INT again'\""
52    doit
53
54    # SLP_TR
55
56    step "GPIO scan (SLP_TR)"
57    cmd "$LOCAL_EXEC \"atrf-gpio -d $LOCAL_DUT \
58        '00!85' '# write 0x55 to the buffer' \
59        00/85 '# read back the buffer value' \
60        xx1hxo '# enter SLEEP' \
61        xx0hxo '# leave SLEEP' \
62        00/0xff '# read back the buffer value'\""
63    doit
64}
65
66
67xtal_ben()
68{
69    step "Crystal frequency"
70    cmd "$LOCAL_EXEC atrf-xtal -d $LOCAL_DUT -b \\\`cat $CLKREF\\\` -p 50 100"
71    expect_re ppm # we catch any problems via the exit code
72}
73
74
75begin ben.profile ben.xtal
76# power ?
77gpio_ben
78identify
79xtal_ben
80spectrum
81transmit
82

Archive Download this file



interactive