109
ATmega161(L)
1228B–09/01
• Protect the entire Flash from a software update by the Boot Loader program
• Only protect the Boot Loader section from a software update by the Boot Loader
program
• Only protect the Application Code section from a software update by the Boot Loader
program
• Allow software update in the entire Flash
See Table 37 and Table 38 for further details. The Boot Lock bits can be set in software
and in Serial or Parallel Programming mode, but they can only be cleared by a Chip
Erase command.
Note:
1. “1” = unprogrammed, “0” = programmed
Note:
1. “1” means unprogrammed, “0” means programmed
Entering the Boot Loader
Program
Entering the Boot Loader takes place by a jump or call from the application program.
This may be initiated by some trigger such as a command received via UART or SPI
interface. Alternatively, the Boot Reset Fuse (BOOTRST) can be programmed so that
the reset vector is pointing to address $1E00 after a reset. In this case, the Boot Loader
is started after the reset. After the application code is loaded, the program can start exe-
cuting the application code. Note that the fuses cannot be changed by the MCU itself.
This means that once the Boot Reset Fuse is programmed, the Reset Vector will always
point to the Boot Loader Reset and the fuse can only be changed through the serial or
parallel programming interface. The BOOTRST fuse can also be locked by program-
ming LB1. When LB1 is programmed it is not possible to change the BOOTRST fuse
unless a Chip Erase command is performed first.
Table 37.
Boot Lock Bit0 Protection Modes (Application Code Section)
BLB0 Mode
BLB02
BLB01
Protection
1
1
1
No restrictions for SPM, LPM accessing Application Code
section
2
1
0
SPM is not allowed to write to the Application Code
section.
3
0
0
SPM is not allowed to write to the Application Code
section, and LPM executing from the Boot Loader section
is not allowed to read from the Application Code section.
4
0
1
LPM executing from the Boot Loader section is not
allowed to read from the Application Code section.
Table 38.
Boot Lock Bit1 Protection Modes (Boot Loader Section)
BLB1 Mode
BLB12
BLB11
Protection
1
1
1
No restrictions for SPM, LPM accessing Boot Loader
section
2
1
0
SPM is not allowed to write to the Boot Loader section.
3
0
0
SPM is not allowed to write to the Boot Loader section,
and LPM executing from the Application Code section is
not allowed to read from the Boot Loader section.
4
0
1
LPM executing from the Application Code section is not
allowed to read from the Boot Loader section.