1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-07-05 04:28:55 +03:00
Commit Graph

958 Commits

Author SHA1 Message Date
Werner Almesberger
14215f5b12 atrf-gpio: added control commands; register read can now be masked
- atrf-gpio.c (reg_op, usage): new command "delay" to add a 10 ms
  delay
- atrf-gpio.c (reg_op, usage): new command "frame" to write one
  byte to the frame buffer
- atrf-gpio.c (reg_op, usage): new command "reset" to reset the
  transceiver (via atrf_reset_rf)
- atrf-gpio.c (reg_op, usage): new command "slp_tr" to pulse SLP_TR
  (via atrf_slp_tr)
- atrf-gpio.c (reg_op, usage): register read can now be followed by a
  mask value
2011-06-06 00:27:41 -03:00
Werner Almesberger
dea973056c prod/atben: quote command containing !, to make it easier to copy & paste 2011-06-06 00:15:55 -03:00
Werner Almesberger
2a4f7a155f tools/lib/cwtest.c (cw_test_end): use reset also on USB devices
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.
2011-06-05 23:00:40 -03:00
Werner Almesberger
52657edf38 lib/atusb.c (atusb_slp_tr, atusb_driver): implemented SLP_TR pulse 2011-06-05 22:37:03 -03:00
Werner Almesberger
e42203b723 atusb/fw/: new request ATUSB_SLP_TR to pulse SLP_TR
- include/atusb/ep0.h (enum atspi_requests): added ATUSB_SLP_TR
- ep0.c (my_setup): call slp_tr on ATUSB_SLP_TR
- board.h (slp_tr), board.c: pulse SLP_TR high
2011-06-05 22:34:49 -03:00
Werner Almesberger
e7dfb38fce prod/atben: changed 'l' to 'o' in all patterns 2011-06-05 21:57:32 -03:00
Werner Almesberger
33b0400e53 atrf-gpio: accept 'o' as an alias for 'l'
This, while being slightly unsystematic, reduces the risk of confusing
"1" (one) and "l" (lower-case ell).

- tools/atrf-gpio/atben.c (do_atben), tools/atrf-gpio/atusb.c
  (do_atusb): treat 'o' as an alias of 'l'
- tools/atrf-gpio/atrf-gpio.c (usage): list 'o' as alternative for 'l'
2011-06-05 21:47:02 -03:00
Werner Almesberger
e9debdd4ab tools/atrf-gpio/atusb.c (gpio): _exit after USB error, to avoid futile cleanup 2011-06-05 21:37:46 -03:00
Werner Almesberger
a73a8a2044 tools/atrf-gpio/atusb.c: if ATUSB_GPIO fails, show the attempted setting
- atusb.c (dump_port, gpio): dump the attempted setting if ATUSB_GPIO
  fails (assuming it is that setting that caused the failure)
2011-06-05 21:32:14 -03:00
Werner Almesberger
1a3f169e89 libatrf: add option to send a pulse with atrf_slp_tr
- include/atrf.h (atrf_slp_tr), lib/atrf.c (atrf_slp_tr): added pulse
  argument
- atrf-proxy/PROTOCOL, atrf-proxy/atrf-proxy.c (cmd_two, cmd_more):
  added second argument to SLP_TR command
- atrf-xtal/atben.c (atben_sample), lib/cwtest.c (cw_test_end): updated
  for API change
- lib/driver.h (struct atrf_driver): added "pulse" argument to slp_tr
- lib/atben.c (atben_slp_tr), lib/atnet.c (atnet_slp_tr): added support
  for pulse mode
2011-06-05 21:08:48 -03:00
Werner Almesberger
87e06b4e4e tools/atrf-gpio/atusb.c: various bug fixes and improvements
- atusb.c (name): clarified that PC3 is unconnected
- atusb.c (gpio): "dir" and "data" were swapped
- atusb.c (gpio): complain if ATUSB_GPIO returns the wrong amount of data
- atusb.c (dump, main): show the pin configuration as well
- atusb.c (dump): show "-" for values where we don't expect a specific
  result
- atusb.c (dump): removed extra newline on mismatch
2011-06-05 18:30:13 -03:00
Werner Almesberger
e6f7d85e8a atudb/fw: disable the UART in ATUSB_GPIO
- board.c (gpio): split GPIO setup and probing
- board.c (gpio): disable the UART while probing GPIOs
2011-06-05 18:27:40 -03:00
Werner Almesberger
d1dd611d1e prod/doc/test.hmac: expanded GPIO scan section (in progress) 2011-06-04 11:19:46 -03:00
Werner Almesberger
6bf03fe0a6 tools/atrf-gpio/atben.c: made error report easier to read
- atben.c (decode_cfg): report pull-up as "R" instead of "P"
- atben.c (dump_pd): show "-" for values where we don't expect a
  specific result
2011-06-04 10:53:44 -03:00
Werner Almesberger
b0f3cb099b tools/atrf-gpio/atusb.c: ATUSB driver (using ATUSB_GPIO) 2011-06-04 10:29:10 -03:00
Werner Almesberger
370cd320ef atusb/fw: new request ATUSB_GPIO for direct GPIO access
reset_rf now resets all GPIOs to their default state. This way, we
can easily recover from an incomplete or incorrect use of ATUSB_GPIO.

- atusb.c (main), board.c (reset_rf): moved call to spi_init into
  reset_rf
- board.c (reset_rf, board_init): moved GPIO setup to reset_rf
- board.c (reset_rf): set GPIOs to reset defaults
- board.h (gpio), board.c: read/modify/write all settings of GPIO
  ports
- include/atusb/ep0.h (enum atspi_requests): added new request
  ATUSB_GPIO
- ep0.c (my_setup): ATUSB_GPIO reads/reconfigures a GPIO port
2011-06-04 10:29:10 -03:00
Werner Almesberger
59469a458d prod/atben: added GPIO test 2011-06-04 10:29:10 -03:00
Werner Almesberger
4924755a15 atrf-gpio: new utility to directly access GPIOs (for now atben-only)
- tools/atrf-gpio/: new utility to directly access GPIOs
- tools/Makefile (BEN_DIRS): added atrf-gpio
2011-06-04 09:50:27 -03:00
Werner Almesberger
565fadf258 tools/lib/atusb.c: added SRAM access to atusb driver
- tools/atrf-proxy/PROTOCOL: documented new commands GETRAM and SETRAM
  for SRAM access
- tools/atrf-proxy/atrf-proxy.c (cmd_two, cmd_more): added "setram"
  command
- tools/atrf-proxy/atrf-proxy.c (cmd_more): added "getram" command
- tools/lib/atnet.c (atnet_sram_write, atnet_sram_read): SRAM access
  functions
- tools/lub/atnet.c (atnet_driver): added new functions to driver
  operations
2011-06-03 14:35:21 -03:00
Werner Almesberger
4aff7af370 tools/lib/atusb.c: added SRAM access to atusb driver
- atusb.c (atusb_sram_write, atusb_sram_read): SRAM access functions
- atusb.c (atusb_driver): added new functions to driver operations
2011-06-03 14:26:47 -03:00
Werner Almesberger
b733431847 atusb/fw/ep0.c: fixed ATUSB_SRAM_READ
- ep0.c (my_setup): ATUSB_SRAM_READ is FROM_DEV, not TO_DEV
- ep0.c (my_setup): in ATUSB_SRAM_READ, write setup->wLength bytes,
  not "size" (which is uninitialized)
2011-06-03 14:25:19 -03:00
Werner Almesberger
6b447f805c tools/lib/atben.c: added SRAM access to atben driver
- atben.c (atben_sram_write, atben_sram_read): SRAM access functions
- atben.c (atben_driver): added new functions to driver operations
2011-06-03 14:24:00 -03:00
Werner Almesberger
472e18294c libatrf: added SRAM access functions
- tools/include/atrf.h (atrf_sram_write, atrf_sram_read),
  tools/lib/atrf.c: single-byte SRAM access front-end functions
- tools/lib/driver.h (struct atrf_driver): new driver functions
  sram_write and sram_read
2011-06-03 13:52:13 -03:00
Werner Almesberger
cbd0fe54b7 atusb-flash: show avrdude progress output
- Common (doit): if the environment variable LIVE is set to "true",
  run the command in "script" instead of using "eval"
- Common (LIVE): unset this variable on initialization
- atusb-flash (flash): set LIVE, to obtain progress output from avrdude
2011-05-31 03:30:57 -03:00
Werner Almesberger
8c25bc2b63 prod/doc/analysis.hmac: added atrf-xtal measurement on atusb; clarifictions 2011-05-30 20:23:07 -03:00
Werner Almesberger
c8e942f9ee added clock frequency test for atusb and updated documentation
- prod/atusb: added clock frequency test
- prod/doc/setup.hmac: added GSL (libgsl) build dependency
- prod/doc/setup.hmac: recommend use of NTP on the PC
- prod/doc/test.hmac: added atusb to the clock frequency section
2011-05-30 20:04:54 -03:00
Werner Almesberger
9515d96c24 prod/doc/setup.hmac: updated ATUSB application firmware URL for new version 2011-05-30 19:42:37 -03:00
Werner Almesberger
61e656e143 atrf-xtal: added atusb support (via ATUSB_TIMER)
- Makefile: removed limitation to Ben and added host build
- atusb.c: atusb-specific acquisition and calculations
- atrf-xtal.h (do_atusb): interface to atusb.c
- atrf-xtal.c (atben, atusb, main): added switch to board-specific driver
- atrf-xtal.c (usage, main): added support for atusb
2011-05-30 19:17:43 -03:00
Werner Almesberger
bdca20479b atrf-xtal: moved atben-specific code to atben.c
- atrf-xtal.c (cmp, eval, do_atben): moved to atben.c
- atrf-xtal.c (setup, sample, cleanup): removed wrappers
- atrf-xtal.c (usage): cast strlen result, for x86-64 compatibility
- atrf-xtal.h (atben_setup, atben_sample, atben_cleanup), atrf-xtal.c:
  device interface functions are now "static"
