Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
INTC Example for EVK1101 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, UC3C-EK, EVK1104, EVK1105, AT32UC3L-EK evaluation kits; STK600+RCUC3L routing card
  • CPU clock: – 12 MHz : EVK1100, EVK1101, EVK1104, EVK1105, AT32UC3L-EK evaluation kits; STK600+RCUC3L routing card; STK600+RCUCD routing card; – 16 MHz : UC3C_EK
  • USART0 (on EVK1100) or USART1 (on EVK1101 or STK1000 or STK600+RCUCD ) connected to a PC serial port via a standard RS232 DB9 cable, or USART0 (on EVK1105) or USART1 (on EVK1104) or USART2 (on AT32UC3C-EK) or USART3 (on AT32UC3L-EK) abstracted with a USB CDC connection to a PC;
  • PC terminal settings:
    • 57600 bps (on EVK1100, EVK1101, AT32UC3C-EK, EVK1104, EVK1105, 1AT32UC3L-EK, STK600+RCUCD) or 115200 bps (on STK1000),
    • 8 data bits,
    • no parity bit,
    • 1 stop bit,
    • no flow control.