ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 66

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
12.4
12.4.1
66
Register Description
Atmel ATmega48PA/88PA/168PA [Preliminary]
Moving Interrupts Between Application and Boot Space, Atmel ATmega88PA, ATmega168PA
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 the Atmel
ATmega168PA is:
The MCU Control Register controls the placement of the Interrupt Vector table.
MCUCR – MCU Control Register
Note:
• 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
determined by the BOOTSZ Fuses. Refer to the section
Read-While-Write Self-Programming” on page 277
of Interrupt Vector tables, a special write procedure must be followed to change the IVSEL bit:
Bit
0x35 (0x55)
Read/Write
Initial Value
Address Labels Code
;
.org 0x1C00
0x1C00
0x1C02
0x1C04
...
0x1C32
;
0x1C33
0x1C34
0x1C35
0x1C36
0x1C37
0x1C38
a. Write the Interrupt Vector Change Enable (IVCE) bit to one.
b. Within four cycles, write the desired value to IVSEL while writing a zero to IVCE.
1. BODS and BODSE only available for picoPower devices ATmega48PA/88PA/168PA
RESET: ldi
R
7
0
jmp
jmp
jmp
...
jmp
out
ldi
out
sei
<instr>
BODS
R/W
6
0
(1)
RESET
EXT_INT0
EXT_INT1
...
SPM_RDY
r16,high(RAMEND); Main program start
SPH,r16
r16,low(RAMEND)
SPL,r16
BODSE
xxx
R/W
5
0
(1)
PUD
R/W
4
0
Comments
; Reset handler
; IRQ0 Handler
; IRQ1 Handler
;
; Store Program Memory Ready Handler
; Set Stack Pointer to top of RAM
; Enable interrupts
for details. To avoid unintentional changes
R
3
0
R
2
0
“Boot Loader Support –
IVSEL
R/W
1
0
IVCE
R/W
0
0
9223B–AVR–09/11
MCUCR
®

Related parts for ATmega88PA Automotive