Skip to content

Commit

Permalink
Extend prodsig and sernum to virtually all classic parts
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Jul 14, 2024
1 parent 7fbd963 commit 96e92ba
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 33 deletions.
10 changes: 8 additions & 2 deletions src/avrdude.1
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,17 @@ Low fuse byte
.It lock
Lock byte
.It prodsig
Signature, calibration byte and serial number in a small read-only memory,
Signature, calibration byte(s) and serial number in a small read-only memory,
which is only documented to be available for ATmega324PB, ATmega328PB,
ATtiny102 and ATtiny104; programmers may or may not be able to read this memory
ATtiny102 and ATtiny104;
.Nm
generally tries to make this memory available, also for parts where it is
not documented, but not all programmers may be able to read this memory
.It sigrow
Memory alias for prodsig
.It sernum
The serial number part of prodsig; owing to scarce documentation this may not
actually turn out to be a serial number or be readable by some programmers
.It usersig
Three extra flash pages for firmware settings; this memory is not erased
during a chip erase. Only some classic parts,
Expand Down
69 changes: 39 additions & 30 deletions src/avrdude.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -3784,10 +3784,25 @@ part parent ".classic-nocal" # .classic
chip_erase = "1010.1100--1000.0000--0000.0000--0000.0000";
pgm_enable = "1010.1100--0101.0011--0000.0000--0000.0000";

memory "prodsig"
size = 24;
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;

memory "sigrow"
alias "prodsig";
;

memory "calibration"
size = 1;
read = "0011.1000--0000.0000--0000.0000--oooo.oooo";
;

memory "sernum"
size = 10;
offset = 0xe; # Sub-region of prodsig
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;
;

#------------------------------------------------------------
Expand Down Expand Up @@ -3859,6 +3874,10 @@ part parent ".classic" # t11
write = NULL;
;

memory "prodsig"
read = NULL;
;

memory "signature"
read = NULL;
;
Expand All @@ -3867,6 +3886,10 @@ part parent ".classic" # t11
read = NULL;
;

memory "sernum"
read = NULL;
;

memory "io"
size = 64;
offset = 0x0;
Expand Down Expand Up @@ -6000,6 +6023,10 @@ part parent ".classic" # t28
write = NULL;
;

memory "prodsig"
read = NULL;
;

memory "signature"
read = NULL;
;
Expand All @@ -6008,6 +6035,10 @@ part parent ".classic" # t28
read = NULL;
;

memory "sernum"
read = NULL;
;

memory "io"
size = 64;
;
Expand Down Expand Up @@ -10457,21 +10488,6 @@ part parent "m324p" # m324pb
bitmask = 0x0f;
write = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
;

memory "prodsig"
size = 24;
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;

memory "sigrow"
alias "prodsig";
;

memory "sernum"
size = 10;
offset = 0xe; # Sub-region of prodsig
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;
;

#------------------------------------------------------------
Expand Down Expand Up @@ -12581,21 +12597,6 @@ part parent "m328" # m328pb
bitmask = 0x0f;
write = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
;

memory "prodsig"
size = 24;
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;

memory "sigrow"
alias "prodsig";
;

memory "sernum"
size = 10;
offset = 0xe; # Sub-region of prodsig
read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a4 a3 a2 a1 o o o o o o o o";
;
;

#------------------------------------------------------------
Expand Down Expand Up @@ -14576,13 +14577,21 @@ part parent ".classic" # m406
bitmask = 0x3f;
;

memory "prodsig"
read = NULL;
;

memory "signature"
read = NULL;
;

memory "calibration"
read = NULL;
;

memory "sernum"
read = NULL;
;
;

#------------------------------------------------------------
Expand Down
7 changes: 6 additions & 1 deletion src/doc/avrdude.texi
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,14 @@ Low fuse byte
@item prodsig
Signature, calibration byte and serial number in a small read-only memory,
which is only documented to be available for ATmega324PB, ATmega328PB,
ATtiny102 and ATtiny104; programmers may or may not be able to read this memory
ATtiny102 and ATtiny104; AVRDUDE generally tries to make this memory
available, also for parts where it is not documented, but not all
programmers may be able to read this memory
@item sigrow
Memory alias for prodsig
@item sernum
The serial number part of prodsig; owing to scarce documentation this may not
actually turn out to be a serial number or be readable by some programmers
@item usersig
Three extra flash pages for firmware settings; this memory is not erased
during a chip erase. Only some classic parts,
Expand Down

0 comments on commit 96e92ba

Please sign in to comment.