- atrf-xtal.h (do_atben): do_atben is now our new interface
2011-05-30 19:13:24 -03:00
Werner Almesberger
5a6aae57cb atrf-xtal.c (do_atben, main): moved board-specific code to separate function 2011-05-30 00:17:49 -03:00
Werner Almesberger
8c57277953 atusb/fw/: added free-running 48 bit 8 MHz counter for clock measurements
- atusb.c (main): poll the 16 bit timer for overflows
- board.h (timer_poll, timer_read), (board.c (timer_h, timer_poll,
  timer_read, board_init): added support for a free-running 48 bit timer
  (16 bits in hardware, 32 bits in software)
- include/atusb/ep0.h (ATUSB_TIMER), ep0.c (my_setup): new request
  ATUSB_TIMER to retrieve the value of the 8 MHz counter
- include/atusb/ep0.h (enum atspi_requests): describe what the groups
  of requests do
2011-05-29 21:05:28 -03:00
Werner Almesberger
40d78b2d07 prod/doc/analysis.html: typo and small language fix 2011-05-29 19:37:48 -03:00
Werner Almesberger
a662410560 prod/doc/: completed section on component orientation (with pictures) 2011-05-29 14:46:00 -03:00
Werner Almesberger
46b15effa9 prod/doc/: cleanup and clarifications after proofreading 2011-05-29 10:37:17 -03:00
Werner Almesberger
8b26bb7130 prod/doc/: reduced excessive use of <B> ... </B> 2011-05-29 10:04:13 -03:00
Werner Almesberger
45746fdfa5 dropped f32xbase dependency on Makefile.common
This means that we only depend on f32xbase for atusb-sil (defunct) and
cntr (needs updating), but not for any of the project's main parts.

- makefiles/Makefile.basic: copied over from
  f32xbase/lib/Makefile.common
- makefiles/Makefile.basic (LDLIBS): removed inclusion of libusb
- tools/Makefile.common: use makefiles/Makefile.basic
- install/INSTALL-Ben, prod/doc/setup.hmac: removed f32xbase
  dependency
2011-05-29 06:03:11 -03:00
Werner Almesberger
208663ce5f prod/doc/index.hmac: make items in definition list stick out more 2011-05-29 04:58:03 -03:00
Werner Almesberger
33f84b436c prod/doc/: completed description of signal strength measurement
- test.hmac: added more details on physical test setup
- setup.hmac: described SPECTRUM_MARGIN parameter
- setup.hmac: described process for generating the reference spectrum
2011-05-28 13:19:45 -03:00
Werner Almesberger
680086b2fa prod/Makefile: target "spectrum" to generate reference spectrum; target spotless 2011-05-28 13:06:33 -03:00
Werner Almesberger
0eec747510 atrf-path: added visual history of dumps
- gui.c (segment, draw, gui): make caller provide color, to ease sharing
- gui.c (dump, gui): moved call to print_sweep to separate function
- gui.c (DUMP_RGBA, dumps, n_dumps, dump, draw_dumps, gui): record all
  dumps and display them in the background
2011-05-28 12:21:56 -03:00
Werner Almesberger
b82472bb01 tools/atrf-path: added interactive dumping with D
- sweep.h (print_sweep), atrf-path.c (print_sweep): make global, for
  sharing with gui.c
- gui.c (gui): dump the sweep results to standard output if "D" is
  pressed
2011-05-28 12:03:23 -03:00
Werner Almesberger
c78423b5e5 prod/doc/setup.hmac: completed test script customization section 2011-05-28 07:37:08 -03:00
Werner Almesberger
0372d7d6cd prod/: moved more configurable items to variables
- Makefile: define driver names depending on device role
- Makefile: changed title comment to indicate that this Makefile is no
  longer considered just a convenience hack
- atusb: define USB_ID via a variable instead of hard-coding it
2011-05-28 07:03:20 -03:00
Werner Almesberger
2bb2e7b658 prod/doc/setup.hmac: explicitly mention SDL_gfx as a prerequisite 2011-05-28 06:53:18 -03:00
Werner Almesberger
b583142247 prod/doc/test.hmac: added introductory text for test setups 2011-05-27 18:52:53 -03:00
Werner Almesberger
d884ab55ee prod/doc/: renamed at???-clk*.png to scope-*, to prevent wildcard clash 2011-05-27 18:47:35 -03:00
Werner Almesberger
c93f6d945e prod/doc/: added scope screen shots to analysis; show crystal as alt GND for clk 2011-05-27 18:37:40 -03:00
Werner Almesberger
717f7e77a3 prod/doc/setup.hmac: filled the intro sections; added dfu-util installation 2011-05-27 17:14:15 -03:00
Werner Almesberger
6ac10ddf18 prod/doc/setup.hmac: described PC and Ben software and test script installation 2011-05-27 16:31:18 -03:00
Werner Almesberger
caa8c14096 prod/doc/atben.fig: cover unused PCB space with a white rectangle 2011-05-27 15:50:54 -03:00