gusarov / optiboot

Automatically exported from code.google.com/p/optiboot
0 stars 0 forks source link

Fuse bits? Lock bits? Are they correct if you use the makefile manually? #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
on my atmega328p:

I have L/H/E as C6, DC, FD (I want brownout under 3.3v)

Lock bits are EF

I don't think that is what the makefile does.

Original issue reported on code.google.com by tz2026 on 3 May 2010 at 7:57

GoogleCodeExporter commented 8 years ago
Makefile is for Arduino boards - it has settings for most common Arduino 
boards. Fuse settings cover the 
oscillator circuitry as well as the microprocessor - for custom boards you will 
need a custom Makefile, as you 
have a custom circuit.

Extended fuse: FD is equivalent to 05 (only bottom 3 bits are significant, and 
Avrdude complains if the top 
bits are nonzero)
High fuse: You have the incorrect BOOTSZ settings. Remember Optiboot is small.
Low fuse: Your oscillator settings are different. This may or may not be 
correct depending on your circuit.

Original comment by cathed...@gmail.com on 6 May 2010 at 1:26

GoogleCodeExporter commented 8 years ago
I DON'T HAVE A CUSTOM CIRCUIT, I HAVE A PRO MINI WITH A 328P - standard, 
supported.

The Pro Mini is in no way a custom board, either with the 168 or 328, at 8, or 
16
Mhz.  the 20Mhz would be custom but that is produced by the script.

Original comment by tz2026 on 6 May 2010 at 1:46

GoogleCodeExporter commented 8 years ago
I won't update "WontFix", but you should note it won't work to flash NORMAL, 
PLAIN
ARDUINOS correctly.

Original comment by tz2026 on 6 May 2010 at 1:47

GoogleCodeExporter commented 8 years ago
Sorry for misunderstanding - original issue did not specify the target board, 
only "my atmega328p". Ease up on 
the caps please.

Please confirm exact board - which voltage variant, which CPU speed, and I'll 
investigate.

Original comment by cathed...@gmail.com on 6 May 2010 at 2:03

GoogleCodeExporter commented 8 years ago
I have to admit I'm thoroughly confused at this point - apparently some 
different
types and models (I searched for an answer and got several which I have thrown
together and con-fused).  I was trying to use AVR-Studio and it has settings 
which
just confuses me more, at least for the 328p.  It even says the bootloader is at
0x3x00 instead of 0x7x00 for those fuse bits (4.18 SP3).

I will try to sort it all out and get back with a definitive answer.  I think I
merely exposed a longstanding question - what should the fuse bits be.

Original comment by tz2026 on 6 May 2010 at 3:54

GoogleCodeExporter commented 8 years ago
To sort out that address confusion:
Atmel refer to addresses as words, but GCC has byte level access to the flash, 
so it refers to addresses as 
bytes. So GCC addresses are twice the equivalent Atmel address. Its not a bug - 
just a different perspective.

All the fuse and lock bits should be correct for the appropriate boards. They 
have been based on the latest 
Arduino distribution, but with changes to accommodate the smaller bootloader. 
If they are incorrect, I would 
like to know exactly which board is incorrect, what you propose it should be, 
and why.

As we don't have a clear defect yet, I'm relabelling this as a low priority 
'Other' issue until we have more data. 
Happy to reassess when more data comes in.

Original comment by cathed...@gmail.com on 17 May 2010 at 7:19

GoogleCodeExporter commented 8 years ago
The fuse settings atmega168 is wrong, the bootsize is set to 512 words instead 
of the 256 words. Extended fuse should be 0xFC instead of 0x02

Original comment by superkoe...@gmail.com on 18 Sep 2010 at 10:38

GoogleCodeExporter commented 8 years ago
Agree with comment #7. Changing EFUSE to 0xFC allows me to install and use 
optiboot with avrdude on my freeduino

Original comment by chris.ku...@gmail.com on 26 Jan 2011 at 6:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Why do the "maximum_size" and "high_fuses" settings vary amongst ATmega328 
boards?  Isn't Optiboot always 512 bytes for this chip, corresponding to a 
HFUSE of 0xdc?

From the relevant sections of the Makefile and boards.txt:

at 16MHz
========
atmega328_isp: HFUSE = DE
--
atmega328o.bootloader.high_fuses=0xde
atmega328o.upload.maximum_size=32256

at 8MHz
=======
atmega328_pro8_isp: HFUSE = DE
--
pro328o.bootloader.high_fuses=0xdc
pro328o.upload.maximum_size=30720
--
lilypad328o.bootloader.high_fuses=0xdc
lilypad328o.upload.maximum_size=31744

Original comment by tim...@gmail.com on 7 Mar 2011 at 4:36

GoogleCodeExporter commented 8 years ago
Whoops, bootloader memory is expressed in 16-bit words.  So 512 bytes = 256 
words, and the Makefile fuse settings are all correct.  But I still have some 
doubts about the Optiboot boards.txt settings for the pro328 and lilypad328 
boards.

Original comment by tim...@gmail.com on 9 Mar 2011 at 1:58

GoogleCodeExporter commented 8 years ago

Original comment by wes...@gmail.com on 29 Oct 2011 at 5:27