Datasheet
2018 Microchip Technology Inc. Data Sheet Complete DS40002060A-page 119
ATtiny4/5/9/10
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” on page 123. 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:
• All programming to any other part of the NVM
• All reading from any NVM location
ATtiny4/5/9/10 support only external programming. Internal programming operations to NVM have been disabled, which
means any internal attempt to write or erase NVM locations will fail.
16.4.1 Addressing the Flash
The data space uses byte accessing but since the Flash sections are accessed as words and organized in pages, the byte-
address of the data space must be converted to the word-address of the Flash section. This is illustrated in Figure 16-1.
Also, see Table 16-3 on page 116.
The most significant bits of the data space address select the NVM Lock bits or the Flash section mapped to the data mem-
ory. The word address within a page (WADDR) is held by bits [WADDRMSB:1], and the page address (PADDR) by bits
[PADDRMSB:WADDRMSB+1]. Together, PADDR and WADDR form the absolute address of a word in the Flash section.
The least significant bit of the Flash section address is used to select the low or high byte of the word.
Figure 16-1. Addressing the Flash Memory
16.4.2 Reading the Flash
The Flash can be read from the data memory mapped locations one byte at a time. For read operations, the least signifi-
cant bit (bit 0) is used to select the low or high byte in the word address. If this bit is zero, the low byte is read, and if it is
one, the high byte is read.
00
PAG E
01
02
SECTIONEND
WORD
00
01
PAGEEND
FLASH
SECTION
FLASH
PAG E
0/1WADDRPADDR
1WADDRMSBPADDRMSB16
ADDRESS POINTER
...
...
...
...
...
...
PAGE ADDRESS
WITHIN A FLASH
SECTION
WORD ADDRESS
WITHIN A FLASH
PAG E
LOW/HIGH
BYTE SELECT
WADDRMSB+1