[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Mega128 Fuse Bit setting and uisp
From: |
Dale Seaburg |
Subject: |
Re: [avr-gcc-list] Mega128 Fuse Bit setting and uisp |
Date: |
Fri, 10 May 2002 18:15:04 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 |
Thank you Pieter and Heinrich for your answers. I had glossed over the
uisp helps dealing with the terminal mode. Had no idea what it was used
for. Now I do! Very convenient.
I'm attaching a log of my session. My copy of uisp was the latest as of
late the week before this one (version: 20020420). I've been away from
home this week, so when I saw your responses this afternoon, I
immediately tried it. Worked great! My execution line was:
'uisp -dlpt=/dev/parport0 -dprog=stk200 --terminal > uisp.log 2>&1'
Also, note that on page 34 of the datasheet begins some examples of
various cksel and ckout settings. That's what I had seen, but did not
know how to apply them until now.
Now, for a question to the avr-gcc maintainers. Is there a progma
section (correct terminology?) that would allow the fuse bits to be set
in the C program being compiled? If there are methods for defining an
eeprom section, I would think there would be a method to define a fuse
section, too.
Thanks for your help, guys!
Dale.
Heinrich Vermeulen wrote:
> Yes, uisp can program the bits.
> When you use 'uisp -dprog=stk200 -v=3 --terminal' you go into the
> programming terminal mode.
> Type 'ss fuse' to go into the fuse section.
> Then type 'du 0' to see the fuse bits. The following will be displayed:
> 'Read fuse/cal/lock byte 0 = 0xE1 ---->low byte
> Read fuse/cal/lock byte 1 = 0x99 ---->high byte
> Read fuse/cal/lock byte 2 = 0xA0 ---->can't change it
> Read fuse/cal/lock byte 3 = 0xFF ---->can't change it
> Read fuse/cal/lock byte 4 = 0xFD' ---->extended fuse byte
> NOTE - see pg.279 of the datasheet of the M128 for more details on
the bit
> values and defaults.
>
> To change one of these, just type e.g. 'wr 0 12' to write the value
12(hex)
> to byte 0.
-------------------------------------------------
{uisp version: 20020420}
{log of terminal mode follows}
Atmel AVR ATmega128 is found.
Entering the AVR Terminal. ?-help, q-quit.
avr>ss fuse
avr>du 0
Out of memory range!
fuse $00000: e1 99 89 ff fd
avr>wr 0 ef
avr>q
Ouch.