Accessing the NVM

NVM lock bits, and all Flash memory sections are mapped to the data space as shown in Data Memory. The NVM can be accessed for read and programming via the locations mapped in the data space.

The NVM Controller recognizes a set of commands that can be used to instruct the controller what type of programming task to perform on the NVM. Commands to the NVM Controller are issued via the NVM Command Register. See NVMCMD - Non-Volatile Memory Command Register. After the selected command has been loaded, the operation is started by writing data to the NVM locations mapped to the data space.

When the NVM Controller is busy performing an operation it will signal this via the NVM Busy Flag in the NVM Control and Status Register. See NVMCSR - Non-Volatile Memory Control and Status Register. The NVM Command Register is blocked for write access as long as the busy flag is active. This is to ensure that the current command is fully executed before a new command can start.

Programming any part of the NVM will automatically inhibit the following operations:

ATtiny102/ATtiny104 supports external programming and internal programming (self-programming).