avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] Atmel AVRISPmkII under OSX 10.6.3 no go


From: Bryan
Subject: [avrdude-dev] Atmel AVRISPmkII under OSX 10.6.3 no go
Date: Wed, 19 Jan 2011 20:46:37 +1300

Hello

I discovered AVRDUDE via CrossPack for Mac OS X and have been using it
almost entirely successfully with a "USB Pocket Programmer" from
SparkFun.com, for some time now. I'd like to offer my personal and sincere
thanks to all the folks who made AVRDUDE available for us all, especially
for Mac users, as is the case with me -- since I had to give up on 20+ years
of Windows after the 'Vista debacle'. :p  So many thanks indeed! :D

I do experience a non-critical problem when writing EEPROM data using the
'usbtiny' clone programmer I mentioned above. But this email is not about
that. (Some kind of higher-level programmer/usb time-out issue I think.)
Anyway ...

Due to that problem, I decided to get myself a "genuine" programmer from
Atmel, thinking that would make all the difference. So I purchased an
AVRISPmkII. Unfortunately, this programmer does not work at all with AVRDUDE
under my Mac OS X, despite working fine under Windows 7. It is this latter
issue I am most hoping to get some help with, at the moment.

So far, I have upgraded to the AVRISPmkII firmware to the latest version
using AVR Studio 4 on a PC. But it made no difference at all.

OK, so here's what is happening:

$ avrdude -p m2561 -P usb -c avrisp2  -B 1 -U eeprom:r:test.bin:r

avrdude: *stk500v2_command(): command failed*
avrdude: *stk500v2_command(): unknown status 0xc9*
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

This happens with -B 1 or -B 3, 20 or 100 -- it doesn't matter what bit rate
is used. (I've posted more detail using -v -v -v after  the my signature,
below.)

On the programmer, the LED blinks red rapidly when this error occurs. The
documentation says that this indicates the short circuit protection has
kicked in. I did have this same red blinking LED under Windows when I was
using a 47µF reset capacitor. But I changed that to a 10µF and it now works
under Windows. (AVR Studio told me that the programmer detected a
short-circuit on the reset line.)

So, please note that the exact same programmer, connected to the exact same
circuit, plugged into the exact same USB port, but accessed via AVR Studio
4, under Windows 7, in a VMWare Fusion virtual machine on my Mac, works
flawlessly. I have also double-checked this fact by returning to Windows for
one last test.

I tried changing a bunch of delay settings for the ATmega2561 chip I'm using
in avrdude.conf, (looking for a 'reset line' reference in particular, based
on the experience under Windows.) None of the changes I made any difference
in output what-so-ever -- and I've since restored the original conf file.
Plus, of course, at this stage I'm really just shooting in the dark.

I'd like to help find the cause of this problem and develop a fix. If I were
to try and find out what is causing this problem, I guess I could use some
pointers as to where to begin looking. I can look up the programming
protocol via Atmel, but might need a little help finding where exactly it
gets implemented in the source.  Actually, I'm yet to even check out the
AVRDUDE source, and I don't yet know what is required to make it buid on the
Mac, so I really am starting completely cold at this stage.

On the other hand, if anyone on this list happens to read this and have a
good idea what else I could try, then I'd be most appreciative. Many thanks
in advance.

Kind regards,

Bryan.

P.S: The project I'm working on is open source, for anyone ho may be
interested. It can be found here <http://code.google.com/p/gruvin9x/>.

P.P.S: Here's the full debug output version, should it be of further help.
(Didn't seem so to me.)

$ avrdude -p m2561 -P usb -c avrisp2  -B 1 -U eeprom:r:test.bin:r -v -v -v

avrdude: Version 5.8cvs, compiled on Jan 15 2010 at 17:27:01
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is
"/usr/local/CrossPack-AVR-20100115/etc/avrdude.conf"
         User configuration file is "/Users/bryan/.avrduderc"
         User configuration file does not exist or is not a regular file,
skipping

         Using Port                    : usb
         Using Programmer              : avrisp2
         Setting bit clk period        : 1.0
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200079981
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
Using p = 1.00 us for SCK (param = 3)
avrdude: Skipping paramter write; parameter value already set.
         AVR Part                      : ATMEGA2561
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           eeprom        65    10     8    0 no       4096    8      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           flash         65    10   256    0 yes    262144  256   1024
4500  4500 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           lfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           hfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           efuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           lock           0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           calibration    0     0     0    0 no          1    0      0
0     0 0x00 0x00
                                  Block Poll
Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW
MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
           signature      0     0     0    0 no          3    0      0
0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
         Hardware Version: 1
         Firmware Version Master : 1.12
         Vtarget         : 5.0 V
         SCK period      : 1.00 us

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


reply via email to

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