avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] PDI capable bitbang programmers?


From: Ing. Daniel Rozsnyó
Subject: Re: [avrdude-dev] PDI capable bitbang programmers?
Date: Sun, 05 May 2013 15:24:35 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121026 Thunderbird/16.0.2


On 05/05/2013 01:14 PM, Szymon Ulatowski wrote:
On 05/05/2013 10:52 AM, "Ing. Daniel Rozsnyó" wrote:
I have started to compare TPI and PDI - seems very similar. The TPI
has a dedicated reset wire, so PDI looks like a subset of TPI, with no
modification required.

last year i considered implementing PDI on FTDI but i gave up after
learning that FT232R is unable to produce long and stable sequences of
clock signal because of its hardware bug - the chip spits out all
received data very quickly instead of buffering the packets and clocking
output pins according to the configured frequency - see "TN_120 FT232R
Errata Technical Note" - "3.1.2 BitBang Mode variable Pulse Width"
http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_120_FT232R%20Errata%20Technical%20Note.pdf

and this is very unfortunate because PDI requires at least 10kHz clock -
ideally we would configure the output clock to 20kHz (or more) and send
an USB packets of 01010101 - but they screwed it and the result is a
quick burst of clock followed by a pause (and pausing the clock
disconnects PDI) :-P
so i gave up and decided to implement PDI in USBASP that is so
ubiquitous and cheap
http://szulat.blogspot.com/2012/08/atxmega-programmer-for-050.html

but of course the FTDI implementation would be so much better (if it is
really possible) and i wish luck to anyone trying to accomplish this goal!

sz.


Okay, I give it a try. Made the USBASP to upgrade with latest firmware and applied your patch to avrdude.

In my ~/.avrduderc I added:

part parent "x32a4"
    id          = "x32a4u";
    desc        = "ATxmega32A4U";
#    has_tpi     = yes;
    has_pdi     = yes;
;


But when I use the command:

        avrdude -p atxmega32a4u -c usbasp -P usb -vvvv

It tries to access the device with ISP mode (I have added three printfs to your code where it selects the correct interface). When I tried the has_tpi = yes, it was detected correctly in usbasp.

Forcing the mode to PDI (by overwriting the default mode) will lead to no success.

Will hook up a scope to the PDI lines to see what it does... there are not debug messages coming with -vvv so it is hard to tell more :/

Daniel




reply via email to

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