Datasheet
246
7734Q–AVR–02/12
AT90PWM81/161
; return to RWW section
; verify that RWW section is safe to read
Return:
in temp1, SPMCSR
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, 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, EEPE
rjmp Wait_ee
; SPM timed sequence
out SPMCSR, spmcrval
spm
; restore SREG (to enable interrupts if originally enabled)
out SREG, temp2
ret
20.7.14 Boot Loader Parameters
In Table 20-7 through Table 20-10 on page 247, the parameters used in the description of the
self programming are given.
For AT90PWM81.
Note: The different BOOTSZ Fuse configurations are shown in Figure 20-2 on page 236.
Table 20-7. Boot size configuration.
BOOTSZ1 BOOTSZ0
Boot
size Pages
Application
flash section
Boot loader
flash section
End
application
section
Boot reset
address
(start boot
loader
section)
11
128
words
4 0x000 - 0xF7F 0xF80 - 0xFFF 0xF7F 0xF80
10
256
words
8 0x000 - 0xEFF 0xF00 - 0xFFF 0xEFF 0xF00
01
512
words
16 0x000 - 0xDFF 0xE00 - 0xFFF 0xDFF 0xE00
00
1024
words
32 0x000 - 0xBFF 0xC00 - 0xFFF 0xBFF 0xC00