We currently don't provide the DFU Functional Descriptor, which modern
versions of dfu-util request to determine the transfer size. Luckily,
they don't do this if the transfer size is given on the command line.
- usb/atu2.c (ep_init): moved before usb_poll
- usb/atu2.c (usb_poll): register bit was used as mask, not as shift
- usb/atu2.c (usb_poll): call ep_init on USB bus reset
- usb/atu2.c (usb_reset): don't make USB bus reset force a hardware reset
- Makefile (.PHONY, dfu): new target to upload the application with DFU
- include/atrf.h (atrf_driver_spec), lib/atrf.c (atrf_driver_spec):
new function to retrieve the local or remote/final driver spec
- lib/atrf.c (struct atrf_dsc, atrf_open, atrf_close): record the local
driver spec
- lib/driver.h (struct atrf_driver): new driver function "driver_spec"
to retrieve the driver spec
- lib/atnet.c (struct atnet_dsc, atnet_open, atnet_close): maintain a
cache for the driver spec
- lib/atnet.c (atnet_driver_spec, atnet_driver): added support for the
"driver_spec" function
- atrf-proxy/PROTOCOL, atrf-proxy/atrf-proxy.c (cmd_zero): added command
SPEC to retrieve the (final) driver spec
- atrf-id/atrf-id.c (usage, main): added option -s to retrieve the
driver spec. One -s retrieves the local spec, -s -s the remote/final.
- prod/Common: added section titles
- prod/Common (begin): new command to set up and check the test environment
- prof/atben: call "begin" to set up the test environment
- prod/Common (spectrum): added the profile
- prod/Makefile: convenience commands, for development
- prod/atben: run "identify" after checking the GPIOs
- prod/atusb: test script for ATUSB
- Makefile (DIRS): added atrf-xmit
- atrf-xmit/Makefile, atrf-xmit/atrf-xmit.c: new utility atrf-xmit to
rapidly send packets from one device to another and analyze the outcome
- gui.c (disc, indicate): moved drawing of disc to separate function
- gui.c (triangle, up, down): draw an up/down triangle
- gui.c (indicate): use up/down triangle for over/under
- atrf-path.c (do_sweeps): return a pass/fail/undecided value
- gui.h (gui), gui.c (gui): return a pass/fail/undecided value
- gui.c (gui): return pass/fail when P or F is pressed; exit
unconditionally if Q is pressed
- atrf-path.c (main): according to the decision of "gui" or "do_sweeps",
print "#PASS", "#FAIL", or nothing
- gui.c (avg2y, segment): moved mapping from measurement to y position
to separate function, to allow for sharing
- gui.c (LIMIT_RGBA, draw_limit, gui): draw the limits
- sweep.h (MIN_DIFF, MAX_DIFF, struct sweep): added min/max profile
- sweep.h (do_sweep), atrf-path.c (do_half_sweep, do_sweep): compare
result against limits and return pass/fail decision
- sweep.h (N_CHAN), atrf-path.c (do_half_sweep, do_sweeps), gui.c
(N_CHAN): declare number of channels in one central place instead of
scattering it all around the program
- atrf-path.c (do_read_profile, read_profile, usage, main): new option -P
to read a min/max profile
- gui.c (indicate, main): moved indicator to separate function and
improved blink logic
- gui.c (OVER_RGBA, UNDER_RGBA, indicate, main): change color to indicate
pass/fail
atrf-path -T +0.5 -g ... 10 10 time:
before: 0.32-0.33 s
after: 0.27-0.29 s (88%)
- atrf-path.c (sample): force cw test setup if never done before
- atrf-path.c (do_half_sweep): only request cw test setup if sweeping
both offsets
atrf-path -T +0.5 -g ... 10 10 time:
before (both offsets) 0.65 s
after (one offset) 0.32-0.33 s (50%)
- atrf-path.c (usage, main): new option -T to specify which offset to
sweep (default: sweep both)
- atrf-path.c (do_half_sweep): only sample points with the desired offset
- atrf-path.c (print_sweep): only prints points we've sweeped
- gui.c (segment, draw): inverted flag logic from "have_last" to "first"
- gui.c (draw): only plot points we've sweeped
- gui.c (gui): pass the offset selection to "draw"
atrf-path -g ... 10 10 time:
before 1.92 s
after 0.65 s (34%)
- atrf-path.c (do_sweep): separate -0.5 MHz and +0.5 MHz sweep
- atrf-path.c (sample, do_sweep): set up cw test mode only twice per
sweep (once for each offset), and simply resume in all other cases
atrf-path -g ... 10 10 time is now stable at 1.92 s
- atrf-path.c (sample): commented-out init sequence needed for AT86RF230
- atrf-path.c (sample, do_sweep): set TX channel only once per +/-0.5 MHz
pair
- atrf-path.c (sample, do_sweep): "sample" no longer needs the channel
argument
- atrf-path.c (sample, main): do TX init only once
- 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
atrf-path -g ... 10 10 time:
before 2.08 s
after 1.92-1.93 s (92-93%)
- atrf-path.c (set_channel, init_common): moved setting of the channel
to separate function, for better granularity
- atrf-path.c (init_common, init_tx, init_rx, sample, do_sweep): the
init_* functions no longer set the channel; use set_channel
- atrf-path.c (main): initialize the receiver only once
- atrf-path.c (usage, main): new option -g to invoke the GUI
- atrf-path.c (usage, main): in GUI mode, the number of sweeps is optional
(default: infinite)
- atrf-path.c (main), gui.h (gui), gui.c (gui): exit after the specified
number of sweeps
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)
- gui.h, gui.c: plot sweep results with SDL_gfx
- Makefile: added target-specific variables for SDL and SDL_gfx
- atrf-path.c (main): invoke the GUI if the number of sweeps is zero
- sweep.h (struct sweep ), atrf-path.c (sample, do_sweeps, main): pass
sweep parameters via a struct
- sweep.h (do_sweep), atrf-path.c (do_sweep, do_sweeps): separated single
sweep and made it public
- sweep.h (struct sample), atrf-path.c (sample, print_sweep, do_sweeps):
made "sample" and do_sweep return the sample value/vector and moved
output from "sample" to print_sweep
- atrf-path.c (rssi_to_dBm, sample): moved RSSI value to dBm conversion to
separate function
- atrf-path.c (sample): corrected calculation of average
- atrf-path.c (sample): also output minimum and maximum value
- plot: new option -e to display extremal values
- plot: added comment to explain y range
- lib/misctxrx.c (tx_pwr_230, tx_pwr_231): declare tables as "const"
- lib/misctxrx.c (POWER_TABLE_SIZE, set_power_dBm): don't open-code the
table size calculation
- lib/misctxrx.c (tx_power_table, set_power_dBm): moved transmit power
table selection out of set_power_dBm
- include/misctxrx.h (tx_power_dBm2step, tx_power_step2dBm),
lib/misctxrx.c (tx_power_dBm2step, tx_power_step2dBm, set_power_dBm):
moved conversion functions out of set_power_dBm and made them globally
available
- atrf-txrx/atrf-txrx.c (tx_pwr_230, tx_pwr_231, set_power): moved to
lib/misctxrx.c
- include/misctxrx.h, lib/misctxr.c (set_power_step, set_power_dBm):
separated dBm to index conversion from the actual operation
- atrf-txrx/atrf-txrx.c (main): use new set_power_dBm instead of old
set_power
- atnet.c: introduced descriptor structure, replacing direct netio handle
- atnet.c (reply, error): moved global variables into descriptor
- atnet.c (atnet_reg_read, atnet_interrupt): when complaining about an
invalid response, skip the leading "+"
- atusb.c: introduced descriptor structure, replacing direct USB device
handle
- atusb.c (error): moved global variable into descriptor
- driver.h (atusb_dev_handle), atusb.c (atusb_dev_handle), atrf.c
(atrf_usb_handle): call driver to perform the no longer trivial
translation