Pages: [1]   Go Down
Author Topic: [solved]ATmega168 fuse setting problem  (Read 1218 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm having some problems while burning a bootloader to some ATmega168. I'm using an mysmartusb mkII and OS X.

first I'm unlocking
Code:
avrdude -v -pm168 -P /dev/cu.SLAB_USBtoUART -cavr910 -U lock:w:0x3F:m
which seems to work. But then when trying to set the fuses
Code:
avrdude -pm168 -P /dev/cu.SLAB_USBtoUART -v -cavr910 -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m -e -Uefuse:w:0×00:m
I get:
Code:
avrdude: Version 5.10, compiled on Jul 11 2010 at 18:20:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/opt/local/etc/avrdude.conf"
         User configuration file is "/Users/cg/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.SLAB_USBtoUART
         Using Programmer              : avr910
         avr910_devcode (avrdude.conf) : 0x6
         AVR Part                      : ATMEGA168
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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     5     4    0 no        512    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     16384  128    128  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : avr910
         Description     : Atmel Low Cost Serial Programmer

Found programmer: Id = "AVR ISP"; type = S
    Software Version = 2.5; Hardware Version = 2.0
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize = 512 bytes.

Programmer supports the following devices:
    Device code: 0x01 = (unknown)
...

avrdude: avr910_devcode selected: 0x06
avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9406
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DD
avrdude: safemode: efuse reads as 1
avrdude: erasing chip
avrdude: reading input file "0xdd"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xdd:
avrdude: load data hfuse data from input file 0xdd:
avrdude: input file 0xdd contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0×00"
avrdude: invalid byte value (0×00) specified for immediate mode
avrdude: write to file '0×00' failed

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DD
avrdude: safemode: efuse reads as 1
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

I can then flash the bootloader without problems but only upload an arduino sketch once, since it seems to overwrite the bootloader (might be connected to the invalid extended fuse settings?)

I'd be grateful for any help.
thanks
« Last Edit: July 12, 2010, 05:33:32 pm by lorenzfx » Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

a) what is this: 0[glow]
« Last Edit: July 12, 2010, 05:26:31 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, I'm an idiot. With a real 0x00 this works perfectly. I don't know how I got that strange x in there. Thanks!
« Last Edit: July 12, 2010, 06:07:47 pm by lorenzfx » Logged

Pages: [1]   Go Up
Jump to: