[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several q
Re: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions
Sun, 05 Jun 2005 19:21:25 +0200
On 5 Jun 2005 at 11:04, Torsten Mohr wrote:
> 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.
"True" is 0, when talking about the fuse bits. i.e. true when programmed, which
> 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?
Yes that is 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.)
All optimisation levels should work with correctly written C. Although O3 is
the best (i.e smallest or fastest) on the AVR. Look at the .lst files to see
what output is
A J Erasmus
- [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions, Torsten Mohr, 2005/06/05
- Re: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions, E. Weddington, 2005/06/05
- Re: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions, Joerg Wunsch, 2005/06/05
- Re: [avr-gcc-list] ATMega128, fuse bits, program optimisation, several questions,
Anton Erasmus <=