Datasheet
ATmega32A
2018 Microchip Technology Inc. Data Sheet Complete DS40002072A-page 253
; 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)
call Do_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
26.8.13 Boot Loader Parameters
In Table 26-6 through Table 26-8, the parameters used in the description of the self programming are given.
Note: 1. The different BOOTSZ Fuse configurations are shown in Figure 26-2
Table 26-6. Boot Size Configuration
(1)
BOOTSZ1 BOOTSZ0 Boot Size Pages
Application
Flash
Section
Boot Loader
Flash
Section
End
Application
section
Boot Reset Address
(start Boot Loader
Section)
1 1 256 words 4 $0000 - $3EFF $3F00 - $3FFF $3EFF $3F00
1 0 512 words 8 $0000 - $3DFF $3E00 - $3FFF $3DFF $3E00
01
1024
words
16 $0000 - $3BFF $3C00 - $3FFF $3BFF $3C00
00
2048
words
32 $0000 - $37FF $3800 - $3FFF $37FF $3800
Table 26-7. Read-While-Write Limit
(1)
Section Pages Address
Read-While-Write section (RWW) 224 $0000 - $37FF
No Read-While-Write section (NRWW) 32 $3800 - $3FFF