atmega163l ATMEL Corporation, atmega163l Datasheet - Page 140

no-image

atmega163l

Manufacturer Part Number
atmega163l
Description
Atmega163 8-bit Avr Microcontroller With 16k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
atmega163l-4AI
Manufacturer:
ATMEL
Quantity:
984
Store Program Memory
Control Register – SPMCR
140
ATmega163(L)
The Store Program Memory Control Register contains the control bits needed to control
the programming of the Flash from internal code execution.
• Bit 7 – Res: Reserved Bit
This bit is a reserved bit in the ATmega163 and always reads as zero. This bit should be
written to zero when writing SPMCR.
• Bit 6 – ASB: Application Section Busy
Before entering the Application section after a Boot Loader operation (Page Erase or
Page Write) the user software must verify that this bit is cleared. In future devices, this
bit will be set to “1” by Page Erase and Page Write. In ATmega163, this bit always reads
as zero.
• Bit 5 – Res: Reserved Bit
This bit is a reserved bit in the ATmega163 and always reads as zero. This bit should be
written to zero when writing SPMCR.
• Bit 4 – ASRE: Application Section Read Enable
Before re-entering the Application section, the user software must set this bit together
with the SPMEN bit and execute SPM within four clock cycles.
• Bit 3 – BLBSET: Boot Lock Bit Set
If this bit is set at the same time as SPMEN, the next SPM instruction within four clock
cycles will set Boot Lock bits. Alternatively, an LPM instruction within five cycles will
read either the Lock bBits or the Fuse bits. The BLBSET bit will auto-clear upon comple-
tion of the SPM or LPM instruction, or if no SPM, or LPM, instruction is executed within
four, respectively five, clock cycles.
• Bit 2 – PGWRT: Page Write
If this bit is set at the same time as SPMEN, the next SPM instruction within four clock
cycles executes Page Write, with the data stored in the temporary buffer. The page
address is taken from the high part of the Z-pointer. The data in R1 and R0 are ignored.
The PGWRT bit will auto-clear upon completion of a page write, or if no SPM instruction
is executed within four clock cycles. The CPU is halted during the entire Page Write
operation.
• Bit 1 – PGERS: Page Erase
If this bit is set at the same time as SPMEN, the next SPM instruction within four clock
cycles executes Page Erase. The page address is taken from the high part of the Z-
pointer. The data in R1 and R0 are ignored. The PGERS bit will auto-clear upon comple-
tion of a Page Erase, or if no SPM instruction is executed within four clock cycles. The
CPU is halted during the entire Page Erase operation.
Bit
$37 ($57)
Read/Write
Initial Value
R
7
x
ASB
R
6
0
5
R
0
ASRE
R/W
4
0
BLBSET
R/W
3
0
PGWRT
R/W
2
0
PGERS
R/W
1
0
SPMEN
R/W
1142E–AVR–02/03
0
0
SPMCR

Related parts for atmega163l