avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] avrdude and FT2232


From: Ville Voipio
Subject: Re: [avrdude-dev] avrdude and FT2232
Date: Wed, 30 Apr 2008 14:31:02 +0300
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

As promised i cleaned it a little bit up and it is now available at http://86.56.33.35/wiki/index.php/Avrftdi

so have fun, and get back to me if you experience any problems or have questions.

Well, I experienced some problems, but they were mostly home-made. So, thank you very, very much for this piece of software!


I spent some time making a bunch of changes to make it a bit more flexible. If you feel any of these is plain wrong or bad, please tell.

External changes:

- pin numbering has been changed to be from 0 to 11, as this reflects the bit numbering in internal messages and makes the code a bit more straight-forward (bits 0..7: ADBUS0..7, 8..11: ACBUS0..3). Three lowest pins (0, 1, 2) are reserved for MPSSE SCK/MISO/MOSI. (This means there is no trouble with the parser giving zero for non-available items.)

- vid and pid keywords have been added to the config file parser. This way the VID/PID configuration can be given in the config file, if required. (Useful to reduce the clutter on the command line.) If no VID/PID is given, FTDI default values are used.

- baudrate can be given (either in config file or on the command line) and is honored (range is between 100..6000000 Hz, acceptable maximum depends on the target, see datasheet).

- keyword nbuff has been added to the config file parser. nbuff is a list of negative buffer enable pins (which are required with many USB adapters). Both nbuff and buff can be defined.

- if no pin is given for reset, pin 3 (ADBUF3/TMS) is assumed (all hardware should use it, but this can be overridden in the conf file).


Internal changes:

- all pin definitions are checked against conflicts between each other and the predefined MISO/MOSI/SCK pins. (MISO/MOSI/SCK do not need to be defined in the config file, but if they are, they must be correct.)

- setting and clearing pins is changed to use 12-bit masks instead of pin positions (this facilitates the multi-pin pin lists.)

- all ftdi_write's now go through a wrapper function (for two reasons: portability to D2XX and easier debuggability)

- some debugging is added (not that I'd make any mistakes, but...)

- the core programming code has not been touched at all, all changes are to the init/LED/etc. code.


Most changes are in avrftdi.c, but there are subtle changes in the lex&yacc files, pgm.h, pgm.c and main.c to give the extra parameters. Also, avrdude.conf.in has been updated to include ARM-USB-OCD and Amontec JTAGkey.


Testing:

- tested in out-of-the-box Ubuntu 7.10 with libftdi-0.12 (I needed to make small changes to the configure.ac to be able to use the new autotools, but thats a topic of another patch.) NO CYGWIN / OS X testing (I'll do the OS X part, but only have a 64-bit Cygwin.)

- tested with ATmega8L @ 8MHz, 3.3 V. Download speed from the chip is around 1.29 s for full chip (8 KiB) download at SPI frequency of 500 kHz. (Further increase in the speed does not change the time.)

- program has been tested with Olimex ARM-USB-OCD and Amontec JTAGkey


If the things above look promising, I'll make a patch against the newest CVS. If it doesn't, I'll see what I can do.

The next step is to make it work with the D2XX drivers. That should not be very difficult but may take some time.

Best regards,

- Ville




reply via email to

[Prev in Thread] Current Thread [Next in Thread]