- include/misctxrx.h (wait_for_interrupt), lib/misctxrx.c
(wait_for_interrupt): replaced sleep_us*timeout limiting mechanism
with a single timeout value in milliseconds
- lib/misctxrx.c (wait_for_interrupt): use atrf_interrupt_wait instead
of polling
- lib/misctxrx.c (wait_for_interrupt): cleaned up control flow
- lib/misctxrx.c (run, die, wait_for_interrupt): renamed variable "run"
to more specific "sigint"
- atrf-txrx/atrf-txrx.c (ping_rx, ping): pass timeout in milliseconds,
not deciseconds
- atrf-rssi/atrf-rssi.c (sweep), atrf-rssi/gui.c (sweep),
atrf-txrx/atrf-txrx.c (init_txrx, receive_message, receive_pcap,
receive, transmit, transmit_pattern, ping_tx, ping_rx),
atrf-xmit/atrf-xmit.c (init_tx, init_rx, xfer_one),
lib/cwtest.c (enter_test_mode_230, start_test_mode_231):
updated use of wait_for_interrupt
- include/cwtest.h (cw_test_needs_reset), lib/cwtest.c
(cw_test_needs_reset): new function to indicate all cases where the
transceiver needs to be reset (instead of using SLP_TR)
- lib/cwtest.c (cw_test_end): use cw_test_needs_reset instead of
open-coding the decision
- lib/cwtest.c (enter_test_mode_230, start_test_mode_231): always wait
for the PLL to lock. Contrary to the assumption in the previous
commit, we should always see this interrupt.
- atrf-path/atrf-path.c (sample): initialize the transceiver if we had
to reset it
- atrf-path/atrf-path.c (sample), atrf-path/atrf-path.c (do_half_sweep):
moved the tTR19 delay to "sweep", so that all branches share it and it
is taken only once
We seem to have a path where the PLL is already locked when we get
there. We thus never get an interrupt and hang.
Pending further investigation, just use a timeout that is longer
than the worst-case PLL lock time.
ATUSB can't use sleep mode because that would cut the AVR's clock.
The old SiLabs-based boards would not have that issue, but there,
the SLP_TR method is unproven. Besides, reset is as fast on USB.
- lib/cwtest.c (enter_test_mode_231, prepare_test_mode_231,
start_test_mode_231, cw_test_begin): broke enter_test_mode_231 into
a slow setup component and a fast start/resume component
- include/cwtest.h (cw_test_resume), lib/cwtest.c (cw_test_resume):
resume transmission in a previously set up test mode
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)
- lib/Makefile (OBJS), include/cwtest.h (cw_test_begin, cw_test_end),
lib/cwtest.c (enter_test_mode_230, enter_test_mode_231,
cw_test_begin, cw_test_end): moved constant wave test mode setup
over from atrf-txrx.c
- atrf-txrx/atrf-txrx.c (transmit_pattern): use functions from cwtest.o