Go Down

Topic: 328 fuses are not the same as 168 !! (Read 1 time) previous topic - next topic

Magister

* to all people running a 328 *

I had strange problem with my sketch not running properly on a 168 because it was big (more than 15K, burned with a // programmer).

It seems the problem comes from the BLB12 and BLB11 bit preventing me from executing code in the (previously used) bootloader section, fine.

While reading the spec, I saw that for the 328P, Atmel moved the BOD from the high fuses to the extended fuses, and also moved the boot size from the extended to the high.

The file boards.txt will need to be changed when you will add a board with a 328P!! Make the high fuses 0xd8 and the extended to 0x04 I guess.

I have a 328P, I will have to test it.

jluciani

My 328/168 bootloader notes are in the Application Hints at
http://tinyurl.com/5rfmrz

The fuse changes and boot size are in the Makefile. IIRC the boards.txt file
is either changed in arduino-0012 or there was a patch.

(* jcl *)
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

Magister

The patch of boards.txt for 328P list this fuses:

+diecimila_328.bootloader.low_fuses=0xff
+diecimila_328.bootloader.high_fuses=0xdd
+diecimila_328.bootloader.extended_fuses=0x00

which are wrong

jluciani

#3
Jan 30, 2009, 03:33 pm Last Edit: Jan 30, 2009, 04:21 pm by jluciani Reason: 1
Thanks. Next time I play with the 328 I will take a closer look.

I pieced together my summary from the ladyada forums, spiffie.org and the
gnu installation instructions. I did download the bootloader and I have run a couple
of sketches on the 328. The proper amount of flash memory is displayed. I
have not played with it much since.

(* jcl *)
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks

bigfun

So what fuse state should the 328 be left in after the bootloader has been uploaded?  Feel free to reply in terms of acceptable fuse setting command as it would be entered into AVRdude.

Also, what might a good fuse unlocking command (issued prior to a bootloader upload) be?  Again, feel free to give your answer as you would make it to AVRdude. I don't need an explanation of what the bits are and what they do and the history of how they have changed from Atmel processor to Atmel processor through the years, although I'm sure that is a fascinating subject.

I'm asking this because the bootloader I keep writing in AVRdude keeps getting overwritten by the Arduino IDE - and perhaps this is an IDE problem and not a fuse problem.

Go Up