[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Uisp-dev] [RFC] New fuse options
From: |
Theodore A. Roth |
Subject: |
[Uisp-dev] [RFC] New fuse options |
Date: |
Thu, 30 May 2002 14:28:03 -0600 (MDT) |
Hi,
To read the fuses, you can currently do this:
address@hidden src]$ ./uisp -dprog=stk500 -dserial=/dev/stk500
-dpart=atmega128 --segment=fuse --download
Atmel AVR ATmega128 is found.
Downloading: fuse
S00700006675736545
S1080000E11900FFFFFF
S5030001FB
S9030000FC
Then, you could modify the srec out and write it back to the device. I
think this is sub-optimal since the user would then have to hand edit the
srec file and calculate the new checksum. Besides, why should you have to
muck with all the fuses and lock bits just to change one byte?
Alternatively, there's the terminal mode I've already demostrated in a
previous post.
The attached patch shows the new command line options I'm proposing to
implement. Once implemented, "--rd_fuses" will dump the state of all the
fuses and lock bits (plus calibration byte if available). From there,
changing the fuse bits would be done as such (for example, setting fuse
low to 0xe4):
$ ./uisp -dprog=stk500 -dserial=/dev/stk500 -dpart=atmega128 --rd_fuses
<some output yet to be determined>
$ ./uisp -dprog=stk500 -dserial=/dev/stk500 -dpart=atmega128 --wr_fuse_l=0xe4
How's that sound?
Ted Roth
Index: src/Main.C
===================================================================
RCS file: /cvsroot/uisp/uisp/src/Main.C,v
retrieving revision 1.2
diff -u -r1.2 Main.C
--- src/Main.C 27 May 2002 02:41:01 -0000 1.2
+++ src/Main.C 30 May 2002 20:19:21 -0000
@@ -75,9 +75,11 @@
" [-dserial=device] [-dpart=name|no]\n"
" [-dspeed=1200|2400|4800|9600|19200|38400|57600|115200]"
"\n"
-" [--upload] [--verify] [--erase] [--lock] [if=input_file]\n"
+" [--upload] [--verify] [--erase] [if=input_file]\n"
" [--download] [of=output_file]\n"
-" [--segment=flash|eeprom|fuse] [--terminal]\n\n"
+" [--segment=flash|eeprom|fuse] [--terminal]\n"
+" [--rd_fuses] [--wr_fuse_l=byte] [--wr_fuse_h=byte]\n"
+" [--wr_fuse_e=byte] [--wr_lock=byte]\n\n"
"Programming Methods:\n"
" -dprog=avr910 Standard Atmel Serial Programmer/Atmel Low Cost
Programmer\n"
" pavr http://avr.jpk.co.nz/pavr/pavr.html\n"
@@ -125,9 +127,15 @@
" --verify Verify \"input_file\" (processed after the --upload
opt.)\n"
" --download Download AVR memory to \"output_file\" or stdout.\n"
" --erase Erase device.\n"
-" --lock Write lock bits.\n"
" --segment Set active segment (auto-select for AVA Motorola
output)\n"
"\n"
+"Fuse/Lock Bit Operations:\n"
+" --rd_fuses Read all fuses and print values to stdout\n"
+" --wr_fuse_l Write fuse low byte\n"
+" --wr_fuse_h Write fuse high byte\n"
+" --wr_fuse_e Write fuse extended byte\n"
+" --wr_lock Write lock bits\n"
+"\n"
"Files:\n"
" if Input file for the --upload and --verify functions in\n"
" Motorola S-records (S1 or S2) or 16 bit Intel format\n"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Uisp-dev] [RFC] New fuse options,
Theodore A. Roth <=