Microchip® Advanced Software Framework

SAM RTC Unit Test

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM L22 Xplained Pro B board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different modes of the RTC are tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

The NVMCTRL_FUSES_EEPROM_SIZE has to be set to 0x00 in the fuse setting of the device to run this test. Atmel Studio can be used to set this fuse (Tools->Device Programming).

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test first initializes the EEPROM emulator and formats the memory if not previously done.
  • The test writes a buffer of data to arbitrary offset and reads back and compares
  • The test then writes a page of data to a page and reads back and compares

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM L22 Xplained Pro B board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different modes of the RTC count are tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires: -SAM D20 Xplained Pro

  • SCK: EXT3 PIN18 (PB23) <–> EXT2 PIN15 (PA17)
  • SS_0: EXT3 PIN15 (PB17) <–> EXT2 PIN16 (PA18)
  • DI/DO: EXT3 PIN17 (PB16) <–> EXT2 PIN17 (PA16)
  • DO/DI: EXT3 PIN16 (PB22) <–> EXT2 PIN18 (PA19) -SAM D21/DA1 Xplained Pro
  • SCK: EXT3 PIN15 (PB17) <–> EXT2 PIN15 (PA17)
  • SS_0: EXT3 PIN16 (PB22) <–> EXT2 PIN16 (PA18)
  • DI/DO: EXT3 PIN17 (PB16) <–> EXT2 PIN17 (PA16)
  • DO/DI: EXT3 PIN18 (PB23) <–> EXT2 PIN18 (PA19) -SAM HA1G16A Xplained Pro
  • SCK: EXT3 PIN17 (PA16) <–> EXT1 PIN16 (PA04)
  • SS_0: EXT3 PIN18 (PA17) <–> EXT1 PIN18 (PA05)
  • DI/DO: EXT3 PIN15 (PA20) <–> EXT1 PIN15 (PA10)
  • DO/DI: EXT3 PIN16 (PA21) <–> EXT1 PIN17 (PA11)

SAM R21 Xplained Pro

  • SS_0: EXT1 PIN15 (PB03) <–> EXT1 PIN12 (PA17)
  • DI/D0: EXT1 PIN16 (PB22) <–> EXT1 PIN7 (PA18)
  • DO/DI: EXT1 PIN17 (PB02) <–> EXT1 PIN11 (PA16)
  • SCK: EXT1 PIN18 (PB23) <–> EXT1 PIN8 (PA19)

SAM L21 Xplained Pro

  • DO/DI: EXT3 PIN9 (PA16) <–> EXT3 PIN17 (PB16)
  • SS_0: EXT2 PIN15 (PA17) <–> EXT3 PIN15 (PB17)
  • DI/DO: EXT2 PIN14 (PA18) <–> EXT3 PIN16 (PB22)
  • SCK: EXT2 PIN13 (PA19) <–> EXT3 PIN18 (PB23)

SAM L22 Xplained Pro.

  • SS_0: EXT1 PIN15 (PB21) <–> EXT2 PIN15 (PA17)
  • DO/DI: EXT1 PIN16 (PB00) <–> EXT2 PIN17 (PA16)
  • DI/DO: EXT1 PIN17 (PB02) <–> EXT2 PIN16 (PA18)
  • SCK: EXT1 PIN18 (PB01) <–> EXT2 PIN18 (PA19)

SAM C21 Xplained Pro.

  • SS_0: EXT1 PIN15 (PA17) <–> EXT2 PIN15 (PB03)
  • DO/DI: EXT1 PIN16 (PA18) <–> EXT2 PIN17 (PB02)
  • DI/DO: EXT1 PIN17 (PA16) <–> EXT2 PIN16 (PB00)
  • SCK: EXT1 PIN18 (PA19) <–> EXT2 PIN18 (PB01)

SAM R30 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT3 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT3 PIN15 (PA14)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT3 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT3 PIN18 (PB23)

SAM R34 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT1 PIN15 (PA23)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT1 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT1 PIN18 (PB23)

