Memory Programming; Program And Data Memory Lock Bits - Atmel ATtiny25 Manual

Microcontroller with 2/4/8k bytes in-system programmable flash
Table of Contents

Advertisement

20.4.5
Programming Time for Flash when Using SPM

21. Memory Programming

21.1

Program And Data Memory Lock Bits

ATtiny25/45/85
134
Flash corruption can easily be avoided by following these design recommendations (one is
sufficient):
1. Keep the AVR RESET active (low) during periods of insufficient power supply voltage.
This can be done by enabling the internal Brown-out Detector (BOD) if the operating
voltage matches the detection level. If not, an external low V
can be used. If a reset occurs while a write operation is in progress, the write operation
will be completed provided that the power supply voltage is sufficient.
2. Keep the AVR core in Power-down sleep mode during periods of low V
vent the CPU from attempting to decode and execute instructions, effectively protecting
the SPMCSR Register and thus the Flash from unintentional writes.
The calibrated RC Oscillator is used to time Flash accesses.
gramming time for Flash accesses from the CPU.
Table 20-1.
SPM Programming Time
Symbol
Flash write (Page Erase, Page Write, and
write Lock bits by SPM)
This section describes the different methods for Programming the ATtiny25/45/85 memories.
The ATtiny25/45/85 provides two Lock bits which can be left unprogrammed ("1") or can be pro-
grammed ("0") to obtain the additional security listed in
erased to "1" with the Chip Erase command.
Program memory can be read out via the debugWIRE interface when the DWEN fuse is pro-
grammed, even if the Lock Bits are set. Thus, when Lock Bit security is required, should always
debugWIRE be disabled by clearing the DWEN fuse.
Table 21-1.
Lock Bit Byte
Lock Bit Byte
LB2
LB1
Note:
1. "1" means unprogrammed, "0" means programmed
Min Programming Time
3.7 ms
()
Bit No
Description
7
6
5
4
3
2
1
Lock bit
0
Lock bit
reset protection circuit
CC
. This will pre-
CC
Table 20-1
shows the typical pro-
Max Programming Time
4.5 ms
Table
21-2. The Lock bits can only be
Default Value
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
1 (unprogrammed)
7598H–AVR–07/09

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Attiny45Attiny85

Table of Contents