English
Language : 

ATMEGA8_08 Datasheet, PDF (220/308 Pages) ATMEL Corporation – 8-bit with 8K Bytes In-System Programmable Flash
; return to RWW section
; verify that RWW section is safe to read
Return:
in temp1, SPMCR
sbrs temp1, RWWSB
; If RWWSB is set, the RWW section is not
ready yet
ret
; re-enable the RWW section
ldi spmcrval, (1<<RWWSRE) | (1<<SPMEN)
rcallDo_spm
rjmp Return
Do_spm:
; check for previous SPM complete
Wait_spm:
in temp1, SPMCR
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
out SPMCR, spmcrval
spm
; restore SREG (to enable interrupts if originally enabled)
out SREG, temp2
ret
ATmega8 Boot Loader In Table 82 through Table 84, the parameters used in the description of the self programming
Parameters
are given.
Table 82. Boot Size Configuration
BOOTSZ1
1
1
0
0
BOOTSZ0
1
0
1
0
Boot
Size
128
words
256
words
512
words
1024
words
Pages
4
8
16
32
Application
Flash
Section
0x000 -
0xF7F
0x000 -
0xEFF
0x000 -
0xDFF
0x000 -
0xBFF
Boot
Loader
Flash
Section
0xF80 -
0xFFF
0xF00 -
0xFFF
0xE00 -
0xFFF
0xC00 -
0xFFF
End
Application
Section
Boot Reset
Address
(Start Boot
Loader
Section)
0xF7F
0xF80
0xEFF
0xF00
0xDFF
0xE00
0xBFF
0xC00
220 ATmega8(L)
2486T–AVR–05/08