Pages: [1]   Go Down
Author Topic: 328 fuses are not the same as 168 !!  (Read 1578 times)
0 Members and 1 Guest are viewing this topic.
Montréal, QC
Offline Offline
Newbie
*
Karma: 0
Posts: 26
OBDuino developper
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

* 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.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 *)
Logged


Montréal, QC
Offline Offline
Newbie
*
Karma: 0
Posts: 26
OBDuino developper
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 *)
« Last Edit: January 30, 2009, 10:21:07 am by jluciani » Logged


Hurley, NY
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: