Author Topic: AVRISP MK II - works with avrdude, but not with avr studio 4  (Read 2907 times)

0 Members and 1 Guest are viewing this topic.

Offline jkernsTopic starter

  • Robot Overlord
  • ****
  • Posts: 237
  • Helpful? 12
AVRISP MK II - works with avrdude, but not with avr studio 4
« on: August 28, 2012, 11:53:09 AM »
OK, I know, just use AVRDUDE. Thanks. But...

I wanted to change fuses to change the clock frequency - load up AVR studio, tell it I have the AVRISP MK II, ATMEGA32 chip, try to connect and I get "Connect failed, select AVR programmer".

The light is green, I get a green flash when I plug in the USB...

Now, I try avrdude to see what happens.

That seems to work. I get lights flashing and the following (as an example)

Code: [Select]
M:\>avrdude -p M32 -c avrispmkii -P usb -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"


         Using Port                    : usb
         Using Programmer              : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200067118
         AVR Part                      : ATMEGA32
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    10    64    0 no       1024    4      0  9000  90
00 0xff 0xff
           flash         33     6    64    0 yes     32768  128    256  4500  45
00 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00
           calibration    0     0     0    0 no          4    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.10
         Vtarget         : 5.0 V
         SCK period      : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9502
avrdude: safemode: lfuse reads as E1
avrdude: safemode: hfuse reads as 99

avrdude: safemode: lfuse reads as E1
avrdude: safemode: hfuse reads as 99
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

So, it seems to me that the device is hooked up OK and capable of talking to yea olde chip.

Now, I could just use avrdude to change the fuses, but it makes me nervous to work with the raw hex - it's been 20 years since I used to do that stuff... And it's bugging me that I can't get the AVR studio to work.

Any guess about what I'm doing wrong?

Oh, and I've tried two different AVR ISP mk II programmers.
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: AVRISP MK II - works with avrdude, but not with avr studio 4
« Reply #1 on: August 28, 2012, 03:54:06 PM »
Have You tried AVR Studio 5 or Atmel Studio 6?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: AVRISP MK II - works with avrdude, but not with avr studio 4
« Reply #2 on: August 28, 2012, 07:21:58 PM »
All AVRDUDE is telling you is that your computer can talk to the AVRISP. You've told it on the cmd line that its an ATMega32 chip, and it has found the programmer.
Don't think it proves that the programmer is talking to the chip.

Looks like you're using AVRDUDE on a PC - in which case it will have been compiled with its own libusb.dll support. It could be that AVRStudio can't find the libusb drivers or you have installed over the top of the ones that AVR Studio installs.

See http://mightyohm.com/blog/2010/09/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64/
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline jkernsTopic starter

  • Robot Overlord
  • ****
  • Posts: 237
  • Helpful? 12
Re: AVRISP MK II - works with avrdude, but not with avr studio 4
« Reply #3 on: August 30, 2012, 07:34:38 AM »
Thanks.

I tried installing AVR studio 6, uninstalling the driver for the AVRISP mkII, letting it re-install - no luck.  I assume that it must be that AVR is using a different driver that is not actually connected to the programmer.

I guess I'll just work with winavr / avrdude for now. That has worked for me before for programming this chip. I just need to track down the bit by bit data on the fuses...

Thanks for the suggestions. 
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

 


Get Your Ad Here