Datasheet
62
7734Q–AVR–02/12
AT90PWM81/161
8. Interrupts
This section describes the specifics of the interrupt handling as performed in the Atmel
AT90PWM81/161. For a general explanation of the AVR interrupt handling, refer to “Reset and
Interrupt Handling” on page 13.
8.1 Interrupt Vectors in AT90PWM81/161
Notes: 1. When the BOOTRST fuse is programmed, the device will jump to the boot loader address at
reset, see “Boot Loader Support – Read-While-Write Self-Programming” on page 233.
2. When the IVSEL bit in MCUCR is set, interrupt vectors will be moved to the start of the boot
flash section. The address of each interrupt vector will then be the address in this table added
to the start address of the boot flash section.
Table 8-2 on page 63 shows reset and Interrupt Vectors placement for the various combinations
of BOOTRST and IVSEL settings. If the program never enables an interrupt source, the Interrupt
Vectors are not used, and regular program code can be placed at these locations. This is also
Table 8-1. Reset and interrupt vectors.
Vector
no.
AT90PWM81
program
address
AT90PWM161
program
address Source Interrupt definition
1 0x0000 0x0000 RESET
External pin, power-on reset, brown-out
reset, watchdog reset, and emulation
AVR reset
2 0x0001 0x0002 PSC2 CAPT PSC2 capture event
3 0x0002 0x0004 PSC2 EC PSC2 end cycle
4 0x0003 0x0006 PSC2 EEC PSC2 end of enhanced cycle
5 0x0004 0x0008 PSCr CAPT PSC reduced capture event
6 0x0005 0x000A PSCr EC PSC reduced end cycle
7 0x0006 0x000C PSCr EEC PSC reduced end of enhanced cycle
8 0x0007 0x000E ANACOMP 0 Analog comparator 0
9 0x0008 0x0010 ANACOMP 1 Analog comparator 1
10 0x0009 0x0012 ANACOMP 2 Analog comparator 2
11 0x000A 0x0014 INT0 External interrupt request 0
12 0x000B 0x0016
TIMER1
CAPT
Timer/Counter1 capture event
13 0x000C 0x0018 TIMER1 OVF Timer/Counter1 overflow
14 0x000D 0x001A ADC ADC conversion complete
15 0x000E 0x001C INT1 External interrupt request 1
16 0x000F 0x001E SPI, STC SPI serial transfer complete
17 0x0010 0x0020 INT2 External interrupt request 2
18 0x0011 0x0022 WDT Watchdog time-out interrupt
19 0x0012 0x0024 EE READY EEPROM ready
20 0x0013 0x0026 SPM READY Store program memory ready