atmega32c1 ATMEL Corporation, atmega32c1 Datasheet - Page 58

no-image

atmega32c1

Manufacturer Part Number
atmega32c1
Description
Atmega32m1 Automotive 8-bit Avr Microcontroller With 32k/64k Bytes In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
atmega32c1-15AZ
Manufacturer:
ATMEL
Quantity:
170
Part Number:
atmega32c1-15AZ
Manufacturer:
Atmel
Quantity:
10 000
8.1.1
8.1.2
58
ATmega32/64/M1/C1
Moving Interrupts Between Application and Boot Space
MCU Control Register – MCUCR
When the BOOTRST Fuse is programmed, the Boot section size set to 2K bytes and the IVSEL
bit in the MCUCR Register is set before any interrupts are enabled, the most typical and general
program setup for the Reset and Interrupt Vector Addresses in ATmega32/64/M1/C116/32 is:
The MCU Control Register controls the placement of the Interrupt Vector table.
• Bit 1 – IVSEL: Interrupt Vector Select
When the IVSEL bit is cleared (zero), the Interrupt Vectors are placed at the start of the Flash
memory. When this bit is set (one), the Interrupt Vectors are moved to the beginning of the Boot
Loader section of the Flash. The actual address of the start of the Boot Flash Section is deter-
mined by the BOOTSZ Fuses. Refer to the section
Self-Programming ATmega32/64M1” on page 272
Interrupt Vector tables, a special write procedure must be followed to change the IVSEL bit:
Bit
Read/Write
Initial Value
0x03C
;
.org 0xC00
0xC00
0xC01
0xC02
0xC03
0xC04
0xC05
Address Labels Code
;
.org 0xC00
0xC00
0xC02
0xC04
...
0xC3C
;
0xC3E
0xC3F
0xC40
0xC41
0xC42
0xC43
RESET: ldi
RESET: ldi
SPIPS
R/W
7
0
jmp
out
ldi
out
sei
<instr>
jmp
jmp
jmp
...
jmp
out
ldi
out
sei
<instr>
R
6
0
SPM_RDY
r16,high(RAMEND); Main program start
SPH,r16
r16,low(RAMEND)
SPL,r16
RESET
ANA_COMP_0
ANA_COMP_1
...
SPM_RDY
r16,high(RAMEND); Main program start
SPH,r16
r16,low(RAMEND)
SPL,r16
xxx
xxx
R
5
0
PUD
R/W
4
0
; Store Program Memory Ready Handler
; Set Stack Pointer to top of RAM
; Enable interrupts
Comments
; Reset handler
; Analog Comparator 0 Handler
; Analog Comparator 1 Handler
;
; Store Program Memory Ready Handler
; Set Stack Pointer to top of RAM
; Enable interrupts
for details. To avoid unintentional changes of
“Boot Loader Support – Read-While-Write
R
3
0
R
2
0
IVSEL
R/W
1
0
IVCE
R/W
0
0
7647A–AVR–02/08
MCUCR

Related parts for atmega32c1