AT90PWM2/3
When the BOOTRST Fuse is programmed and the Boot section size set to 2K bytes, the
most typical and general program setup for the Reset and Interrupt Vector Addresses in
AT90PWM2/3 is:
Address Labels Code
Comments
.org 0x001
0x001
rjmp PSC2_CAPT
; PSC2 Capture event Handler
0x002
rjmp PSC2_EC
; PSC2 End Cycle Handler
...
... ...
;
0x01F
Handler
rjmp SPM_RDY
; Store Program Memory Ready
;
.org 0xC00
0xC00 RESET: ldi
r16,high(RAMEND); Main program start
0xC01
RAM
out SPH,r16
; Set Stack Pointer to top of
0xC02
ldi r16,low(RAMEND)
0xC03
0xC04
out SPL,r16
sei
; Enable interrupts
0xC05
<instr> xxx
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 typ-
ical and general program setup for the Reset and Interrupt Vector Addresses in
AT90PWM2/3 is:
Address Labels Code
Comments
;
.org 0xC00
0xC00
rjmp RESET
; Reset handler
0xC01
rjmp PSC2_CAPT
; PSC2 Capture event Handler
0xC02
rjmp PSC2_EC
; PSC2 End Cycle Handler
...
... ...
;
0xC1F
Handler
rjmp SPM_RDY
; Store Program Memory Ready
;
0xC20 RESET: ldi r16,high(RAMEND); Main program start
0xC21
RAM
out SPH,r16
; Set Stack Pointer to top of
0xC22
ldi r16,low(RAMEND)
0xC23
0xC24
out SPL,r16
sei
; Enable interrupts
0xC25
<instr> xxx
59
4317B–AVR–02/05