- usbopen.c (open_usb): determine vendor and product objective outside
the loop
- usbopen.c (open_usb): check vendor and product only if non-zero
- usbopen.c (bad_id, parse_usb_id): vendor and product can now be
omitted
- tools/include/usbopen.h (usb_rescan), tools/lib/usbopen.c (initialized,
initialize, usb_rescan): usb_rescan forces a re-initialization of
libusb and a new scan of the USB device tree
- usb/usb.h (USB_LANGID_ENGLISH_US): added USB LANGID for US-English
- board.h (board_sernum), board.c (board_sernum, hex, get_sernum,
board_init): provide the board's serial number in "board_sernum"
(UTF-encoded)
- sernum.h (sernum_get_descr), sernum.c (sernum_get_descr): return
string descriptors for the serial number
- descr.c (device_descriptor), usb/dfu.c (device_descriptor):
set iSerialNumber if serial number is available
- atusb.c (main), usb/dfu.c (my_descr): call sernum_get_descr for
unknown descriptors
- Makefile (OBJS, BOOT_OBJS): added sernum.o
What caused the error that looked like a problem with the functional
descriptor was in fact the boot loader resetting between the bus scan
and retrieval of the descriptor.
- board.c (board_init): disable the watchdog timer (tricky !)
- board.h (reset_cpu), board.c: enable the watchdog timer to cause a
CPU reset
- ep0.c (my_setup): uncommented and updated ATUSB_RESET handler
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)