Starting Electronics needs your help! Please make a donation to help cover our hosting and other costs. Click the donate button to send a donation of any amount.

ASF ARM Tutorial Introduction

Created on: 19 April 2016

Part 1 of the ASF ARM Tutorial

This tutorial shows how to use the ASF or Atmel Software Framework in Atmel Studio 7 for ARM Cortex microcontrollers.

Atmel Software Framework is a collection of software components for Atmel Flash microcontrollers written in the C programming language. ASF includes software drivers, libraries and example projects that make development for Atmel microcontrollers easier. Embedded developers do not need to start a microcontroller software project completely from scratch and create driver functions and other utilities, but can use ASF drivers and utilities which are already written and tested.

Hardware used in this ASF ARM Tutorial

Any Atmel ARM Cortex microcontroller board can be used to follow this tutorial, even a custom board. ASF is available for AVR and ARM microcontrollers; a complete list of supported microcontrollers can be found on the Microchip website.

All ASF projects in this tutorial series have been developed and tested using Atmel Studio 7 and are run on an Atmel SAM4N Xplained Pro board (part number ATSAM4N-XPRO) which contains an ATSAM4N16C ARM Cortex-M4 based microcontroller. If you are using a different board, you will need to make minor changes to the examples when selecting the board and microcontroller in each project.

Atmel SAM4N Xplained Pro Evaluation Board
Atmel SAM4N Xplained Pro Evaluation Board

Books that may interest you:

C Programming with Arduino Book Ultimate Arduino MEGA 2560 Hardware Manual Ultimage Arduino Uno Hardware Manual

Getting the Atmel Software Framework

ASF is installed with Microchip Studio, so there is no need to install it separately. This tutorial uses ASF in Atmel Studio only.

ASF is available as a standalone package, but do not download this package for use with this tutorial, just install Microchip Studio.

ASF Structure

The ASF is usually shown arranged in layers as illustrated in the following image.

ASF structure layers
ASF Layers Arrangement

A brief explanation of each layer follows, but will make more sense once they are used in a project.

  • Applications – user application or example applications that use the underlying ASF modules.
  • Services – software services such as USB classes, FAT file system, DSP library, etc.
  • Components – drivers that access external hardware.
  • Drivers – low-level drivers that access on-chip microcontroller hardware.
  • Boards – hardware definitions for the board being used, e.g. clock crystal frequency, pin definitions for UART, LEDs, etc.
  • Utilities – linker script files, common files for the build system, general usage defines, macros and functions.

Next in this Tutorial Series

In the next part of this tutorial, a simple ASF ARM example project is created in Atmel Studio. The project is a very simple embedded application that blinks a single LED.