Microchip® Advanced Software Framework

Example for the Peripheral Event System - AST/PDCA

Introduction

This example shows how to use the Peripheral Event Controller. In the example, the AST generates a periodic event which is transmitted to the PDCA. Each time a new event occurs, a character is sent to the USART without the use of the CPU. The main loop of the function is a delay 500ms and toggle a LED continuously to show CPU activity.

Main Files

  • events.c: Events driver
  • events.h: Events driver header file
  • events_example1.c: Events example 1 application

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:

  • PC terminal settings:
    • 115200 baud
    • 8 data bits
    • no parity bit
    • 1 stop bit
    • no flow control