[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] attiny10 with ftdi and bitbang
From: |
matthew venn |
Subject: |
[avrdude-dev] attiny10 with ftdi and bitbang |
Date: |
Fri, 29 Jun 2012 16:22:08 +0100 |
Hi all,
I've been working to reproduce work I found here:
http://irq5.wordpress.com/2010/07/15/programming-the-attiny10/
I'm using avrdude 5.11 on ubuntu10.04
I've added this to avrdude.conf:
programmer
id = "dasaftdi";
desc = "tiny10 no reset, sck=!rts mosi=!txd miso=!cts";
type = serbb;
sck = ~7;
reset = ~1;
miso = ~8;
mosi = ~3;
;
The command I'm using is:
./bin/avrdude -p attiny10 -c dasaftdi -P /dev/ttyUSB0 -v -v -v -v
I've got to the stage where I can see the clock and mosi/miso lines going
(with a scope) but avrdude always times out.
Looking through the code (bitbang.c) and adding some debugging I found it's
in a loop waiting for something to happen:
tries = 0;
do {
rc = pgm->program_enable(pgm, p);
if ((rc == 0)||(rc == -1))
break;
pgm->highpulsepin(pgm, pgm->pinno[p->retry_pulse/*PIN_AVR_SCK*/]);
fprintf(stderr, "retry pulse\n");
tries++;
} while (tries < 65);
But I'm afraid I can't work it out. The comment above say's its waiting for
a response of 0x53 but I can't see that referenced in the code, the
attiny10 config or in Atmel's tpi pdf:
http://www.atmel.com/Images/doc8373.pdf
If I return 0 before this code then avrdude continues but never receives
anything back from the chip:
avrdude: Calibrating delay loop... calibrated to 306 cycles per us
doing MOSI-MISO link check
MOSI-MISO link present
avrdude: AVR device initialized and ready to accept instructions
Reading | | 0%
0.00sbitbang_cmd_tpi(): [ 72 ] [ 00 ]
bitbang_cmd_tpi(): [ F3 00 ] [ ]
bitbang_cmd_tpi(): [ 68 C0 ] [ ]
bitbang_cmd_tpi(): [ 69 3F ] [ ]
bitbang_cmd_tpi(): [ 24 ] [ 00 ]
bitbang_cmd_tpi(): [ 24 ] [ 00 ]
Reading | ################# | 33%
9.00sbitbang_cmd_tpi(): [ 24 ] [ 00 ]
Reading | ################################################## | 100% 10.45s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
However, the TPI ident tag is being read correct, and the MOSI-MISO link is
working.
I've also tried using -i with values from 1 to 100000.
I'm giving up for today, but if anyone can think of something to try next
I'd appreciate it!
Matt
--
Matthew Venn
mattvenn.net
- [avrdude-dev] attiny10 with ftdi and bitbang,
matthew venn <=