
163
ATmega8515(L)
2512A–AVR–04/02
Note that theusersoftware can neverread anycodethat islocated insidetheRWW
section during a Boot Loadersoftwareoperation. The syntax “Read-While-Write sec-
tion” refers to which section that isbeing programmed(erased orwritten), not which
section that actually isbeing readduring a Boot Loadersoftwareupdate.
RWW – Read-While-Write
Section
If a Boot Loadersoftwareupdate isprogramming a page insidetheRWW section, it is
possibletoreadcode from the Flash, but only codethat islocated in the NRWW sec-
tion. Duringanon-going programming, the softwaremustensurethat theRWW section
never isbeing read. If theusersoftwareis trying to readcodethat islocated insidethe
RWW section (i.e.,bya call/jmp/lpmor an interrupt)during programming, the software
mightend up in an unknown state. To avoid this, theinterruptsshould eitherbe disabled
or moved to the Boot Loadersection. The Boot Loadersection is always located in the
NRWW section. TheRWW Section Busy bit (RWWSB) in the StoreProgram Memory
Control Register(SPMCR)will be read aslogical one aslong as theRWW section is
blockedforreading. After a programming iscompleted, theRWWSB must be clearedby
software before reading code located in theRWW section. See “StoreProgram Memory
Control Register – SPMCR” on page 166. fordetails on how to clear RWWSB.
NRWW – No Read-While-Write
Section
The code located in the NRWW section can be readwhen the Boot Loadersoftwareis
updating a page in theRWW section. When the Boot Loadercodeupdates the NRWW
section, the CPU ishaltedduring the entire page eraseorpage write operation.
Figure 71. Read-While-Write vs. NoRead-While-Write
Table 73. Read-While-Write Features
Which Section does the Z-
pointer Address during the
Programming?
Which Section Can be
Read during
Programming?
Is the CPU
Halted?
Read-While-
Write
Supported?
RWW section NRWW section No Yes
NRWW section None YesNo
Read-While-Write
(RWW) Section
No Read-While-Write
(NRWW) Section
Z-pointer
Addresses RWW
Section
Z-pointer
Addresses NRWW
Section
CPU is Halted
during the Operation
Code Located in
NRWW Section
Can be Read during
the Operation
Komentáře k této Příručce