Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ATtiny104_Datasheet.pdf
Скачиваний:
0
Добавлен:
12.02.2026
Размер:
3.8 Mб
Скачать

Table 21-10. Enable Key for Non-Volatile Memory Programming

Key

Value

 

 

NVM Program Enable

0x1289AB45CDD888FF

 

 

After the key has been given, the Non-Volatile Memory Enable (NVMEN) bit in the TPI Status Register (TPISR) must be polled until the Non-Volatile memory has been enabled.

NVM programming is disabled by writing a logical zero to the NVMEN bit in TPISR.

21.7.Control and Status Space Register Descriptions

The control and status registers of the Tiny Programming Interface are mapped in the Control and Status Space (CSS) of the interface. These registers are not part of the I/O register map and are accessible via SLDCS and SSTCS instructions, only. The control and status registers are directly involved in configuration and status monitoring of the TPI.

Table 21-11. Summary of Control and Status Registers

Offset

Name

Bit 7

Bit 6

Bit 5

 

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

 

 

 

 

 

 

 

 

 

 

 

0x0F

TPIIR

 

 

 

Tiny Programming Interface Identification Code

 

 

 

 

 

 

 

 

 

 

 

 

 

0x0E

 

 

 

 

 

 

 

 

 

 

...

Reserved

-

-

-

 

-

-

-

-

-

0x03

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0x02

TPIPCR

-

-

-

 

-

-

GT2

GT1

GT0

 

 

 

 

 

 

 

 

 

 

 

0x01

Reserved

-

-

-

 

-

-

-

-

-

 

 

 

 

 

 

 

 

 

 

 

0x00

TPISR

-

-

-

 

-

-

-

NVMEN

-

 

 

 

 

 

 

 

 

 

 

 

Atmel ATtiny102 / ATtiny104 [DATASHEET] 206

Atmel-42505D-ATtiny102-ATtiny104_Datasheet_Complete-10/2016

21.7.1.Tiny Programming Interface Identification Register

Name:  TPIIR

Offset:  Reset:  0x00

Property: CSS: 0x0F

 

Bit

7

6

5

4

3

2

1

0

 

 

 

 

 

TPIIC[7:0]

 

 

 

Access

 

 

 

 

 

 

 

 

R/W

R/W

R/W

R/W

R/W

R/W

R/W

R/W

Reset

0

0

0

0

0

0

0

0

Bits 7:0 – TPIIC[7:0]: Tiny Programming Interface Identification Code

These bits give the identification code for the Tiny Programming Interface. The code can be used be the external programmer to identify the TPI.

Table 21-12. Identification Code for Tiny Programming Interface

Code

Value

 

 

Interface Identification

0x80

 

 

Atmel ATtiny102 / ATtiny104 [DATASHEET] 207

Atmel-42505D-ATtiny102-ATtiny104_Datasheet_Complete-10/2016

21.7.2.Tiny Programming Interface Physical Layer Control Register

Name:  TPIPCR

Offset:  Reset:  0x00

Property: CSS: 0x02

 

Bit

7

6

5

4

3

2

1

0

 

 

 

 

 

 

GT2

GT1

GT0

Access

 

 

 

 

 

R/W

R/W

R/W

Reset

 

 

 

 

 

0

0

0

Bits 2:0 – GTn: Guard Time [n=2:0]

These bits specify the number of additional IDLE bits that are inserted to the idle time when changing from reception mode to transmission mode. Additional delays are not inserted when changing from transmission mode to reception.

The total idle time when changing from reception to transmission mode is Guard Time plus two IDLE bits.

Table 21-13. Identification Code for Tiny Programming Interface

GT2

GT1

GT0

Guard Time (Number of IDLE bits)

0

0

0

+128 (default value)

 

 

 

 

0

0

1

+64

 

 

 

 

0

1

0

+32

 

 

 

 

0

1

1

+16

 

 

 

 

1

0

0

+8

 

 

 

 

1

0

1

+4

 

 

 

 

1

1

0

+2

 

 

 

 

1

1

1

+0

 

 

 

 

The default Guard Time is 128 IDLE bits. To speed up the communication, the Guard Time should be set to the shortest safe value.

Atmel ATtiny102 / ATtiny104 [DATASHEET] 208

Atmel-42505D-ATtiny102-ATtiny104_Datasheet_Complete-10/2016

21.7.3.Tiny Programming Interface Status Register

Name:  TPISR

Offset:  Reset:  0x00

Property: CSS: 0x00

 

Bit

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

NVMEN

 

Access

 

 

 

 

 

 

R/W

 

Reset

 

 

 

 

 

 

0

 

Bit 1 – NVMEN: Non-Volatile Memory Programming Enabled

NVM programming is enabled when this bit is set. The external programmer can poll this bit to verify the interface has been successfully enabled.

NVM programming is disabled by writing this bit to zero.

Atmel ATtiny102 / ATtiny104 [DATASHEET] 209

Atmel-42505D-ATtiny102-ATtiny104_Datasheet_Complete-10/2016