Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GPIO interrupt example for SAM4L8 Xplained Pro Documentation

Introduction

This example shows how to configure GPIO module to trigger an interrupt and an event.

The push button 0 is configured to trigger a GPIO interrupt when it is pressed. In the interrupt handler, the LED0 will be toggled every time.

The EXAMPLE_PIN_EVENT is configured to trigger a GPIO event when detecting a falling edge. Each time a new event is coming, it will trigger the PDCA to send a character to the USART without CPU usage.

Main Files

Compilation Information

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

Device Information

SAM4L device can be used.

Configuration Information

This example has been tested with the following configuration:

  • SAM4L evaluation kit
  • SAM4L Xplained Pro
  • SAM4L8 Xplained Pro
  • PC terminal settings:
    • 115200 bps
    • 8 data bits
    • no parity bit
    • 1 stop bit
    • no flow control

Contact Information

For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/