Date:2011-04-13 13:56:15 (8 years 11 months ago)
Author:Werner Almesberger
Commit:4244af265c438e3a120199ab75090df2fc14c92c
Message:tools/lib/cwtest.c (cw_test_end): try "quick reset" on AT86RF231

The transceiver reset takes quite a while. It seems that also going into
sleep mode has the effect of stopping cw test mode and it's much faster.

This has only been tried on the AT86RF231. For AT86RF230, we therefore
still use the reset.

Performance improvement:

Measurement: atrf-path sweep time in GUI mode, averaging over 10 samples.
Running on PC with remote ATBEN transceivers.

before 7.36-7.68 s
after 2.08 s (27-28% of previous time)
Files: tools/lib/cwtest.c (1 diff)

Change Details

tools/lib/cwtest.c
111111    if (atrf_identify(dsc) == artf_at86rf231)
112112        atrf_reg_write(dsc, REG_PART_NUM, 0);
113113
114    atrf_reset_rf(dsc);
114    atrf_reg_write(dsc, REG_TRX_STATE, TRX_CMD_FORCE_TRX_OFF);
115
116    /*
117     * atrf_reset_rf can take a long time. I appears that at least the
118     * AT86RF231 also exits test mode if we send it to sleep for a
119     * moment.
120     */
121    switch (atrf_identify(dsc)) {
122    case artf_at86rf230:
123        atrf_reset_rf(dsc);
124        break;
125    case artf_at86rf231:
126        usleep(2); /* table 7-1: tTR12(typ) = 1 us */
127        atrf_slp_tr(dsc, 1);
128        usleep(10); /* table 7-1: tTR3(typ) doesn't really apply */
129        atrf_slp_tr(dsc, 0);
130        usleep(500); /* table 7-1: tTR2(typ) = 380 */
131        break;
132    default:
133        abort();
134    }
115135}

Archive Download the corresponding diff file



interactive