avr_interrupts(3)
π NAME π
avr_interrupts
This whole page is avr_interrupts(3) from avr-libc, bestie β¨
β¨ SYNOPSIS β¨
π Global manipulation of the interrupt flag π
Okay so the global interrupt flag is chillin' in the I bit of the status register (SREG). π
Handling interrupts frequently requires attention regarding atomic access to objects that could be altered by code running within an interrupt context β peep <util/atomic.h> for that. π«Ά
Frequently, interrupts are being disabled for periods of time in order to perform certain operations without being disturbed; see Problems with reordering code for things to be taken into account with respect to compiler optimizations. No cap.
#define sei()
#define cli()
π Macros for writing interrupt handler functions π
#define ISR(vector, attributes)#define SIGNAL(vector)#define EMPTY_INTERRUPT(vector)#define ISR_ALIAS(vector, target_vector)#define reti()#define BADISR_vect
π ISR attributes π
#define ISR_BLOCK#define ISR_NOBLOCK#define ISR_NAKED#define ISR_FLATTEN#define ISR_NOICF#define ISR_ALIASOF(target_vector)
πΈ Detailed Description πΈ
Note: This discussion of interrupts was originally taken from Rich Neswold's document. See Acknowledgments.
π¦ Introduction to avr-libc's interrupt handling π¦
It's nearly impossible to find compilers that agree on how to handle interrupt code. Since the C language tries to stay away from machine dependent details, each compiler writer is forced to design their method of support. π
In the AVR-GCC environment, the vector table is predefined to point to interrupt routines with predetermined names. By using the appropriate name, your routine will be called when the corresponding interrupt occurs. The device library provides a set of default interrupt routines, which will get used if you don't define your own. Periodt.
Patching into the vector table is only one part of the problem. The compiler uses, by convention, a set of registers when it's normally executing compiler-generated code. It's important that these registers, as well as the status register, get saved and restored. The extra code needed to do this is enabled by tagging the interrupt function with __attribute__((signal)). π₯
These details seem to make interrupt routines a little messy, but all these details are handled by the Interrupt API. An interrupt routine is defined with ISR(). This macro register and mark the routine as an interrupt handler for the specified peripheral. The following is an example definition of a handler for the ADC interrupt.
#include <avr/interrupt.h>
ISR(ADC_vect)
{
// user code here
}
Refer to the chapter explaining assembler programming for an explanation about interrupt routines written solely in assembler language. π§
π Catch-all interrupt vector π
If an unexpected interrupt occurs (interrupt is enabled and no handler is installed, which usually indicates a bug), then the default action is to reset the device by jumping to the reset vector. You can override this by supplying a function named BADISR_vect which should be defined with ISR() as such. (The name BADISR_vect is actually an alias for __vector_default. The latter must be used inside assembly code in case <avr/interrupt.h> is not included.) π
#include <avr/interrupt.h>
ISR(BADISR_vect)
{
// user code here
}
β Nested interrupts β
The AVR hardware clears the global interrupt flag in SREG before entering an interrupt vector. Thus, normally interrupts will remain disabled inside the handler until the handler exits, where the RETI instruction (that is emitted by the compiler as part of the normal function epilogue for an interrupt handler) will eventually re-enable further interrupts. For that reason, interrupt handlers normally do not nest. For most interrupt handlers, this is the desired behaviour, for some it is even required in order to prevent infinitely recursive interrupts (like UART interrupts, or level-triggered external interrupts). In rare circumstances though it might be desired to re-enable the global interrupt flag as early as possible in the interrupt handler, in order to not defer any other interrupt more than absolutely needed. This could be done using an sei() instruction right at the beginning of the interrupt handler, but this still leaves few instructions inside the compiler-generated function prologue to run with global interrupts disabled. The compiler can be instructed to insert an SEI instruction right at the beginning of an interrupt handler by declaring the handler the following way:
ISR(XXX_vect, ISR_NOBLOCK)
{
...
}
where XXX_vect is the name of a valid interrupt vector for the MCU type in question, as explained below. π
π Two vectors sharing the same code π
In some circumstances, the actions to be taken upon two different interrupts might be completely identical so a single implementation for the ISR would suffice. For example, pin-change interrupts arriving from two different ports could logically signal an event that is independent from the actual port (and thus interrupt vector) where it happened. Sharing interrupt vector code can be accomplished using the ISR_ALIASOF() attribute to the ISR macro:
ISR(PCINT0_vect)
{
...
// Code to handle the event.
}
ISR(PCINT1_vect, ISR_ALIASOF(PCINT0_vect));
Note: There is no body to the aliased ISR.
Note that the ISR_ALIASOF() feature requires GCC 4.2 or above (or a patched version of GCC 4.1.x). See the documentation of the ISR_ALIAS() macro for an implementation which is less elegant but could be applied to all compiler versions. π
π Empty interrupt service routines π
In rare circumstances, an interrupt vector does not need any code to be implemented at all. The vector must be declared anyway, so when the interrupt triggers it won't execute the BADISR_vect code (which by default restarts the application). π
This could for example be the case for interrupts that are solely enabled for the purpose of getting the controller out of sleep_mode().
A handler for such an interrupt vector can be declared using the EMPTY_INTERRUPT() macro:
EMPTY_INTERRUPT(ADC_vect);
Note: There is no body to this macro.
π§ Manually defined ISRs π§
In some circumstances, the compiler-generated prologue and epilogue of the ISR might not be optimal for the job, and a manually defined ISR could be considered particularly to speedup the interrupt handling.
One solution to this could be to implement the entire ISR as manual assembly code in a separate (assembly) file. See Combining C and assembly source files for an example of how to implement it that way.
Another solution is to still implement the ISR in C language but take over the compiler's job of generating the prologue and epilogue. This can be done using the ISR_NAKED attribute to the ISR() macro. Note that the compiler does not generate anything as prologue or epilogue, so the final reti() must be provided by the actual implementation. SREG must be manually saved if the ISR code modifies it, and the compiler-implied assumption of __zero_reg__ always being 0 could be wrong (e. g. when interrupting right after of a MUL instruction). π
ISR(TIMER1_OVF_vect, ISR_NAKED)
{
PORTB |= _BV(0); // results in SBI which does not affect SREG
reti();
}
π Choosing the vector: Interrupt vector names π
The interrupt is chosen by supplying one of the symbols in following table.
There are currently two different styles present for naming the vectors. One form uses names starting with SIG_, followed by a relatively verbose but arbitrarily chosen name describing the interrupt vector. This has been the only available style in avr-libc up to version 1.2.x.
Starting with avr-libc version 1.4.0, a second style of interrupt vector names has been added, where a short phrase for the vector description is followed by _vect. The short phrase matches the vector name as described in the datasheet of the respective device (and in Atmel's XML files), with spaces replaced by an underscore and other non-alphanumeric characters dropped. Using the suffix _vect is intented to improve portability to other C compilers available for the AVR that use a similar naming convention.
The historical naming style might become deprecated in a future release, so it is not recommended for new projects. π«Ά
Note: TheISR()macro cannot really spell-check the argument passed to them. Thus, by misspelling one of the names below in a call toISR(), a function will be created that, while possibly being usable as an interrupt function, is not actually wired into the interrupt vector table. The compiler will generate a warning if it detects a suspiciously looking name of aISR()function (i.e. one that after macro replacement does not start with'__vector_').
Vector name Old vector name Description Applicable for device
okay so the list keeps going, and this stretch is the main event: every interrupt vector, the legacy SIG_* aliases it answers to, what it means, and every single chip that has it. no skips, no "and so on", we're doing all of them π
ADC_vect(akaSIG_ADC) β ADC Conversion Complete π- πΎ AT90S2333, AT90S4433, AT90S4434, AT90S8535, AT90PWM216, AT90PWM2B, AT90PWM316, AT90PWM3B, AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega16, ATmega163, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega32, ATmega323, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega8, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny13, ATtiny15, ATtiny26, ATtiny43U, ATtiny48, ATtiny24, ATtiny44, ATtiny84, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
ANALOG_COMP_0_vect(akaSIG_COMPARATOR0) β Analog Comparator 0 β¨- πΎ AT90PWM3, AT90PWM2, AT90PWM1
ANALOG_COMP_1_vect(akaSIG_COMPARATOR1) β Analog Comparator 1 β¨- πΎ AT90PWM3, AT90PWM2, AT90PWM1
ANALOG_COMP_2_vect(akaSIG_COMPARATOR2) β Analog Comparator 2 β¨- πΎ AT90PWM3, AT90PWM2, AT90PWM1
ANALOG_COMP_vect(akaSIG_COMPARATOR) β Analog Comparator π- πΎ AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
ANA_COMP_vect(akaSIG_COMPARATOR) β Analog Comparator π (yes, it's the same thing with a shorter name β both spellings are real)- πΎ AT90S1200, AT90S2313, AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, ATmega16, ATmega161, ATmega162, ATmega163, ATmega32, ATmega323, ATmega8, ATmega8515, ATmega8535, ATtiny11, ATtiny12, ATtiny13, ATtiny15, ATtiny2313, ATtiny26, ATtiny28, ATtiny43U, ATtiny48, ATtiny24, ATtiny44, ATtiny84, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861
CANIT_vect(akaSIG_CAN_INTERRUPT1) β CAN Transfer Complete or Error π- πΎ AT90CAN128, AT90CAN32, AT90CAN64
EEPROM_READY_vect(akaSIG_EEPROM_READY,SIG_EE_READY) β no description in the source, bestie, she's just here with one chip π«Ά- πΎ ATtiny2313
EE_RDY_vect(akaSIG_EEPROM_READY) β EEPROM Ready πΎ- πΎ AT90S2333, AT90S4433, AT90S4434, AT90S8535, ATmega16, ATmega161, ATmega162, ATmega163, ATmega32, ATmega323, ATmega8, ATmega8515, ATmega8535, ATtiny12, ATtiny13, ATtiny15, ATtiny26, ATtiny43U, ATtiny48, ATtiny24, ATtiny44, ATtiny84, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861
EE_READY_vect(akaSIG_EEPROM_READY) β EEPROM Ready πΎ- πΎ AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega32HVB, ATmega406, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
EXT_INT0_vect(akaSIG_INTERRUPT0) β External Interrupt Request 0 β‘- πΎ ATtiny24, ATtiny44, ATtiny84
INT0_vect(akaSIG_INTERRUPT0) β External Interrupt 0 β‘- πΎ AT90S1200, AT90S2313, AT90S2323, AT90S2333, AT90S2343, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, AT90PWM216, AT90PWM2B, AT90PWM316, AT90PWM3B, AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega16, ATmega161, ATmega162, ATmega163, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega32, ATmega323, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega32HVB, ATmega406, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega8, ATmega8515, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, ATtiny11, ATtiny12, ATtiny13, ATtiny15, ATtiny22, ATtiny2313, ATtiny26, ATtiny28, ATtiny43U, ATtiny48, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT1_vect(akaSIG_INTERRUPT1) β External Interrupt Request 1 β‘- πΎ AT90S2313, AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, AT90PWM216, AT90PWM2B, AT90PWM316, AT90PWM3B, AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega16, ATmega161, ATmega162, ATmega163, ATmega168P, ATmega32, ATmega323, ATmega328P, ATmega32HVB, ATmega406, ATmega48P, ATmega64, ATmega8, ATmega8515, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, ATtiny2313, ATtiny28, ATtiny48, ATtiny261, ATtiny461, ATtiny861, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT2_vect(akaSIG_INTERRUPT2) β External Interrupt Request 2 β‘- πΎ AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega16, ATmega161, ATmega162, ATmega32, ATmega323, ATmega32HVB, ATmega406, ATmega64, ATmega8515, ATmega8535, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT3_vect(akaSIG_INTERRUPT3) β External Interrupt Request 3 β‘- πΎ AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega32HVB, ATmega406, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT4_vect(akaSIG_INTERRUPT4) β External Interrupt Request 4 β‘- πΎ AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT5_vect(akaSIG_INTERRUPT5) β External Interrupt Request 5 β‘- πΎ AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT6_vect(akaSIG_INTERRUPT6) β External Interrupt Request 6 β‘- πΎ AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
INT7_vect(akaSIG_INTERRUPT7) β External Interrupt Request 7 β‘- πΎ AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
IO_PINS_vect(akaSIG_PIN,SIG_PIN_CHANGE) β External Interrupt Request 0 π- πΎ ATtiny11, ATtiny12, ATtiny15, ATtiny26
LCD_vect(akaSIG_LCD) β LCD Start of Frame π₯οΈ- πΎ ATmega169, ATmega169P, ATmega329, ATmega3290, ATmega3290P, ATmega649, ATmega6490
LOWLEVEL_IO_PINS_vect(akaSIG_PIN) β Low-level Input on Port B π- πΎ ATtiny28
OVRIT_vect(akaSIG_CAN_OVERFLOW1) β CAN Timer Overrun π- πΎ AT90CAN128, AT90CAN32, AT90CAN64
PCINT0_vect(akaSIG_PIN_CHANGE0) β Pin Change Interrupt Request 0 π¦- πΎ ATmega162, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega32HVB, ATmega406, ATmega48P, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny13, ATtiny43U, ATtiny48, ATtiny24, ATtiny44, ATtiny84, ATtiny45, ATtiny25, ATtiny85, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
PCINT1_vect(akaSIG_PIN_CHANGE1) β Pin Change Interrupt Request 1 π¦- πΎ ATmega162, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega32HVB, ATmega406, ATmega48P, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny43U, ATtiny48, ATtiny24, ATtiny44, ATtiny84, AT90USB162, AT90USB82
PCINT2_vect(akaSIG_PIN_CHANGE2) β Pin Change Interrupt Request 2 π¦- πΎ ATmega3250, ATmega3250P, ATmega328P, ATmega3290, ATmega3290P, ATmega48P, ATmega6450, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny48
PCINT3_vect(akaSIG_PIN_CHANGE3) β Pin Change Interrupt Request 3 π¦- πΎ ATmega3250, ATmega3250P, ATmega3290, ATmega3290P, ATmega6450, ATmega6490, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny48
PCINT_vect(akaSIG_PIN_CHANGE,SIG_PCINT) β no description in the source either, just the chip list, iconic honestly π- πΎ ATtiny2313, ATtiny261, ATtiny461, ATtiny861
PSC0_CAPT_vect(akaSIG_PSC0_CAPTURE) β PSC0 Capture Event π―- πΎ AT90PWM3, AT90PWM2, AT90PWM1
PSC0_EC_vect(akaSIG_PSC0_END_CYCLE) β PSC0 End Cycle π- πΎ AT90PWM3, AT90PWM2, AT90PWM1
PSC1_CAPT_vect(akaSIG_PSC1_CAPTURE) β PSC1 Capture Event π―- πΎ AT90PWM3, AT90PWM2, AT90PWM1
PSC1_EC_vect(akaSIG_PSC1_END_CYCLE) β PSC1 End Cycle π- πΎ AT90PWM3, AT90PWM2, AT90PWM1
PSC2_CAPT_vect(akaSIG_PSC2_CAPTURE) β PSC2 Capture Event π―- πΎ AT90PWM3, AT90PWM2, AT90PWM1
PSC2_EC_vect(akaSIG_PSC2_END_CYCLE) β PSC2 End Cycle π- πΎ AT90PWM3, AT90PWM2, AT90PWM1
SPI_STC_vect(akaSIG_SPI) β Serial Transfer Complete π- πΎ AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, AT90PWM216, AT90PWM2B, AT90PWM316, AT90PWM3B, AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega103, ATmega128, ATmega1284P, ATmega16, ATmega161, ATmega162, ATmega163, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega32, ATmega323, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega32HVB, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega8, ATmega8515, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, ATtiny48, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
SPM_RDY_vect(akaSIG_SPM_READY) β Store Program Memory Ready π§- πΎ ATmega16, ATmega162, ATmega32, ATmega323, ATmega8, ATmega8515, ATmega8535
SPM_READY_vect(akaSIG_SPM_READY) β Store Program Memory Read π§- πΎ AT90PWM3, AT90PWM2, AT90PWM1, AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega165, ATmega165P, ATmega168P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega328P, ATmega329, ATmega3290, ATmega3290P, ATmega406, ATmega48P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, AT90USB162, AT90USB82,
...and also AT90USB1287, AT90USB1286, AT90USB647, AT90USB646. π
TIM0_COMPA_vect/SIG_OUTPUT_COMPARE0Aβ Timer/Counter Compare Match A βATtiny13,ATtiny43U,ATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIM0_COMPB_vect/SIG_OUTPUT_COMPARE0Bβ Timer/Counter Compare Match B βATtiny13,ATtiny43U,ATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIM0_OVF_vect/SIG_OVERFLOW0β Timer/Counter0 Overflow βATtiny13,ATtiny43U,ATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIM1_CAPT_vect/SIG_INPUT_CAPTURE1β Timer/Counter1 Capture Event βATtiny24,ATtiny44,ATtiny84TIM1_COMPA_vect/SIG_OUTPUT_COMPARE1Aβ Timer/Counter1 Compare Match A βATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIM1_COMPB_vect/SIG_OUTPUT_COMPARE1Bβ Timer/Counter1 Compare Match B βATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIM1_OVF_vect/SIG_OVERFLOW1β Timer/Counter1 Overflow βATtiny24,ATtiny44,ATtiny84,ATtiny45,ATtiny25,ATtiny85TIMER0_CAPT_vect/SIG_INPUT_CAPTURE0β ADC Conversion Complete βATtiny261,ATtiny461,ATtiny861TIMER0_COMPA_vect/SIG_OUTPUT_COMPARE0Aβ TimerCounter0 Compare Match A βATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny2313,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER0_COMPB_vect/SIG_OUTPUT_COMPARE0B,SIG_OUTPUT_COMPARE0_Bβ Timer Counter 0 Compare Match B βAT90PWM3,AT90PWM2,AT90PWM1,ATmega1284P,ATmega168P,ATmega328P,ATmega32HVB,ATmega48P,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny2313,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER0_COMP_A_vect/SIG_OUTPUT_COMPARE0A,SIG_OUTPUT_COMPARE0_Aβ Timer/Counter0 Compare Match A βAT90PWM3,AT90PWM2,AT90PWM1TIMER0_COMP_vect/SIG_OUTPUT_COMPARE0β Timer/Counter0 Compare Match βAT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega16,ATmega161,ATmega162,ATmega165,ATmega165P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega329,ATmega3290,ATmega3290P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8515,ATmega8535TIMER0_OVF0_vect/SIG_OVERFLOW0β Timer/Counter0 Overflow βAT90S2313,AT90S2323,AT90S2343,ATtiny22,ATtiny26TIMER0_OVF_vect/SIG_OVERFLOW0β Timer/Counter0 Overflow βAT90S1200,AT90S2333,AT90S4414,AT90S4433,AT90S4434,AT90S8515,AT90S8535,AT90PWM216,AT90PWM2B,AT90PWM316,AT90PWM3B,AT90PWM3,AT90PWM2,AT90PWM1,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega32HVB,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8515,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny11,ATtiny12,ATtiny15,ATtiny2313,ATtiny28,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER1_CAPT1_vect/SIG_INPUT_CAPTURE1β Timer/Counter1 Capture Event βAT90S2313TIMER1_CAPT_vect/SIG_INPUT_CAPTURE1β Timer/Counter Capture Event βAT90S2333,AT90S4414,AT90S4433,AT90S4434,AT90S8515,AT90S8535,AT90PWM216,AT90PWM2B,AT90PWM316,AT90PWM3B,AT90PWM3,AT90PWM2,AT90PWM1,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8515,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATtiny2313,ATtiny48,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER1_CMPA_vect/SIG_OUTPUT_COMPARE1Aβ Timer/Counter1 Compare Match 1A βATtiny26TIMER1_CMPB_vect/SIG_OUTPUT_COMPARE1Bβ Timer/Counter1 Compare Match 1B βATtiny26TIMER1_COMP1_vect/SIG_OUTPUT_COMPARE1Aβ Timer/Counter1 Compare Match βAT90S2313TIMER1_COMPA_vect/SIG_OUTPUT_COMPARE1Aβ Timer/Counter1 Compare Match A βAT90S4414,AT90S4434,AT90S8515,AT90S8535,AT90PWM216,AT90PWM2B,AT90PWM316,AT90PWM3B,AT90PWM3,AT90PWM2,AT90PWM1,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega32HVB,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8515,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny2313,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER1_COMPB_vect/SIG_OUTPUT_COMPARE1Bβ Timer/Counter1 Compare MatchB βAT90S4414,AT90S4434,AT90S8515,AT90S8535,AT90PWM216,AT90PWM2B,AT90PWM316,AT90PWM3B,AT90PWM3,AT90PWM2,AT90PWM1,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega32HVB,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8515,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny2313,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER1_COMPC_vect/SIG_OUTPUT_COMPARE1Cβ Timer/Counter1 Compare Match C βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER1_COMPD_vect/SIG_OUTPUT_COMPARE0Dβ Timer/Counter1 Compare Match D βATtiny261,ATtiny461,ATtiny861TIMER1_COMP_vect/SIG_OUTPUT_COMPARE1Aβ Timer/Counter1 Compare Match βAT90S2333,AT90S4433,ATtiny15TIMER1_OVF1_vect/SIG_OVERFLOW1β Timer/Counter1 Overflow βAT90S2313,ATtiny26TIMER1_OVF_vect/SIG_OVERFLOW1β Timer/Counter1 Overflow βAT90S2333,AT90S4414,AT90S4433,AT90S4434,AT90S8515,AT90S8535,AT90PWM216,AT90PWM2B,AT90PWM316,AT90PWM3B,AT90PWM3,AT90PWM2,AT90PWM1,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega32HVB,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8515,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,ATmega16HVA,ATtiny15,ATtiny2313,ATtiny48,ATtiny261,ATtiny461,ATtiny861,AT90USB162,AT90USB82,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER2_COMPA_vect/SIG_OUTPUT_COMPARE2Aβ Timer/Counter2 Compare Match A βATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER2_COMPB_vect/SIG_OUTPUT_COMPARE2Bβ Timer/Counter2 Compare Match A βATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER2_COMP_vect/SIG_OUTPUT_COMPARE2β Timer/Counter2 Compare Match βAT90S4434,AT90S8535,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega329,ATmega3290,ATmega3290P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8535TIMER2_OVF_vect/SIG_OVERFLOW2β Timer/Counter2 Overflow βAT90S4434,AT90S8535,AT90CAN128,AT90CAN32,AT90CAN64,ATmega103,ATmega128,ATmega1284P,ATmega16,ATmega161,ATmega162,ATmega163,ATmega165,ATmega165P,ATmega168P,ATmega169,ATmega169P,ATmega32,ATmega323,ATmega325,ATmega3250,ATmega3250P,ATmega328P,ATmega329,ATmega3290,ATmega3290P,ATmega48P,ATmega64,ATmega645,ATmega6450,ATmega649,ATmega6490,ATmega8,ATmega8535,ATmega88P,ATmega168,ATmega48,ATmega88,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,ATmega324P,ATmega164P,ATmega644P,ATmega644,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER3_CAPT_vect/SIG_INPUT_CAPTURE3β Timer/Counter3 Capture Event βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega1284P,ATmega162,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER3_COMPA_vect/SIG_OUTPUT_COMPARE3Aβ Timer/Counter3 Compare Match A βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega1284P,ATmega162,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER3_COMPB_vect/SIG_OUTPUT_COMPARE3Bβ Timer/Counter3 Compare Match B βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega1284P,ATmega162,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER3_COMPC_vect/SIG_OUTPUT_COMPARE3Cβ Timer/Counter3 Compare Match C βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER3_OVF_vect/SIG_OVERFLOW3β Timer/Counter3 Overflow βAT90CAN128,AT90CAN32,AT90CAN64,ATmega128,ATmega1284P,ATmega162,ATmega64,ATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561,AT90USB1287,AT90USB1286,AT90USB647,AT90USB646TIMER4_CAPT_vect/SIG_INPUT_CAPTURE4β Timer/Counter4 Capture Event βATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561TIMER4_COMPA_vect/SIG_OUTPUT_COMPARE4Aβ Timer/Counter4 Compare Match A βATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561TIMER4_COMPB_vect/SIG_OUTPUT_COMPARE4Bβ Timer/Counter4 Compare Match B βATmega640,ATmega1280,ATmega1281,ATmega2560,ATmega2561
TIMER4_COMPC_vectβSIG_OUTPUT_COMPARE4Cβ Timer/Counter4 Compare Match C β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πTIMER4_OVF_vectβSIG_OVERFLOW4β Timer/Counter4 Overflow β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 β¨TIMER5_CAPT_vectβSIG_INPUT_CAPTURE5β Timer/Counter5 Capture Event β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πTIMER5_COMPA_vectβSIG_OUTPUT_COMPARE5Aβ Timer/Counter5 Compare Match A β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 π¦TIMER5_COMPB_vectβSIG_OUTPUT_COMPARE5Bβ Timer/Counter5 Compare Match B β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πΈTIMER5_COMPC_vectβSIG_OUTPUT_COMPARE5Cβ Timer/Counter5 Compare Match C β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πTIMER5_OVF_vectβSIG_OVERFLOW5β Timer/Counter5 Overflow β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 π«ΆTWI_vectβSIG_2WIRE_SERIALβ 2-wire Serial Interface β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega16, ATmega163, ATmega168P, ATmega32, ATmega323, ATmega328P, ATmega32HVB, ATmega406, ATmega48P, ATmega64, ATmega8, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATtiny48, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646 πTXDONE_vectβSIG_TXDONEβ Transmission Done, Bit Timer Flag 2 Interrupt β AT86RF401 π₯TXEMPTY_vectβSIG_TXBEβ Transmit Buffer Empty, Bit Itmer Flag 0 Interrupt β AT86RF401 πUART0_RX_vectβSIG_UART0_RECVβ UART0, Rx Complete β ATmega161 πUART0_TX_vectβSIG_UART0_TRANSβ UART0, Tx Complete β ATmega161 βUART0_UDRE_vectβSIG_UART0_DATAβ UART0 Data Register Empty β ATmega161 πUART1_RX_vectβSIG_UART1_RECVβ UART1, Rx Complete β ATmega161 πUART1_TX_vectβSIG_UART1_TRANSβ UART1, Tx Complete β ATmega161 πUART1_UDRE_vectβSIG_UART1_DATAβ UART1 Data Register Empty β ATmega161 π§UART_RX_vectβSIG_UART_RECVβ UART, Rx Complete β AT90S2313, AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, ATmega103, ATmega163, ATmega8515 πUART_TX_vectβSIG_UART_TRANSβ UART, Tx Complete β AT90S2313, AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, ATmega103, ATmega163, ATmega8515 πUART_UDRE_vectβSIG_UART_DATAβ UART Data Register Empty β AT90S2313, AT90S2333, AT90S4414, AT90S4433, AT90S4434, AT90S8515, AT90S8535, ATmega103, ATmega163, ATmega8515 β¨
and now the USART era begins, no cap π
USART0_RXC_vectβSIG_USART0_RECVβ USART0, Rx Complete β ATmega162 πUSART0_RX_vectβSIG_UART0_RECVβ USART0, Rx Complete β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega165, ATmega165P, ATmega169, ATmega169P, ATmega325, ATmega329, ATmega64, ATmega645, ATmega649, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644 π¦USART0_TXC_vectβSIG_USART0_TRANSβ USART0, Tx Complete β ATmega162 πΈUSART0_TX_vectβSIG_UART0_TRANSβ USART0, Tx Complete β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega165, ATmega165P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega329, ATmega3290, ATmega3290P, ATmega64, ATmega645, ATmega6450, ATmega649, ATmega6490, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644 πUSART0_UDRE_vectβSIG_UART0_DATAβ USART0 Data Register Empty β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega162, ATmega165, ATmega165P, ATmega169, ATmega169P, ATmega325, ATmega329, ATmega64, ATmega645, ATmega649, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644 π«ΆUSART1_RXC_vectβSIG_USART1_RECVβ USART1, Rx Complete β ATmega162 πUSART1_RX_vectβSIG_UART1_RECVβ USART1, Rx Complete β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646 π₯USART1_TXC_vectβSIG_USART1_TRANSβ USART1, Tx Complete β ATmega162 πUSART1_TX_vectβSIG_UART1_TRANSβ USART1, Tx Complete β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646 πUSART1_UDRE_vectβSIG_UART1_DATAβ USART1, Data Register Empty β AT90CAN128, AT90CAN32, AT90CAN64, ATmega128, ATmega1284P, ATmega162, ATmega64, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646 βUSART2_RX_vectβSIG_USART2_RECVβ USART2, Rx Complete β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πUSART2_TX_vectβSIG_USART2_TRANSβ USART2, Tx Complete β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πUSART2_UDRE_vectβSIG_USART2_DATAβ USART2 Data register Empty β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πUSART3_RX_vectβSIG_USART3_RECVβ USART3, Rx Complete β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 π§USART3_TX_vectβSIG_USART3_TRANSβ USART3, Tx Complete β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πUSART3_UDRE_vectβSIG_USART3_DATAβ USART3 Data register Empty β ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561 πUSART_RXC_vectβSIG_USART_RECV,SIG_UART_RECVβ USART, Rx Complete β ATmega16, ATmega32, ATmega323, ATmega8 β¨USART_RX_vectβSIG_USART_RECV,SIG_UART_RECVβ USART, Rx Complete β AT90PWM3, AT90PWM2, AT90PWM1, ATmega168P, ATmega3250, ATmega3250P, ATmega328P, ATmega3290, ATmega3290P, ATmega48P, ATmega6450, ATmega6490, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATtiny2313 πUSART_TXC_vectβSIG_USART_TRANS,SIG_UART_TRANSβ USART, Tx Complete β ATmega16, ATmega32, ATmega323, ATmega8 π¦USART_TX_vectβSIG_USART_TRANS,SIG_UART_TRANSβ USART, Tx Complete β AT90PWM3, AT90PWM2, AT90PWM1, ATmega168P, ATmega328P, ATmega48P, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATtiny2313 πΈUSART_UDRE_vectβSIG_USART_DATA,SIG_UART_DATAβ USART Data Register Empty β AT90PWM3, AT90PWM2, AT90PWM1, ATmega16, ATmega168P, ATmega32, ATmega323, ATmega3250, ATmega3250P, ATmega328P, ATmega3290, ATmega3290P, ATmega48P, ATmega6450, ATmega6490, ATmega8, ATmega8535, ATmega88P, ATmega168, ATmega48, ATmega88, ATtiny2313 πUSI_OVERFLOW_vectβSIG_USI_OVERFLOWβ USI Overflow β ATmega165, ATmega165P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega329, ATmega3290, ATmega3290P, ATmega645, ATmega6450, ATmega649, ATmega6490, ATtiny2313 π«ΆUSI_OVF_vectβSIG_USI_OVERFLOWβ USI Overflow β ATtiny26, ATtiny43U, ATtiny24, ATtiny44, ATtiny84, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861 πUSI_START_vectβSIG_USI_STARTβ USI Start Condition β ATmega165, ATmega165P, ATmega169, ATmega169P, ATmega325, ATmega3250, ATmega3250P, ATmega329, ATmega3290, ATmega3290P, ATmega645, ATmega6450, ATmega649, ATmega6490, ATtiny2313, ATtiny43U, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861 π₯USI_STRT_vectβSIG_USI_STARTβ USI Start β ATtiny26 πUSI_STR_vectβSIG_USI_STARTβ USI START β ATtiny24, ATtiny44, ATtiny84 πWATCHDOG_vectβSIG_WATCHDOG_TIMEOUTβ Watchdog Time-out β ATtiny24, ATtiny44, ATtiny84 βWDT_OVERFLOW_vectβSIG_WATCHDOG_TIMEOUT,SIG_WDT_OVERFLOWβ Watchdog Timer Overflow β ATtiny2313 πWDT_vectβSIG_WDT,SIG_WATCHDOG_TIMEOUTβ Watchdog Timeout Interrupt β AT90PWM3, AT90PWM2, AT90PWM1, ATmega1284P, ATmega168P, ATmega328P, ATmega32HVB, ATmega406, ATmega48P, ATmega88P, ATmega168, ATmega48, ATmega88, ATmega640, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega324P, ATmega164P, ATmega644P, ATmega644, ATmega16HVA, ATtiny13, ATtiny43U, ATtiny48, ATtiny45, ATtiny25, ATtiny85, ATtiny261, ATtiny461, ATtiny861, AT90USB162, AT90USB82, AT90USB1287, AT90USB1286, AT90USB647, AT90USB646 π
β¨ Macro Definition Documentation β¨
okay bestie, this is the macro hall of fame π every single one of these is here, no skips, no cap. let's go one by one and keep all the facts intact, periodt.
#define BADISR_vect
#include <avr/interrupt.h>
This is a vector which is aliased to __vector_default, the vector executed when an ISR fires with no accompanying ISR handler. This may be used along with the ISR() macro to create a catch-all for undefined but used ISRs for debugging purposes. it's giving safety net energy π«Ά
#define cli()
Disables all interrupts by clearing the global interrupt mask. This function actually compiles into a single line of assembly, so there is no function call overhead. However, the macro also implies a memory barrier which can cause additional loss of optimization. ngl, that tradeoff is lowkey iconic
In order to implement atomic access to multi-byte objects, consider using the macros from <util/atomic.h>, rather than implementing them manually with cli() and sei().
#define EMPTY_INTERRUPT(vector)
Defines an empty interrupt handler function. This will not generate any prolog or epilog code and will only return from the ISR. Do not define a function body as this will define it for you. Example:
EMPTY_INTERRUPT(ADC_vect);
#define ISR(vector, attributes)
Introduces an interrupt handler function (interrupt service routine) that runs with global interrupts initially disabled by default with no attributes specified.
The attributes are optional and alter the behaviour and resultant generated code of the interrupt routine. Multiple attributes may be used for a single function, with a space separating each attribute.
Valid attributes are ISR_BLOCK, ISR_NOBLOCK, ISR_NAKED and ISR_ALIASOF(vect).
vector must be one of the interrupt vector names that are valid for the particular MCU type.
#define ISR_ALIAS(vector, target_vector)
Aliases a given vector to another one in the same manner as the ISR_ALIASOF attribute for the ISR() macro. Unlike the ISR_ALIASOF attribute macro however, this is compatible for all versions of GCC rather than just GCC version 4.2 onwards.
Note: This macro creates a trampoline function for the aliased macro. This will result in a two cycle penalty for the aliased vector compared to the ISR the vector is aliased to, due to theJMP/RJMPopcode used.
Deprecated: For new code, the use of ISR(..., ISR_ALIASOF(...)) is recommended.
Example:
ISR(INT0_vect)
{
PORTB = 42;
}
ISR_ALIAS(INT1_vect, INT0_vect);
#define ISR_ALIASOF(target_vector)
The ISR is linked to another ISR, specified by the vect parameter. This is compatible with GCC 4.2 and greater only.
Use this attribute in the attributes parameter of the ISR macro. Example:
ISR (INT0_vect)
{
PORTB = 42;
}
ISR (INT1_vect, ISR_ALIASOF (INT0_vect));
#define ISR_BLOCK
Identical to an ISR with no attributes specified. Global interrupts are initially disabled by the AVR hardware when entering the ISR, without the compiler modifying this state.
Use this attribute in the attributes parameter of the ISR macro.
#define ISR_FLATTEN
The compiler will try to inline all called function into the ISR. This has an effect with GCC 4.6 and newer only.
Use this attribute in the attributes parameter of the ISR macro.
#define ISR_NAKED
ISR is created with no prologue or epilogue code. The user code is responsible for preservation of the machine state including the SREG register, as well as placing a reti() at the end of the interrupt routine.
Use this attribute in the attributes parameter of the ISR macro.
#define ISR_NOBLOCK
ISR runs with global interrupts initially enabled. The interrupt enable flag is activated by the compiler as early as possible within the ISR to ensure minimal processing delay for nested interrupts.
This may be used to create nested ISRs, however care should be taken to avoid stack overflows, or to avoid infinitely entering the ISR for those cases where the AVR hardware does not clear the respective interrupt flag before entering the ISR.
Use this attribute in the attributes parameter of the ISR macro.
#define ISR_NOICF
Avoid identical-code-folding optimization against this ISR. This has an effect with GCC 5 and newer only.
Use this attribute in the attributes parameter of the ISR macro.
#define reti()
Returns from an interrupt routine, enabling global interrupts. This should be the last command executed before leaving an ISR defined with the ISR_NAKED attribute.
This macro actually compiles into a single line of assembly, so there is no function call overhead.
#define sei()
Enables interrupts by setting the global interrupt mask. This function actually compiles into a single line of assembly, so there is no function call overhead. However, the macro also implies a memory barrier which can cause additional loss of optimization.
In order to implement atomic access to multi-byte objects, consider using the macros from <util/atomic.h>, rather than implementing them manually with cli() and sei().
#define SIGNAL(vector)
Introduces an interrupt handler function that runs with global interrupts initially disabled.
This is the same as the ISR macro without optional attributes.
Deprecated: Do not useSIGNAL()in new code. UseISR()instead.
πΈ Author πΈ
Generated automatically by Doxygen for avr-libc from the source code.
and that's the whole vibe check, bestie π this page was auto-generated by Doxygen for avr-libc from the source code, version 2.1.0, dated Sat Jan 29 2022, and yes β you just read avr_interrupts(3). periodt. π
β¨
π¦ where this page comes from
- fedora 43: avr-libc 2.2.1-3.fc43 Β· BSD-3-Clause
- fedora 44: avr-libc 2.2.1-5.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: avr-libc 2.1.0-bp160.1.33 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms