[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] ATMega128, fuse bits, program optimisation, several quest

From: Torsten Mohr
Subject: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions
Date: Sun, 5 Jun 2005 11:04:07 +0200
User-agent: KMail/1.8


the fuse bits of the ATMega128 were (when i bought it):

low: 0xe1
high: 0x99
ext.: 0xfd

I only programed the ext. fuse bits to 0xff.  Is that ok?

Regarding the interpretation of the fuse bits i'm a bit unsure,
is there a general rule about what is active / not-active?

One bit is called M103C, so i'd guess if it is TRUE (1) this
means "yes, active" so to say in compatibility mode.  But
looking through the documentation i think it has to be
0 to say "compatibility mode" enabled.

What about WDTON?  At the moment i have set it to 1.  I'd like
to switch it off in the test program, is this possible that way?

To switch off the internal watchdog, is it sufficient to do this
at startup:

WDTCR = 0x1f;
WDTCR = 0x07;  // also tried 0x00 and 0x17

To my understanding i also don't need to attach an external
crystal or change any clock options at startup as the part will
run from internal RC with 1 MHz.  Is that correct?

The last time i compiled a program for an AVR was with gcc-2.95.2.

When compiling a test program for it, what optimisation level
do i need to set?  I thought that at least -O2 is needed so that
some asm statements won't get "optimised away".
(I tried my test program with -Os, -O0 and -O2.)

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]