Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GPIO Local BUS Example for EVK1105 Documentation

Introduction

This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the GPIO driver.

The General Purpose Input/Output manages the I/O pins of the microcontroller. Each I/O line may be dedicated as a general-purpose I/O or be assigned to a function of an embedded peripheral. This assures effective optimization of the pins of a product.

The given example covers various uses of the GPIO controller and demonstrates different GPIO functionalities using the local bus interface.

This interface operates with high clock frequency (fCPU), and its timing is deterministic since it does not need to access a shared bus which may be heavily loaded.

To use this interface, the clock frequency of the peripheral bus on which the GPIO peripheral is connected must be set to the CPU clock frequency (fPBx = fCPU).

The example toggles PA10 on each CPU clock cycle. The CPU is set at the maximal frequency at which instructions can be fetched from flash without wait states, i.e. 33 MHz for UC3A & UC3A3 & UC3B & UC3D devices, 25MHz for UC3L devices. Hence, the pin signal frequency is:

  • for UC3A & UC3A3 & UC3B & UC3D: \( \frac{33 MHz}{2} = 16.5 MHz \) because the pin is toggled at 33 MHz
  • for UC3L & UC3L4: \( \frac{25 MHz}{2} = 12.5 MHz \) because the pin is toggled at 25 MHz This can be observed with an oscilloscope.

Main Files

Compilation Info

This software was written for the GNU GCC for AVR32 and IAR Systems compiler for AVR32. Other compilers may or may not work.

Device Info

All AVR32 devices with a GPIO module can be used. This example has been tested with the following setup:

  • EVK1100, EVK1101, EVK1104, EVK1105, AT32UC3C-EK, AT32UC3L-EK evaluation kit;
  • STK600+RCUC3L0 or STK600+RCUC3L4 routing card (PA10 is routed to STK600.PORTB.PB2).
  • STK600+RCUC3D routing card (PA10 is routed to STK600.PORTB.PB2).

Setup Information

  • CPU speed for UC3A & UC3A3 & UC3B: 33 MHz from 12-MHz Osc0 crystal
  • CPU speed for UC3C: 32 MHz from 16-MHz Osc0 crystal
  • CPU speed for UC3L & UC3L4: 25 MHz, no external component used
  • CPU speed for UC3D: 33 MHz from 12-MHz Osc0 crystal

Contact Information

For further information, visit Atmel AVR32.