WLR 089 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT1 PIN15 (PA23)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT1 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT1 PIN18 (PB23)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out with SERCOM1 on EXT2 as SPI master and SERCOM0 on EXT1 as SPI slave.
  • Data is transmitted from master to slave in lengths of a single byte as well as multiple bytes.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D21/R21/L21/DA1/C21/R30/R34 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1 Xplained Pro:
    • EXTINT 4 (PB04, EXT1 pin 9 ) <--—> TCC0 WO0 (PA08, EXT2 pin 11)
  • SAM R21 Xplained Pro:
    • EXTINT 6 (PA06, EXT1 pin 3 ) <--—> TCC0 WO0 (PA08, EXT3 pin 10)
  • SAM L21 Xplained Pro:
    • EXTINT 4 (PB04, EXT1 pin 9 ) <--—> TCC0 WO0 (PB30, EXT3 pin 5)
  • SAM C21 Xplained Pro:
    • EXTINT 4 (PA20, EXT1 pin 5 ) <--—> TCC0 WO0 (PA08, EXT2 pin 3)
  • SAM R30 Xplained Pro:
    • EXTINT 3 (PB03, EXT1 pin 15 ) <--—> TCC0 WO0 (PA08, EXT3 pin 10)
  • SAM R30 Module Xplained Pro:
    • EXTINT 8 (PA28, EXT pin 10 ) <--—> TCC0 WO0 (PA08, EXT pin 11)
  • SAM R34 Xplained Pro:
    • EXTINT 7 (PA28, EXT1 pin 6 ) <--—> TCC0 WO0 (PA08, EXT1 pin 5)
  • WLR 089 Xplained Pro:
    • EXTINT 7 (PA28, EXT1 pin 6 ) <--—> TCC0 WO0 (PA08, EXT1 pin 5)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the several TCC modules internally for internal checks.
  • The EXTINT module is connected to a TCC module so that it can detect the correct TCC waveform output.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

A timer is used to guarantee the DAC conversions are performed at the correct sample rate, using the Event System module of the device to link the periodic timer output events to the DAC module to trigger new sample conversions.

This application has been tested on following boards:

  • SAM D20/D21/L21/C21 Xplained Pro

Hardware Setup

The device's DAC channel output should be connected to an audio amplifier, speaker, oscilloscope or other similar monitoring equipment so that the generated waveform can be monitored.

Usage

On startup the device hardware will be configured, and the example will enter an infinite loop. Each time the board button is pressed, the embedded waveform will be output through the DAC and the board LED will be toggled

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the internal Watchdog.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a runtime XOSC32K (external 32KHz crystal oscillator) failure detector, using hardware Clock failure detection with safe clock switch.

Use XOSC32K as the clock source of GCLK2, OSCULP32K is the safe clock. The GCLK2 output PIN will output 32K frequency signal, even though the XOSC32K is failed.

When a clock failure is detected, the XOSC32K clock is replaced by the safe clock in order to maintain an active clock during the XOSC32K clock failure. The safe clock source is the OSCULP32K oscillator clock.

In the example application, the GCLK2 reference clock is automatically switched between the internal and external 32KHz clock sources depending on the external reference availability.

This application has been tested on following boards:

  • SAM L22 Xplained Pro
  • SAM C21 Xplained Pro
  • SAM R30 Xplained Pro

Usage

Connect an oscilloscope to the pin:

  • SAM L22 Xplained Pro: PA15
  • SAM C21 Xplained Pro: PA16
  • SAM R30 Xplained Pro: PA14

Run the example application, then press and hold the board button to turn off the external XOSC32K crystal clock source to observe the fail-over to the internal clock source. Releasing the button will re-enable the external XOSC32K crystal.

The board LED will be turned on when the external crystal is used, and will be turned off when the internal OSCULP32K oscillator is used due to a XOSC32K failure detection.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This unit test carries out test for three modes of event propagation: Synchronous, Resynchronized & Asynchronous.

  • A RTC module with internal 32kHz RC oscillator is configured as an event generator and a Timer Counter (TC3) module is configured as event user.
  • RTC overflow signal is sent as an event to the timer. The timer will start counting on receiving this event.
  • The timer's count register is read to detect successful event action.

The following kits are supported for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test carries out test for three modes of event propagation: Synchronous, Resynchronized & Asynchronous.
  • RTC module with internal 32kHz RC oscillator is configured as event generator and Timer (TC3) module is configured as event user.
  • RTC overflow signal is sent as an event to the timer. The timer will start counting on receiving this event.
  • Timer's count register is read to detect successful event action.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test first initializes the EEPROM emulator and formats the memory if not previously done.
  • The test writes a buffer of data to arbitrary offset and reads back and compares
  • The test then writes a page of data to a page and reads back and compares

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro board
    • PB02 (EXT1 PIN7) <--—> PA08 (EXT2 PIN11)
    • PB03 (EXT1 PIN8) <--—> PA09 (EXT2 PIN12)
  • SAM L21 Xplained Pro board
    • PA12 (EXT1 PIN7) <--—> PA08 (EXT2 PIN11)
    • PA13 (EXT1 PIN8) <--—> PA09 (EXT2 PIN12)
  • SAM L22 Xplained Pro board
    • PB30 (EXT1 PIN11) <--—> PA12 (EXT2 PIN14)
    • PB31 (EXT1 PIN12) <--—> PA13 (EXT2 PIN13)
  • SAM R21 Xplained Pro board
    • PA16 (EXT1 PIN11) <--—> PB02 (EXT1 PIN17)
    • PA17 (EXT1 PIN12) <--—> PB03 (EXT1 PIN15)
  • SAM C21 Xplained Pro board
    • PA12 (EXT2 PIN11) <--—> PB30 (EXT2 PIN7)
    • PA13 (EXT2 PIN12) <--—> PB31 (EXT2 PIN8)
  • SAM R30 Xplained Pro board
    • PA22 (EXT1 PIN9) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN10) <--—> PA17 (EXT1 PIN12)
  • SAM R34 Xplained Pro board
    • PB02 (EXT1 PIN17) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN15) <--—> PA17 (EXT1 PIN12)
  • WLR 089 Xplained Pro board
    • PB02 (EXT1 PIN17) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN15) <--—> PA17 (EXT1 PIN12)

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures a I2C master and a I2C slave,
  • master write to slave and then read from slave,
  • compare the write and read results

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

