ATmega64A
Do_spm:
; check for previous SPM complete
Wait_spm:
lds
temp1, SPMCSR
sbrc temp1, SPMEN
rjmp Wait_spm
; input: spmcrval determines SPM action
; disable interrupts if enabled, store status
in
temp2, SREG
cli
; check that no EEPROM write access is present
Wait_ee:
sbic EECR, EEWE
rjmp Wait_ee
; SPM timed sequence
sts
spm
SPMCSR, spmcrval
; restore SREG (to enable interrupts if originally enabled)
out
ret
SREG, temp2
26.8.13 ATmega64A Boot Loader Parameters
In Table 26-6 through Table 26-8, the parameters used in the description of the Self-program-
ming are given.
Table 26-6. Boot Size Configuration(1)
Boot Reset
Appli-
cation
Flash
Boot
Loader
Flash
End
Applic-
ation
Address
(Start Boot
Loader
Boot
BOOTSZ1 BOOTSZ0 Size
Pages
Section
Section
Section
Section)
512
words
0x0000 -
0x7DFF
0x7E00 -
0x7FFF
1
1
0
0
1
0
1
0
4
0x7DFF
0x7BFF
0x77FF
0x6FFF
0x7E00
0x7C00
0x7800
0x7000
1024
words
0x0000 -
0x7BFF
0x7C00 -
0x7FFF
8
2048
words
0x0000 -
0x77FF
0x7800 -
0x7FFF
16
32
4096
words
0x0000 -
0x6FFF
0x7000 -
0x7FFF
Note:
1. The different BOOTSZ Fuse configurations are shown in Figure 26-2
Table 26-7. Read-While-Write Limit()
Section
Pages
224
Address
Read-While-Write (RWW)
No Read-While-Write (NRWW)
0x0000 - 0x6FFF
0x7000 - 0x7FFF
32
Note:
1. For details about these two section, see “NRWW – No Read-While-Write Section” on page
282 and “RWW – Read-While-Write Section” on page 282
292
8160C–AVR–07/09