uisp-dev
[Top][All Lists]
Advanced

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

[Uisp-dev] rd/wr fuse bits with stk500


From: Theodore A. Roth
Subject: [Uisp-dev] rd/wr fuse bits with stk500
Date: Wed, 29 May 2002 23:58:34 -0600 (MDT)

Hi,

The attached patch builds on the one I sent earlier today. I fixed up the 
WriteByte()/FlushWriteBuffer() the same as for ReadByte()/ReadMem(). In 
addition, this patch adds rd/wr functionality for fuse and lock bits using 
the stk500.

The following is a dump of my test run on a mega128 (using avarice for 
comparison):

  address@hidden src]$ avarice -r
  AVaRICE version 1.5.D001, Apr 12 2002 16:52:25

  JTAG config starting.
  LockBits -> 0xff

  Reading Fuse Bytes:
    Extended Fuse byte -> 0xfd
        High Fuse byte -> 0x19
         Low Fuse byte -> 0xe1
  JTAG config complete.
  address@hidden src]$ ./uisp -dprog=stk500 -dserial=/dev/stk500 
  -dpart=atmega128 --terminal
  Atmel AVR ATmega128 is found.
  Entering the AVR Terminal. ?-help, q-quit.
  avr> ss fuse
  avr> du 0x0
  fuse $00000: e1 19 00 ff fd ff ff ff 
  fuse $00008: ff ff ff ff ff ff ff ff 
  fuse $00010: ff ff ff ff ff ff ff ff 
  fuse $00018: ff ff ff ff ff ff ff ff 
  avr> wr 0x4 0xff
  avr> du 0x0
  fuse $00000: e1 19 00 ff ff ff ff ff 
  fuse $00008: ff ff ff ff ff ff ff ff 
  fuse $00010: ff ff ff ff ff ff ff ff 
  fuse $00018: ff ff ff ff ff ff ff ff 
  avr> wr 0x0 0xe4
  avr> du 0x0      
  fuse $00000: e4 19 00 ff ff ff ff ff 
  fuse $00008: ff ff ff ff ff ff ff ff 
  fuse $00010: ff ff ff ff ff ff ff ff 
  fuse $00018: ff ff ff ff ff ff ff ff 
  avr> wr 0x0 0xe1
  avr> q
  Ouch.

When I changed the Low fuse byte from 0xe1 to 0xe4, I most definitely saw
my test program's leds change frequency.

Can I commit this?

Once committed, I'd like to see if I can get some others to further test 
it. I think the lock bits stuff might some more eyes and devices other 
than the mega128 need checked.

I should also need to add a note to the doc dir explaining this.

Should I add new command line options for reading/setting the fuse bits 
instead of having to go into terminal mode?

Ted Roth

Attachment: uisp-stk500-wr-fuse-bits.diff
Description: Text document


reply via email to

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