Input to the AC is provided with the DAC module.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board

Setup

The following connections has to be made using wires:

  • DAC VOUT (PA02) <--—> AIN0 (PA04)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures DAC module to provide voltage to the AC positive input.
  • AC negative input is given from internal voltage scaler.
  • DAC output is adjusted to generate various voltages which are compared by the AC.
  • Different modes of the AC are tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM L22 Xplained Pro board

Setup

There is no special requirement.

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port, and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Polling mode read is tested.
  • Callback mode read is tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

Tests will be performed for rising and falling edges of the external signal.

The following kit is required for carrying out the test:

  • SAM D20/D21/R21/L21/L22/DA1/C21/R30/R34 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro
    • EXT1 Pin 9 (PB04) <--—> Pin 11 (PA08)
  • SAM R21 Xplained Pro
    • EXT1 Pin 3 (PA06) <--—> EXT3 Pin 10 (PA08)
  • SAM L21 Xplained Pro
    • EXT1 Pin 9 (PB04) <--—> EXT3 Pin 5 (PB30)
  • SAM L22 Xplained Pro
    • EXT1 Pin 9 (PC02) <--—> EXT3 Pin 5 (PC16)
  • SAM C21 Xplained Pro
    • EXT1 Pin 9 (PB14) <--—> EXT1 Pin 10 (PB15)
  • SAM R30 Xplained Pro
    • EXT1 Pin 5 (PA13) <--—> EXT1 Pin 8 (PA19)
  • SAM R30 Module Xplained Pro
    • EXT Pin 10 (PA28) <--—> EXT Pin 3 (PA06)
  • SAM R34 Xplained Pro
    • EXT1 Pin 9 (PA22) <--—> EXT3 Pin 10 (PA08)
  • WLR 089 Xplained Pro
    • EXT1 Pin 9 (PA22) <--—> EXT3 Pin 10 (PA08)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures external interrupt on PB04 pin (channel 4) to detect falling edge.
  • Logic level on PB05 is changed from high to low (falling edge) and the channel is checked for interrupt detection.
  • The test is repeated for rising edge and with callback enabled.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

Input to the ADC is provided with the DAC module.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/L21/C21/D20 Xplained Pro
    • DAC VOUT (PA02) <--—> ADC4 (PA04)

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures DAC module to provide voltage to the ADC input.
  • DAC output is adjusted to generate various voltages which are measured by the ADC.
  • Different modes of the ADC are tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit can be used for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the internal NVM controller.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro board
    • TX/RX: EXT2 PIN17 (PA16) <–> EXT3 PIN17 (PB16)
  • SAM HA1G16A Xplained Pro board
    • TX/RX: EXT1 PIN14 (PB10) <–> EXT1 PIN12 (PA09)
  • SAM R21 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SAM L21 Xplained Pro board
    • TX/RX: EXT2 PIN3 (PA10) <–> EXT2 PIN8 (PB13)
  • SAM L22 Xplained Pro board
    • TX/RX: EXT1 PIN13 (PA23) <–> EXT3 PIN3 (PA06)
  • SAM C21 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA12) <–> EXT2 PIN4 (PA09)
  • SAM R30 Xplained Pro board
    • TX/RX: EXT1 PIN7 (PA18) <–> EXT1 PIN12 (PA17) <<<<<<< HEAD
  • SAM R30 Module Xplained Pro board

    - TX/RX: EXT PIN13 (PA14) <–> EXT PIN15 (PA17)

  • SAM R34 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • WLR 089 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)

      3518a2958ff4695a84f9222901de2da524b4520d

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out with one SERCOM on EXT1 as the USART transmitter and another SERCOM on EXT1 as the SERCOM USART receiver.
  • Data is transmitted from transmitter to receiver in lengths of a single byte as well as multiple bytes.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different operations of the dac are tested.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a simple example to toggle the board LED.

This application has been tested on following boards:

  • SAM D20/D21/R21/D11/L21/L22/R30/R34 Xplained Pro
  • SAM D10 Xplained Mini
  • SAMR21ZLL-EK

Usage

The application uses system timer to generate periodic interrupts, once the interrupt occurs, LED0 will toggle.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for TC driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the FREQM driver.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the RWW EEPROM Emulator service.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for WDT driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.

This unit test carries out tests for the RWW EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for RWW EEPROM emulator initialization.
  • Test for RWW EEPROM emulator buffer read/write functionality.
  • Test for RWW EEPROM emulator page read/write functionality.

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This unit test carries out tests for the FREQM driver.

It consists of test cases for the following functionalities:

  • Test for FREQM polling mode read.
  • Test for FREQM callback mode read.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

The following kit is required for carrying out the test:

  • SAM D20/D21/R21/L21/L22/DA1/C21/R30/HA1G16A Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/D20 Xplained Pro:EXTINT 0 (PB00, EXT1 pin 3) <--—> TC4 WO1 (PB09, EXT1 pin 13)
  • SAM R21 Xplained Pro:EXTINT 0 (PA16, EXT2 pin 11) <--—> TC4 WO1 (PA23, EXT1 pin 10)
  • SAM L21 Xplained Pro:EXTINT 0 (PB00, EXT3 pin 3) <--—> TC0 WO1 (PB09, EXT1 pin 13)
  • SAM L22 Xplained Pro:EXTINT 2 (PB16, EXT3 pin 7) <--—> TC0 WO1 (PB09, EXT1 pin 8)
  • SAM DA1 Xplained Pro:EXTINT 0 (PA16, EXT2 pin 17) <--—> TC4 WO1 (PB09, EXT1 pin 13)
  • SAM HA1G16A Xplained Pro:EXTINT 0 (PA16, EXT1 pin 10) <--—> TC3 WO1 (PA19, EXT1 pin 8)
  • SAM C21 Xplained Pro:EXTINT 0 (PB16, EXT2 pin 9) <--—> TC0 WO1 (PB09, EXT1 pin 3)
  • SAM R30 Xplained Pro:EXTINT 0 (PA16, EXT1 pin 11) <--—> TC0 WO1 (PA23, EXT1 pin 10)
  • SAM R30 Module Xplained Pro:EXTINT 0 (PA16, EXT1 pin 11) <--—> TC4 WO1 (PA19, EXT pin 17)
  • SAM R34 Xplained Pro:EXTINT 1 (PA17, EXT1 pin 12) <--—> TC0 WO1 (PA23, EXT1 pin 15)
  • WLR 089 Xplained Pro:EXTINT 1 (PA17, EXT1 pin 12) <--—> TC0 WO1 (PA23, EXT1 pin 15)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the several TC modules internally for internal checks.
  • The EXTINT module is connected to a TC module so that it can detect the correct TC waveform output.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application has been tested on following boards:

  • SAM D20/D21/R21/D11/L21/L22/C21/R30 Xplained Pro

Hardware Setup

This application use AIN0 as ADC input channel. When the measured voltage is lower than 0.5V, then the device will start toggling the led pin to signal that the low voltage condition has happened. Connect the PA02(EXT3 pin3) to GND in SAM D20/D21 Xplained Pro to trigger it. Connect the PA06(EXT1 pin3) to GND in SAM R21 Xplained Pro to trigger it. Connect the PA02(EXT1 pin3) to GND in SAM D10/D11 Xplained Pro to trigger it. Connect the PA03(EXT1 pin4) to GND in SAM L21/L22 Xplained Pro to trigger it. Connect the PA03_ADC_DAC_VREF(J701 pin4) to GND in SAM C21 Xplained Pro to trigger it. Connect the PA04(EXT1 pin14) to GND in SAM R30 Xplained Pro to trigger it.

If debugging it is also possible to start a debug session and place a breakpoint in the window callback that will trigger whenever the voltage has gone below the defined threshold.

The application can easily be modified to monitor other voltages by changing the input source and threshold values in the adc_setup function.

Implementation Details

ADC Configuration

The ADC is configured to perform hardware averaging on the measured value, where the ADC will sample the signal 16 times and find the average value in hardware. This smooths out high frequency noise.

Sample timing

To trigger the ADC conversions, the RTC is setup in 32-bit counter mode, clocked by the internal 32kHz oscillator divided by 32, giving a 1kHz input clock. A compare value of 1000 is used to trigger the ADC conversion every second.

Event Routing

The Event system is setup to route the compare match interrupt from the RTC to the ADC, and the ADC is configured to start a new conversion on an event input. The event channel is configured as an asynchronous channel, so no clock is needed for the event channel during sleep.

Compilation Info

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

Contact Information

For further information, visit http://www.microchip.com.