Datasheet

339
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
27.4 Boot Loader Lock Bits
If no Boot Loader capability is needed, the entire Flash is available for application code. The Boot Loader has
two separate sets of Boot Lock bits which can be set independently. This gives the user a unique flexibility to
select different levels of protection.
The user can select:
To protect the entire Flash from a software update by the MCU
To protect only the Boot Loader Flash section from a software update by the MCU
To protect only the Application Flash section from a software update by the MCU
Allow software update in the entire Flash
See the following two tables for further details. The Boot Lock bits can be set by software and in Serial or in
Parallel Programming mode. They can only be cleared by a Chip Erase command only. The general Write Lock
(Lock Bit mode 2) does not control the programming of the Flash memory by SPM instruction. Similarly, the
general Read/Write Lock (Lock Bit mode 1) does not control reading nor writing by (E)LPM/SPM, if it is
attempted.
Note: 1. “1” means unprogrammed, “0” means programmed
Note: 1. “1” means unprogrammed, “0” means programmed.
Table 27-2. Boot Lock Bit0 Protection Modes (Application Section)
(1)
BLB0 Mode BLB02 BLB01 Protection
1 1 1 No restrictions for SPM or (E)LPM accessing the Application section
2 1 0 SPM is not allowed to write to the Application section
3 0 0
SPM is not allowed to write to the Application section, and (E)LPM executing from
the Boot Loader section is not allowed to read from the Application section. If
Interrupt Vectors are placed in the Boot Loader section, interrupts are disabled while
executing from the Application section.
4 0 1
(E)LPM executing from the Boot Loader section is not allowed to read from the
Application section. If Interrupt Vectors are placed in the Boot Loader section,
interrupts are disabled while executing from the Application section.
Table 27-3. Boot Lock Bit1 Protection Modes (Boot Loader Section)
(1)
BLB1 Mode BLB12 BLB11 Protection
1 1 1 No restrictions for SPM or (E)LPM accessing the 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 (E)LPM executing from
the Application section is not allowed to read from the Boot Loader section. If
Interrupt Vectors are placed in the Application section, interrupts are disabled while
executing from the Boot Loader section.
4 0 1
(E)LPM executing from the Application section is not allowed to read from the Boot
Loader section. If Interrupt Vectors are placed in the Application section, interrupts
are disabled while executing from the Boot Loader section.