On Mon, 2012-10-29 at 01:33 +0100, Stefan Tauner wrote:
Adds support for the Altera USB-Blaster programming dongle in Active Serial (AS) mode. Tested on both original product and a clone dongle.
Signed-off-by: James Laird jhl@mafipulation.org Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Rebased on Kyösti's version. Fixed Makefile and whitespace, cleaned up a few things, added a manpage... please retest on hardware.
Can someone please explain to me why send_read() does what it does?
Thanks, your clean-up looks good.
Tested on both a clone with C8051F321 and the original product.
The blaster design is described here: http://sourceforge.net/apps/mediawiki/urjtag/index.php?title=Cable_Altera_US...
As for send_read(), to read a byte from SPI, one must first write a byte to the USB. Stupid, but that is the design. This hardware has particularly bad performance penalty when reading in small chunks of pagesize or 256 bytes.
With non-blocking bulk submits in libusb-1.0, the raw read speed can be increased by factor of 2 for clone and by 5 for original product.
Regards, KM