beautypg.com

Atmega169 boot loader parameters, Atmega169v/l – Rainbow Electronics Atmega169L User Manual

Page 263

background image

263

ATmega169V/L

2514A–AVR–08/02

ret

; re-enable the RWW section

ldi

spmcrval, (1<

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, EEWE

rjmp

Wait_ee

; SPM timed sequence

out

SPMCSR, spmcrval

spm

; restore SREG (to enable interrupts if originally enabled)

out

SREG, temp2

ret

ATmega169 Boot Loader
Parameters

In Table 113 through Table 115, the parameters used in the description of the Self-Pro-
gramming are given.

Note:

1. The different BOOTSZ Fuse configurations are shown in Figure 116

Note:

1. For details about these two section, see “NRWW – No Read-While-Write Section” on

page 252 and “RWW – Read-While-Write Section” on page 252.

Table 113. Boot Size Configuration

(1)

BOOT

SZ1

BOOTS

Z0

Boot

Size

Pages

Appli-
cation
Flash
Section

Boot
Loader
Flash
Section

End
Appli-
cation
Section

Boot Reset
Address (Start
Boot Loader
Section)

1

1

128

words

2

0x0000 -
0x1F7F

0x1F80 -
0x1FFF

0x1F7F

0x1F80

1

0

256

words

4

0x0000 -
0x1EFF

0x1F00 -
0x1FFF

0x1EFF

0x1F00

0

1

512

words

8

0x0000 -
0x1DFF

0x1E00 -
0x1FFF

0x1DFF

0x1E00

0

0

1024

words

16

0x0000 -
0x1BFF

0x1C00
-
0x1FFF

0x1BFF

0x1C00

Table 114. Read-While-Write Limit

(1)

Section

Pages

Address

Read-While-Write section (RWW)

112

0x0000 - 0x1BFF

No Read-While-Write section (NRWW)

16

0x1C00 - 0x1FFF