11.5.2 Control B

Name: CTRLB
Offset: 0x01
Reset: 0x30
Property: Configuration Change Protection

Bit 76543210 
 FLMAPLOCK FLMAP[1:0]EEWPAPPDATAWPBOOTRPAPPCODEWP 
Access R/WR/WR/WR/WR/WR/WR/W 
Reset 0110000 

Bit 7 – FLMAPLOCK Flash Mapping Lock

Setting this bit to ‘1’ prevents further updates of FLMAP[1:0]. Only a Reset can clear this bit.

Bits 5:4 – FLMAP[1:0] Flash Section Mapped into Data Space

Select which part (in blocks of 32 KB) of the Flash will be mapped as part of the CPU data space and accessible through LD/ST instructions. Changing this bitfield value doesn't affect devices with 32 KB or less Flash size, as the entire Flash is mapped to the CPU data space.

Value(*)NameMapped Flash Section (16 KB)
0x0SECTION00 - 16
0x1SECTION10 - 16
0x2SECTION20 - 16
0x3SECTION30 - 16
Note: For the AVR® EB Family, the entire Flash is mapped into the data space, whatever value is set for the FLMAP bitfield (Flash size ≤ 32 KB).

Bit 3 – EEWP EEPROM Write Protection

Writing a ‘1’ to this bit protects the EEPROM from further writes.

This bit can only be written to ‘1’. Only Reset clears it to ‘0’.

Bit 2 – APPDATAWP Application Data Section Write Protection

Writing a ‘1’ to this bit protects the application data section from further writes.

This bit can only be written to ‘1’. Only Reset clears it to ‘0’.

Bit 1 – BOOTRP Boot Section Read Protection

Writing a ‘1’ to this bit protects the BOOT section from a read and instruction fetch. If issuing a read from the application section, it will return ‘0’. An instruction fetch from the BOOT section returns an NOP instruction.

This bit can only be written to ‘1’ from the BOOT section. Only Reset clears it to ‘0’. The bit will only take effect when the BOOT section is left the first time after the bit is written.

The BOOTROW will also be locked for access from the application section.

Bit 0 – APPCODEWP Application Code Section Write Protection

Writing a ‘1’ to this bit protects the application code section from further writes.

This bit can only be written to ‘1’. Only Reset clears it to ‘0’.