# AVR32 - Interrupt Controller Driver Documentation

## Introduction

This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the interrupt controller driver. It also comes bundled with a basic application as an example of usage.

This example demonstrates how to use the INTC driver for the USART RXRDY interrupt.

Operating mode: each character typed on the PC terminal is echoed back.

Note:
  The IAR built-in event handling mechanism manages interrupt groups but not lines. This example shows how to register an interrupt through the INTC driver, which manages lines. If interrupt request lines do not have to be handled separately within groups, then the IAR built-in event handling mechanism can be used in this way:
  - remove the INTC driver files (intc.c and exception.s82) from the IAR project;
  - remove calls to the INTC driver functions (INTC_init_interrupts and INTC_register_interrupt);
  - add `#pragma handler = AVR32_xxxx_IRQ_GROUP, int_level` above the `__interrupt` keyword;
  - the IAR project options can be changed to catch unhandled events under the Runtime tab of the General Options item.

Warning:
  The IAR built-in event handling mechanism (`#pragma exception` and `#pragma handler`) MUST NOT be used along with the INTC driver within a project.

## Main Files

- intc.c: interrupt controller driver;
- intc.h: interrupt controller driver header file;
- exception.S: exception and interrupt handlers assembly file for GCC;
- interrupt_usart_example.c: interrupt controller example application.

## Compilation Information

This software is written for GNU GCC for AVR32 and for IAR Embedded Workbench for Atmel AVR32. Other compilers may or may not work.

## Device Information

All AVR32 devices with an INTC and a USART module can be used.

## Configuration Information

This example has been tested with the following configuration:

- EVK1100, EVK1101, EVK1104 or EVK1105 evaluation kit, or STK1000 starter kit;
- CPU clock: 12 MHz;
- USART0 (on EVK1100) or USART1 (on EVK1101 or STK1000) connected to a PC serial port via a standard RS232 DB9 cable, or USART0 (on EVK1105) or USART1 (on EVK1104) abstracted with a USB CDC connection to a PC;
- PC terminal settings:
  - 57600 bps (on EVK1100, EVK1101, EVK1104 or EVK1105) or 115200 bps (on STK1000),
  - 8 data bits,
  - no parity bit,
  - 1 stop bit,
  - no flow control.

## Contact Information

For further information, visit Atmel AVR32.
Support and FAQ: http://support.atmel.no/