Introduction to ASF4

ASF4 is a collection of software components such as peripheral drivers, middleware, and software applications provided by Microchip. The framework supports the Microchip's SAM family of microcontrollers.

Unlike older versions of the software framework, version 4 is designed to work together with Atmel START. Atmel START is a web-based user interface, which allows the users to configure code according to their needs. The configuration is input to START’s code generator, resulting in an optimal code implementing exactly the functionality configured by the user. The generated C-code is exported from START and into the user’s development environment of choice for modification and compilation.

The tight integration with Atmel START means that the ASF4 code is more tailored to the users' specification than before. For instance, instead of using C preprocessor conditional expressions to enable/disable code blocks, disabled code blocks can be entirely removed from the project source, which results in cleaner and easier to read code. The integration into Atmel START means that software configuration is done in a much more user-friendly environment and the only configuration information loaded on the device is the raw peripheral register content, which makes the firmware image much more compact. Code generation results in smaller and faster code compared to previous versions of ASF.

ASF4 has many improvements compared to previous ASF versions:

Common set of software interfaces across different devices

ASF4 has a set of fully hardware-abstracted interfaces as a part of the core architecture. These interfaces are use-case driven and supports only a subset of the functionality offered by the hardware. One hardware module is typically supported by multiple interfaces, and START is used to select which interfaces to be included in his project.

Providing common interfaces that are completely abstracted from the hardware makes them easier to use in middleware and software stacks since it is not necessary to add architecture specific code.

Smaller code size

Having START generate the code exactly matching the required configuration reduces the code size according to drivers in previous versions of ASF. Full featured and generic drivers make it hard for the driver developer to make optimal decisions for often mutually exclusive design parameters, such as like high speed, low power, low code size, ease of use, and advanced feature support. Such drivers often miss the target in many applications because some of the parameters are wrongly tuned for the application in mind. However, limiting the scope of the driver to a specific use-case, ASF4 drivers are able to get the balance between these parameters right.

Use-case drivers limit the driver functionality to the functionality required by the user, which usually is a subset of the full functionality provided by the peripheral. The use-cases can also tailor the driver to work in a specific environment such as:

See ASFv4 vs ASFv3 Benchmark for more details on improved code efficiency.

Easier to use

ASF4 is easy to use due to: