26.4.3.1 Region Lock Bits

The main PFM array is split into 16 equally sized regions. The region size is dependent on the Flash memory size, and is given in the following table. Each region has a dedicated lock bit preventing writing and erasing pages in the region. After production, all regions will be unlocked.

Table 26-3. Region Size
Memory Size [KB]Region Size [KB]
1288
644

To temporarily lock or unlock a region, the Lock Region (LR) and Unlock Region (UR) commands are provided. Writing one of these commands will temporarily lock or unlock the region containing the address loaded in the ADDR register. ADDR can be written by software, or the automatically loaded value from a write operation can be used. The new setting will remain in effect until the next Reset, or until it is changed again using the Lock and Unlock commands. The current status of the lock can be determined by reading the LOCK register.

To change the default lock or unlock setting for a region, the WLOCKREGION command must be used. This command will take effect after the next Reset. Therefore, a device reboot is required for changes in the lock or unlock setting to take effect.

Note: The boot loader section is write protected by the BOOTPROT fuse and by the lock bit(s) corresponding to its address space.