Programmer is not responding

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Programmer is not responding

Henrik Brix Andersen
Hi,

I have recently acquired an Atmel STK500 development board, but I am
having problems getting it working with avrdude under Linux. The board
works with AVR Studio 4 on Microsoft Windows XP.

I have had it working with avrdude (erase only) a couple of times, but
>90% of the times I try, it fails with the following error message:

        brix@sponge ~ $ avrdude -c stk500 -p m16 -P /dev/ttyUSB0 -v -v -e
       
        avrdude: Version 5.0-BETA
                 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
       
                 System wide configuration file is "/etc/avrdude.conf"
                 User configuration file is "/home/brix/.avrduderc"
                 User configuration file does not exist or is not a regular file, skipping
       
                 Using Port            : /dev/ttyUSB0
                 Using Programmer      : stk500
        avrdude: serial_recv(): programmer is not responding
        avrdude: stk500_recv(): programmer is not responding

I have also tried the "avrisp" programmer type. I have tried both
avrdude-4.4.0, avrdude-5.0-BETA and current CVS, same results. I have
used AVR Studio 4 to upgrade the firmware of the STK500 to V2, same
results.

AVR Studio 4 identifies the board as:

  STK500 with V2 firmware found on COM7:
  Getting revisions.. HW: 0x02, SW Major: 0x02, SW Minor: 0x00 .. OK

It is connected to the host PC through a PL-2303 USB-to-RS232 converter.

This is the output of one of the few times I've had it working:

        brix@sponge ~ $ avrdude -c avrisp -p m16 -P /dev/ttyUSB0 -v -v -e
       
        avrdude: Version 4.4.0
                 Copyright (c) 2000-2004 Brian Dean, [hidden email]
       
                 System wide configuration file is "/etc/avrdude.conf"
                 User configuration file is "/home/brix/.avrduderc"
                 User configuration file does not exist or is not a regular file, skipping
       
                 Using Port            : /dev/ttyUSB0
                 Using Programmer      : avrisp
                 AVR Part              : ATMEGA16
                 Chip Erase delay      : 9000 us
                 PAGEL                 : PD7
                 BS2                   : PA0
                 RESET disposition     : dedicated
                 RETRY pulse           : SCK
                 serial program mode   : yes
                 parallel program mode : yes
                 Memory Detail         :
       
                                             Page                       Polled
                   Memory Type Paged  Size   Size #Pages MinW  MaxW   ReadBack
                   ----------- ------ ------ ---- ------ ----- ----- ---------
                   eeprom      no        512    0     0  9000  9000 0xff 0xff
                   flash       yes     16384  128   128  4500  4500 0xff 0xff
                   lock        no          1    0     0     0     0 0x00 0x00
                   lfuse       no          1    0     0     0     0 0x00 0x00
                   hfuse       no          1    0     0     0     0 0x00 0x00
                   signature   no          3    0     0     0     0 0x00 0x00
       
                 Programmer Type : STK500
                 Description     : Atmel AVR ISP
                 Hardware Version: 2
                 Firmware Version: 1.15
                 Vtarget         : 5.1 V
                 Varef           : 5.0 V
                 Oscillator      : 3.686 MHz
                 SCK period      : 1.1 us
       
        avrdude: AVR device initialized and ready to accept instructions
       
        Reading | ################################################## | 100% 0.01s
       
        avrdude: Device signature = 0x1e9403
        avrdude: erasing chip
       
        avrdude done.  Thank you.

Does anybody have an idea to what might be wrong?

Sincerely,
Brix
--
Henrik Brix Andersen <[hidden email]>
Gentoo Metadistribution | Mobile computing herd

_______________________________________________
avrdude-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Programmer is not responding

Joerg Wunsch
As Henrik Brix Andersen wrote:

>         avrdude: serial_recv(): programmer is not responding
>         avrdude: stk500_recv(): programmer is not responding

Running it with -vvvv gives details about the communication.

My guess is that your PL2303 occasionally drops a character.
Unfortunately, the current STK500 code (both v1 and v2) doesn't
recover from that situation at all, i.e. it makes no retries.  It
shouldn't be to hard to add retries though.  In the jtag2 code (which
has partially been cloned from the stk500v2 code, as both low-level
protocols are similar to some degree), I had to add retries as some of
my tests have been run on a lossy PCI multiport card where my FreeBSD
driver randomly catches a `silo overflow' which means that some
character gets lost.

> It is connected to the host PC through a PL-2303 USB-to-RS232
> converter.

I just tried my STK500 behind a PL2303 adapter on FreeBSD (firmware
version 2, avrdude straight from CVS), and could not see any problems.
The data rate is not exciting though, but that could easily be a
latency problem with the uplcom driver here.

--
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
avrdude-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: Programmer is not responding

Henrik Brix Andersen
On Tue, 2005-08-23 at 22:33 +0200, Joerg Wunsch wrote:
> Running it with -vvvv gives details about the communication.

Ah, thanks.

> My guess is that your PL2303 occasionally drops a character.
> Unfortunately, the current STK500 code (both v1 and v2) doesn't
> recover from that situation at all, i.e. it makes no retries.  It
> shouldn't be to hard to add retries though.  In the jtag2 code (which
> has partially been cloned from the stk500v2 code, as both low-level
> protocols are similar to some degree), I had to add retries as some of
> my tests have been run on a lossy PCI multiport card where my FreeBSD
> driver randomly catches a `silo overflow' which means that some
> character gets lost.

Ahem - who said "stk500v2"? ;)

It works just fine with -c stk500v2, sorry to have bothered you.

Regards,
Brix
--
Henrik Brix Andersen <[hidden email]>
Gentoo Metadistribution | Mobile computing herd

_______________________________________________
avrdude-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Programmer is not responding

Joerg Wunsch
As Henrik Brix Andersen wrote:

> Ahem - who said "stk500v2"? ;)

I didn't mention it, as you've also seen problems with the v1 version,
it seemed to me.

> It works just fine with -c stk500v2, sorry to have bothered you.

OK, fine.

Probably time to get back to the idea of an auto-detection...

--
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
avrdude-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev