Cannot read fuses on ATMEGA8515 using STK500

I cannot read fuses on ATMEGA8515 using STK500 (I have only tested this so far) in Linux (Kubuntu 8.04) using avrdude 5.5. I have tried variations of this command such as using sudo, but nothing works.

$ avrdude -c stk500v2 -p m8515 -P /dev/ttyUSB0 -U hfuse:r:high.txt -U lfuse:r:low.txt

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x1e9306 avrdude: reading hfuse memory:

Reading | ################################################## | 100% 0.02s

avrdude: writing output file "high.txt" avrdude: error opening high.txt: No such file or directory avrdude: output file high.txt auto detected as invalid format avrdude: invalid output file format: -1 avrdude: write to file 'high.txt' failed avrdude: safemode: Fuses OK

avrdude done. Thank you.

According to

one should get something similar to: $ avrdude -c stk500 -p m8 -P /dev/ttyS0 -U hfuse:r:high.txt -U lfuse:r:low.txt

avrdude: Device signature = 0x003d04

avrdude: reading hfuse memory: Reading | ################################################## | 100% 0.01s avrdude: writing output file "high.txt"

avrdude: reading lfuse memory: Reading | ################################################## | 100% 0.00s avrdude: writing output file "low.txt"

avrdude done. Thank you.

Does any one here know what could be wrong with my system?

I can program the chip with my own programs.

Reply to
M.O.B. i L.
Loading thread data ...

Quit being puffed up, install Windows, install AvrStudio and enjoy. If you are really high and mighty, then don't ask stupid questions.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

From an old makefile (mega128) here is the commandline I was using to read out the fuses:

SERIAL =3D /dev/ttyUSB0

avrdude -p m128 -b 57600 -c jtagmki -P ${SERIAL} -U hfuse:r:h- fuse.txt:i -U lfuse:r:l-fuse.txt:i -U efuse:r:e-fuse.txt:i

Perhaps you want to look at Rowley's Linux edition for Atmel micros since this would take out the guesswork and it's much easier to work with a real integrated debugger (IMHO). rowley.co.uk - a personal license will cost you $150.

Also, winavr works perfectly happily inside VirtualBox under Linux, as does the JTAG-ICEmkii and the STK500.

Reply to
zwsdotcom

Maybe you do not have rights to write into the current directory.

Try

touch high.txt

to verify.

--
Tauno Voipio
tauno voipio (at) iki fi
 Click to see the full signature
Reply to
Tauno Voipio

M.O.B. i L. schrieb:

^^^^^^^^^^^^

I've had many problems with the STK500 (and other programming devices) and USB-Serial bridges. A pcmcia serial card with a real UART solved all problems.

--
Mit freundlichen Grüßen

Dipl.-Ing. Frank-Christian Krügel
Reply to
Frank-Christian Krügel

While I agree USB-serial bridges can be problematic, my experience with the Atmel tools (all of them, including Olimex's clones with FTDI USB interfaces) has been that they work very well over a USB-serial converter.

Reply to
zwsdotcom

Thanks, this worked i Kubuntu 8.04: $ avrdude -c stk500v2 -p m8515 -P /dev/ttyUSB0 -U hfuse:r:h-fuse.txt:i

-U lfuse:r:l-fuse.txt:i

In Asus EEE Linux I had to add switch -F.

My Asus EEE has only 1 GB RAM and might not work well with Virtual Box.

Reply to
M.O.B. i L.

...

Sigh... *Only* 1GB *RAM* ?

It should work well with half of this. BTDT.

But I returned to vi, make, gcc-cross, uisp/avrdude under Linux, as this is my basic OS. As I have to use Codewarrior from time to time, I am happy that it works in "wine".

A note on USB programmers: All that use the serial port as a ... serial port, will work fine. All that use bit-banging will not.

A cardbus LPT-card works well, a USP-LPT1 does not.

YMMV, Falk

--
An Enfield Diesel seems to do an even better job than a Harley at
converting fuel into noise without much unwanted speed!
Reply to
Falk Willberg

Correction to above:

For STK500: avrdude -c stk500v2 -p m8515 -P /dev/ttyUSB0 -U hfuse:r:h-fuse.txt:r -U lfuse:r:l-fuse.txt:r

For USB-ASP: sudo avrdude -c usbasp -p m88 -U hfuse:r:h-fuse.txt:r -U lfuse:r:l-fuse.txt:r -U efuse:r:e-fuse.txt:r

The lines above for each uC-programmer stores the fuse-values in files that needs to be interpreted: od -d h-fuse.txt | head -1 | sed -e 's/0000000 *//' | xargs -i perl -e '$str= unpack("B32", pack("N",{})); $str =~ s/.*([01]{4})([01]{4})$/$1 $2/; print "$str\n";' (see AVR Fuses HOWTO Guide) This prints the fuse-values in binary form.

Alternatively for STK500: avrdude -vv -c stk500v2 -p m8515 -P /dev/ttyUSB0 -F

Alternatively for USB-ASP: sudo avrdude -vv -c usbasp -p m88

Here you get the fuse-values in hexadecimal form after a long text.

Reply to
M.O.B. i L.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.