mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 04:56:16 +02:00
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)
This commit is contained in:
parent
6efe37436f
commit
4244af265c
@ -111,5 +111,25 @@ void cw_test_end(struct atrf_dsc *dsc)
|
||||
if (atrf_identify(dsc) == artf_at86rf231)
|
||||
atrf_reg_write(dsc, REG_PART_NUM, 0);
|
||||
|
||||
atrf_reg_write(dsc, REG_TRX_STATE, TRX_CMD_FORCE_TRX_OFF);
|
||||
|
||||
/*
|
||||
* atrf_reset_rf can take a long time. I appears that at least the
|
||||
* AT86RF231 also exits test mode if we send it to sleep for a
|
||||
* moment.
|
||||
*/
|
||||
switch (atrf_identify(dsc)) {
|
||||
case artf_at86rf230:
|
||||
atrf_reset_rf(dsc);
|
||||
break;
|
||||
case artf_at86rf231:
|
||||
usleep(2); /* table 7-1: tTR12(typ) = 1 us */
|
||||
atrf_slp_tr(dsc, 1);
|
||||
usleep(10); /* table 7-1: tTR3(typ) doesn't really apply */
|
||||
atrf_slp_tr(dsc, 0);
|
||||
usleep(500); /* table 7-1: tTR2(typ) = 380 */
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user